@kitman-sh/cli 0.12.0-rc.1 → 0.12.0-rc.3
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-5vzznkvb.js → chunk-0346hwh6.js} +3 -3
- package/dist/{chunk-82xjnghh.js → chunk-2gg3ccte.js} +4 -4
- package/dist/{chunk-kpfrhex3.js → chunk-56knbdt6.js} +6 -6
- package/dist/{chunk-tcyqkqzj.js → chunk-6akwhwyp.js} +14 -14
- package/dist/{chunk-rm3vqk5d.js → chunk-794hjysw.js} +2 -2
- package/dist/{chunk-rr0yw34p.js → chunk-8ez1s9cr.js} +11 -7
- package/dist/{chunk-dc57c8s5.js → chunk-dymepetx.js} +49 -15
- package/dist/{chunk-ejhfa1t6.js → chunk-e7e120qw.js} +2 -2
- package/dist/{chunk-ap9y5k9y.js → chunk-ewhzaqp3.js} +1 -1
- package/dist/{chunk-0b93nv6j.js → chunk-gspfm7qh.js} +7 -11
- package/dist/{chunk-bjnvrsej.js → chunk-h6hd61dn.js} +14 -14
- package/dist/{chunk-8yyj061t.js → chunk-jef2vdr6.js} +3 -3
- package/dist/{chunk-66xhktcp.js → chunk-ks3p7yha.js} +730 -19
- package/dist/{chunk-wf8ajpyy.js → chunk-mc87tyzm.js} +9 -7
- package/dist/{chunk-1sy32p83.js → chunk-trb9325k.js} +9 -8
- package/dist/{chunk-s7xcdcqx.js → chunk-x55v5kyg.js} +66 -65
- package/dist/{chunk-2qarscbj.js → chunk-xwya1er0.js} +1 -1
- package/dist/{chunk-p3jbjz2a.js → chunk-y73z1kkz.js} +8 -8
- package/dist/{chunk-kfwp70pn.js → chunk-y8sscyvt.js} +3 -3
- package/dist/{chunk-a8jgegds.js → chunk-yatva7be.js} +1 -1
- package/dist/index.js +3 -3
- package/package.json +1 -1
|
@@ -227,9 +227,11 @@ People create Tasks and hand them to agents. An agent works on a Task through a
|
|
|
227
227
|
link: "https://kitman.sh/knowledge/docs/handing-work-to-agents#ready-for-agents",
|
|
228
228
|
text: `## Ready for agents
|
|
229
229
|
|
|
230
|
-
Moving a Task to a state agents pick up from, such as **Ready for agents**, starts its Task Type's default Loop for it. You become the Run's Delivery Owner: its Questions and its handoff come to you. When an agent or a Triage Rule moved the Task, the Task's assignee is the Delivery Owner, or else its creator.
|
|
230
|
+
Moving a Task to a state agents pick up from, such as **Ready for agents**, or creating it in one, starts its Task Type's default Loop for it. Creating a Task with a Loop chosen, or by starting a Run from words, starts only that Run, and the tickets Plan builds itself and a Firewatch alert's Task start only the Runs their Loops give them. Tickets filed as Tasks are picked up once their blockers are related; Plan's File as Tasks waits until the Plan Run ends without building them. You become the Run's Delivery Owner: its Questions and its handoff come to you. When an agent or a Triage Rule moved the Task, the Task's assignee is the Delivery Owner, or else its human creator; with neither, its Team gets a **Start** item in the Inbox. The Run queues for a Runner like any other, by the Task's priority.
|
|
231
231
|
|
|
232
|
-
Nothing new starts while the Task already has a Run that has not finished.
|
|
232
|
+
Nothing new starts while the Task already has a Run that has not finished. To give a new Task blockers before it starts, create it in another state, add its relations, then move it.
|
|
233
|
+
|
|
234
|
+
Each pickup is listed by \`kitman loop starts\` (\`loops.automaticStarts\`) as a \`task.picked_up\` Event, and each release by a finished blocker as \`task.unblocked\`: the Run it started, or why it started none, such as the blockers it waits on or the Run it already has. A blocker in another private Team is listed only as a count.
|
|
233
235
|
|
|
234
236
|
Any state can hand Tasks to agents. In the Team's settings, the **Workflow** tab has a switch with a robot on each state that turns agent pickup on or off; the same robot marks those states in lists and menus. A Triage Rule can accept a Task straight into such a state, so routine work goes from intake to an agent without waiting on a person.`
|
|
235
237
|
},
|
|
@@ -474,8 +476,8 @@ Agents should record implementation evidence, verification, and delivery artifac
|
|
|
474
476
|
|
|
475
477
|
Every Run is held to an Intent, seeded when Kitman admits it:
|
|
476
478
|
|
|
477
|
-
- **Goal:** the launch words, or the Task's title and description.
|
|
478
|
-
- **Done when:** the Task's Acceptance Criteria.
|
|
479
|
+
- **Goal:** the launch words, or the Task's title and description. A Child Run, such as the Review or Shepherd a Build calls, is held instead to doing the work its parent's call input asks for and reporting the result in its Output, naming the parent's Task.
|
|
480
|
+
- **Done when:** the Task's Acceptance Criteria. A Child Run has none: its parent's evidence settles them.
|
|
479
481
|
- **Constraints:** see below.
|
|
480
482
|
|
|
481
483
|
Each agent Step's brief states the Intent. While the Run is going, its Delivery Owner amends it on the Run page or with:
|
|
@@ -522,7 +524,7 @@ kitman run drift <run> --dismiss <constraint> --reason "fixtures, not released m
|
|
|
522
524
|
path: "loop-operations#alignment",
|
|
523
525
|
level: 2,
|
|
524
526
|
link: "https://kitman.sh/knowledge/docs/loop-operations#alignment",
|
|
525
|
-
text: "## Alignment\n\nWhen a Run completes, Kitman checks its rules on the last change and runs one final Judgement of the goal, each done-when item and each constraint. The Run's Alignment is one of three values:\n\n- `aligned`: every rule passes, every semantic constraint holds on untruncated evidence, everything is met, and no report is open.\n- `not_aligned`: a `block` report is open or something is not met.\n- `unverified`: anything else.\n\nA top-level Run that is not aligned goes to Needs you and tells its owner once. `kitman run show`, the Run page and its card in My Teams show the Alignment.\n\nThe final Judgement runs after the Run completes, so its Step does not change whether the Run shows as succeeded or partial. Only the Alignment it sets counts. When the Runner running it is full and another Run's work waits for it, the Judgement gives up its slot, is skipped, and the Run's Alignment is `unverified`."
|
|
527
|
+
text: "## Alignment\n\nWhen a Run completes, Kitman checks its rules on the last change and runs one final Judgement of the goal, each done-when item and each constraint. The judge sees the last agent Step's evidence and the Run's own Output, and for a Child Run the input its parent called it with. The Run's Alignment is one of three values:\n\n- `aligned`: every rule passes, every semantic constraint holds on untruncated evidence, everything is met, and no report is open.\n- `not_aligned`: a `block` report is open or something is not met.\n- `unverified`: anything else.\n\nA top-level Run that is not aligned goes to Needs you and tells its owner once. `kitman run show`, the Run page and its card in My Teams show the Alignment.\n\nThe final Judgement runs after the Run completes, so its Step does not change whether the Run shows as succeeded or partial. Only the Alignment it sets counts. When the Runner running it is full and another Run's work waits for it, the Judgement gives up its slot, is skipped, and the Run's Alignment is `unverified`."
|
|
526
528
|
},
|
|
527
529
|
{
|
|
528
530
|
title: "Loop Operations Guide \u203A Tokens",
|
|
@@ -701,7 +703,7 @@ Runners execute StepAttempts in user-controlled environments. A runner advertise
|
|
|
701
703
|
path: "runner-operations#herdr-core",
|
|
702
704
|
level: 3,
|
|
703
705
|
link: "https://kitman.sh/knowledge/docs/runner-operations#herdr-core",
|
|
704
|
-
text: "### herdr-core\n\nYour Runner runs each agent Step in a [herdr-core](https://herdr.dev) terminal, which pairing installs when `herdr-core` is missing. A personal Runner uses your own herdr-core, so `hc ls` lists its agents next to your terminals and `hc attach <terminal>` lets you watch one and type into it; `hc ls --label kitman.runner=<runner-id>` lists only that Runner's. If you run herdr-app, each Run is a space and each Step a tab in it. A shared Runner uses a herdr-core session of its own, so its agents never appear among your terminals.\n\nWhen a Step ends, your Runner stops every process its agent started, including one it detached into a session of its own, such as a test that launched another `claude`. A process it cannot stop shows as the `processes_unreaped` Runner Problem with the command that stops it. Where your Runner cannot hold every process an agent starts, on `host` without a systemd user manager or on srt outside Linux, it shows the `processes_uncontained` Runner Problem and how to fix it.\n\nWhen Kitman serves a stable release newer than your Runner's, your Runner installs it and restarts on it by itself. It first stops claiming and lets its running work finish, for up to 30 minutes, and any Step still running then goes back to Kitman for another Runner. Release candidates and dev builds are never installed this way. A Runner in a container cannot update itself, so it shows the `update_required` Runner Problem with the release to run its image with, and keeps working on its current version.\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\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."
|
|
706
|
+
text: "### herdr-core\n\nYour Runner runs each agent Step in a [herdr-core](https://herdr.dev) terminal, which pairing installs when `herdr-core` is missing. A personal Runner uses your own herdr-core, so `hc ls` lists its agents next to your terminals and `hc attach <terminal>` lets you watch one and type into it; `hc ls --label kitman.runner=<runner-id>` lists only that Runner's. If you run herdr-app, each Run is a space and each Step a tab in it. A shared Runner uses a herdr-core session of its own, so its agents never appear among your terminals.\n\nWhen a Step ends, your Runner stops every process its agent started, including one it detached into a session of its own, such as a test that launched another `claude`. A process it cannot stop shows as the `processes_unreaped` Runner Problem with the command that stops it. Where your Runner cannot hold every process an agent starts, on `host` without a systemd user manager or on srt outside Linux, it shows the `processes_uncontained` Runner Problem and how to fix it.\n\nWhen Kitman serves a stable release newer than your Runner's, your Runner installs it and restarts on it by itself. It first stops claiming and lets its running work finish, for up to 30 minutes, and any Step still running then goes back to Kitman for another Runner. Release candidates and dev builds are never installed this way. A Runner in a container cannot update itself, so it shows the `update_required` Runner Problem with the release to run its image with, and keeps working on its current version.\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."
|
|
705
707
|
},
|
|
706
708
|
{
|
|
707
709
|
title: "Runner Operations Guide \u203A Harnesses",
|
|
@@ -1442,7 +1444,7 @@ var pathOfLink = (link) => {
|
|
|
1442
1444
|
return page === null ? link : page[1] || "index";
|
|
1443
1445
|
};
|
|
1444
1446
|
var UnpinnedSdkLink = "https://cdn.jsdelivr.net/npm/@kitman-sh/sdk/";
|
|
1445
|
-
var pinnedLink2 = (link, version = "0.12.0-rc.
|
|
1447
|
+
var pinnedLink2 = (link, version = "0.12.0-rc.3") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
|
|
1446
1448
|
var pageOf = (path) => path.split("#")[0];
|
|
1447
1449
|
var exportName = (section) => section.path.startsWith("sdk/") ? section.path.split("#")[1] ?? "" : "";
|
|
1448
1450
|
function excerpt(text, queryTerms) {
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
FileSystem,
|
|
4
|
-
Path,
|
|
5
|
-
optionalEnv
|
|
6
|
-
} from "./chunk-0b93nv6j.js";
|
|
7
2
|
import {
|
|
8
3
|
Reference,
|
|
9
4
|
TaggedError,
|
|
@@ -33,14 +28,20 @@ import {
|
|
|
33
28
|
isJsonObject,
|
|
34
29
|
isString
|
|
35
30
|
} from "./chunk-c6rbt85q.js";
|
|
31
|
+
import {
|
|
32
|
+
FileSystem,
|
|
33
|
+
Path,
|
|
34
|
+
optionalEnv,
|
|
35
|
+
tempDirectoryScoped
|
|
36
|
+
} from "./chunk-gspfm7qh.js";
|
|
36
37
|
import {
|
|
37
38
|
AgentHarnessIds,
|
|
38
39
|
sha2562,
|
|
39
40
|
runCommand2
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-dymepetx.js";
|
|
41
42
|
import {
|
|
42
43
|
NpmRegistry
|
|
43
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-e7e120qw.js";
|
|
44
45
|
|
|
45
46
|
// packages/agent-runtime/src/config-convergence.ts
|
|
46
47
|
var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
|
|
@@ -1234,7 +1235,7 @@ var writeSkill = (plan, operation) => gen(function* () {
|
|
|
1234
1235
|
var checkoutGitTree = (url, ref) => gen(function* () {
|
|
1235
1236
|
const fs = yield* FileSystem;
|
|
1236
1237
|
const path = yield* Path;
|
|
1237
|
-
const scratch = yield* fs
|
|
1238
|
+
const scratch = yield* tempDirectoryScoped(fs, { prefix: "kitman-git-" });
|
|
1238
1239
|
const repository = path.join(scratch, "repository");
|
|
1239
1240
|
const tree = path.join(scratch, "tree");
|
|
1240
1241
|
const git = (...args) => runCommand2("git", ["--git-dir", repository, ...args]);
|
|
@@ -7,46 +7,6 @@ import {
|
|
|
7
7
|
isJsonObject,
|
|
8
8
|
isString
|
|
9
9
|
} from "./chunk-c6rbt85q.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-0b93nv6j.js";
|
|
50
10
|
import {
|
|
51
11
|
pipeArguments,
|
|
52
12
|
dual,
|
|
@@ -288,7 +248,48 @@ import {
|
|
|
288
248
|
installCommand,
|
|
289
249
|
checkServicesFile,
|
|
290
250
|
checkServices
|
|
291
|
-
} from "./chunk-
|
|
251
|
+
} from "./chunk-dymepetx.js";
|
|
252
|
+
import {
|
|
253
|
+
join,
|
|
254
|
+
interrupt,
|
|
255
|
+
unbounded,
|
|
256
|
+
publishUnsafe,
|
|
257
|
+
unbounded2,
|
|
258
|
+
offer,
|
|
259
|
+
makeUnsafe3,
|
|
260
|
+
make11,
|
|
261
|
+
fromQueue,
|
|
262
|
+
fromPubSub,
|
|
263
|
+
map2,
|
|
264
|
+
filter,
|
|
265
|
+
decodeText,
|
|
266
|
+
encodeText,
|
|
267
|
+
splitLines,
|
|
268
|
+
run,
|
|
269
|
+
runHead,
|
|
270
|
+
runForEach,
|
|
271
|
+
FileSystem,
|
|
272
|
+
Path,
|
|
273
|
+
embeddedFile,
|
|
274
|
+
extractEmbeddedFile,
|
|
275
|
+
optionalEnv,
|
|
276
|
+
operatorConfigHome,
|
|
277
|
+
tempDirectoryScoped,
|
|
278
|
+
harnessesUnsupportedInSrt2,
|
|
279
|
+
compiled2,
|
|
280
|
+
pinnedSrtCommand2,
|
|
281
|
+
pinnedSrtStepCommand2,
|
|
282
|
+
runSrtCli2,
|
|
283
|
+
kitmanCacheDirectory2,
|
|
284
|
+
srtSettings2,
|
|
285
|
+
srtCacheEnvironment2,
|
|
286
|
+
srtInheritedEnv2,
|
|
287
|
+
inheritedEnvironment2,
|
|
288
|
+
withOnlyEnvironment2,
|
|
289
|
+
writeSrtSettings2,
|
|
290
|
+
srtStepArgv2,
|
|
291
|
+
srtArgv2
|
|
292
|
+
} from "./chunk-gspfm7qh.js";
|
|
292
293
|
import {
|
|
293
294
|
writeAgentEnvironmentConfigFile2,
|
|
294
295
|
readManifestSkillPaths2,
|
|
@@ -304,8 +305,8 @@ import {
|
|
|
304
305
|
applyAgentEnvironmentMaterialization2,
|
|
305
306
|
isPathWithin2,
|
|
306
307
|
skillIdentity2
|
|
307
|
-
} from "./chunk-
|
|
308
|
-
import"./chunk-
|
|
308
|
+
} from "./chunk-trb9325k.js";
|
|
309
|
+
import"./chunk-e7e120qw.js";
|
|
309
310
|
import {
|
|
310
311
|
egressAllowed,
|
|
311
312
|
writeSecretRegistry,
|
|
@@ -323,23 +324,23 @@ import {
|
|
|
323
324
|
decodedOption2,
|
|
324
325
|
decoded2,
|
|
325
326
|
readOpencode2
|
|
326
|
-
} from "./chunk-
|
|
327
|
+
} from "./chunk-56knbdt6.js";
|
|
327
328
|
import {
|
|
328
329
|
uploadRunFile,
|
|
329
330
|
programLease,
|
|
330
331
|
rpcRunFiles,
|
|
331
332
|
programHostsEnv,
|
|
332
333
|
undeclaredHostsEnv
|
|
333
|
-
} from "./chunk-
|
|
334
|
-
import"./chunk-
|
|
334
|
+
} from "./chunk-8ez1s9cr.js";
|
|
335
|
+
import"./chunk-y8sscyvt.js";
|
|
335
336
|
import {
|
|
336
337
|
nextInt
|
|
337
338
|
} from "./chunk-nzjb36ad.js";
|
|
338
339
|
import {
|
|
339
340
|
ChildProcessSpawner,
|
|
340
341
|
make3
|
|
341
|
-
} from "./chunk-
|
|
342
|
-
import"./chunk-
|
|
342
|
+
} from "./chunk-xwya1er0.js";
|
|
343
|
+
import"./chunk-794hjysw.js";
|
|
343
344
|
|
|
344
345
|
// packages/core/src/sync-kit.ts
|
|
345
346
|
import { createHash } from "crypto";
|
|
@@ -2367,7 +2368,7 @@ var openCodeExpiry = (credentials, provider) => renewableLogin(provider, credent
|
|
|
2367
2368
|
var replaceStored = (binary, source, store, stored, value) => gen(function* () {
|
|
2368
2369
|
const fs = yield* FileSystem;
|
|
2369
2370
|
const path = yield* Path;
|
|
2370
|
-
const directory = yield* fs
|
|
2371
|
+
const directory = yield* tempDirectoryScoped(fs, {
|
|
2371
2372
|
directory: path.dirname(source),
|
|
2372
2373
|
prefix: "kitman-opencode-renewal-"
|
|
2373
2374
|
});
|
|
@@ -2539,7 +2540,7 @@ var prepareHarness = (input) => gen(function* () {
|
|
|
2539
2540
|
const fs = yield* FileSystem;
|
|
2540
2541
|
const model = input.agent.brief.model ?? input.attempt.attempt.execution.metadata.model;
|
|
2541
2542
|
const effort = input.agent.brief.effort;
|
|
2542
|
-
const configDir = input.agent.session?.configDir ?? (yield* fs
|
|
2543
|
+
const configDir = input.agent.session?.configDir ?? (yield* tempDirectoryScoped(fs, { prefix: "kitman-harness-" }).pipe(orDie));
|
|
2543
2544
|
const fitting = kitSetup === undefined ? [] : yield* fittingSkills(input.workspace, kitSetup.fitRules);
|
|
2544
2545
|
const mcp = {
|
|
2545
2546
|
...input.agent.kitmanMcp,
|
|
@@ -2793,7 +2794,7 @@ var stepLogin = (login, reference) => map8(loginCredentials(login), (credentials
|
|
|
2793
2794
|
var renewableStepLogin = (login, referenced, http) => gen(function* () {
|
|
2794
2795
|
const fs = yield* FileSystem;
|
|
2795
2796
|
const path = yield* Path;
|
|
2796
|
-
const directory = yield* fs
|
|
2797
|
+
const directory = yield* tempDirectoryScoped(fs, { prefix: "kitman-login-" });
|
|
2797
2798
|
const file = path.join(directory, path.basename(login.source));
|
|
2798
2799
|
const expired = new Map;
|
|
2799
2800
|
let published;
|
|
@@ -4579,6 +4580,7 @@ var boundChange = (change) => {
|
|
|
4579
4580
|
truncated: omittedPaths > 0 || changedPaths.length > files.length || files.some((file) => file.truncated)
|
|
4580
4581
|
};
|
|
4581
4582
|
};
|
|
4583
|
+
var outputLength = outputLines * EvidenceLimits.lineLength;
|
|
4582
4584
|
var DriftStatus = Literals(["open", "correction_sent", "escalated", "verified", "dismissed"]);
|
|
4583
4585
|
var DriftActor = Struct({ actorType: String4, actorId: String4 });
|
|
4584
4586
|
var DriftResolution = Struct({
|
|
@@ -6231,7 +6233,7 @@ var stepAttempt = (input, resending) => (work) => gen(function* () {
|
|
|
6231
6233
|
if (merge?.clean === "up_to_date" && work.branch !== undefined)
|
|
6232
6234
|
return yield* deliver(work.branch);
|
|
6233
6235
|
const notes = [...work.resumeNotes ?? [], ...merge === undefined ? [] : [merge.note]];
|
|
6234
|
-
const configDir = yield* (yield* FileSystem
|
|
6236
|
+
const configDir = yield* tempDirectoryScoped(yield* FileSystem, { prefix: "kitman-harness-" }).pipe(orDie);
|
|
6235
6237
|
const backend = work.sandbox ?? (isFunction2(input.sandbox) ? input.sandbox(work) : input.sandbox);
|
|
6236
6238
|
const writableSessions = adapter === undefined ? undefined : worktreeSessionDirectory(adapter, home, worktree);
|
|
6237
6239
|
if (backend === "srt" && writableSessions !== undefined)
|
|
@@ -6533,7 +6535,7 @@ var runSandboxCommand = (input) => scoped(gen(function* () {
|
|
|
6533
6535
|
...command.onOutput === undefined ? undefined : { onOutput: command.onOutput }
|
|
6534
6536
|
});
|
|
6535
6537
|
}
|
|
6536
|
-
const configDir = yield* (yield* FileSystem
|
|
6538
|
+
const configDir = yield* tempDirectoryScoped(yield* FileSystem, { prefix: "kitman-sandbox-" });
|
|
6537
6539
|
const { container } = yield* startDockerSandbox({
|
|
6538
6540
|
docker: input.docker,
|
|
6539
6541
|
runnerId: input.runnerId,
|
|
@@ -6583,7 +6585,7 @@ var harnessesInSrt = (input) => gen(function* () {
|
|
|
6583
6585
|
const fs = yield* FileSystem;
|
|
6584
6586
|
const inherited = yield* inheritedEnvironment2(srtInheritedEnv2);
|
|
6585
6587
|
const starts = (harness, binary) => scoped(gen(function* () {
|
|
6586
|
-
const configDir = yield* fs
|
|
6588
|
+
const configDir = yield* tempDirectoryScoped(fs, { prefix: "kitman-harness-probe-" });
|
|
6587
6589
|
const policy = {
|
|
6588
6590
|
...runnerStateSandboxPolicy(input.runner, [...harnessAdapter(harness)?.loginFiles ?? [], configDir]),
|
|
6589
6591
|
writablePaths: [configDir],
|
|
@@ -6630,7 +6632,6 @@ var harnessesInSrt = (input) => gen(function* () {
|
|
|
6630
6632
|
});
|
|
6631
6633
|
// packages/agent-runtime/src/loopback-tunnel.ts
|
|
6632
6634
|
import * as net from "net";
|
|
6633
|
-
|
|
6634
6635
|
class LoopbackTunnelUnavailable extends TaggedError("LoopbackTunnelUnavailable") {
|
|
6635
6636
|
}
|
|
6636
6637
|
var srtLoopbackTunnel = (tunnel) => [
|
|
@@ -6666,7 +6667,7 @@ var srtLoopbackTunnel = (tunnel) => [
|
|
|
6666
6667
|
`);
|
|
6667
6668
|
var loopbackSocketForwarder = (hostPort, socket) => gen(function* () {
|
|
6668
6669
|
const fs = yield* FileSystem;
|
|
6669
|
-
const dir = yield* flatMap3(fs
|
|
6670
|
+
const dir = yield* flatMap3(tempDirectoryScoped(fs, { prefix: "kitman-lo-" }), fs.realPath).pipe(mapError2((error) => new LoopbackTunnelUnavailable({ reason: error.message })));
|
|
6670
6671
|
yield* acquireRelease(callback3((resume) => {
|
|
6671
6672
|
const open = new Set;
|
|
6672
6673
|
const server = net.createServer({ allowHalfOpen: true }, (client) => {
|
|
@@ -7261,7 +7262,7 @@ var programProcessExecutor = (input) => (work) => gen(function* () {
|
|
|
7261
7262
|
}));
|
|
7262
7263
|
return yield* handle.exitCode;
|
|
7263
7264
|
}) : yield* gen(function* () {
|
|
7264
|
-
const tmp = yield* (yield* FileSystem
|
|
7265
|
+
const tmp = yield* tempDirectoryScoped(yield* FileSystem, { prefix: "kitman-program-" });
|
|
7265
7266
|
const policy = {
|
|
7266
7267
|
...runnerStateSandboxPolicy(sandbox.runner, [file]),
|
|
7267
7268
|
writablePaths: [tmp],
|
|
@@ -7652,7 +7653,7 @@ var pipelineDaemon = (services, check) => gen(function* () {
|
|
|
7652
7653
|
});
|
|
7653
7654
|
const fs = yield* FileSystem;
|
|
7654
7655
|
const started = yield* services.docker({ id: services.id, network: services.network }).pipe(mapError2((error) => new ServicesUnavailable({ reason: error.message })));
|
|
7655
|
-
const clientDir = yield* fs
|
|
7656
|
+
const clientDir = yield* tempDirectoryScoped(fs, { prefix: "kitman-check-docker-" });
|
|
7656
7657
|
yield* fs.makeDirectory(`${clientDir}/docker`);
|
|
7657
7658
|
yield* fs.makeDirectory(`${clientDir}/gitlab-ci-local-home`);
|
|
7658
7659
|
yield* fs.writeFileString(`${clientDir}/docker/config.json`, encodeUnknownJsonStringSync(checkDockerClientConfig(started.proxy)));
|
|
@@ -7686,7 +7687,7 @@ var reachCheckPostgres = (postgres, services, worktree, run) => gen(function* ()
|
|
|
7686
7687
|
socketDir: yield* postgresSocketForwarder(postgres.hostPort).pipe(mapError2((error) => new ServicesUnavailable({ reason: error.message })))
|
|
7687
7688
|
};
|
|
7688
7689
|
const fs = yield* FileSystem;
|
|
7689
|
-
const filesDir = yield* fs
|
|
7690
|
+
const filesDir = yield* tempDirectoryScoped(fs, { prefix: "kitman-check-files-" });
|
|
7690
7691
|
const reached = yield* run({ command: ":", cwd: worktree, filesDir, postgres });
|
|
7691
7692
|
if (reached.exitCode !== 0)
|
|
7692
7693
|
return yield* new ServicesUnavailable({
|
|
@@ -7797,7 +7798,7 @@ var installIn = (worktree, run) => gen(function* () {
|
|
|
7797
7798
|
const install = installCommand(yield* files.readDirectory(worktree));
|
|
7798
7799
|
if (install === undefined)
|
|
7799
7800
|
return;
|
|
7800
|
-
const filesDir = yield* files
|
|
7801
|
+
const filesDir = yield* tempDirectoryScoped(files, { prefix: "kitman-check-files-" });
|
|
7801
7802
|
const installWith = (command) => gen(function* () {
|
|
7802
7803
|
const installed = yield* run({ command, cwd: worktree, filesDir });
|
|
7803
7804
|
if (installed.exitCode !== 0)
|
|
@@ -7822,8 +7823,8 @@ var runChecks = (worktree, checks, tree, known, run, keeper, services) => gen(fu
|
|
|
7822
7823
|
return yield* forEach(due, (check) => gen(function* () {
|
|
7823
7824
|
const fs = yield* FileSystem;
|
|
7824
7825
|
const startedAt = yield* currentTimeMillis;
|
|
7825
|
-
const filesDir = yield* fs
|
|
7826
|
-
const output = path.join(yield* fs
|
|
7826
|
+
const filesDir = yield* tempDirectoryScoped(fs, { prefix: "kitman-check-files-" });
|
|
7827
|
+
const output = path.join(yield* tempDirectoryScoped(fs, { prefix: "kitman-check-output-" }), "output");
|
|
7827
7828
|
const sink = keeper === undefined ? undefined : yield* fs.open(output, { flag: "w" });
|
|
7828
7829
|
const docker = check.pipeline === true ? yield* pipelineDaemon(services, check.name) : undefined;
|
|
7829
7830
|
const ran = yield* run({
|
|
@@ -7886,7 +7887,7 @@ var sampleMetrics = (output) => {
|
|
|
7886
7887
|
var measureRevisions = (work, measure, checkouts, runIn) => gen(function* () {
|
|
7887
7888
|
const fs = yield* FileSystem;
|
|
7888
7889
|
const path = yield* Path;
|
|
7889
|
-
const filesDir = yield* fs
|
|
7890
|
+
const filesDir = yield* tempDirectoryScoped(fs, { prefix: "kitman-measure-files-" });
|
|
7890
7891
|
const head = yield* checkouts.checkout({ runId: work.runId, id: work.id, baseRevision: work.revision }, work.repoBinding);
|
|
7891
7892
|
const base = yield* checkouts.checkout({ runId: work.runId, id: `${work.id}-base`, baseRevision: measure.base }, work.repoBinding);
|
|
7892
7893
|
const call = (checkout, command) => runIn(checkout)({ command, cwd: path.join(checkout, measure.plan.workingDirectory ?? "."), filesDir });
|
|
@@ -7935,7 +7936,7 @@ var measureRevisions = (work, measure, checkouts, runIn) => gen(function* () {
|
|
|
7935
7936
|
var ownRepository = (worktree, clone, targetBranch) => gen(function* () {
|
|
7936
7937
|
const fs = yield* FileSystem;
|
|
7937
7938
|
const path = yield* Path;
|
|
7938
|
-
const scratch = yield* fs
|
|
7939
|
+
const scratch = yield* tempDirectoryScoped(fs, {
|
|
7939
7940
|
directory: path.dirname(worktree),
|
|
7940
7941
|
prefix: "kitman-check-git-"
|
|
7941
7942
|
});
|
|
@@ -7995,7 +7996,7 @@ var verificationExecutor = (input) => (work) => gen(function* () {
|
|
|
7995
7996
|
status: "failed",
|
|
7996
7997
|
failureSummary: "A shared Runner runs verifications only in `srt` or `docker`."
|
|
7997
7998
|
};
|
|
7998
|
-
const cache = yield* (yield* FileSystem
|
|
7999
|
+
const cache = yield* tempDirectoryScoped(yield* FileSystem, { prefix: "kitman-verify-cache-" });
|
|
7999
8000
|
const runIn = checkRunner(work, input.sandbox, cache, yield* inheritedEnvironment2(srtInheritedEnv2));
|
|
8000
8001
|
const checkouts = runCheckouts(input.rootDir, input.gitCredentials);
|
|
8001
8002
|
if (work.resolve !== undefined)
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
FileSystem,
|
|
4
|
-
Path
|
|
5
|
-
} from "./chunk-0b93nv6j.js";
|
|
6
2
|
import {
|
|
7
3
|
isObject2,
|
|
8
4
|
isUint8Array,
|
|
@@ -21,21 +17,25 @@ import"./chunk-0qz10ek8.js";
|
|
|
21
17
|
import {
|
|
22
18
|
isJsonObject
|
|
23
19
|
} from "./chunk-c6rbt85q.js";
|
|
20
|
+
import {
|
|
21
|
+
FileSystem,
|
|
22
|
+
Path
|
|
23
|
+
} from "./chunk-gspfm7qh.js";
|
|
24
24
|
import {
|
|
25
25
|
tomlTableHeader2,
|
|
26
26
|
tomlKeyPath2,
|
|
27
27
|
kitmanSkillEntry,
|
|
28
28
|
isPathWithin2
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-trb9325k.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-dymepetx.js";
|
|
37
|
+
import"./chunk-e7e120qw.js";
|
|
38
|
+
import"./chunk-xwya1er0.js";
|
|
39
39
|
|
|
40
40
|
// packages/agent-runtime/src/kit-setup-sync.ts
|
|
41
41
|
class KitSyncError extends TaggedError("KitSyncError") {
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-vtfwjhzh.js";
|
|
10
10
|
import {
|
|
11
11
|
runForEach
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-gspfm7qh.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-dymepetx.js";
|
|
23
23
|
import {
|
|
24
24
|
layerJson,
|
|
25
25
|
make4,
|
|
26
26
|
withHeaders,
|
|
27
27
|
layerProtocolSocket
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-794hjysw.js";
|
|
29
29
|
|
|
30
30
|
// packages/live/src/rpc/runner-client.ts
|
|
31
31
|
var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
|
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-ewhzaqp3.js");
|
|
9
9
|
await runSrtCli();
|
|
10
10
|
} else if (args[0] === "srt-step") {
|
|
11
11
|
const { runSrtStep } = await import("./chunk-z450wa10.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-0346hwh6.js");
|
|
15
15
|
runOpencodeReader();
|
|
16
16
|
} else {
|
|
17
|
-
const { runCli } = await import("./chunk-
|
|
17
|
+
const { runCli } = await import("./chunk-h6hd61dn.js");
|
|
18
18
|
runCli(args);
|
|
19
19
|
}
|