@cluesmith/codev-types 3.1.4 → 3.1.7

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/api.d.ts CHANGED
@@ -116,11 +116,37 @@ export interface TerminalEntry {
116
116
  */
117
117
  terminalId?: string;
118
118
  }
119
+ /**
120
+ * A single plan sub-phase as surfaced in the overview payload. `status` is a
121
+ * free-form string (not the narrower porch `PlanPhaseStatus` union) because the
122
+ * overview parser reads it verbatim out of `status.yaml`. Named shape so both
123
+ * the server and `OverviewBuilder.planPhases` reference one declaration.
124
+ */
125
+ export interface PlanPhase {
126
+ id: string;
127
+ title: string;
128
+ status: string;
129
+ }
119
130
  export interface OverviewBuilder {
120
131
  id: string;
121
132
  issueId: string | null;
122
133
  issueTitle: string | null;
134
+ /**
135
+ * Display phase. Collapsed: prefers the active plan sub-phase id
136
+ * (`current_plan_phase`, e.g. `phase_5`) over the protocol phase, so the
137
+ * dashboard can match it against `planPhases` to render sub-phase progress
138
+ * (`(1/4)`). NOT the coarse protocol phase — read `protocolPhase` for that.
139
+ */
123
140
  phase: string;
141
+ /**
142
+ * Coarse *protocol* phase — `plan` / `implement` / `review` (and `specify` /
143
+ * `verify` for SPIR/ASPIR). The raw `phase:` from `status.yaml`, before the
144
+ * `phase` field's sub-phase collapse. Surfaces the high-level phase for
145
+ * at-a-glance UIs (the VSCode builders-tree row prefix, #810) without leaking
146
+ * free-form plan sub-phase ids like `phase_0_rebase_onto_ci`. Empty string
147
+ * when no live status exists.
148
+ */
149
+ protocolPhase: string;
124
150
  mode: 'strict' | 'soft';
125
151
  gates: Record<string, string>;
126
152
  worktreePath: string;
@@ -133,11 +159,7 @@ export interface OverviewBuilder {
133
159
  */
134
160
  roleId: string | null;
135
161
  protocol: string;
136
- planPhases: Array<{
137
- id: string;
138
- title: string;
139
- status: string;
140
- }>;
162
+ planPhases: PlanPhase[];
141
163
  progress: number;
142
164
  /** Human-readable label for the gate the builder is blocked on (e.g. "plan review"). */
143
165
  blocked: string | null;
@@ -167,16 +189,26 @@ export interface OverviewBuilder {
167
189
  */
168
190
  spawnedByArchitect: string | null;
169
191
  /**
170
- * Canonical "PR is waiting on a human reviewer" signal (Issue #872). True the
171
- * moment porch transitions out of the CMAP-emitting state for the PR-creating
172
- * phase, for ALL bundled protocols. Computed from `pr_ready_for_human` in
173
- * status.yaml when present; otherwise falls back to the v3.1.3 derived logic
174
- * (`blocked === 'PR review'` || BUGFIX `phase === 'verified'`) so in-flight
175
- * projects from before this field shipped continue to surface correctly.
192
+ * Single `area/*` value for this builder's issue, projected via
193
+ * `parseArea` (first-alphabetical wins; `'Uncategorized'` when the
194
+ * builder has no issue or the issue has no `area/*` labels).
195
+ * Required-with-default never `undefined`. Consumed by the
196
+ * builders-tree grouping in #818 and the equivalent dashboard view.
197
+ */
198
+ area: string;
199
+ /**
200
+ * Canonical "PR is waiting on a human reviewer" signal. Gate-authoritative
201
+ * (#927): true exactly when the builder's `pr` gate is genuinely pending
202
+ * (`status: pending` + `requested_at`). Porch requests the `pr` gate after
203
+ * the PR phase / CMAP for EVERY bundled PR-producing protocol (BUGFIX, AIR,
204
+ * SPIR, ASPIR, PIR — #887 gave BUGFIX a `pr` gate), so the pending `pr` gate
205
+ * is the uniform post-CMAP signal.
176
206
  *
177
207
  * Consumers gate on this single boolean instead of deriving from the
178
- * protocol-specific gate shape (the v3.1.3 derivation silently dropped
179
- * BUGFIX PRs because BUGFIX has no `pr` gate).
208
+ * protocol-specific gate shape. (Earlier revisions read `pr_ready_for_human`
209
+ * plus a `bugfix && phase === 'verified'` fallback; #927 dropped both in
210
+ * favor of reading the `pr` gate directly — the field is coincident with the
211
+ * gate, and the gate read avoids the sticky-`false` rollback hazard.)
180
212
  */
181
213
  prReady: boolean;
182
214
  }
@@ -195,6 +227,13 @@ export interface OverviewBacklogItem {
195
227
  url: string;
196
228
  type: string;
197
229
  priority: string;
230
+ /**
231
+ * Single `area/*` value for this issue, projected via `parseArea`
232
+ * (first-alphabetical wins; `'Uncategorized'` when the issue has no
233
+ * `area/*` labels). Required-with-default — never `undefined`. Consumed
234
+ * by the backlog grouping in #811 and the equivalent vscode view.
235
+ */
236
+ area: string;
198
237
  hasSpec: boolean;
199
238
  hasPlan: boolean;
200
239
  hasReview: boolean;
@@ -272,6 +311,37 @@ export interface IssueView {
272
311
  };
273
312
  }>;
274
313
  }
314
+ /**
315
+ * One searchable issue row returned by Tower's GET /api/issue-search.
316
+ * Distinct from `OverviewBacklogItem`: it carries the issue `body` (so the
317
+ * search panel can match against it host-side) and omits the spec/plan/
318
+ * builder enrichment the sidebar tree needs. Body lives only on this
319
+ * on-demand search path — `OverviewBacklogItem` and `/api/overview` stay
320
+ * body-free so the always-on overview payload doesn't grow.
321
+ */
322
+ export interface IssueSearchItem {
323
+ id: string;
324
+ title: string;
325
+ url: string;
326
+ /** Single `area/*` value (via `parseArea`); `'Uncategorized'` when unlabeled. */
327
+ area: string;
328
+ author?: string;
329
+ assignees?: string[];
330
+ createdAt: string;
331
+ /** Issue body for substring matching. `''` when the forge can't supply it. */
332
+ body: string;
333
+ }
334
+ /**
335
+ * Response shape of GET /api/issue-search. `currentUser` powers the
336
+ * panel's "Me"/"Unassigned" assignee scope. `error` is set (with an empty
337
+ * `items`) when the forge is unavailable, so the panel can show a reason
338
+ * rather than a silent empty table.
339
+ */
340
+ export interface IssueSearchResponse {
341
+ items: IssueSearchItem[];
342
+ currentUser?: string;
343
+ error?: string;
344
+ }
275
345
  export interface ReviewBlockingEntry {
276
346
  direction: 'authored' | 'reviewing';
277
347
  otherName: string;
package/dist/api.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ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,MAAM,GAAG,IAAI,CAAC;IACjC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,CAAC;IACxC,QAAQ,EAAE;QACR,SAAS,EAAE,MAAM,CAAC;QAClB,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;QACtC,YAAY,EAAE,MAAM,CAAC;QACrB,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;QAC1C,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;KACnD,CAAC;IACF,YAAY,EAAE;QACZ,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACpC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;QACjC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAC3B,OAAO,EAAE,KAAK,CAAC;YACb,KAAK,EAAE,MAAM,CAAC;YACd,KAAK,EAAE,MAAM,CAAC;YACd,UAAU,EAAE,MAAM,CAAC;YACnB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;YACzB,WAAW,EAAE,MAAM,CAAC;SACrB,CAAC,CAAC;QACH,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACrC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACpC,CAAC;IACF,MAAM,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACH"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { FRAME_CONTROL, FRAME_DATA, type ControlMessage, type DecodedFrame, } from './websocket.js';
2
2
  export { type SSEEventType, type SSENotification, type BuilderSpawnedPayload, } from './sse.js';
3
- export { type ArchitectState, type Builder, type UtilTerminal, type Annotation, type DashboardState, type TerminalEntry, type OverviewBuilder, type OverviewPR, type OverviewBacklogItem, type OverviewRecentlyClosed, type OverviewData, type IssueView, type WorktreeDevUrl, type ResolvedWorktreeConfig, type TeamMemberGitHubData, type ReviewBlockingEntry, type TeamApiMember, type TeamApiMessage, type TeamApiResponse, type TunnelStatus, type ProtocolStats, type AnalyticsResponse, } from './api.js';
3
+ export { type ArchitectState, type Builder, type UtilTerminal, type Annotation, type DashboardState, type TerminalEntry, type PlanPhase, type OverviewBuilder, type OverviewPR, type OverviewBacklogItem, type OverviewRecentlyClosed, type OverviewData, type IssueView, type IssueSearchItem, type IssueSearchResponse, type WorktreeDevUrl, type ResolvedWorktreeConfig, type TeamMemberGitHubData, type ReviewBlockingEntry, type TeamApiMember, type TeamApiMessage, type TeamApiResponse, type TunnelStatus, type ProtocolStats, type AnalyticsResponse, } from './api.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,qBAAqB,GAC3B,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,iBAAiB,GACvB,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,qBAAqB,GAC3B,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,iBAAiB,GACvB,MAAM,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cluesmith/codev-types",
3
- "version": "3.1.4",
3
+ "version": "3.1.7",
4
4
  "description": "Shared TypeScript types for Codev — WebSocket protocol, API shapes, SSE events",
5
5
  "type": "module",
6
6
  "exports": {
package/src/api.ts CHANGED
@@ -126,11 +126,38 @@ export interface TerminalEntry {
126
126
 
127
127
  // --- Overview (GET /api/overview) ---
128
128
 
129
+ /**
130
+ * A single plan sub-phase as surfaced in the overview payload. `status` is a
131
+ * free-form string (not the narrower porch `PlanPhaseStatus` union) because the
132
+ * overview parser reads it verbatim out of `status.yaml`. Named shape so both
133
+ * the server and `OverviewBuilder.planPhases` reference one declaration.
134
+ */
135
+ export interface PlanPhase {
136
+ id: string;
137
+ title: string;
138
+ status: string;
139
+ }
140
+
129
141
  export interface OverviewBuilder {
130
142
  id: string;
131
143
  issueId: string | null;
132
144
  issueTitle: string | null;
145
+ /**
146
+ * Display phase. Collapsed: prefers the active plan sub-phase id
147
+ * (`current_plan_phase`, e.g. `phase_5`) over the protocol phase, so the
148
+ * dashboard can match it against `planPhases` to render sub-phase progress
149
+ * (`(1/4)`). NOT the coarse protocol phase — read `protocolPhase` for that.
150
+ */
133
151
  phase: string;
152
+ /**
153
+ * Coarse *protocol* phase — `plan` / `implement` / `review` (and `specify` /
154
+ * `verify` for SPIR/ASPIR). The raw `phase:` from `status.yaml`, before the
155
+ * `phase` field's sub-phase collapse. Surfaces the high-level phase for
156
+ * at-a-glance UIs (the VSCode builders-tree row prefix, #810) without leaking
157
+ * free-form plan sub-phase ids like `phase_0_rebase_onto_ci`. Empty string
158
+ * when no live status exists.
159
+ */
160
+ protocolPhase: string;
134
161
  mode: 'strict' | 'soft';
135
162
  gates: Record<string, string>;
136
163
  worktreePath: string;
@@ -143,7 +170,7 @@ export interface OverviewBuilder {
143
170
  */
144
171
  roleId: string | null;
145
172
  protocol: string;
146
- planPhases: Array<{ id: string; title: string; status: string }>;
173
+ planPhases: PlanPhase[];
147
174
  progress: number;
148
175
  /** Human-readable label for the gate the builder is blocked on (e.g. "plan review"). */
149
176
  blocked: string | null;
@@ -173,16 +200,26 @@ export interface OverviewBuilder {
173
200
  */
174
201
  spawnedByArchitect: string | null;
175
202
  /**
176
- * Canonical "PR is waiting on a human reviewer" signal (Issue #872). True the
177
- * moment porch transitions out of the CMAP-emitting state for the PR-creating
178
- * phase, for ALL bundled protocols. Computed from `pr_ready_for_human` in
179
- * status.yaml when present; otherwise falls back to the v3.1.3 derived logic
180
- * (`blocked === 'PR review'` || BUGFIX `phase === 'verified'`) so in-flight
181
- * projects from before this field shipped continue to surface correctly.
203
+ * Single `area/*` value for this builder's issue, projected via
204
+ * `parseArea` (first-alphabetical wins; `'Uncategorized'` when the
205
+ * builder has no issue or the issue has no `area/*` labels).
206
+ * Required-with-default never `undefined`. Consumed by the
207
+ * builders-tree grouping in #818 and the equivalent dashboard view.
208
+ */
209
+ area: string;
210
+ /**
211
+ * Canonical "PR is waiting on a human reviewer" signal. Gate-authoritative
212
+ * (#927): true exactly when the builder's `pr` gate is genuinely pending
213
+ * (`status: pending` + `requested_at`). Porch requests the `pr` gate after
214
+ * the PR phase / CMAP for EVERY bundled PR-producing protocol (BUGFIX, AIR,
215
+ * SPIR, ASPIR, PIR — #887 gave BUGFIX a `pr` gate), so the pending `pr` gate
216
+ * is the uniform post-CMAP signal.
182
217
  *
183
218
  * Consumers gate on this single boolean instead of deriving from the
184
- * protocol-specific gate shape (the v3.1.3 derivation silently dropped
185
- * BUGFIX PRs because BUGFIX has no `pr` gate).
219
+ * protocol-specific gate shape. (Earlier revisions read `pr_ready_for_human`
220
+ * plus a `bugfix && phase === 'verified'` fallback; #927 dropped both in
221
+ * favor of reading the `pr` gate directly — the field is coincident with the
222
+ * gate, and the gate read avoids the sticky-`false` rollback hazard.)
186
223
  */
187
224
  prReady: boolean;
188
225
  }
@@ -203,6 +240,13 @@ export interface OverviewBacklogItem {
203
240
  url: string;
204
241
  type: string;
205
242
  priority: string;
243
+ /**
244
+ * Single `area/*` value for this issue, projected via `parseArea`
245
+ * (first-alphabetical wins; `'Uncategorized'` when the issue has no
246
+ * `area/*` labels). Required-with-default — never `undefined`. Consumed
247
+ * by the backlog grouping in #811 and the equivalent vscode view.
248
+ */
249
+ area: string;
206
250
  hasSpec: boolean;
207
251
  hasPlan: boolean;
208
252
  hasReview: boolean;
@@ -285,6 +329,41 @@ export interface IssueView {
285
329
  }>;
286
330
  }
287
331
 
332
+ // --- Issue search (GET /api/issue-search) ---
333
+
334
+ /**
335
+ * One searchable issue row returned by Tower's GET /api/issue-search.
336
+ * Distinct from `OverviewBacklogItem`: it carries the issue `body` (so the
337
+ * search panel can match against it host-side) and omits the spec/plan/
338
+ * builder enrichment the sidebar tree needs. Body lives only on this
339
+ * on-demand search path — `OverviewBacklogItem` and `/api/overview` stay
340
+ * body-free so the always-on overview payload doesn't grow.
341
+ */
342
+ export interface IssueSearchItem {
343
+ id: string;
344
+ title: string;
345
+ url: string;
346
+ /** Single `area/*` value (via `parseArea`); `'Uncategorized'` when unlabeled. */
347
+ area: string;
348
+ author?: string;
349
+ assignees?: string[];
350
+ createdAt: string;
351
+ /** Issue body for substring matching. `''` when the forge can't supply it. */
352
+ body: string;
353
+ }
354
+
355
+ /**
356
+ * Response shape of GET /api/issue-search. `currentUser` powers the
357
+ * panel's "Me"/"Unassigned" assignee scope. `error` is set (with an empty
358
+ * `items`) when the forge is unavailable, so the panel can show a reason
359
+ * rather than a silent empty table.
360
+ */
361
+ export interface IssueSearchResponse {
362
+ items: IssueSearchItem[];
363
+ currentUser?: string;
364
+ error?: string;
365
+ }
366
+
288
367
  // --- Team (GET /workspace/:path/api/team) ---
289
368
 
290
369
  export interface ReviewBlockingEntry {
package/src/index.ts CHANGED
@@ -18,12 +18,15 @@ export {
18
18
  type Annotation,
19
19
  type DashboardState,
20
20
  type TerminalEntry,
21
+ type PlanPhase,
21
22
  type OverviewBuilder,
22
23
  type OverviewPR,
23
24
  type OverviewBacklogItem,
24
25
  type OverviewRecentlyClosed,
25
26
  type OverviewData,
26
27
  type IssueView,
28
+ type IssueSearchItem,
29
+ type IssueSearchResponse,
27
30
  type WorktreeDevUrl,
28
31
  type ResolvedWorktreeConfig,
29
32
  type TeamMemberGitHubData,