@agentproto/driver-agent-cli 2.7.0 → 2.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/{chunk-D4NQQ2C7.mjs → chunk-E45SX7GU.mjs} +118 -12
- package/dist/chunk-E45SX7GU.mjs.map +1 -0
- package/dist/index.d.ts +10 -3
- package/dist/index.mjs +1 -1
- package/dist/manifest/index.d.ts +2 -2
- package/dist/manifest/index.mjs +2 -2
- package/dist/{schema-lciWmbTG.d.ts → schema-DafVng6S.d.ts} +73 -0
- package/package.json +2 -2
- package/dist/chunk-D4NQQ2C7.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AgentCliHandle, a as AgentCliRuntime, b as AgentCliDefinition, c as AgentCliRuntimeSession, d as AgentCliClient, S as SetModelResult, e as AgentCliPrintConfig, R as RuntimeConfig, C as ContinuationStrategyId, f as AgentCliStartOptions, T as TurnContext, g as ContinuationKeyScope } from './schema-
|
|
2
|
-
export { h as AgentCliAuth, i as AgentCliCapabilities, j as AgentCliConnectOptions, k as AgentCliContinuation, l as AgentCliFrontmatter, m as AgentCliFsZones, n as AgentCliInstallMethod, o as AgentCliMcpBlock, p as AgentCliMode, q as AgentCliModelEntry, r as AgentCliModels, s as AgentCliOption, t as AgentCliOptionType, u as AgentCliPinnedSessionTuning, v as AgentCliPresetDeclaration, w as AgentCliProtocol, x as AgentCliRouteSelection, y as AgentCliSession, z as AgentCliSessionMode, B as AgentCliSetupPersist, D as AgentCliSetupSkipIf, E as AgentCliSetupStep, F as AgentCliVersionCheck, G as RuntimeConfigInput, H as SetEffortResult, I as SetSessionModeResult, J as SteerOutcome, K as agentCliFrontmatterSchema, L as runtimeConfigSchema } from './schema-
|
|
1
|
+
import { A as AgentCliHandle, a as AgentCliRuntime, b as AgentCliDefinition, c as AgentCliRuntimeSession, d as AgentCliClient, S as SetModelResult, e as AgentCliPrintConfig, R as RuntimeConfig, C as ContinuationStrategyId, f as AgentCliStartOptions, T as TurnContext, g as ContinuationKeyScope } from './schema-DafVng6S.js';
|
|
2
|
+
export { h as AgentCliAuth, i as AgentCliCapabilities, j as AgentCliConnectOptions, k as AgentCliContinuation, l as AgentCliFrontmatter, m as AgentCliFsZones, n as AgentCliInstallMethod, o as AgentCliMcpBlock, p as AgentCliMode, q as AgentCliModelEntry, r as AgentCliModels, s as AgentCliOption, t as AgentCliOptionType, u as AgentCliPinnedSessionTuning, v as AgentCliPresetDeclaration, w as AgentCliProtocol, x as AgentCliRouteSelection, y as AgentCliSession, z as AgentCliSessionMode, B as AgentCliSetupPersist, D as AgentCliSetupSkipIf, E as AgentCliSetupStep, F as AgentCliVersionCheck, G as RuntimeConfigInput, H as SetEffortResult, I as SetSessionModeResult, J as SteerOutcome, K as agentCliFrontmatterSchema, L as runtimeConfigSchema } from './schema-DafVng6S.js';
|
|
3
3
|
import { StreamEvent, AcpMcpServer } from '@agentproto/acp';
|
|
4
4
|
export { StreamEvent } from '@agentproto/acp';
|
|
5
5
|
import { ChildProcess } from 'node:child_process';
|
|
@@ -84,8 +84,15 @@ declare function applyModelCommand(arm: AgentCliClient, modelId: string): Promis
|
|
|
84
84
|
* almost always has a more useful line ("npx claude-agent-acp: not
|
|
85
85
|
* authenticated, run `claude login`"). Hosts read `error.data` when
|
|
86
86
|
* present, falling back to `message` for older payloads.
|
|
87
|
+
*
|
|
88
|
+
* When `stderrTurnError` is supplied, a line it parses into a message
|
|
89
|
+
* (see {@link parseStderrStreamError}) is surfaced as THIS turn's error:
|
|
90
|
+
* the turn is cancelled and ended with `reason:"error"` instead of hanging
|
|
91
|
+
* forever on a `prompt` the server never resolves. Only armed for adapters
|
|
92
|
+
* whose transport retries silently (opencode); every other adapter keeps
|
|
93
|
+
* the exact prior behavior.
|
|
87
94
|
*/
|
|
88
|
-
declare function promptTurn(arm: AgentCliClient, turnId: string, message: unknown): AsyncIterable<StreamEvent>;
|
|
95
|
+
declare function promptTurn(arm: AgentCliClient, turnId: string, message: unknown, stderrTurnError?: (line: string) => string | undefined): AsyncIterable<StreamEvent>;
|
|
89
96
|
|
|
90
97
|
/**
|
|
91
98
|
* Agent CLI as a model port — turn ANY AIP-45 agent CLI runtime into a generic
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { LEGACY_GATEWAY_MODE_IDS, LEGACY_POSTURE_MODE_IDS, RuntimeConfigError, agentCliFrontmatterSchema, agentCliSupportsHostContextIsolation, applyModelCommand, autoAllowPermissionHandler, composeSpawn, createAcpProtocolArm, createAgentCliRuntime, createArmSessionControls, createJcodeMapperState, createMastraMapperState, createPrintSession, createProprietaryProtocolArm, defineAgentCli, hostContextExcludes, inferLegacyModeKind, isLegacyExtractedModeId, isModelSwitchAcknowledgement, mapJcodeEvent, mapMastraEvent, parseModelSwitchCommand, planModePermissionHandler, promptTurn, resolveContinuationStrategy, runtimeConfigSchema, toFileBasedMcpServers } from './chunk-
|
|
1
|
+
export { LEGACY_GATEWAY_MODE_IDS, LEGACY_POSTURE_MODE_IDS, RuntimeConfigError, agentCliFrontmatterSchema, agentCliSupportsHostContextIsolation, applyModelCommand, autoAllowPermissionHandler, composeSpawn, createAcpProtocolArm, createAgentCliRuntime, createArmSessionControls, createJcodeMapperState, createMastraMapperState, createPrintSession, createProprietaryProtocolArm, defineAgentCli, hostContextExcludes, inferLegacyModeKind, isLegacyExtractedModeId, isModelSwitchAcknowledgement, mapJcodeEvent, mapMastraEvent, parseModelSwitchCommand, planModePermissionHandler, promptTurn, resolveContinuationStrategy, runtimeConfigSchema, toFileBasedMcpServers } from './chunk-E45SX7GU.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @agentproto/driver-agent-cli v0.1.0-alpha
|
package/dist/manifest/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as AgentCliFrontmatter, A as AgentCliHandle } from '../schema-
|
|
2
|
-
export { K as agentCliFrontmatterSchema } from '../schema-
|
|
1
|
+
import { l as AgentCliFrontmatter, A as AgentCliHandle } from '../schema-DafVng6S.js';
|
|
2
|
+
export { K as agentCliFrontmatterSchema } from '../schema-DafVng6S.js';
|
|
3
3
|
import '@agentproto/acp';
|
|
4
4
|
import '@agentproto/acp/client';
|
|
5
5
|
import '@agentproto/command-sandbox';
|
package/dist/manifest/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { agentCliFrontmatterSchema, defineAgentCli } from '../chunk-
|
|
2
|
-
export { agentCliFrontmatterSchema } from '../chunk-
|
|
1
|
+
import { agentCliFrontmatterSchema, defineAgentCli } from '../chunk-E45SX7GU.mjs';
|
|
2
|
+
export { agentCliFrontmatterSchema } from '../chunk-E45SX7GU.mjs';
|
|
3
3
|
import matter from 'gray-matter';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -321,6 +321,17 @@ interface AgentCliCapabilities {
|
|
|
321
321
|
* session id is not a native TUI resume. Default false.
|
|
322
322
|
*/
|
|
323
323
|
nativeTerminalResume?: boolean;
|
|
324
|
+
/**
|
|
325
|
+
* The harness itself defers mounted MCP tool schemas behind its own
|
|
326
|
+
* on-demand search tool (e.g. Claude Code's `ToolSearch`), so it never
|
|
327
|
+
* pays the full turn-0 `tools/list` payload of a large MCP server. The
|
|
328
|
+
* daemon uses this to default its own `/mcp` self-mount to EAGER for the
|
|
329
|
+
* session instead of stacking a second deferral layer (`tool_search`) on
|
|
330
|
+
* top, where a tool hidden by the daemon is invisible to the harness's
|
|
331
|
+
* native search. Declare it only when verified for the harness's default
|
|
332
|
+
* configuration; absent/false ⇒ the role / daemon default applies.
|
|
333
|
+
*/
|
|
334
|
+
nativeToolSearch?: boolean;
|
|
324
335
|
}
|
|
325
336
|
/**
|
|
326
337
|
* Support status for a declared mode. Absent ⇒ treated as `"active"`.
|
|
@@ -1040,6 +1051,29 @@ interface AgentCliClient {
|
|
|
1040
1051
|
* session concept (proprietary one-shots).
|
|
1041
1052
|
*/
|
|
1042
1053
|
readonly sessionId?: string;
|
|
1054
|
+
/**
|
|
1055
|
+
* Whether this arm's transport to the agent is still usable — a FRESH
|
|
1056
|
+
* read, never a cached flag (the ACP arm asks the SDK connection's own
|
|
1057
|
+
* abort signal). `true` before `connect()` resolves: nothing has died
|
|
1058
|
+
* yet, so "not connected" would be a lie.
|
|
1059
|
+
*
|
|
1060
|
+
* Only the ACP arm implements this; arms with no long-lived connection
|
|
1061
|
+
* (print — a fresh subprocess per turn; proprietary in-process) omit it,
|
|
1062
|
+
* and every caller treats absence as "no transport to lose."
|
|
1063
|
+
*/
|
|
1064
|
+
isConnected?(): boolean;
|
|
1065
|
+
/**
|
|
1066
|
+
* Subscribe to transport death — the push half of the liveness surface
|
|
1067
|
+
* whose pull half is {@link isConnected}. Fires at most once, and fires
|
|
1068
|
+
* synchronously if the transport is ALREADY gone when you subscribe, so a
|
|
1069
|
+
* host that only gets the handle after `connect()` can never miss it.
|
|
1070
|
+
*
|
|
1071
|
+
* Only the ACP arm implements this; arms with no long-lived connection
|
|
1072
|
+
* omit it (there is no transport to lose). Also fires on an orderly
|
|
1073
|
+
* `close()` — the "was this death expected?" judgement belongs to the
|
|
1074
|
+
* host, which knows whether it asked for the teardown.
|
|
1075
|
+
*/
|
|
1076
|
+
onDisconnect?(listener: (err: Error) => void): void;
|
|
1043
1077
|
/**
|
|
1044
1078
|
* Diagnostic hook — returns the last N lines of the child's stderr,
|
|
1045
1079
|
* joined with newlines. Set by the runner after spawn; read by
|
|
@@ -1047,6 +1081,16 @@ interface AgentCliClient {
|
|
|
1047
1081
|
* Not part of the protocol; internal to the runner.
|
|
1048
1082
|
*/
|
|
1049
1083
|
_stderrTail?: () => string;
|
|
1084
|
+
/**
|
|
1085
|
+
* Live stderr subscription — the push half of {@link _stderrTail}. Set by
|
|
1086
|
+
* the runner after spawn; `promptTurn` subscribes for the duration of a
|
|
1087
|
+
* turn to surface provider errors that exist ONLY on stderr. Some ACP
|
|
1088
|
+
* servers (opencode) treat a provider 429/usage-cap as retryable and loop
|
|
1089
|
+
* internally, logging the reason to stderr while `session/prompt` never
|
|
1090
|
+
* resolves — the stderr line is the only evidence. Returns an unsubscribe
|
|
1091
|
+
* function. Not part of the protocol; internal to the runner.
|
|
1092
|
+
*/
|
|
1093
|
+
_onStderrLine?: (listener: (line: string) => void) => () => void;
|
|
1050
1094
|
}
|
|
1051
1095
|
/**
|
|
1052
1096
|
* The runtime handle returned by `defineAgentCli` — call `.start()`
|
|
@@ -1320,6 +1364,34 @@ interface AgentCliRuntimeSession {
|
|
|
1320
1364
|
* WebSocket transport).
|
|
1321
1365
|
*/
|
|
1322
1366
|
readonly pid?: number;
|
|
1367
|
+
/**
|
|
1368
|
+
* Whether the adapter's transport is still usable, read FRESH at call
|
|
1369
|
+
* time. The pull half of the transport-liveness surface (the push half is
|
|
1370
|
+
* {@link AgentCliStartOptions.onDisconnect}) and the answer to a question
|
|
1371
|
+
* `pid` cannot: the wrapper process can be alive and reported by
|
|
1372
|
+
* `process.kill(pid, 0)` while its stdio JSON-RPC stream is closed, at
|
|
1373
|
+
* which point every RPC rejects with "ACP connection closed" and the
|
|
1374
|
+
* session is dead in every way that matters.
|
|
1375
|
+
*
|
|
1376
|
+
* `true` before anything has died, and for arms that hold no long-lived
|
|
1377
|
+
* connection at all (the print arm re-spawns per turn — there is no
|
|
1378
|
+
* transport to lose between turns). A host must therefore treat only an
|
|
1379
|
+
* explicit `false` as evidence of death, never the absence of `true`.
|
|
1380
|
+
*/
|
|
1381
|
+
isConnected?(): boolean;
|
|
1382
|
+
/**
|
|
1383
|
+
* Subscribe to transport death — the push half of the surface whose pull
|
|
1384
|
+
* half is {@link isConnected}. Fires at most once, and SYNCHRONOUSLY if
|
|
1385
|
+
* the transport already died before you subscribed, so a host that wires
|
|
1386
|
+
* this up after `start()` resolves cannot miss a connection that failed in
|
|
1387
|
+
* between.
|
|
1388
|
+
*
|
|
1389
|
+
* Fires for an orderly `close()` too: only the host knows whether it asked
|
|
1390
|
+
* for the teardown, so the "was this expected?" judgement stays there (the
|
|
1391
|
+
* daemon makes it by refusing to crash-mark a row that isn't `running`).
|
|
1392
|
+
* Absent for arms with no long-lived connection.
|
|
1393
|
+
*/
|
|
1394
|
+
onDisconnect?(listener: (err: Error) => void): void;
|
|
1323
1395
|
send(message: unknown): AsyncIterable<StreamEvent>;
|
|
1324
1396
|
cancel(): Promise<void>;
|
|
1325
1397
|
/**
|
|
@@ -1700,6 +1772,7 @@ declare const agentCliFrontmatterSchema: z.ZodObject<{
|
|
|
1700
1772
|
resumable: z.ZodOptional<z.ZodBoolean>;
|
|
1701
1773
|
bidirectional: z.ZodOptional<z.ZodBoolean>;
|
|
1702
1774
|
nativeTerminalResume: z.ZodOptional<z.ZodBoolean>;
|
|
1775
|
+
nativeToolSearch: z.ZodOptional<z.ZodBoolean>;
|
|
1703
1776
|
file_attach: z.ZodOptional<z.ZodBoolean>;
|
|
1704
1777
|
}, z.core.$strict>>;
|
|
1705
1778
|
modes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentproto/driver-agent-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "@agentproto/driver-agent-cli — AIP-45 AGENT-CLI.md reference implementation. Multi-protocol runner that loads an AGENT-CLI.md manifest, spawns the binary, and dispatches turns through an ACP / MCP / proprietary arm. ACP arm delegates to @agentproto/acp; emits the canonical StreamEvent taxonomy regardless of underlying protocol.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentproto",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"gray-matter": "^4.0.3",
|
|
55
55
|
"zod": "^4.6.5",
|
|
56
|
-
"@agentproto/acp": "0.
|
|
56
|
+
"@agentproto/acp": "0.10.0",
|
|
57
57
|
"@agentproto/command-sandbox": "0.3.0",
|
|
58
58
|
"@agentproto/define-doctype": "0.1.3"
|
|
59
59
|
},
|