@cluesmith/codev-types 3.0.5 → 3.0.6
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 +57 -1
- 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 +61 -1
- package/src/index.ts +1 -0
package/dist/api.d.ts
CHANGED
|
@@ -6,6 +6,13 @@
|
|
|
6
6
|
* VS Code extension (packages/codev-vscode).
|
|
7
7
|
*/
|
|
8
8
|
export interface ArchitectState {
|
|
9
|
+
/**
|
|
10
|
+
* The architect's stable name (Spec 755). For single-architect workspaces this is
|
|
11
|
+
* `'main'`. For sibling-architect workspaces, additional architects are
|
|
12
|
+
* `'architect-2'`, `'architect-3'`, or whatever custom name was supplied via
|
|
13
|
+
* `afx workspace add-architect --name <name>`.
|
|
14
|
+
*/
|
|
15
|
+
name: string;
|
|
9
16
|
port: number;
|
|
10
17
|
pid: number;
|
|
11
18
|
terminalId?: string;
|
|
@@ -39,13 +46,32 @@ export interface Annotation {
|
|
|
39
46
|
file: string;
|
|
40
47
|
port: number;
|
|
41
48
|
pid: number;
|
|
42
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Optional parent reference. The Tower `/api/state` handler does not populate
|
|
51
|
+
* this; the field is reserved for richer client-driven annotation flows that
|
|
52
|
+
* may emerge later. Treat as informational only.
|
|
53
|
+
*/
|
|
54
|
+
parent?: {
|
|
43
55
|
type: string;
|
|
44
56
|
id?: string;
|
|
45
57
|
};
|
|
46
58
|
}
|
|
47
59
|
export interface DashboardState {
|
|
60
|
+
/**
|
|
61
|
+
* Backward-compatible scalar pointer to the dashboard's "default" architect.
|
|
62
|
+
* Populated as the architect named `'main'` if present, else the first
|
|
63
|
+
* registered architect. Consumers that only need one architect (e.g. older
|
|
64
|
+
* VSCode-extension builds) should read this field.
|
|
65
|
+
*/
|
|
48
66
|
architect: ArchitectState | null;
|
|
67
|
+
/**
|
|
68
|
+
* Full collection of registered architects (Spec 761). The entry whose
|
|
69
|
+
* `name === 'main'` is always at index 0 when present; remaining entries
|
|
70
|
+
* follow insertion order from Tower's internal map. Empty array means no
|
|
71
|
+
* architect is registered. Consumers that need to surface all architects
|
|
72
|
+
* (e.g. the dashboard tab strip) should read this field.
|
|
73
|
+
*/
|
|
74
|
+
architects: ArchitectState[];
|
|
49
75
|
builders: Builder[];
|
|
50
76
|
utils: UtilTerminal[];
|
|
51
77
|
annotations: Annotation[];
|
|
@@ -76,7 +102,14 @@ export interface OverviewBuilder {
|
|
|
76
102
|
status: string;
|
|
77
103
|
}>;
|
|
78
104
|
progress: number;
|
|
105
|
+
/** Human-readable label for the gate the builder is blocked on (e.g. "plan review"). */
|
|
79
106
|
blocked: string | null;
|
|
107
|
+
/**
|
|
108
|
+
* Canonical gate name (e.g. "plan-approval") for the gate the builder is
|
|
109
|
+
* blocked on. Use this when calling `porch approve` — `blocked` is a
|
|
110
|
+
* display label and won't match porch's gate keys.
|
|
111
|
+
*/
|
|
112
|
+
blockedGate: string | null;
|
|
80
113
|
blockedSince: string | null;
|
|
81
114
|
startedAt: string | null;
|
|
82
115
|
idleMs: number;
|
|
@@ -123,11 +156,30 @@ export interface OverviewData {
|
|
|
123
156
|
pendingPRs: OverviewPR[];
|
|
124
157
|
backlog: OverviewBacklogItem[];
|
|
125
158
|
recentlyClosed: OverviewRecentlyClosed[];
|
|
159
|
+
/** Auto-detected GitHub login of the current user (via the user-identity forge concept). */
|
|
160
|
+
currentUser?: string;
|
|
126
161
|
errors?: {
|
|
127
162
|
prs?: string;
|
|
128
163
|
issues?: string;
|
|
129
164
|
};
|
|
130
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* A single issue as returned by the `issue-view` forge concept and
|
|
168
|
+
* surfaced verbatim by Tower's GET /api/issue. Mirrors the server-side
|
|
169
|
+
* IssueViewResult (packages/codev/src/lib/forge-contracts.ts).
|
|
170
|
+
*/
|
|
171
|
+
export interface IssueView {
|
|
172
|
+
title: string;
|
|
173
|
+
body: string;
|
|
174
|
+
state: string;
|
|
175
|
+
comments: Array<{
|
|
176
|
+
body: string;
|
|
177
|
+
createdAt: string;
|
|
178
|
+
author: {
|
|
179
|
+
login: string;
|
|
180
|
+
};
|
|
181
|
+
}>;
|
|
182
|
+
}
|
|
131
183
|
export interface ReviewBlockingEntry {
|
|
132
184
|
direction: 'authored' | 'reviewing';
|
|
133
185
|
otherName: string;
|
|
@@ -145,11 +197,13 @@ export interface TeamMemberGitHubData {
|
|
|
145
197
|
title: string;
|
|
146
198
|
url: string;
|
|
147
199
|
}[];
|
|
200
|
+
assignedIssuesCount: number;
|
|
148
201
|
openPRs: {
|
|
149
202
|
number: number;
|
|
150
203
|
title: string;
|
|
151
204
|
url: string;
|
|
152
205
|
}[];
|
|
206
|
+
openPRsCount: number;
|
|
153
207
|
recentActivity: {
|
|
154
208
|
mergedPRs: {
|
|
155
209
|
number: number;
|
|
@@ -157,12 +211,14 @@ export interface TeamMemberGitHubData {
|
|
|
157
211
|
url: string;
|
|
158
212
|
mergedAt: string;
|
|
159
213
|
}[];
|
|
214
|
+
mergedPRsCount: number;
|
|
160
215
|
closedIssues: {
|
|
161
216
|
number: number;
|
|
162
217
|
title: string;
|
|
163
218
|
url: string;
|
|
164
219
|
closedAt: string;
|
|
165
220
|
}[];
|
|
221
|
+
closedIssuesCount: number;
|
|
166
222
|
};
|
|
167
223
|
reviewBlocking: ReviewBlockingEntry[];
|
|
168
224
|
}
|
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,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;C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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 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 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,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,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
|
@@ -9,6 +9,13 @@
|
|
|
9
9
|
// --- Dashboard State (GET /workspace/:path/api/state) ---
|
|
10
10
|
|
|
11
11
|
export interface ArchitectState {
|
|
12
|
+
/**
|
|
13
|
+
* The architect's stable name (Spec 755). For single-architect workspaces this is
|
|
14
|
+
* `'main'`. For sibling-architect workspaces, additional architects are
|
|
15
|
+
* `'architect-2'`, `'architect-3'`, or whatever custom name was supplied via
|
|
16
|
+
* `afx workspace add-architect --name <name>`.
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
12
19
|
port: number;
|
|
13
20
|
pid: number;
|
|
14
21
|
terminalId?: string;
|
|
@@ -45,11 +52,30 @@ export interface Annotation {
|
|
|
45
52
|
file: string;
|
|
46
53
|
port: number;
|
|
47
54
|
pid: number;
|
|
48
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Optional parent reference. The Tower `/api/state` handler does not populate
|
|
57
|
+
* this; the field is reserved for richer client-driven annotation flows that
|
|
58
|
+
* may emerge later. Treat as informational only.
|
|
59
|
+
*/
|
|
60
|
+
parent?: { type: string; id?: string };
|
|
49
61
|
}
|
|
50
62
|
|
|
51
63
|
export interface DashboardState {
|
|
64
|
+
/**
|
|
65
|
+
* Backward-compatible scalar pointer to the dashboard's "default" architect.
|
|
66
|
+
* Populated as the architect named `'main'` if present, else the first
|
|
67
|
+
* registered architect. Consumers that only need one architect (e.g. older
|
|
68
|
+
* VSCode-extension builds) should read this field.
|
|
69
|
+
*/
|
|
52
70
|
architect: ArchitectState | null;
|
|
71
|
+
/**
|
|
72
|
+
* Full collection of registered architects (Spec 761). The entry whose
|
|
73
|
+
* `name === 'main'` is always at index 0 when present; remaining entries
|
|
74
|
+
* follow insertion order from Tower's internal map. Empty array means no
|
|
75
|
+
* architect is registered. Consumers that need to surface all architects
|
|
76
|
+
* (e.g. the dashboard tab strip) should read this field.
|
|
77
|
+
*/
|
|
78
|
+
architects: ArchitectState[];
|
|
53
79
|
builders: Builder[];
|
|
54
80
|
utils: UtilTerminal[];
|
|
55
81
|
annotations: Annotation[];
|
|
@@ -82,7 +108,14 @@ export interface OverviewBuilder {
|
|
|
82
108
|
protocol: string;
|
|
83
109
|
planPhases: Array<{ id: string; title: string; status: string }>;
|
|
84
110
|
progress: number;
|
|
111
|
+
/** Human-readable label for the gate the builder is blocked on (e.g. "plan review"). */
|
|
85
112
|
blocked: string | null;
|
|
113
|
+
/**
|
|
114
|
+
* Canonical gate name (e.g. "plan-approval") for the gate the builder is
|
|
115
|
+
* blocked on. Use this when calling `porch approve` — `blocked` is a
|
|
116
|
+
* display label and won't match porch's gate keys.
|
|
117
|
+
*/
|
|
118
|
+
blockedGate: string | null;
|
|
86
119
|
blockedSince: string | null;
|
|
87
120
|
startedAt: string | null;
|
|
88
121
|
idleMs: number;
|
|
@@ -133,9 +166,29 @@ export interface OverviewData {
|
|
|
133
166
|
pendingPRs: OverviewPR[];
|
|
134
167
|
backlog: OverviewBacklogItem[];
|
|
135
168
|
recentlyClosed: OverviewRecentlyClosed[];
|
|
169
|
+
/** Auto-detected GitHub login of the current user (via the user-identity forge concept). */
|
|
170
|
+
currentUser?: string;
|
|
136
171
|
errors?: { prs?: string; issues?: string };
|
|
137
172
|
}
|
|
138
173
|
|
|
174
|
+
// --- Issue view (GET /api/issue) ---
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* A single issue as returned by the `issue-view` forge concept and
|
|
178
|
+
* surfaced verbatim by Tower's GET /api/issue. Mirrors the server-side
|
|
179
|
+
* IssueViewResult (packages/codev/src/lib/forge-contracts.ts).
|
|
180
|
+
*/
|
|
181
|
+
export interface IssueView {
|
|
182
|
+
title: string;
|
|
183
|
+
body: string;
|
|
184
|
+
state: string;
|
|
185
|
+
comments: Array<{
|
|
186
|
+
body: string;
|
|
187
|
+
createdAt: string;
|
|
188
|
+
author: { login: string };
|
|
189
|
+
}>;
|
|
190
|
+
}
|
|
191
|
+
|
|
139
192
|
// --- Team (GET /workspace/:path/api/team) ---
|
|
140
193
|
|
|
141
194
|
export interface ReviewBlockingEntry {
|
|
@@ -151,11 +204,18 @@ export interface ReviewBlockingEntry {
|
|
|
151
204
|
}
|
|
152
205
|
|
|
153
206
|
export interface TeamMemberGitHubData {
|
|
207
|
+
// node arrays are capped at GitHub search `first` (20) and feed lists /
|
|
208
|
+
// review-blocking; the *Count fields are the true totals (search.issueCount)
|
|
209
|
+
// and must be used for any "N assigned / N open" display.
|
|
154
210
|
assignedIssues: { number: number; title: string; url: string }[];
|
|
211
|
+
assignedIssuesCount: number;
|
|
155
212
|
openPRs: { number: number; title: string; url: string }[];
|
|
213
|
+
openPRsCount: number;
|
|
156
214
|
recentActivity: {
|
|
157
215
|
mergedPRs: { number: number; title: string; url: string; mergedAt: string }[];
|
|
216
|
+
mergedPRsCount: number;
|
|
158
217
|
closedIssues: { number: number; title: string; url: string; closedAt: string }[];
|
|
218
|
+
closedIssuesCount: number;
|
|
159
219
|
};
|
|
160
220
|
reviewBlocking: ReviewBlockingEntry[];
|
|
161
221
|
}
|