@kitman-sh/sdk 0.10.68 → 0.10.70
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/build/index.js +2 -2
- package/dist/{chunk-x37rn3aw.js → chunk-5qeam2w1.js} +17 -2
- package/dist/{chunk-dnmb9dw9.js → chunk-kjkn6d60.js} +23 -5
- package/dist/loop/index.js +1 -1
- package/dist/program/index.js +2 -2
- package/package.json +1 -1
- package/types/packages/core/src/change-request-review.d.ts +8 -0
- package/types/packages/core/src/loop.d.ts +72 -0
- package/types/packages/core/src/my-teams.d.ts +56 -0
- package/types/packages/core/src/run-display.d.ts +5 -1
- package/types/packages/live/src/rpc/runner-client.d.ts +25 -0
- package/types/packages/live/src/rpc/runner-group.d.ts +42 -0
- package/types/packages/sdk/src/loop/activities.d.ts +31 -0
- package/types/packages/sdk/src/loop/steps.d.ts +4 -0
- package/types/packages/sdk/src/loop/test-loop.d.ts +13 -1
- package/types/packages/sdk/src/program/engine.d.ts +1 -0
package/dist/build/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
KitDigest,
|
|
5
5
|
AgentDeclaration,
|
|
6
6
|
KitDeclarations
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-kjkn6d60.js";
|
|
8
8
|
import {
|
|
9
9
|
digestSha256,
|
|
10
10
|
digestSha512,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
RunnerRpcProtocolVersion,
|
|
14
14
|
describeFlag2,
|
|
15
15
|
Described2
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-5qeam2w1.js";
|
|
17
17
|
|
|
18
18
|
// packages/core/src/json.ts
|
|
19
19
|
import * as Schema from "effect/Schema";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
executeLoop2,
|
|
34
34
|
LoopCheckError2,
|
|
35
35
|
checkLoop2
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-kjkn6d60.js";
|
|
37
37
|
// packages/core/src/agent-environment.ts
|
|
38
38
|
import * as Schema from "effect/Schema";
|
|
39
39
|
var AgentEnvironmentPolicy = Schema.Union([Schema.Literal("recommended"), Schema.Literal("required")]);
|
|
@@ -909,6 +909,7 @@ class RunnerCapabilityRpcs extends RpcGroup.make(Rpc.make("PutQuestion", {
|
|
|
909
909
|
revision: Schema7.optionalKey(Schema7.String),
|
|
910
910
|
checks: Schema7.optional(Schema7.Array(Schema7.String)),
|
|
911
911
|
suggested: Schema7.optionalKey(Schema7.Array(ApprovedCheck)),
|
|
912
|
+
rerunFailed: Schema7.optionalKey(Schema7.Boolean),
|
|
912
913
|
measure: Schema7.optionalKey(Schema7.Struct({
|
|
913
914
|
base: Schema7.optionalKey(Schema7.String),
|
|
914
915
|
plan: MeasurePlan2,
|
|
@@ -1050,7 +1051,19 @@ class RunnerCapabilityRpcs extends RpcGroup.make(Rpc.make("PutQuestion", {
|
|
|
1050
1051
|
logTail: Schema7.optionalKey(Schema7.String)
|
|
1051
1052
|
})),
|
|
1052
1053
|
readAt: Schema7.optionalKey(Schema7.String),
|
|
1053
|
-
runnerChecks: Schema7.optionalKey(Schema7.Array(Schema7.String))
|
|
1054
|
+
runnerChecks: Schema7.optionalKey(Schema7.Array(Schema7.String)),
|
|
1055
|
+
approved: Schema7.optionalKey(Schema7.String),
|
|
1056
|
+
repository: Schema7.optionalKey(Schema7.String),
|
|
1057
|
+
target: Schema7.optionalKey(Schema7.Struct({
|
|
1058
|
+
branch: Schema7.String,
|
|
1059
|
+
head: Schema7.String,
|
|
1060
|
+
jobs: Schema7.Array(Schema7.Struct({
|
|
1061
|
+
name: Schema7.String,
|
|
1062
|
+
status: Schema7.Literals(["running", "success", "failed", "skipped"]),
|
|
1063
|
+
url: Schema7.optionalKey(Schema7.String),
|
|
1064
|
+
logTail: Schema7.optionalKey(Schema7.String)
|
|
1065
|
+
}))
|
|
1066
|
+
}))
|
|
1054
1067
|
}),
|
|
1055
1068
|
error: RunnerRpcError
|
|
1056
1069
|
}), Rpc.make("ReportPipeline", {
|
|
@@ -1402,6 +1415,7 @@ var runnerHost = (capabilities) => ({
|
|
|
1402
1415
|
...launch.revision === undefined ? undefined : { revision: launch.revision },
|
|
1403
1416
|
...launch.checks === undefined ? undefined : { checks: launch.checks },
|
|
1404
1417
|
...launch.suggested === undefined ? undefined : { suggested: launch.suggested },
|
|
1418
|
+
...launch.rerunFailed === undefined ? undefined : { rerunFailed: launch.rerunFailed },
|
|
1405
1419
|
...launch.measure === undefined ? undefined : { measure: launch.measure }
|
|
1406
1420
|
})).pipe(Effect2.asVoid),
|
|
1407
1421
|
startAgentWork: (launch) => requested2(launch.step, capabilities.startAgentStep({
|
|
@@ -1625,6 +1639,7 @@ var rpcProgramPorts2 = (rpc, work) => {
|
|
|
1625
1639
|
...verification.revision === undefined ? undefined : { revision: verification.revision },
|
|
1626
1640
|
...verification.checks === undefined ? undefined : { checks: [...verification.checks] },
|
|
1627
1641
|
...verification.suggested === undefined ? undefined : { suggested: [...verification.suggested] },
|
|
1642
|
+
...verification.rerunFailed === undefined ? undefined : { rerunFailed: verification.rerunFailed },
|
|
1628
1643
|
...verification.measure === undefined ? undefined : { measure: verification.measure }
|
|
1629
1644
|
}),
|
|
1630
1645
|
startAgentStep: ({ secrets, ...step }) => rpc.startAgentStep({ lease, ...step, ...secrets === undefined ? undefined : { secrets: [...secrets] } }),
|
|
@@ -1861,6 +1861,12 @@ var RunWaiting = Schema12.Union([
|
|
|
1861
1861
|
name: Schema12.String.check(Schema12.isMinLength(1)),
|
|
1862
1862
|
verificationId: Id
|
|
1863
1863
|
}),
|
|
1864
|
+
Schema12.Struct({
|
|
1865
|
+
kind: Schema12.Literal("claim"),
|
|
1866
|
+
name: Schema12.String.check(Schema12.isMinLength(1)),
|
|
1867
|
+
resource: Schema12.String.check(Schema12.isMinLength(1)),
|
|
1868
|
+
holder: Schema12.optionalKey(Schema12.Struct({ runId: Id, loopId: Schema12.String }))
|
|
1869
|
+
}),
|
|
1864
1870
|
Schema12.Struct({
|
|
1865
1871
|
kind: Schema12.Literal("queue"),
|
|
1866
1872
|
name: Schema12.String.check(Schema12.isMinLength(1)),
|
|
@@ -3034,6 +3040,7 @@ var verify2 = (name, request) => takeStep2(name, "verify", "verify", Effect3.gen
|
|
|
3034
3040
|
...request.revision === undefined ? undefined : { revision: request.revision },
|
|
3035
3041
|
...request.checks === undefined ? undefined : { checks: request.checks },
|
|
3036
3042
|
...request.suggested === undefined || request.suggested.length === 0 ? undefined : { suggested: request.suggested },
|
|
3043
|
+
...request.rerunFailed === true ? { rerunFailed: true } : undefined,
|
|
3037
3044
|
token
|
|
3038
3045
|
}));
|
|
3039
3046
|
return yield* DurableDeferred.await(deferred);
|
|
@@ -3242,7 +3249,10 @@ var PipelineStatus2 = Schema19.Struct({
|
|
|
3242
3249
|
source: Schema19.Literals(["forge", "reported"]),
|
|
3243
3250
|
jobs: Schema19.Array(PipelineJob2),
|
|
3244
3251
|
readAt: Schema19.optionalKey(Schema19.String),
|
|
3245
|
-
runnerChecks: Schema19.optionalKey(Schema19.Array(Schema19.String))
|
|
3252
|
+
runnerChecks: Schema19.optionalKey(Schema19.Array(Schema19.String)),
|
|
3253
|
+
approved: Schema19.optionalKey(Schema19.String),
|
|
3254
|
+
repository: Schema19.optionalKey(Schema19.String),
|
|
3255
|
+
target: Schema19.optionalKey(Schema19.Struct({ branch: Schema19.String, head: Schema19.String, jobs: Schema19.Array(PipelineJob2) }))
|
|
3246
3256
|
});
|
|
3247
3257
|
var ReviewThread2 = Schema19.Struct({
|
|
3248
3258
|
id: Schema19.String,
|
|
@@ -4129,7 +4139,7 @@ var journaled = (engine, journal, ran) => ({
|
|
|
4129
4139
|
})
|
|
4130
4140
|
});
|
|
4131
4141
|
var scriptedExit = (scripted, failure) => scripted === undefined ? Exit3.fail(failure("nothing was scripted for this Step")) : scripted instanceof ScriptedFailure2 ? Exit3.fail(failure(scripted.reason)) : Exit3.succeed(scripted);
|
|
4132
|
-
var scriptedHost = (script, engine, agentLaunches, childLaunches, waits) => {
|
|
4142
|
+
var scriptedHost = (script, engine, agentLaunches, childLaunches, waits, verifyLaunches) => {
|
|
4133
4143
|
const resolve = (deferred, token, exit) => DurableDeferred4.done(deferred, { token, exit }).pipe(Effect8.provideService(WorkflowEngine.WorkflowEngine, engine));
|
|
4134
4144
|
return {
|
|
4135
4145
|
startAgentWork: (launch) => Effect8.andThen(Effect8.sync(() => agentLaunches.push({
|
|
@@ -4156,9 +4166,16 @@ var scriptedHost = (script, engine, agentLaunches, childLaunches, waits) => {
|
|
|
4156
4166
|
});
|
|
4157
4167
|
return resolve(eventDeferred2(launch.step), launch.token, event === undefined ? Exit3.fail(new WaitTimedOut2({ step: launch.step, event: launch.event })) : Exit3.succeed(event));
|
|
4158
4168
|
},
|
|
4159
|
-
claimResource: (launch) => launch.action === "let_go" ? resolve(letGoDeferred2(launch.step), launch.token, Exit3.succeed(null)) : resolve(claimDeferred2(launch.step), launch.token, Exit3.succeed(script.claims?.[launch.step] ?? { status: "granted", resource: launch.resource })),
|
|
4169
|
+
claimResource: (launch) => Effect8.flatMap(script.claimed?.({ step: launch.step, resource: launch.resource, action: launch.action }) ?? Effect8.undefined, (settled) => launch.action === "let_go" ? resolve(letGoDeferred2(launch.step), launch.token, Exit3.succeed(null)) : resolve(claimDeferred2(launch.step), launch.token, Exit3.succeed(settled ?? script.claims?.[launch.step] ?? { status: "granted", resource: launch.resource }))),
|
|
4160
4170
|
startVerification: (launch) => {
|
|
4161
4171
|
const scripted = script.verifications?.[launch.step];
|
|
4172
|
+
if (launch.measure === undefined)
|
|
4173
|
+
verifyLaunches.push({
|
|
4174
|
+
step: launch.step,
|
|
4175
|
+
...launch.revision === undefined ? undefined : { revision: launch.revision },
|
|
4176
|
+
...launch.checks === undefined ? undefined : { checks: launch.checks },
|
|
4177
|
+
...launch.rerunFailed === undefined ? undefined : { rerunFailed: launch.rerunFailed }
|
|
4178
|
+
});
|
|
4162
4179
|
if (launch.measure !== undefined) {
|
|
4163
4180
|
const measured = script.measurements?.[launch.step];
|
|
4164
4181
|
const flat = Array.from({ length: launch.measure.samples }, () => Object.fromEntries(launch.measure?.plan.metrics.map((metric) => [metric.name, 100]) ?? []));
|
|
@@ -4209,6 +4226,7 @@ var testLoop2 = (loop, script) => {
|
|
|
4209
4226
|
const agentLaunches = [];
|
|
4210
4227
|
const childLaunches = [];
|
|
4211
4228
|
const waits = [];
|
|
4229
|
+
const verifyLaunches = [];
|
|
4212
4230
|
let latestSteps = [];
|
|
4213
4231
|
const declared = capabilitiesOf2(loop);
|
|
4214
4232
|
const granted = new Set((script.grant ?? declared).filter((capability) => declared.includes(capability)));
|
|
@@ -4221,7 +4239,7 @@ var testLoop2 = (loop, script) => {
|
|
|
4221
4239
|
const execute = (payload) => Effect8.gen(function* () {
|
|
4222
4240
|
const engine = yield* WorkflowEngine.WorkflowEngine;
|
|
4223
4241
|
return yield* executeLoop2(loop, {
|
|
4224
|
-
host: scriptedHost(script, engine, agentLaunches, childLaunches, waits),
|
|
4242
|
+
host: scriptedHost(script, engine, agentLaunches, childLaunches, waits, verifyLaunches),
|
|
4225
4243
|
activities,
|
|
4226
4244
|
granted,
|
|
4227
4245
|
onRun: (run) => {
|
|
@@ -4231,7 +4249,7 @@ var testLoop2 = (loop, script) => {
|
|
|
4231
4249
|
});
|
|
4232
4250
|
return Effect8.gen(function* () {
|
|
4233
4251
|
const result = yield* Effect8.exit(workflow.execute({ input: script.input }).pipe(Effect8.provideService(ConfigProvider.ConfigProvider, ConfigProvider.fromUnknown(script.secrets ?? {}))));
|
|
4234
|
-
return { result, steps: latestSteps, journal, activities: ran, agentLaunches, childLaunches, waits };
|
|
4252
|
+
return { result, steps: latestSteps, journal, activities: ran, agentLaunches, childLaunches, waits, verifyLaunches };
|
|
4235
4253
|
}).pipe(Effect8.provide(workflow.toLayer(execute).pipe(Layer.provideMerge(WorkflowEngine.layerMemory))));
|
|
4236
4254
|
};
|
|
4237
4255
|
// packages/sdk/src/loop/review.ts
|
package/dist/loop/index.js
CHANGED
package/dist/program/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"../chunk-
|
|
2
|
+
import"../chunk-kjkn6d60.js";
|
|
3
3
|
import {
|
|
4
4
|
JournalWriteFailed2,
|
|
5
5
|
refusedStep2,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
networkGuard2,
|
|
18
18
|
carriedKits2,
|
|
19
19
|
runKit2
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-5qeam2w1.js";
|
|
21
21
|
export {
|
|
22
22
|
Described2 as Described,
|
|
23
23
|
JournalWriteFailed2 as JournalWriteFailed,
|
package/package.json
CHANGED
|
@@ -301,6 +301,14 @@ export declare const RunChangesRequested: Schema.Struct<{
|
|
|
301
301
|
readonly kind: Schema.Literal<"verification">;
|
|
302
302
|
readonly name: Schema.String;
|
|
303
303
|
readonly verificationId: Schema.String;
|
|
304
|
+
}>, Schema.Struct<{
|
|
305
|
+
readonly kind: Schema.Literal<"claim">;
|
|
306
|
+
readonly name: Schema.String;
|
|
307
|
+
readonly resource: Schema.String;
|
|
308
|
+
readonly holder: Schema.optionalKey<Schema.Struct<{
|
|
309
|
+
readonly runId: Schema.String;
|
|
310
|
+
readonly loopId: Schema.String;
|
|
311
|
+
}>>;
|
|
304
312
|
}>, Schema.Struct<{
|
|
305
313
|
readonly kind: Schema.Literal<"queue">;
|
|
306
314
|
readonly name: Schema.String;
|
|
@@ -1154,6 +1154,14 @@ export declare const RunWaiting: Schema.Union<readonly [Schema.Struct<{
|
|
|
1154
1154
|
readonly kind: Schema.Literal<"verification">;
|
|
1155
1155
|
readonly name: Schema.String;
|
|
1156
1156
|
readonly verificationId: Schema.String;
|
|
1157
|
+
}>, Schema.Struct<{
|
|
1158
|
+
readonly kind: Schema.Literal<"claim">;
|
|
1159
|
+
readonly name: Schema.String;
|
|
1160
|
+
readonly resource: Schema.String;
|
|
1161
|
+
readonly holder: Schema.optionalKey<Schema.Struct<{
|
|
1162
|
+
readonly runId: Schema.String;
|
|
1163
|
+
readonly loopId: Schema.String;
|
|
1164
|
+
}>>;
|
|
1157
1165
|
}>, Schema.Struct<{
|
|
1158
1166
|
readonly kind: Schema.Literal<"queue">;
|
|
1159
1167
|
readonly name: Schema.String;
|
|
@@ -1385,6 +1393,14 @@ export declare const Run: Schema.Struct<{
|
|
|
1385
1393
|
readonly kind: Schema.Literal<"verification">;
|
|
1386
1394
|
readonly name: Schema.String;
|
|
1387
1395
|
readonly verificationId: Schema.String;
|
|
1396
|
+
}>, Schema.Struct<{
|
|
1397
|
+
readonly kind: Schema.Literal<"claim">;
|
|
1398
|
+
readonly name: Schema.String;
|
|
1399
|
+
readonly resource: Schema.String;
|
|
1400
|
+
readonly holder: Schema.optionalKey<Schema.Struct<{
|
|
1401
|
+
readonly runId: Schema.String;
|
|
1402
|
+
readonly loopId: Schema.String;
|
|
1403
|
+
}>>;
|
|
1388
1404
|
}>, Schema.Struct<{
|
|
1389
1405
|
readonly kind: Schema.Literal<"queue">;
|
|
1390
1406
|
readonly name: Schema.String;
|
|
@@ -2177,6 +2193,14 @@ export declare const RunStarted: Schema.Struct<{
|
|
|
2177
2193
|
readonly kind: Schema.Literal<"verification">;
|
|
2178
2194
|
readonly name: Schema.String;
|
|
2179
2195
|
readonly verificationId: Schema.String;
|
|
2196
|
+
}>, Schema.Struct<{
|
|
2197
|
+
readonly kind: Schema.Literal<"claim">;
|
|
2198
|
+
readonly name: Schema.String;
|
|
2199
|
+
readonly resource: Schema.String;
|
|
2200
|
+
readonly holder: Schema.optionalKey<Schema.Struct<{
|
|
2201
|
+
readonly runId: Schema.String;
|
|
2202
|
+
readonly loopId: Schema.String;
|
|
2203
|
+
}>>;
|
|
2180
2204
|
}>, Schema.Struct<{
|
|
2181
2205
|
readonly kind: Schema.Literal<"queue">;
|
|
2182
2206
|
readonly name: Schema.String;
|
|
@@ -2519,6 +2543,14 @@ export declare const RunShow: Schema.Struct<{
|
|
|
2519
2543
|
readonly kind: Schema.Literal<"verification">;
|
|
2520
2544
|
readonly name: Schema.String;
|
|
2521
2545
|
readonly verificationId: Schema.String;
|
|
2546
|
+
}>, Schema.Struct<{
|
|
2547
|
+
readonly kind: Schema.Literal<"claim">;
|
|
2548
|
+
readonly name: Schema.String;
|
|
2549
|
+
readonly resource: Schema.String;
|
|
2550
|
+
readonly holder: Schema.optionalKey<Schema.Struct<{
|
|
2551
|
+
readonly runId: Schema.String;
|
|
2552
|
+
readonly loopId: Schema.String;
|
|
2553
|
+
}>>;
|
|
2522
2554
|
}>, Schema.Struct<{
|
|
2523
2555
|
readonly kind: Schema.Literal<"queue">;
|
|
2524
2556
|
readonly name: Schema.String;
|
|
@@ -2774,6 +2806,14 @@ export declare const RunShow: Schema.Struct<{
|
|
|
2774
2806
|
readonly kind: Schema.Literal<"verification">;
|
|
2775
2807
|
readonly name: Schema.String;
|
|
2776
2808
|
readonly verificationId: Schema.String;
|
|
2809
|
+
}>, Schema.Struct<{
|
|
2810
|
+
readonly kind: Schema.Literal<"claim">;
|
|
2811
|
+
readonly name: Schema.String;
|
|
2812
|
+
readonly resource: Schema.String;
|
|
2813
|
+
readonly holder: Schema.optionalKey<Schema.Struct<{
|
|
2814
|
+
readonly runId: Schema.String;
|
|
2815
|
+
readonly loopId: Schema.String;
|
|
2816
|
+
}>>;
|
|
2777
2817
|
}>, Schema.Struct<{
|
|
2778
2818
|
readonly kind: Schema.Literal<"queue">;
|
|
2779
2819
|
readonly name: Schema.String;
|
|
@@ -3102,6 +3142,14 @@ export declare const RunListItem: Schema.Struct<{
|
|
|
3102
3142
|
readonly kind: Schema.Literal<"verification">;
|
|
3103
3143
|
readonly name: Schema.String;
|
|
3104
3144
|
readonly verificationId: Schema.String;
|
|
3145
|
+
}>, Schema.Struct<{
|
|
3146
|
+
readonly kind: Schema.Literal<"claim">;
|
|
3147
|
+
readonly name: Schema.String;
|
|
3148
|
+
readonly resource: Schema.String;
|
|
3149
|
+
readonly holder: Schema.optionalKey<Schema.Struct<{
|
|
3150
|
+
readonly runId: Schema.String;
|
|
3151
|
+
readonly loopId: Schema.String;
|
|
3152
|
+
}>>;
|
|
3105
3153
|
}>, Schema.Struct<{
|
|
3106
3154
|
readonly kind: Schema.Literal<"queue">;
|
|
3107
3155
|
readonly name: Schema.String;
|
|
@@ -3274,6 +3322,14 @@ export declare const RunList: Schema.Struct<{
|
|
|
3274
3322
|
readonly kind: Schema.Literal<"verification">;
|
|
3275
3323
|
readonly name: Schema.String;
|
|
3276
3324
|
readonly verificationId: Schema.String;
|
|
3325
|
+
}>, Schema.Struct<{
|
|
3326
|
+
readonly kind: Schema.Literal<"claim">;
|
|
3327
|
+
readonly name: Schema.String;
|
|
3328
|
+
readonly resource: Schema.String;
|
|
3329
|
+
readonly holder: Schema.optionalKey<Schema.Struct<{
|
|
3330
|
+
readonly runId: Schema.String;
|
|
3331
|
+
readonly loopId: Schema.String;
|
|
3332
|
+
}>>;
|
|
3277
3333
|
}>, Schema.Struct<{
|
|
3278
3334
|
readonly kind: Schema.Literal<"queue">;
|
|
3279
3335
|
readonly name: Schema.String;
|
|
@@ -3452,6 +3508,14 @@ export declare const RunWaitResult: Schema.Struct<{
|
|
|
3452
3508
|
readonly kind: Schema.Literal<"verification">;
|
|
3453
3509
|
readonly name: Schema.String;
|
|
3454
3510
|
readonly verificationId: Schema.String;
|
|
3511
|
+
}>, Schema.Struct<{
|
|
3512
|
+
readonly kind: Schema.Literal<"claim">;
|
|
3513
|
+
readonly name: Schema.String;
|
|
3514
|
+
readonly resource: Schema.String;
|
|
3515
|
+
readonly holder: Schema.optionalKey<Schema.Struct<{
|
|
3516
|
+
readonly runId: Schema.String;
|
|
3517
|
+
readonly loopId: Schema.String;
|
|
3518
|
+
}>>;
|
|
3455
3519
|
}>, Schema.Struct<{
|
|
3456
3520
|
readonly kind: Schema.Literal<"queue">;
|
|
3457
3521
|
readonly name: Schema.String;
|
|
@@ -3674,6 +3738,14 @@ export declare const RunActionTaken: Schema.Struct<{
|
|
|
3674
3738
|
readonly kind: Schema.Literal<"verification">;
|
|
3675
3739
|
readonly name: Schema.String;
|
|
3676
3740
|
readonly verificationId: Schema.String;
|
|
3741
|
+
}>, Schema.Struct<{
|
|
3742
|
+
readonly kind: Schema.Literal<"claim">;
|
|
3743
|
+
readonly name: Schema.String;
|
|
3744
|
+
readonly resource: Schema.String;
|
|
3745
|
+
readonly holder: Schema.optionalKey<Schema.Struct<{
|
|
3746
|
+
readonly runId: Schema.String;
|
|
3747
|
+
readonly loopId: Schema.String;
|
|
3748
|
+
}>>;
|
|
3677
3749
|
}>, Schema.Struct<{
|
|
3678
3750
|
readonly kind: Schema.Literal<"queue">;
|
|
3679
3751
|
readonly name: Schema.String;
|
|
@@ -144,6 +144,14 @@ declare const MyTeamsRun: Schema.Struct<{
|
|
|
144
144
|
readonly kind: Schema.Literal<"verification">;
|
|
145
145
|
readonly name: Schema.String;
|
|
146
146
|
readonly verificationId: Schema.String;
|
|
147
|
+
}>, Schema.Struct<{
|
|
148
|
+
readonly kind: Schema.Literal<"claim">;
|
|
149
|
+
readonly name: Schema.String;
|
|
150
|
+
readonly resource: Schema.String;
|
|
151
|
+
readonly holder: Schema.optionalKey<Schema.Struct<{
|
|
152
|
+
readonly runId: Schema.String;
|
|
153
|
+
readonly loopId: Schema.String;
|
|
154
|
+
}>>;
|
|
147
155
|
}>, Schema.Struct<{
|
|
148
156
|
readonly kind: Schema.Literal<"queue">;
|
|
149
157
|
readonly name: Schema.String;
|
|
@@ -311,6 +319,14 @@ export declare const MyTeamsCard: Schema.Struct<{
|
|
|
311
319
|
readonly kind: Schema.Literal<"verification">;
|
|
312
320
|
readonly name: Schema.String;
|
|
313
321
|
readonly verificationId: Schema.String;
|
|
322
|
+
}>, Schema.Struct<{
|
|
323
|
+
readonly kind: Schema.Literal<"claim">;
|
|
324
|
+
readonly name: Schema.String;
|
|
325
|
+
readonly resource: Schema.String;
|
|
326
|
+
readonly holder: Schema.optionalKey<Schema.Struct<{
|
|
327
|
+
readonly runId: Schema.String;
|
|
328
|
+
readonly loopId: Schema.String;
|
|
329
|
+
}>>;
|
|
314
330
|
}>, Schema.Struct<{
|
|
315
331
|
readonly kind: Schema.Literal<"queue">;
|
|
316
332
|
readonly name: Schema.String;
|
|
@@ -530,6 +546,14 @@ export declare const MyTeams: Schema.Struct<{
|
|
|
530
546
|
readonly kind: Schema.Literal<"verification">;
|
|
531
547
|
readonly name: Schema.String;
|
|
532
548
|
readonly verificationId: Schema.String;
|
|
549
|
+
}>, Schema.Struct<{
|
|
550
|
+
readonly kind: Schema.Literal<"claim">;
|
|
551
|
+
readonly name: Schema.String;
|
|
552
|
+
readonly resource: Schema.String;
|
|
553
|
+
readonly holder: Schema.optionalKey<Schema.Struct<{
|
|
554
|
+
readonly runId: Schema.String;
|
|
555
|
+
readonly loopId: Schema.String;
|
|
556
|
+
}>>;
|
|
533
557
|
}>, Schema.Struct<{
|
|
534
558
|
readonly kind: Schema.Literal<"queue">;
|
|
535
559
|
readonly name: Schema.String;
|
|
@@ -747,6 +771,14 @@ export declare const MyTeams: Schema.Struct<{
|
|
|
747
771
|
readonly kind: Schema.Literal<"verification">;
|
|
748
772
|
readonly name: Schema.String;
|
|
749
773
|
readonly verificationId: Schema.String;
|
|
774
|
+
}>, Schema.Struct<{
|
|
775
|
+
readonly kind: Schema.Literal<"claim">;
|
|
776
|
+
readonly name: Schema.String;
|
|
777
|
+
readonly resource: Schema.String;
|
|
778
|
+
readonly holder: Schema.optionalKey<Schema.Struct<{
|
|
779
|
+
readonly runId: Schema.String;
|
|
780
|
+
readonly loopId: Schema.String;
|
|
781
|
+
}>>;
|
|
750
782
|
}>, Schema.Struct<{
|
|
751
783
|
readonly kind: Schema.Literal<"queue">;
|
|
752
784
|
readonly name: Schema.String;
|
|
@@ -964,6 +996,14 @@ export declare const MyTeams: Schema.Struct<{
|
|
|
964
996
|
readonly kind: Schema.Literal<"verification">;
|
|
965
997
|
readonly name: Schema.String;
|
|
966
998
|
readonly verificationId: Schema.String;
|
|
999
|
+
}>, Schema.Struct<{
|
|
1000
|
+
readonly kind: Schema.Literal<"claim">;
|
|
1001
|
+
readonly name: Schema.String;
|
|
1002
|
+
readonly resource: Schema.String;
|
|
1003
|
+
readonly holder: Schema.optionalKey<Schema.Struct<{
|
|
1004
|
+
readonly runId: Schema.String;
|
|
1005
|
+
readonly loopId: Schema.String;
|
|
1006
|
+
}>>;
|
|
967
1007
|
}>, Schema.Struct<{
|
|
968
1008
|
readonly kind: Schema.Literal<"queue">;
|
|
969
1009
|
readonly name: Schema.String;
|
|
@@ -1181,6 +1221,14 @@ export declare const MyTeams: Schema.Struct<{
|
|
|
1181
1221
|
readonly kind: Schema.Literal<"verification">;
|
|
1182
1222
|
readonly name: Schema.String;
|
|
1183
1223
|
readonly verificationId: Schema.String;
|
|
1224
|
+
}>, Schema.Struct<{
|
|
1225
|
+
readonly kind: Schema.Literal<"claim">;
|
|
1226
|
+
readonly name: Schema.String;
|
|
1227
|
+
readonly resource: Schema.String;
|
|
1228
|
+
readonly holder: Schema.optionalKey<Schema.Struct<{
|
|
1229
|
+
readonly runId: Schema.String;
|
|
1230
|
+
readonly loopId: Schema.String;
|
|
1231
|
+
}>>;
|
|
1184
1232
|
}>, Schema.Struct<{
|
|
1185
1233
|
readonly kind: Schema.Literal<"queue">;
|
|
1186
1234
|
readonly name: Schema.String;
|
|
@@ -1382,6 +1430,14 @@ export declare const TaskRuns: Schema.Struct<{
|
|
|
1382
1430
|
readonly kind: Schema.Literal<"verification">;
|
|
1383
1431
|
readonly name: Schema.String;
|
|
1384
1432
|
readonly verificationId: Schema.String;
|
|
1433
|
+
}>, Schema.Struct<{
|
|
1434
|
+
readonly kind: Schema.Literal<"claim">;
|
|
1435
|
+
readonly name: Schema.String;
|
|
1436
|
+
readonly resource: Schema.String;
|
|
1437
|
+
readonly holder: Schema.optionalKey<Schema.Struct<{
|
|
1438
|
+
readonly runId: Schema.String;
|
|
1439
|
+
readonly loopId: Schema.String;
|
|
1440
|
+
}>>;
|
|
1385
1441
|
}>, Schema.Struct<{
|
|
1386
1442
|
readonly kind: Schema.Literal<"queue">;
|
|
1387
1443
|
readonly name: Schema.String;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Run, RunDisplay, RunDisplayState, RunShow } from './loop';
|
|
1
|
+
import type { Run, RunDisplay, RunDisplayState, RunShow, RunWaiting } from './loop';
|
|
2
2
|
export type RunDisplayInput = Pick<RunShow, 'run' | 'steps' | 'questions' | 'children' | 'waiting'> & {
|
|
3
3
|
/** A Runner has leased one of the Run's orchestration Work Units. */
|
|
4
4
|
readonly claimed: boolean;
|
|
@@ -8,6 +8,10 @@ export type RunDisplayInput = Pick<RunShow, 'run' | 'steps' | 'questions' | 'chi
|
|
|
8
8
|
readonly failedChecks: readonly string[];
|
|
9
9
|
};
|
|
10
10
|
export declare const runDisplayLabels: Record<RunDisplayState, string>;
|
|
11
|
+
/** A resource the Run waits its turn for, and who holds it. */
|
|
12
|
+
export declare const turnWords: (entry: Extract<RunWaiting, {
|
|
13
|
+
readonly kind: 'claim';
|
|
14
|
+
}>) => string;
|
|
11
15
|
/** What a Run's output says it left open: any Loop's `unsettled` list. `displayFacts` in run-list.ts reads the same. */
|
|
12
16
|
export declare const reportedUnsettled: (output: Run['output']) => readonly string[] | undefined;
|
|
13
17
|
/** What a Run and the Child Runs below it report left open. */
|
|
@@ -1219,6 +1219,7 @@ export declare const makeProgramRpcClient: (options: ConnectionOptions) => Effec
|
|
|
1219
1219
|
readonly workingDirectory?: string;
|
|
1220
1220
|
readonly suggested?: boolean;
|
|
1221
1221
|
}[];
|
|
1222
|
+
readonly rerunFailed?: boolean;
|
|
1222
1223
|
readonly measure?: {
|
|
1223
1224
|
readonly base?: string;
|
|
1224
1225
|
readonly plan: {
|
|
@@ -1709,6 +1710,18 @@ export declare const makeProgramRpcClient: (options: ConnectionOptions) => Effec
|
|
|
1709
1710
|
}[];
|
|
1710
1711
|
readonly readAt?: string;
|
|
1711
1712
|
readonly runnerChecks?: readonly string[];
|
|
1713
|
+
readonly approved?: string;
|
|
1714
|
+
readonly repository?: string;
|
|
1715
|
+
readonly target?: {
|
|
1716
|
+
readonly branch: string;
|
|
1717
|
+
readonly head: string;
|
|
1718
|
+
readonly jobs: readonly {
|
|
1719
|
+
readonly name: string;
|
|
1720
|
+
readonly status: "failed" | "running" | "skipped" | "success";
|
|
1721
|
+
readonly url?: string;
|
|
1722
|
+
readonly logTail?: string;
|
|
1723
|
+
}[];
|
|
1724
|
+
};
|
|
1712
1725
|
}, import("effect/rpc/RpcClientError").RpcClientError | import("./runner-group").RunnerRpcError | (Discard extends true ? never : import("./runner-group").RunnerRpcError), never>>[0]) => Effect.Effect<{
|
|
1713
1726
|
readonly head: string;
|
|
1714
1727
|
readonly status: "canceled" | "failed" | "none" | "running" | "success";
|
|
@@ -1721,6 +1734,18 @@ export declare const makeProgramRpcClient: (options: ConnectionOptions) => Effec
|
|
|
1721
1734
|
}[];
|
|
1722
1735
|
readonly readAt?: string;
|
|
1723
1736
|
readonly runnerChecks?: readonly string[];
|
|
1737
|
+
readonly approved?: string;
|
|
1738
|
+
readonly repository?: string;
|
|
1739
|
+
readonly target?: {
|
|
1740
|
+
readonly branch: string;
|
|
1741
|
+
readonly head: string;
|
|
1742
|
+
readonly jobs: readonly {
|
|
1743
|
+
readonly name: string;
|
|
1744
|
+
readonly status: "failed" | "running" | "skipped" | "success";
|
|
1745
|
+
readonly url?: string;
|
|
1746
|
+
readonly logTail?: string;
|
|
1747
|
+
}[];
|
|
1748
|
+
};
|
|
1724
1749
|
}, Error | import("effect/rpc/RpcClientError").RpcClientError | import("./runner-group").RunnerRpcError, never>;
|
|
1725
1750
|
reportPipeline: (input: Parameters<<const AsQueue extends boolean = false, const Discard = false>(input: {
|
|
1726
1751
|
readonly lease: {
|
|
@@ -1023,6 +1023,18 @@ declare const RunnerCapabilityRpcs_base: RpcGroup.RpcGroup<Rpc.Rpc<"AdmitChild",
|
|
|
1023
1023
|
}>>;
|
|
1024
1024
|
readonly readAt: Schema.optionalKey<Schema.String>;
|
|
1025
1025
|
readonly runnerChecks: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
1026
|
+
readonly approved: Schema.optionalKey<Schema.String>;
|
|
1027
|
+
readonly repository: Schema.optionalKey<Schema.String>;
|
|
1028
|
+
readonly target: Schema.optionalKey<Schema.Struct<{
|
|
1029
|
+
readonly branch: Schema.String;
|
|
1030
|
+
readonly head: Schema.String;
|
|
1031
|
+
readonly jobs: Schema.$Array<Schema.Struct<{
|
|
1032
|
+
readonly name: Schema.String;
|
|
1033
|
+
readonly status: Schema.Literals<readonly ["running", "success", "failed", "skipped"]>;
|
|
1034
|
+
readonly url: Schema.optionalKey<Schema.String>;
|
|
1035
|
+
readonly logTail: Schema.optionalKey<Schema.String>;
|
|
1036
|
+
}>>;
|
|
1037
|
+
}>>;
|
|
1026
1038
|
}>, typeof RunnerRpcError, typeof RunnerAuthentication, never> | Rpc.Rpc<"ProgramSecrets", Schema.Struct<{
|
|
1027
1039
|
lease: Schema.Struct<{
|
|
1028
1040
|
readonly workUnitId: Schema.String;
|
|
@@ -1300,6 +1312,8 @@ declare const RunnerCapabilityRpcs_base: RpcGroup.RpcGroup<Rpc.Rpc<"AdmitChild",
|
|
|
1300
1312
|
readonly workingDirectory: Schema.optionalKey<Schema.String>;
|
|
1301
1313
|
readonly suggested: Schema.optionalKey<Schema.Boolean>;
|
|
1302
1314
|
}>>>;
|
|
1315
|
+
/** Runs a check again whose evidence at the tree failed, rather than reusing that failure; passed evidence is still reused. */
|
|
1316
|
+
rerunFailed: Schema.optionalKey<Schema.Boolean>;
|
|
1303
1317
|
/** A benchmark against `base` (the Run's base branch head when left out) in place of checks. */
|
|
1304
1318
|
measure: Schema.optionalKey<Schema.Struct<{
|
|
1305
1319
|
readonly base: Schema.optionalKey<Schema.String>;
|
|
@@ -1833,6 +1847,18 @@ export declare const ProgramRpcs: RpcGroup.RpcGroup<Rpc.Rpc<"AdmitChild", Schema
|
|
|
1833
1847
|
}>>;
|
|
1834
1848
|
readonly readAt: Schema.optionalKey<Schema.String>;
|
|
1835
1849
|
readonly runnerChecks: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
1850
|
+
readonly approved: Schema.optionalKey<Schema.String>;
|
|
1851
|
+
readonly repository: Schema.optionalKey<Schema.String>;
|
|
1852
|
+
readonly target: Schema.optionalKey<Schema.Struct<{
|
|
1853
|
+
readonly branch: Schema.String;
|
|
1854
|
+
readonly head: Schema.String;
|
|
1855
|
+
readonly jobs: Schema.$Array<Schema.Struct<{
|
|
1856
|
+
readonly name: Schema.String;
|
|
1857
|
+
readonly status: Schema.Literals<readonly ["running", "success", "failed", "skipped"]>;
|
|
1858
|
+
readonly url: Schema.optionalKey<Schema.String>;
|
|
1859
|
+
readonly logTail: Schema.optionalKey<Schema.String>;
|
|
1860
|
+
}>>;
|
|
1861
|
+
}>>;
|
|
1836
1862
|
}>, typeof RunnerRpcError, typeof RunnerAuthentication, never> | Rpc.Rpc<"ProgramSecrets", Schema.Struct<{
|
|
1837
1863
|
lease: Schema.Struct<{
|
|
1838
1864
|
readonly workUnitId: Schema.String;
|
|
@@ -2155,6 +2181,8 @@ export declare const ProgramRpcs: RpcGroup.RpcGroup<Rpc.Rpc<"AdmitChild", Schema
|
|
|
2155
2181
|
readonly workingDirectory: Schema.optionalKey<Schema.String>;
|
|
2156
2182
|
readonly suggested: Schema.optionalKey<Schema.Boolean>;
|
|
2157
2183
|
}>>>;
|
|
2184
|
+
/** Runs a check again whose evidence at the tree failed, rather than reusing that failure; passed evidence is still reused. */
|
|
2185
|
+
rerunFailed: Schema.optionalKey<Schema.Boolean>;
|
|
2158
2186
|
/** A benchmark against `base` (the Run's base branch head when left out) in place of checks. */
|
|
2159
2187
|
measure: Schema.optionalKey<Schema.Struct<{
|
|
2160
2188
|
readonly base: Schema.optionalKey<Schema.String>;
|
|
@@ -3039,6 +3067,18 @@ export declare const RunnerRpcs: RpcGroup.RpcGroup<Rpc.Rpc<"AdmitChild", Schema.
|
|
|
3039
3067
|
}>>;
|
|
3040
3068
|
readonly readAt: Schema.optionalKey<Schema.String>;
|
|
3041
3069
|
readonly runnerChecks: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
3070
|
+
readonly approved: Schema.optionalKey<Schema.String>;
|
|
3071
|
+
readonly repository: Schema.optionalKey<Schema.String>;
|
|
3072
|
+
readonly target: Schema.optionalKey<Schema.Struct<{
|
|
3073
|
+
readonly branch: Schema.String;
|
|
3074
|
+
readonly head: Schema.String;
|
|
3075
|
+
readonly jobs: Schema.$Array<Schema.Struct<{
|
|
3076
|
+
readonly name: Schema.String;
|
|
3077
|
+
readonly status: Schema.Literals<readonly ["running", "success", "failed", "skipped"]>;
|
|
3078
|
+
readonly url: Schema.optionalKey<Schema.String>;
|
|
3079
|
+
readonly logTail: Schema.optionalKey<Schema.String>;
|
|
3080
|
+
}>>;
|
|
3081
|
+
}>>;
|
|
3042
3082
|
}>, typeof RunnerRpcError, typeof RunnerAuthentication, never> | Rpc.Rpc<"ProgramSecrets", Schema.Struct<{
|
|
3043
3083
|
lease: Schema.Struct<{
|
|
3044
3084
|
readonly workUnitId: Schema.String;
|
|
@@ -3453,6 +3493,8 @@ export declare const RunnerRpcs: RpcGroup.RpcGroup<Rpc.Rpc<"AdmitChild", Schema.
|
|
|
3453
3493
|
readonly workingDirectory: Schema.optionalKey<Schema.String>;
|
|
3454
3494
|
readonly suggested: Schema.optionalKey<Schema.Boolean>;
|
|
3455
3495
|
}>>>;
|
|
3496
|
+
/** Runs a check again whose evidence at the tree failed, rather than reusing that failure; passed evidence is still reused. */
|
|
3497
|
+
rerunFailed: Schema.optionalKey<Schema.Boolean>;
|
|
3456
3498
|
/** A benchmark against `base` (the Run's base branch head when left out) in place of checks. */
|
|
3457
3499
|
measure: Schema.optionalKey<Schema.Struct<{
|
|
3458
3500
|
readonly base: Schema.optionalKey<Schema.String>;
|
|
@@ -260,6 +260,25 @@ export declare const PipelineStatus: Schema.Struct<{
|
|
|
260
260
|
* with `verify` on the head and posts the result with `reportPipeline`, and may do so again for a failure it doubts.
|
|
261
261
|
*/
|
|
262
262
|
readonly runnerChecks: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
263
|
+
/** The newest head of the ChangeRequest an approval in Kitman covers, with no request for changes on it since. */
|
|
264
|
+
readonly approved: Schema.optionalKey<Schema.String>;
|
|
265
|
+
/** The ChangeRequest's RepoBinding. */
|
|
266
|
+
readonly repository: Schema.optionalKey<Schema.String>;
|
|
267
|
+
/**
|
|
268
|
+
* While the pipeline fails: the head of the ChangeRequest's target branch and the forge's checks on it, none where
|
|
269
|
+
* the forge runs no pipeline. Left out when the forge could not say.
|
|
270
|
+
*/
|
|
271
|
+
readonly target: Schema.optionalKey<Schema.Struct<{
|
|
272
|
+
readonly branch: Schema.String;
|
|
273
|
+
readonly head: Schema.String;
|
|
274
|
+
readonly jobs: Schema.$Array<Schema.Struct<{
|
|
275
|
+
readonly name: Schema.String;
|
|
276
|
+
readonly status: Schema.Literals<readonly ["running", "success", "failed", "skipped"]>;
|
|
277
|
+
readonly url: Schema.optional<Schema.String>;
|
|
278
|
+
/** The redacted end of a failed job's log, at most 4000 characters, where the forge serves job logs. */
|
|
279
|
+
readonly logTail: Schema.optional<Schema.String>;
|
|
280
|
+
}>>;
|
|
281
|
+
}>>;
|
|
263
282
|
}>;
|
|
264
283
|
export type PipelineStatus = typeof PipelineStatus.Type;
|
|
265
284
|
/** A review conversation not yet resolved, with its comments oldest first. */
|
|
@@ -728,6 +747,18 @@ export declare const pipelineStatus: (name: string, request: typeof ChangeReques
|
|
|
728
747
|
}[];
|
|
729
748
|
readonly readAt?: string;
|
|
730
749
|
readonly runnerChecks?: readonly string[];
|
|
750
|
+
readonly approved?: string;
|
|
751
|
+
readonly repository?: string;
|
|
752
|
+
readonly target?: {
|
|
753
|
+
readonly branch: string;
|
|
754
|
+
readonly head: string;
|
|
755
|
+
readonly jobs: readonly {
|
|
756
|
+
readonly name: string;
|
|
757
|
+
readonly status: "failed" | "running" | "skipped" | "success";
|
|
758
|
+
readonly url?: string | undefined;
|
|
759
|
+
readonly logTail?: string | undefined;
|
|
760
|
+
}[];
|
|
761
|
+
};
|
|
731
762
|
}, import("./steps").CapabilityDenied | import("./steps").DuplicateStep | StepFailed, ChangeRequestReadActivity | import("./steps").LoopRun | import("effect/workflow/WorkflowEngine").WorkflowEngine | import("effect/workflow/WorkflowEngine").WorkflowInstance>;
|
|
732
763
|
/** A ChangeRequest's unresolved review conversations, read when the Step runs. */
|
|
733
764
|
export declare const reviewThreads: (name: string, request: typeof ChangeRequestReadRequest.Type) => Effect.Effect<{
|
|
@@ -145,6 +145,8 @@ export type VerificationLaunch = Launch & {
|
|
|
145
145
|
readonly checks?: readonly string[];
|
|
146
146
|
/** Run in place of approved checks when the repository has none approved, labelled as suggested. */
|
|
147
147
|
readonly suggested?: readonly SuggestedVerification[];
|
|
148
|
+
/** Runs a check again whose evidence at the tree failed, rather than reusing that failure; passed evidence is still reused. */
|
|
149
|
+
readonly rerunFailed?: boolean;
|
|
148
150
|
/** Benchmarks the revision against `base` (the Run's base branch head when left out) in place of checks. */
|
|
149
151
|
readonly measure?: MeasureLaunch;
|
|
150
152
|
};
|
|
@@ -320,6 +322,8 @@ export declare const verify: (name: string, request: {
|
|
|
320
322
|
* up still gets evidence; ignored once any check is approved.
|
|
321
323
|
*/
|
|
322
324
|
readonly suggested?: readonly SuggestedVerification[];
|
|
325
|
+
/** Runs a check again whose evidence at the tree failed, rather than reusing that failure; passed evidence is still reused. */
|
|
326
|
+
readonly rerunFailed?: boolean;
|
|
323
327
|
}) => Effect.Effect<{
|
|
324
328
|
readonly revision: string;
|
|
325
329
|
readonly tree: string;
|
|
@@ -7,7 +7,7 @@ import { type LoopCapability, type LoopDefinition } from './define';
|
|
|
7
7
|
import type { MeasureEvidence } from '../../../core/src/work-unit';
|
|
8
8
|
import type { VerifyResult } from './evidence';
|
|
9
9
|
import { type ClaimResult } from './claims';
|
|
10
|
-
import { InputInvalid, LoopHost, LoopRun, type EventWaitLaunch, type LoopEvent, type StepRecord } from './steps';
|
|
10
|
+
import { InputInvalid, LoopHost, LoopRun, type EventWaitLaunch, type LoopEvent, type StepRecord, type VerificationLaunch } from './steps';
|
|
11
11
|
/** Activity and deferred results, encoded as JSON; replaying from it runs no Activity again. */
|
|
12
12
|
export declare const LoopJournal: Schema.Struct<{
|
|
13
13
|
readonly activities: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
|
|
@@ -73,6 +73,15 @@ export type TestLoopScript = {
|
|
|
73
73
|
readonly claims?: {
|
|
74
74
|
readonly [step: string]: ClaimResult;
|
|
75
75
|
};
|
|
76
|
+
/**
|
|
77
|
+
* Settles each claim and let go itself, as a queue that several test Runs share does: what it gives a claim wins over
|
|
78
|
+
* `claims`, and a claim waits for as long as it takes.
|
|
79
|
+
*/
|
|
80
|
+
readonly claimed?: (request: {
|
|
81
|
+
readonly step: string;
|
|
82
|
+
readonly resource: string;
|
|
83
|
+
readonly action: 'claim' | 'take_over' | 'let_go';
|
|
84
|
+
}) => Effect.Effect<ClaimResult | undefined>;
|
|
76
85
|
/** What the control plane grants; the declared capabilities by default. */
|
|
77
86
|
readonly grant?: readonly LoopCapability[];
|
|
78
87
|
/** Replaces the default host Activities method by method; a method left out keeps its default. */
|
|
@@ -101,8 +110,11 @@ export type TestLoopResult<Out, E> = {
|
|
|
101
110
|
readonly childLaunches: readonly ChildLaunchRecord[];
|
|
102
111
|
/** Every `waitFor` started, in order. */
|
|
103
112
|
readonly waits: readonly WaitRecord[];
|
|
113
|
+
/** Every `verify` started, in order. */
|
|
114
|
+
readonly verifyLaunches: readonly VerifyRecord[];
|
|
104
115
|
};
|
|
105
116
|
type WaitRecord = Pick<EventWaitLaunch, 'step' | 'event' | 'filter' | 'since' | 'or'>;
|
|
117
|
+
type VerifyRecord = Pick<VerificationLaunch, 'step' | 'revision' | 'checks' | 'rerunFailed'>;
|
|
106
118
|
type AgentLaunchRecord = {
|
|
107
119
|
readonly step: string;
|
|
108
120
|
readonly agent: string;
|
|
@@ -54,6 +54,7 @@ export type ProgramCapabilities = {
|
|
|
54
54
|
readonly revision?: string;
|
|
55
55
|
readonly checks?: readonly string[];
|
|
56
56
|
readonly suggested?: readonly SuggestedVerification[];
|
|
57
|
+
readonly rerunFailed?: boolean;
|
|
57
58
|
readonly measure?: MeasureLaunch;
|
|
58
59
|
}) => Effect.Effect<{
|
|
59
60
|
readonly verificationId: string;
|