@rivet-dev/agentos-core 0.0.0-codex-actor-plugin-contract-coverage.c7d8f87 → 0.0.0-fix-main-wasm-ownership.150c49a
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/README.md +39 -36
- package/dist/agent-os.d.ts +197 -232
- package/dist/agent-os.js +769 -1162
- package/dist/agentos-package.d.ts +4 -2
- package/dist/agentos-package.js +4 -1
- package/dist/{host-tools-zod.d.ts → bindings-zod.d.ts} +1 -1
- package/dist/{host-tools-zod.js → bindings-zod.js} +27 -20
- package/dist/bindings.d.ts +43 -0
- package/dist/bindings.js +34 -0
- package/dist/cron/cron-manager.js +43 -10
- package/dist/cron/index.d.ts +1 -1
- package/dist/cron/types.d.ts +25 -9
- package/dist/filesystem-snapshot.d.ts +1 -2
- package/dist/filesystem-snapshot.js +0 -43
- package/dist/generated/AcpLimitsConfig.d.ts +16 -0
- package/dist/generated/BindingLimitsConfig.d.ts +10 -0
- package/dist/generated/CreateVmConfig.d.ts +2 -0
- package/dist/generated/ProcessLimitsConfig.d.ts +7 -0
- package/dist/generated/ProcessLimitsConfig.js +2 -0
- package/dist/generated/VmGroupConfig.d.ts +5 -0
- package/dist/generated/VmGroupConfig.js +2 -0
- package/dist/generated/VmLimitsConfig.d.ts +4 -2
- package/dist/generated/VmUserAccountConfig.d.ts +9 -0
- package/dist/generated/VmUserAccountConfig.js +2 -0
- package/dist/generated/VmUserConfig.d.ts +19 -0
- package/dist/generated/WasmLimitsConfig.d.ts +1 -0
- package/dist/index.d.ts +4 -5
- package/dist/index.js +4 -5
- package/dist/layers.d.ts +5 -2
- package/dist/layers.js +0 -185
- package/dist/options-schema.d.ts +134 -31
- package/dist/options-schema.js +144 -26
- package/dist/runtime-compat.d.ts +11 -37
- package/dist/runtime-compat.js +74 -374
- package/dist/runtime.d.ts +10 -3
- package/dist/sandbox.d.ts +4 -4
- package/dist/sandbox.js +4 -4
- package/dist/session-api.d.ts +180 -0
- package/dist/session-api.js +1 -0
- package/dist/sidecar/agentos-protocol.d.ts +420 -29
- package/dist/sidecar/agentos-protocol.js +683 -93
- package/dist/sidecar/native-process-client.d.ts +1 -1
- package/dist/sidecar/native-process-client.js +1 -1
- package/dist/sidecar/rpc-client.d.ts +39 -6
- package/dist/sidecar/rpc-client.js +111 -30
- package/dist/test/runtime.d.ts +2 -1
- package/dist/test/runtime.js +2 -1
- package/dist/test/terminal-harness.js +0 -3
- package/dist/types.d.ts +4 -5
- package/package.json +19 -17
- package/dist/agent-session-types.d.ts +0 -67
- package/dist/generated/ToolLimitsConfig.d.ts +0 -10
- package/dist/host-tools.d.ts +0 -45
- package/dist/host-tools.js +0 -35
- package/dist/overlay-filesystem.d.ts +0 -19
- package/dist/overlay-filesystem.js +0 -645
- /package/dist/generated/{ToolLimitsConfig.js → BindingLimitsConfig.js} +0 -0
- /package/dist/{agent-session-types.js → generated/VmUserConfig.js} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
export { AgentOs, AgentOsSidecar } from "./agent-os.js";
|
|
2
2
|
export { CronManager, InvalidScheduleError, PastScheduleError, TimerScheduleDriver, } from "./cron/index.js";
|
|
3
3
|
export { createHostDirBackend, nodeModulesMount } from "./host-dir-mount.js";
|
|
4
|
-
export {
|
|
5
|
-
export { agentOsLimitsSchema, agentOsOptionFieldSchemas, agentOsOptionsSchema,
|
|
6
|
-
export {
|
|
4
|
+
export { binding, MAX_BINDING_DESCRIPTION_LENGTH, bindings, validateBindings, } from "./bindings.js";
|
|
5
|
+
export { agentOsLimitsSchema, agentOsOptionFieldSchemas, agentOsOptionsSchema, bindingSchema, mountConfigSchema, nativeMountConfigSchema, parseAgentOsOptions, permissionsSchema, rootFilesystemConfigSchema, sharedSidecarConfigSchema, sidecarConfigSchema, bindingsSchema, } from "./options-schema.js";
|
|
6
|
+
export { createSnapshotExport, } from "./layers.js";
|
|
7
7
|
export { defineSoftware } from "./packages.js";
|
|
8
8
|
export { isPackageDescriptor, OPT_AGENTOS_BIN, OPT_AGENTOS_ROOT, tryReadAgentosPackageManifest, } from "./agentos-package.js";
|
|
9
|
-
export {
|
|
10
|
-
export { createInMemoryFileSystem, KernelError } from "./runtime-compat.js";
|
|
9
|
+
export { KernelError } from "./runtime-compat.js";
|
|
11
10
|
export type { ExecOptions, ExecResult, ManagedProcess, ProcessInfo, ShellHandle, VirtualDirEntry, VirtualStat, } from "./runtime.js";
|
|
12
11
|
export type * from "./types.js";
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
export { AgentOs, AgentOsSidecar } from "./agent-os.js";
|
|
3
3
|
export { CronManager, InvalidScheduleError, PastScheduleError, TimerScheduleDriver, } from "./cron/index.js";
|
|
4
4
|
export { createHostDirBackend, nodeModulesMount } from "./host-dir-mount.js";
|
|
5
|
-
export {
|
|
6
|
-
export { agentOsLimitsSchema, agentOsOptionFieldSchemas, agentOsOptionsSchema,
|
|
7
|
-
export {
|
|
5
|
+
export { binding, MAX_BINDING_DESCRIPTION_LENGTH, bindings, validateBindings, } from "./bindings.js";
|
|
6
|
+
export { agentOsLimitsSchema, agentOsOptionFieldSchemas, agentOsOptionsSchema, bindingSchema, mountConfigSchema, nativeMountConfigSchema, parseAgentOsOptions, permissionsSchema, rootFilesystemConfigSchema, sharedSidecarConfigSchema, sidecarConfigSchema, bindingsSchema, } from "./options-schema.js";
|
|
7
|
+
export { createSnapshotExport, } from "./layers.js";
|
|
8
8
|
export { defineSoftware } from "./packages.js";
|
|
9
9
|
export { isPackageDescriptor, OPT_AGENTOS_BIN, OPT_AGENTOS_ROOT, tryReadAgentosPackageManifest, } from "./agentos-package.js";
|
|
10
|
-
export {
|
|
11
|
-
export { createInMemoryFileSystem, KernelError } from "./runtime-compat.js";
|
|
10
|
+
export { KernelError } from "./runtime-compat.js";
|
package/dist/layers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseFilesystemSnapshot } from "./base-filesystem.js";
|
|
2
|
-
import {
|
|
2
|
+
import type { FilesystemEntry } from "./filesystem-snapshot.js";
|
|
3
3
|
import type { VirtualFileSystem } from "./runtime-compat.js";
|
|
4
4
|
export type OverlayFilesystemMode = "ephemeral" | "read-only";
|
|
5
5
|
export interface FilesystemSnapshotExport {
|
|
@@ -31,6 +31,10 @@ export type SnapshotImportSource = {
|
|
|
31
31
|
kind: "snapshot-export";
|
|
32
32
|
source: FilesystemSnapshotExport | unknown;
|
|
33
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* Caller-provided durable layer store. AgentOS forwards these explicit handles
|
|
36
|
+
* but does not provide a second client-side filesystem or overlay engine.
|
|
37
|
+
*/
|
|
34
38
|
export interface LayerStore {
|
|
35
39
|
readonly storeId: string;
|
|
36
40
|
createWritableLayer(): Promise<WritableLayerHandle>;
|
|
@@ -48,4 +52,3 @@ export interface LayerStore {
|
|
|
48
52
|
dispose(): void;
|
|
49
53
|
}
|
|
50
54
|
export declare function createSnapshotExport(entries: FilesystemEntry[]): RootSnapshotExport;
|
|
51
|
-
export declare function createInMemoryLayerStore(): LayerStore;
|
package/dist/layers.js
CHANGED
|
@@ -1,52 +1,3 @@
|
|
|
1
|
-
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { createFilesystemFromEntries, snapshotVirtualFilesystem, } from "./filesystem-snapshot.js";
|
|
3
|
-
import { createOverlayBackend } from "./overlay-filesystem.js";
|
|
4
|
-
function cloneSnapshotHandle(storeId, layerId) {
|
|
5
|
-
return { kind: "snapshot", storeId, layerId };
|
|
6
|
-
}
|
|
7
|
-
function cloneWritableHandle(storeId, layerId, leaseId) {
|
|
8
|
-
return { kind: "writable", storeId, layerId, leaseId };
|
|
9
|
-
}
|
|
10
|
-
function isBaseFilesystemSnapshot(value) {
|
|
11
|
-
if (!value || typeof value !== "object") {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
const filesystem = value.filesystem;
|
|
15
|
-
if (!filesystem || typeof filesystem !== "object") {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
return Array.isArray(filesystem.entries);
|
|
19
|
-
}
|
|
20
|
-
function isFilesystemSnapshotExport(value) {
|
|
21
|
-
if (!value || typeof value !== "object") {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
if (value.format !== "agentos-filesystem-snapshot-v1") {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
const filesystem = value.filesystem;
|
|
28
|
-
if (!filesystem || typeof filesystem !== "object") {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
return Array.isArray(filesystem.entries);
|
|
32
|
-
}
|
|
33
|
-
function normalizeSnapshotExport(source) {
|
|
34
|
-
if (source.kind === "base-filesystem-artifact") {
|
|
35
|
-
if (!isBaseFilesystemSnapshot(source.source)) {
|
|
36
|
-
throw new Error("Invalid base filesystem artifact");
|
|
37
|
-
}
|
|
38
|
-
return {
|
|
39
|
-
format: "agentos-filesystem-snapshot-v1",
|
|
40
|
-
filesystem: {
|
|
41
|
-
entries: source.source.filesystem.entries,
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
if (!isFilesystemSnapshotExport(source.source)) {
|
|
46
|
-
throw new Error("Invalid snapshot export");
|
|
47
|
-
}
|
|
48
|
-
return source.source;
|
|
49
|
-
}
|
|
50
1
|
export function createSnapshotExport(entries) {
|
|
51
2
|
return {
|
|
52
3
|
kind: "snapshot-export",
|
|
@@ -56,139 +7,3 @@ export function createSnapshotExport(entries) {
|
|
|
56
7
|
},
|
|
57
8
|
};
|
|
58
9
|
}
|
|
59
|
-
export function createInMemoryLayerStore() {
|
|
60
|
-
const storeId = `memory-layer-store:${randomUUID()}`;
|
|
61
|
-
const layers = new Map();
|
|
62
|
-
function getLayerState(handle) {
|
|
63
|
-
if (handle.storeId !== storeId) {
|
|
64
|
-
throw new Error(`Layer ${handle.layerId} belongs to store ${handle.storeId}, not ${storeId}`);
|
|
65
|
-
}
|
|
66
|
-
const state = layers.get(handle.layerId);
|
|
67
|
-
if (!state) {
|
|
68
|
-
throw new Error(`Unknown layer: ${handle.layerId}`);
|
|
69
|
-
}
|
|
70
|
-
if (state.kind !== handle.kind) {
|
|
71
|
-
throw new Error(`Layer kind mismatch for ${handle.layerId}`);
|
|
72
|
-
}
|
|
73
|
-
return state;
|
|
74
|
-
}
|
|
75
|
-
const store = {
|
|
76
|
-
storeId,
|
|
77
|
-
get retainedLayerCount() {
|
|
78
|
-
return layers.size;
|
|
79
|
-
},
|
|
80
|
-
async createWritableLayer() {
|
|
81
|
-
const layerId = randomUUID();
|
|
82
|
-
const leaseId = randomUUID();
|
|
83
|
-
layers.set(layerId, {
|
|
84
|
-
kind: "writable",
|
|
85
|
-
fs: await createFilesystemFromEntries([
|
|
86
|
-
{
|
|
87
|
-
path: "/",
|
|
88
|
-
type: "directory",
|
|
89
|
-
mode: "0755",
|
|
90
|
-
uid: 0,
|
|
91
|
-
gid: 0,
|
|
92
|
-
},
|
|
93
|
-
]),
|
|
94
|
-
leaseId,
|
|
95
|
-
valid: true,
|
|
96
|
-
activeOverlay: null,
|
|
97
|
-
});
|
|
98
|
-
return cloneWritableHandle(storeId, layerId, leaseId);
|
|
99
|
-
},
|
|
100
|
-
async importSnapshot(source) {
|
|
101
|
-
const snapshot = normalizeSnapshotExport(source);
|
|
102
|
-
const layerId = randomUUID();
|
|
103
|
-
layers.set(layerId, {
|
|
104
|
-
kind: "snapshot",
|
|
105
|
-
snapshot,
|
|
106
|
-
fs: await createFilesystemFromEntries(snapshot.filesystem.entries),
|
|
107
|
-
});
|
|
108
|
-
return cloneSnapshotHandle(storeId, layerId);
|
|
109
|
-
},
|
|
110
|
-
async openSnapshotLayer(layerId) {
|
|
111
|
-
const state = layers.get(layerId);
|
|
112
|
-
if (!state || state.kind !== "snapshot") {
|
|
113
|
-
throw new Error(`Unknown snapshot layer: ${layerId}`);
|
|
114
|
-
}
|
|
115
|
-
return cloneSnapshotHandle(storeId, layerId);
|
|
116
|
-
},
|
|
117
|
-
async sealLayer(layer) {
|
|
118
|
-
const state = getLayerState(layer);
|
|
119
|
-
if (state.kind !== "writable") {
|
|
120
|
-
throw new Error(`Layer ${layer.layerId} is not writable`);
|
|
121
|
-
}
|
|
122
|
-
const baseFs = state.activeOverlay ?? state.fs;
|
|
123
|
-
if (!state.valid || state.leaseId !== layer.leaseId || !baseFs) {
|
|
124
|
-
throw new Error(`Writable layer ${layer.layerId} is no longer valid`);
|
|
125
|
-
}
|
|
126
|
-
const entries = await snapshotVirtualFilesystem(baseFs);
|
|
127
|
-
const snapshot = createSnapshotExport(entries).source;
|
|
128
|
-
const layerId = randomUUID();
|
|
129
|
-
layers.set(layerId, {
|
|
130
|
-
kind: "snapshot",
|
|
131
|
-
snapshot,
|
|
132
|
-
fs: await createFilesystemFromEntries(snapshot.filesystem.entries),
|
|
133
|
-
});
|
|
134
|
-
// Release the writable layer's filesystem payload now that it is sealed;
|
|
135
|
-
// the invalid tombstone is retained so stale handles still report cleanly.
|
|
136
|
-
state.valid = false;
|
|
137
|
-
state.activeOverlay = null;
|
|
138
|
-
state.fs = null;
|
|
139
|
-
return cloneSnapshotHandle(storeId, layerId);
|
|
140
|
-
},
|
|
141
|
-
createOverlayFilesystem(options) {
|
|
142
|
-
const lowers = options.lowers.map((lower) => {
|
|
143
|
-
const state = getLayerState(lower);
|
|
144
|
-
if (state.kind !== "snapshot") {
|
|
145
|
-
throw new Error(`Layer ${lower.layerId} is not a snapshot`);
|
|
146
|
-
}
|
|
147
|
-
return lower;
|
|
148
|
-
});
|
|
149
|
-
if (options.mode === "read-only") {
|
|
150
|
-
return createOverlayBackend({
|
|
151
|
-
mode: "read-only",
|
|
152
|
-
lowers: lowers.map((lower) => {
|
|
153
|
-
const state = getLayerState(lower);
|
|
154
|
-
if (state.kind !== "snapshot") {
|
|
155
|
-
throw new Error(`Layer ${lower.layerId} is not a snapshot`);
|
|
156
|
-
}
|
|
157
|
-
return state.fs;
|
|
158
|
-
}),
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
const upperState = getLayerState(options.upper);
|
|
162
|
-
if (upperState.kind !== "writable") {
|
|
163
|
-
throw new Error(`Layer ${options.upper.layerId} is not writable`);
|
|
164
|
-
}
|
|
165
|
-
if (!upperState.valid || upperState.leaseId !== options.upper.leaseId) {
|
|
166
|
-
throw new Error(`Writable layer ${options.upper.layerId} is no longer valid`);
|
|
167
|
-
}
|
|
168
|
-
if (upperState.activeOverlay) {
|
|
169
|
-
throw new Error(`Writable layer ${options.upper.layerId} is already attached to an overlay`);
|
|
170
|
-
}
|
|
171
|
-
if (!upperState.fs) {
|
|
172
|
-
throw new Error(`Writable layer ${options.upper.layerId} is no longer valid`);
|
|
173
|
-
}
|
|
174
|
-
const overlay = createOverlayBackend({
|
|
175
|
-
upper: upperState.fs,
|
|
176
|
-
lowers: lowers.map((lower) => {
|
|
177
|
-
const state = getLayerState(lower);
|
|
178
|
-
if (state.kind !== "snapshot") {
|
|
179
|
-
throw new Error(`Layer ${lower.layerId} is not a snapshot`);
|
|
180
|
-
}
|
|
181
|
-
return state.fs;
|
|
182
|
-
}),
|
|
183
|
-
});
|
|
184
|
-
upperState.activeOverlay = overlay;
|
|
185
|
-
return overlay;
|
|
186
|
-
},
|
|
187
|
-
dispose() {
|
|
188
|
-
// Release every retained layer's filesystem payload so the store does
|
|
189
|
-
// not accumulate snapshots/writable layers for the process lifetime.
|
|
190
|
-
layers.clear();
|
|
191
|
-
},
|
|
192
|
-
};
|
|
193
|
-
return store;
|
|
194
|
-
}
|
package/dist/options-schema.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
2
|
import type { AgentExitHandler, AgentOsOptions, AgentStderrHandler, LimitWarningHandler, NativeMountConfig } from "./agent-os.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { Binding, Bindings } from "./bindings.js";
|
|
4
4
|
export declare const permissionsSchema: z.ZodObject<{
|
|
5
5
|
fs: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
6
6
|
allow: "allow";
|
|
@@ -131,15 +131,15 @@ export declare const agentOsLimitsSchema: z.ZodObject<{
|
|
|
131
131
|
http: z.ZodOptional<z.ZodObject<{
|
|
132
132
|
maxFetchResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
133
133
|
}, z.core.$strict>>;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
134
|
+
bindings: z.ZodOptional<z.ZodObject<{
|
|
135
|
+
defaultBindingTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
maxBindingTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
maxRegisteredCollections: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
maxRegisteredCollectionsPerVm: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
maxBindingsPerCollection: z.ZodOptional<z.ZodNumber>;
|
|
140
|
+
maxBindingSchemaBytes: z.ZodOptional<z.ZodNumber>;
|
|
141
|
+
maxExamplesPerBinding: z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
maxBindingExampleInputBytes: z.ZodOptional<z.ZodNumber>;
|
|
143
143
|
}, z.core.$strict>>;
|
|
144
144
|
plugins: z.ZodOptional<z.ZodObject<{
|
|
145
145
|
maxPersistedManifestBytes: z.ZodOptional<z.ZodNumber>;
|
|
@@ -148,6 +148,25 @@ export declare const agentOsLimitsSchema: z.ZodObject<{
|
|
|
148
148
|
acp: z.ZodOptional<z.ZodObject<{
|
|
149
149
|
maxReadLineBytes: z.ZodOptional<z.ZodNumber>;
|
|
150
150
|
stdoutBufferByteLimit: z.ZodOptional<z.ZodNumber>;
|
|
151
|
+
maxCompletedMessageBytes: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
maxTurnOutputBytes: z.ZodOptional<z.ZodNumber>;
|
|
153
|
+
maxPromptBytes: z.ZodOptional<z.ZodNumber>;
|
|
154
|
+
maxPromptBlocks: z.ZodOptional<z.ZodNumber>;
|
|
155
|
+
maxFallbackContinuationBytes: z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
maxSessionHistoryBytes: z.ZodOptional<z.ZodNumber>;
|
|
157
|
+
maxSessionHistoryEvents: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
maxHistoryPageEntries: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
maxSessionListEntries: z.ZodOptional<z.ZodNumber>;
|
|
160
|
+
maxSessionsPerVm: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
maxPromptsPerSession: z.ZodOptional<z.ZodNumber>;
|
|
162
|
+
maxPromptsPerVm: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
maxPendingPermissionsPerSession: z.ZodOptional<z.ZodNumber>;
|
|
164
|
+
maxPendingPermissionsPerVm: z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
maxPermissionOutcomesPerSession: z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
maxPermissionOutcomesPerVm: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
}, z.core.$strict>>;
|
|
168
|
+
sqlite: z.ZodOptional<z.ZodObject<{
|
|
169
|
+
maxResultBytes: z.ZodOptional<z.ZodNumber>;
|
|
151
170
|
}, z.core.$strict>>;
|
|
152
171
|
jsRuntime: z.ZodOptional<z.ZodObject<{
|
|
153
172
|
v8HeapLimitMb: z.ZodOptional<z.ZodNumber>;
|
|
@@ -172,9 +191,17 @@ export declare const agentOsLimitsSchema: z.ZodObject<{
|
|
|
172
191
|
syncReadLimitBytes: z.ZodOptional<z.ZodNumber>;
|
|
173
192
|
prewarmTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
174
193
|
runnerHeapLimitMb: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
runnerCpuTimeLimitMs: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
}, z.core.$strict>>;
|
|
196
|
+
process: z.ZodOptional<z.ZodObject<{
|
|
197
|
+
maxSpawnFileActions: z.ZodOptional<z.ZodNumber>;
|
|
198
|
+
maxSpawnFileActionBytes: z.ZodOptional<z.ZodNumber>;
|
|
199
|
+
pendingStdinBytes: z.ZodOptional<z.ZodNumber>;
|
|
200
|
+
pendingEventCount: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
pendingEventBytes: z.ZodOptional<z.ZodNumber>;
|
|
175
202
|
}, z.core.$strict>>;
|
|
176
203
|
}, z.core.$strict>;
|
|
177
|
-
export declare const rootFilesystemConfigSchema: z.ZodObject<{
|
|
204
|
+
export declare const rootFilesystemConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
178
205
|
type: z.ZodOptional<z.ZodLiteral<"overlay">>;
|
|
179
206
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
180
207
|
ephemeral: "ephemeral";
|
|
@@ -187,11 +214,20 @@ export declare const rootFilesystemConfigSchema: z.ZodObject<{
|
|
|
187
214
|
kind: z.ZodLiteral<"snapshot-export">;
|
|
188
215
|
source: z.ZodUnknown;
|
|
189
216
|
}, z.core.$strict>]>>>;
|
|
190
|
-
}, z.core.$strict
|
|
217
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
218
|
+
type: z.ZodLiteral<"native">;
|
|
219
|
+
plugin: z.ZodObject<{
|
|
220
|
+
id: z.ZodString;
|
|
221
|
+
config: z.ZodOptional<z.ZodUnknown>;
|
|
222
|
+
}, z.core.$strict>;
|
|
223
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
224
|
+
}, z.core.$strict>]>;
|
|
191
225
|
export declare const nativeMountConfigSchema: z.ZodType<NativeMountConfig>;
|
|
192
226
|
export declare const mountConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
193
227
|
path: z.ZodString;
|
|
194
228
|
driver: z.ZodCustom<unknown, unknown>;
|
|
229
|
+
guestFstype: z.ZodOptional<z.ZodString>;
|
|
230
|
+
guestSource: z.ZodOptional<z.ZodString>;
|
|
195
231
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
196
232
|
}, z.core.$strict>, z.ZodType<NativeMountConfig, unknown, z.core.$ZodTypeInternals<NativeMountConfig, unknown>>, z.ZodObject<{
|
|
197
233
|
path: z.ZodString;
|
|
@@ -216,23 +252,55 @@ export declare const sidecarConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
216
252
|
kind: z.ZodLiteral<"explicit">;
|
|
217
253
|
handle: z.ZodUnknown;
|
|
218
254
|
}, z.core.$strict>]>;
|
|
219
|
-
export declare const
|
|
220
|
-
export declare const
|
|
255
|
+
export declare const bindingSchema: z.ZodType<Binding>;
|
|
256
|
+
export declare const bindingsSchema: z.ZodType<Bindings>;
|
|
221
257
|
/**
|
|
222
258
|
* Shared AgentOsOptions field schemas.
|
|
223
259
|
*
|
|
224
|
-
* Core
|
|
225
|
-
*
|
|
226
|
-
* `crates/agentos-actor-plugin/src/config.rs::AgentOsConfigJson` aligned when
|
|
227
|
-
* adding options that cross the native boundary.
|
|
260
|
+
* Core and the TypeScript Rivet actor both use the full object. Runtime-owned
|
|
261
|
+
* behavior is serialized by AgentOs.create() into the sidecar VM config.
|
|
228
262
|
*/
|
|
229
263
|
export declare const agentOsOptionFieldSchemas: {
|
|
264
|
+
readonly user: z.ZodOptional<z.ZodObject<{
|
|
265
|
+
uid: z.ZodOptional<z.ZodNumber>;
|
|
266
|
+
gid: z.ZodOptional<z.ZodNumber>;
|
|
267
|
+
euid: z.ZodOptional<z.ZodNumber>;
|
|
268
|
+
egid: z.ZodOptional<z.ZodNumber>;
|
|
269
|
+
username: z.ZodOptional<z.ZodString>;
|
|
270
|
+
homedir: z.ZodOptional<z.ZodString>;
|
|
271
|
+
shell: z.ZodOptional<z.ZodString>;
|
|
272
|
+
gecos: z.ZodOptional<z.ZodString>;
|
|
273
|
+
groupName: z.ZodOptional<z.ZodString>;
|
|
274
|
+
supplementaryGids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
275
|
+
accounts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
276
|
+
uid: z.ZodNumber;
|
|
277
|
+
gid: z.ZodNumber;
|
|
278
|
+
username: z.ZodString;
|
|
279
|
+
homedir: z.ZodString;
|
|
280
|
+
shell: z.ZodString;
|
|
281
|
+
gecos: z.ZodOptional<z.ZodString>;
|
|
282
|
+
supplementaryGids: z.ZodArray<z.ZodNumber>;
|
|
283
|
+
}, z.core.$strict>>>;
|
|
284
|
+
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
285
|
+
gid: z.ZodNumber;
|
|
286
|
+
name: z.ZodString;
|
|
287
|
+
members: z.ZodArray<z.ZodString>;
|
|
288
|
+
}, z.core.$strict>>>;
|
|
289
|
+
}, z.core.$strict>>;
|
|
230
290
|
readonly software: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
231
291
|
readonly defaultSoftware: z.ZodOptional<z.ZodBoolean>;
|
|
232
292
|
readonly loopbackExemptPorts: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
233
293
|
readonly allowedNodeBuiltins: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
234
294
|
readonly highResolutionTime: z.ZodOptional<z.ZodBoolean>;
|
|
235
|
-
readonly
|
|
295
|
+
readonly database: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
296
|
+
type: z.ZodLiteral<"actor_uds">;
|
|
297
|
+
path: z.ZodString;
|
|
298
|
+
token: z.ZodString;
|
|
299
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
300
|
+
type: z.ZodLiteral<"sqlite_file">;
|
|
301
|
+
path: z.ZodString;
|
|
302
|
+
}, z.core.$strict>], "type">>;
|
|
303
|
+
readonly rootFilesystem: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
236
304
|
type: z.ZodOptional<z.ZodLiteral<"overlay">>;
|
|
237
305
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
238
306
|
ephemeral: "ephemeral";
|
|
@@ -245,10 +313,19 @@ export declare const agentOsOptionFieldSchemas: {
|
|
|
245
313
|
kind: z.ZodLiteral<"snapshot-export">;
|
|
246
314
|
source: z.ZodUnknown;
|
|
247
315
|
}, z.core.$strict>]>>>;
|
|
248
|
-
}, z.core.$strict
|
|
316
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
317
|
+
type: z.ZodLiteral<"native">;
|
|
318
|
+
plugin: z.ZodObject<{
|
|
319
|
+
id: z.ZodString;
|
|
320
|
+
config: z.ZodOptional<z.ZodUnknown>;
|
|
321
|
+
}, z.core.$strict>;
|
|
322
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
323
|
+
}, z.core.$strict>]>>;
|
|
249
324
|
readonly mounts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
250
325
|
path: z.ZodString;
|
|
251
326
|
driver: z.ZodCustom<unknown, unknown>;
|
|
327
|
+
guestFstype: z.ZodOptional<z.ZodString>;
|
|
328
|
+
guestSource: z.ZodOptional<z.ZodString>;
|
|
252
329
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
253
330
|
}, z.core.$strict>, z.ZodType<NativeMountConfig, unknown, z.core.$ZodTypeInternals<NativeMountConfig, unknown>>, z.ZodObject<{
|
|
254
331
|
path: z.ZodString;
|
|
@@ -262,9 +339,8 @@ export declare const agentOsOptionFieldSchemas: {
|
|
|
262
339
|
lowers: z.ZodArray<z.ZodUnknown>;
|
|
263
340
|
}, z.core.$strict>;
|
|
264
341
|
}, z.core.$strict>]>>>;
|
|
265
|
-
readonly additionalInstructions: z.ZodOptional<z.ZodString>;
|
|
266
342
|
readonly scheduleDriver: z.ZodOptional<z.ZodCustom<unknown, unknown>>;
|
|
267
|
-
readonly
|
|
343
|
+
readonly bindings: z.ZodOptional<z.ZodArray<z.ZodType<Bindings, unknown, z.core.$ZodTypeInternals<Bindings, unknown>>>>;
|
|
268
344
|
readonly permissions: z.ZodOptional<z.ZodObject<{
|
|
269
345
|
fs: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
270
346
|
allow: "allow";
|
|
@@ -402,15 +478,15 @@ export declare const agentOsOptionFieldSchemas: {
|
|
|
402
478
|
http: z.ZodOptional<z.ZodObject<{
|
|
403
479
|
maxFetchResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
404
480
|
}, z.core.$strict>>;
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
481
|
+
bindings: z.ZodOptional<z.ZodObject<{
|
|
482
|
+
defaultBindingTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
483
|
+
maxBindingTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
484
|
+
maxRegisteredCollections: z.ZodOptional<z.ZodNumber>;
|
|
485
|
+
maxRegisteredCollectionsPerVm: z.ZodOptional<z.ZodNumber>;
|
|
486
|
+
maxBindingsPerCollection: z.ZodOptional<z.ZodNumber>;
|
|
487
|
+
maxBindingSchemaBytes: z.ZodOptional<z.ZodNumber>;
|
|
488
|
+
maxExamplesPerBinding: z.ZodOptional<z.ZodNumber>;
|
|
489
|
+
maxBindingExampleInputBytes: z.ZodOptional<z.ZodNumber>;
|
|
414
490
|
}, z.core.$strict>>;
|
|
415
491
|
plugins: z.ZodOptional<z.ZodObject<{
|
|
416
492
|
maxPersistedManifestBytes: z.ZodOptional<z.ZodNumber>;
|
|
@@ -419,6 +495,25 @@ export declare const agentOsOptionFieldSchemas: {
|
|
|
419
495
|
acp: z.ZodOptional<z.ZodObject<{
|
|
420
496
|
maxReadLineBytes: z.ZodOptional<z.ZodNumber>;
|
|
421
497
|
stdoutBufferByteLimit: z.ZodOptional<z.ZodNumber>;
|
|
498
|
+
maxCompletedMessageBytes: z.ZodOptional<z.ZodNumber>;
|
|
499
|
+
maxTurnOutputBytes: z.ZodOptional<z.ZodNumber>;
|
|
500
|
+
maxPromptBytes: z.ZodOptional<z.ZodNumber>;
|
|
501
|
+
maxPromptBlocks: z.ZodOptional<z.ZodNumber>;
|
|
502
|
+
maxFallbackContinuationBytes: z.ZodOptional<z.ZodNumber>;
|
|
503
|
+
maxSessionHistoryBytes: z.ZodOptional<z.ZodNumber>;
|
|
504
|
+
maxSessionHistoryEvents: z.ZodOptional<z.ZodNumber>;
|
|
505
|
+
maxHistoryPageEntries: z.ZodOptional<z.ZodNumber>;
|
|
506
|
+
maxSessionListEntries: z.ZodOptional<z.ZodNumber>;
|
|
507
|
+
maxSessionsPerVm: z.ZodOptional<z.ZodNumber>;
|
|
508
|
+
maxPromptsPerSession: z.ZodOptional<z.ZodNumber>;
|
|
509
|
+
maxPromptsPerVm: z.ZodOptional<z.ZodNumber>;
|
|
510
|
+
maxPendingPermissionsPerSession: z.ZodOptional<z.ZodNumber>;
|
|
511
|
+
maxPendingPermissionsPerVm: z.ZodOptional<z.ZodNumber>;
|
|
512
|
+
maxPermissionOutcomesPerSession: z.ZodOptional<z.ZodNumber>;
|
|
513
|
+
maxPermissionOutcomesPerVm: z.ZodOptional<z.ZodNumber>;
|
|
514
|
+
}, z.core.$strict>>;
|
|
515
|
+
sqlite: z.ZodOptional<z.ZodObject<{
|
|
516
|
+
maxResultBytes: z.ZodOptional<z.ZodNumber>;
|
|
422
517
|
}, z.core.$strict>>;
|
|
423
518
|
jsRuntime: z.ZodOptional<z.ZodObject<{
|
|
424
519
|
v8HeapLimitMb: z.ZodOptional<z.ZodNumber>;
|
|
@@ -443,6 +538,14 @@ export declare const agentOsOptionFieldSchemas: {
|
|
|
443
538
|
syncReadLimitBytes: z.ZodOptional<z.ZodNumber>;
|
|
444
539
|
prewarmTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
445
540
|
runnerHeapLimitMb: z.ZodOptional<z.ZodNumber>;
|
|
541
|
+
runnerCpuTimeLimitMs: z.ZodOptional<z.ZodNumber>;
|
|
542
|
+
}, z.core.$strict>>;
|
|
543
|
+
process: z.ZodOptional<z.ZodObject<{
|
|
544
|
+
maxSpawnFileActions: z.ZodOptional<z.ZodNumber>;
|
|
545
|
+
maxSpawnFileActionBytes: z.ZodOptional<z.ZodNumber>;
|
|
546
|
+
pendingStdinBytes: z.ZodOptional<z.ZodNumber>;
|
|
547
|
+
pendingEventCount: z.ZodOptional<z.ZodNumber>;
|
|
548
|
+
pendingEventBytes: z.ZodOptional<z.ZodNumber>;
|
|
446
549
|
}, z.core.$strict>>;
|
|
447
550
|
}, z.core.$strict>>;
|
|
448
551
|
readonly onAgentStderr: z.ZodOptional<z.ZodCustom<AgentStderrHandler, AgentStderrHandler>>;
|