qlogicagent 2.10.22 → 2.10.23
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 +29 -4
- package/dist/agent.js +11 -11
- package/dist/cli.js +701 -604
- package/dist/index.js +700 -603
- package/dist/permissions.js +1 -0
- package/dist/protocol.js +1 -1
- package/dist/types/agent/tool-access.d.ts +1 -30
- package/dist/types/agent/tunable-defaults.d.ts +1 -249
- package/dist/types/agent/types.d.ts +7 -0
- package/dist/types/cli/acp-extended-handlers.d.ts +41 -0
- package/dist/types/cli/acp-extended-host-adapter.d.ts +28 -0
- package/dist/types/cli/acp-extended-host-adapter.test.d.ts +1 -0
- package/dist/types/cli/acp-session-handlers.d.ts +39 -0
- package/dist/types/cli/acp-session-handlers.test.d.ts +1 -0
- package/dist/types/cli/agent-config-coordinator.d.ts +13 -0
- package/dist/types/cli/agent-config-runtime.d.ts +11 -0
- package/dist/types/cli/agent-runner-factory.d.ts +2 -0
- package/dist/types/cli/agent-runtime-bootstrap.d.ts +64 -0
- package/dist/types/cli/agent-status-notifier.d.ts +11 -0
- package/dist/types/cli/agent-status-notifier.test.d.ts +1 -0
- package/dist/types/cli/base-tool-bootstrap.d.ts +7 -0
- package/dist/types/cli/cli-acp-request-handler.d.ts +9 -0
- package/dist/types/cli/cli-acp-request-handler.test.d.ts +1 -0
- package/dist/types/cli/cli-agent-builder.d.ts +35 -0
- package/dist/types/cli/community-skill-installer.d.ts +12 -0
- package/dist/types/cli/community-skill-installer.test.d.ts +1 -0
- package/dist/types/cli/core-tool-coordinator.d.ts +30 -0
- package/dist/types/cli/core-tools/agent-tool-bootstrap.d.ts +10 -0
- package/dist/types/cli/core-tools/agent-tool-service.d.ts +18 -0
- package/dist/types/cli/core-tools/checkpoint-tool-bootstrap.d.ts +7 -0
- package/dist/types/cli/core-tools/checkpoint-tool-service.d.ts +7 -0
- package/dist/types/cli/core-tools/config-tool-bootstrap.d.ts +7 -0
- package/dist/types/cli/core-tools/config-tool-service.d.ts +7 -0
- package/dist/types/cli/core-tools/cron-tool-bootstrap.d.ts +7 -0
- package/dist/types/cli/core-tools/cron-tool-service.d.ts +22 -0
- package/dist/types/cli/core-tools/cron-tool-service.test.d.ts +1 -0
- package/dist/types/cli/core-tools/monitor-tool-bootstrap.d.ts +5 -0
- package/dist/types/cli/core-tools/monitor-tool-service.d.ts +6 -0
- package/dist/types/cli/core-tools/registry.d.ts +9 -0
- package/dist/types/cli/core-tools/team-tool-bootstrap.d.ts +7 -0
- package/dist/types/cli/core-tools/team-tool-service.d.ts +21 -0
- package/dist/types/cli/core-tools/utility-tool-bootstrap.d.ts +8 -0
- package/dist/types/cli/default-project-bootstrap.d.ts +8 -0
- package/dist/types/cli/dev-tool-bootstrap.d.ts +4 -0
- package/dist/types/cli/dev-tools/lsp-tool-service.d.ts +5 -0
- package/dist/types/cli/dev-tools/repl-lsp-tool-services.test.d.ts +1 -0
- package/dist/types/cli/dev-tools/repl-tool-service.d.ts +5 -0
- package/dist/types/cli/dream-host-adapter.d.ts +19 -0
- package/dist/types/cli/handlers/agents-handler.d.ts +28 -14
- package/dist/types/cli/handlers/community-handler.d.ts +25 -0
- package/dist/types/cli/handlers/community-handler.test.d.ts +1 -0
- package/dist/types/cli/handlers/config-handler.d.ts +15 -9
- package/dist/types/cli/handlers/config-handler.test.d.ts +1 -0
- package/dist/types/cli/handlers/control-handler.d.ts +23 -0
- package/dist/types/cli/handlers/dream-handler.d.ts +21 -1
- package/dist/types/cli/handlers/files-handler.d.ts +15 -9
- package/dist/types/cli/handlers/files-handler.instructions.test.d.ts +1 -0
- package/dist/types/cli/handlers/media-handler.d.ts +10 -4
- package/dist/types/cli/handlers/media-handler.test.d.ts +1 -0
- package/dist/types/cli/handlers/memory-handler.d.ts +39 -12
- package/dist/types/cli/handlers/pet-confirm-handler.d.ts +7 -0
- package/dist/types/cli/handlers/pet-handler.d.ts +29 -4
- package/dist/types/cli/handlers/pet-handler.test.d.ts +1 -0
- package/dist/types/cli/handlers/product-handler.d.ts +40 -14
- package/dist/types/cli/handlers/project-handler.d.ts +23 -14
- package/dist/types/cli/handlers/session-handler.d.ts +36 -17
- package/dist/types/cli/handlers/session-handler.resume.test.d.ts +1 -0
- package/dist/types/cli/handlers/settings-handler.d.ts +16 -12
- package/dist/types/cli/handlers/skills-handler.d.ts +19 -10
- package/dist/types/cli/handlers/skills-handler.profile.test.d.ts +1 -0
- package/dist/types/cli/handlers/solo-handler.d.ts +31 -9
- package/dist/types/cli/handlers/turn-handler.approval.test.d.ts +1 -0
- package/dist/types/cli/handlers/turn-handler.d.ts +17 -11
- package/dist/types/cli/idle-dream-coordinator.d.ts +46 -0
- package/dist/types/cli/idle-dream-coordinator.test.d.ts +1 -0
- package/dist/types/cli/mcp-plugin-bootstrap.d.ts +27 -0
- package/dist/types/cli/mcp-plugin-bootstrap.test.d.ts +1 -0
- package/dist/types/cli/mcp-tool-proxy.d.ts +7 -0
- package/dist/types/cli/media-file-api-service.d.ts +73 -0
- package/dist/types/cli/media-file-api-service.test.d.ts +1 -0
- package/dist/types/cli/media-file-tool-service.d.ts +13 -0
- package/dist/types/cli/memory-coordinator.d.ts +36 -0
- package/dist/types/cli/model-client-resolver.d.ts +22 -0
- package/dist/types/cli/multi-agent-handler-host.d.ts +27 -0
- package/dist/types/cli/multi-agent-handler-host.test.d.ts +1 -0
- package/dist/types/cli/multi-agent-state-coordinator.d.ts +11 -0
- package/dist/types/cli/permission-bootstrap.d.ts +33 -0
- package/dist/types/cli/permission-bootstrap.test.d.ts +1 -0
- package/dist/types/cli/permission-settings-store.d.ts +2 -0
- package/dist/types/cli/permission-settings-store.test.d.ts +1 -0
- package/dist/types/cli/pet-confirm-coordinator.d.ts +20 -0
- package/dist/types/cli/pet-confirm-coordinator.test.d.ts +1 -0
- package/dist/types/cli/pet-runtime.d.ts +34 -0
- package/dist/types/cli/pet-runtime.test.d.ts +1 -0
- package/dist/types/cli/project-context.d.ts +1 -0
- package/dist/types/cli/project-memory-store-factory.d.ts +2 -0
- package/dist/types/cli/project-template-seeder.d.ts +5 -0
- package/dist/types/cli/provider-core-facade.d.ts +27 -0
- package/dist/types/cli/rpc-registry.community.test.d.ts +1 -0
- package/dist/types/cli/rpc-registry.d.ts +8 -0
- package/dist/types/cli/runtime-hook-bootstrap.d.ts +34 -0
- package/dist/types/cli/runtime-watcher-bootstrap.d.ts +15 -0
- package/dist/types/cli/session-coordinator.d.ts +10 -0
- package/dist/types/cli/session-coordinator.test.d.ts +1 -0
- package/dist/types/cli/session-history-coordinator.d.ts +11 -0
- package/dist/types/cli/session-history-coordinator.test.d.ts +1 -0
- package/dist/types/cli/skill-meta-tool-bootstrap.d.ts +25 -0
- package/dist/types/cli/skill-meta-tool-bootstrap.test.d.ts +1 -0
- package/dist/types/cli/stdio-server.d.ts +17 -134
- package/dist/types/cli/tool-bootstrap.d.ts +1 -4
- package/dist/types/cli/tool-bootstrap.instructions.test.d.ts +1 -0
- package/dist/types/cli/tool-bootstrap.media-provider-alias.test.d.ts +1 -0
- package/dist/types/cli/tool-catalog.d.ts +2 -0
- package/dist/types/cli/tool-invoker-factory.d.ts +10 -0
- package/dist/types/cli/tool-result-processor.d.ts +14 -0
- package/dist/types/cli/transport.d.ts +2 -12
- package/dist/types/cli/turn-ask-user-setup.d.ts +9 -0
- package/dist/types/cli/turn-event-forwarder.d.ts +10 -0
- package/dist/types/cli/turn-lifecycle.d.ts +19 -0
- package/dist/types/cli/turn-lifecycle.test.d.ts +1 -0
- package/dist/types/cli/turn-media-setup.d.ts +16 -0
- package/dist/types/cli/turn-permission-sync.d.ts +7 -0
- package/dist/types/cli/turn-permission-sync.test.d.ts +1 -0
- package/dist/types/cli/turn-project-router.d.ts +22 -0
- package/dist/types/cli/turn-project-router.test.d.ts +1 -0
- package/dist/types/cli/turn-skill-autopersist.d.ts +47 -0
- package/dist/types/cli/turn-skill-autopersist.test.d.ts +1 -0
- package/dist/types/cli/turn-suggestion-generator.d.ts +15 -0
- package/dist/types/orchestration/agent-instance.d.ts +1 -1
- package/dist/types/orchestration/dag-scheduler.d.ts +135 -86
- package/dist/types/orchestration/index.d.ts +2 -2
- package/dist/types/orchestration/product-budget.d.ts +1 -1
- package/dist/types/orchestration/product-persistence.d.ts +3 -12
- package/dist/types/orchestration/product-planner.d.ts +1 -1
- package/dist/types/orchestration/skill-improvement.d.ts +1 -1
- package/dist/types/orchestration/solo-evaluator.d.ts +1 -1
- package/dist/types/orchestration/solo-persistence.d.ts +1 -1
- package/dist/types/orchestration/subagent/fork-subagent.d.ts +1 -1
- package/dist/types/orchestration/subagent/task-types.d.ts +1 -146
- package/dist/types/orchestration/tool-cascade.d.ts +2 -2
- package/dist/types/orchestration/workflow/budget-permission-gate.d.ts +85 -0
- package/dist/types/orchestration/workflow/builtin-executors.d.ts +12 -0
- package/dist/types/orchestration/workflow/cron-schedule.d.ts +37 -0
- package/dist/types/orchestration/workflow/data-item.d.ts +39 -0
- package/dist/types/orchestration/workflow/expression.d.ts +52 -0
- package/dist/types/orchestration/workflow/host-executors.d.ts +15 -0
- package/dist/types/orchestration/workflow/n8n-import.d.ts +35 -0
- package/dist/types/orchestration/workflow/node-registry.d.ts +19 -0
- package/dist/types/orchestration/workflow/node-schema.d.ts +119 -0
- package/dist/types/orchestration/workflow/run-checkpoint-store.d.ts +53 -0
- package/dist/types/orchestration/workflow/trigger-validation.d.ts +22 -0
- package/dist/types/orchestration/workflow/workflow-controller.d.ts +143 -0
- package/dist/types/orchestration/workflow/workflow-patch.d.ts +101 -0
- package/dist/types/orchestration/workflow/workflow-render.d.ts +41 -0
- package/dist/types/orchestration/workflow/workflow-runtime.d.ts +127 -0
- package/dist/types/orchestration/workflow/workflow-scheduler.d.ts +83 -0
- package/dist/types/orchestration/workflow/workflow-store.d.ts +40 -0
- package/dist/types/orchestration/workflow/workflow-trigger.d.ts +14 -0
- package/dist/types/permissions.d.ts +2 -0
- package/dist/types/permissions.public-api.test.d.ts +1 -0
- package/dist/types/protocol/methods.d.ts +262 -11
- package/dist/types/{runtime/infra/acp-types.d.ts → protocol/wire/acp-agent-management.d.ts} +3 -3
- package/dist/types/protocol/wire/agent-methods.d.ts +15 -11
- package/dist/types/protocol/wire/agent-rpc.d.ts +11 -0
- package/dist/types/protocol/wire/chat-types.d.ts +9 -0
- package/dist/types/protocol/wire/gateway-rpc.d.ts +13 -0
- package/dist/types/protocol/wire/index.d.ts +2 -1
- package/dist/types/protocol/wire/notification-payloads.d.ts +18 -3
- package/dist/types/runtime/community/community-consent-client.d.ts +117 -0
- package/dist/types/runtime/community/community-consent-client.test.d.ts +1 -0
- package/dist/types/runtime/community/community-desensitization-red-team-cli.d.ts +7 -0
- package/dist/types/runtime/community/community-desensitization-red-team-cli.test.d.ts +1 -0
- package/dist/types/runtime/community/community-desensitization.d.ts +29 -0
- package/dist/types/runtime/community/community-desensitization.test.d.ts +1 -0
- package/dist/types/runtime/community/community-telemetry-recorder.d.ts +6 -0
- package/dist/types/runtime/config/tunable-defaults.d.ts +249 -0
- package/dist/types/runtime/execution/dream-agent.d.ts +4 -2
- package/dist/types/runtime/execution/dream-category-context.d.ts +1 -1
- package/dist/types/runtime/execution/forked-agent.d.ts +3 -1
- package/dist/types/runtime/execution/streaming-tool-executor.d.ts +4 -2
- package/dist/types/runtime/execution/tool-eligibility.d.ts +1 -1
- package/dist/types/runtime/hooks/context-compression.d.ts +2 -2
- package/dist/types/runtime/hooks/memory-hooks.d.ts +6 -6
- package/dist/types/runtime/infra/acp-detector.d.ts +2 -2
- package/dist/types/runtime/infra/acp-protocol-adapter.d.ts +1 -1
- package/dist/types/runtime/infra/acp-usage-tracker.d.ts +1 -1
- package/dist/types/runtime/infra/agent-config-store.d.ts +2 -2
- package/dist/types/runtime/infra/agent-paths.d.ts +14 -10
- package/dist/types/runtime/infra/agent-paths.test.d.ts +1 -0
- package/dist/types/runtime/infra/agent-process.d.ts +2 -2
- package/dist/types/runtime/infra/checkpoint-backend.d.ts +2 -2
- package/dist/types/runtime/infra/index.d.ts +1 -1
- package/dist/types/runtime/infra/llmrouter-catalog.d.ts +10 -0
- package/dist/types/runtime/infra/mcp-bridge.d.ts +1 -1
- package/dist/types/runtime/infra/model-registry.d.ts +2 -1
- package/dist/types/runtime/infra/profile-storage.test.d.ts +1 -0
- package/dist/types/runtime/infra/skill-injector.d.ts +3 -2
- package/dist/types/runtime/infra/skill-injector.test.d.ts +1 -0
- package/dist/types/runtime/infra/task-runtime.d.ts +1 -1
- package/dist/types/runtime/infra/worktree-backend.d.ts +2 -2
- package/dist/types/runtime/memory/categories.d.ts +5 -0
- package/dist/types/runtime/memory/find-relevant-memories.d.ts +70 -0
- package/dist/types/runtime/memory/implicit-extraction.d.ts +58 -0
- package/dist/types/runtime/memory/recall-category-filter.d.ts +54 -0
- package/dist/types/runtime/pet/index.d.ts +1 -1
- package/dist/types/runtime/pet/pet-growth-engine.d.ts +10 -9
- package/dist/types/runtime/pet/pet-growth-engine.test.d.ts +1 -0
- package/dist/types/runtime/pet/pet-soul-service.d.ts +1 -2
- package/dist/types/runtime/pet/pet-soul-service.test.d.ts +1 -0
- package/dist/types/runtime/ports/agent-execution-contracts.d.ts +182 -0
- package/dist/types/runtime/ports/checkpoint-contracts.d.ts +19 -0
- package/dist/types/runtime/ports/index.d.ts +13 -0
- package/dist/types/runtime/ports/memory-provider.d.ts +146 -0
- package/dist/types/runtime/ports/memory-recall-source.d.ts +3 -0
- package/dist/types/runtime/ports/memory-writer.d.ts +21 -0
- package/dist/types/runtime/ports/path-service.d.ts +5 -0
- package/dist/types/runtime/ports/permission-contracts.d.ts +107 -0
- package/dist/types/runtime/ports/project-memory-store.d.ts +44 -0
- package/dist/types/runtime/ports/tool-call-contracts.d.ts +16 -0
- package/dist/types/runtime/ports/tool-contracts.d.ts +23 -0
- package/dist/types/runtime/ports/web-search-contracts.d.ts +17 -0
- package/dist/types/runtime/ports/worktree-contracts.d.ts +22 -0
- package/dist/types/runtime/prompt/environment-context.test.d.ts +1 -0
- package/dist/types/runtime/prompt/fresh-workspace-evidence.d.ts +19 -0
- package/dist/types/runtime/prompt/fresh-workspace-evidence.test.d.ts +1 -0
- package/dist/types/runtime/prompt/instruction-loader.d.ts +9 -3
- package/dist/types/runtime/prompt/instruction-loader.test.d.ts +1 -0
- package/dist/types/runtime/session/session-persistence.test.d.ts +1 -0
- package/dist/types/runtime/tasks/task-types.d.ts +146 -0
- package/dist/types/skills/index.d.ts +2 -2
- package/dist/types/skills/mcp/mcp-http-client.d.ts +2 -0
- package/dist/types/skills/mcp/mcp-manager.d.ts +7 -4
- package/dist/types/skills/mcp/mcp-stdio-client.d.ts +2 -0
- package/dist/types/skills/mcp/mcp-tool-metadata.d.ts +18 -0
- package/dist/types/skills/memory/categories.d.ts +1 -5
- package/dist/types/skills/memory/find-relevant-memories.d.ts +1 -70
- package/dist/types/skills/memory/implicit-extraction.d.ts +1 -58
- package/dist/types/skills/memory/local-memory-provider.d.ts +4 -10
- package/dist/types/skills/memory/local-store.d.ts +4 -4
- package/dist/types/skills/memory/memory-consolidation.d.ts +9 -1
- package/dist/types/skills/memory/memory-provider-factory.d.ts +2 -0
- package/dist/types/skills/memory/memory-tool.d.ts +4 -6
- package/dist/types/skills/memory/recall-category-filter.d.ts +1 -54
- package/dist/types/skills/permissions/community-sandbox-policy.d.ts +3 -0
- package/dist/types/skills/permissions/community-sandbox-red-team-cli.d.ts +7 -0
- package/dist/types/skills/permissions/community-sandbox-red-team.d.ts +30 -0
- package/dist/types/skills/permissions/hook-runner.d.ts +15 -2
- package/dist/types/skills/permissions/settings-watcher.d.ts +2 -0
- package/dist/types/skills/permissions/types.d.ts +2 -113
- package/dist/types/skills/portable-tool.d.ts +22 -0
- package/dist/types/skills/skill-system/skill-lifecycle.d.ts +5 -0
- package/dist/types/skills/skill-system/skill-source.d.ts +2 -148
- package/dist/types/skills/tool-access.d.ts +30 -0
- package/dist/types/skills/tools/skill-tool.d.ts +2 -10
- package/dist/types/skills/tools/web-search-tool.d.ts +3 -20
- package/dist/types/skills/tools.d.ts +1 -1
- package/dist/types/transport/acp-server.d.ts +1 -1
- package/dist/types/transport/index.d.ts +1 -0
- package/dist/types/transport/io-transport.d.ts +19 -0
- package/package.json +93 -80
- package/dist/types/llm/index.d.ts +0 -1
- /package/dist/types/{orchestration/context/context-compression.d.ts → runtime/context/context-compression-strategies.d.ts} +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compact workflow renderer — the "workflow-as-context" feeder (plan D17,
|
|
3
|
+
* spec workflow-conversational-editing-spec.md §B).
|
|
4
|
+
*
|
|
5
|
+
* Every page-chat user turn injects the LATEST workflow as compact, deterministic text (NOT raw
|
|
6
|
+
* JSON: cheaper tokens, never stale, stable node ids the agent references back in a WorkflowPatch).
|
|
7
|
+
* This module is the deterministic ENGINE half of that loop — the agent reads this rendering and
|
|
8
|
+
* emits a `WorkflowPatch` (workflow-patch.ts) against the shown `rev`. Pure function: no gateway,
|
|
9
|
+
* no LLM, no I/O.
|
|
10
|
+
*
|
|
11
|
+
* Determinism (§1.5): node order follows the def's node array (stable, persisted order); param
|
|
12
|
+
* keys are sorted; expressions (`{{ }}`) render verbatim so the agent can copy them into bindings.
|
|
13
|
+
* Large graphs truncate with an explicit hint to call `workflow.get` for the full definition.
|
|
14
|
+
*/
|
|
15
|
+
import type { WorkflowDef } from "./node-schema.js";
|
|
16
|
+
import type { TriggerDef } from "./workflow-patch.js";
|
|
17
|
+
/** The minimal shape needed to render (WorkflowRecord satisfies it). */
|
|
18
|
+
export interface RenderableWorkflow {
|
|
19
|
+
name: string;
|
|
20
|
+
rev: number;
|
|
21
|
+
active: boolean;
|
|
22
|
+
trigger?: TriggerDef | null;
|
|
23
|
+
def: WorkflowDef;
|
|
24
|
+
}
|
|
25
|
+
export interface RenderOptions {
|
|
26
|
+
/** Max nodes to list before truncating (default 50). */
|
|
27
|
+
maxNodes?: number;
|
|
28
|
+
/** Max rendered length of a single param value before eliding (default 60). */
|
|
29
|
+
maxValueLen?: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Render a workflow as compact agent-context text. Shape (spec §B):
|
|
33
|
+
*
|
|
34
|
+
* Workflow "晨报" (rev 7, trigger: schedule "0 9 * * *", active)
|
|
35
|
+
* nodes:
|
|
36
|
+
* n1 [agent] prompt="抓取今日新闻要点" out: default
|
|
37
|
+
* n3 [if] cond={{ $json.count > 0 }} out: true,false
|
|
38
|
+
* edges:
|
|
39
|
+
* n1.default→n2.default ; n3.true→n4.default
|
|
40
|
+
*/
|
|
41
|
+
export declare function renderWorkflow(wf: RenderableWorkflow, opts?: RenderOptions): string;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WorkflowRuntime — the automation data-routing driver (M2; plan §M2, spec §A1/§A5).
|
|
3
|
+
*
|
|
4
|
+
* Responsibilities (control/data separation, spec §A1):
|
|
5
|
+
* - DagScheduler v2 owns CONTROL (ready/skip/loop/ports). The runtime owns DATA:
|
|
6
|
+
* for each ready node it collects upstream outputs along data edges (fromPort→toPort),
|
|
7
|
+
* resolves param expressions, invokes the registered NodeExecutor, stores outputs, and
|
|
8
|
+
* reports completion + firedPorts back to the scheduler.
|
|
9
|
+
* - run-from-node + output cache (spec §A5): cache key = hash(kind + resolved params +
|
|
10
|
+
* input signature + runIndex). A clean node hits cache (executor skipped); a changed node
|
|
11
|
+
* and its dirty downstream recompute. This is content-addressed, so successive run() calls
|
|
12
|
+
* after a param change recompute only the dirty subgraph.
|
|
13
|
+
* - loop control is runtime-owned (DagScheduler.decideLoop), not a user executor.
|
|
14
|
+
* - every node passes an injectable budget/permission gate before executing (plan D15).
|
|
15
|
+
*
|
|
16
|
+
* fail-loud: unknown kinds, gate rejections, and executor errors all throw and halt the run.
|
|
17
|
+
*/
|
|
18
|
+
import { DagScheduler } from "../dag-scheduler.js";
|
|
19
|
+
import { type PortMap } from "./data-item.js";
|
|
20
|
+
import { NodeRegistry } from "./node-registry.js";
|
|
21
|
+
import type { RunCheckpoint } from "./run-checkpoint-store.js";
|
|
22
|
+
import type { WorkflowDef, ExecutorHost } from "./node-schema.js";
|
|
23
|
+
/** Gate invoked before each node executes (budget / permission). Throw to halt the run. */
|
|
24
|
+
export interface ExecutionGate {
|
|
25
|
+
check(nodeId: string, kind: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* Optionally raise the gate's remaining allowance so a budget-paused run can resume (D15
|
|
28
|
+
* "抬预算后 resume"). Gates without a budget may omit this. Implementations are fail-loud on
|
|
29
|
+
* non-positive deltas.
|
|
30
|
+
*/
|
|
31
|
+
extend?(delta: {
|
|
32
|
+
executions?: number;
|
|
33
|
+
durationMs?: number;
|
|
34
|
+
}): void;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Thrown by a gate (or `pause()`) to suspend the run gracefully. Unlike a plain error this is
|
|
38
|
+
* not a failure: completed work stays cached, and a later `run()` on the same instance resumes
|
|
39
|
+
* (cached nodes hit, only the not-yet-run remainder executes).
|
|
40
|
+
*/
|
|
41
|
+
export declare class WorkflowPauseSignal extends Error {
|
|
42
|
+
readonly atNodeId?: string | undefined;
|
|
43
|
+
constructor(atNodeId?: string | undefined);
|
|
44
|
+
}
|
|
45
|
+
export interface RunResult {
|
|
46
|
+
status: "completed" | "failed" | "paused";
|
|
47
|
+
/** nodeId → its output PortMap. */
|
|
48
|
+
outputs: Record<string, PortMap>;
|
|
49
|
+
/** nodeIds whose executor actually ran in this run (cache misses). */
|
|
50
|
+
executed: Set<string>;
|
|
51
|
+
progress: ReturnType<DagScheduler["getProgress"]>;
|
|
52
|
+
/** Set when status === "paused": the node the run suspended at. */
|
|
53
|
+
pausedAt?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface WorkflowRuntimeOptions {
|
|
56
|
+
registry?: NodeRegistry;
|
|
57
|
+
gate?: ExecutionGate;
|
|
58
|
+
now?: () => Date;
|
|
59
|
+
trigger?: Record<string, unknown>;
|
|
60
|
+
log?: {
|
|
61
|
+
info(m: string): void;
|
|
62
|
+
warn(m: string): void;
|
|
63
|
+
};
|
|
64
|
+
/** Host capabilities for host-backed kinds (agent/tool/http/mcp/channel), D13. */
|
|
65
|
+
host?: ExecutorHost;
|
|
66
|
+
/** Cancellation propagated to host calls. */
|
|
67
|
+
signal?: AbortSignal;
|
|
68
|
+
/** Durable run checkpoint for crash-restart recovery (plan §M3). */
|
|
69
|
+
checkpoint?: RunCheckpoint;
|
|
70
|
+
}
|
|
71
|
+
export declare class WorkflowRuntime {
|
|
72
|
+
private def;
|
|
73
|
+
private readonly registry;
|
|
74
|
+
private readonly gate?;
|
|
75
|
+
private readonly now;
|
|
76
|
+
private readonly trigger?;
|
|
77
|
+
private readonly log?;
|
|
78
|
+
private readonly host?;
|
|
79
|
+
private readonly signal?;
|
|
80
|
+
private readonly checkpoint?;
|
|
81
|
+
private dag;
|
|
82
|
+
private readonly nodeDefs;
|
|
83
|
+
private readonly nodeOutputs;
|
|
84
|
+
/** Content-addressed output cache; persists across run() calls for run-from-node. */
|
|
85
|
+
private readonly cache;
|
|
86
|
+
/** loopBack source nodeId → loop controller nodeId. */
|
|
87
|
+
private readonly loopBackOf;
|
|
88
|
+
/** Cooperative pause request; honored before the next node executes. */
|
|
89
|
+
private pauseRequested;
|
|
90
|
+
/** True once the durable checkpoint has been loaded into `cache` (load once per instance). */
|
|
91
|
+
private checkpointLoaded;
|
|
92
|
+
constructor(def: WorkflowDef, opts?: WorkflowRuntimeOptions);
|
|
93
|
+
/** Patch a node's params (for run-from-node param changes). Invalidates nothing directly —
|
|
94
|
+
* the content-addressed cache recomputes only what changed. */
|
|
95
|
+
setNodeParams(nodeId: string, params: Record<string, unknown>): void;
|
|
96
|
+
/** Request a cooperative pause: the in-flight run suspends before the next node executes. */
|
|
97
|
+
pause(): void;
|
|
98
|
+
/**
|
|
99
|
+
* Raise the budget gate's remaining allowance so a budget-paused run can resume (D15
|
|
100
|
+
* "抬预算后 resume"). fail-loud if this runtime was built without an extensible budget gate.
|
|
101
|
+
*/
|
|
102
|
+
extendBudget(delta: {
|
|
103
|
+
executions?: number;
|
|
104
|
+
durationMs?: number;
|
|
105
|
+
}): void;
|
|
106
|
+
/** Execute the workflow to completion (or until the gate halts / a branch fails / a pause). */
|
|
107
|
+
run(): Promise<RunResult>;
|
|
108
|
+
/**
|
|
109
|
+
* Seed the content-addressed cache from a durable checkpoint (once per instance). After a
|
|
110
|
+
* crash-restart a fresh runtime replays the DAG; nodes that completed before the crash hit
|
|
111
|
+
* these entries and their executors are not re-invoked (no duplicate side effects).
|
|
112
|
+
*/
|
|
113
|
+
private loadCheckpoint;
|
|
114
|
+
/** Persist the full content-addressed cache so a crash mid-run can resume from here. */
|
|
115
|
+
private persistCheckpoint;
|
|
116
|
+
private executeNode;
|
|
117
|
+
/** Loop entry: fire the "loop" port once to kick the first iteration. */
|
|
118
|
+
private enterLoop;
|
|
119
|
+
private decideLoopBack;
|
|
120
|
+
/** Loop again? No condition → loop until the scheduler's maxIterations cap. */
|
|
121
|
+
private evalLoopCondition;
|
|
122
|
+
/** Collect inputs for a node from completed upstream outputs along forward data edges. */
|
|
123
|
+
private collectInputs;
|
|
124
|
+
private buildExprContext;
|
|
125
|
+
private cacheKey;
|
|
126
|
+
private buildDag;
|
|
127
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-process workflow trigger scheduler (plan M3 trigger layer).
|
|
3
|
+
*
|
|
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 openclaw gateway
|
|
6
|
+
* into qlogicagent so the Agent owns its own timed lifecycle ("Agent 是唯一状态拥有者"). The gateway
|
|
7
|
+
* remains a pure relay: it terminates external ingress (webhook HTTP, inbound IM) and forwards those
|
|
8
|
+
* events here via `onWebhook` / `onImMessage`; the cron clock and the run decision are the Agent's.
|
|
9
|
+
*
|
|
10
|
+
* The scheduler is the consumer of WorkflowController: on `start()` it loads every active workflow
|
|
11
|
+
* (`listActive`, spec §B4 restart re-registration) and arms a timer per `schedule` trigger; on fire
|
|
12
|
+
* it calls `controller.run(id, { type: "schedule" })`. Webhook / IM / manual triggers are
|
|
13
|
+
* caller-driven (the gateway relay or the agent invokes the matching method). Concurrency,
|
|
14
|
+
* budgeting, and permission gating all live in `controller.run` — the scheduler only decides WHEN.
|
|
15
|
+
*
|
|
16
|
+
* Determinism: the clock (now + timers) is injected, so tests pin time exactly and far-future cron
|
|
17
|
+
* delays are handled by chunked re-arming (Node's setTimeout caps at ~24.8 days).
|
|
18
|
+
*/
|
|
19
|
+
import type { WorkflowController, RunOutcome } from "./workflow-controller.js";
|
|
20
|
+
export type TimerHandle = unknown;
|
|
21
|
+
/** Injectable clock + timer surface so the scheduler is fully deterministic under test. */
|
|
22
|
+
export interface SchedulerClock {
|
|
23
|
+
now(): number;
|
|
24
|
+
setTimer(fn: () => void, delayMs: number): TimerHandle;
|
|
25
|
+
clearTimer(handle: TimerHandle): void;
|
|
26
|
+
}
|
|
27
|
+
/** Default clock backed by the real system time and Node timers. */
|
|
28
|
+
export declare const systemClock: SchedulerClock;
|
|
29
|
+
export interface SchedulerDeps {
|
|
30
|
+
controller: WorkflowController;
|
|
31
|
+
clock?: SchedulerClock;
|
|
32
|
+
/**
|
|
33
|
+
* Surfaces an error from a timer-driven (cron) run, which has no caller to throw back to.
|
|
34
|
+
* Required so a failed unattended run is never silently swallowed (§1.5 fail-loud). Caller-driven
|
|
35
|
+
* triggers (webhook/IM/manual) propagate their errors to the caller instead.
|
|
36
|
+
*/
|
|
37
|
+
onError: (err: unknown, workflowId: string) => void;
|
|
38
|
+
}
|
|
39
|
+
export declare class WorkflowScheduler {
|
|
40
|
+
private readonly controller;
|
|
41
|
+
private readonly clock;
|
|
42
|
+
private readonly onError;
|
|
43
|
+
/** Every registered workflow's trigger, keyed by id (the single source for lookups). */
|
|
44
|
+
private readonly triggers;
|
|
45
|
+
/** Active cron arms keyed by workflow id. */
|
|
46
|
+
private readonly cronArms;
|
|
47
|
+
private started;
|
|
48
|
+
constructor(deps: SchedulerDeps);
|
|
49
|
+
/** Load every active workflow and arm its trigger (spec §B4 restart re-registration). */
|
|
50
|
+
start(): Promise<void>;
|
|
51
|
+
/** Stop all timers and forget every registration. Idempotent. */
|
|
52
|
+
stop(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Re-read a workflow and (re-)arm its trigger after a create/patch/setActive change. If the
|
|
55
|
+
* workflow no longer exists or is inactive it is unregistered. Active workflows are armed by
|
|
56
|
+
* their current trigger (manual ⇒ lookup-only, no timer).
|
|
57
|
+
*/
|
|
58
|
+
refresh(id: string): Promise<void>;
|
|
59
|
+
/** Drop a workflow's registration and cancel any pending cron timer. */
|
|
60
|
+
unregister(id: string): void;
|
|
61
|
+
/** Workflow ids currently registered (for inspection/tests). */
|
|
62
|
+
registeredIds(): string[];
|
|
63
|
+
/** The epoch ms a scheduled workflow will next fire, or undefined if it has no cron arm. */
|
|
64
|
+
nextFireAt(id: string): number | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Deliver an external webhook hit. Runs every active workflow whose webhook trigger path equals
|
|
67
|
+
* `path`. Returns the outcomes (empty ⇒ no workflow matched, which the gateway maps to 404).
|
|
68
|
+
* Errors propagate to the caller (the HTTP handler), which is the fail-loud surface here.
|
|
69
|
+
*/
|
|
70
|
+
onWebhook(path: string, payload?: Record<string, unknown>): Promise<RunOutcome[]>;
|
|
71
|
+
/**
|
|
72
|
+
* Deliver an inbound IM message. Runs every active workflow whose im-message trigger is on
|
|
73
|
+
* `channel` and whose optional `match` regex tests `text`. The message text + channel are merged
|
|
74
|
+
* into the run payload so downstream nodes can reference `$trigger`.
|
|
75
|
+
*/
|
|
76
|
+
onImMessage(channel: string, text: string, payload?: Record<string, unknown>): Promise<RunOutcome[]>;
|
|
77
|
+
/** Manually trigger a single workflow (the agent's `workflow.run`). Errors propagate to caller. */
|
|
78
|
+
triggerManual(id: string, payload?: Record<string, unknown>): Promise<RunOutcome>;
|
|
79
|
+
private matchingIds;
|
|
80
|
+
private registerTrigger;
|
|
81
|
+
private armCron;
|
|
82
|
+
private fireCron;
|
|
83
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Store — persist workflow definitions + lifecycle state to disk (spec §B4).
|
|
3
|
+
*
|
|
4
|
+
* Stored at `<project>/.qlogicagent/workflows/<workflowId>/workflow.json`. Listing enumerates
|
|
5
|
+
* subdirectories (mirrors product-persistence.ts). The store is the single source of truth for a
|
|
6
|
+
* workflow's definition, its active flag, and its concurrency policy; the gateway re-registers
|
|
7
|
+
* triggers for every active workflow on restart (spec §B4).
|
|
8
|
+
*
|
|
9
|
+
* fail-loud: missing id on save throws; load returns undefined only for a genuinely absent record.
|
|
10
|
+
*/
|
|
11
|
+
import type { WorkflowDef } from "./node-schema.js";
|
|
12
|
+
import type { TriggerDef } from "./workflow-patch.js";
|
|
13
|
+
/** What to do when a workflow is triggered while a previous run is still in-flight (spec §B5). */
|
|
14
|
+
export type ConcurrencyPolicy = "queue" | "skip" | "parallel";
|
|
15
|
+
export interface WorkflowRecord {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
def: WorkflowDef;
|
|
19
|
+
/** Active workflows have their triggers registered by the gateway (spec §B4). */
|
|
20
|
+
active: boolean;
|
|
21
|
+
concurrency: ConcurrencyPolicy;
|
|
22
|
+
/** The workflow's trigger (set via a WorkflowPatch set_trigger op; spec §C/D7). */
|
|
23
|
+
trigger?: TriggerDef | null;
|
|
24
|
+
/** Monotonic revision for optimistic concurrency (LWW); bumped on every patch (spec §C). */
|
|
25
|
+
rev: number;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
updatedAt: string;
|
|
28
|
+
}
|
|
29
|
+
export declare class WorkflowStore {
|
|
30
|
+
private readonly cwd;
|
|
31
|
+
constructor(cwd: string);
|
|
32
|
+
save(record: WorkflowRecord): Promise<void>;
|
|
33
|
+
load(id: string): Promise<WorkflowRecord | undefined>;
|
|
34
|
+
/** Load a record or throw (fail-loud lookup for callers that require existence). */
|
|
35
|
+
require(id: string): Promise<WorkflowRecord>;
|
|
36
|
+
list(): Promise<WorkflowRecord[]>;
|
|
37
|
+
/** Active workflows the gateway must re-register triggers for after a restart (spec §B4). */
|
|
38
|
+
listActive(): Promise<WorkflowRecord[]>;
|
|
39
|
+
delete(id: string): Promise<void>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Workflow trigger definitions shared by patching, validation, storage, and render helpers. */
|
|
2
|
+
export type TriggerDef = {
|
|
3
|
+
type: "manual";
|
|
4
|
+
} | {
|
|
5
|
+
type: "schedule";
|
|
6
|
+
cron: string;
|
|
7
|
+
} | {
|
|
8
|
+
type: "im-message";
|
|
9
|
+
channel: string;
|
|
10
|
+
match?: string;
|
|
11
|
+
} | {
|
|
12
|
+
type: "webhook";
|
|
13
|
+
path: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { PERMISSION_MODES, } from "./runtime/ports/permission-contracts.js";
|
|
2
|
+
export type { ApprovalRequest, ApprovalResponse, PermissionAllowResult, PermissionApprovalResolver, PermissionAskResult, PermissionBehavior, PermissionConfig, PermissionDecisionReason, PermissionDenyResult, PermissionMetadataResolver, PermissionMode, PermissionResult, PermissionRuleEnginePort, PermissionRuleEntry, PermissionUpdate, ToolPermissionCheckInput, } from "./runtime/ports/permission-contracts.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Reference: Codex app-server RPC, Claude Code JSON-RPC, GitHub Copilot Agent API.
|
|
8
8
|
*/
|
|
9
|
-
import type { ChatMessage, ToolDefinition } from "
|
|
10
|
-
import type { TaskItem as TodoItem } from "../skills/tools/task-tool.js";
|
|
9
|
+
import type { ChatMessage, LocalizedToolText, ToolCapabilityCategory, ToolDefinition } from "./wire/chat-types.js";
|
|
11
10
|
import type { AgentDescriptor, AgentConfig, GatewayRpcMethodMap, RpcProjectInfo, RpcProjectType, RpcProjectStatus, SoloStatus, ProductStatus, ProductSummary } from "./wire/index.js";
|
|
12
|
-
import type { AgentsScanParams, AgentsConfigParams, AgentsSetConfigParams, AgentsGetConfigParams, AgentsRemoveConfigParams, AgentsSetGatewayParams, SoloStartParams, SoloIdParams, SoloSelectParams, SoloDeleteParams, SoloMessageParams, SoloEvaluateParams, SoloEvaluation, ProductCreateParams, ProductPlanParams, ProductPlan, ProductConfirmParams, ProductMessageParams, ProductIdParams, ProductDeleteParams } from "
|
|
11
|
+
import type { AgentsScanParams, AgentsConfigParams, AgentsSetConfigParams, AgentsGetConfigParams, AgentsRemoveConfigParams, AgentsSetGatewayParams, SoloStartParams, SoloIdParams, SoloSelectParams, SoloDeleteParams, SoloMessageParams, SoloEvaluateParams, SoloEvaluation, ProductCreateParams, ProductPlanParams, ProductPlan, ProductConfirmParams, ProductMessageParams, ProductIdParams, ProductDeleteParams } from "./wire/acp-agent-management.js";
|
|
13
12
|
export interface InitializeParams {
|
|
14
13
|
protocolVersion: string;
|
|
15
14
|
host?: {
|
|
@@ -181,20 +180,25 @@ export interface MemoryDreamResult {
|
|
|
181
180
|
}
|
|
182
181
|
export interface ToolsListParams {
|
|
183
182
|
/** Filter by category. */
|
|
184
|
-
category?:
|
|
185
|
-
/** Include
|
|
186
|
-
|
|
183
|
+
category?: ToolCapabilityCategory;
|
|
184
|
+
/** Include tools that are normally deferred until activated. */
|
|
185
|
+
includeDeferred?: boolean;
|
|
187
186
|
}
|
|
188
187
|
export interface ToolsListResult {
|
|
189
188
|
tools: Array<{
|
|
189
|
+
id: string;
|
|
190
190
|
name: string;
|
|
191
|
+
category: ToolCapabilityCategory;
|
|
192
|
+
displayName: LocalizedToolText;
|
|
193
|
+
displayDescription: LocalizedToolText;
|
|
194
|
+
fallbackName: string;
|
|
195
|
+
fallbackDescription: string;
|
|
191
196
|
description: string;
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
requiresApproval?: boolean;
|
|
195
|
-
/** Parameter schema (if includeSchema=true). */
|
|
197
|
+
source: "builtin";
|
|
198
|
+
deferred: boolean;
|
|
196
199
|
parameters?: Record<string, unknown>;
|
|
197
200
|
}>;
|
|
201
|
+
total: number;
|
|
198
202
|
}
|
|
199
203
|
export interface SettingsListProvidersResult {
|
|
200
204
|
providers: Array<{
|
|
@@ -319,10 +323,202 @@ export interface ConfigUpdateResult {
|
|
|
319
323
|
reason: string;
|
|
320
324
|
}>;
|
|
321
325
|
}
|
|
326
|
+
export interface CommunityConsentView {
|
|
327
|
+
enabled: boolean;
|
|
328
|
+
methodSharingEnabled: boolean;
|
|
329
|
+
signalsEnabled: boolean;
|
|
330
|
+
encounterEnabled: boolean;
|
|
331
|
+
remoteSynced: boolean;
|
|
332
|
+
}
|
|
333
|
+
export interface CommunityGetConsentResult {
|
|
334
|
+
ok: boolean;
|
|
335
|
+
remoteAvailable: boolean;
|
|
336
|
+
consent: CommunityConsentView;
|
|
337
|
+
error?: string;
|
|
338
|
+
}
|
|
339
|
+
export interface CommunitySetConsentParams {
|
|
340
|
+
enabled: boolean;
|
|
341
|
+
methodSharingEnabled?: boolean;
|
|
342
|
+
signalsEnabled?: boolean;
|
|
343
|
+
encounterEnabled?: boolean;
|
|
344
|
+
}
|
|
345
|
+
export interface CommunitySetConsentResult {
|
|
346
|
+
ok: boolean;
|
|
347
|
+
remoteAvailable: boolean;
|
|
348
|
+
consent: CommunityConsentView;
|
|
349
|
+
warning?: string;
|
|
350
|
+
}
|
|
351
|
+
export interface CommunitySharedResource {
|
|
352
|
+
id: string;
|
|
353
|
+
type: string;
|
|
354
|
+
title: string;
|
|
355
|
+
summary: string;
|
|
356
|
+
visibility: string;
|
|
357
|
+
latestVersion: string | null;
|
|
358
|
+
withdrawn: boolean;
|
|
359
|
+
withdrawnAt: string | null;
|
|
360
|
+
}
|
|
361
|
+
export interface CommunityListSharedResult {
|
|
362
|
+
ok: boolean;
|
|
363
|
+
resources: CommunitySharedResource[];
|
|
364
|
+
}
|
|
365
|
+
export interface CommunityWithdrawSharedParams {
|
|
366
|
+
resourceId: string;
|
|
367
|
+
reason?: string;
|
|
368
|
+
}
|
|
369
|
+
export interface CommunityWithdrawSharedResult {
|
|
370
|
+
ok: boolean;
|
|
371
|
+
resource: CommunitySharedResource;
|
|
372
|
+
}
|
|
373
|
+
export interface CommunityWithdrawAllSharedParams {
|
|
374
|
+
reason?: string;
|
|
375
|
+
}
|
|
376
|
+
export interface CommunityWithdrawAllSharedResult {
|
|
377
|
+
ok: boolean;
|
|
378
|
+
resources: CommunitySharedResource[];
|
|
379
|
+
}
|
|
380
|
+
export interface CommunityNotice {
|
|
381
|
+
id: number;
|
|
382
|
+
resourceId: string;
|
|
383
|
+
resourceType: string;
|
|
384
|
+
title: string;
|
|
385
|
+
event: "withdrawn";
|
|
386
|
+
version: string | null;
|
|
387
|
+
reason: string | null;
|
|
388
|
+
read: boolean;
|
|
389
|
+
createdAt: string;
|
|
390
|
+
readAt: string | null;
|
|
391
|
+
}
|
|
392
|
+
export interface CommunityListNoticesParams {
|
|
393
|
+
includeRead?: boolean;
|
|
394
|
+
}
|
|
395
|
+
export interface CommunityListNoticesResult {
|
|
396
|
+
ok: boolean;
|
|
397
|
+
notices: CommunityNotice[];
|
|
398
|
+
}
|
|
399
|
+
export interface CommunityMarkNoticeReadParams {
|
|
400
|
+
noticeId: number;
|
|
401
|
+
}
|
|
402
|
+
export interface CommunityMarkNoticeReadResult {
|
|
403
|
+
ok: boolean;
|
|
404
|
+
notice: CommunityNotice;
|
|
405
|
+
}
|
|
406
|
+
export interface CommunityPublishSkillParams {
|
|
407
|
+
id: string;
|
|
408
|
+
title: string;
|
|
409
|
+
summary: string;
|
|
410
|
+
visibility?: "public" | "private";
|
|
411
|
+
tags?: string[];
|
|
412
|
+
manifest: Record<string, unknown>;
|
|
413
|
+
version?: string;
|
|
414
|
+
packageGzipBase64?: string;
|
|
415
|
+
}
|
|
416
|
+
export interface CommunityPublishedVersion {
|
|
417
|
+
version: string;
|
|
418
|
+
checksum: string;
|
|
419
|
+
sizeBytes: number;
|
|
420
|
+
}
|
|
421
|
+
export interface CommunityPublishSkillResult {
|
|
422
|
+
ok: boolean;
|
|
423
|
+
resource: CommunitySharedResource;
|
|
424
|
+
version?: CommunityPublishedVersion;
|
|
425
|
+
}
|
|
426
|
+
export type CommunitySignalEvent = "installed" | "success" | "fail" | "neutral" | "kept" | "uninstalled" | "endorse" | "error";
|
|
427
|
+
export interface CommunityRecordSignalParams {
|
|
428
|
+
resourceId: string;
|
|
429
|
+
event: CommunitySignalEvent;
|
|
430
|
+
attribution?: string;
|
|
431
|
+
metadata?: Record<string, unknown>;
|
|
432
|
+
}
|
|
433
|
+
export interface CommunityRecordSignalResult {
|
|
434
|
+
ok: boolean;
|
|
435
|
+
accepted: true;
|
|
436
|
+
}
|
|
437
|
+
export type CommunityTelemetryEvent = "community.journey.view" | "community.share.generated" | "community.sandbox.violation" | "community.desensitization.hit";
|
|
438
|
+
export interface CommunityRecordTelemetryParams {
|
|
439
|
+
event: CommunityTelemetryEvent;
|
|
440
|
+
metadata?: Record<string, unknown>;
|
|
441
|
+
}
|
|
442
|
+
export interface CommunityRecordTelemetryResult {
|
|
443
|
+
ok: boolean;
|
|
444
|
+
accepted: true;
|
|
445
|
+
}
|
|
446
|
+
export interface CommunityListPublishAuditParams {
|
|
447
|
+
limit?: number;
|
|
448
|
+
}
|
|
449
|
+
export interface CommunityPublishAuditEntry {
|
|
450
|
+
eventTurnId: string;
|
|
451
|
+
skillName: string;
|
|
452
|
+
decision: "published" | "blocked" | "skipped";
|
|
453
|
+
reason: string;
|
|
454
|
+
resourceId?: string;
|
|
455
|
+
createdAt: string;
|
|
456
|
+
}
|
|
457
|
+
export interface CommunityListPublishAuditResult {
|
|
458
|
+
ok: boolean;
|
|
459
|
+
entries: CommunityPublishAuditEntry[];
|
|
460
|
+
}
|
|
461
|
+
export type CommunityInstallRiskTier = "R0" | "R1" | "R2" | "R3";
|
|
462
|
+
export type CommunityInstallSourceTier = "official" | "community";
|
|
463
|
+
export type CommunityInstallTrustStage = "quarantine" | "trial" | "trusted";
|
|
464
|
+
export type CommunityInstallReviewStatus = "pending" | "approved" | "rejected";
|
|
465
|
+
export interface CommunityInstallResolution {
|
|
466
|
+
id: string;
|
|
467
|
+
type: string;
|
|
468
|
+
kind: string;
|
|
469
|
+
sourceTier: CommunityInstallSourceTier;
|
|
470
|
+
trustStage: CommunityInstallTrustStage;
|
|
471
|
+
reviewStatus: CommunityInstallReviewStatus;
|
|
472
|
+
resourceRiskTier: CommunityInstallRiskTier;
|
|
473
|
+
effectiveRiskTier: CommunityInstallRiskTier;
|
|
474
|
+
requires: string[];
|
|
475
|
+
dependencies: CommunityInstallResolution[];
|
|
476
|
+
version: string;
|
|
477
|
+
checksum: string;
|
|
478
|
+
sizeBytes: number;
|
|
479
|
+
downloadUrl: string;
|
|
480
|
+
manifest: unknown;
|
|
481
|
+
}
|
|
482
|
+
export interface CommunityResolveInstallParams {
|
|
483
|
+
resourceId: string;
|
|
484
|
+
version?: string;
|
|
485
|
+
explicitInstallConsent: true;
|
|
486
|
+
explicitHighRiskConsent?: true;
|
|
487
|
+
}
|
|
488
|
+
export interface CommunityResolveInstallResult {
|
|
489
|
+
ok: boolean;
|
|
490
|
+
install: CommunityInstallResolution;
|
|
491
|
+
}
|
|
492
|
+
export interface CommunityInstallResourceParams {
|
|
493
|
+
resourceId: string;
|
|
494
|
+
version?: string;
|
|
495
|
+
explicitInstallConsent: true;
|
|
496
|
+
}
|
|
497
|
+
export interface CommunityInstalledResource {
|
|
498
|
+
resourceId: string;
|
|
499
|
+
version: string;
|
|
500
|
+
skillName: string;
|
|
501
|
+
installDir: string;
|
|
502
|
+
checksum: string;
|
|
503
|
+
}
|
|
504
|
+
export interface CommunityInstallResourceResult {
|
|
505
|
+
ok: boolean;
|
|
506
|
+
installed: CommunityInstalledResource;
|
|
507
|
+
signalWarning?: string;
|
|
508
|
+
}
|
|
322
509
|
export interface TodosListParams {
|
|
323
510
|
/** Filter by status. */
|
|
324
511
|
status?: "not-started" | "in-progress" | "completed" | "all";
|
|
325
512
|
}
|
|
513
|
+
export interface TodoItem {
|
|
514
|
+
id: number;
|
|
515
|
+
title: string;
|
|
516
|
+
status: "not-started" | "in-progress" | "completed";
|
|
517
|
+
description?: string;
|
|
518
|
+
owner?: string;
|
|
519
|
+
blockedBy?: number[];
|
|
520
|
+
blocks?: number[];
|
|
521
|
+
}
|
|
326
522
|
export interface TodosListResult {
|
|
327
523
|
items: TodoItem[];
|
|
328
524
|
summary: {
|
|
@@ -344,10 +540,13 @@ export interface AgentAbortResult {
|
|
|
344
540
|
export interface ToolApprovalResponseParams {
|
|
345
541
|
approvalId: string;
|
|
346
542
|
decision: "allow-once" | "allow-session" | "allow-always" | "deny";
|
|
543
|
+
toolName?: string;
|
|
347
544
|
updatedInput?: Record<string, unknown>;
|
|
348
545
|
permissionUpdate?: {
|
|
349
546
|
pattern: string;
|
|
350
|
-
behavior:
|
|
547
|
+
behavior: "allow" | "ask" | "deny";
|
|
548
|
+
scope?: "session" | "persistent";
|
|
549
|
+
description?: string;
|
|
351
550
|
};
|
|
352
551
|
}
|
|
353
552
|
export interface MemorySearchParams {
|
|
@@ -522,6 +721,58 @@ export interface RpcMethodMap {
|
|
|
522
721
|
params: ConfigUpdateParams;
|
|
523
722
|
result: ConfigUpdateResult;
|
|
524
723
|
};
|
|
724
|
+
"community.getConsent": {
|
|
725
|
+
params: undefined;
|
|
726
|
+
result: CommunityGetConsentResult;
|
|
727
|
+
};
|
|
728
|
+
"community.setConsent": {
|
|
729
|
+
params: CommunitySetConsentParams;
|
|
730
|
+
result: CommunitySetConsentResult;
|
|
731
|
+
};
|
|
732
|
+
"community.listShared": {
|
|
733
|
+
params: undefined;
|
|
734
|
+
result: CommunityListSharedResult;
|
|
735
|
+
};
|
|
736
|
+
"community.withdrawShared": {
|
|
737
|
+
params: CommunityWithdrawSharedParams;
|
|
738
|
+
result: CommunityWithdrawSharedResult;
|
|
739
|
+
};
|
|
740
|
+
"community.withdrawAllShared": {
|
|
741
|
+
params: CommunityWithdrawAllSharedParams;
|
|
742
|
+
result: CommunityWithdrawAllSharedResult;
|
|
743
|
+
};
|
|
744
|
+
"community.listNotices": {
|
|
745
|
+
params: CommunityListNoticesParams;
|
|
746
|
+
result: CommunityListNoticesResult;
|
|
747
|
+
};
|
|
748
|
+
"community.markNoticeRead": {
|
|
749
|
+
params: CommunityMarkNoticeReadParams;
|
|
750
|
+
result: CommunityMarkNoticeReadResult;
|
|
751
|
+
};
|
|
752
|
+
"community.listPublishAudit": {
|
|
753
|
+
params: CommunityListPublishAuditParams;
|
|
754
|
+
result: CommunityListPublishAuditResult;
|
|
755
|
+
};
|
|
756
|
+
"community.resolveInstall": {
|
|
757
|
+
params: CommunityResolveInstallParams;
|
|
758
|
+
result: CommunityResolveInstallResult;
|
|
759
|
+
};
|
|
760
|
+
"community.installResource": {
|
|
761
|
+
params: CommunityInstallResourceParams;
|
|
762
|
+
result: CommunityInstallResourceResult;
|
|
763
|
+
};
|
|
764
|
+
"community.publishSkill": {
|
|
765
|
+
params: CommunityPublishSkillParams;
|
|
766
|
+
result: CommunityPublishSkillResult;
|
|
767
|
+
};
|
|
768
|
+
"community.recordSignal": {
|
|
769
|
+
params: CommunityRecordSignalParams;
|
|
770
|
+
result: CommunityRecordSignalResult;
|
|
771
|
+
};
|
|
772
|
+
"community.recordTelemetry": {
|
|
773
|
+
params: CommunityRecordTelemetryParams;
|
|
774
|
+
result: CommunityRecordTelemetryResult;
|
|
775
|
+
};
|
|
525
776
|
"todos.list": {
|
|
526
777
|
params: TodosListParams;
|
|
527
778
|
result: TodosListResult;
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* These types define the contract for discovering, registering, and managing
|
|
5
5
|
* external ACP-compatible agent CLIs alongside qlogicagent's internal agents.
|
|
6
6
|
*/
|
|
7
|
-
import type { AgentCapabilities, CustomAgentDef, AgentConfig, ProductTaskStatus, ProductInstanceDef, ProductTaskDef } from "
|
|
8
|
-
export type { AgentCategory, AgentProtocol, AgentStatus, AgentCapabilities, AgentDescriptor, CustomAgentDef, AgentConfig, SoloState, SoloAgentState, SoloAgentResult, SoloStatus, ProductPhase, ProductTaskStatus, ProductInstanceDef, ProductTaskDef, ProductStatus, ProductSummary, } from "
|
|
7
|
+
import type { AgentCapabilities, CustomAgentDef, AgentConfig, ProductTaskStatus, ProductInstanceDef, ProductTaskDef } from "./agent-methods.js";
|
|
8
|
+
export type { AgentCategory, AgentProtocol, AgentStatus, AgentCapabilities, AgentDescriptor, CustomAgentDef, AgentConfig, SoloState, SoloAgentState, SoloAgentResult, SoloStatus, ProductPhase, ProductTaskStatus, ProductInstanceDef, ProductTaskDef, ProductStatus, ProductSummary, } from "./agent-methods.js";
|
|
9
9
|
/** Pre-defined configuration for a known ACP backend. */
|
|
10
10
|
export interface AcpBackendConfig {
|
|
11
11
|
/** Backend ID, e.g. "claude" | "codex" | "goose". */
|
|
@@ -360,4 +360,4 @@ export interface SoloDeleteParams {
|
|
|
360
360
|
export interface ProductDeleteParams {
|
|
361
361
|
productId: string;
|
|
362
362
|
}
|
|
363
|
-
export type { AgentSource } from "
|
|
363
|
+
export type { AgentSource } from "./notification-payloads.js";
|