@rivet-dev/agentos-core 0.0.0-abc-fixes-1.d8c4d95 → 0.0.0-agent-acp-codex-session-benchmark.62b1f46
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 +48 -48
- package/dist/agent-os.d.ts +215 -161
- package/dist/agent-os.js +1300 -2576
- package/dist/agentos-package.d.ts +27 -0
- package/dist/agentos-package.js +21 -0
- package/dist/base-filesystem.d.ts +1 -16
- package/dist/base-filesystem.js +1 -173
- package/dist/cron/cron-manager.d.ts +39 -14
- package/dist/cron/cron-manager.js +289 -128
- package/dist/cron/errors.d.ts +8 -0
- package/dist/cron/errors.js +16 -0
- package/dist/cron/index.d.ts +1 -3
- package/dist/cron/index.js +1 -2
- package/dist/cron/types.d.ts +2 -2
- package/dist/default-software.d.ts +8 -0
- package/dist/default-software.js +10 -0
- package/dist/filesystem-snapshot.d.ts +1 -1
- package/dist/filesystem-snapshot.js +1 -1
- package/dist/generated/AcpLimitsConfig.d.ts +4 -0
- package/dist/generated/AcpLimitsConfig.js +2 -0
- package/dist/generated/CreateVmConfig.d.ts +29 -0
- package/dist/generated/FsPermissionRule.d.ts +6 -0
- package/dist/generated/FsPermissionRule.js +1 -0
- package/dist/generated/FsPermissionRuleSet.d.ts +6 -0
- package/dist/generated/FsPermissionRuleSet.js +1 -0
- package/dist/generated/FsPermissionScope.d.ts +3 -0
- package/dist/generated/FsPermissionScope.js +1 -0
- package/dist/generated/HttpLimitsConfig.d.ts +3 -0
- package/dist/generated/HttpLimitsConfig.js +2 -0
- package/dist/generated/JsModuleResolution.d.ts +1 -0
- package/dist/generated/JsModuleResolution.js +2 -0
- package/dist/generated/JsRuntimeConfig.d.ts +31 -0
- package/dist/generated/JsRuntimeConfig.js +1 -0
- package/dist/generated/JsRuntimeLimitsConfig.d.ts +8 -0
- package/dist/generated/JsRuntimeLimitsConfig.js +2 -0
- package/dist/generated/JsRuntimePlatform.d.ts +1 -0
- package/dist/generated/JsRuntimePlatform.js +2 -0
- package/dist/generated/MountPluginDescriptor.d.ts +4 -0
- package/dist/generated/MountPluginDescriptor.js +2 -0
- package/dist/generated/NativeRootFilesystemConfig.d.ts +5 -0
- package/dist/generated/NativeRootFilesystemConfig.js +1 -0
- package/dist/generated/PatternPermissionRule.d.ts +6 -0
- package/dist/generated/PatternPermissionRule.js +1 -0
- package/dist/generated/PatternPermissionRuleSet.d.ts +6 -0
- package/dist/generated/PatternPermissionRuleSet.js +1 -0
- package/dist/generated/PatternPermissionScope.d.ts +3 -0
- package/dist/generated/PatternPermissionScope.js +1 -0
- package/dist/generated/PermissionMode.d.ts +1 -0
- package/dist/generated/PermissionMode.js +2 -0
- package/dist/generated/PermissionsPolicy.d.ts +10 -0
- package/dist/generated/PermissionsPolicy.js +1 -0
- package/dist/generated/PluginLimitsConfig.d.ts +4 -0
- package/dist/generated/PluginLimitsConfig.js +2 -0
- package/dist/generated/PythonLimitsConfig.d.ts +6 -0
- package/dist/generated/PythonLimitsConfig.js +2 -0
- package/dist/generated/ResourceLimitsConfig.d.ts +25 -0
- package/dist/generated/ResourceLimitsConfig.js +2 -0
- package/dist/generated/RootFilesystemConfig.d.ts +9 -0
- package/dist/generated/RootFilesystemConfig.js +1 -0
- package/dist/generated/RootFilesystemEntry.d.ts +13 -0
- package/dist/generated/RootFilesystemEntry.js +1 -0
- package/dist/generated/RootFilesystemEntryEncoding.d.ts +1 -0
- package/dist/generated/RootFilesystemEntryEncoding.js +2 -0
- package/dist/generated/RootFilesystemEntryKind.d.ts +1 -0
- package/dist/generated/RootFilesystemEntryKind.js +2 -0
- package/dist/generated/RootFilesystemLowerDescriptor.d.ts +7 -0
- package/dist/generated/RootFilesystemLowerDescriptor.js +1 -0
- package/dist/generated/RootFilesystemMode.d.ts +1 -0
- package/dist/generated/RootFilesystemMode.js +2 -0
- package/dist/generated/ToolLimitsConfig.d.ts +10 -0
- package/dist/generated/ToolLimitsConfig.js +2 -0
- package/dist/generated/VmDnsConfig.d.ts +6 -0
- package/dist/generated/VmDnsConfig.js +2 -0
- package/dist/generated/VmLimitsConfig.d.ts +18 -0
- package/dist/generated/VmLimitsConfig.js +1 -0
- package/dist/generated/VmListenPolicyConfig.d.ts +5 -0
- package/dist/generated/VmListenPolicyConfig.js +2 -0
- package/dist/generated/WasmLimitsConfig.d.ts +7 -0
- package/dist/generated/WasmLimitsConfig.js +2 -0
- package/dist/host-dir-mount.d.ts +5 -5
- package/dist/host-dir-mount.js +4 -4
- package/dist/host-tools-zod.js +27 -7
- package/dist/host-tools.d.ts +2 -9
- package/dist/host-tools.js +0 -18
- package/dist/index.d.ts +7 -4
- package/dist/index.js +6 -4
- package/dist/layers.d.ts +3 -3
- package/dist/layers.js +19 -10
- package/dist/memory-filesystem.d.ts +39 -0
- package/dist/memory-filesystem.js +375 -0
- package/dist/options-schema.d.ts +452 -0
- package/dist/options-schema.js +269 -0
- package/dist/overlay-filesystem.d.ts +1 -1
- package/dist/overlay-filesystem.js +3 -3
- package/dist/packages.d.ts +10 -123
- package/dist/packages.js +3 -329
- package/dist/runtime.d.ts +41 -184
- package/dist/sidecar/agentos-protocol.d.ts +232 -29
- package/dist/sidecar/agentos-protocol.js +456 -120
- package/dist/sidecar/binary.d.ts +2 -2
- package/dist/sidecar/binary.js +2 -2
- package/dist/sidecar/native-process-client.d.ts +5 -3
- package/dist/sidecar/native-process-client.js +5 -3
- package/dist/sidecar/permissions.d.ts +4 -3
- package/dist/sidecar/permissions.js +6 -23
- package/dist/sidecar/rpc-client.d.ts +74 -86
- package/dist/sidecar/rpc-client.js +422 -1418
- package/dist/test/file-system.d.ts +1 -1
- package/dist/test/file-system.js +3 -1
- package/dist/test/runtime.d.ts +2 -3
- package/dist/test/runtime.js +1 -1
- package/dist/test/terminal-harness.d.ts +5 -4
- package/dist/test/terminal-harness.js +12 -7
- package/dist/types.d.ts +12 -5
- package/package.json +37 -41
- package/dist/agents.d.ts +0 -63
- package/dist/agents.js +0 -42
- package/dist/cron/parse-schedule.d.ts +0 -25
- package/dist/cron/parse-schedule.js +0 -66
- package/dist/cron/schedule-driver.d.ts +0 -19
- package/dist/cron/timer-driver.d.ts +0 -17
- package/dist/cron/timer-driver.js +0 -61
- package/dist/runtime-compat.d.ts +0 -475
- package/dist/runtime-compat.js +0 -2010
- package/dist/sidecar/cargo.d.ts +0 -2
- package/dist/sidecar/cargo.js +0 -142
- package/fixtures/AGENTOS_SYSTEM_PROMPT.md +0 -21
- /package/dist/{cron/schedule-driver.js → generated/CreateVmConfig.js} +0 -0
package/dist/sidecar/cargo.d.ts
DELETED
package/dist/sidecar/cargo.js
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { accessSync, constants as fsConstants, existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
2
|
-
import { homedir } from "node:os";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
const CARGO_BINARY_NAME = process.platform === "win32" ? "cargo.exe" : "cargo";
|
|
5
|
-
function hasPathSeparator(candidate) {
|
|
6
|
-
return candidate.includes("/") || candidate.includes("\\");
|
|
7
|
-
}
|
|
8
|
-
function isExecutableFile(candidate) {
|
|
9
|
-
try {
|
|
10
|
-
if (!statSync(candidate).isFile()) {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
accessSync(candidate, fsConstants.X_OK);
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
catch {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
function resolveExecutableOnPath(binaryName) {
|
|
21
|
-
const pathEntries = (process.env.PATH ?? "")
|
|
22
|
-
.split(path.delimiter)
|
|
23
|
-
.map((entry) => entry.trim())
|
|
24
|
-
.filter(Boolean);
|
|
25
|
-
for (const entry of pathEntries) {
|
|
26
|
-
const candidate = path.join(entry, binaryName);
|
|
27
|
-
if (isExecutableFile(candidate)) {
|
|
28
|
-
return candidate;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
function resolveExecutableCandidate(candidate) {
|
|
34
|
-
if (hasPathSeparator(candidate)) {
|
|
35
|
-
return isExecutableFile(candidate) ? candidate : null;
|
|
36
|
-
}
|
|
37
|
-
return resolveExecutableOnPath(candidate);
|
|
38
|
-
}
|
|
39
|
-
function getToolchainCargoFromRustupHome(rustupHome) {
|
|
40
|
-
const toolchainsDir = path.join(rustupHome, "toolchains");
|
|
41
|
-
if (!existsSync(toolchainsDir)) {
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
const settingsPath = path.join(rustupHome, "settings.toml");
|
|
45
|
-
const orderedToolchains = [];
|
|
46
|
-
if (existsSync(settingsPath)) {
|
|
47
|
-
const defaultToolchain = readFileSync(settingsPath, "utf8")
|
|
48
|
-
.match(/^default_toolchain\s*=\s*"([^"]+)"/m)?.[1]
|
|
49
|
-
?.trim();
|
|
50
|
-
if (defaultToolchain) {
|
|
51
|
-
orderedToolchains.push(defaultToolchain);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
for (const entry of readdirSync(toolchainsDir)) {
|
|
55
|
-
if (!orderedToolchains.includes(entry)) {
|
|
56
|
-
orderedToolchains.push(entry);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
for (const toolchain of orderedToolchains) {
|
|
60
|
-
const cargoPath = path.join(toolchainsDir, toolchain, "bin", CARGO_BINARY_NAME);
|
|
61
|
-
if (existsSync(cargoPath)) {
|
|
62
|
-
return { cargoPath, rustupHome };
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
function inferRustupHomesFromPath() {
|
|
68
|
-
const rustupHomes = new Set();
|
|
69
|
-
const pathEntries = (process.env.PATH ?? "")
|
|
70
|
-
.split(path.delimiter)
|
|
71
|
-
.map((entry) => entry.trim())
|
|
72
|
-
.filter(Boolean);
|
|
73
|
-
for (const entry of pathEntries) {
|
|
74
|
-
if (path.basename(entry) !== "bin") {
|
|
75
|
-
continue;
|
|
76
|
-
}
|
|
77
|
-
const parentDir = path.dirname(entry);
|
|
78
|
-
if (existsSync(path.join(parentDir, "toolchains"))) {
|
|
79
|
-
rustupHomes.add(parentDir);
|
|
80
|
-
}
|
|
81
|
-
const siblingRoot = path.dirname(parentDir);
|
|
82
|
-
try {
|
|
83
|
-
for (const sibling of readdirSync(siblingRoot, { withFileTypes: true })) {
|
|
84
|
-
if (!sibling.isDirectory()) {
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
const siblingPath = path.join(siblingRoot, sibling.name);
|
|
88
|
-
if (existsSync(path.join(siblingPath, "toolchains"))) {
|
|
89
|
-
rustupHomes.add(siblingPath);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
catch { }
|
|
94
|
-
}
|
|
95
|
-
return [...rustupHomes];
|
|
96
|
-
}
|
|
97
|
-
function ensureToolchainEnvironment(toolchainCargo) {
|
|
98
|
-
const toolchainBin = path.dirname(toolchainCargo.cargoPath);
|
|
99
|
-
const currentPathEntries = (process.env.PATH ?? "")
|
|
100
|
-
.split(path.delimiter)
|
|
101
|
-
.filter(Boolean);
|
|
102
|
-
if (!currentPathEntries.includes(toolchainBin)) {
|
|
103
|
-
process.env.PATH = [toolchainBin, ...currentPathEntries].join(path.delimiter);
|
|
104
|
-
}
|
|
105
|
-
if (!process.env.RUSTUP_HOME) {
|
|
106
|
-
process.env.RUSTUP_HOME = toolchainCargo.rustupHome;
|
|
107
|
-
}
|
|
108
|
-
const toolchainName = path.basename(path.dirname(toolchainBin));
|
|
109
|
-
if (!process.env.RUSTUP_TOOLCHAIN) {
|
|
110
|
-
process.env.RUSTUP_TOOLCHAIN = toolchainName;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
export function findCargoBinary() {
|
|
114
|
-
const explicitCargo = process.env.CARGO?.trim();
|
|
115
|
-
const rustupHomes = [
|
|
116
|
-
process.env.RUSTUP_HOME?.trim(),
|
|
117
|
-
path.join(homedir(), ".rustup"),
|
|
118
|
-
...inferRustupHomesFromPath(),
|
|
119
|
-
].filter((candidate) => Boolean(candidate));
|
|
120
|
-
const toolchainCargoCandidates = rustupHomes
|
|
121
|
-
.map((rustupHome) => getToolchainCargoFromRustupHome(rustupHome))
|
|
122
|
-
.filter((candidate) => Boolean(candidate));
|
|
123
|
-
if (toolchainCargoCandidates.length > 0) {
|
|
124
|
-
ensureToolchainEnvironment(toolchainCargoCandidates[0]);
|
|
125
|
-
}
|
|
126
|
-
const candidates = [
|
|
127
|
-
explicitCargo,
|
|
128
|
-
...toolchainCargoCandidates.map((candidate) => candidate.cargoPath),
|
|
129
|
-
path.join(homedir(), ".cargo", "bin", CARGO_BINARY_NAME),
|
|
130
|
-
CARGO_BINARY_NAME,
|
|
131
|
-
].filter((candidate) => Boolean(candidate));
|
|
132
|
-
for (const candidate of candidates) {
|
|
133
|
-
const resolved = resolveExecutableCandidate(candidate);
|
|
134
|
-
if (resolved) {
|
|
135
|
-
return resolved;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
return null;
|
|
139
|
-
}
|
|
140
|
-
export function resolveCargoBinary() {
|
|
141
|
-
return findCargoBinary() ?? CARGO_BINARY_NAME;
|
|
142
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# agentOS
|
|
2
|
-
|
|
3
|
-
You are running inside agentOS, a Linux-like operating system for coding agents.
|
|
4
|
-
|
|
5
|
-
Known limitations:
|
|
6
|
-
|
|
7
|
-
- Binaries inside agentOS are special. You cannot download and install arbitrary binaries (e.g. via curl or apt).
|
|
8
|
-
- No file watching (inotify, fs.watch).
|
|
9
|
-
|
|
10
|
-
## Bug Reports
|
|
11
|
-
|
|
12
|
-
If you find a bug in something that does not behave like you would expect in agentOS, generate a bug report and indicate the user should file it under: https://github.com/rivet-dev/rivet/issues (This repository holds agentOS inside of it.)
|
|
13
|
-
|
|
14
|
-
## Tools CLI
|
|
15
|
-
|
|
16
|
-
Tools are available as CLI commands:
|
|
17
|
-
|
|
18
|
-
- `agentos list-tools` — list all available toolkits and tools
|
|
19
|
-
- `agentos-{toolkit} {tool} --help` — show usage for a specific tool
|
|
20
|
-
- `agentos-{toolkit} {tool} --flag value` — invoke a tool
|
|
21
|
-
|
|
File without changes
|