@kitman-sh/cli 0.13.8 → 0.13.10
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-cq2h8q9e.js → chunk-0nh3w4vn.js} +7 -7
- package/dist/{chunk-gq7y5v3e.js → chunk-24h0y27w.js} +1 -1
- package/dist/{chunk-zz589n7a.js → chunk-2dwqak36.js} +9 -9
- package/dist/{chunk-5zth85pj.js → chunk-4crf5vhd.js} +2 -2
- package/dist/{chunk-a24jc5rx.js → chunk-6n3m0t02.js} +31 -7
- package/dist/{chunk-byeasm6x.js → chunk-6x4wkf0x.js} +3 -3
- package/dist/{chunk-gr17n0z3.js → chunk-813vn8sn.js} +18 -18
- package/dist/{chunk-08dyrk6y.js → chunk-bkecckjn.js} +10 -10
- package/dist/{chunk-eg1n8wvf.js → chunk-c60xk73g.js} +21 -21
- package/dist/{chunk-h1rmw7yk.js → chunk-d4pxty7x.js} +5 -5
- package/dist/{chunk-y1krmnbv.js → chunk-ggmwpwhf.js} +2 -2
- package/dist/{chunk-7bytsxkf.js → chunk-hkg8s472.js} +9 -8
- package/dist/{chunk-ff1r9vcq.js → chunk-j34gensq.js} +1 -1
- package/dist/{chunk-gj1padza.js → chunk-jkddgvev.js} +52 -32
- package/dist/{chunk-96svx416.js → chunk-kj1zjrs9.js} +6 -6
- package/dist/{chunk-5zhh41gb.js → chunk-kk32jckf.js} +4 -4
- package/dist/{chunk-gy9rf14f.js → chunk-mmd7mjv0.js} +3 -3
- package/dist/{chunk-cbpb2rww.js → chunk-mtdz4k32.js} +10 -10
- package/dist/{chunk-q5w3v4k1.js → chunk-pxvd8w2v.js} +1 -1
- package/dist/{chunk-z68rzf0f.js → chunk-r5v7df8h.js} +61 -61
- package/dist/{chunk-vm2qy986.js → chunk-rz01craf.js} +108 -116
- package/dist/{chunk-c4ccpwjy.js → chunk-s00cj5sw.js} +4 -4
- package/dist/{chunk-0h49y8gf.js → chunk-t82w7459.js} +26 -17
- package/dist/{chunk-mtkstrh3.js → chunk-vxfajzpz.js} +14 -60
- package/dist/{chunk-zw3gf6r5.js → chunk-zgraq2y3.js} +70 -28
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
gen,
|
|
7
7
|
flatMap3,
|
|
8
8
|
provideContext2
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-zgraq2y3.js";
|
|
10
10
|
import {
|
|
11
11
|
runForEach
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-t82w7459.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-rz01craf.js";
|
|
23
23
|
import {
|
|
24
24
|
layerJson,
|
|
25
|
-
|
|
25
|
+
make3,
|
|
26
26
|
withHeaders,
|
|
27
27
|
layerProtocolSocket
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-d4pxty7x.js";
|
|
29
29
|
|
|
30
30
|
// packages/live/src/rpc/runner-client.ts
|
|
31
31
|
var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
|
|
@@ -46,7 +46,7 @@ var authorizer = (options) => (call) => flatMap3(options.bearer, (token) => with
|
|
|
46
46
|
var RunnerProcessRpcs = RunnerReplicaRpcs.merge(RunnerRunFileRpcs);
|
|
47
47
|
var makeRunnerRpcClient2 = (options) => gen(function* () {
|
|
48
48
|
const protocol = yield* build(options.protocol);
|
|
49
|
-
const client = yield*
|
|
49
|
+
const client = yield* make3(RunnerProcessRpcs).pipe(provideContext2(protocol));
|
|
50
50
|
const authorized = authorizer(options);
|
|
51
51
|
return {
|
|
52
52
|
claim: (input) => authorized(client.Claim(input)),
|
|
@@ -74,7 +74,7 @@ var makeRunnerRpcClient2 = (options) => gen(function* () {
|
|
|
74
74
|
});
|
|
75
75
|
var makeProgramRpcClient2 = (options) => gen(function* () {
|
|
76
76
|
const protocol = yield* build(options.protocol);
|
|
77
|
-
const client = yield*
|
|
77
|
+
const client = yield* make3(ProgramRpcs).pipe(provideContext2(protocol));
|
|
78
78
|
const authorized = authorizer(options);
|
|
79
79
|
return {
|
|
80
80
|
recordActivity: (input) => authorized(client.RecordActivity(input)),
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
FileSystem,
|
|
4
|
+
Path,
|
|
5
|
+
optionalEnv,
|
|
6
|
+
tempDirectoryScoped
|
|
7
|
+
} from "./chunk-t82w7459.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-0h49y8gf.js";
|
|
34
|
+
} from "./chunk-zgraq2y3.js";
|
|
35
35
|
import {
|
|
36
36
|
AgentHarnessIds,
|
|
37
37
|
sha2562,
|
|
38
38
|
runCommand2
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-rz01craf.js";
|
|
40
40
|
import {
|
|
41
41
|
NpmRegistry
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-6x4wkf0x.js";
|
|
43
43
|
|
|
44
44
|
// packages/agent-runtime/src/config-convergence.ts
|
|
45
45
|
var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
writeSrtSettings2,
|
|
15
15
|
srtStepArgv2,
|
|
16
16
|
srtArgv2
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import"./chunk-
|
|
17
|
+
} from "./chunk-t82w7459.js";
|
|
18
|
+
import"./chunk-zgraq2y3.js";
|
|
19
19
|
export {
|
|
20
20
|
compiled2 as compiled,
|
|
21
21
|
harnessesUnsupportedInSrt2 as harnessesUnsupportedInSrt,
|
|
@@ -548,7 +548,11 @@ Pause holds a Run and its Child Runs without stopping them: Runners are offered
|
|
|
548
548
|
path: "loop-operations#reviewing-a-plan",
|
|
549
549
|
level: 2,
|
|
550
550
|
link: "https://kitman.sh/knowledge/docs/loop-operations#reviewing-a-plan",
|
|
551
|
-
text:
|
|
551
|
+
text: `## Reviewing a plan
|
|
552
|
+
|
|
553
|
+
Before you are asked to approve a plan, a plan reviewer checks each of its tickets: one Promise with its Out of scope list, small enough for one agent session, no design decision left open, and the right blockers. When it has concerns, the planner revises the plan once and the reviewer checks it again. What it still disputes is listed at the end of the plan under **Still disputed**, with the planner's reason when it gave one. Each revision you ask for is checked the same way.
|
|
554
|
+
|
|
555
|
+
A Plan Run waits for a person to approve each revision of its plan, the first and each one a review or the menu's Refine makes, before it offers to build or file it. Its Run page opens on the **Plan** tab while a revision waits for review or is being revised, and the tab renders the plan as a document. Select any text in it, a line, a sentence or a single word, to comment on that quote; your comments collect into one review, kept in the browser until you send it. **Request changes** sends every comment to the planner with its quote, its line in the plan's Markdown and the revision it is on, and the tab stays open to say the planner is revising. The next revision shows **Changes since revision N**, the diff from the last one, and marks each comment of your review **Addressed**, with how, or **Open**, with why when the planner says why it did not act on it. **Approve plan** lets the Run carry on; until then it waits. A Run started with \`implement\` approves a revision nobody answers within an hour, or at once when nobody attends the Run. Words typed in place of a review, in the Inbox or the CLI, reach the planner as one comment on the whole revision.`
|
|
552
556
|
},
|
|
553
557
|
{
|
|
554
558
|
title: "Loop Operations Guide \u203A Constraints",
|
|
@@ -620,7 +624,7 @@ Turning a start off stops new Runs from it. Runs it already started go on. \`kit
|
|
|
620
624
|
path: "loop-operations#agents-and-effort",
|
|
621
625
|
level: 2,
|
|
622
626
|
link: "https://kitman.sh/knowledge/docs/loop-operations#agents-and-effort",
|
|
623
|
-
text: "## Agents and effort\n\nKitman ships the Agents `implementer`, `reviewer`, `planner`, `releaser`, `investigator` and `judge`. The `reviewer` runs on Pi with GPT-6.2 Sol, then Claude Opus at `medium` effort, and the `planner` on Claude Fable 5.2 at `high` effort. The others name no model, so a Step runs on whatever model the Runner's harness is logged in to. A Workspace or Team overrides one, such as its harness, model or effort, by declaring an Agent of the same id that extends it, in a Kit it deploys. Each declaration is a layer over the Agent it extends:\n\n```ts\nexport default defineKit({\n agents: {\n reviewer: {\n extends: 'reviewer',\n instructions: `## House rules\nNever approve a migration that edits a released one.`,\n effort: 'high'\n }\n }\n})\n```\n\nA declared Agent replaces only the fields it names. Its instructions merge by `## ` heading:\n\n- A section it names replaces the parent's section with that heading.\n- A new heading is appended.\n- Any text before its first heading replaces the parent's.\n\nAn Agent can list fallbacks for a Runner that does not offer its Harness:\n\n```ts\nexport default defineKit({\n agents: {\n reviewer: {\n extends: 'reviewer',\n harness: 'claude',\n effort: 'high',\n fallbacks: [\n { harness: 'codex', model: 'gpt-5.5' },\n { harness: 'pi', effort: 'medium' }\n ]\n }\n }\n})\n```\n\nA Step launches the first choice the claiming Runner offers, and the Run page's Step view shows the choices it skipped and why. A fallback with no effort runs at the Agent's effort, and one with no model runs on the Harness's own model. An Agent that extends another inherits its fallbacks; naming `fallbacks` replaces them, and `fallbacks: []` clears them.\n\nEffort (`low`, `medium`, `high` or `xhigh`) is recorded on each StepAttempt. `kitman agent list --team <team>` shows each Agent merged as that Team's Runs resolve it, with the layer each field came from, so a Team Kit's override reads `claude (team)`. Without `--team` it uses the active Team, or only the workspace layer when there is none, and its first line says which."
|
|
627
|
+
text: "## Agents and effort\n\nKitman ships the Agents `implementer`, `reviewer`, `plan-reviewer`, `planner`, `releaser`, `investigator` and `judge`. The `reviewer` runs on Pi with GPT-6.2 Sol, then Claude Opus at `medium` effort; the `plan-reviewer` runs on the same, with Opus at `high` effort; and the `planner` runs on Claude Fable 5.2 at `high` effort. The others name no model, so a Step runs on whatever model the Runner's harness is logged in to. A Workspace or Team overrides one, such as its harness, model or effort, by declaring an Agent of the same id that extends it, in a Kit it deploys. Each declaration is a layer over the Agent it extends:\n\n```ts\nexport default defineKit({\n agents: {\n reviewer: {\n extends: 'reviewer',\n instructions: `## House rules\nNever approve a migration that edits a released one.`,\n effort: 'high'\n }\n }\n})\n```\n\nA declared Agent replaces only the fields it names. Its instructions merge by `## ` heading:\n\n- A section it names replaces the parent's section with that heading.\n- A new heading is appended.\n- Any text before its first heading replaces the parent's.\n\nAn Agent can list fallbacks for a Runner that does not offer its Harness:\n\n```ts\nexport default defineKit({\n agents: {\n reviewer: {\n extends: 'reviewer',\n harness: 'claude',\n effort: 'high',\n fallbacks: [\n { harness: 'codex', model: 'gpt-5.5' },\n { harness: 'pi', effort: 'medium' }\n ]\n }\n }\n})\n```\n\nA Step launches the first choice the claiming Runner offers, and the Run page's Step view shows the choices it skipped and why. A fallback with no effort runs at the Agent's effort, and one with no model runs on the Harness's own model. An Agent that extends another inherits its fallbacks; naming `fallbacks` replaces them, and `fallbacks: []` clears them.\n\nEffort (`low`, `medium`, `high` or `xhigh`) is recorded on each StepAttempt. `kitman agent list --team <team>` shows each Agent merged as that Team's Runs resolve it, with the layer each field came from, so a Team Kit's override reads `claude (team)`. Without `--team` it uses the active Team, or only the workspace layer when there is none, and its first line says which."
|
|
624
628
|
},
|
|
625
629
|
{
|
|
626
630
|
title: "Projects and Saved Views",
|
|
@@ -843,7 +847,7 @@ Write no code and no line numbers: both are out of date before the Task is built
|
|
|
843
847
|
link: "https://kitman.sh/knowledge/docs/scope-tasks#two-or-more-related-tasks",
|
|
844
848
|
text: `## Two or more related Tasks
|
|
845
849
|
|
|
846
|
-
Start the **File Tasks** Loop instead of creating related Tasks one by one. It makes a Task of each ticket and relates their blockers, so none is picked up before the Tasks it needs. In Code Mode:
|
|
850
|
+
Start the **File Tasks** Loop instead of creating related Tasks one by one. It checks the tickets with a plan review, then makes a Task of each ticket and relates their blockers, so none is picked up before the Tasks it needs. In Code Mode:
|
|
847
851
|
|
|
848
852
|
\`\`\`js
|
|
849
853
|
await kitman.runs.start({
|
|
@@ -852,14 +856,34 @@ await kitman.runs.start({
|
|
|
852
856
|
loop: 'file-tasks',
|
|
853
857
|
input: {
|
|
854
858
|
tickets: [
|
|
855
|
-
{
|
|
856
|
-
|
|
859
|
+
{
|
|
860
|
+
key: 'first',
|
|
861
|
+
title: '\u2026',
|
|
862
|
+
body: '\u2026',
|
|
863
|
+
promise: '\u2026',
|
|
864
|
+
outOfScope: ['\u2026'],
|
|
865
|
+
acceptanceCriteria: ['\u2026'],
|
|
866
|
+
blockedBy: []
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
key: 'wider',
|
|
870
|
+
title: '\u2026',
|
|
871
|
+
body: '\u2026',
|
|
872
|
+
promise: '\u2026',
|
|
873
|
+
outOfScope: ['\u2026'],
|
|
874
|
+
acceptanceCriteria: ['\u2026'],
|
|
875
|
+
blockedBy: ['first']
|
|
876
|
+
}
|
|
857
877
|
]
|
|
858
878
|
}
|
|
859
879
|
})
|
|
860
880
|
\`\`\`
|
|
861
881
|
|
|
862
|
-
From a terminal, pass the same Input to \`kitman run start file-tasks --input '<json>'\`. Add \`projectId\` to the Input to file them in a Project
|
|
882
|
+
From a terminal, pass the same Input to \`kitman run start file-tasks --input '<json>'\`. Add \`projectId\` to the Input to file them in a Project, and \`repoBindingId\` when they change another repository than the Team's default: the review reads it, and each Task is filed for it. A ticket that changes another repository than that names its own \`repoBindingId\`. Each ticket needs a \`promise\` and an \`outOfScope\` list, which may be empty.
|
|
883
|
+
|
|
884
|
+
When the plan review has concerns, File Tasks files none of the tickets. The Run completes with an Output whose \`concerns\` each name a \`ticket\` and what is wrong with it. Revise the tickets and start File Tasks again with all of them. With no concerns, \`concerns\` is empty and \`tasks\` gives each ticket's Task.
|
|
885
|
+
|
|
886
|
+
In a Plan Run, write the tickets in the plan: Plan files them.`
|
|
863
887
|
},
|
|
864
888
|
{
|
|
865
889
|
title: "Tasks Guide",
|
|
@@ -1531,7 +1555,7 @@ var pathOfLink = (link) => {
|
|
|
1531
1555
|
return page === null ? link : page[1] || "index";
|
|
1532
1556
|
};
|
|
1533
1557
|
var UnpinnedSdkLink = "https://cdn.jsdelivr.net/npm/@kitman-sh/sdk/";
|
|
1534
|
-
var pinnedLink2 = (link, version = "0.13.
|
|
1558
|
+
var pinnedLink2 = (link, version = "0.13.10") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
|
|
1535
1559
|
var pageOf = (path) => path.split("#")[0];
|
|
1536
1560
|
var exportName = (section) => section.path.startsWith("sdk/") ? section.path.split("#")[1] ?? "" : "";
|
|
1537
1561
|
function excerpt(text, queryTerms) {
|
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
Record,
|
|
25
25
|
Int,
|
|
26
26
|
fromJsonString
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-zgraq2y3.js";
|
|
28
28
|
import {
|
|
29
29
|
withDefault,
|
|
30
30
|
String2
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-t82w7459.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-rz01craf.js";
|
|
43
43
|
|
|
44
44
|
// packages/core/src/npm-registry.ts
|
|
45
45
|
var KitManifest = Struct({
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
decodeText,
|
|
4
|
+
mkString,
|
|
5
|
+
FileSystem,
|
|
6
|
+
Path,
|
|
7
|
+
withDefault,
|
|
8
|
+
String2
|
|
9
|
+
} from "./chunk-t82w7459.js";
|
|
2
10
|
import {
|
|
3
11
|
isString,
|
|
4
12
|
hasProperty,
|
|
@@ -32,8 +40,8 @@ import {
|
|
|
32
40
|
toCodecJson,
|
|
33
41
|
Json,
|
|
34
42
|
encodePrettyJsonString
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import"./chunk-
|
|
43
|
+
} from "./chunk-zgraq2y3.js";
|
|
44
|
+
import"./chunk-pxvd8w2v.js";
|
|
37
45
|
import {
|
|
38
46
|
SecureRandom,
|
|
39
47
|
layerWebCrypto,
|
|
@@ -45,31 +53,23 @@ import {
|
|
|
45
53
|
layer4,
|
|
46
54
|
kitmanMcpServer,
|
|
47
55
|
RunnerRpcProtocolVersion
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import {
|
|
50
|
-
decodeText,
|
|
51
|
-
mkString,
|
|
52
|
-
FileSystem,
|
|
53
|
-
Path,
|
|
54
|
-
withDefault,
|
|
55
|
-
String2
|
|
56
|
-
} from "./chunk-0h49y8gf.js";
|
|
56
|
+
} from "./chunk-rz01craf.js";
|
|
57
57
|
import {
|
|
58
58
|
Packument,
|
|
59
59
|
tarballMatches
|
|
60
|
-
} from "./chunk-
|
|
61
|
-
import"./chunk-
|
|
60
|
+
} from "./chunk-6x4wkf0x.js";
|
|
61
|
+
import"./chunk-0nh3w4vn.js";
|
|
62
62
|
import {
|
|
63
63
|
AgentDeclaration,
|
|
64
64
|
KitDeclarations,
|
|
65
65
|
describeFlag,
|
|
66
66
|
Described
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-hkg8s472.js";
|
|
68
68
|
import {
|
|
69
69
|
ChildProcessSpawner,
|
|
70
|
-
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import"./chunk-
|
|
70
|
+
make2
|
|
71
|
+
} from "./chunk-vxfajzpz.js";
|
|
72
|
+
import"./chunk-d4pxty7x.js";
|
|
73
73
|
|
|
74
74
|
// packages/sdk/src/build/index.ts
|
|
75
75
|
class DependencyInstallFailed extends TaggedError2()("DependencyInstallFailed", {
|
|
@@ -108,7 +108,7 @@ var ConfigAgents = Record(String4, Struct({
|
|
|
108
108
|
}));
|
|
109
109
|
var run = (command, args, cwd) => gen(function* () {
|
|
110
110
|
const spawner = yield* ChildProcessSpawner;
|
|
111
|
-
const handle = yield* spawner.spawn(
|
|
111
|
+
const handle = yield* spawner.spawn(make2(command, args, { cwd, stdin: "ignore" }));
|
|
112
112
|
const [stdout, stderr, exitCode] = yield* all3([
|
|
113
113
|
mkString(decodeText(handle.stdout)),
|
|
114
114
|
mkString(decodeText(handle.stderr)),
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
FileSystem,
|
|
4
|
+
Path
|
|
5
|
+
} from "./chunk-t82w7459.js";
|
|
2
6
|
import {
|
|
3
7
|
isObject,
|
|
4
8
|
isUint8Array,
|
|
@@ -13,27 +17,23 @@ import {
|
|
|
13
17
|
isJsonObject,
|
|
14
18
|
decodeJsonString,
|
|
15
19
|
encodePrettyJsonString
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import"./chunk-
|
|
18
|
-
import {
|
|
19
|
-
FileSystem,
|
|
20
|
-
Path
|
|
21
|
-
} from "./chunk-0h49y8gf.js";
|
|
20
|
+
} from "./chunk-zgraq2y3.js";
|
|
21
|
+
import"./chunk-pxvd8w2v.js";
|
|
22
22
|
import {
|
|
23
23
|
tomlTableHeader2,
|
|
24
24
|
tomlKeyPath2,
|
|
25
25
|
kitmanSkillEntry,
|
|
26
26
|
isPathWithin2
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-2dwqak36.js";
|
|
28
28
|
import {
|
|
29
29
|
instructionsStart,
|
|
30
30
|
instructionsEnd,
|
|
31
31
|
renderMcpServer,
|
|
32
32
|
materializeKitSetup,
|
|
33
33
|
tomlInline
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import"./chunk-
|
|
36
|
-
import"./chunk-
|
|
34
|
+
} from "./chunk-rz01craf.js";
|
|
35
|
+
import"./chunk-6x4wkf0x.js";
|
|
36
|
+
import"./chunk-vxfajzpz.js";
|
|
37
37
|
|
|
38
38
|
// packages/agent-runtime/src/kit-setup-sync.ts
|
|
39
39
|
class KitSyncError extends TaggedError("KitSyncError") {
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
succeed,
|
|
13
13
|
isSuccess,
|
|
14
14
|
TaggedError,
|
|
15
|
-
|
|
15
|
+
make15,
|
|
16
16
|
_await,
|
|
17
17
|
fail5,
|
|
18
18
|
succeed5,
|
|
@@ -104,7 +104,7 @@ import {
|
|
|
104
104
|
decodeJsonString,
|
|
105
105
|
encodeJsonStringSync,
|
|
106
106
|
encodePrettyJsonString
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-zgraq2y3.js";
|
|
108
108
|
import {
|
|
109
109
|
tap,
|
|
110
110
|
mapError,
|
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
withDefault,
|
|
117
117
|
option,
|
|
118
118
|
String2
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-t82w7459.js";
|
|
120
120
|
import {
|
|
121
121
|
currentTimeMillis,
|
|
122
122
|
SecureRandom,
|
|
@@ -167,7 +167,7 @@ import {
|
|
|
167
167
|
digestSha256,
|
|
168
168
|
sha256Hasher,
|
|
169
169
|
raw,
|
|
170
|
-
|
|
170
|
+
make4,
|
|
171
171
|
get,
|
|
172
172
|
put,
|
|
173
173
|
HttpClient,
|
|
@@ -230,14 +230,14 @@ import {
|
|
|
230
230
|
harnessNames,
|
|
231
231
|
herdrRunnerCapabilities2,
|
|
232
232
|
declaredChecks
|
|
233
|
-
} from "./chunk-
|
|
233
|
+
} from "./chunk-rz01craf.js";
|
|
234
234
|
import {
|
|
235
235
|
Id
|
|
236
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-pxvd8w2v.js";
|
|
237
237
|
import {
|
|
238
238
|
ChildProcessSpawner,
|
|
239
|
-
|
|
240
|
-
} from "./chunk-
|
|
239
|
+
make2
|
|
240
|
+
} from "./chunk-vxfajzpz.js";
|
|
241
241
|
|
|
242
242
|
// apps/cli/src/cli-error.ts
|
|
243
243
|
function cliErrorCode(error, status) {
|
|
@@ -993,10 +993,10 @@ var sandboxMissing = (sandbox, missing) => ({
|
|
|
993
993
|
var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
|
|
994
994
|
var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
|
|
995
995
|
var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
|
|
996
|
-
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-
|
|
996
|
+
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-s00cj5sw.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
|
|
997
997
|
});
|
|
998
998
|
var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
|
|
999
|
-
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-
|
|
999
|
+
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-s00cj5sw.js")), (module) => module.updateHerdrCore(options))
|
|
1000
1000
|
});
|
|
1001
1001
|
var herdrCoreMissing = (error) => {
|
|
1002
1002
|
if (isTagged(error, "HerdrCoreMissing"))
|
|
@@ -1422,7 +1422,7 @@ var syncTargets = (harness) => gen(function* () {
|
|
|
1422
1422
|
});
|
|
1423
1423
|
var syncKits = (input) => gen(function* () {
|
|
1424
1424
|
const fs = yield* FileSystem;
|
|
1425
|
-
const { syncKitSetup } = yield* promise(() => import("./chunk-
|
|
1425
|
+
const { syncKitSetup } = yield* promise(() => import("./chunk-bkecckjn.js"));
|
|
1426
1426
|
const harnesses = yield* syncTargets(input.harness);
|
|
1427
1427
|
const chain = yield* input.client.getKitChain(input.workspaceId);
|
|
1428
1428
|
for (const { name, problem } of chain.skipped)
|
|
@@ -1939,7 +1939,7 @@ var ServiceManager = Reference("kitman/cli/ServiceManager", {
|
|
|
1939
1939
|
run: (command, args) => runCommand2(command, args),
|
|
1940
1940
|
attach: (command, args) => gen(function* () {
|
|
1941
1941
|
const spawner = yield* ChildProcessSpawner;
|
|
1942
|
-
const handle = yield* spawner.spawn(
|
|
1942
|
+
const handle = yield* spawner.spawn(make2(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
|
|
1943
1943
|
const exitCode = yield* handle.exitCode;
|
|
1944
1944
|
if (exitCode !== 0)
|
|
1945
1945
|
return yield* new CommandFailed2({ command, reason: `exit code ${exitCode}` });
|
|
@@ -2341,7 +2341,7 @@ var package_default = {
|
|
|
2341
2341
|
};
|
|
2342
2342
|
|
|
2343
2343
|
// apps/cli/src/scaffold.ts
|
|
2344
|
-
var cliVersion = "0.13.
|
|
2344
|
+
var cliVersion = "0.13.10";
|
|
2345
2345
|
var packageJson = (name, scaffold) => `${JSON.stringify({
|
|
2346
2346
|
name,
|
|
2347
2347
|
private: true,
|
|
@@ -2493,7 +2493,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
|
|
|
2493
2493
|
|
|
2494
2494
|
// apps/cli/src/commands.ts
|
|
2495
2495
|
var ClientId = "kitman-cli";
|
|
2496
|
-
var agentRuntime = promise(() => import("./chunk-
|
|
2496
|
+
var agentRuntime = promise(() => import("./chunk-r5v7df8h.js"));
|
|
2497
2497
|
var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
|
|
2498
2498
|
defaultValue: () => gen(function* () {
|
|
2499
2499
|
const tui = yield* tryPromise({
|
|
@@ -3529,7 +3529,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
|
|
|
3529
3529
|
});
|
|
3530
3530
|
var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
|
|
3531
3531
|
defaultValue: () => (options) => gen(function* () {
|
|
3532
|
-
const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-
|
|
3532
|
+
const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-kj1zjrs9.js"));
|
|
3533
3533
|
return yield* makeRunnerRpcClient({
|
|
3534
3534
|
runnerId: options.runnerId,
|
|
3535
3535
|
bearer: options.bearer,
|
|
@@ -3834,7 +3834,7 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
3834
3834
|
const checkouts = runCheckouts(path.join(runnerRootDir, ".kitman"), rpc.gitCredential);
|
|
3835
3835
|
yield* controlPlane.client.listRepoBindings(runner.workspaceId).pipe(flatMap3(({ items }) => forEach(items.filter((binding) => binding.status === "active" && (teamId === undefined || binding.teamId === teamId)), (repoBinding) => map8(checkouts.reaches(repoBinding), (reachable) => ({ repoBinding, reachable })), { concurrency: 4 })), tap2((probed) => sync2(() => reached = probed)), catch_((error) => logWarning("runner_repository_probe_failed", error.message)), flatMap3(() => sleep(reached.some((probe) => !probe.reachable) ? repositoryRetryInterval : repositoryProbeInterval)), forever, forkScoped);
|
|
3836
3836
|
const platform = yield* context();
|
|
3837
|
-
const updated = yield*
|
|
3837
|
+
const updated = yield* make15();
|
|
3838
3838
|
const scope = yield* scope2;
|
|
3839
3839
|
const startUpdate = (update) => update.pipe(catch_((error) => andThen2(restartOntoUpdate(input.runnerId), fail5(updated, error))), provideContext2(platform), forkIn(scope), asVoid);
|
|
3840
3840
|
const refusedForProtocol = container ? updater.stopWhenDrained(new RunnerStopped({ problem: updateRequired })).pipe(catch_((stopped) => fail5(updated, stopped)), forkIn(scope), asVoid) : startUpdate(updater.updateRequired);
|
|
@@ -4086,7 +4086,7 @@ function mcpCommand(args) {
|
|
|
4086
4086
|
if (command.action === "run") {
|
|
4087
4087
|
if (command.args.length > 0)
|
|
4088
4088
|
return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
|
|
4089
|
-
const { runMcpServerCommand } = yield* promise(() => import("./chunk-
|
|
4089
|
+
const { runMcpServerCommand } = yield* promise(() => import("./chunk-jkddgvev.js"));
|
|
4090
4090
|
return yield* runMcpServerCommand({ flags: command.flags });
|
|
4091
4091
|
}
|
|
4092
4092
|
if (command.action !== "setup")
|
|
@@ -4574,7 +4574,7 @@ function programLoopCommand(command) {
|
|
|
4574
4574
|
return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
|
|
4575
4575
|
});
|
|
4576
4576
|
}
|
|
4577
|
-
var docsModule = promise(() => import("./chunk-
|
|
4577
|
+
var docsModule = promise(() => import("./chunk-j34gensq.js"));
|
|
4578
4578
|
function docsCommand(args) {
|
|
4579
4579
|
return gen(function* () {
|
|
4580
4580
|
const command = parseCommand(args);
|
|
@@ -5408,9 +5408,9 @@ function changeRequestCommand(args) {
|
|
|
5408
5408
|
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}`);
|
|
5409
5409
|
});
|
|
5410
5410
|
}
|
|
5411
|
-
var KitWriter = map8(promise(() => import("./chunk-
|
|
5411
|
+
var KitWriter = map8(promise(() => import("./chunk-813vn8sn.js")), (build) => build.writeKit);
|
|
5412
5412
|
var KitBuilder = Reference("kitman/cli/KitBuilder", {
|
|
5413
|
-
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-
|
|
5413
|
+
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-813vn8sn.js")), (build) => build.buildKit(directory))
|
|
5414
5414
|
});
|
|
5415
5415
|
var uploadKit = (client, workspaceId, built) => gen(function* () {
|
|
5416
5416
|
yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
|
|
@@ -6187,7 +6187,7 @@ function downloadPresignedAsset(download, outputPath) {
|
|
|
6187
6187
|
return gen(function* () {
|
|
6188
6188
|
const fs = yield* FileSystem;
|
|
6189
6189
|
const failed = (cause) => new CliError({ message: `Asset download failed: ${String(cause)}` });
|
|
6190
|
-
const response = yield* send(
|
|
6190
|
+
const response = yield* send(make4(download.method)(download.url), failed);
|
|
6191
6191
|
if (response.status < 200 || response.status >= 300)
|
|
6192
6192
|
return yield* new CliError({ message: `Asset download failed with ${response.status}` });
|
|
6193
6193
|
const body = yield* response.arrayBuffer.pipe(mapError2((error) => failed(error.message)));
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
Defect,
|
|
97
97
|
Exit,
|
|
98
98
|
toCodecJson
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-zgraq2y3.js";
|
|
100
100
|
import {
|
|
101
101
|
interrupt,
|
|
102
102
|
getCurrent,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
shutdownUnsafe,
|
|
109
109
|
fromQueue,
|
|
110
110
|
unwrap
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-t82w7459.js";
|
|
112
112
|
import {
|
|
113
113
|
Clock,
|
|
114
114
|
empty,
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
ParseOptions,
|
|
124
124
|
RpcClientDefect,
|
|
125
125
|
RpcClientError
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-rz01craf.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")) {
|
|
@@ -483,7 +483,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
|
|
|
483
483
|
};
|
|
484
484
|
});
|
|
485
485
|
var clientIdCounter = 0;
|
|
486
|
-
var
|
|
486
|
+
var make3 = /* @__PURE__ */ fnUntraced(function* (group, options) {
|
|
487
487
|
const clientId = clientIdCounter++;
|
|
488
488
|
const {
|
|
489
489
|
codecFor,
|
|
@@ -829,4 +829,4 @@ var layerProtocolSocket = (options) => effect(Protocol)(makeProtocolSocket(optio
|
|
|
829
829
|
class ConnectionHooks extends (/* @__PURE__ */ Service2()("effect/rpc/RpcClient/ConnectionHooks")) {
|
|
830
830
|
}
|
|
831
831
|
|
|
832
|
-
export { layerJson,
|
|
832
|
+
export { layerJson, make3, withHeaders, layerProtocolSocket, ConnectionHooks };
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
ArraySchema,
|
|
14
14
|
decodeJsonStringOption,
|
|
15
15
|
encodeUnknownJsonStringSync
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-zgraq2y3.js";
|
|
17
17
|
import {
|
|
18
18
|
replaceSecretReferences,
|
|
19
19
|
secretReferencesIn
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-pxvd8w2v.js";
|
|
21
21
|
|
|
22
22
|
// packages/agent-runtime/src/srt-step.ts
|
|
23
23
|
import { SandboxRuntimeConfigSchema } from "@anthropic-ai/sandbox-runtime";
|
|
@@ -75,10 +75,14 @@ import {
|
|
|
75
75
|
toEquivalence,
|
|
76
76
|
toCodecJson,
|
|
77
77
|
Json
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-zgraq2y3.js";
|
|
79
|
+
import {
|
|
80
|
+
runForEach,
|
|
81
|
+
FileSystem
|
|
82
|
+
} from "./chunk-t82w7459.js";
|
|
79
83
|
import {
|
|
80
84
|
guard
|
|
81
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-pxvd8w2v.js";
|
|
82
86
|
import {
|
|
83
87
|
currentTimeMillis,
|
|
84
88
|
WebCrypto,
|
|
@@ -105,11 +109,7 @@ import {
|
|
|
105
109
|
KitDigest,
|
|
106
110
|
KitSetup,
|
|
107
111
|
RunnerRpcError
|
|
108
|
-
} from "./chunk-
|
|
109
|
-
import {
|
|
110
|
-
runForEach,
|
|
111
|
-
FileSystem
|
|
112
|
-
} from "./chunk-0h49y8gf.js";
|
|
112
|
+
} from "./chunk-rz01craf.js";
|
|
113
113
|
|
|
114
114
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/crypto/internal/webCrypto.js
|
|
115
115
|
var subtleUnavailable = () => new Error("crypto.subtle is unavailable; browsers expose it only in secure contexts");
|
|
@@ -608,7 +608,8 @@ var ticketsProblem = (tickets) => {
|
|
|
608
608
|
const { blocked } = wavesOf(tickets);
|
|
609
609
|
return blocked.length === 0 ? undefined : cycleMessage(blocked);
|
|
610
610
|
};
|
|
611
|
-
var
|
|
611
|
+
var planTicketsOf = (ticket) => ArraySchema(ticket).check(makeFilter((tickets) => ticketsProblem(tickets) ?? true));
|
|
612
|
+
var PlanTickets = planTicketsOf(PlanTicket);
|
|
612
613
|
|
|
613
614
|
class BlockingCycle extends TaggedError2()("BlockingCycle", {
|
|
614
615
|
tickets: ArraySchema(String4)
|