@cluesmith/codev-types 3.0.7 → 3.1.1
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 +79 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api.ts +83 -0
- package/src/index.ts +2 -0
package/dist/api.d.ts
CHANGED
|
@@ -31,6 +31,14 @@ export interface Builder {
|
|
|
31
31
|
projectId?: string;
|
|
32
32
|
terminalId?: string;
|
|
33
33
|
persistent?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Spec 755 / Spec 786: the architect that spawned this builder, if any.
|
|
36
|
+
* `null` for builders spawned outside of an architect context; the
|
|
37
|
+
* architect's name (`'main'` or a sibling name) otherwise. Surfaced to the
|
|
38
|
+
* dashboard so the remove-architect confirmation modal (Phase 4) can show
|
|
39
|
+
* users which builders are affected before they confirm the removal.
|
|
40
|
+
*/
|
|
41
|
+
spawnedByArchitect?: string | null;
|
|
34
42
|
}
|
|
35
43
|
export interface UtilTerminal {
|
|
36
44
|
id: string;
|
|
@@ -86,6 +94,27 @@ export interface TerminalEntry {
|
|
|
86
94
|
label: string;
|
|
87
95
|
url: string;
|
|
88
96
|
active: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Spec 786 Phase 5: when `type === 'architect'`, the architect's stable
|
|
99
|
+
* name (`'main'` or a sibling). Allows consumers to enumerate architects
|
|
100
|
+
* without parsing the tab id.
|
|
101
|
+
*/
|
|
102
|
+
architectName?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Spec 786 Phase 5: live PID from Tower's in-memory PtySession (architect
|
|
105
|
+
* entries only; not persisted in `state.db`).
|
|
106
|
+
*/
|
|
107
|
+
pid?: number;
|
|
108
|
+
/**
|
|
109
|
+
* Spec 786 Phase 5: port assigned to the terminal, if any.
|
|
110
|
+
*/
|
|
111
|
+
port?: number;
|
|
112
|
+
/**
|
|
113
|
+
* Spec 786 Phase 5: the underlying PtySession id. For architects, the
|
|
114
|
+
* `id` field carries the tab identifier (Spec 761 deep-link convention);
|
|
115
|
+
* this field exposes the actual session id for terminal-attach correlation.
|
|
116
|
+
*/
|
|
117
|
+
terminalId?: string;
|
|
89
118
|
}
|
|
90
119
|
export interface OverviewBuilder {
|
|
91
120
|
id: string;
|
|
@@ -95,6 +124,14 @@ export interface OverviewBuilder {
|
|
|
95
124
|
mode: 'strict' | 'soft';
|
|
96
125
|
gates: Record<string, string>;
|
|
97
126
|
worktreePath: string;
|
|
127
|
+
/**
|
|
128
|
+
* Canonical role identifier (e.g. `builder-pir-1423`) derived from the
|
|
129
|
+
* worktree basename. Stable across requests for a given builder while
|
|
130
|
+
* its worktree exists, and the key by which Tower's runtime terminal
|
|
131
|
+
* registry indexes the live session. `null` for soft-mode builders
|
|
132
|
+
* whose worktree name doesn't match a known protocol pattern.
|
|
133
|
+
*/
|
|
134
|
+
roleId: string | null;
|
|
98
135
|
protocol: string;
|
|
99
136
|
planPhases: Array<{
|
|
100
137
|
id: string;
|
|
@@ -113,6 +150,22 @@ export interface OverviewBuilder {
|
|
|
113
150
|
blockedSince: string | null;
|
|
114
151
|
startedAt: string | null;
|
|
115
152
|
idleMs: number;
|
|
153
|
+
/**
|
|
154
|
+
* Wall-clock ISO timestamp of the last DATA frame Tower received from
|
|
155
|
+
* this builder's shellper, or `null` when no live session exists.
|
|
156
|
+
* Clients use it to flag builders that have been silent for a threshold
|
|
157
|
+
* — likely waiting for non-gate human input. Distinct from `idleMs`,
|
|
158
|
+
* which sums time spent at formal porch gates.
|
|
159
|
+
*/
|
|
160
|
+
lastDataAt: string | null;
|
|
161
|
+
/**
|
|
162
|
+
* Name of the architect that spawned this builder (Spec 755 / 823). `null` for
|
|
163
|
+
* legacy rows from before #755, for builders whose worktree doesn't have a
|
|
164
|
+
* matching row in `state.db.builders`, or when state.db is unavailable. Used
|
|
165
|
+
* by the dashboard to render an inline attribution tag when the workspace
|
|
166
|
+
* hosts more than one architect.
|
|
167
|
+
*/
|
|
168
|
+
spawnedByArchitect: string | null;
|
|
116
169
|
}
|
|
117
170
|
export interface OverviewPR {
|
|
118
171
|
id: string;
|
|
@@ -163,6 +216,32 @@ export interface OverviewData {
|
|
|
163
216
|
issues?: string;
|
|
164
217
|
};
|
|
165
218
|
}
|
|
219
|
+
/** One row in the VSCode "Open Dev URL" workspace surface. */
|
|
220
|
+
export interface WorktreeDevUrl {
|
|
221
|
+
label: string;
|
|
222
|
+
url: string;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Resolved view of the `worktree` config block with defaults applied
|
|
226
|
+
* across the loadConfig layer chain (defaults / cache / global /
|
|
227
|
+
* project / project-local). Always has populated fields — unset
|
|
228
|
+
* scalars collapse to null, unset collections to empty arrays — so
|
|
229
|
+
* consumers don't have to branch.
|
|
230
|
+
*/
|
|
231
|
+
export interface ResolvedWorktreeConfig {
|
|
232
|
+
/** Glob patterns to symlink from workspace root into each worktree. `[]` when unset. */
|
|
233
|
+
symlinks: string[];
|
|
234
|
+
/** Shell commands to run in each worktree after creation. `[]` when unset. */
|
|
235
|
+
postSpawn: string[];
|
|
236
|
+
/** Command for `afx dev <builder-id>`. `null` when unset. */
|
|
237
|
+
devCommand: string | null;
|
|
238
|
+
/**
|
|
239
|
+
* Canonical resolved list of dev URLs for the VSCode "Open Dev URL"
|
|
240
|
+
* workspace surface. Always an array — `[]` when neither `devUrl`
|
|
241
|
+
* nor `devUrls` is set in the user config.
|
|
242
|
+
*/
|
|
243
|
+
devUrls: WorktreeDevUrl[];
|
|
244
|
+
}
|
|
166
245
|
/**
|
|
167
246
|
* A single issue as returned by the `issue-view` forge concept and
|
|
168
247
|
* surfaced verbatim by Tower's GET /api/issue. Mirrors the server-side
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;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AAM,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 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 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';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,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,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"}
|
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -35,6 +35,14 @@ export interface Builder {
|
|
|
35
35
|
projectId?: string;
|
|
36
36
|
terminalId?: string;
|
|
37
37
|
persistent?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Spec 755 / Spec 786: the architect that spawned this builder, if any.
|
|
40
|
+
* `null` for builders spawned outside of an architect context; the
|
|
41
|
+
* architect's name (`'main'` or a sibling name) otherwise. Surfaced to the
|
|
42
|
+
* dashboard so the remove-architect confirmation modal (Phase 4) can show
|
|
43
|
+
* users which builders are affected before they confirm the removal.
|
|
44
|
+
*/
|
|
45
|
+
spawnedByArchitect?: string | null;
|
|
38
46
|
}
|
|
39
47
|
|
|
40
48
|
export interface UtilTerminal {
|
|
@@ -93,6 +101,27 @@ export interface TerminalEntry {
|
|
|
93
101
|
label: string;
|
|
94
102
|
url: string;
|
|
95
103
|
active: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Spec 786 Phase 5: when `type === 'architect'`, the architect's stable
|
|
106
|
+
* name (`'main'` or a sibling). Allows consumers to enumerate architects
|
|
107
|
+
* without parsing the tab id.
|
|
108
|
+
*/
|
|
109
|
+
architectName?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Spec 786 Phase 5: live PID from Tower's in-memory PtySession (architect
|
|
112
|
+
* entries only; not persisted in `state.db`).
|
|
113
|
+
*/
|
|
114
|
+
pid?: number;
|
|
115
|
+
/**
|
|
116
|
+
* Spec 786 Phase 5: port assigned to the terminal, if any.
|
|
117
|
+
*/
|
|
118
|
+
port?: number;
|
|
119
|
+
/**
|
|
120
|
+
* Spec 786 Phase 5: the underlying PtySession id. For architects, the
|
|
121
|
+
* `id` field carries the tab identifier (Spec 761 deep-link convention);
|
|
122
|
+
* this field exposes the actual session id for terminal-attach correlation.
|
|
123
|
+
*/
|
|
124
|
+
terminalId?: string;
|
|
96
125
|
}
|
|
97
126
|
|
|
98
127
|
// --- Overview (GET /api/overview) ---
|
|
@@ -105,6 +134,14 @@ export interface OverviewBuilder {
|
|
|
105
134
|
mode: 'strict' | 'soft';
|
|
106
135
|
gates: Record<string, string>;
|
|
107
136
|
worktreePath: string;
|
|
137
|
+
/**
|
|
138
|
+
* Canonical role identifier (e.g. `builder-pir-1423`) derived from the
|
|
139
|
+
* worktree basename. Stable across requests for a given builder while
|
|
140
|
+
* its worktree exists, and the key by which Tower's runtime terminal
|
|
141
|
+
* registry indexes the live session. `null` for soft-mode builders
|
|
142
|
+
* whose worktree name doesn't match a known protocol pattern.
|
|
143
|
+
*/
|
|
144
|
+
roleId: string | null;
|
|
108
145
|
protocol: string;
|
|
109
146
|
planPhases: Array<{ id: string; title: string; status: string }>;
|
|
110
147
|
progress: number;
|
|
@@ -119,6 +156,22 @@ export interface OverviewBuilder {
|
|
|
119
156
|
blockedSince: string | null;
|
|
120
157
|
startedAt: string | null;
|
|
121
158
|
idleMs: number;
|
|
159
|
+
/**
|
|
160
|
+
* Wall-clock ISO timestamp of the last DATA frame Tower received from
|
|
161
|
+
* this builder's shellper, or `null` when no live session exists.
|
|
162
|
+
* Clients use it to flag builders that have been silent for a threshold
|
|
163
|
+
* — likely waiting for non-gate human input. Distinct from `idleMs`,
|
|
164
|
+
* which sums time spent at formal porch gates.
|
|
165
|
+
*/
|
|
166
|
+
lastDataAt: string | null;
|
|
167
|
+
/**
|
|
168
|
+
* Name of the architect that spawned this builder (Spec 755 / 823). `null` for
|
|
169
|
+
* legacy rows from before #755, for builders whose worktree doesn't have a
|
|
170
|
+
* matching row in `state.db.builders`, or when state.db is unavailable. Used
|
|
171
|
+
* by the dashboard to render an inline attribution tag when the workspace
|
|
172
|
+
* hosts more than one architect.
|
|
173
|
+
*/
|
|
174
|
+
spawnedByArchitect: string | null;
|
|
122
175
|
}
|
|
123
176
|
|
|
124
177
|
export interface OverviewPR {
|
|
@@ -171,6 +224,36 @@ export interface OverviewData {
|
|
|
171
224
|
errors?: { prs?: string; issues?: string };
|
|
172
225
|
}
|
|
173
226
|
|
|
227
|
+
// --- Worktree config (GET /api/worktree-config) ---
|
|
228
|
+
|
|
229
|
+
/** One row in the VSCode "Open Dev URL" workspace surface. */
|
|
230
|
+
export interface WorktreeDevUrl {
|
|
231
|
+
label: string;
|
|
232
|
+
url: string;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Resolved view of the `worktree` config block with defaults applied
|
|
237
|
+
* across the loadConfig layer chain (defaults / cache / global /
|
|
238
|
+
* project / project-local). Always has populated fields — unset
|
|
239
|
+
* scalars collapse to null, unset collections to empty arrays — so
|
|
240
|
+
* consumers don't have to branch.
|
|
241
|
+
*/
|
|
242
|
+
export interface ResolvedWorktreeConfig {
|
|
243
|
+
/** Glob patterns to symlink from workspace root into each worktree. `[]` when unset. */
|
|
244
|
+
symlinks: string[];
|
|
245
|
+
/** Shell commands to run in each worktree after creation. `[]` when unset. */
|
|
246
|
+
postSpawn: string[];
|
|
247
|
+
/** Command for `afx dev <builder-id>`. `null` when unset. */
|
|
248
|
+
devCommand: string | null;
|
|
249
|
+
/**
|
|
250
|
+
* Canonical resolved list of dev URLs for the VSCode "Open Dev URL"
|
|
251
|
+
* workspace surface. Always an array — `[]` when neither `devUrl`
|
|
252
|
+
* nor `devUrls` is set in the user config.
|
|
253
|
+
*/
|
|
254
|
+
devUrls: WorktreeDevUrl[];
|
|
255
|
+
}
|
|
256
|
+
|
|
174
257
|
// --- Issue view (GET /api/issue) ---
|
|
175
258
|
|
|
176
259
|
/**
|