@telora/daemon 0.22.58 → 0.22.72
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/completion/settle-injection-sweep.d.ts +7 -2
- package/dist/completion/settle-injection-sweep.d.ts.map +1 -1
- package/dist/completion/settle-injection-sweep.js +32 -2
- package/dist/completion/settle-injection-sweep.js.map +1 -1
- package/dist/completion/state-cascade.d.ts.map +1 -1
- package/dist/completion/state-cascade.js +35 -4
- package/dist/completion/state-cascade.js.map +1 -1
- package/dist/directive/directive-executor.d.ts.map +1 -1
- package/dist/directive/directive-executor.js +1 -0
- package/dist/directive/directive-executor.js.map +1 -1
- package/dist/focus/focus-executor.d.ts.map +1 -1
- package/dist/focus/focus-executor.js +41 -23
- package/dist/focus/focus-executor.js.map +1 -1
- package/dist/focus/focus-phase.d.ts.map +1 -1
- package/dist/focus/focus-phase.js +2 -1
- package/dist/focus/focus-phase.js.map +1 -1
- package/dist/focus/listener-spawn.d.ts +0 -44
- package/dist/focus/listener-spawn.d.ts.map +1 -1
- package/dist/focus/listener-spawn.js +61 -146
- package/dist/focus/listener-spawn.js.map +1 -1
- package/dist/focus-stage-lifecycle/planning-release.d.ts +3 -2
- package/dist/focus-stage-lifecycle/planning-release.d.ts.map +1 -1
- package/dist/focus-stage-lifecycle/planning-release.js +3 -2
- package/dist/focus-stage-lifecycle/planning-release.js.map +1 -1
- package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts +5 -3
- package/dist/focus-stage-lifecycle/wedge-watchdog.d.ts.map +1 -1
- package/dist/focus-stage-lifecycle/wedge-watchdog.js +8 -5
- package/dist/focus-stage-lifecycle/wedge-watchdog.js.map +1 -1
- package/dist/queries/escalation-suppression.d.ts.map +1 -1
- package/dist/queries/escalation-suppression.js +2 -1
- package/dist/queries/escalation-suppression.js.map +1 -1
- package/dist/queries/focuses.d.ts +26 -0
- package/dist/queries/focuses.d.ts.map +1 -1
- package/dist/queries/focuses.js +36 -0
- package/dist/queries/focuses.js.map +1 -1
- package/dist/queries/shared.js +1 -1
- package/dist/queries/verification.d.ts +14 -2
- package/dist/queries/verification.d.ts.map +1 -1
- package/dist/queries/verification.js +43 -6
- package/dist/queries/verification.js.map +1 -1
- package/dist/reality/reality-writeback.d.ts +28 -0
- package/dist/reality/reality-writeback.d.ts.map +1 -1
- package/dist/reality/reality-writeback.js +30 -0
- package/dist/reality/reality-writeback.js.map +1 -1
- package/dist/shell/control-state.d.ts +6 -5
- package/dist/shell/control-state.d.ts.map +1 -1
- package/dist/shell/control-state.js +6 -5
- package/dist/shell/control-state.js.map +1 -1
- package/dist/spawn/null-role-spawn.d.ts +109 -0
- package/dist/spawn/null-role-spawn.d.ts.map +1 -0
- package/dist/spawn/null-role-spawn.js +94 -0
- package/dist/spawn/null-role-spawn.js.map +1 -0
- package/dist/spawn/worktree-session.d.ts +16 -10
- package/dist/spawn/worktree-session.d.ts.map +1 -1
- package/dist/spawn/worktree-session.js +52 -35
- package/dist/spawn/worktree-session.js.map +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/session.js +1 -2
- package/dist/types/session.js.map +1 -1
- package/dist/verify/stall-detectors.d.ts.map +1 -1
- package/dist/verify/stall-detectors.js +3 -1
- package/dist/verify/stall-detectors.js.map +1 -1
- package/dist/verify/unreviewed-settle-detector.d.ts +108 -0
- package/dist/verify/unreviewed-settle-detector.d.ts.map +1 -0
- package/dist/verify/unreviewed-settle-detector.js +213 -0
- package/dist/verify/unreviewed-settle-detector.js.map +1 -0
- package/dist/verify/verification-boundary-env.d.ts +51 -0
- package/dist/verify/verification-boundary-env.d.ts.map +1 -0
- package/dist/verify/verification-boundary-env.js +63 -0
- package/dist/verify/verification-boundary-env.js.map +1 -0
- package/dist/verify/verification-deps-default.js +2 -1
- package/dist/verify/verification-deps-default.js.map +1 -1
- package/dist/verify/verification-deps.js +1 -1
- package/dist/verify/verification-deps.js.map +1 -1
- package/dist/verify/verification-deterministic.d.ts +11 -1
- package/dist/verify/verification-deterministic.d.ts.map +1 -1
- package/dist/verify/verification-deterministic.js +26 -5
- package/dist/verify/verification-deterministic.js.map +1 -1
- package/dist/verify/verification-engine.d.ts +1 -0
- package/dist/verify/verification-engine.d.ts.map +1 -1
- package/dist/verify/verification-engine.js +28 -4
- package/dist/verify/verification-engine.js.map +1 -1
- package/dist/verify/verification-evidence-unavailable-feedback.d.ts +52 -0
- package/dist/verify/verification-evidence-unavailable-feedback.d.ts.map +1 -0
- package/dist/verify/verification-evidence-unavailable-feedback.js +178 -0
- package/dist/verify/verification-evidence-unavailable-feedback.js.map +1 -0
- package/dist/verify/verification-feedback.d.ts +34 -59
- package/dist/verify/verification-feedback.d.ts.map +1 -1
- package/dist/verify/verification-feedback.js +64 -172
- package/dist/verify/verification-feedback.js.map +1 -1
- package/dist/verify/verify-restatement.d.ts.map +1 -1
- package/dist/verify/verify-restatement.js +2 -1
- package/dist/verify/verify-restatement.js.map +1 -1
- package/package.json +2 -2
- package/dist/spawn/review-role-fallback.d.ts +0 -141
- package/dist/spawn/review-role-fallback.d.ts.map +0 -1
- package/dist/spawn/review-role-fallback.js +0 -114
- package/dist/spawn/review-role-fallback.js.map +0 -1
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by: packages/daemon/src/focus/listener-operator-stop-drop.test.ts,
|
|
3
|
-
// packages/daemon/src/spawn/review-role-fallback.test.ts
|
|
4
|
-
// PINNED-BY-END
|
|
5
|
-
/**
|
|
6
|
-
* Name of the org's auto-seeded, full-codebase agent role used as the reviewer
|
|
7
|
-
* fallback. Every organization gets one on creation (migration
|
|
8
|
-
* seed_default_agent_roles: 'Developer'). Mirrors nexus intake's
|
|
9
|
-
* DEFAULT_INTAKE_ROLE_NAME so review-spawn and intake-spawn share the same
|
|
10
|
-
* zero-config fallback identity.
|
|
11
|
-
*/
|
|
12
|
-
export const DEFAULT_REVIEWER_ROLE_NAME = 'Developer';
|
|
13
|
-
/**
|
|
14
|
-
* Resolve the org's seeded Developer role from an already-loaded roles
|
|
15
|
-
* collection (the listener keeps every org agent role in memory). Returns the
|
|
16
|
-
* first role named DEFAULT_REVIEWER_ROLE_NAME, or undefined when the org has no
|
|
17
|
-
* seeded Developer role (the degenerate case the 'clear' decision handles).
|
|
18
|
-
*
|
|
19
|
-
* Pure and exported for unit testing.
|
|
20
|
-
*/
|
|
21
|
-
export function resolveReviewerFallbackRole(roles) {
|
|
22
|
-
for (const role of roles) {
|
|
23
|
-
if (role.name === DEFAULT_REVIEWER_ROLE_NAME)
|
|
24
|
-
return role;
|
|
25
|
-
}
|
|
26
|
-
return undefined;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Decide what to do with a null-role pending spawn directive.
|
|
30
|
-
*
|
|
31
|
-
* A null assigned_agent_role_id means one of THREE things, and they must be
|
|
32
|
-
* told apart:
|
|
33
|
-
*
|
|
34
|
-
* - An OPERATOR STOP (product_focuses.operator_stopped_at is set): the human
|
|
35
|
-
* pulled the Play toggle to halt the focus. This is authoritative and wins
|
|
36
|
-
* over everything -- when `operatorStopped` is true we `skip` for EVERY
|
|
37
|
-
* sessionType, review included, and regardless of `reopened`. The stop lever
|
|
38
|
-
* must never become the trigger for the path it was meant to stop.
|
|
39
|
-
* - A LIFECYCLE CLEAR of a FINISHED focus (operator_stopped_at null, work not
|
|
40
|
-
* reopened): auto_terminate_focus_team() nulled the role at completion. Here
|
|
41
|
-
* a review directive is a SECOND team that must spawn AFTER completion (spawn
|
|
42
|
-
* under the fallback role, else clear); a coding directive is the intended
|
|
43
|
-
* off-state and is skipped.
|
|
44
|
-
* - A LIFECYCLE CLEAR whose work was REOPENED (operator_stopped_at null,
|
|
45
|
-
* `reopened` true): a review sent completed work back, so the focus is NOT
|
|
46
|
-
* finished -- a coding directive here is NOT the off-state. It must spawn
|
|
47
|
-
* under the fallback role (else clear), the same treatment a review
|
|
48
|
-
* directive gets, so the reopened work resumes instead of stranding on a
|
|
49
|
-
* lifecycle-cleared focus. This is the fact `decideNullRoleSpawn` previously
|
|
50
|
-
* lacked: a coding directive was classified by sessionType ALONE, collapsing
|
|
51
|
-
* "finished" and "reopened" into one skip.
|
|
52
|
-
*
|
|
53
|
-
* With `operatorStopped` false AND `reopened` false the behaviour is
|
|
54
|
-
* byte-identical to before either fact existed.
|
|
55
|
-
*
|
|
56
|
-
* Pure and exported for unit testing (peer of resolveReviewerFallbackRole).
|
|
57
|
-
*/
|
|
58
|
-
export function decideNullRoleSpawn(input) {
|
|
59
|
-
if (input.operatorStopped)
|
|
60
|
-
return { action: 'skip' };
|
|
61
|
-
// A review directive spawns the review team under the fallback (unchanged).
|
|
62
|
-
if (input.sessionType === 'review') {
|
|
63
|
-
return input.fallbackRole
|
|
64
|
-
? { action: 'spawn', role: input.fallbackRole }
|
|
65
|
-
: { action: 'clear' };
|
|
66
|
-
}
|
|
67
|
-
// A coding/undefined directive on reopened work is NOT the off-state: spawn
|
|
68
|
-
// the reopened work under the fallback (else clear), just like a review.
|
|
69
|
-
if (input.reopened) {
|
|
70
|
-
return input.fallbackRole
|
|
71
|
-
? { action: 'spawn', role: input.fallbackRole }
|
|
72
|
-
: { action: 'clear' };
|
|
73
|
-
}
|
|
74
|
-
// A coding/undefined directive on a genuinely finished focus stays the
|
|
75
|
-
// intended off-state.
|
|
76
|
-
return { action: 'skip' };
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Re-announce floor for the null-role "coding off-state" skip warning. The
|
|
80
|
-
* warning is emitted on entry and then AT MOST once per this interval while the
|
|
81
|
-
* block persists -- long enough that a stopped focus does not spin-log every
|
|
82
|
-
* 30s poll, short enough that a block that persists keeps surfacing in the log
|
|
83
|
-
* for as long as it lasts (instead of being announced once and then suppressed
|
|
84
|
-
* forever, which made a genuinely stuck focus indistinguishable from a finished
|
|
85
|
-
* one). 30 minutes.
|
|
86
|
-
*/
|
|
87
|
-
export const NULL_ROLE_SKIP_REANNOUNCE_FLOOR_MS = 30 * 60_000;
|
|
88
|
-
/**
|
|
89
|
-
* Rate-limited re-announce gate for the null-role "coding off-state" skip
|
|
90
|
-
* warning. The listener holds a Map of focus id -> last-announce timestamp (ms)
|
|
91
|
-
* for the current continuous blocked episode; this mutates it and returns
|
|
92
|
-
* whether to emit the warning now:
|
|
93
|
-
*
|
|
94
|
-
* - focus never announced this episode -> record `nowMs` and return true
|
|
95
|
-
* (warn on entry).
|
|
96
|
-
* - last announced >= `floorMs` ago -> record `nowMs` and return true
|
|
97
|
-
* (re-announce: the block persists, keep surfacing it).
|
|
98
|
-
* - last announced < `floorMs` ago -> return false (suppress the per-poll
|
|
99
|
-
* repeat between re-announcements).
|
|
100
|
-
*
|
|
101
|
-
* The listener removes the focus from the map when it resumes (role assigned,
|
|
102
|
-
* directive cleared, or focus leaves the active set), so a later re-entry warns
|
|
103
|
-
* immediately again. `nowMs`/`floorMs` are injectable so the decision is
|
|
104
|
-
* deterministic under test. Pure w.r.t. its inputs (Map + clock in, boolean
|
|
105
|
-
* out) and exported for unit testing without standing up the poll loop.
|
|
106
|
-
*/
|
|
107
|
-
export function shouldWarnNullRoleSkip(lastAnnouncedAt, focusId, nowMs = Date.now(), floorMs = NULL_ROLE_SKIP_REANNOUNCE_FLOOR_MS) {
|
|
108
|
-
const prev = lastAnnouncedAt.get(focusId);
|
|
109
|
-
if (prev !== undefined && nowMs - prev < floorMs)
|
|
110
|
-
return false;
|
|
111
|
-
lastAnnouncedAt.set(focusId, nowMs);
|
|
112
|
-
return true;
|
|
113
|
-
}
|
|
114
|
-
//# sourceMappingURL=review-role-fallback.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"review-role-fallback.js","sourceRoot":"","sources":["../../src/spawn/review-role-fallback.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,4EAA4E;AAC5E,2DAA2D;AAC3D,gBA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