@opengeni/api-router 2.12.3 → 2.12.4-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/app.js +1 -1
- package/dist/{chunk-552H26YK.js → chunk-4AQMKVQM.js} +53 -27
- package/dist/chunk-4AQMKVQM.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/sandbox/rematerialize.d.ts +1 -1
- package/package.json +19 -19
- package/src/sandbox/rematerialize.ts +33 -1
- package/dist/chunk-552H26YK.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Settings } from "@opengeni/config";
|
|
2
2
|
import { type Database, type LeaseSnapshot } from "@opengeni/db";
|
|
3
3
|
import { type EstablishedSandboxSession } from "@opengeni/runtime/sandbox";
|
|
4
|
-
import type
|
|
4
|
+
import { type ObjectStorage } from "@opengeni/storage";
|
|
5
5
|
/** The sole API-direct cold->warming owner path used by Channel A and viewer
|
|
6
6
|
* attach. It never publishes warm until archive identity, hydrated tree, command
|
|
7
7
|
* routing, provider identity, and the selected rematerialization attempt all
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeni/api-router",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.4-canary.0",
|
|
4
4
|
"description": "OpenGeni HTTP surface: the Hono adapter/router (createApp), routes, MCP HTTP transport, and HTTP access adapters over @opengeni/core. An engine-distribution surface — its runtime closure includes engine-internal packages.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -43,24 +43,24 @@
|
|
|
43
43
|
"@hono/zod-validator": "^0.7.6",
|
|
44
44
|
"@llamaindex/liteparse": "2.14.2",
|
|
45
45
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
46
|
-
"@opengeni/agent-proto": "^0.5.1",
|
|
47
|
-
"@opengeni/artifact-tool": "^0.3.
|
|
48
|
-
"@opengeni/capabilities": "^0.3.3",
|
|
49
|
-
"@opengeni/codemode": "^0.5.
|
|
50
|
-
"@opengeni/codex": "^0.2.22",
|
|
51
|
-
"@opengeni/config": "^1.1.
|
|
52
|
-
"@opengeni/contracts": "^3.0.
|
|
53
|
-
"@opengeni/core": "^2.9.
|
|
54
|
-
"@opengeni/db": "^4.3.
|
|
55
|
-
"@opengeni/documents": "^0.8.
|
|
56
|
-
"@opengeni/events": "^0.4.
|
|
57
|
-
"@opengeni/github": "^0.7.
|
|
58
|
-
"@opengeni/network": "^0.3.1",
|
|
59
|
-
"@opengeni/observability": "^0.8.
|
|
60
|
-
"@opengeni/runtime": "^2.5.
|
|
61
|
-
"@opengeni/storage": "^0.2.
|
|
62
|
-
"@opengeni/tool-gateway": "^0.1.
|
|
63
|
-
"@opengeni/xai-subscription": "^0.1.4",
|
|
46
|
+
"@opengeni/agent-proto": "^0.5.1-canary.26",
|
|
47
|
+
"@opengeni/artifact-tool": "^0.3.26-canary.0",
|
|
48
|
+
"@opengeni/capabilities": "^0.3.3-canary.8",
|
|
49
|
+
"@opengeni/codemode": "^0.5.6-canary.0",
|
|
50
|
+
"@opengeni/codex": "^0.2.22-canary.8",
|
|
51
|
+
"@opengeni/config": "^1.1.2-canary.0",
|
|
52
|
+
"@opengeni/contracts": "^3.0.2-canary.0",
|
|
53
|
+
"@opengeni/core": "^2.9.4-canary.0",
|
|
54
|
+
"@opengeni/db": "^4.3.3-canary.0",
|
|
55
|
+
"@opengeni/documents": "^0.8.27-canary.0",
|
|
56
|
+
"@opengeni/events": "^0.4.25-canary.0",
|
|
57
|
+
"@opengeni/github": "^0.7.10-canary.0",
|
|
58
|
+
"@opengeni/network": "^0.3.1-canary.8",
|
|
59
|
+
"@opengeni/observability": "^0.8.26-canary.0",
|
|
60
|
+
"@opengeni/runtime": "^2.5.3-canary.0",
|
|
61
|
+
"@opengeni/storage": "^0.2.127-canary.0",
|
|
62
|
+
"@opengeni/tool-gateway": "^0.1.7-canary.0",
|
|
63
|
+
"@opengeni/xai-subscription": "^0.1.4-canary.8",
|
|
64
64
|
"@temporalio/client": "^1.17.0",
|
|
65
65
|
"better-auth": "^1.6.14",
|
|
66
66
|
"hono": "^4.12.18",
|
|
@@ -32,7 +32,11 @@ import {
|
|
|
32
32
|
type EstablishedSandboxSession,
|
|
33
33
|
type WorkspaceArchiveDescriptor,
|
|
34
34
|
} from "@opengeni/runtime/sandbox";
|
|
35
|
-
import
|
|
35
|
+
import {
|
|
36
|
+
downloadWorkspaceArchiveSpool,
|
|
37
|
+
WorkspaceArchiveStorageError,
|
|
38
|
+
type ObjectStorage,
|
|
39
|
+
} from "@opengeni/storage";
|
|
36
40
|
|
|
37
41
|
function hasWorkspaceArchive(envelope: Record<string, unknown> | null): boolean {
|
|
38
42
|
const sessionState =
|
|
@@ -73,6 +77,14 @@ async function materializeArchiveObjectRef(
|
|
|
73
77
|
"workspace archive object storage is not configured",
|
|
74
78
|
);
|
|
75
79
|
}
|
|
80
|
+
const descriptor = parseWorkspaceArchiveDescriptor(sessionState.workspaceArchiveMeta);
|
|
81
|
+
if (
|
|
82
|
+
process.platform === "linux" &&
|
|
83
|
+
descriptor?.version === 1 &&
|
|
84
|
+
descriptor.workspace.projection === "sdk_local_archive_v1"
|
|
85
|
+
) {
|
|
86
|
+
return envelope;
|
|
87
|
+
}
|
|
76
88
|
return {
|
|
77
89
|
...envelope,
|
|
78
90
|
sessionState: await inlineWorkspaceArchiveForRestore(sessionState, (key) =>
|
|
@@ -209,6 +221,26 @@ export async function establishApiSandboxSpawner(input: {
|
|
|
209
221
|
established = await establishSandboxSessionFromEnvelope(input.settings, hydrateEnvelope, {
|
|
210
222
|
sessionId: input.sessionId,
|
|
211
223
|
recovery: "create-or-restore",
|
|
224
|
+
...(input.objectStorage
|
|
225
|
+
? {
|
|
226
|
+
loadHostWorkspaceArchive: async (ref) => {
|
|
227
|
+
try {
|
|
228
|
+
return await downloadWorkspaceArchiveSpool(input.objectStorage!, ref.key, {
|
|
229
|
+
bytes: ref.bytes,
|
|
230
|
+
sha256: ref.sha256,
|
|
231
|
+
});
|
|
232
|
+
} catch (error) {
|
|
233
|
+
if (error instanceof WorkspaceArchiveStorageError) {
|
|
234
|
+
throw new WorkspaceArchiveIntegrityError(error.code, error.message, {
|
|
235
|
+
retryable: error.retryable,
|
|
236
|
+
cause: error,
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
throw error;
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
}
|
|
243
|
+
: {}),
|
|
212
244
|
backendOverride: input.backend as never,
|
|
213
245
|
environment: input.environment,
|
|
214
246
|
onSandboxCreated: async (created) => {
|