@overdeck/contracts 0.51.0 → 0.61.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/dist/index.mjs CHANGED
@@ -1,6 +1,145 @@
1
1
  import { Effect, Schema, SchemaGetter } from "effect";
2
2
  import * as Rpc from "effect/unstable/rpc/Rpc";
3
3
  import * as RpcGroup from "effect/unstable/rpc/RpcGroup";
4
+ //#region src/backend-pane.ts
5
+ const BackendPane = Schema.Struct({
6
+ /** Stable pane identity: the backend-native pane handle. */
7
+ id: Schema.String,
8
+ /** Overdeck agent id: Herdr `agentId` token or live agent name; tmux session name (PAN-3920). */
9
+ agentId: Schema.optional(Schema.String),
10
+ /** Issue the pane belongs to; absent for operator conversations. */
11
+ issue: Schema.optional(Schema.String),
12
+ role: Schema.Literals([
13
+ "work",
14
+ "worker",
15
+ "review",
16
+ "test",
17
+ "uat",
18
+ "strike",
19
+ "plan"
20
+ ]),
21
+ harness: Schema.String,
22
+ model: Schema.String,
23
+ state: Schema.Literals([
24
+ "idle",
25
+ "working",
26
+ "blocked",
27
+ "done",
28
+ "exited",
29
+ "unknown"
30
+ ]),
31
+ /** Epoch millis the pane entered `state`; drives the `stuck` attention. */
32
+ stateSince: Schema.optional(Schema.Number),
33
+ /** Handle the terminal WebSocket attaches to. */
34
+ terminalId: Schema.optional(Schema.String),
35
+ /** Working directory of the pane (the issue workspace path). */
36
+ workspace: Schema.optional(Schema.String)
37
+ });
38
+ //#endregion
39
+ //#region src/derived-issue-state.ts
40
+ /**
41
+ * The nine pipeline states of the FR-6 table. They are mutually exclusive and
42
+ * resolved in this precedence (highest first), because the underlying facts
43
+ * overlap:
44
+ *
45
+ * closed > merged > ready > changes-requested > in-review > working >
46
+ * parked > planned > backlog
47
+ */
48
+ const IssueState = Schema.Literals([
49
+ "backlog",
50
+ "parked",
51
+ "planned",
52
+ "working",
53
+ "in-review",
54
+ "changes-requested",
55
+ "ready",
56
+ "merged",
57
+ "closed"
58
+ ]);
59
+ /** Something the operator has to look at. Orthogonal to `IssueState`. */
60
+ const IssueAttention = Schema.Literals([
61
+ "needs-you",
62
+ "stuck",
63
+ "api-error"
64
+ ]);
65
+ /** Latest review decision on the PR, as the forge reports it. */
66
+ const PrReviewState = Schema.Literals([
67
+ "approved",
68
+ "changes-requested",
69
+ "review-requested",
70
+ "commented",
71
+ "none"
72
+ ]);
73
+ /** Aggregate check-run conclusion for the PR head. */
74
+ const PrChecksState = Schema.Literals([
75
+ "green",
76
+ "red",
77
+ "pending"
78
+ ]);
79
+ /** The pull request (or merge request) backing an issue. */
80
+ const DerivedPrState = Schema.Struct({
81
+ url: Schema.String,
82
+ number: Schema.Number,
83
+ reviewState: PrReviewState,
84
+ checks: PrChecksState,
85
+ /** Forge mergeability. `null` when the forge has not computed it yet. */
86
+ mergeable: Schema.NullOr(Schema.Boolean)
87
+ });
88
+ /** The issue's feature branch as git reports it. */
89
+ const DerivedBranchState = Schema.Struct({
90
+ name: Schema.String,
91
+ aheadOfMain: Schema.Number,
92
+ pushed: Schema.Boolean
93
+ });
94
+ /** Everything the dashboard needs to render an issue's pipeline position. */
95
+ const DerivedIssueState = Schema.Struct({
96
+ issueId: Schema.String,
97
+ state: IssueState,
98
+ attention: Schema.optional(IssueAttention),
99
+ pr: Schema.optional(DerivedPrState),
100
+ branch: Schema.optional(DerivedBranchState),
101
+ /**
102
+ * No tracker answered for this issue, so `closed` — the top of the
103
+ * precedence — could not be ruled in or out. Present only in that case; an
104
+ * unresolved tracker read is never reported as an open issue.
105
+ */
106
+ trackerUnknown: Schema.optional(Schema.Literal(true))
107
+ });
108
+ const ISSUE_STATES = [
109
+ "backlog",
110
+ "parked",
111
+ "planned",
112
+ "working",
113
+ "in-review",
114
+ "changes-requested",
115
+ "ready",
116
+ "merged",
117
+ "closed"
118
+ ];
119
+ /** Highest precedence first — the order `deriveIssueState` resolves in. */
120
+ const ISSUE_STATE_PRECEDENCE = [
121
+ "closed",
122
+ "merged",
123
+ "ready",
124
+ "changes-requested",
125
+ "in-review",
126
+ "working",
127
+ "parked",
128
+ "planned",
129
+ "backlog"
130
+ ];
131
+ const ISSUE_ATTENTIONS = [
132
+ "needs-you",
133
+ "stuck",
134
+ "api-error"
135
+ ];
136
+ function isIssueState(value) {
137
+ return typeof value === "string" && ISSUE_STATES.includes(value);
138
+ }
139
+ function isIssueAttention(value) {
140
+ return typeof value === "string" && ISSUE_ATTENTIONS.includes(value);
141
+ }
142
+ //#endregion
4
143
  //#region src/types.ts
5
144
  const IssueId = Schema.String;
6
145
  const MEMBERSHIP_UNAVAILABLE_REASONS = [
@@ -29,7 +168,8 @@ const Role = Schema.Literals([
29
168
  "flywheel",
30
169
  "strike",
31
170
  "sequencer",
32
- "knowledge"
171
+ "knowledge",
172
+ "worker"
33
173
  ]);
34
174
  const AgentResolution = Schema.Literals([
35
175
  "working",
@@ -41,52 +181,6 @@ const AgentResolution = Schema.Literals([
41
181
  "abandoned",
42
182
  "api_error"
43
183
  ]);
44
- const ReviewStatusValue = Schema.Literals([
45
- "pending",
46
- "reviewing",
47
- "passed",
48
- "failed",
49
- "blocked",
50
- "skipped"
51
- ]);
52
- const TestStatusValue = Schema.Literals([
53
- "pending",
54
- "testing",
55
- "passed",
56
- "failed",
57
- "skipped",
58
- "dispatch_failed"
59
- ]);
60
- const UatStatusValue = Schema.Literals([
61
- "pending",
62
- "testing",
63
- "passed",
64
- "failed"
65
- ]);
66
- const MergeStatusValue = Schema.Literals([
67
- "pending",
68
- "queued",
69
- "merging",
70
- "verifying",
71
- "merged",
72
- "failed"
73
- ]);
74
- const ReleaseStatusValue = Schema.Literals([
75
- "pending",
76
- "releasing",
77
- "passed",
78
- "failed",
79
- "partial",
80
- "rolled_back",
81
- "skipped"
82
- ]);
83
- const VerificationStatusValue = Schema.Literals([
84
- "pending",
85
- "running",
86
- "passed",
87
- "failed",
88
- "skipped"
89
- ]);
90
184
  const KNOWN_HARNESSES = new Set([
91
185
  "claude-code",
92
186
  "ohmypi",
@@ -276,87 +370,6 @@ const AgentSnapshot = Schema.Struct({
276
370
  runtimeSnapshotSequence: Schema.optional(SequenceNumber)
277
371
  });
278
372
  /** PAN-3151: A recorded cycle in the review convergence tracking series */
279
- const ReviewCycleEntry = Schema.Struct({
280
- cycle: Schema.Number,
281
- runId: Schema.String,
282
- atCommit: Schema.optional(Schema.String),
283
- blockingCount: Schema.Number,
284
- recordedAt: Schema.String
285
- });
286
- const ReviewStatusSnapshot = Schema.Struct({
287
- issueId: IssueId,
288
- reviewStatus: Schema.optional(ReviewStatusValue),
289
- testStatus: Schema.optional(TestStatusValue),
290
- uatStatus: Schema.optional(UatStatusValue),
291
- uatNotes: Schema.optional(Schema.String),
292
- mergeStatus: Schema.optional(MergeStatusValue),
293
- releaseStatus: Schema.optional(ReleaseStatusValue),
294
- releaseNotes: Schema.optional(Schema.String),
295
- verificationStatus: Schema.optional(VerificationStatusValue),
296
- verificationNotes: Schema.optional(Schema.String),
297
- verificationCycleCount: Schema.optional(Schema.Number),
298
- readyForMerge: Schema.optional(Schema.Boolean),
299
- updatedAt: Schema.optional(Schema.String),
300
- prUrl: Schema.optional(Schema.String),
301
- /** Persistent stuck flag — set by divergence guard, cleared by /unstick */
302
- stuck: Schema.optional(Schema.Boolean),
303
- stuckReason: Schema.optional(Schema.String),
304
- stuckAt: Schema.optional(Schema.String),
305
- stuckDetails: Schema.optional(Schema.String),
306
- /** PAN-3151: review cycle history for convergence detection */
307
- reviewCycleHistory: Schema.optional(Schema.Array(ReviewCycleEntry)),
308
- /** Commit SHA at which review passed; deacon uses this to detect new pushes after review */
309
- reviewedAtCommit: Schema.optional(Schema.String),
310
- /** Commit SHA at which the pre-review verification gate last passed */
311
- lastVerifiedCommit: Schema.optional(Schema.String),
312
- /** Current merge pipeline step (granular visibility for the merge step tracker) */
313
- mergeStep: Schema.optional(Schema.String),
314
- /** PAN-699: timestamp when review agents were dispatched */
315
- reviewSpawnedAt: Schema.optional(Schema.String),
316
- /** PAN-699: number of test-agent dispatch retries */
317
- testRetryCount: Schema.optional(Schema.Number),
318
- /** PAN-794: parallel-review re-dispatch retry counter (current recovery cycle) */
319
- reviewRetryCount: Schema.optional(Schema.Number),
320
- /** PAN-796: review auto-requeue count (circuit breaker threshold) */
321
- autoRequeueCount: Schema.optional(Schema.Number),
322
- /** PAN-794: ISO timestamp marking the start of the current recovery cycle */
323
- recoveryStartedAt: Schema.optional(Schema.String),
324
- /** Human-requested patrol opt-out — when true, Deacon ignores this issue. */
325
- deaconIgnored: Schema.optional(Schema.Boolean),
326
- deaconIgnoredAt: Schema.optional(Schema.String),
327
- deaconIgnoredReason: Schema.optional(Schema.String),
328
- /** PAN-1691: per-issue auto-merge routing key. undefined = project default, true = auto-merge (fast lane), false = hold for UAT. */
329
- autoMerge: Schema.optional(Schema.Boolean),
330
- /** Active review orchestrator tmux session name (e.g. agent-pan-540-review). */
331
- reviewCoordinatorSessionName: Schema.optional(Schema.String),
332
- /** Active review sub-role tmux session names (e.g. agent-pan-540-review-correctness). Discovered at emission time. */
333
- reviewSessionNames: Schema.optional(Schema.Array(Schema.String)),
334
- /** Per-role review completion status (keyed by role: 'correctness' | 'security' | ...) */
335
- reviewSubStatuses: Schema.optional(Schema.Record(Schema.String, Schema.Literals(["running", "done"]))),
336
- /** PAN-905: queue position in the merge queue */
337
- queuePosition: Schema.optional(Schema.Number),
338
- /** PAN-905: currently active specialist (e.g. 'merge-agent') */
339
- activeSpecialist: Schema.optional(Schema.String),
340
- /** PAN-905: number of merge retries attempted */
341
- mergeRetryCount: Schema.optional(Schema.Number),
342
- /** PAN-905: free-form notes about the merge attempt */
343
- mergeNotes: Schema.optional(Schema.String),
344
- /** Merge blocker reasons surfaced to operators. */
345
- blockerReasons: Schema.optional(Schema.Array(Schema.Struct({
346
- type: Schema.Literals([
347
- "failing_checks",
348
- "merge_conflict",
349
- "unresolved_conversations",
350
- "changes_requested",
351
- "draft_pr",
352
- "not_mergeable",
353
- "unmerged_sibling_repo"
354
- ]),
355
- summary: Schema.String,
356
- details: Schema.optional(Schema.String),
357
- detectedAt: Schema.String
358
- })))
359
- });
360
373
  const TurnDiffFileChange = Schema.Struct({
361
374
  path: Schema.String,
362
375
  kind: Schema.optional(Schema.String),
@@ -482,7 +495,10 @@ const DashboardSnapshot = Schema.Struct({
482
495
  sequence: SequenceNumber,
483
496
  agents: Schema.Array(AgentSnapshot),
484
497
  specialists: Schema.Array(Schema.Unknown),
485
- reviewStatuses: Schema.Array(ReviewStatusSnapshot),
498
+ /** PAN-3917 FR-6: the derived pipeline state of every known issue. */
499
+ derivedIssueStates: Schema.Array(DerivedIssueState),
500
+ /** PAN-3917 FR-12: every live agent pane the terminal backend reports. */
501
+ backendPanes: Schema.Array(BackendPane),
486
502
  issues: Schema.Array(Schema.Unknown),
487
503
  recentActivity: Schema.optional(Schema.Array(Schema.Unknown)),
488
504
  resources: Schema.optional(Schema.Unknown),
@@ -497,13 +513,6 @@ const DashboardSnapshot = Schema.Struct({
497
513
  restartGate: Schema.optional(RestartGateSnapshot),
498
514
  timestamp: Schema.String
499
515
  });
500
- const WorkspaceDetail = Schema.Struct({
501
- workspace: Schema.Unknown,
502
- reviewStatus: Schema.Unknown,
503
- planning: Schema.Unknown,
504
- costs: Schema.Unknown,
505
- agentOutput: Schema.Array(Schema.String)
506
- });
507
516
  const ResourceStats = Schema.Struct({ containers: Schema.Array(Schema.Struct({
508
517
  name: Schema.String,
509
518
  cpu: Schema.optional(Schema.String),
@@ -588,14 +597,6 @@ const SessionNode = Schema.Struct({
588
597
  "tmux",
589
598
  "supervisor"
590
599
  ])),
591
- paused: Schema.optional(Schema.Boolean),
592
- pausedReason: Schema.optional(Schema.String),
593
- pausedAt: Schema.optional(Schema.String),
594
- troubled: Schema.optional(Schema.Boolean),
595
- troubledAt: Schema.optional(Schema.String),
596
- troubledReason: Schema.optional(Schema.String),
597
- consecutiveFailures: Schema.optional(Schema.Number),
598
- queuedMailCount: Schema.optional(Schema.Number),
599
600
  modelOrigin: Schema.optional(ModelOrigin)
600
601
  });
601
602
  const FeatureNode = Schema.Struct({
@@ -1735,16 +1736,32 @@ const PlanItemsUnblockedEvent = Schema.Struct({
1735
1736
  items: Schema.Array(Schema.String)
1736
1737
  })
1737
1738
  });
1738
- /** Replaces socket.io `pipeline:status` */
1739
- const PipelineStatusChangedEvent = Schema.Struct({
1740
- type: Schema.Literal("pipeline.status_changed"),
1739
+ /**
1740
+ * PAN-3917 FR-6 — an issue's derived pipeline state changed.
1741
+ *
1742
+ * Emitted with `emitOnly`: derived state is recomputed from the tracker, the
1743
+ * forge and the terminal backend on every boot, so persisting it would be
1744
+ * storing a status Overdeck can derive.
1745
+ */
1746
+ const IssueStateChangedEvent = Schema.Struct({
1747
+ type: Schema.Literal("issue_state.changed"),
1741
1748
  sequence: SequenceNumber,
1742
1749
  timestamp: Schema.String,
1743
- payload: Schema.Struct({
1744
- issueId: IssueId,
1745
- workspaceId: Schema.optional(Schema.String),
1746
- status: ReviewStatusSnapshot
1747
- })
1750
+ payload: Schema.Struct({ issueState: DerivedIssueState })
1751
+ });
1752
+ /** PAN-3917 FR-12 — a live agent pane appeared or changed. `emitOnly`. */
1753
+ const BackendPaneChangedEvent = Schema.Struct({
1754
+ type: Schema.Literal("backend_pane.changed"),
1755
+ sequence: SequenceNumber,
1756
+ timestamp: Schema.String,
1757
+ payload: Schema.Struct({ pane: BackendPane })
1758
+ });
1759
+ /** PAN-3917 FR-12 — a pane left the backend inventory. `emitOnly`. */
1760
+ const BackendPaneRemovedEvent = Schema.Struct({
1761
+ type: Schema.Literal("backend_pane.removed"),
1762
+ sequence: SequenceNumber,
1763
+ timestamp: Schema.String,
1764
+ payload: Schema.Struct({ paneId: Schema.String })
1748
1765
  });
1749
1766
  /** Replaces socket.io `merge:ready` */
1750
1767
  const MergeReadyEvent = Schema.Struct({
@@ -1756,17 +1773,6 @@ const MergeReadyEvent = Schema.Struct({
1756
1773
  workspaceId: Schema.optional(Schema.String)
1757
1774
  })
1758
1775
  });
1759
- /** New — review status changed */
1760
- const ReviewStatusChangedEvent = Schema.Struct({
1761
- type: Schema.Literal("review.status_changed"),
1762
- sequence: SequenceNumber,
1763
- timestamp: Schema.String,
1764
- payload: Schema.Struct({
1765
- issueId: IssueId,
1766
- workspaceId: Schema.optional(Schema.String),
1767
- status: ReviewStatusSnapshot
1768
- })
1769
- });
1770
1776
  /** New — review specialist dispatched */
1771
1777
  const PipelineReviewStartedEvent = Schema.Struct({
1772
1778
  type: Schema.Literal("pipeline.review-started"),
@@ -2605,9 +2611,10 @@ const DomainEvent = Schema.Union([
2605
2611
  PlanItemStatusChangedEvent,
2606
2612
  PlanSubitemStatusChangedEvent,
2607
2613
  PlanItemsUnblockedEvent,
2608
- PipelineStatusChangedEvent,
2614
+ IssueStateChangedEvent,
2615
+ BackendPaneChangedEvent,
2616
+ BackendPaneRemovedEvent,
2609
2617
  MergeReadyEvent,
2610
- ReviewStatusChangedEvent,
2611
2618
  PipelineReviewStartedEvent,
2612
2619
  PipelineReviewCompletedEvent,
2613
2620
  PipelineTestStartedEvent,
@@ -2837,248 +2844,66 @@ const OpenInEditorInput = Schema.Struct({
2837
2844
  editor: EditorIdSchema
2838
2845
  });
2839
2846
  //#endregion
2840
- //#region src/flywheel.ts
2841
- const FlywheelRunId = Schema.String.check(Schema.isPattern(/^RUN-\d+$/));
2842
- const FlywheelHttpUrl = Schema.String.check(Schema.isPattern(/^https?:\/\/\S+$/i));
2843
- const FlywheelHarness = Schema.Literals([
2844
- "claude-code",
2845
- "pi",
2846
- "ohmypi",
2847
- "codex",
2848
- "acp",
2849
- "kimi-code",
2850
- "opencode",
2851
- "muse"
2852
- ]);
2853
- const FlywheelEffort = Schema.Literals([
2854
- "low",
2855
- "medium",
2856
- "high",
2857
- "xhigh",
2858
- "max"
2859
- ]);
2860
- const FlywheelOrchestrator = Schema.Struct({
2861
- harness: FlywheelHarness,
2862
- model: Schema.String,
2863
- effort: FlywheelEffort,
2864
- ctxPercent: Schema.Number
2847
+ //#region src/rpc.ts
2848
+ const WS_METHODS = {
2849
+ scanConversations: "pan.scanConversations",
2850
+ searchConversations: "pan.searchConversations",
2851
+ listDiscoveredSessions: "pan.listDiscoveredSessions",
2852
+ listSessionsFeed: "pan.listSessionsFeed",
2853
+ getSessionsFeedFacets: "pan.getSessionsFeedFacets",
2854
+ getDiscoveredSession: "pan.getDiscoveredSession",
2855
+ enrichSessions: "pan.enrichSessions",
2856
+ embedSessions: "pan.embedSessions",
2857
+ getConversationCost: "pan.getConversationCost",
2858
+ getConversationCostByWorkspace: "pan.getConversationCostByWorkspace",
2859
+ getConversationStats: "pan.getConversationStats",
2860
+ subscribeDomainEvents: "pan.subscribeDomainEvents",
2861
+ subscribeIssueEvents: "pan.subscribeIssueEvents",
2862
+ subscribeTerminal: "pan.subscribeTerminal",
2863
+ subscribeAgentOutput: "pan.subscribeAgentOutput",
2864
+ subscribeConversationMessages: "pan.subscribeConversationMessages",
2865
+ subscribeProjectSessionTree: "pan.subscribeProjectSessionTree",
2866
+ getSnapshot: "pan.getSnapshot",
2867
+ replayEvents: "pan.replayEvents",
2868
+ readWorkspaceFile: "pan.readWorkspaceFile",
2869
+ readFileAtPath: "pan.readFileAtPath",
2870
+ writeFileAtPath: "pan.writeFileAtPath",
2871
+ resolveFilePathExists: "pan.resolveFilePathExists",
2872
+ terminalOpen: "pan.terminalOpen",
2873
+ terminalWrite: "pan.terminalWrite",
2874
+ terminalResize: "pan.terminalResize",
2875
+ terminalClose: "pan.terminalClose",
2876
+ startPlanning: "pan.startPlanning",
2877
+ startAgent: "pan.startAgent",
2878
+ deepWipe: "pan.deepWipe",
2879
+ sendTerminalInput: "pan.sendTerminalInput",
2880
+ resizeTerminal: "pan.resizeTerminal",
2881
+ shellOpenInEditor: "pan.shellOpenInEditor",
2882
+ getAvailableEditors: "pan.getAvailableEditors"
2883
+ };
2884
+ var PanRpcError = class extends Schema.TaggedErrorClass()("PanRpcError", {
2885
+ message: Schema.String,
2886
+ code: Schema.optional(Schema.String)
2887
+ }) {};
2888
+ const TerminalOutput = Schema.Struct({
2889
+ sessionName: Schema.String,
2890
+ data: Schema.String
2865
2891
  });
2866
- const FlywheelScope = Schema.Literals(["pan-only", "all-tracked-projects"]);
2867
- const FlywheelHeadline = Schema.Struct({
2868
- bugsFixed: Schema.Number,
2869
- swarmItemsMerged: Schema.Number,
2870
- swarmItemsTotal: Schema.Number,
2871
- prsMerged: Schema.Number,
2872
- awaitingUat: Schema.Number
2892
+ const AgentOutput = Schema.Struct({
2893
+ agentId: Schema.String,
2894
+ line: Schema.String
2873
2895
  });
2874
- /**
2875
- * Pipeline verbs — display state only. They no longer gate the merge queue.
2876
- *
2877
- * History worth keeping (PAN-1736 / PAN-1759): the merge queue used to be
2878
- * derived by filtering these verbs, treating only "shipping" or "merging" as
2879
- * "at the merge gate". Any other verb on an issue that was ready_for_merge in
2880
- * the review DB silently dropped it from the queue and from UAT batch
2881
- * assembly — RUN-18 shipped an empty queue with five ready issues exactly that
2882
- * way — and the queue existed only while a run was emitting a pipeline at all.
2883
- *
2884
- * PAN-1696 removed that coupling. The ready set is now sourced from the
2885
- * review-status records per project (`listEligibleCandidatesByProject` +
2886
- * `computeMergeQueueFromCandidates` in src/lib/flywheel-merge-order.ts), which
2887
- * needs no flywheel run and cannot be affected by which verb an orchestrator
2888
- * chose to report. Adding a verb here therefore has no merge-queue consequence;
2889
- * it only changes what the dashboard displays.
2890
- */
2891
- const FlywheelPipelineVerb = Schema.Literals([
2892
- "planning",
2893
- "working",
2894
- "reviewing",
2895
- "testing",
2896
- "shipping",
2897
- "merging",
2898
- "blocked",
2899
- "parked"
2900
- ]);
2901
- const FlywheelPipelineStatus = Schema.Literals([
2902
- "queued",
2903
- "running",
2904
- "blocked",
2905
- "passed",
2906
- "failed",
2907
- "merged",
2908
- "parked"
2909
- ]);
2910
- const FlywheelPipelineItem = Schema.Struct({
2911
- issueId: Schema.String,
2912
- title: Schema.String,
2913
- verb: FlywheelPipelineVerb,
2914
- status: FlywheelPipelineStatus,
2915
- progressPercent: Schema.optional(Schema.Number),
2916
- agentId: Schema.optional(Schema.String),
2917
- pr: Schema.optional(Schema.Number),
2918
- mergeOrder: Schema.optional(Schema.Number),
2919
- conflictsWith: Schema.optional(Schema.Array(Schema.String))
2920
- });
2921
- const FlywheelSubstrateBugStatus = Schema.Literals([
2922
- "filed",
2923
- "fixed",
2924
- "workaround"
2925
- ]);
2926
- const FlywheelSubstrateBug = Schema.Struct({
2927
- issueId: Schema.String,
2928
- title: Schema.String,
2929
- status: FlywheelSubstrateBugStatus,
2930
- commitSha: Schema.optional(Schema.String),
2931
- url: Schema.optional(FlywheelHttpUrl)
2932
- });
2933
- const FlywheelAgentStatus = Schema.Literals([
2934
- "starting",
2935
- "running",
2936
- "waiting",
2937
- "idle",
2938
- "stopped",
2939
- "error"
2940
- ]);
2941
- const FlywheelAgent = Schema.Struct({
2942
- id: Schema.String,
2943
- label: Schema.String,
2944
- status: FlywheelAgentStatus,
2945
- issueId: Schema.optional(Schema.String),
2946
- role: Schema.optional(Schema.String),
2947
- model: Schema.optional(Schema.String),
2948
- ctxPercent: Schema.optional(Schema.Number),
2949
- currentAction: Schema.optional(Schema.String)
2950
- });
2951
- const FlywheelParkedItem = Schema.Struct({
2952
- issueId: Schema.String,
2953
- title: Schema.String,
2954
- reason: Schema.String,
2955
- parkedAt: Schema.optional(Schema.String)
2956
- });
2957
- const FlywheelSuggestionAction = Schema.Literals([
2958
- "start",
2959
- "resume",
2960
- "plan",
2961
- "review",
2962
- "merge",
2963
- "unblock",
2964
- "park",
2965
- "investigate",
2966
- "wait"
2967
- ]);
2968
- const FlywheelSuggestionPriority = Schema.Literals([
2969
- "urgent",
2970
- "high",
2971
- "medium",
2972
- "low"
2973
- ]);
2974
- const FlywheelSuggestion = Schema.Struct({
2975
- action: FlywheelSuggestionAction,
2976
- issueId: Schema.optional(Schema.String),
2977
- rationale: Schema.String,
2978
- priority: FlywheelSuggestionPriority,
2979
- filedBy: Schema.optional(Schema.Literals(["agent", "operator"])),
2980
- weight: Schema.optional(Schema.Number),
2981
- weightReason: Schema.optional(Schema.String)
2982
- });
2983
- const FlywheelSystemStatus = Schema.Struct({
2984
- mainHead: Schema.String,
2985
- ramUsedMb: Schema.Number,
2986
- ramTotalMb: Schema.Number,
2987
- swapUsedMb: Schema.Number,
2988
- swapTotalMb: Schema.Number,
2989
- agentsActive: Schema.Number,
2990
- agentsCap: Schema.Number
2991
- });
2992
- const FlywheelOrders = Schema.Struct({
2993
- bookId: Schema.String,
2994
- bookName: Schema.String,
2995
- landed: Schema.Number,
2996
- total: Schema.Number,
2997
- laneAInFlight: Schema.Array(Schema.String),
2998
- laneBInFlight: Schema.optional(Schema.String),
2999
- drained: Schema.Boolean
3000
- });
3001
- const FlywheelStatus = Schema.Struct({
3002
- runId: FlywheelRunId,
3003
- startedAt: Schema.String,
3004
- elapsedMs: Schema.Number,
3005
- orchestrator: FlywheelOrchestrator,
3006
- headline: FlywheelHeadline,
3007
- activePipeline: Schema.Array(FlywheelPipelineItem),
3008
- substrateBugs: Schema.Array(FlywheelSubstrateBug),
3009
- agents: Schema.Array(FlywheelAgent),
3010
- parked: Schema.Array(FlywheelParkedItem),
3011
- suggestions: Schema.Array(FlywheelSuggestion).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
3012
- system: FlywheelSystemStatus,
3013
- openQuestions: Schema.Array(Schema.String),
3014
- orders: Schema.optional(FlywheelOrders),
3015
- scope: Schema.optional(FlywheelScope),
3016
- ticks: Schema.Number,
3017
- lastTickAt: Schema.String
3018
- });
3019
- //#endregion
3020
- //#region src/rpc.ts
3021
- const WS_METHODS = {
3022
- scanConversations: "pan.scanConversations",
3023
- searchConversations: "pan.searchConversations",
3024
- listDiscoveredSessions: "pan.listDiscoveredSessions",
3025
- listSessionsFeed: "pan.listSessionsFeed",
3026
- getSessionsFeedFacets: "pan.getSessionsFeedFacets",
3027
- getDiscoveredSession: "pan.getDiscoveredSession",
3028
- enrichSessions: "pan.enrichSessions",
3029
- embedSessions: "pan.embedSessions",
3030
- getConversationCost: "pan.getConversationCost",
3031
- getConversationCostByWorkspace: "pan.getConversationCostByWorkspace",
3032
- getConversationStats: "pan.getConversationStats",
3033
- subscribeDomainEvents: "pan.subscribeDomainEvents",
3034
- subscribeIssueEvents: "pan.subscribeIssueEvents",
3035
- subscribeTerminal: "pan.subscribeTerminal",
3036
- subscribeAgentOutput: "pan.subscribeAgentOutput",
3037
- subscribeConversationMessages: "pan.subscribeConversationMessages",
3038
- subscribeProjectSessionTree: "pan.subscribeProjectSessionTree",
3039
- subscribeFlywheelStatus: "pan.subscribeFlywheelStatus",
3040
- getSnapshot: "pan.getSnapshot",
3041
- replayEvents: "pan.replayEvents",
3042
- getWorkspaceDetail: "pan.getWorkspaceDetail",
3043
- readWorkspaceFile: "pan.readWorkspaceFile",
3044
- readFileAtPath: "pan.readFileAtPath",
3045
- writeFileAtPath: "pan.writeFileAtPath",
3046
- resolveFilePathExists: "pan.resolveFilePathExists",
3047
- terminalOpen: "pan.terminalOpen",
3048
- terminalWrite: "pan.terminalWrite",
3049
- terminalResize: "pan.terminalResize",
3050
- terminalClose: "pan.terminalClose",
3051
- startPlanning: "pan.startPlanning",
3052
- startAgent: "pan.startAgent",
3053
- deepWipe: "pan.deepWipe",
3054
- sendTerminalInput: "pan.sendTerminalInput",
3055
- resizeTerminal: "pan.resizeTerminal",
3056
- shellOpenInEditor: "pan.shellOpenInEditor",
3057
- getAvailableEditors: "pan.getAvailableEditors"
3058
- };
3059
- var PanRpcError = class extends Schema.TaggedErrorClass()("PanRpcError", {
3060
- message: Schema.String,
3061
- code: Schema.optional(Schema.String)
3062
- }) {};
3063
- const TerminalOutput = Schema.Struct({
3064
- sessionName: Schema.String,
3065
- data: Schema.String
3066
- });
3067
- const AgentOutput = Schema.Struct({
3068
- agentId: Schema.String,
3069
- line: Schema.String
3070
- });
3071
- const ProposedPlan = Schema.Struct({
3072
- id: Schema.String,
3073
- plan: Schema.String,
3074
- planFilePath: Schema.optional(Schema.String),
3075
- status: Schema.Literals([
3076
- "pending",
3077
- "approved",
3078
- "rejected"
3079
- ]),
3080
- createdAt: Schema.String,
3081
- resolvedAt: Schema.optional(Schema.String)
2896
+ const ProposedPlan = Schema.Struct({
2897
+ id: Schema.String,
2898
+ plan: Schema.String,
2899
+ planFilePath: Schema.optional(Schema.String),
2900
+ status: Schema.Literals([
2901
+ "pending",
2902
+ "approved",
2903
+ "rejected"
2904
+ ]),
2905
+ createdAt: Schema.String,
2906
+ resolvedAt: Schema.optional(Schema.String)
3082
2907
  });
3083
2908
  const CompactBoundary = Schema.Struct({
3084
2909
  id: Schema.String,
@@ -3280,12 +3105,6 @@ const TerminalCloseRpc = Rpc.make(WS_METHODS.terminalClose, {
3280
3105
  payload: Schema.Struct({ sessionName: Schema.String }),
3281
3106
  error: PanRpcError
3282
3107
  });
3283
- /** 10. Get batched workspace detail (unary) — replaces 5 separate HTTP calls */
3284
- const GetWorkspaceDetailRpc = Rpc.make(WS_METHODS.getWorkspaceDetail, {
3285
- payload: Schema.Struct({ issueId: IssueId }),
3286
- success: WorkspaceDetail,
3287
- error: PanRpcError
3288
- });
3289
3108
  const ReadWorkspaceFileInput = Schema.Struct({
3290
3109
  issueId: IssueId,
3291
3110
  relativePath: Schema.String,
@@ -3432,13 +3251,6 @@ const SubscribeProjectSessionTreeRpc = Rpc.make(WS_METHODS.subscribeProjectSessi
3432
3251
  error: PanRpcError,
3433
3252
  stream: true
3434
3253
  });
3435
- /** 18. Subscribe to latest Flywheel status snapshots (stream) */
3436
- const SubscribeFlywheelStatusRpc = Rpc.make(WS_METHODS.subscribeFlywheelStatus, {
3437
- payload: Schema.Struct({}),
3438
- success: Schema.NullOr(FlywheelStatus),
3439
- error: PanRpcError,
3440
- stream: true
3441
- });
3442
3254
  /** 19. Open a workspace in an editor (PAN-966) */
3443
3255
  const ShellOpenInEditorRpc = Rpc.make(WS_METHODS.shellOpenInEditor, {
3444
3256
  payload: OpenInEditorInput,
@@ -3616,7 +3428,7 @@ const GetConversationStatsRpc = Rpc.make(WS_METHODS.getConversationStats, {
3616
3428
  error: PanRpcError
3617
3429
  });
3618
3430
  /** All Overdeck WebSocket RPC methods */
3619
- const PanRpcGroup = RpcGroup.make(SubscribeDomainEventsRpc, SubscribeIssueEventsRpc, SubscribeTerminalRpc, SubscribeAgentOutputRpc, GetSnapshotRpc, ReplayEventsRpc, GetWorkspaceDetailRpc, ReadWorkspaceFileRpc, ReadFileAtPathRpc, WriteFileAtPathRpc, ResolveFilePathExistsRpc, TerminalOpenRpc, TerminalWriteRpc, TerminalResizeRpc, TerminalCloseRpc, StartPlanningRpc, StartAgentRpc, DeepWipeRpc, SendTerminalInputRpc, ResizeTerminalRpc, SubscribeConversationMessagesRpc, SubscribeProjectSessionTreeRpc, SubscribeFlywheelStatusRpc, ShellOpenInEditorRpc, GetAvailableEditorsRpc, ScanConversationsRpc, SearchConversationsRpc, ListDiscoveredSessionsRpc, ListSessionsFeedRpc, GetSessionsFeedFacetsRpc, GetDiscoveredSessionRpc, EnrichSessionsRpc, EmbedSessionsRpc, GetConversationCostRpc, GetConversationCostByWorkspaceRpc, GetConversationStatsRpc);
3431
+ const PanRpcGroup = RpcGroup.make(SubscribeDomainEventsRpc, SubscribeIssueEventsRpc, SubscribeTerminalRpc, SubscribeAgentOutputRpc, GetSnapshotRpc, ReplayEventsRpc, ReadWorkspaceFileRpc, ReadFileAtPathRpc, WriteFileAtPathRpc, ResolveFilePathExistsRpc, TerminalOpenRpc, TerminalWriteRpc, TerminalResizeRpc, TerminalCloseRpc, StartPlanningRpc, StartAgentRpc, DeepWipeRpc, SendTerminalInputRpc, ResizeTerminalRpc, SubscribeConversationMessagesRpc, SubscribeProjectSessionTreeRpc, ShellOpenInEditorRpc, GetAvailableEditorsRpc, ScanConversationsRpc, SearchConversationsRpc, ListDiscoveredSessionsRpc, ListSessionsFeedRpc, GetSessionsFeedFacetsRpc, GetDiscoveredSessionRpc, EnrichSessionsRpc, EmbedSessionsRpc, GetConversationCostRpc, GetConversationCostByWorkspaceRpc, GetConversationStatsRpc);
3620
3432
  //#endregion
3621
3433
  //#region src/issue-delta.ts
3622
3434
  function createIssueDelta(previous, next) {
@@ -3641,7 +3453,8 @@ const INITIAL_READ_MODEL_STATE = {
3641
3453
  sequence: 0,
3642
3454
  agentsById: {},
3643
3455
  agentRuntimeById: {},
3644
- reviewStatusByIssueId: {},
3456
+ derivedIssueStateByIssueId: {},
3457
+ backendPanesById: {},
3645
3458
  resources: null,
3646
3459
  agentOutputById: {},
3647
3460
  issuesRaw: [],
@@ -3758,8 +3571,10 @@ function bumpRuntimeSnapshotSequence(agentsById, agentId, sequence) {
3758
3571
  function syncSnapshot(state, snapshot) {
3759
3572
  const agentsById = {};
3760
3573
  for (const agent of snapshot.agents) agentsById[agent.id] = agent;
3761
- const reviewStatusByIssueId = {};
3762
- for (const rs of snapshot.reviewStatuses) reviewStatusByIssueId[rs.issueId] = rs;
3574
+ const derivedIssueStateByIssueId = {};
3575
+ for (const derived of snapshot.derivedIssueStates ?? []) derivedIssueStateByIssueId[derived.issueId] = derived;
3576
+ const backendPanesById = {};
3577
+ for (const pane of snapshot.backendPanes ?? []) backendPanesById[pane.id] = pane;
3763
3578
  const channelPermissionRequestsById = {};
3764
3579
  const channelPermissionRequestIdsByAgentId = {};
3765
3580
  for (const request of snapshot.channelPermissionRequests ?? []) {
@@ -3775,7 +3590,8 @@ function syncSnapshot(state, snapshot) {
3775
3590
  ...state,
3776
3591
  sequence: snapshot.sequence,
3777
3592
  agentsById,
3778
- reviewStatusByIssueId,
3593
+ derivedIssueStateByIssueId,
3594
+ backendPanesById,
3779
3595
  agentRuntimeById: snapshot.agentRuntimeById ?? state.agentRuntimeById,
3780
3596
  channelPermissionRequestsById,
3781
3597
  channelPermissionRequestIdsByAgentId,
@@ -3865,7 +3681,16 @@ function applyEvent(state, event) {
3865
3681
  };
3866
3682
  }
3867
3683
  case "agent.stopped": {
3868
- const { [event.payload.agentId]: _removed, ...rest } = state.agentsById;
3684
+ const stoppedAgent = state.agentsById[event.payload.agentId];
3685
+ const nextAgentsById = stoppedAgent ? {
3686
+ ...state.agentsById,
3687
+ [event.payload.agentId]: {
3688
+ ...stoppedAgent,
3689
+ status: "stopped",
3690
+ hasLiveTmuxSession: false,
3691
+ lastActivity: event.timestamp
3692
+ }
3693
+ } : state.agentsById;
3869
3694
  const runtimeById = state.agentRuntimeById ?? {};
3870
3695
  const prevRuntime = runtimeById[event.payload.agentId];
3871
3696
  const nextRuntimeById = prevRuntime ? {
@@ -3894,7 +3719,7 @@ function applyEvent(state, event) {
3894
3719
  return {
3895
3720
  ...state,
3896
3721
  sequence: Math.max(state.sequence, event.sequence),
3897
- agentsById: rest,
3722
+ agentsById: nextAgentsById,
3898
3723
  agentRuntimeById: nextRuntimeById,
3899
3724
  channelPermissionRequestsById: nextPermissionRequestsById,
3900
3725
  channelPermissionRequestIdsByAgentId: restPendingIds,
@@ -4039,85 +3864,35 @@ function applyEvent(state, event) {
4039
3864
  }
4040
3865
  };
4041
3866
  }
4042
- case "pipeline.status_changed":
4043
- case "review.status_changed": return {
3867
+ case "issue_state.changed": return {
4044
3868
  ...state,
4045
3869
  sequence: Math.max(state.sequence, event.sequence),
4046
- reviewStatusByIssueId: {
4047
- ...state.reviewStatusByIssueId,
4048
- [event.payload.issueId]: event.payload.status
3870
+ derivedIssueStateByIssueId: {
3871
+ ...state.derivedIssueStateByIssueId,
3872
+ [event.payload.issueState.issueId]: event.payload.issueState
4049
3873
  }
4050
3874
  };
4051
- case "review.reviewer_started": {
4052
- const { issueId, role, sessionName } = event.payload;
4053
- const existing = state.reviewStatusByIssueId[issueId];
4054
- const prevSubs = existing?.reviewSubStatuses ?? {};
4055
- const prevNames = existing?.reviewSessionNames ?? [];
4056
- const nextNames = prevNames.includes(sessionName) ? prevNames : [...prevNames, sessionName];
4057
- const nextStatus = {
4058
- ...existing ?? { issueId },
4059
- reviewSubStatuses: {
4060
- ...prevSubs,
4061
- [role]: "running"
4062
- },
4063
- reviewSessionNames: nextNames
4064
- };
4065
- return {
4066
- ...state,
4067
- sequence: Math.max(state.sequence, event.sequence),
4068
- reviewStatusByIssueId: {
4069
- ...state.reviewStatusByIssueId,
4070
- [issueId]: nextStatus
4071
- }
4072
- };
4073
- }
4074
- case "review.reviewer_completed": {
4075
- const { issueId, role } = event.payload;
4076
- const existing = state.reviewStatusByIssueId[issueId];
4077
- if (!existing) return {
4078
- ...state,
4079
- sequence: Math.max(state.sequence, event.sequence)
4080
- };
4081
- const prevSubs = existing.reviewSubStatuses ?? {};
4082
- const nextStatus = {
4083
- ...existing,
4084
- reviewSubStatuses: {
4085
- ...prevSubs,
4086
- [role]: "done"
4087
- }
4088
- };
4089
- return {
4090
- ...state,
4091
- sequence: Math.max(state.sequence, event.sequence),
4092
- reviewStatusByIssueId: {
4093
- ...state.reviewStatusByIssueId,
4094
- [issueId]: nextStatus
4095
- }
4096
- };
4097
- }
4098
- case "review.specialist.timed_out": return {
3875
+ case "backend_pane.changed": return {
4099
3876
  ...state,
4100
- sequence: Math.max(state.sequence, event.sequence)
3877
+ sequence: Math.max(state.sequence, event.sequence),
3878
+ backendPanesById: {
3879
+ ...state.backendPanesById,
3880
+ [event.payload.pane.id]: event.payload.pane
3881
+ }
4101
3882
  };
4102
- case "review.coordinator_started": {
4103
- const { issueId, sessionName } = event.payload;
4104
- const nextStatus = {
4105
- ...state.reviewStatusByIssueId[issueId] ?? { issueId },
4106
- reviewCoordinatorSessionName: sessionName
4107
- };
3883
+ case "backend_pane.removed": {
3884
+ const { [event.payload.paneId]: _removed, ...rest } = state.backendPanesById;
4108
3885
  return {
4109
3886
  ...state,
4110
3887
  sequence: Math.max(state.sequence, event.sequence),
4111
- reviewStatusByIssueId: {
4112
- ...state.reviewStatusByIssueId,
4113
- [issueId]: nextStatus
4114
- }
3888
+ backendPanesById: rest
4115
3889
  };
4116
3890
  }
4117
- case "review.coordinator.died": return {
4118
- ...state,
4119
- sequence: Math.max(state.sequence, event.sequence)
4120
- };
3891
+ case "review.reviewer_started":
3892
+ case "review.reviewer_completed":
3893
+ case "review.specialist.timed_out":
3894
+ case "review.coordinator_started":
3895
+ case "review.coordinator.died":
4121
3896
  case "pipeline.review-started":
4122
3897
  case "pipeline.review-completed":
4123
3898
  case "pipeline.test-started":
@@ -5102,64 +4877,352 @@ function deriveProjectCi(record) {
5102
4877
  };
5103
4878
  }
5104
4879
  //#endregion
5105
- //#region src/flywheel-stats.ts
5106
- const FlywheelStatsCriterionStatus = Schema.Literals([
5107
- "green",
5108
- "yellow",
5109
- "red",
5110
- "insufficient_data"
4880
+ //#region src/flywheel.ts
4881
+ const FlywheelRunId = Schema.String.check(Schema.isPattern(/^RUN-\d+$/));
4882
+ const FlywheelHttpUrl = Schema.String.check(Schema.isPattern(/^https?:\/\/\S+$/i));
4883
+ const FlywheelHarness = Schema.Literals([
4884
+ "claude-code",
4885
+ "pi",
4886
+ "ohmypi",
4887
+ "codex",
4888
+ "acp",
4889
+ "kimi-code",
4890
+ "opencode",
4891
+ "muse"
5111
4892
  ]);
5112
- const FlywheelStatsTrend = Schema.Literals([
5113
- "up",
5114
- "down",
5115
- "flat"
4893
+ const FlywheelEffort = Schema.Literals([
4894
+ "low",
4895
+ "medium",
4896
+ "high",
4897
+ "xhigh",
4898
+ "max"
5116
4899
  ]);
5117
- const FlywheelStatsCriterionValueObject = Schema.Record(Schema.String, Schema.Json);
5118
- const FlywheelStatsCriterionValue = Schema.Union([Schema.Number, FlywheelStatsCriterionValueObject]);
5119
- const FlywheelStatsCriterion = Schema.Struct({
5120
- label: Schema.String,
5121
- value: FlywheelStatsCriterionValue,
5122
- target: FlywheelStatsCriterionValue,
5123
- status: FlywheelStatsCriterionStatus,
5124
- trend: Schema.optional(FlywheelStatsTrend),
5125
- sampleSize: Schema.Number,
5126
- dataSufficient: Schema.Boolean
5127
- });
5128
- const FlywheelStatsCriteria = Schema.Struct({
5129
- c1_bugRate: FlywheelStatsCriterion,
5130
- c2_p0Bugs: FlywheelStatsCriterion,
5131
- c3_passRate: FlywheelStatsCriterion,
5132
- c4_mttr: FlywheelStatsCriterion,
5133
- c5_intervention: FlywheelStatsCriterion,
5134
- c6_timeConsistency: FlywheelStatsCriterion,
5135
- c7_flake: FlywheelStatsCriterion
4900
+ const FlywheelOrchestrator = Schema.Struct({
4901
+ harness: FlywheelHarness,
4902
+ model: Schema.String,
4903
+ effort: FlywheelEffort,
4904
+ ctxPercent: Schema.Number
5136
4905
  });
5137
- const FlywheelStats = Schema.Struct({
5138
- window: Schema.String,
5139
- generatedAt: Schema.String,
5140
- criteria: FlywheelStatsCriteria
4906
+ const FlywheelScope = Schema.Literals(["pan-only", "all-tracked-projects"]);
4907
+ const FlywheelHeadline = Schema.Struct({
4908
+ bugsFixed: Schema.Number,
4909
+ swarmItemsMerged: Schema.Number,
4910
+ swarmItemsTotal: Schema.Number,
4911
+ prsMerged: Schema.Number,
4912
+ awaitingUat: Schema.Number
5141
4913
  });
5142
- const decodeFlywheelStats = Schema.decodeUnknownSync(FlywheelStats);
5143
- const encodeFlywheelStats = Schema.encodeSync(FlywheelStats);
5144
- //#endregion
5145
- //#region src/orders.ts
5146
- const OrderBookLane = Schema.Literals(["A", "B"]);
5147
- const OrderBookStatus = Schema.Literals([
5148
- "draft",
5149
- "ready",
5150
- "running",
5151
- "drained",
5152
- "complete"
5153
- ]);
5154
- const OrderBookPosture = Schema.Literals(["open", "drain"]);
5155
- const OrderBookItem = Schema.Struct({
5156
- issue: Schema.String,
5157
- lane: OrderBookLane,
5158
- order: Schema.Number,
5159
- prereqs: Schema.Array(Schema.String),
5160
- reVerify: Schema.Boolean,
5161
- planAtPickup: Schema.optional(Schema.Boolean),
5162
- addedAt: Schema.String,
4914
+ /**
4915
+ * Pipeline verbs — display state only. They no longer gate the merge queue.
4916
+ *
4917
+ * History worth keeping (PAN-1736 / PAN-1759): the merge queue used to be
4918
+ * derived by filtering these verbs, treating only "shipping" or "merging" as
4919
+ * "at the merge gate". Any other verb on an issue that was ready_for_merge in
4920
+ * the review DB silently dropped it from the queue and from UAT batch
4921
+ * assembly — RUN-18 shipped an empty queue with five ready issues exactly that
4922
+ * way — and the queue existed only while a run was emitting a pipeline at all.
4923
+ *
4924
+ * PAN-1696 removed that coupling. The ready set is now sourced from the
4925
+ * review-status records per project (`listEligibleCandidatesByProject` +
4926
+ * `computeMergeQueueFromCandidates` in src/lib/flywheel-merge-order.ts), which
4927
+ * needs no flywheel run and cannot be affected by which verb an orchestrator
4928
+ * chose to report. Adding a verb here therefore has no merge-queue consequence;
4929
+ * it only changes what the dashboard displays.
4930
+ */
4931
+ const FlywheelPipelineVerb = Schema.Literals([
4932
+ "planning",
4933
+ "working",
4934
+ "reviewing",
4935
+ "testing",
4936
+ "shipping",
4937
+ "merging",
4938
+ "blocked",
4939
+ "parked"
4940
+ ]);
4941
+ const FlywheelPipelineStatus = Schema.Literals([
4942
+ "queued",
4943
+ "running",
4944
+ "blocked",
4945
+ "passed",
4946
+ "failed",
4947
+ "merged",
4948
+ "parked"
4949
+ ]);
4950
+ const FlywheelPipelineItem = Schema.Struct({
4951
+ issueId: Schema.String,
4952
+ title: Schema.String,
4953
+ verb: FlywheelPipelineVerb,
4954
+ status: FlywheelPipelineStatus,
4955
+ progressPercent: Schema.optional(Schema.Number),
4956
+ agentId: Schema.optional(Schema.String),
4957
+ pr: Schema.optional(Schema.Number),
4958
+ mergeOrder: Schema.optional(Schema.Number),
4959
+ conflictsWith: Schema.optional(Schema.Array(Schema.String))
4960
+ });
4961
+ const FlywheelSubstrateBugStatus = Schema.Literals([
4962
+ "filed",
4963
+ "fixed",
4964
+ "workaround"
4965
+ ]);
4966
+ const FlywheelSubstrateBug = Schema.Struct({
4967
+ issueId: Schema.String,
4968
+ title: Schema.String,
4969
+ status: FlywheelSubstrateBugStatus,
4970
+ commitSha: Schema.optional(Schema.String),
4971
+ url: Schema.optional(FlywheelHttpUrl)
4972
+ });
4973
+ const FlywheelAgentStatus = Schema.Literals([
4974
+ "starting",
4975
+ "running",
4976
+ "waiting",
4977
+ "idle",
4978
+ "stopped",
4979
+ "error"
4980
+ ]);
4981
+ const FlywheelAgent = Schema.Struct({
4982
+ id: Schema.String,
4983
+ label: Schema.String,
4984
+ status: FlywheelAgentStatus,
4985
+ issueId: Schema.optional(Schema.String),
4986
+ role: Schema.optional(Schema.String),
4987
+ model: Schema.optional(Schema.String),
4988
+ ctxPercent: Schema.optional(Schema.Number),
4989
+ currentAction: Schema.optional(Schema.String)
4990
+ });
4991
+ const FlywheelParkedItem = Schema.Struct({
4992
+ issueId: Schema.String,
4993
+ title: Schema.String,
4994
+ reason: Schema.String,
4995
+ parkedAt: Schema.optional(Schema.String)
4996
+ });
4997
+ const FlywheelSuggestionAction = Schema.Literals([
4998
+ "start",
4999
+ "resume",
5000
+ "plan",
5001
+ "review",
5002
+ "merge",
5003
+ "unblock",
5004
+ "park",
5005
+ "investigate",
5006
+ "wait"
5007
+ ]);
5008
+ const FlywheelSuggestionPriority = Schema.Literals([
5009
+ "urgent",
5010
+ "high",
5011
+ "medium",
5012
+ "low"
5013
+ ]);
5014
+ const FlywheelSuggestion = Schema.Struct({
5015
+ action: FlywheelSuggestionAction,
5016
+ issueId: Schema.optional(Schema.String),
5017
+ rationale: Schema.String,
5018
+ priority: FlywheelSuggestionPriority,
5019
+ filedBy: Schema.optional(Schema.Literals(["agent", "operator"])),
5020
+ weight: Schema.optional(Schema.Number),
5021
+ weightReason: Schema.optional(Schema.String)
5022
+ });
5023
+ const FlywheelSystemStatus = Schema.Struct({
5024
+ mainHead: Schema.String,
5025
+ ramUsedMb: Schema.Number,
5026
+ ramTotalMb: Schema.Number,
5027
+ swapUsedMb: Schema.Number,
5028
+ swapTotalMb: Schema.Number,
5029
+ agentsActive: Schema.Number,
5030
+ agentsCap: Schema.Number
5031
+ });
5032
+ const FlywheelOrders = Schema.Struct({
5033
+ bookId: Schema.String,
5034
+ bookName: Schema.String,
5035
+ landed: Schema.Number,
5036
+ total: Schema.Number,
5037
+ laneAInFlight: Schema.Array(Schema.String),
5038
+ laneBInFlight: Schema.optional(Schema.String),
5039
+ drained: Schema.Boolean
5040
+ });
5041
+ const FlywheelStatus = Schema.Struct({
5042
+ runId: FlywheelRunId,
5043
+ startedAt: Schema.String,
5044
+ elapsedMs: Schema.Number,
5045
+ orchestrator: FlywheelOrchestrator,
5046
+ headline: FlywheelHeadline,
5047
+ activePipeline: Schema.Array(FlywheelPipelineItem),
5048
+ substrateBugs: Schema.Array(FlywheelSubstrateBug),
5049
+ agents: Schema.Array(FlywheelAgent),
5050
+ parked: Schema.Array(FlywheelParkedItem),
5051
+ suggestions: Schema.Array(FlywheelSuggestion).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
5052
+ system: FlywheelSystemStatus,
5053
+ openQuestions: Schema.Array(Schema.String),
5054
+ orders: Schema.optional(FlywheelOrders),
5055
+ scope: Schema.optional(FlywheelScope),
5056
+ ticks: Schema.Number,
5057
+ lastTickAt: Schema.String
5058
+ });
5059
+ //#endregion
5060
+ //#region src/flywheel-stats.ts
5061
+ const FlywheelStatsCriterionStatus = Schema.Literals([
5062
+ "green",
5063
+ "yellow",
5064
+ "red",
5065
+ "insufficient_data"
5066
+ ]);
5067
+ const FlywheelStatsTrend = Schema.Literals([
5068
+ "up",
5069
+ "down",
5070
+ "flat"
5071
+ ]);
5072
+ const FlywheelSubstrateSeverity = Schema.Literals([
5073
+ "P0",
5074
+ "P1",
5075
+ "P2",
5076
+ "unknown"
5077
+ ]);
5078
+ const FlywheelStatsWindow = Schema.Struct({
5079
+ days: Schema.Number,
5080
+ since: Schema.String,
5081
+ until: Schema.String
5082
+ });
5083
+ /** c1: substrate bugs filed per merged PR in the window. */
5084
+ const FlywheelBugRateCriterion = Schema.Struct({
5085
+ /** `null` when no PR merged in the window (the rate is undefined). */
5086
+ value: Schema.NullOr(Schema.Number),
5087
+ count: Schema.Number,
5088
+ denominator: Schema.Number,
5089
+ status: FlywheelStatsCriterionStatus,
5090
+ trend: FlywheelStatsTrend,
5091
+ dataSufficient: Schema.Boolean
5092
+ });
5093
+ /** c2: P0 substrate bugs filed in the window. */
5094
+ const FlywheelP0Criterion = Schema.Struct({
5095
+ value: Schema.Number,
5096
+ status: FlywheelStatsCriterionStatus,
5097
+ trend: FlywheelStatsTrend,
5098
+ dataSufficient: Schema.Boolean
5099
+ });
5100
+ const FlywheelSubstrateBugRow = Schema.Struct({
5101
+ number: Schema.Number,
5102
+ title: Schema.String,
5103
+ createdAt: Schema.String,
5104
+ closedAt: Schema.NullOr(Schema.String),
5105
+ severity: FlywheelSubstrateSeverity
5106
+ });
5107
+ const FlywheelStats = Schema.Struct({
5108
+ window: FlywheelStatsWindow,
5109
+ generatedAt: Schema.String,
5110
+ criteria: Schema.Struct({
5111
+ c1_bugRate: FlywheelBugRateCriterion,
5112
+ c2_p0Bugs: FlywheelP0Criterion
5113
+ }),
5114
+ bugs: Schema.Array(FlywheelSubstrateBugRow)
5115
+ });
5116
+ const decodeFlywheelStats = Schema.decodeUnknownSync(FlywheelStats);
5117
+ const encodeFlywheelStats = Schema.encodeSync(FlywheelStats);
5118
+ //#endregion
5119
+ //#region src/flywheel-derived.ts
5120
+ /** The loop's phases, as the skill reports them in its tick marker. */
5121
+ const TickMarkerPhase = Schema.Literals([
5122
+ "orient",
5123
+ "pick",
5124
+ "launch",
5125
+ "watch",
5126
+ "park",
5127
+ "idle",
5128
+ "stopping"
5129
+ ]);
5130
+ /**
5131
+ * One parsed tick marker line:
5132
+ * `flywheel-tick: tick=<n> pick=<ID|none> phase=<phase> in-flight=<ID,…|none> needs-you=<text|none>`.
5133
+ */
5134
+ const TickMarker = Schema.Struct({
5135
+ tick: Schema.Number,
5136
+ pick: Schema.NullOr(Schema.String),
5137
+ phase: TickMarkerPhase,
5138
+ inFlight: Schema.Array(Schema.String),
5139
+ needsYou: Schema.NullOr(Schema.String)
5140
+ });
5141
+ /** `running` = row + live session; `paused` = row, no live session; `idle` = no row. */
5142
+ const FlywheelRunState = Schema.Literals([
5143
+ "running",
5144
+ "paused",
5145
+ "idle"
5146
+ ]);
5147
+ /** Age of the last tick: ≤ 60 s live, ≤ 20 min breathing, older stalled. */
5148
+ const FlywheelFreshness = Schema.Literals([
5149
+ "live",
5150
+ "breathing",
5151
+ "stalled"
5152
+ ]);
5153
+ const FlywheelConversationSummary = Schema.Struct({
5154
+ name: Schema.String,
5155
+ id: Schema.Number,
5156
+ title: Schema.NullOr(Schema.String),
5157
+ model: Schema.NullOr(Schema.String),
5158
+ harness: Schema.NullOr(Schema.String),
5159
+ cwd: Schema.String,
5160
+ sessionAlive: Schema.Boolean
5161
+ });
5162
+ const FlywheelLastTick = Schema.Struct({
5163
+ tick: Schema.Number,
5164
+ pick: Schema.NullOr(Schema.String),
5165
+ phase: TickMarkerPhase,
5166
+ inFlight: Schema.Array(Schema.String),
5167
+ needsYou: Schema.NullOr(Schema.String),
5168
+ /** The assistant message's `createdAt`. */
5169
+ at: Schema.String
5170
+ });
5171
+ const FlywheelPolicies = Schema.Struct({
5172
+ auto_pickup_backlog: Schema.Boolean,
5173
+ require_uat_before_merge: Schema.Boolean,
5174
+ merge_train_enabled: Schema.Boolean
5175
+ });
5176
+ const FlywheelJournalSummary = Schema.Struct({
5177
+ at: Schema.String,
5178
+ type: Schema.String,
5179
+ source: Schema.optional(Schema.String)
5180
+ });
5181
+ const FlywheelInFlightRow = Schema.Struct({
5182
+ issueId: Schema.String,
5183
+ state: IssueState,
5184
+ attention: Schema.optional(IssueAttention),
5185
+ pr: Schema.optional(DerivedPrState),
5186
+ lastJournal: Schema.NullOr(FlywheelJournalSummary)
5187
+ });
5188
+ const FlywheelOrderBookSummary = Schema.Struct({
5189
+ id: Schema.String,
5190
+ name: Schema.String,
5191
+ status: Schema.String,
5192
+ landed: Schema.Number,
5193
+ total: Schema.Number
5194
+ });
5195
+ const FlywheelDerivedStatus = Schema.Struct({
5196
+ run: FlywheelRunState,
5197
+ conversation: Schema.NullOr(FlywheelConversationSummary),
5198
+ lastTick: Schema.NullOr(FlywheelLastTick),
5199
+ freshness: Schema.NullOr(FlywheelFreshness),
5200
+ policies: FlywheelPolicies,
5201
+ inFlight: Schema.Array(FlywheelInFlightRow),
5202
+ orderBook: Schema.NullOr(FlywheelOrderBookSummary),
5203
+ projectRoot: Schema.String,
5204
+ generatedAt: Schema.String
5205
+ });
5206
+ const decodeFlywheelDerivedStatus = Schema.decodeUnknownSync(FlywheelDerivedStatus);
5207
+ //#endregion
5208
+ //#region src/orders.ts
5209
+ const OrderBookLane = Schema.Literals(["A", "B"]);
5210
+ const OrderBookStatus = Schema.Literals([
5211
+ "draft",
5212
+ "ready",
5213
+ "running",
5214
+ "drained",
5215
+ "complete"
5216
+ ]);
5217
+ const OrderBookPosture = Schema.Literals(["open", "drain"]);
5218
+ const OrderBookItem = Schema.Struct({
5219
+ issue: Schema.String,
5220
+ lane: OrderBookLane,
5221
+ order: Schema.Number,
5222
+ prereqs: Schema.Array(Schema.String),
5223
+ reVerify: Schema.Boolean,
5224
+ planAtPickup: Schema.optional(Schema.Boolean),
5225
+ addedAt: Schema.String,
5163
5226
  addedBy: Schema.String
5164
5227
  });
5165
5228
  const OrderBookSettings = Schema.Struct({
@@ -5493,6 +5556,18 @@ const FeatureRegistryEntry = Schema.Struct({
5493
5556
  });
5494
5557
  //#endregion
5495
5558
  //#region src/harness-behavior.ts
5559
+ const AGENT_SESSION_PREFIXES = [
5560
+ "agent-",
5561
+ "planning-",
5562
+ "specialist-",
5563
+ "strike-",
5564
+ "inspect-"
5565
+ ];
5566
+ const AGENT_SESSION_SINGLETONS = new Set(["flywheel-orchestrator", "conv-flywheel-orchestrator"]);
5567
+ /** Canonical synthetic agent-session identity shared by dashboard client/server. */
5568
+ function isAgentSessionName(name) {
5569
+ return AGENT_SESSION_SINGLETONS.has(name) || AGENT_SESSION_PREFIXES.some((prefix) => name.startsWith(prefix));
5570
+ }
5496
5571
  const CLAUDE_CODE_BEHAVIOR = {
5497
5572
  displayName: "Claude Code",
5498
5573
  nativeCommands: [
@@ -6251,12 +6326,6 @@ const COMPOSER_COMMAND_MANIFEST = [
6251
6326
  "required": false,
6252
6327
  "valueHint": null
6253
6328
  },
6254
- {
6255
- "flags": "--shadow-only",
6256
- "description": "Show only shadowed issues",
6257
- "required": false,
6258
- "valueHint": null
6259
- },
6260
6329
  {
6261
6330
  "flags": "--triage",
6262
6331
  "description": "Show triage queue",
@@ -6271,19 +6340,13 @@ const COMPOSER_COMMAND_MANIFEST = [
6271
6340
  "id": "pan-show",
6272
6341
  "path": ["show"],
6273
6342
  "display": "/pan show",
6274
- "description": "Unified lens: shadow state, CV, context, health for one issue",
6343
+ "description": "Unified lens: derived issue state, CV, context, health for one issue",
6275
6344
  "args": [{
6276
6345
  "name": "id",
6277
6346
  "required": true,
6278
6347
  "variadic": false
6279
6348
  }],
6280
6349
  "options": [
6281
- {
6282
- "flags": "--shadow",
6283
- "description": "Shadow state details only",
6284
- "required": false,
6285
- "valueHint": null
6286
- },
6287
6350
  {
6288
6351
  "flags": "--cv",
6289
6352
  "description": "Agent work history only",
@@ -6335,32 +6398,12 @@ const COMPOSER_COMMAND_MANIFEST = [
6335
6398
  "id": "pan-review",
6336
6399
  "path": ["review"],
6337
6400
  "display": "/pan review",
6338
- "description": "Review-loop management: pending items, request re-review, reset cycles",
6401
+ "description": "Review-loop management: request re-review, abort reviewers, restart a round",
6339
6402
  "args": [],
6340
6403
  "options": [],
6341
6404
  "aliases": [],
6342
6405
  "category": "Review"
6343
6406
  },
6344
- {
6345
- "id": "pan-review-pending",
6346
- "path": ["review", "pending"],
6347
- "display": "/pan review pending",
6348
- "description": "List completed work awaiting review",
6349
- "args": [],
6350
- "options": [{
6351
- "flags": "--ready",
6352
- "description": "List issues ready for merge (review+test green, not merged) regardless of origin",
6353
- "required": false,
6354
- "valueHint": null
6355
- }, {
6356
- "flags": "--blocked",
6357
- "description": "List issues blocked in review/test/merge from the SQLite review-status store",
6358
- "required": false,
6359
- "valueHint": null
6360
- }],
6361
- "aliases": [],
6362
- "category": "Review"
6363
- },
6364
6407
  {
6365
6408
  "id": "pan-review-request",
6366
6409
  "path": ["review", "request"],
@@ -6380,39 +6423,6 @@ const COMPOSER_COMMAND_MANIFEST = [
6380
6423
  "aliases": [],
6381
6424
  "category": "Review"
6382
6425
  },
6383
- {
6384
- "id": "pan-review-reset",
6385
- "path": ["review", "reset"],
6386
- "display": "/pan review reset",
6387
- "description": "Reset review/test/merge cycles (human override)",
6388
- "args": [{
6389
- "name": "id",
6390
- "required": true,
6391
- "variadic": false
6392
- }],
6393
- "options": [{
6394
- "flags": "--session",
6395
- "description": "Also clear all saved Claude review-session pointers",
6396
- "required": false,
6397
- "valueHint": null
6398
- }],
6399
- "aliases": [],
6400
- "category": "Review"
6401
- },
6402
- {
6403
- "id": "pan-review-resync",
6404
- "path": ["review", "resync"],
6405
- "display": "/pan review resync",
6406
- "description": "Re-emit canonical review status (heal a lost pipeline event)",
6407
- "args": [{
6408
- "name": "id",
6409
- "required": true,
6410
- "variadic": false
6411
- }],
6412
- "options": [],
6413
- "aliases": [],
6414
- "category": "Review"
6415
- },
6416
6426
  {
6417
6427
  "id": "pan-review-abort",
6418
6428
  "path": ["review", "abort"],
@@ -6427,24 +6437,6 @@ const COMPOSER_COMMAND_MANIFEST = [
6427
6437
  "aliases": [],
6428
6438
  "category": "Review"
6429
6439
  },
6430
- {
6431
- "id": "pan-review-mode",
6432
- "path": ["review", "mode"],
6433
- "display": "/pan review mode",
6434
- "description": "Set per-issue review mode (quick, full, or none)",
6435
- "args": [{
6436
- "name": "id",
6437
- "required": true,
6438
- "variadic": false
6439
- }, {
6440
- "name": "mode",
6441
- "required": true,
6442
- "variadic": false
6443
- }],
6444
- "options": [],
6445
- "aliases": [],
6446
- "category": "Review"
6447
- },
6448
6440
  {
6449
6441
  "id": "pan-review-restart",
6450
6442
  "path": ["review", "restart"],
@@ -6469,56 +6461,17 @@ const COMPOSER_COMMAND_MANIFEST = [
6469
6461
  "aliases": [],
6470
6462
  "category": "Review"
6471
6463
  },
6472
- {
6473
- "id": "pan-verify",
6474
- "path": ["verify"],
6475
- "display": "/pan verify",
6476
- "description": "Verification-gate overrides",
6477
- "args": [],
6478
- "options": [],
6479
- "aliases": [],
6480
- "category": "CLI"
6481
- },
6482
- {
6483
- "id": "pan-verify-waive-test-removal",
6484
- "path": ["verify", "waive-test-removal"],
6485
- "display": "/pan verify waive-test-removal",
6486
- "description": "Record an operator waiver letting a net test-call removal past the test-skip gate at the current head",
6487
- "args": [{
6488
- "name": "id",
6489
- "required": true,
6490
- "variadic": false
6491
- }],
6492
- "options": [{
6493
- "flags": "--reason <reason>",
6494
- "description": "Why the removed tests are not coming back",
6495
- "required": true,
6496
- "valueHint": "reason"
6497
- }],
6498
- "aliases": [],
6499
- "category": "CLI"
6500
- },
6501
6464
  {
6502
6465
  "id": "pan-staffing",
6503
6466
  "path": ["staffing"],
6504
6467
  "display": "/pan staffing",
6505
- "description": "Show or set per-issue work-model and swarm overrides",
6468
+ "description": "Show the work model and swarm policy in effect for an issue",
6506
6469
  "args": [{
6507
6470
  "name": "id",
6508
6471
  "required": true,
6509
6472
  "variadic": false
6510
6473
  }],
6511
- "options": [{
6512
- "flags": "--model <model>",
6513
- "description": "Set the work model, or default to clear the override",
6514
- "required": true,
6515
- "valueHint": "model"
6516
- }, {
6517
- "flags": "--swarm <mode>",
6518
- "description": "Set swarm mode (off, auto, always), or default to clear the override",
6519
- "required": true,
6520
- "valueHint": "mode"
6521
- }],
6474
+ "options": [],
6522
6475
  "aliases": [],
6523
6476
  "category": "Lifecycle"
6524
6477
  },
@@ -6536,7 +6489,7 @@ const COMPOSER_COMMAND_MANIFEST = [
6536
6489
  "id": "pan-backlog-write-sequence",
6537
6490
  "path": ["backlog", "write-sequence"],
6538
6491
  "display": "/pan backlog write-sequence",
6539
- "description": "Validate a SequenceDoc JSON file and write it to .pan/backlog/sequence.md (triggers auto-commit)",
6492
+ "description": "Validate a SequenceDoc JSON file, write it to .pan/backlog/sequence.md, and commit it",
6540
6493
  "args": [{
6541
6494
  "name": "file",
6542
6495
  "required": true,
@@ -6551,21 +6504,6 @@ const COMPOSER_COMMAND_MANIFEST = [
6551
6504
  "aliases": [],
6552
6505
  "category": "Lifecycle"
6553
6506
  },
6554
- {
6555
- "id": "pan-backlog-forecast",
6556
- "path": ["backlog", "forecast"],
6557
- "display": "/pan backlog forecast",
6558
- "description": "Pickup forecast (waves / needs-planning / cohort / stats) from sequence.md + SQLite — no HTTP (sandbox-safe)",
6559
- "args": [],
6560
- "options": [{
6561
- "flags": "-n, --n <n>",
6562
- "description": "Wave size (default 5)",
6563
- "required": true,
6564
- "valueHint": "n"
6565
- }],
6566
- "aliases": [],
6567
- "category": "Lifecycle"
6568
- },
6569
6507
  {
6570
6508
  "id": "pan-plan",
6571
6509
  "path": ["plan"],
@@ -6777,25 +6715,6 @@ const COMPOSER_COMMAND_MANIFEST = [
6777
6715
  "aliases": ["stop"],
6778
6716
  "category": "Lifecycle"
6779
6717
  },
6780
- {
6781
- "id": "pan-reset-to-planned",
6782
- "path": ["reset-to-planned"],
6783
- "display": "/pan reset-to-planned",
6784
- "description": "Return a finalized issue to post-planning without deleting its workspace, plan, commits, or branch",
6785
- "args": [{
6786
- "name": "id",
6787
- "required": true,
6788
- "variadic": false
6789
- }],
6790
- "options": [{
6791
- "flags": "--dry-run",
6792
- "description": "Show the exact reset without changing state",
6793
- "required": false,
6794
- "valueHint": null
6795
- }],
6796
- "aliases": [],
6797
- "category": "Lifecycle"
6798
- },
6799
6718
  {
6800
6719
  "id": "pan-reset-session",
6801
6720
  "path": ["reset-session"],
@@ -6843,34 +6762,6 @@ const COMPOSER_COMMAND_MANIFEST = [
6843
6762
  "aliases": [],
6844
6763
  "category": "Lifecycle"
6845
6764
  },
6846
- {
6847
- "id": "pan-untroubled",
6848
- "path": ["untroubled"],
6849
- "display": "/pan untroubled",
6850
- "description": "Clear an agent troubled gate without spawning it",
6851
- "args": [{
6852
- "name": "id",
6853
- "required": true,
6854
- "variadic": false
6855
- }],
6856
- "options": [],
6857
- "aliases": [],
6858
- "category": "Lifecycle"
6859
- },
6860
- {
6861
- "id": "pan-unstick",
6862
- "path": ["unstick"],
6863
- "display": "/pan unstick",
6864
- "description": "Clear an issue stuck gate without resetting a merged lifecycle",
6865
- "args": [{
6866
- "name": "id",
6867
- "required": true,
6868
- "variadic": false
6869
- }],
6870
- "options": [],
6871
- "aliases": [],
6872
- "category": "CLI"
6873
- },
6874
6765
  {
6875
6766
  "id": "pan-fork",
6876
6767
  "path": ["fork"],
@@ -7114,13 +7005,7 @@ const COMPOSER_COMMAND_MANIFEST = [
7114
7005
  },
7115
7006
  {
7116
7007
  "flags": "--strike",
7117
- "description": "Strike-agent shape: skip review-pipeline dispatch (used by `pan strike` agents that merged directly to main)",
7118
- "required": false,
7119
- "valueHint": null
7120
- },
7121
- {
7122
- "flags": "--json",
7123
- "description": "Output as JSON",
7008
+ "description": "Strike shape: verify the strike branch is contained in origin/main; no PR is opened",
7124
7009
  "required": false,
7125
7010
  "valueHint": null
7126
7011
  }
@@ -7128,20 +7013,6 @@ const COMPOSER_COMMAND_MANIFEST = [
7128
7013
  "aliases": [],
7129
7014
  "category": "Lifecycle"
7130
7015
  },
7131
- {
7132
- "id": "pan-approve",
7133
- "path": ["approve"],
7134
- "display": "/pan approve",
7135
- "description": "[REMOVED] Use dashboard MERGE button instead",
7136
- "args": [{
7137
- "name": "id",
7138
- "required": true,
7139
- "variadic": false
7140
- }],
7141
- "options": [],
7142
- "aliases": [],
7143
- "category": "Lifecycle"
7144
- },
7145
7016
  {
7146
7017
  "id": "pan-reopen",
7147
7018
  "path": ["reopen"],
@@ -7323,25 +7194,7 @@ const COMPOSER_COMMAND_MANIFEST = [
7323
7194
  "options": [
7324
7195
  {
7325
7196
  "flags": "--model <model>",
7326
- "description": "Work model to use and persist for later respawns (defaults to Cloister config)",
7327
- "required": true,
7328
- "valueHint": "model"
7329
- },
7330
- {
7331
- "flags": "--swarm <mode>",
7332
- "description": "Per-issue swarm policy: off | auto | always",
7333
- "required": true,
7334
- "valueHint": "mode"
7335
- },
7336
- {
7337
- "flags": "--review-mode <mode>",
7338
- "description": "Per-issue review mode: quick | full | none",
7339
- "required": true,
7340
- "valueHint": "mode"
7341
- },
7342
- {
7343
- "flags": "--review-model <model>",
7344
- "description": "Per-issue review model override",
7197
+ "description": "Work model for this session (defaults to Cloister config)",
7345
7198
  "required": true,
7346
7199
  "valueHint": "model"
7347
7200
  },
@@ -7369,18 +7222,6 @@ const COMPOSER_COMMAND_MANIFEST = [
7369
7222
  "required": false,
7370
7223
  "valueHint": null
7371
7224
  },
7372
- {
7373
- "flags": "--shadow",
7374
- "description": "Enable shadow mode",
7375
- "required": false,
7376
- "valueHint": null
7377
- },
7378
- {
7379
- "flags": "--no-shadow",
7380
- "description": "Disable shadow mode",
7381
- "required": false,
7382
- "valueHint": null
7383
- },
7384
7225
  {
7385
7226
  "flags": "--remote",
7386
7227
  "description": "Use remote workspace (Fly.io)",
@@ -7436,8 +7277,8 @@ const COMPOSER_COMMAND_MANIFEST = [
7436
7277
  "valueHint": null
7437
7278
  },
7438
7279
  {
7439
- "flags": "--off-book",
7440
- "description": "Allow one work-agent dispatch outside the active order book and log the override",
7280
+ "flags": "--skip-freshness",
7281
+ "description": "Bypass the plan-freshness preflight and spawn even if the plan names files that no longer exist",
7441
7282
  "required": false,
7442
7283
  "valueHint": null
7443
7284
  }
@@ -7449,7 +7290,7 @@ const COMPOSER_COMMAND_MANIFEST = [
7449
7290
  "id": "pan-strike",
7450
7291
  "path": ["strike"],
7451
7292
  "display": "/pan strike",
7452
- "description": "Spawn strike agent(s) — implement and push a strike branch for Deacon to land through the verified merge door. Bypasses plan/review/test/ship.",
7293
+ "description": "Spawn strike agent(s) — implement a fix on a strike branch and open a PR against main for the operator to merge. Bypasses plan/review/test/ship.",
7453
7294
  "args": [{
7454
7295
  "name": "ids",
7455
7296
  "required": true,
@@ -7484,20 +7325,6 @@ const COMPOSER_COMMAND_MANIFEST = [
7484
7325
  "aliases": [],
7485
7326
  "category": "Lifecycle"
7486
7327
  },
7487
- {
7488
- "id": "pan-strike-ready",
7489
- "path": ["strike-ready"],
7490
- "display": "/pan strike-ready",
7491
- "description": "Persist readiness for a pushed strike branch so Deacon can land it",
7492
- "args": [{
7493
- "name": "id",
7494
- "required": true,
7495
- "variadic": false
7496
- }],
7497
- "options": [],
7498
- "aliases": [],
7499
- "category": "Lifecycle"
7500
- },
7501
7328
  {
7502
7329
  "id": "pan-knowledge",
7503
7330
  "path": ["knowledge"],
@@ -7764,7 +7591,7 @@ const COMPOSER_COMMAND_MANIFEST = [
7764
7591
  "id": "pan-task",
7765
7592
  "path": ["task"],
7766
7593
  "display": "/pan task",
7767
- "description": "Read and update xBRIEF task state for one issue",
7594
+ "description": "Read and update xBRIEF item state for one issue",
7768
7595
  "args": [],
7769
7596
  "options": [],
7770
7597
  "aliases": [],
@@ -7826,32 +7653,12 @@ const COMPOSER_COMMAND_MANIFEST = [
7826
7653
  "required": true,
7827
7654
  "variadic": false
7828
7655
  }],
7829
- "options": [
7830
- {
7831
- "flags": "--reason <text>",
7832
- "description": "Reason for the status change",
7833
- "required": true,
7834
- "valueHint": "text"
7835
- },
7836
- {
7837
- "flags": "--expected-sequence <n>",
7838
- "description": "Require the current task sequence",
7839
- "required": true,
7840
- "valueHint": "n"
7841
- },
7842
- {
7843
- "flags": "--force",
7844
- "description": "Override a non-terminal transition or claim owner; requires --reason",
7845
- "required": false,
7846
- "valueHint": null
7847
- },
7848
- {
7849
- "flags": "--json",
7850
- "description": "Print JSON",
7851
- "required": false,
7852
- "valueHint": null
7853
- }
7854
- ],
7656
+ "options": [{
7657
+ "flags": "--json",
7658
+ "description": "Print JSON",
7659
+ "required": false,
7660
+ "valueHint": null
7661
+ }],
7855
7662
  "aliases": [],
7856
7663
  "category": "Lifecycle"
7857
7664
  },
@@ -7859,7 +7666,7 @@ const COMPOSER_COMMAND_MANIFEST = [
7859
7666
  "id": "pan-task-done",
7860
7667
  "path": ["task", "done"],
7861
7668
  "display": "/pan task done",
7862
- "description": "",
7669
+ "description": "Record an item as done. Requires a commit carrying \"Item: <item>\" on a pushed branch.",
7863
7670
  "args": [{
7864
7671
  "name": "issue",
7865
7672
  "required": true,
@@ -7869,32 +7676,12 @@ const COMPOSER_COMMAND_MANIFEST = [
7869
7676
  "required": true,
7870
7677
  "variadic": false
7871
7678
  }],
7872
- "options": [
7873
- {
7874
- "flags": "--reason <text>",
7875
- "description": "Reason for the status change",
7876
- "required": true,
7877
- "valueHint": "text"
7878
- },
7879
- {
7880
- "flags": "--expected-sequence <n>",
7881
- "description": "Require the current task sequence",
7882
- "required": true,
7883
- "valueHint": "n"
7884
- },
7885
- {
7886
- "flags": "--force",
7887
- "description": "Override a non-terminal transition or claim owner; requires --reason",
7888
- "required": false,
7889
- "valueHint": null
7890
- },
7891
- {
7892
- "flags": "--json",
7893
- "description": "Print JSON",
7894
- "required": false,
7895
- "valueHint": null
7896
- }
7897
- ],
7679
+ "options": [{
7680
+ "flags": "--json",
7681
+ "description": "Print JSON",
7682
+ "required": false,
7683
+ "valueHint": null
7684
+ }],
7898
7685
  "aliases": [],
7899
7686
  "category": "Lifecycle"
7900
7687
  },
@@ -7912,32 +7699,12 @@ const COMPOSER_COMMAND_MANIFEST = [
7912
7699
  "required": true,
7913
7700
  "variadic": false
7914
7701
  }],
7915
- "options": [
7916
- {
7917
- "flags": "--reason <text>",
7918
- "description": "Reason for the status change",
7919
- "required": true,
7920
- "valueHint": "text"
7921
- },
7922
- {
7923
- "flags": "--expected-sequence <n>",
7924
- "description": "Require the current task sequence",
7925
- "required": true,
7926
- "valueHint": "n"
7927
- },
7928
- {
7929
- "flags": "--force",
7930
- "description": "Override a non-terminal transition or claim owner; requires --reason",
7931
- "required": false,
7932
- "valueHint": null
7933
- },
7934
- {
7935
- "flags": "--json",
7936
- "description": "Print JSON",
7937
- "required": false,
7938
- "valueHint": null
7939
- }
7940
- ],
7702
+ "options": [{
7703
+ "flags": "--json",
7704
+ "description": "Print JSON",
7705
+ "required": false,
7706
+ "valueHint": null
7707
+ }],
7941
7708
  "aliases": [],
7942
7709
  "category": "Lifecycle"
7943
7710
  },
@@ -7955,32 +7722,12 @@ const COMPOSER_COMMAND_MANIFEST = [
7955
7722
  "required": true,
7956
7723
  "variadic": false
7957
7724
  }],
7958
- "options": [
7959
- {
7960
- "flags": "--reason <text>",
7961
- "description": "Reason for the status change",
7962
- "required": true,
7963
- "valueHint": "text"
7964
- },
7965
- {
7966
- "flags": "--expected-sequence <n>",
7967
- "description": "Require the current task sequence",
7968
- "required": true,
7969
- "valueHint": "n"
7970
- },
7971
- {
7972
- "flags": "--force",
7973
- "description": "Override a non-terminal transition or claim owner; requires --reason",
7974
- "required": false,
7975
- "valueHint": null
7976
- },
7977
- {
7978
- "flags": "--json",
7979
- "description": "Print JSON",
7980
- "required": false,
7981
- "valueHint": null
7982
- }
7983
- ],
7725
+ "options": [{
7726
+ "flags": "--json",
7727
+ "description": "Print JSON",
7728
+ "required": false,
7729
+ "valueHint": null
7730
+ }],
7984
7731
  "aliases": [],
7985
7732
  "category": "Lifecycle"
7986
7733
  },
@@ -7998,32 +7745,12 @@ const COMPOSER_COMMAND_MANIFEST = [
7998
7745
  "required": true,
7999
7746
  "variadic": false
8000
7747
  }],
8001
- "options": [
8002
- {
8003
- "flags": "--reason <text>",
8004
- "description": "Reason for the status change",
8005
- "required": true,
8006
- "valueHint": "text"
8007
- },
8008
- {
8009
- "flags": "--expected-sequence <n>",
8010
- "description": "Require the current task sequence",
8011
- "required": true,
8012
- "valueHint": "n"
8013
- },
8014
- {
8015
- "flags": "--force",
8016
- "description": "Override a non-terminal transition or claim owner; requires --reason",
8017
- "required": false,
8018
- "valueHint": null
8019
- },
8020
- {
8021
- "flags": "--json",
8022
- "description": "Print JSON",
8023
- "required": false,
8024
- "valueHint": null
8025
- }
8026
- ],
7748
+ "options": [{
7749
+ "flags": "--json",
7750
+ "description": "Print JSON",
7751
+ "required": false,
7752
+ "valueHint": null
7753
+ }],
8027
7754
  "aliases": [],
8028
7755
  "category": "Lifecycle"
8029
7756
  },
@@ -8041,32 +7768,12 @@ const COMPOSER_COMMAND_MANIFEST = [
8041
7768
  "required": true,
8042
7769
  "variadic": false
8043
7770
  }],
8044
- "options": [
8045
- {
8046
- "flags": "--reason <text>",
8047
- "description": "Reason for the status change",
8048
- "required": true,
8049
- "valueHint": "text"
8050
- },
8051
- {
8052
- "flags": "--expected-sequence <n>",
8053
- "description": "Require the current task sequence",
8054
- "required": true,
8055
- "valueHint": "n"
8056
- },
8057
- {
8058
- "flags": "--force",
8059
- "description": "Override a non-terminal transition or claim owner; requires --reason",
8060
- "required": false,
8061
- "valueHint": null
8062
- },
8063
- {
8064
- "flags": "--json",
8065
- "description": "Print JSON",
8066
- "required": false,
8067
- "valueHint": null
8068
- }
8069
- ],
7771
+ "options": [{
7772
+ "flags": "--json",
7773
+ "description": "Print JSON",
7774
+ "required": false,
7775
+ "valueHint": null
7776
+ }],
8070
7777
  "aliases": [],
8071
7778
  "category": "Lifecycle"
8072
7779
  },
@@ -9013,7 +8720,7 @@ const COMPOSER_COMMAND_MANIFEST = [
9013
8720
  "id": "pan-rollout-status",
9014
8721
  "path": ["rollout", "status"],
9015
8722
  "display": "/pan rollout status",
9016
- "description": "Print the release set for an issue (releaseStatus + per-component status)",
8723
+ "description": "Print the release set for an issue (overall + per-component status)",
9017
8724
  "args": [{
9018
8725
  "name": "issueId",
9019
8726
  "required": true,
@@ -9887,7 +9594,7 @@ const COMPOSER_COMMAND_MANIFEST = [
9887
9594
  "id": "pan-parked",
9888
9595
  "path": ["parked"],
9889
9596
  "display": "/pan parked",
9890
- "description": "List every issue parked in a stall orbit (stuck flags, gates, failed merges, zombies), oldest first, with why + release condition",
9597
+ "description": "List every issue parked in a stall orbit (operator gates, zombie sessions, idle-running agents), oldest first, with why + release condition",
9891
9598
  "args": [],
9892
9599
  "options": [{
9893
9600
  "flags": "--json",
@@ -9898,35 +9605,6 @@ const COMPOSER_COMMAND_MANIFEST = [
9898
9605
  "aliases": [],
9899
9606
  "category": "CLI"
9900
9607
  },
9901
- {
9902
- "id": "pan-parked-ack",
9903
- "path": ["parked", "ack"],
9904
- "display": "/pan parked ack",
9905
- "description": "Batch-acknowledge parked rows (default orbit: needs-you), then print the flywheel hand-off",
9906
- "args": [],
9907
- "options": [
9908
- {
9909
- "flags": "--orbit <orbit>",
9910
- "description": "Parked orbit to acknowledge",
9911
- "required": true,
9912
- "valueHint": "orbit"
9913
- },
9914
- {
9915
- "flags": "--older-than <days>",
9916
- "description": "Only rows parked at least this many days",
9917
- "required": true,
9918
- "valueHint": "days"
9919
- },
9920
- {
9921
- "flags": "--dry-run",
9922
- "description": "List what would be acknowledged without writing",
9923
- "required": false,
9924
- "valueHint": null
9925
- }
9926
- ],
9927
- "aliases": [],
9928
- "category": "CLI"
9929
- },
9930
9608
  {
9931
9609
  "id": "pan-docs",
9932
9610
  "path": ["docs"],
@@ -10046,110 +9724,6 @@ const COMPOSER_COMMAND_MANIFEST = [
10046
9724
  "aliases": [],
10047
9725
  "category": "Admin"
10048
9726
  },
10049
- {
10050
- "id": "pan-admin-state",
10051
- "path": ["admin", "state"],
10052
- "display": "/pan admin state",
10053
- "description": "Permanent state administration",
10054
- "args": [],
10055
- "options": [],
10056
- "aliases": [],
10057
- "category": "Admin"
10058
- },
10059
- {
10060
- "id": "pan-admin-state-migrate",
10061
- "path": [
10062
- "admin",
10063
- "state",
10064
- "migrate"
10065
- ],
10066
- "display": "/pan admin state migrate",
10067
- "description": "Move permanent state to the orphan overdeck-state branch",
10068
- "args": [{
10069
- "name": "project",
10070
- "required": true,
10071
- "variadic": false
10072
- }],
10073
- "options": [{
10074
- "flags": "--dry-run",
10075
- "description": "Print the exact migration plan without mutating anything",
10076
- "required": false,
10077
- "valueHint": null
10078
- }],
10079
- "aliases": [],
10080
- "category": "Admin"
10081
- },
10082
- {
10083
- "id": "pan-admin-state-migrate-xbrief",
10084
- "path": [
10085
- "admin",
10086
- "state",
10087
- "migrate-xbrief"
10088
- ],
10089
- "display": "/pan admin state migrate-xbrief",
10090
- "description": "Rename state documents to .xbrief.json and migrate legacy envelopes",
10091
- "args": [{
10092
- "name": "project",
10093
- "required": true,
10094
- "variadic": false
10095
- }],
10096
- "options": [{
10097
- "flags": "--dry-run",
10098
- "description": "Print the exact xBRIEF migration plan without mutating anything",
10099
- "required": false,
10100
- "valueHint": null
10101
- }],
10102
- "aliases": [],
10103
- "category": "Admin"
10104
- },
10105
- {
10106
- "id": "pan-admin-state-backfill-agents",
10107
- "path": [
10108
- "admin",
10109
- "state",
10110
- "backfill-agents"
10111
- ],
10112
- "display": "/pan admin state backfill-agents",
10113
- "description": "Reconstruct durable agent runtime records from local and retained state",
10114
- "args": [{
10115
- "name": "project",
10116
- "required": false,
10117
- "variadic": false
10118
- }],
10119
- "options": [{
10120
- "flags": "--dry-run",
10121
- "description": "Report the records and sessions that would be written",
10122
- "required": false,
10123
- "valueHint": null
10124
- }],
10125
- "aliases": [],
10126
- "category": "Admin"
10127
- },
10128
- {
10129
- "id": "pan-admin-reconcile-labels",
10130
- "path": ["admin", "reconcile-labels"],
10131
- "display": "/pan admin reconcile-labels",
10132
- "description": "Reconcile pipeline labels from permanent issue truth",
10133
- "args": [],
10134
- "options": [{
10135
- "flags": "--dry-run",
10136
- "description": "Print changes without mutating labels",
10137
- "required": false,
10138
- "valueHint": null
10139
- }],
10140
- "aliases": [],
10141
- "category": "Admin"
10142
- },
10143
- {
10144
- "id": "pan-admin-migrate-legacy-agent-dirs",
10145
- "path": ["admin", "migrate-legacy-agent-dirs"],
10146
- "display": "/pan admin migrate-legacy-agent-dirs",
10147
- "description": "Copy pre-rebrand conv-* agent dirs into the configured Overdeck home without overwriting",
10148
- "args": [],
10149
- "options": [],
10150
- "aliases": [],
10151
- "category": "Admin"
10152
- },
10153
9727
  {
10154
9728
  "id": "pan-admin-seed-uat-fixtures",
10155
9729
  "path": ["admin", "seed-uat-fixtures"],
@@ -10169,6 +9743,57 @@ const COMPOSER_COMMAND_MANIFEST = [
10169
9743
  "aliases": [],
10170
9744
  "category": "Admin"
10171
9745
  },
9746
+ {
9747
+ "id": "pan-admin-migrate-plan-home",
9748
+ "path": ["admin", "migrate-plan-home"],
9749
+ "display": "/pan admin migrate-plan-home",
9750
+ "description": "One-time bridge: copy open-issue planning artifacts and item progress from ~/.overdeck/state/<project>/ into <planHome>/.pan/ (PAN-3917 D8)",
9751
+ "args": [{
9752
+ "name": "project-key",
9753
+ "required": true,
9754
+ "variadic": false
9755
+ }],
9756
+ "options": [
9757
+ {
9758
+ "flags": "--commit",
9759
+ "description": "Commit the copied artifacts in the plan home",
9760
+ "required": false,
9761
+ "valueHint": null
9762
+ },
9763
+ {
9764
+ "flags": "--dry-run",
9765
+ "description": "Preview what would be copied without writing anything",
9766
+ "required": false,
9767
+ "valueHint": null
9768
+ },
9769
+ {
9770
+ "flags": "--repair-ignore",
9771
+ "description": "Only remove Overdeck's legacy .pan/ line from .gitignore and commit that file (no copy)",
9772
+ "required": false,
9773
+ "valueHint": null
9774
+ },
9775
+ {
9776
+ "flags": "--state-root <dir>",
9777
+ "description": "Override the state worktree root (tests / odd setups)",
9778
+ "required": true,
9779
+ "valueHint": "dir"
9780
+ },
9781
+ {
9782
+ "flags": "--plan-home <dir>",
9783
+ "description": "Override the plan home (tests / odd setups)",
9784
+ "required": true,
9785
+ "valueHint": "dir"
9786
+ },
9787
+ {
9788
+ "flags": "--open-issues <file>",
9789
+ "description": "Read open issue ids from a file instead of calling the tracker",
9790
+ "required": true,
9791
+ "valueHint": "file"
9792
+ }
9793
+ ],
9794
+ "aliases": [],
9795
+ "category": "Admin"
9796
+ },
10172
9797
  {
10173
9798
  "id": "pan-admin-agents",
10174
9799
  "path": ["admin", "agents"],
@@ -10273,53 +9898,6 @@ const COMPOSER_COMMAND_MANIFEST = [
10273
9898
  "aliases": [],
10274
9899
  "category": "Admin"
10275
9900
  },
10276
- {
10277
- "id": "pan-admin-cloister-brake",
10278
- "path": [
10279
- "admin",
10280
- "cloister",
10281
- "brake"
10282
- ],
10283
- "display": "/pan admin cloister brake",
10284
- "description": "Emergency brake - trim running work agents down to the concurrency cap (idle-first, resumable)",
10285
- "args": [],
10286
- "options": [{
10287
- "flags": "--json",
10288
- "description": "Output in JSON format",
10289
- "required": false,
10290
- "valueHint": null
10291
- }],
10292
- "aliases": [],
10293
- "category": "Admin"
10294
- },
10295
- {
10296
- "id": "pan-admin-cloister-freeze",
10297
- "path": [
10298
- "admin",
10299
- "cloister",
10300
- "freeze"
10301
- ],
10302
- "display": "/pan admin cloister freeze",
10303
- "description": "Globally pause the Deacon (patrols run but skip all actions); running agents unaffected",
10304
- "args": [],
10305
- "options": [],
10306
- "aliases": [],
10307
- "category": "Admin"
10308
- },
10309
- {
10310
- "id": "pan-admin-cloister-unfreeze",
10311
- "path": [
10312
- "admin",
10313
- "cloister",
10314
- "unfreeze"
10315
- ],
10316
- "display": "/pan admin cloister unfreeze",
10317
- "description": "Resume the Deacon from a global pause",
10318
- "args": [],
10319
- "options": [],
10320
- "aliases": [],
10321
- "category": "Admin"
10322
- },
10323
9901
  {
10324
9902
  "id": "pan-admin-specialists",
10325
9903
  "path": ["admin", "specialists"],
@@ -10408,7 +9986,7 @@ const COMPOSER_COMMAND_MANIFEST = [
10408
9986
  "done"
10409
9987
  ],
10410
9988
  "display": "/pan admin specialists done",
10411
- "description": "Signal specialist completion (deterministic status update)",
9989
+ "description": "Post a specialist verdict to the issue's pull/merge request (review, test, uat)",
10412
9990
  "args": [{
10413
9991
  "name": "type",
10414
9992
  "required": true,
@@ -10425,12 +10003,6 @@ const COMPOSER_COMMAND_MANIFEST = [
10425
10003
  "required": true,
10426
10004
  "valueHint": "status"
10427
10005
  },
10428
- {
10429
- "flags": "--item <itemId>",
10430
- "description": "xBRIEF item ID (required for inspect verdicts)",
10431
- "required": true,
10432
- "valueHint": "itemId"
10433
- },
10434
10006
  {
10435
10007
  "flags": "--notes <notes>",
10436
10008
  "description": "Optional notes about the result",
@@ -10449,6 +10021,12 @@ const COMPOSER_COMMAND_MANIFEST = [
10449
10021
  "required": true,
10450
10022
  "valueHint": "notes"
10451
10023
  },
10024
+ {
10025
+ "flags": "--tested-sha <sha>",
10026
+ "description": "Test/UAT only: the commit the run exercised (git rev-parse HEAD before the gates)",
10027
+ "required": true,
10028
+ "valueHint": "sha"
10029
+ },
10452
10030
  {
10453
10031
  "flags": "--run-id <runId>",
10454
10032
  "description": "Review cycle ID used to deduplicate review feedback",
@@ -10794,30 +10372,6 @@ const COMPOSER_COMMAND_MANIFEST = [
10794
10372
  "aliases": [],
10795
10373
  "category": "Admin"
10796
10374
  },
10797
- {
10798
- "id": "pan-admin-db-rebuild-agents",
10799
- "path": [
10800
- "admin",
10801
- "db",
10802
- "rebuild-agents"
10803
- ],
10804
- "display": "/pan admin db rebuild-agents",
10805
- "description": "Rebuild the SQLite agents table from state.json rollback sources (PAN-1908)",
10806
- "args": [],
10807
- "options": [{
10808
- "flags": "--dry-run",
10809
- "description": "Show what would be backfilled without writing",
10810
- "required": false,
10811
- "valueHint": null
10812
- }, {
10813
- "flags": "--verbose",
10814
- "description": "Log each processed agent",
10815
- "required": false,
10816
- "valueHint": null
10817
- }],
10818
- "aliases": [],
10819
- "category": "Admin"
10820
- },
10821
10375
  {
10822
10376
  "id": "pan-admin-db-rebuild-workspaces",
10823
10377
  "path": [
@@ -10880,105 +10434,6 @@ const COMPOSER_COMMAND_MANIFEST = [
10880
10434
  "aliases": [],
10881
10435
  "category": "Admin"
10882
10436
  },
10883
- {
10884
- "id": "pan-admin-db-backfill-records",
10885
- "path": [
10886
- "admin",
10887
- "db",
10888
- "backfill-records"
10889
- ],
10890
- "display": "/pan admin db backfill-records",
10891
- "description": "Backfill per-issue permanent records into the infra repo (PAN-1908)",
10892
- "args": [],
10893
- "options": [
10894
- {
10895
- "flags": "--issue-id <id>",
10896
- "description": "Backfill only this issue",
10897
- "required": true,
10898
- "valueHint": "id"
10899
- },
10900
- {
10901
- "flags": "--force",
10902
- "description": "Overwrite records even if unchanged",
10903
- "required": false,
10904
- "valueHint": null
10905
- },
10906
- {
10907
- "flags": "--verbose",
10908
- "description": "Log each processed issue",
10909
- "required": false,
10910
- "valueHint": null
10911
- }
10912
- ],
10913
- "aliases": [],
10914
- "category": "Admin"
10915
- },
10916
- {
10917
- "id": "pan-admin-db-restore-verdicts",
10918
- "path": [
10919
- "admin",
10920
- "db",
10921
- "restore-verdicts"
10922
- ],
10923
- "display": "/pan admin db restore-verdicts",
10924
- "description": "Rebuild review_status verdicts from per-issue records + live GitHub PR state (PAN-1922)",
10925
- "args": [],
10926
- "options": [
10927
- {
10928
- "flags": "--issue-id <id>",
10929
- "description": "Restore only this issue",
10930
- "required": true,
10931
- "valueHint": "id"
10932
- },
10933
- {
10934
- "flags": "--dry-run",
10935
- "description": "Show what would be restored without writing",
10936
- "required": false,
10937
- "valueHint": null
10938
- },
10939
- {
10940
- "flags": "--verbose",
10941
- "description": "Log each processed issue",
10942
- "required": false,
10943
- "valueHint": null
10944
- }
10945
- ],
10946
- "aliases": [],
10947
- "category": "Admin"
10948
- },
10949
- {
10950
- "id": "pan-admin-db-reconcile-merges",
10951
- "path": [
10952
- "admin",
10953
- "db",
10954
- "reconcile-merges"
10955
- ],
10956
- "display": "/pan admin db reconcile-merges",
10957
- "description": "Backfill fulfilled merge state from tracked PR and branch ancestry evidence (PAN-2311)",
10958
- "args": [],
10959
- "options": [
10960
- {
10961
- "flags": "--issue-id <id>",
10962
- "description": "Reconcile only this issue",
10963
- "required": true,
10964
- "valueHint": "id"
10965
- },
10966
- {
10967
- "flags": "--dry-run",
10968
- "description": "Show what would be reconciled without writing",
10969
- "required": false,
10970
- "valueHint": null
10971
- },
10972
- {
10973
- "flags": "--verbose",
10974
- "description": "Log each processed issue",
10975
- "required": false,
10976
- "valueHint": null
10977
- }
10978
- ],
10979
- "aliases": [],
10980
- "category": "Admin"
10981
- },
10982
10437
  {
10983
10438
  "id": "pan-admin-config",
10984
10439
  "path": ["admin", "config"],
@@ -11821,43 +11276,16 @@ const COMPOSER_COMMAND_MANIFEST = [
11821
11276
  "description": "Skip Qwen TTS daemon venv install (CUDA torch download is large)",
11822
11277
  "required": false,
11823
11278
  "valueHint": null
11824
- }
11825
- ],
11826
- "aliases": [],
11827
- "category": "Core"
11828
- },
11829
- {
11830
- "id": "pan-inspect",
11831
- "path": ["inspect"],
11832
- "display": "/pan inspect",
11833
- "description": "Request inspection of a completed xBRIEF item before proceeding to the next",
11834
- "args": [{
11835
- "name": "issueId",
11836
- "required": true,
11837
- "variadic": false
11838
- }],
11839
- "options": [
11840
- {
11841
- "flags": "--item <itemId>",
11842
- "description": "xBRIEF item ID to inspect",
11843
- "required": true,
11844
- "valueHint": "itemId"
11845
- },
11846
- {
11847
- "flags": "--workspace <path>",
11848
- "description": "Workspace path (auto-detected if not provided)",
11849
- "required": true,
11850
- "valueHint": "path"
11851
11279
  },
11852
11280
  {
11853
- "flags": "--deep",
11854
- "description": "Use the deep inspection sub-role",
11281
+ "flags": "--skip-herdr",
11282
+ "description": "Skip Herdr terminal backend install/verify (tmux-only hosts)",
11855
11283
  "required": false,
11856
11284
  "valueHint": null
11857
11285
  }
11858
11286
  ],
11859
11287
  "aliases": [],
11860
- "category": "Lifecycle"
11288
+ "category": "Core"
11861
11289
  },
11862
11290
  {
11863
11291
  "id": "pan-caveman-compress",
@@ -12013,146 +11441,375 @@ const COMPOSER_COMMAND_MANIFEST = [
12013
11441
  "category": "Lifecycle"
12014
11442
  },
12015
11443
  {
12016
- "id": "pan-flywheel",
12017
- "path": ["flywheel"],
12018
- "display": "/pan flywheel",
12019
- "description": "Flywheel orchestrator lifecycle and status helpers",
11444
+ "id": "pan-spawn",
11445
+ "path": ["spawn"],
11446
+ "display": "/pan spawn",
11447
+ "description": "Create a worker pane for one xBRIEF item in the issue workspace",
11448
+ "args": [],
11449
+ "options": [
11450
+ {
11451
+ "flags": "--issue <id>",
11452
+ "description": "Issue the worker belongs to",
11453
+ "required": true,
11454
+ "valueHint": "id"
11455
+ },
11456
+ {
11457
+ "flags": "--item <item>",
11458
+ "description": "xBRIEF item the worker takes",
11459
+ "required": true,
11460
+ "valueHint": "item"
11461
+ },
11462
+ {
11463
+ "flags": "--model <model>",
11464
+ "description": "Model the worker runs on",
11465
+ "required": true,
11466
+ "valueHint": "model"
11467
+ },
11468
+ {
11469
+ "flags": "--harness <harness>",
11470
+ "description": "Coding-agent harness (default: claude-code)",
11471
+ "required": true,
11472
+ "valueHint": "harness"
11473
+ }
11474
+ ],
11475
+ "aliases": [],
11476
+ "category": "CLI"
11477
+ },
11478
+ {
11479
+ "id": "pan-worker",
11480
+ "path": ["worker"],
11481
+ "display": "/pan worker",
11482
+ "description": "Registered workers: spawn an issue-linked agent and get its report back; register external agents",
12020
11483
  "args": [],
12021
11484
  "options": [],
12022
11485
  "aliases": [],
12023
- "category": "Flywheel"
11486
+ "category": "CLI"
11487
+ },
11488
+ {
11489
+ "id": "pan-worker-run",
11490
+ "path": ["worker", "run"],
11491
+ "display": "/pan worker run",
11492
+ "description": "Start a worker for an issue and wait for its report (exit 0 done, 4 blocked/failed, 2 no report, 3 timeout, 1 error)",
11493
+ "args": [],
11494
+ "options": [
11495
+ {
11496
+ "flags": "--issue <id>",
11497
+ "description": "Issue the worker belongs to (required)",
11498
+ "required": true,
11499
+ "valueHint": "id"
11500
+ },
11501
+ {
11502
+ "flags": "--prompt <text>",
11503
+ "description": "The brief, inline",
11504
+ "required": true,
11505
+ "valueHint": "text"
11506
+ },
11507
+ {
11508
+ "flags": "--brief <file>",
11509
+ "description": "The brief, from a file",
11510
+ "required": true,
11511
+ "valueHint": "file"
11512
+ },
11513
+ {
11514
+ "flags": "--model <model>",
11515
+ "description": "Model override (default: roles.worker.model)",
11516
+ "required": true,
11517
+ "valueHint": "model"
11518
+ },
11519
+ {
11520
+ "flags": "--harness <harness>",
11521
+ "description": "Harness override (default: routed from the model)",
11522
+ "required": true,
11523
+ "valueHint": "harness"
11524
+ },
11525
+ {
11526
+ "flags": "--read-only",
11527
+ "description": "Run in the issue workspace with git writes blocked",
11528
+ "required": false,
11529
+ "valueHint": null
11530
+ },
11531
+ {
11532
+ "flags": "--cwd <path>",
11533
+ "description": "Working directory inside the issue workspace",
11534
+ "required": true,
11535
+ "valueHint": "path"
11536
+ },
11537
+ {
11538
+ "flags": "--parent <id>",
11539
+ "description": "Spawning agent or conversation (default: $OVERDECK_AGENT_ID, then $OVERDECK_CONVERSATION)",
11540
+ "required": true,
11541
+ "valueHint": "id"
11542
+ },
11543
+ {
11544
+ "flags": "--name <label>",
11545
+ "description": "Label shown in the Agents Directory",
11546
+ "required": true,
11547
+ "valueHint": "label"
11548
+ },
11549
+ {
11550
+ "flags": "--detach",
11551
+ "description": "Print the worker id and return without waiting",
11552
+ "required": false,
11553
+ "valueHint": null
11554
+ },
11555
+ {
11556
+ "flags": "--timeout <seconds>",
11557
+ "description": "Stop waiting after this many seconds (exit 3; the worker keeps running)",
11558
+ "required": true,
11559
+ "valueHint": "seconds"
11560
+ },
11561
+ {
11562
+ "flags": "--stop-after-report",
11563
+ "description": "Stop the worker after its first report",
11564
+ "required": false,
11565
+ "valueHint": null
11566
+ }
11567
+ ],
11568
+ "aliases": [],
11569
+ "category": "CLI"
11570
+ },
11571
+ {
11572
+ "id": "pan-worker-wait",
11573
+ "path": ["worker", "wait"],
11574
+ "display": "/pan worker wait",
11575
+ "description": "Wait for a worker's report (same exit codes as run); the status line names its seq",
11576
+ "args": [{
11577
+ "name": "worker-id",
11578
+ "required": true,
11579
+ "variadic": false
11580
+ }],
11581
+ "options": [{
11582
+ "flags": "--after <seq>",
11583
+ "description": "Return the next report after this seq (default: the newest report, whenever written)",
11584
+ "required": true,
11585
+ "valueHint": "seq"
11586
+ }, {
11587
+ "flags": "--timeout <seconds>",
11588
+ "description": "Stop waiting after this many seconds (exit 3)",
11589
+ "required": true,
11590
+ "valueHint": "seconds"
11591
+ }],
11592
+ "aliases": [],
11593
+ "category": "CLI"
12024
11594
  },
12025
11595
  {
12026
- "id": "pan-flywheel-merge-blockers",
12027
- "path": ["flywheel", "merge-blockers"],
12028
- "display": "/pan flywheel merge-blockers",
12029
- "description": "PRs that passed review but cannot merge (GitHub-native reasons) — reads SQLite directly, no HTTP (sandbox-safe)",
12030
- "args": [],
12031
- "options": [{
12032
- "flags": "--json",
12033
- "description": "Output JSON",
12034
- "required": false,
12035
- "valueHint": null
11596
+ "id": "pan-worker-report",
11597
+ "path": ["worker", "report"],
11598
+ "display": "/pan worker report",
11599
+ "description": "Record a worker's report (run by the worker itself)",
11600
+ "args": [{
11601
+ "name": "worker-id",
11602
+ "required": true,
11603
+ "variadic": false
12036
11604
  }],
11605
+ "options": [
11606
+ {
11607
+ "flags": "--file <path>",
11608
+ "description": "Read the Markdown report from a file",
11609
+ "required": true,
11610
+ "valueHint": "path"
11611
+ },
11612
+ {
11613
+ "flags": "--stdin",
11614
+ "description": "Read the Markdown report from stdin",
11615
+ "required": false,
11616
+ "valueHint": null
11617
+ },
11618
+ {
11619
+ "flags": "--status <status>",
11620
+ "description": "done | blocked | failed (default: done)",
11621
+ "required": true,
11622
+ "valueHint": "status"
11623
+ }
11624
+ ],
12037
11625
  "aliases": [],
12038
- "category": "Flywheel"
11626
+ "category": "CLI"
12039
11627
  },
12040
11628
  {
12041
- "id": "pan-flywheel-weights",
12042
- "path": ["flywheel", "weights"],
12043
- "display": "/pan flywheel weights",
12044
- "description": "Weighted substrate bugs by affected v1.0 criterion — reads SQLite directly, no HTTP (sandbox-safe)",
11629
+ "id": "pan-worker-list",
11630
+ "path": ["worker", "list"],
11631
+ "display": "/pan worker list",
11632
+ "description": "List workers with their parent, live state and newest report",
12045
11633
  "args": [],
12046
11634
  "options": [
12047
11635
  {
12048
11636
  "flags": "--issue <id>",
12049
- "description": "Filter to a single issue",
11637
+ "description": "Only this issue's workers",
12050
11638
  "required": true,
12051
11639
  "valueHint": "id"
12052
11640
  },
12053
11641
  {
12054
- "flags": "--window <dur>",
12055
- "description": "Stats window like 30d, 7d (default 30d)",
11642
+ "flags": "--parent <id>",
11643
+ "description": "Only workers of this parent",
12056
11644
  "required": true,
12057
- "valueHint": "dur"
11645
+ "valueHint": "id"
12058
11646
  },
12059
11647
  {
12060
11648
  "flags": "--json",
12061
- "description": "Output JSON",
11649
+ "description": "Print JSON",
12062
11650
  "required": false,
12063
11651
  "valueHint": null
12064
11652
  }
12065
11653
  ],
12066
11654
  "aliases": [],
12067
- "category": "Flywheel"
11655
+ "category": "CLI"
12068
11656
  },
12069
11657
  {
12070
- "id": "pan-flywheel-start",
12071
- "path": ["flywheel", "start"],
12072
- "display": "/pan flywheel start",
12073
- "description": "Start the Flywheel orchestrator",
11658
+ "id": "pan-worker-register",
11659
+ "path": ["worker", "register"],
11660
+ "display": "/pan worker register",
11661
+ "description": "Record an agent another tool launched so the Agents Directory shows it (read-only; prints its id)",
12074
11662
  "args": [],
12075
- "options": [{
12076
- "flags": "--brief <path>",
12077
- "description": "Path to the Flywheel brief",
12078
- "required": true,
12079
- "valueHint": "path"
12080
- }, {
12081
- "flags": "--orders <book-id>",
12082
- "description": "Bind the run to a validated order book",
12083
- "required": true,
12084
- "valueHint": "book-id"
12085
- }],
11663
+ "options": [
11664
+ {
11665
+ "flags": "--source <name>",
11666
+ "description": "Who launched it ([a-z0-9-], not codex-plugin) (required)",
11667
+ "required": true,
11668
+ "valueHint": "name"
11669
+ },
11670
+ {
11671
+ "flags": "--external-id <id>",
11672
+ "description": "The launcher's id for it (required)",
11673
+ "required": true,
11674
+ "valueHint": "id"
11675
+ },
11676
+ {
11677
+ "flags": "--harness <harness>",
11678
+ "description": "codex, claude-code, … (required)",
11679
+ "required": true,
11680
+ "valueHint": "harness"
11681
+ },
11682
+ {
11683
+ "flags": "--model <model>",
11684
+ "description": "Model it runs",
11685
+ "required": true,
11686
+ "valueHint": "model"
11687
+ },
11688
+ {
11689
+ "flags": "--cwd <path>",
11690
+ "description": "Its working directory",
11691
+ "required": true,
11692
+ "valueHint": "path"
11693
+ },
11694
+ {
11695
+ "flags": "--issue <id>",
11696
+ "description": "Issue it works on",
11697
+ "required": true,
11698
+ "valueHint": "id"
11699
+ },
11700
+ {
11701
+ "flags": "--parent <id>",
11702
+ "description": "Spawning agent id, conversation tmux session, or claude-session:<uuid>",
11703
+ "required": true,
11704
+ "valueHint": "id"
11705
+ },
11706
+ {
11707
+ "flags": "--label <text>",
11708
+ "description": "Label shown in the Agents Directory",
11709
+ "required": true,
11710
+ "valueHint": "text"
11711
+ },
11712
+ {
11713
+ "flags": "--pid <n>",
11714
+ "description": "Its process id (liveness is read from it)",
11715
+ "required": true,
11716
+ "valueHint": "n"
11717
+ },
11718
+ {
11719
+ "flags": "--transcript <path>",
11720
+ "description": "Its transcript file",
11721
+ "required": true,
11722
+ "valueHint": "path"
11723
+ },
11724
+ {
11725
+ "flags": "--session-id <id>",
11726
+ "description": "Its session or thread id",
11727
+ "required": true,
11728
+ "valueHint": "id"
11729
+ },
11730
+ {
11731
+ "flags": "--json",
11732
+ "description": "Print { id, created }",
11733
+ "required": false,
11734
+ "valueHint": null
11735
+ }
11736
+ ],
12086
11737
  "aliases": [],
12087
- "category": "Flywheel"
11738
+ "category": "CLI"
12088
11739
  },
12089
11740
  {
12090
- "id": "pan-flywheel-emit-status",
12091
- "path": ["flywheel", "emit-status"],
12092
- "display": "/pan flywheel emit-status",
12093
- "description": "Validate and publish a FlywheelStatus JSON snapshot to the local dashboard",
11741
+ "id": "pan-flywheel",
11742
+ "path": ["flywheel"],
11743
+ "display": "/pan flywheel",
11744
+ "description": "Start, stop, pause, resume, or inspect the flywheel conversation",
12094
11745
  "args": [],
12095
- "options": [{
12096
- "flags": "--file <path>",
12097
- "description": "Path to FlywheelStatus JSON, or - to read from stdin",
12098
- "required": true,
12099
- "valueHint": "path"
12100
- }],
11746
+ "options": [],
12101
11747
  "aliases": [],
12102
11748
  "category": "Flywheel"
12103
11749
  },
12104
11750
  {
12105
- "id": "pan-flywheel-config",
12106
- "path": ["flywheel", "config"],
12107
- "display": "/pan flywheel config",
12108
- "description": "Get or set Flywheel autonomy configuration",
11751
+ "id": "pan-flywheel-start",
11752
+ "path": ["flywheel", "start"],
11753
+ "display": "/pan flywheel start",
11754
+ "description": "Launch a conversation running /pan-flywheel",
12109
11755
  "args": [],
12110
- "options": [{
12111
- "flags": "--get [key]",
12112
- "description": "Print Flywheel config values",
12113
- "required": false,
12114
- "valueHint": "key"
12115
- }, {
12116
- "flags": "--set <key=value>",
12117
- "description": "Set a Flywheel config boolean",
12118
- "required": true,
12119
- "valueHint": "key=value"
12120
- }],
11756
+ "options": [
11757
+ {
11758
+ "flags": "--model <model>",
11759
+ "description": "Model for the flywheel conversation",
11760
+ "required": true,
11761
+ "valueHint": "model"
11762
+ },
11763
+ {
11764
+ "flags": "--harness <harness>",
11765
+ "description": "Harness for the flywheel conversation",
11766
+ "required": true,
11767
+ "valueHint": "harness"
11768
+ },
11769
+ {
11770
+ "flags": "--cwd <path>",
11771
+ "description": "Working directory (default: cwd)",
11772
+ "required": true,
11773
+ "valueHint": "path"
11774
+ },
11775
+ {
11776
+ "flags": "--orders <book-id>",
11777
+ "description": "Order book the flywheel works from",
11778
+ "required": true,
11779
+ "valueHint": "book-id"
11780
+ },
11781
+ {
11782
+ "flags": "--fresh",
11783
+ "description": "Replace a paused flywheel conversation instead of refusing",
11784
+ "required": false,
11785
+ "valueHint": null
11786
+ }
11787
+ ],
12121
11788
  "aliases": [],
12122
11789
  "category": "Flywheel"
12123
11790
  },
12124
11791
  {
12125
- "id": "pan-flywheel-status",
12126
- "path": ["flywheel", "status"],
12127
- "display": "/pan flywheel status",
12128
- "description": "Show the active Flywheel run status",
11792
+ "id": "pan-flywheel-stop",
11793
+ "path": ["flywheel", "stop"],
11794
+ "display": "/pan flywheel stop",
11795
+ "description": "Ask the loop to write its report, wait for it, then pause",
12129
11796
  "args": [],
12130
11797
  "options": [{
12131
- "flags": "--json",
12132
- "description": "Emit the raw FlywheelStatus JSON",
12133
- "required": false,
12134
- "valueHint": null
11798
+ "flags": "--timeout <ms>",
11799
+ "description": "How long to wait for the report (default 120000)",
11800
+ "required": true,
11801
+ "valueHint": "ms"
12135
11802
  }],
12136
11803
  "aliases": [],
12137
11804
  "category": "Flywheel"
12138
11805
  },
12139
11806
  {
12140
- "id": "pan-flywheel-stats",
12141
- "path": ["flywheel", "stats"],
12142
- "display": "/pan flywheel stats",
12143
- "description": "Show Flywheel v1.0 readiness stats",
11807
+ "id": "pan-flywheel-abort",
11808
+ "path": ["flywheel", "abort"],
11809
+ "display": "/pan flywheel abort",
11810
+ "description": "Stop the flywheel conversation without a report",
12144
11811
  "args": [],
12145
- "options": [{
12146
- "flags": "--window <duration>",
12147
- "description": "Stats window duration",
12148
- "required": true,
12149
- "valueHint": "duration"
12150
- }, {
12151
- "flags": "--json",
12152
- "description": "Emit the raw FlywheelStats JSON",
12153
- "required": false,
12154
- "valueHint": null
12155
- }],
11812
+ "options": [],
12156
11813
  "aliases": [],
12157
11814
  "category": "Flywheel"
12158
11815
  },
@@ -12160,7 +11817,7 @@ const COMPOSER_COMMAND_MANIFEST = [
12160
11817
  "id": "pan-flywheel-pause",
12161
11818
  "path": ["flywheel", "pause"],
12162
11819
  "display": "/pan flywheel pause",
12163
- "description": "Pause the active Flywheel orchestrator run",
11820
+ "description": "Stop the flywheel session, keeping its conversation and transcript",
12164
11821
  "args": [],
12165
11822
  "options": [],
12166
11823
  "aliases": [],
@@ -12170,7 +11827,7 @@ const COMPOSER_COMMAND_MANIFEST = [
12170
11827
  "id": "pan-flywheel-resume",
12171
11828
  "path": ["flywheel", "resume"],
12172
11829
  "display": "/pan flywheel resume",
12173
- "description": "Resume the paused Flywheel orchestrator run",
11830
+ "description": "Respawn a paused flywheel and re-send /pan-flywheel",
12174
11831
  "args": [],
12175
11832
  "options": [],
12176
11833
  "aliases": [],
@@ -12180,26 +11837,21 @@ const COMPOSER_COMMAND_MANIFEST = [
12180
11837
  "id": "pan-flywheel-report",
12181
11838
  "path": ["flywheel", "report"],
12182
11839
  "display": "/pan flywheel report",
12183
- "description": "Finalize the active Flywheel run: write report.md, compact over-threshold FLYWHEEL-STATE.md history, commit State changes, and clear the active-run gate. Refuses to run while the orchestrator session is alive (pause or abort first).",
11840
+ "description": "Ask a running loop for its report, or print .pan/flywheel/report.md",
12184
11841
  "args": [],
12185
- "options": [{
12186
- "flags": "--force",
12187
- "description": "Bypass the orchestrator-alive guard. Intended for the orchestrator role's own end-of-run call.",
12188
- "required": false,
12189
- "valueHint": null
12190
- }],
11842
+ "options": [],
12191
11843
  "aliases": [],
12192
11844
  "category": "Flywheel"
12193
11845
  },
12194
11846
  {
12195
- "id": "pan-flywheel-complete",
12196
- "path": ["flywheel", "complete"],
12197
- "display": "/pan flywheel complete",
12198
- "description": "Complete a drained order-book run, write its report and retrospective, then continue mechanically",
11847
+ "id": "pan-flywheel-status",
11848
+ "path": ["flywheel", "status"],
11849
+ "display": "/pan flywheel status",
11850
+ "description": "Show the derived flywheel status: run, last tick, policies, in-flight issues, order book",
12199
11851
  "args": [],
12200
11852
  "options": [{
12201
- "flags": "--force",
12202
- "description": "Complete even when the order book still has non-terminal items",
11853
+ "flags": "--json",
11854
+ "description": "Output as JSON",
12203
11855
  "required": false,
12204
11856
  "valueHint": null
12205
11857
  }],
@@ -12207,22 +11859,22 @@ const COMPOSER_COMMAND_MANIFEST = [
12207
11859
  "category": "Flywheel"
12208
11860
  },
12209
11861
  {
12210
- "id": "pan-flywheel-stop",
12211
- "path": ["flywheel", "stop"],
12212
- "display": "/pan flywheel stop",
12213
- "description": "Stop the Flywheel orchestrator gracefully: kill any live session, write report.md, commit FLYWHEEL-STATE.md changes, and clear the active-run gate",
12214
- "args": [],
12215
- "options": [],
12216
- "aliases": [],
12217
- "category": "Flywheel"
12218
- },
12219
- {
12220
- "id": "pan-flywheel-abort",
12221
- "path": ["flywheel", "abort"],
12222
- "display": "/pan flywheel abort",
12223
- "description": "Discard the active Flywheel run without writing a report",
11862
+ "id": "pan-flywheel-stats",
11863
+ "path": ["flywheel", "stats"],
11864
+ "display": "/pan flywheel stats",
11865
+ "description": "Substrate-bug discovery rate and P0 count, computed from the tracker and forge",
12224
11866
  "args": [],
12225
- "options": [],
11867
+ "options": [{
11868
+ "flags": "--json",
11869
+ "description": "Output as JSON",
11870
+ "required": false,
11871
+ "valueHint": null
11872
+ }, {
11873
+ "flags": "--window <days>",
11874
+ "description": "Window in days (default 30)",
11875
+ "required": true,
11876
+ "valueHint": "days"
11877
+ }],
12226
11878
  "aliases": [],
12227
11879
  "category": "Flywheel"
12228
11880
  },
@@ -13546,14 +13198,6 @@ const COMPOSER_COMMAND_VARIANTS = [
13546
13198
  "insert": "/pan plan --auto --auto-start ",
13547
13199
  "category": "Lifecycle"
13548
13200
  },
13549
- {
13550
- "id": "pan-review-reset-session",
13551
- "path": ["review", "reset"],
13552
- "display": "/pan review reset --session",
13553
- "description": "Reset review and clear saved Claude session",
13554
- "insert": "/pan review reset --session",
13555
- "category": "Review"
13556
- },
13557
13201
  {
13558
13202
  "id": "pan-fork-plain",
13559
13203
  "path": ["fork"],
@@ -13688,6 +13332,115 @@ const HOOK_INVENTORY = [
13688
13332
  const WIRED_HOOK_INVENTORY = HOOK_INVENTORY.filter((hook) => hook.wired);
13689
13333
  const WIRED_HOOK_NAMES = WIRED_HOOK_INVENTORY.map((hook) => hook.name);
13690
13334
  //#endregion
13691
- export { ACP_BEHAVIOR, Activity, ActivityDetailedEvent, ActivityEntryEvent, ActivityTtsEvent, ActivityUpdatedEvent, AdmissionState, AgentActivityChangedEvent, AgentChannelReply, AgentChannelReplyEvent, AgentCompletedEvent, AgentContextSaturationChangedEvent, AgentCreatedEvent, AgentCurrentIssueSetEvent, AgentEnrichmentChangedEvent, AgentHealthKind, AgentHealthSnapshot, AgentHealthStatus, AgentHeartbeatDeadEvent, AgentHookFiredEvent, AgentId, AgentMessageReceivedEvent, AgentModelSetEvent, AgentOutput, AgentOutputReceivedEvent, AgentPermissionRequestedEvent, AgentPermissionResolvedEvent, AgentResolution, AgentResolutionChangedEvent, AgentRuntimeSnapshot, AgentSnapshot, AgentStartedEvent, AgentStateRestoredEvent, AgentStatus, AgentStatusChangedEvent, AgentStoppedEvent, AgentThinkingStartedEvent, AgentThinkingStoppedEvent, AgentTurnDiffCompletedEvent, AgentWaitingClearedEvent, AgentWaitingStartedEvent, ArtifactAgentHarness, ArtifactAgentRole, ArtifactCreateResponse, ArtifactDetailResponse, ArtifactHash, ArtifactId, ArtifactLifecycleState, ArtifactListEntry, ArtifactListResponse, ArtifactMetadata, ArtifactPublishResponse, ArtifactSlug, ArtifactStatusResponse, ArtifactUnshareResponse, ArtifactUrls, ArtifactValidationCode, ArtifactValidationFinding, ArtifactValidationResult, BeadsFreshnessChangedEvent, CHANNEL_REPLY_KIND_VALUES, CLAUDE_CODE_BEHAVIOR, CODEX_BEHAVIOR, COMPOSER_COMMAND_INSERT_OVERRIDES, COMPOSER_COMMAND_MANIFEST, COMPOSER_COMMAND_VARIANTS, CONTEXT_LAYER_KINDS, CONTEXT_PREVIEW_HARNESSES, ChannelPermissionRequestSnapshot, ChannelReplyArtifactRef, ChannelReplyKind, ChatMessage, ClaudeChannelPermissionBehavior, CompactBoundary, ContextEditableLayerRecord, ContextHarnessPreviews, ContextLayerDraft, ContextLayerKind, ContextLayerSaveRequest, ContextLayerSaveResponse, ContextLayerTarget, ContextLayersResponse, ContextPreviewDiagnostic, ContextPreviewHarness, ContextPreviewRequest, ContextPreviewResponse, ContextProjectSummary, ContextSyncRequest, ContextSyncResponse, ContextSyncTarget, ContextUsage, ContextWorkspaceSummary, ConversationCompactingChangedEvent, ConversationCostSummary, ConversationCreatedEvent, ConversationEvent, ConversationFilter, ConversationMovedEvent, ConversationPermissionChangedEvent, ConversationResponse, ConversationTitleChangedEvent, CostEventRecordedEvent, DEFAULT_MAX_MEMORY_OBSERVATIONS_PER_ISSUE, DEFAULT_MAX_TURN_DIFF_SUMMARIES_PER_AGENT, DashboardLifecycleCompletedEvent, DashboardLifecycleFailedEvent, DashboardLifecycleStartedEvent, DashboardSnapshot, DeepWipeRpc, DeployStalenessSnapshot, DiscoveredSessionSnapshot, DomainEvent, EDITORS, EditorIdSchema, EmbedProgressEvent, EmbedProgressSnapshot, EmbedSessionsRpc, EnrichCompleteEvent, EnrichProgressEvent, EnrichProgressSnapshot, EnrichSessionsRpc, EnrichStatsSnapshot, ExtractionProviderConfig, ExtractionProviderTarget, FeatureNode, FeatureRegistryEntry, FeatureRegistryStatus, FlywheelAgent, FlywheelAgentStatus, FlywheelEffort, FlywheelHarness, FlywheelHeadline, FlywheelHttpUrl, FlywheelOrchestrator, FlywheelOrders, FlywheelParkedItem, FlywheelPipelineItem, FlywheelPipelineStatus, FlywheelPipelineVerb, FlywheelRunId, FlywheelScope, FlywheelStats, FlywheelStatsCriteria, FlywheelStatsCriterion, FlywheelStatsCriterionStatus, FlywheelStatsCriterionValue, FlywheelStatsCriterionValueObject, FlywheelStatsTrend, FlywheelStatus, FlywheelSubstrateBug, FlywheelSubstrateBugStatus, FlywheelSuggestion, FlywheelSuggestionAction, FlywheelSuggestionPriority, FlywheelSystemStatus, GetAvailableEditorsRpc, GetConversationCostByWorkspaceRpc, GetConversationCostRpc, GetConversationStatsRpc, GetDiscoveredSessionRpc, GetSessionsFeedFacetsRpc, GetSnapshotRpc, GetWorkspaceDetailRpc, GlobalContextLayerRecord, GlobalContextLayerTarget, HOOK_INVENTORY, HealthReason, HealthState, HostHealthMetrics, HostPlatform, HygieneFinding, HygienePullRequest, HygieneReport, INITIAL_READ_MODEL_STATE, IssueId, IssueStatusChangedEvent, IssueTransitionedEvent, IssuesDeltaEvent, IssuesSnapshotEvent, IssuesUpdatedEvent, KIMI_CODE_BEHAVIOR, KNOWN_HARNESSES, LegacySystemHealthSummary, LegacyWebhookRelaySummary, LinearMcpAuthCallbackRelayedEvent, LinearMcpAuthHealthyEvent, LinearMcpAuthNotifiedEvent, LinearMcpAuthRequiredEvent, ListDiscoveredSessionsRpc, ListSessionsFeedRpc, MAX_CHANNEL_REPLY_ARTIFACT_LABEL_LENGTH, MAX_CHANNEL_REPLY_ARTIFACT_REFS, MAX_CHANNEL_REPLY_ARTIFACT_URI_LENGTH, MAX_CHANNEL_REPLY_SUMMARY_LENGTH, MEMBERSHIP_UNAVAILABLE_REASONS, MUSE_BEHAVIOR, MemoryAgentRole, MemoryHealthChangedEvent, MemoryIdentity, MemoryObservation, MemoryObservationCreatedEvent, MemoryResetMarkerCreatedEvent, MemoryRollupTriggeredEvent, MemoryStatus, MemoryStatusPhase, MemoryStatusUpdatedEvent, MemoryTokenUsage, MergeReadyEvent, MergeStatusValue, ModelOrigin, ModelOriginEntry, OHMYPI_BEHAVIOR, OPENCODE_BEHAVIOR, OVERDECK_AGENT_PROTOCOL_VERSION, OVERDECK_DASHBOARD_PROTOCOL_VERSION, OpenInEditorInput, OperatorInterventionEvent, OrderBook, OrderBookIndexEntry, OrderBookItem, OrderBookLane, OrderBookPosture, OrderBookSettings, OrderBookStatus, PanRpcError, PanRpcGroup, PendingTurn, PipelineReviewCompletedEvent, PipelineReviewStartedEvent, PipelineStatusChangedEvent, PipelineTestCompletedEvent, PipelineTestStartedEvent, PipelineVerificationFailedEvent, PipelineVerificationStartedEvent, PlanItemStatusChangedEvent, PlanItemsUnblockedEvent, PlanSubitemStatusChangedEvent, PlanningFailedEvent, PlanningStartedEvent, PlanningSyncEvent, ProjectCiHeadObservedEvent, ProjectCiSnapshot, ProjectCiSuite, ProjectCiSuiteObservedEvent, ProjectContextLayerRecord, ProjectContextLayerTarget, ProjectSessionTree, ProposedPlan, RagDecision, RagDecisionSource, ReadFileAtPathInput, ReadFileAtPathResult, ReadFileAtPathRpc, ReadWorkspaceFileInput, ReadWorkspaceFileResult, ReadWorkspaceFileRpc, ReleaseStatusValue, ReplayEventsRpc, ResetMarker, ResetMarkerScope, ResizeTerminalRpc, ResolveFilePathExistsInput, ResolveFilePathExistsResult, ResolveFilePathExistsRpc, ResourceStats, ResourcesUpdatedEvent, RestartGateChangedEvent, RestartGateKind, RestartGateOutcome, RestartGateRequest, RestartGateSnapshot, ReviewApprovedEvent, ReviewCoordinatorDiedEvent, ReviewCoordinatorStartedEvent, ReviewCycleEntry, ReviewReviewerCompletedEvent, ReviewReviewerStartedEvent, ReviewSpecialistTimedOutEvent, ReviewStatusChangedEvent, ReviewStatusSnapshot, ReviewStatusValue, ReviewVerdictDispatchedEvent, ReviewVerdictRejectedEvent, ReviewVerdictRestoreBlockedEvent, ReviewerRoundMetadata, ReviewerRoundSummary, Role, ScanCompleteEvent, ScanConversationsRpc, ScanProgressEvent, ScanProgressSnapshot, ScanResult, ScanStartedEvent, SearchConversationsRpc, SendTerminalInputRpc, SequenceNumber, ServiceHealthSnapshot, ServiceHealthStatus, SessionNode, SessionNodePresence, SessionNodeType, SessionTreeDelta, SessionsFeedFacetsSnapshot, SessionsFeedRowSnapshot, SessionsFeedSource, ShadowInferenceUpdateEvent, ShellOpenInEditorRpc, SpecialistCompletedEvent, SpecialistFailedEvent, SpecialistLifecycle, SpecialistStartedEvent, StartAgentRpc, StartPlanningRpc, SubagentSummary, SubscribeAgentOutputRpc, SubscribeConversationMessagesRpc, SubscribeDomainEventsRpc, SubscribeFlywheelStatusRpc, SubscribeIssueEventsRpc, SubscribeProjectSessionTreeRpc, SubscribeTerminalRpc, SubstrateBugFiledEvent, SweepEscalatedEvent, SweepRecommendationEvent, SweepScanEvent, SystemHealthConsumer, SystemHealthSeverityChangedEvent, SystemHealthSnapshot, SystemHeartbeatEvent, TELEMETRY_CLI_VERBS, TELEMETRY_EVENT_CATALOG, TELEMETRY_EVENT_NAMES, TELEMETRY_PROPERTY_DOMAINS, TerminalCloseRpc, TerminalOpenRpc, TerminalOutput, TerminalResizeRpc, TerminalWriteRpc, TestPassedEvent, TestStatusValue, ThinkingState, TurnDiffFileChange, TurnDiffSummary, UatStatusValue, VerificationStatusValue, WIRED_HOOK_INVENTORY, WIRED_HOOK_NAMES, WS_METHODS, WaitingReason, WaitingState, WorkCompletedEvent, WorkLogEntry, WorkspaceAbortedEvent, WorkspaceArtifactsResponse, WorkspaceContextLayerRecord, WorkspaceContextLayerTarget, WorkspaceCreatedEvent, WorkspaceDeletedEvent, WorkspaceDestroyedEvent, WorkspaceDetail, WorkspaceWipeStartedEvent, WriteFileAtPathInput, WriteFileAtPathResult, WriteFileAtPathRpc, applyEvent, applyEvents, applyIssueDelta, compareIssueIds, createIssueDelta, decodeFlywheelStats, deriveProjectCi, encodeFlywheelStats, getHarness, getHarnessBehavior, getMaxMemoryObservationsPerIssue, getMaxTurnDiffSummariesPerAgent, getRuntimeBehavior, isChannelReplyKind, isTerminalTurnDiffSummaryStatus, normalizeChannelReplyPayload, omitTurnDiffSummariesForAgent, projectLegacySystemHealthSummary, syncSnapshot, trimMemoryObservations, trimTurnDiffSummaries };
13335
+ //#region src/terminal-backend.ts
13336
+ const TERMINAL_BACKEND_NAMES = ["herdr", "tmux"];
13337
+ const AGENT_ROLES = [
13338
+ "work",
13339
+ "worker",
13340
+ "review",
13341
+ "test",
13342
+ "uat",
13343
+ "strike",
13344
+ "plan"
13345
+ ];
13346
+ function isTerminalBackendName(value) {
13347
+ return typeof value === "string" && TERMINAL_BACKEND_NAMES.includes(value);
13348
+ }
13349
+ function isAgentRole(value) {
13350
+ return typeof value === "string" && AGENT_ROLES.includes(value);
13351
+ }
13352
+ //#endregion
13353
+ //#region src/agent-directory.ts
13354
+ const DirectoryEntryKind = Schema.Literals([
13355
+ "agent",
13356
+ "conversation",
13357
+ "subagent",
13358
+ "external"
13359
+ ]);
13360
+ const DirectoryEntryState = Schema.Literals([
13361
+ "working",
13362
+ "idle",
13363
+ "blocked",
13364
+ "done",
13365
+ "stopped",
13366
+ "unknown"
13367
+ ]);
13368
+ const DirectoryEntrySource = Schema.Literals([
13369
+ "overdeck",
13370
+ "pane",
13371
+ "conversation",
13372
+ "claude-subagent",
13373
+ "codex-subagent",
13374
+ "registered",
13375
+ "codex-plugin"
13376
+ ]);
13377
+ const DirectoryTranscriptRef = Schema.Union([
13378
+ Schema.Struct({
13379
+ route: Schema.Literal("agent"),
13380
+ agentId: Schema.String
13381
+ }),
13382
+ Schema.Struct({
13383
+ route: Schema.Literal("agent-subagent"),
13384
+ agentId: Schema.String,
13385
+ subagentId: Schema.String
13386
+ }),
13387
+ Schema.Struct({
13388
+ route: Schema.Literal("conversation"),
13389
+ conversationName: Schema.String
13390
+ }),
13391
+ Schema.Struct({
13392
+ route: Schema.Literal("conversation-subagent"),
13393
+ conversationName: Schema.String,
13394
+ subagentId: Schema.String
13395
+ })
13396
+ ]);
13397
+ const DirectoryEntryLocation = Schema.Literals(["local", "remote"]);
13398
+ const DirectoryEntry = Schema.Struct({
13399
+ id: Schema.String,
13400
+ kind: DirectoryEntryKind,
13401
+ label: Schema.String,
13402
+ location: DirectoryEntryLocation,
13403
+ /** projects.yaml key; `unassigned` when none (D5). */
13404
+ projectKey: Schema.String,
13405
+ /** Uppercase issue id, e.g. `PAN-3920`. */
13406
+ issueId: Schema.NullOr(Schema.String),
13407
+ /** The issue's title from the dashboard's tracker cache; null when unknown. */
13408
+ issueTitle: Schema.NullOr(Schema.String),
13409
+ parentId: Schema.NullOr(Schema.String),
13410
+ role: Schema.NullOr(Schema.String),
13411
+ /** `unknown` when not known. */
13412
+ harness: Schema.String,
13413
+ /** `unknown` when not known. */
13414
+ model: Schema.String,
13415
+ state: DirectoryEntryState,
13416
+ startedAt: Schema.NullOr(Schema.String),
13417
+ lastActivityAt: Schema.NullOr(Schema.String),
13418
+ costUsd: Schema.NullOr(Schema.Number),
13419
+ source: DirectoryEntrySource,
13420
+ transcript: Schema.NullOr(DirectoryTranscriptRef)
13421
+ });
13422
+ const AgentDirectoryResponse = Schema.Struct({
13423
+ generatedAt: Schema.String,
13424
+ windowHours: Schema.Number,
13425
+ entries: Schema.Array(DirectoryEntry)
13426
+ });
13427
+ //#endregion
13428
+ //#region src/companion-terminal.ts
13429
+ /**
13430
+ * Which companion terminal a conversation gets, or `null` for "keep the
13431
+ * owner pane as TERMINAL". A Codex conversation still on the legacy
13432
+ * `codex.transport: tui` runs the native TUI in its owner pane; the server
13433
+ * adapter reports that as `unsupported` and points at the runtime pane.
13434
+ */
13435
+ function companionTerminalKindFor(conversation) {
13436
+ if (conversation.harness === "opencode") return "opencode-attach";
13437
+ if (conversation.harness === "codex") return "codex-resume-remote";
13438
+ return null;
13439
+ }
13440
+ /** Body keys each mutation accepts. Anything else is rejected as target injection. */
13441
+ const COMPANION_TERMINAL_OPEN_BODY_KEYS = [];
13442
+ const COMPANION_TERMINAL_CLOSE_BODY_KEYS = ["generation"];
13443
+ //#endregion
13444
+ export { ACP_BEHAVIOR, AGENT_ROLES, Activity, ActivityDetailedEvent, ActivityEntryEvent, ActivityTtsEvent, ActivityUpdatedEvent, AdmissionState, AgentActivityChangedEvent, AgentChannelReply, AgentChannelReplyEvent, AgentCompletedEvent, AgentContextSaturationChangedEvent, AgentCreatedEvent, AgentCurrentIssueSetEvent, AgentDirectoryResponse, AgentEnrichmentChangedEvent, AgentHealthKind, AgentHealthSnapshot, AgentHealthStatus, AgentHeartbeatDeadEvent, AgentHookFiredEvent, AgentId, AgentMessageReceivedEvent, AgentModelSetEvent, AgentOutput, AgentOutputReceivedEvent, AgentPermissionRequestedEvent, AgentPermissionResolvedEvent, AgentResolution, AgentResolutionChangedEvent, AgentRuntimeSnapshot, AgentSnapshot, AgentStartedEvent, AgentStateRestoredEvent, AgentStatus, AgentStatusChangedEvent, AgentStoppedEvent, AgentThinkingStartedEvent, AgentThinkingStoppedEvent, AgentTurnDiffCompletedEvent, AgentWaitingClearedEvent, AgentWaitingStartedEvent, ArtifactAgentHarness, ArtifactAgentRole, ArtifactCreateResponse, ArtifactDetailResponse, ArtifactHash, ArtifactId, ArtifactLifecycleState, ArtifactListEntry, ArtifactListResponse, ArtifactMetadata, ArtifactPublishResponse, ArtifactSlug, ArtifactStatusResponse, ArtifactUnshareResponse, ArtifactUrls, ArtifactValidationCode, ArtifactValidationFinding, ArtifactValidationResult, BackendPane, BackendPaneChangedEvent, BackendPaneRemovedEvent, BeadsFreshnessChangedEvent, CHANNEL_REPLY_KIND_VALUES, CLAUDE_CODE_BEHAVIOR, CODEX_BEHAVIOR, COMPANION_TERMINAL_CLOSE_BODY_KEYS, COMPANION_TERMINAL_OPEN_BODY_KEYS, COMPOSER_COMMAND_INSERT_OVERRIDES, COMPOSER_COMMAND_MANIFEST, COMPOSER_COMMAND_VARIANTS, CONTEXT_LAYER_KINDS, CONTEXT_PREVIEW_HARNESSES, ChannelPermissionRequestSnapshot, ChannelReplyArtifactRef, ChannelReplyKind, ChatMessage, ClaudeChannelPermissionBehavior, CompactBoundary, ContextEditableLayerRecord, ContextHarnessPreviews, ContextLayerDraft, ContextLayerKind, ContextLayerSaveRequest, ContextLayerSaveResponse, ContextLayerTarget, ContextLayersResponse, ContextPreviewDiagnostic, ContextPreviewHarness, ContextPreviewRequest, ContextPreviewResponse, ContextProjectSummary, ContextSyncRequest, ContextSyncResponse, ContextSyncTarget, ContextUsage, ContextWorkspaceSummary, ConversationCompactingChangedEvent, ConversationCostSummary, ConversationCreatedEvent, ConversationEvent, ConversationFilter, ConversationMovedEvent, ConversationPermissionChangedEvent, ConversationResponse, ConversationTitleChangedEvent, CostEventRecordedEvent, DEFAULT_MAX_MEMORY_OBSERVATIONS_PER_ISSUE, DEFAULT_MAX_TURN_DIFF_SUMMARIES_PER_AGENT, DashboardLifecycleCompletedEvent, DashboardLifecycleFailedEvent, DashboardLifecycleStartedEvent, DashboardSnapshot, DeepWipeRpc, DeployStalenessSnapshot, DerivedBranchState, DerivedIssueState, DerivedPrState, DirectoryEntry, DirectoryEntryKind, DirectoryEntryLocation, DirectoryEntrySource, DirectoryEntryState, DirectoryTranscriptRef, DiscoveredSessionSnapshot, DomainEvent, EDITORS, EditorIdSchema, EmbedProgressEvent, EmbedProgressSnapshot, EmbedSessionsRpc, EnrichCompleteEvent, EnrichProgressEvent, EnrichProgressSnapshot, EnrichSessionsRpc, EnrichStatsSnapshot, ExtractionProviderConfig, ExtractionProviderTarget, FeatureNode, FeatureRegistryEntry, FeatureRegistryStatus, FlywheelAgent, FlywheelAgentStatus, FlywheelBugRateCriterion, FlywheelConversationSummary, FlywheelDerivedStatus, FlywheelEffort, FlywheelFreshness, FlywheelHarness, FlywheelHeadline, FlywheelHttpUrl, FlywheelInFlightRow, FlywheelJournalSummary, FlywheelLastTick, FlywheelOrchestrator, FlywheelOrderBookSummary, FlywheelOrders, FlywheelP0Criterion, FlywheelParkedItem, FlywheelPipelineItem, FlywheelPipelineStatus, FlywheelPipelineVerb, FlywheelPolicies, FlywheelRunId, FlywheelRunState, FlywheelScope, FlywheelStats, FlywheelStatsCriterionStatus, FlywheelStatsTrend, FlywheelStatsWindow, FlywheelStatus, FlywheelSubstrateBug, FlywheelSubstrateBugRow, FlywheelSubstrateBugStatus, FlywheelSubstrateSeverity, FlywheelSuggestion, FlywheelSuggestionAction, FlywheelSuggestionPriority, FlywheelSystemStatus, GetAvailableEditorsRpc, GetConversationCostByWorkspaceRpc, GetConversationCostRpc, GetConversationStatsRpc, GetDiscoveredSessionRpc, GetSessionsFeedFacetsRpc, GetSnapshotRpc, GlobalContextLayerRecord, GlobalContextLayerTarget, HOOK_INVENTORY, HealthReason, HealthState, HostHealthMetrics, HostPlatform, HygieneFinding, HygienePullRequest, HygieneReport, INITIAL_READ_MODEL_STATE, ISSUE_ATTENTIONS, ISSUE_STATES, ISSUE_STATE_PRECEDENCE, IssueAttention, IssueId, IssueState, IssueStateChangedEvent, IssueStatusChangedEvent, IssueTransitionedEvent, IssuesDeltaEvent, IssuesSnapshotEvent, IssuesUpdatedEvent, KIMI_CODE_BEHAVIOR, KNOWN_HARNESSES, LegacySystemHealthSummary, LegacyWebhookRelaySummary, LinearMcpAuthCallbackRelayedEvent, LinearMcpAuthHealthyEvent, LinearMcpAuthNotifiedEvent, LinearMcpAuthRequiredEvent, ListDiscoveredSessionsRpc, ListSessionsFeedRpc, MAX_CHANNEL_REPLY_ARTIFACT_LABEL_LENGTH, MAX_CHANNEL_REPLY_ARTIFACT_REFS, MAX_CHANNEL_REPLY_ARTIFACT_URI_LENGTH, MAX_CHANNEL_REPLY_SUMMARY_LENGTH, MEMBERSHIP_UNAVAILABLE_REASONS, MUSE_BEHAVIOR, MemoryAgentRole, MemoryHealthChangedEvent, MemoryIdentity, MemoryObservation, MemoryObservationCreatedEvent, MemoryResetMarkerCreatedEvent, MemoryRollupTriggeredEvent, MemoryStatus, MemoryStatusPhase, MemoryStatusUpdatedEvent, MemoryTokenUsage, MergeReadyEvent, ModelOrigin, ModelOriginEntry, OHMYPI_BEHAVIOR, OPENCODE_BEHAVIOR, OVERDECK_AGENT_PROTOCOL_VERSION, OVERDECK_DASHBOARD_PROTOCOL_VERSION, OpenInEditorInput, OperatorInterventionEvent, OrderBook, OrderBookIndexEntry, OrderBookItem, OrderBookLane, OrderBookPosture, OrderBookSettings, OrderBookStatus, PanRpcError, PanRpcGroup, PendingTurn, PipelineReviewCompletedEvent, PipelineReviewStartedEvent, PipelineTestCompletedEvent, PipelineTestStartedEvent, PipelineVerificationFailedEvent, PipelineVerificationStartedEvent, PlanItemStatusChangedEvent, PlanItemsUnblockedEvent, PlanSubitemStatusChangedEvent, PlanningFailedEvent, PlanningStartedEvent, PlanningSyncEvent, PrChecksState, PrReviewState, ProjectCiHeadObservedEvent, ProjectCiSnapshot, ProjectCiSuite, ProjectCiSuiteObservedEvent, ProjectContextLayerRecord, ProjectContextLayerTarget, ProjectSessionTree, ProposedPlan, RagDecision, RagDecisionSource, ReadFileAtPathInput, ReadFileAtPathResult, ReadFileAtPathRpc, ReadWorkspaceFileInput, ReadWorkspaceFileResult, ReadWorkspaceFileRpc, ReplayEventsRpc, ResetMarker, ResetMarkerScope, ResizeTerminalRpc, ResolveFilePathExistsInput, ResolveFilePathExistsResult, ResolveFilePathExistsRpc, ResourceStats, ResourcesUpdatedEvent, RestartGateChangedEvent, RestartGateKind, RestartGateOutcome, RestartGateRequest, RestartGateSnapshot, ReviewApprovedEvent, ReviewCoordinatorDiedEvent, ReviewCoordinatorStartedEvent, ReviewReviewerCompletedEvent, ReviewReviewerStartedEvent, ReviewSpecialistTimedOutEvent, ReviewVerdictDispatchedEvent, ReviewVerdictRejectedEvent, ReviewVerdictRestoreBlockedEvent, ReviewerRoundMetadata, ReviewerRoundSummary, Role, ScanCompleteEvent, ScanConversationsRpc, ScanProgressEvent, ScanProgressSnapshot, ScanResult, ScanStartedEvent, SearchConversationsRpc, SendTerminalInputRpc, SequenceNumber, ServiceHealthSnapshot, ServiceHealthStatus, SessionNode, SessionNodePresence, SessionNodeType, SessionTreeDelta, SessionsFeedFacetsSnapshot, SessionsFeedRowSnapshot, SessionsFeedSource, ShadowInferenceUpdateEvent, ShellOpenInEditorRpc, SpecialistCompletedEvent, SpecialistFailedEvent, SpecialistLifecycle, SpecialistStartedEvent, StartAgentRpc, StartPlanningRpc, SubagentSummary, SubscribeAgentOutputRpc, SubscribeConversationMessagesRpc, SubscribeDomainEventsRpc, SubscribeIssueEventsRpc, SubscribeProjectSessionTreeRpc, SubscribeTerminalRpc, SubstrateBugFiledEvent, SweepEscalatedEvent, SweepRecommendationEvent, SweepScanEvent, SystemHealthConsumer, SystemHealthSeverityChangedEvent, SystemHealthSnapshot, SystemHeartbeatEvent, TELEMETRY_CLI_VERBS, TELEMETRY_EVENT_CATALOG, TELEMETRY_EVENT_NAMES, TELEMETRY_PROPERTY_DOMAINS, TERMINAL_BACKEND_NAMES, TerminalCloseRpc, TerminalOpenRpc, TerminalOutput, TerminalResizeRpc, TerminalWriteRpc, TestPassedEvent, ThinkingState, TickMarker, TickMarkerPhase, TurnDiffFileChange, TurnDiffSummary, WIRED_HOOK_INVENTORY, WIRED_HOOK_NAMES, WS_METHODS, WaitingReason, WaitingState, WorkCompletedEvent, WorkLogEntry, WorkspaceAbortedEvent, WorkspaceArtifactsResponse, WorkspaceContextLayerRecord, WorkspaceContextLayerTarget, WorkspaceCreatedEvent, WorkspaceDeletedEvent, WorkspaceDestroyedEvent, WorkspaceWipeStartedEvent, WriteFileAtPathInput, WriteFileAtPathResult, WriteFileAtPathRpc, applyEvent, applyEvents, applyIssueDelta, companionTerminalKindFor, compareIssueIds, createIssueDelta, decodeFlywheelDerivedStatus, decodeFlywheelStats, deriveProjectCi, encodeFlywheelStats, getHarness, getHarnessBehavior, getMaxMemoryObservationsPerIssue, getMaxTurnDiffSummariesPerAgent, getRuntimeBehavior, isAgentRole, isAgentSessionName, isChannelReplyKind, isIssueAttention, isIssueState, isTerminalBackendName, isTerminalTurnDiffSummaryStatus, normalizeChannelReplyPayload, omitTurnDiffSummariesForAgent, projectLegacySystemHealthSummary, syncSnapshot, trimMemoryObservations, trimTurnDiffSummaries };
13692
13445
 
13693
13446
  //# sourceMappingURL=index.mjs.map