@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,29 @@
1
+ /**
2
+ * agentOS package model (Linux-exact, Homebrew-modeled) — client-facing surface.
3
+ *
4
+ * A package is a self-contained directory produced by `@rivet-dev/agentos-toolchain
5
+ * pack`. The HOST no longer projects it: the client forwards only the package
6
+ * directory over the wire and the secure-exec sidecar owns the `/opt/agentos`
7
+ * projection. Package metadata lives in `<dir>/agentos-package.json`.
8
+ *
9
+ * This module is therefore only the client-facing package-dir surface plus the
10
+ * `/opt/agentos` path constants used for agent-config wiring.
11
+ *
12
+ * See `website/src/content/docs/docs/architecture/packages-and-command-resolution.mdx`.
13
+ */
14
+ import type { AgentosPackageManifest, PackageAgentDescriptor, PackageRef as ManifestPackageRef } from "@agentos-software/manifest";
15
+ /** Root of the agentOS package tree inside the VM. */
16
+ export declare const OPT_AGENTOS_ROOT = "/opt/agentos";
17
+ /** The symlink farm on `$PATH` (commands link here). */
18
+ export declare const OPT_AGENTOS_BIN = "/opt/agentos/bin";
19
+ export type AgentBlock = PackageAgentDescriptor;
20
+ export type PackageRef = ManifestPackageRef;
21
+ export type SoftwarePackageRef = {
22
+ packagePath: string;
23
+ };
24
+ /** @deprecated Package software is now represented by its package directory. */
25
+ export type PackageDescriptor = PackageRef;
26
+ /** Discriminate the dir-only package reference. */
27
+ export declare function isPackageDescriptor(value: unknown): value is PackageDescriptor;
28
+ export declare function readAgentosPackageManifest(dir: string): AgentosPackageManifest;
29
+ export declare function tryReadAgentosPackageManifest(dir: string): AgentosPackageManifest | undefined;
@@ -0,0 +1,88 @@
1
+ /**
2
+ * agentOS package model (Linux-exact, Homebrew-modeled) — client-facing surface.
3
+ *
4
+ * A package is a self-contained directory produced by `@rivet-dev/agentos-toolchain
5
+ * pack`. The HOST no longer projects it: the client forwards only the package
6
+ * directory over the wire and the secure-exec sidecar owns the `/opt/agentos`
7
+ * projection. Package metadata lives in `<dir>/agentos-package.json`.
8
+ *
9
+ * This module is therefore only the client-facing package-dir surface plus the
10
+ * `/opt/agentos` path constants used for agent-config wiring.
11
+ *
12
+ * See `website/src/content/docs/docs/architecture/packages-and-command-resolution.mdx`.
13
+ */
14
+ import { readFileSync } from "node:fs";
15
+ import { join } from "node:path";
16
+ /** Root of the agentOS package tree inside the VM. */
17
+ export const OPT_AGENTOS_ROOT = "/opt/agentos";
18
+ /** The symlink farm on `$PATH` (commands link here). */
19
+ export const OPT_AGENTOS_BIN = "/opt/agentos/bin";
20
+ /** Discriminate the dir-only package reference. */
21
+ export function isPackageDescriptor(value) {
22
+ return typeof value === "string";
23
+ }
24
+ export function readAgentosPackageManifest(dir) {
25
+ const manifestPath = join(dir, "agentos-package.json");
26
+ let parsed;
27
+ try {
28
+ parsed = JSON.parse(readFileSync(manifestPath, "utf8"));
29
+ }
30
+ catch (error) {
31
+ const wrapped = new Error(`Failed to read agentOS package manifest at ${manifestPath}: ${error instanceof Error ? error.message : String(error)}`);
32
+ wrapped.code = error.code;
33
+ throw wrapped;
34
+ }
35
+ return validateAgentosPackageManifest(parsed, manifestPath);
36
+ }
37
+ export function tryReadAgentosPackageManifest(dir) {
38
+ try {
39
+ return readAgentosPackageManifest(dir);
40
+ }
41
+ catch (error) {
42
+ if (error instanceof Error &&
43
+ error.code === "ENOENT") {
44
+ return undefined;
45
+ }
46
+ throw error;
47
+ }
48
+ }
49
+ function validateAgentosPackageManifest(value, source) {
50
+ if (!isPlainObject(value) || typeof value.name !== "string") {
51
+ throw new Error(`Invalid agentOS package manifest at ${source}: missing name`);
52
+ }
53
+ if (typeof value.version !== "string") {
54
+ throw new Error(`Invalid agentOS package manifest at ${source}: missing version`);
55
+ }
56
+ const manifest = {
57
+ name: value.name,
58
+ version: value.version,
59
+ };
60
+ if (value.agent !== undefined) {
61
+ if (!isPlainObject(value.agent) ||
62
+ typeof value.agent.acpEntrypoint !== "string") {
63
+ throw new Error(`Invalid agentOS package manifest at ${source}: invalid agent.acpEntrypoint`);
64
+ }
65
+ manifest.agent = {
66
+ acpEntrypoint: value.agent.acpEntrypoint,
67
+ ...(isStringRecord(value.agent.env) ? { env: value.agent.env } : {}),
68
+ ...(Array.isArray(value.agent.launchArgs) &&
69
+ value.agent.launchArgs.every((arg) => typeof arg === "string")
70
+ ? { launchArgs: value.agent.launchArgs }
71
+ : {}),
72
+ ...(typeof value.agent.snapshot === "boolean"
73
+ ? { snapshot: value.agent.snapshot }
74
+ : {}),
75
+ };
76
+ }
77
+ if (value.provides !== undefined) {
78
+ manifest.provides = value.provides;
79
+ }
80
+ return manifest;
81
+ }
82
+ function isPlainObject(value) {
83
+ return typeof value === "object" && value !== null && !Array.isArray(value);
84
+ }
85
+ function isStringRecord(value) {
86
+ return (isPlainObject(value) &&
87
+ Object.values(value).every((entry) => typeof entry === "string"));
88
+ }
@@ -1,5 +1,4 @@
1
- import { type FilesystemEntry } from "./filesystem-snapshot.js";
2
- import { type VirtualFileSystem } from "./runtime-compat.js";
1
+ import type { FilesystemEntry } from "./filesystem-snapshot.js";
3
2
  export interface BaseFilesystemEnvironment {
4
3
  env: Record<string, string>;
5
4
  prompt: string;
@@ -18,17 +17,5 @@ export interface BaseFilesystemSnapshot {
18
17
  entries: BaseFilesystemEntry[];
19
18
  };
20
19
  }
21
- export declare function createBaseLowerFilesystem(): Promise<VirtualFileSystem>;
22
- export declare function createBootstrapAwareFilesystem(filesystem: VirtualFileSystem, existingRoot: VirtualFileSystem, options?: {
23
- readOnlyAfterBootstrap?: boolean;
24
- }): {
25
- filesystem: VirtualFileSystem;
26
- finishKernelBootstrap: () => void;
27
- };
28
- export declare function getBaseFilesystemSnapshot(): BaseFilesystemSnapshot;
20
+ /** The default VM environment (a fresh, mutable copy per call). */
29
21
  export declare function getBaseEnvironment(): Record<string, string>;
30
- export declare function getBaseFilesystemEntries(): BaseFilesystemEntry[];
31
- export declare function createBaseRootFilesystem(): Promise<{
32
- filesystem: VirtualFileSystem;
33
- finishKernelBootstrap: () => void;
34
- }>;
@@ -1,173 +1,25 @@
1
- import { readFileSync } from "node:fs";
2
- import { createRequire } from "node:module";
3
- import * as posixPath from "node:path/posix";
4
- import { createFilesystemFromEntries, } from "./filesystem-snapshot.js";
5
- import { createOverlayBackend } from "./overlay-filesystem.js";
6
- import { KernelError } from "./runtime-compat.js";
7
- const require = createRequire(import.meta.url);
8
- const SNAPSHOT_PATH = require.resolve("@secure-exec/core/fixtures/base-filesystem.json");
9
- const SUPPRESSED_KERNEL_BOOTSTRAP_DIRS = new Set([
10
- "/boot",
11
- "/usr/games",
12
- "/usr/include",
13
- "/usr/libexec",
14
- "/usr/man",
15
- ]);
16
- const SUPPRESSED_KERNEL_BOOTSTRAP_FILES = new Set(["/usr/bin/env"]);
17
- let snapshotCache = null;
18
- function loadSnapshot() {
19
- if (snapshotCache) {
20
- return snapshotCache;
21
- }
22
- snapshotCache = JSON.parse(readFileSync(SNAPSHOT_PATH, "utf-8"));
23
- return snapshotCache;
24
- }
25
- function normalizePath(path) {
26
- const normalized = posixPath.normalize(path);
27
- return normalized === "." ? "/" : normalized;
28
- }
29
- export async function createBaseLowerFilesystem() {
30
- return createFilesystemFromEntries(getBaseFilesystemEntries());
31
- }
32
- export function createBootstrapAwareFilesystem(filesystem, existingRoot, options) {
33
- let bootstrapActive = true;
34
- let writesLocked = false;
35
- function throwReadOnly() {
36
- throw new KernelError("EROFS", "read-only file system");
37
- }
38
- async function rootHasPath(path) {
39
- try {
40
- return await existingRoot.exists(path);
41
- }
42
- catch {
43
- return false;
44
- }
45
- }
46
- const wrapped = {
47
- ...filesystem,
48
- async createDir(path) {
49
- if (writesLocked) {
50
- throwReadOnly();
51
- }
52
- const normalized = normalizePath(path);
53
- if (bootstrapActive &&
54
- SUPPRESSED_KERNEL_BOOTSTRAP_DIRS.has(normalized) &&
55
- !(await rootHasPath(normalized))) {
56
- return;
57
- }
58
- return filesystem.createDir(path);
59
- },
60
- async mkdir(path, options) {
61
- if (writesLocked) {
62
- if (options?.recursive && (await rootHasPath(path))) {
63
- return;
64
- }
65
- throwReadOnly();
66
- }
67
- const normalized = normalizePath(path);
68
- if (bootstrapActive &&
69
- options?.recursive &&
70
- SUPPRESSED_KERNEL_BOOTSTRAP_DIRS.has(normalized) &&
71
- !(await rootHasPath(normalized))) {
72
- return;
73
- }
74
- return filesystem.mkdir(path, options);
75
- },
76
- async writeFile(path, content) {
77
- if (writesLocked) {
78
- throwReadOnly();
79
- }
80
- const normalized = normalizePath(path);
81
- if (bootstrapActive &&
82
- SUPPRESSED_KERNEL_BOOTSTRAP_FILES.has(normalized)) {
83
- return;
84
- }
85
- return filesystem.writeFile(path, content);
86
- },
87
- async removeFile(path) {
88
- if (writesLocked) {
89
- throwReadOnly();
90
- }
91
- return filesystem.removeFile(path);
92
- },
93
- async removeDir(path) {
94
- if (writesLocked) {
95
- throwReadOnly();
96
- }
97
- return filesystem.removeDir(path);
98
- },
99
- async rename(oldPath, newPath) {
100
- if (writesLocked) {
101
- throwReadOnly();
102
- }
103
- return filesystem.rename(oldPath, newPath);
104
- },
105
- async symlink(target, linkPath) {
106
- if (writesLocked) {
107
- throwReadOnly();
108
- }
109
- return filesystem.symlink(target, linkPath);
110
- },
111
- async link(oldPath, newPath) {
112
- if (writesLocked) {
113
- throwReadOnly();
114
- }
115
- return filesystem.link(oldPath, newPath);
116
- },
117
- async chmod(path, mode) {
118
- if (writesLocked) {
119
- throwReadOnly();
120
- }
121
- return filesystem.chmod(path, mode);
122
- },
123
- async chown(path, uid, gid) {
124
- if (writesLocked) {
125
- throwReadOnly();
126
- }
127
- return filesystem.chown(path, uid, gid);
128
- },
129
- async utimes(path, atime, mtime) {
130
- if (writesLocked) {
131
- throwReadOnly();
132
- }
133
- return filesystem.utimes(path, atime, mtime);
134
- },
135
- async truncate(path, length) {
136
- if (writesLocked) {
137
- throwReadOnly();
138
- }
139
- return filesystem.truncate(path, length);
140
- },
141
- async pwrite(path, offset, data) {
142
- if (writesLocked) {
143
- throwReadOnly();
144
- }
145
- return filesystem.pwrite(path, offset, data);
146
- },
147
- };
148
- return {
149
- filesystem: wrapped,
150
- finishKernelBootstrap() {
151
- bootstrapActive = false;
152
- writesLocked = options?.readOnlyAfterBootstrap ?? false;
153
- },
154
- };
155
- }
156
- export function getBaseFilesystemSnapshot() {
157
- return loadSnapshot();
158
- }
1
+ /**
2
+ * The base VM environment, baked in as a constant (verbatim from the single
3
+ * `base-filesystem.json` the sidecar embeds). The host no longer reads that JSON
4
+ * — the sidecar owns the base filesystem, and there is exactly one committed copy
5
+ * of it (`secure-exec/crates/vfs/assets/base-filesystem.json`). Regenerate both
6
+ * this constant and that file together with the build-tools snapshot script.
7
+ */
8
+ const BASE_ENVIRONMENT = Object.freeze({
9
+ CHARSET: "UTF-8",
10
+ HOME: "/home/agentos",
11
+ HOSTNAME: "secure-exec",
12
+ LANG: "C.UTF-8",
13
+ LC_COLLATE: "C",
14
+ LOGNAME: "agentos",
15
+ PAGER: "less",
16
+ PATH: "/usr/local/sbin:/usr/local/bin:/opt/agentos/bin:/usr/sbin:/usr/bin:/sbin:/bin",
17
+ MANPATH: "/opt/agentos/share/man:/usr/local/share/man:/usr/share/man",
18
+ SHELL: "/bin/sh",
19
+ USER: "agentos",
20
+ PS1: "\\h:\\w\\$ ",
21
+ });
22
+ /** The default VM environment (a fresh, mutable copy per call). */
159
23
  export function getBaseEnvironment() {
160
- const snapshot = loadSnapshot();
161
- return {
162
- ...snapshot.environment.env,
163
- PS1: snapshot.environment.prompt,
164
- };
165
- }
166
- export function getBaseFilesystemEntries() {
167
- return loadSnapshot().filesystem.entries;
168
- }
169
- export async function createBaseRootFilesystem() {
170
- const lower = await createBaseLowerFilesystem();
171
- const overlay = createOverlayBackend({ lower });
172
- return createBootstrapAwareFilesystem(overlay, lower);
24
+ return { ...BASE_ENVIRONMENT };
173
25
  }
@@ -1,5 +1,5 @@
1
1
  import type { CreateSessionOptions } from "../agent-os.js";
2
- import type { AgentType } from "../agents.js";
2
+ import type { AgentType } from "../types.js";
3
3
  export type CronAction = {
4
4
  type: "session";
5
5
  agentType: AgentType;
@@ -0,0 +1,8 @@
1
+ import type { SoftwarePackageRef } from "@agentos-software/manifest";
2
+ /**
3
+ * Default software for a bare `AgentOs.create()`: the `@agentos-software/common`
4
+ * coreutils bundle, imported like any other package. The client makes NO
5
+ * npm/node_modules assumptions (see root CLAUDE.md) — no dep scan, no
6
+ * require.resolve. Opt out with `defaultSoftware: false`; add more via `software`.
7
+ */
8
+ export declare function resolveDefaultSoftware(): SoftwarePackageRef[];
@@ -0,0 +1,10 @@
1
+ import common from "@agentos-software/common";
2
+ /**
3
+ * Default software for a bare `AgentOs.create()`: the `@agentos-software/common`
4
+ * coreutils bundle, imported like any other package. The client makes NO
5
+ * npm/node_modules assumptions (see root CLAUDE.md) — no dep scan, no
6
+ * require.resolve. Opt out with `defaultSoftware: false`; add more via `software`.
7
+ */
8
+ export function resolveDefaultSoftware() {
9
+ return [common].flat();
10
+ }
@@ -0,0 +1,4 @@
1
+ export type AcpLimitsConfig = {
2
+ maxReadLineBytes?: number;
3
+ stdoutBufferByteLimit?: number;
4
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,26 @@
1
+ import type { JsRuntimeConfig } from "./JsRuntimeConfig.js";
2
+ import type { NativeRootFilesystemConfig } from "./NativeRootFilesystemConfig.js";
3
+ import type { PermissionsPolicy } from "./PermissionsPolicy.js";
4
+ import type { RootFilesystemConfig } from "./RootFilesystemConfig.js";
5
+ import type { VmDnsConfig } from "./VmDnsConfig.js";
6
+ import type { VmLimitsConfig } from "./VmLimitsConfig.js";
7
+ import type { VmListenPolicyConfig } from "./VmListenPolicyConfig.js";
8
+ /**
9
+ * Canonical Rust-side VM config. Unknown fields must stay rejected here and in
10
+ * the TS preflight schema at
11
+ * `packages/core/src/node-runtime-options-schema.ts`; update both when a
12
+ * public `NodeRuntime.create(...)` option changes the generated VM config.
13
+ */
14
+ export type CreateVmConfig = {
15
+ cwd?: string;
16
+ env: Record<string, string>;
17
+ rootFilesystem: RootFilesystemConfig;
18
+ permissions?: PermissionsPolicy;
19
+ limits?: VmLimitsConfig;
20
+ dns?: VmDnsConfig;
21
+ nativeRoot?: NativeRootFilesystemConfig;
22
+ listen?: VmListenPolicyConfig;
23
+ loopbackExemptPorts: Array<number>;
24
+ jsRuntime?: JsRuntimeConfig;
25
+ bootstrapCommands?: Array<string>;
26
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { PermissionMode } from "./PermissionMode.js";
2
+ export type FsPermissionRule = {
3
+ mode: PermissionMode;
4
+ operations: Array<string>;
5
+ paths: Array<string>;
6
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { FsPermissionRule } from "./FsPermissionRule.js";
2
+ import type { PermissionMode } from "./PermissionMode.js";
3
+ export type FsPermissionRuleSet = {
4
+ default?: PermissionMode;
5
+ rules: Array<FsPermissionRule>;
6
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { FsPermissionRuleSet } from "./FsPermissionRuleSet.js";
2
+ import type { PermissionMode } from "./PermissionMode.js";
3
+ export type FsPermissionScope = PermissionMode | FsPermissionRuleSet;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export type HttpLimitsConfig = {
2
+ maxFetchResponseBytes?: number;
3
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1 @@
1
+ export type JsModuleResolution = "node" | "relative" | "none";
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,31 @@
1
+ import type { JsModuleResolution } from "./JsModuleResolution.js";
2
+ import type { JsRuntimePlatform } from "./JsRuntimePlatform.js";
3
+ /**
4
+ * Guest JavaScript host-environment configuration.
5
+ *
6
+ * Selects which globals/builtins/module-resolution surface guest JS sees,
7
+ * modeled on esbuild's `platform`. Omitting this preserves full Node.js
8
+ * emulation (`platform = node`).
9
+ */
10
+ export type JsRuntimeConfig = {
11
+ /**
12
+ * Which host environment to emulate for guest JS. Default `node`.
13
+ */
14
+ platform: JsRuntimePlatform;
15
+ /**
16
+ * How bare import specifiers resolve. Independent of `platform`.
17
+ * Default `node`.
18
+ */
19
+ moduleResolution: JsModuleResolution;
20
+ /**
21
+ * Node builtin-module allow-list. Only valid when `platform = node`.
22
+ * `None` => engine default allow-list. `Some([])` => deny all builtins.
23
+ * `Some([..])` => exactly those.
24
+ */
25
+ allowedBuiltins?: Array<string>;
26
+ /**
27
+ * Opt in to a high-resolution monotonic guest clock. Default false keeps
28
+ * the security-oriented 1ms timer resolution.
29
+ */
30
+ highResolutionTime?: boolean;
31
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ export type JsRuntimeLimitsConfig = {
2
+ v8HeapLimitMb?: number;
3
+ syncRpcWaitTimeoutMs?: number;
4
+ cpuTimeLimitMs?: number;
5
+ wallClockLimitMs?: number;
6
+ importCacheMaterializeTimeoutMs?: number;
7
+ capturedOutputLimitBytes?: number;
8
+ stdinBufferLimitBytes?: number;
9
+ eventPayloadLimitBytes?: number;
10
+ v8IpcMaxFrameBytes?: number;
11
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1 @@
1
+ export type JsRuntimePlatform = "node" | "browser" | "neutral" | "bare";
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export type MountPluginDescriptor = {
2
+ id: string;
3
+ config: import("@rivet-dev/agentos-runtime-core/descriptors").MountConfigJsonValue;
4
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { MountPluginDescriptor } from "./MountPluginDescriptor.js";
2
+ export type NativeRootFilesystemConfig = {
3
+ plugin: MountPluginDescriptor;
4
+ readOnly: boolean;
5
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { PermissionMode } from "./PermissionMode.js";
2
+ export type PatternPermissionRule = {
3
+ mode: PermissionMode;
4
+ operations: Array<string>;
5
+ patterns: Array<string>;
6
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { PatternPermissionRule } from "./PatternPermissionRule.js";
2
+ import type { PermissionMode } from "./PermissionMode.js";
3
+ export type PatternPermissionRuleSet = {
4
+ default?: PermissionMode;
5
+ rules: Array<PatternPermissionRule>;
6
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { PatternPermissionRuleSet } from "./PatternPermissionRuleSet.js";
2
+ import type { PermissionMode } from "./PermissionMode.js";
3
+ export type PatternPermissionScope = PermissionMode | PatternPermissionRuleSet;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export type PermissionMode = "allow" | "ask" | "deny";
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { FsPermissionScope } from "./FsPermissionScope.js";
2
+ import type { PatternPermissionScope } from "./PatternPermissionScope.js";
3
+ export type PermissionsPolicy = {
4
+ fs?: FsPermissionScope;
5
+ network?: PatternPermissionScope;
6
+ childProcess?: PatternPermissionScope;
7
+ process?: PatternPermissionScope;
8
+ env?: PatternPermissionScope;
9
+ binding?: PatternPermissionScope;
10
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export type PluginLimitsConfig = {
2
+ maxPersistedManifestBytes?: number;
3
+ maxPersistedManifestFileBytes?: number;
4
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ export type PythonLimitsConfig = {
2
+ outputBufferMaxBytes?: number;
3
+ executionTimeoutMs?: number;
4
+ maxOldSpaceMb?: number;
5
+ vfsRpcTimeoutMs?: number;
6
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,24 @@
1
+ export type ResourceLimitsConfig = {
2
+ cpuCount?: number;
3
+ maxProcesses?: number;
4
+ maxOpenFds?: number;
5
+ maxPipes?: number;
6
+ maxPtys?: number;
7
+ maxSockets?: number;
8
+ maxConnections?: number;
9
+ maxSocketBufferedBytes?: number;
10
+ maxSocketDatagramQueueLen?: number;
11
+ maxFilesystemBytes?: number;
12
+ maxInodeCount?: number;
13
+ maxBlockingReadMs?: number;
14
+ maxPreadBytes?: number;
15
+ maxFdWriteBytes?: number;
16
+ maxProcessArgvBytes?: number;
17
+ maxProcessEnvBytes?: number;
18
+ maxReaddirEntries?: number;
19
+ maxRecursiveFsDepth?: number;
20
+ maxRecursiveFsEntries?: number;
21
+ maxWasmFuel?: number;
22
+ maxWasmMemoryBytes?: number;
23
+ maxWasmStackBytes?: number;
24
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};