@1agents/acp-service 0.10.1 → 0.10.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/src/a2a/index.d.ts +1 -1
- package/dist/src/a2a/index.js +1 -1
- package/dist/src/a2a/lease.d.ts +2 -0
- package/dist/src/a2a/lease.js +3 -0
- package/dist/src/a2a/server.d.ts +6 -0
- package/dist/src/a2a/server.js +13 -12
- package/dist/src/a2a/store.d.ts +9 -2
- package/dist/src/a2a/store.js +37 -11
- package/package.json +1 -1
- package/vendor/dsh/README.md +1 -1
- package/vendor/dsh/a2a-executor.d.ts +2 -2
- package/vendor/dsh/a2a.d.ts +2 -2
- package/vendor/dsh/a2a.js +4 -1
- package/vendor/dsh/adapter.d.ts +2 -2
- package/vendor/dsh/diagnostics.d.ts +14 -2
- package/vendor/dsh/diagnostics.js +79 -4
- package/vendor/dsh/index.js +3 -1
- package/vendor/runtime/dist/{cli-DXmYwv3U.js → cli-Cy5XbWX9.js} +4 -4
- package/vendor/runtime/dist/{cli-DXmYwv3U.js.map → cli-Cy5XbWX9.js.map} +1 -1
- package/vendor/runtime/dist/cli.js +7 -7
- package/vendor/runtime/dist/{client-VQsqcIOJ.d.ts → client-C5zneoBs.d.ts} +3 -1
- package/vendor/runtime/dist/{client-VQsqcIOJ.d.ts.map → client-C5zneoBs.d.ts.map} +1 -1
- package/vendor/runtime/dist/{flows-DJ17ajbw.js → flows-q0phAwvh.js} +3 -3
- package/vendor/runtime/dist/{flows-DJ17ajbw.js.map → flows-q0phAwvh.js.map} +1 -1
- package/vendor/runtime/dist/flows.d.ts +1 -1
- package/vendor/runtime/dist/flows.js +1 -1
- package/vendor/runtime/dist/{invocation-options-PBfCgrdi.js → invocation-options-BxtrhRYT.js} +3 -3
- package/vendor/runtime/dist/{invocation-options-PBfCgrdi.js.map → invocation-options-BxtrhRYT.js.map} +1 -1
- package/vendor/runtime/dist/{output-B3MDn7kv.js → output-BiOUhKGO.js} +2 -2
- package/vendor/runtime/dist/{output-B3MDn7kv.js.map → output-BiOUhKGO.js.map} +1 -1
- package/vendor/runtime/dist/{queue-owner-runtime-DXCVngwU.js → queue-owner-runtime-CJwEW-f-.js} +10 -1
- package/vendor/runtime/dist/queue-owner-runtime-CJwEW-f-.js.map +1 -0
- package/vendor/runtime/dist/runtime.d.ts +1 -1
- package/vendor/runtime/dist/runtime.js +1 -1
- package/vendor/runtime/dist/{session-watch-DURyCw31.js → session-watch-kRtST0Y5.js} +2 -2
- package/vendor/runtime/dist/{session-watch-DURyCw31.js.map → session-watch-kRtST0Y5.js.map} +1 -1
- package/vendor/runtime/skills/acpx/SKILL.md +3 -1
- package/vendor/runtime/dist/queue-owner-runtime-DXCVngwU.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AcpAgentInspection, AcpAgentInspectionOptions, AcpAgentRegistry, AcpInspectableAgentRegistry, DEFAULT_AGENT_NAME, createAgentRegistry } from "./agent-registry.js";
|
|
2
2
|
import { A as GrokExitPlanModeRequest, C as PermissionPolicy, D as SafeErrorOrigin, E as SafeErrorCategory, F as GrokAskUserQuestionResponse, M as GrokExitPlanOutcome, N as GrokAskUserAnswers, O as SessionRecord, P as GrokAskUserQuestionRequest, S as PermissionMode, T as SafeError, _ as AcpProcessSpawnFailure, a as AcpElicitationHandler, b as McpServer$1, c as AcpElicitationResponse, d as AcpPermissionHandler, f as AcpPermissionRequest, g as AcpProcessLifecycle, h as AcpProcessLaunchScope, i as AcpElicitationContext, j as GrokExitPlanModeResponse, k as PromptInput, l as AcpJsonRpcMessage, m as AcpProcessLaunch, n as SystemPromptOption, o as AcpElicitationMode, p as AcpProcessExit, s as AcpElicitationRequest, t as SessionAgentOptions, u as AcpPermissionDecision, v as AcpProcessStarted, x as NonInteractivePermissionPolicy, y as AuthPolicy } from "./session-options-NjpFwf-c.js";
|
|
3
|
-
import { n as AcpControlAuthority, t as AcpClient } from "./client-
|
|
3
|
+
import { n as AcpControlAuthority, t as AcpClient } from "./client-C5zneoBs.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { SetSessionConfigOptionResponse, ToolCallContent, ToolCallLocation, ToolKind } from "@1agents/acp-runtime-sdk";
|
|
6
6
|
//#region src/acp/model-support.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as findSession, At as extractAcpError, B as assertPersistedKeyPolicy, Bt as isAcpRuntimeError, C as textPrompt, Dt as normalizeOutputError, L as readSessionRecord, Ot as safeErrorRejection, R as resolveSessionRecord, U as serializeSessionRecordForDisk, V as parseSessionRecord, bt as writePrivateJsonFile, ft as defaultSessionEventLog, jt as isAcpResourceNotFoundError, kt as toSafeError, t as tryCancelOnRunningOwner, zt as AcpRuntimeError } from "./ipc-BQQpcEdP.js";
|
|
2
2
|
import { a as createAgentRegistry, i as DEFAULT_AGENT_NAME, k as normalizeAgentCommandInput } from "./agent-registry-R7A3MSpr.js";
|
|
3
|
-
import { $ as isRequestedModelUnsupportedError, A as applyInitialModelSelection, B as reconcileAgentSessionId, C as setSessionModeOnOwner, D as connectAndLoadSession, E as withConnectedSession, F as persistSessionOptions, G as recordSessionUpdate, I as sessionOptionsFromRecord, J as advertisedModelState, K as trimConversationForRuntime, L as applyConversation, M as applyRequestedModelIfAdvertised, N as setDesiredModeId, O as applyConfigOptionSelection, P as normalizeSessionOptionShape, Q as RequestedModelUnsupportedError, R as applyLifecycleSnapshotToRecord, T as setSessionModelOnOwner, U as recordClientOperation, V as cloneSessionConversation, W as recordPromptSubmission, X as REQUESTED_MODEL_UNSUPPORTED_ERROR_CODE, Y as AcpClient, Z as REQUESTED_MODEL_UNSUPPORTED_REASONS, _ as cancelSessionPrompt, c as LiveSessionCheckpoint, dt as TimeoutError, et as resolveRequestedConfigOption, ft as assertControlAuthority, h as ensureSession, j as applyModelSelection, k as applyConfigOptionsToRecord, l as runPromptTurn, mt as withTimeout, q as cloneSessionAcpxState, r as sendSession, s as DISCARD_OUTPUT_FORMATTER, tt as resolveRequestedModelId, v as closeSession, x as setSessionConfigOptionOnOwner, z as createInitialSessionRecord } from "./queue-owner-runtime-
|
|
3
|
+
import { $ as isRequestedModelUnsupportedError, A as applyInitialModelSelection, B as reconcileAgentSessionId, C as setSessionModeOnOwner, D as connectAndLoadSession, E as withConnectedSession, F as persistSessionOptions, G as recordSessionUpdate, I as sessionOptionsFromRecord, J as advertisedModelState, K as trimConversationForRuntime, L as applyConversation, M as applyRequestedModelIfAdvertised, N as setDesiredModeId, O as applyConfigOptionSelection, P as normalizeSessionOptionShape, Q as RequestedModelUnsupportedError, R as applyLifecycleSnapshotToRecord, T as setSessionModelOnOwner, U as recordClientOperation, V as cloneSessionConversation, W as recordPromptSubmission, X as REQUESTED_MODEL_UNSUPPORTED_ERROR_CODE, Y as AcpClient, Z as REQUESTED_MODEL_UNSUPPORTED_REASONS, _ as cancelSessionPrompt, c as LiveSessionCheckpoint, dt as TimeoutError, et as resolveRequestedConfigOption, ft as assertControlAuthority, h as ensureSession, j as applyModelSelection, k as applyConfigOptionsToRecord, l as runPromptTurn, mt as withTimeout, q as cloneSessionAcpxState, r as sendSession, s as DISCARD_OUTPUT_FORMATTER, tt as resolveRequestedModelId, v as closeSession, x as setSessionConfigOptionOnOwner, z as createInitialSessionRecord } from "./queue-owner-runtime-CJwEW-f-.js";
|
|
4
4
|
import { t as watchSession } from "./watch-CIpoMaWD.js";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import path from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as JsonMessageSanitizer, t as createOutputFormatter } from "./output-
|
|
1
|
+
import { i as JsonMessageSanitizer, t as createOutputFormatter } from "./output-BiOUhKGO.js";
|
|
2
2
|
import { it as isAcpJsonRpcMessage, lt as parsePromptStopReason } from "./ipc-BQQpcEdP.js";
|
|
3
3
|
import { t as watchSession } from "./watch-CIpoMaWD.js";
|
|
4
4
|
import { once } from "node:events";
|
|
@@ -73,4 +73,4 @@ async function runSessionWatch(record, options) {
|
|
|
73
73
|
//#endregion
|
|
74
74
|
export { runSessionWatch };
|
|
75
75
|
|
|
76
|
-
//# sourceMappingURL=session-watch-
|
|
76
|
+
//# sourceMappingURL=session-watch-kRtST0Y5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-watch-
|
|
1
|
+
{"version":3,"file":"session-watch-kRtST0Y5.js","names":[],"sources":["../src/cli/session-watch.ts"],"sourcesContent":["import { once } from \"node:events\";\nimport { isAcpJsonRpcMessage, parsePromptStopReason } from \"../acp/jsonrpc.js\";\nimport type { SessionWatchEvent } from \"../session/journal.js\";\nimport { watchSession } from \"../session/watch.js\";\nimport type { OutputFormatter, OutputPolicy, SessionRecord } from \"../types.js\";\nimport { JsonMessageSanitizer } from \"./output/json-formatter.js\";\nimport { createOutputFormatter } from \"./output/output.js\";\n\nfunction watchRenderer(policy: OutputPolicy): (event: SessionWatchEvent) => string[] {\n const chunks: string[] = [];\n const stdout = {\n write: (chunk: string) => {\n chunks.push(chunk);\n },\n };\n let sanitizer = new JsonMessageSanitizer(policy.suppressReads, true);\n let formatter = createOutputFormatter(policy.format, { stdout });\n return (event) => {\n chunks.length = 0;\n if (event.type === \"turn_started\") {\n sanitizer = new JsonMessageSanitizer(policy.suppressReads, true);\n formatter = createOutputFormatter(policy.format, { stdout });\n }\n if (policy.format === \"json\") {\n chunks.push(\n JSON.stringify(\n event.type === \"message\"\n ? { ...event, message: sanitizer.sanitize(event.message) }\n : event,\n ) + \"\\n\",\n );\n } else if (event.type === \"message\") {\n renderWatchMessage(event, sanitizer, formatter, policy.format === \"quiet\");\n } else {\n if (event.type === \"turn_result\") {\n formatter.flush();\n }\n if (policy.format !== \"quiet\") {\n chunks.push(watchLifecycleLine(event));\n }\n }\n return chunks;\n };\n}\n\nfunction renderWatchMessage(\n event: Extract<SessionWatchEvent, { type: \"message\" }>,\n sanitizer: JsonMessageSanitizer,\n formatter: OutputFormatter,\n quiet: boolean,\n): void {\n const message = sanitizer.sanitize(event.message);\n if (!isAcpJsonRpcMessage(message)) {\n throw new Error(\"Invalid sanitized session message\");\n }\n if (quiet || parsePromptStopReason(message) === undefined) {\n formatter.onAcpMessage(message);\n }\n}\n\nfunction watchLifecycleLine(event: Exclude<SessionWatchEvent, { type: \"message\" }>): string {\n if (event.type === \"turn_started\") {\n return `\\n[${event.requestId}] started cursor=${event.cursor}\\n`;\n }\n const detail =\n event.result.status === \"failed\" ? event.result.error.message : event.result.stopReason;\n return `\\n[${event.requestId}] ${event.result.status}${detail ? `: ${detail}` : \"\"} cursor=${event.cursor}\\n`;\n}\n\nexport async function runSessionWatch(\n record: SessionRecord,\n options: { cursor?: string; policy: OutputPolicy },\n): Promise<void> {\n const stopped = new AbortController();\n let outputError: Error | undefined;\n const stop = () => stopped.abort();\n const onOutputError = (error: Error) => {\n if ((error as NodeJS.ErrnoException).code !== \"EPIPE\") {\n outputError = error;\n }\n stop();\n };\n const render = watchRenderer(options.policy);\n process.on(\"SIGINT\", stop);\n process.on(\"SIGTERM\", stop);\n process.on(\"SIGHUP\", stop);\n process.stdout.on(\"error\", onOutputError);\n try {\n for await (const event of watchSession({\n record,\n cursor: options.cursor,\n signal: stopped.signal,\n })) {\n for (const chunk of render(event)) {\n if (stopped.signal.aborted) {\n break;\n }\n if (!process.stdout.write(chunk)) {\n await once(process.stdout, \"drain\", { signal: stopped.signal });\n }\n }\n }\n } catch (error) {\n if (!stopped.signal.aborted) {\n throw error;\n }\n } finally {\n process.off(\"SIGINT\", stop);\n process.off(\"SIGTERM\", stop);\n process.off(\"SIGHUP\", stop);\n process.stdout.off(\"error\", onOutputError);\n }\n if (outputError) {\n throw outputError;\n }\n}\n"],"mappings":";;;;;AAQA,SAAS,cAAc,QAA8D;CACnF,MAAM,SAAmB,CAAC;CAC1B,MAAM,SAAS,EACb,QAAQ,UAAkB;EACxB,OAAO,KAAK,KAAK;CACnB,EACF;CACA,IAAI,YAAY,IAAI,qBAAqB,OAAO,eAAe,IAAI;CACnE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AK,MAAgC,SAAS,SAC5C,cAAc;EAEhB,KAAK;CACP;CACA,MAAM,SAAS,cAAc,QAAQ,MAAM;CAC3C,QAAQ,GAAG,UAAU,IAAI;CACzB,QAAQ,GAAG,WAAW,IAAI;CAC1B,QAAQ,GAAG,UAAU,IAAI;CACzB,QAAQ,OAAO,GAAG,SAAS,aAAa;CACxC,IAAI;EACF,WAAW,MAAM,SAAS,aAAa;GACrC;GACA,QAAQ,QAAQ;GAChB,QAAQ,QAAQ;EAClB,CAAC,GACC,KAAK,MAAM,SAAS,OAAO,KAAK,GAAG;GACjC,IAAI,QAAQ,OAAO,SACjB;GAEF,IAAI,CAAC,QAAQ,OAAO,MAAM,KAAK,GAC7B,MAAM,KAAK,QAAQ,QAAQ,SAAS,EAAE,QAAQ,QAAQ,OAAO,CAAC;EAElE;CAEJ,SAAS,OAAO;EACd,IAAI,CAAC,QAAQ,OAAO,SAClB,MAAM;CAEV,UAAU;EACR,QAAQ,IAAI,UAAU,IAAI;EAC1B,QAAQ,IAAI,WAAW,IAAI;EAC3B,QAAQ,IAAI,UAAU,IAAI;EAC1B,QAAQ,OAAO,IAAI,SAAS,aAAa;CAC3C;CACA,IAAI,aACF,MAAM;AAEV"}
|
|
@@ -94,7 +94,7 @@ Friendly agent names resolve to commands:
|
|
|
94
94
|
- `codex` -> `npx -y @agentclientprotocol/codex-acp` (ACPX-owned package range)
|
|
95
95
|
- `claude` -> `npx -y @agentclientprotocol/claude-agent-acp` (ACPX-owned package range; see `agents/Claude.md`)
|
|
96
96
|
- `gemini` -> `gemini --acp`
|
|
97
|
-
- `cursor` -> `cursor-agent acp`
|
|
97
|
+
- `cursor` -> `cursor-agent acp` (calls `authenticate` with `cursor_login` before creating a session; sign in with `agent login` first. See `agents/Cursor.md`)
|
|
98
98
|
- `copilot` -> `copilot --acp --stdio`
|
|
99
99
|
- `antigravity` -> `agy_acp_server.par` (`--uid=` on Linux; `agy_acp_server.exe` on Windows). Install the official runtime/helper pair and configure its own sign-in first; see [Antigravity](https://github.com/openclaw/acpx/blob/main/agents/Antigravity.md). Fixed-choice interaction questions are cancelled, including with `--approve-all`, host permission callbacks, and existing custom launchers; acpx cannot supply user answers through permission approval.
|
|
100
100
|
- `devin` -> `devin acp`
|
|
@@ -318,6 +318,8 @@ Behavior:
|
|
|
318
318
|
- `--no-terminal`: disable the ACP terminal callback. This is a protocol callback policy, not an OS sandbox for the agent's own process access.
|
|
319
319
|
- `--verbose`: verbose ACP/debug logs to stderr
|
|
320
320
|
|
|
321
|
+
Cursor ACP rejects `session/new` until `authenticate` uses method `cursor_login`. That method uses the existing CLI login (`agent login`, or `CURSOR_API_KEY` / `CURSOR_AUTH_TOKEN` on the agent process). `acpx` sends it for `cursor-agent acp` and `agent acp` and does not require an ACP auth credential. Other agents that advertise the same method id are not treated as Cursor.
|
|
322
|
+
|
|
321
323
|
Cursor may advertise bracketed model IDs such as `composer-2.5[fast=false]`. An exact
|
|
322
324
|
advertised ID always wins. Only Cursor accepts a bare model name through a unique
|
|
323
325
|
advertised bracketed variant; unknown or ambiguous names are rejected before the
|