@kitman-sh/cli 0.12.0-rc.7 → 0.12.0-rc.8
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-15geyg2d.js → chunk-3cgshf16.js} +98 -101
- package/dist/{chunk-j5t5nye5.js → chunk-3kxwb7qn.js} +7 -7
- package/dist/{chunk-bheg4ybe.js → chunk-6pqxsnk1.js} +22 -23
- package/dist/{chunk-e4an66v2.js → chunk-7959aeck.js} +5 -5
- package/dist/{chunk-xwya1er0.js → chunk-892qrkb3.js} +14 -60
- package/dist/{chunk-0346hwh6.js → chunk-8sz25ptv.js} +4 -5
- package/dist/{chunk-1t12wvv1.js → chunk-9c9vrbh4.js} +205 -216
- package/dist/{chunk-8twjqszj.js → chunk-9q7qc1dg.js} +1 -1
- package/dist/{chunk-z450wa10.js → chunk-bz4bp0q7.js} +3 -4
- package/dist/{chunk-znar1th3.js → chunk-d8qcmqh5.js} +4 -4
- package/dist/{chunk-2e91ymwn.js → chunk-det0tmx7.js} +1 -1
- package/dist/{chunk-xe8qf2xy.js → chunk-dh09wyed.js} +127 -129
- package/dist/{chunk-ewhzaqp3.js → chunk-e711ebdj.js} +2 -2
- package/dist/{chunk-wc2kba4z.js → chunk-ey4mf341.js} +6 -7
- package/dist/{chunk-qrm334c6.js → chunk-jg8n8z0z.js} +4 -4
- package/dist/{chunk-4w4spvb1.js → chunk-jwc8bdga.js} +5 -5
- package/dist/{chunk-nzjb36ad.js → chunk-mm2m3bys.js} +1 -1
- package/dist/{chunk-r5sw3fe0.js → chunk-mmpcdj8f.js} +10 -12
- package/dist/{chunk-0qz10ek8.js → chunk-s8m2tzdr.js} +4 -4
- package/dist/{chunk-xcf887a4.js → chunk-scb6qgy2.js} +47 -49
- package/dist/{chunk-5j848ckb.js → chunk-skqn4h13.js} +2 -2
- package/dist/{chunk-56knbdt6.js → chunk-vkchn89k.js} +23 -25
- package/dist/{chunk-pd2vz4bm.js → chunk-vrms6e1m.js} +13 -15
- package/dist/{chunk-vtfwjhzh.js → chunk-x3cc7dfc.js} +379 -63
- package/dist/{chunk-gspfm7qh.js → chunk-y7vjk8vv.js} +31 -165
- package/dist/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-c6rbt85q.js +0 -141
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
constVoid,
|
|
9
9
|
pipe,
|
|
10
10
|
flow,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
isString,
|
|
12
|
+
isNumber,
|
|
13
|
+
isBoolean,
|
|
14
|
+
isUndefined,
|
|
15
15
|
isNotUndefined,
|
|
16
16
|
isNotNull,
|
|
17
17
|
isNullish,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
assignProperty,
|
|
39
39
|
PipeInspectableProto,
|
|
40
40
|
withFiber,
|
|
41
|
-
|
|
41
|
+
make13,
|
|
42
42
|
strictEqual,
|
|
43
43
|
Tuple,
|
|
44
44
|
Number2,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
Service2,
|
|
59
59
|
makeUnsafe4,
|
|
60
60
|
empty3,
|
|
61
|
-
|
|
61
|
+
make14,
|
|
62
62
|
add,
|
|
63
63
|
getOrUndefined2,
|
|
64
64
|
getOrUndefinedUnsafe,
|
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
fail4,
|
|
92
92
|
isSuccess2,
|
|
93
93
|
makeUnsafe5,
|
|
94
|
-
|
|
94
|
+
make15,
|
|
95
95
|
_await,
|
|
96
96
|
fail5,
|
|
97
97
|
isDone,
|
|
@@ -193,7 +193,12 @@ import {
|
|
|
193
193
|
clockWith,
|
|
194
194
|
logError,
|
|
195
195
|
effectify,
|
|
196
|
+
toNumber,
|
|
197
|
+
bytes,
|
|
196
198
|
decode,
|
|
199
|
+
isRedacted,
|
|
200
|
+
make16,
|
|
201
|
+
value,
|
|
197
202
|
defaultParseOptions,
|
|
198
203
|
omit,
|
|
199
204
|
map9,
|
|
@@ -245,21 +250,32 @@ import {
|
|
|
245
250
|
toCodecJson,
|
|
246
251
|
Json,
|
|
247
252
|
JsonObject,
|
|
253
|
+
toJsonValue,
|
|
254
|
+
isOneOf,
|
|
255
|
+
isBigInt,
|
|
256
|
+
isBoolean2,
|
|
257
|
+
isFunction2,
|
|
258
|
+
isNumber2,
|
|
259
|
+
isObject2,
|
|
260
|
+
isJsonObject,
|
|
261
|
+
isString2,
|
|
262
|
+
isSymbol,
|
|
263
|
+
isUndefined2,
|
|
264
|
+
kindOf,
|
|
248
265
|
decodeJsonString,
|
|
249
266
|
decodeJsonStringOption,
|
|
250
267
|
encodeJsonStringSync,
|
|
251
268
|
encodePrettyJsonString
|
|
252
|
-
} from "./chunk-
|
|
269
|
+
} from "./chunk-x3cc7dfc.js";
|
|
253
270
|
import {
|
|
254
271
|
map,
|
|
255
272
|
makeEquivalence,
|
|
256
|
-
bytes,
|
|
257
273
|
BadArgument,
|
|
258
274
|
systemError,
|
|
259
275
|
badArgument,
|
|
260
276
|
makeUnsafe2,
|
|
277
|
+
make7,
|
|
261
278
|
make8,
|
|
262
|
-
make9,
|
|
263
279
|
sliding,
|
|
264
280
|
unbounded2,
|
|
265
281
|
offer,
|
|
@@ -275,13 +291,13 @@ import {
|
|
|
275
291
|
isSink,
|
|
276
292
|
fromChannel,
|
|
277
293
|
drain,
|
|
278
|
-
|
|
294
|
+
make9,
|
|
279
295
|
get3,
|
|
280
296
|
isStream,
|
|
281
297
|
fromChannel2,
|
|
282
298
|
callback,
|
|
283
299
|
empty2,
|
|
284
|
-
|
|
300
|
+
make10,
|
|
285
301
|
suspend,
|
|
286
302
|
fail2,
|
|
287
303
|
fromQueue,
|
|
@@ -307,16 +323,27 @@ import {
|
|
|
307
323
|
mkArrayBuffer,
|
|
308
324
|
toReadableStreamEffect,
|
|
309
325
|
FileSystem,
|
|
310
|
-
|
|
326
|
+
make11,
|
|
311
327
|
FileTypeId,
|
|
312
328
|
WatchBackend,
|
|
313
329
|
Path,
|
|
314
|
-
|
|
330
|
+
make12,
|
|
315
331
|
option,
|
|
316
332
|
String2,
|
|
317
333
|
optionalEnv,
|
|
318
334
|
harnessesUnsupportedInSrt2
|
|
319
|
-
} from "./chunk-
|
|
335
|
+
} from "./chunk-y7vjk8vv.js";
|
|
336
|
+
import {
|
|
337
|
+
ExitCode,
|
|
338
|
+
ProcessId,
|
|
339
|
+
makeHandle,
|
|
340
|
+
make,
|
|
341
|
+
ChildProcessSpawner,
|
|
342
|
+
display,
|
|
343
|
+
make2,
|
|
344
|
+
parseFdName,
|
|
345
|
+
fdName
|
|
346
|
+
} from "./chunk-892qrkb3.js";
|
|
320
347
|
import {
|
|
321
348
|
isDateTime,
|
|
322
349
|
Numeric,
|
|
@@ -329,36 +356,7 @@ import {
|
|
|
329
356
|
SecretScope,
|
|
330
357
|
SecretHosts,
|
|
331
358
|
isSecretReference
|
|
332
|
-
} from "./chunk-
|
|
333
|
-
import {
|
|
334
|
-
toJsonValue,
|
|
335
|
-
isOneOf,
|
|
336
|
-
isBigInt,
|
|
337
|
-
isBoolean,
|
|
338
|
-
isFunction,
|
|
339
|
-
isNumber,
|
|
340
|
-
isObject,
|
|
341
|
-
isJsonObject,
|
|
342
|
-
isString,
|
|
343
|
-
isSymbol,
|
|
344
|
-
isUndefined,
|
|
345
|
-
kindOf
|
|
346
|
-
} from "./chunk-c6rbt85q.js";
|
|
347
|
-
import {
|
|
348
|
-
isRedacted,
|
|
349
|
-
make,
|
|
350
|
-
value,
|
|
351
|
-
ExitCode,
|
|
352
|
-
ProcessId,
|
|
353
|
-
makeHandle,
|
|
354
|
-
make2,
|
|
355
|
-
ChildProcessSpawner,
|
|
356
|
-
display,
|
|
357
|
-
make3,
|
|
358
|
-
parseFdName,
|
|
359
|
-
fdName
|
|
360
|
-
} from "./chunk-xwya1er0.js";
|
|
361
|
-
|
|
359
|
+
} from "./chunk-s8m2tzdr.js";
|
|
362
360
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Tuple.js
|
|
363
361
|
var makeEquivalence3 = Tuple;
|
|
364
362
|
|
|
@@ -520,7 +518,7 @@ var makeUnsafe6 = (input) => {
|
|
|
520
518
|
var hasZone = (input) => /Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(input) || /z$|gmt$/i.test(input);
|
|
521
519
|
var minEpochMillis = -8640000000000000 + 12 * 60 * 60 * 1000;
|
|
522
520
|
var maxEpochMillis = 8640000000000000 - 14 * 60 * 60 * 1000;
|
|
523
|
-
var
|
|
521
|
+
var make3 = /* @__PURE__ */ liftThrowable(makeUnsafe6);
|
|
524
522
|
var now = /* @__PURE__ */ map7(currentTimeMillis, makeUtc);
|
|
525
523
|
var nowUnsafe = () => makeUtc(Date.now());
|
|
526
524
|
var toDateUtc = (self) => new Date(self.epochMilliseconds);
|
|
@@ -629,7 +627,7 @@ class Metric$ {
|
|
|
629
627
|
const key = this.key(context);
|
|
630
628
|
const registry = get4(context, MetricRegistry);
|
|
631
629
|
let metadata = registry.get(key);
|
|
632
|
-
if (
|
|
630
|
+
if (isUndefined(metadata)) {
|
|
633
631
|
metadata = this.metadata(this.createHooks());
|
|
634
632
|
registry.set(key, metadata);
|
|
635
633
|
}
|
|
@@ -899,18 +897,9 @@ var runMain2 = /* @__PURE__ */ makeRunMain(({
|
|
|
899
897
|
// node_modules/.bun/@effect+platform-bun@4.1.2+edf248c88a527e3e/node_modules/@effect/platform-bun/dist/BunRuntime.js
|
|
900
898
|
var runMain = runMain2;
|
|
901
899
|
|
|
902
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/BigInt.js
|
|
903
|
-
var BigInt2 = globalThis.BigInt;
|
|
904
|
-
var toNumber = (b) => {
|
|
905
|
-
if (b > BigInt2(Number.MAX_SAFE_INTEGER) || b < BigInt2(Number.MIN_SAFE_INTEGER)) {
|
|
906
|
-
return none();
|
|
907
|
-
}
|
|
908
|
-
return some(Number(b));
|
|
909
|
-
};
|
|
910
|
-
|
|
911
900
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/DateTime.js
|
|
912
901
|
var makeUnsafe = makeUnsafe6;
|
|
913
|
-
var make18 =
|
|
902
|
+
var make18 = make3;
|
|
914
903
|
var now2 = now;
|
|
915
904
|
var nowUnsafe2 = nowUnsafe;
|
|
916
905
|
var toDateUtc2 = toDateUtc;
|
|
@@ -1125,7 +1114,7 @@ var readableToPullUnsafe = (options) => {
|
|
|
1125
1114
|
const readable = options.readable;
|
|
1126
1115
|
const chunkSize = options.chunkSize ?? 4096;
|
|
1127
1116
|
const closeOnDone = options.closeOnDone ?? true;
|
|
1128
|
-
const exit = options.exit ??
|
|
1117
|
+
const exit = options.exit ?? make7(undefined);
|
|
1129
1118
|
const latch = options.latch ?? makeUnsafe2(false);
|
|
1130
1119
|
function onReadable() {
|
|
1131
1120
|
latch.openUnsafe();
|
|
@@ -1233,7 +1222,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1233
1222
|
const fs = yield* FileSystem;
|
|
1234
1223
|
const path = yield* Path;
|
|
1235
1224
|
const resolveWorkingDirectory = fnUntraced(function* (options) {
|
|
1236
|
-
if (
|
|
1225
|
+
if (isUndefined(options.cwd))
|
|
1237
1226
|
return;
|
|
1238
1227
|
yield* fs.access(options.cwd);
|
|
1239
1228
|
return path.resolve(options.cwd);
|
|
@@ -1260,7 +1249,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1260
1249
|
encoding: "utf-8",
|
|
1261
1250
|
endOnDone: true
|
|
1262
1251
|
};
|
|
1263
|
-
if (
|
|
1252
|
+
if (isUndefined(options.stdin)) {
|
|
1264
1253
|
return defaultConfig;
|
|
1265
1254
|
}
|
|
1266
1255
|
if (typeof options.stdin === "string") {
|
|
@@ -1283,7 +1272,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1283
1272
|
};
|
|
1284
1273
|
const resolveOutputOption = (options, streamName) => {
|
|
1285
1274
|
const option = options[streamName];
|
|
1286
|
-
if (
|
|
1275
|
+
if (isUndefined(option)) {
|
|
1287
1276
|
return {
|
|
1288
1277
|
stream: "pipe"
|
|
1289
1278
|
};
|
|
@@ -1303,7 +1292,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1303
1292
|
};
|
|
1304
1293
|
};
|
|
1305
1294
|
const resolveAdditionalFds = (options) => {
|
|
1306
|
-
if (
|
|
1295
|
+
if (isUndefined(options.additionalFds)) {
|
|
1307
1296
|
return [];
|
|
1308
1297
|
}
|
|
1309
1298
|
const result = [];
|
|
@@ -1541,7 +1530,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1541
1530
|
const terminateProcessGroup = fnUntraced(function* (command, childProcess, exitSignal, options) {
|
|
1542
1531
|
const signalGroup = (signal) => ownsProcessGroup(command, childProcess) ? killProcessGroup(command, childProcess, signal).pipe(catch_((error) => hasExited(childProcess) && isUnsignallableProcessGroup(error.cause) ? void_3 : killProcess(command, childProcess, signal))) : killProcess(command, childProcess, signal);
|
|
1543
1532
|
yield* signalGroup(options?.killSignal ?? "SIGTERM");
|
|
1544
|
-
if (
|
|
1533
|
+
if (isUndefined(options?.forceKillAfter)) {
|
|
1545
1534
|
yield* _await(exitSignal);
|
|
1546
1535
|
yield* awaitProcessExit(command, childProcess, processGroupGraceMillis);
|
|
1547
1536
|
} else {
|
|
@@ -1689,7 +1678,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1689
1678
|
const sourceStream = unwrap(succeed6(getSourceStream(handles[handles.length - 1], options.from)));
|
|
1690
1679
|
const toOption = options.to ?? "stdin";
|
|
1691
1680
|
if (toOption === "stdin") {
|
|
1692
|
-
handles.push(yield* spawnCommand(
|
|
1681
|
+
handles.push(yield* spawnCommand(make2(command.command, command.args, {
|
|
1693
1682
|
...command.options,
|
|
1694
1683
|
stdin: {
|
|
1695
1684
|
...stdinConfig,
|
|
@@ -1709,7 +1698,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1709
1698
|
type: "input",
|
|
1710
1699
|
stream: sourceStream
|
|
1711
1700
|
};
|
|
1712
|
-
handles.push(yield* spawnCommand(
|
|
1701
|
+
handles.push(yield* spawnCommand(make2(command.command, command.args, {
|
|
1713
1702
|
...command.options,
|
|
1714
1703
|
additionalFds: {
|
|
1715
1704
|
...existingFds,
|
|
@@ -1717,7 +1706,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1717
1706
|
}
|
|
1718
1707
|
})));
|
|
1719
1708
|
} else {
|
|
1720
|
-
handles.push(yield* spawnCommand(
|
|
1709
|
+
handles.push(yield* spawnCommand(make2(command.command, command.args, {
|
|
1721
1710
|
...command.options,
|
|
1722
1711
|
stdin: {
|
|
1723
1712
|
...stdinConfig,
|
|
@@ -1756,7 +1745,7 @@ var make19 = /* @__PURE__ */ gen(function* () {
|
|
|
1756
1745
|
}
|
|
1757
1746
|
}
|
|
1758
1747
|
});
|
|
1759
|
-
return
|
|
1748
|
+
return make(spawnCommand);
|
|
1760
1749
|
});
|
|
1761
1750
|
var layer5 = /* @__PURE__ */ effect(ChildProcessSpawner, make19);
|
|
1762
1751
|
var flattenCommand = (command) => {
|
|
@@ -2242,7 +2231,7 @@ var writeFile2 = (path, data, options) => callback3((resume, signal) => {
|
|
|
2242
2231
|
resume(fail7(handleBadArgument("writeFile")(err)));
|
|
2243
2232
|
}
|
|
2244
2233
|
});
|
|
2245
|
-
var makeFileSystem = /* @__PURE__ */ map8(/* @__PURE__ */ serviceOption(WatchBackend), (backend) =>
|
|
2234
|
+
var makeFileSystem = /* @__PURE__ */ map8(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make11({
|
|
2246
2235
|
access: access2,
|
|
2247
2236
|
chmod: chmod2,
|
|
2248
2237
|
chown: chown2,
|
|
@@ -2302,15 +2291,15 @@ var fileUrlOps = (windows) => ({
|
|
|
2302
2291
|
})
|
|
2303
2292
|
})
|
|
2304
2293
|
});
|
|
2305
|
-
var layerPosix = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */
|
|
2294
|
+
var layerPosix = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
|
|
2306
2295
|
...NodePath.posix,
|
|
2307
2296
|
.../* @__PURE__ */ fileUrlOps(false)
|
|
2308
2297
|
}));
|
|
2309
|
-
var layerWin32 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */
|
|
2298
|
+
var layerWin32 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
|
|
2310
2299
|
...NodePath.win32,
|
|
2311
2300
|
.../* @__PURE__ */ fileUrlOps(true)
|
|
2312
2301
|
}));
|
|
2313
|
-
var layer7 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */
|
|
2302
|
+
var layer7 = /* @__PURE__ */ succeed5(Path)(/* @__PURE__ */ make12({
|
|
2314
2303
|
...NodePath,
|
|
2315
2304
|
.../* @__PURE__ */ fileUrlOps(undefined)
|
|
2316
2305
|
}));
|
|
@@ -2832,12 +2821,12 @@ var redact2 = /* @__PURE__ */ dual(2, (self, key) => {
|
|
|
2832
2821
|
if (typeof key === "string") {
|
|
2833
2822
|
const k = key.toLowerCase();
|
|
2834
2823
|
if (k in self) {
|
|
2835
|
-
out[k] =
|
|
2824
|
+
out[k] = make16(self[k]);
|
|
2836
2825
|
}
|
|
2837
2826
|
} else {
|
|
2838
2827
|
for (const name in self) {
|
|
2839
2828
|
if (name.search(key) !== -1) {
|
|
2840
|
-
out[name] =
|
|
2829
|
+
out[name] = make16(self[name]);
|
|
2841
2830
|
}
|
|
2842
2831
|
}
|
|
2843
2832
|
}
|
|
@@ -2944,7 +2933,7 @@ var fromInputNested = (input) => {
|
|
|
2944
2933
|
return out;
|
|
2945
2934
|
};
|
|
2946
2935
|
var coerce = (value) => isRedacted(value) ? value : String(value);
|
|
2947
|
-
var Equivalence3 = /* @__PURE__ */
|
|
2936
|
+
var Equivalence3 = /* @__PURE__ */ make13((a, b) => arrayEquivalence(a.params, b.params));
|
|
2948
2937
|
var arrayEquivalence = /* @__PURE__ */ makeEquivalence2(/* @__PURE__ */ makeEquivalence3([/* @__PURE__ */ strictEqual(), /* @__PURE__ */ asEquivalence()]));
|
|
2949
2938
|
var empty4 = /* @__PURE__ */ make23([]);
|
|
2950
2939
|
var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
|
|
@@ -2963,7 +2952,7 @@ var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
|
|
|
2963
2952
|
var toString = (input) => new URLSearchParams(fromInput2(input).params.map(([key, value]) => [key, unwrap3(value)])).toString();
|
|
2964
2953
|
var redact3 = /* @__PURE__ */ dual(2, (self, key) => {
|
|
2965
2954
|
const patterns = Array.isArray(key) ? key : [key];
|
|
2966
|
-
return self.params.map(([name, value]) => [name, typeof value === "string" && isRedactedName2(name, patterns) ?
|
|
2955
|
+
return self.params.map(([name, value]) => [name, typeof value === "string" && isRedactedName2(name, patterns) ? make16(value) : value]);
|
|
2967
2956
|
});
|
|
2968
2957
|
var isRedactedName2 = isRedactedName;
|
|
2969
2958
|
var redactUrl = (url, redactedNames = currentRedactedNames()) => {
|
|
@@ -3039,7 +3028,7 @@ import * as readline from "readline";
|
|
|
3039
3028
|
var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
|
|
3040
3029
|
const stdin = process.stdin;
|
|
3041
3030
|
const stdout = process.stdout;
|
|
3042
|
-
const lines = yield*
|
|
3031
|
+
const lines = yield* make8();
|
|
3043
3032
|
let inputEnded = stdin.readableEnded;
|
|
3044
3033
|
let readlineActive = false;
|
|
3045
3034
|
const onStdinEnd = () => {
|
|
@@ -3050,7 +3039,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
|
|
|
3050
3039
|
};
|
|
3051
3040
|
stdin.once("end", onStdinEnd);
|
|
3052
3041
|
yield* addFinalizer2(() => sync2(() => stdin.off("end", onStdinEnd)));
|
|
3053
|
-
const rlRef = yield*
|
|
3042
|
+
const rlRef = yield* make9({
|
|
3054
3043
|
acquire: acquireRelease(sync2(() => {
|
|
3055
3044
|
const rl = readline.createInterface({
|
|
3056
3045
|
input: stdin,
|
|
@@ -3089,7 +3078,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
|
|
|
3089
3078
|
if (stdin.isTTY)
|
|
3090
3079
|
stdin.setRawMode(enabled);
|
|
3091
3080
|
});
|
|
3092
|
-
const rawModeRef = yield*
|
|
3081
|
+
const rawModeRef = yield* make9({
|
|
3093
3082
|
acquire: acquireRelease(setRawMode(true), () => setRawMode(false)),
|
|
3094
3083
|
idleTimeToLive: "10 millis"
|
|
3095
3084
|
});
|
|
@@ -3110,7 +3099,7 @@ var make25 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQui
|
|
|
3110
3099
|
return queue;
|
|
3111
3100
|
});
|
|
3112
3101
|
const readInput = gen(function* () {
|
|
3113
|
-
const queue = yield*
|
|
3102
|
+
const queue = yield* make8();
|
|
3114
3103
|
const handleKeypress = (s, k) => {
|
|
3115
3104
|
const userInput = {
|
|
3116
3105
|
input: fromUndefinedOr(s),
|
|
@@ -3460,7 +3449,7 @@ var placeholders = [
|
|
|
3460
3449
|
/^runner-secret:[A-Z0-9_]+:(?:env|file|exec)$/u
|
|
3461
3450
|
];
|
|
3462
3451
|
var isPlaceholder = (value) => placeholders.some((pattern) => pattern.test(value)) || isSecretReference(value);
|
|
3463
|
-
var holdsNoSecret = (classification, value) => (classification === "secret" || classification === "credential") &&
|
|
3452
|
+
var holdsNoSecret = (classification, value) => (classification === "secret" || classification === "credential") && isString2(value) && isPlaceholder(value.trim());
|
|
3464
3453
|
var unwrapped = (value) => value.replace(/^["'`(]+/u, "").replace(/["'`).]+$/u, "");
|
|
3465
3454
|
function looksLikeCredential(raw, matched) {
|
|
3466
3455
|
const value = unwrapped(raw);
|
|
@@ -3491,10 +3480,10 @@ var globalPattern = (rule) => {
|
|
|
3491
3480
|
};
|
|
3492
3481
|
var redactedBy = (text, rule) => text.replace(globalPattern(rule), (matched, ...rest) => {
|
|
3493
3482
|
const groups = rest.at(-1);
|
|
3494
|
-
const offset =
|
|
3495
|
-
const named =
|
|
3496
|
-
const value =
|
|
3497
|
-
const start = (
|
|
3483
|
+
const offset = isObject2(groups) ? rest.at(-3) : rest.at(-2);
|
|
3484
|
+
const named = isObject2(groups) && groups !== null && "value" in groups ? groups.value : undefined;
|
|
3485
|
+
const value = isString2(named) ? named : matched;
|
|
3486
|
+
const start = (isNumber2(offset) ? offset : 0) + matched.lastIndexOf(value);
|
|
3498
3487
|
return rule.holds === undefined || rule.holds(value, matched, text, start) ? `[REDACTED:${rule.classification}]` : matched;
|
|
3499
3488
|
});
|
|
3500
3489
|
var runnerSecretReference = /^runner-secret:[A-Z0-9_]+:(?:env|file|exec)$/u;
|
|
@@ -3508,7 +3497,7 @@ function classifiedValue(key, value, options) {
|
|
|
3508
3497
|
const classified = classifyAnything(key, value);
|
|
3509
3498
|
if (options.leavesKitman === true || classified === undefined || keptClassifications.has(classified.classification))
|
|
3510
3499
|
return classified;
|
|
3511
|
-
return
|
|
3500
|
+
return isString2(value) ? credentialIn(value) : undefined;
|
|
3512
3501
|
}
|
|
3513
3502
|
var keptClassifications = new Set(["secret", "credential", "unknown"]);
|
|
3514
3503
|
function credentialIn(value) {
|
|
@@ -3521,14 +3510,14 @@ function credentialIn(value) {
|
|
|
3521
3510
|
}
|
|
3522
3511
|
function classifyAnything(key, value) {
|
|
3523
3512
|
const normalizedKey = normalizeKey(key);
|
|
3524
|
-
if (LOCAL_PATH_KEYS.has(normalizedKey) &&
|
|
3513
|
+
if (LOCAL_PATH_KEYS.has(normalizedKey) && isString2(value) && isUnsafeLocalPath(value))
|
|
3525
3514
|
return { classification: "path" };
|
|
3526
3515
|
const byKey = KEY_CLASSIFICATION[normalizedKey];
|
|
3527
3516
|
if (byKey !== undefined)
|
|
3528
3517
|
return holdsNoSecret(byKey, value) ? undefined : { classification: byKey };
|
|
3529
3518
|
if (Array.isArray(value) || isPlainObject(value))
|
|
3530
3519
|
return;
|
|
3531
|
-
if (!
|
|
3520
|
+
if (!isString2(value)) {
|
|
3532
3521
|
const unsupported = unsupportedValueClassification(value);
|
|
3533
3522
|
return unsupported === undefined ? undefined : { classification: unsupported };
|
|
3534
3523
|
}
|
|
@@ -3566,13 +3555,13 @@ function scanValue(value, path, key, findings, depth, options = {}) {
|
|
|
3566
3555
|
findings.push(finding(path, "unknown", value, "max-depth"));
|
|
3567
3556
|
return;
|
|
3568
3557
|
}
|
|
3569
|
-
if (
|
|
3558
|
+
if (isString2(value) && REDACTED_PATTERN.test(value.trim()))
|
|
3570
3559
|
return;
|
|
3571
3560
|
if (key !== undefined) {
|
|
3572
3561
|
const normalizedKey = normalizeKey(key);
|
|
3573
3562
|
const classified = classifiedValue(key, value, options);
|
|
3574
3563
|
const keyClassification = classified?.classification;
|
|
3575
|
-
if ((keyClassification === undefined || keyClassification === "pii") && options.allowCanonicalIds === true && LIVE_CANONICAL_ID_KEYS.has(normalizedKey) &&
|
|
3564
|
+
if ((keyClassification === undefined || keyClassification === "pii") && options.allowCanonicalIds === true && LIVE_CANONICAL_ID_KEYS.has(normalizedKey) && isString2(value) && CANONICAL_ID_PATTERN.test(value) && /[A-Za-z]/u.test(value))
|
|
3576
3565
|
return;
|
|
3577
3566
|
if (classified !== undefined) {
|
|
3578
3567
|
findings.push(classifiedFinding(path, classified, value));
|
|
@@ -3591,7 +3580,7 @@ function scanValue(value, path, key, findings, depth, options = {}) {
|
|
|
3591
3580
|
const classified = classifiedValue(key ?? path, value, options);
|
|
3592
3581
|
if (classified !== undefined)
|
|
3593
3582
|
findings.push(classifiedFinding(path, classified, value));
|
|
3594
|
-
else if (
|
|
3583
|
+
else if (isString2(value) && value.length > (options.maxTextLength ?? durableTextLimit))
|
|
3595
3584
|
findings.push(finding(path, "unknown", value, "unbounded-text"));
|
|
3596
3585
|
}
|
|
3597
3586
|
function finding(path, classification, value, rule = "classified-key") {
|
|
@@ -3611,7 +3600,7 @@ function isUnsafeLocalPath(value) {
|
|
|
3611
3600
|
return value.startsWith("/") || value.startsWith("~") || value.includes("/.ssh") || value.includes("/.config") || value.includes("docker.sock");
|
|
3612
3601
|
}
|
|
3613
3602
|
function unsupportedValueClassification(value) {
|
|
3614
|
-
if (value !== null && value !== undefined && !
|
|
3603
|
+
if (value !== null && value !== undefined && !isString2(value) && !isNumber2(value) && !isBoolean2(value))
|
|
3615
3604
|
return "unknown";
|
|
3616
3605
|
return;
|
|
3617
3606
|
}
|
|
@@ -3631,7 +3620,7 @@ function boundText(value, max) {
|
|
|
3631
3620
|
return value.length <= max ? value : `${value.slice(0, max - 1)}\u2026`;
|
|
3632
3621
|
}
|
|
3633
3622
|
function isPlainObject(value) {
|
|
3634
|
-
if (!
|
|
3623
|
+
if (!isObject2(value) || value === null)
|
|
3635
3624
|
return false;
|
|
3636
3625
|
const prototype = Object.getPrototypeOf(value);
|
|
3637
3626
|
return prototype === Object.prototype || prototype === null;
|
|
@@ -3639,9 +3628,9 @@ function isPlainObject(value) {
|
|
|
3639
3628
|
function canonicalJson2(value) {
|
|
3640
3629
|
if (value === null)
|
|
3641
3630
|
return "null";
|
|
3642
|
-
if (
|
|
3631
|
+
if (isString2(value))
|
|
3643
3632
|
return JSON.stringify(value);
|
|
3644
|
-
if (
|
|
3633
|
+
if (isNumber2(value) || isBoolean2(value))
|
|
3645
3634
|
return String(value);
|
|
3646
3635
|
if (Array.isArray(value))
|
|
3647
3636
|
return `[${value.map(canonicalJson2).join(",")}]`;
|
|
@@ -3798,16 +3787,16 @@ function redactResponseValue(value, key, depth) {
|
|
|
3798
3787
|
return "[REDACTED:unknown]";
|
|
3799
3788
|
const byKey = key === undefined ? undefined : KEY_CLASSIFICATION[normalizeKey(key)];
|
|
3800
3789
|
if ((byKey === "secret" || byKey === "credential") && value !== null && value !== undefined && !holdsNoSecret(byKey, value))
|
|
3801
|
-
return
|
|
3790
|
+
return isString2(value) && REDACTED_PATTERN.test(value.trim()) ? value : `[REDACTED:${byKey}]`;
|
|
3802
3791
|
if (Array.isArray(value))
|
|
3803
3792
|
return value.map((item) => redactResponseValue(item, undefined, depth + 1));
|
|
3804
3793
|
if (isPlainObject(value))
|
|
3805
3794
|
return Object.fromEntries(Object.entries(value).flatMap(([childKey, child]) => child === undefined ? [] : [[childKey, redactResponseValue(child, childKey, depth + 1)]]));
|
|
3806
|
-
if (
|
|
3795
|
+
if (isString2(value))
|
|
3807
3796
|
return runnerSecretReference.test(value) ? value : RESPONSE_RULES.reduce(redactedBy, value);
|
|
3808
|
-
if (value === undefined ||
|
|
3797
|
+
if (value === undefined || isNumber2(value) && !Number.isFinite(value))
|
|
3809
3798
|
return null;
|
|
3810
|
-
if (value === null ||
|
|
3799
|
+
if (value === null || isNumber2(value) || isBoolean2(value))
|
|
3811
3800
|
return value;
|
|
3812
3801
|
return "[REDACTED:unknown]";
|
|
3813
3802
|
}
|
|
@@ -4601,7 +4590,7 @@ function findForbiddenSecretPath(value, path) {
|
|
|
4601
4590
|
}
|
|
4602
4591
|
return;
|
|
4603
4592
|
}
|
|
4604
|
-
if (!
|
|
4593
|
+
if (!isObject2(value) || value === null)
|
|
4605
4594
|
return secretStringPath(value, path);
|
|
4606
4595
|
for (const key of Object.keys(value)) {
|
|
4607
4596
|
const item = Object.getOwnPropertyDescriptor(value, key)?.value;
|
|
@@ -4615,7 +4604,7 @@ function findForbiddenSecretPath(value, path) {
|
|
|
4615
4604
|
return;
|
|
4616
4605
|
}
|
|
4617
4606
|
function secretStringPath(value, path) {
|
|
4618
|
-
if (!
|
|
4607
|
+
if (!isString2(value))
|
|
4619
4608
|
return;
|
|
4620
4609
|
const key = path[path.length - 1] ?? "";
|
|
4621
4610
|
const parentKey = path[path.length - 2] ?? "";
|
|
@@ -4646,7 +4635,7 @@ function isSecretLikeValue(value) {
|
|
|
4646
4635
|
return /secret|token|password|private/i.test(value) || SecretLikeValuePattern.test(value);
|
|
4647
4636
|
}
|
|
4648
4637
|
function isAllowedEnvironmentReferenceField(value, path) {
|
|
4649
|
-
if (!
|
|
4638
|
+
if (!isString2(value))
|
|
4650
4639
|
return false;
|
|
4651
4640
|
const parentKey = path[path.length - 2] ?? "";
|
|
4652
4641
|
if (!/^(env|headers)$/i.test(parentKey))
|
|
@@ -4768,14 +4757,14 @@ function findForbiddenRepoBindingValuePath(value, path) {
|
|
|
4768
4757
|
}
|
|
4769
4758
|
return;
|
|
4770
4759
|
}
|
|
4771
|
-
if (!
|
|
4760
|
+
if (!isObject2(value) || value === null)
|
|
4772
4761
|
return forbiddenRepoBindingStringPath(value, path);
|
|
4773
4762
|
for (const key of Object.keys(value)) {
|
|
4774
4763
|
const nextPath = [...path, key];
|
|
4775
4764
|
const item = Object.getOwnPropertyDescriptor(value, key)?.value;
|
|
4776
4765
|
if (isForbiddenSecretKey2(key))
|
|
4777
4766
|
return nextPath.join(".");
|
|
4778
|
-
if (key === "repositoryUrl" &&
|
|
4767
|
+
if (key === "repositoryUrl" && isString2(item) && repositoryUrlContainsCredentials(item))
|
|
4779
4768
|
return nextPath.join(".");
|
|
4780
4769
|
const found = findForbiddenRepoBindingValuePath(item, nextPath);
|
|
4781
4770
|
if (found !== undefined)
|
|
@@ -4784,7 +4773,7 @@ function findForbiddenRepoBindingValuePath(value, path) {
|
|
|
4784
4773
|
return;
|
|
4785
4774
|
}
|
|
4786
4775
|
function forbiddenRepoBindingStringPath(value, path) {
|
|
4787
|
-
if (!
|
|
4776
|
+
if (!isString2(value))
|
|
4788
4777
|
return;
|
|
4789
4778
|
const key = path[path.length - 1] ?? "";
|
|
4790
4779
|
if (isSecretValueKey2(key) && /secret|token|password|private|ghp_|glpat-|sk-[A-Za-z0-9_-]{8,}/i.test(value))
|
|
@@ -5396,22 +5385,22 @@ function canonicalJson(value) {
|
|
|
5396
5385
|
function canonicalJsonValue(value, propertyName) {
|
|
5397
5386
|
if (value === null)
|
|
5398
5387
|
return "null";
|
|
5399
|
-
if (
|
|
5388
|
+
if (isString2(value))
|
|
5400
5389
|
return JSON.stringify(propertyName !== undefined && /(?:digest|sha256)$/i.test(propertyName) ? value.toLowerCase() : value);
|
|
5401
|
-
if (
|
|
5390
|
+
if (isBoolean2(value))
|
|
5402
5391
|
return value ? "true" : "false";
|
|
5403
|
-
if (
|
|
5392
|
+
if (isNumber2(value)) {
|
|
5404
5393
|
if (!Number.isFinite(value))
|
|
5405
5394
|
throw new TypeError("Canonical JSON cannot contain non-finite numbers");
|
|
5406
5395
|
return JSON.stringify(value);
|
|
5407
5396
|
}
|
|
5408
|
-
if (
|
|
5397
|
+
if (isUndefined2(value))
|
|
5409
5398
|
throw new TypeError("Canonical JSON cannot contain undefined values");
|
|
5410
|
-
if (isBigInt(value) ||
|
|
5399
|
+
if (isBigInt(value) || isFunction2(value) || isSymbol(value))
|
|
5411
5400
|
throw new TypeError(`Canonical JSON cannot contain ${kindOf(value)}`);
|
|
5412
5401
|
if (Array.isArray(value))
|
|
5413
5402
|
return `[${value.map((item) => canonicalJsonValue(item)).join(",")}]`;
|
|
5414
|
-
if (
|
|
5403
|
+
if (isObject2(value))
|
|
5415
5404
|
return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${canonicalJsonValue(Object.getOwnPropertyDescriptor(value, key)?.value, key)}`).join(",")}}`;
|
|
5416
5405
|
throw new TypeError("Canonical JSON value is not supported");
|
|
5417
5406
|
}
|
|
@@ -9922,14 +9911,14 @@ function makeWith(method, url, urlParams, hash, headers, body) {
|
|
|
9922
9911
|
return self;
|
|
9923
9912
|
}
|
|
9924
9913
|
var empty6 = /* @__PURE__ */ makeWith("GET", "", empty4, /* @__PURE__ */ none(), empty, empty5);
|
|
9925
|
-
var
|
|
9914
|
+
var make4 = (method) => (url, options) => modify(empty6, {
|
|
9926
9915
|
method,
|
|
9927
9916
|
url,
|
|
9928
9917
|
...options ?? undefined
|
|
9929
9918
|
});
|
|
9930
|
-
var get = /* @__PURE__ */
|
|
9931
|
-
var post = /* @__PURE__ */
|
|
9932
|
-
var put = /* @__PURE__ */
|
|
9919
|
+
var get = /* @__PURE__ */ make4("GET");
|
|
9920
|
+
var post = /* @__PURE__ */ make4("POST");
|
|
9921
|
+
var put = /* @__PURE__ */ make4("PUT");
|
|
9933
9922
|
var modify = /* @__PURE__ */ dual(2, (self, options) => {
|
|
9934
9923
|
let result = self;
|
|
9935
9924
|
if (options.method) {
|
|
@@ -10230,7 +10219,7 @@ var Proto7 = {
|
|
|
10230
10219
|
};
|
|
10231
10220
|
},
|
|
10232
10221
|
.../* @__PURE__ */ Object.fromEntries(/* @__PURE__ */ allShort.map(([fullMethod, method]) => [method, function(url, options) {
|
|
10233
|
-
return this.execute(
|
|
10222
|
+
return this.execute(make4(fullMethod)(url, options));
|
|
10234
10223
|
}]))
|
|
10235
10224
|
};
|
|
10236
10225
|
var make27 = (f) => makeWith2((effect) => flatMap3(effect, (request) => withFiber2((fiber) => {
|
|
@@ -11099,7 +11088,7 @@ var spanIdPattern = /^[a-f0-9]{16}$/u;
|
|
|
11099
11088
|
var traceFlagsPattern = /^[a-f0-9]{2}$/u;
|
|
11100
11089
|
var telemetrySequence = 0;
|
|
11101
11090
|
function parseTraceparent(value) {
|
|
11102
|
-
if (!
|
|
11091
|
+
if (!isString2(value))
|
|
11103
11092
|
return;
|
|
11104
11093
|
const parts = value.trim().split("-");
|
|
11105
11094
|
if (parts.length !== 4 || parts[0] !== "00")
|
|
@@ -11129,7 +11118,7 @@ function injectTraceContext(headers, context, requestId) {
|
|
|
11129
11118
|
}
|
|
11130
11119
|
}
|
|
11131
11120
|
function normalizeRequestId(value) {
|
|
11132
|
-
if (
|
|
11121
|
+
if (isString2(value) && /^[A-Za-z0-9._:-]{1,128}$/u.test(value))
|
|
11133
11122
|
return value;
|
|
11134
11123
|
telemetrySequence += 1;
|
|
11135
11124
|
return `req-${Date.now().toString(36)}-${telemetrySequence.toString(36)}`;
|
|
@@ -11501,7 +11490,7 @@ class KitmanEffectClient {
|
|
|
11501
11490
|
for (const [key, value] of new Headers(input.headers))
|
|
11502
11491
|
headers.set(key, value);
|
|
11503
11492
|
let body;
|
|
11504
|
-
if (
|
|
11493
|
+
if (isString2(input.body))
|
|
11505
11494
|
body = input.body;
|
|
11506
11495
|
else if (input.body !== undefined)
|
|
11507
11496
|
body = JSON.stringify(input.body);
|
|
@@ -13239,7 +13228,7 @@ function errorResponseDetails(response) {
|
|
|
13239
13228
|
}), orElseSucceed(() => ({})));
|
|
13240
13229
|
}
|
|
13241
13230
|
function parseErrorResponse(body) {
|
|
13242
|
-
if (
|
|
13231
|
+
if (isString2(body)) {
|
|
13243
13232
|
const message = sanitizeErrorDetail(body);
|
|
13244
13233
|
return message === undefined ? {} : { message };
|
|
13245
13234
|
}
|
|
@@ -13250,27 +13239,27 @@ function parseErrorResponse(body) {
|
|
|
13250
13239
|
const message = firstErrorMessage(error);
|
|
13251
13240
|
return {
|
|
13252
13241
|
...message === undefined ? undefined : { message },
|
|
13253
|
-
...
|
|
13254
|
-
...
|
|
13255
|
-
...
|
|
13242
|
+
...isString2(error.code) ? { code: error.code } : undefined,
|
|
13243
|
+
...isBoolean2(error.retryable) ? { retryable: error.retryable } : undefined,
|
|
13244
|
+
...isString2(error.requestId) ? { requestId: error.requestId } : undefined,
|
|
13256
13245
|
...error.details === undefined ? undefined : { details: error.details },
|
|
13257
|
-
...
|
|
13258
|
-
...
|
|
13246
|
+
...isNumber2(error.retryAfterSeconds) ? { retryAfterSeconds: error.retryAfterSeconds } : undefined,
|
|
13247
|
+
...isNumber2(error.currentResourceVersion) ? { currentResourceVersion: error.currentResourceVersion } : undefined
|
|
13259
13248
|
};
|
|
13260
13249
|
}
|
|
13261
13250
|
function firstErrorMessage(record) {
|
|
13262
13251
|
for (const candidate of [record.message, record.error, record.detail, record.details]) {
|
|
13263
|
-
if (
|
|
13252
|
+
if (isString2(candidate))
|
|
13264
13253
|
return sanitizeErrorDetail(candidate);
|
|
13265
13254
|
if (Array.isArray(candidate))
|
|
13266
|
-
return sanitizeErrorDetail(candidate.map((item) =>
|
|
13267
|
-
if (
|
|
13255
|
+
return sanitizeErrorDetail(candidate.map((item) => isString2(item) ? item : JSON.stringify(item)).join("; "));
|
|
13256
|
+
if (isObject2(candidate) && candidate !== null)
|
|
13268
13257
|
return sanitizeErrorDetail(JSON.stringify(candidate));
|
|
13269
13258
|
}
|
|
13270
13259
|
return sanitizeErrorDetail(JSON.stringify(record));
|
|
13271
13260
|
}
|
|
13272
13261
|
function errorResponseObject(value) {
|
|
13273
|
-
if (!
|
|
13262
|
+
if (!isObject2(value) || value === null || Array.isArray(value))
|
|
13274
13263
|
return;
|
|
13275
13264
|
const object = {};
|
|
13276
13265
|
for (const field of Object.keys(value))
|
|
@@ -13497,9 +13486,9 @@ function parseCliConfig(value) {
|
|
|
13497
13486
|
return;
|
|
13498
13487
|
const text = (key) => {
|
|
13499
13488
|
const field = value[key];
|
|
13500
|
-
return
|
|
13489
|
+
return isString2(field) ? { [key]: field } : undefined;
|
|
13501
13490
|
};
|
|
13502
|
-
const ids = (field) => Array.isArray(field) && field.every(
|
|
13491
|
+
const ids = (field) => Array.isArray(field) && field.every(isString2) ? field : undefined;
|
|
13503
13492
|
const onboarding = isJsonObject(value.onboarding) ? value.onboarding : undefined;
|
|
13504
13493
|
const mcpSkippedTeamIds = ids(onboarding?.mcpSkippedTeamIds);
|
|
13505
13494
|
return {
|
|
@@ -13788,19 +13777,19 @@ function isStoredAgentCredential(value) {
|
|
|
13788
13777
|
function isStoredJwk(value) {
|
|
13789
13778
|
if (!isRecord(value) || !isNonEmptyString(value.kty))
|
|
13790
13779
|
return false;
|
|
13791
|
-
return Object.values(value).every((item) =>
|
|
13780
|
+
return Object.values(value).every((item) => isString2(item) || isBoolean2(item) || isStringArray(item));
|
|
13792
13781
|
}
|
|
13793
13782
|
function isRecord(value) {
|
|
13794
|
-
return
|
|
13783
|
+
return isObject2(value) && value !== null;
|
|
13795
13784
|
}
|
|
13796
13785
|
function isNonEmptyString(value) {
|
|
13797
|
-
return
|
|
13786
|
+
return isString2(value) && value.length > 0;
|
|
13798
13787
|
}
|
|
13799
13788
|
function optionalString(value) {
|
|
13800
|
-
return value === undefined ||
|
|
13789
|
+
return value === undefined || isString2(value);
|
|
13801
13790
|
}
|
|
13802
13791
|
function isStringArray(value) {
|
|
13803
|
-
return Array.isArray(value) && value.every((item) =>
|
|
13792
|
+
return Array.isArray(value) && value.every((item) => isString2(item));
|
|
13804
13793
|
}
|
|
13805
13794
|
|
|
13806
13795
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/PrimaryKey.js
|
|
@@ -13918,7 +13907,7 @@ var makeProto = (options) => {
|
|
|
13918
13907
|
Rpc.key = `effect/rpc/Rpc/${options._tag}`;
|
|
13919
13908
|
return Rpc;
|
|
13920
13909
|
};
|
|
13921
|
-
var
|
|
13910
|
+
var make5 = (tag, options) => {
|
|
13922
13911
|
const successSchema = options?.success ?? Void;
|
|
13923
13912
|
const errorSchema = options?.error ?? Never;
|
|
13924
13913
|
const defectSchema = options?.defect ?? Defect();
|
|
@@ -14129,7 +14118,7 @@ var RpcGroupProto = {
|
|
|
14129
14118
|
});
|
|
14130
14119
|
},
|
|
14131
14120
|
annotateRpcs(service, value) {
|
|
14132
|
-
return this.annotateRpcsMerge(
|
|
14121
|
+
return this.annotateRpcsMerge(make14(service, value));
|
|
14133
14122
|
},
|
|
14134
14123
|
annotateMerge(context) {
|
|
14135
14124
|
return makeProto2({
|
|
@@ -14152,7 +14141,7 @@ var makeProto2 = (options) => Object.assign(function() {}, RpcGroupProto, {
|
|
|
14152
14141
|
requests: options.requests,
|
|
14153
14142
|
annotations: options.annotations
|
|
14154
14143
|
});
|
|
14155
|
-
var
|
|
14144
|
+
var make6 = (...rpcs) => makeProto2({
|
|
14156
14145
|
requests: new Map(rpcs.map((rpc) => [rpc._tag, rpc])),
|
|
14157
14146
|
annotations: empty3()
|
|
14158
14147
|
});
|
|
@@ -14258,96 +14247,96 @@ var ProgramOutcome = Union([
|
|
|
14258
14247
|
Struct({ status: Literal("failed"), failureSummary: String4 })
|
|
14259
14248
|
]);
|
|
14260
14249
|
|
|
14261
|
-
class RunnerReplicaRpcs extends
|
|
14250
|
+
class RunnerReplicaRpcs extends make6(make5("Claim", {
|
|
14262
14251
|
payload: WorkUnitClaimInput,
|
|
14263
14252
|
success: WorkUnitClaimResult,
|
|
14264
14253
|
error: RunnerRpcError
|
|
14265
|
-
}),
|
|
14254
|
+
}), make5("Heartbeat", {
|
|
14266
14255
|
payload: WorkUnitHeartbeatInput,
|
|
14267
14256
|
success: WorkUnitHeartbeatResult,
|
|
14268
14257
|
error: RunnerRpcError
|
|
14269
|
-
}),
|
|
14258
|
+
}), make5("Complete", {
|
|
14270
14259
|
payload: WorkUnitCompletion,
|
|
14271
14260
|
error: RunnerRpcError
|
|
14272
|
-
}),
|
|
14261
|
+
}), make5("Release", {
|
|
14273
14262
|
payload: WorkUnitReleaseInput,
|
|
14274
14263
|
error: RunnerRpcError
|
|
14275
|
-
}),
|
|
14264
|
+
}), make5("Signals", {
|
|
14276
14265
|
payload: { runnerReplicaId: String4 },
|
|
14277
14266
|
success: RunnerSignal,
|
|
14278
14267
|
error: RunnerRpcError,
|
|
14279
14268
|
stream: true
|
|
14280
|
-
}),
|
|
14269
|
+
}), make5("ReportSteer", {
|
|
14281
14270
|
payload: { workUnitId: String4, messageId: String4, delivered: Boolean2 },
|
|
14282
14271
|
success: Void,
|
|
14283
14272
|
error: RunnerRpcError
|
|
14284
|
-
}),
|
|
14273
|
+
}), make5("AppendTranscript", {
|
|
14285
14274
|
payload: { workUnitId: String4, entries: ArraySchema(TranscriptAppendEntry).check(isMaxLength(100)) },
|
|
14286
14275
|
success: Void,
|
|
14287
14276
|
error: RunnerRpcError
|
|
14288
|
-
}),
|
|
14277
|
+
}), make5("CreateCheckpointFile", {
|
|
14289
14278
|
payload: { lease: ProgramLease, byteSize: Int, sha256: String4 },
|
|
14290
14279
|
success: Struct({ file: RunFileRecord, upload: optional(RunFileUpload) }),
|
|
14291
14280
|
error: Union([RunnerRpcError, RunFileRefused])
|
|
14292
|
-
}),
|
|
14281
|
+
}), make5("CheckpointFileParts", {
|
|
14293
14282
|
payload: { lease: ProgramLease, fileId: String4, partNumbers: ArraySchema(Int) },
|
|
14294
14283
|
success: Struct({ parts: ArraySchema(RunFilePartUrl) }),
|
|
14295
14284
|
error: RunnerRpcError
|
|
14296
|
-
}),
|
|
14285
|
+
}), make5("CompleteCheckpointFile", {
|
|
14297
14286
|
payload: { lease: ProgramLease, fileId: String4, parts: optional(ArraySchema(UploadedRunFilePart)) },
|
|
14298
14287
|
success: RunFileRecord,
|
|
14299
14288
|
error: RunnerRpcError
|
|
14300
|
-
}),
|
|
14289
|
+
}), make5("SaveCheckpoint", {
|
|
14301
14290
|
payload: { lease: ProgramLease, checkpoint: StepCheckpoint },
|
|
14302
14291
|
success: Void,
|
|
14303
14292
|
error: RunnerRpcError
|
|
14304
|
-
}),
|
|
14293
|
+
}), make5("ResumeCheckpoint", {
|
|
14305
14294
|
payload: { lease: ProgramLease },
|
|
14306
14295
|
success: UndefinedOr(ResumedCheckpoint),
|
|
14307
14296
|
error: RunnerRpcError
|
|
14308
|
-
}),
|
|
14297
|
+
}), make5("SettledCheckpoints", {
|
|
14309
14298
|
success: ArraySchema(Struct({
|
|
14310
14299
|
stepAttemptId: String4,
|
|
14311
14300
|
ref: optionalKey(String4),
|
|
14312
14301
|
repoBinding: optionalKey(WorkUnitRepoBinding)
|
|
14313
14302
|
})),
|
|
14314
14303
|
error: RunnerRpcError
|
|
14315
|
-
}),
|
|
14304
|
+
}), make5("ForgetCheckpoints", {
|
|
14316
14305
|
payload: { stepAttemptIds: ArraySchema(String4) },
|
|
14317
14306
|
success: Void,
|
|
14318
14307
|
error: RunnerRpcError
|
|
14319
|
-
}),
|
|
14308
|
+
}), make5("GitCredential", {
|
|
14320
14309
|
payload: { repoBindingId: String4 },
|
|
14321
14310
|
success: UndefinedOr(Struct({ username: String4, password: String4 })),
|
|
14322
14311
|
error: RunnerRpcError
|
|
14323
|
-
}),
|
|
14312
|
+
}), make5("Bundle", {
|
|
14324
14313
|
payload: { digest: String4 },
|
|
14325
14314
|
success: Struct({ bundle: String4 }),
|
|
14326
14315
|
error: RunnerRpcError
|
|
14327
|
-
}),
|
|
14316
|
+
}), make5("SettledRuns", {
|
|
14328
14317
|
payload: { runIds: ArraySchema(String4) },
|
|
14329
14318
|
success: ArraySchema(String4),
|
|
14330
14319
|
error: RunnerRpcError
|
|
14331
|
-
}),
|
|
14320
|
+
}), make5("KnownEvidence", {
|
|
14332
14321
|
payload: { lease: ProgramLease, trees: ArraySchema(String4) },
|
|
14333
14322
|
success: ArraySchema(Struct({ tree: String4, name: String4, command: String4 })),
|
|
14334
14323
|
error: RunnerRpcError
|
|
14335
14324
|
})).middleware(RunnerAuthentication) {
|
|
14336
14325
|
}
|
|
14337
14326
|
|
|
14338
|
-
class RunnerJournalRpcs extends
|
|
14327
|
+
class RunnerJournalRpcs extends make6(make5("RecordActivity", {
|
|
14339
14328
|
payload: { lease: ProgramLease, name: String4, attempt: Int, exit: Json },
|
|
14340
14329
|
error: RunnerRpcError
|
|
14341
|
-
}),
|
|
14330
|
+
}), make5("DeferredDone", {
|
|
14342
14331
|
payload: { lease: ProgramLease, name: String4, exit: Json },
|
|
14343
14332
|
error: RunnerRpcError
|
|
14344
|
-
}),
|
|
14333
|
+
}), make5("ScheduleClock", {
|
|
14345
14334
|
payload: { lease: ProgramLease, name: String4, deferredName: String4, durationMillis: Int },
|
|
14346
14335
|
error: RunnerRpcError
|
|
14347
|
-
}),
|
|
14336
|
+
}), make5("Suspend", { payload: { lease: ProgramLease }, error: RunnerRpcError }), make5("FinishProgram", { payload: { lease: ProgramLease, outcome: ProgramOutcome }, error: RunnerRpcError })).middleware(RunnerAuthentication) {
|
|
14348
14337
|
}
|
|
14349
14338
|
|
|
14350
|
-
class RunnerCapabilityRpcs extends
|
|
14339
|
+
class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
|
|
14351
14340
|
payload: {
|
|
14352
14341
|
lease: ProgramLease,
|
|
14353
14342
|
step: String4,
|
|
@@ -14367,7 +14356,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14367
14356
|
},
|
|
14368
14357
|
success: Struct({ questionId: String4 }),
|
|
14369
14358
|
error: RunnerRpcError
|
|
14370
|
-
}),
|
|
14359
|
+
}), make5("StartAgentStep", {
|
|
14371
14360
|
payload: {
|
|
14372
14361
|
lease: ProgramLease,
|
|
14373
14362
|
step: String4,
|
|
@@ -14383,7 +14372,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14383
14372
|
},
|
|
14384
14373
|
success: Struct({ stepAttemptId: String4 }),
|
|
14385
14374
|
error: RunnerRpcError
|
|
14386
|
-
}),
|
|
14375
|
+
}), make5("StartVerification", {
|
|
14387
14376
|
payload: {
|
|
14388
14377
|
lease: ProgramLease,
|
|
14389
14378
|
step: String4,
|
|
@@ -14404,7 +14393,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14404
14393
|
},
|
|
14405
14394
|
success: Struct({ verificationId: String4 }),
|
|
14406
14395
|
error: RunnerRpcError
|
|
14407
|
-
}),
|
|
14396
|
+
}), make5("AwaitEvent", {
|
|
14408
14397
|
payload: {
|
|
14409
14398
|
lease: ProgramLease,
|
|
14410
14399
|
step: String4,
|
|
@@ -14420,7 +14409,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14420
14409
|
})))
|
|
14421
14410
|
},
|
|
14422
14411
|
error: RunnerRpcError
|
|
14423
|
-
}),
|
|
14412
|
+
}), make5("ClaimResource", {
|
|
14424
14413
|
payload: {
|
|
14425
14414
|
lease: ProgramLease,
|
|
14426
14415
|
step: String4,
|
|
@@ -14429,7 +14418,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14429
14418
|
action: Literals(["claim", "take_over", "let_go"])
|
|
14430
14419
|
},
|
|
14431
14420
|
error: RunnerRpcError
|
|
14432
|
-
}),
|
|
14421
|
+
}), make5("AdmitChild", {
|
|
14433
14422
|
payload: {
|
|
14434
14423
|
lease: ProgramLease,
|
|
14435
14424
|
step: String4,
|
|
@@ -14440,7 +14429,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14440
14429
|
},
|
|
14441
14430
|
success: Struct({ runId: String4 }),
|
|
14442
14431
|
error: RunnerRpcError
|
|
14443
|
-
}),
|
|
14432
|
+
}), make5("StoreArtifact", {
|
|
14444
14433
|
payload: {
|
|
14445
14434
|
lease: ProgramLease,
|
|
14446
14435
|
step: String4,
|
|
@@ -14452,7 +14441,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14452
14441
|
},
|
|
14453
14442
|
success: Struct({ artifactId: String4 }),
|
|
14454
14443
|
error: RunnerRpcError
|
|
14455
|
-
}),
|
|
14444
|
+
}), make5("RecordNote", {
|
|
14456
14445
|
payload: {
|
|
14457
14446
|
lease: ProgramLease,
|
|
14458
14447
|
step: String4,
|
|
@@ -14461,7 +14450,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14461
14450
|
kind: optional(Literals(["note", "blocker"]))
|
|
14462
14451
|
},
|
|
14463
14452
|
error: RunnerRpcError
|
|
14464
|
-
}),
|
|
14453
|
+
}), make5("PerformHostEffect", {
|
|
14465
14454
|
payload: {
|
|
14466
14455
|
lease: ProgramLease,
|
|
14467
14456
|
step: String4,
|
|
@@ -14490,7 +14479,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14490
14479
|
},
|
|
14491
14480
|
success: UndefinedOr(Struct({ id: String4, number: String4, url: String4 })),
|
|
14492
14481
|
error: RunnerRpcError
|
|
14493
|
-
}),
|
|
14482
|
+
}), make5("AlertTask", {
|
|
14494
14483
|
payload: {
|
|
14495
14484
|
lease: ProgramLease,
|
|
14496
14485
|
step: String4,
|
|
@@ -14507,7 +14496,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14507
14496
|
joined: optionalKey(Struct({ kind: Literals(["run", "recent"]), runId: String4 }))
|
|
14508
14497
|
}),
|
|
14509
14498
|
error: RunnerRpcError
|
|
14510
|
-
}),
|
|
14499
|
+
}), make5("ReadTranscripts", {
|
|
14511
14500
|
payload: {
|
|
14512
14501
|
lease: ProgramLease,
|
|
14513
14502
|
step: String4,
|
|
@@ -14542,7 +14531,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14542
14531
|
})))
|
|
14543
14532
|
}),
|
|
14544
14533
|
error: RunnerRpcError
|
|
14545
|
-
}),
|
|
14534
|
+
}), make5("PipelineStatus", {
|
|
14546
14535
|
payload: { lease: ProgramLease, step: String4, changeRequestId: String4 },
|
|
14547
14536
|
success: Struct({
|
|
14548
14537
|
head: String4,
|
|
@@ -14576,11 +14565,11 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14576
14565
|
}))
|
|
14577
14566
|
}),
|
|
14578
14567
|
error: RunnerRpcError
|
|
14579
|
-
}),
|
|
14568
|
+
}), make5("ReportPipeline", {
|
|
14580
14569
|
payload: { lease: ProgramLease, step: String4, changeRequestId: String4, verification: String4 },
|
|
14581
14570
|
success: Struct({ head: String4, status: Literals(["success", "failed"]) }),
|
|
14582
14571
|
error: RunnerRpcError
|
|
14583
|
-
}),
|
|
14572
|
+
}), make5("ReviewThreads", {
|
|
14584
14573
|
payload: { lease: ProgramLease, step: String4, changeRequestId: String4 },
|
|
14585
14574
|
success: Struct({
|
|
14586
14575
|
threads: ArraySchema(Struct({
|
|
@@ -14592,7 +14581,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14592
14581
|
}))
|
|
14593
14582
|
}),
|
|
14594
14583
|
error: RunnerRpcError
|
|
14595
|
-
}),
|
|
14584
|
+
}), make5("OpenChangeRequests", {
|
|
14596
14585
|
payload: { lease: ProgramLease, step: String4, authors: NonEmptyArray(String4) },
|
|
14597
14586
|
success: Struct({
|
|
14598
14587
|
changeRequests: ArraySchema(Struct({
|
|
@@ -14606,7 +14595,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14606
14595
|
}))
|
|
14607
14596
|
}),
|
|
14608
14597
|
error: RunnerRpcError
|
|
14609
|
-
}),
|
|
14598
|
+
}), make5("OwnChangeRequests", {
|
|
14610
14599
|
payload: { lease: ProgramLease, step: String4 },
|
|
14611
14600
|
success: Struct({
|
|
14612
14601
|
changeRequests: ArraySchema(Struct({
|
|
@@ -14619,7 +14608,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14619
14608
|
}))
|
|
14620
14609
|
}),
|
|
14621
14610
|
error: RunnerRpcError
|
|
14622
|
-
}),
|
|
14611
|
+
}), make5("Propose", {
|
|
14623
14612
|
payload: {
|
|
14624
14613
|
lease: ProgramLease,
|
|
14625
14614
|
step: String4,
|
|
@@ -14648,7 +14637,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14648
14637
|
task: optionalKey(Struct({ id: String4, active: Boolean2 }))
|
|
14649
14638
|
}),
|
|
14650
14639
|
error: RunnerRpcError
|
|
14651
|
-
}),
|
|
14640
|
+
}), make5("ReadProject", {
|
|
14652
14641
|
payload: { lease: ProgramLease, step: String4, projectId: String4 },
|
|
14653
14642
|
success: Struct({
|
|
14654
14643
|
project: Struct({ id: String4, name: String4 }),
|
|
@@ -14671,7 +14660,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14671
14660
|
taskChanges: ArraySchema(Struct({ taskKey: String4, title: String4, change: String4, at: String4 }))
|
|
14672
14661
|
}),
|
|
14673
14662
|
error: RunnerRpcError
|
|
14674
|
-
}),
|
|
14663
|
+
}), make5("DraftUpdate", {
|
|
14675
14664
|
payload: {
|
|
14676
14665
|
lease: ProgramLease,
|
|
14677
14666
|
step: String4,
|
|
@@ -14686,7 +14675,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14686
14675
|
},
|
|
14687
14676
|
success: Struct({ id: String4 }),
|
|
14688
14677
|
error: RunnerRpcError
|
|
14689
|
-
}),
|
|
14678
|
+
}), make5("CreatePlanTasks", {
|
|
14690
14679
|
payload: {
|
|
14691
14680
|
lease: ProgramLease,
|
|
14692
14681
|
projectId: optionalKey(String4),
|
|
@@ -14704,15 +14693,15 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14704
14693
|
},
|
|
14705
14694
|
success: ArraySchema(Struct({ key: String4, taskId: String4 })),
|
|
14706
14695
|
error: RunnerRpcError
|
|
14707
|
-
}),
|
|
14696
|
+
}), make5("IntegrationBranch", {
|
|
14708
14697
|
payload: { lease: ProgramLease, repoBindingId: optionalKey(String4) },
|
|
14709
14698
|
success: Struct({ repoBindingId: String4, branch: String4, revision: String4 }),
|
|
14710
14699
|
error: RunnerRpcError
|
|
14711
|
-
}),
|
|
14700
|
+
}), make5("DeliveryBase", {
|
|
14712
14701
|
payload: { lease: ProgramLease },
|
|
14713
14702
|
success: Struct({ repoBindingId: String4, branch: String4, revision: String4 }),
|
|
14714
14703
|
error: RunnerRpcError
|
|
14715
|
-
}),
|
|
14704
|
+
}), make5("MergeChangeRequest", {
|
|
14716
14705
|
payload: {
|
|
14717
14706
|
lease: ProgramLease,
|
|
14718
14707
|
step: String4,
|
|
@@ -14730,7 +14719,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14730
14719
|
Struct({ status: Literal("moved"), head: String4 })
|
|
14731
14720
|
]),
|
|
14732
14721
|
error: RunnerRpcError
|
|
14733
|
-
}),
|
|
14722
|
+
}), make5("ApproveChangeRequest", {
|
|
14734
14723
|
payload: {
|
|
14735
14724
|
lease: ProgramLease,
|
|
14736
14725
|
step: String4,
|
|
@@ -14746,7 +14735,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14746
14735
|
Struct({ approved: Literal(false), reason: String4 })
|
|
14747
14736
|
]),
|
|
14748
14737
|
error: RunnerRpcError
|
|
14749
|
-
}),
|
|
14738
|
+
}), make5("CloseChangeRequest", {
|
|
14750
14739
|
payload: {
|
|
14751
14740
|
lease: ProgramLease,
|
|
14752
14741
|
step: String4,
|
|
@@ -14756,7 +14745,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14756
14745
|
},
|
|
14757
14746
|
success: Struct({ closed: Boolean2, head: optionalKey(String4) }),
|
|
14758
14747
|
error: RunnerRpcError
|
|
14759
|
-
}),
|
|
14748
|
+
}), make5("RerunPipeline", {
|
|
14760
14749
|
payload: {
|
|
14761
14750
|
lease: ProgramLease,
|
|
14762
14751
|
step: String4,
|
|
@@ -14766,7 +14755,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14766
14755
|
},
|
|
14767
14756
|
success: Struct({ head: String4, pipelines: Int }),
|
|
14768
14757
|
error: RunnerRpcError
|
|
14769
|
-
}),
|
|
14758
|
+
}), make5("PublishRelease", {
|
|
14770
14759
|
payload: {
|
|
14771
14760
|
lease: ProgramLease,
|
|
14772
14761
|
step: String4,
|
|
@@ -14778,14 +14767,14 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14778
14767
|
},
|
|
14779
14768
|
success: Struct({ tag: String4, revision: String4, url: String4 }),
|
|
14780
14769
|
error: RunnerRpcError
|
|
14781
|
-
}),
|
|
14770
|
+
}), make5("ProgramSecrets", {
|
|
14782
14771
|
payload: { lease: ProgramLease },
|
|
14783
14772
|
success: Record(String4, String4),
|
|
14784
14773
|
error: RunnerRpcError
|
|
14785
14774
|
})).middleware(RunnerAuthentication) {
|
|
14786
14775
|
}
|
|
14787
14776
|
|
|
14788
|
-
class RunnerRunFileRpcs extends
|
|
14777
|
+
class RunnerRunFileRpcs extends make6(make5("CreateRunFile", {
|
|
14789
14778
|
payload: {
|
|
14790
14779
|
lease: ProgramLease,
|
|
14791
14780
|
step: String4,
|
|
@@ -14797,11 +14786,11 @@ class RunnerRunFileRpcs extends make7(make6("CreateRunFile", {
|
|
|
14797
14786
|
},
|
|
14798
14787
|
success: Struct({ file: RunFileRecord, upload: optional(RunFileUpload) }),
|
|
14799
14788
|
error: Union([RunnerRpcError, RunFileRefused])
|
|
14800
|
-
}),
|
|
14789
|
+
}), make5("RunFileParts", {
|
|
14801
14790
|
payload: { lease: ProgramLease, fileId: String4, partNumbers: ArraySchema(Int) },
|
|
14802
14791
|
success: Struct({ parts: ArraySchema(RunFilePartUrl) }),
|
|
14803
14792
|
error: RunnerRpcError
|
|
14804
|
-
}),
|
|
14793
|
+
}), make5("CompleteRunFile", {
|
|
14805
14794
|
payload: { lease: ProgramLease, fileId: String4, parts: optional(ArraySchema(UploadedRunFilePart)) },
|
|
14806
14795
|
success: RunFileRecord,
|
|
14807
14796
|
error: RunnerRpcError
|
|
@@ -14890,7 +14879,7 @@ function toStoredSession(token, existingRefreshToken) {
|
|
|
14890
14879
|
}
|
|
14891
14880
|
function startLoopbackServer(input) {
|
|
14892
14881
|
return gen(function* () {
|
|
14893
|
-
const code = yield*
|
|
14882
|
+
const code = yield* make15();
|
|
14894
14883
|
const context2 = yield* context();
|
|
14895
14884
|
const runSyncExit = runSyncExitWith(context2);
|
|
14896
14885
|
const server = yield* acquireRelease(sync2(() => Bun.serve({
|
|
@@ -14969,18 +14958,18 @@ function tokenResponse(response, failure) {
|
|
|
14969
14958
|
try: () => response.json(),
|
|
14970
14959
|
catch: () => new CliError({ message: `${failure}: invalid JSON` })
|
|
14971
14960
|
});
|
|
14972
|
-
if (!
|
|
14961
|
+
if (!isObject2(body) || body === null)
|
|
14973
14962
|
return yield* new CliError({ message: `${failure}: invalid body` });
|
|
14974
14963
|
const field = (key) => Object.getOwnPropertyDescriptor(body, key)?.value;
|
|
14975
14964
|
const accessToken = field("access_token");
|
|
14976
14965
|
const refreshTokenValue = field("refresh_token");
|
|
14977
14966
|
const expiresIn = field("expires_in");
|
|
14978
|
-
if (!
|
|
14967
|
+
if (!isString2(accessToken))
|
|
14979
14968
|
return yield* new CliError({ message: `${failure}: missing access_token` });
|
|
14980
14969
|
return {
|
|
14981
14970
|
access_token: accessToken,
|
|
14982
|
-
...
|
|
14983
|
-
...
|
|
14971
|
+
...isString2(refreshTokenValue) ? { refresh_token: refreshTokenValue } : undefined,
|
|
14972
|
+
...isNumber2(expiresIn) ? { expires_in: expiresIn } : undefined
|
|
14984
14973
|
};
|
|
14985
14974
|
});
|
|
14986
14975
|
}
|
|
@@ -15125,7 +15114,7 @@ function fetchWithTimeout(fetchImpl, endpoint, init, timeoutMs) {
|
|
|
15125
15114
|
var ClockSkewAllowanceSeconds = 30;
|
|
15126
15115
|
var createAgentAuthBearerToken = fn("createAgentAuthBearerToken")(function* (input) {
|
|
15127
15116
|
const privateJwk = toJsonWebKey(input.credential.privateKeyJwk);
|
|
15128
|
-
if (!
|
|
15117
|
+
if (!isString2(privateJwk.d) || privateJwk.d.length === 0) {
|
|
15129
15118
|
return yield* new AgentAuthClientError({
|
|
15130
15119
|
status: 0,
|
|
15131
15120
|
code: "invalid_credentials",
|
|
@@ -15182,13 +15171,13 @@ function base64UrlBytes(value) {
|
|
|
15182
15171
|
function toJsonWebKey(value) {
|
|
15183
15172
|
const jwk = {};
|
|
15184
15173
|
for (const [key, item] of Object.entries(value)) {
|
|
15185
|
-
if (
|
|
15174
|
+
if (isString2(item) || isBoolean2(item) || Array.isArray(item))
|
|
15186
15175
|
Object.assign(jwk, { [key]: item });
|
|
15187
15176
|
}
|
|
15188
15177
|
return jwk;
|
|
15189
15178
|
}
|
|
15190
15179
|
function stringValue(value) {
|
|
15191
|
-
return
|
|
15180
|
+
return isString2(value) && value.length > 0 ? value : undefined;
|
|
15192
15181
|
}
|
|
15193
15182
|
|
|
15194
15183
|
// node_modules/.bun/@effect+platform-node-shared@4.1.2+edf248c88a527e3e/node_modules/@effect/platform-node-shared/dist/NodeCrypto.js
|
|
@@ -15295,7 +15284,7 @@ function parseSetupResponse(value) {
|
|
|
15295
15284
|
function toStoredJwk(value) {
|
|
15296
15285
|
const result = {};
|
|
15297
15286
|
for (const [key, item] of Object.entries(value)) {
|
|
15298
|
-
if (
|
|
15287
|
+
if (isString2(item) || isBoolean2(item) || isStringArray2(item))
|
|
15299
15288
|
result[key] = item;
|
|
15300
15289
|
}
|
|
15301
15290
|
if (!isStoredJwk2(result))
|
|
@@ -15314,10 +15303,10 @@ function isStoredJwk2(value) {
|
|
|
15314
15303
|
const record = recordValue(value);
|
|
15315
15304
|
if (!record || !stringValue2(record.kty))
|
|
15316
15305
|
return false;
|
|
15317
|
-
return Object.values(record).every((item) =>
|
|
15306
|
+
return Object.values(record).every((item) => isString2(item) || isBoolean2(item) || isStringArray2(item));
|
|
15318
15307
|
}
|
|
15319
15308
|
function recordValue(value) {
|
|
15320
|
-
if (!
|
|
15309
|
+
if (!isObject2(value) || value === null)
|
|
15321
15310
|
return;
|
|
15322
15311
|
const record = {};
|
|
15323
15312
|
for (const key of Object.keys(value)) {
|
|
@@ -15326,13 +15315,13 @@ function recordValue(value) {
|
|
|
15326
15315
|
return record;
|
|
15327
15316
|
}
|
|
15328
15317
|
function stringValue2(value) {
|
|
15329
|
-
return
|
|
15318
|
+
return isString2(value) && value.length > 0 ? value : undefined;
|
|
15330
15319
|
}
|
|
15331
15320
|
function stringArrayValue(value) {
|
|
15332
|
-
return Array.isArray(value) ? value.filter((item) =>
|
|
15321
|
+
return Array.isArray(value) ? value.filter((item) => isString2(item)) : [];
|
|
15333
15322
|
}
|
|
15334
15323
|
function isStringArray2(value) {
|
|
15335
|
-
return Array.isArray(value) && value.every((item) =>
|
|
15324
|
+
return Array.isArray(value) && value.every((item) => isString2(item));
|
|
15336
15325
|
}
|
|
15337
15326
|
|
|
15338
15327
|
// packages/agent-runtime/src/herdr-core-connection.ts
|
|
@@ -15430,7 +15419,7 @@ var openConnection = (transport) => gen(function* () {
|
|
|
15430
15419
|
let lastId = 0;
|
|
15431
15420
|
let lost = false;
|
|
15432
15421
|
const notifications = yield* unbounded2();
|
|
15433
|
-
const ended = yield*
|
|
15422
|
+
const ended = yield* make15();
|
|
15434
15423
|
const settle = (line) => match(flatMap(decodeJsonStringOption(line), decodeUnknownOption(Response2)), {
|
|
15435
15424
|
onNone: () => match(flatMap(decodeJsonStringOption(line), decodeUnknownOption(Notification)), {
|
|
15436
15425
|
onNone: () => void_3,
|
|
@@ -15457,7 +15446,7 @@ var openConnection = (transport) => gen(function* () {
|
|
|
15457
15446
|
if (lost)
|
|
15458
15447
|
return yield* new HerdrCoreConnectionLost2({ method });
|
|
15459
15448
|
const id = ++lastId;
|
|
15460
|
-
const deferred = yield*
|
|
15449
|
+
const deferred = yield* make15();
|
|
15461
15450
|
pending.set(id, { method, deferred });
|
|
15462
15451
|
yield* pipe.write(encodeJsonStringSync({ jsonrpc: "2.0", id, method, params }));
|
|
15463
15452
|
return yield* _await(deferred);
|
|
@@ -15531,14 +15520,14 @@ var herdrCoreOver = (transport) => ({
|
|
|
15531
15520
|
return { type: "event", terminal: event.value.terminal, kind: event.value.type, data: event.value.data };
|
|
15532
15521
|
};
|
|
15533
15522
|
const snapshot = { type: "snapshot", terminals: subscribed.terminals };
|
|
15534
|
-
return concat(
|
|
15523
|
+
return concat(make10(snapshot), fromQueue(notifications).pipe(map2(toEvent), filter((event) => event !== undefined)));
|
|
15535
15524
|
}))
|
|
15536
15525
|
});
|
|
15537
15526
|
var spawnedTransport = (env) => gen(function* () {
|
|
15538
15527
|
const spawner = yield* ChildProcessSpawner;
|
|
15539
15528
|
const input = yield* unbounded2();
|
|
15540
15529
|
const encoder = new TextEncoder;
|
|
15541
|
-
const handle = yield* spawner.spawn(
|
|
15530
|
+
const handle = yield* spawner.spawn(make2("herdr-core", ["connect"], {
|
|
15542
15531
|
extendEnv: false,
|
|
15543
15532
|
env,
|
|
15544
15533
|
stdin: fromQueue(input),
|
|
@@ -15569,7 +15558,7 @@ var updateHerdrCore2 = (options) => gen(function* () {
|
|
|
15569
15558
|
const spawner = yield* ChildProcessSpawner;
|
|
15570
15559
|
const env = coreEnv(options);
|
|
15571
15560
|
const run = (args) => gen(function* () {
|
|
15572
|
-
const handle = yield* spawner.spawn(
|
|
15561
|
+
const handle = yield* spawner.spawn(make2("herdr-core", args, { extendEnv: false, env, stdin: "ignore" }));
|
|
15573
15562
|
const [stdout, stderr, exitCode] = yield* all3([
|
|
15574
15563
|
mkString(decodeText(handle.stdout)),
|
|
15575
15564
|
mkString(decodeText(handle.stderr)),
|
|
@@ -15595,7 +15584,7 @@ class CommandFailed2 extends TaggedError("CommandFailed") {
|
|
|
15595
15584
|
}
|
|
15596
15585
|
var runCommand2 = (command, args, options = {}) => gen(function* () {
|
|
15597
15586
|
const spawner = yield* ChildProcessSpawner;
|
|
15598
|
-
const handle = yield* spawner.spawn(
|
|
15587
|
+
const handle = yield* spawner.spawn(make2(command, args, {
|
|
15599
15588
|
stdin: "ignore",
|
|
15600
15589
|
...options.cwd === undefined ? undefined : { cwd: options.cwd },
|
|
15601
15590
|
...options.env === undefined ? undefined : { extendEnv: true, env: options.env }
|
|
@@ -15621,8 +15610,8 @@ var shellOutputTailChars2 = 64 * 1024;
|
|
|
15621
15610
|
var runProcess2 = (argv, options) => gen(function* () {
|
|
15622
15611
|
const spawner = yield* ChildProcessSpawner;
|
|
15623
15612
|
const [command, ...args] = argv;
|
|
15624
|
-
const handle = yield* spawner.spawn(
|
|
15625
|
-
stdin: options.stdin === undefined ? "ignore" :
|
|
15613
|
+
const handle = yield* spawner.spawn(make2(command, args, {
|
|
15614
|
+
stdin: options.stdin === undefined ? "ignore" : make10(new TextEncoder().encode(options.stdin)),
|
|
15626
15615
|
...options.cwd === undefined ? undefined : { cwd: options.cwd },
|
|
15627
15616
|
env: options.extendEnv === false ? { ...options.env } : { ...withoutPreloads2(), ...options.env }
|
|
15628
15617
|
}));
|
|
@@ -15919,9 +15908,9 @@ ${instructionsEnd}
|
|
|
15919
15908
|
};
|
|
15920
15909
|
};
|
|
15921
15910
|
var tomlInline = (value) => {
|
|
15922
|
-
if (
|
|
15911
|
+
if (isString(value))
|
|
15923
15912
|
return JSON.stringify(value);
|
|
15924
|
-
if (
|
|
15913
|
+
if (isNumber(value) || isBoolean(value))
|
|
15925
15914
|
return String(value);
|
|
15926
15915
|
if (Array.isArray(value))
|
|
15927
15916
|
return `[${value.map(tomlInline).join(", ")}]`;
|
|
@@ -16054,4 +16043,4 @@ function checkServices(declaration) {
|
|
|
16054
16043
|
return isSome(decoded) ? [...new Set(decoded.value.services)] : undefined;
|
|
16055
16044
|
}
|
|
16056
16045
|
|
|
16057
|
-
export { Clock, currentTimeMillis, WebCrypto, SecureRandom, layerWebCrypto, makeUnsafe, formatIso, empty, fromInput, merge, runMain, layer, layer2, Stdio, Terminal, layer3, error, log, toDate, parseDate, toIso, currentDate, wallClockMillis, waitingOnWords, queueWords, scanDurableSurface, redactResponseSurface, redactCredentials, redactedOutputTail, SafeJson, AgentHarnessIds, AgentSkillRequirement, AgentMcpServerRequirement, AgentEnvironmentFragment, findForbiddenAgentEnvironmentSecretPath, NetworkHost, RepoBindingProviders, RepoBindingCredentialProviderTypes, findForbiddenRepoBindingSecretPath, AgentSandboxNetwork, runnerAgentSandboxPolicy, agentNetworkAllowlist, verificationNetworkAllowlist, programNetworkHosts, ContextPackModes, DefaultContextPackMode, ProposalStatuses, ProposalTargetTypes, canonicalJson, canonicalSha256, AgentEfforts, AgentCapabilities, tokensSpent, LoopDataSchemaRef, RunDisplayStates, LoopVersion, ProgramLoop, AgentFallback, RunWaitUntils, isTestReportName, checkTests, ProgramWorkUnit, MeasureSample, MeasureEvidence, catchUpPathLimit, CatchUp, RunnerOwnership, RunnerExecutionBackend, MaxRunnerConcurrency, PinnedImage, RunnerSettingNames, RunnerSettingsUpdate, defaultRunnerSettings, shownRunnerSetting, defaultRunnerCapabilities, deliveryProviderActions, newerKitmanVersion, MemoryStatuses, MemoryScopes, MaxMemoryListLimit, DecisionStatuses, Session, SessionEnd, SessionUpdate, SessionUpdateCreate, FixFlowRecoveryActions, KitmanAgentCapabilityNames, sha2562, isRunFileRefusalReason, runFileRefusalWords, RunFileRefused, runFileContentType, repositoryKey, createId, digestSha256, digestSha512, digestWith, sha256Hasher, AgentEvent, raw,
|
|
16046
|
+
export { Clock, currentTimeMillis, WebCrypto, SecureRandom, layerWebCrypto, makeUnsafe, formatIso, empty, fromInput, merge, runMain, layer, layer2, Stdio, Terminal, layer3, error, log, toDate, parseDate, toIso, currentDate, wallClockMillis, waitingOnWords, queueWords, scanDurableSurface, redactResponseSurface, redactCredentials, redactedOutputTail, SafeJson, AgentHarnessIds, AgentSkillRequirement, AgentMcpServerRequirement, AgentEnvironmentFragment, findForbiddenAgentEnvironmentSecretPath, NetworkHost, RepoBindingProviders, RepoBindingCredentialProviderTypes, findForbiddenRepoBindingSecretPath, AgentSandboxNetwork, runnerAgentSandboxPolicy, agentNetworkAllowlist, verificationNetworkAllowlist, programNetworkHosts, ContextPackModes, DefaultContextPackMode, ProposalStatuses, ProposalTargetTypes, canonicalJson, canonicalSha256, AgentEfforts, AgentCapabilities, tokensSpent, LoopDataSchemaRef, RunDisplayStates, LoopVersion, ProgramLoop, AgentFallback, RunWaitUntils, isTestReportName, checkTests, ProgramWorkUnit, MeasureSample, MeasureEvidence, catchUpPathLimit, CatchUp, RunnerOwnership, RunnerExecutionBackend, MaxRunnerConcurrency, PinnedImage, RunnerSettingNames, RunnerSettingsUpdate, defaultRunnerSettings, shownRunnerSetting, defaultRunnerCapabilities, deliveryProviderActions, newerKitmanVersion, MemoryStatuses, MemoryScopes, MaxMemoryListLimit, DecisionStatuses, Session, SessionEnd, SessionUpdate, SessionUpdateCreate, FixFlowRecoveryActions, KitmanAgentCapabilityNames, sha2562, isRunFileRefusalReason, runFileRefusalWords, RunFileRefused, runFileContentType, repositoryKey, createId, digestSha256, digestSha512, digestWith, sha256Hasher, AgentEvent, raw, make4, get, post, put, setHeaders, acceptJson, bodyUint8Array, bodyJsonUnsafe, bodyUrlParams, schemaBodyJson, filterStatusOk, HttpClient, execute, get2, Fetch, layer4, Socket, SocketReadError, SocketError, WebSocketConstructor, layerWebSocketConstructorGlobal, layerWebSocket, runDisplayLabels, listedSummary, KitName, KitDigest, defaultKitName, KitSetup, SetupArchive, kitMcpSecretNames, kitmanMcpServer, KitmanClientError, KitmanEffectClient, CliError, DefaultApiUrl, resolveConfig, apiUrlFromEnv, stepCredentialFromEnv, stepWorkspaceFromEnv, stepSkillsDirFromEnv, stepFittingSkillsFromEnv, stepOutputOnlyFromEnv, mcpCredentialNameFromEnv, userConfigPath, userAuthPath, userHarnessSyncPath, kitSetupCacheDir, bundleCacheDir, localConfigPath, readUserConfig, writeUserConfig, sessionForApi, readAuthStore, storeSession, removeSession, removeAllSessions, agentCredentialForApi, storeAgentCredential, removeAgentCredential, normalizeApiUrl, isStoredAgentCredential, isStreamSchema, getStreamSchemas, make5, exitSchema, ParseOptions, RpcClientDefect, RpcClientError, make6, Service, RunnerHeaders, RunnerRpcProtocolVersion, RunnerRpcError, RunSettled, UpdateAvailable, RunnerReplicaRpcs, RunnerRunFileRpcs, ProgramRpcs, parseCallbackUrl, revokeToken, toStoredSession, browserLogin, openBrowser, shouldRefresh, createSdkClient, refreshSession, AgentAuthClientError, executeAgentCapability, createAgentAuthBearerToken, McpPlatformLive, runMcpEffect, createAgentAuthSignedFetch, setupMcpAgentCredential, generateAgentKeyPair, HERDR_CORE_GENERATION2, HERDR_CORE_INSTALL_COMMAND2, HerdrCoreMissing2, HerdrCoreIncompatible2, HerdrCoreConnectionLost2, HerdrCoreRpcError2, HerdrCoreUpdateFailed2, HerdrCore2, herdrCoreLayer2, herdrCoreTransportLayer2, updateHerdrCore2, CommandFailed2, runCommand2, withoutPreloads2, shellOutputTailChars2, runProcess2, CommandRunner2, runShell2, detectHarnesses2, kitHarnesses, isKitHarness, instructionsStart, instructionsEnd, harnessNames, renderMcpServer, materializeKitSetup, tomlInline, herdrExecutionExtension2, herdrNativeExtensionIds2, herdrRunnerCapabilitiesForRepoBinding2, herdrRunnerCapabilities2, assertHerdrRunnerCapability2, declaredChecks, installCommand, checkServicesFile, checkServices };
|