qlogicagent 2.20.6 → 2.20.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 +27 -54
- package/dist/agent-contract.js +1 -1
- package/dist/agent.js +42 -41
- package/dist/cli.js +1 -1
- package/dist/host-contract.js +1 -1
- package/dist/index.js +539 -565
- package/dist/orchestration.js +14 -14
- package/dist/project-memory-host.js +30 -33
- package/dist/protocol.js +1 -1
- package/dist/types/agent/memory-recall-context.d.ts +7 -0
- package/dist/types/agent/tool-loop/artifact-final-contract.d.ts +2 -0
- package/dist/types/agent/tool-loop/direct-response-contract.d.ts +12 -0
- package/dist/types/agent/tool-loop/final-status-stream-suppressor.d.ts +22 -0
- package/dist/types/agent/tool-loop/loop-helpers.d.ts +2 -2
- package/dist/types/agent/tool-loop.d.ts +5 -1
- package/dist/types/agent/types.d.ts +27 -15
- package/dist/types/cli/acp-commands.d.ts +1 -1
- package/dist/types/cli/acp-extended-handlers.d.ts +13 -3
- package/dist/types/cli/agent-runtime-session-state.d.ts +1 -0
- package/dist/types/cli/base-tool-bootstrap.d.ts +0 -7
- package/dist/types/cli/community-skill-installer.d.ts +2 -0
- package/dist/types/cli/core-tool-coordinator.d.ts +0 -3
- package/dist/types/cli/core-tools/registry.d.ts +1 -4
- package/dist/types/cli/handlers/config-handler.d.ts +0 -1
- package/dist/types/cli/handlers/goal-handler.d.ts +24 -0
- package/dist/types/cli/handlers/memory-handler.d.ts +1 -2
- package/dist/types/cli/handlers/skill-curator-handler.d.ts +8 -0
- package/dist/types/cli/handlers/turn-handler.d.ts +9 -12
- package/dist/types/cli/memory-candidate-service.d.ts +1 -8
- package/dist/types/cli/memory-coordinator.d.ts +1 -13
- package/dist/types/cli/product-acp-params.d.ts +1 -0
- package/dist/types/cli/provider-core-facade.d.ts +2 -30
- package/dist/types/cli/rpc-registry.d.ts +2 -4
- package/dist/types/cli/runtime-hook-bootstrap.d.ts +1 -2
- package/dist/types/cli/stdio-acp-request-host.d.ts +1 -2
- package/dist/types/cli/stdio-rpc-handler-hosts.d.ts +0 -2
- package/dist/types/cli/stdio-runtime-bootstrap.d.ts +0 -7
- package/dist/types/cli/stdio-runtime-services.d.ts +1 -8
- package/dist/types/cli/stdio-server.d.ts +0 -4
- package/dist/types/cli/tool-bootstrap-core-registration.d.ts +0 -4
- package/dist/types/cli/tool-bootstrap.d.ts +0 -17
- package/dist/types/contracts/memory-recall-packet.d.ts +31 -0
- package/dist/types/contracts/memory-response-contract.d.ts +2 -0
- package/dist/types/contracts/tool-execution-evidence.d.ts +8 -0
- package/dist/types/contracts/tool-name.d.ts +10 -0
- package/dist/types/contracts/turn-event.d.ts +36 -3
- package/dist/types/host-contract/acp-content.d.ts +45 -0
- package/dist/types/host-contract/index.d.ts +59 -48
- package/dist/types/orchestration/agent-instance.d.ts +21 -1
- package/dist/types/orchestration/agent-roster.d.ts +14 -15
- package/dist/types/orchestration/dag-scheduler.d.ts +4 -0
- package/dist/types/orchestration/goal-context-envelope.d.ts +7 -0
- package/dist/types/orchestration/goal-loop-coordinator.d.ts +55 -12
- package/dist/types/orchestration/goal-mode-adapters.d.ts +13 -1
- package/dist/types/orchestration/goal-run-persistence.d.ts +9 -2
- package/dist/types/orchestration/goal-run-types.d.ts +127 -13
- package/dist/types/orchestration/index.d.ts +1 -1
- package/dist/types/orchestration/product-persistence.d.ts +10 -1
- package/dist/types/orchestration/product-planner.d.ts +3 -3
- package/dist/types/orchestration/testing/delegate-test-bridge.d.ts +1 -0
- package/dist/types/orchestration/workflow/data-item.d.ts +1 -1
- package/dist/types/orchestration/workflow/expression.d.ts +1 -2
- package/dist/types/orchestration/workflow/workflow-patch.d.ts +1 -2
- package/dist/types/orchestration/workflow/workflow-render.d.ts +1 -2
- package/dist/types/project-memory-host.d.ts +1 -0
- package/dist/types/protocol/agent-contract.d.ts +10 -8
- package/dist/types/protocol/methods.d.ts +2 -19
- package/dist/types/protocol/notifications.d.ts +1 -1
- package/dist/types/protocol/wire/acp-agent-management.d.ts +48 -6
- package/dist/types/protocol/wire/acp-protocol.d.ts +11 -24
- package/dist/types/protocol/wire/agent-methods.d.ts +5 -142
- package/dist/types/protocol/wire/chat-types.d.ts +50 -0
- package/dist/types/protocol/wire/index.d.ts +2 -2
- package/dist/types/protocol/wire/notification-payloads.d.ts +73 -122
- package/dist/types/protocol/wire/thread-protocol.d.ts +4 -40
- package/dist/types/runtime/community/community-consent-client.d.ts +0 -13
- package/dist/types/runtime/context/context-compression-strategies.d.ts +29 -0
- package/dist/types/runtime/context/context-envelope.d.ts +3 -0
- package/dist/types/runtime/execution/dream-agent.d.ts +4 -5
- package/dist/types/runtime/execution/mcp-capability-selection.d.ts +54 -0
- package/dist/types/runtime/execution/memory-decay.d.ts +1 -1
- package/dist/types/runtime/execution/search-result-quality.d.ts +22 -0
- package/dist/types/runtime/execution/streaming-tool-executor.d.ts +2 -0
- package/dist/types/runtime/execution/tool-result-storage.d.ts +44 -0
- package/dist/types/runtime/hooks/memory-hooks.d.ts +3 -2
- package/dist/types/runtime/infra/agent-paths.d.ts +0 -8
- package/dist/types/runtime/infra/default-path-service.d.ts +0 -2
- package/dist/types/runtime/infra/llmrouter-managed-inference.d.ts +54 -1
- package/dist/types/runtime/infra/media-persistence.d.ts +6 -36
- package/dist/types/runtime/memory/implicit-extraction.d.ts +7 -15
- package/dist/types/runtime/memory/memory-recall-attribution.d.ts +24 -0
- package/dist/types/runtime/ports/agent-runtime-ports.d.ts +14 -0
- package/dist/types/runtime/ports/index.d.ts +1 -3
- package/dist/types/runtime/ports/memory-provider.d.ts +2 -19
- package/dist/types/runtime/ports/memory-writer.d.ts +1 -1
- package/dist/types/runtime/ports/path-service.d.ts +0 -2
- package/dist/types/runtime/prompt/capability-routing-policy.d.ts +13 -0
- package/dist/types/runtime/prompt/environment-context.d.ts +3 -6
- package/dist/types/runtime/prompt/fresh-workspace-evidence.d.ts +8 -13
- package/dist/types/runtime/prompt/tool-necessity-policy.d.ts +12 -0
- package/dist/types/skills/mcp/mcp-manager.d.ts +29 -4
- package/dist/types/skills/memory/host-memory-provider.d.ts +3 -9
- package/dist/types/skills/memory/memdir.d.ts +1 -1
- package/dist/types/skills/memory/memory-content-safety.d.ts +1 -0
- package/dist/types/skills/permissions/hook-runner.d.ts +3 -3
- package/dist/types/skills/portable-tool.d.ts +5 -0
- package/dist/types/skills/skill-system/skill-lifecycle.d.ts +1 -0
- package/dist/types/skills/tools/exec-tool.d.ts +1 -5
- package/dist/types/skills/tools/shell/command-compatibility.d.ts +3 -0
- package/dist/types/skills/tools/shell/index.d.ts +4 -3
- package/dist/types/skills/tools/shell/shell-exec.d.ts +15 -8
- package/dist/types/skills/tools/shell/shell-provider.d.ts +26 -0
- package/dist/types/transport/acp-server.d.ts +4 -1
- package/dist/types/transport/host-community-client.d.ts +0 -1
- package/dist/types/transport/host-request-client.d.ts +1 -0
- package/dist/types/transport/host-run-state-client.d.ts +1 -1
- package/dist/workflow-host.js +6 -6
- package/package.json +4 -3
- package/dist/skills/mcp/astraclaw-native-mcp-server.js +0 -12
- package/dist/types/cli/core-tools/checkpoint-tool-bootstrap.d.ts +0 -9
- package/dist/types/cli/core-tools/checkpoint-tool-service.d.ts +0 -7
- package/dist/types/cli/core-tools/config-tool-bootstrap.d.ts +0 -7
- package/dist/types/cli/core-tools/config-tool-service.d.ts +0 -13
- package/dist/types/cli/core-tools/monitor-tool-bootstrap.d.ts +0 -7
- package/dist/types/cli/core-tools/monitor-tool-service.d.ts +0 -6
- package/dist/types/cli/dev-tool-bootstrap.d.ts +0 -9
- package/dist/types/cli/dev-tools/dev-tool-bootstrap-service.d.ts +0 -7
- package/dist/types/cli/dev-tools/dev-tool-registry.d.ts +0 -8
- package/dist/types/cli/dev-tools/incremental-repo-map.d.ts +0 -81
- package/dist/types/cli/dev-tools/lsp-supervisor.d.ts +0 -59
- package/dist/types/cli/dev-tools/lsp-tool-service.d.ts +0 -7
- package/dist/types/cli/handlers/media-handler.d.ts +0 -19
- package/dist/types/cli/handlers/skills-handler.d.ts +0 -37
- package/dist/types/cli/industrial-runtime-store.d.ts +0 -16
- package/dist/types/cli/media-capability-schema.d.ts +0 -49
- package/dist/types/cli/media-file-api-service.d.ts +0 -73
- package/dist/types/cli/media-file-tool-service.d.ts +0 -13
- package/dist/types/cli/media-inline.d.ts +0 -31
- package/dist/types/cli/media-runtime-facade.d.ts +0 -51
- package/dist/types/cli/media-understanding.d.ts +0 -102
- package/dist/types/cli/skill-invocation-service.d.ts +0 -10
- package/dist/types/cli/skill-tools-bootstrap.d.ts +0 -35
- package/dist/types/cli/skills-query-service.d.ts +0 -41
- package/dist/types/cli/tool-bootstrap-media-registration.d.ts +0 -20
- package/dist/types/cli/turn-media-setup.d.ts +0 -34
- package/dist/types/cli/turn-preview-browser-setup.d.ts +0 -15
- package/dist/types/runtime/infra/astraclaw-capabilities.d.ts +0 -33
- package/dist/types/runtime/infra/builtin-skills-seed.d.ts +0 -31
- package/dist/types/runtime/infra/checkpoint-backend.d.ts +0 -9
- package/dist/types/runtime/infra/industrial-runtime-session-server.d.ts +0 -20
- package/dist/types/runtime/infra/migrate-project-skills.d.ts +0 -24
- package/dist/types/runtime/infra/project-skill-manifest.d.ts +0 -21
- package/dist/types/runtime/infra/skill-resolver.d.ts +0 -74
- package/dist/types/runtime/infra/worktree-backend.d.ts +0 -86
- package/dist/types/runtime/ports/checkpoint-contracts.d.ts +0 -19
- package/dist/types/runtime/ports/worktree-contracts.d.ts +0 -22
- package/dist/types/skills/mcp/astraclaw-native-mcp-server.d.ts +0 -1
- package/dist/types/skills/memory/memory-tool.d.ts +0 -87
- package/dist/types/skills/tools/checkpoint-tool.d.ts +0 -66
- package/dist/types/skills/tools/config-tool.d.ts +0 -61
- package/dist/types/skills/tools/file-management-tool.d.ts +0 -90
- package/dist/types/skills/tools/image-generate-tool.d.ts +0 -98
- package/dist/types/skills/tools/instructions-tool.d.ts +0 -65
- package/dist/types/skills/tools/lsp-tool.d.ts +0 -153
- package/dist/types/skills/tools/media-cancel-tool.d.ts +0 -30
- package/dist/types/skills/tools/media-understand-tool.d.ts +0 -28
- package/dist/types/skills/tools/monitor-tool.d.ts +0 -113
- package/dist/types/skills/tools/music-generate-tool.d.ts +0 -80
- package/dist/types/skills/tools/notebook-edit-tool.d.ts +0 -15
- package/dist/types/skills/tools/preview-browser-tool.d.ts +0 -136
- package/dist/types/skills/tools/repo-map-tool.d.ts +0 -52
- package/dist/types/skills/tools/skill-tool.d.ts +0 -142
- package/dist/types/skills/tools/sleep-tool.d.ts +0 -49
- package/dist/types/skills/tools/stt-tool.d.ts +0 -33
- package/dist/types/skills/tools/subagent-decision-tool.d.ts +0 -15
- package/dist/types/skills/tools/three-d-generate-tool.d.ts +0 -46
- package/dist/types/skills/tools/tts-tool.d.ts +0 -50
- package/dist/types/skills/tools/video-edit-tool.d.ts +0 -72
- package/dist/types/skills/tools/video-generate-tool.d.ts +0 -162
- package/dist/types/skills/tools/video-merge-tool.d.ts +0 -105
- package/dist/types/skills/tools/video-upscale-tool.d.ts +0 -45
- package/dist/types/skills/tools/voice-clone-tool.d.ts +0 -40
- package/dist/types/skills/tools/worktree-tool.d.ts +0 -69
|
@@ -1,16 +1,113 @@
|
|
|
1
1
|
/** Loop tunables (single source of truth — I9). */
|
|
2
2
|
export declare const GOAL_NO_PROGRESS_LIMIT = 3;
|
|
3
3
|
export declare const GOAL_SOFT_NO_PROGRESS_LIMIT = 8;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const GOAL_PHASE_TIMEOUT_MS: number;
|
|
5
5
|
export declare const GOAL_UNREACHABLE_MIN_STREAK = 2;
|
|
6
|
-
export type GoalRunStatus = "running" | "ended";
|
|
6
|
+
export type GoalRunStatus = "running" | "blocked" | "ended";
|
|
7
7
|
export type GoalPauseState = "running" | "draining" | "paused";
|
|
8
|
-
/** Why a run is paused
|
|
9
|
-
|
|
10
|
-
* engine-imposed pause is never indistinguishable from a user action (限制必须可见,不静默)。 */
|
|
11
|
-
export type GoalPauseReason = "user_pause" | "drain_timeout";
|
|
8
|
+
/** Why a run is paused; the canonical paused item keeps engine and user intent distinguishable. */
|
|
9
|
+
export type GoalPauseReason = "user_pause" | "phase_timeout";
|
|
12
10
|
export type GoalEndReason = "done" | "stopped" | "failed";
|
|
13
11
|
export type AcceptanceStatus = "pending" | "passed" | "failed" | "superseded";
|
|
12
|
+
export type GoalSpecStatus = "drafting" | "awaiting_clarification" | "awaiting_confirmation" | "confirmed";
|
|
13
|
+
export type GoalStageName = "drafting_spec" | "initializing_checklist" | "planning_phase" | "reviewing_plan" | "executing_tasks" | "assessing_results" | "compacting_progress" | "recovering";
|
|
14
|
+
/** Durable, user-safe activity projection. It exposes what is happening without leaking reasoning. */
|
|
15
|
+
export interface GoalStage {
|
|
16
|
+
stage: GoalStageName;
|
|
17
|
+
phaseIndex: number;
|
|
18
|
+
agentId: string;
|
|
19
|
+
role: GoalControlRole | "worker_team" | "system";
|
|
20
|
+
startedAt: string;
|
|
21
|
+
detail?: string;
|
|
22
|
+
}
|
|
23
|
+
export type GoalInstructionKind = "instruction_once" | "constraint_add" | "constraint_remove" | "answer_to_blocker" | "priority_change";
|
|
24
|
+
export type GoalTaskStatus = "pending" | "running" | "completed" | "failed" | "blocked" | "superseded";
|
|
25
|
+
export type GoalControlRole = "leader" | "planner" | "plan_critic" | "acceptance_judge";
|
|
26
|
+
export type GoalExecutionRole = "implementer" | "tester" | "reviewer" | "integrator";
|
|
27
|
+
export type GoalAgentRole = GoalControlRole | GoalExecutionRole;
|
|
28
|
+
export interface GoalTaskProjection {
|
|
29
|
+
taskId: string;
|
|
30
|
+
assignee: string;
|
|
31
|
+
prompt: string;
|
|
32
|
+
dependsOn?: string[];
|
|
33
|
+
acceptanceCriteria?: string;
|
|
34
|
+
status: GoalTaskStatus;
|
|
35
|
+
result?: string;
|
|
36
|
+
error?: string;
|
|
37
|
+
inputTokens?: number;
|
|
38
|
+
outputTokens?: number;
|
|
39
|
+
changedFiles?: string[];
|
|
40
|
+
}
|
|
41
|
+
export interface GoalRoleProjection {
|
|
42
|
+
name: string;
|
|
43
|
+
role: GoalAgentRole;
|
|
44
|
+
agentId: string;
|
|
45
|
+
}
|
|
46
|
+
export interface GoalMilestone {
|
|
47
|
+
phaseIndex: number;
|
|
48
|
+
label: string;
|
|
49
|
+
status: "planned" | "running" | "completed" | "failed" | "blocked";
|
|
50
|
+
productId?: string;
|
|
51
|
+
tasks: GoalTaskProjection[];
|
|
52
|
+
roles: GoalRoleProjection[];
|
|
53
|
+
}
|
|
54
|
+
export interface GoalBlocker {
|
|
55
|
+
code: string;
|
|
56
|
+
message: string;
|
|
57
|
+
phaseIndex?: number;
|
|
58
|
+
taskId?: string;
|
|
59
|
+
askId?: string;
|
|
60
|
+
questions?: Array<{
|
|
61
|
+
id: string;
|
|
62
|
+
prompt: string;
|
|
63
|
+
}>;
|
|
64
|
+
createdAt: string;
|
|
65
|
+
}
|
|
66
|
+
export interface GoalBudget {
|
|
67
|
+
maxTotalTokens?: number;
|
|
68
|
+
maxDurationMs?: number;
|
|
69
|
+
inputTokens: number;
|
|
70
|
+
outputTokens: number;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Execution choices captured when the user starts a Goal. They are durable so a recovered
|
|
74
|
+
* driver uses the same model/permission/skill policy instead of silently falling back to defaults.
|
|
75
|
+
*/
|
|
76
|
+
export interface GoalTurnContext {
|
|
77
|
+
modelId?: string;
|
|
78
|
+
reasoningEffort?: string;
|
|
79
|
+
permissions?: unknown;
|
|
80
|
+
activeSkills?: string[];
|
|
81
|
+
}
|
|
82
|
+
/** The single user-confirmed authority for planning, execution and acceptance. */
|
|
83
|
+
export interface GoalSpec {
|
|
84
|
+
revision: number;
|
|
85
|
+
objective: string;
|
|
86
|
+
/** Canonical execution boundary confirmed by the user with the rest of the GoalSpec. */
|
|
87
|
+
workspaceMutationPolicy: "forbid" | "allow";
|
|
88
|
+
inScope: string[];
|
|
89
|
+
outOfScope: string[];
|
|
90
|
+
constraints: string[];
|
|
91
|
+
assumptions: string[];
|
|
92
|
+
acceptanceCriteria: AcceptanceCriterion[];
|
|
93
|
+
verificationStrategy: string[];
|
|
94
|
+
openQuestions: Array<{
|
|
95
|
+
id: string;
|
|
96
|
+
prompt: string;
|
|
97
|
+
}>;
|
|
98
|
+
}
|
|
99
|
+
export interface GoalFinalReport {
|
|
100
|
+
outcome: GoalEndReason;
|
|
101
|
+
summary: string;
|
|
102
|
+
acceptanceChecklist: AcceptanceChecklist;
|
|
103
|
+
milestones: GoalMilestone[];
|
|
104
|
+
changedFiles: string[];
|
|
105
|
+
inputTokens: number;
|
|
106
|
+
outputTokens: number;
|
|
107
|
+
wallClockStartedAt: string;
|
|
108
|
+
finishedAt: string;
|
|
109
|
+
failedReason?: string;
|
|
110
|
+
}
|
|
14
111
|
/** FINAL evidence type (I9 — not staged). source = file path / check name; quote = cited excerpt. */
|
|
15
112
|
export interface AcceptanceEvidence {
|
|
16
113
|
source: string;
|
|
@@ -38,14 +135,16 @@ export interface PhaseSpec {
|
|
|
38
135
|
taskId: string;
|
|
39
136
|
assignee: string;
|
|
40
137
|
prompt: string;
|
|
138
|
+
workspaceMutation: "none" | "required";
|
|
41
139
|
dependsOn?: string[];
|
|
42
140
|
acceptanceCriteria?: string;
|
|
43
141
|
}[];
|
|
44
142
|
instances: {
|
|
45
143
|
name: string;
|
|
46
|
-
role:
|
|
144
|
+
role: GoalExecutionRole;
|
|
47
145
|
agentId: string;
|
|
48
146
|
}[];
|
|
147
|
+
controlRoles?: GoalRoleProjection[];
|
|
49
148
|
reasoning?: string;
|
|
50
149
|
unreachable?: {
|
|
51
150
|
criterionId: string;
|
|
@@ -69,38 +168,53 @@ export interface GoalQueuedMessage {
|
|
|
69
168
|
id: string;
|
|
70
169
|
ts: string;
|
|
71
170
|
text: string;
|
|
171
|
+
kind: GoalInstructionKind;
|
|
72
172
|
}
|
|
73
173
|
/** Append-only event (events.jsonl). seq is monotonic from 1. */
|
|
74
174
|
export interface GoalRunEvent {
|
|
75
175
|
seq: number;
|
|
76
176
|
ts: string;
|
|
77
|
-
type: "goal_started" | "
|
|
177
|
+
type: "goal_started" | "goal_spec_drafted" | "blocker_answered" | "checklist_initialized" | "phase_planned" | "phase_started" | "phase_assessed" | "progress_compacted" | "goal_edited" | "message_queued" | "blocked" | "paused" | "resumed" | "stopped" | "phase_boundary" | "round_message" | "budget_updated" | "stage_changed" | "recovery_failed" | "final_report" | "dismissed" | "recovered" | "ended";
|
|
78
178
|
payload: Record<string, unknown>;
|
|
79
179
|
}
|
|
80
|
-
/**
|
|
180
|
+
/** Goal checkpoint stored by Gateway RunState and advanced by replaying later Host events. */
|
|
81
181
|
export interface PersistedGoalRunState {
|
|
82
182
|
goalRunId: string;
|
|
83
183
|
projectId: string;
|
|
84
184
|
canonicalSessionId: string;
|
|
185
|
+
leaderAgentId: string;
|
|
85
186
|
originalGoal: string;
|
|
86
187
|
currentGoal: string;
|
|
188
|
+
goalSpecStatus: GoalSpecStatus;
|
|
189
|
+
goalSpec?: GoalSpec;
|
|
87
190
|
goalUpdatedAt?: string;
|
|
88
191
|
checklistVersion: number;
|
|
89
192
|
/** False only between the durable start acknowledgement and the detached leader initialization. */
|
|
90
|
-
checklistInitialized
|
|
193
|
+
checklistInitialized: boolean;
|
|
91
194
|
status: GoalRunStatus;
|
|
92
195
|
pauseState: GoalPauseState;
|
|
93
196
|
phaseIndex: number;
|
|
94
197
|
noProgressCount: number;
|
|
95
|
-
noFlipStreak
|
|
96
|
-
unreachableStreak
|
|
198
|
+
noFlipStreak: number;
|
|
199
|
+
unreachableStreak: Record<string, number>;
|
|
97
200
|
progressSummary: string;
|
|
201
|
+
currentStage?: GoalStage;
|
|
202
|
+
/** Timestamp of the latest durable Goal activity, used by every surface to judge freshness. */
|
|
203
|
+
lastActivityAt?: string;
|
|
98
204
|
acceptanceChecklist: AcceptanceChecklist;
|
|
99
205
|
queuedMessages: GoalQueuedMessage[];
|
|
206
|
+
/** Durable constraints are re-grounded into every later phase until explicitly removed. */
|
|
207
|
+
constraints: GoalQueuedMessage[];
|
|
100
208
|
agentPool: string[];
|
|
209
|
+
milestones: GoalMilestone[];
|
|
210
|
+
budget: GoalBudget;
|
|
211
|
+
turnContext?: GoalTurnContext;
|
|
212
|
+
blocker?: GoalBlocker;
|
|
213
|
+
finalReport?: GoalFinalReport;
|
|
214
|
+
dismissedAt?: string;
|
|
101
215
|
wallClockStartedAt: string;
|
|
102
216
|
pausedAt?: string;
|
|
103
|
-
/**
|
|
217
|
+
/** How the run became paused (user_pause / phase_timeout) — cleared on resume. */
|
|
104
218
|
pauseReason?: GoalPauseReason;
|
|
105
219
|
stopReason?: string;
|
|
106
220
|
endReason?: GoalEndReason;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { buildAssistantToolCallMessage, buildToolResultMessage, type FunctionToolDefinition, } from "./tool-loop/tool-schema.js";
|
|
2
2
|
export { classifyError, isRetryableCategory, type ErrorCategory, } from "./error-handling/error-classification.js";
|
|
3
|
-
export { composeStrategies, composeAsyncStrategies, SlidingWindowStrategy, SummarizeOldStrategy, ToolResultTrimStrategy, HeadTailProtectedStrategy, IncrementalCompactStrategy, CacheAwareCompressionStrategy, CompressionMetricsCollector, ContextEngineRegistry, MicroCompactStrategy, postCompactFileRecovery, type PostCompactRecoveryConfig, buildStructuredSummaryPrompt, computeAdaptiveBudget, isAsyncCompressionStrategy, selectCompressionTier, DEFAULT_ADAPTIVE_BUDGET_CONFIG, type AdaptiveBudgetConfig, type AsyncCompressionStrategy, type CacheAwareCompressionConfig, type CompressibleMessage, type CompressionEvent, type CompressionMetrics, type CompressionMetricsSnapshot, type CompressionResult, type CompressionStrategy, type CompressionTier, type ContextEngine, type HeadTailProtectionConfig, type IncrementalCompactConfig, type SummarizeFn, } from "../runtime/context/context-compression-strategies.js";
|
|
3
|
+
export { composeStrategies, composeAsyncStrategies, SlidingWindowStrategy, SummarizeOldStrategy, ToolResultTrimStrategy, HeadTailProtectedStrategy, IncrementalCompactStrategy, CacheAwareCompressionStrategy, CompressionMetricsCollector, ContextEngineRegistry, MicroCompactStrategy, postCompactFileRecovery, type PostCompactRecoveryConfig, buildStructuredSummaryPrompt, CONTEXT_CAPSULE_MARKER, parseContextCapsule, redactCompressionSecrets, computeAdaptiveBudget, isAsyncCompressionStrategy, selectCompressionTier, DEFAULT_ADAPTIVE_BUDGET_CONFIG, type AdaptiveBudgetConfig, type AsyncCompressionStrategy, type CacheAwareCompressionConfig, type CompressibleMessage, type CompressionEvent, type ContextCapsule, type ContextCompactionReceipt, type CompressionMetrics, type CompressionMetricsSnapshot, type CompressionResult, type CompressionStrategy, type CompressionTier, type ContextEngine, type HeadTailProtectionConfig, type IncrementalCompactConfig, type SummarizeFn, } from "../runtime/context/context-compression-strategies.js";
|
|
4
4
|
export { snipCompactIfNeeded, type SnipResult, } from "../runtime/context/context-compression-strategies.js";
|
|
5
5
|
export { applyCollapsesIfNeeded as applyContextCollapsesIfNeeded, recoverFromOverflow as recoverContextCollapseFromOverflow, createCollapseStore, type CollapseStore, type CollapseStage, } from "./context/context-collapse.js";
|
|
6
6
|
export { applyToolChoicePolicy, type ApplyToolChoicePolicyInput, type ApplyToolChoicePolicyResult, } from "./tool-loop/tool-choice-policy.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Product persistence facade over the Gateway-owned RunStateStore.
|
|
3
3
|
*/
|
|
4
|
-
import type { ProductPhase, ProductInstanceDef } from "../protocol/wire/acp-agent-management.js";
|
|
4
|
+
import type { ProductCreateParams, ProductPhase, ProductInstanceDef } from "../protocol/wire/acp-agent-management.js";
|
|
5
5
|
import type { PersistedBudgetState } from "./product-budget.js";
|
|
6
6
|
import type { SerializedNode } from "./dag-scheduler.js";
|
|
7
7
|
import type { PlanningSession } from "./product-planner.js";
|
|
@@ -20,6 +20,15 @@ export interface PersistedProductState {
|
|
|
20
20
|
lastCheckpointAt: string;
|
|
21
21
|
/** Last durably announced attempt number for each stable task id. */
|
|
22
22
|
taskAttempts?: Record<string, number>;
|
|
23
|
+
/** Host-owned abnormal-worker handoffs, retained across Gateway restarts for bounded retry/audit. */
|
|
24
|
+
taskHandoffs?: Record<string, Array<{
|
|
25
|
+
from: string;
|
|
26
|
+
to: string;
|
|
27
|
+
error: string;
|
|
28
|
+
at: string;
|
|
29
|
+
}>>;
|
|
30
|
+
/** Parent Goal turn policy, retained so recovered Product workers do not change execution policy. */
|
|
31
|
+
turnContext?: ProductCreateParams["turnContext"];
|
|
23
32
|
/**
|
|
24
33
|
* Snapshot of the leader's multi-turn planning dialogue, so the leader regains its planning
|
|
25
34
|
* context after a resume. JSON-safe:
|
|
@@ -56,8 +56,8 @@ export interface PlanningSession {
|
|
|
56
56
|
* User-supplied allow-list of agent ids the leader may assign tasks to (planning AND execution-phase
|
|
57
57
|
* reassignment). Persisted AS-IS so the execution phase reuses the SAME constraint and a failure-driven
|
|
58
58
|
* reassign cannot pull in a non-participating agent. PRESENCE-based (must survive uncollapsed end to
|
|
59
|
-
* end): undefined → all ready agents; `[]` → ONLY the leader
|
|
60
|
-
* `[ids]` → those + leader. See buildAgentRoster for the always-include-leader rule.
|
|
59
|
+
* end): undefined → all ready agents; `[]` → ONLY the selected leader (user deselected every worker);
|
|
60
|
+
* `[ids]` → those + selected leader. See buildAgentRoster for the always-include-leader rule.
|
|
61
61
|
*/
|
|
62
62
|
allowedAgents?: string[];
|
|
63
63
|
createdAt: string;
|
|
@@ -111,7 +111,7 @@ export interface PlannerCallbacks {
|
|
|
111
111
|
}
|
|
112
112
|
/** Describes a DAG mutation performed by the leader. */
|
|
113
113
|
export interface DagMutation {
|
|
114
|
-
type: "add_task" | "remove_task" | "retry_task" | "reassign_task" | "update_prompt";
|
|
114
|
+
type: "add_task" | "remove_task" | "retry_task" | "reassign_task" | "update_prompt" | "add_dependency" | "remove_dependency";
|
|
115
115
|
taskId: string;
|
|
116
116
|
details?: Record<string, unknown>;
|
|
117
117
|
}
|
|
@@ -16,6 +16,7 @@ interface LegacyTurnFixture {
|
|
|
16
16
|
* which is how every acceptance verdict reached the leader conversation unnoticed.
|
|
17
17
|
*/
|
|
18
18
|
streamDeltas?(memberId: string, prompt: string): string[];
|
|
19
|
+
lifecycleEvents?(memberId: string, prompt: string): Array<Record<string, unknown>>;
|
|
19
20
|
}
|
|
20
21
|
/** Test-only adapter for migrating orchestration fixtures from the retired local spawn lane. */
|
|
21
22
|
export declare function makeDelegateTestBridge(processManager: LegacyTurnFixture): DelegateBridge;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Workflow data envelope
|
|
2
|
+
* Workflow data envelope.
|
|
3
3
|
*
|
|
4
4
|
* Control/data separation: DagScheduler manages control (ready/skip/loop/ports) and
|
|
5
5
|
* never touches these values. The runtime data-routing layer carries DataItem[] along
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Restricted workflow expression evaluator
|
|
3
|
-
* plan D6). Used to bind node params to upstream data.
|
|
2
|
+
* Restricted workflow expression evaluator used to bind node params to upstream data.
|
|
4
3
|
*
|
|
5
4
|
* HARD SECURITY LINE: NO arbitrary JS eval. This is a tiny recursive-descent interpreter over a
|
|
6
5
|
* fixed grammar — property/index path access + a whitelist of pure functions only. Unattended
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* WorkflowPatch — the single mutation channel for workflow editing
|
|
3
|
-
* spec workflow-conversational-editing-spec.md §C).
|
|
2
|
+
* WorkflowPatch — the single mutation channel for workflow editing.
|
|
4
3
|
*
|
|
5
4
|
* One change protocol for BOTH agent edits and canvas hand-edits: every edit is a list of
|
|
6
5
|
* `WorkflowPatch` ops applied transactionally to a workflow's graph. This module is the
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Compact workflow renderer — the "workflow-as-context" feeder
|
|
3
|
-
* spec workflow-conversational-editing-spec.md §B).
|
|
2
|
+
* Compact workflow renderer — the "workflow-as-context" feeder.
|
|
4
3
|
*
|
|
5
4
|
* Every page-chat user turn injects the LATEST workflow as compact, deterministic text (NOT raw
|
|
6
5
|
* JSON: cheaper tokens, never stale, stable node ids the agent references back in a WorkflowPatch).
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
/** Gateway-owned project-memory implementation. qlogicagent production code must consume the X7 proxy. */
|
|
2
2
|
export { Memdir } from "./skills/memory/memdir.js";
|
|
3
3
|
export type { MemdirFileInfo, MemdirResult } from "./skills/memory/memdir.js";
|
|
4
|
+
export { isMemoryContentSafe } from "./skills/memory/memory-content-safety.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { NotificationMethodMap } from "./wire/notification-payloads.js";
|
|
2
|
-
export declare const AGENT_CONTRACT_VERSION:
|
|
2
|
+
export declare const AGENT_CONTRACT_VERSION: 10;
|
|
3
3
|
export declare const AGENT_EVENT_SCHEMA_VERSION: 1;
|
|
4
4
|
export declare const AGENT_TERMINAL_STATES: readonly ["completed", "failed", "cancelled"];
|
|
5
5
|
export type TerminalState = (typeof AGENT_TERMINAL_STATES)[number];
|
|
6
|
-
export declare const AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.ask_user", "turn.media_result", "turn.
|
|
7
|
-
export declare const AGENT_TEAM_WS_EVENT_NAMES: readonly ["solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "solo.agentDiff", "solo.state", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.budgetUpdate", "product.budgetWarning", "product.budgetExceeded", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "product.planReady", "product.planningDelta", "product.leaderMessage", "product.planFailed", "product.planningAsk", "
|
|
8
|
-
export declare const AGENT_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.ask_user", "turn.media_result", "turn.
|
|
9
|
-
export declare const ALL_AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.ask_user", "turn.media_result", "turn.
|
|
6
|
+
export declare const AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.text_rollback", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.ask_user", "turn.media_result", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_activity", "turn.subagent_ended", "turn.subagent_completed", "turn.subagent_decision", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "thread.item", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested", "workflow.approvalTimedOut"];
|
|
7
|
+
export declare const AGENT_TEAM_WS_EVENT_NAMES: readonly ["solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "solo.agentDiff", "solo.state", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.taskHandoff", "product.budgetUpdate", "product.budgetWarning", "product.budgetExceeded", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "product.planReady", "product.planningDelta", "product.leaderMessage", "product.planFailed", "product.planningAsk", "mention.delegate_started", "mention.delegate_activity", "mention.delegate_settled"];
|
|
8
|
+
export declare const AGENT_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.text_rollback", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.ask_user", "turn.media_result", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_activity", "turn.subagent_ended", "turn.subagent_completed", "turn.subagent_decision", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "thread.item", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested", "workflow.approvalTimedOut", "solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "solo.agentDiff", "solo.state", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.taskHandoff", "product.budgetUpdate", "product.budgetWarning", "product.budgetExceeded", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "product.planReady", "product.planningDelta", "product.leaderMessage", "product.planFailed", "product.planningAsk", "mention.delegate_started", "mention.delegate_activity", "mention.delegate_settled"];
|
|
9
|
+
export declare const ALL_AGENT_WS_EVENT_NAMES: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.text_rollback", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.ask_user", "turn.media_result", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_activity", "turn.subagent_ended", "turn.subagent_completed", "turn.subagent_decision", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "thread.item", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested", "workflow.approvalTimedOut", "solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "solo.agentDiff", "solo.state", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.taskHandoff", "product.budgetUpdate", "product.budgetWarning", "product.budgetExceeded", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "product.planReady", "product.planningDelta", "product.leaderMessage", "product.planFailed", "product.planningAsk", "mention.delegate_started", "mention.delegate_activity", "mention.delegate_settled"];
|
|
10
10
|
/** Runtime-required keys whose shape is not encoded by TypeScript after serialization. */
|
|
11
11
|
export declare const AGENT_EVENT_REQUIRED_KEYS: {
|
|
12
12
|
readonly "turn.subagent_started": readonly ["turnId", "parentTurnId", "subagentId", "agentType", "displayName", "delegatedTask", "mode", "startedAt"];
|
|
@@ -16,6 +16,7 @@ export declare const AGENT_EVENT_REQUIRED_KEYS: {
|
|
|
16
16
|
readonly "product.taskStarted": readonly ["productId", "taskId", "assignee", "attempt"];
|
|
17
17
|
readonly "product.taskCompleted": readonly ["productId", "taskId", "result", "attempt"];
|
|
18
18
|
readonly "product.taskFailed": readonly ["productId", "taskId", "error", "attempt", "terminalState"];
|
|
19
|
+
readonly "product.taskHandoff": readonly ["productId", "taskId", "from", "to", "reason", "attempt", "timestamp"];
|
|
19
20
|
readonly "product.budgetExceeded": readonly ["productId", "usedTokens", "reason"];
|
|
20
21
|
readonly "mention.delegate_started": readonly ["parentSessionId", "parentMessageId", "bindingId", "executionSessionId", "delegationId", "sequence", "providerId", "revision"];
|
|
21
22
|
readonly "mention.delegate_activity": readonly ["parentSessionId", "parentMessageId", "bindingId", "executionSessionId", "delegationId", "sequence", "providerId", "revision"];
|
|
@@ -65,9 +66,9 @@ export interface ProductPlanIssueOptions {
|
|
|
65
66
|
}
|
|
66
67
|
export declare function collectProductPlanIssues(instances: readonly ProductPlanInstanceShape[], tasks: readonly ProductPlanTaskShape[], options?: ProductPlanIssueOptions): ProductPlanIssue[];
|
|
67
68
|
export declare const AGENT_CONTRACT_DESCRIPTOR: {
|
|
68
|
-
readonly version:
|
|
69
|
+
readonly version: 10;
|
|
69
70
|
readonly eventSchemaVersion: 1;
|
|
70
|
-
readonly eventNames: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.ask_user", "turn.media_result", "turn.
|
|
71
|
+
readonly eventNames: readonly ["turn.start", "turn.delta", "turn.end", "turn.error", "turn.recovery", "turn.text_rollback", "turn.file_changes", "turn.tool_call", "turn.tool_result", "turn.tool_blocked", "turn.reasoning_delta", "turn.approval_request", "turn.ask_user", "turn.media_result", "turn.plan_update", "turn.suggestions", "turn.sidechain_started", "turn.subagent_started", "turn.subagent_delta", "turn.subagent_activity", "turn.subagent_ended", "turn.subagent_completed", "turn.subagent_decision", "turn.sidechain_completed", "turn.task_updated", "turn.todos_updated", "turn.exec_progress", "turn.progress", "turn.tool_use_summary", "turn.tool_selection_policy", "turn.lifecycle", "turn.document_maintenance", "turn.artifact_contract", "turn.usage_update", "team.member.notification", "session.info", "session.recovery_pending", "thread.item", "memory.updated", "skills.updated", "turn.memory_recall", "turn.memory_written", "system.activity", "workflow.created", "workflow.updated", "workflow.deleted", "workflow.runStarted", "workflow.runCompleted", "workflow.runFailed", "workflow.nodeStatus", "workflow.triggerDropped", "workflow.alert", "workflow.approvalRequested", "workflow.approvalTimedOut", "solo.progress", "solo.specProgress", "solo.agentDelta", "solo.agentActivity", "solo.agentUsage", "solo.evaluation", "solo.agentDiff", "solo.state", "product.taskStarted", "product.taskOutput", "product.members", "product.agentActivity", "product.taskCompleted", "product.taskFailed", "product.taskHandoff", "product.budgetUpdate", "product.budgetWarning", "product.budgetExceeded", "product.checkpointed", "product.completed", "product.dagTopology", "plan.interrupted", "product.planReady", "product.planningDelta", "product.leaderMessage", "product.planFailed", "product.planningAsk", "mention.delegate_started", "mention.delegate_activity", "mention.delegate_settled"];
|
|
71
72
|
readonly eventRequiredKeys: {
|
|
72
73
|
readonly "turn.subagent_started": readonly ["turnId", "parentTurnId", "subagentId", "agentType", "displayName", "delegatedTask", "mode", "startedAt"];
|
|
73
74
|
readonly "turn.subagent_activity": readonly ["turnId", "parentTurnId", "subagentId", "agentType", "displayName", "conciseStatus", "status", "observedAt"];
|
|
@@ -76,6 +77,7 @@ export declare const AGENT_CONTRACT_DESCRIPTOR: {
|
|
|
76
77
|
readonly "product.taskStarted": readonly ["productId", "taskId", "assignee", "attempt"];
|
|
77
78
|
readonly "product.taskCompleted": readonly ["productId", "taskId", "result", "attempt"];
|
|
78
79
|
readonly "product.taskFailed": readonly ["productId", "taskId", "error", "attempt", "terminalState"];
|
|
80
|
+
readonly "product.taskHandoff": readonly ["productId", "taskId", "from", "to", "reason", "attempt", "timestamp"];
|
|
79
81
|
readonly "product.budgetExceeded": readonly ["productId", "usedTokens", "reason"];
|
|
80
82
|
readonly "mention.delegate_started": readonly ["parentSessionId", "parentMessageId", "bindingId", "executionSessionId", "delegationId", "sequence", "providerId", "revision"];
|
|
81
83
|
readonly "mention.delegate_activity": readonly ["parentSessionId", "parentMessageId", "bindingId", "executionSessionId", "delegationId", "sequence", "providerId", "revision"];
|
|
@@ -83,7 +85,7 @@ export declare const AGENT_CONTRACT_DESCRIPTOR: {
|
|
|
83
85
|
};
|
|
84
86
|
readonly terminalStates: readonly ["completed", "failed", "cancelled"];
|
|
85
87
|
};
|
|
86
|
-
export declare const AGENT_CONTRACT_HASH: "
|
|
88
|
+
export declare const AGENT_CONTRACT_HASH: "5fcb0701c3e9acaff61e5039729e6eb5f41352581ce52079edfa434913ef234c";
|
|
87
89
|
export interface AgentContractIdentity {
|
|
88
90
|
version: typeof AGENT_CONTRACT_VERSION;
|
|
89
91
|
hash: typeof AGENT_CONTRACT_HASH;
|
|
@@ -188,21 +188,6 @@ export interface ToolsListResult {
|
|
|
188
188
|
}>;
|
|
189
189
|
total: number;
|
|
190
190
|
}
|
|
191
|
-
export interface MediaListModelsParams {
|
|
192
|
-
/** Filter by media type (image/video/music/tts/3d/stt/embedding). Omit to list all. */
|
|
193
|
-
mediaType?: string;
|
|
194
|
-
}
|
|
195
|
-
export interface MediaListModelsResult {
|
|
196
|
-
models: Array<{
|
|
197
|
-
providerId: string;
|
|
198
|
-
providerName: string;
|
|
199
|
-
modelId: string;
|
|
200
|
-
modelName: string;
|
|
201
|
-
mediaType: string;
|
|
202
|
-
/** Fine-grained capability metadata (operations, formats, limits) */
|
|
203
|
-
capabilities?: Record<string, unknown>;
|
|
204
|
-
}>;
|
|
205
|
-
}
|
|
206
191
|
export type CommunityInstallRiskTier = "R0" | "R1" | "R2" | "R3";
|
|
207
192
|
export type CommunityInstallSourceTier = "official" | "community";
|
|
208
193
|
export type CommunityInstallTrustStage = "quarantine" | "trial" | "trusted";
|
|
@@ -238,6 +223,8 @@ export interface CommunityInstallResourceParams {
|
|
|
238
223
|
resourceId: string;
|
|
239
224
|
version?: string;
|
|
240
225
|
explicitInstallConsent: true;
|
|
226
|
+
allowReplace?: boolean;
|
|
227
|
+
replacementPolicy?: "managed-unmodified" | "user-confirmed";
|
|
241
228
|
}
|
|
242
229
|
export interface CommunityInstalledResource {
|
|
243
230
|
resourceId: string;
|
|
@@ -493,10 +480,6 @@ export interface RpcMethodMap {
|
|
|
493
480
|
params: ToolsListParams;
|
|
494
481
|
result: ToolsListResult;
|
|
495
482
|
};
|
|
496
|
-
"media.listModels": {
|
|
497
|
-
params: MediaListModelsParams;
|
|
498
|
-
result: MediaListModelsResult;
|
|
499
|
-
};
|
|
500
483
|
"community.resolveInstall": {
|
|
501
484
|
params: CommunityResolveInstallParams;
|
|
502
485
|
result: CommunityResolveInstallResult;
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
* This file re-exports the wire types.
|
|
7
7
|
* Internal consumers import from this file — zero churn.
|
|
8
8
|
*/
|
|
9
|
-
export type { AgentSource, ArtifactType, MediaResultType, MemoryDecayCompletedNotification, MemoryUpdatedNotification, NotificationMethod, NotificationMethodMap, NotificationThreadItem, PermissionRuleUpdatedNotification, PlanInterruptedNotification, PongNotification, ProductAgentActivityNotification, ProductBudgetUpdateNotification, ProductBudgetWarningNotification, ProductCheckpointedNotification, ProductCompletedNotification, ProductDagTopologyNotification, ProductMembersNotification, ProductPlanFailedNotification, ProductPlanningDeltaNotification, ProductPlanReadyNotification, ProductLeaderMessageNotification, ProductPlanningAskNotification, ProductTaskCompletedNotification, ProductTaskFailedNotification, ProductTaskOutputDeltaNotification, ProductTaskStartedNotification, ProjectArchivedNotification, ProjectCreatedNotification, ProjectDeletedNotification, ProjectRenamedNotification, ProjectSwitchedNotification, ProjectUnarchivedNotification, SessionInfoNotification, SessionRecoveryPendingNotification, SoloAgentDeltaNotification, SoloAgentUsageNotification, SoloEvaluationNotification, SoloProgressNotification, TeamMemberNotification, ToolApprovalRequestNotification, TurnAnnotationsNotification, TurnArtifactNotification, TurnAskUserNotification, TurnDeltaNotification, TurnEndNotification, TurnErrorNotification, TurnExecProgressNotification, TurnHeartbeatNotification,
|
|
9
|
+
export type { AgentSource, ArtifactType, MediaResultType, MemoryDecayCompletedNotification, MemoryUpdatedNotification, NotificationMethod, NotificationMethodMap, NotificationThreadItem, ThreadItemNotification, PermissionRuleUpdatedNotification, PlanInterruptedNotification, PongNotification, ProductAgentActivityNotification, ProductBudgetUpdateNotification, ProductBudgetWarningNotification, ProductCheckpointedNotification, ProductCompletedNotification, ProductDagTopologyNotification, ProductMembersNotification, ProductPlanFailedNotification, ProductPlanningDeltaNotification, ProductPlanReadyNotification, ProductLeaderMessageNotification, ProductPlanningAskNotification, ProductTaskCompletedNotification, ProductTaskFailedNotification, ProductTaskOutputDeltaNotification, ProductTaskStartedNotification, ProjectArchivedNotification, ProjectCreatedNotification, ProjectDeletedNotification, ProjectRenamedNotification, ProjectSwitchedNotification, ProjectUnarchivedNotification, SessionInfoNotification, SessionRecoveryPendingNotification, SoloAgentDeltaNotification, SoloAgentUsageNotification, SoloEvaluationNotification, SoloProgressNotification, TeamMemberNotification, ToolApprovalRequestNotification, TurnAnnotationsNotification, TurnArtifactNotification, TurnAskUserNotification, TurnDeltaNotification, TurnEndNotification, TurnErrorNotification, TurnExecProgressNotification, TurnHeartbeatNotification, TurnMediaResultNotification, TurnPlanUpdateNotification, TurnProgressNotification, TurnReasoningDeltaNotification, TurnRecoveryNotification, TurnSidechainCompletedNotification, TurnSidechainStartedNotification, TurnStartNotification, TurnSubagentActivityNotification, TurnSubagentActivityStatus, TurnSubagentCompletedNotification, TurnSubagentDecisionNotification, TurnSubagentDeltaNotification, TurnSubagentEvidenceItem, TurnSubagentStartedNotification, TurnSubagentTokenUsage, TurnSuggestionsNotification, TurnTaskUpdatedNotification, TurnTodosUpdatedNotification, TurnToolBlockedNotification, TurnToolCallNotification, TurnToolResultNotification, TurnToolUseSummaryNotification, TurnUsageUpdateNotification, WireTokenUsage, MentionDelegateStartedNotification, MentionDelegateActivityNotification, MentionDelegateSettledNotification, } from "./wire/index.js";
|
|
@@ -313,6 +313,19 @@ export interface ProductCreateParams {
|
|
|
313
313
|
maxTotalTokens?: number;
|
|
314
314
|
maxDuration?: number;
|
|
315
315
|
};
|
|
316
|
+
/**
|
|
317
|
+
* Durable per-turn policy inherited from a parent Goal. Product keeps member-specific model
|
|
318
|
+
* selection: modelId/reasoningEffort apply only to the native qlogicagent member, while Host
|
|
319
|
+
* permissions and active skills remain available to every supervised member.
|
|
320
|
+
*/
|
|
321
|
+
turnContext?: {
|
|
322
|
+
modelId?: string;
|
|
323
|
+
reasoningEffort?: string;
|
|
324
|
+
permissions?: unknown;
|
|
325
|
+
activeSkills?: string[];
|
|
326
|
+
/** Native qlogicagent-only projection of the parent Goal for Agent-local compaction. */
|
|
327
|
+
goalContextEnvelope?: import("./chat-types.js").ContextEnvelope;
|
|
328
|
+
};
|
|
316
329
|
}
|
|
317
330
|
/**
|
|
318
331
|
* product.plan RPC params — starts an interactive planning session.
|
|
@@ -337,16 +350,16 @@ export interface ProductPlanParams {
|
|
|
337
350
|
maxDuration?: number;
|
|
338
351
|
};
|
|
339
352
|
/**
|
|
340
|
-
* Optional user-supplied allow-list of agent ids the leader
|
|
353
|
+
* Optional user-supplied allow-list of agent ids the selected leader may assign tasks to —
|
|
341
354
|
* during planning AND during execution-phase reassignment. The user picks WHICH agents participate;
|
|
342
355
|
* the leader still auto-plans + assigns, but only within this set.
|
|
343
356
|
*
|
|
344
357
|
* Semantics are PRESENCE-based (see buildAgentRoster) — an explicit `[]` differs from omitted:
|
|
345
358
|
* - omitted / undefined → ALL ready agents.
|
|
346
|
-
* - `[]` (explicit empty array) → ONLY
|
|
359
|
+
* - `[]` (explicit empty array) → ONLY `leaderAgentId`: the user deselected every worker.
|
|
347
360
|
* - non-empty → the assignable roster = ready catalog entries whose id ∈ allowedAgents, PLUS the
|
|
348
|
-
* leader
|
|
349
|
-
*
|
|
361
|
+
* selected leader. Product may use that leader as a single-agent executor; Goal keeps the selected
|
|
362
|
+
* leader control-only whenever another ready worker exists.
|
|
350
363
|
*/
|
|
351
364
|
allowedAgents?: string[];
|
|
352
365
|
}
|
|
@@ -400,6 +413,21 @@ export interface ProductMessageParams {
|
|
|
400
413
|
/** User's message content. */
|
|
401
414
|
content: string;
|
|
402
415
|
}
|
|
416
|
+
/** Exact user-authored edit to a running Product DAG. One RPC carries one atomic mutation. */
|
|
417
|
+
export interface ProductDagMutationParams {
|
|
418
|
+
productId: string;
|
|
419
|
+
projectId: string;
|
|
420
|
+
canonicalSessionId: string;
|
|
421
|
+
cwd: string;
|
|
422
|
+
mutation: {
|
|
423
|
+
type: "add_dependency" | "remove_dependency";
|
|
424
|
+
taskId: string;
|
|
425
|
+
details: {
|
|
426
|
+
from: string;
|
|
427
|
+
to: string;
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
}
|
|
403
431
|
/** Product lifecycle RPC params. Status projection is Host-native and not an agent method. */
|
|
404
432
|
export interface ProductIdParams {
|
|
405
433
|
productId: string;
|
|
@@ -425,18 +453,31 @@ export interface GoalStartParams {
|
|
|
425
453
|
canonicalSessionId: string;
|
|
426
454
|
cwd: string;
|
|
427
455
|
agentPool: string[];
|
|
428
|
-
leaderAgentId
|
|
456
|
+
leaderAgentId: string;
|
|
457
|
+
budget?: {
|
|
458
|
+
maxTotalTokens?: number;
|
|
459
|
+
maxDurationMs?: number;
|
|
460
|
+
};
|
|
461
|
+
modelId?: string;
|
|
462
|
+
reasoningEffort?: string;
|
|
463
|
+
permissionPolicy?: unknown;
|
|
464
|
+
activeSkills?: string[];
|
|
429
465
|
}
|
|
430
|
-
/** x/goal.pause / x/goal.stop RPC params. */
|
|
466
|
+
/** x/goal.pause / x/goal.stop RPC params. Gateway derives the leader from the immutable session owner. */
|
|
431
467
|
export interface GoalIdParams {
|
|
432
468
|
goalRunId: string;
|
|
433
469
|
projectId: string;
|
|
434
470
|
canonicalSessionId: string;
|
|
435
471
|
cwd: string;
|
|
472
|
+
leaderAgentId: string;
|
|
436
473
|
}
|
|
437
474
|
/** x/goal.resume RPC params — optionally update the goal on resume. */
|
|
438
475
|
export interface GoalResumeParams extends GoalIdParams {
|
|
439
476
|
newGoal?: string;
|
|
477
|
+
additionalBudget?: {
|
|
478
|
+
maxTotalTokens?: number;
|
|
479
|
+
maxDurationMs?: number;
|
|
480
|
+
};
|
|
440
481
|
}
|
|
441
482
|
/** x/goal.updateGoal RPC params. */
|
|
442
483
|
export interface GoalUpdateGoalParams extends GoalIdParams {
|
|
@@ -445,6 +486,7 @@ export interface GoalUpdateGoalParams extends GoalIdParams {
|
|
|
445
486
|
/** x/goal.message RPC params — queue a steering message for the next phase boundary. */
|
|
446
487
|
export interface GoalMessageParams extends GoalIdParams {
|
|
447
488
|
text: string;
|
|
489
|
+
kind?: "instruction_once" | "constraint_add" | "constraint_remove" | "answer_to_blocker" | "priority_change";
|
|
448
490
|
}
|
|
449
491
|
/** Runtime instance state. */
|
|
450
492
|
export interface ProductInstanceStatus {
|