qlogicagent 2.18.6 → 2.18.7
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 +382 -382
- package/dist/agent.js +30 -30
- package/dist/cli.js +1 -1
- package/dist/default-project-knowledge/INSTRUCTIONS.md +7 -7
- package/dist/default-project-knowledge/rules/project-workflow.md +6 -6
- package/dist/host-contract.js +1 -0
- package/dist/index.js +539 -530
- package/dist/orchestration.js +4 -4
- package/dist/permissions.js +1 -1
- package/dist/plugin-marketplace-compute.js +1 -0
- package/dist/protocol.js +1 -1
- package/dist/runtime/infra/mcp-bridge-server.js +275 -275
- package/dist/skills/builtin/desktop-screenshot/SKILL.md +62 -62
- package/dist/skills/builtin/office-doc-reading/SKILL.md +19 -19
- package/dist/skills/mcp/astraclaw-native-mcp-server.js +4 -4
- package/dist/tunables.js +1 -0
- package/dist/types/agent/runtime-vars.d.ts +1 -2
- package/dist/types/agent/tool-loop.d.ts +6 -0
- package/dist/types/agent/tool-loop.test-harness.d.ts +20 -0
- package/dist/types/agent/types.d.ts +2 -0
- package/dist/types/cli/acp-extended-handlers.d.ts +7 -0
- package/dist/types/cli/acp-extended-host-adapter.d.ts +2 -0
- package/dist/types/cli/acp-session-host.d.ts +15 -2
- package/dist/types/cli/base-tool-bootstrap.d.ts +1 -0
- package/dist/types/cli/community-skill-installer.d.ts +2 -0
- package/dist/types/cli/core-tool-coordinator.d.ts +4 -0
- package/dist/types/cli/core-tools/config-tool-bootstrap.d.ts +3 -1
- package/dist/types/cli/core-tools/config-tool-service.d.ts +7 -5
- package/dist/types/cli/default-project-bootstrap.d.ts +1 -0
- package/dist/types/cli/handlers/agents-handler.d.ts +4 -1
- package/dist/types/cli/handlers/community-handler.d.ts +2 -0
- package/dist/types/cli/handlers/config-handler.d.ts +2 -15
- package/dist/types/cli/handlers/pet-handler.d.ts +3 -2
- package/dist/types/cli/handlers/session-handler.d.ts +1 -1
- package/dist/types/cli/handlers/skills-handler.d.ts +12 -10
- package/dist/types/cli/handlers/solo-handler.d.ts +3 -0
- package/dist/types/cli/handlers/turn-handler.d.ts +46 -32
- package/dist/types/cli/handlers/workflow-handler.d.ts +6 -0
- package/dist/types/cli/mcp-bootstrap.d.ts +0 -2
- package/dist/types/cli/media-inline.d.ts +14 -0
- package/dist/types/cli/media-understanding.d.ts +65 -8
- package/dist/types/cli/memory-coordinator.d.ts +8 -0
- package/dist/types/cli/multi-agent-handler-host.d.ts +2 -0
- package/dist/types/cli/permission-bootstrap.d.ts +2 -0
- package/dist/types/cli/pet-runtime.d.ts +0 -1
- package/dist/types/cli/plugin-bootstrap.d.ts +2 -1
- package/dist/types/cli/product-coordinator.d.ts +4 -1
- package/dist/types/cli/rpc-registry.d.ts +1 -3
- package/dist/types/cli/runtime-watcher-bootstrap.d.ts +0 -2
- package/dist/types/cli/session-context.d.ts +4 -2
- package/dist/types/cli/skill-invocation-service.d.ts +2 -0
- package/dist/types/cli/skill-tools-bootstrap.d.ts +2 -0
- package/dist/types/cli/skills-query-service.d.ts +2 -1
- package/dist/types/cli/stdio-acp-protocol-coordinator.d.ts +9 -0
- package/dist/types/cli/stdio-acp-request-host.d.ts +11 -2
- package/dist/types/cli/stdio-rpc-handler-hosts.d.ts +1 -1
- package/dist/types/cli/stdio-runtime-bootstrap.d.ts +6 -0
- package/dist/types/cli/stdio-runtime-services.d.ts +6 -1
- package/dist/types/cli/stdio-server.d.ts +33 -4
- package/dist/types/cli/task-distillation-coordinator.d.ts +9 -4
- package/dist/types/cli/tool-bootstrap-core-registration.d.ts +3 -0
- package/dist/types/cli/tool-bootstrap-media-registration.d.ts +10 -0
- package/dist/types/cli/tool-bootstrap-web-registration.d.ts +1 -0
- package/dist/types/cli/tool-bootstrap.d.ts +9 -0
- package/dist/types/cli/turn-core.d.ts +2 -0
- package/dist/types/cli/turn-preview-browser-setup.d.ts +15 -0
- package/dist/types/cli/turn-project-router.d.ts +1 -1
- package/dist/types/cli/workflow-host-adapter.d.ts +2 -0
- package/dist/types/host-contract/index.d.ts +1475 -0
- package/dist/types/host-contract/project-id.d.ts +5 -0
- package/dist/types/host-contract/provider-profile.d.ts +46 -0
- package/dist/types/orchestration/agent-instance.d.ts +6 -0
- package/dist/types/orchestration/delegation-coordinator.d.ts +40 -0
- package/dist/types/orchestration/goal-mode-adapters.d.ts +3 -0
- package/dist/types/orchestration/product-planner.d.ts +3 -0
- package/dist/types/orchestration/solo-evaluator.d.ts +18 -3
- package/dist/types/orchestration/solo-persistence.d.ts +2 -0
- package/dist/types/orchestration/testing/delegate-test-bridge.d.ts +4 -0
- package/dist/types/permissions.d.ts +2 -0
- package/dist/types/protocol/methods.d.ts +0 -199
- package/dist/types/protocol/wire/acp-protocol.d.ts +16 -1
- package/dist/types/protocol/wire/agent-methods.d.ts +1 -173
- package/dist/types/protocol/wire/chat-types.d.ts +6 -0
- package/dist/types/runtime/config/tunable-defaults.d.ts +13 -3
- package/dist/types/runtime/execution/dream-agent.d.ts +9 -8
- package/dist/types/runtime/infra/agent-paths.d.ts +3 -3
- package/dist/types/runtime/infra/astraclaw-capabilities.d.ts +1 -1
- package/dist/types/runtime/infra/clixml-sanitize.d.ts +16 -0
- package/dist/types/runtime/infra/external-agent-approvals.d.ts +18 -0
- package/dist/types/runtime/infra/feedback-distillation.d.ts +3 -1
- package/dist/types/runtime/infra/feedback-host-authority.d.ts +4 -0
- package/dist/types/runtime/infra/llmrouter-catalog.d.ts +2 -13
- package/dist/types/runtime/infra/model-registry.d.ts +3 -1
- package/dist/types/runtime/infra/project-authority-facade.d.ts +11 -0
- package/dist/types/runtime/infra/project-host-authority.d.ts +10 -0
- package/dist/types/runtime/ports/memory-provider.d.ts +11 -7
- package/dist/types/runtime/ports/tool-contracts.d.ts +2 -0
- package/dist/types/runtime/prompt/fresh-workspace-evidence.d.ts +2 -2
- package/dist/types/runtime/session/session-persistence.d.ts +29 -10
- package/dist/types/runtime/session/session-recovery.d.ts +4 -0
- package/dist/types/runtime/session/session-summary.d.ts +3 -1
- package/dist/types/runtime/session/session-transcript-store.d.ts +7 -0
- package/dist/types/skills/memory/host-memory-provider.d.ts +148 -0
- package/dist/types/skills/memory/local-memory-provider.d.ts +19 -10
- package/dist/types/skills/memory/task-distillation.d.ts +6 -0
- package/dist/types/skills/plugins/plugin-marketplace.d.ts +23 -57
- package/dist/types/skills/tools/media-understand-tool.d.ts +28 -0
- package/dist/types/skills/tools/preview-browser-tool.d.ts +136 -0
- package/dist/types/skills/tools/shell/task-output.d.ts +10 -1
- package/dist/types/skills/tools/skill-tool.d.ts +1 -1
- package/dist/types/skills/web-search/brave-source.d.ts +2 -1
- package/dist/types/skills/web-search/crawl4ai-extractor.d.ts +3 -2
- package/dist/types/skills/web-search/exa-source.d.ts +2 -1
- package/dist/types/skills/web-search/search-svc-source.d.ts +4 -3
- package/dist/types/skills/web-search/searxng-source.d.ts +3 -1
- package/dist/types/skills/web-search/serper-source.d.ts +2 -1
- package/dist/types/skills/web-search/source-factory.d.ts +2 -1
- package/dist/types/skills/web-search/web-tunable-resolver.d.ts +16 -0
- package/dist/types/test-support/global-home-setup.d.ts +2 -0
- package/dist/types/transport/acp-server.d.ts +29 -0
- package/dist/types/transport/delegate-client.d.ts +82 -0
- package/dist/types/transport/host-capability-client.d.ts +21 -0
- package/dist/types/transport/host-feedback-client.d.ts +25 -0
- package/dist/types/transport/host-profile-client.d.ts +19 -0
- package/dist/types/transport/host-project-client.d.ts +16 -0
- package/dist/types/transport/host-request-client.d.ts +38 -0
- package/dist/types/transport/host-session-client.d.ts +29 -0
- package/dist/types/tunables.d.ts +2 -0
- package/dist/vendor/hatch-pet/LICENSE.txt +201 -201
- package/dist/vendor/hatch-pet/NOTICE.md +25 -25
- package/dist/vendor/hatch-pet/references/animation-rows.md +29 -29
- package/dist/vendor/hatch-pet/references/codex-pet-contract.md +35 -35
- package/dist/vendor/hatch-pet/references/qa-rubric.md +66 -66
- package/dist/vendor/hatch-pet/scripts/compose_atlas.py +169 -169
- package/dist/vendor/hatch-pet/scripts/derive_running_left_from_running_right.py +150 -150
- package/dist/vendor/hatch-pet/scripts/extract_strip_frames.py +408 -408
- package/dist/vendor/hatch-pet/scripts/inspect_frames.py +256 -256
- package/dist/vendor/hatch-pet/scripts/make_contact_sheet.py +96 -96
- package/dist/vendor/hatch-pet/scripts/prepare_pet_run.py +834 -834
- package/dist/vendor/hatch-pet/scripts/render_animation_previews.py +78 -78
- package/dist/vendor/hatch-pet/scripts/validate_atlas.py +157 -157
- package/package.json +25 -2
- package/dist/types/cli/handlers/settings-handler.d.ts +0 -19
- package/dist/types/cli/permission-rule-persistence.d.ts +0 -16
- package/dist/types/cli/tunable-store.d.ts +0 -26
- package/dist/types/skills/permissions/settings-watcher.d.ts +0 -26
- /package/dist/types/{skills/memory → host-contract}/fts-segment.d.ts +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface ProviderCatalogModelRef {
|
|
2
|
+
id?: string;
|
|
3
|
+
}
|
|
4
|
+
export interface ProviderCatalogDef {
|
|
5
|
+
id: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
displayName?: string;
|
|
8
|
+
group?: string;
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
base_url?: string;
|
|
11
|
+
transport?: string;
|
|
12
|
+
defaultModel?: string;
|
|
13
|
+
authType?: string;
|
|
14
|
+
apiKeyEnvVars?: string[];
|
|
15
|
+
models?: ProviderCatalogModelRef[];
|
|
16
|
+
}
|
|
17
|
+
export interface SettingsProviderOption {
|
|
18
|
+
id: string;
|
|
19
|
+
displayName: string;
|
|
20
|
+
baseUrl: string;
|
|
21
|
+
modelCount: number;
|
|
22
|
+
variants?: SettingsProviderVariantOption[];
|
|
23
|
+
}
|
|
24
|
+
export interface SettingsProviderVariantOption {
|
|
25
|
+
id: string;
|
|
26
|
+
displayName: string;
|
|
27
|
+
baseUrl: string;
|
|
28
|
+
modelCount: number;
|
|
29
|
+
}
|
|
30
|
+
export interface ProviderValidationProbe {
|
|
31
|
+
method: "GET" | "POST";
|
|
32
|
+
url: string;
|
|
33
|
+
headers: Record<string, string>;
|
|
34
|
+
body?: Record<string, unknown>;
|
|
35
|
+
}
|
|
36
|
+
export interface ProviderKeyValidationResult {
|
|
37
|
+
valid: boolean;
|
|
38
|
+
status: number;
|
|
39
|
+
error?: string;
|
|
40
|
+
url?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function providerCatalogBaseUrl(provider: ProviderCatalogDef): string | undefined;
|
|
43
|
+
export declare function providerCatalogDisplayName(provider: ProviderCatalogDef): string;
|
|
44
|
+
export declare function listSettingsProviderOptions(upstreamProviders: ProviderCatalogDef[]): SettingsProviderOption[];
|
|
45
|
+
export declare function isProviderProbeEndpointUnavailable(status: number): boolean;
|
|
46
|
+
export declare function buildProviderValidationProbes(providerId: string, apiKey: string, baseUrl: string, provider: ProviderCatalogDef | undefined): ProviderValidationProbe[];
|
|
@@ -18,6 +18,7 @@ import type { ProductPhase, ProductCreateParams, ProductStatus, ProductSummary }
|
|
|
18
18
|
import { type PlannerMemoryContext } from "./planner-memory-brief.js";
|
|
19
19
|
import type { DagMutation } from "./product-planner.js";
|
|
20
20
|
import type { ProductLeaderCoordinator } from "./product-run-coordinator.js";
|
|
21
|
+
import type { DelegateBridge } from "./delegation-coordinator.js";
|
|
21
22
|
export type { ProductLeaderCoordinator } from "./product-run-coordinator.js";
|
|
22
23
|
export interface ProductCallbacks {
|
|
23
24
|
log?: {
|
|
@@ -52,6 +53,9 @@ export interface ProductCallbacks {
|
|
|
52
53
|
onBudgetUpdate?: (productId: string, inputTokens: number, outputTokens: number, elapsed: number, maxTotalTokens?: number) => void;
|
|
53
54
|
/** Streaming text output from a running task. */
|
|
54
55
|
onTaskOutputDelta?: (productId: string, taskId: string, text: string) => void;
|
|
56
|
+
/** Per-task tool activity heartbeat(delegate 路径由 sink.onToolCall 单发;旧路径经共享 PM 的
|
|
57
|
+
* turn.tool_call 在 product-coordinator 转 product.agentActivity,PM 在 delegate 路径看不见 worker)。 */
|
|
58
|
+
onTaskActivity?: (productId: string, taskId: string, toolName: string) => void;
|
|
55
59
|
/** Team roster resolved at run start — fired once (engine-driven) for both initial start and resume,
|
|
56
60
|
* so the run view's 团队成员 panel populates live instead of only on a history reopen. */
|
|
57
61
|
onMembers?: (productId: string, members: {
|
|
@@ -59,6 +63,8 @@ export interface ProductCallbacks {
|
|
|
59
63
|
role: string;
|
|
60
64
|
name: string;
|
|
61
65
|
}[]) => void;
|
|
66
|
+
/** 激活层(S3c §1.2):gateway-routed delegate 桥(gate 关/未挂 = undefined → 旧本地 spawn 路径)。 */
|
|
67
|
+
getDelegateBridge?: () => DelegateBridge | undefined;
|
|
62
68
|
}
|
|
63
69
|
/**
|
|
64
70
|
* Prepend completed upstream task outputs to a downstream task prompt so the
|
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
import type { ProductOrchestrator } from "./agent-instance.js";
|
|
2
|
+
import type { DelegateRequestParams, SupervisorEventSink, TurnResult } from "../host-contract/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* 激活层(S3c):gateway-routed delegate 传输桥(解耦接口;wire 从 AcpServer.delegate/supportsDelegate 供)。
|
|
5
|
+
* hostSupportsDelegate(=gateway 在 initialize 声明 delegate 能力位)时,run() 改走此桥:leader 请网关代派
|
|
6
|
+
* worker 回合(x/delegate),事件回流经 sink,resolve 统一 TurnResult —— 不再 ProductOrchestrator.create
|
|
7
|
+
* 本地 spawn。gate 关(gateway 未声明)= isSupported()=false = 旧路径保留(单轨,zero-regression)。
|
|
8
|
+
*/
|
|
9
|
+
export interface DelegateBridge {
|
|
10
|
+
/** T9:gateway 声明 delegate 能力才放行(否则旧 ProcessManager/Orchestrator 路径)。 */
|
|
11
|
+
isSupported(): boolean;
|
|
12
|
+
/** 上行 x/delegate(resolve TurnResult;回流事件经 sink)。 */
|
|
13
|
+
send(params: DelegateRequestParams, sink: SupervisorEventSink): Promise<TurnResult>;
|
|
14
|
+
/** x/delegate.cancel(取消回合,不杀进程;rec.abort 触发时调)。 */
|
|
15
|
+
cancel(delegationId: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* x/delegate.respond(leader 来源审批应答,通知 fire-and-forget;optionId 不透明透传 E2)。
|
|
18
|
+
* 站点收到 sink.onApprovalRequest 后按用户/策略决议经此应答(chat 站 §1.1 审批往返;
|
|
19
|
+
* gateway 侧 delegate-server → supervisor.respondApproval,freeze §11 补遗#3 唯一应答口)。
|
|
20
|
+
*/
|
|
21
|
+
respond(delegationId: string, approvalId: string, optionId: string): void;
|
|
22
|
+
}
|
|
2
23
|
export interface DelegationNotify {
|
|
3
24
|
(method: string, payload: Record<string, unknown>): void;
|
|
4
25
|
}
|
|
@@ -10,6 +31,15 @@ export interface DelegationDeps {
|
|
|
10
31
|
info(m: string): void;
|
|
11
32
|
warn(m: string): void;
|
|
12
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* 激活层(S3c):gateway-routed delegate 传输 + 会话上下文(可选;缺省 = 旧 ProductOrchestrator 路径)。
|
|
36
|
+
* bridge.isSupported()=true(gateway 声明 delegate 能力位)时,run() 改走 gateway 代派 worker;否则旧路径。
|
|
37
|
+
* projectId = deriveProjectId(cwd)(wire 供,避免 coordinator import agent-paths;单轨解析权威在会话面)。
|
|
38
|
+
*/
|
|
39
|
+
delegate?: {
|
|
40
|
+
bridge: DelegateBridge;
|
|
41
|
+
projectId: string;
|
|
42
|
+
};
|
|
13
43
|
}
|
|
14
44
|
type DelegationStatus = "running" | "completed" | "failed" | "cancelled" | "timed_out";
|
|
15
45
|
export declare class DelegationCoordinator {
|
|
@@ -50,6 +80,16 @@ export declare class DelegationCoordinator {
|
|
|
50
80
|
delegationId: string;
|
|
51
81
|
};
|
|
52
82
|
private run;
|
|
83
|
+
/**
|
|
84
|
+
* 激活层(S3c):gateway-routed delegate 路径 —— 不本地 spawn,请网关代派一个 worker 回合。
|
|
85
|
+
* leader 铸 delegationId(rec.delegationId 已是 `del-*`,承 Q4「leader 铸 + gateway 校验唯一」);
|
|
86
|
+
* 回流 sink 把 worker 工具活动转 mention.delegate_activity(live 进度),final 由 TurnResult 承。
|
|
87
|
+
* 与旧路径行为对齐:started/settled 通知、cancel 语义(rec.abort → x/delegate.cancel)、convChain 串行不变。
|
|
88
|
+
*
|
|
89
|
+
* native session 累积(跨同会话委派的 resume)在此路径由 gateway SessionProjectService.recordNativeSessionId
|
|
90
|
+
* 于 relay 观察点回填(freeze §11 补遗#2)—— coordinator 不再本地捕获 getDelegationNativeSessionId(单轨,权威上移)。
|
|
91
|
+
*/
|
|
92
|
+
private runViaDelegate;
|
|
53
93
|
/** Collect a delegation's produced artifacts: the union of the worktree diff (tasks[].changedFiles,
|
|
54
94
|
* omitted by the wire type but carried at runtime) and the mtime-isolated capture of project-root files
|
|
55
95
|
* (for workers that write straight to the workspace), plus the worker task + terminal phase. Shared by
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentProcessManager } from "../runtime/infra/agent-process.js";
|
|
2
2
|
import type { AcpDetector } from "../runtime/infra/acp-detector.js";
|
|
3
|
+
import type { DelegateBridge } from "./delegation-coordinator.js";
|
|
3
4
|
import { type PlannerMemoryContext } from "./planner-memory-brief.js";
|
|
4
5
|
import type { ProductOrchestrator } from "./agent-instance.js";
|
|
5
6
|
import type { LeaderPort, PhaseRunnerPort } from "./goal-loop-coordinator.js";
|
|
@@ -67,6 +68,8 @@ export interface LeaderAdapterDeps {
|
|
|
67
68
|
info(msg: string): void;
|
|
68
69
|
warn(msg: string): void;
|
|
69
70
|
};
|
|
71
|
+
/** 激活层(S3c §1.4):gateway-routed delegate 桥(gate 关/未挂 = undefined → 旧本地 spawn 路径)。 */
|
|
72
|
+
getDelegateBridge?: () => DelegateBridge | undefined;
|
|
70
73
|
}
|
|
71
74
|
export declare function createLeaderAdapter(deps: LeaderAdapterDeps): LeaderPort;
|
|
72
75
|
export interface PhaseRunnerAdapterDeps {
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
import type { AgentProcessManager } from "../runtime/infra/agent-process.js";
|
|
27
27
|
import type { AcpDetector } from "../runtime/infra/acp-detector.js";
|
|
28
28
|
import type { AgentConfigStore } from "../runtime/infra/agent-config-store.js";
|
|
29
|
+
import type { DelegateBridge } from "./delegation-coordinator.js";
|
|
29
30
|
import type { ProductPlanParams, ProductPlan, ProductConfirmParams } from "../protocol/wire/acp-agent-management.js";
|
|
30
31
|
export type PlanningPhase = "planning" | "awaiting_confirmation" | "confirmed" | "executing" | "paused" | "completed" | "cancelled";
|
|
31
32
|
export interface PlanningMessage {
|
|
@@ -94,6 +95,8 @@ export interface PlannerCallbacks {
|
|
|
94
95
|
running: number;
|
|
95
96
|
failed: number;
|
|
96
97
|
};
|
|
98
|
+
/** 激活层(S3c §1.3):gateway-routed delegate 桥(gate 关/未挂 = undefined → 旧本地 spawn 路径)。 */
|
|
99
|
+
getDelegateBridge?: () => DelegateBridge | undefined;
|
|
97
100
|
}
|
|
98
101
|
/** Describes a DAG mutation performed by the leader. */
|
|
99
102
|
export interface DagMutation {
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
import type { AgentProcessManager } from "../runtime/infra/agent-process.js";
|
|
22
22
|
import type { AcpDetector } from "../runtime/infra/acp-detector.js";
|
|
23
23
|
import type { AgentConfigStore } from "../runtime/infra/agent-config-store.js";
|
|
24
|
+
import type { DelegateBridge } from "./delegation-coordinator.js";
|
|
24
25
|
import type { SoloState, SoloAgentState, SoloEvaluation, SoloStatus, SoloStartParams, SoloSelectParams, SoloSpec } from "../protocol/wire/acp-agent-management.js";
|
|
25
26
|
export interface SoloCallbacks {
|
|
26
27
|
log?: {
|
|
@@ -29,17 +30,22 @@ export interface SoloCallbacks {
|
|
|
29
30
|
debug?(msg: string): void;
|
|
30
31
|
};
|
|
31
32
|
onProgress?: (soloId: string, agentId: string, state: SoloAgentState, progress?: string, worktreePath?: string) => void;
|
|
32
|
-
onEvaluation?: (soloId: string, evaluation: SoloEvaluation) => void
|
|
33
|
+
onEvaluation?: (soloId: string, evaluation: SoloEvaluation) => void | Promise<void>;
|
|
33
34
|
/** Streaming text delta from a competing agent (forwarded from child process). */
|
|
34
35
|
onAgentDelta?: (soloId: string, agentId: string, text: string) => void;
|
|
36
|
+
/** Live tool-activity heartbeat(delegate 路径由 sink.onToolCall 单发;旧路径经共享 PM 的
|
|
37
|
+
* turn.tool_call 在 solo-handler 转 solo.agentActivity,PM 在 delegate 路径看不见竞速者)。 */
|
|
38
|
+
onAgentActivity?: (soloId: string, agentId: string, toolName: string) => void;
|
|
35
39
|
/** Token usage report after agent completes. */
|
|
36
40
|
onAgentUsage?: (soloId: string, agentId: string, inputTokens: number, outputTokens: number) => void;
|
|
41
|
+
/** 激活层(S3c §1.5):gateway-routed delegate 桥(gate 关/未挂 = undefined → 旧本地 spawn 路径)。 */
|
|
42
|
+
getDelegateBridge?: () => DelegateBridge | undefined;
|
|
37
43
|
/**
|
|
38
44
|
* Race reached a terminal state WITHOUT an evaluation winner (all agents failed, or cancelled).
|
|
39
45
|
* The success path uses onEvaluation; this lets the host write back the plan project's planStatus
|
|
40
46
|
* (failed/cancelled) so 历史方案 is correct and recovery doesn't restore a dead run.
|
|
41
47
|
*/
|
|
42
|
-
onTerminal?: (soloId: string, state: SoloState) => void
|
|
48
|
+
onTerminal?: (soloId: string, state: SoloState) => void | Promise<void>;
|
|
43
49
|
}
|
|
44
50
|
/**
|
|
45
51
|
* Assemble the prompt every competitor receives (Cut4). Shared context (rules/memory) + optional
|
|
@@ -80,6 +86,16 @@ export declare class SoloEvaluator {
|
|
|
80
86
|
* Creates worktrees, spawns agents in parallel, waits for completion, then evaluates.
|
|
81
87
|
*/
|
|
82
88
|
start(params: SoloStartParams): Promise<string>;
|
|
89
|
+
/**
|
|
90
|
+
* 激活层(S3c §1.5):gateway-routed delegate 路径 —— 竞速者回合经网关代派(x/delegate),不本地
|
|
91
|
+
* spawn。同 handle(solo-racer/soloId/agentId/seq)⇒ supervisor 按 memberKey 复用同一竞速者进程与
|
|
92
|
+
* ACP 会话:初赛 → follow-up → 评比全程上下文连续(取代旧「watchdog reap + 按需 re-spawn」循环,
|
|
93
|
+
* worktree 文件仍是 durable state)。cwd=worktree;self 竞速者的 QLOGICAGENT_WORKTREE_WORKDIR /
|
|
94
|
+
* QLOGICAGENT_SOLO_LEAN 由 gateway 按 kind=solo-racer 派生注入(AgentSpec.envOverrides,freeze §1
|
|
95
|
+
* —— descriptor/env 注入在 qla 侧退场,env 是监督者按成员种类决定的启动器不变量,非调用方入参)。
|
|
96
|
+
* usage 由 TurnResult.usage 承(不再读共享 PM 的 usage tracker)。
|
|
97
|
+
*/
|
|
98
|
+
private runTurnViaDelegate;
|
|
83
99
|
/**
|
|
84
100
|
* Ensure the agent's ACP process is alive in its worktree, spawning it if absent. Used by the
|
|
85
101
|
* initial run AND by follow-up messages: the watchdog reaps idle competitors after the race, so a
|
|
@@ -89,7 +105,6 @@ export declare class SoloEvaluator {
|
|
|
89
105
|
* QLOGICAGENT_WORKTREE_WORKDIR anchors writes to the worktree; QLOGICAGENT_SOLO_LEAN drops media
|
|
90
106
|
* tools so it matches the external coding CLIs and won't wander into 图像生成 on a code task.
|
|
91
107
|
*/
|
|
92
|
-
private ensureAgentRunning;
|
|
93
108
|
/**
|
|
94
109
|
* Send a follow-up message to a specific agent within a solo session.
|
|
95
110
|
* Agent must be in "idle" or "completed" state.
|
|
@@ -15,6 +15,8 @@ export interface PersistedSoloState {
|
|
|
15
15
|
agents: Array<{
|
|
16
16
|
agentId: string;
|
|
17
17
|
memberId: string;
|
|
18
|
+
/** Handle seq(delegate 路径 MemberHandle 第四元);旧持久化文件缺省时按数组序回填。 */
|
|
19
|
+
seq?: number;
|
|
18
20
|
worktreePath: string;
|
|
19
21
|
worktreeBranch: string;
|
|
20
22
|
state: SoloAgentState;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AgentProcessManager } from "../../runtime/infra/agent-process.js";
|
|
2
|
+
import type { DelegateBridge } from "../delegation-coordinator.js";
|
|
3
|
+
/** Test-only adapter for migrating orchestration fixtures from the retired local spawn lane. */
|
|
4
|
+
export declare function makeDelegateTestBridge(processManager: AgentProcessManager): DelegateBridge;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { PERMISSION_MODES, } from "./runtime/ports/permission-contracts.js";
|
|
2
|
+
export { buildPermissionModel, } from "./runtime/permission-model.js";
|
|
2
3
|
export type { ApprovalRequest, ApprovalResponse, PermissionAllowResult, PermissionApprovalResolver, PermissionAskResult, PermissionBehavior, PermissionConfig, PermissionDecisionReason, PermissionDenyResult, PermissionMetadataResolver, PermissionMode, PermissionResult, PermissionRuleEnginePort, PermissionRuleEntry, ToolPermissionCheckInput, } from "./runtime/ports/permission-contracts.js";
|
|
4
|
+
export type { PermissionModeDescriptor, PermissionModelContract, PermissionPromptOption, } from "./runtime/permission-model.js";
|
|
@@ -189,127 +189,6 @@ export interface ToolsListResult {
|
|
|
189
189
|
}>;
|
|
190
190
|
total: number;
|
|
191
191
|
}
|
|
192
|
-
export interface SettingsListProvidersResult {
|
|
193
|
-
providers: Array<{
|
|
194
|
-
id: string;
|
|
195
|
-
displayName: string;
|
|
196
|
-
baseUrl: string;
|
|
197
|
-
modelCount: number;
|
|
198
|
-
}>;
|
|
199
|
-
}
|
|
200
|
-
export interface SettingsAddKeyParams {
|
|
201
|
-
providerId: string;
|
|
202
|
-
key: string;
|
|
203
|
-
label?: string;
|
|
204
|
-
}
|
|
205
|
-
export interface SettingsAddKeyResult {
|
|
206
|
-
keyId: string;
|
|
207
|
-
providerId: string;
|
|
208
|
-
}
|
|
209
|
-
export interface SettingsRemoveKeyParams {
|
|
210
|
-
keyId: string;
|
|
211
|
-
}
|
|
212
|
-
export interface SettingsGetKeyParams {
|
|
213
|
-
keyId: string;
|
|
214
|
-
}
|
|
215
|
-
export interface SettingsGetKeyResult {
|
|
216
|
-
key: string;
|
|
217
|
-
}
|
|
218
|
-
export interface SettingsToggleKeyParams {
|
|
219
|
-
keyId: string;
|
|
220
|
-
enabled: boolean;
|
|
221
|
-
}
|
|
222
|
-
export interface SettingsListModelsParams {
|
|
223
|
-
purpose?: string;
|
|
224
|
-
provider?: string;
|
|
225
|
-
}
|
|
226
|
-
export interface SettingsListModelsResult {
|
|
227
|
-
models: Array<{
|
|
228
|
-
id: string;
|
|
229
|
-
provider: string;
|
|
230
|
-
model: string;
|
|
231
|
-
displayName: string;
|
|
232
|
-
routeIntents: string[];
|
|
233
|
-
capabilityProfile?: {
|
|
234
|
-
tasks?: string[];
|
|
235
|
-
input_modalities?: string[];
|
|
236
|
-
output_modalities?: string[];
|
|
237
|
-
traits?: string[];
|
|
238
|
-
verification?: Record<string, unknown>;
|
|
239
|
-
cost?: Record<string, unknown>;
|
|
240
|
-
};
|
|
241
|
-
baseUrl?: string;
|
|
242
|
-
enabled: boolean;
|
|
243
|
-
}>;
|
|
244
|
-
grouped: Record<string, Array<{
|
|
245
|
-
id: string;
|
|
246
|
-
provider: string;
|
|
247
|
-
model: string;
|
|
248
|
-
displayName: string;
|
|
249
|
-
routeIntents: string[];
|
|
250
|
-
capabilityProfile?: {
|
|
251
|
-
tasks?: string[];
|
|
252
|
-
input_modalities?: string[];
|
|
253
|
-
output_modalities?: string[];
|
|
254
|
-
traits?: string[];
|
|
255
|
-
verification?: Record<string, unknown>;
|
|
256
|
-
cost?: Record<string, unknown>;
|
|
257
|
-
};
|
|
258
|
-
baseUrl?: string;
|
|
259
|
-
enabled: boolean;
|
|
260
|
-
}>>;
|
|
261
|
-
}
|
|
262
|
-
export interface SettingsSetActiveModelParams {
|
|
263
|
-
purpose: string;
|
|
264
|
-
modelId: string;
|
|
265
|
-
}
|
|
266
|
-
export interface SettingsGetActiveModelParams {
|
|
267
|
-
purpose: string;
|
|
268
|
-
}
|
|
269
|
-
export interface SettingsGetActiveModelResult {
|
|
270
|
-
model: {
|
|
271
|
-
id: string;
|
|
272
|
-
provider: string;
|
|
273
|
-
model: string;
|
|
274
|
-
displayName: string;
|
|
275
|
-
routeIntents: string[];
|
|
276
|
-
capabilityProfile?: {
|
|
277
|
-
tasks?: string[];
|
|
278
|
-
input_modalities?: string[];
|
|
279
|
-
output_modalities?: string[];
|
|
280
|
-
traits?: string[];
|
|
281
|
-
verification?: Record<string, unknown>;
|
|
282
|
-
cost?: Record<string, unknown>;
|
|
283
|
-
};
|
|
284
|
-
enabled: boolean;
|
|
285
|
-
} | null;
|
|
286
|
-
available: boolean;
|
|
287
|
-
}
|
|
288
|
-
export interface SettingsGetOverviewResult {
|
|
289
|
-
providers: Array<{
|
|
290
|
-
providerId: string;
|
|
291
|
-
baseUrl?: string;
|
|
292
|
-
keyCount: number;
|
|
293
|
-
healthyKeys: number;
|
|
294
|
-
totalKeys: number;
|
|
295
|
-
}>;
|
|
296
|
-
purposes: Record<string, {
|
|
297
|
-
bound: boolean;
|
|
298
|
-
modelId?: string;
|
|
299
|
-
modelName?: string;
|
|
300
|
-
available: boolean;
|
|
301
|
-
}>;
|
|
302
|
-
}
|
|
303
|
-
export interface SettingsValidateKeyParams {
|
|
304
|
-
providerId: string;
|
|
305
|
-
apiKey: string;
|
|
306
|
-
baseUrl?: string;
|
|
307
|
-
}
|
|
308
|
-
export interface SettingsValidateKeyResult {
|
|
309
|
-
valid: boolean;
|
|
310
|
-
status: number;
|
|
311
|
-
error?: string;
|
|
312
|
-
}
|
|
313
192
|
export interface MediaListModelsParams {
|
|
314
193
|
/** Filter by media type (image/video/music/tts/3d/stt/embedding). Omit to list all. */
|
|
315
194
|
mediaType?: string;
|
|
@@ -325,23 +204,6 @@ export interface MediaListModelsResult {
|
|
|
325
204
|
capabilities?: Record<string, unknown>;
|
|
326
205
|
}>;
|
|
327
206
|
}
|
|
328
|
-
export interface ConfigGetParams {
|
|
329
|
-
keys?: string[];
|
|
330
|
-
}
|
|
331
|
-
export interface ConfigGetResult {
|
|
332
|
-
config: Record<string, unknown>;
|
|
333
|
-
}
|
|
334
|
-
export interface ConfigUpdateParams {
|
|
335
|
-
settings: Record<string, unknown>;
|
|
336
|
-
}
|
|
337
|
-
export interface ConfigUpdateResult {
|
|
338
|
-
ok: boolean;
|
|
339
|
-
applied: string[];
|
|
340
|
-
rejected?: Array<{
|
|
341
|
-
key: string;
|
|
342
|
-
reason: string;
|
|
343
|
-
}>;
|
|
344
|
-
}
|
|
345
207
|
export type CommunityInstallRiskTier = "R0" | "R1" | "R2" | "R3";
|
|
346
208
|
export type CommunityInstallSourceTier = "official" | "community";
|
|
347
209
|
export type CommunityInstallTrustStage = "quarantine" | "trial" | "trusted";
|
|
@@ -630,14 +492,6 @@ export interface RpcMethodMap {
|
|
|
630
492
|
params: MediaListModelsParams;
|
|
631
493
|
result: MediaListModelsResult;
|
|
632
494
|
};
|
|
633
|
-
"config.get": {
|
|
634
|
-
params: ConfigGetParams;
|
|
635
|
-
result: ConfigGetResult;
|
|
636
|
-
};
|
|
637
|
-
"config.update": {
|
|
638
|
-
params: ConfigUpdateParams;
|
|
639
|
-
result: ConfigUpdateResult;
|
|
640
|
-
};
|
|
641
495
|
"community.resolveInstall": {
|
|
642
496
|
params: CommunityResolveInstallParams;
|
|
643
497
|
result: CommunityResolveInstallResult;
|
|
@@ -949,59 +803,6 @@ export interface RpcMethodMap {
|
|
|
949
803
|
params: FilesGitStatusParams;
|
|
950
804
|
result: FilesGitStatusResult;
|
|
951
805
|
};
|
|
952
|
-
"settings.listProviders": {
|
|
953
|
-
params: undefined;
|
|
954
|
-
result: SettingsListProvidersResult;
|
|
955
|
-
};
|
|
956
|
-
"settings.addKey": {
|
|
957
|
-
params: SettingsAddKeyParams;
|
|
958
|
-
result: SettingsAddKeyResult;
|
|
959
|
-
};
|
|
960
|
-
"settings.removeKey": {
|
|
961
|
-
params: SettingsRemoveKeyParams;
|
|
962
|
-
result: {
|
|
963
|
-
ok: true;
|
|
964
|
-
};
|
|
965
|
-
};
|
|
966
|
-
"settings.getKey": {
|
|
967
|
-
params: SettingsGetKeyParams;
|
|
968
|
-
result: SettingsGetKeyResult;
|
|
969
|
-
};
|
|
970
|
-
"settings.toggleKey": {
|
|
971
|
-
params: SettingsToggleKeyParams;
|
|
972
|
-
result: {
|
|
973
|
-
ok: true;
|
|
974
|
-
};
|
|
975
|
-
};
|
|
976
|
-
"settings.listModels": {
|
|
977
|
-
params: SettingsListModelsParams;
|
|
978
|
-
result: SettingsListModelsResult;
|
|
979
|
-
};
|
|
980
|
-
"settings.setActiveModel": {
|
|
981
|
-
params: SettingsSetActiveModelParams;
|
|
982
|
-
result: {
|
|
983
|
-
ok: true;
|
|
984
|
-
};
|
|
985
|
-
};
|
|
986
|
-
"settings.getActiveModel": {
|
|
987
|
-
params: SettingsGetActiveModelParams;
|
|
988
|
-
result: SettingsGetActiveModelResult;
|
|
989
|
-
};
|
|
990
|
-
"settings.getOverview": {
|
|
991
|
-
params: undefined;
|
|
992
|
-
result: SettingsGetOverviewResult;
|
|
993
|
-
};
|
|
994
|
-
"settings.refreshModels": {
|
|
995
|
-
params: undefined;
|
|
996
|
-
result: {
|
|
997
|
-
ok: true;
|
|
998
|
-
catalogRefreshed?: boolean;
|
|
999
|
-
};
|
|
1000
|
-
};
|
|
1001
|
-
"settings.validateKey": {
|
|
1002
|
-
params: SettingsValidateKeyParams;
|
|
1003
|
-
result: SettingsValidateKeyResult;
|
|
1004
|
-
};
|
|
1005
806
|
}
|
|
1006
807
|
/** All known RPC method names. */
|
|
1007
808
|
export type RpcMethod = keyof RpcMethodMap;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type HostRequestCapability } from "../../host-contract/index.js";
|
|
1
2
|
export declare const ACP_PROTOCOL_VERSION: 1;
|
|
2
3
|
export declare const ACP_METHODS: {
|
|
3
4
|
readonly INITIALIZE: "initialize";
|
|
@@ -53,6 +54,10 @@ export declare const ACP_EXTENDED_METHODS: {
|
|
|
53
54
|
readonly MENTION_DELEGATE: "x/mention.delegate";
|
|
54
55
|
readonly MENTION_CANCEL: "x/mention.cancel";
|
|
55
56
|
readonly MENTION_LIST: "x/mention.list";
|
|
57
|
+
readonly DELEGATE: "x/delegate";
|
|
58
|
+
readonly DELEGATE_UPDATE: "x/delegate.update";
|
|
59
|
+
readonly DELEGATE_RESPOND: "x/delegate.respond";
|
|
60
|
+
readonly DELEGATE_CANCEL: "x/delegate.cancel";
|
|
56
61
|
};
|
|
57
62
|
export type AcpExtendedMethod = (typeof ACP_EXTENDED_METHODS)[keyof typeof ACP_EXTENDED_METHODS];
|
|
58
63
|
/** qlogicagent 专属扩展套件的协商开关(host 与 agent 双向声明)。存在即启用扩展。 */
|
|
@@ -65,6 +70,16 @@ export interface AcpQlogicagentCapability {
|
|
|
65
70
|
methods?: boolean;
|
|
66
71
|
/** Multi-agent orchestration (solo / product / team). */
|
|
67
72
|
orchestration?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* T9 capability 握手 gate(S3a 跨进程 delegate 传输;host→agent 声明位)。
|
|
75
|
+
* host(gateway)声明「我服务 gateway-routed delegate」——即由 GatewayDelegateServer 认
|
|
76
|
+
* `x/delegate` 请求、下行 `x/delegate.update` 回流帧。qlogicagent(leader)【仅当】收到此位才走
|
|
77
|
+
* DelegateClient 发 x/delegate;未声明 = inert-until-cutover(旧自 spawn 路径 / fail-loud,不运行时双轨)。
|
|
78
|
+
* S3a/S3b:host 不声明(在位不接管);S3c:host 声明(硬切)。见 agent-supervision-s3a-transport-design §2.4/T9。
|
|
79
|
+
*/
|
|
80
|
+
delegate?: boolean;
|
|
81
|
+
/** Exact services the host has registered for x/host.request. */
|
|
82
|
+
hostRequest?: HostRequestCapability;
|
|
68
83
|
/** Config options (agent side only). */
|
|
69
84
|
configOptions?: AcpConfigOptionDescriptor[];
|
|
70
85
|
}
|
|
@@ -95,7 +110,7 @@ export interface AcpAgentCapabilities {
|
|
|
95
110
|
}
|
|
96
111
|
export interface AcpConfigOptionDescriptor {
|
|
97
112
|
name: string;
|
|
98
|
-
type: "string" | "boolean" | "number" | "enum";
|
|
113
|
+
type: "string" | "boolean" | "number" | "enum" | "object";
|
|
99
114
|
values?: string[];
|
|
100
115
|
description?: string;
|
|
101
116
|
}
|