@opengeni/runtime 2.5.1-canary.0 → 2.5.2-canary.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/index.js CHANGED
@@ -247,7 +247,7 @@ import {
247
247
  workspaceEnvironmentInstructions,
248
248
  wrapAttemptToolDefinitions,
249
249
  wrapAttemptToolExecute
250
- } from "./chunk-26GUTY32.js";
250
+ } from "./chunk-GBHOT4KS.js";
251
251
  import {
252
252
  ActiveBackendUnresolvableError,
253
253
  BROWSER_CONTROL_ADMIN_TOKEN_FILE,
@@ -361,6 +361,7 @@ import {
361
361
  buildTerminalServerScript,
362
362
  cancelSelfhostedOp,
363
363
  captureVerifiedWorkspaceArchive,
364
+ captureWorkspaceArchiveForStorage,
364
365
  classifyProviderSandboxFailure,
365
366
  clearRunCredentials,
366
367
  clearRunCredentialsForAttempt,
@@ -385,6 +386,7 @@ import {
385
386
  describeNativeSnapshotArchive,
386
387
  deserializeSandboxSessionStateEnvelope,
387
388
  desktopCapableBackend,
389
+ disposeWorkspaceArchive,
388
390
  dockerNetworkExposedPortEndpoint,
389
391
  drainingExhaustedError,
390
392
  drainingMessage,
@@ -517,7 +519,7 @@ import {
517
519
  withRunCredentialsClient,
518
520
  withRunCredentialsSession,
519
521
  withoutSandboxProviderIdentity
520
- } from "./chunk-LGLJ5PVD.js";
522
+ } from "./chunk-LEIGL6X2.js";
521
523
  import "./chunk-CD22I76N.js";
522
524
  import {
523
525
  SKILL_MAX_FILES,
@@ -759,6 +761,7 @@ export {
759
761
  callModelInputFilterForSettings,
760
762
  cancelSelfhostedOp,
761
763
  captureVerifiedWorkspaceArchive,
764
+ captureWorkspaceArchiveForStorage,
762
765
  clampCompactionThresholdRatio,
763
766
  classifyProviderSandboxFailure,
764
767
  clearRunCredentials,
@@ -804,6 +807,7 @@ export {
804
807
  describeNativeSnapshotArchive,
805
808
  deserializeSandboxSessionStateEnvelope,
806
809
  desktopCapableBackend,
810
+ disposeWorkspaceArchive,
807
811
  dockerNetworkExposedPortEndpoint,
808
812
  drainingExhaustedError,
809
813
  drainingMessage,
@@ -0,0 +1,14 @@
1
+ import type { TarWorkspaceArchiveDescriptor } from "@opengeni/contracts";
2
+ /** Process-owned, reopenable archive bytes. Never persisted as a local path. */
3
+ export type WorkspaceArchiveSpool = {
4
+ path: string;
5
+ byteSize: number;
6
+ sha256: string;
7
+ open: () => AsyncIterable<Uint8Array>;
8
+ dispose: () => Promise<void>;
9
+ };
10
+ export type VerifiedHostWorkspaceArchive = {
11
+ kind: "host_spool";
12
+ spool: WorkspaceArchiveSpool;
13
+ descriptor: TarWorkspaceArchiveDescriptor;
14
+ };
@@ -0,0 +1,19 @@
1
+ import type { WorkspaceTreeFingerprint } from "@opengeni/contracts";
2
+ import type { WorkspaceArchiveSpool } from "./archive-spool.js";
3
+ /** Matches SDK 0.14.3 resolveSandboxArchiveLimits: absent/null means unlimited;
4
+ * an explicit object fills undefined fields with SDK defaults, null disables a field.
5
+ * chunkBytes controls buffering, never the amount of input accepted. */
6
+ export type HostWorkspaceArchiveOptions = {
7
+ chunkBytes?: number;
8
+ archiveLimits?: {
9
+ maxInputBytes?: number | null;
10
+ maxExtractedBytes?: number | null;
11
+ maxMembers?: number | null;
12
+ } | null;
13
+ };
14
+ export declare function fingerprintHostWorkspace(root: string, excludedPaths: readonly string[]): Promise<WorkspaceTreeFingerprint>;
15
+ export declare function captureHostWorkspaceArchive(root: string, excludedPaths: readonly string[]): Promise<{
16
+ spool: WorkspaceArchiveSpool;
17
+ workspace: WorkspaceTreeFingerprint;
18
+ }>;
19
+ export declare function restoreHostWorkspaceArchive(root: string, spool: WorkspaceArchiveSpool, options?: HostWorkspaceArchiveOptions): Promise<void>;
@@ -1,6 +1,9 @@
1
1
  export type { ProviderCommandPersistence, ProviderCommandSession, } from "./provider-command-session.js";
2
2
  import type { Settings } from "@opengeni/config";
3
- import { type SandboxBackend, type SandboxProviderContinuityRecovery } from "@opengeni/contracts";
3
+ export type { WorkspaceArchiveSpool, VerifiedHostWorkspaceArchive } from "./archive-spool.js";
4
+ import type { WorkspaceArchiveSpool } from "./archive-spool.js";
5
+ export { captureWorkspaceArchiveForStorage, disposeWorkspaceArchive, type VerifiedWorkspaceArchivePayload, } from "./workspace-archive.js";
6
+ import { type WorkspaceArchiveObjectRef, type SandboxBackend, type SandboxProviderContinuityRecovery } from "@opengeni/contracts";
4
7
  import type { SandboxClient, SandboxSessionState } from "@openai/agents/sandbox";
5
8
  import { type WorkspaceArchiveDescriptor } from "./workspace-archive.js";
6
9
  import type { RuntimeMetricsHooks } from "../metrics.js";
@@ -202,6 +205,7 @@ export declare function withoutSandboxProviderIdentity(envelope: Record<string,
202
205
  export declare function establishSandboxSessionFromEnvelope(settings: Settings, envelope: Record<string, unknown> | null, opts: {
203
206
  sessionId: string;
204
207
  recovery: "create-or-restore" | "resume-only";
208
+ loadHostWorkspaceArchive?: (ref: WorkspaceArchiveObjectRef) => Promise<WorkspaceArchiveSpool>;
205
209
  backendOverride?: SandboxBackend;
206
210
  environment?: Record<string, string>;
207
211
  onSandboxCreated?: SandboxCreatedCallback;
@@ -110,6 +110,7 @@ import {
110
110
  buildTerminalServerScript,
111
111
  cancelSelfhostedOp,
112
112
  captureVerifiedWorkspaceArchive,
113
+ captureWorkspaceArchiveForStorage,
113
114
  classifyProviderSandboxFailure,
114
115
  clearRunCredentials,
115
116
  clearRunCredentialsForAttempt,
@@ -134,6 +135,7 @@ import {
134
135
  describeNativeSnapshotArchive,
135
136
  deserializeSandboxSessionStateEnvelope,
136
137
  desktopCapableBackend,
138
+ disposeWorkspaceArchive,
137
139
  dockerNetworkExposedPortEndpoint,
138
140
  drainingExhaustedError,
139
141
  drainingMessage,
@@ -265,7 +267,7 @@ import {
265
267
  withRunCredentialsClient,
266
268
  withRunCredentialsSession,
267
269
  withoutSandboxProviderIdentity
268
- } from "../chunk-LGLJ5PVD.js";
270
+ } from "../chunk-LEIGL6X2.js";
269
271
  import "../chunk-CD22I76N.js";
270
272
  import "../chunk-25B3EQRW.js";
271
273
  import "../chunk-PZ5AY32C.js";
@@ -381,6 +383,7 @@ export {
381
383
  buildTerminalServerScript,
382
384
  cancelSelfhostedOp,
383
385
  captureVerifiedWorkspaceArchive,
386
+ captureWorkspaceArchiveForStorage,
384
387
  classifyProviderSandboxFailure,
385
388
  clearRunCredentials,
386
389
  clearRunCredentialsForAttempt,
@@ -405,6 +408,7 @@ export {
405
408
  describeNativeSnapshotArchive,
406
409
  deserializeSandboxSessionStateEnvelope,
407
410
  desktopCapableBackend,
411
+ disposeWorkspaceArchive,
408
412
  dockerNetworkExposedPortEndpoint,
409
413
  drainingExhaustedError,
410
414
  drainingMessage,
@@ -1,4 +1,5 @@
1
1
  import { type NativeSnapshotDescriptor, type NativeSnapshotRef, type WorkspaceArchiveDescriptor, type WorkspaceTreeFingerprint } from "@opengeni/contracts";
2
+ import type { VerifiedHostWorkspaceArchive } from "./archive-spool.js";
2
3
  export { WORKSPACE_ARCHIVE_DESCRIPTOR_VERSION, decodeNativeSnapshotRef, encodeNativeSnapshotRef, parseWorkspaceArchiveDescriptor, type NativeSnapshotDescriptor, type NativeSnapshotProvider, type NativeSnapshotRef, type TarWorkspaceArchiveDescriptor, type WorkspaceArchiveDescriptor, type WorkspaceTreeFingerprint, } from "@opengeni/contracts";
3
4
  export type VerifiedWorkspaceArchive = {
4
5
  bytes: Uint8Array;
@@ -7,6 +8,12 @@ export type VerifiedWorkspaceArchive = {
7
8
  kind: "tar" | "provider_snapshot";
8
9
  nativeSnapshot?: NativeSnapshotRef;
9
10
  };
11
+ export type VerifiedWorkspaceArchivePayload = VerifiedWorkspaceArchive | VerifiedHostWorkspaceArchive;
12
+ /** Host-backed portable archives can go directly to object storage without an
13
+ * intermediate whole-document string or buffer. Existing inline/provider APIs
14
+ * retain their compatibility path when disk-backed publication is unavailable. */
15
+ export declare function captureWorkspaceArchiveForStorage(session: unknown, capturedAtMs: number, options: WorkspaceArchiveCaptureOptions, objectStorageAvailable: boolean): Promise<VerifiedWorkspaceArchivePayload>;
16
+ export declare function disposeWorkspaceArchive(archive: VerifiedWorkspaceArchivePayload | undefined): Promise<void>;
10
17
  export type WorkspaceArchiveIntegrityCode = "archive_metadata_missing" | "archive_metadata_invalid" | "archive_base64_invalid" | "archive_hash_mismatch" | "archive_hydration_failed" | "workspace_fingerprint_unavailable" | "workspace_changed_during_capture" | "workspace_fingerprint_mismatch" | "native_snapshot_reference_invalid" | "native_snapshot_fallback_unverified";
11
18
  export declare class WorkspaceArchiveIntegrityError extends Error {
12
19
  readonly code: WorkspaceArchiveIntegrityCode;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  prepareAgentTools
3
- } from "./chunk-26GUTY32.js";
4
- import "./chunk-LGLJ5PVD.js";
3
+ } from "./chunk-GBHOT4KS.js";
4
+ import "./chunk-LEIGL6X2.js";
5
5
  import "./chunk-CD22I76N.js";
6
6
  import "./chunk-GB763TSV.js";
7
7
  import "./chunk-UZ66CGC2.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/runtime",
3
- "version": "2.5.1-canary.0",
3
+ "version": "2.5.2-canary.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -62,16 +62,16 @@
62
62
  "@openai/agents": "0.14.3",
63
63
  "@openai/agents-core": "0.14.3",
64
64
  "@openai/agents-extensions": "0.14.3",
65
- "@opengeni/agent-proto": "^0.5.1-canary.24",
66
- "@opengeni/capabilities": "^0.3.3-canary.6",
67
- "@opengeni/codemode": "^0.5.4-canary.0",
68
- "@opengeni/codex": "^0.2.22-canary.6",
69
- "@opengeni/config": "^1.1.0-canary.0",
70
- "@opengeni/contracts": "^3.0.0-canary.0",
71
- "@opengeni/network": "^0.3.1-canary.6",
72
- "@opengeni/sdk": "^5.0.0-canary.0",
73
- "@opengeni/tool-gateway": "^0.1.5-canary.0",
74
- "@opengeni/xai-subscription": "^0.1.4-canary.6",
65
+ "@opengeni/agent-proto": "^0.5.1-canary.25",
66
+ "@opengeni/capabilities": "^0.3.3-canary.7",
67
+ "@opengeni/codemode": "^0.5.5-canary.0",
68
+ "@opengeni/codex": "^0.2.22-canary.7",
69
+ "@opengeni/config": "^1.1.1-canary.0",
70
+ "@opengeni/contracts": "^3.0.1-canary.0",
71
+ "@opengeni/network": "^0.3.1-canary.7",
72
+ "@opengeni/sdk": "^5.0.3-canary.0",
73
+ "@opengeni/tool-gateway": "^0.1.6-canary.0",
74
+ "@opengeni/xai-subscription": "^0.1.4-canary.7",
75
75
  "debug": "4.4.3",
76
76
  "modal": "0.9.0",
77
77
  "openai": "6.47.0",
@@ -0,0 +1,16 @@
1
+ import type { TarWorkspaceArchiveDescriptor } from "@opengeni/contracts";
2
+
3
+ /** Process-owned, reopenable archive bytes. Never persisted as a local path. */
4
+ export type WorkspaceArchiveSpool = {
5
+ path: string;
6
+ byteSize: number;
7
+ sha256: string;
8
+ open: () => AsyncIterable<Uint8Array>;
9
+ dispose: () => Promise<void>;
10
+ };
11
+
12
+ export type VerifiedHostWorkspaceArchive = {
13
+ kind: "host_spool";
14
+ spool: WorkspaceArchiveSpool;
15
+ descriptor: TarWorkspaceArchiveDescriptor;
16
+ };