@overdeck/contracts 0.51.0 → 0.60.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,143 @@
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
+ /** Issue the pane belongs to; absent for operator conversations. */
9
+ issue: Schema.optional(Schema.String),
10
+ role: Schema.Literals([
11
+ "work",
12
+ "worker",
13
+ "review",
14
+ "test",
15
+ "uat",
16
+ "strike",
17
+ "plan"
18
+ ]),
19
+ harness: Schema.String,
20
+ model: Schema.String,
21
+ state: Schema.Literals([
22
+ "idle",
23
+ "working",
24
+ "blocked",
25
+ "done",
26
+ "exited",
27
+ "unknown"
28
+ ]),
29
+ /** Epoch millis the pane entered `state`; drives the `stuck` attention. */
30
+ stateSince: Schema.optional(Schema.Number),
31
+ /** Handle the terminal WebSocket attaches to. */
32
+ terminalId: Schema.optional(Schema.String),
33
+ /** Working directory of the pane (the issue workspace path). */
34
+ workspace: Schema.optional(Schema.String)
35
+ });
36
+ //#endregion
37
+ //#region src/derived-issue-state.ts
38
+ /**
39
+ * The nine pipeline states of the FR-6 table. They are mutually exclusive and
40
+ * resolved in this precedence (highest first), because the underlying facts
41
+ * overlap:
42
+ *
43
+ * closed > merged > ready > changes-requested > in-review > working >
44
+ * parked > planned > backlog
45
+ */
46
+ const IssueState = Schema.Literals([
47
+ "backlog",
48
+ "parked",
49
+ "planned",
50
+ "working",
51
+ "in-review",
52
+ "changes-requested",
53
+ "ready",
54
+ "merged",
55
+ "closed"
56
+ ]);
57
+ /** Something the operator has to look at. Orthogonal to `IssueState`. */
58
+ const IssueAttention = Schema.Literals([
59
+ "needs-you",
60
+ "stuck",
61
+ "api-error"
62
+ ]);
63
+ /** Latest review decision on the PR, as the forge reports it. */
64
+ const PrReviewState = Schema.Literals([
65
+ "approved",
66
+ "changes-requested",
67
+ "review-requested",
68
+ "commented",
69
+ "none"
70
+ ]);
71
+ /** Aggregate check-run conclusion for the PR head. */
72
+ const PrChecksState = Schema.Literals([
73
+ "green",
74
+ "red",
75
+ "pending"
76
+ ]);
77
+ /** The pull request (or merge request) backing an issue. */
78
+ const DerivedPrState = Schema.Struct({
79
+ url: Schema.String,
80
+ number: Schema.Number,
81
+ reviewState: PrReviewState,
82
+ checks: PrChecksState,
83
+ /** Forge mergeability. `null` when the forge has not computed it yet. */
84
+ mergeable: Schema.NullOr(Schema.Boolean)
85
+ });
86
+ /** The issue's feature branch as git reports it. */
87
+ const DerivedBranchState = Schema.Struct({
88
+ name: Schema.String,
89
+ aheadOfMain: Schema.Number,
90
+ pushed: Schema.Boolean
91
+ });
92
+ /** Everything the dashboard needs to render an issue's pipeline position. */
93
+ const DerivedIssueState = Schema.Struct({
94
+ issueId: Schema.String,
95
+ state: IssueState,
96
+ attention: Schema.optional(IssueAttention),
97
+ pr: Schema.optional(DerivedPrState),
98
+ branch: Schema.optional(DerivedBranchState),
99
+ /**
100
+ * No tracker answered for this issue, so `closed` — the top of the
101
+ * precedence — could not be ruled in or out. Present only in that case; an
102
+ * unresolved tracker read is never reported as an open issue.
103
+ */
104
+ trackerUnknown: Schema.optional(Schema.Literal(true))
105
+ });
106
+ const ISSUE_STATES = [
107
+ "backlog",
108
+ "parked",
109
+ "planned",
110
+ "working",
111
+ "in-review",
112
+ "changes-requested",
113
+ "ready",
114
+ "merged",
115
+ "closed"
116
+ ];
117
+ /** Highest precedence first — the order `deriveIssueState` resolves in. */
118
+ const ISSUE_STATE_PRECEDENCE = [
119
+ "closed",
120
+ "merged",
121
+ "ready",
122
+ "changes-requested",
123
+ "in-review",
124
+ "working",
125
+ "parked",
126
+ "planned",
127
+ "backlog"
128
+ ];
129
+ const ISSUE_ATTENTIONS = [
130
+ "needs-you",
131
+ "stuck",
132
+ "api-error"
133
+ ];
134
+ function isIssueState(value) {
135
+ return typeof value === "string" && ISSUE_STATES.includes(value);
136
+ }
137
+ function isIssueAttention(value) {
138
+ return typeof value === "string" && ISSUE_ATTENTIONS.includes(value);
139
+ }
140
+ //#endregion
4
141
  //#region src/types.ts
5
142
  const IssueId = Schema.String;
6
143
  const MEMBERSHIP_UNAVAILABLE_REASONS = [
@@ -41,52 +178,6 @@ const AgentResolution = Schema.Literals([
41
178
  "abandoned",
42
179
  "api_error"
43
180
  ]);
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
181
  const KNOWN_HARNESSES = new Set([
91
182
  "claude-code",
92
183
  "ohmypi",
@@ -276,87 +367,6 @@ const AgentSnapshot = Schema.Struct({
276
367
  runtimeSnapshotSequence: Schema.optional(SequenceNumber)
277
368
  });
278
369
  /** 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
370
  const TurnDiffFileChange = Schema.Struct({
361
371
  path: Schema.String,
362
372
  kind: Schema.optional(Schema.String),
@@ -482,7 +492,10 @@ const DashboardSnapshot = Schema.Struct({
482
492
  sequence: SequenceNumber,
483
493
  agents: Schema.Array(AgentSnapshot),
484
494
  specialists: Schema.Array(Schema.Unknown),
485
- reviewStatuses: Schema.Array(ReviewStatusSnapshot),
495
+ /** PAN-3917 FR-6: the derived pipeline state of every known issue. */
496
+ derivedIssueStates: Schema.Array(DerivedIssueState),
497
+ /** PAN-3917 FR-12: every live agent pane the terminal backend reports. */
498
+ backendPanes: Schema.Array(BackendPane),
486
499
  issues: Schema.Array(Schema.Unknown),
487
500
  recentActivity: Schema.optional(Schema.Array(Schema.Unknown)),
488
501
  resources: Schema.optional(Schema.Unknown),
@@ -497,13 +510,6 @@ const DashboardSnapshot = Schema.Struct({
497
510
  restartGate: Schema.optional(RestartGateSnapshot),
498
511
  timestamp: Schema.String
499
512
  });
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
513
  const ResourceStats = Schema.Struct({ containers: Schema.Array(Schema.Struct({
508
514
  name: Schema.String,
509
515
  cpu: Schema.optional(Schema.String),
@@ -588,14 +594,6 @@ const SessionNode = Schema.Struct({
588
594
  "tmux",
589
595
  "supervisor"
590
596
  ])),
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
597
  modelOrigin: Schema.optional(ModelOrigin)
600
598
  });
601
599
  const FeatureNode = Schema.Struct({
@@ -1735,16 +1733,32 @@ const PlanItemsUnblockedEvent = Schema.Struct({
1735
1733
  items: Schema.Array(Schema.String)
1736
1734
  })
1737
1735
  });
1738
- /** Replaces socket.io `pipeline:status` */
1739
- const PipelineStatusChangedEvent = Schema.Struct({
1740
- type: Schema.Literal("pipeline.status_changed"),
1736
+ /**
1737
+ * PAN-3917 FR-6 — an issue's derived pipeline state changed.
1738
+ *
1739
+ * Emitted with `emitOnly`: derived state is recomputed from the tracker, the
1740
+ * forge and the terminal backend on every boot, so persisting it would be
1741
+ * storing a status Overdeck can derive.
1742
+ */
1743
+ const IssueStateChangedEvent = Schema.Struct({
1744
+ type: Schema.Literal("issue_state.changed"),
1741
1745
  sequence: SequenceNumber,
1742
1746
  timestamp: Schema.String,
1743
- payload: Schema.Struct({
1744
- issueId: IssueId,
1745
- workspaceId: Schema.optional(Schema.String),
1746
- status: ReviewStatusSnapshot
1747
- })
1747
+ payload: Schema.Struct({ issueState: DerivedIssueState })
1748
+ });
1749
+ /** PAN-3917 FR-12 — a live agent pane appeared or changed. `emitOnly`. */
1750
+ const BackendPaneChangedEvent = Schema.Struct({
1751
+ type: Schema.Literal("backend_pane.changed"),
1752
+ sequence: SequenceNumber,
1753
+ timestamp: Schema.String,
1754
+ payload: Schema.Struct({ pane: BackendPane })
1755
+ });
1756
+ /** PAN-3917 FR-12 — a pane left the backend inventory. `emitOnly`. */
1757
+ const BackendPaneRemovedEvent = Schema.Struct({
1758
+ type: Schema.Literal("backend_pane.removed"),
1759
+ sequence: SequenceNumber,
1760
+ timestamp: Schema.String,
1761
+ payload: Schema.Struct({ paneId: Schema.String })
1748
1762
  });
1749
1763
  /** Replaces socket.io `merge:ready` */
1750
1764
  const MergeReadyEvent = Schema.Struct({
@@ -1756,17 +1770,6 @@ const MergeReadyEvent = Schema.Struct({
1756
1770
  workspaceId: Schema.optional(Schema.String)
1757
1771
  })
1758
1772
  });
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
1773
  /** New — review specialist dispatched */
1771
1774
  const PipelineReviewStartedEvent = Schema.Struct({
1772
1775
  type: Schema.Literal("pipeline.review-started"),
@@ -2605,9 +2608,10 @@ const DomainEvent = Schema.Union([
2605
2608
  PlanItemStatusChangedEvent,
2606
2609
  PlanSubitemStatusChangedEvent,
2607
2610
  PlanItemsUnblockedEvent,
2608
- PipelineStatusChangedEvent,
2611
+ IssueStateChangedEvent,
2612
+ BackendPaneChangedEvent,
2613
+ BackendPaneRemovedEvent,
2609
2614
  MergeReadyEvent,
2610
- ReviewStatusChangedEvent,
2611
2615
  PipelineReviewStartedEvent,
2612
2616
  PipelineReviewCompletedEvent,
2613
2617
  PipelineTestStartedEvent,
@@ -2837,248 +2841,66 @@ const OpenInEditorInput = Schema.Struct({
2837
2841
  editor: EditorIdSchema
2838
2842
  });
2839
2843
  //#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
2844
+ //#region src/rpc.ts
2845
+ const WS_METHODS = {
2846
+ scanConversations: "pan.scanConversations",
2847
+ searchConversations: "pan.searchConversations",
2848
+ listDiscoveredSessions: "pan.listDiscoveredSessions",
2849
+ listSessionsFeed: "pan.listSessionsFeed",
2850
+ getSessionsFeedFacets: "pan.getSessionsFeedFacets",
2851
+ getDiscoveredSession: "pan.getDiscoveredSession",
2852
+ enrichSessions: "pan.enrichSessions",
2853
+ embedSessions: "pan.embedSessions",
2854
+ getConversationCost: "pan.getConversationCost",
2855
+ getConversationCostByWorkspace: "pan.getConversationCostByWorkspace",
2856
+ getConversationStats: "pan.getConversationStats",
2857
+ subscribeDomainEvents: "pan.subscribeDomainEvents",
2858
+ subscribeIssueEvents: "pan.subscribeIssueEvents",
2859
+ subscribeTerminal: "pan.subscribeTerminal",
2860
+ subscribeAgentOutput: "pan.subscribeAgentOutput",
2861
+ subscribeConversationMessages: "pan.subscribeConversationMessages",
2862
+ subscribeProjectSessionTree: "pan.subscribeProjectSessionTree",
2863
+ getSnapshot: "pan.getSnapshot",
2864
+ replayEvents: "pan.replayEvents",
2865
+ readWorkspaceFile: "pan.readWorkspaceFile",
2866
+ readFileAtPath: "pan.readFileAtPath",
2867
+ writeFileAtPath: "pan.writeFileAtPath",
2868
+ resolveFilePathExists: "pan.resolveFilePathExists",
2869
+ terminalOpen: "pan.terminalOpen",
2870
+ terminalWrite: "pan.terminalWrite",
2871
+ terminalResize: "pan.terminalResize",
2872
+ terminalClose: "pan.terminalClose",
2873
+ startPlanning: "pan.startPlanning",
2874
+ startAgent: "pan.startAgent",
2875
+ deepWipe: "pan.deepWipe",
2876
+ sendTerminalInput: "pan.sendTerminalInput",
2877
+ resizeTerminal: "pan.resizeTerminal",
2878
+ shellOpenInEditor: "pan.shellOpenInEditor",
2879
+ getAvailableEditors: "pan.getAvailableEditors"
2880
+ };
2881
+ var PanRpcError = class extends Schema.TaggedErrorClass()("PanRpcError", {
2882
+ message: Schema.String,
2883
+ code: Schema.optional(Schema.String)
2884
+ }) {};
2885
+ const TerminalOutput = Schema.Struct({
2886
+ sessionName: Schema.String,
2887
+ data: Schema.String
2865
2888
  });
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
2889
+ const AgentOutput = Schema.Struct({
2890
+ agentId: Schema.String,
2891
+ line: Schema.String
2873
2892
  });
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)
2893
+ const ProposedPlan = Schema.Struct({
2894
+ id: Schema.String,
2895
+ plan: Schema.String,
2896
+ planFilePath: Schema.optional(Schema.String),
2897
+ status: Schema.Literals([
2898
+ "pending",
2899
+ "approved",
2900
+ "rejected"
2901
+ ]),
2902
+ createdAt: Schema.String,
2903
+ resolvedAt: Schema.optional(Schema.String)
3082
2904
  });
3083
2905
  const CompactBoundary = Schema.Struct({
3084
2906
  id: Schema.String,
@@ -3280,12 +3102,6 @@ const TerminalCloseRpc = Rpc.make(WS_METHODS.terminalClose, {
3280
3102
  payload: Schema.Struct({ sessionName: Schema.String }),
3281
3103
  error: PanRpcError
3282
3104
  });
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
3105
  const ReadWorkspaceFileInput = Schema.Struct({
3290
3106
  issueId: IssueId,
3291
3107
  relativePath: Schema.String,
@@ -3432,13 +3248,6 @@ const SubscribeProjectSessionTreeRpc = Rpc.make(WS_METHODS.subscribeProjectSessi
3432
3248
  error: PanRpcError,
3433
3249
  stream: true
3434
3250
  });
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
3251
  /** 19. Open a workspace in an editor (PAN-966) */
3443
3252
  const ShellOpenInEditorRpc = Rpc.make(WS_METHODS.shellOpenInEditor, {
3444
3253
  payload: OpenInEditorInput,
@@ -3616,7 +3425,7 @@ const GetConversationStatsRpc = Rpc.make(WS_METHODS.getConversationStats, {
3616
3425
  error: PanRpcError
3617
3426
  });
3618
3427
  /** 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);
3428
+ 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
3429
  //#endregion
3621
3430
  //#region src/issue-delta.ts
3622
3431
  function createIssueDelta(previous, next) {
@@ -3641,7 +3450,8 @@ const INITIAL_READ_MODEL_STATE = {
3641
3450
  sequence: 0,
3642
3451
  agentsById: {},
3643
3452
  agentRuntimeById: {},
3644
- reviewStatusByIssueId: {},
3453
+ derivedIssueStateByIssueId: {},
3454
+ backendPanesById: {},
3645
3455
  resources: null,
3646
3456
  agentOutputById: {},
3647
3457
  issuesRaw: [],
@@ -3758,8 +3568,10 @@ function bumpRuntimeSnapshotSequence(agentsById, agentId, sequence) {
3758
3568
  function syncSnapshot(state, snapshot) {
3759
3569
  const agentsById = {};
3760
3570
  for (const agent of snapshot.agents) agentsById[agent.id] = agent;
3761
- const reviewStatusByIssueId = {};
3762
- for (const rs of snapshot.reviewStatuses) reviewStatusByIssueId[rs.issueId] = rs;
3571
+ const derivedIssueStateByIssueId = {};
3572
+ for (const derived of snapshot.derivedIssueStates ?? []) derivedIssueStateByIssueId[derived.issueId] = derived;
3573
+ const backendPanesById = {};
3574
+ for (const pane of snapshot.backendPanes ?? []) backendPanesById[pane.id] = pane;
3763
3575
  const channelPermissionRequestsById = {};
3764
3576
  const channelPermissionRequestIdsByAgentId = {};
3765
3577
  for (const request of snapshot.channelPermissionRequests ?? []) {
@@ -3775,7 +3587,8 @@ function syncSnapshot(state, snapshot) {
3775
3587
  ...state,
3776
3588
  sequence: snapshot.sequence,
3777
3589
  agentsById,
3778
- reviewStatusByIssueId,
3590
+ derivedIssueStateByIssueId,
3591
+ backendPanesById,
3779
3592
  agentRuntimeById: snapshot.agentRuntimeById ?? state.agentRuntimeById,
3780
3593
  channelPermissionRequestsById,
3781
3594
  channelPermissionRequestIdsByAgentId,
@@ -3865,7 +3678,16 @@ function applyEvent(state, event) {
3865
3678
  };
3866
3679
  }
3867
3680
  case "agent.stopped": {
3868
- const { [event.payload.agentId]: _removed, ...rest } = state.agentsById;
3681
+ const stoppedAgent = state.agentsById[event.payload.agentId];
3682
+ const nextAgentsById = stoppedAgent ? {
3683
+ ...state.agentsById,
3684
+ [event.payload.agentId]: {
3685
+ ...stoppedAgent,
3686
+ status: "stopped",
3687
+ hasLiveTmuxSession: false,
3688
+ lastActivity: event.timestamp
3689
+ }
3690
+ } : state.agentsById;
3869
3691
  const runtimeById = state.agentRuntimeById ?? {};
3870
3692
  const prevRuntime = runtimeById[event.payload.agentId];
3871
3693
  const nextRuntimeById = prevRuntime ? {
@@ -3894,7 +3716,7 @@ function applyEvent(state, event) {
3894
3716
  return {
3895
3717
  ...state,
3896
3718
  sequence: Math.max(state.sequence, event.sequence),
3897
- agentsById: rest,
3719
+ agentsById: nextAgentsById,
3898
3720
  agentRuntimeById: nextRuntimeById,
3899
3721
  channelPermissionRequestsById: nextPermissionRequestsById,
3900
3722
  channelPermissionRequestIdsByAgentId: restPendingIds,
@@ -4039,85 +3861,35 @@ function applyEvent(state, event) {
4039
3861
  }
4040
3862
  };
4041
3863
  }
4042
- case "pipeline.status_changed":
4043
- case "review.status_changed": return {
3864
+ case "issue_state.changed": return {
4044
3865
  ...state,
4045
3866
  sequence: Math.max(state.sequence, event.sequence),
4046
- reviewStatusByIssueId: {
4047
- ...state.reviewStatusByIssueId,
4048
- [event.payload.issueId]: event.payload.status
3867
+ derivedIssueStateByIssueId: {
3868
+ ...state.derivedIssueStateByIssueId,
3869
+ [event.payload.issueState.issueId]: event.payload.issueState
4049
3870
  }
4050
3871
  };
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 {
3872
+ case "backend_pane.changed": return {
4099
3873
  ...state,
4100
- sequence: Math.max(state.sequence, event.sequence)
3874
+ sequence: Math.max(state.sequence, event.sequence),
3875
+ backendPanesById: {
3876
+ ...state.backendPanesById,
3877
+ [event.payload.pane.id]: event.payload.pane
3878
+ }
4101
3879
  };
4102
- case "review.coordinator_started": {
4103
- const { issueId, sessionName } = event.payload;
4104
- const nextStatus = {
4105
- ...state.reviewStatusByIssueId[issueId] ?? { issueId },
4106
- reviewCoordinatorSessionName: sessionName
4107
- };
3880
+ case "backend_pane.removed": {
3881
+ const { [event.payload.paneId]: _removed, ...rest } = state.backendPanesById;
4108
3882
  return {
4109
3883
  ...state,
4110
3884
  sequence: Math.max(state.sequence, event.sequence),
4111
- reviewStatusByIssueId: {
4112
- ...state.reviewStatusByIssueId,
4113
- [issueId]: nextStatus
4114
- }
3885
+ backendPanesById: rest
4115
3886
  };
4116
3887
  }
4117
- case "review.coordinator.died": return {
4118
- ...state,
4119
- sequence: Math.max(state.sequence, event.sequence)
4120
- };
3888
+ case "review.reviewer_started":
3889
+ case "review.reviewer_completed":
3890
+ case "review.specialist.timed_out":
3891
+ case "review.coordinator_started":
3892
+ case "review.coordinator.died":
4121
3893
  case "pipeline.review-started":
4122
3894
  case "pipeline.review-completed":
4123
3895
  case "pipeline.test-started":
@@ -5102,49 +4874,229 @@ function deriveProjectCi(record) {
5102
4874
  };
5103
4875
  }
5104
4876
  //#endregion
5105
- //#region src/flywheel-stats.ts
5106
- const FlywheelStatsCriterionStatus = Schema.Literals([
5107
- "green",
5108
- "yellow",
5109
- "red",
5110
- "insufficient_data"
4877
+ //#region src/flywheel.ts
4878
+ const FlywheelRunId = Schema.String.check(Schema.isPattern(/^RUN-\d+$/));
4879
+ const FlywheelHttpUrl = Schema.String.check(Schema.isPattern(/^https?:\/\/\S+$/i));
4880
+ const FlywheelHarness = Schema.Literals([
4881
+ "claude-code",
4882
+ "pi",
4883
+ "ohmypi",
4884
+ "codex",
4885
+ "acp",
4886
+ "kimi-code",
4887
+ "opencode",
4888
+ "muse"
5111
4889
  ]);
5112
- const FlywheelStatsTrend = Schema.Literals([
5113
- "up",
5114
- "down",
5115
- "flat"
4890
+ const FlywheelEffort = Schema.Literals([
4891
+ "low",
4892
+ "medium",
4893
+ "high",
4894
+ "xhigh",
4895
+ "max"
5116
4896
  ]);
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
4897
+ const FlywheelOrchestrator = Schema.Struct({
4898
+ harness: FlywheelHarness,
4899
+ model: Schema.String,
4900
+ effort: FlywheelEffort,
4901
+ ctxPercent: Schema.Number
5136
4902
  });
5137
- const FlywheelStats = Schema.Struct({
5138
- window: Schema.String,
5139
- generatedAt: Schema.String,
5140
- criteria: FlywheelStatsCriteria
4903
+ const FlywheelScope = Schema.Literals(["pan-only", "all-tracked-projects"]);
4904
+ const FlywheelHeadline = Schema.Struct({
4905
+ bugsFixed: Schema.Number,
4906
+ swarmItemsMerged: Schema.Number,
4907
+ swarmItemsTotal: Schema.Number,
4908
+ prsMerged: Schema.Number,
4909
+ awaitingUat: Schema.Number
5141
4910
  });
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([
4911
+ /**
4912
+ * Pipeline verbs — display state only. They no longer gate the merge queue.
4913
+ *
4914
+ * History worth keeping (PAN-1736 / PAN-1759): the merge queue used to be
4915
+ * derived by filtering these verbs, treating only "shipping" or "merging" as
4916
+ * "at the merge gate". Any other verb on an issue that was ready_for_merge in
4917
+ * the review DB silently dropped it from the queue and from UAT batch
4918
+ * assembly — RUN-18 shipped an empty queue with five ready issues exactly that
4919
+ * way — and the queue existed only while a run was emitting a pipeline at all.
4920
+ *
4921
+ * PAN-1696 removed that coupling. The ready set is now sourced from the
4922
+ * review-status records per project (`listEligibleCandidatesByProject` +
4923
+ * `computeMergeQueueFromCandidates` in src/lib/flywheel-merge-order.ts), which
4924
+ * needs no flywheel run and cannot be affected by which verb an orchestrator
4925
+ * chose to report. Adding a verb here therefore has no merge-queue consequence;
4926
+ * it only changes what the dashboard displays.
4927
+ */
4928
+ const FlywheelPipelineVerb = Schema.Literals([
4929
+ "planning",
4930
+ "working",
4931
+ "reviewing",
4932
+ "testing",
4933
+ "shipping",
4934
+ "merging",
4935
+ "blocked",
4936
+ "parked"
4937
+ ]);
4938
+ const FlywheelPipelineStatus = Schema.Literals([
4939
+ "queued",
4940
+ "running",
4941
+ "blocked",
4942
+ "passed",
4943
+ "failed",
4944
+ "merged",
4945
+ "parked"
4946
+ ]);
4947
+ const FlywheelPipelineItem = Schema.Struct({
4948
+ issueId: Schema.String,
4949
+ title: Schema.String,
4950
+ verb: FlywheelPipelineVerb,
4951
+ status: FlywheelPipelineStatus,
4952
+ progressPercent: Schema.optional(Schema.Number),
4953
+ agentId: Schema.optional(Schema.String),
4954
+ pr: Schema.optional(Schema.Number),
4955
+ mergeOrder: Schema.optional(Schema.Number),
4956
+ conflictsWith: Schema.optional(Schema.Array(Schema.String))
4957
+ });
4958
+ const FlywheelSubstrateBugStatus = Schema.Literals([
4959
+ "filed",
4960
+ "fixed",
4961
+ "workaround"
4962
+ ]);
4963
+ const FlywheelSubstrateBug = Schema.Struct({
4964
+ issueId: Schema.String,
4965
+ title: Schema.String,
4966
+ status: FlywheelSubstrateBugStatus,
4967
+ commitSha: Schema.optional(Schema.String),
4968
+ url: Schema.optional(FlywheelHttpUrl)
4969
+ });
4970
+ const FlywheelAgentStatus = Schema.Literals([
4971
+ "starting",
4972
+ "running",
4973
+ "waiting",
4974
+ "idle",
4975
+ "stopped",
4976
+ "error"
4977
+ ]);
4978
+ const FlywheelAgent = Schema.Struct({
4979
+ id: Schema.String,
4980
+ label: Schema.String,
4981
+ status: FlywheelAgentStatus,
4982
+ issueId: Schema.optional(Schema.String),
4983
+ role: Schema.optional(Schema.String),
4984
+ model: Schema.optional(Schema.String),
4985
+ ctxPercent: Schema.optional(Schema.Number),
4986
+ currentAction: Schema.optional(Schema.String)
4987
+ });
4988
+ const FlywheelParkedItem = Schema.Struct({
4989
+ issueId: Schema.String,
4990
+ title: Schema.String,
4991
+ reason: Schema.String,
4992
+ parkedAt: Schema.optional(Schema.String)
4993
+ });
4994
+ const FlywheelSuggestionAction = Schema.Literals([
4995
+ "start",
4996
+ "resume",
4997
+ "plan",
4998
+ "review",
4999
+ "merge",
5000
+ "unblock",
5001
+ "park",
5002
+ "investigate",
5003
+ "wait"
5004
+ ]);
5005
+ const FlywheelSuggestionPriority = Schema.Literals([
5006
+ "urgent",
5007
+ "high",
5008
+ "medium",
5009
+ "low"
5010
+ ]);
5011
+ const FlywheelSuggestion = Schema.Struct({
5012
+ action: FlywheelSuggestionAction,
5013
+ issueId: Schema.optional(Schema.String),
5014
+ rationale: Schema.String,
5015
+ priority: FlywheelSuggestionPriority,
5016
+ filedBy: Schema.optional(Schema.Literals(["agent", "operator"])),
5017
+ weight: Schema.optional(Schema.Number),
5018
+ weightReason: Schema.optional(Schema.String)
5019
+ });
5020
+ const FlywheelSystemStatus = Schema.Struct({
5021
+ mainHead: Schema.String,
5022
+ ramUsedMb: Schema.Number,
5023
+ ramTotalMb: Schema.Number,
5024
+ swapUsedMb: Schema.Number,
5025
+ swapTotalMb: Schema.Number,
5026
+ agentsActive: Schema.Number,
5027
+ agentsCap: Schema.Number
5028
+ });
5029
+ const FlywheelOrders = Schema.Struct({
5030
+ bookId: Schema.String,
5031
+ bookName: Schema.String,
5032
+ landed: Schema.Number,
5033
+ total: Schema.Number,
5034
+ laneAInFlight: Schema.Array(Schema.String),
5035
+ laneBInFlight: Schema.optional(Schema.String),
5036
+ drained: Schema.Boolean
5037
+ });
5038
+ const FlywheelStatus = Schema.Struct({
5039
+ runId: FlywheelRunId,
5040
+ startedAt: Schema.String,
5041
+ elapsedMs: Schema.Number,
5042
+ orchestrator: FlywheelOrchestrator,
5043
+ headline: FlywheelHeadline,
5044
+ activePipeline: Schema.Array(FlywheelPipelineItem),
5045
+ substrateBugs: Schema.Array(FlywheelSubstrateBug),
5046
+ agents: Schema.Array(FlywheelAgent),
5047
+ parked: Schema.Array(FlywheelParkedItem),
5048
+ suggestions: Schema.Array(FlywheelSuggestion).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
5049
+ system: FlywheelSystemStatus,
5050
+ openQuestions: Schema.Array(Schema.String),
5051
+ orders: Schema.optional(FlywheelOrders),
5052
+ scope: Schema.optional(FlywheelScope),
5053
+ ticks: Schema.Number,
5054
+ lastTickAt: Schema.String
5055
+ });
5056
+ //#endregion
5057
+ //#region src/flywheel-stats.ts
5058
+ const FlywheelStatsCriterionStatus = Schema.Literals([
5059
+ "green",
5060
+ "yellow",
5061
+ "red",
5062
+ "insufficient_data"
5063
+ ]);
5064
+ const FlywheelStatsTrend = Schema.Literals([
5065
+ "up",
5066
+ "down",
5067
+ "flat"
5068
+ ]);
5069
+ const FlywheelStatsCriterionValueObject = Schema.Record(Schema.String, Schema.Json);
5070
+ const FlywheelStatsCriterionValue = Schema.Union([Schema.Number, FlywheelStatsCriterionValueObject]);
5071
+ const FlywheelStatsCriterion = Schema.Struct({
5072
+ label: Schema.String,
5073
+ value: FlywheelStatsCriterionValue,
5074
+ target: FlywheelStatsCriterionValue,
5075
+ status: FlywheelStatsCriterionStatus,
5076
+ trend: Schema.optional(FlywheelStatsTrend),
5077
+ sampleSize: Schema.Number,
5078
+ dataSufficient: Schema.Boolean
5079
+ });
5080
+ const FlywheelStatsCriteria = Schema.Struct({
5081
+ c1_bugRate: FlywheelStatsCriterion,
5082
+ c2_p0Bugs: FlywheelStatsCriterion,
5083
+ c3_passRate: FlywheelStatsCriterion,
5084
+ c4_mttr: FlywheelStatsCriterion,
5085
+ c5_intervention: FlywheelStatsCriterion,
5086
+ c6_timeConsistency: FlywheelStatsCriterion,
5087
+ c7_flake: FlywheelStatsCriterion
5088
+ });
5089
+ const FlywheelStats = Schema.Struct({
5090
+ window: Schema.String,
5091
+ generatedAt: Schema.String,
5092
+ criteria: FlywheelStatsCriteria
5093
+ });
5094
+ const decodeFlywheelStats = Schema.decodeUnknownSync(FlywheelStats);
5095
+ const encodeFlywheelStats = Schema.encodeSync(FlywheelStats);
5096
+ //#endregion
5097
+ //#region src/orders.ts
5098
+ const OrderBookLane = Schema.Literals(["A", "B"]);
5099
+ const OrderBookStatus = Schema.Literals([
5148
5100
  "draft",
5149
5101
  "ready",
5150
5102
  "running",
@@ -5493,6 +5445,18 @@ const FeatureRegistryEntry = Schema.Struct({
5493
5445
  });
5494
5446
  //#endregion
5495
5447
  //#region src/harness-behavior.ts
5448
+ const AGENT_SESSION_PREFIXES = [
5449
+ "agent-",
5450
+ "planning-",
5451
+ "specialist-",
5452
+ "strike-",
5453
+ "inspect-"
5454
+ ];
5455
+ const AGENT_SESSION_SINGLETONS = new Set(["flywheel-orchestrator", "conv-flywheel-orchestrator"]);
5456
+ /** Canonical synthetic agent-session identity shared by dashboard client/server. */
5457
+ function isAgentSessionName(name) {
5458
+ return AGENT_SESSION_SINGLETONS.has(name) || AGENT_SESSION_PREFIXES.some((prefix) => name.startsWith(prefix));
5459
+ }
5496
5460
  const CLAUDE_CODE_BEHAVIOR = {
5497
5461
  displayName: "Claude Code",
5498
5462
  nativeCommands: [
@@ -6251,12 +6215,6 @@ const COMPOSER_COMMAND_MANIFEST = [
6251
6215
  "required": false,
6252
6216
  "valueHint": null
6253
6217
  },
6254
- {
6255
- "flags": "--shadow-only",
6256
- "description": "Show only shadowed issues",
6257
- "required": false,
6258
- "valueHint": null
6259
- },
6260
6218
  {
6261
6219
  "flags": "--triage",
6262
6220
  "description": "Show triage queue",
@@ -6271,19 +6229,13 @@ const COMPOSER_COMMAND_MANIFEST = [
6271
6229
  "id": "pan-show",
6272
6230
  "path": ["show"],
6273
6231
  "display": "/pan show",
6274
- "description": "Unified lens: shadow state, CV, context, health for one issue",
6232
+ "description": "Unified lens: derived issue state, CV, context, health for one issue",
6275
6233
  "args": [{
6276
6234
  "name": "id",
6277
6235
  "required": true,
6278
6236
  "variadic": false
6279
6237
  }],
6280
6238
  "options": [
6281
- {
6282
- "flags": "--shadow",
6283
- "description": "Shadow state details only",
6284
- "required": false,
6285
- "valueHint": null
6286
- },
6287
6239
  {
6288
6240
  "flags": "--cv",
6289
6241
  "description": "Agent work history only",
@@ -6335,32 +6287,12 @@ const COMPOSER_COMMAND_MANIFEST = [
6335
6287
  "id": "pan-review",
6336
6288
  "path": ["review"],
6337
6289
  "display": "/pan review",
6338
- "description": "Review-loop management: pending items, request re-review, reset cycles",
6290
+ "description": "Review-loop management: request re-review, abort reviewers, restart a round",
6339
6291
  "args": [],
6340
6292
  "options": [],
6341
6293
  "aliases": [],
6342
6294
  "category": "Review"
6343
6295
  },
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
6296
  {
6365
6297
  "id": "pan-review-request",
6366
6298
  "path": ["review", "request"],
@@ -6380,39 +6312,6 @@ const COMPOSER_COMMAND_MANIFEST = [
6380
6312
  "aliases": [],
6381
6313
  "category": "Review"
6382
6314
  },
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
6315
  {
6417
6316
  "id": "pan-review-abort",
6418
6317
  "path": ["review", "abort"],
@@ -6427,24 +6326,6 @@ const COMPOSER_COMMAND_MANIFEST = [
6427
6326
  "aliases": [],
6428
6327
  "category": "Review"
6429
6328
  },
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
6329
  {
6449
6330
  "id": "pan-review-restart",
6450
6331
  "path": ["review", "restart"],
@@ -6469,56 +6350,17 @@ const COMPOSER_COMMAND_MANIFEST = [
6469
6350
  "aliases": [],
6470
6351
  "category": "Review"
6471
6352
  },
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
6353
  {
6502
6354
  "id": "pan-staffing",
6503
6355
  "path": ["staffing"],
6504
6356
  "display": "/pan staffing",
6505
- "description": "Show or set per-issue work-model and swarm overrides",
6357
+ "description": "Show the work model and swarm policy in effect for an issue",
6506
6358
  "args": [{
6507
6359
  "name": "id",
6508
6360
  "required": true,
6509
6361
  "variadic": false
6510
6362
  }],
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
- }],
6363
+ "options": [],
6522
6364
  "aliases": [],
6523
6365
  "category": "Lifecycle"
6524
6366
  },
@@ -6536,7 +6378,7 @@ const COMPOSER_COMMAND_MANIFEST = [
6536
6378
  "id": "pan-backlog-write-sequence",
6537
6379
  "path": ["backlog", "write-sequence"],
6538
6380
  "display": "/pan backlog write-sequence",
6539
- "description": "Validate a SequenceDoc JSON file and write it to .pan/backlog/sequence.md (triggers auto-commit)",
6381
+ "description": "Validate a SequenceDoc JSON file, write it to .pan/backlog/sequence.md, and commit it",
6540
6382
  "args": [{
6541
6383
  "name": "file",
6542
6384
  "required": true,
@@ -6551,21 +6393,6 @@ const COMPOSER_COMMAND_MANIFEST = [
6551
6393
  "aliases": [],
6552
6394
  "category": "Lifecycle"
6553
6395
  },
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
6396
  {
6570
6397
  "id": "pan-plan",
6571
6398
  "path": ["plan"],
@@ -6777,25 +6604,6 @@ const COMPOSER_COMMAND_MANIFEST = [
6777
6604
  "aliases": ["stop"],
6778
6605
  "category": "Lifecycle"
6779
6606
  },
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
6607
  {
6800
6608
  "id": "pan-reset-session",
6801
6609
  "path": ["reset-session"],
@@ -6843,34 +6651,6 @@ const COMPOSER_COMMAND_MANIFEST = [
6843
6651
  "aliases": [],
6844
6652
  "category": "Lifecycle"
6845
6653
  },
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
6654
  {
6875
6655
  "id": "pan-fork",
6876
6656
  "path": ["fork"],
@@ -7114,13 +6894,7 @@ const COMPOSER_COMMAND_MANIFEST = [
7114
6894
  },
7115
6895
  {
7116
6896
  "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",
6897
+ "description": "Strike shape: verify the strike branch is contained in origin/main; no PR is opened",
7124
6898
  "required": false,
7125
6899
  "valueHint": null
7126
6900
  }
@@ -7128,20 +6902,6 @@ const COMPOSER_COMMAND_MANIFEST = [
7128
6902
  "aliases": [],
7129
6903
  "category": "Lifecycle"
7130
6904
  },
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
6905
  {
7146
6906
  "id": "pan-reopen",
7147
6907
  "path": ["reopen"],
@@ -7323,25 +7083,7 @@ const COMPOSER_COMMAND_MANIFEST = [
7323
7083
  "options": [
7324
7084
  {
7325
7085
  "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",
7086
+ "description": "Work model for this session (defaults to Cloister config)",
7345
7087
  "required": true,
7346
7088
  "valueHint": "model"
7347
7089
  },
@@ -7369,18 +7111,6 @@ const COMPOSER_COMMAND_MANIFEST = [
7369
7111
  "required": false,
7370
7112
  "valueHint": null
7371
7113
  },
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
7114
  {
7385
7115
  "flags": "--remote",
7386
7116
  "description": "Use remote workspace (Fly.io)",
@@ -7436,8 +7166,8 @@ const COMPOSER_COMMAND_MANIFEST = [
7436
7166
  "valueHint": null
7437
7167
  },
7438
7168
  {
7439
- "flags": "--off-book",
7440
- "description": "Allow one work-agent dispatch outside the active order book and log the override",
7169
+ "flags": "--skip-freshness",
7170
+ "description": "Bypass the plan-freshness preflight and spawn even if the plan names files that no longer exist",
7441
7171
  "required": false,
7442
7172
  "valueHint": null
7443
7173
  }
@@ -7449,7 +7179,7 @@ const COMPOSER_COMMAND_MANIFEST = [
7449
7179
  "id": "pan-strike",
7450
7180
  "path": ["strike"],
7451
7181
  "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.",
7182
+ "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
7183
  "args": [{
7454
7184
  "name": "ids",
7455
7185
  "required": true,
@@ -7484,20 +7214,6 @@ const COMPOSER_COMMAND_MANIFEST = [
7484
7214
  "aliases": [],
7485
7215
  "category": "Lifecycle"
7486
7216
  },
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
7217
  {
7502
7218
  "id": "pan-knowledge",
7503
7219
  "path": ["knowledge"],
@@ -7764,7 +7480,7 @@ const COMPOSER_COMMAND_MANIFEST = [
7764
7480
  "id": "pan-task",
7765
7481
  "path": ["task"],
7766
7482
  "display": "/pan task",
7767
- "description": "Read and update xBRIEF task state for one issue",
7483
+ "description": "Read and update xBRIEF item state for one issue",
7768
7484
  "args": [],
7769
7485
  "options": [],
7770
7486
  "aliases": [],
@@ -7826,32 +7542,12 @@ const COMPOSER_COMMAND_MANIFEST = [
7826
7542
  "required": true,
7827
7543
  "variadic": false
7828
7544
  }],
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
- ],
7545
+ "options": [{
7546
+ "flags": "--json",
7547
+ "description": "Print JSON",
7548
+ "required": false,
7549
+ "valueHint": null
7550
+ }],
7855
7551
  "aliases": [],
7856
7552
  "category": "Lifecycle"
7857
7553
  },
@@ -7859,7 +7555,7 @@ const COMPOSER_COMMAND_MANIFEST = [
7859
7555
  "id": "pan-task-done",
7860
7556
  "path": ["task", "done"],
7861
7557
  "display": "/pan task done",
7862
- "description": "",
7558
+ "description": "Record an item as done. Requires a commit carrying \"Item: <item>\" on a pushed branch.",
7863
7559
  "args": [{
7864
7560
  "name": "issue",
7865
7561
  "required": true,
@@ -7869,32 +7565,12 @@ const COMPOSER_COMMAND_MANIFEST = [
7869
7565
  "required": true,
7870
7566
  "variadic": false
7871
7567
  }],
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
- ],
7568
+ "options": [{
7569
+ "flags": "--json",
7570
+ "description": "Print JSON",
7571
+ "required": false,
7572
+ "valueHint": null
7573
+ }],
7898
7574
  "aliases": [],
7899
7575
  "category": "Lifecycle"
7900
7576
  },
@@ -7912,75 +7588,35 @@ const COMPOSER_COMMAND_MANIFEST = [
7912
7588
  "required": true,
7913
7589
  "variadic": false
7914
7590
  }],
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
- ],
7591
+ "options": [{
7592
+ "flags": "--json",
7593
+ "description": "Print JSON",
7594
+ "required": false,
7595
+ "valueHint": null
7596
+ }],
7941
7597
  "aliases": [],
7942
7598
  "category": "Lifecycle"
7943
7599
  },
7944
7600
  {
7945
- "id": "pan-task-unblock",
7946
- "path": ["task", "unblock"],
7947
- "display": "/pan task unblock",
7948
- "description": "",
7949
- "args": [{
7950
- "name": "issue",
7951
- "required": true,
7952
- "variadic": false
7953
- }, {
7954
- "name": "item",
7955
- "required": true,
7956
- "variadic": false
7957
- }],
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
- ],
7601
+ "id": "pan-task-unblock",
7602
+ "path": ["task", "unblock"],
7603
+ "display": "/pan task unblock",
7604
+ "description": "",
7605
+ "args": [{
7606
+ "name": "issue",
7607
+ "required": true,
7608
+ "variadic": false
7609
+ }, {
7610
+ "name": "item",
7611
+ "required": true,
7612
+ "variadic": false
7613
+ }],
7614
+ "options": [{
7615
+ "flags": "--json",
7616
+ "description": "Print JSON",
7617
+ "required": false,
7618
+ "valueHint": null
7619
+ }],
7984
7620
  "aliases": [],
7985
7621
  "category": "Lifecycle"
7986
7622
  },
@@ -7998,32 +7634,12 @@ const COMPOSER_COMMAND_MANIFEST = [
7998
7634
  "required": true,
7999
7635
  "variadic": false
8000
7636
  }],
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
- ],
7637
+ "options": [{
7638
+ "flags": "--json",
7639
+ "description": "Print JSON",
7640
+ "required": false,
7641
+ "valueHint": null
7642
+ }],
8027
7643
  "aliases": [],
8028
7644
  "category": "Lifecycle"
8029
7645
  },
@@ -8041,32 +7657,12 @@ const COMPOSER_COMMAND_MANIFEST = [
8041
7657
  "required": true,
8042
7658
  "variadic": false
8043
7659
  }],
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
- ],
7660
+ "options": [{
7661
+ "flags": "--json",
7662
+ "description": "Print JSON",
7663
+ "required": false,
7664
+ "valueHint": null
7665
+ }],
8070
7666
  "aliases": [],
8071
7667
  "category": "Lifecycle"
8072
7668
  },
@@ -9013,7 +8609,7 @@ const COMPOSER_COMMAND_MANIFEST = [
9013
8609
  "id": "pan-rollout-status",
9014
8610
  "path": ["rollout", "status"],
9015
8611
  "display": "/pan rollout status",
9016
- "description": "Print the release set for an issue (releaseStatus + per-component status)",
8612
+ "description": "Print the release set for an issue (overall + per-component status)",
9017
8613
  "args": [{
9018
8614
  "name": "issueId",
9019
8615
  "required": true,
@@ -9887,7 +9483,7 @@ const COMPOSER_COMMAND_MANIFEST = [
9887
9483
  "id": "pan-parked",
9888
9484
  "path": ["parked"],
9889
9485
  "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",
9486
+ "description": "List every issue parked in a stall orbit (operator gates, zombie sessions, idle-running agents), oldest first, with why + release condition",
9891
9487
  "args": [],
9892
9488
  "options": [{
9893
9489
  "flags": "--json",
@@ -9898,35 +9494,6 @@ const COMPOSER_COMMAND_MANIFEST = [
9898
9494
  "aliases": [],
9899
9495
  "category": "CLI"
9900
9496
  },
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
9497
  {
9931
9498
  "id": "pan-docs",
9932
9499
  "path": ["docs"],
@@ -10047,32 +9614,18 @@ const COMPOSER_COMMAND_MANIFEST = [
10047
9614
  "category": "Admin"
10048
9615
  },
10049
9616
  {
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",
9617
+ "id": "pan-admin-seed-uat-fixtures",
9618
+ "path": ["admin", "seed-uat-fixtures"],
9619
+ "display": "/pan admin seed-uat-fixtures",
9620
+ "description": "Seed the obviously-fake FIX-1 issue fixture into a workspace container for UI UAT. Host mode: `pan admin seed-uat-fixtures <issue-id>` seeds and restarts that issue's workspace container from the host. `--local` runs the seed itself against the current OVERDECK_HOME — used by the host wrapper, or manually inside a container.",
10068
9621
  "args": [{
10069
- "name": "project",
10070
- "required": true,
9622
+ "name": "issue-id",
9623
+ "required": false,
10071
9624
  "variadic": false
10072
9625
  }],
10073
9626
  "options": [{
10074
- "flags": "--dry-run",
10075
- "description": "Print the exact migration plan without mutating anything",
9627
+ "flags": "--local",
9628
+ "description": "Seed the current (container-local) OVERDECK_HOME directly, without a host wrapper step",
10076
9629
  "required": false,
10077
9630
  "valueHint": null
10078
9631
  }],
@@ -10080,92 +9633,47 @@ const COMPOSER_COMMAND_MANIFEST = [
10080
9633
  "category": "Admin"
10081
9634
  },
10082
9635
  {
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",
9636
+ "id": "pan-admin-migrate-plan-home",
9637
+ "path": ["admin", "migrate-plan-home"],
9638
+ "display": "/pan admin migrate-plan-home",
9639
+ "description": "One-time bridge: copy open-issue planning artifacts and item progress from ~/.overdeck/state/<project>/ into <planHome>/.pan/ (PAN-3917 D8)",
10091
9640
  "args": [{
10092
- "name": "project",
9641
+ "name": "project-key",
10093
9642
  "required": true,
10094
9643
  "variadic": false
10095
9644
  }],
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"
9645
+ "options": [
9646
+ {
9647
+ "flags": "--commit",
9648
+ "description": "Commit the copied artifacts in the plan home",
9649
+ "required": false,
9650
+ "valueHint": null
9651
+ },
9652
+ {
9653
+ "flags": "--dry-run",
9654
+ "description": "Preview what would be copied without writing anything",
9655
+ "required": false,
9656
+ "valueHint": null
9657
+ },
9658
+ {
9659
+ "flags": "--state-root <dir>",
9660
+ "description": "Override the state worktree root (tests / odd setups)",
9661
+ "required": true,
9662
+ "valueHint": "dir"
9663
+ },
9664
+ {
9665
+ "flags": "--plan-home <dir>",
9666
+ "description": "Override the plan home (tests / odd setups)",
9667
+ "required": true,
9668
+ "valueHint": "dir"
9669
+ },
9670
+ {
9671
+ "flags": "--open-issues <file>",
9672
+ "description": "Read open issue ids from a file instead of calling the tracker",
9673
+ "required": true,
9674
+ "valueHint": "file"
9675
+ }
10111
9676
  ],
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
- {
10154
- "id": "pan-admin-seed-uat-fixtures",
10155
- "path": ["admin", "seed-uat-fixtures"],
10156
- "display": "/pan admin seed-uat-fixtures",
10157
- "description": "Seed the obviously-fake FIX-1 issue fixture into a workspace container for UI UAT. Host mode: `pan admin seed-uat-fixtures <issue-id>` seeds and restarts that issue's workspace container from the host. `--local` runs the seed itself against the current OVERDECK_HOME — used by the host wrapper, or manually inside a container.",
10158
- "args": [{
10159
- "name": "issue-id",
10160
- "required": false,
10161
- "variadic": false
10162
- }],
10163
- "options": [{
10164
- "flags": "--local",
10165
- "description": "Seed the current (container-local) OVERDECK_HOME directly, without a host wrapper step",
10166
- "required": false,
10167
- "valueHint": null
10168
- }],
10169
9677
  "aliases": [],
10170
9678
  "category": "Admin"
10171
9679
  },
@@ -10273,53 +9781,6 @@ const COMPOSER_COMMAND_MANIFEST = [
10273
9781
  "aliases": [],
10274
9782
  "category": "Admin"
10275
9783
  },
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
9784
  {
10324
9785
  "id": "pan-admin-specialists",
10325
9786
  "path": ["admin", "specialists"],
@@ -10408,7 +9869,7 @@ const COMPOSER_COMMAND_MANIFEST = [
10408
9869
  "done"
10409
9870
  ],
10410
9871
  "display": "/pan admin specialists done",
10411
- "description": "Signal specialist completion (deterministic status update)",
9872
+ "description": "Post a specialist verdict to the issue's pull/merge request (review, test, uat)",
10412
9873
  "args": [{
10413
9874
  "name": "type",
10414
9875
  "required": true,
@@ -10425,12 +9886,6 @@ const COMPOSER_COMMAND_MANIFEST = [
10425
9886
  "required": true,
10426
9887
  "valueHint": "status"
10427
9888
  },
10428
- {
10429
- "flags": "--item <itemId>",
10430
- "description": "xBRIEF item ID (required for inspect verdicts)",
10431
- "required": true,
10432
- "valueHint": "itemId"
10433
- },
10434
9889
  {
10435
9890
  "flags": "--notes <notes>",
10436
9891
  "description": "Optional notes about the result",
@@ -10781,40 +10236,16 @@ const COMPOSER_COMMAND_MANIFEST = [
10781
10236
  "path": [
10782
10237
  "admin",
10783
10238
  "db",
10784
- "config"
10785
- ],
10786
- "display": "/pan admin db config",
10787
- "description": "Show database configuration for a project",
10788
- "args": [{
10789
- "name": "project",
10790
- "required": false,
10791
- "variadic": false
10792
- }],
10793
- "options": [],
10794
- "aliases": [],
10795
- "category": "Admin"
10796
- },
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",
10239
+ "config"
10240
+ ],
10241
+ "display": "/pan admin db config",
10242
+ "description": "Show database configuration for a project",
10243
+ "args": [{
10244
+ "name": "project",
10815
10245
  "required": false,
10816
- "valueHint": null
10246
+ "variadic": false
10817
10247
  }],
10248
+ "options": [],
10818
10249
  "aliases": [],
10819
10250
  "category": "Admin"
10820
10251
  },
@@ -10880,105 +10311,6 @@ const COMPOSER_COMMAND_MANIFEST = [
10880
10311
  "aliases": [],
10881
10312
  "category": "Admin"
10882
10313
  },
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
10314
  {
10983
10315
  "id": "pan-admin-config",
10984
10316
  "path": ["admin", "config"],
@@ -11821,43 +11153,16 @@ const COMPOSER_COMMAND_MANIFEST = [
11821
11153
  "description": "Skip Qwen TTS daemon venv install (CUDA torch download is large)",
11822
11154
  "required": false,
11823
11155
  "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
11156
  },
11852
11157
  {
11853
- "flags": "--deep",
11854
- "description": "Use the deep inspection sub-role",
11158
+ "flags": "--skip-herdr",
11159
+ "description": "Skip Herdr terminal backend install/verify (tmux-only hosts)",
11855
11160
  "required": false,
11856
11161
  "valueHint": null
11857
11162
  }
11858
11163
  ],
11859
11164
  "aliases": [],
11860
- "category": "Lifecycle"
11165
+ "category": "Core"
11861
11166
  },
11862
11167
  {
11863
11168
  "id": "pan-caveman-compress",
@@ -12013,111 +11318,86 @@ const COMPOSER_COMMAND_MANIFEST = [
12013
11318
  "category": "Lifecycle"
12014
11319
  },
12015
11320
  {
12016
- "id": "pan-flywheel",
12017
- "path": ["flywheel"],
12018
- "display": "/pan flywheel",
12019
- "description": "Flywheel orchestrator lifecycle and status helpers",
12020
- "args": [],
12021
- "options": [],
12022
- "aliases": [],
12023
- "category": "Flywheel"
12024
- },
12025
- {
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
12036
- }],
12037
- "aliases": [],
12038
- "category": "Flywheel"
12039
- },
12040
- {
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)",
11321
+ "id": "pan-spawn",
11322
+ "path": ["spawn"],
11323
+ "display": "/pan spawn",
11324
+ "description": "Create a worker pane for one xBRIEF item in the issue workspace",
12045
11325
  "args": [],
12046
11326
  "options": [
12047
11327
  {
12048
11328
  "flags": "--issue <id>",
12049
- "description": "Filter to a single issue",
11329
+ "description": "Issue the worker belongs to",
12050
11330
  "required": true,
12051
11331
  "valueHint": "id"
12052
11332
  },
12053
11333
  {
12054
- "flags": "--window <dur>",
12055
- "description": "Stats window like 30d, 7d (default 30d)",
11334
+ "flags": "--item <item>",
11335
+ "description": "xBRIEF item the worker takes",
12056
11336
  "required": true,
12057
- "valueHint": "dur"
11337
+ "valueHint": "item"
12058
11338
  },
12059
11339
  {
12060
- "flags": "--json",
12061
- "description": "Output JSON",
12062
- "required": false,
12063
- "valueHint": null
11340
+ "flags": "--model <model>",
11341
+ "description": "Model the worker runs on",
11342
+ "required": true,
11343
+ "valueHint": "model"
11344
+ },
11345
+ {
11346
+ "flags": "--harness <harness>",
11347
+ "description": "Coding-agent harness (default: claude-code)",
11348
+ "required": true,
11349
+ "valueHint": "harness"
12064
11350
  }
12065
11351
  ],
12066
11352
  "aliases": [],
12067
- "category": "Flywheel"
11353
+ "category": "CLI"
12068
11354
  },
12069
11355
  {
12070
- "id": "pan-flywheel-start",
12071
- "path": ["flywheel", "start"],
12072
- "display": "/pan flywheel start",
12073
- "description": "Start the Flywheel orchestrator",
11356
+ "id": "pan-flywheel",
11357
+ "path": ["flywheel"],
11358
+ "display": "/pan flywheel",
11359
+ "description": "Start, stop, or check the flywheel conversation",
12074
11360
  "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
- }],
11361
+ "options": [],
12086
11362
  "aliases": [],
12087
11363
  "category": "Flywheel"
12088
11364
  },
12089
11365
  {
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",
11366
+ "id": "pan-flywheel-start",
11367
+ "path": ["flywheel", "start"],
11368
+ "display": "/pan flywheel start",
11369
+ "description": "Launch a conversation running /pan-flywheel",
12094
11370
  "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
- }],
11371
+ "options": [
11372
+ {
11373
+ "flags": "--model <model>",
11374
+ "description": "Model for the flywheel conversation",
11375
+ "required": true,
11376
+ "valueHint": "model"
11377
+ },
11378
+ {
11379
+ "flags": "--harness <harness>",
11380
+ "description": "Harness for the flywheel conversation",
11381
+ "required": true,
11382
+ "valueHint": "harness"
11383
+ },
11384
+ {
11385
+ "flags": "--cwd <path>",
11386
+ "description": "Working directory (default: cwd)",
11387
+ "required": true,
11388
+ "valueHint": "path"
11389
+ }
11390
+ ],
12101
11391
  "aliases": [],
12102
11392
  "category": "Flywheel"
12103
11393
  },
12104
11394
  {
12105
- "id": "pan-flywheel-config",
12106
- "path": ["flywheel", "config"],
12107
- "display": "/pan flywheel config",
12108
- "description": "Get or set Flywheel autonomy configuration",
11395
+ "id": "pan-flywheel-stop",
11396
+ "path": ["flywheel", "stop"],
11397
+ "display": "/pan flywheel stop",
11398
+ "description": "Stop the flywheel conversation",
12109
11399
  "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
- }],
11400
+ "options": [],
12121
11401
  "aliases": [],
12122
11402
  "category": "Flywheel"
12123
11403
  },
@@ -12125,107 +11405,17 @@ const COMPOSER_COMMAND_MANIFEST = [
12125
11405
  "id": "pan-flywheel-status",
12126
11406
  "path": ["flywheel", "status"],
12127
11407
  "display": "/pan flywheel status",
12128
- "description": "Show the active Flywheel run status",
12129
- "args": [],
12130
- "options": [{
12131
- "flags": "--json",
12132
- "description": "Emit the raw FlywheelStatus JSON",
12133
- "required": false,
12134
- "valueHint": null
12135
- }],
12136
- "aliases": [],
12137
- "category": "Flywheel"
12138
- },
12139
- {
12140
- "id": "pan-flywheel-stats",
12141
- "path": ["flywheel", "stats"],
12142
- "display": "/pan flywheel stats",
12143
- "description": "Show Flywheel v1.0 readiness stats",
11408
+ "description": "Say whether the flywheel conversation is running",
12144
11409
  "args": [],
12145
11410
  "options": [{
12146
- "flags": "--window <duration>",
12147
- "description": "Stats window duration",
12148
- "required": true,
12149
- "valueHint": "duration"
12150
- }, {
12151
11411
  "flags": "--json",
12152
- "description": "Emit the raw FlywheelStats JSON",
12153
- "required": false,
12154
- "valueHint": null
12155
- }],
12156
- "aliases": [],
12157
- "category": "Flywheel"
12158
- },
12159
- {
12160
- "id": "pan-flywheel-pause",
12161
- "path": ["flywheel", "pause"],
12162
- "display": "/pan flywheel pause",
12163
- "description": "Pause the active Flywheel orchestrator run",
12164
- "args": [],
12165
- "options": [],
12166
- "aliases": [],
12167
- "category": "Flywheel"
12168
- },
12169
- {
12170
- "id": "pan-flywheel-resume",
12171
- "path": ["flywheel", "resume"],
12172
- "display": "/pan flywheel resume",
12173
- "description": "Resume the paused Flywheel orchestrator run",
12174
- "args": [],
12175
- "options": [],
12176
- "aliases": [],
12177
- "category": "Flywheel"
12178
- },
12179
- {
12180
- "id": "pan-flywheel-report",
12181
- "path": ["flywheel", "report"],
12182
- "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).",
12184
- "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
- }],
12191
- "aliases": [],
12192
- "category": "Flywheel"
12193
- },
12194
- {
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",
12199
- "args": [],
12200
- "options": [{
12201
- "flags": "--force",
12202
- "description": "Complete even when the order book still has non-terminal items",
11412
+ "description": "Output as JSON",
12203
11413
  "required": false,
12204
11414
  "valueHint": null
12205
11415
  }],
12206
11416
  "aliases": [],
12207
11417
  "category": "Flywheel"
12208
11418
  },
12209
- {
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",
12224
- "args": [],
12225
- "options": [],
12226
- "aliases": [],
12227
- "category": "Flywheel"
12228
- },
12229
11419
  {
12230
11420
  "id": "pan-merge",
12231
11421
  "path": ["merge"],
@@ -13546,14 +12736,6 @@ const COMPOSER_COMMAND_VARIANTS = [
13546
12736
  "insert": "/pan plan --auto --auto-start ",
13547
12737
  "category": "Lifecycle"
13548
12738
  },
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
12739
  {
13558
12740
  "id": "pan-fork-plain",
13559
12741
  "path": ["fork"],
@@ -13688,6 +12870,24 @@ const HOOK_INVENTORY = [
13688
12870
  const WIRED_HOOK_INVENTORY = HOOK_INVENTORY.filter((hook) => hook.wired);
13689
12871
  const WIRED_HOOK_NAMES = WIRED_HOOK_INVENTORY.map((hook) => hook.name);
13690
12872
  //#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 };
12873
+ //#region src/terminal-backend.ts
12874
+ const TERMINAL_BACKEND_NAMES = ["herdr", "tmux"];
12875
+ const AGENT_ROLES = [
12876
+ "work",
12877
+ "worker",
12878
+ "review",
12879
+ "test",
12880
+ "uat",
12881
+ "strike",
12882
+ "plan"
12883
+ ];
12884
+ function isTerminalBackendName(value) {
12885
+ return typeof value === "string" && TERMINAL_BACKEND_NAMES.includes(value);
12886
+ }
12887
+ function isAgentRole(value) {
12888
+ return typeof value === "string" && AGENT_ROLES.includes(value);
12889
+ }
12890
+ //#endregion
12891
+ export { ACP_BEHAVIOR, AGENT_ROLES, 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, BackendPane, BackendPaneChangedEvent, BackendPaneRemovedEvent, 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, DerivedBranchState, DerivedIssueState, DerivedPrState, 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, 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, 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, compareIssueIds, createIssueDelta, decodeFlywheelStats, deriveProjectCi, encodeFlywheelStats, getHarness, getHarnessBehavior, getMaxMemoryObservationsPerIssue, getMaxTurnDiffSummariesPerAgent, getRuntimeBehavior, isAgentRole, isAgentSessionName, isChannelReplyKind, isIssueAttention, isIssueState, isTerminalBackendName, isTerminalTurnDiffSummaryStatus, normalizeChannelReplyPayload, omitTurnDiffSummariesForAgent, projectLegacySystemHealthSummary, syncSnapshot, trimMemoryObservations, trimTurnDiffSummaries };
13692
12892
 
13693
12893
  //# sourceMappingURL=index.mjs.map