qlogicagent 2.18.8 → 2.18.10
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/cli.js +1 -1
- package/dist/host-contract.js +1 -1
- package/dist/index.js +458 -1018
- package/dist/pet-host.js +19 -0
- package/dist/project-memory-host.js +40 -0
- package/dist/protocol.js +1 -1
- package/dist/skills/mcp/astraclaw-native-mcp-server.js +7 -7
- package/dist/types/cli/acp-session-host.d.ts +1 -1
- package/dist/types/cli/community-resource-installer.d.ts +3 -5
- package/dist/types/cli/core-tools/registry.d.ts +1 -2
- package/dist/types/cli/default-project-bootstrap.d.ts +1 -1
- package/dist/types/cli/handlers/agents-handler.d.ts +8 -6
- package/dist/types/cli/handlers/community-handler.d.ts +0 -4
- package/dist/types/cli/handlers/control-handler.d.ts +1 -1
- package/dist/types/cli/handlers/project-handler.d.ts +1 -1
- package/dist/types/cli/handlers/session-handler.d.ts +0 -7
- package/dist/types/cli/handlers/solo-handler.d.ts +0 -2
- package/dist/types/cli/handlers/workflow-compute-handler.d.ts +8 -0
- package/dist/types/cli/memory-coordinator.d.ts +1 -1
- package/dist/types/cli/multi-agent-state-coordinator.d.ts +0 -3
- package/dist/types/cli/pet-runtime.d.ts +5 -5
- package/dist/types/cli/product-coordinator.d.ts +0 -2
- package/dist/types/cli/project-memory-store-factory.d.ts +11 -1
- package/dist/types/cli/rpc-registry.d.ts +0 -15
- package/dist/types/cli/stdio-rpc-handler-hosts.d.ts +2 -5
- package/dist/types/cli/stdio-runtime-bootstrap.d.ts +2 -0
- package/dist/types/cli/stdio-runtime-services.d.ts +2 -0
- package/dist/types/cli/stdio-server.d.ts +3 -4
- package/dist/types/config/cn-mirror.d.ts +2 -2
- package/dist/types/host-contract/index.d.ts +167 -9
- package/dist/types/orchestration/agent-instance.d.ts +1 -3
- package/dist/types/orchestration/goal-mode-adapters.d.ts +0 -3
- package/dist/types/orchestration/goal-run-persistence.d.ts +0 -3
- package/dist/types/orchestration/product-persistence.d.ts +1 -4
- package/dist/types/orchestration/product-planner.d.ts +2 -3
- package/dist/types/orchestration/run-state-host-authority.d.ts +7 -0
- package/dist/types/orchestration/solo-evaluator.d.ts +8 -3
- package/dist/types/orchestration/solo-persistence.d.ts +4 -7
- package/dist/types/orchestration/testing/delegate-test-bridge.d.ts +13 -2
- package/dist/types/orchestration/workflow/node-schema.d.ts +2 -1
- package/dist/types/orchestration/workflow/qla-executor-host.d.ts +1 -1
- package/dist/types/orchestration/workflow/workflow-bundle.d.ts +1 -1
- package/dist/types/pet-host.d.ts +9 -0
- package/dist/types/project-memory-host.d.ts +3 -0
- package/dist/types/protocol/wire/acp-agent-management.d.ts +1 -1
- package/dist/types/protocol/wire/acp-protocol.d.ts +8 -1
- package/dist/types/runtime/infra/acp-detector.d.ts +1 -1
- package/dist/types/runtime/infra/background-tasks.d.ts +1 -1
- package/dist/types/runtime/pet/pet-community-assets.d.ts +7 -17
- package/dist/types/runtime/pet/pet-reaction-engine.d.ts +1 -1
- package/dist/types/runtime/pet/petdex-vision-qa.d.ts +12 -0
- package/dist/types/runtime/ports/memory-recall-source.d.ts +10 -0
- package/dist/types/runtime/ports/project-memory-store.d.ts +1 -1
- package/dist/types/runtime/session/session-persistence.d.ts +3 -4
- package/dist/types/skills/mcp/mcp-manager.d.ts +4 -0
- package/dist/types/skills/memory/host-memory-provider.d.ts +2 -2
- package/dist/types/skills/memory/memory-config-resolver.d.ts +4 -0
- package/dist/types/skills/memory/task-distillation.d.ts +1 -1
- package/dist/types/test-support/run-state-authority-setup.d.ts +1 -0
- package/dist/types/transport/host-pet-client.d.ts +20 -0
- package/dist/types/transport/host-run-state-client.d.ts +17 -0
- package/dist/types/workflow-host.d.ts +33 -0
- package/dist/workflow-host.js +13 -0
- package/package.json +27 -3
- package/dist/runtime/infra/mcp-bridge-server.js +0 -338
- package/dist/types/cli/core-tools/cron-tool-bootstrap.d.ts +0 -8
- package/dist/types/cli/core-tools/cron-workflow-service.d.ts +0 -7
- package/dist/types/cli/handlers/message-feedback-handler.d.ts +0 -31
- package/dist/types/cli/handlers/pet-handler.d.ts +0 -49
- package/dist/types/cli/handlers/workflow-handler.d.ts +0 -182
- package/dist/types/cli/tool-bootstrap-workflow-registration.d.ts +0 -7
- package/dist/types/cli/workflow-host-adapter.d.ts +0 -31
- package/dist/types/orchestration/workflow/workflow-service.d.ts +0 -14
- package/dist/types/runtime/infra/agent-process.d.ts +0 -368
- package/dist/types/runtime/infra/external-agent-pool.d.ts +0 -89
- package/dist/types/skills/memory/local-memory-provider.d.ts +0 -325
- package/dist/types/skills/memory/memory-provider-factory.d.ts +0 -33
- package/dist/types/skills/tools/cron-tool.d.ts +0 -96
- package/dist/types/skills/tools/petdex-create-tool.d.ts +0 -47
- package/dist/types/skills/tools/workflow-tool.d.ts +0 -45
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* MCP Bridge Server — stdio MCP server for external ACP agents.
|
|
4
|
-
*
|
|
5
|
-
* Spawned by qlogicagent as a child of the external agent process.
|
|
6
|
-
* Receives MCP requests (tools/list, tools/call) from the external agent
|
|
7
|
-
* and proxies tool calls back to qlogicagent's parent RPC.
|
|
8
|
-
*
|
|
9
|
-
* Environment:
|
|
10
|
-
* QLOGICAGENT_PARENT_RPC — IPC/pipe path to parent qlogicagent
|
|
11
|
-
* QLOGICAGENT_SESSION_ID — session scope for tool calls
|
|
12
|
-
*
|
|
13
|
-
* Protocol: JSON-RPC 2.0 over stdio (newline-delimited)
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
import readline from "node:readline";
|
|
17
|
-
import net from "node:net";
|
|
18
|
-
|
|
19
|
-
// ── Tool Manifest (must match MCP_BRIDGE_TOOLS in mcp-bridge.ts) ────
|
|
20
|
-
|
|
21
|
-
const TOOLS = [
|
|
22
|
-
{
|
|
23
|
-
name: "skills_list",
|
|
24
|
-
description: "List AstraClaw skills currently active for this workspace and session.",
|
|
25
|
-
inputSchema: {
|
|
26
|
-
type: "object",
|
|
27
|
-
properties: {},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: "skill_view",
|
|
32
|
-
description: "Read the SKILL.md workflow for an installed AstraClaw skill by name.",
|
|
33
|
-
inputSchema: {
|
|
34
|
-
type: "object",
|
|
35
|
-
properties: {
|
|
36
|
-
name: { type: "string", description: "Installed skill name" },
|
|
37
|
-
},
|
|
38
|
-
required: ["name"],
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: "mcp_connectors_list",
|
|
43
|
-
description: "List MCP connector tools installed in AstraClaw's Plugins page and shared with this external agent.",
|
|
44
|
-
inputSchema: {
|
|
45
|
-
type: "object",
|
|
46
|
-
properties: {},
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: "mcp_tool_call",
|
|
51
|
-
description: "Call one AstraClaw shared MCP connector tool by toolName from mcp_connectors_list.",
|
|
52
|
-
inputSchema: {
|
|
53
|
-
type: "object",
|
|
54
|
-
properties: {
|
|
55
|
-
toolName: { type: "string", description: "Connector tool name, for example mcp__filesystem__read_text_file" },
|
|
56
|
-
args: { type: "object", description: "Arguments for the connector tool" },
|
|
57
|
-
},
|
|
58
|
-
required: ["toolName"],
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
name: "media_generate",
|
|
63
|
-
description: "Generate images or videos using AI models.",
|
|
64
|
-
inputSchema: {
|
|
65
|
-
type: "object",
|
|
66
|
-
properties: {
|
|
67
|
-
prompt: { type: "string", description: "Generation prompt" },
|
|
68
|
-
type: { type: "string", enum: ["image", "video"], description: "Media type" },
|
|
69
|
-
},
|
|
70
|
-
required: ["prompt"],
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
name: "media_status",
|
|
75
|
-
description: "Check status of an async media generation job.",
|
|
76
|
-
inputSchema: {
|
|
77
|
-
type: "object",
|
|
78
|
-
properties: {
|
|
79
|
-
jobId: { type: "string", description: "Job ID to check" },
|
|
80
|
-
},
|
|
81
|
-
required: ["jobId"],
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
name: "memory_read",
|
|
86
|
-
description: "Read from persistent memory.",
|
|
87
|
-
inputSchema: {
|
|
88
|
-
type: "object",
|
|
89
|
-
properties: {
|
|
90
|
-
key: { type: "string", description: "Memory key to read" },
|
|
91
|
-
},
|
|
92
|
-
required: ["key"],
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
name: "memory_write",
|
|
97
|
-
description: "Write to persistent memory.",
|
|
98
|
-
inputSchema: {
|
|
99
|
-
type: "object",
|
|
100
|
-
properties: {
|
|
101
|
-
key: { type: "string", description: "Memory key" },
|
|
102
|
-
value: { type: "string", description: "Value to store" },
|
|
103
|
-
},
|
|
104
|
-
required: ["key", "value"],
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
name: "memory_search",
|
|
109
|
-
description: "Search persistent memory by query.",
|
|
110
|
-
inputSchema: {
|
|
111
|
-
type: "object",
|
|
112
|
-
properties: {
|
|
113
|
-
query: { type: "string", description: "Search query" },
|
|
114
|
-
},
|
|
115
|
-
required: ["query"],
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
name: "web_search",
|
|
120
|
-
description: "Search the web for information.",
|
|
121
|
-
inputSchema: {
|
|
122
|
-
type: "object",
|
|
123
|
-
properties: {
|
|
124
|
-
query: { type: "string", description: "Search query" },
|
|
125
|
-
},
|
|
126
|
-
required: ["query"],
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
name: "web_fetch",
|
|
131
|
-
description: "Fetch content from a URL.",
|
|
132
|
-
inputSchema: {
|
|
133
|
-
type: "object",
|
|
134
|
-
properties: {
|
|
135
|
-
url: { type: "string", description: "URL to fetch" },
|
|
136
|
-
},
|
|
137
|
-
required: ["url"],
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
name: "team_status",
|
|
142
|
-
description: "Get status of all agent team members.",
|
|
143
|
-
inputSchema: {
|
|
144
|
-
type: "object",
|
|
145
|
-
properties: {},
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
name: "team_message",
|
|
150
|
-
description: "Send a message to another team member agent.",
|
|
151
|
-
inputSchema: {
|
|
152
|
-
type: "object",
|
|
153
|
-
properties: {
|
|
154
|
-
targetAgentId: { type: "string", description: "Target agent ID" },
|
|
155
|
-
message: { type: "string", description: "Message to send" },
|
|
156
|
-
},
|
|
157
|
-
required: ["targetAgentId", "message"],
|
|
158
|
-
},
|
|
159
|
-
},
|
|
160
|
-
];
|
|
161
|
-
|
|
162
|
-
// ── Parent RPC Connection ───────────────────────────────────
|
|
163
|
-
|
|
164
|
-
const PARENT_RPC = process.env.QLOGICAGENT_PARENT_RPC;
|
|
165
|
-
const SESSION_ID = process.env.QLOGICAGENT_SESSION_ID || "unknown";
|
|
166
|
-
|
|
167
|
-
let parentSocket = null;
|
|
168
|
-
let rpcId = 1;
|
|
169
|
-
const pendingRpc = new Map();
|
|
170
|
-
|
|
171
|
-
function connectParent() {
|
|
172
|
-
if (!PARENT_RPC) return;
|
|
173
|
-
|
|
174
|
-
parentSocket = net.createConnection(PARENT_RPC, () => {
|
|
175
|
-
process.stderr.write(`[mcp-bridge] connected to parent: ${PARENT_RPC}\n`);
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
let buffer = "";
|
|
179
|
-
parentSocket.on("data", (chunk) => {
|
|
180
|
-
buffer += chunk.toString();
|
|
181
|
-
let nl;
|
|
182
|
-
while ((nl = buffer.indexOf("\n")) !== -1) {
|
|
183
|
-
const line = buffer.slice(0, nl).trim();
|
|
184
|
-
buffer = buffer.slice(nl + 1);
|
|
185
|
-
if (!line) continue;
|
|
186
|
-
try {
|
|
187
|
-
const msg = JSON.parse(line);
|
|
188
|
-
if (msg.id !== undefined && pendingRpc.has(msg.id)) {
|
|
189
|
-
const resolve = pendingRpc.get(msg.id);
|
|
190
|
-
pendingRpc.delete(msg.id);
|
|
191
|
-
resolve(msg);
|
|
192
|
-
}
|
|
193
|
-
} catch {
|
|
194
|
-
// ignore parse errors
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
parentSocket.on("error", (err) => {
|
|
200
|
-
process.stderr.write(`[mcp-bridge] parent connection error: ${err.message}\n`);
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
parentSocket.on("close", () => {
|
|
204
|
-
parentSocket = null;
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
function callParent(method, params) {
|
|
209
|
-
return new Promise((resolve, reject) => {
|
|
210
|
-
if (!parentSocket) {
|
|
211
|
-
reject(new Error("Not connected to parent"));
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
const id = rpcId++;
|
|
215
|
-
const msg = JSON.stringify({ jsonrpc: "2.0", id, method, params }) + "\n";
|
|
216
|
-
pendingRpc.set(id, resolve);
|
|
217
|
-
parentSocket.write(msg);
|
|
218
|
-
|
|
219
|
-
// Connector calls can legitimately run longer than a simple capability lookup.
|
|
220
|
-
setTimeout(() => {
|
|
221
|
-
if (pendingRpc.has(id)) {
|
|
222
|
-
pendingRpc.delete(id);
|
|
223
|
-
reject(new Error(`Parent RPC timeout for ${method}`));
|
|
224
|
-
}
|
|
225
|
-
}, 120_000);
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// ── MCP Stdio Protocol ──────────────────────────────────────
|
|
230
|
-
|
|
231
|
-
function sendResponse(id, result, error) {
|
|
232
|
-
const msg = { jsonrpc: "2.0", id };
|
|
233
|
-
if (error) msg.error = error;
|
|
234
|
-
else msg.result = result;
|
|
235
|
-
process.stdout.write(JSON.stringify(msg) + "\n");
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
async function handleRequest(msg) {
|
|
239
|
-
const { id, method, params } = msg;
|
|
240
|
-
|
|
241
|
-
if (method === "initialize") {
|
|
242
|
-
sendResponse(id, {
|
|
243
|
-
protocolVersion: "2024-11-05",
|
|
244
|
-
capabilities: { tools: {} },
|
|
245
|
-
serverInfo: { name: "astraclaw_capabilities", version: "1.0.0" },
|
|
246
|
-
});
|
|
247
|
-
return;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
if (method === "tools/list") {
|
|
251
|
-
sendResponse(id, { tools: TOOLS });
|
|
252
|
-
return;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
if (method === "tools/call") {
|
|
256
|
-
const toolName = params?.name;
|
|
257
|
-
const toolArgs = params?.arguments || {};
|
|
258
|
-
|
|
259
|
-
if (!toolName) {
|
|
260
|
-
sendResponse(id, null, { code: -32602, message: "Missing tool name" });
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
const knownTool = TOOLS.find((t) => t.name === toolName);
|
|
265
|
-
if (!knownTool) {
|
|
266
|
-
sendResponse(id, null, { code: -32602, message: `Unknown tool: ${toolName}` });
|
|
267
|
-
return;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
// Proxy to parent qlogicagent
|
|
271
|
-
if (!parentSocket) {
|
|
272
|
-
sendResponse(id, {
|
|
273
|
-
content: [{ type: "text", text: `Error: MCP bridge not connected to parent` }],
|
|
274
|
-
isError: true,
|
|
275
|
-
});
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
try {
|
|
280
|
-
const result = await callParent("mcp.toolCall", {
|
|
281
|
-
sessionId: SESSION_ID,
|
|
282
|
-
tool: toolName,
|
|
283
|
-
arguments: toolArgs,
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
if (result.error) {
|
|
287
|
-
sendResponse(id, {
|
|
288
|
-
content: [{ type: "text", text: `Error: ${result.error.message}` }],
|
|
289
|
-
isError: true,
|
|
290
|
-
});
|
|
291
|
-
} else {
|
|
292
|
-
const text = typeof result.result === "string"
|
|
293
|
-
? result.result
|
|
294
|
-
: JSON.stringify(result.result);
|
|
295
|
-
sendResponse(id, {
|
|
296
|
-
content: [{ type: "text", text }],
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
} catch (err) {
|
|
300
|
-
sendResponse(id, {
|
|
301
|
-
content: [{ type: "text", text: `Error: ${err.message}` }],
|
|
302
|
-
isError: true,
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
// Notification — no response needed
|
|
309
|
-
if (id === undefined) return;
|
|
310
|
-
|
|
311
|
-
sendResponse(id, null, { code: -32601, message: `Unknown method: ${method}` });
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
// ── Main ────────────────────────────────────────────────────
|
|
315
|
-
|
|
316
|
-
connectParent();
|
|
317
|
-
|
|
318
|
-
const rl = readline.createInterface({ input: process.stdin, terminal: false });
|
|
319
|
-
|
|
320
|
-
rl.on("line", (line) => {
|
|
321
|
-
const trimmed = line.trim();
|
|
322
|
-
if (!trimmed) return;
|
|
323
|
-
try {
|
|
324
|
-
const msg = JSON.parse(trimmed);
|
|
325
|
-
handleRequest(msg).catch((err) => {
|
|
326
|
-
if (msg.id !== undefined) {
|
|
327
|
-
sendResponse(msg.id, null, { code: -32603, message: err.message });
|
|
328
|
-
}
|
|
329
|
-
});
|
|
330
|
-
} catch {
|
|
331
|
-
// Malformed JSON — ignore
|
|
332
|
-
}
|
|
333
|
-
});
|
|
334
|
-
|
|
335
|
-
rl.on("close", () => {
|
|
336
|
-
if (parentSocket) parentSocket.destroy();
|
|
337
|
-
process.exit(0);
|
|
338
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ToolCatalog } from "../../runtime/ports/index.js";
|
|
2
|
-
export interface CronToolRegistrationDeps {
|
|
3
|
-
toolCatalog: ToolCatalog;
|
|
4
|
-
host: {
|
|
5
|
-
getActiveProjectRoot(): string;
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
export declare function registerCronTool({ host, toolCatalog }: CronToolRegistrationDeps): void;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { CronToolDeps } from "../../skills/tools/cron-tool.js";
|
|
2
|
-
export interface CronWorkflowServiceOptions {
|
|
3
|
-
getProjectRoot(): string;
|
|
4
|
-
idFactory?: () => string;
|
|
5
|
-
}
|
|
6
|
-
export type CronWorkflowService = CronToolDeps;
|
|
7
|
-
export declare function createCronWorkflowService(options: CronWorkflowServiceOptions): CronWorkflowService;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* messageFeedback.* RPC handlers — assistant-message 赞/踩 feedback (design §8.1–8.3).
|
|
3
|
-
*
|
|
4
|
-
* The handler assembles each FeedbackEvent's context from two backend-owned sources, so the client
|
|
5
|
-
* never has to snapshot unreliable click-time state (design §7.3):
|
|
6
|
-
* - turn telemetry (by the unified turnId): model / provider / usage / toolSummary / fileContext.
|
|
7
|
-
* - the persisted assistant message (by turnId): messagePreview + messageHash.
|
|
8
|
-
* The click-time UI increment (uiContextPatch) only fills diffOpenState + browserContext.
|
|
9
|
-
*
|
|
10
|
-
* Persistence + the idempotent state machine live in feedback-event-store; this layer validates
|
|
11
|
-
* params, performs the joins, computes telemetryStatus, and delegates.
|
|
12
|
-
*
|
|
13
|
-
* projectId is a param on all three RPCs — consistent with the sibling turnBaseline.* RPCs the
|
|
14
|
-
* frontend already calls — so the handler resolves the project deterministically without relying
|
|
15
|
-
* on ambient active-session state.
|
|
16
|
-
*/
|
|
17
|
-
import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
|
|
18
|
-
export interface MessageFeedbackHandlerHost {
|
|
19
|
-
sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
|
|
20
|
-
}
|
|
21
|
-
export declare function handleMessageFeedbackSubmit(this: MessageFeedbackHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
22
|
-
export declare function handleMessageFeedbackRetract(this: MessageFeedbackHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
23
|
-
export declare function handleMessageFeedbackState(this: MessageFeedbackHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
24
|
-
export declare function handleMessageFeedbackSummary(this: MessageFeedbackHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
25
|
-
export declare function handleMessageFeedbackMemoryCandidates(this: MessageFeedbackHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* Ship a pre-redacted batch to llmrouter (design §8.6). Not user-triggered — the redaction worker
|
|
28
|
-
* is the normal caller; this RPC exists for manual/test flushes. Events MUST already be redacted
|
|
29
|
-
* (RedactedFeedbackEvent), since llmrouter rejects un-redacted local events (§9.1 rule 4).
|
|
30
|
-
*/
|
|
31
|
-
export declare function handleMessageFeedbackUploadBatch(this: MessageFeedbackHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pet Handler — RPC methods for pet system.
|
|
3
|
-
*
|
|
4
|
-
* Methods:
|
|
5
|
-
* - pet.interact: Handle user interaction (pat/feed/poke)
|
|
6
|
-
* - pet.status: Get or initialize the shared owner pet soul + stats
|
|
7
|
-
* - pet.forge: Generate a Petdex asset summary from image/text (P4)
|
|
8
|
-
*/
|
|
9
|
-
import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
|
|
10
|
-
import type { PetRuntime } from "../pet-runtime.js";
|
|
11
|
-
interface PetMemoryActivitySummary {
|
|
12
|
-
highlights?: Array<{
|
|
13
|
-
text?: string;
|
|
14
|
-
}>;
|
|
15
|
-
}
|
|
16
|
-
interface PetMemoryProviderLike {
|
|
17
|
-
/** B3(X7)异步化:16 面 host-state proxy 方法(host 模式经 x/host.request 跨进程)。 */
|
|
18
|
-
getActivitySummary(userId: string, days: number): Promise<PetMemoryActivitySummary | undefined> | undefined;
|
|
19
|
-
}
|
|
20
|
-
interface PetSessionStateLike {
|
|
21
|
-
turnCount?: number;
|
|
22
|
-
}
|
|
23
|
-
export interface PetHandlerHost {
|
|
24
|
-
deviceId?: string;
|
|
25
|
-
sessionState?: PetSessionStateLike | null;
|
|
26
|
-
memoryProvider?: PetMemoryProviderLike | null;
|
|
27
|
-
memoryUserId?: string;
|
|
28
|
-
ownerUserId?: string;
|
|
29
|
-
petRuntime: Pick<PetRuntime, "createPetSoulGenerator" | "createSmallLLMCall"> & Partial<Pick<PetRuntime, "forgeGeneratePetdexAtlas" | "isImageGenerationAvailable" | "isPetdexForgeAvailable">>;
|
|
30
|
-
getActiveProjectRoot(): string;
|
|
31
|
-
sendNotification(method: string, params: Record<string, unknown>): void;
|
|
32
|
-
sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
|
|
33
|
-
ensureModelRegistryHydrated?(): Promise<void>;
|
|
34
|
-
configureTurnMedia?(config: Record<string, unknown> | undefined, turnId: string): void;
|
|
35
|
-
}
|
|
36
|
-
export declare function handlePetInteract(this: PetHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
37
|
-
export declare function handlePetStatus(this: PetHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
38
|
-
export declare function handlePetPreferencesUpdate(this: PetHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
39
|
-
export declare function handlePetJourneySnapshot(this: PetHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
40
|
-
export declare function handlePetJourneyList(this: PetHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
41
|
-
export declare function handlePetJourneyGet(this: PetHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
42
|
-
export declare function handlePetJourneyCatchUp(this: PetHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
43
|
-
export declare function handlePetCustomDelete(this: PetHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
44
|
-
export declare function handlePetAssetImport(this: PetHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
45
|
-
/**
|
|
46
|
-
* Pet Forge creates the backend-owned Petdex asset record from a generated atlas.
|
|
47
|
-
*/
|
|
48
|
-
export declare function handlePetForge(this: PetHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
49
|
-
export {};
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Workflow mode handlers — ACP surface for the automation workflow engine (plan M2 接入).
|
|
3
|
-
* Exposes workflow.create/get/describe/patch/run/setActive/list/delete over the same RPC host
|
|
4
|
-
* as product/solo. The engine (WorkflowController) lives in qlogicagent (D12); triggers live in
|
|
5
|
-
* the gateway (D7/B) and drive `workflow.run` over ACP.
|
|
6
|
-
*
|
|
7
|
-
* fail-loud throughout (plan §1.5): unknown id / illegal patch / missing capability all throw.
|
|
8
|
-
*/
|
|
9
|
-
import { AgentProcessManager } from "../../runtime/infra/agent-process.js";
|
|
10
|
-
import type { AcpDetector } from "../../runtime/infra/acp-detector.js";
|
|
11
|
-
import type { DelegateBridge } from "../../orchestration/delegation-coordinator.js";
|
|
12
|
-
import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
|
|
13
|
-
import { WorkflowController } from "../../orchestration/workflow/workflow-controller.js";
|
|
14
|
-
import { WorkflowStore, type WorkflowRecord } from "../../orchestration/workflow/workflow-store.js";
|
|
15
|
-
import { WorkflowRunHistoryStore } from "../../orchestration/workflow/run-history-store.js";
|
|
16
|
-
import { WorkflowScheduler } from "../../orchestration/workflow/workflow-scheduler.js";
|
|
17
|
-
import { WorkflowAuditStore } from "../../orchestration/workflow/workflow-audit-store.js";
|
|
18
|
-
import type { ToolCatalog } from "../../runtime/ports/index.js";
|
|
19
|
-
/**
|
|
20
|
-
* One fully-wired engine root. The workflow store is project-scoped on disk
|
|
21
|
-
* (`<project>/.qlogicagent/workflows/`), and "every automation = its own project" (spec D21)
|
|
22
|
-
* means the engine must serve the active project root AND every type:"automation" project
|
|
23
|
-
* root at once — so the singleton controller became this per-root bundle (multi-root,单轨).
|
|
24
|
-
*/
|
|
25
|
-
export interface WorkflowRootBundle {
|
|
26
|
-
cwd: string;
|
|
27
|
-
/** The owning project id (undefined only when the active root has no registered project). */
|
|
28
|
-
projectId?: string;
|
|
29
|
-
store: WorkflowStore;
|
|
30
|
-
controller: WorkflowController;
|
|
31
|
-
scheduler: WorkflowScheduler;
|
|
32
|
-
runHistory: WorkflowRunHistoryStore;
|
|
33
|
-
/** D38 audit trail (config/lifecycle changes; runs live in runHistory). */
|
|
34
|
-
audit: WorkflowAuditStore;
|
|
35
|
-
pm: AgentProcessManager;
|
|
36
|
-
}
|
|
37
|
-
export interface WorkflowCoordinatorHost {
|
|
38
|
-
acpDetector: AcpDetector;
|
|
39
|
-
getActiveProjectRoot(): string;
|
|
40
|
-
handleMcpToolCall(memberId: string, tool: string, args: Record<string, unknown>): Promise<unknown>;
|
|
41
|
-
sendNotification(method: string, params: Record<string, unknown>): void;
|
|
42
|
-
toolCatalog: ToolCatalog;
|
|
43
|
-
resolveClientForPurpose?: (purpose: "textGeneration") => {
|
|
44
|
-
transport: import("../provider-core-facade.js").LLMTransport;
|
|
45
|
-
apiKey: string;
|
|
46
|
-
model: string;
|
|
47
|
-
} | null;
|
|
48
|
-
/** Per-root engine bundles keyed by resolved cwd; built lazily by ensureWorkflowRoot. */
|
|
49
|
-
workflowRoots: Map<string, WorkflowRootBundle> | null;
|
|
50
|
-
/**
|
|
51
|
-
* 激活层(S3c §1.6):gateway-routed delegate 桥(gateway 在 initialize 声明 delegate 能力位时
|
|
52
|
-
* 才 isSupported;缺省/gate 关 = 旧 AgentProcessManager 本地 spawn 路径,单轨保留零回归)。
|
|
53
|
-
*/
|
|
54
|
-
getDelegateBridge?(): DelegateBridge | undefined;
|
|
55
|
-
}
|
|
56
|
-
export interface WorkflowHandlerHost extends WorkflowCoordinatorHost {
|
|
57
|
-
sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
|
|
58
|
-
}
|
|
59
|
-
/** A resolved workflow routing target: which project root an RPC operates on. */
|
|
60
|
-
interface WorkflowTarget {
|
|
61
|
-
cwd: string;
|
|
62
|
-
projectId?: string;
|
|
63
|
-
}
|
|
64
|
-
/** Build (or fetch) the engine bundle for one project root, wired to real capabilities (§1.5). */
|
|
65
|
-
export declare function ensureWorkflowRoot(this: WorkflowCoordinatorHost, target: WorkflowTarget): WorkflowRootBundle;
|
|
66
|
-
/** `workflow.approvals` — 列出全部挂起审批(刷新/重连后的拉取恢复路径;推送通知是快路径)。 */
|
|
67
|
-
export declare function handleWorkflowApprovals(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
68
|
-
/** `workflow.approve` — 人工审批决定(approved=false 即拒绝);未知/过期 id fail-loud。 */
|
|
69
|
-
export declare function handleWorkflowApprove(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
70
|
-
/**
|
|
71
|
-
* `workflow.onForm` — form 触发(D34):校验活跃 form 触发 + 必填字段,以表单值为 $trigger 起 run。
|
|
72
|
-
* attended(用户亲手填表提交)。
|
|
73
|
-
*/
|
|
74
|
-
export declare function handleWorkflowOnForm(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
75
|
-
export declare function handleWorkflowCreate(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
76
|
-
export declare function handleWorkflowGet(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
77
|
-
export declare function handleWorkflowDescribe(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
78
|
-
export declare function handleWorkflowPatch(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
79
|
-
export declare function handleWorkflowRun(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
80
|
-
/**
|
|
81
|
-
* `workflow.update` — record-level meta/def update (rename, whole-def replacement from the
|
|
82
|
-
* chat builder, concurrency). Graph micro-edits stay on workflow.patch; trigger stays a
|
|
83
|
-
* set_trigger patch op (single track each).
|
|
84
|
-
*/
|
|
85
|
-
export declare function handleWorkflowUpdate(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
86
|
-
export declare function handleWorkflowSetActive(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
87
|
-
export declare function handleWorkflowList(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
88
|
-
export declare function handleWorkflowDelete(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
89
|
-
/**
|
|
90
|
-
* `workflow.cancelRun` — stop an in-flight run (D32; engine support landed with the teammate's
|
|
91
|
-
* runId/AbortController work, this exposes it on the RPC face + a UI stop button). Cancels the
|
|
92
|
-
* newest active run when runId is omitted. fail-loud when nothing is running.
|
|
93
|
-
*/
|
|
94
|
-
export declare function handleWorkflowCancelRun(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
95
|
-
/**
|
|
96
|
-
* `workflow.dryRun` — test-run the DRAFT with an optional simulated trigger payload, WITHOUT
|
|
97
|
-
* recording into run history (D36: test runs stay out of production stats). Returns the full
|
|
98
|
-
* outcome incl. per-node trace for inspection.
|
|
99
|
-
*/
|
|
100
|
-
export declare function handleWorkflowDryRun(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
101
|
-
/** `workflow.metrics` — aggregate run history into success-rate/duration/trigger stats (D33). */
|
|
102
|
-
export declare function handleWorkflowMetrics(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
103
|
-
/** `workflow.publish` — snapshot the draft as the trigger-run version (D31). */
|
|
104
|
-
export declare function handleWorkflowPublish(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
105
|
-
/** `workflow.archive` — keep the data, kill the lifecycle (deactivate + refuse runs). */
|
|
106
|
-
export declare function handleWorkflowArchive(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
107
|
-
export declare function handleCredentialList(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
108
|
-
export declare function handleCredentialCreate(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
109
|
-
export declare function handleCredentialDelete(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
110
|
-
/**
|
|
111
|
-
* `credential.oauthStart` — create an oauth2 credential (config persisted, token pending) and
|
|
112
|
-
* return the authorize URL the UI opens in the browser. The gateway's /api/oauth/callback lands
|
|
113
|
-
* the code on credential.oauthComplete.
|
|
114
|
-
*/
|
|
115
|
-
export declare function handleCredentialOauthStart(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
116
|
-
/** `credential.oauthComplete` — exchange the authorization code and store tokens in the vault. */
|
|
117
|
-
export declare function handleCredentialOauthComplete(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
118
|
-
/**
|
|
119
|
-
* `workflow.setPermissionScope` — the owner's explicit unattended capability grant (D30):
|
|
120
|
-
* which sensitive kinds this workflow may run under schedule/im/webhook triggers.
|
|
121
|
-
*/
|
|
122
|
-
export declare function handleWorkflowSetPermissionScope(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
123
|
-
/**
|
|
124
|
-
* `workflow.capabilities` — enumerate the real agents/tools/skills/mcp/memory a workflow in the
|
|
125
|
-
* target project can reference (single source of truth, five consumers: AI builder prompt,
|
|
126
|
-
* "+" suggestions, advanced node library, config dropdowns, Hub requires checks). Channels are
|
|
127
|
-
* gateway-owned: the gateway merges its channel registry into this response in ws-server.
|
|
128
|
-
*/
|
|
129
|
-
export declare function handleWorkflowCapabilities(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
130
|
-
/** `workflow.export` — serialize one workflow as a sanitized portable bundle (no credentials). */
|
|
131
|
-
export declare function handleWorkflowExport(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
132
|
-
/**
|
|
133
|
-
* `workflow.import` — materialize a portable bundle (or raw n8n JSON, format:"n8n") into a target
|
|
134
|
-
* project. The caller creates/owns the project (frontend: WorkspaceStep → POST /api/projects);
|
|
135
|
-
* this RPC only lands the workflow. fail-loud on malformed payloads (§1.5).
|
|
136
|
-
*/
|
|
137
|
-
export declare function handleWorkflowImport(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
138
|
-
/**
|
|
139
|
-
* `workflow.duplicate` — copy a workflow (same graph/trigger, fresh id, inactive) into a target
|
|
140
|
-
* project: export→import in-process (one serialization path, spec D23). 复制/另存为 both land here.
|
|
141
|
-
*/
|
|
142
|
-
export declare function handleWorkflowDuplicate(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
143
|
-
export declare function handleWorkflowOnImMessage(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
144
|
-
export declare function handleWorkflowOnWebhook(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
145
|
-
/**
|
|
146
|
-
* `workflow.onIntent` — fire an intent-triggered run (spec D22). The MATCH already happened
|
|
147
|
-
* (deterministic phrases client-side; semantic fallback via x/workflow.matchIntent) and the user
|
|
148
|
-
* confirmed; this entry point only verifies the workflow really has an ACTIVE intent trigger
|
|
149
|
-
* (fail-loud otherwise — a stale client must not run a disarmed workflow) and starts the run with
|
|
150
|
-
* the utterance as `$trigger` payload.
|
|
151
|
-
*/
|
|
152
|
-
export declare function handleWorkflowOnIntent(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
153
|
-
/** All ACTIVE intent-triggered workflows across the active root + automation projects (D22 索引源). */
|
|
154
|
-
export declare function collectActiveIntentWorkflows(this: WorkflowCoordinatorHost): Promise<Array<{
|
|
155
|
-
workflowId: string;
|
|
156
|
-
projectId?: string;
|
|
157
|
-
name: string;
|
|
158
|
-
trigger: Extract<NonNullable<WorkflowRecord["trigger"]>, {
|
|
159
|
-
type: "intent";
|
|
160
|
-
}>;
|
|
161
|
-
sideEffectKinds: string[];
|
|
162
|
-
}>>;
|
|
163
|
-
/**
|
|
164
|
-
* `workflow.intentIndex` — the deterministic-match index the CLIENT consumes (phrases/aliases/
|
|
165
|
-
* confirm/surfaces per active intent workflow). The frontend matches utterances locally with zero
|
|
166
|
-
* latency (spec D22); semantic fallback goes through x/workflow.matchIntent.
|
|
167
|
-
*/
|
|
168
|
-
export declare function handleWorkflowIntentIndex(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
169
|
-
/** `workflow.revisions` — newest-first def-revision summaries for the undo/history UI. */
|
|
170
|
-
export declare function handleWorkflowRevisions(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
171
|
-
/** `workflow.revert` — re-apply a stored revision as a NEW rev (git-revert semantics). */
|
|
172
|
-
export declare function handleWorkflowRevert(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
173
|
-
/**
|
|
174
|
-
* `workflow.audit` — newest-first config/lifecycle audit entries (D38: who did what when).
|
|
175
|
-
* Runs are NOT here (runHistory is the run audit); a timeline UI merges both.
|
|
176
|
-
*/
|
|
177
|
-
export declare function handleWorkflowAudit(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
178
|
-
/** `workflow.runs` — newest-first run summaries (status/trigger/timing; outputs stay behind runDetail). */
|
|
179
|
-
export declare function handleWorkflowRuns(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
180
|
-
/** `workflow.runDetail` — one run incl. per-node output previews (画布点节点看产出). */
|
|
181
|
-
export declare function handleWorkflowRunDetail(this: WorkflowHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
182
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../skills/portable-tool.js";
|
|
2
|
-
export interface LocalWorkflowToolRegistrationContext {
|
|
3
|
-
tools: PortableTool<any>[];
|
|
4
|
-
activeProjectRoot(): string;
|
|
5
|
-
}
|
|
6
|
-
export declare const localWorkflowToolRegistrationModule: import("../runtime/ports/tool-contracts.js").ToolRegistrationModule<LocalWorkflowToolRegistrationContext>;
|
|
7
|
-
export declare function registerLocalWorkflowTools(context: LocalWorkflowToolRegistrationContext): void;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { AgentRpcError } from "../protocol/wire/index.js";
|
|
2
|
-
import type { MultiAgentHandlerHost } from "./multi-agent-handler-host.js";
|
|
3
|
-
import type { WorkflowHandlerHost } from "./handlers/workflow-handler.js";
|
|
4
|
-
/**
|
|
5
|
-
* WorkflowHostAdapter — the host the legacy `workflow.*` JSON-RPC domain binds to.
|
|
6
|
-
*
|
|
7
|
-
* The workflow handlers (workflow.create/run/list/onImMessage/onWebhook/…) need MORE than the
|
|
8
|
-
* agents/solo/product sub-host provides: `toolCatalog` (workflow `tool` nodes look up real
|
|
9
|
-
* qlogicagent tools via `findTool`) plus the lazy engine slots that `ensureWorkflowController`
|
|
10
|
-
* fills (controller/store/scheduler/processManager). The multi-agent sub-host has neither, so
|
|
11
|
-
* binding workflow there left `this.toolCatalog` undefined — a workflow `tool` node would throw
|
|
12
|
-
* "Cannot read properties of undefined (reading 'findTool')" at run time. This adapter supplies
|
|
13
|
-
* the missing pieces explicitly, mirroring createDreamHostAdapter / createAcpExtendedHostAdapter.
|
|
14
|
-
*
|
|
15
|
-
* `acpDetector` is sourced from the multi-agent sub-host so workflow `agent` nodes resolve the same
|
|
16
|
-
* canonical external descriptors that the `agents.*` domain configures. The engine slots are plain
|
|
17
|
-
* own-properties this (per-agent singleton) adapter owns and `ensureWorkflowController` mutates once;
|
|
18
|
-
* keeping them here means the controller it publishes via setWorkflowController stays a singleton and
|
|
19
|
-
* the multi-agent sub-host is no longer polluted with workflow state.
|
|
20
|
-
*/
|
|
21
|
-
export interface WorkflowHostAdapterDeps {
|
|
22
|
-
multiAgentHost: MultiAgentHandlerHost;
|
|
23
|
-
getActiveProjectRoot(): string;
|
|
24
|
-
getToolCatalog(): WorkflowHandlerHost["toolCatalog"];
|
|
25
|
-
handleMcpToolCall: WorkflowHandlerHost["handleMcpToolCall"];
|
|
26
|
-
sendNotification(method: string, params: Record<string, unknown>): void;
|
|
27
|
-
sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
|
|
28
|
-
/** 激活层(S3c §1.6):gateway-routed delegate 桥(懒读;gateway 未声明 delegate 能力位时 undefined)。 */
|
|
29
|
-
getDelegateBridge?: WorkflowHandlerHost["getDelegateBridge"];
|
|
30
|
-
}
|
|
31
|
-
export declare function createWorkflowHostAdapter(deps: WorkflowHostAdapterDeps): WorkflowHandlerHost;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Process-level WorkflowController singleton (single-track, D17 "one store / one engine").
|
|
3
|
-
*
|
|
4
|
-
* The ACP workflow-handler builds the fully-wired controller (real ExecutorHost: agent/tool/mcp)
|
|
5
|
-
* and publishes it here. The agent-facing `workflow` tool resolves the same instance so authoring
|
|
6
|
-
* (create/patch) and running share one engine + one store. When the engine has not been
|
|
7
|
-
* initialized (e.g. a bare CLI tool turn before any ACP workflow call), callers that only need
|
|
8
|
-
* authoring can fall back to a store-only controller; `run` fail-louds (no silent no-op).
|
|
9
|
-
*/
|
|
10
|
-
import type { WorkflowController } from "./workflow-controller.js";
|
|
11
|
-
/** Publish the fully-wired controller (called by ensureWorkflowController). */
|
|
12
|
-
export declare function setWorkflowController(ctrl: WorkflowController): void;
|
|
13
|
-
/** The live, run-capable controller, or null if the engine has not been initialized yet. */
|
|
14
|
-
export declare function getWorkflowController(): WorkflowController | null;
|