@1agents/acp-service 0.5.2 → 0.5.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/package.json +2 -1
- package/vendor/dsh/README.md +1 -1
- package/vendor/dsh/client.js +10 -50
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1agents/acp-service",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "ACP runtime, CLI, HTTP/WebSocket service and DeepSeek Harness plugin in one package.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dreammate",
|
|
@@ -100,6 +100,7 @@
|
|
|
100
100
|
"@deepseek-ai/dsh-client-ui-commands",
|
|
101
101
|
"@deepseek-ai/dsh-client-ui-conversation",
|
|
102
102
|
"@deepseek-ai/dsh-client-ui-chat",
|
|
103
|
+
"@deepseek-ai/dsh-client-ui-tool",
|
|
103
104
|
"@deepseek-ai/dsh-client-locale",
|
|
104
105
|
"@deepseek-ai/dsh-api-remotes"
|
|
105
106
|
]
|
package/vendor/dsh/README.md
CHANGED
|
@@ -26,7 +26,7 @@ The service requires each native Agent’s CLI and credentials. Installing the p
|
|
|
26
26
|
|
|
27
27
|
Choose a discovered **ACP · Agent** in the new-session Agent preset picker, choose a workspace, then send a message. ACP routes are not listed as ordinary DSH models, and the adapter rejects requests from ordinary presets, including previously saved ACP routes. Before the first turn, switching the Agent preset replaces the discovery connection and its native commands. Once a turn starts, the session keeps its remote Agent and workspace; start a new session to change Agent. Native Agent binaries and authentication belong to acp-service.
|
|
28
28
|
|
|
29
|
-
The bundle registers an ACP adapter through DSH's public streaming extension and routes the ACP presets to it. It sends newly admitted messages whose source is `user` to `session/prompt`, not to `subagent-acp`; there is no coordinating DeepSeek model call. DSH-generated workspace instructions and runtime-context messages are excluded. The external Agent owns its model, prompt, tools and native history, including any project instructions it discovers itself. DSH owns its UI and local user/assistant transcript. External tool progress is preserved as display metadata on empty text blocks in DSH's existing assistant stream records and projected onto
|
|
29
|
+
The bundle registers an ACP adapter through DSH's public streaming extension and routes the ACP presets to it. It sends newly admitted messages whose source is `user` to `session/prompt`, not to `subagent-acp`; there is no coordinating DeepSeek model call. DSH-generated workspace instructions and runtime-context messages are excluded. The external Agent owns its model, prompt, tools and native history, including any project instructions it discovers itself. DSH owns its UI and local user/assistant transcript. External tool progress is preserved as display metadata on empty text blocks in DSH's existing assistant stream records and projected onto native tool cards with completed-turn disclosure. ACP updates retain previously supplied fields, and replay is deduplicated by the managed turn sequence. These snapshots contain no visible text and never dispatch local tools; they use the existing persisted session format so conversations can reopen normally. Only Agent thought chunks enter the thinking stream.
|
|
30
30
|
|
|
31
31
|
## Continue imported native sessions
|
|
32
32
|
|
package/vendor/dsh/client.js
CHANGED
|
@@ -21,7 +21,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
// src/client.js
|
|
22
22
|
var client_exports = {};
|
|
23
23
|
__export(client_exports, {
|
|
24
|
-
AcpTools: () => AcpTools,
|
|
25
24
|
apply: () => apply,
|
|
26
25
|
choices: () => choices,
|
|
27
26
|
inject: () => inject
|
|
@@ -97,15 +96,20 @@ var toolConversationDefinition = {
|
|
|
97
96
|
const state = context.state;
|
|
98
97
|
if (!state) return null;
|
|
99
98
|
const location = context.start?.location ?? context.matches[0]?.location ?? { kind: "unresolved" };
|
|
99
|
+
const roots = [...state.tools.values()].map((tool) => rootOf(tool, location));
|
|
100
|
+
if (!roots.length) return null;
|
|
101
|
+
const [first, ...remaining] = roots;
|
|
100
102
|
return {
|
|
101
103
|
key: context.key,
|
|
102
104
|
id: context.id,
|
|
103
|
-
kind: "
|
|
105
|
+
kind: "tool-call",
|
|
104
106
|
target: "chat",
|
|
105
|
-
|
|
107
|
+
// Durable snapshots share the final answer event; anchor them before that
|
|
108
|
+
// answer so DSH retains the completed Turn's process disclosure.
|
|
109
|
+
anchorSeq: location.kind === "step" ? location.step.start?.seq ?? state.seq : state.seq,
|
|
106
110
|
location,
|
|
107
111
|
visibility: "visible",
|
|
108
|
-
data: {
|
|
112
|
+
data: { root: { ...first, subCalls: remaining } }
|
|
109
113
|
};
|
|
110
114
|
}
|
|
111
115
|
};
|
|
@@ -113,8 +117,8 @@ var toolConversationDefinition = {
|
|
|
113
117
|
// src/client.js
|
|
114
118
|
var inject = ["slots", "sessions", "commandUi", "remote", "remote.session", "locale", "uiConversation", "conversation"];
|
|
115
119
|
var dictionaries = {
|
|
116
|
-
zh: {
|
|
117
|
-
en: {
|
|
120
|
+
zh: { model: "\u6A21\u578B", choose: "\u9009\u62E9\u6A21\u578B", loading: "\u6B63\u5728\u8FDE\u63A5 Agent\u2026", retry: "\u91CD\u8BD5", mode: "\u6A21\u5F0F", command: "Agent \u6307\u4EE4", effort: "\u601D\u8003\u5F3A\u5EA6", unsupported: "Agent \u672A\u63D0\u4F9B\u53EF\u5207\u6362\u7684\u6A21\u578B", description: "\u9009\u62E9\u5F53\u524D Agent \u7684\u6A21\u578B", error: "\u8FDE\u63A5\u5931\u8D25", noCommands: "Agent \u5C1A\u672A\u63D0\u4F9B\u6307\u4EE4", native: "ACP \u8BBE\u7F6E", activeWriter: "\u539F\u4F1A\u8BDD\u6B63\u5728\u5176\u4ED6\u5BA2\u6237\u7AEF\u8FD0\u884C\uFF0C\u53EF\u67E5\u770B\u5386\u53F2\uFF1B\u5360\u7528\u89E3\u9664\u540E\u81EA\u52A8\u6062\u590D\u8F93\u5165\u3002" },
|
|
121
|
+
en: { model: "Model", choose: "Select model", loading: "Connecting to Agent\u2026", retry: "Retry", mode: "Mode", command: "Agent commands", effort: "Reasoning effort", unsupported: "This Agent does not advertise model selection", description: "Select this Agent\u2019s model", error: "Connection failed", noCommands: "No commands advertised", native: "ACP settings", activeWriter: "The original session is running in another client. History is available; input resumes when it is released." }
|
|
118
122
|
};
|
|
119
123
|
function choices(option) {
|
|
120
124
|
return (option.options ?? []).flatMap((item) => "group" in item ? item.options.map((value) => ({ ...value, group: item.name ?? item.group })) : [item]);
|
|
@@ -142,52 +146,8 @@ function Select({ title, value, rows, disabled, onSelect, placeholder }) {
|
|
|
142
146
|
)
|
|
143
147
|
);
|
|
144
148
|
}
|
|
145
|
-
function AcpTools({ node, t }) {
|
|
146
|
-
return (0, import_react.createElement)("div", { "data-oneagents-acp-tools": "", style: { display: "grid", gap: 6 } }, node.data.roots.map((root) => {
|
|
147
|
-
const running = root.phase === "start";
|
|
148
|
-
const tool = running ? root : root.call;
|
|
149
|
-
const output = running ? [] : root.content;
|
|
150
|
-
const acp = root.meta?.acp;
|
|
151
|
-
let args;
|
|
152
|
-
try {
|
|
153
|
-
args = JSON.parse(tool.argsRaw);
|
|
154
|
-
} catch {
|
|
155
|
-
args = tool.argsRaw;
|
|
156
|
-
}
|
|
157
|
-
const input = args?.command ?? args?.path ?? args?.file_path ?? acp?.title ?? tool.argsRaw;
|
|
158
|
-
const state = running ? "running" : root.isError ? "failed" : "completed";
|
|
159
|
-
const labels = { running: t("toolRunning"), failed: t("toolFailed"), completed: t("toolCompleted"), noOutput: t("toolNoOutput") };
|
|
160
|
-
return (0, import_react.createElement)(
|
|
161
|
-
"details",
|
|
162
|
-
{
|
|
163
|
-
key: root.callId,
|
|
164
|
-
"data-acp-call": root.callId,
|
|
165
|
-
"data-acp-status": state,
|
|
166
|
-
style: { border: "1px solid var(--dsw-alias-border-l1, #8883)", borderRadius: 8, padding: "7px 10px" }
|
|
167
|
-
},
|
|
168
|
-
(0, import_react.createElement)(
|
|
169
|
-
"summary",
|
|
170
|
-
{ style: { cursor: "pointer", fontSize: 13 } },
|
|
171
|
-
(0, import_react.createElement)("strong", null, tool.name),
|
|
172
|
-
" ",
|
|
173
|
-
(0, import_react.createElement)("span", { style: { opacity: 0.65 } }, labels[state]),
|
|
174
|
-
(0, import_react.createElement)("code", { style: { display: "block", whiteSpace: "pre-wrap", overflowWrap: "anywhere", marginTop: 4 } }, typeof input === "string" ? input : JSON.stringify(input))
|
|
175
|
-
),
|
|
176
|
-
(0, import_react.createElement)(
|
|
177
|
-
"pre",
|
|
178
|
-
{ style: { whiteSpace: "pre-wrap", overflowWrap: "anywhere", maxHeight: 360, overflow: "auto", fontSize: 12 } },
|
|
179
|
-
output.length ? output.map((block) => block.text ?? "").join("\n") : running ? labels.running : labels.noOutput
|
|
180
|
-
)
|
|
181
|
-
);
|
|
182
|
-
}));
|
|
183
|
-
}
|
|
184
149
|
function apply(ctx) {
|
|
185
150
|
ctx.uiConversation.events.register(toolConversationDefinition);
|
|
186
|
-
ctx.slots.inject("conversation.chat.node", () => ctx.slots.register({
|
|
187
|
-
name: "conversation.chat.node",
|
|
188
|
-
key: "oneagents-acp-tools",
|
|
189
|
-
locale: "oneagentsAcp"
|
|
190
|
-
}, AcpTools));
|
|
191
151
|
ctx.effect(() => ctx.locale.register("oneagentsAcp", dictionaries));
|
|
192
152
|
const t = ctx.locale.bind("oneagentsAcp");
|
|
193
153
|
const native = /* @__PURE__ */ new Map();
|