@scarn/sdk 0.8.9 → 0.8.11
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-qy3508g1.js → chunk-cezmxzhe.js} +1 -1
- package/dist/{chunk-738k8p1c.js → chunk-p01z6gt9.js} +12 -1
- package/dist/{chunk-hpn4q02f.js → chunk-p6dt8nej.js} +1 -1
- package/dist/{chunk-npy0jxfg.js → chunk-r01zh5mv.js} +1 -1
- package/dist/{chunk-vmdn05vj.js → chunk-z9f92ayv.js} +67 -1
- package/dist/client.js +2 -2
- package/dist/contracts/automation-document/schema.d.ts +1 -1
- package/dist/defaults/index.js +2 -2
- package/dist/definitions/automations/automations-client.d.ts +13 -13
- package/dist/definitions/automations/index.js +2 -2
- package/dist/definitions/pipelines/index.js +2 -2
- package/dist/definitions/pipelines/pipeline-definitions-client.d.ts +10 -10
- package/dist/definitions/steps/index.js +2 -2
- package/dist/definitions/steps/step-definitions-client.d.ts +114 -114
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/sdk.gen.d.ts +33 -4
- package/dist/generated/types.gen.d.ts +3115 -1712
- package/dist/health-checks.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/push/index.js +4 -4
- package/dist/task-plane-client.d.ts +220 -104
- package/package.json +1 -1
package/dist/health-checks.d.ts
CHANGED
|
@@ -130,6 +130,7 @@ export type HealthChecksInput = HealthCheckInput[];
|
|
|
130
130
|
export declare const stepToolHealthCheckSchema: z.ZodObject<{
|
|
131
131
|
name: z.ZodOptional<z.ZodString>;
|
|
132
132
|
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
133
|
+
tool: z.ZodString;
|
|
133
134
|
kind: z.ZodDefault<z.ZodLiteral<"tool">>;
|
|
134
135
|
severity: z.ZodDefault<z.ZodEnum<{
|
|
135
136
|
required: "required";
|
|
@@ -137,12 +138,12 @@ export declare const stepToolHealthCheckSchema: z.ZodObject<{
|
|
|
137
138
|
}>>;
|
|
138
139
|
timeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
139
140
|
serialGroup: z.ZodOptional<z.ZodString>;
|
|
140
|
-
tool: z.ZodString;
|
|
141
141
|
}, z.core.$strict>;
|
|
142
142
|
/** The value of `defineStep({ healthChecks })`: `cli` and non-MCP `tool` checks. */
|
|
143
143
|
export declare const stepHealthChecksInputSchema: z.ZodArray<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
144
144
|
name: z.ZodOptional<z.ZodString>;
|
|
145
145
|
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
146
|
+
tool: z.ZodString;
|
|
146
147
|
kind: z.ZodDefault<z.ZodLiteral<"tool">>;
|
|
147
148
|
severity: z.ZodDefault<z.ZodEnum<{
|
|
148
149
|
required: "required";
|
|
@@ -150,7 +151,6 @@ export declare const stepHealthChecksInputSchema: z.ZodArray<z.ZodPreprocess<z.Z
|
|
|
150
151
|
}>>;
|
|
151
152
|
timeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
152
153
|
serialGroup: z.ZodOptional<z.ZodString>;
|
|
153
|
-
tool: z.ZodString;
|
|
154
154
|
}, z.core.$strict>, z.ZodObject<{
|
|
155
155
|
name: z.ZodOptional<z.ZodString>;
|
|
156
156
|
severity: z.ZodDefault<z.ZodEnum<{
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
WORK_ITEM_TOP_LEVEL_FIELDS,
|
|
10
10
|
createPipelineDefinitionsClient,
|
|
11
11
|
resolveWorkItemFieldPath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-cezmxzhe.js";
|
|
13
13
|
import {
|
|
14
14
|
after,
|
|
15
15
|
all,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
import {
|
|
63
63
|
createScarnClient,
|
|
64
64
|
createTaskPlaneClient
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-p01z6gt9.js";
|
|
66
66
|
import"./chunk-61jf8b6s.js";
|
|
67
67
|
import"./chunk-cnxaagfj.js";
|
|
68
68
|
import {
|
|
@@ -99,7 +99,7 @@ import {
|
|
|
99
99
|
resolveMcpChecks,
|
|
100
100
|
toStepHandle,
|
|
101
101
|
toStepSpec
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-p6dt8nej.js";
|
|
103
103
|
import {
|
|
104
104
|
collectEnvPlaceholderNames,
|
|
105
105
|
isEnvPlaceholderValue,
|
|
@@ -149,7 +149,7 @@ import {
|
|
|
149
149
|
WorkItemCommentDrafts,
|
|
150
150
|
WorkItemComments,
|
|
151
151
|
WorkItems
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-z9f92ayv.js";
|
|
153
153
|
import {
|
|
154
154
|
ARTIFACT_MARKER_SCHEME,
|
|
155
155
|
buildArtifactMarker,
|
package/dist/push/index.js
CHANGED
|
@@ -6,18 +6,18 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
AutomationsApiError,
|
|
8
8
|
createAutomationsClient
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-r01zh5mv.js";
|
|
10
10
|
import {
|
|
11
11
|
assertValidDefinitionSpecs
|
|
12
12
|
} from "../chunk-1yb2h6t9.js";
|
|
13
13
|
import {
|
|
14
14
|
PipelineDefinitionsApiError,
|
|
15
15
|
createPipelineDefinitionsClient
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-cezmxzhe.js";
|
|
17
17
|
import {
|
|
18
18
|
createStepDefinitionsClient,
|
|
19
19
|
toStepSpec
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-p6dt8nej.js";
|
|
21
21
|
import"../chunk-e1h021kq.js";
|
|
22
22
|
import"../chunk-63f90zky.js";
|
|
23
23
|
import"../chunk-jj9pezwb.js";
|
|
@@ -26,7 +26,7 @@ import"../chunk-5zsavw98.js";
|
|
|
26
26
|
import"../chunk-4ggr8af6.js";
|
|
27
27
|
import"../chunk-k4y5qt4y.js";
|
|
28
28
|
import"../chunk-xzx08r6y.js";
|
|
29
|
-
import"../chunk-
|
|
29
|
+
import"../chunk-z9f92ayv.js";
|
|
30
30
|
import"../chunk-ngy1fdcx.js";
|
|
31
31
|
import"../chunk-y2pv8d6a.js";
|
|
32
32
|
import"../chunk-01nfqm18.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TaskRuns } from "./generated/sdk.gen";
|
|
2
|
-
import type { GetApiTaskRunsByTaskRunIdLogsData, PostApiTaskRunsByTaskRunIdArtifactFailuresData, PostApiTaskRunsByTaskRunIdArtifactUploadUrlData, PostApiTaskRunsByTaskRunIdArtifactsData, PostApiTaskRunsByTaskRunIdCompletionsData, PostApiTaskRunsByTaskRunIdLogsData, PostApiTaskRunsByTaskRunIdSessionUploadUrlData, PostApiTaskRunsByTaskRunIdYieldsData, PostApiTaskRunsClaimsData } from "./generated/types.gen";
|
|
2
|
+
import type { GetApiTaskRunsByTaskRunIdLogsData, PostApiTaskRunsByTaskRunIdArtifactFailuresData, PostApiTaskRunsByTaskRunIdArtifactUploadUrlData, PostApiTaskRunsByTaskRunIdArtifactsData, PostApiTaskRunsByTaskRunIdBaseCommitData, PostApiTaskRunsByTaskRunIdCompletionsData, PostApiTaskRunsByTaskRunIdLogsData, PostApiTaskRunsByTaskRunIdSessionUploadUrlData, PostApiTaskRunsByTaskRunIdYieldsData, PostApiTaskRunsClaimsData } from "./generated/types.gen";
|
|
3
3
|
type TaskRunRef = {
|
|
4
4
|
taskRunId: string;
|
|
5
5
|
};
|
|
@@ -22,28 +22,29 @@ declare const buildTaskPlaneClient: (taskRuns: TaskRuns) => {
|
|
|
22
22
|
number: number;
|
|
23
23
|
reason: "initial" | "retry" | "continuation";
|
|
24
24
|
projectId: string;
|
|
25
|
-
workItemId: string;
|
|
26
|
-
taskExecutionConfigId: string |
|
|
27
|
-
name: string |
|
|
25
|
+
workItemId: string | null;
|
|
26
|
+
taskExecutionConfigId: string | null;
|
|
27
|
+
name: string | null;
|
|
28
28
|
kind: "agent" | "code";
|
|
29
|
-
previousTaskRunId: string |
|
|
30
|
-
baseBranch: string |
|
|
31
|
-
|
|
29
|
+
previousTaskRunId: string | null;
|
|
30
|
+
baseBranch: string | null;
|
|
31
|
+
baseCommit: string | null;
|
|
32
|
+
heartbeatSeconds: number | null;
|
|
32
33
|
status: "pending" | "queued" | "running" | "succeeded" | "failed" | "timeout" | "abandoned" | "cancelled" | "skipped" | "yielded";
|
|
33
|
-
inputJson: unknown;
|
|
34
|
-
claimedBy: string |
|
|
35
|
-
claimedAt: string |
|
|
36
|
-
lastHeartbeatAt: string |
|
|
37
|
-
leaseExpiresAt: string |
|
|
38
|
-
executionTimeoutSeconds: number |
|
|
39
|
-
executionDeadlineAt: string |
|
|
40
|
-
startedAt: string |
|
|
41
|
-
completedAt: string |
|
|
42
|
-
resultJson: unknown;
|
|
43
|
-
errorJson: unknown;
|
|
44
|
-
workBranch: string |
|
|
45
|
-
createdFromBranch: string |
|
|
46
|
-
sessionRestored: boolean |
|
|
34
|
+
inputJson: unknown | null;
|
|
35
|
+
claimedBy: string | null;
|
|
36
|
+
claimedAt: string | null;
|
|
37
|
+
lastHeartbeatAt: string | null;
|
|
38
|
+
leaseExpiresAt: string | null;
|
|
39
|
+
executionTimeoutSeconds: number | null;
|
|
40
|
+
executionDeadlineAt: string | null;
|
|
41
|
+
startedAt: string | null;
|
|
42
|
+
completedAt: string | null;
|
|
43
|
+
resultJson: unknown | null;
|
|
44
|
+
errorJson: unknown | null;
|
|
45
|
+
workBranch: string | null;
|
|
46
|
+
createdFromBranch: string | null;
|
|
47
|
+
sessionRestored: boolean | null;
|
|
47
48
|
createdAt: string;
|
|
48
49
|
updatedAt: string;
|
|
49
50
|
};
|
|
@@ -59,35 +60,36 @@ declare const buildTaskPlaneClient: (taskRuns: TaskRuns) => {
|
|
|
59
60
|
number: number;
|
|
60
61
|
reason: "initial" | "retry" | "continuation";
|
|
61
62
|
projectId: string;
|
|
62
|
-
workItemId: string;
|
|
63
|
-
taskExecutionConfigId: string |
|
|
64
|
-
name: string |
|
|
63
|
+
workItemId: string | null;
|
|
64
|
+
taskExecutionConfigId: string | null;
|
|
65
|
+
name: string | null;
|
|
65
66
|
kind: "agent" | "code";
|
|
66
|
-
previousTaskRunId: string |
|
|
67
|
-
baseBranch: string |
|
|
68
|
-
|
|
67
|
+
previousTaskRunId: string | null;
|
|
68
|
+
baseBranch: string | null;
|
|
69
|
+
baseCommit: string | null;
|
|
70
|
+
heartbeatSeconds: number | null;
|
|
69
71
|
status: "pending" | "queued" | "running" | "succeeded" | "failed" | "timeout" | "abandoned" | "cancelled" | "skipped" | "yielded";
|
|
70
|
-
inputJson: unknown;
|
|
71
|
-
claimedBy: string |
|
|
72
|
-
claimedAt: string |
|
|
73
|
-
lastHeartbeatAt: string |
|
|
74
|
-
leaseExpiresAt: string |
|
|
75
|
-
executionTimeoutSeconds: number |
|
|
76
|
-
executionDeadlineAt: string |
|
|
77
|
-
startedAt: string |
|
|
78
|
-
completedAt: string |
|
|
79
|
-
resultJson: unknown;
|
|
80
|
-
errorJson: unknown;
|
|
81
|
-
workBranch: string |
|
|
82
|
-
createdFromBranch: string |
|
|
83
|
-
sessionRestored: boolean |
|
|
72
|
+
inputJson: unknown | null;
|
|
73
|
+
claimedBy: string | null;
|
|
74
|
+
claimedAt: string | null;
|
|
75
|
+
lastHeartbeatAt: string | null;
|
|
76
|
+
leaseExpiresAt: string | null;
|
|
77
|
+
executionTimeoutSeconds: number | null;
|
|
78
|
+
executionDeadlineAt: string | null;
|
|
79
|
+
startedAt: string | null;
|
|
80
|
+
completedAt: string | null;
|
|
81
|
+
resultJson: unknown | null;
|
|
82
|
+
errorJson: unknown | null;
|
|
83
|
+
workBranch: string | null;
|
|
84
|
+
createdFromBranch: string | null;
|
|
85
|
+
sessionRestored: boolean | null;
|
|
84
86
|
createdAt: string;
|
|
85
87
|
updatedAt: string;
|
|
86
88
|
}>;
|
|
87
89
|
/** Not unwrapped: callers read `error.status` (e.g. a 402 read quota). */
|
|
88
90
|
getTaskLogArchive: ({ taskRunId }: TaskRunRef) => Promise<({
|
|
89
91
|
data: {
|
|
90
|
-
url: string |
|
|
92
|
+
url: string | null;
|
|
91
93
|
sizeBytes: number;
|
|
92
94
|
};
|
|
93
95
|
error: undefined;
|
|
@@ -288,9 +290,10 @@ declare const buildTaskPlaneClient: (taskRuns: TaskRuns) => {
|
|
|
288
290
|
claimToken: string;
|
|
289
291
|
}) => Promise<{
|
|
290
292
|
projectId: string;
|
|
291
|
-
projectPath: string |
|
|
293
|
+
projectPath: string | null;
|
|
292
294
|
gitUrl: string;
|
|
293
|
-
baseWorkBranch: string |
|
|
295
|
+
baseWorkBranch: string | null;
|
|
296
|
+
baseCommit: string | null;
|
|
294
297
|
projectOpencodeConfig: {
|
|
295
298
|
relativePath: string;
|
|
296
299
|
present: boolean;
|
|
@@ -298,13 +301,13 @@ declare const buildTaskPlaneClient: (taskRuns: TaskRuns) => {
|
|
|
298
301
|
name: string;
|
|
299
302
|
description: string;
|
|
300
303
|
run: string;
|
|
301
|
-
cwd: string |
|
|
304
|
+
cwd: string | null;
|
|
302
305
|
}>;
|
|
303
306
|
services: Array<{
|
|
304
307
|
name: string;
|
|
305
308
|
description: string;
|
|
306
309
|
run: string;
|
|
307
|
-
cwd: string |
|
|
310
|
+
cwd: string | null;
|
|
308
311
|
dependsOn: Array<string>;
|
|
309
312
|
expose: {
|
|
310
313
|
targetPort: number;
|
|
@@ -318,86 +321,87 @@ declare const buildTaskPlaneClient: (taskRuns: TaskRuns) => {
|
|
|
318
321
|
kind: "agent" | "code";
|
|
319
322
|
key: string;
|
|
320
323
|
name: string;
|
|
321
|
-
inputJson: unknown;
|
|
322
|
-
executionTimeoutSeconds: number |
|
|
323
|
-
prompt: string |
|
|
324
|
+
inputJson: unknown | null;
|
|
325
|
+
executionTimeoutSeconds: number | null;
|
|
326
|
+
prompt: string | null;
|
|
324
327
|
entrypointJson: {
|
|
325
328
|
sourceFile: string;
|
|
326
|
-
} |
|
|
329
|
+
} | null;
|
|
327
330
|
resultSchemaJson: {
|
|
328
331
|
[key: string]: unknown;
|
|
329
|
-
} |
|
|
330
|
-
turnsRemaining: number |
|
|
331
|
-
workItemId: string;
|
|
332
|
+
} | null;
|
|
333
|
+
turnsRemaining: number | null;
|
|
334
|
+
workItemId: string | null;
|
|
335
|
+
conversationId: string | null;
|
|
332
336
|
grants: Array<{
|
|
333
|
-
resource:
|
|
334
|
-
action:
|
|
337
|
+
resource: "workItem";
|
|
338
|
+
action: "read";
|
|
335
339
|
scope: "self" | "children" | "project";
|
|
336
340
|
} | {
|
|
337
|
-
resource:
|
|
338
|
-
action:
|
|
341
|
+
resource: "workItem";
|
|
342
|
+
action: "update";
|
|
339
343
|
scope: "self" | "children";
|
|
340
344
|
} | {
|
|
341
|
-
resource:
|
|
342
|
-
action:
|
|
345
|
+
resource: "workItem";
|
|
346
|
+
action: "comment";
|
|
343
347
|
scope: "self" | "children";
|
|
344
348
|
} | {
|
|
345
|
-
resource:
|
|
346
|
-
action:
|
|
349
|
+
resource: "workItem";
|
|
350
|
+
action: "label";
|
|
347
351
|
scope: "self" | "children";
|
|
348
352
|
labels: Array<string>;
|
|
349
353
|
} | {
|
|
350
|
-
resource:
|
|
351
|
-
action:
|
|
354
|
+
resource: "workItem";
|
|
355
|
+
action: "block";
|
|
352
356
|
scope: "self" | "children";
|
|
353
357
|
} | {
|
|
354
|
-
resource:
|
|
355
|
-
action:
|
|
358
|
+
resource: "workItem";
|
|
359
|
+
action: "close";
|
|
356
360
|
scope: "self" | "children";
|
|
357
361
|
} | {
|
|
358
|
-
resource:
|
|
359
|
-
action:
|
|
360
|
-
scope:
|
|
362
|
+
resource: "workItem";
|
|
363
|
+
action: "create";
|
|
364
|
+
scope: "children";
|
|
361
365
|
labels: Array<string>;
|
|
362
366
|
}>;
|
|
363
367
|
};
|
|
364
368
|
runtime: {
|
|
365
369
|
executionMode: "workspace" | "no_workspace";
|
|
366
|
-
devcontainerConfigPath: string |
|
|
367
|
-
managedRuntime: "bun1" | "node24" |
|
|
370
|
+
devcontainerConfigPath: string | null;
|
|
371
|
+
managedRuntime: "bun1" | "node24" | null;
|
|
368
372
|
repo: {
|
|
369
|
-
mode:
|
|
373
|
+
mode: "none";
|
|
370
374
|
} | {
|
|
371
|
-
mode:
|
|
375
|
+
mode: "readOnly";
|
|
372
376
|
gitCredentials: "auto" | "none";
|
|
373
377
|
} | {
|
|
374
|
-
mode:
|
|
375
|
-
message: string |
|
|
378
|
+
mode: "readWrite";
|
|
379
|
+
message: string | null;
|
|
376
380
|
onPushFailure: "fail" | "warn";
|
|
377
381
|
gitCredentials: "auto" | "none";
|
|
378
382
|
};
|
|
379
383
|
envJson: Array<{
|
|
380
384
|
name: string;
|
|
381
|
-
source:
|
|
385
|
+
source: "value";
|
|
382
386
|
value: string;
|
|
383
387
|
secret: boolean;
|
|
384
388
|
applies: "agent" | "setup" | "both";
|
|
385
389
|
} | {
|
|
386
390
|
name: string;
|
|
387
|
-
source:
|
|
391
|
+
source: "inherit";
|
|
388
392
|
from: string;
|
|
389
393
|
secret: boolean;
|
|
390
394
|
optional: boolean;
|
|
391
395
|
default?: string;
|
|
392
396
|
mcp?: string;
|
|
393
397
|
applies: "agent" | "setup" | "both";
|
|
394
|
-
}> |
|
|
398
|
+
}> | null;
|
|
395
399
|
healthChecksJson: Array<{
|
|
396
400
|
name?: string;
|
|
397
401
|
severity: "required" | "warn";
|
|
398
402
|
timeoutSeconds: number;
|
|
399
403
|
serialGroup?: string;
|
|
400
|
-
kind:
|
|
404
|
+
kind: "tool";
|
|
401
405
|
tool: string;
|
|
402
406
|
mcp?: string;
|
|
403
407
|
args?: {
|
|
@@ -408,13 +412,13 @@ declare const buildTaskPlaneClient: (taskRuns: TaskRuns) => {
|
|
|
408
412
|
severity: "required" | "warn";
|
|
409
413
|
timeoutSeconds: number;
|
|
410
414
|
serialGroup?: string;
|
|
411
|
-
kind:
|
|
415
|
+
kind: "cli";
|
|
412
416
|
command: Array<string>;
|
|
413
417
|
expectExitCode: number;
|
|
414
|
-
}> |
|
|
418
|
+
}> | null;
|
|
415
419
|
opencodeMcpJson: {
|
|
416
420
|
[key: string]: {
|
|
417
|
-
type:
|
|
421
|
+
type: "local";
|
|
418
422
|
command: Array<string>;
|
|
419
423
|
cwd?: string;
|
|
420
424
|
environment?: {
|
|
@@ -429,7 +433,7 @@ declare const buildTaskPlaneClient: (taskRuns: TaskRuns) => {
|
|
|
429
433
|
};
|
|
430
434
|
protocol?: "legacy" | "auto" | "2026-07-28";
|
|
431
435
|
} | {
|
|
432
|
-
type:
|
|
436
|
+
type: "remote";
|
|
433
437
|
url: string;
|
|
434
438
|
headers?: {
|
|
435
439
|
[key: string]: string;
|
|
@@ -441,7 +445,7 @@ declare const buildTaskPlaneClient: (taskRuns: TaskRuns) => {
|
|
|
441
445
|
callback_port?: number;
|
|
442
446
|
redirect_uri?: string;
|
|
443
447
|
auth_server_metadata_url?: string;
|
|
444
|
-
} |
|
|
448
|
+
} | false;
|
|
445
449
|
disabled?: boolean;
|
|
446
450
|
codemode?: boolean;
|
|
447
451
|
timeout?: {
|
|
@@ -451,7 +455,7 @@ declare const buildTaskPlaneClient: (taskRuns: TaskRuns) => {
|
|
|
451
455
|
};
|
|
452
456
|
protocol?: "legacy" | "auto" | "2026-07-28";
|
|
453
457
|
} | {
|
|
454
|
-
type:
|
|
458
|
+
type: "ref";
|
|
455
459
|
name?: string;
|
|
456
460
|
disabled?: boolean;
|
|
457
461
|
codemode?: boolean;
|
|
@@ -462,7 +466,7 @@ declare const buildTaskPlaneClient: (taskRuns: TaskRuns) => {
|
|
|
462
466
|
};
|
|
463
467
|
protocol?: "legacy" | "auto" | "2026-07-28";
|
|
464
468
|
};
|
|
465
|
-
} |
|
|
469
|
+
} | null;
|
|
466
470
|
};
|
|
467
471
|
agentPrompt: {
|
|
468
472
|
sessionTitle: string;
|
|
@@ -474,12 +478,17 @@ declare const buildTaskPlaneClient: (taskRuns: TaskRuns) => {
|
|
|
474
478
|
status: "pending" | "queued" | "running" | "succeeded" | "failed" | "timeout" | "abandoned" | "cancelled" | "skipped" | "yielded";
|
|
475
479
|
transcriptRelativePath: string;
|
|
476
480
|
findingsRelativePath: string;
|
|
477
|
-
findingsJson: unknown;
|
|
478
|
-
} |
|
|
481
|
+
findingsJson: unknown | null;
|
|
482
|
+
} | null;
|
|
479
483
|
restoreSession: {
|
|
480
484
|
downloadUrl: string;
|
|
481
485
|
message: string;
|
|
482
|
-
} |
|
|
486
|
+
} | null;
|
|
487
|
+
}>;
|
|
488
|
+
/** Pins the run's commit (first report wins); returns the stored values. */
|
|
489
|
+
reportTaskRunBaseCommit: ({ taskRunId, ...body }: TaskRunRef & PostApiTaskRunsByTaskRunIdBaseCommitData["body"]) => Promise<{
|
|
490
|
+
baseCommit: string;
|
|
491
|
+
baseBranch: string | null;
|
|
483
492
|
}>;
|
|
484
493
|
readTaskRunWorkItem: ({ taskRunId, ...body }: TaskRunRef & {
|
|
485
494
|
claimToken: string;
|
|
@@ -488,37 +497,51 @@ declare const buildTaskPlaneClient: (taskRuns: TaskRuns) => {
|
|
|
488
497
|
id: string;
|
|
489
498
|
title: string;
|
|
490
499
|
labels: Array<string>;
|
|
491
|
-
description: string |
|
|
500
|
+
description: string | null;
|
|
492
501
|
descriptionVersion: number;
|
|
493
502
|
fields: {
|
|
494
503
|
[key: string]: unknown;
|
|
495
504
|
};
|
|
496
505
|
platform: "jira" | "github" | "bitbucket" | "linear" | "scarn" | "custom";
|
|
497
506
|
platformKey: string;
|
|
498
|
-
parentWorkItemId: string |
|
|
507
|
+
parentWorkItemId: string | null;
|
|
499
508
|
state: "open" | "closed";
|
|
500
|
-
closeReason: "completed" | "out_of_scope" | "superseded" |
|
|
501
|
-
resolution: string |
|
|
509
|
+
closeReason: "completed" | "out_of_scope" | "superseded" | null;
|
|
510
|
+
resolution: string | null;
|
|
502
511
|
blockers: Array<{
|
|
503
512
|
id: string;
|
|
504
513
|
title: string;
|
|
505
514
|
state: "open" | "closed";
|
|
506
515
|
labels: Array<string>;
|
|
507
|
-
closeReason: "completed" | "out_of_scope" | "superseded" |
|
|
508
|
-
resolution: string |
|
|
516
|
+
closeReason: "completed" | "out_of_scope" | "superseded" | null;
|
|
517
|
+
resolution: string | null;
|
|
509
518
|
blockedBy: Array<string>;
|
|
510
|
-
latestTaskStatus: "waiting_for_concurrency_slot" | "waiting_for_work" | "queued" | "running" | "waiting_for_person" | "succeeded" | "failed" | "cancelled" |
|
|
519
|
+
latestTaskStatus: "waiting_for_concurrency_slot" | "waiting_for_work" | "queued" | "running" | "waiting_for_person" | "succeeded" | "failed" | "cancelled" | null;
|
|
511
520
|
}>;
|
|
512
521
|
children: Array<{
|
|
513
522
|
id: string;
|
|
514
523
|
title: string;
|
|
515
524
|
state: "open" | "closed";
|
|
516
525
|
labels: Array<string>;
|
|
517
|
-
closeReason: "completed" | "out_of_scope" | "superseded" |
|
|
518
|
-
resolution: string |
|
|
526
|
+
closeReason: "completed" | "out_of_scope" | "superseded" | null;
|
|
527
|
+
resolution: string | null;
|
|
519
528
|
blockedBy: Array<string>;
|
|
520
|
-
latestTaskStatus: "waiting_for_concurrency_slot" | "waiting_for_work" | "queued" | "running" | "waiting_for_person" | "succeeded" | "failed" | "cancelled" |
|
|
529
|
+
latestTaskStatus: "waiting_for_concurrency_slot" | "waiting_for_work" | "queued" | "running" | "waiting_for_person" | "succeeded" | "failed" | "cancelled" | null;
|
|
521
530
|
}>;
|
|
531
|
+
comments: {
|
|
532
|
+
items: Array<{
|
|
533
|
+
id: string;
|
|
534
|
+
parentCommentId: string | null;
|
|
535
|
+
body: string;
|
|
536
|
+
authorKind: "user" | "agent";
|
|
537
|
+
authorName: string;
|
|
538
|
+
isPinned: boolean;
|
|
539
|
+
createdAt: string;
|
|
540
|
+
updatedAt: string;
|
|
541
|
+
}>;
|
|
542
|
+
totalCount: number;
|
|
543
|
+
nextCursor: string | null;
|
|
544
|
+
};
|
|
522
545
|
}>;
|
|
523
546
|
completeTaskRun: ({ taskRunId, ...body }: TaskRunRef & Omit<CompletionBody, "status">) => Promise<void>;
|
|
524
547
|
failTaskRun: ({ taskRunId, ...body }: TaskRunRef & Omit<CompletionBody, "status" | "workBranch" | "createdFromBranch">) => Promise<void>;
|
|
@@ -544,19 +567,112 @@ declare const buildTaskPlaneClient: (taskRuns: TaskRuns) => {
|
|
|
544
567
|
taskRunId: string;
|
|
545
568
|
projectId: string;
|
|
546
569
|
relativeStorePath: string;
|
|
547
|
-
storeRef: string |
|
|
548
|
-
objectKey: string |
|
|
549
|
-
sizeBytes: number |
|
|
550
|
-
contentType: string |
|
|
570
|
+
storeRef: string | null;
|
|
571
|
+
objectKey: string | null;
|
|
572
|
+
sizeBytes: number | null;
|
|
573
|
+
contentType: string | null;
|
|
551
574
|
kind: "generic" | "playwright-trace" | "video" | "image";
|
|
552
575
|
createdAt: string;
|
|
553
576
|
}[]>;
|
|
577
|
+
/** Not unwrapped: callers read `response.status` (404 = push unavailable). */
|
|
578
|
+
issueWorkSignalToken: ({ projectId, workerId, }: {
|
|
579
|
+
projectId: string;
|
|
580
|
+
workerId?: string | undefined;
|
|
581
|
+
}) => Promise<({
|
|
582
|
+
data: {
|
|
583
|
+
url: string;
|
|
584
|
+
token: string;
|
|
585
|
+
expiresAt: string;
|
|
586
|
+
};
|
|
587
|
+
error: undefined;
|
|
588
|
+
} | {
|
|
589
|
+
data: undefined;
|
|
590
|
+
error: {
|
|
591
|
+
type: string;
|
|
592
|
+
title: string;
|
|
593
|
+
status: number;
|
|
594
|
+
detail?: string;
|
|
595
|
+
instance?: string;
|
|
596
|
+
code?: string;
|
|
597
|
+
errors?: Array<{
|
|
598
|
+
path: string;
|
|
599
|
+
message: string;
|
|
600
|
+
summary?: string;
|
|
601
|
+
}>;
|
|
602
|
+
meta?: {
|
|
603
|
+
[key: string]: unknown;
|
|
604
|
+
};
|
|
605
|
+
} | {
|
|
606
|
+
type: string;
|
|
607
|
+
title: string;
|
|
608
|
+
status: number;
|
|
609
|
+
detail?: string;
|
|
610
|
+
instance?: string;
|
|
611
|
+
code?: string;
|
|
612
|
+
errors?: Array<{
|
|
613
|
+
path: string;
|
|
614
|
+
message: string;
|
|
615
|
+
summary?: string;
|
|
616
|
+
}>;
|
|
617
|
+
meta?: {
|
|
618
|
+
[key: string]: unknown;
|
|
619
|
+
};
|
|
620
|
+
} | {
|
|
621
|
+
type: string;
|
|
622
|
+
title: string;
|
|
623
|
+
status: number;
|
|
624
|
+
detail?: string;
|
|
625
|
+
instance?: string;
|
|
626
|
+
code?: string;
|
|
627
|
+
errors?: Array<{
|
|
628
|
+
path: string;
|
|
629
|
+
message: string;
|
|
630
|
+
summary?: string;
|
|
631
|
+
}>;
|
|
632
|
+
meta?: {
|
|
633
|
+
[key: string]: unknown;
|
|
634
|
+
};
|
|
635
|
+
} | {
|
|
636
|
+
type: string;
|
|
637
|
+
title: string;
|
|
638
|
+
status: number;
|
|
639
|
+
detail?: string;
|
|
640
|
+
instance?: string;
|
|
641
|
+
code?: string;
|
|
642
|
+
errors?: Array<{
|
|
643
|
+
path: string;
|
|
644
|
+
message: string;
|
|
645
|
+
summary?: string;
|
|
646
|
+
}>;
|
|
647
|
+
meta?: {
|
|
648
|
+
[key: string]: unknown;
|
|
649
|
+
};
|
|
650
|
+
} | {
|
|
651
|
+
type: string;
|
|
652
|
+
title: string;
|
|
653
|
+
status: number;
|
|
654
|
+
detail?: string;
|
|
655
|
+
instance?: string;
|
|
656
|
+
code?: string;
|
|
657
|
+
errors?: Array<{
|
|
658
|
+
path: string;
|
|
659
|
+
message: string;
|
|
660
|
+
summary?: string;
|
|
661
|
+
}>;
|
|
662
|
+
meta?: {
|
|
663
|
+
[key: string]: unknown;
|
|
664
|
+
};
|
|
665
|
+
};
|
|
666
|
+
}) & {
|
|
667
|
+
request: Request;
|
|
668
|
+
response: Response;
|
|
669
|
+
}>;
|
|
554
670
|
getArtifactDownloadUrl: ({ taskRunId, artifactId, }: TaskRunRef & {
|
|
555
671
|
artifactId: string;
|
|
556
672
|
}) => Promise<{
|
|
557
|
-
url: string |
|
|
673
|
+
url: string | null;
|
|
558
674
|
sizeBytes: number;
|
|
559
|
-
contentType: string |
|
|
675
|
+
contentType: string | null;
|
|
560
676
|
relativeStorePath: string;
|
|
561
677
|
}>;
|
|
562
678
|
};
|