Harden computer use runtime and CLI (#4705)

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Jinwoo Hong
2026-06-07 17:49:01 -07:00
committed by GitHub
co-authored by Orca
parent 401fc1e43e
commit 76cb846d68
96 changed files with 10408 additions and 3410 deletions
+17
View File
@@ -22,6 +22,23 @@ describe('RuntimeRpcEnvelopeSchema', () => {
expect(parsed.success).toBe(true)
})
it('accepts structured failure data for agent recovery hints', () => {
const parsed = RuntimeRpcEnvelopeSchema.safeParse({
id: 'req-1',
ok: false,
error: {
code: 'app_not_found',
message: 'app not found: Gmail',
data: {
nextSteps: ['Target the desktop browser app/window that contains Gmail.']
}
},
_meta: { runtimeId: 'runtime-1' }
})
expect(parsed.success).toBe(true)
})
it('accepts a failure envelope without _meta', () => {
// Why: the runtime may fail before it has resolved its own runtimeId, in
// which case _meta is omitted. The schema must tolerate that rather than