@farmslot/protocol 0.37.0 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/dist/agents/reviewer-context.d.ts +4 -4
- package/dist/agents/reviewer-context.d.ts.map +1 -1
- package/dist/agents/reviewer-context.js +10 -10
- package/dist/agents/reviewer-context.js.map +1 -1
- package/dist/agents/roles.d.ts +2 -2
- package/dist/agents/roles.d.ts.map +1 -1
- package/dist/agents/roles.js +5 -9
- package/dist/agents/roles.js.map +1 -1
- package/dist/checklist-target.d.ts +6 -6
- package/dist/checklist-target.d.ts.map +1 -1
- package/dist/checklist-target.js +11 -11
- package/dist/checklist-target.js.map +1 -1
- package/dist/contracts/acceptance.d.ts +19 -34
- package/dist/contracts/acceptance.d.ts.map +1 -1
- package/dist/contracts/acceptance.js +11 -156
- package/dist/contracts/acceptance.js.map +1 -1
- package/dist/contracts/agents.d.ts +4 -2
- package/dist/contracts/agents.d.ts.map +1 -1
- package/dist/contracts/agents.js +1 -2
- package/dist/contracts/agents.js.map +1 -1
- package/dist/contracts/analytics.d.ts +2 -2
- package/dist/contracts/analytics.d.ts.map +1 -1
- package/dist/contracts/backlog.d.ts +16 -7
- package/dist/contracts/backlog.d.ts.map +1 -1
- package/dist/contracts/backlog.js.map +1 -1
- package/dist/contracts/config.d.ts +12 -3
- package/dist/contracts/config.d.ts.map +1 -1
- package/dist/contracts/config.js +32 -0
- package/dist/contracts/config.js.map +1 -1
- package/dist/contracts/dispatch.d.ts +7 -4
- package/dist/contracts/dispatch.d.ts.map +1 -1
- package/dist/contracts/family.d.ts +2 -2
- package/dist/contracts/family.d.ts.map +1 -1
- package/dist/contracts/gate-park.d.ts +4 -1
- package/dist/contracts/gate-park.d.ts.map +1 -1
- package/dist/contracts/gate-park.js +3 -0
- package/dist/contracts/gate-park.js.map +1 -1
- package/dist/contracts/index.d.ts +1 -0
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +1 -0
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/pr-monitoring.d.ts +9 -9
- package/dist/contracts/pr-monitoring.d.ts.map +1 -1
- package/dist/contracts/pr-rules.d.ts +5 -7
- package/dist/contracts/pr-rules.d.ts.map +1 -1
- package/dist/contracts/pr-rules.js +4 -6
- package/dist/contracts/pr-rules.js.map +1 -1
- package/dist/contracts/qa.d.ts +2 -2
- package/dist/contracts/qa.d.ts.map +1 -1
- package/dist/contracts/qa.js +5 -9
- package/dist/contracts/qa.js.map +1 -1
- package/dist/contracts/recipe-conformance.d.ts +51 -0
- package/dist/contracts/recipe-conformance.d.ts.map +1 -1
- package/dist/contracts/recipe-conformance.js +134 -1
- package/dist/contracts/recipe-conformance.js.map +1 -1
- package/dist/contracts/resources.d.ts +1 -1
- package/dist/contracts/resources.d.ts.map +1 -1
- package/dist/contracts/resources.js.map +1 -1
- package/dist/contracts/reviews.d.ts +19 -3
- package/dist/contracts/reviews.d.ts.map +1 -1
- package/dist/contracts/reviews.js +2 -2
- package/dist/contracts/reviews.js.map +1 -1
- package/dist/contracts/runner-mobile-keys.d.ts +217 -0
- package/dist/contracts/runner-mobile-keys.d.ts.map +1 -0
- package/dist/contracts/runner-mobile-keys.js +189 -0
- package/dist/contracts/runner-mobile-keys.js.map +1 -0
- package/dist/contracts/runs.d.ts +105 -91
- package/dist/contracts/runs.d.ts.map +1 -1
- package/dist/contracts/runs.js +10 -14
- package/dist/contracts/runs.js.map +1 -1
- package/dist/contracts/runtime-capabilities.d.ts +2 -0
- package/dist/contracts/runtime-capabilities.d.ts.map +1 -1
- package/dist/contracts/runtime-capabilities.js.map +1 -1
- package/dist/contracts/template-placeholders.d.ts +0 -6
- package/dist/contracts/template-placeholders.d.ts.map +1 -1
- package/dist/contracts/template-placeholders.js +22 -4
- package/dist/contracts/template-placeholders.js.map +1 -1
- package/dist/contracts/worker-terminal.d.ts +19 -0
- package/dist/contracts/worker-terminal.d.ts.map +1 -1
- package/dist/contracts/worker-terminal.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/integrations/pr-monitoring.d.ts +5 -0
- package/dist/integrations/pr-monitoring.d.ts.map +1 -1
- package/dist/integrations/pr-monitoring.js +54 -9
- package/dist/integrations/pr-monitoring.js.map +1 -1
- package/dist/integrations/pr-rule-config.d.ts.map +1 -1
- package/dist/integrations/pr-rule-config.js +21 -25
- package/dist/integrations/pr-rule-config.js.map +1 -1
- package/dist/integrations/pr-workflow-defaults.d.ts.map +1 -1
- package/dist/integrations/pr-workflow-defaults.js +2 -5
- package/dist/integrations/pr-workflow-defaults.js.map +1 -1
- package/dist/node/pack-portability.d.ts +19 -0
- package/dist/node/pack-portability.d.ts.map +1 -0
- package/dist/node/pack-portability.js +192 -0
- package/dist/node/pack-portability.js.map +1 -0
- package/dist/node/slot-by-repo.d.ts +6 -0
- package/dist/node/slot-by-repo.d.ts.map +1 -1
- package/dist/node/slot-by-repo.js +27 -15
- package/dist/node/slot-by-repo.js.map +1 -1
- package/dist/recipe/artifact.d.ts.map +1 -1
- package/dist/recipe/artifact.js +20 -4
- package/dist/recipe/artifact.js.map +1 -1
- package/dist/recipe/document.d.ts +2 -0
- package/dist/recipe/document.d.ts.map +1 -1
- package/dist/recipe/document.js +38 -35
- package/dist/recipe/document.js.map +1 -1
- package/dist/recipe/evidence.d.ts +128 -0
- package/dist/recipe/evidence.d.ts.map +1 -0
- package/dist/recipe/evidence.js +141 -0
- package/dist/recipe/evidence.js.map +1 -0
- package/dist/recipe/hud-intent.d.ts +56 -0
- package/dist/recipe/hud-intent.d.ts.map +1 -0
- package/dist/recipe/hud-intent.js +46 -0
- package/dist/recipe/hud-intent.js.map +1 -0
- package/dist/recipe/index.d.ts +4 -2
- package/dist/recipe/index.d.ts.map +1 -1
- package/dist/recipe/index.js +4 -2
- package/dist/recipe/index.js.map +1 -1
- package/dist/recipe/recording.d.ts +7 -0
- package/dist/recipe/recording.d.ts.map +1 -1
- package/dist/recipe/recording.js +48 -0
- package/dist/recipe/recording.js.map +1 -1
- package/dist/recipe/workflow.d.ts.map +1 -1
- package/dist/recipe/workflow.js +23 -1
- package/dist/recipe/workflow.js.map +1 -1
- package/dist/recipes/step-io.d.ts +8 -4
- package/dist/recipes/step-io.d.ts.map +1 -1
- package/dist/recipes/step-io.js.map +1 -1
- package/dist/rpc/copilot-runtime.d.ts +1 -1
- package/dist/rpc/copilot-runtime.d.ts.map +1 -1
- package/dist/rpc/dispatch.d.ts +10 -6
- package/dist/rpc/dispatch.d.ts.map +1 -1
- package/dist/rpc/native-session.d.ts +1 -0
- package/dist/rpc/native-session.d.ts.map +1 -1
- package/dist/rpc/native-session.js.map +1 -1
- package/dist/rpc/nodes.d.ts +15 -0
- package/dist/rpc/nodes.d.ts.map +1 -1
- package/dist/rpc/nodes.js +32 -1
- package/dist/rpc/nodes.js.map +1 -1
- package/dist/rpc/registry.d.ts +1 -0
- package/dist/rpc/registry.d.ts.map +1 -1
- package/dist/rpc/registry.js +1 -0
- package/dist/rpc/registry.js.map +1 -1
- package/dist/rpc/roadmap.d.ts +2 -0
- package/dist/rpc/roadmap.d.ts.map +1 -1
- package/dist/rpc/run.d.ts +20 -3
- package/dist/rpc/run.d.ts.map +1 -1
- package/dist/rpc/run.js +1 -0
- package/dist/rpc/run.js.map +1 -1
- package/dist/rpc/slot.d.ts +1 -0
- package/dist/rpc/slot.d.ts.map +1 -1
- package/dist/rpc/tmux.d.ts +10 -0
- package/dist/rpc/tmux.d.ts.map +1 -1
- package/dist/runs/ci-decision-context.d.ts +40 -0
- package/dist/runs/ci-decision-context.d.ts.map +1 -0
- package/dist/runs/ci-decision-context.js +129 -0
- package/dist/runs/ci-decision-context.js.map +1 -0
- package/dist/runs/decision-resolution.d.ts +37 -1
- package/dist/runs/decision-resolution.d.ts.map +1 -1
- package/dist/runs/decision-resolution.js +36 -0
- package/dist/runs/decision-resolution.js.map +1 -1
- package/dist/runs/family-iteration-ledger.js +1 -1
- package/dist/runs/family-iteration-ledger.js.map +1 -1
- package/dist/runs/publish-approval.d.ts +20 -0
- package/dist/runs/publish-approval.d.ts.map +1 -0
- package/dist/runs/publish-approval.js +29 -0
- package/dist/runs/publish-approval.js.map +1 -0
- package/dist/runs/review-chain.d.ts +2 -2
- package/dist/runs/review-chain.d.ts.map +1 -1
- package/dist/runs/review-chain.js +4 -4
- package/dist/runs/review-chain.js.map +1 -1
- package/dist/runs/review-policy.d.ts +9 -0
- package/dist/runs/review-policy.d.ts.map +1 -0
- package/dist/runs/review-policy.js +34 -0
- package/dist/runs/review-policy.js.map +1 -0
- package/dist/runs/review-retries.d.ts +10 -10
- package/dist/runs/review-retries.d.ts.map +1 -1
- package/dist/runs/review-retries.js +17 -22
- package/dist/runs/review-retries.js.map +1 -1
- package/dist/runs/slot-resolution.js +1 -1
- package/dist/runs/slot-resolution.js.map +1 -1
- package/dist/transport/signal.d.ts +3 -3
- package/dist/transport/signal.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +14 -2
- package/schemas/recipe-v1.schema.json +113 -22
- package/scripts/acceptance.d.mts +16 -0
- package/scripts/acceptance.mjs +233 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
// runner-mobile-keys.ts — extra phone terminal keys per runner. The gateway
|
|
2
|
+
// runner registry references each profile from its RunnerDefinition; Companion
|
|
3
|
+
// looks a profile up by runner id. Each key records the CLI build and the
|
|
4
|
+
// documented binding it was read from. Exec-only runners have no profile; an
|
|
5
|
+
// interactive runner with no documented extra keys has an empty one.
|
|
6
|
+
//
|
|
7
|
+
// Inventoried on macpro, 2026-10-10. References are relative to each CLI's
|
|
8
|
+
// installed package. Chords that tmux cannot pass distinctly (Ctrl+I, Ctrl+M,
|
|
9
|
+
// Shift+Enter), a default tmux prefix (Ctrl+B), double Esc sent as one write,
|
|
10
|
+
// and destructive chords are left out.
|
|
11
|
+
import { normalizeRunner } from './runner-ids.js';
|
|
12
|
+
const CLAUDE = 'claude 2.1.296';
|
|
13
|
+
const CLAUDE_KEYMAP = 'default keymap in the @anthropic-ai/claude-code-darwin-arm64 claude binary';
|
|
14
|
+
const CODEX = 'codex-cli 0.162.1';
|
|
15
|
+
const CURSOR = 'cursor-agent 2026.09.28-64d2043';
|
|
16
|
+
const CURSOR_BUNDLE = 'versions/2026.09.28-64d2043/6949.index.js';
|
|
17
|
+
const GROK = 'grok 1.0.50';
|
|
18
|
+
const GROK_DOC = '~/.grok/docs/user-guide/03-keyboard-shortcuts.md';
|
|
19
|
+
const PI = 'pi 0.87.0';
|
|
20
|
+
const PI_DOC = '@earendil-works/pi-coding-agent/docs/keybindings.md';
|
|
21
|
+
export const RUNNER_MOBILE_KEY_PROFILES = {
|
|
22
|
+
claude: {
|
|
23
|
+
runnerId: 'claude',
|
|
24
|
+
label: 'Claude Code',
|
|
25
|
+
inventory: { cliVersion: CLAUDE, reference: `README.md (no key list); ${CLAUDE_KEYMAP}` },
|
|
26
|
+
keys: [
|
|
27
|
+
{
|
|
28
|
+
label: 'Transcript',
|
|
29
|
+
data: '\x0f',
|
|
30
|
+
danger: false,
|
|
31
|
+
chord: 'Ctrl+O',
|
|
32
|
+
source: {
|
|
33
|
+
cliVersion: CLAUDE,
|
|
34
|
+
reference: `${CLAUDE_KEYMAP}: "ctrl+o":"app:toggleTranscript"`,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
label: 'History',
|
|
39
|
+
data: '\x12',
|
|
40
|
+
danger: false,
|
|
41
|
+
chord: 'Ctrl+R',
|
|
42
|
+
source: { cliVersion: CLAUDE, reference: `${CLAUDE_KEYMAP}: "ctrl+r":"history:search"` },
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
label: 'Model',
|
|
46
|
+
data: '\x1bp',
|
|
47
|
+
danger: false,
|
|
48
|
+
chord: 'Meta+P',
|
|
49
|
+
source: { cliVersion: CLAUDE, reference: `${CLAUDE_KEYMAP}: "meta+p":"chat:modelPicker"` },
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
codex: {
|
|
54
|
+
runnerId: 'codex',
|
|
55
|
+
label: 'Codex',
|
|
56
|
+
// The seeded skip keys (Left, Shift+Left, Ctrl+[) are not mapped by any of these sources.
|
|
57
|
+
inventory: {
|
|
58
|
+
cliVersion: CODEX,
|
|
59
|
+
reference: 'README.md, `codex --help`, `codex debug --help` and the app-server JSON schema; none lists key bindings',
|
|
60
|
+
},
|
|
61
|
+
keys: [],
|
|
62
|
+
},
|
|
63
|
+
cursor: {
|
|
64
|
+
runnerId: 'cursor',
|
|
65
|
+
label: 'Cursor Agent',
|
|
66
|
+
inventory: {
|
|
67
|
+
cliVersion: CURSOR,
|
|
68
|
+
reference: `\`cursor-agent --help\` (no key list); ${CURSOR_BUNDLE}`,
|
|
69
|
+
},
|
|
70
|
+
keys: [
|
|
71
|
+
{
|
|
72
|
+
label: 'Expand',
|
|
73
|
+
data: '\x0f',
|
|
74
|
+
danger: false,
|
|
75
|
+
chord: 'Ctrl+O',
|
|
76
|
+
source: { cliVersion: CURSOR, reference: `${CURSOR_BUNDLE}: "ctrl+o to expand"` },
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: 'Review',
|
|
80
|
+
data: '\x12',
|
|
81
|
+
danger: false,
|
|
82
|
+
chord: 'Ctrl+R',
|
|
83
|
+
source: {
|
|
84
|
+
cliVersion: CURSOR,
|
|
85
|
+
reference: `${CURSOR_BUNDLE}: "ctrl+r to review changed files"`,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: 'Newline',
|
|
90
|
+
data: '\n',
|
|
91
|
+
danger: false,
|
|
92
|
+
chord: 'Ctrl+J',
|
|
93
|
+
source: { cliVersion: CURSOR, reference: `${CURSOR_BUNDLE}: "Ctrl+J for newlines"` },
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
// Same byte as the generic Esc key; kept for the question-skip action it names.
|
|
97
|
+
label: 'Skip',
|
|
98
|
+
data: '\x1b',
|
|
99
|
+
danger: false,
|
|
100
|
+
chord: 'Esc',
|
|
101
|
+
source: { cliVersion: CURSOR, reference: `${CURSOR_BUNDLE}: "Esc to skip"` },
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
grok: {
|
|
106
|
+
runnerId: 'grok',
|
|
107
|
+
label: 'Grok',
|
|
108
|
+
inventory: { cliVersion: GROK, reference: GROK_DOC },
|
|
109
|
+
keys: [
|
|
110
|
+
{
|
|
111
|
+
label: 'Palette',
|
|
112
|
+
data: '\x10',
|
|
113
|
+
danger: false,
|
|
114
|
+
chord: 'Ctrl+P',
|
|
115
|
+
source: { cliVersion: GROK, reference: `${GROK_DOC}:247` },
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
label: 'Sessions',
|
|
119
|
+
data: '\x12',
|
|
120
|
+
danger: false,
|
|
121
|
+
chord: 'Ctrl+R',
|
|
122
|
+
source: { cliVersion: GROK, reference: `${GROK_DOC}:253` },
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
label: 'Tasks',
|
|
126
|
+
data: '\x07',
|
|
127
|
+
danger: false,
|
|
128
|
+
chord: 'Ctrl+G',
|
|
129
|
+
source: { cliVersion: GROK, reference: `${GROK_DOC}:258` },
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
label: 'Prev turn',
|
|
133
|
+
data: '\x1b[1;2D',
|
|
134
|
+
danger: false,
|
|
135
|
+
chord: 'Shift+Left',
|
|
136
|
+
source: { cliVersion: GROK, reference: `${GROK_DOC}:36 (scrollback focused)` },
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
label: 'Next turn',
|
|
140
|
+
data: '\x1b[1;2C',
|
|
141
|
+
danger: false,
|
|
142
|
+
chord: 'Shift+Right',
|
|
143
|
+
source: { cliVersion: GROK, reference: `${GROK_DOC}:35 (scrollback focused)` },
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
},
|
|
147
|
+
pi: {
|
|
148
|
+
runnerId: 'pi',
|
|
149
|
+
label: 'Pi',
|
|
150
|
+
inventory: { cliVersion: PI, reference: PI_DOC },
|
|
151
|
+
keys: [
|
|
152
|
+
{
|
|
153
|
+
label: 'Tools',
|
|
154
|
+
data: '\x0f',
|
|
155
|
+
danger: false,
|
|
156
|
+
chord: 'Ctrl+O',
|
|
157
|
+
source: { cliVersion: PI, reference: `${PI_DOC}:163 app.tools.expand` },
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
label: 'Thinking',
|
|
161
|
+
data: '\x14',
|
|
162
|
+
danger: false,
|
|
163
|
+
chord: 'Ctrl+T',
|
|
164
|
+
source: { cliVersion: PI, reference: `${PI_DOC}:157 app.thinking.toggle` },
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
label: 'Follow-up',
|
|
168
|
+
data: '\x1b\r',
|
|
169
|
+
danger: false,
|
|
170
|
+
chord: 'Alt+Enter',
|
|
171
|
+
source: { cliVersion: PI, reference: `${PI_DOC}:165 app.message.followUp` },
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
label: 'Dequeue',
|
|
175
|
+
data: '\x1b[1;3A',
|
|
176
|
+
danger: false,
|
|
177
|
+
chord: 'Alt+Up',
|
|
178
|
+
source: { cliVersion: PI, reference: `${PI_DOC}:166 app.message.dequeue` },
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
const PROFILES_BY_RUNNER = new Map(Object.values(RUNNER_MOBILE_KEY_PROFILES).map((profile) => [profile.runnerId, profile]));
|
|
184
|
+
export function runnerMobileKeyProfile(runnerId) {
|
|
185
|
+
if (!runnerId?.trim())
|
|
186
|
+
return null;
|
|
187
|
+
return PROFILES_BY_RUNNER.get(normalizeRunner(runnerId)) ?? null;
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=runner-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AAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CACxF,CAAC;AAEF,MAAM,UAAU,sBAAsB,CAAC,QAAwB;IAC7D,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE;QAAE,OAAO,IAAI,CAAC;IACnC,OAAO,kBAAkB,CAAC,GAAG,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,IAAI,IAAI,CAAC;AACnE,CAAC"}
|
package/dist/contracts/runs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ArtifactRef,
|
|
1
|
+
import type { ArtifactRef, ReviewIssue } from '../recipes/step-io.js';
|
|
2
2
|
import type { WorkerSignalChecklistEvent, WorkerSignalChecklistTiming, WorkerSignalStatus } from '../transport/signal.js';
|
|
3
3
|
import type { AcceptanceStatusLedger } from './acceptance.js';
|
|
4
4
|
import type { AgentContext, AgentContextTarget, RunnerSessionArchiveRef, SafetyTier, ScriptedRunnerConfig, WorkerTransport } from './agents.js';
|
|
@@ -12,7 +12,8 @@ import type { RuntimeCapabilityProofRequirement } from './runtime-capabilities.j
|
|
|
12
12
|
import type { SlotHealth } from './slots.js';
|
|
13
13
|
import type { SubtaskSource } from './task.js';
|
|
14
14
|
import type { ProfileFitSuggestion, ValidationPlanStep } from './validation-plan.js';
|
|
15
|
-
|
|
15
|
+
import type { DeterministicChecklistCheck } from './worker-terminal.js';
|
|
16
|
+
export type RunStatus = 'created' | 'grading' | 'writing-task' | 'slot-finding' | 'preparing' | 'dispatching' | 'monitoring' | 'reviewing' | 'completing' | 'human-gating' | 'ci-watching' | 'paused' | 'done' | 'blocked' | 'failed' | 'cancelled';
|
|
16
17
|
export declare const TERMINAL_RUN_STATUSES: readonly RunStatus[];
|
|
17
18
|
export declare const ACTIVE_RUN_STATUSES: readonly RunStatus[];
|
|
18
19
|
export declare function isTerminalRunStatus(status: RunStatus): boolean;
|
|
@@ -101,6 +102,7 @@ export interface EvidenceManifestStandalone {
|
|
|
101
102
|
}
|
|
102
103
|
export interface ReviewGatePayload {
|
|
103
104
|
kind: 'review';
|
|
105
|
+
session?: ReviewSessionTrace;
|
|
104
106
|
prNumber: number | null;
|
|
105
107
|
repo: string | null;
|
|
106
108
|
/** PR/project base branch used by the review diff workspace. */
|
|
@@ -120,48 +122,65 @@ export interface ReviewGatePayload {
|
|
|
120
122
|
workerLearnings?: string;
|
|
121
123
|
}
|
|
122
124
|
/** Review evidence retained independently of the decision to publish it. */
|
|
123
|
-
export type RunReviewResult = Pick<ReviewGatePayload, 'recommendation' | 'reviewMd' | 'lineComments' | 'reviewSnapshot' | 'artifactManifest' | 'reviewInputArtifactPaths'>;
|
|
125
|
+
export type RunReviewResult = Pick<ReviewGatePayload, 'recommendation' | 'session' | 'reviewMd' | 'lineComments' | 'reviewSnapshot' | 'artifactManifest' | 'reviewInputArtifactPaths'>;
|
|
124
126
|
export type PublicationTarget = 'draft' | 'ready';
|
|
125
127
|
export type PublicationStatus = 'not_published' | 'pending_publish' | 'published_draft' | 'published_ready' | 'publish_failed';
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
/** Independent review loops required beyond `minimumIndependentReviews`. */
|
|
130
|
-
extraLoopsRequested: number;
|
|
131
|
-
/** V2 counts the first configured loop in the minimum, not again as an extra. */
|
|
132
|
-
countingVersion?: 2;
|
|
128
|
+
/** Publication count policy. Rechecking a review never creates another counted review. */
|
|
129
|
+
export interface ReviewPolicy {
|
|
130
|
+
minimumReviews: number;
|
|
133
131
|
requestedBy: 'dispatch' | 'human-gate' | 'agent-gate';
|
|
134
132
|
}
|
|
135
|
-
/**
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
133
|
+
/** Session and diff range are selected together. A first review is COLD. */
|
|
134
|
+
export type ReviewMode = 'warm' | 'cold';
|
|
135
|
+
export declare const REVIEW_MODES: readonly ReviewMode[];
|
|
136
|
+
export declare const DEFAULT_REVIEW_MODE: ReviewMode;
|
|
137
|
+
export declare function isReviewMode(value: unknown): value is ReviewMode;
|
|
138
|
+
/** The only configurable review dimensions. Null explicitly selects the runner default. */
|
|
139
|
+
export interface ReviewSelection {
|
|
140
|
+
runner: string;
|
|
141
|
+
model: string | null;
|
|
142
|
+
effort: string | null;
|
|
143
|
+
mode: ReviewMode;
|
|
144
|
+
}
|
|
145
|
+
/** Ordered reviewer selections. Array order is the execution order. */
|
|
146
|
+
export type ReviewSequence = ReviewSelection[];
|
|
147
|
+
/** Trusted request provenance, separate from the four configurable choices. */
|
|
148
|
+
export interface ReviewContinuationContext {
|
|
149
|
+
repository: string;
|
|
150
|
+
prNumber: number;
|
|
151
|
+
reviewId: string;
|
|
152
|
+
}
|
|
153
|
+
/** Context rows align with the complete sequence, including the first request row. */
|
|
154
|
+
export interface ReviewRequestContext {
|
|
155
|
+
reviewLineages: Array<ReviewContinuationContext | null>;
|
|
156
|
+
}
|
|
157
|
+
/** One gate receipt contains the first selection and any remaining ordered selections. */
|
|
158
|
+
export interface ReviewRequestPayload extends ReviewSelection {
|
|
159
|
+
sequence?: ReviewSequence;
|
|
160
|
+
context?: ReviewRequestContext;
|
|
161
|
+
}
|
|
146
162
|
export type ReviewValidationDepth = 'static-code' | 'full-live';
|
|
147
|
-
export type ReviewScope = 'incremental' | 'full';
|
|
148
|
-
export declare const REVIEW_SCOPES: readonly ReviewScope[];
|
|
149
|
-
export declare function isReviewScope(value: unknown): value is ReviewScope;
|
|
150
163
|
export declare const REVIEW_VALIDATION_DEPTHS: readonly ReviewValidationDepth[];
|
|
151
164
|
export declare function isReviewValidationDepth(value: unknown): value is ReviewValidationDepth;
|
|
152
165
|
export declare function reviewValidationDepthForLoop(_index: number, _total: number): ReviewValidationDepth;
|
|
153
|
-
/**
|
|
154
|
-
export type
|
|
155
|
-
|
|
156
|
-
export type ReviewSessionContinuity = 'fresh' | 'resumed' | 'fallback-fresh' | 'resume-unconfirmed';
|
|
157
|
-
export type ReviewSessionFallbackReason = 'unsupported-runner' | 'slot-mismatch' | 'runner-mismatch' | 'model-mismatch' | 'missing-session' | 'session-unavailable';
|
|
166
|
+
/** Observed launch provenance, kept separate from user selection. */
|
|
167
|
+
export type ReviewSessionContinuity = 'fresh' | 'resumed' | 'resume-unconfirmed' | 'refused';
|
|
168
|
+
export type ReviewSessionRefusalReason = 'unsupported-runner' | 'repository-mismatch' | 'pr-mismatch' | 'slot-mismatch' | 'runner-mismatch' | 'model-mismatch' | 'effort-mismatch' | 'missing-session' | 'missing-reviewed-head' | 'session-busy' | 'session-unavailable';
|
|
158
169
|
export interface ReviewSessionTrace {
|
|
159
|
-
|
|
170
|
+
mode: ReviewMode;
|
|
160
171
|
continuity: ReviewSessionContinuity;
|
|
172
|
+
/** Durable reviewer lineage, independent of retry and run IDs. */
|
|
173
|
+
reviewId?: string;
|
|
174
|
+
repository?: string;
|
|
175
|
+
prNumber?: number;
|
|
176
|
+
lastReviewedHeadSha?: string;
|
|
177
|
+
runner?: string;
|
|
178
|
+
model?: string | null;
|
|
179
|
+
effort?: string | null;
|
|
161
180
|
priorRunId?: string;
|
|
162
181
|
priorSessionId?: string;
|
|
163
182
|
sessionId?: string;
|
|
164
|
-
|
|
183
|
+
refusalReason?: ReviewSessionRefusalReason;
|
|
165
184
|
}
|
|
166
185
|
/** Frozen summary for one run in a repeated-PR review chain. */
|
|
167
186
|
export interface ReviewChainEntry {
|
|
@@ -173,7 +192,7 @@ export interface ReviewChainEntry {
|
|
|
173
192
|
prNumber: number;
|
|
174
193
|
baseSha?: string;
|
|
175
194
|
headSha?: string;
|
|
176
|
-
|
|
195
|
+
mode: ReviewMode;
|
|
177
196
|
validationDepth: ReviewValidationDepth;
|
|
178
197
|
verdict: string;
|
|
179
198
|
unresolvedCount: number | null;
|
|
@@ -188,7 +207,6 @@ export interface RepeatReviewContext {
|
|
|
188
207
|
version: 1;
|
|
189
208
|
chainId: string;
|
|
190
209
|
generation: number;
|
|
191
|
-
contextMode: 'reuse' | 'fresh';
|
|
192
210
|
priorRunId: string;
|
|
193
211
|
priorFamilyId: string;
|
|
194
212
|
repository: string;
|
|
@@ -197,31 +215,19 @@ export interface RepeatReviewContext {
|
|
|
197
215
|
currentHeadSha: string;
|
|
198
216
|
baseRef?: string;
|
|
199
217
|
verdict: string;
|
|
200
|
-
unresolvedFindings:
|
|
218
|
+
unresolvedFindings: ReviewIssue[];
|
|
201
219
|
artifactRefs: EvidenceManifestEntry[];
|
|
202
220
|
farmslotEvidenceRefs: EvidenceManifestEntry[];
|
|
203
221
|
originatingRunId?: string;
|
|
204
|
-
|
|
222
|
+
mode: ReviewMode;
|
|
205
223
|
validationDepth: ReviewValidationDepth;
|
|
206
|
-
|
|
207
|
-
/** Incremental may resume; every full review resets reviewer reasoning. */
|
|
208
|
-
sessionIntent?: ReviewSessionIntent;
|
|
224
|
+
warmUnavailableReason?: string;
|
|
209
225
|
/** Dispatch-time observation of the requested reviewer-session transition. */
|
|
210
226
|
session?: ReviewSessionTrace;
|
|
211
227
|
/** Completed predecessors, oldest first. The current run is derived from this Run record. */
|
|
212
228
|
priorGenerations?: ReviewChainEntry[];
|
|
213
229
|
}
|
|
214
|
-
export
|
|
215
|
-
order: number;
|
|
216
|
-
runner: 'same' | ReviewRunnerId;
|
|
217
|
-
model?: string | null;
|
|
218
|
-
/** Reasoning / thinking level for this reviewer. Runner-specific (Codex, Grok, PI). */
|
|
219
|
-
effort?: string | null;
|
|
220
|
-
validationDepth?: ReviewValidationDepth;
|
|
221
|
-
/** Resume this run's reviewer context, or reset it before this review generation. */
|
|
222
|
-
sessionIntent?: ReviewSessionIntent;
|
|
223
|
-
}
|
|
224
|
-
export type ReviewRunnerId = 'claude' | 'codex' | 'cursor' | 'grok' | 'opencode' | 'pi';
|
|
230
|
+
export type ReviewRunnerId = string;
|
|
225
231
|
export interface DiffStat {
|
|
226
232
|
files: number;
|
|
227
233
|
additions: number;
|
|
@@ -283,17 +289,19 @@ export interface ReviewLoopTimelineSegment {
|
|
|
283
289
|
startedAt: string;
|
|
284
290
|
completedAt?: string;
|
|
285
291
|
durationMs?: number;
|
|
286
|
-
verdict?:
|
|
292
|
+
verdict?: ReviewAttempt['verdict'];
|
|
287
293
|
unresolvedCount?: number;
|
|
288
294
|
artifactPaths?: string[];
|
|
289
295
|
}
|
|
290
|
-
export interface
|
|
296
|
+
export interface ReviewAttempt {
|
|
297
|
+
mode: ReviewMode;
|
|
298
|
+
session?: ReviewSessionTrace;
|
|
291
299
|
loopNumber: number;
|
|
292
300
|
verdict: 'pending' | 'pass' | 'issues' | 'failed' | 'cancelled' | 'skipped';
|
|
293
301
|
unresolvedCount: number;
|
|
294
302
|
/** Transport/lifecycle explanation when a review did not complete normally. */
|
|
295
303
|
reason?: string;
|
|
296
|
-
issues?:
|
|
304
|
+
issues?: ReviewIssue[];
|
|
297
305
|
validationDepth?: ReviewValidationDepth;
|
|
298
306
|
usage?: RunnerSessionUsage;
|
|
299
307
|
/** Checklist marks and timings captured from this review round's role-scoped signal. */
|
|
@@ -306,21 +314,23 @@ export interface IndependentReviewAttempt {
|
|
|
306
314
|
startedAt?: string;
|
|
307
315
|
completedAt?: string;
|
|
308
316
|
}
|
|
309
|
-
export interface
|
|
317
|
+
export interface ReviewStatus {
|
|
310
318
|
id: string;
|
|
311
|
-
source?: 'dispatch' | 'human-gate' | '
|
|
319
|
+
source?: 'dispatch' | 'human-gate' | 'pipeline';
|
|
312
320
|
runner?: string | null;
|
|
313
321
|
model?: string | null;
|
|
314
322
|
/** Reasoning / thinking level this reviewer launched with. */
|
|
315
323
|
effort?: string | null;
|
|
324
|
+
mode: ReviewMode;
|
|
325
|
+
/** Verified review-session and exact-PR provenance, supplied by the runtime. */
|
|
326
|
+
session?: ReviewSessionTrace;
|
|
316
327
|
reviewerSessionId?: string | null;
|
|
317
|
-
crossRunner: boolean;
|
|
318
328
|
loopNumber: number;
|
|
319
329
|
verdict: 'pending' | 'pass' | 'issues' | 'failed' | 'cancelled' | 'skipped';
|
|
320
330
|
unresolvedCount: number;
|
|
321
331
|
/** Transport/lifecycle explanation when a review did not complete normally. */
|
|
322
332
|
reason?: string;
|
|
323
|
-
issues?:
|
|
333
|
+
issues?: ReviewIssue[];
|
|
324
334
|
validationDepth?: ReviewValidationDepth;
|
|
325
335
|
usage?: RunnerSessionUsage;
|
|
326
336
|
feedbackSent?: boolean;
|
|
@@ -328,11 +338,11 @@ export interface IndependentReviewStatus {
|
|
|
328
338
|
recoveryContinuationPending?: boolean;
|
|
329
339
|
/** Worker-fix attempts already consumed in this review loop. */
|
|
330
340
|
retryCount?: number;
|
|
331
|
-
/** Effective worker-fix cap for this loop (`
|
|
341
|
+
/** Effective worker-fix cap for this loop (`review.max_retries`, raised if Continue Fixing authorizes another pass). */
|
|
332
342
|
maxRetries?: number;
|
|
333
343
|
/** True when the loop stopped because retryCount reached maxRetries with findings still open. */
|
|
334
344
|
maxRetriesExhausted?: boolean;
|
|
335
|
-
attempts?:
|
|
345
|
+
attempts?: ReviewAttempt[];
|
|
336
346
|
artifactPaths?: string[];
|
|
337
347
|
taskProgressArtifactPath?: string;
|
|
338
348
|
timeline?: ReviewLoopTimelineSegment[];
|
|
@@ -385,7 +395,7 @@ export type GateSummaryKind = (typeof GATE_SUMMARY_KINDS)[keyof typeof GATE_SUMM
|
|
|
385
395
|
* review outcomes are the headline; token cost is a supporting section.
|
|
386
396
|
*
|
|
387
397
|
* Built by `buildGateSummary` in the gateway by *projecting* already-captured
|
|
388
|
-
* state ({@link
|
|
398
|
+
* state ({@link ReviewStatus}, {@link RunMetrics}, family runs) — it
|
|
389
399
|
* does not re-derive review state or re-read artifacts.
|
|
390
400
|
*/
|
|
391
401
|
export interface GateSummary {
|
|
@@ -394,7 +404,7 @@ export interface GateSummary {
|
|
|
394
404
|
flowType?: FlowType;
|
|
395
405
|
/** Who owns/authorizes the gate and why (reused from the gate policy). */
|
|
396
406
|
gatePolicy?: GatePolicy;
|
|
397
|
-
/** One-line human narrative, e.g. "Worker done in 55 turns;
|
|
407
|
+
/** One-line human narrative, e.g. "Worker done in 55 turns; review skipped (lightweight dev); 0 reviews triggered re-work." */
|
|
398
408
|
headline?: string;
|
|
399
409
|
worker: {
|
|
400
410
|
model: string | null;
|
|
@@ -440,9 +450,9 @@ export interface GateSummary {
|
|
|
440
450
|
custom?: Record<string, unknown>;
|
|
441
451
|
capturedAt?: string;
|
|
442
452
|
}
|
|
443
|
-
/** Review outcomes for a gate, projected from
|
|
453
|
+
/** Review outcomes for a gate, projected from review + reviews. */
|
|
444
454
|
export interface ReviewSummary {
|
|
445
|
-
|
|
455
|
+
review?: {
|
|
446
456
|
status: 'skipped' | 'done' | 'failed' | 'pending';
|
|
447
457
|
/** Descriptive reason when skipped/failed, e.g. "disabled-lightweight-dev-flow". */
|
|
448
458
|
reason?: string;
|
|
@@ -452,13 +462,12 @@ export interface ReviewSummary {
|
|
|
452
462
|
triggeredReWork: boolean;
|
|
453
463
|
artifactPaths?: string[];
|
|
454
464
|
};
|
|
455
|
-
/** Projected from {@link
|
|
456
|
-
|
|
465
|
+
/** Projected from {@link ReviewStatus} — outcome-first, no raw artifacts. */
|
|
466
|
+
reviews: Array<{
|
|
457
467
|
id: string;
|
|
458
|
-
source?: 'dispatch' | 'human-gate' | '
|
|
468
|
+
source?: 'dispatch' | 'human-gate' | 'pipeline';
|
|
459
469
|
runner?: string | null;
|
|
460
470
|
model?: string | null;
|
|
461
|
-
crossRunner: boolean;
|
|
462
471
|
loopNumber: number;
|
|
463
472
|
verdict: 'pending' | 'pass' | 'issues' | 'failed' | 'cancelled' | 'skipped';
|
|
464
473
|
unresolvedCount: number;
|
|
@@ -470,7 +479,7 @@ export interface ReviewSummary {
|
|
|
470
479
|
startedAt?: string;
|
|
471
480
|
completedAt?: string;
|
|
472
481
|
}>;
|
|
473
|
-
/** Reviews required by the gate's {@link
|
|
482
|
+
/** Reviews required by the gate's {@link ReviewPolicy}, if any. */
|
|
474
483
|
requiredReviews?: number;
|
|
475
484
|
passingReviews: number;
|
|
476
485
|
totalUnresolved: number;
|
|
@@ -489,7 +498,7 @@ export interface GateTokenSummary {
|
|
|
489
498
|
turns: number;
|
|
490
499
|
};
|
|
491
500
|
/**
|
|
492
|
-
* Per
|
|
501
|
+
* Per review (from {@link ReviewStatus.usage}). The
|
|
493
502
|
* input/output/cache split is present when the review's usage record carried
|
|
494
503
|
* it; older entries may only have `total`.
|
|
495
504
|
*/
|
|
@@ -560,7 +569,7 @@ export interface ReadyGatePrPackage {
|
|
|
560
569
|
remoteBranchRef?: string | null;
|
|
561
570
|
headSha?: string;
|
|
562
571
|
diffStat: DiffStat;
|
|
563
|
-
/** Exact worktree diff identity captured with the same scope as
|
|
572
|
+
/** Exact worktree diff identity captured with the same scope as reviews. */
|
|
564
573
|
reviewSnapshot?: ReviewDiffSnapshot;
|
|
565
574
|
draftTitle: string;
|
|
566
575
|
draftBody: string;
|
|
@@ -568,11 +577,13 @@ export interface ReadyGatePrPackage {
|
|
|
568
577
|
selectedEvidenceKeys?: string[];
|
|
569
578
|
validationSummaryPath?: string | null;
|
|
570
579
|
validationSummaryHash?: string | null;
|
|
580
|
+
/** Verified local command receipts for this package's source inputs, ADR-064. */
|
|
581
|
+
deterministicChecks?: DeterministicChecklistCheck[];
|
|
571
582
|
reviewArtifactIds: string[];
|
|
572
583
|
dispatchMode?: 'interactive' | 'autonomous' | 'validation';
|
|
573
584
|
gatePolicy: GatePolicy;
|
|
574
585
|
/** Frozen at package preparation time so approval/review policy cannot drift with config edits. */
|
|
575
|
-
|
|
586
|
+
reviewPolicy?: ReviewPolicy;
|
|
576
587
|
publicationTarget: PublicationTarget;
|
|
577
588
|
publicationStatus: PublicationStatus;
|
|
578
589
|
supersededByPackageId?: string | null;
|
|
@@ -607,8 +618,8 @@ export interface ReadyGatePayload {
|
|
|
607
618
|
recipeQualityArtifact?: RecipeQualityArtifact | null;
|
|
608
619
|
qualityReport?: EvidenceQualityReport | null;
|
|
609
620
|
artifactManifest?: EvidenceManifestEntry[];
|
|
610
|
-
|
|
611
|
-
|
|
621
|
+
reviewVerdict?: string;
|
|
622
|
+
reviewSummary?: string;
|
|
612
623
|
workerLearnings?: string;
|
|
613
624
|
ciChecks?: Array<{
|
|
614
625
|
name: string;
|
|
@@ -638,8 +649,8 @@ export interface ReadyGatePayload {
|
|
|
638
649
|
body: string;
|
|
639
650
|
publishedAt?: string;
|
|
640
651
|
};
|
|
641
|
-
|
|
642
|
-
|
|
652
|
+
reviewPolicy?: ReviewPolicy;
|
|
653
|
+
reviews?: ReviewStatus[];
|
|
643
654
|
reviewLaunchRejection?: PublicationReviewLaunchRejection;
|
|
644
655
|
gatePolicy?: GatePolicy;
|
|
645
656
|
/** Consolidated "what happened to reach this gate" snapshot (worker → reviews → cost). */
|
|
@@ -873,8 +884,8 @@ export interface RetrospectivePayload {
|
|
|
873
884
|
kind: 'retrospective';
|
|
874
885
|
outcome: 'success' | 'failure' | 'partial' | 'cancelled' | 'unknown';
|
|
875
886
|
whatThisIs: string;
|
|
876
|
-
|
|
877
|
-
|
|
887
|
+
reviewVerdict?: string;
|
|
888
|
+
reviewSummary?: string;
|
|
878
889
|
workerLearnings?: string;
|
|
879
890
|
reportExcerpt?: string;
|
|
880
891
|
ciWatch?: {
|
|
@@ -1005,10 +1016,11 @@ export interface RunDecision {
|
|
|
1005
1016
|
triageAssessmentId?: string;
|
|
1006
1017
|
payload?: RunDecisionPayload;
|
|
1007
1018
|
/**
|
|
1008
|
-
*
|
|
1019
|
+
* Detail keys `run.list` left out because their values are large (review
|
|
1009
1020
|
* markdown, input snapshots, PR packages, artifact manifests). Absent on
|
|
1010
1021
|
* `run.get`, `run.forSlot` and every run event, which carry the full
|
|
1011
|
-
* payload;
|
|
1022
|
+
* payload/context; `context.checkSnapshot` also names omitted CI context.
|
|
1023
|
+
* A reader that needs one of these keys fetches the run directly.
|
|
1012
1024
|
*/
|
|
1013
1025
|
payloadTrimmed?: string[];
|
|
1014
1026
|
selectionData?: Record<string, unknown>;
|
|
@@ -2052,7 +2064,8 @@ export interface Run {
|
|
|
2052
2064
|
/** Code breadth for review-pr. Independent from runtime validation depth. */
|
|
2053
2065
|
/** Explicitly finish static review without waiting for operator questions/publication. */
|
|
2054
2066
|
reviewAutoFinish?: boolean;
|
|
2055
|
-
|
|
2067
|
+
reviewMode?: ReviewMode;
|
|
2068
|
+
reviewContext?: ReviewRequestContext;
|
|
2056
2069
|
/** Static by default; full-live is an explicit operator escalation. */
|
|
2057
2070
|
reviewValidationDepth?: ReviewValidationDepth;
|
|
2058
2071
|
/** Frozen provenance for a repeated review of the same canonical PR. */
|
|
@@ -2125,13 +2138,13 @@ export declare function isInteractiveDevRun(run: Pick<Run, 'flowType' | 'mode'>)
|
|
|
2125
2138
|
/** Persisted run-engine state — see ADR-027. */
|
|
2126
2139
|
export interface RunEngineState {
|
|
2127
2140
|
/**
|
|
2128
|
-
* What the last passing review (pipeline
|
|
2141
|
+
* What the last passing review (pipeline review or a publication review)
|
|
2129
2142
|
* judged on the slot: HEAD, the evidence manifest and the evidence files. When
|
|
2130
|
-
* any of them changes,
|
|
2143
|
+
* any of them changes, review must run again before publication is
|
|
2131
2144
|
* approved; the PR description is not part of it. Records taken while the
|
|
2132
2145
|
* description was still included keep matching until HEAD or evidence changes,
|
|
2133
|
-
* except that a description edit on such a record re-runs
|
|
2134
|
-
* `rerunFor` is the changed state
|
|
2146
|
+
* except that a description edit on such a record re-runs review once.
|
|
2147
|
+
* `rerunFor` is the changed state review already ran again for, so it runs
|
|
2135
2148
|
* once per change.
|
|
2136
2149
|
*/
|
|
2137
2150
|
reviewedInputs?: {
|
|
@@ -2199,11 +2212,12 @@ export interface RunEngineState {
|
|
|
2199
2212
|
publicationTarget?: PublicationTarget;
|
|
2200
2213
|
publicationStatus?: PublicationStatus;
|
|
2201
2214
|
prNumber?: number | null;
|
|
2202
|
-
|
|
2203
|
-
|
|
2215
|
+
reviewPolicy?: ReviewPolicy;
|
|
2216
|
+
reviewSequence?: ReviewSequence;
|
|
2217
|
+
reviewSequenceContext?: ReviewRequestContext;
|
|
2204
2218
|
/** Creation time for the current pending plan, used to ignore reviews from earlier work orders. */
|
|
2205
|
-
|
|
2206
|
-
|
|
2219
|
+
reviewSequenceRequestedAt?: string;
|
|
2220
|
+
reviews?: ReviewStatus[];
|
|
2207
2221
|
/** Latest recoverable refusal to launch a publication reviewer. */
|
|
2208
2222
|
reviewLaunchRejection?: PublicationReviewLaunchRejection;
|
|
2209
2223
|
supersededPackageIds?: string[];
|
|
@@ -2293,7 +2307,7 @@ export interface FamilyDiffProvenance {
|
|
|
2293
2307
|
error?: string;
|
|
2294
2308
|
repository?: string;
|
|
2295
2309
|
prNumber?: number;
|
|
2296
|
-
|
|
2310
|
+
reviewMode?: ReviewMode;
|
|
2297
2311
|
}
|
|
2298
2312
|
export declare function isFamilyDiffProvenance(value: unknown): value is FamilyDiffProvenance;
|
|
2299
2313
|
export interface FamilyInputCommitMetadata {
|
|
@@ -2303,7 +2317,7 @@ export interface FamilyInputCommitMetadata {
|
|
|
2303
2317
|
baseSha?: string;
|
|
2304
2318
|
headRef?: string;
|
|
2305
2319
|
headSha?: string;
|
|
2306
|
-
|
|
2320
|
+
reviewMode?: ReviewMode;
|
|
2307
2321
|
capturedAt: string;
|
|
2308
2322
|
source: 'github-pr' | 'local-git' | 'unavailable';
|
|
2309
2323
|
missingReason?: string;
|
|
@@ -2425,7 +2439,7 @@ export declare function normalizeFlowType(value: string | null | undefined): Flo
|
|
|
2425
2439
|
export declare function normalizeCiActionId(actionId: string): string;
|
|
2426
2440
|
export type DevInteractiveProfile = 'lightweight' | 'reviewed';
|
|
2427
2441
|
export declare const DEFAULT_DEV_INTERACTIVE_PROFILE: DevInteractiveProfile;
|
|
2428
|
-
export type DevInteractiveCompletionAction = 'done-no-pr' | 'detect-pr-and-ci-watch' | 'link-pr-and-ci-watch' | 'link-pr-and-pr-complete' | 'run-
|
|
2442
|
+
export type DevInteractiveCompletionAction = 'done-no-pr' | 'detect-pr-and-ci-watch' | 'link-pr-and-ci-watch' | 'link-pr-and-pr-complete' | 'run-review' | 'blocked' | 'failed' | 'abort';
|
|
2429
2443
|
export interface DevInteractiveActionRecord {
|
|
2430
2444
|
action: DevInteractiveCompletionAction;
|
|
2431
2445
|
source: 'operator';
|
|
@@ -2441,7 +2455,7 @@ export declare const PipelineSteps: {
|
|
|
2441
2455
|
readonly PREPARE: "prepare";
|
|
2442
2456
|
readonly DISPATCH: "dispatch";
|
|
2443
2457
|
readonly MONITOR: "monitor";
|
|
2444
|
-
readonly
|
|
2458
|
+
readonly REVIEW: "review";
|
|
2445
2459
|
readonly COMPLETE: "complete";
|
|
2446
2460
|
readonly HUMAN_GATE: "human-gate";
|
|
2447
2461
|
readonly FINALIZE: "finalize";
|