qlogicagent 2.16.3 → 2.16.5
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 +2 -11
- package/dist/agent.js +20 -21
- package/dist/cli.js +517 -382
- package/dist/index.js +516 -381
- package/dist/orchestration.js +12 -13
- package/dist/protocol.js +1 -1
- package/dist/types/agent/tool-loop/completion-action-policy.d.ts +3 -1
- package/dist/types/agent/tool-loop.d.ts +12 -1
- package/dist/types/agent/types.d.ts +2 -2
- package/dist/types/cli/acp-extended-handlers.d.ts +25 -0
- package/dist/types/cli/agent-runtime-bootstrap.d.ts +0 -2
- package/dist/types/cli/community-resource-installer.d.ts +5 -3
- package/dist/types/cli/core-tools/fork-system-prompt.d.ts +0 -2
- package/dist/types/cli/core-tools/registry.d.ts +1 -2
- package/dist/types/cli/core-tools/session-tool-manifest.d.ts +0 -2
- package/dist/types/cli/handlers/community-handler.d.ts +4 -0
- package/dist/types/cli/handlers/goal-handler.d.ts +54 -0
- package/dist/types/cli/handlers/turn-handler.d.ts +0 -1
- package/dist/types/cli/skill-invocation-service.d.ts +6 -0
- package/dist/types/cli/{skill-meta-tool-bootstrap.d.ts → skill-tools-bootstrap.d.ts} +6 -12
- package/dist/types/cli/stdio-agent-session-bootstrap.d.ts +0 -1
- package/dist/types/cli/tool-bootstrap-core-registration.d.ts +1 -9
- package/dist/types/cli/tool-bootstrap.d.ts +0 -2
- package/dist/types/contracts/turn-event.d.ts +1 -1
- package/dist/types/orchestration/agent-instance.d.ts +19 -2
- package/dist/types/orchestration/delegation-coordinator.d.ts +43 -0
- package/dist/types/orchestration/goal-acceptance.d.ts +20 -0
- package/dist/types/orchestration/goal-loop-coordinator.d.ts +87 -0
- package/dist/types/orchestration/goal-mode-adapters.d.ts +94 -0
- package/dist/types/orchestration/goal-run-persistence.d.ts +15 -0
- package/dist/types/orchestration/goal-run-types.d.ts +112 -0
- package/dist/types/orchestration/index.d.ts +1 -1
- package/dist/types/orchestration/skill-improvement.d.ts +1 -21
- package/dist/types/orchestration/subagent/agent-registry.d.ts +1 -1
- package/dist/types/orchestration/workflow/host-executors.d.ts +1 -1
- package/dist/types/orchestration/workflow/node-schema.d.ts +3 -3
- package/dist/types/orchestration/workflow/qla-executor-host.d.ts +2 -2
- package/dist/types/orchestration/workflow/workflow-scheduler.d.ts +1 -1
- package/dist/types/protocol/methods.d.ts +0 -3
- package/dist/types/protocol/wire/acp-agent-management.d.ts +33 -1
- package/dist/types/protocol/wire/acp-protocol.d.ts +17 -2
- package/dist/types/protocol/wire/agent-events.d.ts +2 -2
- package/dist/types/protocol/wire/agent-methods.d.ts +0 -2
- package/dist/types/protocol/wire/notification-payloads.d.ts +36 -20
- package/dist/types/runtime/community/community-pet-publisher.d.ts +21 -24
- package/dist/types/runtime/community/community-signal-reporter.d.ts +0 -14
- package/dist/types/runtime/config/tunable-defaults.d.ts +0 -21
- package/dist/types/runtime/hooks/community-discovery-hook.d.ts +18 -0
- package/dist/types/runtime/infra/acp-protocol-adapter.d.ts +2 -2
- package/dist/types/runtime/infra/agent-install-runner.d.ts +1 -1
- package/dist/types/runtime/infra/llmrouter-catalog.d.ts +10 -0
- package/dist/types/runtime/infra/skill-resolver.d.ts +1 -1
- package/dist/types/runtime/pet/pet-community-assets.d.ts +16 -11
- package/dist/types/runtime/pet/pet-profile-service.d.ts +2 -2
- package/dist/types/runtime/pet/petdex-asset.d.ts +28 -0
- package/dist/types/runtime/ports/tool-contracts.d.ts +1 -10
- package/dist/types/runtime/prompt/environment-context.d.ts +8 -32
- package/dist/types/runtime/tasks/task-types.d.ts +2 -32
- package/dist/types/skills/permissions/hook-runner.d.ts +0 -22
- package/dist/types/skills/plugins/plugin-api.d.ts +1 -1
- package/dist/types/skills/portable-tool.d.ts +2 -8
- package/dist/types/skills/tools/skill-tool.d.ts +57 -22
- package/dist/types/skills/tools.d.ts +5 -39
- package/dist/types/transport/acp-server.d.ts +13 -1
- package/package.json +1 -2
- package/dist/types/cli/core-tools/team-registry.d.ts +0 -62
- package/dist/types/cli/core-tools/team-tool-bootstrap.d.ts +0 -11
- package/dist/types/cli/core-tools/team-tool-service.d.ts +0 -43
- package/dist/types/cli/skill-meta-subturn-service.d.ts +0 -26
- package/dist/types/runtime/hooks/skill-recall-hooks.d.ts +0 -37
- package/dist/types/runtime/sandbox/skill-sandbox.d.ts +0 -53
- package/dist/types/runtime/sandbox/windows-skill-sandbox.d.ts +0 -78
- package/dist/types/skills/permissions/community-sandbox-policy.d.ts +0 -3
- package/dist/types/skills/permissions/community-sandbox-red-team-cli.d.ts +0 -7
- package/dist/types/skills/permissions/community-sandbox-red-team.d.ts +0 -32
- package/dist/types/skills/tools/team-tool.d.ts +0 -152
- package/dist/types/skills/tools/tool-search-tool.d.ts +0 -75
- package/dist/types/skills/tools/tool-selection-eval.d.ts +0 -49
- package/dist/types/skills/tools/tool-selection-eval.dataset.d.ts +0 -5
- package/dist/types/skills/tools/tool-selection-eval.tasks.d.ts +0 -9
|
@@ -107,10 +107,10 @@ export interface ExecutorContext {
|
|
|
107
107
|
signal?: AbortSignal;
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
|
-
* Capabilities the HOST (
|
|
110
|
+
* Capabilities the HOST (xiaozhiclaw gateway, or the qlogicagent CLI host) provides to back node
|
|
111
111
|
* kinds the engine cannot fulfil on its own. The engine stays a pure executor (plan D12/D13):
|
|
112
112
|
* agent/tool/mcp/http are qlogicagent-owned host capabilities; channel/IM call back into the
|
|
113
|
-
*
|
|
113
|
+
* xiaozhiclaw channel layer. fail-loud: a host-backed kind with no host throws.
|
|
114
114
|
*/
|
|
115
115
|
export interface ExecutorHost {
|
|
116
116
|
/** Run an agent turn. Returns the agent's structured output as DataItem(s). */
|
|
@@ -123,7 +123,7 @@ export interface ExecutorHost {
|
|
|
123
123
|
httpRequest(req: HttpHostRequest): Promise<DataItem[]>;
|
|
124
124
|
/** Invoke an MCP server tool. */
|
|
125
125
|
invokeMcp(req: McpHostRequest): Promise<DataItem[]>;
|
|
126
|
-
/** Send a message out through a channel (飞书/微信/…) via the
|
|
126
|
+
/** Send a message out through a channel (飞书/微信/…) via the xiaozhiclaw channel layer. */
|
|
127
127
|
sendChannel(req: ChannelHostRequest): Promise<DataItem[]>;
|
|
128
128
|
/** Project-scoped memory (memdir) read/write/search for the `memory` kind (spec D25). */
|
|
129
129
|
memory?(req: MemoryHostRequest): Promise<DataItem[]>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* with qlogicagent's actual capabilities. No mocks, no stubs (plan §1.5).
|
|
4
4
|
*
|
|
5
5
|
* Boundary capabilities (runAgent / invokeMcp / sendChannel) are injected so this file stays
|
|
6
|
-
* decoupled from the handler host that owns processManager/acpDetector and the
|
|
6
|
+
* decoupled from the handler host that owns processManager/acpDetector and the xiaozhiclaw channel
|
|
7
7
|
* callback. Tool invocation goes straight through the single-source-of-truth tool registry
|
|
8
8
|
* (`findTool`). fail-loud everywhere: unknown tool, missing channel host, or any rejection throws.
|
|
9
9
|
*/
|
|
@@ -32,7 +32,7 @@ export interface QlaExecutorHostDeps {
|
|
|
32
32
|
signal?: AbortSignal;
|
|
33
33
|
}) => Promise<unknown>;
|
|
34
34
|
/**
|
|
35
|
-
* Send a message out through a channel via the
|
|
35
|
+
* Send a message out through a channel via the xiaozhiclaw channel layer.
|
|
36
36
|
* Undefined in standalone qlogicagent (no gateway) → channel nodes fail-loud (D12/D13).
|
|
37
37
|
*/
|
|
38
38
|
sendChannel?: (req: {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* In-process workflow trigger scheduler (plan M3 trigger layer).
|
|
3
3
|
*
|
|
4
4
|
* Architecture note: scheduling lives INSIDE qlogicagent, not the gateway. This mirrors the
|
|
5
|
-
* established precedent — the idle "dream" timer was deliberately moved out of the
|
|
5
|
+
* established precedent — the idle "dream" timer was deliberately moved out of the xiaozhiclaw gateway
|
|
6
6
|
* into qlogicagent so the Agent owns its own timed lifecycle ("Agent 是唯一状态拥有者"). The gateway
|
|
7
7
|
* remains a pure relay: it terminates external ingress (webhook HTTP, inbound IM) and forwards those
|
|
8
8
|
* events here via `onWebhook` / `onImMessage`; the cron clock and the run decision are the Agent's.
|
|
@@ -170,8 +170,6 @@ export interface MemoryDreamResult {
|
|
|
170
170
|
export interface ToolsListParams {
|
|
171
171
|
/** Filter by category. */
|
|
172
172
|
category?: ToolCapabilityCategory;
|
|
173
|
-
/** Include tools that are normally deferred until activated. */
|
|
174
|
-
includeDeferred?: boolean;
|
|
175
173
|
/** Include tools that are installed but currently disabled by provider/config availability. */
|
|
176
174
|
includeUnavailable?: boolean;
|
|
177
175
|
}
|
|
@@ -186,7 +184,6 @@ export interface ToolsListResult {
|
|
|
186
184
|
fallbackDescription: string;
|
|
187
185
|
description: string;
|
|
188
186
|
source: "builtin";
|
|
189
|
-
deferred: boolean;
|
|
190
187
|
enabled?: boolean;
|
|
191
188
|
parameters?: Record<string, unknown>;
|
|
192
189
|
}>;
|
|
@@ -60,7 +60,7 @@ export interface AgentInstallSpec {
|
|
|
60
60
|
/** Official docs / source URL (shown in the install confirmation). */
|
|
61
61
|
docsUrl: string;
|
|
62
62
|
/**
|
|
63
|
-
* Self/host-platform agents (e.g.
|
|
63
|
+
* Self/host-platform agents (e.g. xiaozhiclaw) whose in-place UPDATE would disrupt the running session
|
|
64
64
|
* (the engine bridges to a live instance). When already installed, the update runs DETACHED in the
|
|
65
65
|
* background instead of as a child of the engine, and takes effect on the agent's next startup.
|
|
66
66
|
*/
|
|
@@ -421,6 +421,38 @@ export interface ProductReplayParams {
|
|
|
421
421
|
productId: string;
|
|
422
422
|
taskId: string;
|
|
423
423
|
}
|
|
424
|
+
/** x/goal.start RPC params — launch a long-horizon goal run (instant, returns goalRunId). */
|
|
425
|
+
export interface GoalStartParams {
|
|
426
|
+
goal: string;
|
|
427
|
+
cwd?: string;
|
|
428
|
+
agentPool?: string[];
|
|
429
|
+
leaderAgentId?: string;
|
|
430
|
+
}
|
|
431
|
+
/** x/goal.status / x/goal.pause / x/goal.stop RPC params. */
|
|
432
|
+
export interface GoalIdParams {
|
|
433
|
+
goalRunId: string;
|
|
434
|
+
}
|
|
435
|
+
/** x/goal.resume RPC params — optionally update the goal on resume. */
|
|
436
|
+
export interface GoalResumeParams {
|
|
437
|
+
goalRunId: string;
|
|
438
|
+
newGoal?: string;
|
|
439
|
+
}
|
|
440
|
+
/** x/goal.updateGoal RPC params. */
|
|
441
|
+
export interface GoalUpdateGoalParams {
|
|
442
|
+
goalRunId: string;
|
|
443
|
+
newGoal: string;
|
|
444
|
+
}
|
|
445
|
+
/** x/goal.message RPC params — queue a steering message for the next phase boundary. */
|
|
446
|
+
export interface GoalMessageParams {
|
|
447
|
+
goalRunId: string;
|
|
448
|
+
text: string;
|
|
449
|
+
}
|
|
450
|
+
/** x/goal.events RPC params — page the event log from `fromSeq`. */
|
|
451
|
+
export interface GoalEventsParams {
|
|
452
|
+
goalRunId: string;
|
|
453
|
+
fromSeq?: number;
|
|
454
|
+
limit?: number;
|
|
455
|
+
}
|
|
424
456
|
/** Runtime instance state. */
|
|
425
457
|
export interface ProductInstanceStatus {
|
|
426
458
|
instanceId: string;
|
|
@@ -41,6 +41,18 @@ export declare const ACP_EXTENDED_METHODS: {
|
|
|
41
41
|
readonly WORKFLOW_CHAT: "x/workflow.chat";
|
|
42
42
|
readonly WORKFLOW_MATCH_INTENT: "x/workflow.matchIntent";
|
|
43
43
|
readonly PRODUCT_SUBSCRIBE: "x/product.subscribe";
|
|
44
|
+
readonly GOAL_START: "x/goal.start";
|
|
45
|
+
readonly GOAL_STATUS: "x/goal.status";
|
|
46
|
+
readonly GOAL_PAUSE: "x/goal.pause";
|
|
47
|
+
readonly GOAL_RESUME: "x/goal.resume";
|
|
48
|
+
readonly GOAL_UPDATE_GOAL: "x/goal.updateGoal";
|
|
49
|
+
readonly GOAL_STOP: "x/goal.stop";
|
|
50
|
+
readonly GOAL_MESSAGE: "x/goal.message";
|
|
51
|
+
readonly GOAL_SUBSCRIBE: "x/goal.subscribe";
|
|
52
|
+
readonly GOAL_EVENTS: "x/goal.events";
|
|
53
|
+
readonly MENTION_DELEGATE: "x/mention.delegate";
|
|
54
|
+
readonly MENTION_CANCEL: "x/mention.cancel";
|
|
55
|
+
readonly MENTION_LIST: "x/mention.list";
|
|
44
56
|
};
|
|
45
57
|
export type AcpExtendedMethod = (typeof ACP_EXTENDED_METHODS)[keyof typeof ACP_EXTENDED_METHODS];
|
|
46
58
|
/** qlogicagent 专属扩展套件的协商开关(host 与 agent 双向声明)。存在即启用扩展。 */
|
|
@@ -56,7 +68,7 @@ export interface AcpQlogicagentCapability {
|
|
|
56
68
|
/** Config options (agent side only). */
|
|
57
69
|
configOptions?: AcpConfigOptionDescriptor[];
|
|
58
70
|
}
|
|
59
|
-
/** Host (
|
|
71
|
+
/** Host (xiaozhiclaw / AionUI) capabilities declared at initialize. */
|
|
60
72
|
export interface AcpHostCapabilities {
|
|
61
73
|
/** Standard ACP (server does not consume this round; typed to match real hosts). */
|
|
62
74
|
fs?: {
|
|
@@ -116,7 +128,7 @@ export interface AcpSessionMeta {
|
|
|
116
128
|
temperature?: number;
|
|
117
129
|
maxRounds?: number;
|
|
118
130
|
/** Skills the user explicitly pinned for this turn (scope:name or name). The turn pipeline
|
|
119
|
-
* force-loads each one's SKILL.md, identically to the `
|
|
131
|
+
* force-loads each one's SKILL.md, identically to the `skill_view` tool (cc-parity). */
|
|
120
132
|
activeSkills?: string[];
|
|
121
133
|
}
|
|
122
134
|
export interface AcpSessionNewParams {
|
|
@@ -168,6 +180,9 @@ export interface AcpSessionPromptParams {
|
|
|
168
180
|
export interface AcpSessionPromptResult {
|
|
169
181
|
/** Stop reason (required by ACP standard). */
|
|
170
182
|
stopReason: AcpStopReason;
|
|
183
|
+
/** Final assistant text for the turn (non-standard extension; emitted on end_turn). Lets the host
|
|
184
|
+
* read the completed message alongside the streamed session/update chunks. */
|
|
185
|
+
content?: string;
|
|
171
186
|
/** Token usage for this turn. */
|
|
172
187
|
usage?: AcpUsage;
|
|
173
188
|
/** Model that actually ran the turn (agent-resolved). Lets the host attribute
|
|
@@ -18,12 +18,12 @@ export declare const AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta",
|
|
|
18
18
|
* Agent Team events (Solo Mode, Product Mode, Plan lifecycle).
|
|
19
19
|
* Relayed to the UI's team/orchestration panel.
|
|
20
20
|
*/
|
|
21
|
-
export declare const AGENT_TEAM_WS_EVENT_NAMES: readonly ["solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted"];
|
|
21
|
+
export declare const AGENT_TEAM_WS_EVENT_NAMES: readonly ["solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "goal.run_state_changed", "goal.phase_boundary", "goal.goal_edited", "goal.message_queued", "goal.acceptance_updated"];
|
|
22
22
|
/**
|
|
23
23
|
* All agent notifications that Gateway should relay to WS clients.
|
|
24
24
|
* Union of session events + team events.
|
|
25
25
|
*/
|
|
26
|
-
export declare const ALL_AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_ended", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "memory.updated", "skills.updated", "pet.soul_ready", "pet.reaction", "pet.growth", "pet.state", "pet.confirm", "pet.asset.updated", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested", "solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted"];
|
|
26
|
+
export declare const ALL_AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.skill_instruction", "turn.ask_user", "turn.media_result", "turn.media_progress", "turn.media_usage", "turn.media_capability_check", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_ended", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "memory.updated", "skills.updated", "pet.soul_ready", "pet.reaction", "pet.growth", "pet.state", "pet.confirm", "pet.asset.updated", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested", "solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "goal.run_state_changed", "goal.phase_boundary", "goal.goal_edited", "goal.message_queued", "goal.acceptance_updated"];
|
|
27
27
|
/** Type-level event name for session events. */
|
|
28
28
|
export type AgentWsEventName = (typeof AGENT_WS_EVENT_NAMES)[number];
|
|
29
29
|
/** Type-level event name for team events. */
|
|
@@ -342,7 +342,6 @@ export interface AgentRpcMethodMap extends GatewayRpcMethodMap {
|
|
|
342
342
|
"tools.list": {
|
|
343
343
|
params: {
|
|
344
344
|
category?: ToolCapabilityCategory;
|
|
345
|
-
includeDeferred?: boolean;
|
|
346
345
|
};
|
|
347
346
|
result: {
|
|
348
347
|
tools: Array<{
|
|
@@ -355,7 +354,6 @@ export interface AgentRpcMethodMap extends GatewayRpcMethodMap {
|
|
|
355
354
|
fallbackDescription: string;
|
|
356
355
|
description: string;
|
|
357
356
|
source: "builtin";
|
|
358
|
-
deferred: boolean;
|
|
359
357
|
parameters?: Record<string, unknown>;
|
|
360
358
|
}>;
|
|
361
359
|
total: number;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Agent Notification Payload Types — wire-format contract for all JSON-RPC notifications.
|
|
3
3
|
*
|
|
4
4
|
* These types define the exact shape of `params` in every notification the agent emits.
|
|
5
|
-
* Consumers (
|
|
5
|
+
* Consumers (xiaozhiclaw UI, Hub relay, Electron, test harness) import from here
|
|
6
6
|
* to get type-safe access to event payloads without depending on agent internals.
|
|
7
7
|
*
|
|
8
8
|
* Design: Agent's protocol/notifications.ts re-exports these; adding a new event =
|
|
@@ -279,7 +279,7 @@ export interface TurnToolUseSummaryNotification {
|
|
|
279
279
|
export interface TurnToolSelectionPolicyNotification {
|
|
280
280
|
turnId: string;
|
|
281
281
|
policyId: string;
|
|
282
|
-
intent: "benchmark_state_maintenance" | "fresh_evidence" | "verification" | "final_answer" | "
|
|
282
|
+
intent: "benchmark_state_maintenance" | "fresh_evidence" | "verification" | "final_answer" | "tool_recovery" | "lifecycle_reconciliation";
|
|
283
283
|
reason: string;
|
|
284
284
|
availableToolNames: string[];
|
|
285
285
|
enabledToolNamesBefore: string[];
|
|
@@ -795,22 +795,6 @@ export interface TaskUpdatedNotification {
|
|
|
795
795
|
lifecycle: string;
|
|
796
796
|
label?: string;
|
|
797
797
|
}
|
|
798
|
-
/** Team member state changed (idle/busy/error/exited). */
|
|
799
|
-
export interface TeamMemberStateNotification {
|
|
800
|
-
memberId: string;
|
|
801
|
-
state: string;
|
|
802
|
-
}
|
|
803
|
-
/** Team created/destroyed. */
|
|
804
|
-
export interface TeamUpdatedNotification {
|
|
805
|
-
teamName: string;
|
|
806
|
-
action: string;
|
|
807
|
-
members: Array<{
|
|
808
|
-
agentName: string;
|
|
809
|
-
role: string;
|
|
810
|
-
worktreePath?: string;
|
|
811
|
-
pid?: number;
|
|
812
|
-
}>;
|
|
813
|
-
}
|
|
814
798
|
/** Emitted when pet soul is hatched/ready. */
|
|
815
799
|
export interface PetSoulReadyNotification {
|
|
816
800
|
name: string;
|
|
@@ -929,6 +913,35 @@ export interface WorkflowRunFailedNotification {
|
|
|
929
913
|
error: string;
|
|
930
914
|
outcome?: unknown;
|
|
931
915
|
}
|
|
916
|
+
export interface GoalRunStateChangedNotification {
|
|
917
|
+
goalRunId: string;
|
|
918
|
+
status: "running" | "ended";
|
|
919
|
+
pauseState: "running" | "draining" | "paused";
|
|
920
|
+
endReason?: "done" | "stopped" | "failed";
|
|
921
|
+
}
|
|
922
|
+
export interface GoalPhaseBoundaryNotification {
|
|
923
|
+
goalRunId: string;
|
|
924
|
+
phaseIndex: number;
|
|
925
|
+
deltas: {
|
|
926
|
+
criterionId: string;
|
|
927
|
+
newStatus: string;
|
|
928
|
+
}[];
|
|
929
|
+
nextPreview?: string;
|
|
930
|
+
migrationNote?: string;
|
|
931
|
+
}
|
|
932
|
+
export interface GoalGoalEditedNotification {
|
|
933
|
+
goalRunId: string;
|
|
934
|
+
newVersion: number;
|
|
935
|
+
}
|
|
936
|
+
export interface GoalMessageQueuedNotification {
|
|
937
|
+
goalRunId: string;
|
|
938
|
+
queuedCount: number;
|
|
939
|
+
}
|
|
940
|
+
export interface GoalAcceptanceUpdatedNotification {
|
|
941
|
+
goalRunId: string;
|
|
942
|
+
criterionId: string;
|
|
943
|
+
status: string;
|
|
944
|
+
}
|
|
932
945
|
export interface NotificationMethodMap {
|
|
933
946
|
"turn.start": TurnStartNotification;
|
|
934
947
|
"turn.delta": TurnDeltaNotification;
|
|
@@ -973,8 +986,6 @@ export interface NotificationMethodMap {
|
|
|
973
986
|
"session.info": SessionInfoNotification;
|
|
974
987
|
"permission.rule_updated": PermissionRuleUpdatedNotification;
|
|
975
988
|
"team.member.notification": TeamMemberNotification;
|
|
976
|
-
"team.member.state": TeamMemberStateNotification;
|
|
977
|
-
"team.updated": TeamUpdatedNotification;
|
|
978
989
|
"turn.usage_update": TurnUsageUpdateNotification;
|
|
979
990
|
"pong": PongNotification;
|
|
980
991
|
"agents.status": AgentsStatusNotification;
|
|
@@ -1003,6 +1014,11 @@ export interface NotificationMethodMap {
|
|
|
1003
1014
|
"product.planFailed": ProductPlanFailedNotification;
|
|
1004
1015
|
"product.planningDelta": ProductPlanningDeltaNotification;
|
|
1005
1016
|
"plan.interrupted": PlanInterruptedNotification;
|
|
1017
|
+
"goal.run_state_changed": GoalRunStateChangedNotification;
|
|
1018
|
+
"goal.phase_boundary": GoalPhaseBoundaryNotification;
|
|
1019
|
+
"goal.goal_edited": GoalGoalEditedNotification;
|
|
1020
|
+
"goal.message_queued": GoalMessageQueuedNotification;
|
|
1021
|
+
"goal.acceptance_updated": GoalAcceptanceUpdatedNotification;
|
|
1006
1022
|
"project.created": ProjectCreatedNotification;
|
|
1007
1023
|
"project.switched": ProjectSwitchedNotification;
|
|
1008
1024
|
"project.deleted": ProjectDeletedNotification;
|
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
import type { CommunityConsentClient, CommunityPublishSkillResult } from "./community-consent-client.js";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Publish payload for a petdex pet: identity + safety-checked text, plus the prebuilt
|
|
4
|
+
* registry manifest and gzipped `.petdex` blob (built by buildPetdexPublishPayload in the
|
|
5
|
+
* pet module, so this stays free of pet packaging/IO knowledge).
|
|
6
|
+
*/
|
|
7
|
+
export interface PetAssetPublishInput {
|
|
3
8
|
id: string;
|
|
4
9
|
name: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
kind: string;
|
|
10
|
-
path: string;
|
|
11
|
-
}>;
|
|
10
|
+
description: string;
|
|
11
|
+
manifest: Record<string, unknown>;
|
|
12
|
+
version: string;
|
|
13
|
+
packageGzipBase64: string;
|
|
12
14
|
visibility?: "public" | "private";
|
|
13
15
|
tags?: string[];
|
|
14
16
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}[];
|
|
27
|
-
tags: string[];
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
export declare function publishCommunityPetAsset(client: Pick<CommunityConsentClient, "getConsent" | "publishPet">, input: CommunityPetPublishInput): Promise<CommunityPublishSkillResult>;
|
|
17
|
+
/**
|
|
18
|
+
* Pets are display-only sprite data, but their visible name/description still ship to the
|
|
19
|
+
* registry — keep the §11 safety gate: block private data leaks and any claim of agent powers.
|
|
20
|
+
*/
|
|
21
|
+
export declare function assertSafePetPublish(fields: {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
tags?: string[];
|
|
26
|
+
}): void;
|
|
27
|
+
export declare function publishCommunityPetAsset(client: Pick<CommunityConsentClient, "getConsent" | "publishPet">, input: PetAssetPublishInput): Promise<CommunityPublishSkillResult>;
|
|
@@ -11,23 +11,9 @@ export interface CommunitySkillLifecycleRecord {
|
|
|
11
11
|
registryEffectiveRiskTier?: string;
|
|
12
12
|
registryKeptSignalAt?: string;
|
|
13
13
|
}
|
|
14
|
-
export interface CommunitySkillLifecycleStore {
|
|
15
|
-
version?: number;
|
|
16
|
-
records: Record<string, CommunitySkillLifecycleRecord>;
|
|
17
|
-
}
|
|
18
14
|
export interface CommunitySignalReporter {
|
|
19
15
|
record(input: CommunityRecordSignalInput): Promise<"recorded" | "disabled" | "skipped" | "failed">;
|
|
20
|
-
recordSkillUsage(record: CommunitySkillLifecycleRecord | undefined, outcome: CommunitySkillUsageOutcome): Promise<"recorded" | "disabled" | "skipped" | "failed">;
|
|
21
16
|
recordSkillLifecycle(record: CommunitySkillLifecycleRecord | undefined, event: Extract<CommunitySignalEvent, "kept" | "uninstalled" | "endorse">): Promise<"recorded" | "disabled" | "skipped" | "failed">;
|
|
22
|
-
recordKeptSignals(store: CommunitySkillLifecycleStore, options?: RecordKeptSignalsOptions): Promise<Array<{
|
|
23
|
-
skillName: string;
|
|
24
|
-
status: "recorded" | "disabled" | "skipped" | "failed";
|
|
25
|
-
}>>;
|
|
26
|
-
}
|
|
27
|
-
export type CommunitySkillUsageOutcome = "success" | "fail" | "error" | "neutral";
|
|
28
|
-
export interface RecordKeptSignalsOptions {
|
|
29
|
-
now?: Date;
|
|
30
|
-
retentionMs?: number;
|
|
31
17
|
}
|
|
32
18
|
export declare function createCommunitySignalReporter(client: Pick<CommunityConsentClient, "getConsent" | "recordSignal"> | null): CommunitySignalReporter;
|
|
33
19
|
export declare function createDefaultCommunitySignalReporter(): CommunitySignalReporter | null;
|
|
@@ -78,10 +78,6 @@ export declare const REACTIVE_COMPACT_MAX_FAILURES = 3;
|
|
|
78
78
|
export declare const REACTIVE_COMPACT_MIN_MESSAGES = 4;
|
|
79
79
|
/** Target usage percentage for reactive compaction. */
|
|
80
80
|
export declare const REACTIVE_COMPACT_TARGET_PERCENT = 50;
|
|
81
|
-
/** Max auto-learned skills per project. */
|
|
82
|
-
export declare const MAX_SKILLS_PER_PROJECT = 20;
|
|
83
|
-
/** Max global (user-level) skills. */
|
|
84
|
-
export declare const MAX_SKILLS_GLOBAL = 50;
|
|
85
81
|
/** Min tool calls to consider a turn "complex enough" for skill creation. */
|
|
86
82
|
export declare const MIN_TOOL_CALLS_FOR_SKILL = 3;
|
|
87
83
|
/** Min distinct tools to suggest a new skill. */
|
|
@@ -100,16 +96,6 @@ export declare const SKILL_PATTERN_REPETITION_THRESHOLD = 3;
|
|
|
100
96
|
* Default: 30 days.
|
|
101
97
|
*/
|
|
102
98
|
export declare const SKILL_PATTERN_MAX_AGE_MS: number;
|
|
103
|
-
/** Max chars of skill content injected into system prompt. */
|
|
104
|
-
export declare const SKILL_INJECTION_MAX_CHARS = 4000;
|
|
105
|
-
/** Max skills injected into a single prompt. */
|
|
106
|
-
export declare const SKILL_INJECTION_MAX_COUNT = 5;
|
|
107
|
-
/** Max skills recalled from other projects per turn. */
|
|
108
|
-
export declare const SKILL_RECALL_MAX_SKILLS = 3;
|
|
109
|
-
/** Max chars per recalled skill content. */
|
|
110
|
-
export declare const SKILL_RECALL_MAX_CONTENT_CHARS = 800;
|
|
111
|
-
/** Skill recall index cache TTL (ms). */
|
|
112
|
-
export declare const SKILL_RECALL_CACHE_TTL_MS: number;
|
|
113
99
|
/** Max nested fork depth for sub-agents. */
|
|
114
100
|
export declare const MAX_FORK_DEPTH = 4;
|
|
115
101
|
/** Team aggregate budget (total tokens across all forked sub-agents). 0 = unlimited. */
|
|
@@ -206,16 +192,9 @@ export interface TunableDefaults {
|
|
|
206
192
|
reactiveCompactMaxFailures: number;
|
|
207
193
|
reactiveCompactMinMessages: number;
|
|
208
194
|
reactiveCompactTargetPercent: number;
|
|
209
|
-
maxSkillsPerProject: number;
|
|
210
|
-
maxSkillsGlobal: number;
|
|
211
195
|
minToolCallsForSkill: number;
|
|
212
196
|
minDistinctToolsForSkill: number;
|
|
213
197
|
skillCreationCooldownMs: number;
|
|
214
|
-
skillInjectionMaxChars: number;
|
|
215
|
-
skillInjectionMaxCount: number;
|
|
216
|
-
skillRecallMaxSkills: number;
|
|
217
|
-
skillRecallMaxContentChars: number;
|
|
218
|
-
skillRecallCacheTtlMs: number;
|
|
219
198
|
maxForkDepth: number;
|
|
220
199
|
maxSessions: number;
|
|
221
200
|
taskSummaryTurnThreshold: number;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { HookRegistry } from "../../contracts/hooks.js";
|
|
2
|
+
import type { CommunityDiscoveryCoordinator } from "../community/community-discovery-coordinator.js";
|
|
3
|
+
export interface CommunityDiscoveryHookDeps {
|
|
4
|
+
/** Online community discovery coordinator (null disables discovery). */
|
|
5
|
+
communityDiscovery?: CommunityDiscoveryCoordinator | null;
|
|
6
|
+
/** Logger. */
|
|
7
|
+
log: {
|
|
8
|
+
debug(msg: string): void;
|
|
9
|
+
warn(msg: string): void;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Register the community-discovery hook on `memory.before_recall`.
|
|
14
|
+
* Runs at lower priority (60) than QMemory prefetch (50) so it supplements,
|
|
15
|
+
* not replaces, the standard memory recall. When a Hub resource matches the
|
|
16
|
+
* turn, its metadata is injected into recalledMemories as a suggestion.
|
|
17
|
+
*/
|
|
18
|
+
export declare function registerCommunityDiscoveryHook(hooks: HookRegistry, deps: CommunityDiscoveryHookDeps): () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ACP Protocol Adapter — a thin wrapper over the official @agentclientprotocol/sdk
|
|
3
3
|
* `ClientSideConnection`. qlogicagent is the ACP *client* (host); spawned external
|
|
4
|
-
* agents (codex-acp, claude-agent-acp,
|
|
4
|
+
* agents (codex-acp, claude-agent-acp, xiaozhiclaw, …) are the ACP *agents*.
|
|
5
5
|
*
|
|
6
6
|
* The SDK owns the wire protocol entirely: JSON-RPC 2.0 / NDJSON framing, request↔response
|
|
7
7
|
* correlation, and the reverse-RPC dispatch. This module owns only the three concerns the SDK
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* 3. translating SDK `session/update` notifications into qlogicagent's internal `turn.*` methods
|
|
12
12
|
*
|
|
13
13
|
* Extension capabilities (clientCapabilities.qlogicagent) are forwarded verbatim — the SDK does
|
|
14
|
-
* not strip outgoing params (validation runs only on the receiving side), so
|
|
14
|
+
* not strip outgoing params (validation runs only on the receiving side), so xiaozhiclaw interop is
|
|
15
15
|
* preserved.
|
|
16
16
|
*/
|
|
17
17
|
import type { ChildProcess } from "node:child_process";
|
|
@@ -67,7 +67,7 @@ export declare function launchSetupTerminal(command: string, platform?: NodeJS.P
|
|
|
67
67
|
};
|
|
68
68
|
/**
|
|
69
69
|
* Fire-and-forget install in a FULLY DETACHED process (own session/process-group, no stdio shared with
|
|
70
|
-
* us). Used for self/host-platform agents (
|
|
70
|
+
* us). Used for self/host-platform agents (xiaozhiclaw) whose in-place UPDATE would otherwise disrupt the
|
|
71
71
|
* running engine the install is a child of — "Agent process stdio closed". Returns immediately; the new
|
|
72
72
|
* version is live on the agent's next startup. No progress streaming (the process is detached).
|
|
73
73
|
*/
|
|
@@ -9,6 +9,16 @@ interface CatalogFetchOptions {
|
|
|
9
9
|
export declare class LlmrouterCatalogUnavailableError extends Error {
|
|
10
10
|
constructor(message?: string);
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Raised when the llmrouter published endpoint (/v1/models) rejects the inference key with an
|
|
14
|
+
* auth failure (401/403). This is a PERSISTENT condition (revoked/expired/inactive key), unlike a
|
|
15
|
+
* transient network blip — so callers must NOT fall back to the full routable catalog (that would
|
|
16
|
+
* advertise 600+ models the dead key cannot actually call). Surface "please re-authenticate" instead.
|
|
17
|
+
*/
|
|
18
|
+
export declare class LlmrouterAuthError extends Error {
|
|
19
|
+
readonly status: number;
|
|
20
|
+
constructor(status: number, message?: string);
|
|
21
|
+
}
|
|
12
22
|
export interface LlmrouterCatalogProvider {
|
|
13
23
|
id: string;
|
|
14
24
|
name?: string;
|
|
@@ -36,7 +36,7 @@ export declare function isSystemGeneratedSkillName(name: string): boolean;
|
|
|
36
36
|
* callers that only want active skills filter `.active` (or use resolveActiveSkills).
|
|
37
37
|
*/
|
|
38
38
|
export declare function resolveSkills(projectRoot?: string): ResolvedSkill[];
|
|
39
|
-
/** Only the skills active in the given project (for prompt
|
|
39
|
+
/** Only the skills active in the given project (for the system-prompt skills catalog / resolution). */
|
|
40
40
|
export declare function resolveActiveSkills(projectRoot?: string): ResolvedSkill[];
|
|
41
41
|
/**
|
|
42
42
|
* Resolve a single skill by name to its store paths, or null if not present.
|
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
import type { CommunityInstallResolution } from "../community/community-consent-client.js";
|
|
2
|
-
|
|
2
|
+
import { type PetdexPetAssetSummary } from "./petdex-asset.js";
|
|
3
|
+
export interface InstalledCommunityPet {
|
|
3
4
|
kind: "pet";
|
|
4
5
|
status: "installed";
|
|
5
6
|
resourceId: string;
|
|
6
7
|
version: string;
|
|
7
8
|
checksum: string;
|
|
8
|
-
|
|
9
|
+
/** Petdex asset id now registered in profile.customPets. */
|
|
10
|
+
assetId: string;
|
|
9
11
|
name: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
assetCount: number;
|
|
12
|
+
/** Materialized petdex summary (atlas imageUrl = spritesheet data URL) for instant UI hydration. */
|
|
13
|
+
asset: PetdexPetAssetSummary;
|
|
13
14
|
}
|
|
14
15
|
export interface InstallCommunityPetOptions {
|
|
15
16
|
fetchFn?: typeof fetch;
|
|
16
|
-
/** Replace an existing install in place (update flow)
|
|
17
|
+
/** Replace an existing install in place (update flow). Petdex upsert is idempotent, so this is accepted for dispatcher parity. */
|
|
17
18
|
allowReplace?: boolean;
|
|
19
|
+
/** Owner whose profile receives the pet; defaults to the active runtime owner. */
|
|
20
|
+
ownerUserId?: string;
|
|
18
21
|
}
|
|
19
22
|
/**
|
|
20
|
-
* Materialize a community pet end to end
|
|
21
|
-
* verify
|
|
22
|
-
*
|
|
23
|
-
*
|
|
23
|
+
* Materialize a community pet end to end: download the gzipped `.petdex` package,
|
|
24
|
+
* verify size + whole-package sha256, gunzip + load + validate the petdex atlas, then
|
|
25
|
+
* register it into `profile.customPets` with `source.kind="community"` — the exact same
|
|
26
|
+
* registration upload/forge use. From that moment `pet.status` includes it and the desktop
|
|
27
|
+
* pet can render the sprite. (Previously this wrote a stripped manifest that never reached
|
|
28
|
+
* the profile, so installed community pets were invisible in the settings pet list.)
|
|
24
29
|
*/
|
|
25
|
-
export declare function installCommunityPetResource(install: CommunityInstallResolution, options?: InstallCommunityPetOptions): Promise<
|
|
30
|
+
export declare function installCommunityPetResource(install: CommunityInstallResolution, options?: InstallCommunityPetOptions): Promise<InstalledCommunityPet>;
|
|
26
31
|
export declare function assertPetInstall(install: CommunityInstallResolution): void;
|
|
@@ -7,7 +7,7 @@ export interface PetPreferences {
|
|
|
7
7
|
export interface PetdexPetAssetSummary {
|
|
8
8
|
id: string;
|
|
9
9
|
assetKind: "petdex";
|
|
10
|
-
sourceKind?: "builtin" | "upload" | "forge";
|
|
10
|
+
sourceKind?: "builtin" | "upload" | "forge" | "community";
|
|
11
11
|
name: string;
|
|
12
12
|
description: string;
|
|
13
13
|
createdAt: string;
|
|
@@ -38,7 +38,7 @@ export interface PetdexPetAsset extends Omit<PetdexPetAssetSummary, "atlas"> {
|
|
|
38
38
|
schema: "qlogic.petdex.asset.v1";
|
|
39
39
|
atlas: PetdexPetAssetAtlas;
|
|
40
40
|
source: {
|
|
41
|
-
kind: "builtin" | "upload" | "forge";
|
|
41
|
+
kind: "builtin" | "upload" | "forge" | "community";
|
|
42
42
|
prompt: string | null;
|
|
43
43
|
};
|
|
44
44
|
animations: Record<PetdexAnimationId, PetdexPetAnimation>;
|
|
@@ -2,6 +2,8 @@ import { type PetdexAssetSource, type PetdexPetAsset, type PetdexValidationRepor
|
|
|
2
2
|
export { PETDEX_SCHEMA, PETDEX_VALIDATION_SCHEMA, PETDEX_ATLAS_CONTRACT, PETDEX_ANIMATION_IDS, createDefaultPetdexAnimations, toPetdexAssetSummary, validatePetdexAssetManifest, petdexImageDataUrl, } from "@xiaozhiclaw/pet-core";
|
|
3
3
|
export type { PetdexAnimationId, PetdexAnimation, PetdexAtlas, PetdexAssetSource, PetdexPetAsset, PetdexAssetManifest, PetdexPetAssetSummary, PetdexValidationReport, LoadedPetdexPackage, PetdexAssetPackage, PetdexAssetValidation, PetdexImportResult, } from "@xiaozhiclaw/pet-core";
|
|
4
4
|
export declare function loadPetdexAssetPackage(filePath: string): Promise<LoadedPetdexPackage>;
|
|
5
|
+
/** Load a `.petdex` package directly from its zip bytes (community install downloads it). */
|
|
6
|
+
export declare function loadPetdexAssetPackageBytes(zip: Buffer): Promise<LoadedPetdexPackage>;
|
|
5
7
|
export declare function buildPetdexAssetImport(filePath: string, targetDir: string): Promise<PetdexImportResult>;
|
|
6
8
|
export declare function writePetdexAssetPackage(params: {
|
|
7
9
|
asset: PetdexPetAsset;
|
|
@@ -11,6 +13,32 @@ export declare function writePetdexAssetPackage(params: {
|
|
|
11
13
|
outputDir: string;
|
|
12
14
|
fileName?: string;
|
|
13
15
|
}): Promise<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Build a `.petdex` zip in memory (single source of truth for the package layout).
|
|
18
|
+
* Community publish gzips these bytes for Hub OSS; writePetdexAssetPackage lands them on disk.
|
|
19
|
+
* Validation is recomputed from asset+spritesheet so the embedded validation.json always matches.
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildPetdexAssetPackageBytes(params: {
|
|
22
|
+
asset: PetdexPetAsset;
|
|
23
|
+
spritesheet: Buffer;
|
|
24
|
+
productionRun?: unknown;
|
|
25
|
+
}): Buffer;
|
|
26
|
+
/**
|
|
27
|
+
* Package a petdex asset for community publish: the gzipped `.petdex` blob (the exact wire
|
|
28
|
+
* format Hub OSS serves at downloadUrl, which the installer gunzips) plus a v15 asset manifest
|
|
29
|
+
* carrying the petdex asset descriptor. The hub derives checksum + sizeBytes from the decoded
|
|
30
|
+
* blob server-side, so neither is sent here.
|
|
31
|
+
*/
|
|
32
|
+
export declare function buildPetdexPublishPayload(params: {
|
|
33
|
+
asset: PetdexPetAsset;
|
|
34
|
+
spritesheet: Buffer;
|
|
35
|
+
version?: string;
|
|
36
|
+
tags?: string[];
|
|
37
|
+
}): {
|
|
38
|
+
manifest: Record<string, unknown>;
|
|
39
|
+
version: string;
|
|
40
|
+
packageGzipBase64: string;
|
|
41
|
+
};
|
|
14
42
|
export declare function createPetdexAssetFromSpritesheet(params: {
|
|
15
43
|
id?: string;
|
|
16
44
|
name: string;
|
|
@@ -26,7 +26,6 @@ export interface RuntimeToolContract {
|
|
|
26
26
|
isEgress?: boolean;
|
|
27
27
|
egressCarriesData?: boolean;
|
|
28
28
|
isEnabled?: () => boolean;
|
|
29
|
-
shouldDefer?: boolean;
|
|
30
29
|
execute?(toolCallId: string, params: any, signal?: AbortSignal): Promise<{
|
|
31
30
|
content: Array<{
|
|
32
31
|
type: "text" | "image";
|
|
@@ -40,20 +39,12 @@ export interface RuntimeToolContract {
|
|
|
40
39
|
}
|
|
41
40
|
export interface ToolCatalog {
|
|
42
41
|
findTool(name: string): RuntimeToolContract | undefined;
|
|
43
|
-
getToolManifest(
|
|
42
|
+
getToolManifest(): ToolDefinition[];
|
|
44
43
|
getToolNames(): string[];
|
|
45
44
|
setTools(tools: RuntimeToolContract[]): void;
|
|
46
45
|
addTool(tool: RuntimeToolContract): void;
|
|
47
46
|
addTools(tools: RuntimeToolContract[]): void;
|
|
48
47
|
removeTool(name: string): boolean;
|
|
49
|
-
activateTool(name: string): boolean;
|
|
50
|
-
clearActivatedTools(): void;
|
|
51
|
-
/** SSOT for the deferred-tool set consumed by the prompt index and the tool_search corpus. */
|
|
52
|
-
listDeferredTools(): Array<{
|
|
53
|
-
name: string;
|
|
54
|
-
description: string;
|
|
55
|
-
searchHint?: string;
|
|
56
|
-
}>;
|
|
57
48
|
}
|
|
58
49
|
export interface ToolBootstrapProgress {
|
|
59
50
|
output: string;
|