openplanr 1.21.2 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +11 -1
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/operate.d.ts.map +1 -1
- package/dist/cli/commands/operate.js +91 -2
- package/dist/cli/commands/operate.js.map +1 -1
- package/dist/services/operate/advisors.d.ts +63 -0
- package/dist/services/operate/advisors.d.ts.map +1 -1
- package/dist/services/operate/advisors.js +68 -4
- package/dist/services/operate/advisors.js.map +1 -1
- package/dist/services/operate/artifacts.d.ts +9 -3
- package/dist/services/operate/artifacts.d.ts.map +1 -1
- package/dist/services/operate/artifacts.js +126 -5
- package/dist/services/operate/artifacts.js.map +1 -1
- package/dist/services/operate/citation-resolution.d.ts +14 -0
- package/dist/services/operate/citation-resolution.d.ts.map +1 -1
- package/dist/services/operate/citation-resolution.js +9 -0
- package/dist/services/operate/citation-resolution.js.map +1 -1
- package/dist/services/operate/completion.d.ts +80 -0
- package/dist/services/operate/completion.d.ts.map +1 -0
- package/dist/services/operate/completion.js +279 -0
- package/dist/services/operate/completion.js.map +1 -0
- package/dist/services/operate/config.d.ts +7 -0
- package/dist/services/operate/config.d.ts.map +1 -1
- package/dist/services/operate/config.js +7 -0
- package/dist/services/operate/config.js.map +1 -1
- package/dist/services/operate/context-research.d.ts +43 -0
- package/dist/services/operate/context-research.d.ts.map +1 -1
- package/dist/services/operate/context-research.js +219 -1
- package/dist/services/operate/context-research.js.map +1 -1
- package/dist/services/operate/decision-brief.d.ts +90 -1
- package/dist/services/operate/decision-brief.d.ts.map +1 -1
- package/dist/services/operate/decision-brief.js +175 -1
- package/dist/services/operate/decision-brief.js.map +1 -1
- package/dist/services/operate/doctor.d.ts +58 -0
- package/dist/services/operate/doctor.d.ts.map +1 -1
- package/dist/services/operate/doctor.js +395 -21
- package/dist/services/operate/doctor.js.map +1 -1
- package/dist/services/operate/engine.d.ts +75 -2
- package/dist/services/operate/engine.d.ts.map +1 -1
- package/dist/services/operate/engine.js +504 -33
- package/dist/services/operate/engine.js.map +1 -1
- package/dist/services/operate/event-store.d.ts +22 -0
- package/dist/services/operate/event-store.d.ts.map +1 -1
- package/dist/services/operate/event-store.js +35 -0
- package/dist/services/operate/event-store.js.map +1 -1
- package/dist/services/operate/evidence-cache.d.ts.map +1 -1
- package/dist/services/operate/evidence-cache.js +41 -5
- package/dist/services/operate/evidence-cache.js.map +1 -1
- package/dist/services/operate/index.d.ts.map +1 -1
- package/dist/services/operate/index.js +98 -1
- package/dist/services/operate/index.js.map +1 -1
- package/dist/services/operate/interaction/question-engine.d.ts.map +1 -1
- package/dist/services/operate/interaction/question-engine.js +36 -8
- package/dist/services/operate/interaction/question-engine.js.map +1 -1
- package/dist/services/operate/interaction/question-registry.d.ts +8 -0
- package/dist/services/operate/interaction/question-registry.d.ts.map +1 -1
- package/dist/services/operate/interaction/question-registry.js +21 -2
- package/dist/services/operate/interaction/question-registry.js.map +1 -1
- package/dist/services/operate/lifecycle-driver.d.ts +309 -0
- package/dist/services/operate/lifecycle-driver.d.ts.map +1 -0
- package/dist/services/operate/lifecycle-driver.js +434 -0
- package/dist/services/operate/lifecycle-driver.js.map +1 -0
- package/dist/services/operate/maintenance.d.ts +65 -1
- package/dist/services/operate/maintenance.d.ts.map +1 -1
- package/dist/services/operate/maintenance.js +718 -24
- package/dist/services/operate/maintenance.js.map +1 -1
- package/dist/services/operate/mission-dispatch.d.ts +61 -1
- package/dist/services/operate/mission-dispatch.d.ts.map +1 -1
- package/dist/services/operate/mission-dispatch.js +78 -5
- package/dist/services/operate/mission-dispatch.js.map +1 -1
- package/dist/services/operate/profile-migration.d.ts +69 -0
- package/dist/services/operate/profile-migration.d.ts.map +1 -0
- package/dist/services/operate/profile-migration.js +462 -0
- package/dist/services/operate/profile-migration.js.map +1 -0
- package/dist/services/operate/projection-persistence.d.ts.map +1 -1
- package/dist/services/operate/projection-persistence.js +24 -5
- package/dist/services/operate/projection-persistence.js.map +1 -1
- package/dist/services/operate/projection.d.ts.map +1 -1
- package/dist/services/operate/projection.js +9 -0
- package/dist/services/operate/projection.js.map +1 -1
- package/dist/services/operate/protocol.d.ts +1 -0
- package/dist/services/operate/protocol.d.ts.map +1 -1
- package/dist/services/operate/protocol.js.map +1 -1
- package/dist/services/operate/scratch.d.ts +81 -0
- package/dist/services/operate/scratch.d.ts.map +1 -0
- package/dist/services/operate/scratch.js +190 -0
- package/dist/services/operate/scratch.js.map +1 -0
- package/dist/services/operate/types.d.ts +3 -2
- package/dist/services/operate/types.d.ts.map +1 -1
- package/dist/services/operate/types.js.map +1 -1
- package/dist/services/operate/workspace.d.ts +1 -0
- package/dist/services/operate/workspace.d.ts.map +1 -1
- package/dist/services/operate/workspace.js +2 -0
- package/dist/services/operate/workspace.js.map +1 -1
- package/dist/services/runtime-manager-service.d.ts +23 -0
- package/dist/services/runtime-manager-service.d.ts.map +1 -1
- package/dist/services/runtime-manager-service.js +30 -0
- package/dist/services/runtime-manager-service.js.map +1 -1
- package/package.json +2 -2
|
@@ -62,6 +62,23 @@ const PRODUCT_STAGE_CHOICES = [
|
|
|
62
62
|
function effectiveDetectedRuntime(context) {
|
|
63
63
|
return (KNOWN_CODING_RUNTIMES.find((runtime) => runtime === context.runtime) ?? context.detectedRuntime);
|
|
64
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* FR10 / T-009: the profile suggestion reason. When the detected profile file
|
|
67
|
+
* carries fields the current CLI would reject, the reason names them and points
|
|
68
|
+
* to the migration command so the operator can reconcile the profile instead of
|
|
69
|
+
* being handed a suggestion the tool will refuse to reuse as-is.
|
|
70
|
+
*/
|
|
71
|
+
function existingProfileSuggestionReason(unsupportedFields) {
|
|
72
|
+
const base = 'Suggested from the existing .planr/operate-profile.json; confirm or choose another.';
|
|
73
|
+
if (!unsupportedFields || unsupportedFields.length === 0)
|
|
74
|
+
return base;
|
|
75
|
+
const names = [...unsupportedFields]
|
|
76
|
+
.sort()
|
|
77
|
+
.map((field) => `\`${field}\``)
|
|
78
|
+
.join(', ');
|
|
79
|
+
const noun = unsupportedFields.length === 1 ? 'field is' : 'fields are';
|
|
80
|
+
return `${base} Note: this profile's ${names} ${noun} not recognized by the current operating configuration and will not be reused as-is — run \`planr operate profiles migrate inspect\` to review.`;
|
|
81
|
+
}
|
|
65
82
|
const question = (questionId, type, label, explanation, options = {}) => ({
|
|
66
83
|
kind: 'guided-question',
|
|
67
84
|
schemaVersion: '1.0.0',
|
|
@@ -117,12 +134,14 @@ export function operatingInitQuestionRegistry(context) {
|
|
|
117
134
|
required: true,
|
|
118
135
|
// Detect-don't-ask: when a `.planr/operate-profile.json` already names a
|
|
119
136
|
// profile, surface it as the confirmable suggestion so the operator does
|
|
120
|
-
// not have to re-pick it; otherwise fall back to the SaaS default.
|
|
137
|
+
// not have to re-pick it; otherwise fall back to the SaaS default. When
|
|
138
|
+
// that file carries values the CLI would reject, the suggestion names
|
|
139
|
+
// the unsupported fields (FR10 / T-009) instead of hiding them.
|
|
121
140
|
...(context.existingProfileId
|
|
122
141
|
? {
|
|
123
142
|
valueSemantics: 'suggestion',
|
|
124
143
|
suggestedValue: context.existingProfileId,
|
|
125
|
-
suggestionReason:
|
|
144
|
+
suggestionReason: existingProfileSuggestionReason(context.existingProfileUnsupportedFields),
|
|
126
145
|
}
|
|
127
146
|
: {
|
|
128
147
|
valueSemantics: 'default',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-registry.js","sourceRoot":"","sources":["../../../../src/services/operate/interaction/question-registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"question-registry.js","sourceRoot":"","sources":["../../../../src/services/operate/interaction/question-registry.ts"],"names":[],"mappings":"AAsCA;;;;;;GAMG;AACH,MAAM,2BAA2B,GAE7B;IACF,iBAAiB,EAAE;QACjB,SAAS,EAAE,2BAA2B;QACtC,eAAe,EAAE,sBAAsB;K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ACrB,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO;SAC5B;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { type MissionDispatchBudgetSignal } from './mission-dispatch.js';
|
|
2
|
+
import { type OperatingRoleId } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Deterministic advisor lifecycle driver (FR3, SPEC-005 T-003).
|
|
5
|
+
*
|
|
6
|
+
* SPEC-005 lost a full credentialed run because lifecycle correctness — result
|
|
7
|
+
* transport, per-role completion handling, incremental recording, lease timing
|
|
8
|
+
* and renewal, retry/timeout behaviour, and Chair readiness — lived in prose
|
|
9
|
+
* delegated to the orchestrating language model. This module moves that
|
|
10
|
+
* bookkeeping into an explicit, externally observable per-role state machine.
|
|
11
|
+
*
|
|
12
|
+
* It owns ONLY bookkeeping around the durable primitives T-002 already built. Its
|
|
13
|
+
* only side-effecting calls are into T-002's `operateAdapterLifecycle`
|
|
14
|
+
* `record`/`heartbeat` actions, injected here as `recordRole`/`heartbeat`. It
|
|
15
|
+
* never re-implements lease or session persistence, and it never dispatches an
|
|
16
|
+
* agent: runtime skills still perform the actual native-agent dispatch (passed in
|
|
17
|
+
* as the `dispatch` callback), and the driver orchestrates the state around it —
|
|
18
|
+
* bounded concurrency, per-role retry budgets, timeouts, automatic heartbeats,
|
|
19
|
+
* cancellation, resume, and the `chairReady()` predicate.
|
|
20
|
+
*
|
|
21
|
+
* Lifecycle: `pending → running → returned → validating → recorded`, with terminal
|
|
22
|
+
* alternatives `not_evaluated`, `failed`, `cancelled`. A stalled role retries
|
|
23
|
+
* independently on its own budget; after its budget is exhausted the cycle
|
|
24
|
+
* continues with an explicit `not_evaluated` role and a governed gap — never
|
|
25
|
+
* blocking or cancelling siblings — unless that role is structurally required, in
|
|
26
|
+
* which case it terminates `failed`.
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* The eight per-role lifecycle states. `advance` only ever moves a role between
|
|
30
|
+
* these via a validated transition, so a role's state is ALWAYS exactly one of
|
|
31
|
+
* them — there is no representable "unknown" or half-transitioned state.
|
|
32
|
+
*/
|
|
33
|
+
export type AdvisorLifecycleState = 'pending' | 'running' | 'returned' | 'validating' | 'recorded' | 'not_evaluated' | 'failed' | 'cancelled';
|
|
34
|
+
/** The four terminal states; a role in any of them never transitions again. */
|
|
35
|
+
export declare const ADVISOR_LIFECYCLE_TERMINAL_STATES: readonly ["recorded", "not_evaluated", "failed", "cancelled"];
|
|
36
|
+
export type AdvisorLifecycleTerminalState = (typeof ADVISOR_LIFECYCLE_TERMINAL_STATES)[number];
|
|
37
|
+
export declare function isAdvisorLifecycleTerminal(state: AdvisorLifecycleState): state is AdvisorLifecycleTerminalState;
|
|
38
|
+
/**
|
|
39
|
+
* A lifecycle transition event. The three terminal events (`fail`, `cancel`,
|
|
40
|
+
* `not-evaluated`) carry a required `reason`, which becomes the role's
|
|
41
|
+
* `statusReason` — the governed record that justifies the outcome. A role is
|
|
42
|
+
* never rendered `not_evaluated`/`failed` without one (FR5).
|
|
43
|
+
*/
|
|
44
|
+
export type AdvisorLifecycleEvent = {
|
|
45
|
+
kind: 'dispatch';
|
|
46
|
+
} | {
|
|
47
|
+
kind: 'return';
|
|
48
|
+
} | {
|
|
49
|
+
kind: 'validate';
|
|
50
|
+
} | {
|
|
51
|
+
kind: 'record';
|
|
52
|
+
} | {
|
|
53
|
+
kind: 'retry';
|
|
54
|
+
reason: string;
|
|
55
|
+
} | {
|
|
56
|
+
kind: 'fail';
|
|
57
|
+
reason: string;
|
|
58
|
+
} | {
|
|
59
|
+
kind: 'cancel';
|
|
60
|
+
reason: string;
|
|
61
|
+
} | {
|
|
62
|
+
kind: 'not-evaluated';
|
|
63
|
+
reason: string;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* A governed gap emitted when a structurally-optional role terminates without a
|
|
67
|
+
* recorded analysis. It is NOT the full persisted `operating-data-gap` protocol
|
|
68
|
+
* artifact (that is minted by the record/finalize path); it is the driver's
|
|
69
|
+
* explicit, machine-readable statement that this perspective is missing and WHY,
|
|
70
|
+
* so the Chair surfaces it as a gap rather than inventing the role's conclusions
|
|
71
|
+
* (FR13) and `status`/`report` never render the role quietly (FR5).
|
|
72
|
+
*/
|
|
73
|
+
export interface AdvisorGovernedGap {
|
|
74
|
+
roleId: OperatingRoleId;
|
|
75
|
+
outcome: 'not_evaluated' | 'failed';
|
|
76
|
+
reason: string;
|
|
77
|
+
}
|
|
78
|
+
/** A single prepared advisor role and its per-role policy. */
|
|
79
|
+
export interface AdvisorRolePlan {
|
|
80
|
+
roleId: OperatingRoleId;
|
|
81
|
+
/**
|
|
82
|
+
* A structurally-required role's missing analysis is a hard gap the Chair
|
|
83
|
+
* cannot synthesize around: on retry-budget exhaustion it terminates `failed`
|
|
84
|
+
* (blocking chair readiness) rather than `not_evaluated`. A structurally
|
|
85
|
+
* OPTIONAL role terminates `not_evaluated` with a governed gap and the cycle
|
|
86
|
+
* continues. Defaults to optional.
|
|
87
|
+
*/
|
|
88
|
+
structurallyRequired?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Max INDEPENDENT re-dispatches after the first attempt. Exhausting it yields a
|
|
91
|
+
* terminal `not_evaluated`/`failed`. Defaults to the driver's `retryBudget`.
|
|
92
|
+
*/
|
|
93
|
+
retryBudget?: number;
|
|
94
|
+
/**
|
|
95
|
+
* Resume seeding (FR3): a role already recorded in a prior session starts
|
|
96
|
+
* terminal `recorded` and is never re-dispatched. `not_evaluated`/`failed`/
|
|
97
|
+
* `cancelled` seed the matching terminal.
|
|
98
|
+
*/
|
|
99
|
+
initialState?: AdvisorLifecycleState;
|
|
100
|
+
/** The governed statusReason to seed alongside a terminal `initialState`. */
|
|
101
|
+
initialReason?: string;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* The outcome of T-002's `record` action, projected to exactly what the driver
|
|
105
|
+
* needs. `recorded: true` with `notEvaluated` unset is a committed analysis;
|
|
106
|
+
* `notEvaluated: true` is T-002 committing a governed quiet/zero-grounding result
|
|
107
|
+
* (still durable, but a not-evaluated outcome). `leaseExpiresAtMs` carries the
|
|
108
|
+
* lease forward from the record's refresh so the heartbeat scheduler stays in
|
|
109
|
+
* step with the freshest window.
|
|
110
|
+
*/
|
|
111
|
+
export interface AdvisorRecordOutcome {
|
|
112
|
+
recorded: boolean;
|
|
113
|
+
notEvaluated?: boolean;
|
|
114
|
+
statusReason?: string;
|
|
115
|
+
leaseExpiresAtMs?: number;
|
|
116
|
+
}
|
|
117
|
+
/** The refreshed lease window returned by T-002's `heartbeat` action. */
|
|
118
|
+
export interface AdvisorLeaseSnapshot {
|
|
119
|
+
leaseExpiresAtMs: number;
|
|
120
|
+
}
|
|
121
|
+
/** Injected timer handle; opaque so a test harness can queue and fire deterministically. */
|
|
122
|
+
export type LifecycleTimerHandle = unknown;
|
|
123
|
+
export interface AdvisorLifecycleDriverOptions {
|
|
124
|
+
roles: readonly AdvisorRolePlan[];
|
|
125
|
+
/**
|
|
126
|
+
* Side-effecting: wraps `operateAdapterLifecycle({ action: 'record', ... })`.
|
|
127
|
+
* The ONLY per-role side effect the driver performs — it never validates,
|
|
128
|
+
* persists, or leases itself.
|
|
129
|
+
*/
|
|
130
|
+
recordRole: (input: {
|
|
131
|
+
roleId: OperatingRoleId;
|
|
132
|
+
output: unknown;
|
|
133
|
+
}) => Promise<AdvisorRecordOutcome>;
|
|
134
|
+
/**
|
|
135
|
+
* Side-effecting: wraps `operateAdapterLifecycle({ action: 'heartbeat', ... })`.
|
|
136
|
+
* Called by the heartbeat scheduler to renew the cycle lease independent of any
|
|
137
|
+
* role completing. Absent means heartbeats are disabled.
|
|
138
|
+
*/
|
|
139
|
+
heartbeat?: () => Promise<AdvisorLeaseSnapshot>;
|
|
140
|
+
/** Injected clock (ms epoch). Defaults to `Date.now`. */
|
|
141
|
+
now?: () => number;
|
|
142
|
+
/** Injected timer scheduler. Defaults to `setTimeout`/`clearTimeout`. */
|
|
143
|
+
setTimer?: (fn: () => void, ms: number) => LifecycleTimerHandle;
|
|
144
|
+
clearTimer?: (handle: LifecycleTimerHandle) => void;
|
|
145
|
+
/** Current lease expiry (ms epoch); updated by every record/heartbeat outcome. */
|
|
146
|
+
leaseExpiresAtMs?: number;
|
|
147
|
+
/** Renew the lease when its remaining time drops to/below this. Defaults to 120_000ms. */
|
|
148
|
+
heartbeatLeadMs?: number;
|
|
149
|
+
/** Default per-role retry budget when a role plan omits its own. Defaults to 1. */
|
|
150
|
+
retryBudget?: number;
|
|
151
|
+
/** Bounded fan-out concurrency across dispatched roles. Absent/`<= 0` = unbounded. */
|
|
152
|
+
concurrency?: number;
|
|
153
|
+
/**
|
|
154
|
+
* Per-attempt dispatch timeout (ms). A dispatch that has not returned within it
|
|
155
|
+
* is treated as a stall (retried on budget, else terminal). Absent = no timeout.
|
|
156
|
+
*/
|
|
157
|
+
roleTimeoutMs?: number;
|
|
158
|
+
}
|
|
159
|
+
/** An observability timeline entry recorded through the fan-out reporter. */
|
|
160
|
+
export interface AdvisorLifecycleTimelineEntry {
|
|
161
|
+
roleId: OperatingRoleId;
|
|
162
|
+
event: 'dispatch' | 'return' | 'error';
|
|
163
|
+
at: number;
|
|
164
|
+
}
|
|
165
|
+
/** A per-role snapshot for `status`/`report` surfaces (FR5). */
|
|
166
|
+
export interface AdvisorRoleSnapshot {
|
|
167
|
+
roleId: OperatingRoleId;
|
|
168
|
+
state: AdvisorLifecycleState;
|
|
169
|
+
attempts: number;
|
|
170
|
+
retriesUsed: number;
|
|
171
|
+
retryBudget: number;
|
|
172
|
+
structurallyRequired: boolean;
|
|
173
|
+
statusReason?: string;
|
|
174
|
+
}
|
|
175
|
+
/** The result of running the whole prepared board through the driver. */
|
|
176
|
+
export interface AdvisorLifecycleRunSummary {
|
|
177
|
+
roles: AdvisorRoleSnapshot[];
|
|
178
|
+
recorded: OperatingRoleId[];
|
|
179
|
+
notEvaluated: OperatingRoleId[];
|
|
180
|
+
failed: OperatingRoleId[];
|
|
181
|
+
cancelled: OperatingRoleId[];
|
|
182
|
+
gaps: AdvisorGovernedGap[];
|
|
183
|
+
chairReady: boolean;
|
|
184
|
+
heartbeats: number;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* A stall/timeout signal raised inside the driver's own dispatch wrapper. It is
|
|
188
|
+
* caught by the retry loop and never escapes to a sibling — a stalled role's
|
|
189
|
+
* failure is always converted to a governed terminal, so it cannot reject the
|
|
190
|
+
* fan-out or cancel another lens.
|
|
191
|
+
*/
|
|
192
|
+
export declare class AdvisorRoleStalledError extends Error {
|
|
193
|
+
constructor(message: string);
|
|
194
|
+
}
|
|
195
|
+
export declare class AdvisorLifecycleDriver {
|
|
196
|
+
private readonly roles;
|
|
197
|
+
private readonly order;
|
|
198
|
+
private readonly recordRole;
|
|
199
|
+
private readonly heartbeatFn?;
|
|
200
|
+
private readonly now;
|
|
201
|
+
private readonly setTimer;
|
|
202
|
+
private readonly clearTimer;
|
|
203
|
+
private readonly heartbeatLeadMs;
|
|
204
|
+
private readonly concurrency?;
|
|
205
|
+
private readonly roleTimeoutMs?;
|
|
206
|
+
private leaseExpiresAtMs;
|
|
207
|
+
private heartbeatCount;
|
|
208
|
+
private readonly timeline;
|
|
209
|
+
private readonly gaps;
|
|
210
|
+
constructor(options: AdvisorLifecycleDriverOptions);
|
|
211
|
+
/** The current state of a prepared role. */
|
|
212
|
+
state(roleId: OperatingRoleId): AdvisorLifecycleState;
|
|
213
|
+
/** The governed statusReason recorded on a terminal `not_evaluated`/`failed`, if any. */
|
|
214
|
+
statusReason(roleId: OperatingRoleId): string | undefined;
|
|
215
|
+
/**
|
|
216
|
+
* Apply one validated lifecycle transition and return the new state. An illegal
|
|
217
|
+
* (state, event) pair — anything absent from `LIFECYCLE_TRANSITIONS` — is
|
|
218
|
+
* refused with `E_OPERATE_STATE_INVALID`, so a role can never reach a state
|
|
219
|
+
* outside the declared eight, and a terminal role can never be re-opened.
|
|
220
|
+
*
|
|
221
|
+
* `retry` additionally consults the role's retry budget; a retry beyond budget
|
|
222
|
+
* is refused here (the driver's `stall` decides retry-vs-terminate before ever
|
|
223
|
+
* calling this).
|
|
224
|
+
*/
|
|
225
|
+
advance(roleId: OperatingRoleId, event: AdvisorLifecycleEvent): AdvisorLifecycleState;
|
|
226
|
+
/** Whether the given role still has retry budget for another independent attempt. */
|
|
227
|
+
canRetry(roleId: OperatingRoleId): boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Resolve a stalled/failed attempt: retry independently while budget remains,
|
|
230
|
+
* otherwise terminate. A structurally-required role terminates `failed`; an
|
|
231
|
+
* optional role terminates `not_evaluated` with a governed gap and the cycle
|
|
232
|
+
* continues. Returns the role's state after the decision (`running` on retry).
|
|
233
|
+
* Never throws for a legitimately dispatched role and never touches a sibling.
|
|
234
|
+
*/
|
|
235
|
+
stall(roleId: OperatingRoleId, reason: string): AdvisorLifecycleState;
|
|
236
|
+
/**
|
|
237
|
+
* Drive ONE role's full lifecycle around a caller-supplied `dispatch` (the
|
|
238
|
+
* runtime's native-agent launch — the driver never dispatches itself). Owns the
|
|
239
|
+
* per-role retry loop, per-attempt timeout, immediate recording through T-002,
|
|
240
|
+
* and terminal classification. It resolves to the role's terminal state and
|
|
241
|
+
* NEVER rejects: a stall or hard failure becomes a governed terminal, so a
|
|
242
|
+
* sibling's fan-out slot is never rejected or cancelled by this role (FR3).
|
|
243
|
+
*/
|
|
244
|
+
executeRole(roleId: OperatingRoleId, dispatch: (signal: MissionDispatchBudgetSignal) => Promise<unknown>, signal: MissionDispatchBudgetSignal): Promise<AdvisorLifecycleState>;
|
|
245
|
+
/**
|
|
246
|
+
* Fan the prepared, non-terminal roles out through the shared bounded-concurrency
|
|
247
|
+
* primitive, driving each through `executeRole`. Already-terminal (resumed) roles
|
|
248
|
+
* are skipped. The fan-out's new lifecycle reporter records an observability
|
|
249
|
+
* timeline through the driver without owning any state transition — `executeRole`
|
|
250
|
+
* remains the single source of truth for the state machine.
|
|
251
|
+
*/
|
|
252
|
+
run(input: {
|
|
253
|
+
parallel: boolean;
|
|
254
|
+
dispatch: (roleId: OperatingRoleId, signal: MissionDispatchBudgetSignal) => Promise<unknown>;
|
|
255
|
+
perRoleBudgetMs?: number;
|
|
256
|
+
}): Promise<AdvisorLifecycleRunSummary>;
|
|
257
|
+
/**
|
|
258
|
+
* True once every non-structurally-required role has reached a terminal state,
|
|
259
|
+
* without requiring a structurally-optional role to have RECORDED — a governed
|
|
260
|
+
* `not_evaluated` optional role satisfies readiness because the Chair surfaces
|
|
261
|
+
* it as a gap (FR13). Structurally-required roles must reach `recorded`
|
|
262
|
+
* specifically: their missing analysis is a hard gap the Chair cannot synthesize
|
|
263
|
+
* around, so a required role that is `failed`/`not_evaluated`/`cancelled` — or
|
|
264
|
+
* still in flight — holds Chair readiness closed. The `chair` role itself is
|
|
265
|
+
* dispatched separately and is excluded here.
|
|
266
|
+
*/
|
|
267
|
+
chairReady(): boolean;
|
|
268
|
+
/**
|
|
269
|
+
* Schedule automatic lease heartbeats independent of any role completing (FR2).
|
|
270
|
+
* Every `intervalMs` (injected timer) the scheduler checks the lease's remaining
|
|
271
|
+
* time against `heartbeatLeadMs`; when the window is approaching it renews
|
|
272
|
+
* through T-002's `heartbeat` action and carries the refreshed expiry forward.
|
|
273
|
+
* Returns a cancel function; the scheduler also stops on its own once every role
|
|
274
|
+
* is terminal (nothing left to keep alive). A slow lens can therefore hold the
|
|
275
|
+
* session open while siblings keep their recorded work, without raising the
|
|
276
|
+
* configured lease duration.
|
|
277
|
+
*/
|
|
278
|
+
scheduleHeartbeat(intervalMs: number): () => void;
|
|
279
|
+
/** How many heartbeats the scheduler has issued so far (observability/tests). */
|
|
280
|
+
heartbeatsIssued(): number;
|
|
281
|
+
/** The current lease expiry (ms epoch) the driver is tracking. */
|
|
282
|
+
leaseExpiry(): number;
|
|
283
|
+
/** Governed gaps for roles that terminated without a recorded analysis (FR13). */
|
|
284
|
+
governedGaps(): AdvisorGovernedGap[];
|
|
285
|
+
/** The observability timeline recorded through the fan-out reporter. */
|
|
286
|
+
dispatchTimeline(): AdvisorLifecycleTimelineEntry[];
|
|
287
|
+
/** A per-role snapshot in prepared order for `status`/`report` (FR5). */
|
|
288
|
+
snapshot(): AdvisorRoleSnapshot[];
|
|
289
|
+
/**
|
|
290
|
+
* Cancel every still-in-flight role (bookkeeping only — the session cancel is
|
|
291
|
+
* the caller's concern). Already-terminal roles are left untouched, so a
|
|
292
|
+
* mid-cycle cancel preserves recorded work.
|
|
293
|
+
*/
|
|
294
|
+
cancelInFlight(reason: string): void;
|
|
295
|
+
private summary;
|
|
296
|
+
private allRolesTerminal;
|
|
297
|
+
private recordTimeline;
|
|
298
|
+
private updateLease;
|
|
299
|
+
private require;
|
|
300
|
+
/**
|
|
301
|
+
* Race a role's dispatch against its per-attempt timeout using the INJECTED
|
|
302
|
+
* timer, so timeout behaviour is deterministic under a test clock and never a
|
|
303
|
+
* wall-clock sleep. With no configured timeout the dispatch promise is returned
|
|
304
|
+
* as-is. A fired timeout rejects with `AdvisorRoleStalledError`, which the retry
|
|
305
|
+
* loop converts to a governed retry or terminal — it never escapes to a sibling.
|
|
306
|
+
*/
|
|
307
|
+
private withTimeout;
|
|
308
|
+
}
|
|
309
|
+
//# sourceMappingURL=lifecycle-driver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle-driver.d.ts","sourceRoot":"","sources":["../../../src/services/operate/lifecycle-driver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,2BAA2B,EAA4B,MAAM,uBAAuB,CAAC;AACnG,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAC7B,SAAS,GACT,SAAS,GACT,UAAU,GACV,YAAY,GACZ,UAAU,GACV,eAAe,GACf,QAAQ,GACR,WAAW,CAAC;AAEhB,+EAA+E;AAC/E,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