@opengeni/runtime 4.0.1 → 4.0.3-canary.36199476632001
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/{agent-RJQLKFIW.js → agent-ME6HT4DH.js} +2 -2
- package/dist/assets/codemode-client.json +1 -1
- package/dist/browser-action-json-schema.d.ts +4 -0
- package/dist/{chunk-J5AR5XAJ.js → chunk-FAFZCSN7.js} +695 -210
- package/dist/chunk-FAFZCSN7.js.map +1 -0
- package/dist/{chunk-ZG2YH25H.js → chunk-JAYHA6BF.js} +2 -2
- package/dist/{chunk-UNICCRW5.js → chunk-LZIXCZUV.js} +6 -3
- package/dist/{chunk-UNICCRW5.js.map → chunk-LZIXCZUV.js.map} +1 -1
- package/dist/{chunk-J6J3VYFW.js → chunk-P4V7JGQ2.js} +1037 -105
- package/dist/chunk-P4V7JGQ2.js.map +1 -0
- package/dist/{chunk-SPT3PLMX.js → chunk-PRHMSM6C.js} +2 -2
- package/dist/codex-tool-search.d.ts +12 -0
- package/dist/context-compaction.d.ts +4 -2
- package/dist/index.d.ts +27 -8
- package/dist/index.js +23 -7
- package/dist/interaction-tools.d.ts +1 -1
- package/dist/{lazy-manifest-OEYEHNVY.js → lazy-manifest-GCGUFIWP.js} +3 -3
- package/dist/{localSources-TWHTEKGO.js → localSources-FDH65AFI.js} +4 -4
- package/dist/metrics.d.ts +17 -0
- package/dist/model-provider-routing.d.ts +14 -0
- package/dist/operational-instructions.d.ts +1 -1
- package/dist/provider-quota.d.ts +76 -0
- package/dist/sandbox/browser-control-client.d.ts +28 -1
- package/dist/sandbox/channel-a.d.ts +43 -0
- package/dist/sandbox/index.d.ts +3 -3
- package/dist/sandbox/index.js +10 -6
- package/dist/sandbox/providers/modal-command-router-wire.d.ts +8 -0
- package/dist/sandbox/providers/modal.d.ts +5 -6
- package/dist/workspace-tool-gateway.js +5 -5
- package/package.json +11 -11
- package/src/browser-action-json-schema.ts +10 -0
- package/src/bundled_artifact_skills/opengeni-documents/SKILL.md +4 -1
- package/src/bundled_artifact_skills/opengeni-documents/references/api.md +20 -0
- package/src/bundled_default_skills/opengeni-client/SKILL.md +4 -1
- package/src/bundled_default_skills/opengeni-client/references/discovery-and-autonomy.md +31 -0
- package/src/bundled_default_skills/opengeni-client/references/runtime-profile-and-verification.md +32 -0
- package/src/codex-tool-search.ts +54 -6
- package/src/context-compaction.ts +19 -3
- package/src/index.ts +285 -56
- package/src/interaction-tools.ts +656 -48
- package/src/lazy-tool-transport.ts +4 -0
- package/src/metrics.ts +26 -0
- package/src/model-context-inspector.ts +1 -0
- package/src/model-provider-client.ts +37 -16
- package/src/model-provider-routing.ts +32 -6
- package/src/operational-instructions.ts +1 -1
- package/src/provider-quota.ts +412 -0
- package/src/sandbox/browser-control-client.ts +241 -26
- package/src/sandbox/channel-a.ts +370 -0
- package/src/sandbox/index.ts +6 -1
- package/src/sandbox/providers/modal-command-control.ts +7 -1
- package/src/sandbox/providers/modal-command-router-wire.ts +47 -6
- package/src/sandbox/providers/modal.ts +16 -24
- package/src/sandbox/routing/routing-session.ts +29 -6
- package/dist/chunk-J5AR5XAJ.js.map +0 -1
- package/dist/chunk-J6J3VYFW.js.map +0 -1
- /package/dist/{agent-RJQLKFIW.js.map → agent-ME6HT4DH.js.map} +0 -0
- /package/dist/{chunk-ZG2YH25H.js.map → chunk-JAYHA6BF.js.map} +0 -0
- /package/dist/{chunk-SPT3PLMX.js.map → chunk-PRHMSM6C.js.map} +0 -0
- /package/dist/{lazy-manifest-OEYEHNVY.js.map → lazy-manifest-GCGUFIWP.js.map} +0 -0
- /package/dist/{localSources-TWHTEKGO.js.map → localSources-FDH65AFI.js.map} +0 -0
|
@@ -27,7 +27,10 @@
|
|
|
27
27
|
// real `readActiveSandbox` DAO + a backend resolver without coupling the leaf to
|
|
28
28
|
// `@opengeni/db`.
|
|
29
29
|
|
|
30
|
+
import { SandboxWorkspaceReadNotFoundError } from "@openai/agents/sandbox";
|
|
31
|
+
import { SandboxFilesystemNotFoundError } from "modal";
|
|
30
32
|
import type { ExposedPortEndpoint } from "../stream-port";
|
|
33
|
+
import { ModalCommandStartPreDispatchUnavailableError } from "../providers/modal-command-router-wire";
|
|
31
34
|
import { isDeepStrictEqual } from "node:util";
|
|
32
35
|
import {
|
|
33
36
|
withProviderCommandHandle,
|
|
@@ -373,6 +376,22 @@ export type RoutingSandboxFirstOperationObserver = (
|
|
|
373
376
|
|
|
374
377
|
type RoutingSandboxFirstOperationTiming = Pick<RoutingSandboxFirstOperationObservation, "phases">;
|
|
375
378
|
|
|
379
|
+
const READ_ONLY_PATH_PROBE_OPERATIONS = new Set(["readFile", "listDir", "pathExists", "viewImage"]);
|
|
380
|
+
|
|
381
|
+
/** A definite path miss is the provider's authoritative answer to a read-only
|
|
382
|
+
* probe (repository skill discovery lists absent `.agents/skills` on almost
|
|
383
|
+
* every turn), not a failed provider operation. Writes never qualify. Only
|
|
384
|
+
* typed misses count, the same set skill discovery treats as absent: generic
|
|
385
|
+
* 404 statuses or "not found" text never do. */
|
|
386
|
+
function isReadOnlyPathProbeMiss(op: string, error: unknown): boolean {
|
|
387
|
+
return (
|
|
388
|
+
READ_ONLY_PATH_PROBE_OPERATIONS.has(op) &&
|
|
389
|
+
(isDefinitePathNotFoundError(error) ||
|
|
390
|
+
error instanceof SandboxWorkspaceReadNotFoundError ||
|
|
391
|
+
error instanceof SandboxFilesystemNotFoundError)
|
|
392
|
+
);
|
|
393
|
+
}
|
|
394
|
+
|
|
376
395
|
function recordFirstOperationPhase(
|
|
377
396
|
timing: RoutingSandboxFirstOperationTiming | undefined,
|
|
378
397
|
phase: RoutingSandboxFirstOperationPhase,
|
|
@@ -1484,6 +1503,9 @@ export class RoutingSandboxSession implements RoutableBackendSession {
|
|
|
1484
1503
|
);
|
|
1485
1504
|
outcome = "completed";
|
|
1486
1505
|
return result;
|
|
1506
|
+
} catch (error) {
|
|
1507
|
+
if (isReadOnlyPathProbeMiss(op, error)) outcome = "completed";
|
|
1508
|
+
throw error;
|
|
1487
1509
|
} finally {
|
|
1488
1510
|
try {
|
|
1489
1511
|
firstOperationObserver({
|
|
@@ -1676,6 +1698,9 @@ export class RoutingSandboxSession implements RoutableBackendSession {
|
|
|
1676
1698
|
},
|
|
1677
1699
|
);
|
|
1678
1700
|
providerOutcome = "completed";
|
|
1701
|
+
} catch (error) {
|
|
1702
|
+
if (isReadOnlyPathProbeMiss(op, error)) providerOutcome = "completed";
|
|
1703
|
+
throw error;
|
|
1679
1704
|
} finally {
|
|
1680
1705
|
recordFirstOperationPhase(
|
|
1681
1706
|
firstOperationTiming,
|
|
@@ -1687,7 +1712,8 @@ export class RoutingSandboxSession implements RoutableBackendSession {
|
|
|
1687
1712
|
} catch (error) {
|
|
1688
1713
|
if (reservedProcess) {
|
|
1689
1714
|
if (
|
|
1690
|
-
error instanceof ProviderCommandStartRejectedError
|
|
1715
|
+
(error instanceof ProviderCommandStartRejectedError ||
|
|
1716
|
+
error instanceof ModalCommandStartPreDispatchUnavailableError) &&
|
|
1691
1717
|
reservedProcess.providerCommand?.kind === "modal-router-v1"
|
|
1692
1718
|
) {
|
|
1693
1719
|
const persistence = this.deps.providerCommandPersistence?.(reservedProcess);
|
|
@@ -1697,7 +1723,7 @@ export class RoutingSandboxSession implements RoutableBackendSession {
|
|
|
1697
1723
|
} catch (cause) {
|
|
1698
1724
|
throw new RoutingMutationOutcomeUnknownError(
|
|
1699
1725
|
op,
|
|
1700
|
-
"Never-started provider
|
|
1726
|
+
"Never-started provider call could not settle its exact reservation",
|
|
1701
1727
|
{ cause, retainedProcess: reservedProcess },
|
|
1702
1728
|
);
|
|
1703
1729
|
}
|
|
@@ -1942,10 +1968,7 @@ export class RoutingSandboxSession implements RoutableBackendSession {
|
|
|
1942
1968
|
return result;
|
|
1943
1969
|
} catch (error) {
|
|
1944
1970
|
materializationFailureReason = materializationVerificationDiagnostic(error)?.reason;
|
|
1945
|
-
if (
|
|
1946
|
-
(op === "readFile" || op === "listDir" || op === "pathExists" || op === "viewImage") &&
|
|
1947
|
-
isDefinitePathNotFoundError(error)
|
|
1948
|
-
) {
|
|
1971
|
+
if (isReadOnlyPathProbeMiss(op, error)) {
|
|
1949
1972
|
outcome = "not_found";
|
|
1950
1973
|
}
|
|
1951
1974
|
throw error;
|