@telora/daemon 0.24.26 → 0.24.36
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 +6 -3
- package/dist/ci/gate-job-conclusion.d.ts +88 -0
- package/dist/ci/gate-job-conclusion.d.ts.map +1 -0
- package/dist/ci/gate-job-conclusion.js +207 -0
- package/dist/ci/gate-job-conclusion.js.map +1 -0
- package/dist/ci/gate-ref.d.ts +12 -0
- package/dist/ci/gate-ref.d.ts.map +1 -1
- package/dist/ci/gate-ref.js +2 -0
- package/dist/ci/gate-ref.js.map +1 -1
- package/dist/composition/tower-escalation-context.d.ts +3 -0
- package/dist/composition/tower-escalation-context.d.ts.map +1 -1
- package/dist/composition/tower-escalation-context.js +26 -12
- package/dist/composition/tower-escalation-context.js.map +1 -1
- package/dist/composition/verification-context.d.ts.map +1 -1
- package/dist/composition/verification-context.js +13 -2
- package/dist/composition/verification-context.js.map +1 -1
- package/dist/composition/verify-probe-context.d.ts +15 -1
- package/dist/composition/verify-probe-context.d.ts.map +1 -1
- package/dist/composition/verify-probe-context.js +45 -4
- package/dist/composition/verify-probe-context.js.map +1 -1
- package/dist/nexus/escalation-bridge.d.ts.map +1 -1
- package/dist/nexus/escalation-bridge.js +2 -1
- package/dist/nexus/escalation-bridge.js.map +1 -1
- package/dist/nexus/file-escalation.d.ts.map +1 -1
- package/dist/nexus/file-escalation.js +1 -0
- package/dist/nexus/file-escalation.js.map +1 -1
- package/dist/prompt-sections/ci-failed-step-section.d.ts +16 -0
- package/dist/prompt-sections/ci-failed-step-section.d.ts.map +1 -0
- package/dist/prompt-sections/ci-failed-step-section.js +20 -0
- package/dist/prompt-sections/ci-failed-step-section.js.map +1 -0
- package/dist/prompt-sections/prompt-listing.d.ts +3 -0
- package/dist/prompt-sections/prompt-listing.d.ts.map +1 -1
- package/dist/prompt-sections/prompt-listing.js +11 -1
- package/dist/prompt-sections/prompt-listing.js.map +1 -1
- package/dist/prompt-sections/routing-decider-sections.d.ts +7 -0
- package/dist/prompt-sections/routing-decider-sections.d.ts.map +1 -1
- package/dist/prompt-sections/routing-decider-sections.js +22 -0
- package/dist/prompt-sections/routing-decider-sections.js.map +1 -1
- package/dist/queries/api-client/shared.js +1 -1
- package/dist/queries/deliveries/deliveries.js +1 -1
- package/dist/queries/delivery-gate-state/delivery-gate-holds.d.ts.map +1 -1
- package/dist/queries/delivery-gate-state/delivery-gate-holds.js +2 -1
- package/dist/queries/delivery-gate-state/delivery-gate-holds.js.map +1 -1
- package/dist/queries/delivery-gate-state/delivery-gate-state.d.ts +13 -0
- package/dist/queries/delivery-gate-state/delivery-gate-state.d.ts.map +1 -1
- package/dist/queries/delivery-gate-state/delivery-gate-state.js +3 -1
- package/dist/queries/delivery-gate-state/delivery-gate-state.js.map +1 -1
- package/dist/queries/delivery-gate-state/verify-own-holds.d.ts +24 -2
- package/dist/queries/delivery-gate-state/verify-own-holds.d.ts.map +1 -1
- package/dist/queries/delivery-gate-state/verify-own-holds.js.map +1 -1
- package/dist/queries/escalations/cause-key.d.ts.map +1 -1
- package/dist/queries/escalations/cause-key.js +1 -0
- package/dist/queries/escalations/cause-key.js.map +1 -1
- package/dist/queries/escalations/escalations.d.ts.map +1 -1
- package/dist/queries/escalations/escalations.js +2 -1
- package/dist/queries/escalations/escalations.js.map +1 -1
- package/dist/queries/escalations/filing-observation.d.ts +24 -1
- package/dist/queries/escalations/filing-observation.d.ts.map +1 -1
- package/dist/queries/escalations/filing-observation.js +27 -2
- package/dist/queries/escalations/filing-observation.js.map +1 -1
- package/dist/queries/escalations/tower-escalations.d.ts +21 -0
- package/dist/queries/escalations/tower-escalations.d.ts.map +1 -1
- package/dist/queries/escalations/tower-escalations.js +24 -0
- package/dist/queries/escalations/tower-escalations.js.map +1 -1
- package/dist/queries/focus-review/review-criterion-verdicts.d.ts.map +1 -1
- package/dist/queries/focus-review/review-criterion-verdicts.js +3 -0
- package/dist/queries/focus-review/review-criterion-verdicts.js.map +1 -1
- package/dist/queries/focus-review/review-summary-verdicts.d.ts +50 -0
- package/dist/queries/focus-review/review-summary-verdicts.d.ts.map +1 -0
- package/dist/queries/focus-review/review-summary-verdicts.js +117 -0
- package/dist/queries/focus-review/review-summary-verdicts.js.map +1 -0
- package/dist/queries/focuses/focuses.d.ts.map +1 -1
- package/dist/queries/focuses/focuses.js +2 -0
- package/dist/queries/focuses/focuses.js.map +1 -1
- package/dist/queries/reality-tree/reality-tree.d.ts.map +1 -1
- package/dist/queries/reality-tree/reality-tree.js +1 -0
- package/dist/queries/reality-tree/reality-tree.js.map +1 -1
- package/dist/queries/reality-tree/shortfall-node-bindings.d.ts +42 -0
- package/dist/queries/reality-tree/shortfall-node-bindings.d.ts.map +1 -0
- package/dist/queries/reality-tree/shortfall-node-bindings.js +42 -0
- package/dist/queries/reality-tree/shortfall-node-bindings.js.map +1 -0
- package/dist/queries/tower-decisions/tower-decisions.d.ts +3 -1
- package/dist/queries/tower-decisions/tower-decisions.d.ts.map +1 -1
- package/dist/queries/tower-decisions/tower-decisions.js +1 -0
- package/dist/queries/tower-decisions/tower-decisions.js.map +1 -1
- package/dist/queries/verification/verification.js +1 -1
- package/dist/supervision/escalation-filing.js +1 -1
- package/dist/supervision/incident-correlation.d.ts +4 -1
- package/dist/supervision/incident-correlation.d.ts.map +1 -1
- package/dist/supervision/incident-correlation.js +7 -2
- package/dist/supervision/incident-correlation.js.map +1 -1
- package/dist/supervision/stop-registry.d.ts +1 -0
- package/dist/supervision/stop-registry.d.ts.map +1 -1
- package/dist/supervision/stop-rows-delivery.d.ts +10 -0
- package/dist/supervision/stop-rows-delivery.d.ts.map +1 -1
- package/dist/supervision/stop-rows-delivery.js +29 -0
- package/dist/supervision/stop-rows-delivery.js.map +1 -1
- package/dist/testing/fixtures/api-client.js +1 -1
- package/dist/testing/fixtures/index.js +1 -1
- package/dist/testing/fixtures/tower-shortfall-7bac4c82.d.ts +38 -0
- package/dist/testing/fixtures/tower-shortfall-7bac4c82.d.ts.map +1 -0
- package/dist/testing/fixtures/tower-shortfall-7bac4c82.js +67 -0
- package/dist/testing/fixtures/tower-shortfall-7bac4c82.js.map +1 -0
- package/dist/testing/fixtures/tower-shortfall-cd32119b.d.ts +79 -0
- package/dist/testing/fixtures/tower-shortfall-cd32119b.d.ts.map +1 -0
- package/dist/testing/fixtures/tower-shortfall-cd32119b.js +142 -0
- package/dist/testing/fixtures/tower-shortfall-cd32119b.js.map +1 -0
- package/dist/testing/fixtures/verification-deps.d.ts.map +1 -1
- package/dist/testing/fixtures/verification-deps.js +3 -0
- package/dist/testing/fixtures/verification-deps.js.map +1 -1
- package/dist/testing/fixtures/verification-feedback-deps.js +1 -1
- package/dist/tower/tower-escalation-gather.d.ts +24 -0
- package/dist/tower/tower-escalation-gather.d.ts.map +1 -1
- package/dist/tower/tower-escalation-gather.js +29 -1
- package/dist/tower/tower-escalation-gather.js.map +1 -1
- package/dist/tower/tower-escalation-prompt.d.ts +26 -1
- package/dist/tower/tower-escalation-prompt.d.ts.map +1 -1
- package/dist/tower/tower-escalation-prompt.js +76 -8
- package/dist/tower/tower-escalation-prompt.js.map +1 -1
- package/dist/tower/tower-escalation-routing.d.ts +27 -1
- package/dist/tower/tower-escalation-routing.d.ts.map +1 -1
- package/dist/tower/tower-escalation-routing.js +32 -3
- package/dist/tower/tower-escalation-routing.js.map +1 -1
- package/dist/tower/tower-escalation-session.d.ts +29 -6
- package/dist/tower/tower-escalation-session.d.ts.map +1 -1
- package/dist/tower/tower-escalation-session.js +27 -9
- package/dist/tower/tower-escalation-session.js.map +1 -1
- package/dist/tower/tower-escalation-shortfall.d.ts +158 -0
- package/dist/tower/tower-escalation-shortfall.d.ts.map +1 -0
- package/dist/tower/tower-escalation-shortfall.js +452 -0
- package/dist/tower/tower-escalation-shortfall.js.map +1 -0
- package/dist/tower/tower-supervisor-session.d.ts.map +1 -1
- package/dist/tower/tower-supervisor-session.js +1 -0
- package/dist/tower/tower-supervisor-session.js.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/verify/ci-gate/ci-gate-dispatch.d.ts +41 -0
- package/dist/verify/ci-gate/ci-gate-dispatch.d.ts.map +1 -1
- package/dist/verify/ci-gate/ci-gate-dispatch.js +148 -7
- package/dist/verify/ci-gate/ci-gate-dispatch.js.map +1 -1
- package/dist/verify/ci-gate/ci-gate-pin-publish.d.ts +101 -0
- package/dist/verify/ci-gate/ci-gate-pin-publish.d.ts.map +1 -0
- package/dist/verify/ci-gate/ci-gate-pin-publish.js +238 -0
- package/dist/verify/ci-gate/ci-gate-pin-publish.js.map +1 -0
- package/dist/verify/deterministic-gate/verification-deterministic.d.ts +3 -1
- package/dist/verify/deterministic-gate/verification-deterministic.d.ts.map +1 -1
- package/dist/verify/deterministic-gate/verification-deterministic.js +1 -1
- package/dist/verify/deterministic-gate/verification-deterministic.js.map +1 -1
- package/dist/verify/effect-reconciliation/verify-reconciliation.d.ts +11 -0
- package/dist/verify/effect-reconciliation/verify-reconciliation.d.ts.map +1 -1
- package/dist/verify/effect-reconciliation/verify-reconciliation.js +35 -2
- package/dist/verify/effect-reconciliation/verify-reconciliation.js.map +1 -1
- package/dist/verify/effect-reconciliation/verify-restatement.d.ts +4 -0
- package/dist/verify/effect-reconciliation/verify-restatement.d.ts.map +1 -1
- package/dist/verify/effect-reconciliation/verify-restatement.js +3 -3
- package/dist/verify/effect-reconciliation/verify-restatement.js.map +1 -1
- package/dist/verify/engine/reconciliation-step.d.ts +9 -2
- package/dist/verify/engine/reconciliation-step.d.ts.map +1 -1
- package/dist/verify/engine/reconciliation-step.js +26 -3
- package/dist/verify/engine/reconciliation-step.js.map +1 -1
- package/dist/verify/gate-verdicts/commit-verdict-record.d.ts +2 -0
- package/dist/verify/gate-verdicts/commit-verdict-record.d.ts.map +1 -1
- package/dist/verify/gate-verdicts/commit-verdict-record.js +10 -1
- package/dist/verify/gate-verdicts/commit-verdict-record.js.map +1 -1
- package/dist/verify/install-probe/in-repo-publish.d.ts +10 -0
- package/dist/verify/install-probe/in-repo-publish.d.ts.map +1 -1
- package/dist/verify/install-probe/in-repo-publish.js +15 -0
- package/dist/verify/install-probe/in-repo-publish.js.map +1 -1
- package/dist/verify/install-probe/install-probe-tick.d.ts +7 -0
- package/dist/verify/install-probe/install-probe-tick.d.ts.map +1 -1
- package/dist/verify/install-probe/install-probe-tick.js +4 -1
- package/dist/verify/install-probe/install-probe-tick.js.map +1 -1
- package/dist/verify/outcome-routing/incurable-model-hold.d.ts +2 -0
- package/dist/verify/outcome-routing/incurable-model-hold.d.ts.map +1 -1
- package/dist/verify/outcome-routing/incurable-model-hold.js +21 -6
- package/dist/verify/outcome-routing/incurable-model-hold.js.map +1 -1
- package/dist/verify/outcome-routing/repeating-model-hold.d.ts.map +1 -1
- package/dist/verify/outcome-routing/repeating-model-hold.js +13 -7
- package/dist/verify/outcome-routing/repeating-model-hold.js.map +1 -1
- package/dist/verify/outcome-routing/unjudged-node-hold.d.ts +31 -0
- package/dist/verify/outcome-routing/unjudged-node-hold.d.ts.map +1 -0
- package/dist/verify/outcome-routing/unjudged-node-hold.js +134 -0
- package/dist/verify/outcome-routing/unjudged-node-hold.js.map +1 -0
- package/dist/verify/outcome-routing/verification-feedback.d.ts +5 -1
- package/dist/verify/outcome-routing/verification-feedback.d.ts.map +1 -1
- package/dist/verify/outcome-routing/verification-feedback.js +7 -1
- package/dist/verify/outcome-routing/verification-feedback.js.map +1 -1
- package/dist/verify/outcome-routing/verification-model-unavailable-hold.d.ts +4 -0
- package/dist/verify/outcome-routing/verification-model-unavailable-hold.d.ts.map +1 -1
- package/dist/verify/outcome-routing/verification-model-unavailable-hold.js +25 -8
- package/dist/verify/outcome-routing/verification-model-unavailable-hold.js.map +1 -1
- package/dist/verify/outcome-routing/verification-rework-messages.d.ts.map +1 -1
- package/dist/verify/outcome-routing/verification-rework-messages.js +7 -2
- package/dist/verify/outcome-routing/verification-rework-messages.js.map +1 -1
- package/dist/verify/shortfalls/pre-judge-rulings.d.ts.map +1 -1
- package/dist/verify/shortfalls/pre-judge-rulings.js +1 -0
- package/dist/verify/shortfalls/pre-judge-rulings.js.map +1 -1
- package/dist/verify/shortfalls/shortfall-park-escalation.d.ts +9 -2
- package/dist/verify/shortfalls/shortfall-park-escalation.d.ts.map +1 -1
- package/dist/verify/shortfalls/shortfall-park-escalation.js +13 -1
- package/dist/verify/shortfalls/shortfall-park-escalation.js.map +1 -1
- package/dist/verify/shortfalls/shortfall-rulings.d.ts.map +1 -1
- package/dist/verify/shortfalls/shortfall-rulings.js +4 -0
- package/dist/verify/shortfalls/shortfall-rulings.js.map +1 -1
- package/dist/worktree/focus-worktree-state.d.ts.map +1 -1
- package/dist/worktree/focus-worktree-state.js +1 -0
- package/dist/worktree/focus-worktree-state.js.map +1 -1
- package/package.json +2 -2
|
@@ -24,14 +24,29 @@
|
|
|
24
24
|
* supervisor's process, spawn/routing-decider-spawn.ts
|
|
25
25
|
* spawnOneShotJudgementSession, opus, a governor slot, the scoped
|
|
26
26
|
* `tower_supervisor` MCP profile) in the background. The session answers it
|
|
27
|
-
* (telora_agent escalation_answer)
|
|
28
|
-
*
|
|
27
|
+
* (telora_agent escalation_answer), defers it (escalation_defer), or -- on a
|
|
28
|
+
* delivery's verify shortfall the record already shows met -- RULES it
|
|
29
|
+
* (escalation_rule_shortfall: the nodes ruled met, the escalation resolved
|
|
30
|
+
* as answered, shortfall_ruled recorded); each is one attributed edge act
|
|
31
|
+
* that records the decision on the focus.
|
|
32
|
+
*
|
|
33
|
+
* THE DAEMON ATTESTS EVERY SESSION BEFORE IT SPAWNS IT. The session id is
|
|
34
|
+
* minted here and recorded on the row by daemon_escalation_tower_session_start
|
|
35
|
+
* (queries/escalations/tower-escalations.ts attestTowerEscalationSession)
|
|
36
|
+
* before the process starts: the server refuses the supervisor's shortfall
|
|
37
|
+
* ruling for a session the daemon never attested, so an agent cannot claim to
|
|
38
|
+
* be the supervisor by naming an id. An attestation that fails (the row is no
|
|
39
|
+
* longer pending -- 409 -- or the call failed) spawns nothing and costs no
|
|
40
|
+
* attempt; the next sweep retries.
|
|
29
41
|
*
|
|
30
42
|
* AFTER A SESSION the daemon reads the row:
|
|
31
43
|
* - answered -> the answer reaches the team: injected into its live session now
|
|
32
44
|
* (spawn/live-answer-delivery.ts), else read back at its next spawn through
|
|
33
45
|
* the answer re-arm signal the answer wrote; a decision record the edge
|
|
34
46
|
* failed to write is backstopped here (escalation_answered, by the daemon).
|
|
47
|
+
* A RULED escalation reads back answered too (the ruling act resolves it
|
|
48
|
+
* and writes the same re-arm), and its own shortfall_ruled record counts as
|
|
49
|
+
* the decision -- the backstop never adds an escalation_answered beside it.
|
|
35
50
|
* - deferred -> it stands in the operator's inbox.
|
|
36
51
|
* - still pending: a session that CRASHED or timed out -> deferred at once
|
|
37
52
|
* ("crash -> the operator"); one that exited cleanly without deciding is an
|
|
@@ -44,7 +59,7 @@
|
|
|
44
59
|
import type { ResourceGovernor } from '@telora/daemon-core';
|
|
45
60
|
import type { DaemonConfig } from '../types/index.js';
|
|
46
61
|
import type { TowerDecision, TowerDecisionInput } from '../queries/tower-decisions/tower-decisions.js';
|
|
47
|
-
import type { TowerDeferral, TowerEscalationState, TowerPendingEscalation } from '../queries/escalations/tower-escalations.js';
|
|
62
|
+
import type { TowerDeferral, TowerEscalationState, TowerPendingEscalation, TowerSessionAttestation } from '../queries/escalations/tower-escalations.js';
|
|
48
63
|
import { type TowerEscalationRoute } from './tower-escalation-routing.js';
|
|
49
64
|
import { type EscalationContext } from './tower-escalation-prompt.js';
|
|
50
65
|
import type { TowerSupervisorSpawnResult } from './tower-supervisor-session.js';
|
|
@@ -56,9 +71,9 @@ export declare const TOWER_ESCALATION_TIMEOUT_MS: number;
|
|
|
56
71
|
export declare const TOWER_ESCALATION_GOVERNOR_ENGINE = "tower-supervisor";
|
|
57
72
|
/**
|
|
58
73
|
* Tools the escalation session is pre-approved for: reading the worktree, and
|
|
59
|
-
* the Telora reads plus the
|
|
60
|
-
* escalation_answer / escalation_defer).
|
|
61
|
-
* profile is the bound.
|
|
74
|
+
* the Telora reads plus the three acts it decides through (telora_agent
|
|
75
|
+
* escalation_answer / escalation_defer / escalation_rule_shortfall).
|
|
76
|
+
* Pre-approval only; the scoped MCP profile is the bound.
|
|
62
77
|
*/
|
|
63
78
|
export declare const TOWER_ESCALATION_MCP_TOOLS: readonly string[];
|
|
64
79
|
/** A focus as the escalation supervisor reads it. */
|
|
@@ -92,11 +107,17 @@ export interface TowerEscalationSupervisorDeps {
|
|
|
92
107
|
defer: (deferral: TowerDeferral) => Promise<{
|
|
93
108
|
towerDecisionId: string | null;
|
|
94
109
|
}>;
|
|
110
|
+
/** Attest the session about to be spawned for a pending row (daemon_escalation_tower_session_start). Throws when refused. */
|
|
111
|
+
attestSession: (args: {
|
|
112
|
+
escalationId: string;
|
|
113
|
+
supervisorSessionId: string;
|
|
114
|
+
}) => Promise<TowerSessionAttestation>;
|
|
95
115
|
/** The active focuses of one product this daemon runs. */
|
|
96
116
|
listFocuses: (productId: string) => Promise<TowerEscalationFocus[]>;
|
|
97
117
|
focusWorktreePath: (focusId: string) => string | null;
|
|
98
118
|
gatherContext: (args: {
|
|
99
119
|
focus: TowerEscalationFocus;
|
|
120
|
+
escalation: TowerPendingEscalation;
|
|
100
121
|
config: DaemonConfig;
|
|
101
122
|
repoRoot: string;
|
|
102
123
|
}) => Promise<EscalationContext>;
|
|
@@ -135,6 +156,8 @@ export declare function crashed(result: TowerSupervisorSpawnResult): boolean;
|
|
|
135
156
|
export declare function operatorRouteDeferral(route: Extract<TowerEscalationRoute, {
|
|
136
157
|
route: 'operator';
|
|
137
158
|
}>): Pick<TowerDeferral, 'summary' | 'rationale' | 'evidence'>;
|
|
159
|
+
/** The decision kinds that record a supervisor's answered escalation: an answer, or a shortfall ruling (which resolves it as answered). */
|
|
160
|
+
export declare const ANSWERED_DECISION_KINDS: readonly string[];
|
|
138
161
|
/** Pure: whether a pending row belongs to a product this daemon runs. */
|
|
139
162
|
export declare function ownedByThisDaemon(esc: Pick<TowerPendingEscalation, 'productId' | 'focusId'>, productIds: ReadonlySet<string>, focusIds: ReadonlySet<string>): boolean;
|
|
140
163
|
/** The escalation half of the Tower supervisor (one per process). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tower-escalation-session.d.ts","sourceRoot":"","sources":["../../src/tower/tower-escalation-session.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tower-escalation-session.d.ts","sourceRoot":"","sources":["../../src/tower/tower-escalation-session.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACvG,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAuB,KAAK,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC/F,OAAO,EAAwD,KAAK,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAC5H,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAIhF,+FAA+F;AAC/F,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAE/C,yEAAyE;AACzE,eAAO,MAAM,2BAA2B,QAAiB,CAAC;AAE1D,6GAA6G;AAC7G,eAAO,MAAM,gCAAgC,qBAAqB,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,EAAE,SAAS,MAAM,EASvD,CAAC;AAEF,qDAAqD;AACrD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,GAAG,IAA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AACnG,wBAAgB,OAAO,CAAC,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAEnE;AAgBD,kFAAkF;AAClF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,CAAC,oBAAoB,EAAE;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,CAAC,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC,CAQ5J;AAED,2IAA2I;AAC3I,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAA+C,CAAC;AAkHrG,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,IAAI,CAAC,sBAAsB,EAAE,WAAW,GAAG,SAAS,CAAC,EAAE,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,OAAO,CAGrK;AA+CD,qEAAqE;AACrE,MAAM,WAAW,yBAAyB;IACxC,KAAK,IAAI,OAAO,CAAC,0BAA0B,CAAC,CAAC;CAC9C;AAED,6DAA6D;AAC7D,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,6BAA6B,GAAG,yBAAyB,GAAG;IAChH,0EAA0E;IAC1E,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B,CAMA"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
|
|
2
|
-
// Pinned by: packages/daemon/src/tower/tower-escalation-
|
|
2
|
+
// Pinned by: packages/daemon/src/tower/tower-escalation-gather.test.ts,
|
|
3
|
+
// packages/daemon/src/tower/tower-escalation-io-cases.test.ts,
|
|
4
|
+
// packages/daemon/src/tower/tower-escalation-session.test.ts
|
|
3
5
|
// PINNED-BY-END
|
|
4
6
|
import { createLogger } from '../log/daemon-log.js';
|
|
5
7
|
import { routeTeamEscalation } from './tower-escalation-routing.js';
|
|
@@ -13,9 +15,9 @@ export const TOWER_ESCALATION_TIMEOUT_MS = 20 * 60 * 1000;
|
|
|
13
15
|
export const TOWER_ESCALATION_GOVERNOR_ENGINE = 'tower-supervisor';
|
|
14
16
|
/**
|
|
15
17
|
* Tools the escalation session is pre-approved for: reading the worktree, and
|
|
16
|
-
* the Telora reads plus the
|
|
17
|
-
* escalation_answer / escalation_defer).
|
|
18
|
-
* profile is the bound.
|
|
18
|
+
* the Telora reads plus the three acts it decides through (telora_agent
|
|
19
|
+
* escalation_answer / escalation_defer / escalation_rule_shortfall).
|
|
20
|
+
* Pre-approval only; the scoped MCP profile is the bound.
|
|
19
21
|
*/
|
|
20
22
|
export const TOWER_ESCALATION_MCP_TOOLS = [
|
|
21
23
|
'Read', 'Grep', 'Glob',
|
|
@@ -62,13 +64,15 @@ export function operatorRouteDeferral(route) {
|
|
|
62
64
|
evidence: { route: route.reason, detail: route.detail },
|
|
63
65
|
};
|
|
64
66
|
}
|
|
65
|
-
/**
|
|
67
|
+
/** The decision kinds that record a supervisor's answered escalation: an answer, or a shortfall ruling (which resolves it as answered). */
|
|
68
|
+
export const ANSWERED_DECISION_KINDS = ['escalation_answered', 'shortfall_ruled'];
|
|
69
|
+
/** Answered (or ruled): hand the answer to the live team, and backstop the decision record. */
|
|
66
70
|
async function onAnswered(st, esc, focusId, now, sessionId) {
|
|
67
71
|
const delivery = await st.deps.deliverAnswer({ focusId, rearmValues: now.answeredAt ? [now.answeredAt] : [] });
|
|
68
72
|
log.info(`[tower-escalation] the supervisor answered escalation ${esc.escalationId.slice(0, 8)}; ` +
|
|
69
73
|
(delivery.delivered ? 'injected into the live team.' : `no live team took it (${delivery.detail ?? 'none'}); it is read back at the next spawn.`));
|
|
70
74
|
const record = await st.deps.listTowerDecisions(focusId);
|
|
71
|
-
if (record.decisions.some((d) => d.kind
|
|
75
|
+
if (record.decisions.some((d) => ANSWERED_DECISION_KINDS.includes(d.kind) && d.escalationId === esc.escalationId))
|
|
72
76
|
return;
|
|
73
77
|
await st.deps.recordTowerDecision({
|
|
74
78
|
focusId, kind: 'escalation_answered', decidedByKind: 'daemon', escalationId: esc.escalationId,
|
|
@@ -106,7 +110,19 @@ async function settle(st, esc, focus, result, sessionId) {
|
|
|
106
110
|
await deferAs(st, esc, `The Tower supervisor ran ${tried} time(s) without deciding; handed to the operator.`, 'No session answered or deferred it; the daemon stops spending sessions on it and the operator decides.', { ...evidence, attempts: tried });
|
|
107
111
|
}
|
|
108
112
|
}
|
|
109
|
-
/**
|
|
113
|
+
/** Attest the session before it is spawned; false (logged) when refused or failed -- nothing spawns, no attempt is counted. */
|
|
114
|
+
async function attested(st, esc, supervisorSessionId) {
|
|
115
|
+
try {
|
|
116
|
+
await st.deps.attestSession({ escalationId: esc.escalationId, supervisorSessionId });
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
catch (err) {
|
|
120
|
+
log.warn(`[tower-escalation] could not attest session ${supervisorSessionId.slice(0, 8)} for escalation ${esc.escalationId.slice(0, 8)}: ` +
|
|
121
|
+
`${err.message}; nothing spawned, the next sweep retries.`);
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/** One session inside a governor slot: gather, prompt, attest, spawn, settle. */
|
|
110
126
|
async function runSession(st, esc, focus, config) {
|
|
111
127
|
const governor = st.deps.readGovernor();
|
|
112
128
|
let token = null;
|
|
@@ -119,9 +135,11 @@ async function runSession(st, esc, focus, config) {
|
|
|
119
135
|
}
|
|
120
136
|
try {
|
|
121
137
|
const repoRoot = st.deps.focusWorktreePath(focus.focusId) ?? config.repoPath;
|
|
122
|
-
const context = await st.deps.gatherContext({ focus, config, repoRoot });
|
|
138
|
+
const context = await st.deps.gatherContext({ focus, escalation: esc, config, repoRoot });
|
|
123
139
|
const supervisorSessionId = st.deps.newSessionId();
|
|
124
140
|
const prompt = buildTowerEscalationPrompt({ focus, escalation: esc, supervisorSessionId, context });
|
|
141
|
+
if (!(await attested(st, esc, supervisorSessionId)))
|
|
142
|
+
return;
|
|
125
143
|
log.info(`[tower-escalation] deciding escalation ${esc.escalationId.slice(0, 8)} of "${focus.focusName}" (session ${supervisorSessionId.slice(0, 8)}).`);
|
|
126
144
|
const result = await st.deps.spawn({
|
|
127
145
|
config, prompt, cwd: repoRoot, focusId: focus.focusId, escalationId: esc.escalationId,
|
|
@@ -140,7 +158,7 @@ async function step(st, esc, focuses, config) {
|
|
|
140
158
|
return 'in_flight';
|
|
141
159
|
try {
|
|
142
160
|
const focus = esc.focusId ? focuses.get(esc.focusId) ?? null : null;
|
|
143
|
-
const route = routeTeamEscalation({ disposition: esc.disposition, metadata: esc.metadata, focus });
|
|
161
|
+
const route = routeTeamEscalation({ disposition: esc.disposition, metadata: esc.metadata, focus, deliveryId: esc.deliveryId });
|
|
144
162
|
if (route.route === 'operator') {
|
|
145
163
|
const d = operatorRouteDeferral(route);
|
|
146
164
|
await deferAs(st, esc, d.summary, d.rationale, d.evidence);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tower-escalation-session.js","sourceRoot":"","sources":["../../src/tower/tower-escalation-session.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,wEAAwE;AACxE,gBAAgB;AAsDhB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAA6B,MAAM,+BAA+B,CAAC;AAC/F,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAA0B,MAAM,8BAA8B,CAAC;AAG5H,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AAE9C,+FAA+F;AAC/F,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAE/C,yEAAyE;AACzE,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAE1D,6GAA6G;AAC7G,MAAM,CAAC,MAAM,gCAAgC,GAAG,kBAAkB,CAAC;AAEnE;;;;;GAKG;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,EAAE,CAAC;IACrE,OAAO;QACL,KAAK,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC;QAC7B,OAAO,EAAE,KAAK,IAAI,EAAE,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;KACvE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import type { ReviewVerdictRecord } from '../queries/focus-review/review-criterion-verdicts.js';
|
|
2
|
+
import type { ShortfallNodeBinding } from '../queries/reality-tree/shortfall-node-bindings.js';
|
|
3
|
+
/** The act the supervisor rules through (telora_agent action). */
|
|
4
|
+
export declare const SHORTFALL_RULING_ACT = "escalation_rule_shortfall";
|
|
5
|
+
/** How many verdict-bearing reviews under the arm the record reads. */
|
|
6
|
+
export declare const SHORTFALL_REVIEWS_READ = 10;
|
|
7
|
+
/** A gate verdict gate_state records. */
|
|
8
|
+
export interface ShortfallGateVerdict {
|
|
9
|
+
outcome: 'passed' | 'failed';
|
|
10
|
+
sha: string;
|
|
11
|
+
failedStage: string | null;
|
|
12
|
+
/** The gate_state key that carried it. */
|
|
13
|
+
from: string;
|
|
14
|
+
}
|
|
15
|
+
/** One shortfall node, what names it, and what the tree says binds a verdict to it. */
|
|
16
|
+
export interface ShortfallNode {
|
|
17
|
+
nodeId: string;
|
|
18
|
+
/** The outcome the injection declares for it (from the shortfall judgment), when recorded. */
|
|
19
|
+
declared: string | null;
|
|
20
|
+
namedBy: string[];
|
|
21
|
+
/** Whether the tree read found it among the focus's active nodes (false also when the read failed). */
|
|
22
|
+
inTree: boolean;
|
|
23
|
+
/** Its declared future (frt_statement) as the tree holds it; null when it declares none or was not found. */
|
|
24
|
+
future: string | null;
|
|
25
|
+
/** The active effects it is a `sufficient` cause of (N -> E). */
|
|
26
|
+
sufficientEffectIds: string[];
|
|
27
|
+
}
|
|
28
|
+
/** How a review verdict binds to a shortfall node (module header, THE BINDING RULE). */
|
|
29
|
+
export type ShortfallBindingVia = 'tree_verdict_on_node' | 'declared_future' | 'sufficient_effect';
|
|
30
|
+
/** One review verdict the record shows. */
|
|
31
|
+
export interface ShortfallReviewVerdict {
|
|
32
|
+
/** The criterion verbatim, as the review named it: what the act is passed. */
|
|
33
|
+
criterion: string;
|
|
34
|
+
nodeId: string | null;
|
|
35
|
+
/** A tree verdict (keyed to nodeId), or a verdict on one of this delivery's declared criteria. */
|
|
36
|
+
source: 'tree' | 'delivery_criterion';
|
|
37
|
+
verdict: 'met' | 'not_met' | 'excused';
|
|
38
|
+
evidence: string[];
|
|
39
|
+
/** True when only criterion_verdicts carried it (the summary section did not): no evidence is readable. */
|
|
40
|
+
storedOnly: boolean;
|
|
41
|
+
/** True when the stored row and the summary disagree on this verdict. */
|
|
42
|
+
disagrees: boolean;
|
|
43
|
+
/** The shortfall nodes it binds to, and how; [] when it binds none (shown, never counted). */
|
|
44
|
+
binds: Array<{
|
|
45
|
+
nodeId: string;
|
|
46
|
+
via: ShortfallBindingVia;
|
|
47
|
+
}>;
|
|
48
|
+
}
|
|
49
|
+
/** One verdict-bearing review under the arm. */
|
|
50
|
+
export interface ShortfallReview {
|
|
51
|
+
reviewId: string;
|
|
52
|
+
completedAt: string;
|
|
53
|
+
outcome: string;
|
|
54
|
+
reviewedSha: string | null;
|
|
55
|
+
verdicts: ShortfallReviewVerdict[];
|
|
56
|
+
}
|
|
57
|
+
/** What the supervisor is shown about a delivery-anchored escalation's shortfall. */
|
|
58
|
+
export interface ShortfallRecord {
|
|
59
|
+
deliveryId: string;
|
|
60
|
+
deliveryName: string;
|
|
61
|
+
judgedCommit: {
|
|
62
|
+
sha: string;
|
|
63
|
+
source: 'judged_commit' | 'shortfall_reconciliation';
|
|
64
|
+
} | null;
|
|
65
|
+
/** The verdict about the judged commit (a failed one wins); null when none is about it. */
|
|
66
|
+
gateVerdict: ShortfallGateVerdict | null;
|
|
67
|
+
/** Verdicts gate_state carries about OTHER commits (shown, never counted). */
|
|
68
|
+
otherCommitVerdicts: ShortfallGateVerdict[];
|
|
69
|
+
nodes: ShortfallNode[];
|
|
70
|
+
/** The delivery's own acceptance criteria, verbatim. */
|
|
71
|
+
deliveryCriteria: string[];
|
|
72
|
+
/** Newest first; [] when none (or unreadable: see reviewsReadable). */
|
|
73
|
+
reviews: ShortfallReview[];
|
|
74
|
+
reviewsReadable: boolean;
|
|
75
|
+
/** False when the tree read that binds verdicts to the nodes failed. */
|
|
76
|
+
bindingsReadable: boolean;
|
|
77
|
+
}
|
|
78
|
+
/** One node the standing supports ruling met, on the ONE verdict bound to it. */
|
|
79
|
+
export interface ShortfallRuling {
|
|
80
|
+
nodeId: string;
|
|
81
|
+
criterion: string;
|
|
82
|
+
reviewId: string;
|
|
83
|
+
evidence: string[];
|
|
84
|
+
via: ShortfallBindingVia;
|
|
85
|
+
/** The tree node the bound verdict is keyed to (the node itself, or the effect it sustains); null for a declared criterion. */
|
|
86
|
+
verdictNodeId: string | null;
|
|
87
|
+
}
|
|
88
|
+
/** What the standing says, and on what. */
|
|
89
|
+
export type ShortfallStanding = {
|
|
90
|
+
standing: 'rule';
|
|
91
|
+
rulings: ShortfallRuling[];
|
|
92
|
+
unasked: string[];
|
|
93
|
+
} | {
|
|
94
|
+
standing: 'defer';
|
|
95
|
+
reasons: string[];
|
|
96
|
+
unasked: string[];
|
|
97
|
+
};
|
|
98
|
+
/** Pure: the judged commit and the verdicts about it (module header). */
|
|
99
|
+
export declare function judgedGateOf(gateState: unknown): Pick<ShortfallRecord, 'judgedCommit' | 'gateVerdict' | 'otherCommitVerdicts'>;
|
|
100
|
+
/** Pure: the node ids a filing's structured shortfall-ruling ask names (metadata.human_act.shortfall_ruling.node_ids), tolerantly. */
|
|
101
|
+
export declare function filingShortfallNodeIds(metadata: Record<string, unknown>): string[];
|
|
102
|
+
/** How a node the filing's structured ask names is labelled in namedBy. */
|
|
103
|
+
export declare const NAMED_BY_FILING = "the filing";
|
|
104
|
+
/** Pure: the shortfall nodes gate_state and the filing name, each with what names it. */
|
|
105
|
+
export declare function shortfallNodesOf(gateState: unknown, metadata: Record<string, unknown>): ShortfallNode[];
|
|
106
|
+
/** Pure: the shortfall nodes a verdict binds to, by THE BINDING RULE (module header). */
|
|
107
|
+
export declare function bindsOf(v: {
|
|
108
|
+
criterion: string;
|
|
109
|
+
nodeId: string | null;
|
|
110
|
+
}, nodes: readonly ShortfallNode[]): ShortfallReviewVerdict['binds'];
|
|
111
|
+
/**
|
|
112
|
+
* Pure: one review's verdicts the record shows -- tree verdicts that bind a
|
|
113
|
+
* shortfall node, and verdicts on this delivery's declared criteria (each
|
|
114
|
+
* carrying the nodes it binds, possibly none).
|
|
115
|
+
*/
|
|
116
|
+
export declare function shortfallReviewOf(r: ReviewVerdictRecord, nodes: readonly ShortfallNode[], deliveryKeys: ReadonlySet<string>): ShortfallReview;
|
|
117
|
+
/** What the record is built from. */
|
|
118
|
+
export interface ShortfallRecordInput {
|
|
119
|
+
delivery: {
|
|
120
|
+
id: string;
|
|
121
|
+
name: string;
|
|
122
|
+
gateState: unknown;
|
|
123
|
+
acceptanceCriteria: string | null;
|
|
124
|
+
};
|
|
125
|
+
metadata: Record<string, unknown>;
|
|
126
|
+
/** The focus's verdict-bearing reviews under the arm, newest first; null when the read failed. */
|
|
127
|
+
reviews: readonly ReviewVerdictRecord[] | null;
|
|
128
|
+
/** The tree's bindings of the shortfall nodes (queries/reality-tree/shortfall-node-bindings.ts); null when the read failed. */
|
|
129
|
+
bindings: readonly ShortfallNodeBinding[] | null;
|
|
130
|
+
}
|
|
131
|
+
/** Pure: the shortfall nodes with what the tree read says binds a verdict to each. */
|
|
132
|
+
export declare function withBindings(nodes: readonly ShortfallNode[], bindings: readonly ShortfallNodeBinding[] | null): ShortfallNode[];
|
|
133
|
+
/** Pure: the shortfall record. */
|
|
134
|
+
export declare function buildShortfallRecord(input: ShortfallRecordInput): ShortfallRecord;
|
|
135
|
+
/** Pure: the act text a filing's structured human act names (metadata.human_act.act), or null. */
|
|
136
|
+
export declare function filingActOf(metadata: Record<string, unknown>): string | null;
|
|
137
|
+
/** What the excusal check reads: the ask (helpNeeded) and the filing's structured act. */
|
|
138
|
+
export interface ShortfallAsk {
|
|
139
|
+
helpNeeded: string | null;
|
|
140
|
+
/** metadata.human_act.act (filingActOf); null or absent when the filing names no structured act. */
|
|
141
|
+
act?: string | null;
|
|
142
|
+
}
|
|
143
|
+
/** Pure: whether the text asks to EXCUSE or waive a criterion (module header, DECISION). */
|
|
144
|
+
export declare function askExcuses(helpNeeded: string | null): boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Pure: the nodes this ask is a ruling on (module header, THE RULING SCOPE) --
|
|
147
|
+
* the filing's structured nodes when it names any, else every recorded node --
|
|
148
|
+
* and the recorded nodes outside that scope (shown, never counted).
|
|
149
|
+
*/
|
|
150
|
+
export declare function rulingScopeOf(record: ShortfallRecord): {
|
|
151
|
+
scope: ShortfallNode[];
|
|
152
|
+
unasked: string[];
|
|
153
|
+
};
|
|
154
|
+
/** Pure: whether the record supports the supervisor's shortfall ruling (module header). */
|
|
155
|
+
export declare function computeShortfallStanding(record: ShortfallRecord, ask: ShortfallAsk): ShortfallStanding;
|
|
156
|
+
/** Pure: the shortfall section of the escalation prompt. */
|
|
157
|
+
export declare function renderShortfallSection(record: ShortfallRecord, standing: ShortfallStanding): string[];
|
|
158
|
+
//# sourceMappingURL=tower-escalation-shortfall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tower-escalation-shortfall.d.ts","sourceRoot":"","sources":["../../src/tower/tower-escalation-shortfall.ts"],"names":[],"mappings":"AA2FA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAEhG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAE/F,kEAAkE;AAClE,eAAO,MAAM,oBAAoB,8BAA8B,CAAC;AAEhE,uEAAuE;AACvE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