@kitman-sh/cli 0.12.0-rc.1 → 0.12.0-rc.2

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.
@@ -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,19 @@ import {
33
28
  isJsonObject,
34
29
  isString
35
30
  } from "./chunk-c6rbt85q.js";
31
+ import {
32
+ FileSystem,
33
+ Path,
34
+ optionalEnv
35
+ } from "./chunk-3d4d52e5.js";
36
36
  import {
37
37
  AgentHarnessIds,
38
38
  sha2562,
39
39
  runCommand2
40
- } from "./chunk-dc57c8s5.js";
40
+ } from "./chunk-fhyn2b38.js";
41
41
  import {
42
42
  NpmRegistry
43
- } from "./chunk-ejhfa1t6.js";
43
+ } from "./chunk-n6hxwdm6.js";
44
44
 
45
45
  // packages/agent-runtime/src/config-convergence.ts
46
46
  var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
@@ -108,7 +108,7 @@ import {
108
108
  withDefault,
109
109
  option,
110
110
  String2
111
- } from "./chunk-0b93nv6j.js";
111
+ } from "./chunk-3d4d52e5.js";
112
112
  import {
113
113
  currentTimeMillis,
114
114
  SecureRandom,
@@ -218,7 +218,7 @@ import {
218
218
  harnessNames,
219
219
  herdrRunnerCapabilities2,
220
220
  declaredChecks
221
- } from "./chunk-dc57c8s5.js";
221
+ } from "./chunk-fhyn2b38.js";
222
222
  import {
223
223
  Id
224
224
  } from "./chunk-0qz10ek8.js";
@@ -235,7 +235,7 @@ import {
235
235
  import {
236
236
  ChildProcessSpawner,
237
237
  make3
238
- } from "./chunk-2qarscbj.js";
238
+ } from "./chunk-sk6ceghr.js";
239
239
 
240
240
  // apps/cli/src/cli-error.ts
241
241
  function cliErrorCode(error, status) {
@@ -987,10 +987,10 @@ var sandboxMissing = (sandbox, missing) => ({
987
987
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
988
988
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
989
989
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
990
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-8yyj061t.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
990
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-rzzd7zv3.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
991
991
  });
992
992
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
993
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-8yyj061t.js")), (module) => module.updateHerdrCore(options))
993
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-rzzd7zv3.js")), (module) => module.updateHerdrCore(options))
994
994
  });
995
995
  var herdrCoreMissing = (error) => {
996
996
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1410,7 +1410,7 @@ var syncTargets = (harness) => gen(function* () {
1410
1410
  });
1411
1411
  var syncKits = (input) => gen(function* () {
1412
1412
  const fs = yield* FileSystem;
1413
- const { syncKitSetup } = yield* promise(() => import("./chunk-p3jbjz2a.js"));
1413
+ const { syncKitSetup } = yield* promise(() => import("./chunk-2k08hw5q.js"));
1414
1414
  const harnesses = yield* syncTargets(input.harness);
1415
1415
  const chain = yield* input.client.getKitChain(input.workspaceId);
1416
1416
  for (const { name, problem } of chain.skipped)
@@ -2328,7 +2328,7 @@ var package_default = {
2328
2328
  };
2329
2329
 
2330
2330
  // apps/cli/src/scaffold.ts
2331
- var cliVersion = "0.12.0-rc.1";
2331
+ var cliVersion = "0.12.0-rc.2";
2332
2332
  var packageJson = (name, scaffold) => `${JSON.stringify({
2333
2333
  name,
2334
2334
  private: true,
@@ -2480,7 +2480,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
2480
2480
 
2481
2481
  // apps/cli/src/commands.ts
2482
2482
  var ClientId = "kitman-cli";
2483
- var agentRuntime = promise(() => import("./chunk-s7xcdcqx.js"));
2483
+ var agentRuntime = promise(() => import("./chunk-6pz3nsn5.js"));
2484
2484
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
2485
2485
  defaultValue: () => gen(function* () {
2486
2486
  const tui = yield* tryPromise({
@@ -3482,7 +3482,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
3482
3482
  });
3483
3483
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
3484
3484
  defaultValue: () => (options) => gen(function* () {
3485
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-82xjnghh.js"));
3485
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-emh8zw7k.js"));
3486
3486
  return yield* makeRunnerRpcClient({
3487
3487
  runnerId: options.runnerId,
3488
3488
  bearer: options.bearer,
@@ -4014,7 +4014,7 @@ function mcpCommand(args) {
4014
4014
  if (command.action === "run") {
4015
4015
  if (command.args.length > 0)
4016
4016
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
4017
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-66xhktcp.js"));
4017
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-7gnrnv4a.js"));
4018
4018
  return yield* runMcpServerCommand({ flags: command.flags });
4019
4019
  }
4020
4020
  if (command.action !== "setup")
@@ -4502,7 +4502,7 @@ function programLoopCommand(command) {
4502
4502
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
4503
4503
  });
4504
4504
  }
4505
- var docsModule = promise(() => import("./chunk-a8jgegds.js"));
4505
+ var docsModule = promise(() => import("./chunk-yfamq8xw.js"));
4506
4506
  function docsCommand(args) {
4507
4507
  return gen(function* () {
4508
4508
  const command = parseCommand(args);
@@ -4750,7 +4750,7 @@ var runShowLines = (shown) => [
4750
4750
  ...questionLines2(shown.questions.filter((question) => question.status === "open")),
4751
4751
  ...shown.artifacts.flatMap((artifact) => [`Artifact ${artifact.kind}: ${artifact.title}`, artifact.text]),
4752
4752
  ...shown.children.map((child) => `Child ${child.name}: ${child.runId} ${child.status}`),
4753
- ...shown.waiting.map((waiting) => waiting.kind === "queue" ? `Waiting for a Runner slot for ${waiting.name}: ${queueWords(waiting)}` : `Waiting on ${waiting.kind} ${waiting.name}`)
4753
+ ...shown.waiting.map((waiting) => waiting.kind === "queue" ? `${waiting.unrunnable === undefined ? "Waiting for a Runner slot for" : "Waiting for a Runner that can run"} ${waiting.name}: ${queueWords(waiting)}` : `Waiting on ${waiting.kind} ${waiting.name}`)
4754
4754
  ];
4755
4755
  var myTeamsSections = [
4756
4756
  ["needsYou", "Needs you"],
@@ -5322,9 +5322,9 @@ function changeRequestCommand(args) {
5322
5322
  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}`);
5323
5323
  });
5324
5324
  }
5325
- var KitWriter = map8(promise(() => import("./chunk-tcyqkqzj.js")), (build) => build.writeKit);
5325
+ var KitWriter = map8(promise(() => import("./chunk-4f72nbw2.js")), (build) => build.writeKit);
5326
5326
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
5327
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-tcyqkqzj.js")), (build) => build.buildKit(directory))
5327
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-4f72nbw2.js")), (build) => build.buildKit(directory))
5328
5328
  });
5329
5329
  var uploadKit = (client, workspaceId, built) => gen(function* () {
5330
5330
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -7,10 +7,10 @@ import {
7
7
  decoded2,
8
8
  readOpencode2,
9
9
  runOpencodeReader2
10
- } from "./chunk-kpfrhex3.js";
11
- import"./chunk-2qarscbj.js";
10
+ } from "./chunk-vmv7gwwr.js";
11
+ import"./chunk-sk6ceghr.js";
12
12
  import"./chunk-c6rbt85q.js";
13
- import"./chunk-0b93nv6j.js";
13
+ import"./chunk-3d4d52e5.js";
14
14
  import"./chunk-vtfwjhzh.js";
15
15
  export {
16
16
  decoded2 as decoded,
@@ -108,7 +108,7 @@ import {
108
108
  shutdownUnsafe,
109
109
  fromQueue,
110
110
  unwrap
111
- } from "./chunk-0b93nv6j.js";
111
+ } from "./chunk-3d4d52e5.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-dc57c8s5.js";
126
+ } from "./chunk-fhyn2b38.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")) {
@@ -4,12 +4,12 @@ import {
4
4
  runnerRpcUrl2,
5
5
  makeRunnerRpcClient2,
6
6
  makeProgramRpcClient2
7
- } from "./chunk-kfwp70pn.js";
8
- import"./chunk-rm3vqk5d.js";
9
- import"./chunk-dc57c8s5.js";
7
+ } from "./chunk-myqf27w2.js";
8
+ import"./chunk-db9q9y8h.js";
9
+ import"./chunk-fhyn2b38.js";
10
10
  import"./chunk-0qz10ek8.js";
11
11
  import"./chunk-c6rbt85q.js";
12
- import"./chunk-0b93nv6j.js";
12
+ import"./chunk-3d4d52e5.js";
13
13
  import"./chunk-vtfwjhzh.js";
14
14
  export {
15
15
  makeProgramRpcClient2 as makeProgramRpcClient,
@@ -253,7 +253,6 @@ import {
253
253
  import {
254
254
  map,
255
255
  makeEquivalence,
256
- toNumber,
257
256
  bytes,
258
257
  BadArgument,
259
258
  systemError,
@@ -317,7 +316,7 @@ import {
317
316
  String2,
318
317
  optionalEnv,
319
318
  harnessesUnsupportedInSrt2
320
- } from "./chunk-0b93nv6j.js";
319
+ } from "./chunk-3d4d52e5.js";
321
320
  import {
322
321
  isDateTime,
323
322
  Numeric,
@@ -358,7 +357,7 @@ import {
358
357
  make3,
359
358
  parseFdName,
360
359
  fdName
361
- } from "./chunk-2qarscbj.js";
360
+ } from "./chunk-sk6ceghr.js";
362
361
 
363
362
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Tuple.js
364
363
  var makeEquivalence3 = Tuple;
@@ -900,6 +899,15 @@ var runMain2 = /* @__PURE__ */ makeRunMain(({
900
899
  // node_modules/.bun/@effect+platform-bun@4.1.2+edf248c88a527e3e/node_modules/@effect/platform-bun/dist/BunRuntime.js
901
900
  var runMain = runMain2;
902
901
 
902
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/BigInt.js
903
+ var BigInt2 = globalThis.BigInt;
904
+ var toNumber = (b) => {
905
+ if (b > BigInt2(Number.MAX_SAFE_INTEGER) || b < BigInt2(Number.MIN_SAFE_INTEGER)) {
906
+ return none();
907
+ }
908
+ return some(Number(b));
909
+ };
910
+
903
911
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/DateTime.js
904
912
  var makeUnsafe = makeUnsafe6;
905
913
  var make18 = make4;
@@ -3206,7 +3214,7 @@ var waitingOnWords = ({ keys, hidden }) => {
3206
3214
 
3207
3215
  // packages/core/src/run-queue.ts
3208
3216
  var ClaimRanks = ["in_progress", "finishing", "new"];
3209
- var queueWords = (place) => `#${place.position} in the queue, ${place.reason}`;
3217
+ var queueWords = (place) => place.unrunnable === undefined ? `#${place.position} in the queue, ${place.reason}` : `no online Runner can run it: ${place.unrunnable}`;
3210
3218
  // packages/core/src/redaction.ts
3211
3219
  var DurableSurfaceContractVersion = "durable-redaction.v1";
3212
3220
  var EvidenceRefContractVersion = "evidence-ref.v1";
@@ -3373,8 +3381,23 @@ var LOCAL_PATH_KEYS = new Set([
3373
3381
  "docker_socket",
3374
3382
  "ssh_agent_socket"
3375
3383
  ]);
3376
- var wrappedValue = String.raw`<[A-Za-z][A-Za-z0-9 _.-]*>|\$\{[^{}\s]*\}|\{\{[^{}]*\}\}|proxy-ep=[A-Za-z0-9.-]+;kitmanref(?:[0-9a-f]{2})+(?![A-Za-z0-9._~+/-])`;
3384
+ var wrappedValue = String.raw`<[A-Za-z][A-Za-z0-9 _.|-]*>|\$\{[^{}\s]*\}|\{\{[^{}]*\}\}|proxy-ep=[A-Za-z0-9.-]+;kitmanref(?:[0-9a-f]{2})+(?![A-Za-z0-9._~+/-])`;
3385
+ var placeholderWord = "(?:[A-Z]?[a-z]+|[A-Z]+)";
3386
+ var placeholderNamePart = `(?:[A-Z]?[a-z]+|[A-Z]+)(?:[A-Z][a-z]+)*[0-9]{0,4}`;
3387
+ var anglePlaceholder = `<${placeholderWord}[0-9]{0,2}(?:[ _.|-]${placeholderWord}[0-9]{0,2})*>`;
3388
+ var secretReferencePart = String.raw`(?:[A-Za-z0-9_.-]+|${anglePlaceholder}|\$\{[A-Za-z_][A-Za-z0-9_]*\}|\{\{\s*[A-Za-z_][A-Za-z0-9_.]*\s*\}\}|\*|\u2026)`;
3389
+ var describedSecretReference = new RegExp(`^secret://${secretReferencePart}/(?:${secretReferencePart})?$`, "u");
3377
3390
  var secretReferenceTail = String.raw`(?<=secret:)\/\/[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+(?![^\s,;}"')\]\x60])`;
3391
+ var referenceInText = new RegExp(String.raw`secret:\/\/${secretReferencePart}\/${secretReferencePart}(?![^\s,;}"')\]\x60])`, "gu");
3392
+ function inSecretReference(text, start, end) {
3393
+ for (const reference of text.matchAll(referenceInText)) {
3394
+ const referenceEnd = reference.index + reference[0].length;
3395
+ if (reference.index <= start && end <= referenceEnd)
3396
+ return isPlaceholder(unwrapped(reference[0]));
3397
+ }
3398
+ return false;
3399
+ }
3400
+ var placeholderTokenName = new RegExp(`^<?(?:ghp_|github_pat_|glpat-|ksa1\\.|sk-|xox[baprs]-)${placeholderNamePart}(?:[_.-]${placeholderNamePart})*>?$`, "u");
3378
3401
  var bearerValue = /[0-9]|[._~+/:-][A-Za-z0-9]|[<{]/u;
3379
3402
  var VALUE_RULES = [
3380
3403
  { classification: "secret", name: "private-key", pattern: /-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/u },
@@ -3388,7 +3411,7 @@ var VALUE_RULES = [
3388
3411
  classification: "credential",
3389
3412
  name: "provider-token",
3390
3413
  pattern: /(?:^|[^A-Za-z0-9])(?<value><?(?:ghp_|github_pat_|glpat-|ksa1\.|sk-[A-Za-z0-9_-]{8,}|xox[baprs]-)[A-Za-z0-9._*-]*[A-Za-z0-9_*-]>?)/u,
3391
- holds: (value) => !isPlaceholder(value)
3414
+ holds: (value, _matched, text, start) => !isPlaceholder(value) && !(placeholderTokenName.test(value) && inSecretReference(text, start, start + value.length))
3392
3415
  },
3393
3416
  {
3394
3417
  classification: "credential",
@@ -3419,10 +3442,10 @@ var VALUE_RULES = [
3419
3442
  { classification: "transcript", name: "transcript-content", pattern: /(?:^|\n)\s*(?:user|assistant|system)\s*:/iu }
3420
3443
  ];
3421
3444
  var maskedToken = /^(?:ghp_|github_pat_|glpat-|ksa1\.|xox[baprs]-|sk-(?:ant-(?:[a-z]+[0-9]*-)?|proj-|or-v[0-9]+-)?)(?:x{4,}|X{4,}|\*{4,})$/u;
3422
- var placeholderWord = "(?:[A-Z]?[a-z]+|[A-Z]+)";
3423
3445
  var placeholders = [
3424
3446
  maskedToken,
3425
- new RegExp(`^<${placeholderWord}[0-9]{0,2}(?:[ _.-]${placeholderWord}[0-9]{0,2})*>$`, "u"),
3447
+ new RegExp(`^${anglePlaceholder}$`, "u"),
3448
+ describedSecretReference,
3426
3449
  /^\$\{[A-Za-z_][A-Za-z0-9_]*\}$/u,
3427
3450
  /^\$[A-Za-z_][A-Za-z0-9_]*$/u,
3428
3451
  /^\{\{\s*[A-Za-z_][A-Za-z0-9_.]*\s*\}\}$/u,
@@ -3439,14 +3462,16 @@ function looksLikeCredential(raw, matched) {
3439
3462
  const value = unwrapped(raw);
3440
3463
  if (isPlaceholder(raw) || isPlaceholder(value))
3441
3464
  return false;
3465
+ if (matched === `secret:${raw}` && isPlaceholder(`secret:${value}`))
3466
+ return false;
3442
3467
  return /^[^\s:=]+=\S/u.test(matched) || value.length >= 6 && /[0-9]/u.test(value) || value.length >= 20 && /[a-z]/u.test(value) && /[A-Z]/u.test(value);
3443
3468
  }
3444
3469
  function ruleMatch(rule, text) {
3445
3470
  for (const match of text.matchAll(globalPattern(rule))) {
3446
3471
  const value = match.groups?.value ?? match[0];
3447
- if (rule.holds !== undefined && !rule.holds(value, match[0]))
3448
- continue;
3449
3472
  const start = match.index + (match.groups?.value === undefined ? 0 : match[0].lastIndexOf(value));
3473
+ if (rule.holds !== undefined && !rule.holds(value, match[0], text, start))
3474
+ continue;
3450
3475
  return { classification: rule.classification, rule: rule.name, span: { start, end: start + value.length } };
3451
3476
  }
3452
3477
  return;
@@ -3462,8 +3487,11 @@ var globalPattern = (rule) => {
3462
3487
  };
3463
3488
  var redactedBy = (text, rule) => text.replace(globalPattern(rule), (matched, ...rest) => {
3464
3489
  const groups = rest.at(-1);
3465
- const value = isObject(groups) && groups !== null && "value" in groups ? groups.value : undefined;
3466
- return rule.holds === undefined || rule.holds(isString(value) ? value : matched, matched) ? `[REDACTED:${rule.classification}]` : matched;
3490
+ const offset = isObject(groups) ? rest.at(-3) : rest.at(-2);
3491
+ const named = isObject(groups) && groups !== null && "value" in groups ? groups.value : undefined;
3492
+ const value = isString(named) ? named : matched;
3493
+ const start = (isNumber(offset) ? offset : 0) + matched.lastIndexOf(value);
3494
+ return rule.holds === undefined || rule.holds(value, matched, text, start) ? `[REDACTED:${rule.classification}]` : matched;
3467
3495
  });
3468
3496
  var runnerSecretReference = /^runner-secret:[A-Z0-9_]+:(?:env|file|exec)$/u;
3469
3497
  var credentialUrlRule = {
@@ -6089,7 +6117,8 @@ var RunWaiting = Union([
6089
6117
  rank: Literals(ClaimRanks),
6090
6118
  position: Int.check(isGreaterThanOrEqualTo(1)),
6091
6119
  reason: String4,
6092
- movesUpAt: optionalKey(String4)
6120
+ movesUpAt: optionalKey(String4),
6121
+ unrunnable: optionalKey(String4)
6093
6122
  })
6094
6123
  ]);
6095
6124
  var RunEvidence = Struct({
@@ -474,8 +474,8 @@ Agents should record implementation evidence, verification, and delivery artifac
474
474
 
475
475
  Every Run is held to an Intent, seeded when Kitman admits it:
476
476
 
477
- - **Goal:** the launch words, or the Task's title and description.
478
- - **Done when:** the Task's Acceptance Criteria.
477
+ - **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.
478
+ - **Done when:** the Task's Acceptance Criteria. A Child Run has none: its parent's evidence settles them.
479
479
  - **Constraints:** see below.
480
480
 
481
481
  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 +522,7 @@ kitman run drift <run> --dismiss <constraint> --reason "fixtures, not released m
522
522
  path: "loop-operations#alignment",
523
523
  level: 2,
524
524
  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`."
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 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
526
  },
527
527
  {
528
528
  title: "Loop Operations Guide \u203A Tokens",
@@ -701,7 +701,7 @@ Runners execute StepAttempts in user-controlled environments. A runner advertise
701
701
  path: "runner-operations#herdr-core",
702
702
  level: 3,
703
703
  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."
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\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
705
  },
706
706
  {
707
707
  title: "Runner Operations Guide \u203A Harnesses",
@@ -1442,7 +1442,7 @@ var pathOfLink = (link) => {
1442
1442
  return page === null ? link : page[1] || "index";
1443
1443
  };
1444
1444
  var UnpinnedSdkLink = "https://cdn.jsdelivr.net/npm/@kitman-sh/sdk/";
1445
- var pinnedLink2 = (link, version = "0.12.0-rc.1") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
1445
+ var pinnedLink2 = (link, version = "0.12.0-rc.2") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
1446
1446
  var pageOf = (path) => path.split("#")[0];
1447
1447
  var exportName = (section) => section.path.startsWith("sdk/") ? section.path.split("#")[1] ?? "" : "";
1448
1448
  function excerpt(text, queryTerms) {
@@ -14,7 +14,7 @@ import {
14
14
  writeSrtSettings2,
15
15
  srtStepArgv2,
16
16
  srtArgv2
17
- } from "./chunk-0b93nv6j.js";
17
+ } from "./chunk-3d4d52e5.js";
18
18
  import"./chunk-vtfwjhzh.js";
19
19
  export {
20
20
  compiled2 as compiled,
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-vtfwjhzh.js";
10
10
  import {
11
11
  runForEach
12
- } from "./chunk-0b93nv6j.js";
12
+ } from "./chunk-3d4d52e5.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-dc57c8s5.js";
22
+ } from "./chunk-fhyn2b38.js";
23
23
  import {
24
24
  layerJson,
25
25
  make4,
26
26
  withHeaders,
27
27
  layerProtocolSocket
28
- } from "./chunk-rm3vqk5d.js";
28
+ } from "./chunk-db9q9y8h.js";
29
29
 
30
30
  // packages/live/src/rpc/runner-client.ts
31
31
  var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
@@ -28,7 +28,7 @@ import {
28
28
  import {
29
29
  withDefault,
30
30
  String2
31
- } from "./chunk-0b93nv6j.js";
31
+ } from "./chunk-3d4d52e5.js";
32
32
  import {
33
33
  digestSha256,
34
34
  digestSha512,
@@ -38,7 +38,7 @@ import {
38
38
  get2,
39
39
  layer4,
40
40
  KitDigest
41
- } from "./chunk-dc57c8s5.js";
41
+ } from "./chunk-fhyn2b38.js";
42
42
 
43
43
  // packages/core/src/npm-registry.ts
44
44
  var KitManifest = Struct({
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-2qarscbj.js";
2
+ import"./chunk-sk6ceghr.js";
3
3
  import {
4
4
  HERDR_CORE_GENERATION2,
5
5
  HERDR_CORE_INSTALL_COMMAND2,
@@ -12,8 +12,8 @@ import {
12
12
  herdrCoreLayer2,
13
13
  herdrCoreTransportLayer2,
14
14
  updateHerdrCore2
15
- } from "./chunk-dc57c8s5.js";
16
- import"./chunk-0b93nv6j.js";
15
+ } from "./chunk-fhyn2b38.js";
16
+ import"./chunk-3d4d52e5.js";
17
17
  import"./chunk-vtfwjhzh.js";
18
18
  export {
19
19
  HERDR_CORE_GENERATION2 as HERDR_CORE_GENERATION,
@@ -31,7 +31,7 @@ import {
31
31
  runCollect,
32
32
  runDrain,
33
33
  mkString
34
- } from "./chunk-0b93nv6j.js";
34
+ } from "./chunk-3d4d52e5.js";
35
35
 
36
36
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/redacted.js
37
37
  var redactedRegistry = /* @__PURE__ */ new WeakMap;
@@ -1,9 +1,4 @@
1
1
  // @bun
2
- import {
3
- make11,
4
- runForEach,
5
- compiled2
6
- } from "./chunk-0b93nv6j.js";
7
2
  import {
8
3
  getOrUndefined,
9
4
  liftThrowable,
@@ -33,10 +28,15 @@ import {
33
28
  isJsonObject,
34
29
  isString
35
30
  } from "./chunk-c6rbt85q.js";
31
+ import {
32
+ make11,
33
+ runForEach,
34
+ compiled2
35
+ } from "./chunk-3d4d52e5.js";
36
36
  import {
37
37
  ChildProcessSpawner,
38
38
  make3
39
- } from "./chunk-2qarscbj.js";
39
+ } from "./chunk-sk6ceghr.js";
40
40
 
41
41
  // packages/agent-runtime/src/opencode-store.ts
42
42
  import { lstatSync, readFileSync, realpathSync } from "fs";
@@ -4,7 +4,7 @@ import {
4
4
  searchDocs2,
5
5
  readDoc2,
6
6
  pinnedLink2
7
- } from "./chunk-wf8ajpyy.js";
7
+ } from "./chunk-ha241q06.js";
8
8
  export {
9
9
  DefaultDocsSearchLimit2 as DefaultDocsSearchLimit,
10
10
  pinnedLink2 as pinnedLink,
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-ap9y5k9y.js");
8
+ const { runSrtCli } = await import("./chunk-japwbj9n.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-5vzznkvb.js");
14
+ const { runOpencodeReader } = await import("./chunk-d9bv70qb.js");
15
15
  runOpencodeReader();
16
16
  } else {
17
- const { runCli } = await import("./chunk-bjnvrsej.js");
17
+ const { runCli } = await import("./chunk-cjscsbg8.js");
18
18
  runCli(args);
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitman-sh/cli",
3
- "version": "0.12.0-rc.1",
3
+ "version": "0.12.0-rc.2",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {