@rivet-dev/agentos-core 0.2.16-rc.1 → 0.2.16-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/dist/agent-os.js CHANGED
@@ -153,6 +153,13 @@ async function waitForTrackedExitPromises(promises, timeoutMs) {
153
153
  }),
154
154
  ]);
155
155
  }
156
+ function headersToRecord(headers) {
157
+ const result = {};
158
+ headers.forEach((value, name) => {
159
+ result[name] = value;
160
+ });
161
+ return result;
162
+ }
156
163
  import { OPT_AGENTOS_ROOT, } from "./agentos-package.js";
157
164
  import { getBaseEnvironment } from "./base-filesystem.js";
158
165
  import { CronManager } from "./cron/cron-manager.js";
@@ -2156,17 +2163,11 @@ export class AgentOs {
2156
2163
  completed = completedBeforeAdmission.has(executionId);
2157
2164
  if (completed)
2158
2165
  resolveCompletion?.();
2159
- let rejectAbort;
2160
- const aborted = !background && options.signal
2161
- ? new Promise((_resolve, reject) => {
2162
- rejectAbort = reject;
2163
- })
2164
- : undefined;
2165
2166
  const abort = () => {
2167
+ // Admitted executions report cancellation through their structured result.
2166
2168
  void this._cancelExecution(response.response.operationId).catch((error) => {
2167
2169
  console.error("[agentos] failed to cancel aborted execution", error);
2168
2170
  });
2169
- rejectAbort?.(options.signal?.reason ?? new DOMException("Aborted", "AbortError"));
2170
2171
  };
2171
2172
  options.signal?.addEventListener("abort", abort, { once: true });
2172
2173
  if (options.signal?.aborted)
@@ -2198,7 +2199,7 @@ export class AgentOs {
2198
2199
  };
2199
2200
  }
2200
2201
  try {
2201
- await (aborted ? Promise.race([completion, aborted]) : completion);
2202
+ await completion;
2202
2203
  return await this._waitExecutionResult(response.response.operationId);
2203
2204
  }
2204
2205
  finally {
@@ -2794,6 +2795,7 @@ export class AgentOs {
2794
2795
  env: options.env,
2795
2796
  stdin: options.stdin,
2796
2797
  timeout: options.timeoutMs,
2798
+ streamStdin: true,
2797
2799
  onStdout: (data) => {
2798
2800
  recordOutput("stdout", data);
2799
2801
  options?.onStdout?.(data);
@@ -3195,7 +3197,7 @@ export class AgentOs {
3195
3197
  port,
3196
3198
  method: request.method,
3197
3199
  path: `${url.pathname}${url.search}`,
3198
- headersJson: JSON.stringify(Object.fromEntries(request.headers.entries())),
3200
+ headersJson: JSON.stringify(headersToRecord(request.headers)),
3199
3201
  ...(request.method !== "GET" && request.method !== "HEAD"
3200
3202
  ? {
3201
3203
  bodyBase64: Buffer.from(await request.arrayBuffer()).toString("base64"),
@@ -3218,7 +3220,7 @@ export class AgentOs {
3218
3220
  port,
3219
3221
  method: request.method,
3220
3222
  path: `${url.pathname}${url.search}`,
3221
- headersJson: JSON.stringify(Object.fromEntries(request.headers.entries())),
3223
+ headersJson: JSON.stringify(headersToRecord(request.headers)),
3222
3224
  ...(request.method !== "GET" && request.method !== "HEAD"
3223
3225
  ? {
3224
3226
  bodyBase64: Buffer.from(await request.arrayBuffer()).toString("base64"),
@@ -1,3 +1,4 @@
1
+ /// <reference path="../long-timeout.d.ts" />
1
2
  import { clearTimeout as clearLongTimeout, setTimeout as longSetTimeout, } from "long-timeout";
2
3
  import { resolveSchedule, validateScheduleForRegistration, } from "./parse-schedule.js";
3
4
  /**
package/dist/sandbox.js CHANGED
@@ -8,7 +8,11 @@ function normalizeHeaders(headers) {
8
8
  return undefined;
9
9
  }
10
10
  if (headers instanceof Headers) {
11
- return Object.fromEntries(headers.entries());
11
+ const normalized = {};
12
+ headers.forEach((value, name) => {
13
+ normalized[name] = value;
14
+ });
15
+ return normalized;
12
16
  }
13
17
  if (Array.isArray(headers)) {
14
18
  return Object.fromEntries(headers);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivet-dev/agentos-core",
3
- "version": "0.2.16-rc.1",
3
+ "version": "0.2.16-rc.3",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index.js",
@@ -56,27 +56,26 @@
56
56
  "build:agentos-protocol": "node ./scripts/compile-agentos-protocol.mjs",
57
57
  "build:protocols": "pnpm run build:agentos-protocol",
58
58
  "test": "vitest run --exclude '**/*.nightly.test.ts' --reporter=verbose",
59
- "test:unit": "vitest run tests/agent-exit-event.test.ts tests/agentos-package.test.ts tests/agentos-protocol.test.ts tests/allowed-node-builtins.test.ts tests/bindings-zod.test.ts tests/bindings.test.ts tests/cron-manager.test.ts tests/cron-timer-driver.test.ts tests/generated-protocol.test.ts tests/leak-agent-os-processes.test.ts tests/leak-rpc-client.test.ts tests/mount-descriptors.test.ts tests/mount-reconfigure.test.ts tests/options-schema.test.ts tests/public-api-exports.test.ts tests/root-filesystem-descriptors.test.ts tests/runtime-compat-mount.test.ts tests/session-event-ordering.test.ts tests/session-permission-surface.test.ts tests/sidecar-client.test.ts tests/sidecar-permission-descriptors.test.ts tests/wasm-permission-tiers.test.ts --fileParallelism=false",
60
- "test:pr": "pnpm test:unit && vitest run tests/migration-parity.test.ts --fileParallelism=false --reporter=verbose",
59
+ "test:unit": "vitest run tests/agent-exit-event.test.ts tests/agentos-package.test.ts tests/agentos-protocol.test.ts tests/allowed-node-builtins.test.ts tests/bindings-zod.test.ts tests/bindings.test.ts tests/cron-manager.test.ts tests/cron-timer-driver.test.ts tests/execution-abort.test.ts tests/generated-protocol.test.ts tests/leak-agent-os-processes.test.ts tests/leak-rpc-client.test.ts tests/mount-descriptors.test.ts tests/mount-reconfigure.test.ts tests/options-schema.test.ts tests/public-api-exports.test.ts tests/root-filesystem-descriptors.test.ts tests/runtime-compat-mount.test.ts tests/session-event-ordering.test.ts tests/session-permission-surface.test.ts tests/sidecar-client.test.ts tests/sidecar-permission-descriptors.test.ts tests/wasm-permission-tiers.test.ts --fileParallelism=false",
60
+ "test:pr": "pnpm test:unit && vitest run tests/migration-parity.test.ts tests/acp-reactor-regression.test.ts --fileParallelism=false --reporter=verbose",
61
61
  "test:nightly": "vitest run tests/*.nightly.test.ts --reporter=verbose --passWithNoTests"
62
62
  },
63
63
  "dependencies": {
64
64
  "@agentclientprotocol/sdk": "0.16.1",
65
65
  "@agentos-software/claude-code": "0.2.7",
66
66
  "@agentos-software/codex-cli": "0.3.4",
67
- "@agentos-software/common": "0.2.16-rc.1",
68
- "@agentos-software/manifest": "0.2.16-rc.1",
67
+ "@agentos-software/common": "0.2.16-rc.3",
68
+ "@agentos-software/manifest": "0.2.16-rc.3",
69
69
  "@agentos-software/opencode": "0.2.7",
70
70
  "@agentos-software/pi": "0.2.7",
71
71
  "@aws-sdk/client-s3": "^3.1019.0",
72
- "@rivet-dev/agentos-sidecar": "0.2.16-rc.1",
72
+ "@rivet-dev/agentos-sidecar": "0.2.16-rc.3",
73
73
  "@rivetkit/bare-ts": "^0.6.2",
74
- "@rivet-dev/agentos-runtime-core": "0.2.16-rc.1",
74
+ "@rivet-dev/agentos-runtime-core": "0.2.16-rc.3",
75
75
  "@xterm/headless": "^6.0.0",
76
76
  "better-sqlite3": "^12.8.0",
77
77
  "croner": "^10.0.1",
78
78
  "googleapis": "^144.0.0",
79
- "isolated-vm": "^6.0.0",
80
79
  "long-timeout": "^0.1.1",
81
80
  "minimatch": "^10.2.4",
82
81
  "zod": "^4.1.11",
@@ -106,7 +105,7 @@
106
105
  "@agentos-software/vim": "0.3.3",
107
106
  "@agentos-software/wget": "0.3.3",
108
107
  "@agentos-software/yq": "0.3.3",
109
- "@rivet-dev/agentos-test-harness": "0.2.16-rc.1",
108
+ "@rivet-dev/agentos-test-harness": "0.2.16-rc.3",
110
109
  "@anthropic-ai/claude-agent-sdk": "^0.2.87",
111
110
  "@anthropic-ai/claude-code": "^2.1.86",
112
111
  "@bare-ts/tools": "0.15.0",
@@ -120,5 +119,10 @@
120
119
  "vitest": "^2.1.8",
121
120
  "ws": "^8.18.0",
122
121
  "zod3": "npm:zod@^3.25.76"
122
+ },
123
+ "repository": {
124
+ "type": "git",
125
+ "url": "https://github.com/rivet-dev/agentos.git",
126
+ "directory": "packages/core"
123
127
  }
124
128
  }