@agentproto/runtime 5.6.0 → 5.8.0
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/config-schema.mjs +10 -0
- package/dist/config-schema.mjs.map +1 -1
- package/dist/config.mjs +10 -0
- package/dist/config.mjs.map +1 -1
- package/dist/index.d.ts +413 -5
- package/dist/index.mjs +3958 -2671
- package/dist/index.mjs.map +1 -1
- package/dist/resume-strategies.mjs.map +1 -1
- package/dist/session-presence.mjs +10 -0
- package/dist/session-presence.mjs.map +1 -1
- package/dist/{sessions-DMzCgTVy.d.ts → sessions-SrISpFsH.d.ts} +80 -0
- package/dist/user-presets.d.ts +1 -1
- package/package.json +7 -7
|
@@ -4432,6 +4432,14 @@ interface SessionDescriptor {
|
|
|
4432
4432
|
* process gone (pid 1234) — session crashed"). Not a stack trace or raw
|
|
4433
4433
|
* error, just enough for a UI/log line. Absent unless something set it. */
|
|
4434
4434
|
lastError?: string;
|
|
4435
|
+
/** BOOTSTRAP P7b — why the LAST device-mirror sync against this
|
|
4436
|
+
* session's host failed (`device-mirror.ts`), for readers to show
|
|
4437
|
+
* "host unreachable" instead of silently rendering a stale mirrored
|
|
4438
|
+
* transcript. Ephemeral: stamped on the descriptor at read time when a
|
|
4439
|
+
* sync fails, CLEARED by the next successful sync. Absent (never "")
|
|
4440
|
+
* for a session that is not device-mirrored or whose last sync passed.
|
|
4441
|
+
*/
|
|
4442
|
+
mirrorError?: string;
|
|
4435
4443
|
/** ISO 8601 timestamp of the crash-detect sweep that flipped this row to
|
|
4436
4444
|
* `endedReason:"crashed"`. Absent for every other terminal path. */
|
|
4437
4445
|
crashedAt?: string;
|
|
@@ -4533,6 +4541,17 @@ interface SessionDescriptor {
|
|
|
4533
4541
|
* turn end (normal or abnormal); absent when the turn ended with no
|
|
4534
4542
|
* reason to report. */
|
|
4535
4543
|
lastTurnReason?: string;
|
|
4544
|
+
/** Device-spawn only: true when this session's FIRST turn ended errored or
|
|
4545
|
+
* EMPTY — the field-observed shape where a `device:<fp>` spawn lands on a
|
|
4546
|
+
* host whose adapter rejects the model id and the turn completes with no
|
|
4547
|
+
* assistant output, leaving the controller a healthy-looking `running`
|
|
4548
|
+
* session. Stamped at the first turn-end (`runAgentTurn`) for a remote
|
|
4549
|
+
* session whose `sandboxProvider` is in the `device:` family; the raw
|
|
4550
|
+
* host-side error line is surfaced separately as a `notice` (see
|
|
4551
|
+
* `sandbox-agent-session-proxy.ts`'s `surfaceHostTurnErrors`). Absent for
|
|
4552
|
+
* local/e2b/Box sessions and for a device whose first turn was
|
|
4553
|
+
* productive. */
|
|
4554
|
+
firstTurnFailed?: boolean;
|
|
4536
4555
|
/** DERIVED, read-time only (never persisted — stripped by `snapshotRows`,
|
|
4537
4556
|
* stamped by `stampInterrupted` in list()/get()/findByIdOrName). True when
|
|
4538
4557
|
* this session died with a turn in flight under a daemon restart —
|
|
@@ -5301,6 +5320,27 @@ interface SessionDescriptor {
|
|
|
5301
5320
|
remote?: boolean;
|
|
5302
5321
|
/** Provider-assigned sandbox id (`BootedSandbox.sandboxId`), when `remote` is true. */
|
|
5303
5322
|
sandboxId?: string;
|
|
5323
|
+
/**
|
|
5324
|
+
* BOOTSTRAP P7a — for a `device:<fp|name>` sandbox spawn: the id of the
|
|
5325
|
+
* session the HOST's own daemon created (`BootedSandbox`'s inner
|
|
5326
|
+
* `agent_start` descriptor.id, i.e. the sandbox proxy's `sessionId`). The
|
|
5327
|
+
* conversation with the remote device lives THERE, not under this
|
|
5328
|
+
* descriptor's id — `device_prompt` and the read paths use this to bridge
|
|
5329
|
+
* the twin daemons (issue #1637: a controller "sess_305be17c" vs host
|
|
5330
|
+
* "sess_cf318f00"). Absent for a local/cloud spawn, or when the host
|
|
5331
|
+
* failed to return a usable id at spawn time. Persisted via the same
|
|
5332
|
+
* descriptor spread as every other field.
|
|
5333
|
+
*/
|
|
5334
|
+
hostSessionId?: string;
|
|
5335
|
+
/**
|
|
5336
|
+
* BOOTSTRAP P7a — for a `device:<fp|name>` sandbox spawn: the paired
|
|
5337
|
+
* host's identity as pinned by the spawn's own sandbox spec, resolved by
|
|
5338
|
+
* the device provider to the REAL fingerprint when it can (a saved
|
|
5339
|
+
* fallback keeps the raw `fp-or-name` target — every consumer matches
|
|
5340
|
+
* `HostRegistry.forwardHttp`'s `fingerprint OR name`). Only meaningful
|
|
5341
|
+
* alongside {@link hostSessionId}; absent for every other spawn.
|
|
5342
|
+
*/
|
|
5343
|
+
hostFingerprint?: string;
|
|
5304
5344
|
/** Sandbox provider slug (`agent_start.sandbox`'s provider, e.g. `"e2b"`,
|
|
5305
5345
|
* `"local"`), when `remote` is true. Identifies WHERE the box lives, not
|
|
5306
5346
|
* just THAT one exists — the VS Code panel's sandbox chip names it in its
|
|
@@ -5459,6 +5499,10 @@ interface SessionSummary {
|
|
|
5459
5499
|
browserLocation?: "local" | "cloud";
|
|
5460
5500
|
remote?: boolean;
|
|
5461
5501
|
sandboxId?: string;
|
|
5502
|
+
/** Device-sandbox identity mapping — see `SessionDescriptor.hostSessionId`. */
|
|
5503
|
+
hostSessionId?: string;
|
|
5504
|
+
/** Device-sandbox identity mapping — see `SessionDescriptor.hostFingerprint`. */
|
|
5505
|
+
hostFingerprint?: string;
|
|
5462
5506
|
sandboxTeardown?: "kill" | "pause";
|
|
5463
5507
|
sandboxPorts?: Record<number, string>;
|
|
5464
5508
|
appServe?: SessionAppServeInfo;
|
|
@@ -6448,6 +6492,33 @@ interface SessionsRegistry {
|
|
|
6448
6492
|
* one. Returns false (no-op) for an unknown id or a non-`agent-cli`
|
|
6449
6493
|
* session. */
|
|
6450
6494
|
recordNotice(id: string, text: string): boolean;
|
|
6495
|
+
/**
|
|
6496
|
+
* BOOTSTRAP P7b — append pre-shaped MIRROR records (from
|
|
6497
|
+
* `device-mirror.ts`) into an agent-cli session's durable transcript.
|
|
6498
|
+
* Each record already carries its own `kind` + `origin: "device"` +
|
|
6499
|
+
* `hostSeq` fields; this assigns the controller-local `seq`/`ts` the
|
|
6500
|
+
* session's own writer would (`recordMirrorEvents`), in file order.
|
|
6501
|
+
* Deliberately BYPASSES `recordEvent`'s kind/coalescing logic — a mirror
|
|
6502
|
+
* replay must be byte-faithful to what was computed, never re-shaped or
|
|
6503
|
+
* debounced. Returns the number of records written; 0 for an unknown id,
|
|
6504
|
+
* a non-`agent-cli` session, or a session that is not device-mirrored at
|
|
6505
|
+
* all (the caller checked, but double-checks here to keep a local session's
|
|
6506
|
+
* transcript mirror-free even on a stale caller).
|
|
6507
|
+
*/
|
|
6508
|
+
appendDeviceMirrorRecords(id: string, records: readonly Record<string, unknown>[]): number;
|
|
6509
|
+
/**
|
|
6510
|
+
* Scan the same transcript `appendDeviceMirrorRecords` writes, computed
|
|
6511
|
+
* against the registry's OWN transcript base dir (the mirror reader
|
|
6512
|
+
* `device-mirror.ts` must never re-derive the path). Returns the mirror
|
|
6513
|
+
* cursor (max `hostSeq` among `origin: "device"` records — 0 when this
|
|
6514
|
+
* session has never been mirrored) and the ordered controller-local
|
|
6515
|
+
* user-prompt texts (kind `user-prompt`, NOT device-tagged) the seed walk
|
|
6516
|
+
* matches against the host transcript. File absent/empty ⇒ all empty.
|
|
6517
|
+
*/
|
|
6518
|
+
scanDeviceMirrorState(id: string): {
|
|
6519
|
+
cursor: number;
|
|
6520
|
+
localPromptTexts: readonly string[];
|
|
6521
|
+
};
|
|
6451
6522
|
/** List permission requests currently parked in the pending-permissions
|
|
6452
6523
|
* inbox across all permission-hold sessions, newest last. Optionally
|
|
6453
6524
|
* filtered to one session. */
|
|
@@ -6665,6 +6736,15 @@ interface SpawnAgentInput {
|
|
|
6665
6736
|
remote?: boolean;
|
|
6666
6737
|
/** Provider-assigned sandbox id, when `remote` is true. */
|
|
6667
6738
|
sandboxId?: string;
|
|
6739
|
+
/** Device-sandbox identity mapping (BOOTSTRAP P7a) — the HOST session id
|
|
6740
|
+
* the device provider's inner `agent_start` created; stamped onto
|
|
6741
|
+
* {@link SessionDescriptor.hostSessionId}. Omit for every non-device
|
|
6742
|
+
* spawn (or when the host returned no usable id). */
|
|
6743
|
+
hostSessionId?: string;
|
|
6744
|
+
/** Device-sandbox identity mapping (BOOTSTRAP P7a) — the paired host's
|
|
6745
|
+
* fingerprint (or the raw `device:<…>` target when the provider couldn't
|
|
6746
|
+
* resolve one); stamped onto {@link SessionDescriptor.hostFingerprint}. */
|
|
6747
|
+
hostFingerprint?: string;
|
|
6668
6748
|
/** Sandbox provider slug, when `remote` is true — see
|
|
6669
6749
|
* `SessionDescriptor.sandboxProvider`. */
|
|
6670
6750
|
sandboxProvider?: string;
|
package/dist/user-presets.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'zod';
|
|
2
2
|
import './session-config-DxIIuJFY.js';
|
|
3
3
|
import './spawn-defaults-Cp9SGZex.js';
|
|
4
|
-
export { c5 as RecentSpawnConfig, U as UserPreset, b8 as UserPresetsFile, bp as deleteUserPreset, c6 as deriveRecentSpawnConfigs, bw as getUserPreset, bC as listUserPresets, bE as loadUserPresets, c0 as saveUserPreset, c7 as touchUserPreset, c8 as userPresetSchema, c3 as userPresetsPath } from './sessions-
|
|
4
|
+
export { c5 as RecentSpawnConfig, U as UserPreset, b8 as UserPresetsFile, bp as deleteUserPreset, c6 as deriveRecentSpawnConfigs, bw as getUserPreset, bC as listUserPresets, bE as loadUserPresets, c0 as saveUserPreset, c7 as touchUserPreset, c8 as userPresetSchema, c3 as userPresetsPath } from './sessions-SrISpFsH.js';
|
|
5
5
|
import '@agentproto/auth';
|
|
6
6
|
import '@agentproto/acp';
|
|
7
7
|
import '@agentproto/command-sandbox';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentproto/runtime",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.0",
|
|
4
4
|
"description": "@agentproto/runtime — long-running gateway that turns an agentproto workspace into a live runtime. Composes @agentproto/mcp-server (CRUD verbs) with HTTP transport, HEARTBEAT.md autonomy loop, and append-only conversation persistence. Drop a workspace dir, point your MCP client at it, and the agent ticks on its own.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentproto",
|
|
@@ -167,11 +167,11 @@
|
|
|
167
167
|
"@agentproto/agent": "0.2.5",
|
|
168
168
|
"@agentproto/app-client": "0.4.1",
|
|
169
169
|
"@agentproto/app-kit": "1.5.0",
|
|
170
|
-
"@agentproto/apps": "0.
|
|
170
|
+
"@agentproto/apps": "0.18.0",
|
|
171
171
|
"@agentproto/auth": "1.1.2",
|
|
172
|
-
"@agentproto/driver": "0.3.0",
|
|
173
172
|
"@agentproto/command-sandbox": "0.3.0",
|
|
174
|
-
"@agentproto/driver
|
|
173
|
+
"@agentproto/driver": "0.3.0",
|
|
174
|
+
"@agentproto/driver-agent-cli": "2.7.0",
|
|
175
175
|
"@agentproto/driver-browser": "0.2.0",
|
|
176
176
|
"@agentproto/driver-http": "0.1.10",
|
|
177
177
|
"@agentproto/eval-reporters": "0.2.20",
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
"@agentproto/governance-engine": "0.1.10",
|
|
180
180
|
"@agentproto/llm-endpoint": "0.11.3",
|
|
181
181
|
"@agentproto/manifest": "0.2.3",
|
|
182
|
-
"@agentproto/mcp-server": "0.
|
|
182
|
+
"@agentproto/mcp-server": "0.5.0",
|
|
183
183
|
"@agentproto/model-catalog": "0.11.3",
|
|
184
184
|
"@agentproto/pairing-host": "0.2.2",
|
|
185
185
|
"@agentproto/plugin-local-browser": "0.3.2",
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"@agentproto/redaction": "0.2.3",
|
|
190
190
|
"@agentproto/review": "0.4.0",
|
|
191
191
|
"@agentproto/routine": "0.3.1",
|
|
192
|
-
"@agentproto/sandbox": "0.
|
|
192
|
+
"@agentproto/sandbox": "0.8.1",
|
|
193
193
|
"@agentproto/secrets": "1.2.1",
|
|
194
194
|
"@agentproto/telemetry-langfuse": "0.2.18",
|
|
195
195
|
"@agentproto/tool": "0.4.0",
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
"@agentproto/workspace-brain": "0.4.10"
|
|
200
200
|
},
|
|
201
201
|
"optionalDependencies": {
|
|
202
|
-
"@agentproto/sandbox-e2b": "0.5.
|
|
202
|
+
"@agentproto/sandbox-e2b": "0.5.13"
|
|
203
203
|
},
|
|
204
204
|
"devDependencies": {
|
|
205
205
|
"@types/node": "^25.9.5",
|