@kitman-sh/cli 0.37.0 → 0.40.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-b4gf06xg.js → chunk-25wwvwrt.js} +2 -2
- package/dist/{chunk-2nqsmnx7.js → chunk-2rbng4nf.js} +3 -3
- package/dist/{chunk-gfzzgz3h.js → chunk-2y0r9xr3.js} +3 -3
- package/dist/{chunk-2pqqspes.js → chunk-4dpm4thy.js} +46 -26
- package/dist/{chunk-cb6yfbkf.js → chunk-6fk86dg7.js} +4 -4
- package/dist/{chunk-k9fnm7ds.js → chunk-6x08g7m6.js} +1 -1
- package/dist/{chunk-za4cezh6.js → chunk-7qjzbsh4.js} +7 -7
- package/dist/{chunk-pdcj5cfz.js → chunk-8r3h8mzj.js} +1 -1
- package/dist/{chunk-ymzkqbye.js → chunk-bcw869qr.js} +2 -2
- package/dist/{chunk-3xfsv475.js → chunk-br31kbfe.js} +12 -6
- package/dist/{chunk-xmdyfzf3.js → chunk-cdy7x0em.js} +4 -3
- package/dist/{chunk-5jnye659.js → chunk-cnryphhh.js} +2 -2
- package/dist/{chunk-vyx49k26.js → chunk-etrfc5cn.js} +15 -1
- package/dist/{chunk-av744yc8.js → chunk-hgvft7vy.js} +3 -3
- package/dist/{chunk-bvpa6jrp.js → chunk-jbhd2t25.js} +5 -5
- package/dist/{chunk-kk1wfhhz.js → chunk-ks3atmhw.js} +2 -2
- package/dist/{chunk-g0vpp6p9.js → chunk-mj6q3n5b.js} +3 -3
- package/dist/{chunk-310dsxts.js → chunk-ns26fbmk.js} +1 -1
- package/dist/{chunk-ay4s5qnv.js → chunk-pzq0b1k9.js} +2 -2
- package/dist/{chunk-mpw74rad.js → chunk-ykskj5gq.js} +15 -15
- package/dist/index.js +3 -3
- package/package.json +1 -1
|
@@ -175,13 +175,13 @@ import {
|
|
|
175
175
|
StepManifest,
|
|
176
176
|
KitSetup,
|
|
177
177
|
RunnerRpcError
|
|
178
|
-
} from "./chunk-
|
|
178
|
+
} from "./chunk-cdy7x0em.js";
|
|
179
179
|
import {
|
|
180
180
|
currentTimeMillis,
|
|
181
181
|
getCurrent,
|
|
182
182
|
runForEach,
|
|
183
183
|
FileSystem
|
|
184
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-etrfc5cn.js";
|
|
185
185
|
import {
|
|
186
186
|
splitQuestionOptions,
|
|
187
187
|
recommendationProblem,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-6x08g7m6.js";
|
|
3
3
|
import {
|
|
4
4
|
HERDR_CORE_GENERATION2,
|
|
5
5
|
HERDR_CORE_INSTALL_COMMAND2,
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
herdrCoreLayer2,
|
|
13
13
|
herdrCoreTransportLayer2,
|
|
14
14
|
updateHerdrCore2
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import"./chunk-
|
|
15
|
+
} from "./chunk-cdy7x0em.js";
|
|
16
|
+
import"./chunk-etrfc5cn.js";
|
|
17
17
|
import"./chunk-bqbfyqx6.js";
|
|
18
18
|
export {
|
|
19
19
|
HERDR_CORE_GENERATION2 as HERDR_CORE_GENERATION,
|
|
@@ -31,15 +31,15 @@ import {
|
|
|
31
31
|
Path,
|
|
32
32
|
optionalEnv,
|
|
33
33
|
tempDirectoryScoped
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-etrfc5cn.js";
|
|
35
35
|
import {
|
|
36
36
|
AgentHarnessIds,
|
|
37
37
|
sha2562,
|
|
38
38
|
runCommand2
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-cdy7x0em.js";
|
|
40
40
|
import {
|
|
41
41
|
NpmRegistry
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-bcw869qr.js";
|
|
43
43
|
|
|
44
44
|
// packages/agent-runtime/src/config-convergence.ts
|
|
45
45
|
var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
|
|
@@ -263,7 +263,7 @@ import {
|
|
|
263
263
|
checkServicesFile,
|
|
264
264
|
checkServices,
|
|
265
265
|
serviceChecks
|
|
266
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-cdy7x0em.js";
|
|
267
267
|
import {
|
|
268
268
|
currentTimeMillis,
|
|
269
269
|
join,
|
|
@@ -312,7 +312,7 @@ import {
|
|
|
312
312
|
writeSrtSettings2,
|
|
313
313
|
srtStepArgv2,
|
|
314
314
|
srtArgv2
|
|
315
|
-
} from "./chunk-
|
|
315
|
+
} from "./chunk-etrfc5cn.js";
|
|
316
316
|
import {
|
|
317
317
|
writeAgentEnvironmentConfigFile2,
|
|
318
318
|
readManifestSkillPaths2,
|
|
@@ -328,8 +328,8 @@ import {
|
|
|
328
328
|
applyAgentEnvironmentMaterialization2,
|
|
329
329
|
isPathWithin2,
|
|
330
330
|
skillIdentity2
|
|
331
|
-
} from "./chunk-
|
|
332
|
-
import"./chunk-
|
|
331
|
+
} from "./chunk-2y0r9xr3.js";
|
|
332
|
+
import"./chunk-bcw869qr.js";
|
|
333
333
|
import {
|
|
334
334
|
egressAllowed,
|
|
335
335
|
writeSecretRegistry,
|
|
@@ -349,15 +349,15 @@ import {
|
|
|
349
349
|
lookAtOpencode2,
|
|
350
350
|
readOpencode2,
|
|
351
351
|
databaseStamp2
|
|
352
|
-
} from "./chunk-
|
|
352
|
+
} from "./chunk-cnryphhh.js";
|
|
353
353
|
import {
|
|
354
354
|
uploadRunFile,
|
|
355
355
|
programLease,
|
|
356
356
|
rpcRunFiles,
|
|
357
357
|
programHostsEnv,
|
|
358
358
|
undeclaredHostsEnv
|
|
359
|
-
} from "./chunk-
|
|
360
|
-
import"./chunk-
|
|
359
|
+
} from "./chunk-25wwvwrt.js";
|
|
360
|
+
import"./chunk-mj6q3n5b.js";
|
|
361
361
|
import {
|
|
362
362
|
nextInt
|
|
363
363
|
} from "./chunk-8b02x7vv.js";
|
|
@@ -365,8 +365,8 @@ import"./chunk-98azvx6g.js";
|
|
|
365
365
|
import {
|
|
366
366
|
ChildProcessSpawner,
|
|
367
367
|
make3
|
|
368
|
-
} from "./chunk-
|
|
369
|
-
import"./chunk-
|
|
368
|
+
} from "./chunk-6x08g7m6.js";
|
|
369
|
+
import"./chunk-pzq0b1k9.js";
|
|
370
370
|
import {
|
|
371
371
|
Id,
|
|
372
372
|
secretReference,
|
|
@@ -2671,6 +2671,7 @@ var stepSandboxPolicy = (input) => ({
|
|
|
2671
2671
|
...input.environment
|
|
2672
2672
|
}
|
|
2673
2673
|
});
|
|
2674
|
+
var attemptTempDirectory = (configDir) => `${configDir}/tmp`;
|
|
2674
2675
|
var prepareHarness = (input) => gen(function* () {
|
|
2675
2676
|
const adapter = harnessAdapter(input.agent.brief.harness);
|
|
2676
2677
|
if (adapter === undefined)
|
|
@@ -2700,7 +2701,7 @@ var prepareHarness = (input) => gen(function* () {
|
|
|
2700
2701
|
KITMAN_STEP_CREDENTIAL: input.agent.stepCredential,
|
|
2701
2702
|
KITMAN_API_URL: input.agent.apiUrl,
|
|
2702
2703
|
KITMAN_STEP_WORKSPACE: input.workspace,
|
|
2703
|
-
...toolless ? { KITMAN_STEP_TOOLS: "output" } :
|
|
2704
|
+
...toolless ? { KITMAN_STEP_TOOLS: "output" } : { KITMAN_STEP_LOG_DIR: attemptTempDirectory(configDir) },
|
|
2704
2705
|
...kitSetup === undefined || kitSetup.loadableSkills.length === 0 ? undefined : { KITMAN_STEP_SKILLS_DIR: `${configDir}/${kitSetup.loadableRoot}` },
|
|
2705
2706
|
...fitting.length === 0 ? undefined : { KITMAN_STEP_FITTING_SKILLS: fitting.join(",") }
|
|
2706
2707
|
}
|
|
@@ -3330,10 +3331,9 @@ var record = (home, workspace) => gen(function* () {
|
|
|
3330
3331
|
return;
|
|
3331
3332
|
const trusted = withEntry(config.value, "projects", withEntry(projects, workspace, withEntry(project, "hasTrustDialogAccepted", true)));
|
|
3332
3333
|
const json = yield* encodePrettyJsonString(codeModeCaveats.reduce((settled, key) => withEntry(settled, key, true), trusted));
|
|
3333
|
-
const temporary = yield* fs
|
|
3334
|
-
yield* fs.chmod(temporary, 384);
|
|
3334
|
+
const temporary = `${yield* tempDirectoryScoped(fs, { directory: home, prefix: ".claude.json.kitman-" })}/.claude.json`;
|
|
3335
3335
|
yield* fs.writeFileString(temporary, `${json}
|
|
3336
|
-
|
|
3336
|
+
`, { mode: 384 });
|
|
3337
3337
|
yield* fs.rename(temporary, file);
|
|
3338
3338
|
});
|
|
3339
3339
|
|
|
@@ -4788,6 +4788,10 @@ var runAttempt = (request, options) => gen(function* () {
|
|
|
4788
4788
|
...stepProcessEnvironment(request.runnerId, attempt.id),
|
|
4789
4789
|
...threadBudgetEnvironment(yield* options.threadBudget)
|
|
4790
4790
|
};
|
|
4791
|
+
const attemptTemp = attemptTempDirectory(configDir);
|
|
4792
|
+
const makeAttemptTemp = gen(function* () {
|
|
4793
|
+
yield* (yield* FileSystem).makeDirectory(attemptTemp, { recursive: true });
|
|
4794
|
+
}).pipe(mapError2(harnessConfigUnwritable));
|
|
4791
4795
|
const sandboxed = gen(function* () {
|
|
4792
4796
|
switch (request.sandbox.backend) {
|
|
4793
4797
|
case "srt": {
|
|
@@ -4818,8 +4822,10 @@ var runAttempt = (request, options) => gen(function* () {
|
|
|
4818
4822
|
summary: "srt settings could not be written."
|
|
4819
4823
|
})));
|
|
4820
4824
|
yield* requireKitCommands(kitSetup, runsOnHost);
|
|
4825
|
+
yield* makeAttemptTemp;
|
|
4821
4826
|
const env = {
|
|
4822
4827
|
...yield* inheritedEnvironment2(srtInheritedEnv2),
|
|
4828
|
+
CLAUDE_CODE_TMPDIR: attemptTemp,
|
|
4823
4829
|
...loginReferences,
|
|
4824
4830
|
...policy.environment,
|
|
4825
4831
|
...srtCacheEnvironment2(`${configDir}/cache`),
|
|
@@ -4886,8 +4892,10 @@ var runAttempt = (request, options) => gen(function* () {
|
|
|
4886
4892
|
}
|
|
4887
4893
|
default:
|
|
4888
4894
|
yield* requireKitCommands(kitSetup, runsOnHost);
|
|
4895
|
+
yield* makeAttemptTemp;
|
|
4889
4896
|
const env = {
|
|
4890
4897
|
...yield* inheritedEnvironment2(["SSH_AUTH_SOCK"]),
|
|
4898
|
+
TMPDIR: attemptTemp,
|
|
4891
4899
|
...policy.environment,
|
|
4892
4900
|
...yield* options.stepProcesses.dockerEnvironment(request.runnerId, attempt.id),
|
|
4893
4901
|
...attemptEnvironment
|
|
@@ -9231,14 +9239,14 @@ var postgresRoute = (backend, postgres) => {
|
|
|
9231
9239
|
tunnel: srtPostgresTunnel(postgres.hostPort)
|
|
9232
9240
|
};
|
|
9233
9241
|
};
|
|
9234
|
-
var checkSandboxPolicy = (work, sandbox, checkout, cache,
|
|
9242
|
+
var checkSandboxPolicy = (work, sandbox, checkout, cache, checkDirectories, postgresHosts, docker) => ({
|
|
9235
9243
|
...runnerStateSandboxPolicy(sandbox.runner, [
|
|
9236
9244
|
repositoryClone(sandbox.runner.workRoot, work.repoBinding.id),
|
|
9237
9245
|
checkout,
|
|
9238
9246
|
...docker === undefined ? [] : [docker.clientDir],
|
|
9239
9247
|
...docker?.route.kind === "relay" ? docker.route.encoder : []
|
|
9240
9248
|
]),
|
|
9241
|
-
writablePaths: [checkout, cache,
|
|
9249
|
+
writablePaths: [checkout, cache, ...checkDirectories, ...docker === undefined ? [] : [docker.clientDir]],
|
|
9242
9250
|
network: verificationNetworkAllowlist({
|
|
9243
9251
|
apiUrl: sandbox.apiUrl,
|
|
9244
9252
|
storageOrigin: work.storageOrigin,
|
|
@@ -9259,22 +9267,26 @@ var checkRunner = (work, sandbox, cache, inherited, threadBudget) => (checkout)
|
|
|
9259
9267
|
postgres,
|
|
9260
9268
|
docker,
|
|
9261
9269
|
runnerGitConfig
|
|
9262
|
-
}) => {
|
|
9270
|
+
}) => scoped(gen(function* () {
|
|
9271
|
+
const { TMPDIR: declaredTmp, ...declared } = added ?? {};
|
|
9272
|
+
const checkTmp = declaredTmp ?? (yield* tempDirectoryScoped(yield* FileSystem, { prefix: "kitman-check-tmp-" }));
|
|
9273
|
+
const ownTmp = declaredTmp === undefined ? checkTmp : undefined;
|
|
9263
9274
|
const gitEnvironment = runnerGitConfig === true ? { GIT_TERMINAL_PROMPT: "0" } : checkGitEnvironment;
|
|
9264
9275
|
const env = {
|
|
9265
|
-
...
|
|
9276
|
+
...declared,
|
|
9266
9277
|
...threadBudgetEnvironment(threadBudget),
|
|
9267
9278
|
...gitEnvironment,
|
|
9268
9279
|
KITMAN_RUN_FILES_DIR: filesDir
|
|
9269
9280
|
};
|
|
9270
9281
|
const output = onOutput === undefined ? undefined : { onOutput };
|
|
9271
9282
|
if (sandbox === undefined || sandbox.backend === undefined) {
|
|
9272
|
-
return runShell2(command, {
|
|
9283
|
+
return yield* runShell2(command, {
|
|
9273
9284
|
cwd,
|
|
9274
9285
|
extendEnv: false,
|
|
9275
9286
|
env: {
|
|
9276
9287
|
...hostCheckEnvironment(docker),
|
|
9277
9288
|
...env,
|
|
9289
|
+
TMPDIR: checkTmp,
|
|
9278
9290
|
...postgres === undefined ? undefined : { POSTGRES_URL: checkPostgresUrl(postgres, "127.0.0.1", postgres.hostPort) }
|
|
9279
9291
|
},
|
|
9280
9292
|
timeout,
|
|
@@ -9283,11 +9295,14 @@ var checkRunner = (work, sandbox, cache, inherited, threadBudget) => (checkout)
|
|
|
9283
9295
|
}
|
|
9284
9296
|
const route = postgresRoute(sandbox.backend, postgres);
|
|
9285
9297
|
const daemon = dockerRoute(sandbox.backend, docker, (sandbox.backend === "srt" ? sandbox.dockerPort : undefined) ?? checkDockerPort);
|
|
9286
|
-
const policy = checkSandboxPolicy(work, sandbox, checkout, cache, filesDir, [...route.hosts, ...daemon.hosts], docker);
|
|
9298
|
+
const policy = checkSandboxPolicy(work, sandbox, checkout, cache, ownTmp === undefined ? [filesDir] : [filesDir, ownTmp], [...route.hosts, ...daemon.hosts], docker);
|
|
9287
9299
|
const [tunnel, ...innerTunnels] = [route.tunnel, daemon.tunnel].filter((script) => script !== undefined);
|
|
9288
|
-
const
|
|
9300
|
+
const checkCommand = sandbox.backend === "srt" ? `export TMPDIR="$KITMAN_CHECK_TMPDIR"
|
|
9301
|
+
unset KITMAN_CHECK_TMPDIR
|
|
9302
|
+
${command}` : command;
|
|
9303
|
+
const tunnelled = innerTunnels.reduceRight((inner, script) => `sh -c ${quoted(script)} sh ${quoted(inner)}`, checkCommand);
|
|
9289
9304
|
const sandboxCommand = {
|
|
9290
|
-
argv: tunnel === undefined ? ["sh", "-c",
|
|
9305
|
+
argv: tunnel === undefined ? ["sh", "-c", checkCommand] : ["sh", "-c", tunnel, "sh", tunnelled],
|
|
9291
9306
|
cwd,
|
|
9292
9307
|
env: {
|
|
9293
9308
|
...env,
|
|
@@ -9298,10 +9313,14 @@ var checkRunner = (work, sandbox, cache, inherited, threadBudget) => (checkout)
|
|
|
9298
9313
|
timeout,
|
|
9299
9314
|
...output
|
|
9300
9315
|
};
|
|
9301
|
-
return sandbox.backend === "srt" ? runSandboxCommand({
|
|
9316
|
+
return yield* sandbox.backend === "srt" ? runSandboxCommand({
|
|
9302
9317
|
backend: "srt",
|
|
9303
9318
|
policy,
|
|
9304
|
-
command: {
|
|
9319
|
+
command: {
|
|
9320
|
+
...sandboxCommand,
|
|
9321
|
+
env: { ...inherited, ...sandboxCommand.env, KITMAN_CHECK_TMPDIR: checkTmp },
|
|
9322
|
+
extendEnv: false
|
|
9323
|
+
},
|
|
9305
9324
|
unixSockets: [...route.unixSockets, ...daemon.unixSockets],
|
|
9306
9325
|
...sandbox.srtCommand === undefined ? undefined : { srtCommand: sandbox.srtCommand },
|
|
9307
9326
|
...sandbox.srtStepCommand === undefined ? undefined : { srtStepCommand: sandbox.srtStepCommand },
|
|
@@ -9313,11 +9332,11 @@ var checkRunner = (work, sandbox, cache, inherited, threadBudget) => (checkout)
|
|
|
9313
9332
|
id: work.id,
|
|
9314
9333
|
readOnlyPaths: [repositoryClone(sandbox.runner.workRoot, work.repoBinding.id)],
|
|
9315
9334
|
policy,
|
|
9316
|
-
command: sandboxCommand,
|
|
9335
|
+
command: { ...sandboxCommand, env: { ...sandboxCommand.env, TMPDIR: checkTmp } },
|
|
9317
9336
|
services: [...route.services, ...daemon.services],
|
|
9318
9337
|
...secretRegistry === undefined ? undefined : { secretRegistry }
|
|
9319
9338
|
});
|
|
9320
|
-
};
|
|
9339
|
+
}));
|
|
9321
9340
|
var regularFiles = (dir) => gen(function* () {
|
|
9322
9341
|
const fs = yield* FileSystem;
|
|
9323
9342
|
const path = yield* Path;
|
|
@@ -10192,7 +10211,7 @@ var verificationExecutor = (input) => (work) => gen(function* () {
|
|
|
10192
10211
|
const trees = headTree === baselineTree ? [headTree] : [headTree, baselineTree];
|
|
10193
10212
|
const known = yield* input.known(work, trees);
|
|
10194
10213
|
const sandbox = input.sandbox;
|
|
10195
|
-
const checkNetwork = sandbox === undefined || sandbox.backend === undefined ? "open" : checkSandboxPolicy(work, sandbox, head, cache, cache, []).network;
|
|
10214
|
+
const checkNetwork = sandbox === undefined || sandbox.backend === undefined ? "open" : checkSandboxPolicy(work, sandbox, head, cache, [cache], []).network;
|
|
10196
10215
|
const daemonNetwork = checkNetwork === "open" ? "open" : { hosts: checkNetwork.hosts };
|
|
10197
10216
|
const services = (id) => ({
|
|
10198
10217
|
id,
|
|
@@ -10313,6 +10332,7 @@ export {
|
|
|
10313
10332
|
applyAgentEnvironmentMaterialization2 as applyAgentEnvironmentMaterialization,
|
|
10314
10333
|
applyAgentEnvironmentPlans,
|
|
10315
10334
|
assertHerdrRunnerCapability2 as assertHerdrRunnerCapability,
|
|
10335
|
+
attemptTempDirectory,
|
|
10316
10336
|
carriedLoginHosts,
|
|
10317
10337
|
carriedProviderHosts,
|
|
10318
10338
|
checkDockerAlias,
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
runnerRpcUrl2,
|
|
5
5
|
makeRunnerRpcClient2,
|
|
6
6
|
makeProgramRpcClient2
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import"./chunk-
|
|
9
|
-
import"./chunk-
|
|
7
|
+
} from "./chunk-mj6q3n5b.js";
|
|
8
|
+
import"./chunk-pzq0b1k9.js";
|
|
9
|
+
import"./chunk-cdy7x0em.js";
|
|
10
10
|
import"./chunk-ea29sbaq.js";
|
|
11
|
-
import"./chunk-
|
|
11
|
+
import"./chunk-etrfc5cn.js";
|
|
12
12
|
import"./chunk-bqbfyqx6.js";
|
|
13
13
|
export {
|
|
14
14
|
makeProgramRpcClient2 as makeProgramRpcClient,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
Path,
|
|
44
44
|
withDefault,
|
|
45
45
|
String2
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-etrfc5cn.js";
|
|
47
47
|
import {
|
|
48
48
|
SecureRandom,
|
|
49
49
|
layerWebCrypto,
|
|
@@ -60,25 +60,25 @@ import {
|
|
|
60
60
|
KitDeclarations,
|
|
61
61
|
kitmanMcpServer,
|
|
62
62
|
RunnerRpcProtocolVersion
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-cdy7x0em.js";
|
|
64
64
|
import {
|
|
65
65
|
Packument,
|
|
66
66
|
tarballMatches
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-bcw869qr.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-
|
|
74
|
+
} from "./chunk-25wwvwrt.js";
|
|
75
|
+
import"./chunk-mj6q3n5b.js";
|
|
76
76
|
import"./chunk-98azvx6g.js";
|
|
77
77
|
import {
|
|
78
78
|
ChildProcessSpawner,
|
|
79
79
|
make3
|
|
80
|
-
} from "./chunk-
|
|
81
|
-
import"./chunk-
|
|
80
|
+
} from "./chunk-6x08g7m6.js";
|
|
81
|
+
import"./chunk-pzq0b1k9.js";
|
|
82
82
|
import"./chunk-ea29sbaq.js";
|
|
83
83
|
|
|
84
84
|
// packages/sdk/src/build/outline/graph.ts
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
withDefault,
|
|
30
30
|
String2
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-etrfc5cn.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-cdy7x0em.js";
|
|
43
43
|
|
|
44
44
|
// packages/core/src/npm-registry.ts
|
|
45
45
|
var KitManifest = Struct({
|
|
@@ -148,6 +148,7 @@ import {
|
|
|
148
148
|
apiUrlFromEnv,
|
|
149
149
|
stepCredentialFromEnv,
|
|
150
150
|
stepWorkspaceFromEnv,
|
|
151
|
+
stepLogDirFromEnv,
|
|
151
152
|
stepSkillsDirFromEnv,
|
|
152
153
|
stepFittingSkillsFromEnv,
|
|
153
154
|
stepOutputOnlyFromEnv,
|
|
@@ -169,7 +170,7 @@ import {
|
|
|
169
170
|
runMcpEffect,
|
|
170
171
|
createAgentAuthSignedFetch,
|
|
171
172
|
setupMcpAgentCredential
|
|
172
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-cdy7x0em.js";
|
|
173
174
|
import {
|
|
174
175
|
currentTimeMillis,
|
|
175
176
|
join,
|
|
@@ -187,11 +188,11 @@ import {
|
|
|
187
188
|
withDefault,
|
|
188
189
|
option,
|
|
189
190
|
String2
|
|
190
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-etrfc5cn.js";
|
|
191
192
|
import {
|
|
192
193
|
searchDocs2,
|
|
193
194
|
readDoc2
|
|
194
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-ks3atmhw.js";
|
|
195
196
|
import {
|
|
196
197
|
nextInt
|
|
197
198
|
} from "./chunk-8b02x7vv.js";
|
|
@@ -204,7 +205,7 @@ import {
|
|
|
204
205
|
withHeaders,
|
|
205
206
|
layerProtocolSocket,
|
|
206
207
|
ConnectionHooks
|
|
207
|
-
} from "./chunk-
|
|
208
|
+
} from "./chunk-pzq0b1k9.js";
|
|
208
209
|
import {
|
|
209
210
|
guard,
|
|
210
211
|
Id,
|
|
@@ -8840,7 +8841,7 @@ The skill's directory, for the files it points to: ${skillsDir}/${name}`
|
|
|
8840
8841
|
const attachable = (path) => gen(function* () {
|
|
8841
8842
|
const fs = yield* FileSystem;
|
|
8842
8843
|
const paths = yield* Path;
|
|
8843
|
-
const roots = input.fileRoots ?? [];
|
|
8844
|
+
const roots = [...input.fileRoots ?? [], ...input.logDir === undefined ? [] : [input.logDir]];
|
|
8844
8845
|
const real = yield* fs.realPath(paths.resolve(roots[0] ?? "", path)).pipe(mapError2(unreadable(path)));
|
|
8845
8846
|
const realRoots = yield* forEach(roots, (root) => option2(fs.realPath(root)));
|
|
8846
8847
|
if (!realRoots.some((root) => isSome(root) && isPathWithin(paths, root.value, real)))
|
|
@@ -8855,9 +8856,12 @@ The skill's directory, for the files it points to: ${skillsDir}/${name}`
|
|
|
8855
8856
|
})).pipe(mapError2(unreadable(path)));
|
|
8856
8857
|
const saveLog = (url) => gen(function* () {
|
|
8857
8858
|
const fs = yield* FileSystem;
|
|
8859
|
+
const root = input.logDir ?? input.fileRoots?.[1];
|
|
8860
|
+
if (input.logDir !== undefined)
|
|
8861
|
+
yield* fs.makeDirectory(input.logDir, { recursive: true });
|
|
8858
8862
|
const directory = yield* fs.makeTempDirectory({
|
|
8859
8863
|
prefix: "kitman-check-",
|
|
8860
|
-
...
|
|
8864
|
+
...root === undefined ? undefined : { directory: root }
|
|
8861
8865
|
});
|
|
8862
8866
|
const file = `${directory}/output.log`;
|
|
8863
8867
|
const response = yield* tryPromise({
|
|
@@ -9603,12 +9607,14 @@ function runMcpServerCommand(input = {}) {
|
|
|
9603
9607
|
const stepCredential = yield* stepCredentialFromEnv;
|
|
9604
9608
|
const skillsDir = yield* stepSkillsDirFromEnv;
|
|
9605
9609
|
const fittingSkills = yield* stepFittingSkillsFromEnv;
|
|
9610
|
+
const logDir = yield* stepLogDirFromEnv;
|
|
9606
9611
|
if (stepCredential !== undefined)
|
|
9607
9612
|
return yield* (yield* StepMcpServerStarter)({
|
|
9608
9613
|
apiUrl: config.apiUrl,
|
|
9609
9614
|
stepCredential,
|
|
9610
9615
|
...(yield* stepOutputOnlyFromEnv) ? { outputOnly: true } : {
|
|
9611
9616
|
fileRoots: [(yield* stepWorkspaceFromEnv) ?? cwd, tmpdir2()],
|
|
9617
|
+
...logDir === undefined ? undefined : { logDir },
|
|
9612
9618
|
...skillsDir === undefined ? undefined : { skillsDir },
|
|
9613
9619
|
...fittingSkills.length === 0 ? undefined : { fittingSkills }
|
|
9614
9620
|
}
|
|
@@ -332,7 +332,7 @@ import {
|
|
|
332
332
|
optionalEnv,
|
|
333
333
|
harnessesUnsupportedInSrt2,
|
|
334
334
|
harnessesUnsupportedInDocker2
|
|
335
|
-
} from "./chunk-
|
|
335
|
+
} from "./chunk-etrfc5cn.js";
|
|
336
336
|
import {
|
|
337
337
|
isRedacted,
|
|
338
338
|
make,
|
|
@@ -346,7 +346,7 @@ import {
|
|
|
346
346
|
make3,
|
|
347
347
|
parseFdName,
|
|
348
348
|
fdName
|
|
349
|
-
} from "./chunk-
|
|
349
|
+
} from "./chunk-6x08g7m6.js";
|
|
350
350
|
import {
|
|
351
351
|
isDateTime,
|
|
352
352
|
Numeric,
|
|
@@ -15122,6 +15122,7 @@ function resolveConfig(input) {
|
|
|
15122
15122
|
var apiUrlFromEnv = String2("KITMAN_API_URL").pipe(option, map9(getOrUndefined));
|
|
15123
15123
|
var stepCredentialFromEnv = String2("KITMAN_STEP_CREDENTIAL").pipe(option, map9(getOrUndefined));
|
|
15124
15124
|
var stepWorkspaceFromEnv = String2("KITMAN_STEP_WORKSPACE").pipe(option, map9(getOrUndefined));
|
|
15125
|
+
var stepLogDirFromEnv = String2("KITMAN_STEP_LOG_DIR").pipe(option, map9(getOrUndefined));
|
|
15125
15126
|
var stepSkillsDirFromEnv = String2("KITMAN_STEP_SKILLS_DIR").pipe(option, map9(getOrUndefined));
|
|
15126
15127
|
var stepFittingSkillsFromEnv = String2("KITMAN_STEP_FITTING_SKILLS").pipe(option, map9((names) => getOrElse(names, () => "").split(",").filter((name) => name !== "")));
|
|
15127
15128
|
var stepOutputOnlyFromEnv = String2("KITMAN_STEP_TOOLS").pipe(option, map9((tools) => getOrUndefined(tools) === "output"));
|
|
@@ -17883,4 +17884,4 @@ function serviceChecks(declaration) {
|
|
|
17883
17884
|
return decoded === undefined || decoded.services.length === 0 ? [] : [...new Set(decoded.checks ?? [])];
|
|
17884
17885
|
}
|
|
17885
17886
|
|
|
17886
|
-
export { 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, ReleaseChannels, DefaultReleaseChannel, newerKitmanVersion, releaseChannelOffers, AgentHarnessIds, AgentSkillRequirement, AgentMcpServerRequirement, AgentEnvironmentFragment, findForbiddenAgentEnvironmentSecretPath, NetworkHost, RepoBindingProviders, RepoBindingCredentialProviderTypes, RepoBindingProvider, findForbiddenRepoBindingSecretPath, releaseVersion, ReleaseScope, isBranchName, baseBranchLayerWords, repositoryKey, loopInputFields, InputSourceLayers, InputSource, inputSourceWords, runnerAgentSandboxPolicy, agentNetworkAllowlist, verificationNetworkAllowlist, programNetworkHosts, ContextPackModes, DefaultContextPackMode, ProposalStatuses, ProposalTargetTypes, canonicalJson, canonicalSha256, tokensSpent, tokenCountWords, endsFailing, outlineText, anyFailure, goesOn, outlineMermaid, runOutlineText, isTestReportName, testDigest, failedTestOfLine, printedNotReported, failedTestsOf, testOutcomes, checkTests, loopSafeTextMaxLength, recommendedDefault, reportedModelName, RunDisplayStates, RunWaitUntils, calverNumbers, compareCalver, DeliveryMode, defaultDeployCommand, ProgramWorkUnit, MeasureSample, MeasureEvidence, TagVersions, compareCommitMax, commitMessageMax, commandTimeoutMillisDefault, commandTextLimit, catchUpPathLimit, CatchUp, RunnerOwnership, RunnerExecutionBackend, MaxRunnerConcurrency, verificationCap, PinnedImage, RunnerSettingNames, RunnerSettingsUpdate, defaultRunnerSettings, shownRunnerSetting, defaultRunnerCapabilities, deliveryProviderActions, MemoryStatuses, MemoryScopes, MaxMemoryListLimit, DecisionStatuses, Session, SessionEnd, SessionUpdate, SessionUpdateCreate, FixFlowRecoveryActions, KitmanAgentCapabilityNames, sha2562, DeployTargetName, DeployRef, DeployStatus, runsDeployedTag, Deploy, DeployTargetRunning, isRunFileRefusalReason, runFileRefusalWords, RunFileRefused, runFileContentType, ClaimResult, mergeTurnResource, createId, digestSha256, digestSha512, digestWith, sha256Hasher, AgentEvent, raw, make5, get, post, put, setHeaders, acceptJson, bodyUint8Array, bodyJsonUnsafe, bodyUrlParams, schemaBodyJson, filterStatusOk, HttpClient, execute, get2, Fetch, layer4, Socket, SocketReadError, SocketError, WebSocketConstructor, layerWebSocketConstructorGlobal, layerWebSocket, runDisplayLabels, listedSummary, stepFallbackWords, runTicketsPayload, runTicketResult, ticketOutcomeLabels, runGraphLayout, KitDigest, defaultKitName, LoopCapabilities, LoopManifest, CallableLoop, AgentDeclaration, StepManifest, KitDeclarations, KitSetup, SetupArchive, kitMcpSecretNames, kitmanMcpServer, KitmanClientError, KitmanEffectClient, CliError, DefaultApiUrl, resolveConfig, apiUrlFromEnv, stepCredentialFromEnv, stepWorkspaceFromEnv, stepSkillsDirFromEnv, stepFittingSkillsFromEnv, stepOutputOnlyFromEnv, mcpCredentialNameFromEnv, userConfigPath, userAuthPath, userHarnessSyncPath, kitSetupCacheDir, bundleCacheDir, runnerReleaseChannelPath, localConfigPath, readUserConfig, writeUserConfig, sessionForApi, readAuthStore, storeSession, removeSession, removeAllSessions, agentCredentialForApi, storeAgentCredential, removeAgentCredential, normalizeApiUrl, isStoredAgentCredential, isStreamSchema, getStreamSchemas, make6, exitSchema, ParseOptions, RpcClientDefect, RpcClientError, make7, 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, antigravityPlugins, materializeKitSetup, tomlInline, herdrExecutionExtension2, herdrNativeExtensionIds2, herdrRunnerCapabilitiesForRepoBinding2, herdrRunnerCapabilities2, assertHerdrRunnerCapability2, declaredChecks, installCommand, checkServicesFile, checkServices, serviceChecks };
|
|
17887
|
+
export { 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, ReleaseChannels, DefaultReleaseChannel, newerKitmanVersion, releaseChannelOffers, AgentHarnessIds, AgentSkillRequirement, AgentMcpServerRequirement, AgentEnvironmentFragment, findForbiddenAgentEnvironmentSecretPath, NetworkHost, RepoBindingProviders, RepoBindingCredentialProviderTypes, RepoBindingProvider, findForbiddenRepoBindingSecretPath, releaseVersion, ReleaseScope, isBranchName, baseBranchLayerWords, repositoryKey, loopInputFields, InputSourceLayers, InputSource, inputSourceWords, runnerAgentSandboxPolicy, agentNetworkAllowlist, verificationNetworkAllowlist, programNetworkHosts, ContextPackModes, DefaultContextPackMode, ProposalStatuses, ProposalTargetTypes, canonicalJson, canonicalSha256, tokensSpent, tokenCountWords, endsFailing, outlineText, anyFailure, goesOn, outlineMermaid, runOutlineText, isTestReportName, testDigest, failedTestOfLine, printedNotReported, failedTestsOf, testOutcomes, checkTests, loopSafeTextMaxLength, recommendedDefault, reportedModelName, RunDisplayStates, RunWaitUntils, calverNumbers, compareCalver, DeliveryMode, defaultDeployCommand, ProgramWorkUnit, MeasureSample, MeasureEvidence, TagVersions, compareCommitMax, commitMessageMax, commandTimeoutMillisDefault, commandTextLimit, catchUpPathLimit, CatchUp, RunnerOwnership, RunnerExecutionBackend, MaxRunnerConcurrency, verificationCap, PinnedImage, RunnerSettingNames, RunnerSettingsUpdate, defaultRunnerSettings, shownRunnerSetting, defaultRunnerCapabilities, deliveryProviderActions, MemoryStatuses, MemoryScopes, MaxMemoryListLimit, DecisionStatuses, Session, SessionEnd, SessionUpdate, SessionUpdateCreate, FixFlowRecoveryActions, KitmanAgentCapabilityNames, sha2562, DeployTargetName, DeployRef, DeployStatus, runsDeployedTag, Deploy, DeployTargetRunning, isRunFileRefusalReason, runFileRefusalWords, RunFileRefused, runFileContentType, ClaimResult, mergeTurnResource, createId, digestSha256, digestSha512, digestWith, sha256Hasher, AgentEvent, raw, make5, get, post, put, setHeaders, acceptJson, bodyUint8Array, bodyJsonUnsafe, bodyUrlParams, schemaBodyJson, filterStatusOk, HttpClient, execute, get2, Fetch, layer4, Socket, SocketReadError, SocketError, WebSocketConstructor, layerWebSocketConstructorGlobal, layerWebSocket, runDisplayLabels, listedSummary, stepFallbackWords, runTicketsPayload, runTicketResult, ticketOutcomeLabels, runGraphLayout, KitDigest, defaultKitName, LoopCapabilities, LoopManifest, CallableLoop, AgentDeclaration, StepManifest, KitDeclarations, KitSetup, SetupArchive, kitMcpSecretNames, kitmanMcpServer, KitmanClientError, KitmanEffectClient, CliError, DefaultApiUrl, resolveConfig, apiUrlFromEnv, stepCredentialFromEnv, stepWorkspaceFromEnv, stepLogDirFromEnv, stepSkillsDirFromEnv, stepFittingSkillsFromEnv, stepOutputOnlyFromEnv, mcpCredentialNameFromEnv, userConfigPath, userAuthPath, userHarnessSyncPath, kitSetupCacheDir, bundleCacheDir, runnerReleaseChannelPath, localConfigPath, readUserConfig, writeUserConfig, sessionForApi, readAuthStore, storeSession, removeSession, removeAllSessions, agentCredentialForApi, storeAgentCredential, removeAgentCredential, normalizeApiUrl, isStoredAgentCredential, isStreamSchema, getStreamSchemas, make6, exitSchema, ParseOptions, RpcClientDefect, RpcClientError, make7, 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, antigravityPlugins, materializeKitSetup, tomlInline, herdrExecutionExtension2, herdrNativeExtensionIds2, herdrRunnerCapabilitiesForRepoBinding2, herdrRunnerCapabilities2, assertHerdrRunnerCapability2, declaredChecks, installCommand, checkServicesFile, checkServices, serviceChecks };
|
|
@@ -43,11 +43,11 @@ import {
|
|
|
43
43
|
toPull,
|
|
44
44
|
FileSystem,
|
|
45
45
|
compiled2
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-etrfc5cn.js";
|
|
47
47
|
import {
|
|
48
48
|
ChildProcessSpawner,
|
|
49
49
|
make3
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-6x08g7m6.js";
|
|
51
51
|
|
|
52
52
|
// packages/agent-runtime/src/opencode-store.ts
|
|
53
53
|
import { lstatSync, readFileSync, realpathSync, writeSync } from "fs";
|
|
@@ -3559,7 +3559,21 @@ var optionalEnv = (name) => gen(function* () {
|
|
|
3559
3559
|
var operatorConfigHome = (home) => optionalEnv("XDG_CONFIG_HOME").pipe(map9((configHome) => configHome ?? `${home}/.config`));
|
|
3560
3560
|
|
|
3561
3561
|
// packages/agent-runtime/src/temp-directory.ts
|
|
3562
|
-
|
|
3562
|
+
import { chmodSync, lstatSync, readdirSync } from "fs";
|
|
3563
|
+
var makeRemovable = (directory) => {
|
|
3564
|
+
try {
|
|
3565
|
+
chmodSync(directory, 448);
|
|
3566
|
+
for (const name of readdirSync(directory, { encoding: "buffer" })) {
|
|
3567
|
+
const entry = Buffer.concat([directory, Buffer.from("/"), name]);
|
|
3568
|
+
if (lstatSync(entry).isDirectory())
|
|
3569
|
+
makeRemovable(entry);
|
|
3570
|
+
}
|
|
3571
|
+
} catch {}
|
|
3572
|
+
};
|
|
3573
|
+
var tempDirectoryScoped = (fs, options) => acquireRelease(fs.makeTempDirectory(options), (directory) => {
|
|
3574
|
+
const remove = fs.remove(directory, { recursive: true, force: true });
|
|
3575
|
+
return remove.pipe(catch_(() => andThen2(sync2(() => makeRemovable(Buffer.from(directory))), remove)), catch_((error) => logWarning("temp_directory_not_removed", { directory, error: error.message })));
|
|
3576
|
+
});
|
|
3563
3577
|
|
|
3564
3578
|
// packages/agent-runtime/src/srt-sandbox.ts
|
|
3565
3579
|
var harnessesUnsupportedInSrt2 = ["codex", "antigravity"];
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
readOpencode2,
|
|
10
10
|
databaseStamp2,
|
|
11
11
|
runOpencodeReader2
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import"./chunk-
|
|
14
|
-
import"./chunk-
|
|
12
|
+
} from "./chunk-cnryphhh.js";
|
|
13
|
+
import"./chunk-6x08g7m6.js";
|
|
14
|
+
import"./chunk-etrfc5cn.js";
|
|
15
15
|
import"./chunk-bqbfyqx6.js";
|
|
16
16
|
export {
|
|
17
17
|
databaseStamp2 as databaseStamp,
|
|
@@ -17,13 +17,13 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
FileSystem,
|
|
19
19
|
Path
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-etrfc5cn.js";
|
|
21
21
|
import {
|
|
22
22
|
tomlTableHeader2,
|
|
23
23
|
tomlKeyPath2,
|
|
24
24
|
kitmanSkillEntry,
|
|
25
25
|
isPathWithin2
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-2y0r9xr3.js";
|
|
27
27
|
import {
|
|
28
28
|
instructionsStart,
|
|
29
29
|
instructionsEnd,
|
|
@@ -31,9 +31,9 @@ import {
|
|
|
31
31
|
antigravityPlugins,
|
|
32
32
|
materializeKitSetup,
|
|
33
33
|
tomlInline
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import"./chunk-
|
|
36
|
-
import"./chunk-
|
|
34
|
+
} from "./chunk-cdy7x0em.js";
|
|
35
|
+
import"./chunk-bcw869qr.js";
|
|
36
|
+
import"./chunk-6x08g7m6.js";
|
|
37
37
|
import"./chunk-ea29sbaq.js";
|
|
38
38
|
|
|
39
39
|
// packages/agent-runtime/src/kit-setup-sync.ts
|
|
@@ -1341,7 +1341,7 @@ Runners execute StepAttempts in user-controlled environments. A runner advertise
|
|
|
1341
1341
|
path: "runner-operations#release-channel",
|
|
1342
1342
|
level: 3,
|
|
1343
1343
|
link: "https://kitman.sh/knowledge/docs/runner-operations#release-channel",
|
|
1344
|
-
text: "### Release channel\n\nA Workspace's release channel decides which releases its Runners update themselves to:\n\n- `stable`, the default: only stable releases, such as `0.12.0`.\n- `next`: release candidates Kitman serves too, such as `0.12.0-rc.5`.\n\nA Runner on `stable` never installs a release candidate, even one Kitman serves: offered a release, or refused for its client protocol, it checks the release Kitman serves before installing it, keeps its own version while that is a candidate or a dev build, and checks again later. Dev builds are never installed this way on either channel. A Runner refused as it starts follows the channel its last heartbeat named, or `stable` when it never had one.\n\nKitman at kitman.sh runs only stable releases. A release candidate is published to npm under `next` and never deployed, so its Runners only ever receive stable releases, and `next` brings candidates to unpinned npm Kits. A control plane you run yourself and deploy a candidate to offers it to Runners on `next` only. A Workspace admin sets the channel in Settings \u2192 General \u2192 Release channel, with `kitman workspace channel next` or `kitman workspace channel stable`, or with the SDK's `updateWorkspace(workspaceId, { releaseChannel })`. Changing it offers each connected Runner the release it now makes due. The same channel decides what its unpinned npm Kits follow; see the [Kits guide](/docs/kits#release-channel).\n\nMoving back from `next` to `stable` never downgrades a Runner: one on a release candidate keeps running it until Kitman serves a stable release newer than it. The Runners page and `kitman runner status` show the channel each Runner follows.\n\nWhen a Kitman release raises the protocol its Runners speak, Kitman gives an older Runner no more work and shows it with the `update_required` Runner Problem. The Runner installs the release Kitman serves and restarts on it by itself. If the release still reads the older protocol's work calls, the Runner first lets its running work finish, for up to 30 minutes, and any Step still running then goes back to Kitman for another Runner. Otherwise its running Steps stop and go back to Kitman once their leases expire. A Runner in a container cannot update itself: it waits for its work the same way, then stops. Run it from an image with the release Kitman serves.\n\nSome work needs a Runner new enough to run its kind, such as a Release's deploy, a benchmark or resolving revisions. While no online Runner that serves such work can run it, its Run says so instead of its place in the queue, and names the Runners that serve it and the Kitman version each runs. Within a few minutes, busy or not, each such Runner's owner, or the Workspace admins for a shared one, is told once per piece of work, with how to update it. An agent Step that no online Runner serving it can launch, for want of its Harness or sandbox, or because the Runner takes no agent Steps, says so the same way.\n\nEvery Runner start updates herdr-core to its latest release within the same protocol generation, keeping your terminals running, so herdr-core follows each Kitman update. An update that cannot happen, such as on a machine that is offline or a herdr-core a package manager installed, leaves the Runner working on the herdr-core it has and shows the `update_failed` Runner Problem with its fix.\n\nA Runner without a herdr-core it can use shows the `herdr_core_missing` Runner Problem and stops:\n\n- herdr-core is not installed: run `curl -fsSL https://releases.herdr.dev/core/install.sh | sh`, then restart the Runner.\n- herdr-core lacks something Kitman needs: run `herdr-core update`, then restart the Runner.\n- herdr-core speaks a newer protocol generation than this Kitman: update Kitman."
|
|
1344
|
+
text: "### Release channel\n\nA Workspace's release channel decides which releases its Runners update themselves to:\n\n- `stable`, the default: only stable releases, such as `0.12.0`.\n- `next`: release candidates Kitman serves too, such as `0.12.0-rc.5`.\n\nA Runner on `stable` never installs a release candidate, even one Kitman serves: offered a release, or refused for its client protocol, it checks the release Kitman serves before installing it, keeps its own version while that is a candidate or a dev build, and checks again later. Dev builds are never installed this way on either channel. A Runner refused as it starts follows the channel its last heartbeat named, or `stable` when it never had one.\n\nKitman at kitman.sh runs only stable releases. A release candidate is published to npm under `next` and never deployed, so its Runners only ever receive stable releases, and `next` brings candidates to unpinned npm Kits. A control plane you run yourself and deploy a candidate to offers it to Runners on `next` only. A Workspace admin sets the channel in Settings \u2192 General \u2192 Release channel, with `kitman workspace channel next` or `kitman workspace channel stable`, or with the SDK's `updateWorkspace(workspaceId, { releaseChannel })`. Changing it offers each connected Runner the release it now makes due. The same channel decides what its unpinned npm Kits follow; see the [Kits guide](/docs/kits#release-channel).\n\nMoving back from `next` to `stable` never downgrades a Runner: one on a release candidate keeps running it until Kitman serves a stable release newer than it. The Runners page and `kitman runner status` show the channel each Runner follows.\n\nWhen a Kitman release raises the protocol its Runners speak, Kitman gives an older Runner no more work and shows it with the `update_required` Runner Problem. The Runner installs the release Kitman serves and restarts on it by itself. If the release still reads the older protocol's work calls, the Runner first lets its running work finish, for up to 30 minutes, and any Step still running then goes back to Kitman for another Runner. Otherwise its running Steps stop and go back to Kitman once their leases expire. A Runner in a container cannot update itself: it waits for its work the same way, then stops. Run it from an image with the release Kitman serves.\n\nA Run waiting on a forge pipeline, an approval or another Event holds no slot of your Runner, and takes one again once it has work to do. A queued Run shows its place in the queue and what is ahead of it; while every Runner that could run it has all its slots taken, it also says how many Runs hold them, such as \"the 8 slots of Runner \"mk-desktop\" are held by 5 Runs\". A queued Verification counts the same way when the Runners that could run it each run as many Verifications as their verification concurrency allows.\n\nSome work needs a Runner new enough to run its kind, such as a Release's deploy, a benchmark or resolving revisions. While no online Runner that serves such work can run it, its Run says so instead of its place in the queue, and names the Runners that serve it and the Kitman version each runs. Within a few minutes, busy or not, each such Runner's owner, or the Workspace admins for a shared one, is told once per piece of work, with how to update it. An agent Step that no online Runner serving it can launch, for want of its Harness or sandbox, or because the Runner takes no agent Steps, says so the same way.\n\nEvery Runner start updates herdr-core to its latest release within the same protocol generation, keeping your terminals running, so herdr-core follows each Kitman update. An update that cannot happen, such as on a machine that is offline or a herdr-core a package manager installed, leaves the Runner working on the herdr-core it has and shows the `update_failed` Runner Problem with its fix.\n\nA Runner without a herdr-core it can use shows the `herdr_core_missing` Runner Problem and stops:\n\n- herdr-core is not installed: run `curl -fsSL https://releases.herdr.dev/core/install.sh | sh`, then restart the Runner.\n- herdr-core lacks something Kitman needs: run `herdr-core update`, then restart the Runner.\n- herdr-core speaks a newer protocol generation than this Kitman: update Kitman."
|
|
1345
1345
|
},
|
|
1346
1346
|
{
|
|
1347
1347
|
title: "Runner Operations Guide \u203A Harnesses",
|
|
@@ -2211,7 +2211,7 @@ var pathOfLink = (link) => {
|
|
|
2211
2211
|
return page === null ? link : page[1] || "index";
|
|
2212
2212
|
};
|
|
2213
2213
|
var UnpinnedSdkLink = "https://cdn.jsdelivr.net/npm/@kitman-sh/sdk/";
|
|
2214
|
-
var pinnedLink2 = (link, version = "0.
|
|
2214
|
+
var pinnedLink2 = (link, version = "0.40.0") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
|
|
2215
2215
|
var pageOf = (path) => path.split("#")[0];
|
|
2216
2216
|
var exportName = (section) => section.path.startsWith("sdk/") ? section.path.split("#")[1] ?? "" : "";
|
|
2217
2217
|
function excerpt(text, queryTerms) {
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-bqbfyqx6.js";
|
|
10
10
|
import {
|
|
11
11
|
runForEach
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-etrfc5cn.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-cdy7x0em.js";
|
|
23
23
|
import {
|
|
24
24
|
layerJson,
|
|
25
25
|
make4,
|
|
26
26
|
withHeaders,
|
|
27
27
|
layerProtocolSocket
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-pzq0b1k9.js";
|
|
29
29
|
|
|
30
30
|
// packages/live/src/rpc/runner-client.ts
|
|
31
31
|
var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
shutdownUnsafe,
|
|
110
110
|
fromQueue,
|
|
111
111
|
unwrap
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-etrfc5cn.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-cdy7x0em.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")) {
|
|
@@ -122,7 +122,7 @@ import {
|
|
|
122
122
|
withDefault,
|
|
123
123
|
option,
|
|
124
124
|
String2
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-etrfc5cn.js";
|
|
126
126
|
import {
|
|
127
127
|
SecureRandom,
|
|
128
128
|
layerWebCrypto,
|
|
@@ -253,11 +253,11 @@ import {
|
|
|
253
253
|
harnessNames,
|
|
254
254
|
herdrRunnerCapabilities2,
|
|
255
255
|
declaredChecks
|
|
256
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-cdy7x0em.js";
|
|
257
257
|
import {
|
|
258
258
|
ChildProcessSpawner,
|
|
259
259
|
make3
|
|
260
|
-
} from "./chunk-
|
|
260
|
+
} from "./chunk-6x08g7m6.js";
|
|
261
261
|
import {
|
|
262
262
|
Id,
|
|
263
263
|
Timestamp
|
|
@@ -1329,10 +1329,10 @@ var sandboxMissing = (sandbox, missing) => ({
|
|
|
1329
1329
|
var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
|
|
1330
1330
|
var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
|
|
1331
1331
|
var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
|
|
1332
|
-
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-
|
|
1332
|
+
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-2rbng4nf.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
|
|
1333
1333
|
});
|
|
1334
1334
|
var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
|
|
1335
|
-
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-
|
|
1335
|
+
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-2rbng4nf.js")), (module) => module.updateHerdrCore(options))
|
|
1336
1336
|
});
|
|
1337
1337
|
var herdrCoreMissing = (error) => {
|
|
1338
1338
|
if (isTagged(error, "HerdrCoreMissing"))
|
|
@@ -1796,7 +1796,7 @@ var syncTargets = (harness) => gen(function* () {
|
|
|
1796
1796
|
});
|
|
1797
1797
|
var syncKits = (input) => gen(function* () {
|
|
1798
1798
|
const fs = yield* FileSystem;
|
|
1799
|
-
const { syncKitSetup } = yield* promise(() => import("./chunk-
|
|
1799
|
+
const { syncKitSetup } = yield* promise(() => import("./chunk-jbhd2t25.js"));
|
|
1800
1800
|
const harnesses = yield* syncTargets(input.harness);
|
|
1801
1801
|
const chain = yield* input.client.getKitChain(input.workspaceId);
|
|
1802
1802
|
for (const { name, problem } of chain.skipped)
|
|
@@ -2696,7 +2696,7 @@ var package_default = {
|
|
|
2696
2696
|
type: "module",
|
|
2697
2697
|
scripts: {
|
|
2698
2698
|
build: "tsc --noEmit",
|
|
2699
|
-
typecheck: "bun check --no-script",
|
|
2699
|
+
typecheck: "bun ../../scripts/with-threads.ts bun check --no-script",
|
|
2700
2700
|
test: "vitest run"
|
|
2701
2701
|
},
|
|
2702
2702
|
dependencies: {
|
|
@@ -3291,7 +3291,7 @@ var shipped_steps_generated_default = {
|
|
|
3291
3291
|
};
|
|
3292
3292
|
|
|
3293
3293
|
// apps/cli/src/scaffold-files.ts
|
|
3294
|
-
var cliVersion = "0.
|
|
3294
|
+
var cliVersion = "0.40.0";
|
|
3295
3295
|
var shippedLoopSteps = new Map(Object.entries(shipped_steps_generated_default));
|
|
3296
3296
|
var loopSteps = (loop) => shippedLoopSteps.get(loop) ?? [];
|
|
3297
3297
|
var replacedStep = (loop) => loopSteps(loop).find((step) => step.from === defaultKitName && step.exported?.startsWith("steps.") === true);
|
|
@@ -3556,7 +3556,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
|
|
|
3556
3556
|
|
|
3557
3557
|
// apps/cli/src/commands.ts
|
|
3558
3558
|
var ClientId = "kitman-cli";
|
|
3559
|
-
var agentRuntime = promise(() => import("./chunk-
|
|
3559
|
+
var agentRuntime = promise(() => import("./chunk-4dpm4thy.js"));
|
|
3560
3560
|
var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
|
|
3561
3561
|
defaultValue: () => gen(function* () {
|
|
3562
3562
|
const tui = yield* tryPromise({
|
|
@@ -5095,7 +5095,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
|
|
|
5095
5095
|
});
|
|
5096
5096
|
var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
|
|
5097
5097
|
defaultValue: () => (options) => gen(function* () {
|
|
5098
|
-
const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-
|
|
5098
|
+
const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-6fk86dg7.js"));
|
|
5099
5099
|
return yield* makeRunnerRpcClient({
|
|
5100
5100
|
runnerId: options.runnerId,
|
|
5101
5101
|
bearer: options.bearer,
|
|
@@ -5692,7 +5692,7 @@ function mcpCommand(args) {
|
|
|
5692
5692
|
if (command.action === "run") {
|
|
5693
5693
|
if (command.args.length > 0)
|
|
5694
5694
|
return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
|
|
5695
|
-
const { runMcpServerCommand } = yield* promise(() => import("./chunk-
|
|
5695
|
+
const { runMcpServerCommand } = yield* promise(() => import("./chunk-br31kbfe.js"));
|
|
5696
5696
|
return yield* runMcpServerCommand({ flags: command.flags });
|
|
5697
5697
|
}
|
|
5698
5698
|
if (command.action !== "setup")
|
|
@@ -6192,7 +6192,7 @@ function programLoopCommand(command) {
|
|
|
6192
6192
|
return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
|
|
6193
6193
|
});
|
|
6194
6194
|
}
|
|
6195
|
-
var docsModule = promise(() => import("./chunk-
|
|
6195
|
+
var docsModule = promise(() => import("./chunk-8r3h8mzj.js"));
|
|
6196
6196
|
function docsCommand(args) {
|
|
6197
6197
|
return gen(function* () {
|
|
6198
6198
|
const command = parseCommand(args);
|
|
@@ -7196,7 +7196,7 @@ function changeRequestCommand(args) {
|
|
|
7196
7196
|
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}`);
|
|
7197
7197
|
});
|
|
7198
7198
|
}
|
|
7199
|
-
var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-
|
|
7199
|
+
var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-7qjzbsh4.js")), (build) => build.readOutlines(directory)).pipe(mapError2((error) => new CliError({ message: error.message })));
|
|
7200
7200
|
var loopOutline = (command) => gen(function* () {
|
|
7201
7201
|
const path = yield* Path;
|
|
7202
7202
|
const loop = requiredArg(command, "a Loop id");
|
|
@@ -7216,9 +7216,9 @@ var loopOutline = (command) => gen(function* () {
|
|
|
7216
7216
|
`).pipe(mapError2((error) => new CliError({ message: error.message })));
|
|
7217
7217
|
yield* log(`Wrote the outline of ${loop} to ${out}`);
|
|
7218
7218
|
});
|
|
7219
|
-
var KitWriter = map9(promise(() => import("./chunk-
|
|
7219
|
+
var KitWriter = map9(promise(() => import("./chunk-7qjzbsh4.js")), (build) => build.writeKit);
|
|
7220
7220
|
var KitBuilder = Reference("kitman/cli/KitBuilder", {
|
|
7221
|
-
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-
|
|
7221
|
+
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-7qjzbsh4.js")), (build) => build.buildKit(directory))
|
|
7222
7222
|
});
|
|
7223
7223
|
var uploadKit = (client, workspaceId, built) => gen(function* () {
|
|
7224
7224
|
yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
|
package/dist/index.js
CHANGED
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
var args = process.argv.slice(2);
|
|
6
6
|
if (args[0] === "srt") {
|
|
7
7
|
process.argv.splice(2, 1);
|
|
8
|
-
const { runSrtCli } = await import("./chunk-
|
|
8
|
+
const { runSrtCli } = await import("./chunk-ns26fbmk.js");
|
|
9
9
|
await runSrtCli();
|
|
10
10
|
} else if (args[0] === "srt-step") {
|
|
11
11
|
const { runSrtStep } = await import("./chunk-d4vhrja4.js");
|
|
12
12
|
await runSrtStep(args.slice(1));
|
|
13
13
|
} else if (args[0] === "opencode-read") {
|
|
14
|
-
const { runOpencodeReader } = await import("./chunk-
|
|
14
|
+
const { runOpencodeReader } = await import("./chunk-hgvft7vy.js");
|
|
15
15
|
runOpencodeReader();
|
|
16
16
|
} else {
|
|
17
|
-
const { runCli } = await import("./chunk-
|
|
17
|
+
const { runCli } = await import("./chunk-ykskj5gq.js");
|
|
18
18
|
runCli(args);
|
|
19
19
|
}
|