@kitman-sh/cli 0.43.0 → 0.45.0
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-8b02x7vv.js → chunk-04wqa07j.js} +1 -1
- package/dist/{chunk-27e7m975.js → chunk-0dfg674z.js} +7 -7
- package/dist/{chunk-ea29sbaq.js → chunk-4vxbxjf8.js} +1 -1
- package/dist/{chunk-91tvnb8f.js → chunk-5gbt1vhm.js} +9 -9
- package/dist/{chunk-d4vhrja4.js → chunk-5pjbxhxy.js} +3 -3
- package/dist/{chunk-etrfc5cn.js → chunk-5smh4dp2.js} +35 -32
- package/dist/{chunk-0qfaf9h3.js → chunk-69y8j7fs.js} +140 -138
- package/dist/{chunk-cnryphhh.js → chunk-8gkrs473.js} +7 -7
- package/dist/{chunk-b2btevxm.js → chunk-9qvgbp6k.js} +60 -46
- package/dist/{chunk-98azvx6g.js → chunk-9ykh05hz.js} +1 -1
- package/dist/{chunk-ns26fbmk.js → chunk-a71b15k3.js} +2 -2
- package/dist/{chunk-fekh3jwz.js → chunk-e3dv8hzy.js} +1 -1
- package/dist/{chunk-7ygg19wj.js → chunk-es6rnmyw.js} +3 -3
- package/dist/{chunk-qxpwkb5f.js → chunk-f957cxrx.js} +7 -7
- package/dist/{chunk-bbq7q5r6.js → chunk-fmvdwf5h.js} +69 -49
- package/dist/{chunk-6x08g7m6.js → chunk-fqh4pj6b.js} +14 -60
- package/dist/{chunk-fbddgx6q.js → chunk-g26y214g.js} +4 -4
- package/dist/{chunk-bqbfyqx6.js → chunk-k462v2v7.js} +103 -51
- package/dist/{chunk-qqc567gx.js → chunk-k7eh8tac.js} +4 -4
- package/dist/{chunk-wy6gmtd9.js → chunk-n3jpxd14.js} +2 -2
- package/dist/{chunk-rbt72xjw.js → chunk-qzwsh96c.js} +22 -3
- package/dist/{chunk-hgvft7vy.js → chunk-tfwgeqx5.js} +4 -4
- package/dist/{chunk-bqebfc06.js → chunk-tqv14b4c.js} +12 -12
- package/dist/{chunk-jq5h43a4.js → chunk-tx9aey19.js} +287 -59
- package/dist/{chunk-wv8kt4rb.js → chunk-yyz9xrc1.js} +6 -6
- package/dist/{chunk-jvwjreb0.js → chunk-zx86g3dw.js} +7 -7
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -35,19 +35,19 @@ import {
|
|
|
35
35
|
isJsonObject,
|
|
36
36
|
isString2,
|
|
37
37
|
encodeUnknownJsonStringSync
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-k462v2v7.js";
|
|
39
39
|
import {
|
|
40
40
|
currentTimeMillis,
|
|
41
|
-
|
|
41
|
+
make10,
|
|
42
42
|
runForEach,
|
|
43
43
|
toPull,
|
|
44
44
|
FileSystem,
|
|
45
45
|
compiled2
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-5smh4dp2.js";
|
|
47
47
|
import {
|
|
48
48
|
ChildProcessSpawner,
|
|
49
|
-
|
|
50
|
-
} from "./chunk-
|
|
49
|
+
make2
|
|
50
|
+
} from "./chunk-fqh4pj6b.js";
|
|
51
51
|
|
|
52
52
|
// packages/agent-runtime/src/opencode-store.ts
|
|
53
53
|
import { lstatSync, readFileSync, realpathSync, writeSync } from "fs";
|
|
@@ -265,8 +265,8 @@ var opencodeReaderCommand = () => compiled2 ? [process.execPath, "opencode-read"
|
|
|
265
265
|
var spawnReader = (request) => gen(function* () {
|
|
266
266
|
const spawner = yield* ChildProcessSpawner;
|
|
267
267
|
const [command, ...args] = opencodeReaderCommand();
|
|
268
|
-
return yield* spawner.spawn(
|
|
269
|
-
stdin:
|
|
268
|
+
return yield* spawner.spawn(make2(command, args, {
|
|
269
|
+
stdin: make10(new TextEncoder().encode(request)),
|
|
270
270
|
stderr: "ignore",
|
|
271
271
|
extendEnv: false,
|
|
272
272
|
env: {},
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
succeed,
|
|
13
13
|
isSuccess,
|
|
14
14
|
TaggedError,
|
|
15
|
-
|
|
15
|
+
make15,
|
|
16
16
|
_await,
|
|
17
17
|
fail5,
|
|
18
18
|
succeed4,
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
decodeJsonStringOption,
|
|
110
110
|
encodeJsonStringSync,
|
|
111
111
|
encodePrettyJsonString
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-k462v2v7.js";
|
|
113
113
|
import {
|
|
114
114
|
currentTimeMillis,
|
|
115
115
|
tap,
|
|
@@ -122,7 +122,7 @@ import {
|
|
|
122
122
|
withDefault,
|
|
123
123
|
option,
|
|
124
124
|
String2
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-5smh4dp2.js";
|
|
126
126
|
import {
|
|
127
127
|
SecureRandom,
|
|
128
128
|
layerWebCrypto,
|
|
@@ -162,8 +162,8 @@ import {
|
|
|
162
162
|
runOutlineText,
|
|
163
163
|
RunDisplayStates,
|
|
164
164
|
RunnerExecutionBackend,
|
|
165
|
-
MaxRunnerConcurrency,
|
|
166
165
|
PinnedImage,
|
|
166
|
+
RunnerSettings,
|
|
167
167
|
RunnerSettingNames,
|
|
168
168
|
RunnerSettingsUpdate,
|
|
169
169
|
defaultRunnerSettings,
|
|
@@ -186,7 +186,7 @@ import {
|
|
|
186
186
|
digestSha256,
|
|
187
187
|
sha256Hasher,
|
|
188
188
|
raw,
|
|
189
|
-
|
|
189
|
+
make4,
|
|
190
190
|
get,
|
|
191
191
|
put,
|
|
192
192
|
HttpClient,
|
|
@@ -252,15 +252,15 @@ import {
|
|
|
252
252
|
harnessNames,
|
|
253
253
|
herdrRunnerCapabilities2,
|
|
254
254
|
declaredChecks
|
|
255
|
-
} from "./chunk-
|
|
255
|
+
} from "./chunk-69y8j7fs.js";
|
|
256
256
|
import {
|
|
257
257
|
ChildProcessSpawner,
|
|
258
|
-
|
|
259
|
-
} from "./chunk-
|
|
258
|
+
make2
|
|
259
|
+
} from "./chunk-fqh4pj6b.js";
|
|
260
260
|
import {
|
|
261
261
|
Id,
|
|
262
262
|
Timestamp
|
|
263
|
-
} from "./chunk-
|
|
263
|
+
} from "./chunk-4vxbxjf8.js";
|
|
264
264
|
|
|
265
265
|
// apps/cli/src/cli-error.ts
|
|
266
266
|
function cliErrorCode(error, status) {
|
|
@@ -706,7 +706,7 @@ var Usage = [
|
|
|
706
706
|
" kitman pair [<pairing code>] [--api-url <url>] (what the command the web shows runs; no code finishes or re-keys with your session)",
|
|
707
707
|
" kitman pair <runner pairing code> --credential-file <path> (writes a shared Runner's credential for a container or its replicas to mount)",
|
|
708
708
|
" kitman runner start --credential-file <path> (or KITMAN_RUNNER_CREDENTIAL_FILE; starts the Runner the file holds)",
|
|
709
|
-
" kitman runner settings <runner> [--concurrency <
|
|
709
|
+
" kitman runner settings <runner> [--concurrency <n>] [--verification-concurrency auto|<n>] [--sandbox srt|docker|host]",
|
|
710
710
|
" [--docker-image <image@sha256:\u2026>|none]",
|
|
711
711
|
" [--check-hosts <host,\u2026>|none] [--check-docker-image <image@sha256:\u2026>|none] [--check-registry-image <image@sha256:\u2026>|none]",
|
|
712
712
|
" kitman runner settings history <runner> (each change: who, when, old and new value)",
|
|
@@ -1328,10 +1328,10 @@ var sandboxMissing = (sandbox, missing) => ({
|
|
|
1328
1328
|
var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
|
|
1329
1329
|
var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
|
|
1330
1330
|
var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
|
|
1331
|
-
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-
|
|
1331
|
+
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-k7eh8tac.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
|
|
1332
1332
|
});
|
|
1333
1333
|
var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
|
|
1334
|
-
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-
|
|
1334
|
+
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-k7eh8tac.js")), (module) => module.updateHerdrCore(options))
|
|
1335
1335
|
});
|
|
1336
1336
|
var herdrCoreMissing = (error) => {
|
|
1337
1337
|
if (isTagged(error, "HerdrCoreMissing"))
|
|
@@ -1399,10 +1399,12 @@ var AllowFullAccessVariable = "KITMAN_RUNNER_ALLOW_FULL_ACCESS";
|
|
|
1399
1399
|
var isPinnedImage = is(PinnedImage);
|
|
1400
1400
|
var isNetworkHost = is(NetworkHost);
|
|
1401
1401
|
var isBackend = is(RunnerExecutionBackend);
|
|
1402
|
+
var isConcurrency = is(RunnerSettings.fields.concurrency);
|
|
1402
1403
|
var settingFromVariable = {
|
|
1403
1404
|
concurrency: (value) => {
|
|
1404
|
-
const
|
|
1405
|
-
|
|
1405
|
+
const whole = Math.trunc(Number(value));
|
|
1406
|
+
const concurrency = Math.max(1, whole);
|
|
1407
|
+
return Number.isFinite(whole) && isConcurrency(concurrency) ? { concurrency } : {};
|
|
1406
1408
|
},
|
|
1407
1409
|
sandbox: (value) => isBackend(value) ? { sandbox: value } : {},
|
|
1408
1410
|
dockerImage: (value) => isPinnedImage(value) ? { dockerImage: value } : {},
|
|
@@ -1472,18 +1474,19 @@ var settingFlags = {
|
|
|
1472
1474
|
};
|
|
1473
1475
|
var isRunnerSettingFlag = (flag) => (flag in settingFlags);
|
|
1474
1476
|
var isSettingsUpdate = is(RunnerSettingsUpdate);
|
|
1477
|
+
var wholeNumber = (text) => /^\d+$/u.test(text.trim()) ? Number(text.trim()) : Number.NaN;
|
|
1475
1478
|
var settingFromFlag = (flag, value) => {
|
|
1476
1479
|
const setting = settingFlags[flag];
|
|
1477
1480
|
const cleared = value.trim() === "none";
|
|
1478
|
-
const parsed = setting === "concurrency" || setting === "verificationConcurrency" ?
|
|
1481
|
+
const parsed = setting === "verificationConcurrency" && value.trim() === "auto" ? "auto" : setting === "concurrency" || setting === "verificationConcurrency" ? wholeNumber(value) : setting === "checkHosts" ? cleared ? [] : value.split(",").map((host) => host.trim()).filter((host) => host !== "") : setting === "sandbox" ? value.trim() : cleared ? null : value.trim();
|
|
1479
1482
|
const update = { [setting]: parsed };
|
|
1480
1483
|
if (!isSettingsUpdate(update))
|
|
1481
1484
|
throw new Error(settingFlagRefused[setting]);
|
|
1482
1485
|
return update;
|
|
1483
1486
|
};
|
|
1484
1487
|
var settingFlagRefused = {
|
|
1485
|
-
concurrency:
|
|
1486
|
-
verificationConcurrency:
|
|
1488
|
+
concurrency: "--concurrency takes a whole number from 1 up",
|
|
1489
|
+
verificationConcurrency: "--verification-concurrency takes auto or a whole number from 1 up",
|
|
1487
1490
|
sandbox: "--sandbox takes srt, docker or host",
|
|
1488
1491
|
dockerImage: "--docker-image takes an image pinned by digest (name@sha256:...), or none",
|
|
1489
1492
|
checkHosts: "--check-hosts takes comma-separated hosts, such as registry.npmjs.org,*.example.com, or none",
|
|
@@ -1642,7 +1645,7 @@ var runnerUpdater = (input) => {
|
|
|
1642
1645
|
const drain = (version) => gen(function* () {
|
|
1643
1646
|
claiming = false;
|
|
1644
1647
|
const since = yield* currentTimeMillis;
|
|
1645
|
-
const switchNow = yield*
|
|
1648
|
+
const switchNow = yield* make15();
|
|
1646
1649
|
if (version !== undefined)
|
|
1647
1650
|
draining = {
|
|
1648
1651
|
report: {
|
|
@@ -1795,7 +1798,7 @@ var syncTargets = (harness) => gen(function* () {
|
|
|
1795
1798
|
});
|
|
1796
1799
|
var syncKits = (input) => gen(function* () {
|
|
1797
1800
|
const fs = yield* FileSystem;
|
|
1798
|
-
const { syncKitSetup } = yield* promise(() => import("./chunk-
|
|
1801
|
+
const { syncKitSetup } = yield* promise(() => import("./chunk-zx86g3dw.js"));
|
|
1799
1802
|
const harnesses = yield* syncTargets(input.harness);
|
|
1800
1803
|
const chain = yield* input.client.getKitChain(input.workspaceId);
|
|
1801
1804
|
for (const { name, problem } of chain.skipped)
|
|
@@ -2312,7 +2315,7 @@ var ServiceManager = Reference("kitman/cli/ServiceManager", {
|
|
|
2312
2315
|
run: (command, args) => runCommand2(command, args),
|
|
2313
2316
|
attach: (command, args) => gen(function* () {
|
|
2314
2317
|
const spawner = yield* ChildProcessSpawner;
|
|
2315
|
-
const handle = yield* spawner.spawn(
|
|
2318
|
+
const handle = yield* spawner.spawn(make2(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
|
|
2316
2319
|
const exitCode = yield* handle.exitCode;
|
|
2317
2320
|
if (exitCode !== 0)
|
|
2318
2321
|
return yield* new CommandFailed2({ command, reason: `exit code ${exitCode}` });
|
|
@@ -3290,7 +3293,7 @@ var shipped_steps_generated_default = {
|
|
|
3290
3293
|
};
|
|
3291
3294
|
|
|
3292
3295
|
// apps/cli/src/scaffold-files.ts
|
|
3293
|
-
var cliVersion = "0.
|
|
3296
|
+
var cliVersion = "0.45.0";
|
|
3294
3297
|
var shippedLoopSteps = new Map(Object.entries(shipped_steps_generated_default));
|
|
3295
3298
|
var loopSteps = (loop) => shippedLoopSteps.get(loop) ?? [];
|
|
3296
3299
|
var replacedStep = (loop) => loopSteps(loop).find((step) => step.from === defaultKitName && step.exported?.startsWith("steps.") === true);
|
|
@@ -3555,7 +3558,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
|
|
|
3555
3558
|
|
|
3556
3559
|
// apps/cli/src/commands.ts
|
|
3557
3560
|
var ClientId = "kitman-cli";
|
|
3558
|
-
var agentRuntime = promise(() => import("./chunk-
|
|
3561
|
+
var agentRuntime = promise(() => import("./chunk-tx9aey19.js"));
|
|
3559
3562
|
var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
|
|
3560
3563
|
defaultValue: () => gen(function* () {
|
|
3561
3564
|
const tui = yield* tryPromise({
|
|
@@ -5094,7 +5097,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
|
|
|
5094
5097
|
});
|
|
5095
5098
|
var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
|
|
5096
5099
|
defaultValue: () => (options) => gen(function* () {
|
|
5097
|
-
const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-
|
|
5100
|
+
const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-yyz9xrc1.js"));
|
|
5098
5101
|
return yield* makeRunnerRpcClient({
|
|
5099
5102
|
runnerId: options.runnerId,
|
|
5100
5103
|
bearer: options.bearer,
|
|
@@ -5238,7 +5241,11 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
5238
5241
|
const fs = yield* FileSystem;
|
|
5239
5242
|
const container = yield* runsInContainer(input.credential !== undefined);
|
|
5240
5243
|
const version = yield* RunningKitmanVersion;
|
|
5241
|
-
const reported = {
|
|
5244
|
+
const reported = {
|
|
5245
|
+
...version === undefined ? undefined : { version },
|
|
5246
|
+
container,
|
|
5247
|
+
readsAutoSettings: true
|
|
5248
|
+
};
|
|
5242
5249
|
const credential = input.credential ?? (yield* startupStep("load the Runner credential", "10 seconds", storedHerdrRunnerCredential(input.apiUrl, input.runnerId)));
|
|
5243
5250
|
if (credential === undefined)
|
|
5244
5251
|
return yield* new RunnerStopped({ problem: credentialMissing(input.runnerId) });
|
|
@@ -5358,6 +5365,11 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
5358
5365
|
capacity: { maxConcurrentRuns: live.settings.concurrency },
|
|
5359
5366
|
telemetry: { activeWorkUnits: 0 }
|
|
5360
5367
|
})));
|
|
5368
|
+
let replicaCapacity = live.settings.concurrency;
|
|
5369
|
+
const appliedRunnerSettings = () => ({
|
|
5370
|
+
...live.settings,
|
|
5371
|
+
concurrency: Math.min(live.settings.concurrency, replicaCapacity)
|
|
5372
|
+
});
|
|
5361
5373
|
const uid = process.getuid?.();
|
|
5362
5374
|
const gid = process.getgid?.();
|
|
5363
5375
|
const docker = host.backends.includes("docker") && settings.dockerImage !== null ? {
|
|
@@ -5366,8 +5378,8 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
5366
5378
|
...uid === undefined || gid === undefined ? undefined : { user: `${uid}:${gid}` }
|
|
5367
5379
|
} : undefined;
|
|
5368
5380
|
const appliedSettings = () => ({
|
|
5369
|
-
concurrency:
|
|
5370
|
-
verificationConcurrency: runnerVerificationCap(
|
|
5381
|
+
concurrency: appliedRunnerSettings().concurrency,
|
|
5382
|
+
verificationConcurrency: runnerVerificationCap(appliedRunnerSettings()),
|
|
5371
5383
|
sandbox: live.sandbox,
|
|
5372
5384
|
dockerImage: settings.dockerImage,
|
|
5373
5385
|
checkHosts: live.settings.checkHosts,
|
|
@@ -5379,7 +5391,7 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
5379
5391
|
const root = herdrCoreAgentBackendLayer({
|
|
5380
5392
|
sandboxBackends: host.backends,
|
|
5381
5393
|
srtBinaries,
|
|
5382
|
-
threadBudget: sync2(() => checkThreadBudget(
|
|
5394
|
+
threadBudget: sync2(() => checkThreadBudget(appliedRunnerSettings())),
|
|
5383
5395
|
...docker === undefined ? undefined : { docker: { ...docker, runnerId: input.runnerId } }
|
|
5384
5396
|
}).pipe(provide2(succeed5(HerdrCore, core)), provide2(succeed5(StepProcesses, stepProcesses)), provide2(layer3));
|
|
5385
5397
|
const activeSlots = new Set;
|
|
@@ -5413,7 +5425,7 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
5413
5425
|
drainState: "accepting",
|
|
5414
5426
|
capacity: { maxConcurrentRuns: live.settings.concurrency },
|
|
5415
5427
|
telemetry: { activeWorkUnits: 0 }
|
|
5416
|
-
})))));
|
|
5428
|
+
})), tap2(() => sync2(() => replicaCapacity = live.settings.concurrency)))));
|
|
5417
5429
|
return yield* scoped(gen(function* () {
|
|
5418
5430
|
const rpc = yield* startupStep("open the Runner RPC", "30 seconds", stopOnRefusal(openRunnerRpc({
|
|
5419
5431
|
apiUrl: input.apiUrl,
|
|
@@ -5421,7 +5433,7 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
5421
5433
|
bearer: controlPlane.rpcBearer
|
|
5422
5434
|
}).pipe(tap2((opened) => opened.settledRuns([])))));
|
|
5423
5435
|
const signals = yield* makeReplicaSignals;
|
|
5424
|
-
const verifications = verificationPermits(sync2(() => runnerVerificationCap(
|
|
5436
|
+
const verifications = verificationPermits(sync2(() => runnerVerificationCap(appliedRunnerSettings())));
|
|
5425
5437
|
const heartbeat = (beat) => flatMap3(verifications.full, (full) => rpc.heartbeat(full ? { ...beat, takesVerifications: false } : beat));
|
|
5426
5438
|
const bundles = yield* kitmanBundles({
|
|
5427
5439
|
fetch: (digest) => rpc.bundle(digest).pipe(map9((found) => found.bundle)),
|
|
@@ -5431,7 +5443,7 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
5431
5443
|
yield* controlPlane.client.listRepoBindings(runner.workspaceId).pipe(flatMap3(({ items }) => forEach(items.filter((binding) => binding.status === "active" && (teamId === undefined || binding.teamId === teamId)), (repoBinding) => map9(checkouts.reaches(repoBinding), (reachable) => ({ repoBinding, reachable })), { concurrency: 4 })), tap2((probed) => sync2(() => reached = probed)), catch_((error) => logWarning("runner_repository_probe_failed", error.message)), flatMap3(() => sleep(reached.some((probe) => !probe.reachable) ? repositoryRetryInterval : repositoryProbeInterval)), forever, forkScoped);
|
|
5432
5444
|
yield* suspend3(() => sleep(ownerLogin.expired() ? ownerLoginRetryInterval : ownerLoginInterval)).pipe(andThen2(checkOwnerLogin), forever, forkScoped);
|
|
5433
5445
|
const platform = yield* context();
|
|
5434
|
-
const updated = yield*
|
|
5446
|
+
const updated = yield* make15();
|
|
5435
5447
|
const scope = yield* scope2;
|
|
5436
5448
|
const startUpdate = (update) => update.pipe(catch_((error) => andThen2(restartOntoUpdate(input.runnerId), fail5(updated, error))), provideContext2(platform), forkIn(scope), asVoid);
|
|
5437
5449
|
const refusedForProtocol = container ? updater.stopWhenDrained(new RunnerStopped({ problem: updateRequired })).pipe(catch_((stopped) => fail5(updated, stopped)), forkIn(scope), asVoid) : startUpdate(updater.updateRequired);
|
|
@@ -5530,7 +5542,7 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
5530
5542
|
runnerScope: scope,
|
|
5531
5543
|
runAfterMerge: (work, worktree, command, args) => {
|
|
5532
5544
|
const sandbox = checkSandbox();
|
|
5533
|
-
return afterMergeRunner(sandbox === undefined ? undefined : { ...sandbox, apiUrl: input.apiUrl, hosts: live.settings.checkHosts }, checkThreadBudget(
|
|
5545
|
+
return afterMergeRunner(sandbox === undefined ? undefined : { ...sandbox, apiUrl: input.apiUrl, hosts: live.settings.checkHosts }, checkThreadBudget(appliedRunnerSettings()))(work, worktree, command, args);
|
|
5534
5546
|
},
|
|
5535
5547
|
runAgent: (work, worktree, session, steered, refused, launched) => flatMap3(currentTimeMillis, (now) => agentBackend.execute({
|
|
5536
5548
|
runnerId: input.runnerId,
|
|
@@ -5586,7 +5598,7 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
5586
5598
|
postgres: dockerCheckPostgres(input.runnerId, replica.id),
|
|
5587
5599
|
...checkDocker === undefined ? undefined : { docker: checkDocker },
|
|
5588
5600
|
runsDeployScripts: personal,
|
|
5589
|
-
threadBudget: checkThreadBudget(
|
|
5601
|
+
threadBudget: checkThreadBudget(appliedRunnerSettings()),
|
|
5590
5602
|
revokedSecrets: (unit, secrets) => rpc.heartbeat({ workUnitId: unit.id, lease: leaseOf(unit), secrets: [...secrets] }).pipe(map9((state) => state.revokedSecrets ?? [])),
|
|
5591
5603
|
...sandbox === undefined ? undefined : { sandbox: { ...sandbox, apiUrl: input.apiUrl, hosts: live.settings.checkHosts } }
|
|
5592
5604
|
})(work);
|
|
@@ -5616,12 +5628,15 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
5616
5628
|
labels: runner.labels,
|
|
5617
5629
|
...appliedSettingsReport(),
|
|
5618
5630
|
...updateDrainReport(updater.updateDrain())
|
|
5619
|
-
})).pipe(tap2(followReleaseChannel), flatMap3((heartbeat) => applySettings(heartbeat.settings)), flatMap3(() =>
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5631
|
+
})).pipe(tap2(followReleaseChannel), flatMap3((heartbeat) => applySettings(heartbeat.settings)), flatMap3(() => {
|
|
5632
|
+
const capacity = live.settings.concurrency;
|
|
5633
|
+
return controlPlane.client.heartbeatRunnerReplica(input.runnerId, replica.id, {
|
|
5634
|
+
healthStatus: "healthy",
|
|
5635
|
+
drainState: updater.claiming() ? "accepting" : "draining",
|
|
5636
|
+
capacity: { maxConcurrentRuns: capacity },
|
|
5637
|
+
telemetry: { activeWorkUnits: activeSlots.size }
|
|
5638
|
+
}).pipe(andThen2(sync2(() => replicaCapacity = capacity)));
|
|
5639
|
+
}), tapError2(onProtocolRefusal)),
|
|
5625
5640
|
heartbeatWork: (workUnitId, lease) => heartbeat({ workUnitId, lease }),
|
|
5626
5641
|
complete: (completion) => rpc.complete(completion),
|
|
5627
5642
|
release: (workUnitId, lease, crashed, tokens, ranModel) => rpc.release({
|
|
@@ -5634,8 +5649,7 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
5634
5649
|
};
|
|
5635
5650
|
};
|
|
5636
5651
|
const supervised = superviseReplica({
|
|
5637
|
-
|
|
5638
|
-
concurrency: sync2(() => live.settings.concurrency),
|
|
5652
|
+
concurrency: sync2(() => appliedRunnerSettings().concurrency),
|
|
5639
5653
|
verifications,
|
|
5640
5654
|
control,
|
|
5641
5655
|
executor: {
|
|
@@ -5695,7 +5709,7 @@ function mcpCommand(args) {
|
|
|
5695
5709
|
if (command.action === "run") {
|
|
5696
5710
|
if (command.args.length > 0)
|
|
5697
5711
|
return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
|
|
5698
|
-
const { runMcpServerCommand } = yield* promise(() => import("./chunk-
|
|
5712
|
+
const { runMcpServerCommand } = yield* promise(() => import("./chunk-fmvdwf5h.js"));
|
|
5699
5713
|
return yield* runMcpServerCommand({ flags: command.flags });
|
|
5700
5714
|
}
|
|
5701
5715
|
if (command.action !== "setup")
|
|
@@ -6195,7 +6209,7 @@ function programLoopCommand(command) {
|
|
|
6195
6209
|
return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
|
|
6196
6210
|
});
|
|
6197
6211
|
}
|
|
6198
|
-
var docsModule = promise(() => import("./chunk-
|
|
6212
|
+
var docsModule = promise(() => import("./chunk-e3dv8hzy.js"));
|
|
6199
6213
|
function docsCommand(args) {
|
|
6200
6214
|
return gen(function* () {
|
|
6201
6215
|
const command = parseCommand(args);
|
|
@@ -7199,7 +7213,7 @@ function changeRequestCommand(args) {
|
|
|
7199
7213
|
yield* log(command.action === "approve" ? `Approved ${short} of ${changeRequest.title}. A Run waiting on approval of ${short} resumes; one waiting on another head does not.` : `Requested changes to ${short} of ${changeRequest.title}`);
|
|
7200
7214
|
});
|
|
7201
7215
|
}
|
|
7202
|
-
var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-
|
|
7216
|
+
var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-tqv14b4c.js")), (build) => build.readOutlines(directory)).pipe(mapError2((error) => new CliError({ message: error.message })));
|
|
7203
7217
|
var loopOutline = (command) => gen(function* () {
|
|
7204
7218
|
const path = yield* Path;
|
|
7205
7219
|
const loop = requiredArg(command, "a Loop id");
|
|
@@ -7219,9 +7233,9 @@ var loopOutline = (command) => gen(function* () {
|
|
|
7219
7233
|
`).pipe(mapError2((error) => new CliError({ message: error.message })));
|
|
7220
7234
|
yield* log(`Wrote the outline of ${loop} to ${out}`);
|
|
7221
7235
|
});
|
|
7222
|
-
var KitWriter = map9(promise(() => import("./chunk-
|
|
7236
|
+
var KitWriter = map9(promise(() => import("./chunk-tqv14b4c.js")), (build) => build.writeKit);
|
|
7223
7237
|
var KitBuilder = Reference("kitman/cli/KitBuilder", {
|
|
7224
|
-
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-
|
|
7238
|
+
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-tqv14b4c.js")), (build) => build.buildKit(directory))
|
|
7225
7239
|
});
|
|
7226
7240
|
var uploadKit = (client, workspaceId, built) => gen(function* () {
|
|
7227
7241
|
yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
|
|
@@ -8000,7 +8014,7 @@ function downloadPresignedAsset(download, outputPath) {
|
|
|
8000
8014
|
return gen(function* () {
|
|
8001
8015
|
const fs = yield* FileSystem;
|
|
8002
8016
|
const failed = (cause) => new CliError({ message: `Asset download failed: ${String(cause)}` });
|
|
8003
|
-
const response = yield* send(
|
|
8017
|
+
const response = yield* send(make4(download.method)(download.url), failed);
|
|
8004
8018
|
if (response.status < 200 || response.status >= 300)
|
|
8005
8019
|
return yield* new CliError({ message: `Asset download failed with ${response.status}` });
|
|
8006
8020
|
const body = yield* response.arrayBuffer.pipe(mapError2((error) => failed(error.message)));
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
writeSrtSettings2,
|
|
16
16
|
srtStepArgv2,
|
|
17
17
|
srtArgv2
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import"./chunk-
|
|
18
|
+
} from "./chunk-5smh4dp2.js";
|
|
19
|
+
import"./chunk-k462v2v7.js";
|
|
20
20
|
export {
|
|
21
21
|
compiled2 as compiled,
|
|
22
22
|
harnessesUnsupportedInDocker2 as harnessesUnsupportedInDocker,
|
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
Record,
|
|
25
25
|
Int,
|
|
26
26
|
fromJsonString
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-k462v2v7.js";
|
|
28
28
|
import {
|
|
29
29
|
withDefault,
|
|
30
30
|
String2
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-5smh4dp2.js";
|
|
32
32
|
import {
|
|
33
33
|
newerKitmanVersion,
|
|
34
34
|
digestSha256,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
get2,
|
|
40
40
|
layer4,
|
|
41
41
|
KitDigest
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-69y8j7fs.js";
|
|
43
43
|
|
|
44
44
|
// packages/core/src/npm-registry.ts
|
|
45
45
|
var KitManifest = Struct({
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
isSome,
|
|
9
9
|
map4,
|
|
10
10
|
Service2,
|
|
11
|
-
|
|
11
|
+
empty4,
|
|
12
12
|
add,
|
|
13
13
|
getOrUndefinedUnsafe,
|
|
14
14
|
getUnsafe,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
Defect,
|
|
97
97
|
Exit,
|
|
98
98
|
toCodecJson
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-k462v2v7.js";
|
|
100
100
|
import {
|
|
101
101
|
Clock,
|
|
102
102
|
interrupt,
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
shutdownUnsafe,
|
|
110
110
|
fromQueue,
|
|
111
111
|
unwrap
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-5smh4dp2.js";
|
|
113
113
|
import {
|
|
114
114
|
empty,
|
|
115
115
|
fromInput,
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
ParseOptions,
|
|
124
124
|
RpcClientDefect,
|
|
125
125
|
RpcClientError
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-69y8j7fs.js";
|
|
127
127
|
|
|
128
128
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/workers/Transferable.js
|
|
129
129
|
class Collector extends (/* @__PURE__ */ Service2()("effect/workers/Transferable/Collector")) {
|
|
@@ -260,7 +260,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
|
|
|
260
260
|
const middleware = getRpcClientMiddleware(rpc);
|
|
261
261
|
return (payload, opts) => {
|
|
262
262
|
const headers = opts?.headers ? fromInput(opts.headers) : empty;
|
|
263
|
-
const context = opts?.context ??
|
|
263
|
+
const context = opts?.context ?? empty4();
|
|
264
264
|
if (!isStream) {
|
|
265
265
|
const onRequest = (span) => onEffectRequest(rpc, middleware, span, rpc.payloadSchema.make(payload), headers, context, opts?.discard ?? false);
|
|
266
266
|
return disableTracing ? onRequest(undefined) : useSpan(spanName(spanPrefix, rpc._tag), {
|
|
@@ -483,7 +483,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
|
|
|
483
483
|
};
|
|
484
484
|
});
|
|
485
485
|
var clientIdCounter = 0;
|
|
486
|
-
var
|
|
486
|
+
var make3 = /* @__PURE__ */ fnUntraced(function* (group, options) {
|
|
487
487
|
const clientId = clientIdCounter++;
|
|
488
488
|
const {
|
|
489
489
|
codecFor,
|
|
@@ -829,4 +829,4 @@ var layerProtocolSocket = (options) => effect(Protocol)(makeProtocolSocket(optio
|
|
|
829
829
|
class ConnectionHooks extends (/* @__PURE__ */ Service2()("effect/rpc/RpcClient/ConnectionHooks")) {
|
|
830
830
|
}
|
|
831
831
|
|
|
832
|
-
export { layerJson,
|
|
832
|
+
export { layerJson, make3, withHeaders, layerProtocolSocket, ConnectionHooks };
|