@agentproto/runtime 3.6.1 → 4.0.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/README.md +7 -3
- package/dist/app-ui-delivery.d.ts +75 -0
- package/dist/app-ui-delivery.mjs +144 -0
- package/dist/app-ui-delivery.mjs.map +1 -0
- package/dist/catalog-models.d.ts +5 -3
- package/dist/catalog-models.mjs.map +1 -1
- package/dist/config-schema.d.ts +134 -0
- package/dist/config-schema.mjs +3687 -0
- package/dist/config-schema.mjs.map +1 -0
- package/dist/config.d.ts +10 -2
- package/dist/config.mjs +3605 -4
- package/dist/config.mjs.map +1 -1
- package/dist/{context-continuity-ib9_bVYM.d.ts → context-continuity-Bn99UtVC.d.ts} +40 -1
- package/dist/{heartbeat-COGpMrJS.d.ts → heartbeat-BJtxbDb9.d.ts} +13 -1
- package/dist/heartbeat.d.ts +1 -1
- package/dist/index.d.ts +2194 -118
- package/dist/index.mjs +15283 -7041
- package/dist/index.mjs.map +1 -1
- package/dist/mcp-imports.d.ts +2 -1
- package/dist/resume-strategies.mjs +20 -1
- package/dist/resume-strategies.mjs.map +1 -1
- package/dist/{session-config-DbWP9RRj.d.ts → session-config-ByfVeEQJ.d.ts} +1 -1
- package/dist/session-presence.mjs +3603 -6
- package/dist/session-presence.mjs.map +1 -1
- package/dist/session-story.d.ts +10 -0
- package/dist/{spawn-defaults-CwI9Puwy.d.ts → spawn-defaults-CZj39Znq.d.ts} +146 -2
- package/dist/user-presets.d.ts +8 -2
- package/dist/user-presets.mjs +2 -1
- package/dist/user-presets.mjs.map +1 -1
- package/package.json +36 -23
|
@@ -1,3 +1,42 @@
|
|
|
1
|
+
import { AcpMcpServer } from '@agentproto/acp';
|
|
2
|
+
import { SandboxMode } from '@agentproto/command-sandbox';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `agent_start({ browser: "headless" })` — an isolated headless Chrome for
|
|
6
|
+
* one spawned agent, mounted as a per-session stdio MCP server
|
|
7
|
+
* (`chrome-devtools-mcp --headless --isolated`, see
|
|
8
|
+
* `@agentproto/plugin-local-browser`'s `buildHeadlessBrowserMcpEntry`).
|
|
9
|
+
*
|
|
10
|
+
* The server is a child of the adapter process, so it inherits the session's
|
|
11
|
+
* `commandSandbox` confinement and normally dies with the adapter (stdin EOF,
|
|
12
|
+
* and Chrome exits when its pipe closes). On `session:exited`,
|
|
13
|
+
* `sweepSessionBrowser` does two things:
|
|
14
|
+
* - kills anything still carrying the session's `--agentproto-session=<id>`
|
|
15
|
+
* Chrome marker, in case an adapter never exited or never closed its MCP
|
|
16
|
+
* children;
|
|
17
|
+
* - deletes the session's profile dir, `$TMPDIR/agentproto-browser/<id>`.
|
|
18
|
+
* The profile is caller-owned rather than `--isolated`, because `--isolated`
|
|
19
|
+
* only cleans up on a graceful `browser.close()`; observed live, a killed
|
|
20
|
+
* session left its puppeteer temp profile behind.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/** `agent_start.browser`. `false` (the default) mounts nothing. */
|
|
24
|
+
type SpawnBrowserMode = "headless" | false;
|
|
25
|
+
interface HeadlessBrowserMount {
|
|
26
|
+
entry: AcpMcpServer;
|
|
27
|
+
/** Read grants the adapter's `commandSandbox` needs for the MCP server +
|
|
28
|
+
* Chrome (threaded as `additionalReadPaths`). */
|
|
29
|
+
readPaths: string[];
|
|
30
|
+
}
|
|
31
|
+
interface ResolveHeadlessBrowserInput {
|
|
32
|
+
sessionId: string;
|
|
33
|
+
cwd: string;
|
|
34
|
+
/** The spawn's explicit `commandSandbox`; `undefined` falls back to the
|
|
35
|
+
* workspace's `adapterSpawn` config, like the driver does. */
|
|
36
|
+
commandSandbox?: SandboxMode;
|
|
37
|
+
}
|
|
38
|
+
type ResolveHeadlessBrowser = (input: ResolveHeadlessBrowserInput) => Promise<HeadlessBrowserMount>;
|
|
39
|
+
|
|
1
40
|
/**
|
|
2
41
|
* Canonical context-continuity policy for long-running agent sessions.
|
|
3
42
|
*
|
|
@@ -62,4 +101,4 @@ interface ResolvedContextContinuityPolicy extends ContextContinuityThresholds, R
|
|
|
62
101
|
label: string;
|
|
63
102
|
}
|
|
64
103
|
|
|
65
|
-
export type { ContextContinuityPolicy as C,
|
|
104
|
+
export type { ContextContinuityPolicy as C, ResolveHeadlessBrowser as R, SpawnBrowserMode as S, ResolvedContextContinuityPolicy as a };
|
|
@@ -47,7 +47,19 @@ interface RemoteLogEvent {
|
|
|
47
47
|
at: string;
|
|
48
48
|
line: string;
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
/**
|
|
51
|
+
* Fired once per successful `config_set` / `PATCH /config` write to
|
|
52
|
+
* `~/.agentproto/config.json` (config-tools.ts). Never carries a secret
|
|
53
|
+
* key's value — only the dotted path(s) touched and whether the change
|
|
54
|
+
* takes effect immediately or needs a restart.
|
|
55
|
+
*/
|
|
56
|
+
interface ConfigChangedEvent {
|
|
57
|
+
type: "config:changed";
|
|
58
|
+
at: string;
|
|
59
|
+
keys: string[];
|
|
60
|
+
applied: "hot" | "restart-required";
|
|
61
|
+
}
|
|
62
|
+
type RuntimeEvent = BootEvent | HeartbeatFiredEvent | HeartbeatErrorEvent | ConvTurnEvent | RemoteLogEvent | ConfigChangedEvent;
|
|
51
63
|
interface RuntimeEvents {
|
|
52
64
|
on<E extends RuntimeEvent["type"]>(type: E, handler: (ev: Extract<RuntimeEvent, {
|
|
53
65
|
type: E;
|
package/dist/heartbeat.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import './conversations.js';
|
|
2
|
-
export { B as BuildHeartbeatAgent, H as HeartbeatAgent, a as HeartbeatRunner, c as HeartbeatRunnerOptions, p as parseDuration, s as startHeartbeat } from './heartbeat-
|
|
2
|
+
export { B as BuildHeartbeatAgent, H as HeartbeatAgent, a as HeartbeatRunner, c as HeartbeatRunnerOptions, p as parseDuration, s as startHeartbeat } from './heartbeat-BJtxbDb9.js';
|