@rallycry/conveyor-mcp 4.3.28 → 4.3.30
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/chunk-D3Q2QZJA.js +162 -0
- package/dist/{chunk-N2XC2PGJ.js → chunk-HIVOGGE3.js} +0 -1
- package/dist/chunk-OPZL4NDT.js +175 -0
- package/dist/{chunk-Y6ZJUNDX.js → chunk-X3EHPZNH.js} +92 -2
- package/dist/cli.js +87 -11
- package/dist/connection-CRkBLz5w.d.ts +911 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -5
- package/dist/tunnel-cli.js +4 -5
- package/dist/tunnel.d.ts +2 -803
- package/dist/tunnel.js +1 -2
- package/dist/wait-cli.d.ts +1 -0
- package/dist/wait-cli.js +313 -0
- package/dist/wait-runner.d.ts +48 -0
- package/dist/wait-runner.js +7 -0
- package/dist/wait.d.ts +108 -0
- package/dist/wait.js +28 -0
- package/package.json +3 -2
- package/dist/chunk-N2XC2PGJ.js.map +0 -1
- package/dist/chunk-Y6ZJUNDX.js.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/tunnel-cli.js.map +0 -1
- package/dist/tunnel.js.map +0 -1
|
@@ -0,0 +1,911 @@
|
|
|
1
|
+
interface ConveyorMcpConfig {
|
|
2
|
+
apiUrl: string;
|
|
3
|
+
projectToken: string;
|
|
4
|
+
projectId?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Optional default board (sub-project) scope. When set, unqualified
|
|
7
|
+
* task create/list/search default to this board instead of the whole
|
|
8
|
+
* project — so a connection scoped to a board lands cards on that board.
|
|
9
|
+
*/
|
|
10
|
+
subProjectId?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Actions a connection is authorized for, mirrors ConveyorCapability in @project/shared. */
|
|
13
|
+
type ConveyorCapability = "read" | "create" | "update" | "chat" | "files" | "build";
|
|
14
|
+
/** Immutable id + human name/slug + web URL for one connection scope level. */
|
|
15
|
+
interface ConnectionScopeRef {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
slug: string;
|
|
19
|
+
url: string;
|
|
20
|
+
}
|
|
21
|
+
/** Result of `get_connection_context` — effective identity + scope + grants. */
|
|
22
|
+
interface ConnectionContext {
|
|
23
|
+
account: {
|
|
24
|
+
userId: string;
|
|
25
|
+
name: string | null;
|
|
26
|
+
email: string;
|
|
27
|
+
};
|
|
28
|
+
project: ConnectionScopeRef & {
|
|
29
|
+
githubRepoOwner: string | null;
|
|
30
|
+
githubRepoName: string | null;
|
|
31
|
+
};
|
|
32
|
+
subProject: (ConnectionScopeRef & {
|
|
33
|
+
rootPath: string | null;
|
|
34
|
+
}) | null;
|
|
35
|
+
role: string;
|
|
36
|
+
capabilities: ConveyorCapability[];
|
|
37
|
+
managementUrls: {
|
|
38
|
+
board: string;
|
|
39
|
+
projectSettings: string;
|
|
40
|
+
memberSettings: string;
|
|
41
|
+
};
|
|
42
|
+
summary: string;
|
|
43
|
+
}
|
|
44
|
+
/** One layer of the verify_connection ladder. */
|
|
45
|
+
interface VerifyConnectionLayer {
|
|
46
|
+
key: string;
|
|
47
|
+
label: string;
|
|
48
|
+
ok: boolean;
|
|
49
|
+
detail: string;
|
|
50
|
+
}
|
|
51
|
+
/** Result of `verify_connection` — a layered, verify-by-scope probe. */
|
|
52
|
+
interface VerifyConnectionResult {
|
|
53
|
+
ok: boolean;
|
|
54
|
+
layers: VerifyConnectionLayer[];
|
|
55
|
+
summary: string;
|
|
56
|
+
nextAction: string | null;
|
|
57
|
+
scope: {
|
|
58
|
+
projectId: string;
|
|
59
|
+
projectName: string;
|
|
60
|
+
subProjectId: string | null;
|
|
61
|
+
subProjectName: string | null;
|
|
62
|
+
capabilities: ConveyorCapability[];
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/** The project + board a task mutation actually landed on. Returned so a caller
|
|
66
|
+
* can confirm where the write went (name-vs-board-label ambiguity guard). */
|
|
67
|
+
interface EffectiveScope {
|
|
68
|
+
projectId: string;
|
|
69
|
+
subProjectId: string | null;
|
|
70
|
+
}
|
|
71
|
+
/** One board under the connected project, for list_accessible_subprojects. */
|
|
72
|
+
interface AccessibleSubproject {
|
|
73
|
+
id: string;
|
|
74
|
+
name: string;
|
|
75
|
+
slug: string;
|
|
76
|
+
url: string;
|
|
77
|
+
rootPath: string | null;
|
|
78
|
+
role: string;
|
|
79
|
+
capabilities: ConveyorCapability[];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Canonical risk levels — kept in lockstep with `RISK_LEVELS` in
|
|
83
|
+
* `@project/shared` (conveyor-mcp is published standalone and does not depend on
|
|
84
|
+
* the shared package, so the vocabulary is duplicated here).
|
|
85
|
+
*/
|
|
86
|
+
type RiskLevel = "critical" | "high" | "medium" | "low";
|
|
87
|
+
/** A single PTY output frame broadcast on the `pty:data` room event. */
|
|
88
|
+
interface PtyDataChunk {
|
|
89
|
+
sessionId: string;
|
|
90
|
+
seq: number;
|
|
91
|
+
data: string;
|
|
92
|
+
cols?: number;
|
|
93
|
+
rows?: number;
|
|
94
|
+
}
|
|
95
|
+
/** Ring-buffer snapshot returned by `ptyAttach` for catch-up replay. */
|
|
96
|
+
interface PtyAttachSnapshot {
|
|
97
|
+
sessionId: string;
|
|
98
|
+
chunks: {
|
|
99
|
+
seq: number;
|
|
100
|
+
data: string;
|
|
101
|
+
}[];
|
|
102
|
+
cols: number;
|
|
103
|
+
rows: number;
|
|
104
|
+
totalBytes: number;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* One card as it appears on the live `cardsByProject` collection. A structural
|
|
108
|
+
* subset of `TaskCardDTO` — only what `conveyor-wait` filters on and prints, so
|
|
109
|
+
* the standalone package does not have to mirror the whole board DTO. Note
|
|
110
|
+
* there is no flat assignee id: the assignee rides the `assignedUser` relation.
|
|
111
|
+
*/
|
|
112
|
+
interface CardCollectionItem {
|
|
113
|
+
id: string;
|
|
114
|
+
slug?: string;
|
|
115
|
+
title?: string;
|
|
116
|
+
type?: string;
|
|
117
|
+
status?: string;
|
|
118
|
+
assignedUser?: {
|
|
119
|
+
id: string;
|
|
120
|
+
} | null;
|
|
121
|
+
}
|
|
122
|
+
/** One page of the `cardsByProject` snapshot, as returned by the subscribe ack. */
|
|
123
|
+
interface CardCollectionPage {
|
|
124
|
+
items: CardCollectionItem[];
|
|
125
|
+
nextCursor: string | null;
|
|
126
|
+
totalCount: number;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* A quickdraw collection change on a card scope. `added` vs `updated` is
|
|
130
|
+
* cosmetic — most card writes go through a hand-rolled upsert that always
|
|
131
|
+
* emits `updated`, creates included.
|
|
132
|
+
*/
|
|
133
|
+
type CardCollectionDelta = {
|
|
134
|
+
type: "added";
|
|
135
|
+
item: CardCollectionItem;
|
|
136
|
+
rev: number;
|
|
137
|
+
} | {
|
|
138
|
+
type: "updated";
|
|
139
|
+
item: CardCollectionItem;
|
|
140
|
+
rev: number;
|
|
141
|
+
} | {
|
|
142
|
+
type: "removed";
|
|
143
|
+
id: string;
|
|
144
|
+
rev: number;
|
|
145
|
+
} | {
|
|
146
|
+
type: "reset";
|
|
147
|
+
rev: number;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Result of `getActivePtySession`. `sessionId` is null until the cloud agent
|
|
151
|
+
* has booted a PTY and produced at least one ring frame (readiness signal).
|
|
152
|
+
*/
|
|
153
|
+
interface ActivePtySession {
|
|
154
|
+
sessionId: string | null;
|
|
155
|
+
cols?: number;
|
|
156
|
+
rows?: number;
|
|
157
|
+
}
|
|
158
|
+
interface WorkspaceAttachInfo {
|
|
159
|
+
taskId: string;
|
|
160
|
+
sessionId: string;
|
|
161
|
+
workspaceRoot: string;
|
|
162
|
+
/** "codespace" means preview-only — GitHub owns the VM's forwarded ports, so
|
|
163
|
+
* `tunnelUrl`/`attachToken`/`ssh` are null/absent. Older servers omit it. */
|
|
164
|
+
backend?: "gke" | "codespace";
|
|
165
|
+
tunnelUrl: string | null;
|
|
166
|
+
attachToken: string | null;
|
|
167
|
+
expiresAt: string;
|
|
168
|
+
previewPorts: Array<{
|
|
169
|
+
port: number;
|
|
170
|
+
label: string;
|
|
171
|
+
}>;
|
|
172
|
+
previewUrls: Record<string, string>;
|
|
173
|
+
ssh?: {
|
|
174
|
+
remotePort: number;
|
|
175
|
+
preferredLocalPort: number;
|
|
176
|
+
username: string;
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
/** One Cloud Logging entry as returned by the API's queryProjectGcpLogs. */
|
|
180
|
+
interface GcpLogEntry {
|
|
181
|
+
timestamp: string;
|
|
182
|
+
severity: string;
|
|
183
|
+
message: string;
|
|
184
|
+
resource: Record<string, string>;
|
|
185
|
+
labels: Record<string, string>;
|
|
186
|
+
resourceType?: string;
|
|
187
|
+
insertId?: string;
|
|
188
|
+
trace?: string;
|
|
189
|
+
httpRequest?: {
|
|
190
|
+
status?: number;
|
|
191
|
+
method?: string;
|
|
192
|
+
url?: string;
|
|
193
|
+
latencyMs?: number;
|
|
194
|
+
};
|
|
195
|
+
payload?: string;
|
|
196
|
+
payloadTruncated?: boolean;
|
|
197
|
+
}
|
|
198
|
+
interface GcpLogQueryResult {
|
|
199
|
+
entries: GcpLogEntry[];
|
|
200
|
+
hasMore: boolean;
|
|
201
|
+
nextPageToken?: string;
|
|
202
|
+
scopedServices?: string[];
|
|
203
|
+
error?: string;
|
|
204
|
+
}
|
|
205
|
+
/** Loki entries normalize onto the same row shape as Cloud Logging entries. */
|
|
206
|
+
interface GrafanaLogQueryResult {
|
|
207
|
+
entries: GcpLogEntry[];
|
|
208
|
+
hasMore: boolean;
|
|
209
|
+
/** The LogQL the server composed or executed — agents can iterate on it. */
|
|
210
|
+
logql?: string;
|
|
211
|
+
error?: string;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* One row of the project onboarding checklist. Mirrors the API's
|
|
215
|
+
* `ReadinessCheck` (conveyor-mcp is published standalone and does not depend on
|
|
216
|
+
* `@project/shared`, so the shape is duplicated here).
|
|
217
|
+
*/
|
|
218
|
+
interface OnboardingCheck {
|
|
219
|
+
key: string;
|
|
220
|
+
status: "ok" | "warn" | "fail";
|
|
221
|
+
reason: string;
|
|
222
|
+
fix?: {
|
|
223
|
+
label: string;
|
|
224
|
+
href?: string | null;
|
|
225
|
+
action?: string;
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
/** Result of `get_onboarding_status` — the project's setup readiness report. */
|
|
229
|
+
interface OnboardingStatus {
|
|
230
|
+
ok: boolean;
|
|
231
|
+
checks: OnboardingCheck[];
|
|
232
|
+
bypassedAt: string | null;
|
|
233
|
+
}
|
|
234
|
+
/** The single next onboarding step. Mirrors the API's `OnboardingStep`. */
|
|
235
|
+
interface OnboardingStep {
|
|
236
|
+
key: string;
|
|
237
|
+
status: "warn" | "fail";
|
|
238
|
+
title: string;
|
|
239
|
+
reason: string;
|
|
240
|
+
guidance: string;
|
|
241
|
+
autoFixable: boolean;
|
|
242
|
+
fix?: {
|
|
243
|
+
label: string;
|
|
244
|
+
href?: string | null;
|
|
245
|
+
action?: string;
|
|
246
|
+
};
|
|
247
|
+
connectUrls?: Record<string, string>;
|
|
248
|
+
}
|
|
249
|
+
/** Result of `get_onboarding_step` — the choose-your-own-adventure step driver.
|
|
250
|
+
* Mirrors the API's `OnboardingStepReport`. */
|
|
251
|
+
interface OnboardingStepReport {
|
|
252
|
+
done: boolean;
|
|
253
|
+
ok: boolean;
|
|
254
|
+
bypassedAt: string | null;
|
|
255
|
+
step: OnboardingStep | null;
|
|
256
|
+
remaining: Array<{
|
|
257
|
+
key: string;
|
|
258
|
+
status: "warn" | "fail";
|
|
259
|
+
reason: string;
|
|
260
|
+
}>;
|
|
261
|
+
checks: OnboardingCheck[];
|
|
262
|
+
}
|
|
263
|
+
/** Result of `set_task_parent` — mirrors the API's `ReparentCardResult`. */
|
|
264
|
+
interface SetTaskParentResult {
|
|
265
|
+
id: string;
|
|
266
|
+
slug: string;
|
|
267
|
+
status: string;
|
|
268
|
+
previousParentTaskId: string | null;
|
|
269
|
+
parentTaskId: string | null;
|
|
270
|
+
parentSlug: string | null;
|
|
271
|
+
/** Conditions reported rather than enforced: the move landed regardless. */
|
|
272
|
+
warnings: string[];
|
|
273
|
+
}
|
|
274
|
+
interface MoveCardResult {
|
|
275
|
+
cardId: string;
|
|
276
|
+
sourceProjectId: string;
|
|
277
|
+
destinationProjectId: string;
|
|
278
|
+
slug: string;
|
|
279
|
+
clearedFields: string[];
|
|
280
|
+
}
|
|
281
|
+
interface ProjectConnectUrls {
|
|
282
|
+
gcpConnect: string;
|
|
283
|
+
gcpSettings: string;
|
|
284
|
+
memberSettings: string;
|
|
285
|
+
projectSettings: string;
|
|
286
|
+
setupWizard: string;
|
|
287
|
+
}
|
|
288
|
+
interface TagSummary {
|
|
289
|
+
id: string;
|
|
290
|
+
name: string;
|
|
291
|
+
color: string;
|
|
292
|
+
description?: string | null;
|
|
293
|
+
}
|
|
294
|
+
/** A tag context-path link (rule/doc/file/folder) loaded into agent context.
|
|
295
|
+
* A locator turns the link into a VERIFIED repo link — mirrors
|
|
296
|
+
* TagContextLink in @project/shared types/tag-types.ts. */
|
|
297
|
+
interface ContextPathInput {
|
|
298
|
+
type: "rule" | "doc" | "file" | "folder";
|
|
299
|
+
path: string;
|
|
300
|
+
label?: string;
|
|
301
|
+
locator?: string;
|
|
302
|
+
locatorType?: "test" | "code";
|
|
303
|
+
}
|
|
304
|
+
interface PrioritySummary {
|
|
305
|
+
id: string;
|
|
306
|
+
value: number;
|
|
307
|
+
name: string;
|
|
308
|
+
color: string;
|
|
309
|
+
description?: string | null;
|
|
310
|
+
}
|
|
311
|
+
declare class ConveyorConnection {
|
|
312
|
+
private socket;
|
|
313
|
+
private config;
|
|
314
|
+
/** project slug → id, for resolving `<project>/<card>` card paths. */
|
|
315
|
+
private projectSlugIds;
|
|
316
|
+
constructor(config: ConveyorMcpConfig);
|
|
317
|
+
get projectId(): string;
|
|
318
|
+
private resolveProjectId;
|
|
319
|
+
/** The configured default board (CONVEYOR_SUBPROJECT_ID), if any. */
|
|
320
|
+
get defaultSubProjectId(): string | undefined;
|
|
321
|
+
/**
|
|
322
|
+
* Resolve the board scope for a task create/list/search:
|
|
323
|
+
* - `null` explicitly means "the whole project" (never fall back to the default).
|
|
324
|
+
* - `undefined` (not passed) falls back to the connection's default board.
|
|
325
|
+
* - a concrete id is used as-is.
|
|
326
|
+
* Returning `undefined` leaves the request unscoped (whole project).
|
|
327
|
+
*/
|
|
328
|
+
private resolveSubProjectId;
|
|
329
|
+
private normalizeProjectList;
|
|
330
|
+
connect(): Promise<void>;
|
|
331
|
+
private call;
|
|
332
|
+
/**
|
|
333
|
+
* Fire-and-forget emit (no ack). The quickdraw-core server method handler
|
|
334
|
+
* invokes the ack callback via optional chaining, so omitting it still runs
|
|
335
|
+
* the full auth/schema/ACL pipeline — it just skips the response round-trip.
|
|
336
|
+
* Used for high-frequency PTY input/resize so each keystroke does not arm a
|
|
337
|
+
* 15s timeout timer.
|
|
338
|
+
*/
|
|
339
|
+
private emit;
|
|
340
|
+
private callService;
|
|
341
|
+
queryGcpLogs(params: {
|
|
342
|
+
projectId?: string;
|
|
343
|
+
env?: "prod" | "dev" | "claudespace";
|
|
344
|
+
severity?: string;
|
|
345
|
+
services?: string[];
|
|
346
|
+
sqlInstances?: string[];
|
|
347
|
+
allServices?: boolean;
|
|
348
|
+
search?: string;
|
|
349
|
+
filter?: string;
|
|
350
|
+
startTime?: string;
|
|
351
|
+
endTime?: string;
|
|
352
|
+
limit?: number;
|
|
353
|
+
pageToken?: string;
|
|
354
|
+
}): Promise<GcpLogQueryResult>;
|
|
355
|
+
queryGrafanaLogs(params: {
|
|
356
|
+
projectId?: string;
|
|
357
|
+
env?: "prod" | "dev";
|
|
358
|
+
services?: string[];
|
|
359
|
+
level?: "debug" | "info" | "warn" | "error" | "fatal";
|
|
360
|
+
search?: string;
|
|
361
|
+
logql?: string;
|
|
362
|
+
startTime?: string;
|
|
363
|
+
endTime?: string;
|
|
364
|
+
limit?: number;
|
|
365
|
+
}): Promise<GrafanaLogQueryResult>;
|
|
366
|
+
listTasks(params: {
|
|
367
|
+
projectId?: string;
|
|
368
|
+
status?: string;
|
|
369
|
+
typeFilters?: string[];
|
|
370
|
+
assigneeId?: string;
|
|
371
|
+
unassigned?: boolean;
|
|
372
|
+
subProjectId?: string | null;
|
|
373
|
+
limit?: number;
|
|
374
|
+
}): Promise<unknown[]>;
|
|
375
|
+
getTask(taskId: string, projectId?: string): Promise<unknown>;
|
|
376
|
+
getCardBySlug(slug: string, projectId?: string): Promise<unknown>;
|
|
377
|
+
searchTasks(params: {
|
|
378
|
+
projectId?: string;
|
|
379
|
+
tagNames?: string[];
|
|
380
|
+
tagMatch?: "any" | "all";
|
|
381
|
+
includeChildTags?: boolean;
|
|
382
|
+
searchQuery?: string;
|
|
383
|
+
statusFilters?: string[];
|
|
384
|
+
typeFilters?: string[];
|
|
385
|
+
assigneeId?: string;
|
|
386
|
+
unassigned?: boolean;
|
|
387
|
+
subProjectId?: string | null;
|
|
388
|
+
limit?: number;
|
|
389
|
+
}): Promise<unknown[]>;
|
|
390
|
+
createTask(params: {
|
|
391
|
+
projectId?: string;
|
|
392
|
+
title: string;
|
|
393
|
+
description?: string;
|
|
394
|
+
plan?: string;
|
|
395
|
+
status?: string;
|
|
396
|
+
subProjectId?: string | null;
|
|
397
|
+
tags?: string[];
|
|
398
|
+
}): Promise<{
|
|
399
|
+
id: string;
|
|
400
|
+
slug: string;
|
|
401
|
+
effectiveScope: EffectiveScope;
|
|
402
|
+
}>;
|
|
403
|
+
updateTask(params: {
|
|
404
|
+
projectId?: string;
|
|
405
|
+
taskId: string;
|
|
406
|
+
title?: string;
|
|
407
|
+
description?: string;
|
|
408
|
+
plan?: string;
|
|
409
|
+
status?: string;
|
|
410
|
+
risk?: RiskLevel | null;
|
|
411
|
+
storyPointValue?: number | null;
|
|
412
|
+
assignedUserId?: string | null;
|
|
413
|
+
subProjectId?: string | null;
|
|
414
|
+
githubBranch?: string | null;
|
|
415
|
+
addTags?: string[];
|
|
416
|
+
removeTags?: string[];
|
|
417
|
+
}): Promise<{
|
|
418
|
+
id: string;
|
|
419
|
+
status: string | null;
|
|
420
|
+
risk: RiskLevel | null;
|
|
421
|
+
storyPointValue: number | null;
|
|
422
|
+
assignedUserId: string | null;
|
|
423
|
+
addedTags: string[];
|
|
424
|
+
removedTags: string[];
|
|
425
|
+
}>;
|
|
426
|
+
/** Resolve tag names to IDs within a project, throwing on any unknown name. */
|
|
427
|
+
private resolveTagIds;
|
|
428
|
+
private assignTagsToTask;
|
|
429
|
+
private removeTagsFromTask;
|
|
430
|
+
/** Guarded status transition used by the review tools (approve/request). */
|
|
431
|
+
transitionTaskStatus(params: {
|
|
432
|
+
projectId?: string;
|
|
433
|
+
taskId: string;
|
|
434
|
+
toStatus: string;
|
|
435
|
+
expectedFromStatus?: string;
|
|
436
|
+
risk?: RiskLevel;
|
|
437
|
+
}): Promise<{
|
|
438
|
+
id: string;
|
|
439
|
+
status: string;
|
|
440
|
+
risk: RiskLevel | null;
|
|
441
|
+
}>;
|
|
442
|
+
moveCard(params: {
|
|
443
|
+
projectId?: string;
|
|
444
|
+
taskId: string;
|
|
445
|
+
destinationProjectId: string;
|
|
446
|
+
}): Promise<MoveCardResult>;
|
|
447
|
+
addReviewer(params: {
|
|
448
|
+
projectId?: string;
|
|
449
|
+
taskId: string;
|
|
450
|
+
userId: string;
|
|
451
|
+
}): Promise<{
|
|
452
|
+
taskId: string;
|
|
453
|
+
reviewers: Array<{
|
|
454
|
+
userId: string;
|
|
455
|
+
name: string | null;
|
|
456
|
+
}>;
|
|
457
|
+
}>;
|
|
458
|
+
removeReviewer(params: {
|
|
459
|
+
projectId?: string;
|
|
460
|
+
taskId: string;
|
|
461
|
+
userId: string;
|
|
462
|
+
}): Promise<{
|
|
463
|
+
taskId: string;
|
|
464
|
+
reviewers: Array<{
|
|
465
|
+
userId: string;
|
|
466
|
+
name: string | null;
|
|
467
|
+
}>;
|
|
468
|
+
}>;
|
|
469
|
+
listProjectMembers(projectId?: string): Promise<Array<{
|
|
470
|
+
userId: string;
|
|
471
|
+
name: string | null;
|
|
472
|
+
email: string;
|
|
473
|
+
level: string;
|
|
474
|
+
}>>;
|
|
475
|
+
listProjects(): Promise<unknown[]>;
|
|
476
|
+
/**
|
|
477
|
+
* Resolve a project SLUG (as pasted in a `<project>/<card>` card path) to its
|
|
478
|
+
* id.
|
|
479
|
+
*
|
|
480
|
+
* Cached, because a slug→id mapping effectively never changes and this sits
|
|
481
|
+
* in front of an ordinary card lookup. A miss refetches once before failing,
|
|
482
|
+
* so a project created after the cache warmed still resolves.
|
|
483
|
+
*
|
|
484
|
+
* Throws naming the slug rather than falling back to the configured default
|
|
485
|
+
* project: the caller pasted a specific project, and silently answering about
|
|
486
|
+
* a different one is the worst possible outcome here.
|
|
487
|
+
*/
|
|
488
|
+
resolveProjectIdBySlug(slug: string): Promise<string>;
|
|
489
|
+
private refreshProjectSlugCache;
|
|
490
|
+
startBuild(taskId: string, projectId?: string): Promise<{
|
|
491
|
+
taskId: string;
|
|
492
|
+
status: string;
|
|
493
|
+
}>;
|
|
494
|
+
stopBuild(taskId: string, projectId?: string): Promise<{
|
|
495
|
+
taskId: string;
|
|
496
|
+
stopped: boolean;
|
|
497
|
+
}>;
|
|
498
|
+
sleepTask(taskId: string, projectId?: string): Promise<{
|
|
499
|
+
taskId: string;
|
|
500
|
+
codespaceStatus: string;
|
|
501
|
+
}>;
|
|
502
|
+
resumeTask(taskId: string, projectId?: string): Promise<{
|
|
503
|
+
status: string;
|
|
504
|
+
}>;
|
|
505
|
+
deleteTaskEnvironment(taskId: string, projectId?: string): Promise<{
|
|
506
|
+
taskId: string;
|
|
507
|
+
status: string;
|
|
508
|
+
}>;
|
|
509
|
+
getBuildStatus(taskId: string, projectId?: string): Promise<{
|
|
510
|
+
session: {
|
|
511
|
+
status: string | null;
|
|
512
|
+
agentRunnerStatus: string | null;
|
|
513
|
+
} | null;
|
|
514
|
+
}>;
|
|
515
|
+
getWorkspaceAttachInfo(taskId: string, sshPublicKey?: string): Promise<WorkspaceAttachInfo>;
|
|
516
|
+
getTaskChat(taskId: string, limit?: number, projectId?: string): Promise<unknown[]>;
|
|
517
|
+
postToTaskChat(taskId: string, content: string, projectId?: string): Promise<{
|
|
518
|
+
messageId: string;
|
|
519
|
+
}>;
|
|
520
|
+
getTaskCli(taskId: string, limit?: number, source?: string, projectId?: string): Promise<{
|
|
521
|
+
type: string;
|
|
522
|
+
data: Record<string, unknown>;
|
|
523
|
+
timestamp: string;
|
|
524
|
+
}[]>;
|
|
525
|
+
getTaskSessions(taskId: string, projectId?: string): Promise<Array<{
|
|
526
|
+
taskId: string;
|
|
527
|
+
slug: string;
|
|
528
|
+
title: string;
|
|
529
|
+
type: string;
|
|
530
|
+
status: string;
|
|
531
|
+
codeReviewStatus: string | null;
|
|
532
|
+
codeReviewAttempts: number;
|
|
533
|
+
workspaces: Array<{
|
|
534
|
+
id: string;
|
|
535
|
+
purpose: string;
|
|
536
|
+
desiredState: string;
|
|
537
|
+
observedState: string;
|
|
538
|
+
branch: string | null;
|
|
539
|
+
checkoutRef: string | null;
|
|
540
|
+
createdAt: string;
|
|
541
|
+
updatedAt: string;
|
|
542
|
+
pod: {
|
|
543
|
+
name: string;
|
|
544
|
+
namespace: string;
|
|
545
|
+
phase: string;
|
|
546
|
+
imageUri: string | null;
|
|
547
|
+
} | null;
|
|
548
|
+
sessions: Array<{
|
|
549
|
+
id: string;
|
|
550
|
+
role: string;
|
|
551
|
+
mode: string;
|
|
552
|
+
status: string;
|
|
553
|
+
userId: string;
|
|
554
|
+
leaseUntil: string | null;
|
|
555
|
+
createdAt: string;
|
|
556
|
+
}>;
|
|
557
|
+
}>;
|
|
558
|
+
sessions: Array<{
|
|
559
|
+
id: string;
|
|
560
|
+
provider: string;
|
|
561
|
+
instanceName: string | null;
|
|
562
|
+
status: string;
|
|
563
|
+
agentRunnerStatus: string | null;
|
|
564
|
+
lastHeartbeatAt: string | null;
|
|
565
|
+
agentRunningAt: string | null;
|
|
566
|
+
lastAgentEvent: string | null;
|
|
567
|
+
deletionRequestedAt: string | null;
|
|
568
|
+
deletionAttempts: number;
|
|
569
|
+
createdAt: string;
|
|
570
|
+
stoppedAt: string | null;
|
|
571
|
+
}>;
|
|
572
|
+
}>>;
|
|
573
|
+
listTags(projectId?: string): Promise<{
|
|
574
|
+
id: string;
|
|
575
|
+
name: string;
|
|
576
|
+
color: string;
|
|
577
|
+
description: string | null;
|
|
578
|
+
parentTagIds: string[];
|
|
579
|
+
childTagIds: string[];
|
|
580
|
+
hasOverview: boolean;
|
|
581
|
+
/** Files labelled as examples of the tag — read the tiles with list_tag_attachments. */
|
|
582
|
+
attachmentCount: number;
|
|
583
|
+
/** Rule/doc/file/folder links the tag wires into agent context; `[]` when none. */
|
|
584
|
+
contextPaths: ContextPathInput[];
|
|
585
|
+
}[]>;
|
|
586
|
+
getTag(params: {
|
|
587
|
+
projectId?: string;
|
|
588
|
+
tag: string;
|
|
589
|
+
}): Promise<unknown>;
|
|
590
|
+
/** One page of a tag's attachment gallery, newest label first. */
|
|
591
|
+
listTagAttachments(params: {
|
|
592
|
+
projectId?: string;
|
|
593
|
+
tag: string;
|
|
594
|
+
limit?: number;
|
|
595
|
+
offset?: number;
|
|
596
|
+
}): Promise<unknown>;
|
|
597
|
+
/** Replace the glossary tags on a file that is already uploaded. */
|
|
598
|
+
setFileTags(params: {
|
|
599
|
+
projectId?: string;
|
|
600
|
+
taskId: string;
|
|
601
|
+
fileId: string;
|
|
602
|
+
tags: string[];
|
|
603
|
+
}): Promise<{
|
|
604
|
+
fileId: string;
|
|
605
|
+
fileName: string;
|
|
606
|
+
appliedTags?: string[];
|
|
607
|
+
unknownTags?: string[];
|
|
608
|
+
}>;
|
|
609
|
+
getProjectSummary(projectId?: string): Promise<unknown>;
|
|
610
|
+
/** Effective account/project/board identity + capabilities for this token. */
|
|
611
|
+
getConnectionContext(projectId?: string): Promise<ConnectionContext>;
|
|
612
|
+
/** Layered verify-by-scope probe (auth → account → project → board →
|
|
613
|
+
* capabilities → read). Proves create/update on the intended board. */
|
|
614
|
+
verifyConnection(params?: {
|
|
615
|
+
projectId?: string;
|
|
616
|
+
intendedActions?: ConveyorCapability[];
|
|
617
|
+
}): Promise<VerifyConnectionResult>;
|
|
618
|
+
/** Boards under the connected project with id/name/slug/url/role/capabilities. */
|
|
619
|
+
listAccessibleSubprojects(projectId?: string): Promise<AccessibleSubproject[]>;
|
|
620
|
+
getOnboardingStatus(projectId?: string): Promise<OnboardingStatus>;
|
|
621
|
+
getOnboardingStep(projectId?: string): Promise<OnboardingStepReport>;
|
|
622
|
+
approveTask(taskId: string, projectId?: string, risk?: RiskLevel): Promise<{
|
|
623
|
+
status: string;
|
|
624
|
+
}>;
|
|
625
|
+
requestChanges(taskId: string, feedback: string, projectId?: string, risk?: RiskLevel): Promise<void>;
|
|
626
|
+
approveAndMergePR(childTaskId: string, projectId?: string): Promise<{
|
|
627
|
+
merged: boolean;
|
|
628
|
+
childTaskId: string;
|
|
629
|
+
prNumber: number;
|
|
630
|
+
}>;
|
|
631
|
+
listTaskFiles(taskId: string, projectId?: string): Promise<unknown[]>;
|
|
632
|
+
getAttachment(taskId: string, fileId: string, opts?: {
|
|
633
|
+
offset?: number;
|
|
634
|
+
maxBytes?: number;
|
|
635
|
+
projectId?: string;
|
|
636
|
+
}): Promise<unknown>;
|
|
637
|
+
requestFileUpload(taskId: string, params: {
|
|
638
|
+
fileName: string;
|
|
639
|
+
mimeType: string;
|
|
640
|
+
fileSize: number;
|
|
641
|
+
projectId?: string;
|
|
642
|
+
}): Promise<{
|
|
643
|
+
fileId: string;
|
|
644
|
+
uploadUrl: string;
|
|
645
|
+
}>;
|
|
646
|
+
confirmFileUpload(taskId: string, fileId: string, comment?: string, projectId?: string, tags?: string[]): Promise<{
|
|
647
|
+
fileId: string;
|
|
648
|
+
fileName: string;
|
|
649
|
+
downloadUrl?: string;
|
|
650
|
+
messageId?: string;
|
|
651
|
+
appliedTags?: string[];
|
|
652
|
+
unknownTags?: string[];
|
|
653
|
+
}>;
|
|
654
|
+
createRelease(taskIds?: string[], projectId?: string): Promise<{
|
|
655
|
+
taskId: string;
|
|
656
|
+
version: string;
|
|
657
|
+
}>;
|
|
658
|
+
addTasksToRelease(taskIds: string[], projectId?: string): Promise<{
|
|
659
|
+
releaseTaskId: string;
|
|
660
|
+
added: number;
|
|
661
|
+
releaseBranchUpdated: boolean;
|
|
662
|
+
}>;
|
|
663
|
+
createPullRequest(params: {
|
|
664
|
+
projectId?: string;
|
|
665
|
+
taskId: string;
|
|
666
|
+
title: string;
|
|
667
|
+
body: string;
|
|
668
|
+
head?: string;
|
|
669
|
+
base?: string;
|
|
670
|
+
}): Promise<{
|
|
671
|
+
prNumber: number;
|
|
672
|
+
prUrl: string;
|
|
673
|
+
}>;
|
|
674
|
+
createSubtask(params: {
|
|
675
|
+
projectId?: string;
|
|
676
|
+
parentTaskId: string;
|
|
677
|
+
title: string;
|
|
678
|
+
description?: string;
|
|
679
|
+
plan?: string;
|
|
680
|
+
ordinal?: number;
|
|
681
|
+
storyPointValue?: number;
|
|
682
|
+
followParentStatus?: boolean;
|
|
683
|
+
dependsOn?: string[];
|
|
684
|
+
tags?: string[];
|
|
685
|
+
}): Promise<{
|
|
686
|
+
id: string;
|
|
687
|
+
slug: string;
|
|
688
|
+
}>;
|
|
689
|
+
/**
|
|
690
|
+
* Move a card under a new parent, or detach it with an explicit null.
|
|
691
|
+
* `parentTaskId` rides the rest-spread rather than a conditional one so a
|
|
692
|
+
* null survives the call — stripping it would silently no-op a detach.
|
|
693
|
+
*/
|
|
694
|
+
setTaskParent(params: {
|
|
695
|
+
projectId?: string;
|
|
696
|
+
taskId: string;
|
|
697
|
+
parentTaskId: string | null;
|
|
698
|
+
ordinal?: number;
|
|
699
|
+
followParentStatus?: boolean;
|
|
700
|
+
}): Promise<SetTaskParentResult>;
|
|
701
|
+
updateSubtask(params: {
|
|
702
|
+
projectId?: string;
|
|
703
|
+
subtaskId: string;
|
|
704
|
+
title?: string;
|
|
705
|
+
description?: string;
|
|
706
|
+
plan?: string;
|
|
707
|
+
status?: string;
|
|
708
|
+
ordinal?: number;
|
|
709
|
+
storyPointValue?: number;
|
|
710
|
+
followParentStatus?: boolean;
|
|
711
|
+
dependsOn?: string[];
|
|
712
|
+
}): Promise<{
|
|
713
|
+
id: string;
|
|
714
|
+
status: string;
|
|
715
|
+
}>;
|
|
716
|
+
listSubtasks(taskId: string, projectId?: string): Promise<unknown[]>;
|
|
717
|
+
deleteSubtask(subtaskId: string, projectId?: string): Promise<{
|
|
718
|
+
deleted: boolean;
|
|
719
|
+
}>;
|
|
720
|
+
getDependencies(taskId: string, projectId?: string): Promise<unknown[]>;
|
|
721
|
+
addDependency(params: {
|
|
722
|
+
projectId?: string;
|
|
723
|
+
taskId: string;
|
|
724
|
+
dependsOnSlugOrId: string;
|
|
725
|
+
}): Promise<{
|
|
726
|
+
success: boolean;
|
|
727
|
+
}>;
|
|
728
|
+
removeDependency(params: {
|
|
729
|
+
projectId?: string;
|
|
730
|
+
taskId: string;
|
|
731
|
+
dependsOnSlugOrId: string;
|
|
732
|
+
}): Promise<{
|
|
733
|
+
success: boolean;
|
|
734
|
+
}>;
|
|
735
|
+
listManualTests(taskId: string, projectId?: string): Promise<Array<{
|
|
736
|
+
id: string;
|
|
737
|
+
type: string;
|
|
738
|
+
title: string;
|
|
739
|
+
ordinal: number;
|
|
740
|
+
createdAt: string;
|
|
741
|
+
checked: boolean;
|
|
742
|
+
failures: Array<{
|
|
743
|
+
userName: string | null;
|
|
744
|
+
reason: string | null;
|
|
745
|
+
createdAt: string;
|
|
746
|
+
}>;
|
|
747
|
+
}>>;
|
|
748
|
+
setManualTests(taskId: string, items: Array<{
|
|
749
|
+
title: string;
|
|
750
|
+
}>, projectId?: string): Promise<{
|
|
751
|
+
created: number;
|
|
752
|
+
skipped: number;
|
|
753
|
+
}>;
|
|
754
|
+
editManualTest(taskId: string, title: string, newTitle: string, projectId?: string): Promise<{
|
|
755
|
+
updated: boolean;
|
|
756
|
+
}>;
|
|
757
|
+
removeManualTest(taskId: string, title: string, projectId?: string): Promise<{
|
|
758
|
+
removed: boolean;
|
|
759
|
+
}>;
|
|
760
|
+
approveManualTest(taskId: string, title: string, projectId?: string): Promise<{
|
|
761
|
+
approved: boolean;
|
|
762
|
+
}>;
|
|
763
|
+
rejectManualTest(taskId: string, title: string, reason: string, projectId?: string): Promise<{
|
|
764
|
+
rejected: boolean;
|
|
765
|
+
}>;
|
|
766
|
+
queryManualTests(params: {
|
|
767
|
+
projectId?: string;
|
|
768
|
+
cardStatuses?: string[];
|
|
769
|
+
testStatuses?: Array<"open" | "approved" | "rejected">;
|
|
770
|
+
}): Promise<Array<{
|
|
771
|
+
taskId: string;
|
|
772
|
+
slug: string;
|
|
773
|
+
title: string;
|
|
774
|
+
status: string;
|
|
775
|
+
tests: Array<{
|
|
776
|
+
id: string;
|
|
777
|
+
title: string;
|
|
778
|
+
status: "open" | "approved" | "rejected";
|
|
779
|
+
failures: Array<{
|
|
780
|
+
userName: string | null;
|
|
781
|
+
reason: string | null;
|
|
782
|
+
createdAt: string;
|
|
783
|
+
}>;
|
|
784
|
+
}>;
|
|
785
|
+
}>>;
|
|
786
|
+
getConnectUrls(projectId?: string): Promise<ProjectConnectUrls>;
|
|
787
|
+
updateProjectConfig(params: {
|
|
788
|
+
projectId?: string;
|
|
789
|
+
name?: string;
|
|
790
|
+
description?: string;
|
|
791
|
+
settings?: Record<string, unknown>;
|
|
792
|
+
}): Promise<unknown>;
|
|
793
|
+
updateProjectAgentDefaults(params: {
|
|
794
|
+
projectId?: string;
|
|
795
|
+
defaultPmAgentId?: string | null;
|
|
796
|
+
defaultTaskAgentId?: string | null;
|
|
797
|
+
defaultReviewerAgentId?: string | null;
|
|
798
|
+
helperAgentId?: string | null;
|
|
799
|
+
}): Promise<unknown>;
|
|
800
|
+
listTagsDetailed(projectId?: string): Promise<TagSummary[]>;
|
|
801
|
+
createTag(params: {
|
|
802
|
+
projectId?: string;
|
|
803
|
+
name: string;
|
|
804
|
+
color?: string;
|
|
805
|
+
description?: string;
|
|
806
|
+
overview?: string;
|
|
807
|
+
/** Repo file to source the overview from (stored overview stays as the pending fallback). */
|
|
808
|
+
overviewPath?: string;
|
|
809
|
+
/** Parents to link at create time (multi-parent DAG). */
|
|
810
|
+
parentTagIds?: string[];
|
|
811
|
+
contextPaths?: ContextPathInput[];
|
|
812
|
+
}): Promise<{
|
|
813
|
+
id: string;
|
|
814
|
+
}>;
|
|
815
|
+
updateTag(params: {
|
|
816
|
+
id: string;
|
|
817
|
+
name?: string;
|
|
818
|
+
color?: string;
|
|
819
|
+
description?: string;
|
|
820
|
+
overview?: string | null;
|
|
821
|
+
/** Repo file to source the overview from; null clears back to the stored overview. */
|
|
822
|
+
overviewPath?: string | null;
|
|
823
|
+
parentTagIds?: string[];
|
|
824
|
+
reason?: string;
|
|
825
|
+
contextPaths?: ContextPathInput[];
|
|
826
|
+
}): Promise<unknown>;
|
|
827
|
+
deleteTag(id: string): Promise<unknown>;
|
|
828
|
+
previewTagMerge(params: {
|
|
829
|
+
sourceTagId: string;
|
|
830
|
+
targetTagId: string;
|
|
831
|
+
}): Promise<unknown>;
|
|
832
|
+
mergeTag(params: {
|
|
833
|
+
sourceTagId: string;
|
|
834
|
+
targetTagId: string;
|
|
835
|
+
reason?: string;
|
|
836
|
+
}): Promise<unknown>;
|
|
837
|
+
listPriorities(projectId?: string): Promise<PrioritySummary[]>;
|
|
838
|
+
createPriority(params: {
|
|
839
|
+
projectId?: string;
|
|
840
|
+
value: number;
|
|
841
|
+
name: string;
|
|
842
|
+
color: string;
|
|
843
|
+
description?: string;
|
|
844
|
+
}): Promise<{
|
|
845
|
+
id: string;
|
|
846
|
+
}>;
|
|
847
|
+
updatePriority(params: {
|
|
848
|
+
id: string;
|
|
849
|
+
value?: number;
|
|
850
|
+
name?: string;
|
|
851
|
+
color?: string;
|
|
852
|
+
description?: string;
|
|
853
|
+
}): Promise<unknown>;
|
|
854
|
+
deletePriority(id: string): Promise<unknown>;
|
|
855
|
+
createSuggestion(params: {
|
|
856
|
+
projectId?: string;
|
|
857
|
+
title: string;
|
|
858
|
+
description?: string;
|
|
859
|
+
tagNames?: string[];
|
|
860
|
+
}): Promise<{
|
|
861
|
+
id: string;
|
|
862
|
+
merged: boolean;
|
|
863
|
+
mergedIntoId?: string;
|
|
864
|
+
}>;
|
|
865
|
+
/**
|
|
866
|
+
* Poll target: returns the active cloud PTY session for a task once its ring
|
|
867
|
+
* buffer has frames. `sessionId` is resolved server-side from `taskId` (never
|
|
868
|
+
* accepted from the wire), preserving the one-active-session-per-task invariant.
|
|
869
|
+
*/
|
|
870
|
+
getActivePtySession(taskId: string): Promise<ActivePtySession>;
|
|
871
|
+
/** Fetch the ring-buffer snapshot for catch-up replay on (re)attach. */
|
|
872
|
+
ptyAttach(sessionId: string): Promise<PtyAttachSnapshot>;
|
|
873
|
+
/**
|
|
874
|
+
* Join the session room so `pty:data` frames are delivered. Uses the standard
|
|
875
|
+
* quickdraw-core subscribe envelope; "Read" is sufficient for output streaming.
|
|
876
|
+
*/
|
|
877
|
+
subscribeToSession(sessionId: string): void;
|
|
878
|
+
/** Relay a stdin chunk to the cloud PTY (raw utf8, fire-and-forget). */
|
|
879
|
+
ptyInput(sessionId: string, data: string): void;
|
|
880
|
+
/** Relay a terminal resize to the cloud PTY (fire-and-forget). */
|
|
881
|
+
ptyResize(sessionId: string, cols: number, rows: number): void;
|
|
882
|
+
/** Subscribe to raw PTY output frames. Returns an unsubscribe function. */
|
|
883
|
+
onPtyData(handler: (chunk: PtyDataChunk) => void): () => void;
|
|
884
|
+
/**
|
|
885
|
+
* Fetch one page of a project's live card collection.
|
|
886
|
+
*
|
|
887
|
+
* A cursor-less call also joins the scope room, which is what starts (or
|
|
888
|
+
* restarts, after a reconnect) delta delivery. Cursor-bearing calls are pure
|
|
889
|
+
* paging and join nothing, so always lead with the cursor-less call.
|
|
890
|
+
*/
|
|
891
|
+
subscribeToCardCollection(projectId: string, opts?: {
|
|
892
|
+
cursor?: string | null;
|
|
893
|
+
limit?: number;
|
|
894
|
+
}): Promise<CardCollectionPage>;
|
|
895
|
+
/**
|
|
896
|
+
* Listen for card collection deltas on a project scope. The event name is
|
|
897
|
+
* the room name by design — no id parsing client-side. Returns an
|
|
898
|
+
* unsubscribe function.
|
|
899
|
+
*/
|
|
900
|
+
onCardDelta(projectId: string, handler: (delta: CardCollectionDelta) => void): () => void;
|
|
901
|
+
/**
|
|
902
|
+
* Run `handler` on every reconnect of the underlying socket. A reconnect
|
|
903
|
+
* drops every room this socket had joined, so long-lived subscribers must
|
|
904
|
+
* re-subscribe and reconcile whatever they missed. Returns an unsubscribe
|
|
905
|
+
* function.
|
|
906
|
+
*/
|
|
907
|
+
onReconnect(handler: () => void): () => void;
|
|
908
|
+
disconnect(): void;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
export { type ActivePtySession as A, type CardCollectionPage as C, type PtyAttachSnapshot as P, type CardCollectionDelta as a, type CardCollectionItem as b, type PtyDataChunk as c, ConveyorConnection as d, type ConveyorMcpConfig as e };
|