qlogicagent 2.16.4 → 2.16.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -11
- package/dist/agent.js +20 -21
- package/dist/cli.js +516 -375
- package/dist/index.js +515 -374
- package/dist/orchestration.js +11 -12
- package/dist/protocol.js +1 -1
- package/dist/types/agent/tool-loop/completion-action-policy.d.ts +2 -1
- package/dist/types/agent/tool-loop/loop-helpers.d.ts +1 -4
- package/dist/types/agent/tool-loop/pseudo-tool-output.d.ts +8 -0
- package/dist/types/agent/tool-loop/tool-failure-policy.d.ts +0 -1
- package/dist/types/agent/tool-loop/tool-guardrails.d.ts +24 -0
- package/dist/types/agent/tool-loop/tool-result-classification.d.ts +10 -0
- package/dist/types/agent/tool-loop.d.ts +4 -0
- package/dist/types/agent/types.d.ts +2 -2
- package/dist/types/cli/acp-commands.d.ts +1 -2
- package/dist/types/cli/acp-extended-handlers.d.ts +25 -0
- package/dist/types/cli/agent-runtime-bootstrap.d.ts +0 -2
- package/dist/types/cli/community-resource-installer.d.ts +5 -3
- package/dist/types/cli/core-tools/fork-system-prompt.d.ts +0 -2
- package/dist/types/cli/core-tools/registry.d.ts +1 -2
- package/dist/types/cli/core-tools/session-tool-manifest.d.ts +0 -2
- package/dist/types/cli/handlers/community-handler.d.ts +4 -0
- package/dist/types/cli/handlers/goal-handler.d.ts +54 -0
- package/dist/types/cli/handlers/pinned-skill-context.d.ts +2 -0
- package/dist/types/cli/handlers/turn-handler.d.ts +0 -1
- package/dist/types/cli/skill-invocation-service.d.ts +8 -0
- package/dist/types/cli/{skill-meta-tool-bootstrap.d.ts → skill-tools-bootstrap.d.ts} +6 -12
- package/dist/types/cli/stdio-agent-session-bootstrap.d.ts +0 -1
- package/dist/types/cli/tool-bootstrap-core-registration.d.ts +1 -9
- package/dist/types/cli/tool-bootstrap.d.ts +0 -2
- package/dist/types/contracts/turn-event.d.ts +1 -1
- package/dist/types/orchestration/agent-instance.d.ts +19 -2
- package/dist/types/orchestration/delegation-coordinator.d.ts +43 -0
- package/dist/types/orchestration/goal-acceptance.d.ts +20 -0
- package/dist/types/orchestration/goal-loop-coordinator.d.ts +87 -0
- package/dist/types/orchestration/goal-mode-adapters.d.ts +94 -0
- package/dist/types/orchestration/goal-run-persistence.d.ts +15 -0
- package/dist/types/orchestration/goal-run-types.d.ts +112 -0
- package/dist/types/orchestration/index.d.ts +1 -1
- package/dist/types/orchestration/skill-improvement.d.ts +1 -21
- package/dist/types/orchestration/subagent/agent-registry.d.ts +1 -1
- package/dist/types/orchestration/workflow/host-executors.d.ts +1 -1
- package/dist/types/orchestration/workflow/node-schema.d.ts +3 -3
- package/dist/types/orchestration/workflow/qla-executor-host.d.ts +2 -2
- package/dist/types/orchestration/workflow/workflow-scheduler.d.ts +1 -1
- package/dist/types/protocol/methods.d.ts +0 -3
- package/dist/types/protocol/wire/acp-agent-management.d.ts +33 -1
- package/dist/types/protocol/wire/acp-protocol.d.ts +14 -2
- package/dist/types/protocol/wire/agent-events.d.ts +2 -2
- package/dist/types/protocol/wire/agent-methods.d.ts +0 -2
- package/dist/types/protocol/wire/notification-payloads.d.ts +36 -20
- package/dist/types/runtime/community/community-pet-publisher.d.ts +21 -24
- package/dist/types/runtime/community/community-signal-reporter.d.ts +0 -14
- package/dist/types/runtime/config/tunable-defaults.d.ts +0 -21
- package/dist/types/runtime/execution/untrusted-tool-result.d.ts +2 -0
- package/dist/types/runtime/hooks/community-discovery-hook.d.ts +18 -0
- package/dist/types/runtime/infra/acp-protocol-adapter.d.ts +2 -2
- package/dist/types/runtime/infra/agent-install-runner.d.ts +1 -1
- package/dist/types/runtime/infra/skill-resolver.d.ts +9 -3
- package/dist/types/runtime/pet/pet-community-assets.d.ts +16 -11
- package/dist/types/runtime/pet/pet-profile-service.d.ts +2 -2
- package/dist/types/runtime/pet/petdex-asset.d.ts +28 -0
- package/dist/types/runtime/ports/tool-contracts.d.ts +1 -10
- package/dist/types/runtime/prompt/environment-context.d.ts +8 -32
- package/dist/types/runtime/tasks/task-types.d.ts +2 -32
- package/dist/types/skills/mcp/mcp-manager.d.ts +20 -2
- package/dist/types/skills/permissions/hook-runner.d.ts +0 -22
- package/dist/types/skills/plugins/plugin-api.d.ts +1 -1
- package/dist/types/skills/portable-tool.d.ts +2 -8
- package/dist/types/skills/skill-system/skill-bundles.d.ts +8 -0
- package/dist/types/skills/skill-system/skill-frontmatter.d.ts +1 -5
- package/dist/types/skills/skill-system/skill-lifecycle.d.ts +13 -1
- package/dist/types/skills/skill-system/skill-preprocessing.d.ts +11 -0
- package/dist/types/skills/skill-system/skill-types.d.ts +0 -75
- package/dist/types/skills/skill-system/skill-validation.d.ts +1 -0
- package/dist/types/skills/tools/skill-tool.d.ts +58 -22
- package/dist/types/skills/tools.d.ts +5 -39
- package/dist/types/transport/acp-server.d.ts +13 -1
- package/package.json +3 -3
- package/dist/types/cli/core-tools/team-registry.d.ts +0 -62
- package/dist/types/cli/core-tools/team-tool-bootstrap.d.ts +0 -11
- package/dist/types/cli/core-tools/team-tool-service.d.ts +0 -43
- package/dist/types/cli/skill-meta-subturn-service.d.ts +0 -26
- package/dist/types/runtime/hooks/skill-recall-hooks.d.ts +0 -37
- package/dist/types/runtime/sandbox/skill-sandbox.d.ts +0 -53
- package/dist/types/runtime/sandbox/windows-skill-sandbox.d.ts +0 -78
- package/dist/types/skills/permissions/community-sandbox-policy.d.ts +0 -3
- package/dist/types/skills/permissions/community-sandbox-red-team-cli.d.ts +0 -7
- package/dist/types/skills/permissions/community-sandbox-red-team.d.ts +0 -32
- package/dist/types/skills/skill-system/skill-source.d.ts +0 -38
- package/dist/types/skills/tools/team-tool.d.ts +0 -152
- package/dist/types/skills/tools/tool-search-tool.d.ts +0 -75
- package/dist/types/skills/tools/tool-selection-eval.d.ts +0 -49
- package/dist/types/skills/tools/tool-selection-eval.dataset.d.ts +0 -5
- package/dist/types/skills/tools/tool-selection-eval.tasks.d.ts +0 -9
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CommunityInstallResolution } from "../runtime/community/community-consent-client.js";
|
|
2
|
-
import { type
|
|
2
|
+
import { type InstalledCommunityPet } from "../runtime/pet/pet-community-assets.js";
|
|
3
3
|
import { type CommunityInstalledResource, type InstallCommunitySkillOptions } from "./community-skill-installer.js";
|
|
4
4
|
import { type CommunityWorkflowBundlePayload } from "./community-workflow-installer.js";
|
|
5
|
-
export type CommunityInstalledAnyResource = CommunityInstalledResource |
|
|
5
|
+
export type CommunityInstalledAnyResource = CommunityInstalledResource | InstalledCommunityPet | CommunityWorkflowBundlePayload;
|
|
6
6
|
export interface CommunityMcpInstallPreview {
|
|
7
7
|
kind: "mcp";
|
|
8
8
|
mode: "preview";
|
|
@@ -27,4 +27,6 @@ export interface CommunityExecutableLauncherGate {
|
|
|
27
27
|
autoRunBlocked: true;
|
|
28
28
|
manifest: unknown;
|
|
29
29
|
}
|
|
30
|
-
export declare function installCommunityResource(install: CommunityInstallResolution, options?: InstallCommunitySkillOptions
|
|
30
|
+
export declare function installCommunityResource(install: CommunityInstallResolution, options?: InstallCommunitySkillOptions & {
|
|
31
|
+
ownerUserId?: string;
|
|
32
|
+
}): Promise<CommunityInstalledAnyResource | CommunityMcpInstallPreview | CommunityExecutableLauncherGate>;
|
|
@@ -31,8 +31,6 @@ export interface SubagentSystemPromptInput {
|
|
|
31
31
|
}
|
|
32
32
|
/** Build the persona section for a built-in fork agent (type + behavioral suffix). */
|
|
33
33
|
export declare function personaForAgentDefinition(agentDef: AgentDefinition): string;
|
|
34
|
-
/** Build the persona section for a team member (name + role + coordination note). */
|
|
35
|
-
export declare function personaForTeamMember(name: string, role: string): string;
|
|
36
34
|
/**
|
|
37
35
|
* Shared subagent context assembly — used by BOTH the in-process fork (agent tool)
|
|
38
36
|
* and the subprocess team member, so their standing context is identical:
|
|
@@ -3,6 +3,5 @@ import { type CheckpointToolRegistrationDeps } from "./checkpoint-tool-bootstrap
|
|
|
3
3
|
import { type ConfigToolRegistrationDeps } from "./config-tool-bootstrap.js";
|
|
4
4
|
import { type CronToolRegistrationDeps } from "./cron-tool-bootstrap.js";
|
|
5
5
|
import { type MonitorToolRegistrationDeps } from "./monitor-tool-bootstrap.js";
|
|
6
|
-
|
|
7
|
-
export type CoreToolSetRegistrationDeps = AgentToolRegistrationDeps & CheckpointToolRegistrationDeps & ConfigToolRegistrationDeps & CronToolRegistrationDeps & MonitorToolRegistrationDeps & Omit<TeamToolRegistrationDeps, "teamRegistry">;
|
|
6
|
+
export type CoreToolSetRegistrationDeps = AgentToolRegistrationDeps & CheckpointToolRegistrationDeps & ConfigToolRegistrationDeps & CronToolRegistrationDeps & MonitorToolRegistrationDeps;
|
|
8
7
|
export declare function registerCoreToolSet(deps: CoreToolSetRegistrationDeps): void;
|
|
@@ -6,7 +6,5 @@ export interface SessionToolManifestEntry {
|
|
|
6
6
|
category: CapabilityCategory;
|
|
7
7
|
/** Registered per-session by the runtime bootstrap, not in the static catalog. */
|
|
8
8
|
sessionScoped: true;
|
|
9
|
-
/** The live registration is deferred (loaded on demand via tool_search). */
|
|
10
|
-
deferred?: true;
|
|
11
9
|
}
|
|
12
10
|
export declare const SESSION_TOOL_MANIFEST: SessionToolManifestEntry[];
|
|
@@ -10,6 +10,10 @@ export interface CommunityHandlerHost {
|
|
|
10
10
|
resolveCommunityConsentClient?: () => CommunityConsentClient | null;
|
|
11
11
|
resolveCommunityConsentStore?: () => CommunityConsentStore;
|
|
12
12
|
sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
|
|
13
|
+
/** Push a JSON-RPC notification (e.g. pet.asset.updated after a community pet install hydrates the UI store). */
|
|
14
|
+
sendNotification(method: string, params: Record<string, unknown>): void;
|
|
15
|
+
/** Active owner id, so community pet install/publish land in the same profile pet.status reads. */
|
|
16
|
+
memoryUserId?: string;
|
|
13
17
|
}
|
|
14
18
|
export declare const METHOD_CONSENT_REQUIRED_MESSAGE = "Community participation consent is required before publishing shared skills.";
|
|
15
19
|
export declare function handleCommunityGetConsent(this: CommunityHandlerHost, msg: AgentRpcRequest): Promise<void>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { GoalLoopCoordinator } from "../../orchestration/goal-loop-coordinator.js";
|
|
2
|
+
import type { GoalStatus } from "../../orchestration/goal-run-types.js";
|
|
3
|
+
export declare class GoalHandler {
|
|
4
|
+
private readonly coordinator;
|
|
5
|
+
private readonly cwd;
|
|
6
|
+
constructor(coordinator: GoalLoopCoordinator, cwd: string);
|
|
7
|
+
start(params: {
|
|
8
|
+
goal: string;
|
|
9
|
+
cwd?: string;
|
|
10
|
+
agentPool?: string[];
|
|
11
|
+
}): Promise<{
|
|
12
|
+
ok: true;
|
|
13
|
+
goalRunId: string;
|
|
14
|
+
}>;
|
|
15
|
+
status(params: {
|
|
16
|
+
goalRunId: string;
|
|
17
|
+
}): Promise<GoalStatus>;
|
|
18
|
+
message(params: {
|
|
19
|
+
goalRunId: string;
|
|
20
|
+
text: string;
|
|
21
|
+
}): Promise<{
|
|
22
|
+
ok: true;
|
|
23
|
+
queued: true;
|
|
24
|
+
}>;
|
|
25
|
+
pause(params: {
|
|
26
|
+
goalRunId: string;
|
|
27
|
+
}): Promise<{
|
|
28
|
+
ok: true;
|
|
29
|
+
}>;
|
|
30
|
+
resume(params: {
|
|
31
|
+
goalRunId: string;
|
|
32
|
+
newGoal?: string;
|
|
33
|
+
}): Promise<{
|
|
34
|
+
ok: true;
|
|
35
|
+
}>;
|
|
36
|
+
updateGoal(params: {
|
|
37
|
+
goalRunId: string;
|
|
38
|
+
newGoal: string;
|
|
39
|
+
}): Promise<{
|
|
40
|
+
ok: true;
|
|
41
|
+
}>;
|
|
42
|
+
stop(params: {
|
|
43
|
+
goalRunId: string;
|
|
44
|
+
}): Promise<{
|
|
45
|
+
ok: true;
|
|
46
|
+
}>;
|
|
47
|
+
events(params: {
|
|
48
|
+
goalRunId: string;
|
|
49
|
+
fromSeq?: number;
|
|
50
|
+
limit?: number;
|
|
51
|
+
}): Promise<{
|
|
52
|
+
events: unknown[];
|
|
53
|
+
}>;
|
|
54
|
+
}
|
|
@@ -19,7 +19,6 @@ export interface TurnControlHandlerHost {
|
|
|
19
19
|
}
|
|
20
20
|
export declare function hydrateTurnConfigFromModelMetadata(config: TurnConfig): TurnConfig;
|
|
21
21
|
export declare function hydrateAttachmentReferenceUrlsForTurn(messages: ChatMessage[]): ChatMessage[];
|
|
22
|
-
export declare function activateAttachmentToolsForTurn(toolCatalog: ToolCatalog, messages: ChatMessage[]): string[];
|
|
23
22
|
export declare function getFocusedAttachmentToolNamesForTurn(messages: ChatMessage[]): Set<string> | null;
|
|
24
23
|
type FocusedAttachmentModelPurpose = "imageUnderstanding" | "videoUnderstanding";
|
|
25
24
|
export declare function getFocusedAttachmentUnsupportedContentForTurn(messages: ChatMessage[], purpose: FocusedAttachmentModelPurpose): string | null;
|
|
@@ -1,30 +1,24 @@
|
|
|
1
|
-
import type { HookRegistry } from "../contracts/hooks.js";
|
|
2
1
|
import type { NotificationMethod, NotificationMethodMap } from "../protocol/notifications.js";
|
|
3
2
|
import type { MemoryLearningSink, PathService, ToolCatalog } from "../runtime/ports/index.js";
|
|
4
3
|
import type { WorkspaceSkill } from "../skills/skill-system/skill-types.js";
|
|
5
|
-
|
|
6
|
-
export { resolveSkillSubagentTypeForLifecycle } from "./skill-meta-subturn-service.js";
|
|
7
|
-
export interface SkillMetaToolBootstrapDeps {
|
|
4
|
+
export interface SkillToolsBootstrapDeps {
|
|
8
5
|
config: Record<string, unknown>;
|
|
9
6
|
pathService: PathService;
|
|
10
7
|
toolCatalog: ToolCatalog;
|
|
11
8
|
}
|
|
12
9
|
export type SkillLearningMemorySink = MemoryLearningSink;
|
|
13
|
-
export interface
|
|
10
|
+
export interface SkillToolsHost {
|
|
14
11
|
getActiveProjectRoot(): string;
|
|
15
12
|
getPluginSkills(): WorkspaceSkill[];
|
|
16
|
-
getAgent(): SkillSubturnAgent | null;
|
|
17
|
-
getCurrentSessionId(): string;
|
|
18
|
-
getCurrentHooks(): HookRegistry | null;
|
|
19
13
|
sendNotification<M extends NotificationMethod>(method: M, params: NotificationMethodMap[M]): void;
|
|
20
14
|
getMemoryLearningSink(): SkillLearningMemorySink | null;
|
|
21
15
|
getMemoryUserId(): string;
|
|
22
16
|
}
|
|
23
|
-
export interface
|
|
24
|
-
host:
|
|
17
|
+
export interface SkillToolsRegistrationContext extends SkillToolsBootstrapDeps {
|
|
18
|
+
host: SkillToolsHost;
|
|
25
19
|
}
|
|
26
|
-
export declare const
|
|
27
|
-
export declare function
|
|
20
|
+
export declare const skillToolsRegistrationModule: import("../runtime/ports/tool-contracts.js").ToolRegistrationModule<SkillToolsRegistrationContext>;
|
|
21
|
+
export declare function configureSkillToolsBootstrap(host: SkillToolsHost, deps: SkillToolsBootstrapDeps): void;
|
|
28
22
|
/**
|
|
29
23
|
* Resolve a supporting-file path inside a skill folder.
|
|
30
24
|
* Returns the absolute target, or null when the path escapes the skill dir
|
|
@@ -59,7 +59,6 @@ export interface StdioAgentSessionBootstrapDeps {
|
|
|
59
59
|
setMcpReady(ready: Promise<void>): void;
|
|
60
60
|
setPluginLoader(loader: PluginLoader): void;
|
|
61
61
|
setFileWatcher(watcher: FileWatcher | null): void;
|
|
62
|
-
getAgent(): Agent | null;
|
|
63
62
|
getAcpPermissionSession(): {
|
|
64
63
|
sessionId: string;
|
|
65
64
|
requestPermission(params: AcpPermissionRequestParams): Promise<{
|
|
@@ -4,7 +4,7 @@ import { type AskUserQuestion } from "../skills/tools/ask-user-tool.js";
|
|
|
4
4
|
import { type ExecProgress } from "../skills/tools/exec-tool.js";
|
|
5
5
|
import type { BackgroundTaskManager } from "../runtime/infra/background-tasks.js";
|
|
6
6
|
import type { SandboxConfig } from "../skills/tools/shell/sandbox/sandbox-types.js";
|
|
7
|
-
import { type PathService
|
|
7
|
+
import { type PathService } from "../runtime/ports/index.js";
|
|
8
8
|
export interface LocalCoreToolRegistrationContext {
|
|
9
9
|
tools: PortableTool<any>[];
|
|
10
10
|
taskToolHooks?: TaskToolHooks;
|
|
@@ -23,14 +23,6 @@ export interface LocalCoreToolRegistrationContext {
|
|
|
23
23
|
info(message: string): void;
|
|
24
24
|
warn(message: string): void;
|
|
25
25
|
};
|
|
26
|
-
listToolNames(): string[];
|
|
27
|
-
findRegisteredTool(name: string): RuntimeToolContract | undefined;
|
|
28
|
-
activateRegisteredTool(name: string): boolean;
|
|
29
|
-
listDeferredTools(): Array<{
|
|
30
|
-
name: string;
|
|
31
|
-
description: string;
|
|
32
|
-
searchHint?: string;
|
|
33
|
-
}>;
|
|
34
26
|
}
|
|
35
27
|
export declare function setGroupSecurityMode(enabled: boolean): void;
|
|
36
28
|
export declare const localCoreToolRegistrationModule: import("../runtime/ports/tool-contracts.js").ToolRegistrationModule<LocalCoreToolRegistrationContext>;
|
|
@@ -16,8 +16,6 @@ export interface SandboxPermissionSnapshot {
|
|
|
16
16
|
mode: PermissionMode;
|
|
17
17
|
workdir: string;
|
|
18
18
|
allowedDirs: string[];
|
|
19
|
-
/** cut7c: current turn is an untrusted community-skill turn → tighten the sandbox. */
|
|
20
|
-
communityTurn: boolean;
|
|
21
19
|
}
|
|
22
20
|
/** Wire the OS-sandbox permission source (live rule-engine snapshot), or null to clear. */
|
|
23
21
|
export declare function setSandboxPermissionSource(source: (() => SandboxPermissionSnapshot | undefined) | null): void;
|
|
@@ -79,7 +79,7 @@ export type TurnEvent = {
|
|
|
79
79
|
type: "tool_selection_policy";
|
|
80
80
|
turnId: string;
|
|
81
81
|
policyId: string;
|
|
82
|
-
intent: "benchmark_state_maintenance" | "fresh_evidence" | "verification" | "final_answer" | "
|
|
82
|
+
intent: "benchmark_state_maintenance" | "fresh_evidence" | "verification" | "final_answer" | "tool_recovery" | "lifecycle_reconciliation";
|
|
83
83
|
reason: string;
|
|
84
84
|
availableToolNames: string[];
|
|
85
85
|
enabledToolNamesBefore: string[];
|
|
@@ -84,8 +84,25 @@ export declare class ProductOrchestrator {
|
|
|
84
84
|
create(params: ProductCreateParams): Promise<string>;
|
|
85
85
|
/** Resume a product from persisted state. */
|
|
86
86
|
resume(productId: string, cwd?: string): Promise<void>;
|
|
87
|
-
/**
|
|
88
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Pause a running product — the SINGLE pause path (I9).
|
|
89
|
+
*
|
|
90
|
+
* `drainTimeoutMs` selects the behavior along ONE mechanism, not separate code paths:
|
|
91
|
+
* - `0` (default): instant pause — no drain wait, the loop below force-kills any running
|
|
92
|
+
* instances immediately. This is Product's historical hard-kill UX, expressed as a parameter.
|
|
93
|
+
* - `> 0`: graceful drain — stop dispatching NEW tasks, then wait up to `drainTimeoutMs` for
|
|
94
|
+
* in-flight tasks to settle (inFlightTasks → 0). After a clean drain there is nothing left
|
|
95
|
+
* running so the loop kills nothing; on timeout the SAME loop force-kills the stragglers.
|
|
96
|
+
*
|
|
97
|
+
* `session.phase` flips to "paused" only AFTER draining, so a run mid-drain is observably still
|
|
98
|
+
* active (not yet paused).
|
|
99
|
+
*/
|
|
100
|
+
pause(productId: string, options?: {
|
|
101
|
+
drainTimeoutMs?: number;
|
|
102
|
+
}): Promise<void>;
|
|
103
|
+
/** Poll `session.inFlightTasks` until it settles to 0 or the deadline elapses. The sole drain
|
|
104
|
+
* primitive for {@link pause} — there is no other place that waits for tasks to settle. */
|
|
105
|
+
private waitForInFlightSettle;
|
|
89
106
|
/** Manual checkpoint. */
|
|
90
107
|
checkpoint(productId: string): Promise<void>;
|
|
91
108
|
applyDagMutations(productId: string, mutations: readonly DagMutation[]): void;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ProductOrchestrator } from "./agent-instance.js";
|
|
2
|
+
export interface DelegationNotify {
|
|
3
|
+
(method: string, payload: Record<string, unknown>): void;
|
|
4
|
+
}
|
|
5
|
+
export interface DelegationDeps {
|
|
6
|
+
orchestrator: ProductOrchestrator;
|
|
7
|
+
cwd: string;
|
|
8
|
+
notify: DelegationNotify;
|
|
9
|
+
log?: {
|
|
10
|
+
info(m: string): void;
|
|
11
|
+
warn(m: string): void;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
type DelegationStatus = "running" | "completed" | "failed" | "cancelled";
|
|
15
|
+
export declare class DelegationCoordinator {
|
|
16
|
+
private readonly deps;
|
|
17
|
+
private readonly active;
|
|
18
|
+
constructor(deps: DelegationDeps);
|
|
19
|
+
/** Active + recent delegations for this project (x/mention.list). */
|
|
20
|
+
list(): {
|
|
21
|
+
delegationId: string;
|
|
22
|
+
agentId: string;
|
|
23
|
+
brief: string;
|
|
24
|
+
status: DelegationStatus;
|
|
25
|
+
}[];
|
|
26
|
+
/** Cancel a running delegation — aborts the poll loop, which drains+kills the worker. */
|
|
27
|
+
cancel(delegationId: string): {
|
|
28
|
+
ok: boolean;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Dispatch ONE ad-hoc task to `agentId` in the background. Returns immediately with the delegationId;
|
|
32
|
+
* the lifecycle (started / settled) is reported via notify(mention.*). An unready/uninstalled agent
|
|
33
|
+
* surfaces as a `failed` settle (never a thrown RPC).
|
|
34
|
+
*/
|
|
35
|
+
delegate(agentId: string, brief: string, opts?: {
|
|
36
|
+
acceptanceCriteria?: string;
|
|
37
|
+
}): {
|
|
38
|
+
delegationId: string;
|
|
39
|
+
};
|
|
40
|
+
private run;
|
|
41
|
+
private settle;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AcceptanceChecklist, AcceptanceEvidence, AcceptanceStatus } from "./goal-run-types.js";
|
|
2
|
+
/** Return a NEW checklist with one criterion's status flipped. Never mutates the input.
|
|
3
|
+
* Monotonicity contract: a criterion that already `passed` may only revert to `failed` via a
|
|
4
|
+
* deterministic verify REGRESSION (allowRegression=true). Any other downgrade of a passed criterion
|
|
5
|
+
* (an LLM judge's prose verdict, a re-pending) is IGNORED — `passed` is terminal except when its own
|
|
6
|
+
* `verify` command starts failing. This is what makes "no regression goes unnoticed" hold without
|
|
7
|
+
* letting assessment flap: real regressions are caught (verify), spurious ones are rejected. */
|
|
8
|
+
export declare function flipCriterionStatus(checklist: AcceptanceChecklist, criterionId: string, status: AcceptanceStatus, evidence?: AcceptanceEvidence[], reason?: string, allowRegression?: boolean): AcceptanceChecklist;
|
|
9
|
+
/** Done iff every criterion is passed or superseded (none pending/failed). */
|
|
10
|
+
export declare function isChecklistDone(checklist: AcceptanceChecklist): boolean;
|
|
11
|
+
/** True iff every not-yet-passed/superseded criterion is covered by an unreachable entry. */
|
|
12
|
+
export declare function unreachableCoversRemaining(checklist: AcceptanceChecklist, unreachable: {
|
|
13
|
+
criterionId: string;
|
|
14
|
+
reason: string;
|
|
15
|
+
}[]): boolean;
|
|
16
|
+
/** Derive a new immutable checklist version on goal-edit. Dropped criteria -> superseded. */
|
|
17
|
+
export declare function newChecklistVersion(prev: AcceptanceChecklist, nextCriteria: {
|
|
18
|
+
id: string;
|
|
19
|
+
criterion: string;
|
|
20
|
+
}[]): AcceptanceChecklist;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type AcceptanceChecklist, type AcceptanceCriterion, type AcceptanceDelta, type GoalQueuedMessage, type PersistedGoalRunState, type PhaseSpec } from "./goal-run-types.js";
|
|
2
|
+
export interface LeaderPort {
|
|
3
|
+
deriveChecklist(goal: string): Promise<AcceptanceCriterion[]>;
|
|
4
|
+
planPhase(goal: string, summary: string, drained: GoalQueuedMessage[], checklist: AcceptanceChecklist, agentPool: string[]): Promise<PhaseSpec>;
|
|
5
|
+
critiquePlan(spec: PhaseSpec, goal: string, checklist: AcceptanceChecklist, agentPool: string[]): Promise<PhaseSpec>;
|
|
6
|
+
assess(productId: string, checklist: AcceptanceChecklist): Promise<AcceptanceDelta[]>;
|
|
7
|
+
compact(prevSummary: string, deltas: AcceptanceDelta[]): Promise<string>;
|
|
8
|
+
}
|
|
9
|
+
export interface PhaseRunnerPort {
|
|
10
|
+
startBoundedProductPhase(spec: PhaseSpec, agentPool: string[], cwd: string, opts: {
|
|
11
|
+
signal: AbortSignal;
|
|
12
|
+
onProductId: (productId: string) => void;
|
|
13
|
+
}): Promise<{
|
|
14
|
+
productId: string;
|
|
15
|
+
result: string;
|
|
16
|
+
}>;
|
|
17
|
+
resumePhase(productId: string, opts: {
|
|
18
|
+
signal: AbortSignal;
|
|
19
|
+
cwd: string;
|
|
20
|
+
phaseStartMs: number;
|
|
21
|
+
}): Promise<{
|
|
22
|
+
result: string;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
25
|
+
export type GoalNotifier = (method: string, payload: Record<string, unknown>) => void;
|
|
26
|
+
export declare class GoalLoopCoordinator {
|
|
27
|
+
private readonly deps;
|
|
28
|
+
private seq;
|
|
29
|
+
private opChain;
|
|
30
|
+
private activeAbort;
|
|
31
|
+
constructor(deps: {
|
|
32
|
+
leader: LeaderPort;
|
|
33
|
+
runner: PhaseRunnerPort;
|
|
34
|
+
cwd: string;
|
|
35
|
+
notify?: GoalNotifier;
|
|
36
|
+
});
|
|
37
|
+
private serialize;
|
|
38
|
+
private append;
|
|
39
|
+
private persist;
|
|
40
|
+
/** Launch a goal-run (instant, Codex-style). Returns the goalRunId. */
|
|
41
|
+
start(goal: string, agentPool: string[]): Promise<string>;
|
|
42
|
+
private startImpl;
|
|
43
|
+
/** Load the run; seed `seq` so a fresh instance (post-crash) keeps appending monotonically. */
|
|
44
|
+
private load;
|
|
45
|
+
enqueueMessage(goalRunId: string, text: string): Promise<void>;
|
|
46
|
+
private enqueueMessageImpl;
|
|
47
|
+
/** Run exactly one phase. Returns the updated state. */
|
|
48
|
+
runOnePhase(goalRunId: string): Promise<PersistedGoalRunState>;
|
|
49
|
+
private runOnePhaseImpl;
|
|
50
|
+
/** B: the single phase tail — assess the in-flight/just-finished Product, flip the checklist, compact
|
|
51
|
+
* the summary, append phase_assessed/progress_compacted/phase_boundary, advance phaseIndex, clear the
|
|
52
|
+
* in-flight breadcrumb, then run the terminal checks. Called by BOTH the normal path and crash-recovery
|
|
53
|
+
* so neither duplicates this logic. Assess throwing propagates to the caller's failure handling. */
|
|
54
|
+
private finishPhase;
|
|
55
|
+
/** B (crash-resume): re-attach to a Product that started before a crash. Rebuild it from its persisted
|
|
56
|
+
* product-state.json and re-drive it to terminal (runner.resumePhase), then run the SAME phase tail
|
|
57
|
+
* (finishPhase). Honest-fail ONLY if resume itself throws — a started phase is recovered, never lost,
|
|
58
|
+
* but progress is never fabricated. Bounded by an abort handle so pause() can still drain it. */
|
|
59
|
+
private recoverCrashedPhase;
|
|
60
|
+
/** I3: true when the loaded state shows a phase that started (currentProductId set) but never reached
|
|
61
|
+
* its assessment/boundary — i.e. a process died mid-phase. Inspects the durable event log because
|
|
62
|
+
* the snapshot alone can't distinguish "just started" from "started and crashed". */
|
|
63
|
+
private crashedMidPhase;
|
|
64
|
+
/** The ms timestamp of the phase_started event for `productId` (when the crashed phase originally began).
|
|
65
|
+
* Used as the crash-resume deliverable-capture window so files created before the crash are kept.
|
|
66
|
+
* Returns 0 (no lower bound) if not found — capture-all is acceptable for this rare path. */
|
|
67
|
+
private phaseStartedMs;
|
|
68
|
+
/** Drive phases until the run ends or is paused. Not serialized: it only calls the serialized
|
|
69
|
+
* runOnePhase in a loop, so a concurrent pause/stop is observed at the next boundary. */
|
|
70
|
+
runToCompletion(goalRunId: string): Promise<PersistedGoalRunState>;
|
|
71
|
+
/** Pause: abort the in-flight phase IMMEDIATELY (before serialize) so it drains fast and the mutex
|
|
72
|
+
* frees quickly, then persist the paused state. If the in-flight phase is the one being aborted, it
|
|
73
|
+
* drains via its abort handler and persists `paused` itself (runOnePhaseImpl's catch); pauseImpl then
|
|
74
|
+
* no-ops on the already-paused state. */
|
|
75
|
+
pause(goalRunId: string): Promise<PersistedGoalRunState>;
|
|
76
|
+
private pauseImpl;
|
|
77
|
+
/** Edit the goal (valid only while paused) — derives a new immutable checklist version. */
|
|
78
|
+
updateGoal(goalRunId: string, newGoal: string): Promise<PersistedGoalRunState>;
|
|
79
|
+
private updateGoalImpl;
|
|
80
|
+
/** Resume a paused run; an optional newGoal applies a goal-edit first (reusing updateGoalImpl). */
|
|
81
|
+
resume(goalRunId: string, newGoal?: string): Promise<PersistedGoalRunState>;
|
|
82
|
+
private resumeImpl;
|
|
83
|
+
/** User stop — ends the run as stopped. The caller stops driving the detached loop. */
|
|
84
|
+
stop(goalRunId: string): Promise<PersistedGoalRunState>;
|
|
85
|
+
private stopImpl;
|
|
86
|
+
private end;
|
|
87
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { AgentProcessManager } from "../runtime/infra/agent-process.js";
|
|
2
|
+
import type { AcpDetector } from "../runtime/infra/acp-detector.js";
|
|
3
|
+
import type { ProductOrchestrator } from "./agent-instance.js";
|
|
4
|
+
import type { LeaderPort, PhaseRunnerPort } from "./goal-loop-coordinator.js";
|
|
5
|
+
import { type AcceptanceCriterion, type AcceptanceDelta, type PhaseSpec } from "./goal-run-types.js";
|
|
6
|
+
/**
|
|
7
|
+
* Deterministic runtime verification — the cc/codex-style "the runner OBSERVES the result" applied to
|
|
8
|
+
* the judge, run EVERY phase as a continuous regression gate (not a one-time entry ticket). For each
|
|
9
|
+
* criterion that carries a `verify` shell command (run in the project workspace):
|
|
10
|
+
* - FORWARD (pending/failed): exit 0 → a TRUSTED passed delta (bypasses the LLM evidence-gate because
|
|
11
|
+
* real exit-0 is harder evidence than any LLM citation — closes the gap where a worker runs a test
|
|
12
|
+
* successfully but its distilled summary can't convince a conservative leader).
|
|
13
|
+
* - REGRESSION (already passed): re-run it. exit ≠ 0 → a TRUSTED passed→failed regression delta. This
|
|
14
|
+
* is what stops a later phase from silently breaking an earlier verified deliverable and the run
|
|
15
|
+
* still declaring `done` ("checklist all green, disk actually broken"). A passing re-check is a no-op.
|
|
16
|
+
* Files accumulate across phases in the same workspace, so without this re-check a regression goes
|
|
17
|
+
* unnoticed; with it, the strongest deterministic check we have doubles as the regression baseline.
|
|
18
|
+
*/
|
|
19
|
+
export declare function runVerifyDeltas(criteria: AcceptanceCriterion[], cwd: string, log?: {
|
|
20
|
+
info?(m: string): void;
|
|
21
|
+
warn?(m: string): void;
|
|
22
|
+
}): Promise<AcceptanceDelta[]>;
|
|
23
|
+
/**
|
|
24
|
+
* #1 residual regression cover for criteria WITHOUT a `verify` command. Such a criterion passed by citing
|
|
25
|
+
* an evidence file; if that cited file later VANISHES from the project workspace, the deliverable is
|
|
26
|
+
* unambiguously gone → emit a TRUSTED passed→failed regression delta. We only flag DELETION (not
|
|
27
|
+
* modification): a "content contains X" file can be legitimately extended by a later phase, so a content
|
|
28
|
+
* change is ambiguous, but a missing file is not. Verify-backed criteria are handled by runVerifyDeltas;
|
|
29
|
+
* "output"-only citations have no on-disk artifact to check and are skipped.
|
|
30
|
+
*/
|
|
31
|
+
export declare function runFileEvidenceRegressionDeltas(criteria: AcceptanceCriterion[], cwd: string, log?: {
|
|
32
|
+
warn?(m: string): void;
|
|
33
|
+
}): AcceptanceDelta[];
|
|
34
|
+
export declare function recordGoalPhaseChangedFiles(productId: string, cwd: string, phaseStartMs: number): Promise<void>;
|
|
35
|
+
export declare function takeGoalPhaseChangedFiles(productId: string): string[];
|
|
36
|
+
/**
|
|
37
|
+
* Find the first balanced `{...}` or `[...]` in `text` and JSON.parse it. The leader (an LLM) may
|
|
38
|
+
* wrap the JSON in prose or a ```json fence; this scans for the first balanced bracket with
|
|
39
|
+
* string-awareness (braces/brackets inside string values are ignored) so an embedded fence or quote
|
|
40
|
+
* can't truncate the block. Throws if no balanced JSON is found or it won't parse.
|
|
41
|
+
*/
|
|
42
|
+
export declare function extractJson<T>(text: string): T;
|
|
43
|
+
export interface LeaderAdapterDeps {
|
|
44
|
+
/** Same transport ProductPlanner.sendToLeader uses (product-planner.ts:579). */
|
|
45
|
+
processManager: AgentProcessManager;
|
|
46
|
+
/** Resolves the leader's external ACP descriptor (product-planner.ts:583). */
|
|
47
|
+
acpDetector: AcpDetector;
|
|
48
|
+
/** Catalog id of the leader agent (e.g. "qlogicagent"). */
|
|
49
|
+
leaderAgentId: string;
|
|
50
|
+
/** Project workspaceDir — the leader process cwd. */
|
|
51
|
+
cwd: string;
|
|
52
|
+
/** Live Product engine — assess() reads task outputs/changedFiles via getStatus. */
|
|
53
|
+
orchestrator: ProductOrchestrator;
|
|
54
|
+
/** Stable id used as the leader process memberId (one persistent leader per goal-run). */
|
|
55
|
+
goalRunId: string;
|
|
56
|
+
log?: {
|
|
57
|
+
info(msg: string): void;
|
|
58
|
+
warn(msg: string): void;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export declare function createLeaderAdapter(deps: LeaderAdapterDeps): LeaderPort;
|
|
62
|
+
export interface PhaseRunnerAdapterDeps {
|
|
63
|
+
/** The live Product engine (same one ProductRunCoordinator.confirmAndStart drives — I3). */
|
|
64
|
+
orchestrator: ProductOrchestrator;
|
|
65
|
+
/** Optional per-phase budget passed through to ProductOrchestrator.create. */
|
|
66
|
+
budget?: {
|
|
67
|
+
maxTotalTokens?: number;
|
|
68
|
+
maxDuration?: number;
|
|
69
|
+
};
|
|
70
|
+
/** Poll interval (ms) while awaiting phase completion. Default 2000. */
|
|
71
|
+
pollIntervalMs?: number;
|
|
72
|
+
log?: {
|
|
73
|
+
info(msg: string): void;
|
|
74
|
+
warn(msg: string): void;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export declare function createPhaseRunnerAdapter(deps: PhaseRunnerAdapterDeps): PhaseRunnerPort;
|
|
78
|
+
export declare function parsePhaseSpec(reply: string, availableAgentIds: string[]): PhaseSpec;
|
|
79
|
+
/**
|
|
80
|
+
* B (evidence-gating): goal-mode's assess() is the SOLE acceptance authority (Product's per-task judge
|
|
81
|
+
* is a no-op for a session-less goal-mode run), so a criterion may only flip to `passed` when it is
|
|
82
|
+
* backed by CITED PRIMARY EVIDENCE — not a bare "PASS". This is the pure decision the LLM cannot be
|
|
83
|
+
* trusted to self-enforce; it's unit-tested independently of the live judge call.
|
|
84
|
+
*
|
|
85
|
+
* Rules:
|
|
86
|
+
* - `passed` delta: keep only evidence items with a non-empty `source` AND non-empty `quote`, AND
|
|
87
|
+
* whose `source` is PRIMARY — i.e. it matches one of the run's actual `changedFiles` (exact or
|
|
88
|
+
* basename/suffix match, since the judge may cite a relative path) OR is the literal `"output"`.
|
|
89
|
+
* If, after filtering, a passed delta has zero evidence items, DROP it (do not flip) — and log.
|
|
90
|
+
* - `failed` / other deltas: kept as-is (their reason is informational; failed needs no evidence).
|
|
91
|
+
*/
|
|
92
|
+
export declare function validateAssessDeltas(rawDeltas: AcceptanceDelta[], changedFiles: string[], log?: {
|
|
93
|
+
warn(msg: string): void;
|
|
94
|
+
}): AcceptanceDelta[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PathService } from "../runtime/ports/index.js";
|
|
2
|
+
import type { GoalRunEvent, PersistedGoalRunState } from "./goal-run-types.js";
|
|
3
|
+
export interface GoalPersistenceOptions {
|
|
4
|
+
pathService?: PathService;
|
|
5
|
+
}
|
|
6
|
+
export declare function getGoalDir(goalRunId: string, cwd?: string, o?: GoalPersistenceOptions): string;
|
|
7
|
+
export declare function getEventsPath(goalRunId: string, cwd?: string, o?: GoalPersistenceOptions): string;
|
|
8
|
+
export declare function getSnapshotPath(goalRunId: string, cwd?: string, o?: GoalPersistenceOptions): string;
|
|
9
|
+
/** Append one event as a fsync'd JSON line (the durable source of truth). */
|
|
10
|
+
export declare function appendGoalRunEvent(goalRunId: string, event: GoalRunEvent, cwd?: string, o?: GoalPersistenceOptions): Promise<void>;
|
|
11
|
+
export declare function readGoalRunEvents(goalRunId: string, cwd?: string, o?: GoalPersistenceOptions): Promise<GoalRunEvent[]>;
|
|
12
|
+
export declare function saveGoalRunSnapshot(state: PersistedGoalRunState, cwd?: string, o?: GoalPersistenceOptions): Promise<void>;
|
|
13
|
+
export declare function loadGoalRunSnapshot(goalRunId: string, cwd?: string, o?: GoalPersistenceOptions): Promise<PersistedGoalRunState | undefined>;
|
|
14
|
+
/** Replay the event log into a snapshot (crash recovery). undefined if no goal_started. */
|
|
15
|
+
export declare function rebuildSnapshotFromEvents(goalRunId: string, cwd?: string, o?: GoalPersistenceOptions): Promise<PersistedGoalRunState | undefined>;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/** Loop tunables (single source of truth — I9). */
|
|
2
|
+
export declare const GOAL_NO_PROGRESS_LIMIT = 3;
|
|
3
|
+
export declare const GOAL_DRAIN_TIMEOUT_MS: number;
|
|
4
|
+
export declare const GOAL_UNREACHABLE_MIN_STREAK = 2;
|
|
5
|
+
export type GoalRunStatus = "running" | "ended";
|
|
6
|
+
export type GoalPauseState = "running" | "draining" | "paused";
|
|
7
|
+
export type GoalEndReason = "done" | "stopped" | "failed";
|
|
8
|
+
export type AcceptanceStatus = "pending" | "passed" | "failed" | "superseded";
|
|
9
|
+
/** FINAL evidence type (I9 — not staged). source = file path / check name; quote = cited excerpt. */
|
|
10
|
+
export interface AcceptanceEvidence {
|
|
11
|
+
source: string;
|
|
12
|
+
quote: string;
|
|
13
|
+
}
|
|
14
|
+
export interface AcceptanceCriterion {
|
|
15
|
+
id: string;
|
|
16
|
+
criterion: string;
|
|
17
|
+
status: AcceptanceStatus;
|
|
18
|
+
evidence?: AcceptanceEvidence[];
|
|
19
|
+
reason?: string;
|
|
20
|
+
verify?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface AcceptanceChecklist {
|
|
23
|
+
version: number;
|
|
24
|
+
criteria: AcceptanceCriterion[];
|
|
25
|
+
}
|
|
26
|
+
/** A bounded phase plan (a subset of the Product plan). */
|
|
27
|
+
export interface PhaseSpec {
|
|
28
|
+
phaseLabel: string;
|
|
29
|
+
tasks: {
|
|
30
|
+
taskId: string;
|
|
31
|
+
assignee: string;
|
|
32
|
+
prompt: string;
|
|
33
|
+
dependsOn?: string[];
|
|
34
|
+
acceptanceCriteria?: string;
|
|
35
|
+
}[];
|
|
36
|
+
instances: {
|
|
37
|
+
name: string;
|
|
38
|
+
role: string;
|
|
39
|
+
agentId: string;
|
|
40
|
+
}[];
|
|
41
|
+
reasoning?: string;
|
|
42
|
+
unreachable?: {
|
|
43
|
+
criterionId: string;
|
|
44
|
+
reason: string;
|
|
45
|
+
}[];
|
|
46
|
+
}
|
|
47
|
+
/** Output of assess() — one per criterion the phase touched. */
|
|
48
|
+
export interface AcceptanceDelta {
|
|
49
|
+
criterionId: string;
|
|
50
|
+
oldStatus: AcceptanceStatus;
|
|
51
|
+
newStatus: AcceptanceStatus;
|
|
52
|
+
evidence?: AcceptanceEvidence[];
|
|
53
|
+
reasonIfFailed?: string;
|
|
54
|
+
regression?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export interface GoalQueuedMessage {
|
|
57
|
+
id: string;
|
|
58
|
+
ts: string;
|
|
59
|
+
text: string;
|
|
60
|
+
}
|
|
61
|
+
/** Append-only event (events.jsonl). seq is monotonic from 1. */
|
|
62
|
+
export interface GoalRunEvent {
|
|
63
|
+
seq: number;
|
|
64
|
+
ts: string;
|
|
65
|
+
type: "goal_started" | "phase_planned" | "phase_started" | "task_settled" | "phase_assessed" | "progress_compacted" | "goal_edited" | "message_queued" | "paused" | "resumed" | "stopped" | "phase_boundary" | "ended";
|
|
66
|
+
payload: Record<string, unknown>;
|
|
67
|
+
}
|
|
68
|
+
/** Derived snapshot (goal-run.json), rebuildable by replaying events. */
|
|
69
|
+
export interface PersistedGoalRunState {
|
|
70
|
+
goalRunId: string;
|
|
71
|
+
originalGoal: string;
|
|
72
|
+
currentGoal: string;
|
|
73
|
+
goalUpdatedAt?: string;
|
|
74
|
+
checklistVersion: number;
|
|
75
|
+
status: GoalRunStatus;
|
|
76
|
+
pauseState: GoalPauseState;
|
|
77
|
+
phaseIndex: number;
|
|
78
|
+
noProgressCount: number;
|
|
79
|
+
unreachableStreak?: Record<string, number>;
|
|
80
|
+
progressSummary: string;
|
|
81
|
+
acceptanceChecklist: AcceptanceChecklist;
|
|
82
|
+
queuedMessages: GoalQueuedMessage[];
|
|
83
|
+
agentPool: string[];
|
|
84
|
+
wallClockStartedAt: string;
|
|
85
|
+
pausedAt?: string;
|
|
86
|
+
stopReason?: string;
|
|
87
|
+
endReason?: GoalEndReason;
|
|
88
|
+
failedReason?: string;
|
|
89
|
+
currentProductId?: string;
|
|
90
|
+
projectWorkspaceDir: string;
|
|
91
|
+
lastEventSeq: number;
|
|
92
|
+
}
|
|
93
|
+
/** Pull-status shape returned by x/goal.status (GoalStatus, §5.1). */
|
|
94
|
+
export interface GoalStatus {
|
|
95
|
+
goalRunId: string;
|
|
96
|
+
status: GoalRunStatus;
|
|
97
|
+
pauseState: GoalPauseState;
|
|
98
|
+
goalLabel: string;
|
|
99
|
+
currentGoal: string;
|
|
100
|
+
phaseIndex: number;
|
|
101
|
+
wallClockStartedAt: string;
|
|
102
|
+
progressSummary: string;
|
|
103
|
+
acceptance: {
|
|
104
|
+
passed: number;
|
|
105
|
+
total: number;
|
|
106
|
+
criteria: AcceptanceCriterion[];
|
|
107
|
+
};
|
|
108
|
+
queuedMessageCount: number;
|
|
109
|
+
noProgressCount: number;
|
|
110
|
+
endReason?: GoalEndReason;
|
|
111
|
+
failedReason?: string;
|
|
112
|
+
}
|