@rivet-dev/agentos-core 0.2.8-rc.1 → 0.2.8-rc.3
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 +41 -38
- package/dist/agent-os.d.ts +189 -231
- package/dist/agent-os.js +756 -1162
- package/dist/agentos-package.d.ts +5 -3
- package/dist/agentos-package.js +5 -2
- 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 +133 -31
- package/dist/options-schema.js +143 -26
- package/dist/runtime-compat.d.ts +6 -35
- package/dist/runtime-compat.js +84 -372
- package/dist/runtime.d.ts +5 -1
- 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 +429 -29
- package/dist/sidecar/agentos-protocol.js +691 -93
- package/dist/sidecar/rpc-client.d.ts +18 -6
- package/dist/sidecar/rpc-client.js +78 -31
- 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 +21 -20
- 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,54 @@ 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
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
299
|
+
type: z.ZodLiteral<"sqlite_file">;
|
|
300
|
+
path: z.ZodString;
|
|
301
|
+
}, z.core.$strict>], "type">>;
|
|
302
|
+
readonly rootFilesystem: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
236
303
|
type: z.ZodOptional<z.ZodLiteral<"overlay">>;
|
|
237
304
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
238
305
|
ephemeral: "ephemeral";
|
|
@@ -245,10 +312,19 @@ export declare const agentOsOptionFieldSchemas: {
|
|
|
245
312
|
kind: z.ZodLiteral<"snapshot-export">;
|
|
246
313
|
source: z.ZodUnknown;
|
|
247
314
|
}, z.core.$strict>]>>>;
|
|
248
|
-
}, z.core.$strict
|
|
315
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
316
|
+
type: z.ZodLiteral<"native">;
|
|
317
|
+
plugin: z.ZodObject<{
|
|
318
|
+
id: z.ZodString;
|
|
319
|
+
config: z.ZodOptional<z.ZodUnknown>;
|
|
320
|
+
}, z.core.$strict>;
|
|
321
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
322
|
+
}, z.core.$strict>]>>;
|
|
249
323
|
readonly mounts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
250
324
|
path: z.ZodString;
|
|
251
325
|
driver: z.ZodCustom<unknown, unknown>;
|
|
326
|
+
guestFstype: z.ZodOptional<z.ZodString>;
|
|
327
|
+
guestSource: z.ZodOptional<z.ZodString>;
|
|
252
328
|
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
253
329
|
}, z.core.$strict>, z.ZodType<NativeMountConfig, unknown, z.core.$ZodTypeInternals<NativeMountConfig, unknown>>, z.ZodObject<{
|
|
254
330
|
path: z.ZodString;
|
|
@@ -262,9 +338,8 @@ export declare const agentOsOptionFieldSchemas: {
|
|
|
262
338
|
lowers: z.ZodArray<z.ZodUnknown>;
|
|
263
339
|
}, z.core.$strict>;
|
|
264
340
|
}, z.core.$strict>]>>>;
|
|
265
|
-
readonly additionalInstructions: z.ZodOptional<z.ZodString>;
|
|
266
341
|
readonly scheduleDriver: z.ZodOptional<z.ZodCustom<unknown, unknown>>;
|
|
267
|
-
readonly
|
|
342
|
+
readonly bindings: z.ZodOptional<z.ZodArray<z.ZodType<Bindings, unknown, z.core.$ZodTypeInternals<Bindings, unknown>>>>;
|
|
268
343
|
readonly permissions: z.ZodOptional<z.ZodObject<{
|
|
269
344
|
fs: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
270
345
|
allow: "allow";
|
|
@@ -402,15 +477,15 @@ export declare const agentOsOptionFieldSchemas: {
|
|
|
402
477
|
http: z.ZodOptional<z.ZodObject<{
|
|
403
478
|
maxFetchResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
404
479
|
}, z.core.$strict>>;
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
480
|
+
bindings: z.ZodOptional<z.ZodObject<{
|
|
481
|
+
defaultBindingTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
482
|
+
maxBindingTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
483
|
+
maxRegisteredCollections: z.ZodOptional<z.ZodNumber>;
|
|
484
|
+
maxRegisteredCollectionsPerVm: z.ZodOptional<z.ZodNumber>;
|
|
485
|
+
maxBindingsPerCollection: z.ZodOptional<z.ZodNumber>;
|
|
486
|
+
maxBindingSchemaBytes: z.ZodOptional<z.ZodNumber>;
|
|
487
|
+
maxExamplesPerBinding: z.ZodOptional<z.ZodNumber>;
|
|
488
|
+
maxBindingExampleInputBytes: z.ZodOptional<z.ZodNumber>;
|
|
414
489
|
}, z.core.$strict>>;
|
|
415
490
|
plugins: z.ZodOptional<z.ZodObject<{
|
|
416
491
|
maxPersistedManifestBytes: z.ZodOptional<z.ZodNumber>;
|
|
@@ -419,6 +494,25 @@ export declare const agentOsOptionFieldSchemas: {
|
|
|
419
494
|
acp: z.ZodOptional<z.ZodObject<{
|
|
420
495
|
maxReadLineBytes: z.ZodOptional<z.ZodNumber>;
|
|
421
496
|
stdoutBufferByteLimit: z.ZodOptional<z.ZodNumber>;
|
|
497
|
+
maxCompletedMessageBytes: z.ZodOptional<z.ZodNumber>;
|
|
498
|
+
maxTurnOutputBytes: z.ZodOptional<z.ZodNumber>;
|
|
499
|
+
maxPromptBytes: z.ZodOptional<z.ZodNumber>;
|
|
500
|
+
maxPromptBlocks: z.ZodOptional<z.ZodNumber>;
|
|
501
|
+
maxFallbackContinuationBytes: z.ZodOptional<z.ZodNumber>;
|
|
502
|
+
maxSessionHistoryBytes: z.ZodOptional<z.ZodNumber>;
|
|
503
|
+
maxSessionHistoryEvents: z.ZodOptional<z.ZodNumber>;
|
|
504
|
+
maxHistoryPageEntries: z.ZodOptional<z.ZodNumber>;
|
|
505
|
+
maxSessionListEntries: z.ZodOptional<z.ZodNumber>;
|
|
506
|
+
maxSessionsPerVm: z.ZodOptional<z.ZodNumber>;
|
|
507
|
+
maxPromptsPerSession: z.ZodOptional<z.ZodNumber>;
|
|
508
|
+
maxPromptsPerVm: z.ZodOptional<z.ZodNumber>;
|
|
509
|
+
maxPendingPermissionsPerSession: z.ZodOptional<z.ZodNumber>;
|
|
510
|
+
maxPendingPermissionsPerVm: z.ZodOptional<z.ZodNumber>;
|
|
511
|
+
maxPermissionOutcomesPerSession: z.ZodOptional<z.ZodNumber>;
|
|
512
|
+
maxPermissionOutcomesPerVm: z.ZodOptional<z.ZodNumber>;
|
|
513
|
+
}, z.core.$strict>>;
|
|
514
|
+
sqlite: z.ZodOptional<z.ZodObject<{
|
|
515
|
+
maxResultBytes: z.ZodOptional<z.ZodNumber>;
|
|
422
516
|
}, z.core.$strict>>;
|
|
423
517
|
jsRuntime: z.ZodOptional<z.ZodObject<{
|
|
424
518
|
v8HeapLimitMb: z.ZodOptional<z.ZodNumber>;
|
|
@@ -443,6 +537,14 @@ export declare const agentOsOptionFieldSchemas: {
|
|
|
443
537
|
syncReadLimitBytes: z.ZodOptional<z.ZodNumber>;
|
|
444
538
|
prewarmTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
445
539
|
runnerHeapLimitMb: z.ZodOptional<z.ZodNumber>;
|
|
540
|
+
runnerCpuTimeLimitMs: z.ZodOptional<z.ZodNumber>;
|
|
541
|
+
}, z.core.$strict>>;
|
|
542
|
+
process: z.ZodOptional<z.ZodObject<{
|
|
543
|
+
maxSpawnFileActions: z.ZodOptional<z.ZodNumber>;
|
|
544
|
+
maxSpawnFileActionBytes: z.ZodOptional<z.ZodNumber>;
|
|
545
|
+
pendingStdinBytes: z.ZodOptional<z.ZodNumber>;
|
|
546
|
+
pendingEventCount: z.ZodOptional<z.ZodNumber>;
|
|
547
|
+
pendingEventBytes: z.ZodOptional<z.ZodNumber>;
|
|
446
548
|
}, z.core.$strict>>;
|
|
447
549
|
}, z.core.$strict>>;
|
|
448
550
|
readonly onAgentStderr: z.ZodOptional<z.ZodCustom<AgentStderrHandler, AgentStderrHandler>>;
|