@telora/daemon 0.22.233 → 0.22.239
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 +4 -3
- package/dist/backends/index.d.ts.map +1 -1
- package/dist/backends/index.js +1 -0
- package/dist/backends/index.js.map +1 -1
- package/dist/completion/detector.d.ts.map +1 -1
- package/dist/completion/detector.js +1 -0
- package/dist/completion/detector.js.map +1 -1
- package/dist/completion/event-entry-phases.d.ts.map +1 -1
- package/dist/completion/event-entry-phases.js +13 -11
- package/dist/completion/event-entry-phases.js.map +1 -1
- package/dist/completion/event-phases.d.ts.map +1 -1
- package/dist/completion/event-phases.js +16 -15
- package/dist/completion/event-phases.js.map +1 -1
- package/dist/completion/status-advance-phase.d.ts +3 -0
- package/dist/completion/status-advance-phase.d.ts.map +1 -1
- package/dist/completion/status-advance-phase.js +2 -1
- package/dist/completion/status-advance-phase.js.map +1 -1
- package/dist/completion/team-progress-measure.d.ts.map +1 -1
- package/dist/completion/team-progress-measure.js +1 -0
- package/dist/completion/team-progress-measure.js.map +1 -1
- package/dist/delivery/delivery-advance-block.d.ts +17 -4
- package/dist/delivery/delivery-advance-block.d.ts.map +1 -1
- package/dist/delivery/delivery-advance-block.js +203 -173
- package/dist/delivery/delivery-advance-block.js.map +1 -1
- package/dist/focus/advance-hold.d.ts +55 -0
- package/dist/focus/advance-hold.d.ts.map +1 -0
- package/dist/focus/advance-hold.js +155 -0
- package/dist/focus/advance-hold.js.map +1 -0
- package/dist/focus/focus-spawn-decision.d.ts +17 -6
- package/dist/focus/focus-spawn-decision.d.ts.map +1 -1
- package/dist/focus/focus-spawn-decision.js +6 -6
- package/dist/focus/focus-spawn-decision.js.map +1 -1
- package/dist/focus/focus-team-state.js +1 -1
- package/dist/focus/focus-worktree-state.d.ts.map +1 -1
- package/dist/focus/focus-worktree-state.js +1 -0
- package/dist/focus/focus-worktree-state.js.map +1 -1
- package/dist/focus/listener-auto-advance.d.ts +14 -0
- package/dist/focus/listener-auto-advance.d.ts.map +1 -1
- package/dist/focus/listener-auto-advance.js +13 -10
- package/dist/focus/listener-auto-advance.js.map +1 -1
- package/dist/focus/listener-spawn.d.ts.map +1 -1
- package/dist/focus/listener-spawn.js +18 -29
- package/dist/focus/listener-spawn.js.map +1 -1
- package/dist/focus/listener-state.d.ts.map +1 -1
- package/dist/focus/listener-state.js +1 -0
- package/dist/focus/listener-state.js.map +1 -1
- package/dist/focus/listener.d.ts.map +1 -1
- package/dist/focus/listener.js +10 -4
- package/dist/focus/listener.js.map +1 -1
- package/dist/focus/pending-spawn-pass-deps.d.ts +3 -0
- package/dist/focus/pending-spawn-pass-deps.d.ts.map +1 -1
- package/dist/focus/pending-spawn-pass-deps.js +1 -0
- package/dist/focus/pending-spawn-pass-deps.js.map +1 -1
- package/dist/focus/ready-focus-spawn-action.d.ts +29 -0
- package/dist/focus/ready-focus-spawn-action.d.ts.map +1 -0
- package/dist/focus/ready-focus-spawn-action.js +32 -0
- package/dist/focus/ready-focus-spawn-action.js.map +1 -0
- package/dist/focus/ready-focus-team-work.d.ts +18 -0
- package/dist/focus/ready-focus-team-work.d.ts.map +1 -0
- package/dist/focus/ready-focus-team-work.js +59 -0
- package/dist/focus/ready-focus-team-work.js.map +1 -0
- package/dist/focus/team-actionable-work.d.ts +56 -6
- package/dist/focus/team-actionable-work.d.ts.map +1 -1
- package/dist/focus/team-actionable-work.js +56 -9
- package/dist/focus/team-actionable-work.js.map +1 -1
- package/dist/git/types.d.ts.map +1 -1
- package/dist/git/types.js +1 -0
- package/dist/git/types.js.map +1 -1
- package/dist/nexus/return.d.ts +44 -1
- package/dist/nexus/return.d.ts.map +1 -1
- package/dist/nexus/return.js +42 -0
- package/dist/nexus/return.js.map +1 -1
- package/dist/prompt/focus-prompt-builder.d.ts +10 -8
- package/dist/prompt/focus-prompt-builder.d.ts.map +1 -1
- package/dist/prompt/focus-prompt-builder.js +19 -10
- package/dist/prompt/focus-prompt-builder.js.map +1 -1
- package/dist/prompt-sections/execution-sections.d.ts.map +1 -1
- package/dist/prompt-sections/execution-sections.js +10 -0
- package/dist/prompt-sections/execution-sections.js.map +1 -1
- package/dist/queries/deliveries.js +1 -1
- package/dist/queries/deliveries.js.map +1 -1
- package/dist/queries/delivery-gate-holds.d.ts +78 -0
- package/dist/queries/delivery-gate-holds.d.ts.map +1 -0
- package/dist/queries/delivery-gate-holds.js +5 -0
- package/dist/queries/delivery-gate-holds.js.map +1 -0
- package/dist/queries/delivery-gate-state.d.ts +13 -58
- package/dist/queries/delivery-gate-state.d.ts.map +1 -1
- package/dist/queries/delivery-gate-state.js.map +1 -1
- package/dist/queries/focus-discovery.js +1 -1
- package/dist/queries/focus-discovery.js.map +1 -1
- package/dist/queries/focuses.d.ts.map +1 -1
- package/dist/queries/focuses.js +1 -0
- package/dist/queries/focuses.js.map +1 -1
- package/dist/queries/issues.d.ts.map +1 -1
- package/dist/queries/issues.js +1 -0
- package/dist/queries/issues.js.map +1 -1
- package/dist/queries/shared.js +1 -1
- package/dist/queries/workflows.d.ts.map +1 -1
- package/dist/queries/workflows.js +1 -0
- package/dist/queries/workflows.js.map +1 -1
- package/dist/spawn/helpers.d.ts.map +1 -1
- package/dist/spawn/helpers.js +1 -0
- package/dist/spawn/helpers.js.map +1 -1
- package/dist/spawn/idle-work-stamp.d.ts +13 -7
- package/dist/spawn/idle-work-stamp.d.ts.map +1 -1
- package/dist/spawn/idle-work-stamp.js +22 -11
- package/dist/spawn/idle-work-stamp.js.map +1 -1
- package/dist/spawn/lead-continuation.d.ts.map +1 -1
- package/dist/spawn/lead-continuation.js +13 -11
- package/dist/spawn/lead-continuation.js.map +1 -1
- package/dist/spawn/spawn-cooldown.js +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/types/index.js +1 -1
- package/package.json +1 -1
|
@@ -17,16 +17,18 @@
|
|
|
17
17
|
*
|
|
18
18
|
* @module spawn/idle-work-stamp
|
|
19
19
|
*/
|
|
20
|
-
import type { FocusTeamState, FocusDeliveryInfo } from '../types/index.js';
|
|
20
|
+
import type { FocusTeamState, FocusDeliveryInfo, FocusIssueInfo } from '../types/index.js';
|
|
21
21
|
/**
|
|
22
22
|
* Dependencies for the stamp, injectable for tests. Defaults read the focus's
|
|
23
|
-
* deliveries from the API and use the real clock.
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
23
|
+
* deliveries + issues from the API and use the real clock. The work fact itself
|
|
24
|
+
* is deliveriesWithTeamWork (focus/team-actionable-work.ts) -- the SAME
|
|
25
|
+
* predicate the team exit and the spawn gate read -- imported directly (pure)
|
|
26
|
+
* rather than injected, so a test drives it through real delivery + issue
|
|
27
|
+
* fixtures.
|
|
27
28
|
*/
|
|
28
29
|
export interface IdleWorkStampDeps {
|
|
29
30
|
getFocusDeliveries: (focusId: string) => Promise<FocusDeliveryInfo[]>;
|
|
31
|
+
getFocusIssues: (focusId: string) => Promise<FocusIssueInfo[]>;
|
|
30
32
|
now: () => number;
|
|
31
33
|
}
|
|
32
34
|
/**
|
|
@@ -38,8 +40,12 @@ export interface IdleWorkStampDeps {
|
|
|
38
40
|
* Gating (all three must hold to stamp):
|
|
39
41
|
* - the result is NOT an error (an error is owned by errorResultAt in
|
|
40
42
|
* spawn/helpers.ts; the two are distinct signals and an error never stamps here), AND
|
|
41
|
-
* - the focus has
|
|
42
|
-
*
|
|
43
|
+
* - the focus has team work: a delivery holding an open work issue, or a
|
|
44
|
+
* planning delivery to scope (deliveriesWithTeamWork). A delivery's STATUS
|
|
45
|
+
* is not work: a coding delivery whose every issue is Done waits on the
|
|
46
|
+
* daemon's advance, and waking its lead named nothing it could do (Tinker
|
|
47
|
+
* Tailor, 2026-09-25 -- the lead escalated to a human for a status the
|
|
48
|
+
* daemon owns). Stamping a team with no work would mislabel it as parked.
|
|
43
49
|
*
|
|
44
50
|
* Returns the outstanding delivery ids it stamped (empty array when nothing was
|
|
45
51
|
* stamped). Safe to call unconditionally from the result handler.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idle-work-stamp.d.ts","sourceRoot":"","sources":["../../src/spawn/idle-work-stamp.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"idle-work-stamp.d.ts","sourceRoot":"","sources":["../../src/spawn/idle-work-stamp.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAW3F;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;IACtE,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAC/D,GAAG,EAAE,MAAM,MAAM,CAAC;CACnB;AAQD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE;IAAE,SAAS,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,EACzF,IAAI,GAAE,iBAA+B,GACpC,OAAO,CAAC,MAAM,EAAE,CAAC,CA4BnB"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
2
|
// Pinned by: packages/daemon/src/spawn/idle-work-stamp.test.ts
|
|
3
3
|
// PINNED-BY-END
|
|
4
|
-
import { getFocusDeliveries as defaultGetFocusDeliveries } from '../queries/focuses.js';
|
|
5
|
-
import {
|
|
4
|
+
import { getFocusDeliveries as defaultGetFocusDeliveries, getFocusIssues as defaultGetFocusIssues, } from '../queries/focuses.js';
|
|
5
|
+
import { deliveriesWithTeamWork } from '../focus/team-actionable-work.js';
|
|
6
|
+
import { armFactsFromTeamState } from '../focus/recorded-new-intent.js';
|
|
6
7
|
import { createLogger } from '../shell/log.js';
|
|
7
8
|
const log = createLogger({ module: 'focus-executor' });
|
|
8
9
|
const defaultDeps = {
|
|
9
10
|
getFocusDeliveries: defaultGetFocusDeliveries,
|
|
11
|
+
getFocusIssues: defaultGetFocusIssues,
|
|
10
12
|
now: () => Date.now(),
|
|
11
13
|
};
|
|
12
14
|
/**
|
|
@@ -18,8 +20,12 @@ const defaultDeps = {
|
|
|
18
20
|
* Gating (all three must hold to stamp):
|
|
19
21
|
* - the result is NOT an error (an error is owned by errorResultAt in
|
|
20
22
|
* spawn/helpers.ts; the two are distinct signals and an error never stamps here), AND
|
|
21
|
-
* - the focus has
|
|
22
|
-
*
|
|
23
|
+
* - the focus has team work: a delivery holding an open work issue, or a
|
|
24
|
+
* planning delivery to scope (deliveriesWithTeamWork). A delivery's STATUS
|
|
25
|
+
* is not work: a coding delivery whose every issue is Done waits on the
|
|
26
|
+
* daemon's advance, and waking its lead named nothing it could do (Tinker
|
|
27
|
+
* Tailor, 2026-09-25 -- the lead escalated to a human for a status the
|
|
28
|
+
* daemon owns). Stamping a team with no work would mislabel it as parked.
|
|
23
29
|
*
|
|
24
30
|
* Returns the outstanding delivery ids it stamped (empty array when nothing was
|
|
25
31
|
* stamped). Safe to call unconditionally from the result handler.
|
|
@@ -29,18 +35,23 @@ export async function stampIdleWithWorkRemaining(args, deps = defaultDeps) {
|
|
|
29
35
|
// An error result is the errorResultAt path's business, never this stamp's.
|
|
30
36
|
if (isError)
|
|
31
37
|
return [];
|
|
32
|
-
const deliveries = await
|
|
33
|
-
|
|
34
|
-
.
|
|
35
|
-
|
|
36
|
-
//
|
|
37
|
-
|
|
38
|
+
const [deliveries, issues] = await Promise.all([
|
|
39
|
+
deps.getFocusDeliveries(focusId),
|
|
40
|
+
deps.getFocusIssues(focusId),
|
|
41
|
+
]);
|
|
42
|
+
// A read-only focus is an audit whose planning awaits ratification, not the team.
|
|
43
|
+
const outstanding = deliveriesWithTeamWork(deliveries, issues, {
|
|
44
|
+
armFacts: armFactsFromTeamState(teamState),
|
|
45
|
+
planningIsWork: !teamState.readOnly,
|
|
46
|
+
}).map((d) => d.id);
|
|
47
|
+
// No team work -> the lead legitimately has nothing to do; do NOT stamp (a
|
|
48
|
+
// stamp would mislabel a genuinely-idle team as parked-with-work).
|
|
38
49
|
if (outstanding.length === 0)
|
|
39
50
|
return [];
|
|
40
51
|
teamState.idleWithWorkRemainingAt = deps.now();
|
|
41
52
|
teamState.idleOutstandingDeliveryIds = outstanding;
|
|
42
53
|
log.warn(`[focus-executor] Lead for "${focusName}" returned a SUCCESS result while ` +
|
|
43
|
-
`${outstanding.length} delivery(ies)
|
|
54
|
+
`${outstanding.length} delivery(ies) hold open work -- stamping ` +
|
|
44
55
|
`idle-with-work-remaining (the lead parked with work left, it is not done).`);
|
|
45
56
|
return outstanding;
|
|
46
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idle-work-stamp.js","sourceRoot":"","sources":["../../src/spawn/idle-work-stamp.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,+DAA+D;AAC/D,gBAAgB;AAuBhB,OAAO,
|
|
1
|
+
{"version":3,"file":"idle-work-stamp.js","sourceRoot":"","sources":["../../src/spawn/idle-work-stamp.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,+DAA+D;AAC/D,gBAAgB;AAuBhB,OAAO,EACL,kBAAkB,IAAI,yBAAyB,EAC/C,cAAc,IAAI,qBAAqB,GACxC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,YAAY,EAA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,MAAM,4CAA4C;QACjE,4EAA4E,CAC/E,CAAC;IACF,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lead-continuation.d.ts","sourceRoot":"","sources":["../../src/spawn/lead-continuation.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"lead-continuation.d.ts","sourceRoot":"","sources":["../../src/spawn/lead-continuation.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAmB7G;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;IACtE,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAC/D,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IACtC,WAAW,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAC3D,sBAAsB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,oFAAoF;IACpF,qBAAqB,EAAE,MAAM,MAAM,CAAC;IACpC;;;;OAIG;IACH,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,gBAAgB,CAAC;IAC/G,wGAAwG;IACxG,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACzD,GAAG,EAAE,MAAM,MAAM,CAAC;CACnB;AAeD;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAC3B,kBAAkB,GAClB,UAAU,GACV,cAAc,GACd,kBAAkB,GAClB,cAAc,GACd,MAAM,CAAC;AAsCX;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE;IAAE,SAAS,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,EACzF,IAAI,GAAE,gBAA8B,GACnC,OAAO,CAAC,mBAAmB,CAAC,CA0F9B"}
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
// Pinned by: packages/daemon/src/spawn/lead-continuation.test.ts
|
|
3
3
|
// PINNED-BY-END
|
|
4
4
|
import { getFocusDeliveries as defaultGetFocusDeliveries, getFocusIssues as defaultGetFocusIssues, } from '../queries/focuses.js';
|
|
5
|
-
import { isStatusCascadable } from '../workflow/stage-classifier.js';
|
|
6
5
|
import { buildReEngagementMessage } from '../prompt/focus-prompt-builder.js';
|
|
7
|
-
import { armFactsFromTeamState
|
|
6
|
+
import { armFactsFromTeamState } from '../focus/recorded-new-intent.js';
|
|
8
7
|
import { sendMessage as defaultSendMessage } from '@telora/daemon-core';
|
|
9
8
|
import { recordStdinMessageSent as defaultRecordStdinMessageSent } from '../completion/stdin-turn-tracker.js';
|
|
10
9
|
import { isProcessAlive as defaultIsProcessAlive } from './liveness.js';
|
|
@@ -34,10 +33,10 @@ function continuationPreamble(outstandingCount) {
|
|
|
34
33
|
return [
|
|
35
34
|
'## Continue -- your turn is not over',
|
|
36
35
|
'',
|
|
37
|
-
`You returned a result while ${outstandingCount} delivery(ies) on this focus
|
|
38
|
-
'
|
|
39
|
-
'a valid stop: the turn ends only when
|
|
40
|
-
'
|
|
36
|
+
`You returned a result while ${outstandingCount} delivery(ies) on this focus still`,
|
|
37
|
+
'hold open work (an open issue, or a planning delivery to scope). Ending a turn with',
|
|
38
|
+
'open work remaining is not a valid stop: the turn ends only when no delivery holds',
|
|
39
|
+
'open work, when you are blocked and have escalated, or when the daemon tears you',
|
|
41
40
|
'down. Pick up the outstanding work below and keep going in-session.',
|
|
42
41
|
'',
|
|
43
42
|
'',
|
|
@@ -116,10 +115,13 @@ export async function reengageOnIdleResult(args, deps = defaultDeps) {
|
|
|
116
115
|
// A delivery recorded as new intent under the live arm is not outstanding
|
|
117
116
|
// work for this lead: continuing it into the nudge would spend continuation
|
|
118
117
|
// budget on something the team is structurally unable to close.
|
|
118
|
+
// The listing is exactly the deliveries the stamp found holding team work
|
|
119
|
+
// (deliveriesWithTeamWork, read fresh): a delivery whose issues are all Done
|
|
120
|
+
// is the daemon's to advance, and naming it gives the lead nothing to do.
|
|
119
121
|
const armFacts = armFactsFromTeamState(teamState);
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
if (
|
|
122
|
+
const outstandingIds = new Set(outstanding);
|
|
123
|
+
const withWork = deliveries.filter((d) => outstandingIds.has(d.id));
|
|
124
|
+
if (withWork.length === 0)
|
|
123
125
|
return 'no_live_lead';
|
|
124
126
|
const progress = deps.readProgress(focusId, deliveries, issues);
|
|
125
127
|
const budget = deps.getContinuationBudget();
|
|
@@ -130,7 +132,7 @@ export async function reengageOnIdleResult(args, deps = defaultDeps) {
|
|
|
130
132
|
`for the stalled-team backstop to reap and file team_failure.`);
|
|
131
133
|
return 'budget_exhausted';
|
|
132
134
|
}
|
|
133
|
-
const message = continuationPreamble(
|
|
135
|
+
const message = continuationPreamble(withWork.length) + buildReEngagementMessage(withWork, issues, armFacts);
|
|
134
136
|
// The lead's reply to this turn is not activity of its own (team-progress-measure.ts).
|
|
135
137
|
noteDaemonPoke(teamState, nowMs);
|
|
136
138
|
const ok = deps.sendMessage(teamState.leadStdin, message);
|
|
@@ -143,7 +145,7 @@ export async function reengageOnIdleResult(args, deps = defaultDeps) {
|
|
|
143
145
|
teamState.lastContinuationProgress = progress;
|
|
144
146
|
}
|
|
145
147
|
log.warn(`[focus-executor] Re-engaged the live lead for "${focusName}" with a continuation turn ` +
|
|
146
|
-
`naming ${
|
|
148
|
+
`naming ${withWork.length} outstanding delivery(ies) (write ok=${ok}, attempt ` +
|
|
147
149
|
`${(teamState.continuationAttempts ?? 0)}/${budget}) -- no reap, no respawn, same session.`);
|
|
148
150
|
return ok ? 'sent' : 'no_live_lead';
|
|
149
151
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lead-continuation.js","sourceRoot":"","sources":["../../src/spawn/lead-continuation.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,iEAAiE;AACjE,gBAAgB;AAyBhB,OAAO,EACL,kBAAkB,IAAI,yBAAyB,EAC/C,cAAc,IAAI,qBAAqB,GACxC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"lead-continuation.js","sourceRoot":"","sources":["../../src/spawn/lead-continuation.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,iEAAiE;AACjE,gBAAgB;AAyBhB,OAAO,EACL,kBAAkB,IAAI,yBAAyB,EAC/C,cAAc,IAAI,qBAAqB,GACxC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,sBAAsB,IAAI,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAC9G,OAAO,EAAE,cAAc,IAAI,qBAAqB,EAAE,MAAM,eAAe,CA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,CAAC;QACF,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAED,MAAM,OAAO,GAAG,oBAAoB,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC7G,uFAAuF;IACvF,cAAc,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACjC,MAAM,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC1D,IAAI,EAAE,EAAE,CAAC;QACP,6EAA6E;QAC7E,8EAA8E;QAC9E,4CAA4C;QAC5C,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;QACrC,SAAS,CAAC,oBAAoB,GAAG,QAAQ,GAAG,CAAC,CAAC;QAC9C,SAAS,CAAC,wBAAwB,GAAG,QAAQ,CAAC;IAChD,CAAC;IACD,GAAG,CAAC,IAAI,CACN,kDAAkD,SAAS,6BAA6B;QACxF,UAAU,QAAQ,CAAC,MAAM,wCAAwC,EAAE,YAAY;QAC/E,GAAG,CAAC,SAAS,CAAC,oBAAoB,IAAI,CAAC,CAAC,IAAI,MAAM,yCAAyC,CAC5F,CAAC;IACF,OAAO,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC;AACtC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by:
|
|
2
|
+
// Pinned by: 28 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/spawn/spawn-cooldown.ts
|
|
3
3
|
// PINNED-BY-END
|
|
4
4
|
import { createLogger } from '../shell/log.js';
|
|
5
5
|
import { resolveRespawnCycleMaxHours, resolveRespawnCycleMaxCount, } from '../verify/stall-detector-config.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by:
|
|
2
|
+
// Pinned by: 238 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/testing/fixtures/index.ts
|
|
3
3
|
// PINNED-BY-END
|
|
4
4
|
/**
|
|
5
5
|
* Build an ActiveFocusRow (a getActiveFocuses row): an active, armed focus with
|
package/dist/types/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by:
|
|
2
|
+
// Pinned by: 240 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/types/index.ts
|
|
3
3
|
// PINNED-BY-END
|
|
4
4
|
/**
|
|
5
5
|
* Domain-specific type re-exports.
|