@kitman-sh/cli 0.13.6 → 0.13.7

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.
Files changed (27) hide show
  1. package/dist/{chunk-r08sz4ry.js → chunk-1nxcn08k.js} +4 -4
  2. package/dist/{chunk-xc1grg7y.js → chunk-22z1yemd.js} +67 -47
  3. package/dist/{chunk-mm2m3bys.js → chunk-24h0y27w.js} +1 -1
  4. package/dist/{chunk-vmzr8xcg.js → chunk-4bgj3b5r.js} +10 -8
  5. package/dist/{chunk-27pv44t3.js → chunk-4crf5vhd.js} +2 -2
  6. package/dist/{chunk-mwkn1c5q.js → chunk-4x3zm541.js} +17 -10
  7. package/dist/{chunk-j974anp7.js → chunk-8v0t5kzg.js} +1 -1
  8. package/dist/{chunk-3teferzd.js → chunk-9g8tc40f.js} +12 -12
  9. package/dist/{chunk-xy7ze8dj.js → chunk-bbks1scp.js} +16 -16
  10. package/dist/{chunk-qj412x98.js → chunk-bs5bh8ys.js} +16 -16
  11. package/dist/{chunk-s06x2ktk.js → chunk-byg71zra.js} +10 -10
  12. package/dist/{chunk-skqn4h13.js → chunk-ggmwpwhf.js} +2 -2
  13. package/dist/{chunk-a0wt1r43.js → chunk-jbjz7b6n.js} +54 -54
  14. package/dist/{chunk-2x1q8z5t.js → chunk-kk32jckf.js} +4 -4
  15. package/dist/{chunk-cg3xstek.js → chunk-m079pjdy.js} +3 -3
  16. package/dist/{chunk-9t8afbrw.js → chunk-m406nanz.js} +6 -6
  17. package/dist/{chunk-bz4bp0q7.js → chunk-mmd7mjv0.js} +3 -3
  18. package/dist/{chunk-cabmcvy1.js → chunk-mtdz4k32.js} +7 -7
  19. package/dist/{chunk-s8m2tzdr.js → chunk-pxvd8w2v.js} +1 -1
  20. package/dist/{chunk-hg8wgm04.js → chunk-t37qzgmb.js} +4 -4
  21. package/dist/{chunk-vktjb2p7.js → chunk-t82w7459.js} +163 -26
  22. package/dist/{chunk-4nfan8t6.js → chunk-vxfajzpz.js} +2 -2
  23. package/dist/{chunk-at4e0xvg.js → chunk-x44re8th.js} +4 -4
  24. package/dist/{chunk-89hds8q4.js → chunk-xt97vb58.js} +95 -72
  25. package/dist/{chunk-x3cc7dfc.js → chunk-zgraq2y3.js} +13 -157
  26. package/dist/index.js +4 -4
  27. package/package.json +1 -1
@@ -96,9 +96,8 @@ import {
96
96
  Defect,
97
97
  Exit,
98
98
  toCodecJson
99
- } from "./chunk-x3cc7dfc.js";
99
+ } from "./chunk-zgraq2y3.js";
100
100
  import {
101
- Clock,
102
101
  interrupt,
103
102
  getCurrent,
104
103
  makeUnsafe2,
@@ -109,8 +108,9 @@ import {
109
108
  shutdownUnsafe,
110
109
  fromQueue,
111
110
  unwrap
112
- } from "./chunk-vktjb2p7.js";
111
+ } from "./chunk-t82w7459.js";
113
112
  import {
113
+ Clock,
114
114
  empty,
115
115
  fromInput,
116
116
  merge,
@@ -123,7 +123,7 @@ import {
123
123
  ParseOptions,
124
124
  RpcClientDefect,
125
125
  RpcClientError
126
- } from "./chunk-mwkn1c5q.js";
126
+ } from "./chunk-4x3zm541.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")) {
@@ -422,6 +422,7 @@ Kitman Web includes user, agent, and operator guides.
422
422
  - [Getting Started](/docs/getting-started)
423
423
  - [Kitman CLI](/docs/cli)
424
424
  - [Tasks Guide](/docs/task-composition)
425
+ - [Scope a Task](/docs/scope-tasks)
425
426
  - [Handing Work to Agents](/docs/handing-work-to-agents)
426
427
  - [Triage](/docs/triage)
427
428
  - [Inbox](/docs/inbox)
@@ -514,7 +515,7 @@ Agents should record implementation evidence, verification, and delivery artifac
514
515
 
515
516
  Every Run is held to an Intent, seeded when Kitman admits it:
516
517
 
517
- - **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.
518
+ - **Goal:** the launch words, or the Task's title, Promise, description and Out of scope list. 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.
518
519
  - **Done when:** the Task's Acceptance Criteria. A Child Run has none: its parent's evidence settles them.
519
520
  - **Constraints:** see below.
520
521
 
@@ -619,50 +620,7 @@ Turning a start off stops new Runs from it. Runs it already started go on. \`kit
619
620
  path: "loop-operations#agents-and-effort",
620
621
  level: 2,
621
622
  link: "https://kitman.sh/knowledge/docs/loop-operations#agents-and-effort",
622
- text: `## Agents and effort
623
-
624
- Kitman ships the Agents \`implementer\`, \`reviewer\`, \`planner\`, \`releaser\`, \`investigator\` and \`judge\`. They 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:
625
-
626
- \`\`\`ts
627
- export default defineKit({
628
- agents: {
629
- reviewer: {
630
- extends: 'reviewer',
631
- instructions: \`## House rules
632
- Never approve a migration that edits a released one.\`,
633
- effort: 'high'
634
- }
635
- }
636
- })
637
- \`\`\`
638
-
639
- A declared Agent replaces only the fields it names. Its instructions merge by \`## \` heading:
640
-
641
- - A section it names replaces the parent's section with that heading.
642
- - A new heading is appended.
643
- - Any text before its first heading replaces the parent's.
644
-
645
- An Agent can list fallbacks for a Runner that does not offer its Harness:
646
-
647
- \`\`\`ts
648
- export default defineKit({
649
- agents: {
650
- reviewer: {
651
- extends: 'reviewer',
652
- harness: 'claude',
653
- effort: 'high',
654
- fallbacks: [
655
- { harness: 'codex', model: 'gpt-5.5' },
656
- { harness: 'pi', effort: 'medium' }
657
- ]
658
- }
659
- }
660
- })
661
- \`\`\`
662
-
663
- A 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.
664
-
665
- Effort (\`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.`
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."
666
624
  },
667
625
  {
668
626
  title: "Projects and Saved Views",
@@ -840,6 +798,68 @@ The Flight Deck separates runner **readiness** from WorkUnit **claimability**. A
840
798
  Environment diagnostics show the selected backend posture, materialization mode, cache hit/miss evidence, and safe blocker codes without exposing checkout paths or command output. Quota evidence is authoritative only when it is fresh and provider-backed; unknown or stale quota is never rendered as available. Cleanup remains unknown or blocked until the runner can account for owned resources.
841
799
 
842
800
  Enrollment, key rotation, revocation, drain, update, and rollback controls show their safe lifecycle posture and disabled reason. Updates and rollbacks must use exact certified digests and new fenced replicas; existing run snapshots are never changed in place.`
801
+ },
802
+ {
803
+ title: "Scope a Task",
804
+ path: "scope-tasks",
805
+ level: 1,
806
+ link: "https://kitman.sh/knowledge/docs/scope-tasks",
807
+ text: `How to scope a Task, so an agent can build it in one session and a review of it ends.
808
+
809
+ Read this before you create a Task or write a plan's ticket.`
810
+ },
811
+ {
812
+ title: "Scope a Task \u203A One Promise per Task",
813
+ path: "scope-tasks#one-promise-per-task",
814
+ level: 2,
815
+ link: "https://kitman.sh/knowledge/docs/scope-tasks#one-promise-per-task",
816
+ text: `## One Promise per Task
817
+
818
+ - Give a Task one Promise: one sentence that says what is true once it is done. Put it first in the description. Two Promises are two Tasks.
819
+ - A Promise is open-ended when it covers cases nobody can list, such as every path, any input or all source code. Reviews of it keep finding one more case. Split it into a first Task with a bounded case, whose cases you list, and later Tasks that each widen it.
820
+ - Size a Task to fit one agent session under 200k tokens of context, from reading the code to a verified change. Split one that does not fit.`
821
+ },
822
+ {
823
+ title: "Scope a Task \u203A What to write",
824
+ path: "scope-tasks#what-to-write",
825
+ level: 2,
826
+ link: "https://kitman.sh/knowledge/docs/scope-tasks#what-to-write",
827
+ text: `## What to write
828
+
829
+ - **Decisions:** make every design decision yourself, or ask the person. Leave none to the implementer.
830
+ - **Interfaces:** name the operations, types, settings or pages the Task adds or changes, and how each behaves.
831
+ - **Cases:** list the cases it handles, with the failures, and what happens in each.
832
+ - **Tests:** name what a test must show, and where the tests go. Make each Acceptance Criterion something a reviewer can check against the change.
833
+ - **Where to start:** name the modules, documents and decisions to read first.
834
+ - **Out of scope:** list the cases the Task does not handle.
835
+ - **Blockers:** name the Tasks whose code it needs, and relate them as blockers.
836
+
837
+ Write no code and no line numbers: both are out of date before the Task is built. Name things by what they are called.`
838
+ },
839
+ {
840
+ title: "Scope a Task \u203A Two or more related Tasks",
841
+ path: "scope-tasks#two-or-more-related-tasks",
842
+ level: 2,
843
+ link: "https://kitman.sh/knowledge/docs/scope-tasks#two-or-more-related-tasks",
844
+ text: `## Two or more related Tasks
845
+
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:
847
+
848
+ \`\`\`js
849
+ await kitman.runs.start({
850
+ workspaceId,
851
+ teamId,
852
+ loop: 'file-tasks',
853
+ input: {
854
+ tickets: [
855
+ { key: 'first', title: '\u2026', body: '\u2026', acceptanceCriteria: ['\u2026'], blockedBy: [] },
856
+ { key: 'wider', title: '\u2026', body: '\u2026', acceptanceCriteria: ['\u2026'], blockedBy: ['first'] }
857
+ ]
858
+ }
859
+ })
860
+ \`\`\`
861
+
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. In a Plan Run, write the tickets in the plan: Plan files them.`
843
863
  },
844
864
  {
845
865
  title: "Tasks Guide",
@@ -879,7 +899,7 @@ A Team view has three tabs: Active shows unstarted and started Tasks, Backlog th
879
899
 
880
900
  Press **C** or use **New task** in a Team view. A title is enough; everything else is optional. Keep the form open to capture several Tasks in a row. Filing a Task in a Team you are not a member of sends it to that Team's [Triage](/docs/triage).
881
901
 
882
- Open a Task beside its list, or on its own page. The description is markdown and saves as you type. If someone else changes it while you edit, Kitman tells you instead of overwriting their work. Acceptance Criteria are an ordered list that reviews and Runs hold the work to.
902
+ Open a Task beside its list, or on its own page. The description is markdown and saves as you type. If someone else changes it while you edit, Kitman tells you instead of overwriting their work. The Promise is one sentence that says what is true once the Task is done. Acceptance Criteria are an ordered list that reviews and Runs hold the work to. Out of scope lists the cases the Task does not handle. All three are optional.
883
903
 
884
904
  Change a Task's state, priority, assignee, Labels, repository and Task Type from the list, the board or the Task page. From the keyboard: **S** state, **P** priority, **A** assignee, **L** Labels, **T** Task Type, **M** move to another Team, **R** start a Run, **X** select. **?** lists every shortcut with the control that does the same.
885
905
 
@@ -1509,7 +1529,7 @@ var pathOfLink = (link) => {
1509
1529
  return page === null ? link : page[1] || "index";
1510
1530
  };
1511
1531
  var UnpinnedSdkLink = "https://cdn.jsdelivr.net/npm/@kitman-sh/sdk/";
1512
- var pinnedLink2 = (link, version = "0.13.6") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
1532
+ var pinnedLink2 = (link, version = "0.13.7") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
1513
1533
  var pageOf = (path) => path.split("#")[0];
1514
1534
  var exportName = (section) => section.path.startsWith("sdk/") ? section.path.split("#")[1] ?? "" : "";
1515
1535
  function excerpt(text, queryTerms) {
@@ -3,7 +3,7 @@ import {
3
3
  Random,
4
4
  succeed6,
5
5
  withFiber2
6
- } from "./chunk-x3cc7dfc.js";
6
+ } from "./chunk-zgraq2y3.js";
7
7
 
8
8
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Random.js
9
9
  var Random2 = Random;
@@ -75,11 +75,16 @@ import {
75
75
  toEquivalence,
76
76
  toCodecJson,
77
77
  Json
78
- } from "./chunk-x3cc7dfc.js";
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-s8m2tzdr.js";
85
+ } from "./chunk-pxvd8w2v.js";
82
86
  import {
87
+ currentTimeMillis,
83
88
  WebCrypto,
84
89
  SafeJson,
85
90
  AgentSandboxNetwork,
@@ -104,12 +109,7 @@ import {
104
109
  KitDigest,
105
110
  KitSetup,
106
111
  RunnerRpcError
107
- } from "./chunk-mwkn1c5q.js";
108
- import {
109
- currentTimeMillis,
110
- runForEach,
111
- FileSystem
112
- } from "./chunk-vktjb2p7.js";
112
+ } from "./chunk-4x3zm541.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");
@@ -587,6 +587,8 @@ var PlanTicket = Struct({
587
587
  title: String4,
588
588
  body: String4,
589
589
  acceptanceCriteria: ArraySchema(String4),
590
+ promise: optional(String4),
591
+ outOfScope: optional(ArraySchema(String4)),
590
592
  repoBindingId: optional(String4),
591
593
  blockedBy: ArraySchema(String4),
592
594
  outcome: optional(LoopOutcome)
@@ -14,8 +14,8 @@ import {
14
14
  writeSrtSettings2,
15
15
  srtStepArgv2,
16
16
  srtArgv2
17
- } from "./chunk-vktjb2p7.js";
18
- import"./chunk-x3cc7dfc.js";
17
+ } from "./chunk-t82w7459.js";
18
+ import"./chunk-zgraq2y3.js";
19
19
  export {
20
20
  compiled2 as compiled,
21
21
  harnessesUnsupportedInSrt2 as harnessesUnsupportedInSrt,
@@ -84,6 +84,8 @@ import {
84
84
  DisablePropagation,
85
85
  sync,
86
86
  map7,
87
+ ClockRef,
88
+ currentTimeMillis2,
87
89
  ConsoleRef,
88
90
  succeed3,
89
91
  fail4,
@@ -191,8 +193,6 @@ import {
191
193
  clockWith,
192
194
  logError,
193
195
  effectify,
194
- toNumber,
195
- bytes,
196
196
  decode,
197
197
  isRedacted,
198
198
  make16,
@@ -264,12 +264,12 @@ import {
264
264
  decodeJsonStringOption,
265
265
  encodeJsonStringSync,
266
266
  encodePrettyJsonString
267
- } from "./chunk-x3cc7dfc.js";
267
+ } from "./chunk-zgraq2y3.js";
268
268
  import {
269
269
  map,
270
270
  makeEquivalence,
271
- Clock,
272
- currentTimeMillis,
271
+ toNumber,
272
+ bytes,
273
273
  BadArgument,
274
274
  systemError,
275
275
  badArgument,
@@ -332,7 +332,7 @@ import {
332
332
  String2,
333
333
  optionalEnv,
334
334
  harnessesUnsupportedInSrt2
335
- } from "./chunk-vktjb2p7.js";
335
+ } from "./chunk-t82w7459.js";
336
336
  import {
337
337
  isDateTime,
338
338
  Numeric,
@@ -345,7 +345,7 @@ import {
345
345
  SecretScope,
346
346
  SecretHosts,
347
347
  isSecretReference
348
- } from "./chunk-s8m2tzdr.js";
348
+ } from "./chunk-pxvd8w2v.js";
349
349
  import {
350
350
  ExitCode,
351
351
  ProcessId,
@@ -356,11 +356,14 @@ import {
356
356
  make2,
357
357
  parseFdName,
358
358
  fdName
359
- } from "./chunk-4nfan8t6.js";
360
-
359
+ } from "./chunk-vxfajzpz.js";
361
360
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Tuple.js
362
361
  var makeEquivalence3 = Tuple;
363
362
 
363
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Clock.js
364
+ var Clock = ClockRef;
365
+ var currentTimeMillis = currentTimeMillis2;
366
+
364
367
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/dateTime.js
365
368
  var TypeId = "~effect/DateTime";
366
369
  var TimeZoneTypeId = "~effect/DateTime/TimeZone";
@@ -8554,6 +8557,8 @@ var Task = Struct({
8554
8557
  title: String4.check(isMinLength(1), isMaxLength(240)),
8555
8558
  description: optionalKey(String4),
8556
8559
  acceptanceCriteria: ArraySchema(String4),
8560
+ promise: optionalKey(String4),
8561
+ outOfScope: optionalKey(ArraySchema(String4)),
8557
8562
  state: TaskState,
8558
8563
  priority: Literals(TaskPriorities),
8559
8564
  assigneeId: optionalKey(Id),
@@ -14748,6 +14753,8 @@ class RunnerCapabilityRpcs extends make6(make5("PutQuestion", {
14748
14753
  title: String4,
14749
14754
  body: String4,
14750
14755
  acceptanceCriteria: ArraySchema(String4),
14756
+ promise: optionalKey(String4),
14757
+ outOfScope: optionalKey(ArraySchema(String4)),
14751
14758
  blockedBy: ArraySchema(String4),
14752
14759
  outcome: optionalKey(Literals(["feature", "bug", "refactor", "investigation", "docs", "migration", "performance"])),
14753
14760
  repoBindingId: optionalKey(String4)
@@ -16105,4 +16112,4 @@ function checkServices(declaration) {
16105
16112
  return isSome(decoded) ? [...new Set(decoded.value.services)] : undefined;
16106
16113
  }
16107
16114
 
16108
- export { WebCrypto, SecureRandom, layerWebCrypto, makeUnsafe, formatIso, empty, fromInput, merge, runMain, layer, layer2, Stdio, Terminal, layer3, error, log, toDate, parseDate, toIso, currentDate, wallClockMillis, waitingOnWords, queueWords, scanDurableSurface, redactResponseSurface, redactCredentials, redactedOutputTail, SafeJson, ReleaseChannels, DefaultReleaseChannel, newerKitmanVersion, releaseChannelOffers, AgentHarnessIds, AgentSkillRequirement, AgentMcpServerRequirement, AgentEnvironmentFragment, findForbiddenAgentEnvironmentSecretPath, NetworkHost, RepoBindingProviders, RepoBindingCredentialProviderTypes, findForbiddenRepoBindingSecretPath, AgentSandboxNetwork, runnerAgentSandboxPolicy, agentNetworkAllowlist, verificationNetworkAllowlist, programNetworkHosts, ContextPackModes, DefaultContextPackMode, ProposalStatuses, ProposalTargetTypes, canonicalJson, canonicalSha256, AgentEfforts, AgentCapabilities, tokensSpent, LoopDataSchemaRef, RunDisplayStates, LoopVersion, ProgramLoop, AgentFallback, RunWaitUntils, isTestReportName, checkTests, ProgramWorkUnit, MeasureSample, MeasureEvidence, catchUpPathLimit, CatchUp, RunnerOwnership, RunnerExecutionBackend, MaxRunnerConcurrency, PinnedImage, RunnerSettingNames, RunnerSettingsUpdate, defaultRunnerSettings, shownRunnerSetting, defaultRunnerCapabilities, deliveryProviderActions, MemoryStatuses, MemoryScopes, MaxMemoryListLimit, DecisionStatuses, Session, SessionEnd, SessionUpdate, SessionUpdateCreate, FixFlowRecoveryActions, KitmanAgentCapabilityNames, sha2562, isRunFileRefusalReason, runFileRefusalWords, RunFileRefused, runFileContentType, repositoryKey, createId, digestSha256, digestSha512, digestWith, sha256Hasher, AgentEvent, raw, make4, get, post, put, setHeaders, acceptJson, bodyUint8Array, bodyJsonUnsafe, bodyUrlParams, schemaBodyJson, filterStatusOk, HttpClient, execute, get2, Fetch, layer4, Socket, SocketReadError, SocketError, WebSocketConstructor, layerWebSocketConstructorGlobal, layerWebSocket, runDisplayLabels, listedSummary, KitName, KitDigest, defaultKitName, KitSetup, SetupArchive, kitMcpSecretNames, kitmanMcpServer, KitmanClientError, KitmanEffectClient, CliError, DefaultApiUrl, resolveConfig, apiUrlFromEnv, stepCredentialFromEnv, stepWorkspaceFromEnv, stepSkillsDirFromEnv, stepFittingSkillsFromEnv, stepOutputOnlyFromEnv, mcpCredentialNameFromEnv, userConfigPath, userAuthPath, userHarnessSyncPath, kitSetupCacheDir, bundleCacheDir, runnerReleaseChannelPath, localConfigPath, readUserConfig, writeUserConfig, sessionForApi, readAuthStore, storeSession, removeSession, removeAllSessions, agentCredentialForApi, storeAgentCredential, removeAgentCredential, normalizeApiUrl, isStoredAgentCredential, isStreamSchema, getStreamSchemas, make5, exitSchema, ParseOptions, RpcClientDefect, RpcClientError, make6, Service, RunnerHeaders, RunnerRpcProtocolVersion, RunnerRpcError, RunSettled, UpdateAvailable, RunnerReplicaRpcs, RunnerRunFileRpcs, ProgramRpcs, parseCallbackUrl, revokeToken, toStoredSession, browserLogin, openBrowser, shouldRefresh, createSdkClient, refreshSession, AgentAuthClientError, executeAgentCapability, createAgentAuthBearerToken, McpPlatformLive, runMcpEffect, createAgentAuthSignedFetch, setupMcpAgentCredential, generateAgentKeyPair, HERDR_CORE_GENERATION2, HERDR_CORE_INSTALL_COMMAND2, HerdrCoreMissing2, HerdrCoreIncompatible2, HerdrCoreConnectionLost2, HerdrCoreRpcError2, HerdrCoreUpdateFailed2, HerdrCore2, herdrCoreLayer2, herdrCoreTransportLayer2, updateHerdrCore2, CommandFailed2, runCommand2, withoutPreloads2, shellOutputTailChars2, runProcess2, CommandRunner2, runShell2, detectHarnesses2, kitHarnesses, isKitHarness, instructionsStart, instructionsEnd, harnessNames, renderMcpServer, materializeKitSetup, tomlInline, herdrExecutionExtension2, herdrNativeExtensionIds2, herdrRunnerCapabilitiesForRepoBinding2, herdrRunnerCapabilities2, assertHerdrRunnerCapability2, declaredChecks, installCommand, checkServicesFile, checkServices };
16115
+ export { Clock, currentTimeMillis, WebCrypto, SecureRandom, layerWebCrypto, makeUnsafe, formatIso, empty, fromInput, merge, runMain, layer, layer2, Stdio, Terminal, layer3, error, log, toDate, parseDate, toIso, currentDate, wallClockMillis, waitingOnWords, queueWords, scanDurableSurface, redactResponseSurface, redactCredentials, redactedOutputTail, SafeJson, ReleaseChannels, DefaultReleaseChannel, newerKitmanVersion, releaseChannelOffers, AgentHarnessIds, AgentSkillRequirement, AgentMcpServerRequirement, AgentEnvironmentFragment, findForbiddenAgentEnvironmentSecretPath, NetworkHost, RepoBindingProviders, RepoBindingCredentialProviderTypes, findForbiddenRepoBindingSecretPath, AgentSandboxNetwork, runnerAgentSandboxPolicy, agentNetworkAllowlist, verificationNetworkAllowlist, programNetworkHosts, ContextPackModes, DefaultContextPackMode, ProposalStatuses, ProposalTargetTypes, canonicalJson, canonicalSha256, AgentEfforts, AgentCapabilities, tokensSpent, LoopDataSchemaRef, RunDisplayStates, LoopVersion, ProgramLoop, AgentFallback, RunWaitUntils, isTestReportName, checkTests, ProgramWorkUnit, MeasureSample, MeasureEvidence, catchUpPathLimit, CatchUp, RunnerOwnership, RunnerExecutionBackend, MaxRunnerConcurrency, PinnedImage, RunnerSettingNames, RunnerSettingsUpdate, defaultRunnerSettings, shownRunnerSetting, defaultRunnerCapabilities, deliveryProviderActions, MemoryStatuses, MemoryScopes, MaxMemoryListLimit, DecisionStatuses, Session, SessionEnd, SessionUpdate, SessionUpdateCreate, FixFlowRecoveryActions, KitmanAgentCapabilityNames, sha2562, isRunFileRefusalReason, runFileRefusalWords, RunFileRefused, runFileContentType, repositoryKey, createId, digestSha256, digestSha512, digestWith, sha256Hasher, AgentEvent, raw, make4, get, post, put, setHeaders, acceptJson, bodyUint8Array, bodyJsonUnsafe, bodyUrlParams, schemaBodyJson, filterStatusOk, HttpClient, execute, get2, Fetch, layer4, Socket, SocketReadError, SocketError, WebSocketConstructor, layerWebSocketConstructorGlobal, layerWebSocket, runDisplayLabels, listedSummary, KitName, KitDigest, defaultKitName, KitSetup, SetupArchive, kitMcpSecretNames, kitmanMcpServer, KitmanClientError, KitmanEffectClient, CliError, DefaultApiUrl, resolveConfig, apiUrlFromEnv, stepCredentialFromEnv, stepWorkspaceFromEnv, stepSkillsDirFromEnv, stepFittingSkillsFromEnv, stepOutputOnlyFromEnv, mcpCredentialNameFromEnv, userConfigPath, userAuthPath, userHarnessSyncPath, kitSetupCacheDir, bundleCacheDir, runnerReleaseChannelPath, localConfigPath, readUserConfig, writeUserConfig, sessionForApi, readAuthStore, storeSession, removeSession, removeAllSessions, agentCredentialForApi, storeAgentCredential, removeAgentCredential, normalizeApiUrl, isStoredAgentCredential, isStreamSchema, getStreamSchemas, make5, exitSchema, ParseOptions, RpcClientDefect, RpcClientError, make6, Service, RunnerHeaders, RunnerRpcProtocolVersion, RunnerRpcError, RunSettled, UpdateAvailable, RunnerReplicaRpcs, RunnerRunFileRpcs, ProgramRpcs, parseCallbackUrl, revokeToken, toStoredSession, browserLogin, openBrowser, shouldRefresh, createSdkClient, refreshSession, AgentAuthClientError, executeAgentCapability, createAgentAuthBearerToken, McpPlatformLive, runMcpEffect, createAgentAuthSignedFetch, setupMcpAgentCredential, generateAgentKeyPair, HERDR_CORE_GENERATION2, HERDR_CORE_INSTALL_COMMAND2, HerdrCoreMissing2, HerdrCoreIncompatible2, HerdrCoreConnectionLost2, HerdrCoreRpcError2, HerdrCoreUpdateFailed2, HerdrCore2, herdrCoreLayer2, herdrCoreTransportLayer2, updateHerdrCore2, CommandFailed2, runCommand2, withoutPreloads2, shellOutputTailChars2, runProcess2, CommandRunner2, runShell2, detectHarnesses2, kitHarnesses, isKitHarness, instructionsStart, instructionsEnd, harnessNames, renderMcpServer, materializeKitSetup, tomlInline, herdrExecutionExtension2, herdrNativeExtensionIds2, herdrRunnerCapabilitiesForRepoBinding2, herdrRunnerCapabilities2, assertHerdrRunnerCapability2, declaredChecks, installCommand, checkServicesFile, checkServices };
@@ -4,7 +4,7 @@ import {
4
4
  searchDocs2,
5
5
  readDoc2,
6
6
  pinnedLink2
7
- } from "./chunk-xc1grg7y.js";
7
+ } from "./chunk-22z1yemd.js";
8
8
  export {
9
9
  DefaultDocsSearchLimit2 as DefaultDocsSearchLimit,
10
10
  pinnedLink2 as pinnedLink,
@@ -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-x3cc7dfc.js";
29
- import {
30
- FileSystem,
31
- Path,
32
- optionalEnv,
33
- tempDirectoryScoped
34
- } from "./chunk-vktjb2p7.js";
34
+ } from "./chunk-zgraq2y3.js";
35
35
  import {
36
36
  AgentHarnessIds,
37
37
  sha2562,
38
38
  runCommand2
39
- } from "./chunk-mwkn1c5q.js";
39
+ } from "./chunk-4x3zm541.js";
40
40
  import {
41
41
  NpmRegistry
42
- } from "./chunk-cg3xstek.js";
42
+ } from "./chunk-m079pjdy.js";
43
43
 
44
44
  // packages/agent-runtime/src/config-convergence.ts
45
45
  var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
@@ -459,7 +459,7 @@ For repeated queue-draining orchestration across many ready Tasks, use the separ
459
459
  - Treat runtime readiness as a full contract: RepoBinding, shared config, skills, plugins, MCP/service endpoints, provider tools such as \`gh\` or \`glab\`, credential references, and runtime health/capabilities must align for the selected local or remote runtime.
460
460
  - Use RepoBinding list/create operations for non-secret Team repository setup, including monorepo path prefixes when available; never store raw credentials or source snapshots.
461
461
  - Tasks live in Kitman, in Teams. Read and change a Task, its state and its blocks relations through Code Mode MCP; resolve it by any key it has had.
462
- - Capture new work as a Task in the right Team, or launch a Run from words; search Kitman first so you do not duplicate an existing Task.
462
+ - Capture new work as a Task in the right Team, or launch a Run from words; search Kitman first so you do not duplicate an existing Task. Before you create one, read how to scope it: \`skills({ name: 'scope-tasks' })\`, or \`kitman docs read scope-tasks\` in a terminal.
463
463
  - If MCP auth, DelegatedToolCredential, capability grant, Team resolution, Workspace membership, or runtime readiness is missing, use the documented recovery path or stop and report a blocker. Do not bypass Kitman with shell fallbacks, raw REST calls, global active Workspace fallbacks, local task docs, hidden files, or shadow state.
464
464
  - Do not create duplicate work outside Kitman when a Task already exists.
465
465
  - Do not approve Memory; agents can only propose Memory for human review.
@@ -472,7 +472,7 @@ For repeated queue-draining orchestration across many ready Tasks, use the separ
472
472
 
473
473
  ## In a Kitman Step
474
474
 
475
- A Loop's agent Step runs with the Agent its role resolves to. It receives its brief, the tools its Agent declares, and only the skills its Agent lists. Its Kitman MCP serves the step tools, not Code Mode: \`step_brief\`, \`submit_output\`, \`session_update\`, \`ask\`, \`attach_file\` and \`skills\`. \`skills\` lists the Run's other Kit skills, those that fit the repository first, and \`skills({ name })\` loads one; the brief's last line names the ones that fit, by the \`appliesTo\` their Kit declares. A loaded skill stays in context, so load it again only with \`reload: true\` after compaction.
475
+ A Loop's agent Step runs with the Agent its role resolves to. It receives its brief, the tools its Agent declares, and only the skills its Agent lists. Its Kitman MCP serves the step tools, not Code Mode: \`step_brief\`, \`submit_output\`, \`session_update\`, \`ask\`, \`attach_file\` and \`skills\`. \`skills\` lists the Run's other Kit skills, those that fit the repository first, and \`skills({ name })\` loads one; the brief's last line names the ones that fit, by the \`appliesTo\` their Kit declares. It also serves Kitman's \`scope-tasks\`. A loaded skill stays in context, so load it again only with \`reload: true\` after compaction.
476
476
 
477
477
  ## References
478
478
 
@@ -631,7 +631,7 @@ async ({ kitman }) => {
631
631
  }
632
632
  \`\`\`
633
633
  `,
634
- "references/mcp-tools.md": '# Kitman Code Mode MCP\n\nKitman MCP uses Code Mode as its only interface. The MCP context stays compact, but the reachable capability should match the public Kitman CLI/API when the authenticated Actor is authorized.\n\n## Default Tools\n\nUse these as the normal MCP entry points:\n\n- `execute`: execute JavaScript that calls typed `kitman.*` public operations through a host-side SDK/API proxy.\n- `skills`: fetch on-demand Code Mode guidance, especially `skills({ name: "execute" })`.\n- `resume`: resume paused approval or elicitation flows when the MCP session exposes it.\n- `wait_run`: wait on a Run until it needs attention or settles, in one call however long that takes; use it instead of looping `runs.wait` in `execute`.\n\n## Auth, Grants, And Fallbacks\n\nLocal MCP authenticates through a human-scoped DelegatedToolCredential created by `kitman mcp setup --name <tool>`. Hosted MCP resolves the hosted request ActorContext. Autonomous AgentIdentities authenticate as Agent Actors.\n\nThe Code Mode sandbox must not receive AgentCredential private keys, bearer tokens, raw auth-store contents, runner secrets, or raw environment variables by default. The host signs SDK/API requests and Kitman Cloud enforces normal authorization, Team privacy, audit, Memory visibility, asset access, and admin checks.\n\nIf Code Mode MCP lacks an operation that exists through the public CLI/API, record or report a Kitman MCP parity bug. Do not silently shell out to the CLI, call raw REST manually, create hidden local state, or keep local task files as a substitute.\n\nUse only customer-visible Kitman surfaces for operation discovery: MCP descriptors, CLI help, the Kitman skill, and published API docs. Do not inspect Kitman implementation source to learn operation names, schemas, or input shapes. If those surfaces do not provide enough detail, record a Kitman docs/discoverability blocker.\n\n## Team Context\n\nRepo-local `.kitman/config.json`, CWD, and Git remotes are hints, not canonical state. Kitman Cloud remains canonical for Workspace, Team, Task, RepoBinding, Session, and audit state.\n\nWhen the user asks for the current Team ID or Team context, use Code Mode MCP resolution before inspecting local files or searching the repository:\n\n```execute\nasync ({ kitman }) => await kitman.context.resolveTeam({})\n```\n\nAnswer from `preferredTeamId` and include `workspaceId` when useful. If resolution returns warnings or no unambiguous Team, report that result and ask only for the missing explicit ID needed to proceed.\n\nLocal MCP may sanitize the nearest CWD Git `origin` remote to repository identity plus repository-relative path and ask Kitman Cloud to resolve authorized Team context from RepoBindings.\n\nWorkspace and Team RepoBindings may describe a whole repository or a repository-relative `pathPrefix` for monorepos. A CWD inside a monorepo should resolve by longest matching path prefix. A CWD at a monorepo root can resolve to the Teams that own the repository for reads and live updates. Mutations still require one explicit or subpath-resolved Team.\n\nWhen a mutation is ambiguous, retry with explicit canonical IDs such as `workspaceId`, `teamId`, `taskId`, `sessionId`, `dependencyId`, or `assetId`.\n\n## Code Mode Patterns\n\nSearch when you do not know the operation:\n\n```execute\nconst query = \'session update\';\nreturn kitman.search({ query }).items\n .map(({ name, summary, path, sdk, inputTypeScript, approvalPolicy }) => ({\n name,\n call: `kitman.${path}({...})`,\n parameters: sdk.parameters,\n inputTypeScript,\n approvalPolicy,\n summary\n }));\n```\n\nDescriptor search snippets receive `operations` and its shorthand alias `ops` as the public operation catalog. The same catalog is searchable through `kitman.search({ query })`; no other descriptor globals are required. Catalog entries and search items carry `name`, `summary`, `path`, `namespacePath`, `inputTypeScript`, `sdk`, `examples`, `tags`, `approvalPolicy`, `readOnly`, `idempotent` and `destructive`.\n\nFor the input JSON Schema, output TypeScript and auth notes, describe the operation:\n\n```execute\nconst details = await kitman.describe.operation({ path: \'runs.answer\' });\nreturn { inputSchema: details.inputSchema, outputTypeScript: details.outputTypeScript, auth: details.auth };\n```\n\n`describe.operation` takes a dotted `path` or an operation `name`, such as `name: \'answerRun\'`, and returns the descriptor itself, not an `{ ok, data }` envelope. Pass `full: true` for the output JSON Schema. An unknown operation returns `{ error: { code: \'operation_not_found\', message, suggestions } }`.\n\nThat descriptor output is the source of truth for Code Mode call shape. For example, if the descriptor says `path: \'sessions.recordUpdate\'` and parameters `sessionId` and `input`, call `kitman.sessions.recordUpdate({ sessionId, input })` through `execute`.\n\nExecute related work through typed operations:\n\n```execute\nasync ({ kitman }) => {\n const team = await kitman.teams.get({ workspaceId: \'workspace_123\', teamId: \'team_123\' });\n if (!team.ok) return team.error;\n\n const tasks = await kitman.tasks.list({ teamId: \'team_123\', options: { statuses: [\'ready\', \'in_progress\'] } });\n if (!tasks.ok) return tasks.error;\n\n return {\n team: team.data,\n tasks: tasks.data.items.map((task) => ({ id: task.id, teamId: task.teamId, title: task.title, status: task.status }))\n };\n}\n```\n\nUse one execution when the calls are tightly related, especially for read-filter-map flows or read-then-record workflows. Use separate executions when a human decision is needed between steps.\n\nParallel calls are appropriate for independent reads:\n\n```execute\nasync ({ kitman }) => {\n const [task, dependencies, sessions] = await Promise.all([\n kitman.tasks.get({ taskId: \'task_123\' }),\n kitman.taskDependencies.list({ taskId: \'task_123\' }),\n kitman.sessions.listForTask({ taskId: \'task_123\' })\n ]);\n\n return { task, dependencies, sessions };\n}\n```\n\n## Required Work Discipline\n\nUse Code Mode operations to keep normal Kitman workflow discipline:\n\n- Resolve or identify the Task before starting work.\n- Read TaskDependencies for build order when relevant.\n- Generate or read the appropriate ContextPack before implementation or review work.\n- Record meaningful findings, decisions, blockers, test results, and file references as SessionUpdates or Task thread entries.\n- Propose Memory only when the learning is durable and reusable.\n- Link delivery artifacts such as merge requests with `kitman.taskLinks.create` and verify them with `kitman.taskLinks.list`.\n- Generate a handoff before stopping.\n\n## Safety Rules\n\nNever put these in Memory, SessionUpdates, handoffs, examples, or cloud audit metadata:\n\n- secrets,\n- private keys,\n- bearer tokens,\n- raw auth-store contents,\n- raw terminal logs,\n- raw source snapshots,\n- raw diffs,\n- private customer data,\n- presigned upload or download URLs.\n\nDo not use Code Mode to bypass Kitman authorization, Team privacy, human review, Memory approval, Proposal approval, or AgentIdentity lifecycle restrictions.\n',
634
+ "references/mcp-tools.md": '# Kitman Code Mode MCP\n\nKitman MCP uses Code Mode as its only interface. The MCP context stays compact, but the reachable capability should match the public Kitman CLI/API when the authenticated Actor is authorized.\n\n## Default Tools\n\nUse these as the normal MCP entry points:\n\n- `execute`: execute JavaScript that calls typed `kitman.*` public operations through a host-side SDK/API proxy.\n- `skills`: fetch on-demand Code Mode guidance, especially `skills({ name: "execute" })`, and `skills({ name: "scope-tasks" })` before you create a Task.\n- `resume`: resume paused approval or elicitation flows when the MCP session exposes it.\n- `wait_run`: wait on a Run until it needs attention or settles, in one call however long that takes; use it instead of looping `runs.wait` in `execute`.\n\n## Auth, Grants, And Fallbacks\n\nLocal MCP authenticates through a human-scoped DelegatedToolCredential created by `kitman mcp setup --name <tool>`. Hosted MCP resolves the hosted request ActorContext. Autonomous AgentIdentities authenticate as Agent Actors.\n\nThe Code Mode sandbox must not receive AgentCredential private keys, bearer tokens, raw auth-store contents, runner secrets, or raw environment variables by default. The host signs SDK/API requests and Kitman Cloud enforces normal authorization, Team privacy, audit, Memory visibility, asset access, and admin checks.\n\nIf Code Mode MCP lacks an operation that exists through the public CLI/API, record or report a Kitman MCP parity bug. Do not silently shell out to the CLI, call raw REST manually, create hidden local state, or keep local task files as a substitute.\n\nUse only customer-visible Kitman surfaces for operation discovery: MCP descriptors, CLI help, the Kitman skill, and published API docs. Do not inspect Kitman implementation source to learn operation names, schemas, or input shapes. If those surfaces do not provide enough detail, record a Kitman docs/discoverability blocker.\n\n## Team Context\n\nRepo-local `.kitman/config.json`, CWD, and Git remotes are hints, not canonical state. Kitman Cloud remains canonical for Workspace, Team, Task, RepoBinding, Session, and audit state.\n\nWhen the user asks for the current Team ID or Team context, use Code Mode MCP resolution before inspecting local files or searching the repository:\n\n```execute\nasync ({ kitman }) => await kitman.context.resolveTeam({})\n```\n\nAnswer from `preferredTeamId` and include `workspaceId` when useful. If resolution returns warnings or no unambiguous Team, report that result and ask only for the missing explicit ID needed to proceed.\n\nLocal MCP may sanitize the nearest CWD Git `origin` remote to repository identity plus repository-relative path and ask Kitman Cloud to resolve authorized Team context from RepoBindings.\n\nWorkspace and Team RepoBindings may describe a whole repository or a repository-relative `pathPrefix` for monorepos. A CWD inside a monorepo should resolve by longest matching path prefix. A CWD at a monorepo root can resolve to the Teams that own the repository for reads and live updates. Mutations still require one explicit or subpath-resolved Team.\n\nWhen a mutation is ambiguous, retry with explicit canonical IDs such as `workspaceId`, `teamId`, `taskId`, `sessionId`, `dependencyId`, or `assetId`.\n\n## Code Mode Patterns\n\nSearch when you do not know the operation:\n\n```execute\nconst query = \'session update\';\nreturn kitman.search({ query }).items\n .map(({ name, summary, path, sdk, inputTypeScript, approvalPolicy }) => ({\n name,\n call: `kitman.${path}({...})`,\n parameters: sdk.parameters,\n inputTypeScript,\n approvalPolicy,\n summary\n }));\n```\n\nDescriptor search snippets receive `operations` and its shorthand alias `ops` as the public operation catalog. The same catalog is searchable through `kitman.search({ query })`; no other descriptor globals are required. Catalog entries and search items carry `name`, `summary`, `path`, `namespacePath`, `inputTypeScript`, `sdk`, `examples`, `tags`, `approvalPolicy`, `readOnly`, `idempotent` and `destructive`.\n\nFor the input JSON Schema, output TypeScript and auth notes, describe the operation:\n\n```execute\nconst details = await kitman.describe.operation({ path: \'runs.answer\' });\nreturn { inputSchema: details.inputSchema, outputTypeScript: details.outputTypeScript, auth: details.auth };\n```\n\n`describe.operation` takes a dotted `path` or an operation `name`, such as `name: \'answerRun\'`, and returns the descriptor itself, not an `{ ok, data }` envelope. Pass `full: true` for the output JSON Schema. An unknown operation returns `{ error: { code: \'operation_not_found\', message, suggestions } }`.\n\nThat descriptor output is the source of truth for Code Mode call shape. For example, if the descriptor says `path: \'sessions.recordUpdate\'` and parameters `sessionId` and `input`, call `kitman.sessions.recordUpdate({ sessionId, input })` through `execute`.\n\nExecute related work through typed operations:\n\n```execute\nasync ({ kitman }) => {\n const team = await kitman.teams.get({ workspaceId: \'workspace_123\', teamId: \'team_123\' });\n if (!team.ok) return team.error;\n\n const tasks = await kitman.tasks.list({ teamId: \'team_123\', options: { statuses: [\'ready\', \'in_progress\'] } });\n if (!tasks.ok) return tasks.error;\n\n return {\n team: team.data,\n tasks: tasks.data.items.map((task) => ({ id: task.id, teamId: task.teamId, title: task.title, status: task.status }))\n };\n}\n```\n\nUse one execution when the calls are tightly related, especially for read-filter-map flows or read-then-record workflows. Use separate executions when a human decision is needed between steps.\n\nParallel calls are appropriate for independent reads:\n\n```execute\nasync ({ kitman }) => {\n const [task, dependencies, sessions] = await Promise.all([\n kitman.tasks.get({ taskId: \'task_123\' }),\n kitman.taskDependencies.list({ taskId: \'task_123\' }),\n kitman.sessions.listForTask({ taskId: \'task_123\' })\n ]);\n\n return { task, dependencies, sessions };\n}\n```\n\n## Required Work Discipline\n\nUse Code Mode operations to keep normal Kitman workflow discipline:\n\n- Resolve or identify the Task before starting work.\n- Read TaskDependencies for build order when relevant.\n- Generate or read the appropriate ContextPack before implementation or review work.\n- Record meaningful findings, decisions, blockers, test results, and file references as SessionUpdates or Task thread entries.\n- Propose Memory only when the learning is durable and reusable.\n- Link delivery artifacts such as merge requests with `kitman.taskLinks.create` and verify them with `kitman.taskLinks.list`.\n- Generate a handoff before stopping.\n\n## Safety Rules\n\nNever put these in Memory, SessionUpdates, handoffs, examples, or cloud audit metadata:\n\n- secrets,\n- private keys,\n- bearer tokens,\n- raw auth-store contents,\n- raw terminal logs,\n- raw source snapshots,\n- raw diffs,\n- private customer data,\n- presigned upload or download URLs.\n\nDo not use Code Mode to bypass Kitman authorization, Team privacy, human review, Memory approval, Proposal approval, or AgentIdentity lifecycle restrictions.\n',
635
635
  "references/privacy-and-safety.md": `# Privacy And Safety
636
636
 
637
637
  Kitman is durable shared state. Treat every SessionUpdate, Memory proposal, ContextPack, and handoff as something future humans and Agents may read.
@@ -104,9 +104,8 @@ import {
104
104
  decodeJsonString,
105
105
  encodeJsonStringSync,
106
106
  encodePrettyJsonString
107
- } from "./chunk-x3cc7dfc.js";
107
+ } from "./chunk-zgraq2y3.js";
108
108
  import {
109
- currentTimeMillis,
110
109
  tap,
111
110
  mapError,
112
111
  decodeText,
@@ -117,8 +116,9 @@ import {
117
116
  withDefault,
118
117
  option,
119
118
  String2
120
- } from "./chunk-vktjb2p7.js";
119
+ } from "./chunk-t82w7459.js";
121
120
  import {
121
+ currentTimeMillis,
122
122
  SecureRandom,
123
123
  layerWebCrypto,
124
124
  runMain,
@@ -230,14 +230,14 @@ import {
230
230
  harnessNames,
231
231
  herdrRunnerCapabilities2,
232
232
  declaredChecks
233
- } from "./chunk-mwkn1c5q.js";
233
+ } from "./chunk-4x3zm541.js";
234
234
  import {
235
235
  Id
236
- } from "./chunk-s8m2tzdr.js";
236
+ } from "./chunk-pxvd8w2v.js";
237
237
  import {
238
238
  ChildProcessSpawner,
239
239
  make2
240
- } from "./chunk-4nfan8t6.js";
240
+ } from "./chunk-vxfajzpz.js";
241
241
 
242
242
  // apps/cli/src/cli-error.ts
243
243
  function cliErrorCode(error, status) {
@@ -991,10 +991,10 @@ var sandboxMissing = (sandbox, missing) => ({
991
991
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
992
992
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
993
993
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
994
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-hg8wgm04.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
994
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-t37qzgmb.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
995
995
  });
996
996
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
997
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-hg8wgm04.js")), (module) => module.updateHerdrCore(options))
997
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-t37qzgmb.js")), (module) => module.updateHerdrCore(options))
998
998
  });
999
999
  var herdrCoreMissing = (error) => {
1000
1000
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1420,7 +1420,7 @@ var syncTargets = (harness) => gen(function* () {
1420
1420
  });
1421
1421
  var syncKits = (input) => gen(function* () {
1422
1422
  const fs = yield* FileSystem;
1423
- const { syncKitSetup } = yield* promise(() => import("./chunk-s06x2ktk.js"));
1423
+ const { syncKitSetup } = yield* promise(() => import("./chunk-byg71zra.js"));
1424
1424
  const harnesses = yield* syncTargets(input.harness);
1425
1425
  const chain = yield* input.client.getKitChain(input.workspaceId);
1426
1426
  for (const { name, problem } of chain.skipped)
@@ -2339,7 +2339,7 @@ var package_default = {
2339
2339
  };
2340
2340
 
2341
2341
  // apps/cli/src/scaffold.ts
2342
- var cliVersion = "0.13.6";
2342
+ var cliVersion = "0.13.7";
2343
2343
  var packageJson = (name, scaffold) => `${JSON.stringify({
2344
2344
  name,
2345
2345
  private: true,
@@ -2491,7 +2491,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
2491
2491
 
2492
2492
  // apps/cli/src/commands.ts
2493
2493
  var ClientId = "kitman-cli";
2494
- var agentRuntime = promise(() => import("./chunk-a0wt1r43.js"));
2494
+ var agentRuntime = promise(() => import("./chunk-jbjz7b6n.js"));
2495
2495
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
2496
2496
  defaultValue: () => gen(function* () {
2497
2497
  const tui = yield* tryPromise({
@@ -3515,7 +3515,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
3515
3515
  });
3516
3516
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
3517
3517
  defaultValue: () => (options) => gen(function* () {
3518
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-9t8afbrw.js"));
3518
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-m406nanz.js"));
3519
3519
  return yield* makeRunnerRpcClient({
3520
3520
  runnerId: options.runnerId,
3521
3521
  bearer: options.bearer,
@@ -4072,7 +4072,7 @@ function mcpCommand(args) {
4072
4072
  if (command.action === "run") {
4073
4073
  if (command.args.length > 0)
4074
4074
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
4075
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-89hds8q4.js"));
4075
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-xt97vb58.js"));
4076
4076
  return yield* runMcpServerCommand({ flags: command.flags });
4077
4077
  }
4078
4078
  if (command.action !== "setup")
@@ -4560,7 +4560,7 @@ function programLoopCommand(command) {
4560
4560
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
4561
4561
  });
4562
4562
  }
4563
- var docsModule = promise(() => import("./chunk-j974anp7.js"));
4563
+ var docsModule = promise(() => import("./chunk-8v0t5kzg.js"));
4564
4564
  function docsCommand(args) {
4565
4565
  return gen(function* () {
4566
4566
  const command = parseCommand(args);
@@ -5394,9 +5394,9 @@ function changeRequestCommand(args) {
5394
5394
  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}`);
5395
5395
  });
5396
5396
  }
5397
- var KitWriter = map8(promise(() => import("./chunk-qj412x98.js")), (build) => build.writeKit);
5397
+ var KitWriter = map8(promise(() => import("./chunk-bs5bh8ys.js")), (build) => build.writeKit);
5398
5398
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
5399
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-qj412x98.js")), (build) => build.buildKit(directory))
5399
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-bs5bh8ys.js")), (build) => build.buildKit(directory))
5400
5400
  });
5401
5401
  var uploadKit = (client, workspaceId, built) => gen(function* () {
5402
5402
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -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-x3cc7dfc.js";
36
- import"./chunk-s8m2tzdr.js";
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-mwkn1c5q.js";
49
- import {
50
- decodeText,
51
- mkString,
52
- FileSystem,
53
- Path,
54
- withDefault,
55
- String2
56
- } from "./chunk-vktjb2p7.js";
56
+ } from "./chunk-4x3zm541.js";
57
57
  import {
58
58
  Packument,
59
59
  tarballMatches
60
- } from "./chunk-cg3xstek.js";
61
- import"./chunk-at4e0xvg.js";
60
+ } from "./chunk-m079pjdy.js";
61
+ import"./chunk-x44re8th.js";
62
62
  import {
63
63
  AgentDeclaration,
64
64
  KitDeclarations,
65
65
  describeFlag,
66
66
  Described
67
- } from "./chunk-vmzr8xcg.js";
67
+ } from "./chunk-4bgj3b5r.js";
68
68
  import {
69
69
  ChildProcessSpawner,
70
70
  make2
71
- } from "./chunk-4nfan8t6.js";
72
- import"./chunk-r08sz4ry.js";
71
+ } from "./chunk-vxfajzpz.js";
72
+ import"./chunk-1nxcn08k.js";
73
73
 
74
74
  // packages/sdk/src/build/index.ts
75
75
  class DependencyInstallFailed extends TaggedError2()("DependencyInstallFailed", {