@kitman-sh/cli 0.10.68 → 0.10.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-gfr11y10.js → chunk-1j1jh211.js} +5 -2
- package/dist/{chunk-fsbpm71s.js → chunk-2wkdq54x.js} +2 -2
- package/dist/{chunk-qp5cdtsr.js → chunk-7jh6atr0.js} +5 -5
- package/dist/{chunk-8mj0z3hb.js → chunk-8ttdzwa3.js} +4 -4
- package/dist/{chunk-9pp1w29g.js → chunk-8w7d269h.js} +1 -1
- package/dist/{chunk-t6w469gd.js → chunk-9hr71e7c.js} +3 -3
- package/dist/{chunk-fdy3jce3.js → chunk-dena9bpd.js} +10 -10
- package/dist/{chunk-b90vtscf.js → chunk-e5dq8dbz.js} +109 -9
- package/dist/{chunk-n0h0z7yh.js → chunk-f8qqmcgy.js} +3 -3
- package/dist/{chunk-2z450w92.js → chunk-fgecj3t0.js} +1 -1
- package/dist/{chunk-p8akhcme.js → chunk-h0sw8tks.js} +2 -2
- package/dist/{chunk-cctfnp4r.js → chunk-pq9bkyj6.js} +1 -1
- package/dist/{chunk-fc0y8kn7.js → chunk-x7g0rzqj.js} +20 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
runnerRpcUrl2,
|
|
5
5
|
makeRunnerRpcClient2,
|
|
6
6
|
makeProgramRpcClient2
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import"./chunk-
|
|
9
|
-
import"./chunk-
|
|
7
|
+
} from "./chunk-h0sw8tks.js";
|
|
8
|
+
import"./chunk-fgecj3t0.js";
|
|
9
|
+
import"./chunk-x7g0rzqj.js";
|
|
10
10
|
import"./chunk-rrnee9mk.js";
|
|
11
11
|
import"./chunk-v01c0k6j.js";
|
|
12
12
|
import"./chunk-dk0ftqwg.js";
|
|
@@ -197,7 +197,7 @@ import {
|
|
|
197
197
|
harnessNames,
|
|
198
198
|
herdrRunnerCapabilities2,
|
|
199
199
|
declaredChecks
|
|
200
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-x7g0rzqj.js";
|
|
201
201
|
import {
|
|
202
202
|
Id
|
|
203
203
|
} from "./chunk-rrnee9mk.js";
|
|
@@ -504,10 +504,10 @@ var checkDockerImageSetting = pinnedImage;
|
|
|
504
504
|
var checkRegistryImageSetting = pinnedImage;
|
|
505
505
|
var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
|
|
506
506
|
var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
|
|
507
|
-
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-
|
|
507
|
+
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-8w7d269h.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
|
|
508
508
|
});
|
|
509
509
|
var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
|
|
510
|
-
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-
|
|
510
|
+
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-8w7d269h.js")), (module) => module.updateHerdrCore(options))
|
|
511
511
|
});
|
|
512
512
|
var herdrCoreMissing = (error) => {
|
|
513
513
|
if (isTagged(error, "HerdrCoreMissing"))
|
|
@@ -733,7 +733,7 @@ var syncTargets = (harness) => gen(function* () {
|
|
|
733
733
|
});
|
|
734
734
|
var syncKits = (input) => gen(function* () {
|
|
735
735
|
const fs = yield* FileSystem;
|
|
736
|
-
const { syncKitSetup } = yield* promise(() => import("./chunk-
|
|
736
|
+
const { syncKitSetup } = yield* promise(() => import("./chunk-f8qqmcgy.js"));
|
|
737
737
|
const harnesses = yield* syncTargets(input.harness);
|
|
738
738
|
const chain = yield* input.client.getKitChain(input.workspaceId);
|
|
739
739
|
for (const { name, problem } of chain.skipped)
|
|
@@ -1651,7 +1651,7 @@ var package_default = {
|
|
|
1651
1651
|
};
|
|
1652
1652
|
|
|
1653
1653
|
// apps/cli/src/scaffold.ts
|
|
1654
|
-
var cliVersion = "0.10.
|
|
1654
|
+
var cliVersion = "0.10.70";
|
|
1655
1655
|
var packageJson = (name, scaffold) => `${JSON.stringify({
|
|
1656
1656
|
name,
|
|
1657
1657
|
private: true,
|
|
@@ -1901,7 +1901,7 @@ var Usage = [
|
|
|
1901
1901
|
"Every run, loop, agent, verify, constraint, secret, claim, deploy, dev and kit command takes --json."
|
|
1902
1902
|
].join(`
|
|
1903
1903
|
`);
|
|
1904
|
-
var agentRuntime = promise(() => import("./chunk-
|
|
1904
|
+
var agentRuntime = promise(() => import("./chunk-e5dq8dbz.js"));
|
|
1905
1905
|
var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
|
|
1906
1906
|
defaultValue: () => gen(function* () {
|
|
1907
1907
|
const tui = yield* tryPromise({
|
|
@@ -2756,7 +2756,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
|
|
|
2756
2756
|
});
|
|
2757
2757
|
var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
|
|
2758
2758
|
defaultValue: () => (options) => gen(function* () {
|
|
2759
|
-
const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-
|
|
2759
|
+
const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-9hr71e7c.js"));
|
|
2760
2760
|
return yield* makeRunnerRpcClient({
|
|
2761
2761
|
runnerId: options.runnerId,
|
|
2762
2762
|
bearer: options.bearer,
|
|
@@ -3140,7 +3140,7 @@ function mcpCommand(args) {
|
|
|
3140
3140
|
if (command.action === "run") {
|
|
3141
3141
|
if (command.args.length > 0)
|
|
3142
3142
|
return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
|
|
3143
|
-
const { runMcpServerCommand } = yield* promise(() => import("./chunk-
|
|
3143
|
+
const { runMcpServerCommand } = yield* promise(() => import("./chunk-8ttdzwa3.js"));
|
|
3144
3144
|
return yield* runMcpServerCommand({ flags: command.flags });
|
|
3145
3145
|
}
|
|
3146
3146
|
if (command.action !== "setup")
|
|
@@ -4342,9 +4342,9 @@ function claimCommand(args) {
|
|
|
4342
4342
|
}
|
|
4343
4343
|
});
|
|
4344
4344
|
}
|
|
4345
|
-
var KitWriter = map8(promise(() => import("./chunk-
|
|
4345
|
+
var KitWriter = map8(promise(() => import("./chunk-7jh6atr0.js")), (build) => build.writeKit);
|
|
4346
4346
|
var KitBuilder = Reference("kitman/cli/KitBuilder", {
|
|
4347
|
-
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-
|
|
4347
|
+
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-7jh6atr0.js")), (build) => build.buildKit(directory))
|
|
4348
4348
|
});
|
|
4349
4349
|
var uploadKit = (client, workspaceId, built) => gen(function* () {
|
|
4350
4350
|
yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
|
|
@@ -225,7 +225,7 @@ import {
|
|
|
225
225
|
installCommand,
|
|
226
226
|
checkServicesFile,
|
|
227
227
|
checkServices
|
|
228
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-x7g0rzqj.js";
|
|
229
229
|
import {
|
|
230
230
|
join,
|
|
231
231
|
interrupt,
|
|
@@ -281,8 +281,8 @@ import {
|
|
|
281
281
|
applyAgentEnvironmentMaterialization2,
|
|
282
282
|
isPathWithin2,
|
|
283
283
|
skillIdentity2
|
|
284
|
-
} from "./chunk-
|
|
285
|
-
import"./chunk-
|
|
284
|
+
} from "./chunk-2wkdq54x.js";
|
|
285
|
+
import"./chunk-pq9bkyj6.js";
|
|
286
286
|
import {
|
|
287
287
|
sliceBytes2,
|
|
288
288
|
maxLineBytes2,
|
|
@@ -302,8 +302,8 @@ import {
|
|
|
302
302
|
rpcRunFiles,
|
|
303
303
|
programHostsEnv,
|
|
304
304
|
undeclaredHostsEnv
|
|
305
|
-
} from "./chunk-
|
|
306
|
-
import"./chunk-
|
|
305
|
+
} from "./chunk-1j1jh211.js";
|
|
306
|
+
import"./chunk-h0sw8tks.js";
|
|
307
307
|
import {
|
|
308
308
|
nextInt
|
|
309
309
|
} from "./chunk-q3c7vmby.js";
|
|
@@ -311,7 +311,7 @@ import {
|
|
|
311
311
|
ChildProcessSpawner,
|
|
312
312
|
make3
|
|
313
313
|
} from "./chunk-1rry0tsn.js";
|
|
314
|
-
import"./chunk-
|
|
314
|
+
import"./chunk-fgecj3t0.js";
|
|
315
315
|
|
|
316
316
|
// packages/core/src/sync-kit.ts
|
|
317
317
|
import { createHash } from "crypto";
|
|
@@ -6443,15 +6443,115 @@ class InstallFailed extends TaggedError("InstallFailed") {
|
|
|
6443
6443
|
return `\`${this.command}\` failed, so nothing could run in the checkout: ${this.output}`;
|
|
6444
6444
|
}
|
|
6445
6445
|
}
|
|
6446
|
+
var closing = /(?:\s|\/\/[^\n]*|\/\*[\s\S]*?\*\/)*[}\]]/y;
|
|
6447
|
+
var closesNext = (text, at) => {
|
|
6448
|
+
closing.lastIndex = at;
|
|
6449
|
+
return closing.test(text);
|
|
6450
|
+
};
|
|
6451
|
+
var jsonFromJsonc = (text) => {
|
|
6452
|
+
let json = "";
|
|
6453
|
+
for (let at = 0;at < text.length; at++) {
|
|
6454
|
+
const char = text[at];
|
|
6455
|
+
if (char === '"') {
|
|
6456
|
+
const from = at;
|
|
6457
|
+
for (at++;at < text.length && text[at] !== '"'; at++)
|
|
6458
|
+
if (text[at] === "\\")
|
|
6459
|
+
at++;
|
|
6460
|
+
json += text.slice(from, at + 1);
|
|
6461
|
+
} else if (char === "/" && text[at + 1] === "/") {
|
|
6462
|
+
while (at < text.length && text[at] !== `
|
|
6463
|
+
`)
|
|
6464
|
+
at++;
|
|
6465
|
+
} else if (char === "/" && text[at + 1] === "*") {
|
|
6466
|
+
at = text.indexOf("*/", at + 2);
|
|
6467
|
+
if (at === -1)
|
|
6468
|
+
return json;
|
|
6469
|
+
at++;
|
|
6470
|
+
} else if (char !== "," || !closesNext(text, at + 1))
|
|
6471
|
+
json += char;
|
|
6472
|
+
}
|
|
6473
|
+
return json;
|
|
6474
|
+
};
|
|
6475
|
+
var declaredNames = (manifest, fields) => {
|
|
6476
|
+
if (!isJsonObject(manifest))
|
|
6477
|
+
return [];
|
|
6478
|
+
const optional = isJsonObject(manifest.optionalDependencies) ? Object.keys(manifest.optionalDependencies) : [];
|
|
6479
|
+
return fields.flatMap((field) => {
|
|
6480
|
+
const declared = manifest[field];
|
|
6481
|
+
return isJsonObject(declared) ? Object.keys(declared).filter((name) => !optional.includes(name)) : [];
|
|
6482
|
+
});
|
|
6483
|
+
};
|
|
6484
|
+
var unresolvedDependencies = (worktree) => gen(function* () {
|
|
6485
|
+
const fs = yield* FileSystem;
|
|
6486
|
+
const path = yield* Path;
|
|
6487
|
+
const lockfile = path.join(worktree, "bun.lock");
|
|
6488
|
+
if (!(yield* fs.exists(lockfile)))
|
|
6489
|
+
return [];
|
|
6490
|
+
const parsed = getOrUndefined(decodeJsonStringOption(jsonFromJsonc(yield* fs.readFileString(lockfile))));
|
|
6491
|
+
if (!isJsonObject(parsed))
|
|
6492
|
+
return yield* new InstallFailed({ command: "reading bun.lock", output: "bun.lock is not valid JSONC" });
|
|
6493
|
+
const workspaces = isJsonObject(parsed.workspaces) ? parsed.workspaces : {};
|
|
6494
|
+
const store = path.join(worktree, "node_modules", ".bun");
|
|
6495
|
+
const within = (root, dir) => !path.relative(root, dir).startsWith("..");
|
|
6496
|
+
const linkedWithin = (dir) => within(store, dir) ? path.join(store, path.relative(store, dir).split(path.sep)[0] ?? "") : worktree;
|
|
6497
|
+
const located = (dir, name, root) => gen(function* () {
|
|
6498
|
+
const candidate = path.join(dir, "node_modules", name);
|
|
6499
|
+
if (yield* fs.exists(path.join(candidate, "package.json")))
|
|
6500
|
+
return yield* fs.realPath(candidate);
|
|
6501
|
+
const parent = path.dirname(dir);
|
|
6502
|
+
return dir === root || parent === dir || !within(root, parent) ? undefined : yield* located(parent, name, root);
|
|
6503
|
+
}).pipe(orElseSucceed(() => {
|
|
6504
|
+
return;
|
|
6505
|
+
}));
|
|
6506
|
+
const manifestAt = (dir) => fs.readFileString(path.join(dir, "package.json")).pipe(map8((text) => getOrUndefined(decodeJsonStringOption(text))), orElseSucceed(() => {
|
|
6507
|
+
return;
|
|
6508
|
+
}));
|
|
6509
|
+
const unresolved = [];
|
|
6510
|
+
const visited = new Set;
|
|
6511
|
+
let due = [];
|
|
6512
|
+
for (const [dir, workspace] of Object.entries(workspaces))
|
|
6513
|
+
due.push({
|
|
6514
|
+
from: path.join(worktree, dir),
|
|
6515
|
+
label: dir === "" ? "." : dir,
|
|
6516
|
+
names: declaredNames(workspace, ["dependencies", "devDependencies"])
|
|
6517
|
+
});
|
|
6518
|
+
while (due.length > 0) {
|
|
6519
|
+
const next = [];
|
|
6520
|
+
yield* forEach(due, ({ from, label, names }) => forEach(names, (name) => gen(function* () {
|
|
6521
|
+
const found = yield* located(from, name, linkedWithin(from));
|
|
6522
|
+
if (found === undefined)
|
|
6523
|
+
return unresolved.push(`${label} cannot resolve ${name}`);
|
|
6524
|
+
if (visited.has(found))
|
|
6525
|
+
return;
|
|
6526
|
+
visited.add(found);
|
|
6527
|
+
next.push({
|
|
6528
|
+
from: found,
|
|
6529
|
+
label: name,
|
|
6530
|
+
names: declaredNames(yield* manifestAt(found), ["dependencies"])
|
|
6531
|
+
});
|
|
6532
|
+
}), { discard: true }), { concurrency: 16, discard: true });
|
|
6533
|
+
due = next;
|
|
6534
|
+
}
|
|
6535
|
+
return unresolved.toSorted();
|
|
6536
|
+
});
|
|
6446
6537
|
var installIn = (worktree, run) => gen(function* () {
|
|
6447
6538
|
const files = yield* FileSystem;
|
|
6448
6539
|
const install = installCommand(yield* files.readDirectory(worktree));
|
|
6449
6540
|
if (install === undefined)
|
|
6450
6541
|
return;
|
|
6451
6542
|
const filesDir = yield* files.makeTempDirectoryScoped({ prefix: "kitman-check-files-" });
|
|
6452
|
-
const
|
|
6453
|
-
|
|
6454
|
-
|
|
6543
|
+
const installWith = (command) => gen(function* () {
|
|
6544
|
+
const installed = yield* run({ command, cwd: worktree, filesDir });
|
|
6545
|
+
if (installed.exitCode !== 0)
|
|
6546
|
+
return yield* new InstallFailed({ command, output: redactedOutputTail(installed.output, 2000) });
|
|
6547
|
+
return yield* unresolvedDependencies(worktree);
|
|
6548
|
+
});
|
|
6549
|
+
if ((yield* installWith(install)).length === 0 || !install.startsWith("bun install"))
|
|
6550
|
+
return;
|
|
6551
|
+
const forced = `${install} --force`;
|
|
6552
|
+
const unresolved = yield* installWith(forced);
|
|
6553
|
+
if (unresolved.length > 0)
|
|
6554
|
+
return yield* new InstallFailed({ command: forced, output: unresolved.join("; ") });
|
|
6455
6555
|
});
|
|
6456
6556
|
var runChecks = (worktree, checks, tree, known, run, keeper, services) => gen(function* () {
|
|
6457
6557
|
const path = yield* Path;
|
|
@@ -26,15 +26,15 @@ import {
|
|
|
26
26
|
tomlKeyPath2,
|
|
27
27
|
kitmanSkillEntry,
|
|
28
28
|
isPathWithin2
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-2wkdq54x.js";
|
|
30
30
|
import {
|
|
31
31
|
instructionsStart,
|
|
32
32
|
instructionsEnd,
|
|
33
33
|
renderMcpServer,
|
|
34
34
|
materializeKitSetup,
|
|
35
35
|
tomlInline
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import"./chunk-
|
|
36
|
+
} from "./chunk-x7g0rzqj.js";
|
|
37
|
+
import"./chunk-pq9bkyj6.js";
|
|
38
38
|
import"./chunk-1rry0tsn.js";
|
|
39
39
|
|
|
40
40
|
// packages/agent-runtime/src/kit-setup-sync.ts
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
ParseOptions,
|
|
124
124
|
RpcClientDefect,
|
|
125
125
|
RpcClientError
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-x7g0rzqj.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")) {
|
|
@@ -19,13 +19,13 @@ import {
|
|
|
19
19
|
RunnerReplicaRpcs,
|
|
20
20
|
RunnerRunFileRpcs,
|
|
21
21
|
ProgramRpcs
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-x7g0rzqj.js";
|
|
23
23
|
import {
|
|
24
24
|
layerJson,
|
|
25
25
|
make4,
|
|
26
26
|
withHeaders,
|
|
27
27
|
layerProtocolSocket
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-fgecj3t0.js";
|
|
29
29
|
|
|
30
30
|
// packages/live/src/rpc/runner-client.ts
|
|
31
31
|
var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
|
|
@@ -5915,6 +5915,12 @@ var RunWaiting = Union([
|
|
|
5915
5915
|
name: String4.check(isMinLength(1)),
|
|
5916
5916
|
verificationId: Id
|
|
5917
5917
|
}),
|
|
5918
|
+
Struct({
|
|
5919
|
+
kind: Literal("claim"),
|
|
5920
|
+
name: String4.check(isMinLength(1)),
|
|
5921
|
+
resource: String4.check(isMinLength(1)),
|
|
5922
|
+
holder: optionalKey(Struct({ runId: Id, loopId: String4 }))
|
|
5923
|
+
}),
|
|
5918
5924
|
Struct({
|
|
5919
5925
|
kind: Literal("queue"),
|
|
5920
5926
|
name: String4.check(isMinLength(1)),
|
|
@@ -13865,6 +13871,7 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
13865
13871
|
revision: optionalKey(String4),
|
|
13866
13872
|
checks: optional(ArraySchema(String4)),
|
|
13867
13873
|
suggested: optionalKey(ArraySchema(ApprovedCheck)),
|
|
13874
|
+
rerunFailed: optionalKey(Boolean2),
|
|
13868
13875
|
measure: optionalKey(Struct({
|
|
13869
13876
|
base: optionalKey(String4),
|
|
13870
13877
|
plan: MeasurePlan,
|
|
@@ -14006,7 +14013,19 @@ class RunnerCapabilityRpcs extends make7(make6("PutQuestion", {
|
|
|
14006
14013
|
logTail: optionalKey(String4)
|
|
14007
14014
|
})),
|
|
14008
14015
|
readAt: optionalKey(String4),
|
|
14009
|
-
runnerChecks: optionalKey(ArraySchema(String4))
|
|
14016
|
+
runnerChecks: optionalKey(ArraySchema(String4)),
|
|
14017
|
+
approved: optionalKey(String4),
|
|
14018
|
+
repository: optionalKey(String4),
|
|
14019
|
+
target: optionalKey(Struct({
|
|
14020
|
+
branch: String4,
|
|
14021
|
+
head: String4,
|
|
14022
|
+
jobs: ArraySchema(Struct({
|
|
14023
|
+
name: String4,
|
|
14024
|
+
status: Literals(["running", "success", "failed", "skipped"]),
|
|
14025
|
+
url: optionalKey(String4),
|
|
14026
|
+
logTail: optionalKey(String4)
|
|
14027
|
+
}))
|
|
14028
|
+
}))
|
|
14010
14029
|
}),
|
|
14011
14030
|
error: RunnerRpcError
|
|
14012
14031
|
}), make6("ReportPipeline", {
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,6 @@ if (args[0] === "srt") {
|
|
|
14
14
|
const { runOpencodeReader } = await import("./chunk-60333x3q.js");
|
|
15
15
|
runOpencodeReader();
|
|
16
16
|
} else {
|
|
17
|
-
const { runCli } = await import("./chunk-
|
|
17
|
+
const { runCli } = await import("./chunk-dena9bpd.js");
|
|
18
18
|
runCli(args);
|
|
19
19
|
}
|