Once you’ve deployed an app and invoked it, you can check its status.
import Kernel from '@onkernel/sdk';

const client = new Kernel({
  apiKey: 'My API Key',
});

const invocation = await client.invocations.retrieve('rr33xuugxj9h0bkf1rdt2bet');

console.log(invocation.id);
An invocation ends once its code execution finishes.