@kitman-sh/cli 0.43.0 → 0.44.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-6x08g7m6.js → chunk-134jdvs6.js} +2 -2
- package/dist/{chunk-d4vhrja4.js → chunk-1c4wk9dr.js} +3 -3
- package/dist/{chunk-0qfaf9h3.js → chunk-1k6z8q79.js} +31 -38
- package/dist/{chunk-etrfc5cn.js → chunk-3mbp8cse.js} +29 -17
- package/dist/{chunk-jvwjreb0.js → chunk-3zy2vbp0.js} +10 -10
- package/dist/{chunk-b2btevxm.js → chunk-5ccz7ghp.js} +53 -39
- package/dist/{chunk-rbt72xjw.js → chunk-7rj9d0rp.js} +21 -2
- package/dist/{chunk-8b02x7vv.js → chunk-8a7337s1.js} +1 -1
- package/dist/{chunk-ea29sbaq.js → chunk-9h16pekj.js} +1 -1
- package/dist/{chunk-27e7m975.js → chunk-d0rx9esz.js} +4 -4
- package/dist/{chunk-fekh3jwz.js → chunk-d2tpz1yp.js} +1 -1
- package/dist/{chunk-91tvnb8f.js → chunk-dj873p0e.js} +14 -14
- package/dist/{chunk-hgvft7vy.js → chunk-dp6v658s.js} +4 -4
- package/dist/{chunk-fbddgx6q.js → chunk-dre4f6s4.js} +9 -9
- package/dist/{chunk-bqebfc06.js → chunk-gw0pc35c.js} +17 -17
- package/dist/{chunk-7ygg19wj.js → chunk-hmctc4eq.js} +3 -3
- package/dist/{chunk-qqc567gx.js → chunk-j60f2tr1.js} +4 -4
- package/dist/{chunk-98azvx6g.js → chunk-k2re3tp5.js} +1 -1
- package/dist/{chunk-ns26fbmk.js → chunk-ncp13gyf.js} +2 -2
- package/dist/{chunk-jq5h43a4.js → chunk-qkwkxn4d.js} +326 -98
- package/dist/{chunk-cnryphhh.js → chunk-wh3pjr9r.js} +10 -10
- package/dist/{chunk-qxpwkb5f.js → chunk-wkg1v0kd.js} +5 -5
- package/dist/{chunk-wv8kt4rb.js → chunk-wvnsqt17.js} +6 -6
- package/dist/{chunk-bqbfyqx6.js → chunk-x0ma41ys.js} +34 -24
- package/dist/{chunk-wy6gmtd9.js → chunk-zkvrxna8.js} +2 -2
- package/dist/{chunk-bbq7q5r6.js → chunk-zvmdyf3v.js} +53 -33
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
decodeJsonStringOption,
|
|
110
110
|
encodeJsonStringSync,
|
|
111
111
|
encodePrettyJsonString
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-x0ma41ys.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-3mbp8cse.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,
|
|
@@ -252,15 +252,15 @@ import {
|
|
|
252
252
|
harnessNames,
|
|
253
253
|
herdrRunnerCapabilities2,
|
|
254
254
|
declaredChecks
|
|
255
|
-
} from "./chunk-
|
|
255
|
+
} from "./chunk-1k6z8q79.js";
|
|
256
256
|
import {
|
|
257
257
|
ChildProcessSpawner,
|
|
258
258
|
make3
|
|
259
|
-
} from "./chunk-
|
|
259
|
+
} from "./chunk-134jdvs6.js";
|
|
260
260
|
import {
|
|
261
261
|
Id,
|
|
262
262
|
Timestamp
|
|
263
|
-
} from "./chunk-
|
|
263
|
+
} from "./chunk-9h16pekj.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-j60f2tr1.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-j60f2tr1.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",
|
|
@@ -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-3zy2vbp0.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)
|
|
@@ -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.44.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-qkwkxn4d.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-wvnsqt17.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)),
|
|
@@ -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-zvmdyf3v.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-d2tpz1yp.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-gw0pc35c.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-gw0pc35c.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-gw0pc35c.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) });
|
|
@@ -1320,7 +1320,26 @@ Runners execute StepAttempts in user-controlled environments. A runner advertise
|
|
|
1320
1320
|
path: "runner-operations#runner-settings",
|
|
1321
1321
|
level: 3,
|
|
1322
1322
|
link: "https://kitman.sh/knowledge/docs/runner-operations#runner-settings",
|
|
1323
|
-
text:
|
|
1323
|
+
text: `### Runner settings
|
|
1324
|
+
|
|
1325
|
+
Kitman keeps how your Runner behaves, so you change it on the Runner's page in the **Runners** tab, or with \`kitman runner settings <runner>\`, without touching its service. Its owner, or a Workspace admin, may change it; each change is in its History with who made it, when, and the old and new value (\`kitman runner settings history <runner>\`).
|
|
1326
|
+
|
|
1327
|
+
- **Concurrency**: how many Work Units it runs at once, any whole number from 1. It applies a change within about 10 seconds, without a restart, and work in flight finishes first.
|
|
1328
|
+
- **Verification concurrency**: how many of those may be Verifications, the checks that test a Step's work. By default, \`auto\`, it runs one Verification per 3 of its machine's cores, rounded up: 8 on 24 cores, 3 on 8. The cores are those the Runner may use, so a container or pod with a CPU limit of 4 counts 4. The Runner's page shows the number it applies, such as "auto (8 on this machine)". Set a whole number from 1 to choose it yourself; 32 means exactly 32. When Verifications are capped below the concurrency, each check is also told to use the cores divided by the cap (through \`GOMAXPROCS\`, \`RAYON_NUM_THREADS\`, \`UV_THREADPOOL_SIZE\` and \`VITEST_MAX_WORKERS\`); tools that read none of these size their own pools. It never runs more of them than its concurrency, even when this setting is higher. Its other slots keep taking agent Steps. It caps each Runner process, so a Runner with several replicas runs that many on each.
|
|
1329
|
+
- **Sandbox**: \`srt\` (the default), \`docker\` or \`host\`. New Steps and checks use a change; a running Step keeps its own.
|
|
1330
|
+
- **Docker image**: the image \`docker\` runs agents in, pinned by digest. It applies when the Runner restarts.
|
|
1331
|
+
- **Check hosts**: hosts every check this Runner runs, for any Team, may also reach.
|
|
1332
|
+
- **Checks' Docker image** and **checks' registry image**: for a pipeline check's own Docker daemon (below), each pinned by digest. They apply when the Runner restarts.
|
|
1333
|
+
|
|
1334
|
+
\`\`\`sh
|
|
1335
|
+
kitman runner settings <runner> --concurrency 2 --check-hosts github.com
|
|
1336
|
+
\`\`\`
|
|
1337
|
+
|
|
1338
|
+
The Runner's page shows where what the Runner applies differs from its settings, and why.
|
|
1339
|
+
|
|
1340
|
+
A few things stay on your machine, because they start the Runner or protect it: the Runner's id, the API URL and its credential, \`KITMAN_RUNNER_FULL_ACCESS\`, and your consent to run agents with no sandbox, \`KITMAN_RUNNER_ALLOW_FULL_ACCESS=1\`. Kitman cannot give that consent, so nobody who can change the Runner's settings, nor a compromised control plane, can turn off your machine's sandbox: a Runner set to \`host\` on a machine without it runs its agents in \`srt\` and shows the \`full_access_refused\` Runner Problem. A Runner set to \`host\` on a machine with it runs agents that use your own \`kitman\` login. When Kitman refuses that login, the Runner shows the \`cli_session_expired\` Runner Problem: run \`kitman login\` on the machine.
|
|
1341
|
+
|
|
1342
|
+
Before Kitman kept these, they were the environment variables \`KITMAN_RUNNER_CONCURRENCY\`, \`KITMAN_RUNNER_SANDBOX\`, \`KITMAN_RUNNER_DOCKER_IMAGE\`, \`KITMAN_RUNNER_CHECK_HOSTS\`, \`KITMAN_RUNNER_CHECK_DOCKER_IMAGE\` and \`KITMAN_RUNNER_CHECK_REGISTRY_IMAGE\`. The first time a Runner starts on a version with settings, Kitman adopts the values they give, once, for each setting nobody has set yet (a shared Runner's sandbox excepted); after that the Runner ignores them and warns at each start that each one still set is deprecated. Remove them from its service when its settings look right. While \`KITMAN_RUNNER_SANDBOX=host\` stays set, it counts as your consent to run agents on the host.`
|
|
1324
1343
|
},
|
|
1325
1344
|
{
|
|
1326
1345
|
title: "Runner Operations Guide \u203A The sandbox",
|
|
@@ -2211,7 +2230,7 @@ var pathOfLink = (link) => {
|
|
|
2211
2230
|
return page === null ? link : page[1] || "index";
|
|
2212
2231
|
};
|
|
2213
2232
|
var UnpinnedSdkLink = "https://cdn.jsdelivr.net/npm/@kitman-sh/sdk/";
|
|
2214
|
-
var pinnedLink2 = (link, version = "0.
|
|
2233
|
+
var pinnedLink2 = (link, version = "0.44.0") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
|
|
2215
2234
|
var pageOf = (path) => path.split("#")[0];
|
|
2216
2235
|
var exportName = (section) => section.path.startsWith("sdk/") ? section.path.split("#")[1] ?? "" : "";
|
|
2217
2236
|
function excerpt(text, queryTerms) {
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
gen,
|
|
7
7
|
flatMap3,
|
|
8
8
|
provideContext2
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-x0ma41ys.js";
|
|
10
10
|
import {
|
|
11
11
|
runForEach
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3mbp8cse.js";
|
|
13
13
|
import {
|
|
14
14
|
WebSocketConstructor,
|
|
15
15
|
layerWebSocketConstructorGlobal,
|
|
@@ -19,13 +19,13 @@ import {
|
|
|
19
19
|
RunnerReplicaRpcs,
|
|
20
20
|
RunnerRunFileRpcs,
|
|
21
21
|
ProgramRpcs
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-1k6z8q79.js";
|
|
23
23
|
import {
|
|
24
24
|
layerJson,
|
|
25
25
|
make4,
|
|
26
26
|
withHeaders,
|
|
27
27
|
layerProtocolSocket
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-wkg1v0kd.js";
|
|
29
29
|
|
|
30
30
|
// packages/live/src/rpc/runner-client.ts
|
|
31
31
|
var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
isNone,
|
|
10
10
|
getOrElse,
|
|
11
11
|
Service2,
|
|
12
|
-
|
|
12
|
+
empty4,
|
|
13
13
|
add,
|
|
14
14
|
getOrUndefined2,
|
|
15
15
|
get4,
|
|
@@ -138,7 +138,13 @@ import {
|
|
|
138
138
|
toJsonSchemaDocument,
|
|
139
139
|
toCodecJson,
|
|
140
140
|
Json
|
|
141
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-x0ma41ys.js";
|
|
142
|
+
import {
|
|
143
|
+
currentTimeMillis,
|
|
144
|
+
getCurrent,
|
|
145
|
+
runForEach,
|
|
146
|
+
FileSystem
|
|
147
|
+
} from "./chunk-3mbp8cse.js";
|
|
142
148
|
import {
|
|
143
149
|
WebCrypto,
|
|
144
150
|
makeUnsafe,
|
|
@@ -175,24 +181,18 @@ import {
|
|
|
175
181
|
StepManifest,
|
|
176
182
|
KitSetup,
|
|
177
183
|
RunnerRpcError
|
|
178
|
-
} from "./chunk-
|
|
179
|
-
import {
|
|
180
|
-
currentTimeMillis,
|
|
181
|
-
getCurrent,
|
|
182
|
-
runForEach,
|
|
183
|
-
FileSystem
|
|
184
|
-
} from "./chunk-etrfc5cn.js";
|
|
184
|
+
} from "./chunk-1k6z8q79.js";
|
|
185
185
|
import {
|
|
186
186
|
splitQuestionOptions,
|
|
187
187
|
recommendationProblem,
|
|
188
188
|
questionAdvice
|
|
189
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-k2re3tp5.js";
|
|
190
190
|
import {
|
|
191
191
|
guard,
|
|
192
192
|
Id,
|
|
193
193
|
Timestamp,
|
|
194
194
|
ActorType
|
|
195
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-9h16pekj.js";
|
|
196
196
|
var __defProp = Object.defineProperty;
|
|
197
197
|
var __returnValue = (v) => v;
|
|
198
198
|
function __exportSetter(name, newValue) {
|
|
@@ -755,7 +755,7 @@ var make = (tag, options) => makeProto({
|
|
|
755
755
|
payloadSchema: isSchema(options.payload) ? options.payload : Struct(options.payload),
|
|
756
756
|
successSchema: options.success ?? Void,
|
|
757
757
|
errorSchema: options.error ?? Never,
|
|
758
|
-
annotations: options.annotations ??
|
|
758
|
+
annotations: options.annotations ?? empty4(),
|
|
759
759
|
idempotencyKey: options.idempotencyKey,
|
|
760
760
|
suspendedRetrySchedule: options.suspendedRetrySchedule
|
|
761
761
|
});
|
|
@@ -935,7 +935,7 @@ var make3 = (options) => {
|
|
|
935
935
|
errorSchema,
|
|
936
936
|
exitSchema: Exit(successSchemaJson, errorSchemaJson, Defect()),
|
|
937
937
|
exitSchemaPartial: Exit(successSchemaJson, errorSchemaJson, Unknown),
|
|
938
|
-
annotations: options.annotations ??
|
|
938
|
+
annotations: options.annotations ?? empty4(),
|
|
939
939
|
annotate(tag, value) {
|
|
940
940
|
return make3({
|
|
941
941
|
...options,
|
|
@@ -1380,7 +1380,7 @@ var StepError = Union([
|
|
|
1380
1380
|
ChangeRequestClosed,
|
|
1381
1381
|
ChildFailed
|
|
1382
1382
|
]);
|
|
1383
|
-
var serviceFree = (effect) => provide3(effect,
|
|
1383
|
+
var serviceFree = (effect) => provide3(effect, empty4());
|
|
1384
1384
|
var declared = [];
|
|
1385
1385
|
var stackSite = /\(?((?:[a-z]+:\/\/)?[^\s()]+):(\d+):(\d+)\)?$/u;
|
|
1386
1386
|
var callSite = (above) => {
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
readOpencode2,
|
|
10
10
|
databaseStamp2,
|
|
11
11
|
runOpencodeReader2
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import"./chunk-
|
|
14
|
-
import"./chunk-
|
|
15
|
-
import"./chunk-
|
|
12
|
+
} from "./chunk-wh3pjr9r.js";
|
|
13
|
+
import"./chunk-134jdvs6.js";
|
|
14
|
+
import"./chunk-3mbp8cse.js";
|
|
15
|
+
import"./chunk-x0ma41ys.js";
|
|
16
16
|
export {
|
|
17
17
|
databaseStamp2 as databaseStamp,
|
|
18
18
|
decoded2 as decoded,
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
FileSystem,
|
|
4
|
+
Path,
|
|
5
|
+
optionalEnv,
|
|
6
|
+
tempDirectoryScoped
|
|
7
|
+
} from "./chunk-3mbp8cse.js";
|
|
2
8
|
import {
|
|
3
9
|
Reference,
|
|
4
10
|
TaggedError,
|
|
@@ -25,21 +31,15 @@ import {
|
|
|
25
31
|
isString2,
|
|
26
32
|
encodePrettyJsonString,
|
|
27
33
|
decodeJsonStringSync
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import {
|
|
30
|
-
FileSystem,
|
|
31
|
-
Path,
|
|
32
|
-
optionalEnv,
|
|
33
|
-
tempDirectoryScoped
|
|
34
|
-
} from "./chunk-etrfc5cn.js";
|
|
34
|
+
} from "./chunk-x0ma41ys.js";
|
|
35
35
|
import {
|
|
36
36
|
AgentHarnessIds,
|
|
37
37
|
sha2562,
|
|
38
38
|
runCommand2
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-1k6z8q79.js";
|
|
40
40
|
import {
|
|
41
41
|
NpmRegistry
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-hmctc4eq.js";
|
|
43
43
|
|
|
44
44
|
// packages/agent-runtime/src/config-convergence.ts
|
|
45
45
|
var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
decodeText,
|
|
4
|
+
mkString,
|
|
5
|
+
FileSystem,
|
|
6
|
+
Path,
|
|
7
|
+
withDefault,
|
|
8
|
+
String2
|
|
9
|
+
} from "./chunk-3mbp8cse.js";
|
|
2
10
|
import {
|
|
3
11
|
isString,
|
|
4
12
|
isObject,
|
|
@@ -35,15 +43,7 @@ import {
|
|
|
35
43
|
toCodecJson,
|
|
36
44
|
Json,
|
|
37
45
|
encodePrettyJsonString
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import {
|
|
40
|
-
decodeText,
|
|
41
|
-
mkString,
|
|
42
|
-
FileSystem,
|
|
43
|
-
Path,
|
|
44
|
-
withDefault,
|
|
45
|
-
String2
|
|
46
|
-
} from "./chunk-etrfc5cn.js";
|
|
46
|
+
} from "./chunk-x0ma41ys.js";
|
|
47
47
|
import {
|
|
48
48
|
SecureRandom,
|
|
49
49
|
layerWebCrypto,
|
|
@@ -60,26 +60,26 @@ import {
|
|
|
60
60
|
KitDeclarations,
|
|
61
61
|
kitmanMcpServer,
|
|
62
62
|
RunnerRpcProtocolVersion
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-1k6z8q79.js";
|
|
64
64
|
import {
|
|
65
65
|
Packument,
|
|
66
66
|
tarballMatches
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-hmctc4eq.js";
|
|
68
68
|
import {
|
|
69
69
|
stepDefinedTwice,
|
|
70
70
|
hostSteps,
|
|
71
71
|
exports_activities,
|
|
72
72
|
describeFlag,
|
|
73
73
|
Described
|
|
74
|
-
} from "./chunk-
|
|
75
|
-
import"./chunk-
|
|
76
|
-
import"./chunk-
|
|
74
|
+
} from "./chunk-dj873p0e.js";
|
|
75
|
+
import"./chunk-d0rx9esz.js";
|
|
76
|
+
import"./chunk-k2re3tp5.js";
|
|
77
77
|
import {
|
|
78
78
|
ChildProcessSpawner,
|
|
79
79
|
make3
|
|
80
|
-
} from "./chunk-
|
|
81
|
-
import"./chunk-
|
|
82
|
-
import"./chunk-
|
|
80
|
+
} from "./chunk-134jdvs6.js";
|
|
81
|
+
import"./chunk-wkg1v0kd.js";
|
|
82
|
+
import"./chunk-9h16pekj.js";
|
|
83
83
|
|
|
84
84
|
// packages/sdk/src/build/outline/graph.ts
|
|
85
85
|
import {
|
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
Record,
|
|
25
25
|
Int,
|
|
26
26
|
fromJsonString
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-x0ma41ys.js";
|
|
28
28
|
import {
|
|
29
29
|
withDefault,
|
|
30
30
|
String2
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-3mbp8cse.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-1k6z8q79.js";
|
|
43
43
|
|
|
44
44
|
// packages/core/src/npm-registry.ts
|
|
45
45
|
var KitManifest = Struct({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-134jdvs6.js";
|
|
3
3
|
import {
|
|
4
4
|
HERDR_CORE_GENERATION2,
|
|
5
5
|
HERDR_CORE_INSTALL_COMMAND2,
|
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
herdrCoreLayer2,
|
|
13
13
|
herdrCoreTransportLayer2,
|
|
14
14
|
updateHerdrCore2
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import"./chunk-
|
|
17
|
-
import"./chunk-
|
|
15
|
+
} from "./chunk-1k6z8q79.js";
|
|
16
|
+
import"./chunk-3mbp8cse.js";
|
|
17
|
+
import"./chunk-x0ma41ys.js";
|
|
18
18
|
export {
|
|
19
19
|
HERDR_CORE_GENERATION2 as HERDR_CORE_GENERATION,
|
|
20
20
|
HERDR_CORE_INSTALL_COMMAND2 as HERDR_CORE_INSTALL_COMMAND,
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
writeSrtSettings2,
|
|
16
16
|
srtStepArgv2,
|
|
17
17
|
srtArgv2
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import"./chunk-
|
|
18
|
+
} from "./chunk-3mbp8cse.js";
|
|
19
|
+
import"./chunk-x0ma41ys.js";
|
|
20
20
|
export {
|
|
21
21
|
compiled2 as compiled,
|
|
22
22
|
harnessesUnsupportedInDocker2 as harnessesUnsupportedInDocker,
|