@1agents/acp-service 0.2.0 β 0.4.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 +57 -33
- package/dist/bin/acp-service.js +2 -2
- package/dist/src/bridge.d.ts +2 -2
- package/dist/src/bridge.js +2 -2
- package/dist/src/catalog-descriptors.js +0 -10
- package/dist/src/catalog.js +20 -3
- package/dist/src/manifest.js +1 -1
- package/package.json +26 -7
- package/vendor/runtime/LICENSE +21 -0
- package/vendor/runtime/README.md +115 -0
- package/vendor/runtime/dist/agent-registry-CMg8LHKY.js +806 -0
- package/vendor/runtime/dist/agent-registry-CMg8LHKY.js.map +1 -0
- package/vendor/runtime/dist/agent-registry.d.ts +70 -0
- package/vendor/runtime/dist/agent-registry.d.ts.map +1 -0
- package/vendor/runtime/dist/agent-registry.js +2 -0
- package/vendor/runtime/dist/cli-DUHyAADv.js +182 -0
- package/vendor/runtime/dist/cli-DUHyAADv.js.map +1 -0
- package/vendor/runtime/dist/cli.d.ts +12 -0
- package/vendor/runtime/dist/cli.d.ts.map +1 -0
- package/vendor/runtime/dist/cli.js +2632 -0
- package/vendor/runtime/dist/cli.js.map +1 -0
- package/vendor/runtime/dist/client-DjkWknf7.d.ts +262 -0
- package/vendor/runtime/dist/client-DjkWknf7.d.ts.map +1 -0
- package/vendor/runtime/dist/docs-site/.nojekyll +0 -0
- package/vendor/runtime/dist/docs-site/CLI.html +832 -0
- package/vendor/runtime/dist/docs-site/CNAME +1 -0
- package/vendor/runtime/dist/docs-site/VISION.html +415 -0
- package/vendor/runtime/dist/docs-site/agents.html +391 -0
- package/vendor/runtime/dist/docs-site/compare.html +359 -0
- package/vendor/runtime/dist/docs-site/config.html +450 -0
- package/vendor/runtime/dist/docs-site/custom-agents.html +408 -0
- package/vendor/runtime/dist/docs-site/exit-codes.html +347 -0
- package/vendor/runtime/dist/docs-site/favicon.svg +21 -0
- package/vendor/runtime/dist/docs-site/flows.html +497 -0
- package/vendor/runtime/dist/docs-site/index.html +367 -0
- package/vendor/runtime/dist/docs-site/install.html +386 -0
- package/vendor/runtime/dist/docs-site/llms.txt +35 -0
- package/vendor/runtime/dist/docs-site/output-formats.html +403 -0
- package/vendor/runtime/dist/docs-site/permissions.html +413 -0
- package/vendor/runtime/dist/docs-site/prompting.html +460 -0
- package/vendor/runtime/dist/docs-site/proof-2026-07-18-grok-ext-methods/index.html +336 -0
- package/vendor/runtime/dist/docs-site/quickstart.html +382 -0
- package/vendor/runtime/dist/docs-site/runtime-environment.html +329 -0
- package/vendor/runtime/dist/docs-site/runtime-process-lifecycle.html +335 -0
- package/vendor/runtime/dist/docs-site/session-control.html +406 -0
- package/vendor/runtime/dist/docs-site/session-watch.html +354 -0
- package/vendor/runtime/dist/docs-site/sessions.html +486 -0
- package/vendor/runtime/dist/docs-site/shared-sessions.html +377 -0
- package/vendor/runtime/dist/flows-CiJSCy4D.js +2474 -0
- package/vendor/runtime/dist/flows-CiJSCy4D.js.map +1 -0
- package/vendor/runtime/dist/flows.d.ts +334 -0
- package/vendor/runtime/dist/flows.d.ts.map +1 -0
- package/vendor/runtime/dist/flows.js +2 -0
- package/vendor/runtime/dist/invocation-options-BlIySxIw.js +345 -0
- package/vendor/runtime/dist/invocation-options-BlIySxIw.js.map +1 -0
- package/vendor/runtime/dist/ipc-BlljKR2b.js +5336 -0
- package/vendor/runtime/dist/ipc-BlljKR2b.js.map +1 -0
- package/vendor/runtime/dist/output-BzXQKArM.js +1012 -0
- package/vendor/runtime/dist/output-BzXQKArM.js.map +1 -0
- package/vendor/runtime/dist/queue-owner-runtime-DSFdsS_y.js +8867 -0
- package/vendor/runtime/dist/queue-owner-runtime-DSFdsS_y.js.map +1 -0
- package/vendor/runtime/dist/runtime.d.ts +1156 -0
- package/vendor/runtime/dist/runtime.d.ts.map +1 -0
- package/vendor/runtime/dist/runtime.js +3675 -0
- package/vendor/runtime/dist/runtime.js.map +1 -0
- package/vendor/runtime/dist/session-options-ORCchZGk.d.ts +426 -0
- package/vendor/runtime/dist/session-options-ORCchZGk.d.ts.map +1 -0
- package/vendor/runtime/dist/session-watch-BiBTBMz4.js +76 -0
- package/vendor/runtime/dist/session-watch-BiBTBMz4.js.map +1 -0
- package/vendor/runtime/dist/watch-iYiP-lOo.js +85 -0
- package/vendor/runtime/dist/watch-iYiP-lOo.js.map +1 -0
- package/vendor/runtime/package.json +46 -0
- package/vendor/runtime/skills/acpx/SKILL.md +688 -0
package/README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# @1agents/acp-service
|
|
2
2
|
|
|
3
|
-
ACP Agent Runtime Service for Codex, Grok Build, Claude Code and other Agents supported by
|
|
3
|
+
ACP Agent Runtime Service for Codex, Grok Build, Claude Code and other Agents supported by its embedded 1ACP runtime. Version 0.2 uses **ACP v1 JSON-RPC 2.0 over WebSocket**. Each connection selects one Agent; each session keeps that Agent and its workspace when reconnected.
|
|
4
4
|
|
|
5
5
|
## Run
|
|
6
6
|
|
|
7
|
-
Requires Node.js 22.13 or later
|
|
7
|
+
Requires Node.js 22.13 or later. Starting with 0.4, the package includes the 1ACP runtime, CLI, skills and license; installing a separate `@scottzx/1acp` package is unnecessary. The runtime and service retain their respective ACP SDK versions.
|
|
8
|
+
|
|
9
|
+
The runtime's per-session launch argv and transient credentials APIs support Provider Profiles. Public runtime APIs and flow authoring are available as `@1agents/acp-service/runtime` and `@1agents/acp-service/flows`. The `acp-service` command forwards runtime commands alongside its `serve` command.
|
|
8
10
|
|
|
9
11
|
Run from the monorepo root:
|
|
10
12
|
|
|
@@ -17,11 +19,15 @@ pnpm start:service serve --host 127.0.0.1 --port 36812 --no-report
|
|
|
17
19
|
|
|
18
20
|
The default port is 36812. Without `--no-report`, the service reports to the local DreamMate node. Agent executables and their authentication must be available to the service process. `ACP_STATE_DIR` overrides the default `~/.1agents/acpx-state` directory for runtime records, turn journals and ACP replay data.
|
|
19
21
|
|
|
22
|
+
For npm-backed agents, the service first uses an adapter package installed in its package search roots, then the runtime's adapter executable on PATH or in user-local binary directories. JavaScript adapters run with the service's Node interpreter. Only when an adapter is absent does launch fall back to npx; discovery itself never downloads packages. Installing the native `codex` CLI does not replace installing the `codex-acp` adapter.
|
|
23
|
+
|
|
24
|
+
If startup reports npm `ENOTEMPTY` inside `_npx`, upgrade npm and move the affected cache directory aside once no installation is using it, then retry. The diagnostic preserves npm's failing path. This error concerns npm's cache directory replacement rather than macOS device permissions.
|
|
25
|
+
|
|
20
26
|
The standalone HTTP/WebSocket service does not read standard input and keeps running when it is closed or redirected from `/dev/null`. Stop the service with `SIGINT` or `SIGTERM`; both clean up managed Agent sessions before exiting.
|
|
21
27
|
|
|
22
28
|
```ts
|
|
23
|
-
import { serveAcpService } from
|
|
24
|
-
const service = await serveAcpService({ host:
|
|
29
|
+
import { serveAcpService } from "@1agents/acp-service";
|
|
30
|
+
const service = await serveAcpService({ host: "127.0.0.1", port: 36812, report: false });
|
|
25
31
|
// Later: await service.close();
|
|
26
32
|
```
|
|
27
33
|
|
|
@@ -38,36 +44,54 @@ Connect to `ws://127.0.0.1:36812/agents/codex`, `/agents/grok-build`, `/agents/c
|
|
|
38
44
|
Initialize before sending session requests:
|
|
39
45
|
|
|
40
46
|
```json
|
|
41
|
-
{
|
|
47
|
+
{
|
|
48
|
+
"jsonrpc": "2.0",
|
|
49
|
+
"id": 1,
|
|
50
|
+
"method": "initialize",
|
|
51
|
+
"params": { "protocolVersion": 1, "clientCapabilities": {} }
|
|
52
|
+
}
|
|
42
53
|
```
|
|
43
54
|
|
|
44
55
|
Create a session using an absolute existing directory:
|
|
45
56
|
|
|
46
57
|
```json
|
|
47
|
-
{
|
|
58
|
+
{
|
|
59
|
+
"jsonrpc": "2.0",
|
|
60
|
+
"id": 2,
|
|
61
|
+
"method": "session/new",
|
|
62
|
+
"params": { "cwd": "/absolute/project", "mcpServers": [] }
|
|
63
|
+
}
|
|
48
64
|
```
|
|
49
65
|
|
|
50
66
|
Use the **returned service session ID** for subsequent requests. Native Agent IDs are distinct and may appear in `_meta["1agents"].agentSessionId`; they must not replace the service ID.
|
|
51
67
|
|
|
52
68
|
```json
|
|
53
|
-
{
|
|
69
|
+
{
|
|
70
|
+
"jsonrpc": "2.0",
|
|
71
|
+
"id": 3,
|
|
72
|
+
"method": "session/prompt",
|
|
73
|
+
"params": {
|
|
74
|
+
"sessionId": "returned-session-id",
|
|
75
|
+
"prompt": [{ "type": "text", "text": "Explain this project" }]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
54
78
|
```
|
|
55
79
|
|
|
56
80
|
Output arrives as `session/update` notifications. The prompt request receives its response only when the turn settles, with a standard `stopReason`. Runtime failures return JSON-RPC errors. `session/cancel` is a notification; cancellation settles the original prompt request.
|
|
57
81
|
|
|
58
|
-
| Method
|
|
59
|
-
|
|
|
60
|
-
| `session/new`
|
|
61
|
-
| `session/load`
|
|
62
|
-
| `session/resume`
|
|
63
|
-
| `session/prompt`
|
|
64
|
-
| `session/cancel`
|
|
65
|
-
| `session/close`
|
|
66
|
-
| `session/list`
|
|
67
|
-
| `session/delete`
|
|
68
|
-
| `session/set_mode`
|
|
69
|
-
| `session/set_config_option`
|
|
70
|
-
| `session/request_permission` | Server-to-client request; the client returns an advertised option ID or a cancelled outcome.
|
|
82
|
+
| Method | Behavior |
|
|
83
|
+
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
84
|
+
| `session/new` | Creates a new persistent session with a server-generated ID. |
|
|
85
|
+
| `session/load` | Attaches an existing session and replays its complete recorded ACP conversation before responding. |
|
|
86
|
+
| `session/resume` | Attaches without replaying conversation history. |
|
|
87
|
+
| `session/prompt` | Runs a turn; ordinary overlapping prompts are rejected as busy. |
|
|
88
|
+
| `session/cancel` | Cancels the current turn; has no RPC response. |
|
|
89
|
+
| `session/close` | Cancels work and releases live resources while retaining persistent history. |
|
|
90
|
+
| `session/list` | Lists this endpoint's bound, resumable sessions, optionally filtered by cwd. Returns the complete list without a next cursor. |
|
|
91
|
+
| `session/delete` | Closes live resources and tombstones the service session so it cannot be resumed or listed. Runtime history retention follows the runtime's deletion behavior. |
|
|
92
|
+
| `session/set_mode` | Selects an advertised native Agent mode. |
|
|
93
|
+
| `session/set_config_option` | Changes an advertised native option and returns the resulting configuration options. |
|
|
94
|
+
| `session/request_permission` | Server-to-client request; the client returns an advertised option ID or a cancelled outcome. |
|
|
71
95
|
|
|
72
96
|
Methods and content remain subject to the selected Agent's capabilities. The installed runtime supports text followed by image/audio attachments. Resource blocks and text interleaved after attachments are rejected explicitly rather than reordered. Modes/configuration are returned from the Agent, not synthesized as universal choices. Session creation and loading return the original ACP config options, including select tags and grouped choices; loading also republishes the current advertised slash commands even when the runtime emits no new command event.
|
|
73
97
|
|
|
@@ -91,18 +115,18 @@ Clients opt in using `clientCapabilities._meta["1agents"] = { "version": 1 }` du
|
|
|
91
115
|
|
|
92
116
|
Custom launch/session options are carried only in `_meta["1agents"]`, including `systemContext`, `permissionMode`, `responsePolicy`, explicitly supplied child `env`, and the trusted provider-profile `launch` descriptor. Launch argv/environment validation and transient credential handling are preserved from the 1agents provider-profile integration. Credentials are not copied into ACP bindings or transcript metadata.
|
|
93
117
|
|
|
94
|
-
| Extension
|
|
95
|
-
|
|
|
96
|
-
| `_1agents/session/import`
|
|
97
|
-
| `_1agents/session/history`
|
|
98
|
-
| `_1agents/session/permission_mode`
|
|
99
|
-
| `_1agents/session/cancel_queued`
|
|
100
|
-
| `_1agents/session/fork`
|
|
101
|
-
| `_1agents/session/authenticate`, `_1agents/session/logout` | Native session authentication controls.
|
|
102
|
-
| `_1agents/sessions/close_all`
|
|
103
|
-
| `_1agents/session/meta`
|
|
104
|
-
| `_1agents/events/<name>`
|
|
105
|
-
| `_x.ai/ask_user_question`, `_x.ai/exit_plan_mode`
|
|
118
|
+
| Extension | Purpose |
|
|
119
|
+
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
120
|
+
| `_1agents/session/import` | Explicitly resumes a pre-migration native session ID and returns a new service session ID. |
|
|
121
|
+
| `_1agents/session/history` | Returns the runtime/native history projection used by existing chat views. |
|
|
122
|
+
| `_1agents/session/permission_mode` | Changes the service permission policy, independently of native Agent mode. |
|
|
123
|
+
| `_1agents/session/cancel_queued` | Cancels a queued managed request by its durable request ID. |
|
|
124
|
+
| `_1agents/session/fork` | Uses the runtime's optional fork capability. Imported/forked native history is not advertised as complete ACP replay. |
|
|
125
|
+
| `_1agents/session/authenticate`, `_1agents/session/logout` | Native session authentication controls. |
|
|
126
|
+
| `_1agents/sessions/close_all` | Closes all managed sessions. |
|
|
127
|
+
| `_1agents/session/meta` | Notification containing native models, modes and other UI capabilities. |
|
|
128
|
+
| `_1agents/events/<name>` | Application notifications such as `turn_sync`, `turn_state`, `turn_terminal`, `history_response`, `session_taken_over`, background tasks and interaction timeouts. |
|
|
129
|
+
| `_x.ai/ask_user_question`, `_x.ai/exit_plan_mode` | Server-to-client requests preserving Grok-specific questionnaire/plan semantics. Clients answer with the corresponding JSON-RPC result. |
|
|
106
130
|
|
|
107
131
|
Nonstandard metadata is namespaced; standard `session/update` content is still available without knowing the application view fields. `responsePolicy: "summary"` suppresses incremental conversation output while preserving the replay log and live permission/questions. The final prompt response carries the summary in `_meta["1agents"]`, and opted-in clients receive `turn_complete`. Managed turn IDs, idempotency keys and queue state are application extensions, not replacements for JSON-RPC request IDs.
|
|
108
132
|
|
|
@@ -110,7 +134,7 @@ Nonstandard metadata is namespaced; standard `session/update` content is still a
|
|
|
110
134
|
|
|
111
135
|
Upgrade the service and 1agents Go client together. Old `action/event` WebSocket clients are not supported by 0.2. The Go `internal/acpwire` client converts existing chat view messages to standard ACP and negotiated extensions; frontend view state can remain unchanged. It stores the returned service session ID for future reconnects and explicitly imports older native IDs when needed.
|
|
112
136
|
|
|
113
|
-
The npm `@1agents/acp-bridge`
|
|
137
|
+
The npm `@1agents/acp-bridge` launcher must use a dependency range that accepts service 0.4 to adopt this release. Publish the service before dependent plugins or launchers. Install from the workspace root with `pnpm install --frozen-lockfile`; build runtime, then service. Development supervision locates `services/1acp/packages/service`.
|
|
114
138
|
|
|
115
139
|
## Verify
|
|
116
140
|
|
package/dist/bin/acp-service.js
CHANGED
|
@@ -8,7 +8,7 @@ const require = createRequire(import.meta.url);
|
|
|
8
8
|
const rawArgs = process.argv.slice(2);
|
|
9
9
|
const invokedBin = 'acp-service';
|
|
10
10
|
function getAcpxCliPath() {
|
|
11
|
-
return require.resolve('@
|
|
11
|
+
return require.resolve('@1agents/acp-service/runtime-cli');
|
|
12
12
|
}
|
|
13
13
|
function getPackageVersion() {
|
|
14
14
|
try {
|
|
@@ -153,7 +153,7 @@ async function main() {
|
|
|
153
153
|
await runServer({});
|
|
154
154
|
return;
|
|
155
155
|
}
|
|
156
|
-
// 6. Any other subcommand or arguments -> forward directly to
|
|
156
|
+
// 6. Any other subcommand or arguments -> forward directly to the embedded runtime CLI
|
|
157
157
|
forwardToCli(rawArgs);
|
|
158
158
|
}
|
|
159
159
|
await main();
|
package/dist/src/bridge.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function resolveResponsePolicy(explicitPolicy: any, sessionPolicy: any): any;
|
|
2
2
|
export function attachBridgeServer(serverOrOptions?: {}): {
|
|
3
3
|
wss: WebSocketServer;
|
|
4
|
-
runtime: import("@
|
|
4
|
+
runtime: import("@1agents/acp-service/runtime").AcpxRuntime;
|
|
5
5
|
activeSessions: Map<any, any>;
|
|
6
6
|
close: typeof killAllManagedAgents;
|
|
7
7
|
};
|
|
@@ -14,7 +14,7 @@ export function readRuntimeRecord(id: any): Promise<any>;
|
|
|
14
14
|
export let wss: import("ws").WebSocketServer | null;
|
|
15
15
|
import { WebSocketServer } from "ws";
|
|
16
16
|
export function killAllManagedAgents(): Promise<void>;
|
|
17
|
-
export const runtime: import("@
|
|
17
|
+
export const runtime: import("@1agents/acp-service/runtime").AcpxRuntime;
|
|
18
18
|
export const activeSessions: Map<any, any>;
|
|
19
19
|
export const sessionBackgroundTasks: Map<any, any>;
|
|
20
20
|
export function gracefulExit(source: any): Promise<void>;
|
package/dist/src/bridge.js
CHANGED
|
@@ -5,7 +5,7 @@ import * as path from "node:path";
|
|
|
5
5
|
import { WebSocketServer } from "ws";
|
|
6
6
|
import { attachAcpConnection } from "./acp-connection.js";
|
|
7
7
|
import { createServiceAgentRegistry } from "./catalog.js";
|
|
8
|
-
import { createAcpRuntime, createRuntimeStore, createTurnJournal, } from "@
|
|
8
|
+
import { createAcpRuntime, createRuntimeStore, createTurnJournal, } from "@1agents/acp-service/runtime";
|
|
9
9
|
import { historyToolInput, resolveRuntimeTurnId, stampHistoryTurnIds, } from "./history-turn-ids.js";
|
|
10
10
|
// ----------------------------------------------------
|
|
11
11
|
// Configurations
|
|
@@ -32,7 +32,7 @@ const META_UPDATE_TAGS = new Set([
|
|
|
32
32
|
"config_option_update",
|
|
33
33
|
"session_info_update",
|
|
34
34
|
]);
|
|
35
|
-
// Background-task completion reminders: the grok
|
|
35
|
+
// Background-task completion reminders: the grok runtime does not
|
|
36
36
|
// emit structured `background_task` session updates. Instead, when a task
|
|
37
37
|
// finishes it wakes the session with an out-of-turn `user_message_chunk`
|
|
38
38
|
// whose text carries a `<system-reminder>` block:
|
|
@@ -30,16 +30,6 @@ export const catalogDescriptors = [
|
|
|
30
30
|
"integrated": true,
|
|
31
31
|
"install_command": "curl -fsSL https://x.ai/cli/install.sh | bash"
|
|
32
32
|
},
|
|
33
|
-
{
|
|
34
|
-
"type": "deepseek-build",
|
|
35
|
-
"label": "DeepSeek",
|
|
36
|
-
"binary": "grok",
|
|
37
|
-
"acp_capable": true,
|
|
38
|
-
"cli_capable": true,
|
|
39
|
-
"cc_transport": "acp",
|
|
40
|
-
"integrated": true,
|
|
41
|
-
"install_command": "curl -fsSL https://x.ai/cli/install.sh | bash"
|
|
42
|
-
},
|
|
43
33
|
{
|
|
44
34
|
"type": "cursor",
|
|
45
35
|
"label": "Cursor Agent",
|
package/dist/src/catalog.js
CHANGED
|
@@ -3,11 +3,11 @@ import { accessSync, closeSync, constants, openSync, readSync, readFileSync, sta
|
|
|
3
3
|
import { createRequire } from 'node:module';
|
|
4
4
|
import { homedir } from 'node:os';
|
|
5
5
|
import { delimiter, dirname, isAbsolute, join, resolve } from 'node:path';
|
|
6
|
-
import { createAgentRegistry } from '@
|
|
6
|
+
import { createAgentRegistry } from '@1agents/acp-service/runtime';
|
|
7
7
|
import { catalogDescriptors } from './catalog-descriptors.js';
|
|
8
8
|
const registry = createAgentRegistry();
|
|
9
9
|
const require = createRequire(import.meta.url);
|
|
10
|
-
const runtimeRoot = dirname(require.resolve('@
|
|
10
|
+
const runtimeRoot = dirname(dirname(require.resolve('@1agents/acp-service/runtime-cli')));
|
|
11
11
|
/** Resolve an executable on PATH, then in user-local harness directories. */
|
|
12
12
|
export function findAgentBinary(binary, options = {}) {
|
|
13
13
|
const env = options.env ?? process.env;
|
|
@@ -83,7 +83,24 @@ function localLaunch(id, options) {
|
|
|
83
83
|
return undefined;
|
|
84
84
|
if (argv[0] === 'npx') {
|
|
85
85
|
const index = argv.findIndex((arg, i) => i > 0 && !arg.startsWith('-'));
|
|
86
|
-
|
|
86
|
+
if (index < 0)
|
|
87
|
+
return undefined;
|
|
88
|
+
const extraArgs = argv.slice(index + 1);
|
|
89
|
+
const packaged = packageLaunch(argv[index], extraArgs, options);
|
|
90
|
+
if (packaged)
|
|
91
|
+
return packaged;
|
|
92
|
+
// Use the runtime's adapter entrypoint, rather than the display/native CLI.
|
|
93
|
+
// Package lookup above honors the service's explicit search roots.
|
|
94
|
+
const inspection = createAgentRegistry({
|
|
95
|
+
resolveExecutable: command => findAgentBinary(command, options),
|
|
96
|
+
resolvePackageRoot: () => undefined,
|
|
97
|
+
}).inspect(id);
|
|
98
|
+
if (inspection?.launch.kind !== 'installed')
|
|
99
|
+
return undefined;
|
|
100
|
+
const [binary, ...args] = inspection.launch.argv;
|
|
101
|
+
return isNodeLauncher(binary)
|
|
102
|
+
? [process.execPath, binary, ...args]
|
|
103
|
+
: [binary, ...args];
|
|
87
104
|
}
|
|
88
105
|
// A package runner alone does not demonstrate an installed harness.
|
|
89
106
|
if (argv[0] === 'uvx')
|
package/dist/src/manifest.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* θηΉθΊ«δ»½ζ₯θͺ `@1agents/dreammate-node`οΌδΌε
tailnetοΌειζ¬ε°οΌοΌ
|
|
5
5
|
* δΏθ―ζ΄ε°ζΊε¨δΈηζζζε‘ε
±δΊ«εδΈδΈͺ node_id δΈ nameγ
|
|
6
6
|
*/
|
|
7
|
-
import { createAgentRegistry } from '@
|
|
7
|
+
import { createAgentRegistry } from '@1agents/acp-service/runtime';
|
|
8
8
|
import { nodeIdentity } from '@1agents/dreammate-node';
|
|
9
9
|
import { PROTOCOL_VERSION, } from '@1agents/dreammate-network';
|
|
10
10
|
export { nodeIdentity, PROTOCOL_VERSION };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1agents/acp-service",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "DreamMate Network ACP Agent Runtime Service: cross-agent execution runtime for Claude Code, Grok, Codex and ACP-compatible agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dreammate",
|
|
@@ -28,14 +28,28 @@
|
|
|
28
28
|
"types": "./dist/src/index.d.ts",
|
|
29
29
|
"import": "./dist/src/index.js"
|
|
30
30
|
},
|
|
31
|
-
"./package.json": "./package.json"
|
|
31
|
+
"./package.json": "./package.json",
|
|
32
|
+
"./runtime": {
|
|
33
|
+
"types": "./vendor/runtime/dist/runtime.d.ts",
|
|
34
|
+
"import": "./vendor/runtime/dist/runtime.js"
|
|
35
|
+
},
|
|
36
|
+
"./flows": {
|
|
37
|
+
"types": "./vendor/runtime/dist/flows.d.ts",
|
|
38
|
+
"import": "./vendor/runtime/dist/flows.js"
|
|
39
|
+
},
|
|
40
|
+
"./runtime-cli": "./vendor/runtime/dist/cli.js",
|
|
41
|
+
"./agent-registry": {
|
|
42
|
+
"types": "./vendor/runtime/dist/agent-registry.d.ts",
|
|
43
|
+
"import": "./vendor/runtime/dist/agent-registry.js"
|
|
44
|
+
}
|
|
32
45
|
},
|
|
33
46
|
"bin": {
|
|
34
47
|
"acp-service": "dist/bin/acp-service.js"
|
|
35
48
|
},
|
|
36
49
|
"files": [
|
|
37
50
|
"dist",
|
|
38
|
-
"README.md"
|
|
51
|
+
"README.md",
|
|
52
|
+
"vendor"
|
|
39
53
|
],
|
|
40
54
|
"engines": {
|
|
41
55
|
"node": ">=22.13.0"
|
|
@@ -45,16 +59,21 @@
|
|
|
45
59
|
"@1agents/dreammate-node": "^0.4.0",
|
|
46
60
|
"@agentclientprotocol/sdk": "1.4.0",
|
|
47
61
|
"ws": "^8.18.0",
|
|
48
|
-
"@
|
|
62
|
+
"@1agents/acp-runtime-sdk": "npm:@agentclientprotocol/sdk@^1.5.0",
|
|
63
|
+
"@openclaw/fs-safe": "^0.20.0",
|
|
64
|
+
"commander": "^15.0.0",
|
|
65
|
+
"skillflag": "^0.2.1",
|
|
66
|
+
"tsx": "^4.23.15",
|
|
67
|
+
"zod": "^4.6.5"
|
|
49
68
|
},
|
|
50
69
|
"devDependencies": {
|
|
51
70
|
"@types/node": "^22.10.2",
|
|
52
71
|
"@types/ws": "^8.5.14",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
72
|
+
"typescript": "^5.7.2",
|
|
73
|
+
"@scottzx/1acp": "0.16.0"
|
|
55
74
|
},
|
|
56
75
|
"scripts": {
|
|
57
|
-
"build": "tsc -p tsconfig.build.json",
|
|
76
|
+
"build": "node ../../scripts/embed-runtime.mjs && tsc -p tsconfig.build.json",
|
|
58
77
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
59
78
|
"test": "npm run build && node --import tsx --test test/*.test.ts",
|
|
60
79
|
"start": "tsx bin/acp-service.ts"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 OpenClaw Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# acpx π€ β Agents talking to agents, minus the terminal sΓ©ance
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="acpx_banner.svg" alt="acpx banner" width="100%" />
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
[](https://github.com/scottzx/1acp/actions/workflows/ci.yml)
|
|
8
|
+
[](https://www.npmjs.com/package/@scottzx/1acp)
|
|
9
|
+
[](https://nodejs.org/)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
[](https://www.npmjs.com/package/@scottzx/1acp)
|
|
12
|
+
|
|
13
|
+
`acpx` is a headless command-line client for the [Agent Client Protocol (ACP)](https://agentclientprotocol.com). It gives agents, orchestrators, and developers one structured interface for persistent sessions, one-shot runs, permissions, and machine-readable output across ACP-compatible coding agents.
|
|
14
|
+
|
|
15
|
+
```console
|
|
16
|
+
$ acpx codex sessions new
|
|
17
|
+
<session-id>
|
|
18
|
+
$ acpx codex "summarize this repository"
|
|
19
|
+
[tool] Read README.md (completed)
|
|
20
|
+
This repository contains ...
|
|
21
|
+
[done] end_turn
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
> [!NOTE]
|
|
25
|
+
> `acpx` is pre-1.0. Treat its CLI and runtime interfaces as evolving.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
Install the published npm package globally:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g @scottzx/1acp@latest
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The package installs both `1acp` and the upstream-compatible `acpx` command. It requires Node.js 22.13 or newer. To try it without a global install, prefix a command with `npx @scottzx/1acp@latest` instead. See the [install guide](docs/install.md) for adapter prerequisites, updates, and source builds.
|
|
36
|
+
|
|
37
|
+
## Quick start
|
|
38
|
+
|
|
39
|
+
Install and authenticate the coding agent you want to use, then create a session in your project and send it a prompt:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
acpx codex sessions new
|
|
43
|
+
acpx codex "find the slowest test and explain why"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The session is scoped to the current repository and persists across invocations. Creating sessions explicitly prevents automation from starting an unexpected conversation. The [quickstart](docs/quickstart.md) continues with named sessions, one-shot runs, history, and JSON output.
|
|
47
|
+
|
|
48
|
+
## Choose an agent
|
|
49
|
+
|
|
50
|
+
Common launch examples use the same command shape:
|
|
51
|
+
|
|
52
|
+
| Agent | Command |
|
|
53
|
+
| ----------------- | ---------------------------- |
|
|
54
|
+
| Pi | `acpx pi β¦` |
|
|
55
|
+
| OpenClaw | `acpx openclaw β¦` |
|
|
56
|
+
| Codex | `acpx codex β¦` |
|
|
57
|
+
| Claude Code | `acpx claude β¦` |
|
|
58
|
+
| Custom ACP server | `acpx --agent '<command>' β¦` |
|
|
59
|
+
|
|
60
|
+
The upstream agent must be installed and authenticated when its adapter does not provide that itself. See [built-in agents](docs/agents.md) for every supported profile and [custom agents](docs/custom-agents.md) for registry configuration.
|
|
61
|
+
|
|
62
|
+
## Sessions and one-shot runs
|
|
63
|
+
|
|
64
|
+
Persistent sessions keep context between prompts, support parallel named workstreams, and queue follow-up prompts when a turn is already running. Use `exec` when you want a stateless run with no saved session.
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
acpx codex sessions new --name backend
|
|
68
|
+
acpx codex -s backend "trace the checkout timeout"
|
|
69
|
+
acpx codex exec "summarize this repository"
|
|
70
|
+
acpx --model gpt-5.4 codex exec --config-option reasoning_effort=high "review this repository"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Session state lives under `~/.acpx/`. The [sessions guide](docs/sessions.md) covers scope, queue ownership, reconnects, export/import, cancellation, and cleanup.
|
|
74
|
+
|
|
75
|
+
## Automation and permissions
|
|
76
|
+
|
|
77
|
+
Text output is the default. `--format json` emits NDJSON ACP events for automation, while `--format quiet` prints only the final assistant text. Output events retain structured thinking, tool calls, diffs, and completion state instead of terminal escape sequences.
|
|
78
|
+
|
|
79
|
+
Permission modes range from read approval to explicit deny or approve-all policies. Use `--cwd` to set the session scope and filesystem boundary. Global and project JSON configuration can provide defaults; command-line flags take precedence.
|
|
80
|
+
|
|
81
|
+
- [Output formats](docs/output-formats.md)
|
|
82
|
+
- [Permissions](docs/permissions.md)
|
|
83
|
+
- [Configuration](docs/config.md)
|
|
84
|
+
- [Exit codes](docs/exit-codes.md)
|
|
85
|
+
|
|
86
|
+
## Flows and embedding
|
|
87
|
+
|
|
88
|
+
For multi-step work, `acpx flow run` executes TypeScript workflows that combine ACP turns with deterministic actions, decisions, computation, and checkpoints. The package also exports `acpx/runtime` and `acpx/flows` for applications that need session and workflow primitives without shelling out.
|
|
89
|
+
|
|
90
|
+
Start with the [flows guide](docs/flows.md), then use the [examples](examples/flows/README.md) and [architecture notes](docs/2026-03-25-acpx-flows-architecture.md) for deeper integrations.
|
|
91
|
+
|
|
92
|
+
## Documentation
|
|
93
|
+
|
|
94
|
+
- [CLI reference](docs/CLI.md) β commands, flags, and behavior
|
|
95
|
+
- [Prompting](docs/prompting.md) β arguments, stdin, files, and queueing
|
|
96
|
+
- [Session controls](docs/session-control.md) β cancel, modes, options, and status
|
|
97
|
+
- [Compare agents](docs/compare.md) β run one prompt across multiple agents
|
|
98
|
+
- [ACP coverage](docs/2026-02-19-acp-coverage-roadmap.md) β implemented protocol methods
|
|
99
|
+
- [Vision](VISION.md) β project scope and design principles
|
|
100
|
+
|
|
101
|
+
The full documentation is also available at [acpx.sh](https://acpx.sh/).
|
|
102
|
+
|
|
103
|
+
## Development
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
pnpm install --frozen-lockfile
|
|
107
|
+
pnpm run check
|
|
108
|
+
pnpm run check:docs
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution and review guidance.
|
|
112
|
+
|
|
113
|
+
## License
|
|
114
|
+
|
|
115
|
+
MIT. See [LICENSE](LICENSE).
|