@kitman-sh/cli 0.10.82 → 0.10.84
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-e8zm8z3a.js → chunk-0mgbryyd.js} +6 -6
- package/dist/{chunk-a03wf71k.js → chunk-2k1qfyvx.js} +3 -3
- package/dist/{chunk-2mxpxw3j.js → chunk-2tpysgqk.js} +2 -2
- package/dist/{chunk-xb70ys3n.js → chunk-397fax43.js} +10 -1
- package/dist/{chunk-jr1363cj.js → chunk-7qbchfkf.js} +7 -7
- package/dist/{chunk-8p0psats.js → chunk-92mjxge4.js} +10 -8
- package/dist/{chunk-d4atn90g.js → chunk-93b1hdfa.js} +12 -12
- package/dist/{chunk-q4cpages.js → chunk-98r2t1s6.js} +2 -2
- package/dist/{chunk-q767c0cv.js → chunk-9gztfcvf.js} +4 -4
- package/dist/{chunk-98sg1yyd.js → chunk-cakmwaed.js} +1 -1
- package/dist/{chunk-gn0v83as.js → chunk-d53rckf0.js} +20 -15
- package/dist/{chunk-fq47a5yd.js → chunk-ebd5zjnx.js} +1 -1
- package/dist/{chunk-pkn6g975.js → chunk-hgx1dq68.js} +3 -3
- package/dist/{chunk-zzhewave.js → chunk-kp01bv8f.js} +18 -18
- package/dist/{chunk-szf97jdk.js → chunk-krh0gek1.js} +14 -14
- package/dist/{chunk-9zd52pda.js → chunk-kxtmk59a.js} +3 -3
- package/dist/{chunk-by4t402z.js → chunk-ynn6jk0w.js} +92 -51
- package/dist/{chunk-5my30s53.js → chunk-ze0f51ds.js} +8 -8
- package/dist/index.js +3 -3
- package/package.json +1 -1
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
decodeText,
|
|
4
|
+
mkString,
|
|
5
|
+
FileSystem,
|
|
6
|
+
Path,
|
|
7
|
+
withDefault,
|
|
8
|
+
String2
|
|
9
|
+
} from "./chunk-397fax43.js";
|
|
2
10
|
import {
|
|
3
11
|
isString2,
|
|
4
12
|
hasProperty,
|
|
@@ -35,14 +43,6 @@ import {
|
|
|
35
43
|
} from "./chunk-jbwk6k6m.js";
|
|
36
44
|
import"./chunk-kgdppbdr.js";
|
|
37
45
|
import"./chunk-tzz4fv17.js";
|
|
38
|
-
import {
|
|
39
|
-
decodeText,
|
|
40
|
-
mkString,
|
|
41
|
-
FileSystem,
|
|
42
|
-
Path,
|
|
43
|
-
withDefault,
|
|
44
|
-
String2
|
|
45
|
-
} from "./chunk-xb70ys3n.js";
|
|
46
46
|
import {
|
|
47
47
|
SecureRandom,
|
|
48
48
|
layerWebCrypto,
|
|
@@ -54,23 +54,23 @@ import {
|
|
|
54
54
|
layer4,
|
|
55
55
|
kitmanMcpServer,
|
|
56
56
|
RunnerRpcProtocolVersion
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-d53rckf0.js";
|
|
58
58
|
import {
|
|
59
59
|
Packument,
|
|
60
60
|
tarballMatches
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import"./chunk-
|
|
61
|
+
} from "./chunk-2tpysgqk.js";
|
|
62
|
+
import"./chunk-2k1qfyvx.js";
|
|
63
63
|
import {
|
|
64
64
|
AgentDeclaration,
|
|
65
65
|
KitDeclarations,
|
|
66
66
|
describeFlag,
|
|
67
67
|
Described
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-92mjxge4.js";
|
|
69
69
|
import {
|
|
70
70
|
ChildProcessSpawner,
|
|
71
71
|
make3
|
|
72
|
-
} from "./chunk-
|
|
73
|
-
import"./chunk-
|
|
72
|
+
} from "./chunk-cakmwaed.js";
|
|
73
|
+
import"./chunk-98r2t1s6.js";
|
|
74
74
|
|
|
75
75
|
// packages/sdk/src/build/index.ts
|
|
76
76
|
class DependencyInstallFailed extends TaggedError2()("DependencyInstallFailed", {
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
decoded2,
|
|
8
8
|
readOpencode2,
|
|
9
9
|
runOpencodeReader2
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import"./chunk-
|
|
10
|
+
} from "./chunk-0mgbryyd.js";
|
|
11
|
+
import"./chunk-cakmwaed.js";
|
|
12
12
|
import"./chunk-tzz4fv17.js";
|
|
13
|
-
import"./chunk-
|
|
13
|
+
import"./chunk-397fax43.js";
|
|
14
14
|
import"./chunk-jbwk6k6m.js";
|
|
15
15
|
export {
|
|
16
16
|
decoded2 as decoded,
|
|
@@ -7,6 +7,46 @@ import {
|
|
|
7
7
|
isJsonObject,
|
|
8
8
|
isString
|
|
9
9
|
} from "./chunk-tzz4fv17.js";
|
|
10
|
+
import {
|
|
11
|
+
join,
|
|
12
|
+
interrupt,
|
|
13
|
+
unbounded,
|
|
14
|
+
publishUnsafe,
|
|
15
|
+
unbounded2,
|
|
16
|
+
offer,
|
|
17
|
+
makeUnsafe3,
|
|
18
|
+
make11,
|
|
19
|
+
fromQueue,
|
|
20
|
+
fromPubSub,
|
|
21
|
+
map2,
|
|
22
|
+
filter,
|
|
23
|
+
decodeText,
|
|
24
|
+
encodeText,
|
|
25
|
+
splitLines,
|
|
26
|
+
run,
|
|
27
|
+
runHead,
|
|
28
|
+
runForEach,
|
|
29
|
+
FileSystem,
|
|
30
|
+
Path,
|
|
31
|
+
embeddedFile,
|
|
32
|
+
extractEmbeddedFile,
|
|
33
|
+
optionalEnv,
|
|
34
|
+
operatorConfigHome,
|
|
35
|
+
harnessesUnsupportedInSrt2,
|
|
36
|
+
compiled2,
|
|
37
|
+
pinnedSrtCommand2,
|
|
38
|
+
pinnedSrtStepCommand2,
|
|
39
|
+
runSrtCli2,
|
|
40
|
+
kitmanCacheDirectory2,
|
|
41
|
+
srtSettings2,
|
|
42
|
+
srtCacheEnvironment2,
|
|
43
|
+
srtInheritedEnv2,
|
|
44
|
+
inheritedEnvironment2,
|
|
45
|
+
withOnlyEnvironment2,
|
|
46
|
+
writeSrtSettings2,
|
|
47
|
+
srtStepArgv2,
|
|
48
|
+
srtArgv2
|
|
49
|
+
} from "./chunk-397fax43.js";
|
|
10
50
|
import {
|
|
11
51
|
pipeArguments,
|
|
12
52
|
dual,
|
|
@@ -243,47 +283,7 @@ import {
|
|
|
243
283
|
installCommand,
|
|
244
284
|
checkServicesFile,
|
|
245
285
|
checkServices
|
|
246
|
-
} from "./chunk-
|
|
247
|
-
import {
|
|
248
|
-
join,
|
|
249
|
-
interrupt,
|
|
250
|
-
unbounded,
|
|
251
|
-
publishUnsafe,
|
|
252
|
-
unbounded2,
|
|
253
|
-
offer,
|
|
254
|
-
makeUnsafe3,
|
|
255
|
-
make11,
|
|
256
|
-
fromQueue,
|
|
257
|
-
fromPubSub,
|
|
258
|
-
map2,
|
|
259
|
-
filter,
|
|
260
|
-
decodeText,
|
|
261
|
-
encodeText,
|
|
262
|
-
splitLines,
|
|
263
|
-
run,
|
|
264
|
-
runHead,
|
|
265
|
-
runForEach,
|
|
266
|
-
FileSystem,
|
|
267
|
-
Path,
|
|
268
|
-
embeddedFile,
|
|
269
|
-
extractEmbeddedFile,
|
|
270
|
-
optionalEnv,
|
|
271
|
-
operatorConfigHome,
|
|
272
|
-
harnessesUnsupportedInSrt2,
|
|
273
|
-
compiled2,
|
|
274
|
-
pinnedSrtCommand2,
|
|
275
|
-
pinnedSrtStepCommand2,
|
|
276
|
-
runSrtCli2,
|
|
277
|
-
kitmanCacheDirectory2,
|
|
278
|
-
srtSettings2,
|
|
279
|
-
srtCacheEnvironment2,
|
|
280
|
-
srtInheritedEnv2,
|
|
281
|
-
inheritedEnvironment2,
|
|
282
|
-
withOnlyEnvironment2,
|
|
283
|
-
writeSrtSettings2,
|
|
284
|
-
srtStepArgv2,
|
|
285
|
-
srtArgv2
|
|
286
|
-
} from "./chunk-xb70ys3n.js";
|
|
286
|
+
} from "./chunk-d53rckf0.js";
|
|
287
287
|
import {
|
|
288
288
|
writeAgentEnvironmentConfigFile2,
|
|
289
289
|
readManifestSkillPaths2,
|
|
@@ -299,8 +299,8 @@ import {
|
|
|
299
299
|
applyAgentEnvironmentMaterialization2,
|
|
300
300
|
isPathWithin2,
|
|
301
301
|
skillIdentity2
|
|
302
|
-
} from "./chunk-
|
|
303
|
-
import"./chunk-
|
|
302
|
+
} from "./chunk-7qbchfkf.js";
|
|
303
|
+
import"./chunk-2tpysgqk.js";
|
|
304
304
|
import {
|
|
305
305
|
egressAllowed,
|
|
306
306
|
writeSecretRegistry,
|
|
@@ -318,23 +318,23 @@ import {
|
|
|
318
318
|
decodedOption2,
|
|
319
319
|
decoded2,
|
|
320
320
|
readOpencode2
|
|
321
|
-
} from "./chunk-
|
|
321
|
+
} from "./chunk-0mgbryyd.js";
|
|
322
322
|
import {
|
|
323
323
|
uploadRunFile,
|
|
324
324
|
programLease,
|
|
325
325
|
rpcRunFiles,
|
|
326
326
|
programHostsEnv,
|
|
327
327
|
undeclaredHostsEnv
|
|
328
|
-
} from "./chunk-
|
|
329
|
-
import"./chunk-
|
|
328
|
+
} from "./chunk-92mjxge4.js";
|
|
329
|
+
import"./chunk-2k1qfyvx.js";
|
|
330
330
|
import {
|
|
331
331
|
nextInt
|
|
332
332
|
} from "./chunk-76ctrqm6.js";
|
|
333
333
|
import {
|
|
334
334
|
ChildProcessSpawner,
|
|
335
335
|
make3
|
|
336
|
-
} from "./chunk-
|
|
337
|
-
import"./chunk-
|
|
336
|
+
} from "./chunk-cakmwaed.js";
|
|
337
|
+
import"./chunk-98r2t1s6.js";
|
|
338
338
|
|
|
339
339
|
// packages/core/src/sync-kit.ts
|
|
340
340
|
import { createHash } from "crypto";
|
|
@@ -5660,11 +5660,13 @@ var automergedTree = (worktree, conflicted) => gen(function* () {
|
|
|
5660
5660
|
var mergeTarget = (worktree, target) => gen(function* () {
|
|
5661
5661
|
const git = (...args) => runCommand2("git", ["-C", worktree, ...gitIdentity, ...args]);
|
|
5662
5662
|
const before = yield* git("rev-parse", "HEAD");
|
|
5663
|
-
const
|
|
5663
|
+
const targetCommit = (yield* git("rev-parse", "--verify", `origin/${target}^{commit}`)).trim();
|
|
5664
|
+
const merged = yield* exit(git("merge", "--no-edit", "-m", `Merge remote-tracking branch 'origin/${target}'`, targetCommit));
|
|
5664
5665
|
const subject = `Kitman's merge of \`origin/${target}\``;
|
|
5665
5666
|
if (isSuccess2(merged))
|
|
5666
5667
|
return {
|
|
5667
5668
|
from: before.trim(),
|
|
5669
|
+
target: targetCommit,
|
|
5668
5670
|
conflicted: [],
|
|
5669
5671
|
note: (yield* git("rev-parse", "HEAD")) === before ? `${subject}: already up to date.` : `${subject}: merged cleanly and committed.`
|
|
5670
5672
|
};
|
|
@@ -5676,6 +5678,7 @@ var mergeTarget = (worktree, target) => gen(function* () {
|
|
|
5676
5678
|
const conflicts = [...marked.length === 0 ? [] : [`${list(marked)}: it holds conflict markers`], ...unmarked];
|
|
5677
5679
|
return {
|
|
5678
5680
|
from: before.trim(),
|
|
5681
|
+
target: targetCommit,
|
|
5679
5682
|
conflicted,
|
|
5680
5683
|
automerged: yield* automergedTree(worktree, conflicted),
|
|
5681
5684
|
note: [
|
|
@@ -5960,9 +5963,10 @@ var stepAttempt = (input, resending) => (work) => gen(function* () {
|
|
|
5960
5963
|
conflicted: merge.conflicted,
|
|
5961
5964
|
...merge.automerged === undefined ? undefined : { automerged: merge.automerged }
|
|
5962
5965
|
}).pipe(catch_((error) => as(logWarning("runner_catch_up_unread", error.message), undefined)));
|
|
5966
|
+
const syncedTarget = merge?.target;
|
|
5963
5967
|
if (catchUp !== undefined)
|
|
5964
|
-
return boundary === undefined ? { status: "completed", revision, catchUp } : { status: "completed", revision, boundary, catchUp };
|
|
5965
|
-
return boundary === undefined ? { status: "completed", revision } : { status: "completed", revision, boundary };
|
|
5968
|
+
return boundary === undefined ? syncedTarget === undefined ? { status: "completed", revision, catchUp } : { status: "completed", revision, catchUp, syncedTarget } : syncedTarget === undefined ? { status: "completed", revision, boundary, catchUp } : { status: "completed", revision, boundary, catchUp, syncedTarget };
|
|
5969
|
+
return boundary === undefined ? syncedTarget === undefined ? { status: "completed", revision } : { status: "completed", revision, syncedTarget } : syncedTarget === undefined ? { status: "completed", revision, boundary } : { status: "completed", revision, boundary, syncedTarget };
|
|
5966
5970
|
}).pipe(scoped);
|
|
5967
5971
|
var agentStepExecutor = (input) => stepAttempt(input, new Map);
|
|
5968
5972
|
var checkpointRef = (work) => `refs/kitman/checkpoints/${work.runId}/${work.id}`;
|
|
@@ -7398,6 +7402,41 @@ var ownRepository = (worktree, clone, targetBranch) => gen(function* () {
|
|
|
7398
7402
|
yield* fs.rename(gitDir, path.join(worktree, ".git"));
|
|
7399
7403
|
yield* runCommand2("git", ["-C", worktree, "reset", "--quiet"]);
|
|
7400
7404
|
}).pipe(scoped);
|
|
7405
|
+
var resolveRevisions = (work, revisions, checkouts) => gen(function* () {
|
|
7406
|
+
const checkout = yield* checkouts.checkout({ runId: work.runId, id: work.id, baseRevision: work.revision }, work.repoBinding);
|
|
7407
|
+
const commits = [];
|
|
7408
|
+
for (const revision of revisions) {
|
|
7409
|
+
const commit = yield* exit(runCommand2("git", [
|
|
7410
|
+
"-C",
|
|
7411
|
+
checkout,
|
|
7412
|
+
"rev-parse",
|
|
7413
|
+
"--verify",
|
|
7414
|
+
"--quiet",
|
|
7415
|
+
"--end-of-options",
|
|
7416
|
+
`${revision}^{commit}`
|
|
7417
|
+
]));
|
|
7418
|
+
if (isFailure2(commit)) {
|
|
7419
|
+
const unresolved = {
|
|
7420
|
+
status: "failed",
|
|
7421
|
+
failureSummary: `\`${revision}\` names no commit in ${work.repoBinding.id}'s clone`
|
|
7422
|
+
};
|
|
7423
|
+
return unresolved;
|
|
7424
|
+
}
|
|
7425
|
+
commits.push(commit.value.trim());
|
|
7426
|
+
}
|
|
7427
|
+
const resolved = {
|
|
7428
|
+
status: "completed",
|
|
7429
|
+
evidence: {
|
|
7430
|
+
head: {
|
|
7431
|
+
revision: (yield* runCommand2("git", ["-C", checkout, "rev-parse", "HEAD"])).trim(),
|
|
7432
|
+
tree: yield* treeOf(checkout),
|
|
7433
|
+
checks: []
|
|
7434
|
+
},
|
|
7435
|
+
resolved: { commits }
|
|
7436
|
+
}
|
|
7437
|
+
};
|
|
7438
|
+
return resolved;
|
|
7439
|
+
});
|
|
7401
7440
|
var treeOf = (worktree) => map8(runCommand2("git", ["-C", worktree, "rev-parse", "HEAD^{tree}"]), (tree) => tree.trim());
|
|
7402
7441
|
var verificationExecutor = (input) => (work) => gen(function* () {
|
|
7403
7442
|
if (input.sandbox !== undefined && input.sandbox.backend === undefined)
|
|
@@ -7408,6 +7447,8 @@ var verificationExecutor = (input) => (work) => gen(function* () {
|
|
|
7408
7447
|
const cache = yield* (yield* FileSystem).makeTempDirectoryScoped({ prefix: "kitman-verify-cache-" });
|
|
7409
7448
|
const runIn = checkRunner(work, input.sandbox, cache, yield* inheritedEnvironment2(srtInheritedEnv2));
|
|
7410
7449
|
const checkouts = runCheckouts(input.rootDir, input.gitCredentials);
|
|
7450
|
+
if (work.resolve !== undefined)
|
|
7451
|
+
return yield* resolveRevisions(work, work.resolve.revisions, checkouts);
|
|
7411
7452
|
if (work.measure !== undefined) {
|
|
7412
7453
|
const measured = yield* measureRevisions(work, work.measure, checkouts, runIn);
|
|
7413
7454
|
const outcome = "failed" in measured ? { status: "failed", failureSummary: measured.failed } : { status: "completed", evidence: measured.measured };
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
FileSystem,
|
|
4
|
+
Path
|
|
5
|
+
} from "./chunk-397fax43.js";
|
|
2
6
|
import {
|
|
3
7
|
isObject2,
|
|
4
8
|
isUint8Array,
|
|
@@ -17,25 +21,21 @@ import"./chunk-kgdppbdr.js";
|
|
|
17
21
|
import {
|
|
18
22
|
isJsonObject
|
|
19
23
|
} from "./chunk-tzz4fv17.js";
|
|
20
|
-
import {
|
|
21
|
-
FileSystem,
|
|
22
|
-
Path
|
|
23
|
-
} from "./chunk-xb70ys3n.js";
|
|
24
24
|
import {
|
|
25
25
|
tomlTableHeader2,
|
|
26
26
|
tomlKeyPath2,
|
|
27
27
|
kitmanSkillEntry,
|
|
28
28
|
isPathWithin2
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-7qbchfkf.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-
|
|
38
|
-
import"./chunk-
|
|
36
|
+
} from "./chunk-d53rckf0.js";
|
|
37
|
+
import"./chunk-2tpysgqk.js";
|
|
38
|
+
import"./chunk-cakmwaed.js";
|
|
39
39
|
|
|
40
40
|
// packages/agent-runtime/src/kit-setup-sync.ts
|
|
41
41
|
class KitSyncError extends TaggedError("KitSyncError") {
|
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-ebd5zjnx.js");
|
|
9
9
|
await runSrtCli();
|
|
10
10
|
} else if (args[0] === "srt-step") {
|
|
11
11
|
const { runSrtStep } = await import("./chunk-ky974pcr.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-kxtmk59a.js");
|
|
15
15
|
runOpencodeReader();
|
|
16
16
|
} else {
|
|
17
|
-
const { runCli } = await import("./chunk-
|
|
17
|
+
const { runCli } = await import("./chunk-93b1hdfa.js");
|
|
18
18
|
runCli(args);
|
|
19
19
|
}
|