@telora/daemon 0.15.3 → 0.15.5
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/build-info.json +2 -2
- package/dist/directive-executor.d.ts +18 -3
- package/dist/directive-executor.d.ts.map +1 -1
- package/dist/directive-executor.js +45 -4
- package/dist/directive-executor.js.map +1 -1
- package/dist/focus-completion.js +12 -12
- package/dist/focus-completion.js.map +1 -1
- package/dist/focus-executor.d.ts.map +1 -1
- package/dist/focus-executor.js +30 -13
- package/dist/focus-executor.js.map +1 -1
- package/dist/focus-phase.d.ts +22 -0
- package/dist/focus-phase.d.ts.map +1 -0
- package/dist/focus-phase.js +54 -0
- package/dist/focus-phase.js.map +1 -0
- package/dist/focus-team-state.d.ts +6 -0
- package/dist/focus-team-state.d.ts.map +1 -1
- package/dist/focus-team-state.js +13 -0
- package/dist/focus-team-state.js.map +1 -1
- package/dist/index.js +0 -0
- package/dist/listener.d.ts.map +1 -1
- package/dist/listener.js +0 -5
- package/dist/listener.js.map +1 -1
- package/dist/queries/focuses.d.ts +5 -0
- package/dist/queries/focuses.d.ts.map +1 -1
- package/dist/queries/focuses.js +15 -0
- package/dist/queries/focuses.js.map +1 -1
- package/dist/review-defect-detector.d.ts +16 -95
- package/dist/review-defect-detector.d.ts.map +1 -1
- package/dist/review-defect-detector.js +19 -211
- package/dist/review-defect-detector.js.map +1 -1
- package/dist/state-cascade.d.ts +45 -41
- package/dist/state-cascade.d.ts.map +1 -1
- package/dist/state-cascade.js +123 -215
- package/dist/state-cascade.js.map +1 -1
- package/package.json +2 -2
- package/dist/listener-review.d.ts +0 -37
- package/dist/listener-review.d.ts.map +0 -1
- package/dist/listener-review.js +0 -217
- package/dist/listener-review.js.map +0 -1
- package/dist/queries/strategies.d.ts +0 -97
- package/dist/queries/strategies.d.ts.map +0 -1
- package/dist/queries/strategies.js +0 -136
- package/dist/queries/strategies.js.map +0 -1
- package/dist/review-spawner.d.ts +0 -32
- package/dist/review-spawner.d.ts.map +0 -1
- package/dist/review-spawner.js +0 -170
- package/dist/review-spawner.js.map +0 -1
- package/dist/strategy-completion-event.d.ts +0 -63
- package/dist/strategy-completion-event.d.ts.map +0 -1
- package/dist/strategy-completion-event.js +0 -138
- package/dist/strategy-completion-event.js.map +0 -1
- package/dist/strategy-completion.d.ts +0 -85
- package/dist/strategy-completion.d.ts.map +0 -1
- package/dist/strategy-completion.js +0 -459
- package/dist/strategy-completion.js.map +0 -1
- package/dist/strategy-engine.d.ts +0 -47
- package/dist/strategy-engine.d.ts.map +0 -1
- package/dist/strategy-engine.js +0 -421
- package/dist/strategy-engine.js.map +0 -1
- package/dist/strategy-executor.d.ts +0 -55
- package/dist/strategy-executor.d.ts.map +0 -1
- package/dist/strategy-executor.js +0 -519
- package/dist/strategy-executor.js.map +0 -1
- package/dist/strategy-lifecycle.d.ts +0 -61
- package/dist/strategy-lifecycle.d.ts.map +0 -1
- package/dist/strategy-lifecycle.js +0 -544
- package/dist/strategy-lifecycle.js.map +0 -1
- package/dist/strategy-merge.d.ts +0 -77
- package/dist/strategy-merge.d.ts.map +0 -1
- package/dist/strategy-merge.js +0 -378
- package/dist/strategy-merge.js.map +0 -1
- package/dist/strategy-prompt-builder.d.ts +0 -24
- package/dist/strategy-prompt-builder.d.ts.map +0 -1
- package/dist/strategy-prompt-builder.js +0 -87
- package/dist/strategy-prompt-builder.js.map +0 -1
- package/dist/strategy-provisioning.d.ts +0 -16
- package/dist/strategy-provisioning.d.ts.map +0 -1
- package/dist/strategy-provisioning.js +0 -119
- package/dist/strategy-provisioning.js.map +0 -1
- package/dist/strategy-spawn-helpers.d.ts +0 -67
- package/dist/strategy-spawn-helpers.d.ts.map +0 -1
- package/dist/strategy-spawn-helpers.js +0 -160
- package/dist/strategy-spawn-helpers.js.map +0 -1
- package/dist/strategy-team-lifecycle.d.ts +0 -50
- package/dist/strategy-team-lifecycle.d.ts.map +0 -1
- package/dist/strategy-team-lifecycle.js +0 -256
- package/dist/strategy-team-lifecycle.js.map +0 -1
- package/dist/strategy-team-state.d.ts +0 -24
- package/dist/strategy-team-state.d.ts.map +0 -1
- package/dist/strategy-team-state.js +0 -43
- package/dist/strategy-team-state.js.map +0 -1
- package/dist/strategy-teardown.d.ts +0 -24
- package/dist/strategy-teardown.d.ts.map +0 -1
- package/dist/strategy-teardown.js +0 -158
- package/dist/strategy-teardown.js.map +0 -1
- package/dist/strategy-worktree-state.d.ts +0 -47
- package/dist/strategy-worktree-state.d.ts.map +0 -1
- package/dist/strategy-worktree-state.js +0 -104
- package/dist/strategy-worktree-state.js.map +0 -1
- package/dist/team-prompt-variants.d.ts +0 -17
- package/dist/team-prompt-variants.d.ts.map +0 -1
- package/dist/team-prompt-variants.js +0 -79
- package/dist/team-prompt-variants.js.map +0 -1
- package/dist/types/strategy.d.ts +0 -180
- package/dist/types/strategy.d.ts.map +0 -1
- package/dist/types/strategy.js +0 -5
- package/dist/types/strategy.js.map +0 -1
- package/dist/worktree-merge.d.ts +0 -23
- package/dist/worktree-merge.d.ts.map +0 -1
- package/dist/worktree-merge.js +0 -57
- package/dist/worktree-merge.js.map +0 -1
- package/dist/worktree-strategy.d.ts +0 -69
- package/dist/worktree-strategy.d.ts.map +0 -1
- package/dist/worktree-strategy.js +0 -214
- package/dist/worktree-strategy.js.map +0 -1
package/dist/state-cascade.d.ts
CHANGED
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Deterministic
|
|
2
|
+
* Deterministic state cascade engine.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Operates on the focus EXECUTION PHASE axis (derived from delivery
|
|
5
|
+
* aggregate via deriveFocusPhase). Three behaviors live here:
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* 1. Auto-review: phase === 'verifying' + pipelineConfig.review.enabled
|
|
8
|
+
* -> set review_requested_at and transition verify deliveries to
|
|
9
|
+
* in_review. The phase will become 'reviewing' on the next
|
|
10
|
+
* syncFocusPhase poll.
|
|
9
11
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
+
* 2. Review completion: phase === 'reviewing' + no team running +
|
|
13
|
+
* all in_review deliveries pass (no open work issues)
|
|
14
|
+
* -> deliveries -> done, clear review_requested_at.
|
|
12
15
|
*
|
|
13
|
-
*
|
|
16
|
+
* 3. Stale review clearing: review_requested_at set but a delivery has
|
|
17
|
+
* regressed back to active work -> clear review_requested_at so the
|
|
18
|
+
* user can request a fresh review when verify is reached again.
|
|
19
|
+
*
|
|
20
|
+
* The "deliveries all reach verify -> focus advances" cascade and focus
|
|
21
|
+
* phase regression are handled by syncFocusPhase in directive-executor.ts;
|
|
22
|
+
* they no longer live here.
|
|
14
23
|
*/
|
|
15
24
|
import type { DaemonConfig, PipelineConfig, Workflow } from './types.js';
|
|
16
25
|
import type { FocusDeliveryInfo } from './types.js';
|
|
26
|
+
import { type FocusExecutionPhase } from './focus-phase.js';
|
|
17
27
|
/** Injectable dependencies for cascade functions (testing). */
|
|
18
28
|
export interface CascadeDeps {
|
|
19
29
|
getFocusDeliveries: (focusId: string) => Promise<FocusDeliveryInfo[]>;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}) => Promise<void>;
|
|
23
|
-
fetchFocusWorkflowWithTransitions: (focusId: string) => Promise<Workflow>;
|
|
30
|
+
setReviewRequestedAt: (focusId: string, isoTimestamp: string) => Promise<void>;
|
|
31
|
+
clearReviewRequestedAt: (focusId: string) => Promise<void>;
|
|
24
32
|
fetchEffectiveWorkflow: (deliveryId: string) => Promise<Workflow>;
|
|
25
33
|
updateDeliveryStatus: (deliveryId: string, status: string, stageId?: string | null) => Promise<void>;
|
|
26
34
|
getDeliveryIssues: (deliveryId: string) => Promise<Array<{
|
|
@@ -31,41 +39,37 @@ export interface CascadeDeps {
|
|
|
31
39
|
}>>;
|
|
32
40
|
}
|
|
33
41
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
* If a focus is in verify/in_review but a delivery has reverted to a
|
|
40
|
-
* non-complete status, regress the focus back to building.
|
|
42
|
+
* When a focus reaches the verifying phase and pipelineConfig.review is
|
|
43
|
+
* enabled, set review_requested_at and transition verify deliveries to
|
|
44
|
+
* in_review. The phase derivation will pick up review_requested_at on the
|
|
45
|
+
* next poll and emit phase = 'reviewing', firing the reviewing-stage
|
|
46
|
+
* directive.
|
|
41
47
|
*/
|
|
42
|
-
export declare function
|
|
48
|
+
export declare function checkAutoReview(focusId: string, phase: FocusExecutionPhase, pipelineConfig: PipelineConfig | null, reviewRequestedAt: string | null, deliveries: FocusDeliveryInfo[], deps?: CascadeDeps): Promise<void>;
|
|
43
49
|
/**
|
|
44
|
-
* When a focus
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
50
|
+
* When a focus is in the reviewing phase but no review team is running,
|
|
51
|
+
* route each in_review delivery to its outcome and clear
|
|
52
|
+
* review_requested_at:
|
|
53
|
+
* - delivery has open work issues -> iterating (a team will pick it up)
|
|
54
|
+
* - delivery has none -> done
|
|
55
|
+
*
|
|
56
|
+
* Without this, a focus is stuck in reviewing forever if the review team
|
|
57
|
+
* exits without the focus-completion exit handler running (e.g., manual
|
|
58
|
+
* Review request without an in-flight team) or if review never spawned
|
|
59
|
+
* (no agent_directive on the reviewing stage).
|
|
48
60
|
*/
|
|
49
|
-
export declare function
|
|
61
|
+
export declare function checkReviewCompletion(focusId: string, phase: FocusExecutionPhase, deliveries: FocusDeliveryInfo[], deps?: CascadeDeps): Promise<void>;
|
|
50
62
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* This handles the case where auto-review triggers but no review team spawns
|
|
56
|
-
* (e.g., no agent_directive on the in_review stage, or no active team to
|
|
57
|
-
* receive an inject directive). Without this, the focus is stuck in
|
|
58
|
-
* in_review forever.
|
|
63
|
+
* If a focus has review_requested_at set but a delivery has reverted to
|
|
64
|
+
* active work, the prior review request is stale -- clear it so the user
|
|
65
|
+
* can request a fresh review once verify is reached again. Phase
|
|
66
|
+
* regression itself is handled by syncFocusPhase.
|
|
59
67
|
*/
|
|
60
|
-
export declare function
|
|
68
|
+
export declare function clearStaleReviewRequest(focusId: string, phase: FocusExecutionPhase, reviewRequestedAt: string | null, deps?: CascadeDeps): Promise<void>;
|
|
61
69
|
/**
|
|
62
|
-
* Run
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* 1. Check delivery->focus cascade (all deliveries verify => focus verify)
|
|
66
|
-
* 2. Check auto-review (focus in verify + review.enabled)
|
|
67
|
-
* 3. Complete stuck reviews (focus in_review + no team running + all pass)
|
|
68
|
-
* 4. Check for focus regression (delivery reverted => focus back to building)
|
|
70
|
+
* Run cascade checks for active focuses across all configured products.
|
|
71
|
+
* Called from the daemon poll loop after syncFocusPhase has updated
|
|
72
|
+
* current_workflow_stage_id, so the derived phase is authoritative.
|
|
69
73
|
*/
|
|
70
74
|
export declare function runCascadeChecks(config: DaemonConfig): Promise<void>;
|
|
71
75
|
//# sourceMappingURL=state-cascade.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-cascade.d.ts","sourceRoot":"","sources":["../src/state-cascade.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"state-cascade.d.ts","sourceRoot":"","sources":["../src/state-cascade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAgBpD,OAAO,EAAoB,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE9E,+DAA+D;AAC/D,MAAM,WAAW,WAAW;IAC1B,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,KAA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BAAiB,EAAE,MAAM,GAAG,IAAI,EAChC,IAAI,GAAE,WAAyB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAqBf;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAwC1E"}
|
package/dist/state-cascade.js
CHANGED
|
@@ -1,261 +1,170 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Deterministic
|
|
2
|
+
* Deterministic state cascade engine.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Operates on the focus EXECUTION PHASE axis (derived from delivery
|
|
5
|
+
* aggregate via deriveFocusPhase). Three behaviors live here:
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* 1. Auto-review: phase === 'verifying' + pipelineConfig.review.enabled
|
|
8
|
+
* -> set review_requested_at and transition verify deliveries to
|
|
9
|
+
* in_review. The phase will become 'reviewing' on the next
|
|
10
|
+
* syncFocusPhase poll.
|
|
9
11
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
+
* 2. Review completion: phase === 'reviewing' + no team running +
|
|
13
|
+
* all in_review deliveries pass (no open work issues)
|
|
14
|
+
* -> deliveries -> done, clear review_requested_at.
|
|
12
15
|
*
|
|
13
|
-
*
|
|
16
|
+
* 3. Stale review clearing: review_requested_at set but a delivery has
|
|
17
|
+
* regressed back to active work -> clear review_requested_at so the
|
|
18
|
+
* user can request a fresh review when verify is reached again.
|
|
19
|
+
*
|
|
20
|
+
* The "deliveries all reach verify -> focus advances" cascade and focus
|
|
21
|
+
* phase regression are handled by syncFocusPhase in directive-executor.ts;
|
|
22
|
+
* they no longer live here.
|
|
14
23
|
*/
|
|
15
|
-
import { getActiveFocuses, updateDeliveryStatus as _updateDeliveryStatus, fetchEffectiveWorkflow as _fetchEffectiveWorkflow, getDeliveryIssues as _getDeliveryIssues } from './supabase.js';
|
|
16
|
-
import { getFocusDeliveries as _getFocusDeliveries,
|
|
24
|
+
import { getActiveFocuses, updateDeliveryStatus as _updateDeliveryStatus, fetchEffectiveWorkflow as _fetchEffectiveWorkflow, getDeliveryIssues as _getDeliveryIssues, } from './supabase.js';
|
|
25
|
+
import { getFocusDeliveries as _getFocusDeliveries, setReviewRequestedAt as _setReviewRequestedAt, clearReviewRequestedAt as _clearReviewRequestedAt, } from './queries/focuses.js';
|
|
17
26
|
import { configForProduct } from './config.js';
|
|
18
27
|
import { emitLoopTrigger } from './loop-event-bus.js';
|
|
19
|
-
import { isStatusCascadable, isStatusExcludedFromCascade, isStatusTerminal } from './stage-classifier.js';
|
|
20
28
|
import { filterWorkIssues, ACTIVE_WORK_STATUSES } from './constants.js';
|
|
21
29
|
import { hasActiveTeam } from './focus-team-state.js';
|
|
30
|
+
import { deriveFocusPhase } from './focus-phase.js';
|
|
22
31
|
const defaultDeps = {
|
|
23
32
|
getFocusDeliveries: _getFocusDeliveries,
|
|
24
|
-
|
|
25
|
-
|
|
33
|
+
setReviewRequestedAt: _setReviewRequestedAt,
|
|
34
|
+
clearReviewRequestedAt: _clearReviewRequestedAt,
|
|
26
35
|
fetchEffectiveWorkflow: _fetchEffectiveWorkflow,
|
|
27
36
|
updateDeliveryStatus: _updateDeliveryStatus,
|
|
28
37
|
getDeliveryIssues: _getDeliveryIssues,
|
|
29
38
|
};
|
|
30
39
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
40
|
+
* When a focus reaches the verifying phase and pipelineConfig.review is
|
|
41
|
+
* enabled, set review_requested_at and transition verify deliveries to
|
|
42
|
+
* in_review. The phase derivation will pick up review_requested_at on the
|
|
43
|
+
* next poll and emit phase = 'reviewing', firing the reviewing-stage
|
|
44
|
+
* directive.
|
|
33
45
|
*/
|
|
34
|
-
export async function
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
export async function checkAutoReview(focusId, phase, pipelineConfig, reviewRequestedAt, deliveries, deps = defaultDeps) {
|
|
47
|
+
if (phase !== 'verifying')
|
|
48
|
+
return;
|
|
49
|
+
if (!pipelineConfig?.review?.enabled)
|
|
50
|
+
return;
|
|
51
|
+
if (reviewRequestedAt)
|
|
52
|
+
return;
|
|
53
|
+
const verifyDeliveries = deliveries.filter(d => d.executionStatus === 'verify');
|
|
54
|
+
if (verifyDeliveries.length === 0)
|
|
37
55
|
return;
|
|
38
56
|
try {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return;
|
|
49
|
-
// All deliveries are in verify/in_review/done -- advance focus to verify
|
|
50
|
-
const workflow = await deps.fetchFocusWorkflowWithTransitions(focusId);
|
|
51
|
-
// Find the building and verify stages
|
|
52
|
-
const buildingStage = workflow.stages.find(s => s.name === 'building');
|
|
53
|
-
const verifyStage = workflow.stages.find(s => s.name === 'verify');
|
|
54
|
-
if (!verifyStage) {
|
|
55
|
-
console.warn('[state-cascade] No verify stage found in focus workflow -- cannot cascade');
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
// Verify there's a valid building->verify transition
|
|
59
|
-
if (workflow.transitions) {
|
|
60
|
-
const transition = workflow.transitions.find(t => buildingStage && t.from_stage_id === buildingStage.id && t.to_stage_id === verifyStage.id);
|
|
61
|
-
if (!transition) {
|
|
62
|
-
console.warn('[state-cascade] No building->verify transition found in focus workflow');
|
|
63
|
-
return;
|
|
57
|
+
await deps.setReviewRequestedAt(focusId, new Date().toISOString());
|
|
58
|
+
for (const d of verifyDeliveries) {
|
|
59
|
+
try {
|
|
60
|
+
const dWorkflow = await deps.fetchEffectiveWorkflow(d.id);
|
|
61
|
+
const inReviewStage = dWorkflow.stages.find(s => s.name === 'in_review');
|
|
62
|
+
await deps.updateDeliveryStatus(d.id, 'in_review', inReviewStage?.id ?? null);
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
console.warn(`[state-cascade] Auto-review: failed to transition delivery "${d.name}":`, err.message);
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
`all ${activeDeliveries.length} active delivery(ies) in verify or beyond`);
|
|
68
|
+
console.log(`[state-cascade] Auto-review triggered for focus ${focusId}: ` +
|
|
69
|
+
`${verifyDeliveries.length} verify deliver${verifyDeliveries.length === 1 ? 'y' : 'ies'} -> in_review`);
|
|
69
70
|
emitLoopTrigger({
|
|
70
71
|
type: 'focus_status_changed',
|
|
71
72
|
focusId,
|
|
72
|
-
detail:
|
|
73
|
+
detail: `verifying -> reviewing (auto, ${verifyDeliveries.length} deliveries)`,
|
|
73
74
|
});
|
|
74
75
|
}
|
|
75
76
|
catch (err) {
|
|
76
|
-
console.warn(`[state-cascade]
|
|
77
|
+
console.warn(`[state-cascade] Auto-review failed for focus ${focusId}:`, err.message);
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
80
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
81
|
+
* When a focus is in the reviewing phase but no review team is running,
|
|
82
|
+
* route each in_review delivery to its outcome and clear
|
|
83
|
+
* review_requested_at:
|
|
84
|
+
* - delivery has open work issues -> iterating (a team will pick it up)
|
|
85
|
+
* - delivery has none -> done
|
|
86
|
+
*
|
|
87
|
+
* Without this, a focus is stuck in reviewing forever if the review team
|
|
88
|
+
* exits without the focus-completion exit handler running (e.g., manual
|
|
89
|
+
* Review request without an in-flight team) or if review never spawned
|
|
90
|
+
* (no agent_directive on the reviewing stage).
|
|
82
91
|
*/
|
|
83
|
-
export async function
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if (
|
|
92
|
+
export async function checkReviewCompletion(focusId, phase, deliveries, deps = defaultDeps) {
|
|
93
|
+
if (phase !== 'reviewing')
|
|
94
|
+
return;
|
|
95
|
+
if (hasActiveTeam(focusId))
|
|
96
|
+
return;
|
|
97
|
+
const inReviewDeliveries = deliveries.filter(d => d.executionStatus === 'in_review');
|
|
98
|
+
if (inReviewDeliveries.length === 0)
|
|
87
99
|
return;
|
|
88
100
|
try {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
+
let movedToDone = 0;
|
|
102
|
+
let movedToIterating = 0;
|
|
103
|
+
for (const d of inReviewDeliveries) {
|
|
104
|
+
try {
|
|
105
|
+
const [issues, dWorkflow] = await Promise.all([
|
|
106
|
+
deps.getDeliveryIssues(d.id),
|
|
107
|
+
deps.fetchEffectiveWorkflow(d.id),
|
|
108
|
+
]);
|
|
109
|
+
const workIssues = filterWorkIssues(issues);
|
|
110
|
+
const openWork = workIssues.filter(i => ACTIVE_WORK_STATUSES.has(i.status));
|
|
111
|
+
if (openWork.length > 0) {
|
|
112
|
+
const iteratingStage = dWorkflow.stages.find(s => s.name === 'iterating');
|
|
113
|
+
await deps.updateDeliveryStatus(d.id, 'iterating', iteratingStage?.id ?? null);
|
|
114
|
+
movedToIterating += 1;
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
const doneStage = dWorkflow.stages.find(s => s.name === 'done');
|
|
118
|
+
await deps.updateDeliveryStatus(d.id, 'done', doneStage?.id ?? null);
|
|
119
|
+
movedToDone += 1;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
catch (err) {
|
|
123
|
+
console.warn(`[state-cascade] Review completion: failed to route delivery "${d.name}":`, err.message);
|
|
124
|
+
}
|
|
101
125
|
}
|
|
102
|
-
await deps.
|
|
103
|
-
console.log(`[state-cascade]
|
|
104
|
-
|
|
126
|
+
await deps.clearReviewRequestedAt(focusId);
|
|
127
|
+
console.log(`[state-cascade] Review completion for focus ${focusId}: ` +
|
|
128
|
+
`${movedToDone} -> done, ${movedToIterating} -> iterating`);
|
|
105
129
|
emitLoopTrigger({
|
|
106
130
|
type: 'review_completed',
|
|
107
131
|
focusId,
|
|
108
|
-
detail:
|
|
132
|
+
detail: `reviewing closed (${movedToDone} done, ${movedToIterating} iterating)`,
|
|
109
133
|
});
|
|
110
134
|
}
|
|
111
135
|
catch (err) {
|
|
112
|
-
console.warn(`[state-cascade]
|
|
136
|
+
console.warn(`[state-cascade] Review completion check failed for focus ${focusId}:`, err.message);
|
|
113
137
|
}
|
|
114
138
|
}
|
|
115
139
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
140
|
+
* If a focus has review_requested_at set but a delivery has reverted to
|
|
141
|
+
* active work, the prior review request is stale -- clear it so the user
|
|
142
|
+
* can request a fresh review once verify is reached again. Phase
|
|
143
|
+
* regression itself is handled by syncFocusPhase.
|
|
120
144
|
*/
|
|
121
|
-
export async function
|
|
122
|
-
|
|
123
|
-
if (focusStatus !== 'verify')
|
|
145
|
+
export async function clearStaleReviewRequest(focusId, phase, reviewRequestedAt, deps = defaultDeps) {
|
|
146
|
+
if (!reviewRequestedAt)
|
|
124
147
|
return;
|
|
125
|
-
if (
|
|
148
|
+
if (phase !== 'coding' && phase !== 'kickoff')
|
|
126
149
|
return;
|
|
127
150
|
try {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
const allComplete = activeDeliveries.every(d => isStatusCascadable(d.executionStatus ?? ''));
|
|
132
|
-
if (!allComplete)
|
|
133
|
-
return;
|
|
134
|
-
if (activeDeliveries.length === 0)
|
|
135
|
-
return;
|
|
136
|
-
// Don't re-trigger review if all deliveries are already done --
|
|
137
|
-
// that means review already passed and moved them to done.
|
|
138
|
-
const allDone = activeDeliveries.every(d => d.executionStatus === 'done');
|
|
139
|
-
if (allDone)
|
|
140
|
-
return;
|
|
141
|
-
// Transition focus to in_review and set review_requested_at
|
|
142
|
-
const focusWorkflow = await deps.fetchFocusWorkflowWithTransitions(focusId);
|
|
143
|
-
const inReviewStage = focusWorkflow.stages.find(s => s.name === 'in_review');
|
|
144
|
-
if (!inReviewStage) {
|
|
145
|
-
console.warn('[state-cascade] Auto-review: no in_review stage in focus workflow');
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
await deps.updateFocusStatus(focusId, 'in_review', inReviewStage.id, { reviewRequestedAt: new Date().toISOString() });
|
|
149
|
-
// Delivery cascade to in_review is handled by cascadeDeliveriesToInReview
|
|
150
|
-
// in the main poll loop (covers both auto and manual review triggers).
|
|
151
|
-
console.log(`[state-cascade] Auto-review triggered for focus ${focusId}: ` +
|
|
152
|
-
`focus transitioned to in_review`);
|
|
151
|
+
await deps.clearReviewRequestedAt(focusId);
|
|
152
|
+
console.log(`[state-cascade] Cleared stale review_requested_at on focus ${focusId} ` +
|
|
153
|
+
`(phase regressed to ${phase})`);
|
|
153
154
|
emitLoopTrigger({
|
|
154
|
-
type: '
|
|
155
|
+
type: 'review_completed',
|
|
155
156
|
focusId,
|
|
156
|
-
detail:
|
|
157
|
+
detail: `${phase} (delivery regression, review cleared)`,
|
|
157
158
|
});
|
|
158
159
|
}
|
|
159
160
|
catch (err) {
|
|
160
|
-
console.warn(`[state-cascade] Failed to
|
|
161
|
+
console.warn(`[state-cascade] Failed to clear stale review_requested_at for ${focusId}:`, err.message);
|
|
161
162
|
}
|
|
162
163
|
}
|
|
163
164
|
/**
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*/
|
|
168
|
-
async function cascadeDeliveriesToInReview(focusId, deps = defaultDeps) {
|
|
169
|
-
try {
|
|
170
|
-
const deliveries = await deps.getFocusDeliveries(focusId);
|
|
171
|
-
for (const d of deliveries) {
|
|
172
|
-
if (d.executionStatus === 'verify') {
|
|
173
|
-
try {
|
|
174
|
-
const dWorkflow = await deps.fetchEffectiveWorkflow(d.id);
|
|
175
|
-
const inReviewStage = dWorkflow.stages.find(s => s.name === 'in_review');
|
|
176
|
-
await deps.updateDeliveryStatus(d.id, 'in_review', inReviewStage?.id ?? null);
|
|
177
|
-
console.log(`[state-cascade] Delivery "${d.name}" cascaded to in_review`);
|
|
178
|
-
}
|
|
179
|
-
catch (err) {
|
|
180
|
-
console.warn(`[state-cascade] Failed to cascade delivery "${d.name}" to in_review: ${err.message}`);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
catch (err) {
|
|
186
|
-
console.warn(`[state-cascade] Failed to cascade deliveries to in_review for ${focusId}: ${err.message}`);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* When a focus is in_review but no review team is running, check whether
|
|
191
|
-
* all in_review deliveries have passed (no open work issues). If so, route
|
|
192
|
-
* them to done and move the focus back to verify.
|
|
193
|
-
*
|
|
194
|
-
* This handles the case where auto-review triggers but no review team spawns
|
|
195
|
-
* (e.g., no agent_directive on the in_review stage, or no active team to
|
|
196
|
-
* receive an inject directive). Without this, the focus is stuck in
|
|
197
|
-
* in_review forever.
|
|
198
|
-
*/
|
|
199
|
-
export async function checkReviewCompletion(focusId, deps = defaultDeps) {
|
|
200
|
-
// Only act when no team is running -- if a team is active, let the
|
|
201
|
-
// review exit handler in handleTeamCompletion deal with it.
|
|
202
|
-
if (hasActiveTeam(focusId))
|
|
203
|
-
return;
|
|
204
|
-
try {
|
|
205
|
-
const deliveries = await deps.getFocusDeliveries(focusId);
|
|
206
|
-
const inReviewDeliveries = deliveries.filter(d => d.executionStatus === 'in_review');
|
|
207
|
-
if (inReviewDeliveries.length === 0)
|
|
208
|
-
return;
|
|
209
|
-
// Check each in_review delivery for open work issues
|
|
210
|
-
let allPassed = true;
|
|
211
|
-
for (const d of inReviewDeliveries) {
|
|
212
|
-
const issues = await deps.getDeliveryIssues(d.id);
|
|
213
|
-
const workIssues = filterWorkIssues(issues);
|
|
214
|
-
const openWork = workIssues.filter(i => ACTIVE_WORK_STATUSES.has(i.status));
|
|
215
|
-
if (openWork.length > 0) {
|
|
216
|
-
allPassed = false;
|
|
217
|
-
break;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
if (!allPassed)
|
|
221
|
-
return;
|
|
222
|
-
// All in_review deliveries passed -- move them to done
|
|
223
|
-
for (const d of inReviewDeliveries) {
|
|
224
|
-
try {
|
|
225
|
-
const dWorkflow = await deps.fetchEffectiveWorkflow(d.id);
|
|
226
|
-
const doneStage = dWorkflow.stages.find(s => s.name === 'done');
|
|
227
|
-
await deps.updateDeliveryStatus(d.id, 'done', doneStage?.id ?? null);
|
|
228
|
-
console.log(`[state-cascade] Review passed: delivery "${d.name}" moved to done`);
|
|
229
|
-
}
|
|
230
|
-
catch (err) {
|
|
231
|
-
console.warn(`[state-cascade] Failed to move delivery "${d.name}" to done: ${err.message}`);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
// Move focus back to verify
|
|
235
|
-
const workflow = await deps.fetchFocusWorkflowWithTransitions(focusId);
|
|
236
|
-
const verifyStage = workflow.stages.find(s => s.name === 'verify');
|
|
237
|
-
if (verifyStage) {
|
|
238
|
-
await deps.updateFocusStatus(focusId, 'verify', verifyStage.id, { reviewRequestedAt: null });
|
|
239
|
-
console.log(`[state-cascade] Review complete (no team): focus moved to verify`);
|
|
240
|
-
emitLoopTrigger({
|
|
241
|
-
type: 'review_completed',
|
|
242
|
-
focusId,
|
|
243
|
-
detail: 'in_review -> verify (auto-completed by cascade, no review team)',
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
catch (err) {
|
|
248
|
-
console.warn(`[state-cascade] Failed to check review completion for ${focusId}: ${err.message}`);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Run all cascade checks for active focuses across all configured products.
|
|
253
|
-
*
|
|
254
|
-
* Called from the daemon poll loop. For each active focus:
|
|
255
|
-
* 1. Check delivery->focus cascade (all deliveries verify => focus verify)
|
|
256
|
-
* 2. Check auto-review (focus in verify + review.enabled)
|
|
257
|
-
* 3. Complete stuck reviews (focus in_review + no team running + all pass)
|
|
258
|
-
* 4. Check for focus regression (delivery reverted => focus back to building)
|
|
165
|
+
* Run cascade checks for active focuses across all configured products.
|
|
166
|
+
* Called from the daemon poll loop after syncFocusPhase has updated
|
|
167
|
+
* current_workflow_stage_id, so the derived phase is authoritative.
|
|
259
168
|
*/
|
|
260
169
|
export async function runCascadeChecks(config) {
|
|
261
170
|
for (const product of config.products) {
|
|
@@ -263,20 +172,19 @@ export async function runCascadeChecks(config) {
|
|
|
263
172
|
try {
|
|
264
173
|
const focuses = await getActiveFocuses(pc.organizationId, product.id);
|
|
265
174
|
for (const focus of focuses) {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
await
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
175
|
+
try {
|
|
176
|
+
const deliveries = await defaultDeps.getFocusDeliveries(focus.focus_id);
|
|
177
|
+
const phase = deriveFocusPhase({
|
|
178
|
+
deliveries: deliveries.map(d => ({ executionStatus: d.executionStatus })),
|
|
179
|
+
reviewRequestedAt: focus.review_requested_at,
|
|
180
|
+
});
|
|
181
|
+
await checkAutoReview(focus.focus_id, phase, focus.pipeline_config, focus.review_requested_at, deliveries);
|
|
182
|
+
await checkReviewCompletion(focus.focus_id, phase, deliveries);
|
|
183
|
+
await clearStaleReviewRequest(focus.focus_id, phase, focus.review_requested_at);
|
|
184
|
+
}
|
|
185
|
+
catch (err) {
|
|
186
|
+
console.warn(`[state-cascade] Cascade pass failed for focus ${focus.focus_id}:`, err.message);
|
|
277
187
|
}
|
|
278
|
-
// Check for focus regression
|
|
279
|
-
await handleFocusRegression(pc, focus.focus_id, focus.status);
|
|
280
188
|
}
|
|
281
189
|
}
|
|
282
190
|
catch (err) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-cascade.js","sourceRoot":"","sources":["../src/state-cascade.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"state-cascade.js","sourceRoot":"","sources":["../src/state-cascade.ts"],"names":[],"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BAE/D,MAAM,uBAAuB,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;gBAClF,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACb,OAAO,CAAC,IAAI,CACV,iDAAiD,KAAK,CAAC,QAAQ,GAAG,EACjE,GAAa,CAAC,OAAO,CACvB,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,IAAI,CACV,4DAA4D,OAAO,CAAC,EAAE,GAAG,EACxE,GAAa,CAAC,OAAO,CACvB,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telora/daemon",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.5",
|
|
4
4
|
"description": "Agent orchestration daemon for Telora - spawns and manages Claude Code instances",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@telora/daemon-core": "^0.2.16",
|
|
39
39
|
"@telora/factory": "^0.4.6",
|
|
40
|
-
"@telora/mcp-products": "^0.
|
|
40
|
+
"@telora/mcp-products": "^0.22.1",
|
|
41
41
|
"commander": "^14.0.3",
|
|
42
42
|
"zod": "^4.3.6"
|
|
43
43
|
},
|