@opengeni/runtime 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-DYBF7ZEB.js → chunk-RYDCVTMW.js} +1958 -207
- package/dist/chunk-RYDCVTMW.js.map +1 -0
- package/dist/{index-BTo_bZvN.d.ts → index-DIiiwQY2.d.ts} +689 -52
- package/dist/index.d.ts +293 -123
- package/dist/index.js +1819 -790
- package/dist/index.js.map +1 -1
- package/dist/sandbox/index.d.ts +1 -1
- package/dist/sandbox/index.js +79 -3
- package/package.json +21 -20
- package/src/codex-tool-search.ts +185 -31
- package/src/context-compaction.ts +78 -243
- package/src/history-sanitizer.ts +172 -20
- package/src/index.ts +2573 -898
- package/src/metrics.ts +28 -2
- package/src/sandbox/capabilities.ts +12 -3
- package/src/sandbox/channel-a.ts +420 -72
- package/src/sandbox/display-stack.ts +18 -4
- package/src/sandbox/errors.ts +13 -0
- package/src/sandbox/index.ts +398 -112
- package/src/sandbox/op-correlation.ts +70 -0
- package/src/sandbox/providers/index.ts +9 -3
- package/src/sandbox/providers/modal.ts +84 -14
- package/src/sandbox/providers/selfhosted.ts +1 -4
- package/src/sandbox/recording.ts +146 -90
- package/src/sandbox/routing/backend-resolver.ts +144 -10
- package/src/sandbox/routing/routing-session.ts +129 -25
- package/src/sandbox/select.ts +60 -8
- package/src/sandbox/selfhosted/capabilities.ts +59 -25
- package/src/sandbox/selfhosted/control-rpc.ts +160 -28
- package/src/sandbox/selfhosted/fault-rendering.ts +226 -0
- package/src/sandbox/selfhosted/op-observer.ts +54 -0
- package/src/sandbox/selfhosted/op-stream.ts +801 -0
- package/src/sandbox/selfhosted/op-testing.ts +468 -0
- package/src/sandbox/selfhosted/op-transport.ts +151 -0
- package/src/sandbox/selfhosted/retry-policy.ts +177 -0
- package/src/sandbox/selfhosted/session.ts +498 -55
- package/src/sandbox/selfhosted/testing.ts +60 -19
- package/src/sandbox/stream-port.ts +17 -5
- package/src/sandbox/stream-token.ts +8 -2
- package/src/sandbox/terminal-server.ts +18 -4
- package/src/sandbox-computer.ts +332 -70
- package/src/usage-telemetry.ts +73 -0
- package/dist/chunk-DYBF7ZEB.js.map +0 -1
- package/src/image-history.ts +0 -149
- package/src/screenshot-omitted-card.ts +0 -15
|
@@ -106,7 +106,9 @@ export class DisplayStackError extends Error {
|
|
|
106
106
|
: exitCode === 14
|
|
107
107
|
? "paint"
|
|
108
108
|
: "unknown";
|
|
109
|
-
super(
|
|
109
|
+
super(
|
|
110
|
+
`desktop display stack failed at stage "${stage}" (exit ${exitCode})${output ? `:\n${output}` : ""}`,
|
|
111
|
+
);
|
|
110
112
|
this.name = "DisplayStackError";
|
|
111
113
|
this.exitCode = exitCode;
|
|
112
114
|
this.stage = stage;
|
|
@@ -132,8 +134,16 @@ type ExecResultLike = {
|
|
|
132
134
|
exitCode?: number | null;
|
|
133
135
|
};
|
|
134
136
|
type ExecCapableSession = {
|
|
135
|
-
exec?: (args: {
|
|
136
|
-
|
|
137
|
+
exec?: (args: {
|
|
138
|
+
cmd: string;
|
|
139
|
+
yieldTimeMs?: number;
|
|
140
|
+
maxOutputTokens?: number;
|
|
141
|
+
}) => Promise<ExecResultLike>;
|
|
142
|
+
execCommand?: (args: {
|
|
143
|
+
cmd: string;
|
|
144
|
+
yieldTimeMs?: number;
|
|
145
|
+
maxOutputTokens?: number;
|
|
146
|
+
}) => Promise<string>;
|
|
137
147
|
};
|
|
138
148
|
|
|
139
149
|
export type EnsureDisplayStackOptions = {
|
|
@@ -331,6 +341,10 @@ export async function tearDownDisplayStack(session: unknown): Promise<void> {
|
|
|
331
341
|
return;
|
|
332
342
|
}
|
|
333
343
|
if (typeof s?.execCommand === "function") {
|
|
334
|
-
await s.execCommand({
|
|
344
|
+
await s.execCommand({
|
|
345
|
+
cmd: "opengeni-desktop-down",
|
|
346
|
+
yieldTimeMs: 10_000,
|
|
347
|
+
maxOutputTokens: 4_000,
|
|
348
|
+
});
|
|
335
349
|
}
|
|
336
350
|
}
|
package/src/sandbox/errors.ts
CHANGED
|
@@ -17,6 +17,19 @@ export class SandboxConfigError extends Error {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
/** A resume-only caller was handed a warm lease without a provider identity it
|
|
21
|
+
* can resume. The lease-aware caller must retire that exact epoch and re-enter
|
|
22
|
+
* admission; silently creating here would bypass the single-spawner guard. */
|
|
23
|
+
export class SandboxResumeStateUnavailableError extends Error {
|
|
24
|
+
readonly backend: SandboxBackend | string;
|
|
25
|
+
|
|
26
|
+
constructor(backend: SandboxBackend | string) {
|
|
27
|
+
super(`Sandbox lease for backend "${backend}" has no resumable provider identity`);
|
|
28
|
+
this.name = "SandboxResumeStateUnavailableError";
|
|
29
|
+
this.backend = backend;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
20
33
|
// Thrown by a provider's build() when its SDK client class is genuinely not
|
|
21
34
|
// available in the installed @openai/agents-extensions. Per the P0.3 ruling we
|
|
22
35
|
// NEVER fake a build body; if a provider cannot be constructed we register the
|