@rivet-dev/agentos-core 0.0.0-integrate-dylib-into-main.815fcda → 0.0.0-main.b8ca993

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.
Files changed (101) hide show
  1. package/README.md +5 -8
  2. package/dist/agent-os.d.ts +168 -46
  3. package/dist/agent-os.js +809 -543
  4. package/dist/agentos-package.d.ts +29 -0
  5. package/dist/agentos-package.js +88 -0
  6. package/dist/base-filesystem.d.ts +2 -15
  7. package/dist/base-filesystem.js +23 -171
  8. package/dist/cron/types.d.ts +1 -1
  9. package/dist/default-software.d.ts +8 -0
  10. package/dist/default-software.js +10 -0
  11. package/dist/generated/AcpLimitsConfig.d.ts +4 -0
  12. package/dist/generated/AcpLimitsConfig.js +2 -0
  13. package/dist/generated/CreateVmConfig.d.ts +26 -0
  14. package/dist/generated/CreateVmConfig.js +1 -0
  15. package/dist/generated/FsPermissionRule.d.ts +6 -0
  16. package/dist/generated/FsPermissionRule.js +1 -0
  17. package/dist/generated/FsPermissionRuleSet.d.ts +6 -0
  18. package/dist/generated/FsPermissionRuleSet.js +1 -0
  19. package/dist/generated/FsPermissionScope.d.ts +3 -0
  20. package/dist/generated/FsPermissionScope.js +1 -0
  21. package/dist/generated/HttpLimitsConfig.d.ts +3 -0
  22. package/dist/generated/HttpLimitsConfig.js +2 -0
  23. package/dist/generated/JsModuleResolution.d.ts +1 -0
  24. package/dist/generated/JsModuleResolution.js +2 -0
  25. package/dist/generated/JsRuntimeConfig.d.ts +31 -0
  26. package/dist/generated/JsRuntimeConfig.js +1 -0
  27. package/dist/generated/JsRuntimeLimitsConfig.d.ts +11 -0
  28. package/dist/generated/JsRuntimeLimitsConfig.js +2 -0
  29. package/dist/generated/JsRuntimePlatform.d.ts +1 -0
  30. package/dist/generated/JsRuntimePlatform.js +2 -0
  31. package/dist/generated/MountPluginDescriptor.d.ts +4 -0
  32. package/dist/generated/MountPluginDescriptor.js +2 -0
  33. package/dist/generated/NativeRootFilesystemConfig.d.ts +5 -0
  34. package/dist/generated/NativeRootFilesystemConfig.js +1 -0
  35. package/dist/generated/PatternPermissionRule.d.ts +6 -0
  36. package/dist/generated/PatternPermissionRule.js +1 -0
  37. package/dist/generated/PatternPermissionRuleSet.d.ts +6 -0
  38. package/dist/generated/PatternPermissionRuleSet.js +1 -0
  39. package/dist/generated/PatternPermissionScope.d.ts +3 -0
  40. package/dist/generated/PatternPermissionScope.js +1 -0
  41. package/dist/generated/PermissionMode.d.ts +1 -0
  42. package/dist/generated/PermissionMode.js +2 -0
  43. package/dist/generated/PermissionsPolicy.d.ts +10 -0
  44. package/dist/generated/PermissionsPolicy.js +1 -0
  45. package/dist/generated/PluginLimitsConfig.d.ts +4 -0
  46. package/dist/generated/PluginLimitsConfig.js +2 -0
  47. package/dist/generated/PythonLimitsConfig.d.ts +6 -0
  48. package/dist/generated/PythonLimitsConfig.js +2 -0
  49. package/dist/generated/ResourceLimitsConfig.d.ts +24 -0
  50. package/dist/generated/ResourceLimitsConfig.js +2 -0
  51. package/dist/generated/RootFilesystemConfig.d.ts +9 -0
  52. package/dist/generated/RootFilesystemConfig.js +1 -0
  53. package/dist/generated/RootFilesystemEntry.d.ts +13 -0
  54. package/dist/generated/RootFilesystemEntry.js +1 -0
  55. package/dist/generated/RootFilesystemEntryEncoding.d.ts +1 -0
  56. package/dist/generated/RootFilesystemEntryEncoding.js +2 -0
  57. package/dist/generated/RootFilesystemEntryKind.d.ts +1 -0
  58. package/dist/generated/RootFilesystemEntryKind.js +2 -0
  59. package/dist/generated/RootFilesystemLowerDescriptor.d.ts +7 -0
  60. package/dist/generated/RootFilesystemLowerDescriptor.js +1 -0
  61. package/dist/generated/RootFilesystemMode.d.ts +1 -0
  62. package/dist/generated/RootFilesystemMode.js +2 -0
  63. package/dist/generated/ToolLimitsConfig.d.ts +10 -0
  64. package/dist/generated/ToolLimitsConfig.js +2 -0
  65. package/dist/generated/VmDnsConfig.d.ts +6 -0
  66. package/dist/generated/VmDnsConfig.js +2 -0
  67. package/dist/generated/VmLimitsConfig.d.ts +18 -0
  68. package/dist/generated/VmLimitsConfig.js +1 -0
  69. package/dist/generated/VmListenPolicyConfig.d.ts +5 -0
  70. package/dist/generated/VmListenPolicyConfig.js +2 -0
  71. package/dist/generated/WasmLimitsConfig.d.ts +7 -0
  72. package/dist/generated/WasmLimitsConfig.js +2 -0
  73. package/dist/host-dir-mount.d.ts +1 -1
  74. package/dist/host-tools-zod.js +27 -7
  75. package/dist/host-tools.js +9 -0
  76. package/dist/index.d.ts +3 -1
  77. package/dist/index.js +2 -1
  78. package/dist/layers.d.ts +2 -2
  79. package/dist/layers.js +19 -10
  80. package/dist/options-schema.d.ts +453 -0
  81. package/dist/options-schema.js +268 -0
  82. package/dist/packages.d.ts +17 -116
  83. package/dist/packages.js +35 -322
  84. package/dist/runtime-compat.d.ts +22 -9
  85. package/dist/runtime-compat.js +130 -144
  86. package/dist/runtime.d.ts +32 -5
  87. package/dist/sandbox.d.ts +112 -0
  88. package/dist/sandbox.js +264 -0
  89. package/dist/sidecar/agentos-protocol.d.ts +99 -1
  90. package/dist/sidecar/agentos-protocol.js +155 -18
  91. package/dist/sidecar/native-process-client.d.ts +6 -2
  92. package/dist/sidecar/native-process-client.js +8 -1
  93. package/dist/sidecar/permissions.d.ts +1 -1
  94. package/dist/sidecar/permissions.js +4 -4
  95. package/dist/sidecar/rpc-client.d.ts +62 -4
  96. package/dist/sidecar/rpc-client.js +339 -85
  97. package/dist/types.d.ts +10 -3
  98. package/package.json +40 -33
  99. package/dist/agents.d.ts +0 -63
  100. package/dist/agents.js +0 -42
  101. package/fixtures/AGENTOS_SYSTEM_PROMPT.md +0 -21
@@ -0,0 +1,268 @@
1
+ import { z } from "zod/v4";
2
+ const stringArray = z.array(z.string());
3
+ const nonNegativeInteger = z.number().int().nonnegative();
4
+ const positiveInteger = z.number().int().positive();
5
+ const functionSchema = z.custom((value) => typeof value === "function", { message: "Expected function" });
6
+ const permissionModeSchema = z.enum(["allow", "deny"]);
7
+ const fsPermissionRuleSchema = z
8
+ .object({
9
+ mode: permissionModeSchema,
10
+ operations: stringArray.optional(),
11
+ paths: stringArray.optional(),
12
+ })
13
+ .strict();
14
+ const patternPermissionRuleSchema = z
15
+ .object({
16
+ mode: permissionModeSchema,
17
+ operations: stringArray.optional(),
18
+ patterns: stringArray.optional(),
19
+ })
20
+ .strict();
21
+ const fsRulePermissionsSchema = z
22
+ .object({
23
+ default: permissionModeSchema.optional(),
24
+ rules: z.array(fsPermissionRuleSchema),
25
+ })
26
+ .strict();
27
+ const patternRulePermissionsSchema = z
28
+ .object({
29
+ default: permissionModeSchema.optional(),
30
+ rules: z.array(patternPermissionRuleSchema),
31
+ })
32
+ .strict();
33
+ const fsPermissionsSchema = z.union([permissionModeSchema, fsRulePermissionsSchema]);
34
+ const patternPermissionsSchema = z.union([
35
+ permissionModeSchema,
36
+ patternRulePermissionsSchema,
37
+ ]);
38
+ export const permissionsSchema = z
39
+ .object({
40
+ fs: fsPermissionsSchema.optional(),
41
+ network: patternPermissionsSchema.optional(),
42
+ childProcess: patternPermissionsSchema.optional(),
43
+ process: patternPermissionsSchema.optional(),
44
+ env: patternPermissionsSchema.optional(),
45
+ binding: patternPermissionsSchema.optional(),
46
+ })
47
+ .strict();
48
+ export const agentOsLimitsSchema = z
49
+ .object({
50
+ resources: z
51
+ .object({
52
+ cpuCount: positiveInteger.optional(),
53
+ maxProcesses: nonNegativeInteger.optional(),
54
+ maxOpenFds: nonNegativeInteger.optional(),
55
+ maxPipes: nonNegativeInteger.optional(),
56
+ maxPtys: nonNegativeInteger.optional(),
57
+ maxSockets: nonNegativeInteger.optional(),
58
+ maxConnections: nonNegativeInteger.optional(),
59
+ maxSocketBufferedBytes: nonNegativeInteger.optional(),
60
+ maxSocketDatagramQueueLen: nonNegativeInteger.optional(),
61
+ maxFilesystemBytes: nonNegativeInteger.optional(),
62
+ maxInodeCount: nonNegativeInteger.optional(),
63
+ maxBlockingReadMs: nonNegativeInteger.optional(),
64
+ maxPreadBytes: nonNegativeInteger.optional(),
65
+ maxFdWriteBytes: nonNegativeInteger.optional(),
66
+ maxProcessArgvBytes: nonNegativeInteger.optional(),
67
+ maxProcessEnvBytes: nonNegativeInteger.optional(),
68
+ maxReaddirEntries: nonNegativeInteger.optional(),
69
+ maxWasmFuel: nonNegativeInteger.optional(),
70
+ maxWasmMemoryBytes: nonNegativeInteger.optional(),
71
+ maxWasmStackBytes: nonNegativeInteger.optional(),
72
+ })
73
+ .strict()
74
+ .optional(),
75
+ http: z
76
+ .object({ maxFetchResponseBytes: positiveInteger.optional() })
77
+ .strict()
78
+ .optional(),
79
+ tools: z
80
+ .object({
81
+ defaultToolTimeoutMs: nonNegativeInteger.optional(),
82
+ maxToolTimeoutMs: nonNegativeInteger.optional(),
83
+ maxRegisteredToolkits: positiveInteger.optional(),
84
+ maxRegisteredToolsPerVm: positiveInteger.optional(),
85
+ maxToolsPerToolkit: positiveInteger.optional(),
86
+ maxToolSchemaBytes: positiveInteger.optional(),
87
+ maxToolExamplesPerTool: nonNegativeInteger.optional(),
88
+ maxToolExampleInputBytes: positiveInteger.optional(),
89
+ })
90
+ .strict()
91
+ .optional(),
92
+ plugins: z
93
+ .object({
94
+ maxPersistedManifestBytes: positiveInteger.optional(),
95
+ maxPersistedManifestFileBytes: nonNegativeInteger.optional(),
96
+ })
97
+ .strict()
98
+ .optional(),
99
+ acp: z
100
+ .object({
101
+ maxReadLineBytes: positiveInteger.optional(),
102
+ stdoutBufferByteLimit: positiveInteger.optional(),
103
+ })
104
+ .strict()
105
+ .optional(),
106
+ jsRuntime: z
107
+ .object({
108
+ v8HeapLimitMb: positiveInteger.optional(),
109
+ syncRpcWaitTimeoutMs: nonNegativeInteger.optional(),
110
+ cpuTimeLimitMs: nonNegativeInteger.optional(),
111
+ wallClockLimitMs: nonNegativeInteger.optional(),
112
+ importCacheMaterializeTimeoutMs: positiveInteger.optional(),
113
+ capturedOutputLimitBytes: positiveInteger.optional(),
114
+ stdinBufferLimitBytes: positiveInteger.optional(),
115
+ eventPayloadLimitBytes: positiveInteger.optional(),
116
+ v8IpcMaxFrameBytes: positiveInteger.optional(),
117
+ })
118
+ .strict()
119
+ .optional(),
120
+ python: z
121
+ .object({
122
+ outputBufferMaxBytes: positiveInteger.optional(),
123
+ executionTimeoutMs: positiveInteger.optional(),
124
+ maxOldSpaceMb: nonNegativeInteger.optional(),
125
+ vfsRpcTimeoutMs: positiveInteger.optional(),
126
+ })
127
+ .strict()
128
+ .optional(),
129
+ wasm: z
130
+ .object({
131
+ maxModuleFileBytes: positiveInteger.optional(),
132
+ capturedOutputLimitBytes: positiveInteger.optional(),
133
+ syncReadLimitBytes: positiveInteger.optional(),
134
+ prewarmTimeoutMs: positiveInteger.optional(),
135
+ runnerHeapLimitMb: positiveInteger.optional(),
136
+ })
137
+ .strict()
138
+ .optional(),
139
+ })
140
+ .strict();
141
+ const rootLowerInputSchema = z.union([
142
+ z.object({ kind: z.literal("bundled-base-filesystem") }).strict(),
143
+ z.object({ kind: z.literal("snapshot-export"), source: z.unknown() }).strict(),
144
+ ]);
145
+ export const rootFilesystemConfigSchema = z
146
+ .object({
147
+ type: z.literal("overlay").optional(),
148
+ mode: z.enum(["ephemeral", "read-only"]).optional(),
149
+ disableDefaultBaseLayer: z.boolean().optional(),
150
+ lowers: z.array(rootLowerInputSchema).optional(),
151
+ })
152
+ .strict();
153
+ const nativeMountPluginSchema = z
154
+ .object({
155
+ id: z.string(),
156
+ config: z.unknown().optional(),
157
+ })
158
+ .strict();
159
+ const plainMountConfigSchema = z
160
+ .object({
161
+ path: z.string(),
162
+ driver: z.custom((value) => typeof value === "object" && value !== null, {
163
+ message: "Expected filesystem driver object",
164
+ }),
165
+ readOnly: z.boolean().optional(),
166
+ })
167
+ .strict();
168
+ export const nativeMountConfigSchema = z
169
+ .object({
170
+ path: z.string(),
171
+ plugin: nativeMountPluginSchema,
172
+ readOnly: z.boolean().optional(),
173
+ })
174
+ .strict();
175
+ const overlayMountConfigSchema = z
176
+ .object({
177
+ path: z.string(),
178
+ filesystem: z
179
+ .object({
180
+ type: z.literal("overlay"),
181
+ store: z.unknown(),
182
+ mode: z.enum(["ephemeral", "read-only"]).optional(),
183
+ lowers: z.array(z.unknown()),
184
+ })
185
+ .strict(),
186
+ })
187
+ .strict();
188
+ export const mountConfigSchema = z.union([
189
+ plainMountConfigSchema,
190
+ nativeMountConfigSchema,
191
+ overlayMountConfigSchema,
192
+ ]);
193
+ export const sharedSidecarConfigSchema = z
194
+ .object({
195
+ kind: z.literal("shared"),
196
+ pool: z.string().optional(),
197
+ })
198
+ .strict();
199
+ const explicitSidecarSchema = z
200
+ .object({
201
+ kind: z.literal("explicit"),
202
+ handle: z.unknown(),
203
+ })
204
+ .strict();
205
+ export const sidecarConfigSchema = z.union([
206
+ sharedSidecarConfigSchema,
207
+ explicitSidecarSchema,
208
+ ]);
209
+ const toolExampleSchema = z
210
+ .object({
211
+ description: z.string(),
212
+ input: z.unknown(),
213
+ })
214
+ .strict();
215
+ export const hostToolSchema = z
216
+ .object({
217
+ description: z.string(),
218
+ inputSchema: z.custom((value) => typeof value === "object" && value !== null, {
219
+ message: "Expected Zod schema object",
220
+ }),
221
+ execute: functionSchema,
222
+ examples: z.array(toolExampleSchema).optional(),
223
+ timeout: nonNegativeInteger.optional(),
224
+ })
225
+ .strict();
226
+ export const toolKitSchema = z
227
+ .object({
228
+ name: z.string(),
229
+ description: z.string(),
230
+ tools: z.record(z.string(), hostToolSchema),
231
+ })
232
+ .strict();
233
+ /**
234
+ * Shared AgentOsOptions field schemas.
235
+ *
236
+ * Core uses the full object. The Rivet/native actor composes a narrower
237
+ * native-safe subset in `packages/agentos/src/config.ts`; keep that subset and
238
+ * `crates/agentos-actor-plugin/src/config.rs::AgentOsConfigJson` aligned when
239
+ * adding options that cross the native boundary.
240
+ */
241
+ export const agentOsOptionFieldSchemas = {
242
+ software: z.array(z.unknown()).optional(),
243
+ defaultSoftware: z.boolean().optional(),
244
+ loopbackExemptPorts: z.array(z.number().int().min(0).max(65535)).optional(),
245
+ allowedNodeBuiltins: stringArray.optional(),
246
+ highResolutionTime: z.boolean().optional(),
247
+ rootFilesystem: rootFilesystemConfigSchema.optional(),
248
+ mounts: z.array(mountConfigSchema).optional(),
249
+ additionalInstructions: z.string().optional(),
250
+ scheduleDriver: z
251
+ .custom((value) => typeof value === "object" && value !== null, {
252
+ message: "Expected schedule driver object",
253
+ })
254
+ .optional(),
255
+ toolKits: z.array(toolKitSchema).optional(),
256
+ permissions: permissionsSchema.optional(),
257
+ sidecar: sidecarConfigSchema.optional(),
258
+ limits: agentOsLimitsSchema.optional(),
259
+ onAgentStderr: z.custom((value) => typeof value === "function", { message: "Expected function" }).optional(),
260
+ onAgentExit: z.custom((value) => typeof value === "function", { message: "Expected function" }).optional(),
261
+ onLimitWarning: z.custom((value) => typeof value === "function", { message: "Expected function" }).optional(),
262
+ };
263
+ export const agentOsOptionsSchema = z
264
+ .object(agentOsOptionFieldSchemas)
265
+ .strict();
266
+ export function parseAgentOsOptions(options) {
267
+ return agentOsOptionsSchema.parse(options ?? {});
268
+ }
@@ -1,127 +1,28 @@
1
- import type { PermissionTier } from "./runtime.js";
1
+ import type { SoftwarePackageRef } from "./agentos-package.js";
2
2
  /**
3
- * Resolve a package directory by walking up the directory tree.
4
- * Supports both nested (pnpm) and flat (npm) node_modules layouts.
3
+ * Input type for the `software` option. Software is a self-contained package
4
+ * directory that the secure-exec sidecar materializes into the `/opt/agentos`
5
+ * projection. Accepts a package-dir ref or an array of refs for meta-packages.
5
6
  */
6
- export declare function resolvePackageDir(startDir: string, packageName: string): string;
7
- import type { AgentConfig } from "./agents.js";
8
- export interface SoftwareDescriptor {
9
- name: string;
10
- type: "agent" | "tool" | "wasm-commands";
11
- }
12
- export interface AgentSoftwareDescriptor extends SoftwareDescriptor {
13
- type: "agent";
14
- /**
15
- * Root directory of this npm package on the host. Used to resolve
16
- * dependencies listed in `requires` from this package's node_modules/.
17
- */
18
- packageDir: string;
19
- /** npm packages that must be available inside the VM. */
20
- requires: string[];
21
- agent: {
22
- /** Unique agent ID used in createSession(id). */
23
- id: string;
24
- /** npm package name of the ACP adapter. Must be in requires. */
25
- acpAdapter: string;
26
- /** npm package name of the agent CLI. Must be in requires. */
27
- agentPackage: string;
28
- /** Static env vars passed when spawning the adapter. */
29
- staticEnv?: Record<string, string>;
30
- /** Dynamic env vars computed at boot time. */
31
- env?: (ctx: SoftwareContext) => Record<string, string>;
32
- /** Additional CLI args prepended when launching the ACP adapter. */
33
- launchArgs?: string[];
34
- };
35
- }
36
- export interface ToolSoftwareDescriptor extends SoftwareDescriptor {
37
- type: "tool";
38
- /**
39
- * Root directory of this npm package on the host. Used to resolve
40
- * dependencies listed in `requires` from this package's node_modules/.
41
- */
42
- packageDir: string;
43
- /** npm packages that must be available inside the VM. */
44
- requires: string[];
45
- /** Map of bin command name -> npm package name. */
46
- bins: Record<string, string>;
47
- }
48
- export interface WasmCommandSoftwareDescriptor extends SoftwareDescriptor {
49
- type: "wasm-commands";
50
- /** Absolute path to directory containing WASM command binaries on the host. */
51
- commandDir: string;
52
- /** Symlink aliases: aliasName -> targetCommandName. */
53
- aliases?: Record<string, string>;
54
- /** Permission tier assignments. */
55
- permissions?: {
56
- full?: string[];
57
- readWrite?: string[];
58
- readOnly?: string[] | "*";
59
- isolated?: string[];
60
- };
61
- }
62
- /**
63
- * Any object with a commandDir property is treated as a WASM command package.
64
- * This allows registry packages (e.g., @agentos-software/coreutils) to be
65
- * passed directly to the `software` option without wrapping.
66
- */
67
- export interface WasmCommandDirDescriptor {
68
- readonly commandDir: string;
69
- [key: string]: unknown;
70
- }
71
- export type AnySoftwareDescriptor = AgentSoftwareDescriptor | ToolSoftwareDescriptor | WasmCommandSoftwareDescriptor | WasmCommandDirDescriptor;
72
- /** Input type for the `software` option. Accepts descriptors or arrays of descriptors (for meta-packages). */
73
- export type SoftwareInput = AnySoftwareDescriptor | AnySoftwareDescriptor[];
74
- export interface SoftwareContext {
75
- /**
76
- * Resolve the bin entry for an npm package to a VM-side path.
77
- * Uses require.resolve on the HOST, then maps to /root/node_modules/...
78
- *
79
- * Example: ctx.resolveBin("@mariozechner/pi-coding-agent", "pi")
80
- * -> "/root/node_modules/@mariozechner/pi-coding-agent/dist/cli.js"
81
- */
82
- resolveBin(packageName: string, binName?: string): string;
83
- /**
84
- * Resolve a package's root directory to a VM-side path.
85
- *
86
- * Example: ctx.resolvePackage("pi-acp")
87
- * -> "/root/node_modules/pi-acp"
88
- */
89
- resolvePackage(packageName: string): string;
90
- }
7
+ export type SoftwareEntry = SoftwarePackageRef;
8
+ export type SoftwareInput = SoftwareEntry | SoftwareEntry[];
91
9
  /** Host-to-VM path mapping for a software package's `/root/node_modules/<pkg>` mount. */
92
10
  export interface SoftwareRoot {
93
11
  hostPath: string;
94
12
  vmPath: string;
95
13
  }
96
- export interface CommandPackageMetadata {
97
- commandDir: string;
98
- declaredCommands: string[];
99
- aliases: Record<string, string>;
100
- }
101
14
  /**
102
- * Define a software descriptor. This is a type-safe identity function that
103
- * validates the descriptor shape at compile time.
15
+ * Define a software descriptor. A type-safe identity function that validates the
16
+ * package-dir reference at compile time. The sidecar materializes the package into
17
+ * the `/opt/agentos` projection.
104
18
  */
105
- export declare function defineSoftware<T extends AnySoftwareDescriptor>(desc: T): T;
106
- /** Result of processing all software descriptors at boot time. */
107
- export interface ProcessedSoftware {
108
- /** WASM command directories to pass to the WasmVM driver. */
109
- commandDirs: string[];
110
- /** Per-package command metadata used to preserve command availability on the sidecar path. */
111
- commandPackages: CommandPackageMetadata[];
112
- /** Per-command permission tiers propagated into the WasmVM runtime. */
113
- commandPermissions: Record<string, PermissionTier>;
114
- /** Host-to-VM path mappings for software-package `/root/node_modules/<pkg>` mounts. */
115
- softwareRoots: SoftwareRoot[];
116
- /** Agent configs registered by agent software. */
117
- agentConfigs: Map<string, AgentConfig>;
118
- }
19
+ export declare function defineSoftware<T extends SoftwareEntry>(desc: T): T;
119
20
  /**
120
- * Process an array of software descriptors at boot time.
121
- * Collects WASM command dirs, module access roots, and agent configurations.
122
- *
123
- * Any object with a `commandDir` property (e.g., registry packages) is treated
124
- * as a WASM command source. Typed descriptors with `type: "agent"` or `type: "tool"`
125
- * are processed for module mounting and agent registration.
21
+ * Resolve the agent-SDK snapshot bundle (an esbuild IIFE at
22
+ * `<dir>/dist/sdk-snapshot.js`) for the first snapshot-enabled agent package in
23
+ * the software set. Returns its source so it can be evaluated once into the
24
+ * per-sidecar V8 startup snapshot (`jsRuntime.snapshotUserlandCode`) and reused
25
+ * across sessions. Returns `undefined` when no agent opts in (`agent.snapshot`)
26
+ * or the bundle is absent -- the runtime then keeps the per-session import path.
126
27
  */
127
- export declare function processSoftware(software: SoftwareInput[]): ProcessedSoftware;
28
+ export declare function resolveAgentSnapshotBundle(software: SoftwareInput[]): string | undefined;