qlogicagent 2.12.12 → 2.12.14
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 +371 -352
- package/dist/index.js +370 -351
- package/dist/protocol.js +1 -1
- package/dist/types/cli/acp-extended-handlers.d.ts +7 -0
- package/dist/types/cli/community-resource-installer.d.ts +2 -1
- package/dist/types/cli/community-workflow-installer.d.ts +29 -0
- package/dist/types/cli/credential-vault.d.ts +62 -0
- package/dist/types/cli/handlers/community-handler.d.ts +3 -0
- package/dist/types/cli/handlers/project-handler.d.ts +1 -1
- package/dist/types/cli/handlers/workflow-handler.d.ts +138 -8
- package/dist/types/cli/project-command-service.d.ts +3 -1
- package/dist/types/orchestration/workflow/budget-permission-gate.d.ts +1 -1
- package/dist/types/orchestration/workflow/builtin-executors.d.ts +6 -0
- package/dist/types/orchestration/workflow/capability-catalog.d.ts +64 -0
- package/dist/types/orchestration/workflow/expression.d.ts +8 -0
- package/dist/types/orchestration/workflow/host-executors.d.ts +1 -1
- package/dist/types/orchestration/workflow/n8n-expression.d.ts +48 -0
- package/dist/types/orchestration/workflow/n8n-import.d.ts +45 -12
- package/dist/types/orchestration/workflow/node-schema.d.ts +100 -0
- package/dist/types/orchestration/workflow/qla-executor-host.d.ts +27 -1
- package/dist/types/orchestration/workflow/run-history-store.d.ts +8 -1
- package/dist/types/orchestration/workflow/workflow-audit-store.d.ts +31 -0
- package/dist/types/orchestration/workflow/workflow-bundle.d.ts +65 -0
- package/dist/types/orchestration/workflow/workflow-controller.d.ts +20 -3
- package/dist/types/orchestration/workflow/workflow-patch.d.ts +15 -0
- package/dist/types/orchestration/workflow/workflow-runtime.d.ts +24 -0
- package/dist/types/orchestration/workflow/workflow-scheduler.d.ts +21 -0
- package/dist/types/orchestration/workflow/workflow-store.d.ts +17 -0
- package/dist/types/orchestration/workflow/workflow-trigger.d.ts +21 -0
- package/dist/types/orchestration/workflow-chat-builder.d.ts +18 -0
- package/dist/types/protocol/wire/acp-agent-management.d.ts +5 -0
- package/dist/types/protocol/wire/acp-protocol.d.ts +1 -0
- package/dist/types/protocol/wire/agent-events.d.ts +2 -2
- package/dist/types/protocol/wire/gateway-rpc.d.ts +3 -1
- package/dist/types/runtime/community/community-consent-client.d.ts +4 -0
- package/dist/types/runtime/infra/project-store.d.ts +1 -1
- package/dist/types/transport/acp-server.d.ts +1 -0
- package/package.json +1 -1
|
@@ -11,4 +11,25 @@ export type TriggerDef = {
|
|
|
11
11
|
} | {
|
|
12
12
|
type: "webhook";
|
|
13
13
|
path: string;
|
|
14
|
+
} | {
|
|
15
|
+
type: "form";
|
|
16
|
+
fields: Array<{
|
|
17
|
+
key: string;
|
|
18
|
+
label?: string;
|
|
19
|
+
type?: "text" | "number" | "select";
|
|
20
|
+
options?: string[];
|
|
21
|
+
required?: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
} | {
|
|
24
|
+
type: "intent";
|
|
25
|
+
/** 触发短语(精确/归一化匹配),至少一条。 */
|
|
26
|
+
phrases: string[];
|
|
27
|
+
/** 别名(同样精确匹配)。 */
|
|
28
|
+
aliases?: string[];
|
|
29
|
+
/** 开启语义兜底(确定性未命中时一次 LLM 分类;有成本,默认关)。 */
|
|
30
|
+
semantic?: boolean;
|
|
31
|
+
/** 命中后是否弹确认(默认 true;关闭=说出即跑)。 */
|
|
32
|
+
confirm?: boolean;
|
|
33
|
+
/** 生效界面;缺省 = 欢迎页+对话页都生效。 */
|
|
34
|
+
surfaces?: ("welcome" | "chat")[];
|
|
14
35
|
};
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import type { ForkedAgentRunnerFactory } from "../runtime/ports/agent-execution-contracts.js";
|
|
10
10
|
import type { LLMTransport } from "../runtime/ports/index.js";
|
|
11
11
|
import type { ToolDefinition, AgentLogger } from "../agent/types.js";
|
|
12
|
+
import { type CapabilityEntry } from "./workflow/capability-catalog.js";
|
|
12
13
|
/** agent 通过此工具产出工作流提案:新建给 def,改已有给 patch。 */
|
|
13
14
|
export declare const PROPOSE_WORKFLOW_TOOL_NAME = "propose_workflow";
|
|
14
15
|
export declare const PROPOSE_WORKFLOW_TOOL_DEF: ToolDefinition;
|
|
@@ -22,6 +23,12 @@ export interface WorkflowChatDeps {
|
|
|
22
23
|
currentWorkflow?: string;
|
|
23
24
|
/** D19 框选局部修改:用户框选的节点 id;非空时指示 agent 只产出 scoped patch(引擎按同 scope 强制)。 */
|
|
24
25
|
scope?: string[];
|
|
26
|
+
/**
|
|
27
|
+
* 真实能力目录(spec D24/IT-3):agent/tool/skill/mcp/memory(+网关注入的 channel)。
|
|
28
|
+
* 注入后:① 系统提示带紧凑清单 ② agent 可用 list_capabilities 查长尾 ③ propose_workflow
|
|
29
|
+
* 校验回环拒绝引用目录外能力(反幻觉)。缺省(无目录)时退回静态 kind 说明、不做 ref 校验。
|
|
30
|
+
*/
|
|
31
|
+
catalog?: CapabilityEntry[];
|
|
25
32
|
transport: LLMTransport;
|
|
26
33
|
apiKey: string;
|
|
27
34
|
model: string;
|
|
@@ -34,6 +41,17 @@ export interface WorkflowChatResult {
|
|
|
34
41
|
def?: Record<string, unknown>;
|
|
35
42
|
patch?: unknown[];
|
|
36
43
|
trigger?: Record<string, unknown>;
|
|
44
|
+
/**
|
|
45
|
+
* Fail-loud(§3/EX-A):本轮 agent 调过 propose_workflow 但**没有任何一次通过校验**时带上
|
|
46
|
+
* (attempts=被拒次数,errors=最后一次的校验错误)。reply 此时只是 agent 的口头方案,
|
|
47
|
+
* **不是**已落图的提案 —— 前端必须把失败 + 重试出路显式给用户,不许当正常回复展示。
|
|
48
|
+
*/
|
|
49
|
+
rejected?: {
|
|
50
|
+
attempts: number;
|
|
51
|
+
errors: string[];
|
|
52
|
+
};
|
|
37
53
|
}
|
|
54
|
+
/** agent 按需检索能力长尾(系统提示只放每类前 N 条)。 */
|
|
55
|
+
export declare const LIST_CAPABILITIES_TOOL_NAME = "list_capabilities";
|
|
38
56
|
/** 跑一轮对话式搭图/改图,返回自然语言 reply + 工作流提案(def 新建 / patch 改已有)。失败抛,由调用方降级。 */
|
|
39
57
|
export declare function runWorkflowChatRound(deps: WorkflowChatDeps): Promise<WorkflowChatResult>;
|
|
@@ -236,6 +236,11 @@ export interface WorkflowChatResult {
|
|
|
236
236
|
patch?: unknown[];
|
|
237
237
|
trigger?: Record<string, unknown>;
|
|
238
238
|
error?: string;
|
|
239
|
+
/** propose 全被校验拒(无任何提案落地)时的显式失败:前端展示真实错误 + 重试出路,不许当正常回复。 */
|
|
240
|
+
rejected?: {
|
|
241
|
+
attempts: number;
|
|
242
|
+
errors: string[];
|
|
243
|
+
};
|
|
239
244
|
}
|
|
240
245
|
/** solo.start RPC params. */
|
|
241
246
|
export interface SoloStartParams {
|
|
@@ -38,6 +38,7 @@ export declare const ACP_EXTENDED_METHODS: {
|
|
|
38
38
|
readonly SOLO_SPEC_CHAT: "x/solo.specChat";
|
|
39
39
|
readonly SOLO_SPEC_JUDGE: "x/solo.specJudge";
|
|
40
40
|
readonly WORKFLOW_CHAT: "x/workflow.chat";
|
|
41
|
+
readonly WORKFLOW_MATCH_INTENT: "x/workflow.matchIntent";
|
|
41
42
|
readonly PRODUCT_SUBSCRIBE: "x/product.subscribe";
|
|
42
43
|
};
|
|
43
44
|
export type AcpExtendedMethod = (typeof ACP_EXTENDED_METHODS)[keyof typeof ACP_EXTENDED_METHODS];
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Turn-lifecycle events relayed to the Control UI WebSocket.
|
|
14
14
|
* These are the "chat session" events that every UI client needs.
|
|
15
15
|
*/
|
|
16
|
-
export declare const 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_delta", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "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"];
|
|
16
|
+
export declare const 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_delta", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "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"];
|
|
17
17
|
/**
|
|
18
18
|
* Agent Team events (Solo Mode, Product Mode, Plan lifecycle).
|
|
19
19
|
* Relayed to the UI's team/orchestration panel.
|
|
@@ -23,7 +23,7 @@ export declare const AGENT_TEAM_WS_EVENT_NAMES: readonly ["solo.progress", "solo
|
|
|
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_delta", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "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", "solo.progress", "solo.agentDelta", "solo.agentUsage", "solo.agentDiff", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.checkpointed", "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_delta", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "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.agentDelta", "solo.agentUsage", "solo.agentDiff", "solo.evaluation", "product.taskStarted", "product.taskOutput", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.checkpointed", "product.dagTopology", "plan.interrupted"];
|
|
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. */
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Reference: CC uses Zod union in a single package; we use TypeScript interface map
|
|
11
11
|
* in a shared package (same effect — single source, compile-time checked).
|
|
12
12
|
*/
|
|
13
|
-
export type ProjectType = "default" | "personal" | "group" | "solo" | "product";
|
|
13
|
+
export type ProjectType = "default" | "personal" | "group" | "solo" | "product" | "automation";
|
|
14
14
|
export type ProjectStatus = "active" | "archived";
|
|
15
15
|
export interface LocalizedTextWire {
|
|
16
16
|
key: string;
|
|
@@ -31,6 +31,7 @@ export interface ProjectInfo {
|
|
|
31
31
|
planAgents?: string[];
|
|
32
32
|
planWinnerId?: string;
|
|
33
33
|
leaderSessionId?: string;
|
|
34
|
+
primaryWorkflowId?: string;
|
|
34
35
|
}
|
|
35
36
|
export interface MemoryAttachmentWire {
|
|
36
37
|
type: "image" | "audio" | "video" | "file" | string;
|
|
@@ -302,6 +303,7 @@ export interface GatewayRpcMethodMap {
|
|
|
302
303
|
planAgents?: string[];
|
|
303
304
|
planWinnerId?: string;
|
|
304
305
|
leaderSessionId?: string;
|
|
306
|
+
primaryWorkflowId?: string;
|
|
305
307
|
};
|
|
306
308
|
result: {
|
|
307
309
|
ok: boolean;
|
|
@@ -19,6 +19,8 @@ export interface CommunityConsentClient {
|
|
|
19
19
|
matchRegistry(input: CommunityRegistryMatchInput): Promise<CommunityRegistryMatchResult[]>;
|
|
20
20
|
publishSkill(input: CommunityPublishSkillInput): Promise<CommunityPublishSkillResult>;
|
|
21
21
|
publishPet(input: CommunityPublishSkillInput): Promise<CommunityPublishSkillResult>;
|
|
22
|
+
/** Publish a workflow resource (IT-5): manifest + sanitized-bundle gzip payload. */
|
|
23
|
+
publishWorkflow(input: CommunityPublishSkillInput): Promise<CommunityPublishSkillResult>;
|
|
22
24
|
recordSignal(input: CommunityRecordSignalInput): Promise<CommunityRecordSignalResult>;
|
|
23
25
|
recordTelemetry(input: CommunityRecordTelemetryInput): Promise<CommunityRecordTelemetryResult>;
|
|
24
26
|
resolveInstall(resourceId: string, version?: string): Promise<CommunityInstallResolution>;
|
|
@@ -66,6 +68,8 @@ export interface CommunityPublishSkillInput {
|
|
|
66
68
|
title: string;
|
|
67
69
|
summary: string;
|
|
68
70
|
visibility?: "public" | "private";
|
|
71
|
+
/** Hub official category key (RESOURCE_CATEGORIES; hub rejects unknown keys). */
|
|
72
|
+
category?: string;
|
|
69
73
|
tags?: string[];
|
|
70
74
|
manifest: Record<string, unknown>;
|
|
71
75
|
version?: string;
|
|
@@ -26,7 +26,7 @@ export declare function isWorkspaceDirShared(workspaceDir: string, excludeProjec
|
|
|
26
26
|
export declare function getActiveProject(): ProjectInfo | null;
|
|
27
27
|
export declare function getDefaultProject(): ProjectInfo | null;
|
|
28
28
|
export declare function getProjectById(projectId: string): ProjectInfo | null;
|
|
29
|
-
export declare function updateProject(projectId: string, patch: Partial<Pick<ProjectInfo, "planStatus" | "planAgents" | "planWinnerId" | "leaderSessionId">>): boolean;
|
|
29
|
+
export declare function updateProject(projectId: string, patch: Partial<Pick<ProjectInfo, "planStatus" | "planAgents" | "planWinnerId" | "leaderSessionId" | "primaryWorkflowId">>): boolean;
|
|
30
30
|
export declare function switchProject(projectId: string): ProjectInfo | null;
|
|
31
31
|
export declare function deleteProject(projectId: string): {
|
|
32
32
|
deleted: boolean;
|
|
@@ -81,6 +81,7 @@ export interface AcpRequestHandler {
|
|
|
81
81
|
handleAcpSoloEvaluate(params: Record<string, unknown>): Promise<unknown>;
|
|
82
82
|
handleAcpSoloSpecChat(params: Record<string, unknown>): Promise<unknown>;
|
|
83
83
|
handleAcpWorkflowChat(params: Record<string, unknown>): Promise<unknown>;
|
|
84
|
+
handleAcpWorkflowMatchIntent(params: Record<string, unknown>): Promise<unknown>;
|
|
84
85
|
handleAcpSoloSpecJudge(params: Record<string, unknown>): Promise<unknown>;
|
|
85
86
|
handleAcpProductCreate(params: Record<string, unknown>): Promise<unknown>;
|
|
86
87
|
handleAcpProductPlan(params: Record<string, unknown>): Promise<unknown>;
|