@kitman-sh/cli 0.13.6 → 0.13.8

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-s06x2ktk.js → chunk-08dyrk6y.js} +7 -7
  2. package/dist/{chunk-vktjb2p7.js → chunk-0h49y8gf.js} +164 -36
  3. package/dist/{chunk-2x1q8z5t.js → chunk-5zhh41gb.js} +4 -4
  4. package/dist/{chunk-27pv44t3.js → chunk-5zth85pj.js} +2 -2
  5. package/dist/{chunk-vmzr8xcg.js → chunk-7bytsxkf.js} +7 -5
  6. package/dist/{chunk-9t8afbrw.js → chunk-96svx416.js} +6 -6
  7. package/dist/{chunk-xc1grg7y.js → chunk-a24jc5rx.js} +69 -47
  8. package/dist/{chunk-cg3xstek.js → chunk-byeasm6x.js} +3 -3
  9. package/dist/{chunk-hg8wgm04.js → chunk-c4ccpwjy.js} +4 -4
  10. package/dist/{chunk-cabmcvy1.js → chunk-cbpb2rww.js} +7 -7
  11. package/dist/{chunk-at4e0xvg.js → chunk-cq2h8q9e.js} +7 -7
  12. package/dist/{chunk-xy7ze8dj.js → chunk-eg1n8wvf.js} +36 -22
  13. package/dist/{chunk-j974anp7.js → chunk-ff1r9vcq.js} +1 -1
  14. package/dist/{chunk-89hds8q4.js → chunk-gj1padza.js} +156 -89
  15. package/dist/{chunk-mm2m3bys.js → chunk-gq7y5v3e.js} +1 -1
  16. package/dist/{chunk-qj412x98.js → chunk-gr17n0z3.js} +11 -11
  17. package/dist/{chunk-bz4bp0q7.js → chunk-gy9rf14f.js} +3 -3
  18. package/dist/{chunk-r08sz4ry.js → chunk-h1rmw7yk.js} +6 -6
  19. package/dist/{chunk-4nfan8t6.js → chunk-mtkstrh3.js} +60 -14
  20. package/dist/{chunk-s8m2tzdr.js → chunk-q5w3v4k1.js} +1 -1
  21. package/dist/{chunk-mwkn1c5q.js → chunk-vm2qy986.js} +129 -111
  22. package/dist/{chunk-skqn4h13.js → chunk-y1krmnbv.js} +2 -2
  23. package/dist/{chunk-a0wt1r43.js → chunk-z68rzf0f.js} +23 -23
  24. package/dist/{chunk-x3cc7dfc.js → chunk-zw3gf6r5.js} +40 -226
  25. package/dist/{chunk-3teferzd.js → chunk-zz589n7a.js} +7 -7
  26. package/dist/index.js +4 -4
  27. package/package.json +1 -1
@@ -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. Write it in the Task's \`promise\`. 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. When the Promise is open-ended, list them in \`outOfScope\`.
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,9 @@ 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.
903
+
904
+ A Team can require agents to state a Task's scope. An owner or admin turns on **Agents must state a Task's scope** under **Settings**, **Forges**, **Edit delivery**, or a signed-in person with access to the Team runs \`kitman team scope <team> required\`; an agent cannot change it. A Task an agent creates without a Promise is then refused with [how to scope a Task](/docs/scope-tasks), and it creates the Task again with one. A Task from a person, an Event, an alert, launch words, a plan ticket or a Proposal a person approves needs none.
883
905
 
884
906
  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
907
 
@@ -1509,7 +1531,7 @@ var pathOfLink = (link) => {
1509
1531
  return page === null ? link : page[1] || "index";
1510
1532
  };
1511
1533
  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}/`);
1534
+ var pinnedLink2 = (link, version = "0.13.8") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
1513
1535
  var pageOf = (path) => path.split("#")[0];
1514
1536
  var exportName = (section) => section.path.startsWith("sdk/") ? section.path.split("#")[1] ?? "" : "";
1515
1537
  function excerpt(text, queryTerms) {
@@ -24,11 +24,11 @@ import {
24
24
  Record,
25
25
  Int,
26
26
  fromJsonString
27
- } from "./chunk-x3cc7dfc.js";
27
+ } from "./chunk-zw3gf6r5.js";
28
28
  import {
29
29
  withDefault,
30
30
  String2
31
- } from "./chunk-vktjb2p7.js";
31
+ } from "./chunk-0h49y8gf.js";
32
32
  import {
33
33
  newerKitmanVersion,
34
34
  digestSha256,
@@ -39,7 +39,7 @@ import {
39
39
  get2,
40
40
  layer4,
41
41
  KitDigest
42
- } from "./chunk-mwkn1c5q.js";
42
+ } from "./chunk-vm2qy986.js";
43
43
 
44
44
  // packages/core/src/npm-registry.ts
45
45
  var KitManifest = Struct({
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-4nfan8t6.js";
2
+ import"./chunk-mtkstrh3.js";
3
3
  import {
4
4
  HERDR_CORE_GENERATION2,
5
5
  HERDR_CORE_INSTALL_COMMAND2,
@@ -12,9 +12,9 @@ import {
12
12
  herdrCoreLayer2,
13
13
  herdrCoreTransportLayer2,
14
14
  updateHerdrCore2
15
- } from "./chunk-mwkn1c5q.js";
16
- import"./chunk-vktjb2p7.js";
17
- import"./chunk-x3cc7dfc.js";
15
+ } from "./chunk-vm2qy986.js";
16
+ import"./chunk-0h49y8gf.js";
17
+ import"./chunk-zw3gf6r5.js";
18
18
  export {
19
19
  HERDR_CORE_GENERATION2 as HERDR_CORE_GENERATION,
20
20
  HERDR_CORE_INSTALL_COMMAND2 as HERDR_CORE_INSTALL_COMMAND,
@@ -25,16 +25,16 @@ import {
25
25
  isJsonObject,
26
26
  isString2,
27
27
  encodeUnknownJsonStringSync
28
- } from "./chunk-x3cc7dfc.js";
28
+ } from "./chunk-zw3gf6r5.js";
29
29
  import {
30
- make10,
30
+ make11,
31
31
  runForEach,
32
32
  compiled2
33
- } from "./chunk-vktjb2p7.js";
33
+ } from "./chunk-0h49y8gf.js";
34
34
  import {
35
35
  ChildProcessSpawner,
36
- make2
37
- } from "./chunk-4nfan8t6.js";
36
+ make3
37
+ } from "./chunk-mtkstrh3.js";
38
38
 
39
39
  // packages/agent-runtime/src/opencode-store.ts
40
40
  import { lstatSync, readFileSync, realpathSync } from "fs";
@@ -167,8 +167,8 @@ var opencodeReaderCommand = () => compiled2 ? [process.execPath, "opencode-read"
167
167
  var isolatedRead = (store, name, input) => gen(function* () {
168
168
  const spawner = yield* ChildProcessSpawner;
169
169
  const [command, ...args] = opencodeReaderCommand();
170
- const handle = yield* spawner.spawn(make2(command, args, {
171
- stdin: make10(new TextEncoder().encode(encodeUnknownJsonStringSync({ store, name, input }))),
170
+ const handle = yield* spawner.spawn(make3(command, args, {
171
+ stdin: make11(new TextEncoder().encode(encodeUnknownJsonStringSync({ store, name, input }))),
172
172
  stderr: "ignore",
173
173
  extendEnv: false,
174
174
  env: {},
@@ -6,10 +6,10 @@ import {
6
6
  gen,
7
7
  flatMap3,
8
8
  provideContext2
9
- } from "./chunk-x3cc7dfc.js";
9
+ } from "./chunk-zw3gf6r5.js";
10
10
  import {
11
11
  runForEach
12
- } from "./chunk-vktjb2p7.js";
12
+ } from "./chunk-0h49y8gf.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-mwkn1c5q.js";
22
+ } from "./chunk-vm2qy986.js";
23
23
  import {
24
24
  layerJson,
25
- make3,
25
+ make4,
26
26
  withHeaders,
27
27
  layerProtocolSocket
28
- } from "./chunk-r08sz4ry.js";
28
+ } from "./chunk-h1rmw7yk.js";
29
29
 
30
30
  // packages/live/src/rpc/runner-client.ts
31
31
  var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
@@ -46,7 +46,7 @@ var authorizer = (options) => (call) => flatMap3(options.bearer, (token) => with
46
46
  var RunnerProcessRpcs = RunnerReplicaRpcs.merge(RunnerRunFileRpcs);
47
47
  var makeRunnerRpcClient2 = (options) => gen(function* () {
48
48
  const protocol = yield* build(options.protocol);
49
- const client = yield* make3(RunnerProcessRpcs).pipe(provideContext2(protocol));
49
+ const client = yield* make4(RunnerProcessRpcs).pipe(provideContext2(protocol));
50
50
  const authorized = authorizer(options);
51
51
  return {
52
52
  claim: (input) => authorized(client.Claim(input)),
@@ -74,7 +74,7 @@ var makeRunnerRpcClient2 = (options) => gen(function* () {
74
74
  });
75
75
  var makeProgramRpcClient2 = (options) => gen(function* () {
76
76
  const protocol = yield* build(options.protocol);
77
- const client = yield* make3(ProgramRpcs).pipe(provideContext2(protocol));
77
+ const client = yield* make4(ProgramRpcs).pipe(provideContext2(protocol));
78
78
  const authorized = authorizer(options);
79
79
  return {
80
80
  recordActivity: (input) => authorized(client.RecordActivity(input)),
@@ -12,7 +12,7 @@ import {
12
12
  succeed,
13
13
  isSuccess,
14
14
  TaggedError,
15
- make15,
15
+ make16,
16
16
  _await,
17
17
  fail5,
18
18
  succeed5,
@@ -104,9 +104,8 @@ import {
104
104
  decodeJsonString,
105
105
  encodeJsonStringSync,
106
106
  encodePrettyJsonString
107
- } from "./chunk-x3cc7dfc.js";
107
+ } from "./chunk-zw3gf6r5.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-0h49y8gf.js";
121
120
  import {
121
+ currentTimeMillis,
122
122
  SecureRandom,
123
123
  layerWebCrypto,
124
124
  runMain,
@@ -167,7 +167,7 @@ import {
167
167
  digestSha256,
168
168
  sha256Hasher,
169
169
  raw,
170
- make4,
170
+ make5,
171
171
  get,
172
172
  put,
173
173
  HttpClient,
@@ -230,14 +230,14 @@ import {
230
230
  harnessNames,
231
231
  herdrRunnerCapabilities2,
232
232
  declaredChecks
233
- } from "./chunk-mwkn1c5q.js";
233
+ } from "./chunk-vm2qy986.js";
234
234
  import {
235
235
  Id
236
- } from "./chunk-s8m2tzdr.js";
236
+ } from "./chunk-q5w3v4k1.js";
237
237
  import {
238
238
  ChildProcessSpawner,
239
- make2
240
- } from "./chunk-4nfan8t6.js";
239
+ make3
240
+ } from "./chunk-mtkstrh3.js";
241
241
 
242
242
  // apps/cli/src/cli-error.ts
243
243
  function cliErrorCode(error, status) {
@@ -488,6 +488,7 @@ var Usage = [
488
488
  " kitman team open <team>",
489
489
  " kitman team invite <team> <person>",
490
490
  " kitman team delivery <team> gated|auto (only a person, signed in as an owner or admin)",
491
+ " kitman team scope <team> required|optional (whether agents must state a Task's scope; only a person)",
491
492
  "",
492
493
  "When Release runs: on each merge, when a Milestone is done, or when a Project is done. A Project inherits its Team's, a Team the Workspace's:",
493
494
  " kitman release workspace [merge|milestone|project] (setting it needs an owner or admin)",
@@ -718,6 +719,7 @@ var examples = [
718
719
  "kitman team open platform",
719
720
  "kitman team invite platform ada@example.com",
720
721
  "kitman team delivery platform gated",
722
+ "kitman team scope platform required",
721
723
  "kitman release workspace merge",
722
724
  "kitman release team platform milestone",
723
725
  'kitman release project "Loop stability" inherit',
@@ -991,10 +993,10 @@ var sandboxMissing = (sandbox, missing) => ({
991
993
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
992
994
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
993
995
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
994
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-hg8wgm04.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
996
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-c4ccpwjy.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
995
997
  });
996
998
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
997
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-hg8wgm04.js")), (module) => module.updateHerdrCore(options))
999
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-c4ccpwjy.js")), (module) => module.updateHerdrCore(options))
998
1000
  });
999
1001
  var herdrCoreMissing = (error) => {
1000
1002
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1420,7 +1422,7 @@ var syncTargets = (harness) => gen(function* () {
1420
1422
  });
1421
1423
  var syncKits = (input) => gen(function* () {
1422
1424
  const fs = yield* FileSystem;
1423
- const { syncKitSetup } = yield* promise(() => import("./chunk-s06x2ktk.js"));
1425
+ const { syncKitSetup } = yield* promise(() => import("./chunk-08dyrk6y.js"));
1424
1426
  const harnesses = yield* syncTargets(input.harness);
1425
1427
  const chain = yield* input.client.getKitChain(input.workspaceId);
1426
1428
  for (const { name, problem } of chain.skipped)
@@ -1937,7 +1939,7 @@ var ServiceManager = Reference("kitman/cli/ServiceManager", {
1937
1939
  run: (command, args) => runCommand2(command, args),
1938
1940
  attach: (command, args) => gen(function* () {
1939
1941
  const spawner = yield* ChildProcessSpawner;
1940
- const handle = yield* spawner.spawn(make2(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1942
+ const handle = yield* spawner.spawn(make3(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1941
1943
  const exitCode = yield* handle.exitCode;
1942
1944
  if (exitCode !== 0)
1943
1945
  return yield* new CommandFailed2({ command, reason: `exit code ${exitCode}` });
@@ -2339,7 +2341,7 @@ var package_default = {
2339
2341
  };
2340
2342
 
2341
2343
  // apps/cli/src/scaffold.ts
2342
- var cliVersion = "0.13.6";
2344
+ var cliVersion = "0.13.8";
2343
2345
  var packageJson = (name, scaffold) => `${JSON.stringify({
2344
2346
  name,
2345
2347
  private: true,
@@ -2491,7 +2493,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
2491
2493
 
2492
2494
  // apps/cli/src/commands.ts
2493
2495
  var ClientId = "kitman-cli";
2494
- var agentRuntime = promise(() => import("./chunk-a0wt1r43.js"));
2496
+ var agentRuntime = promise(() => import("./chunk-z68rzf0f.js"));
2495
2497
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
2496
2498
  defaultValue: () => gen(function* () {
2497
2499
  const tui = yield* tryPromise({
@@ -3143,6 +3145,18 @@ function teamCommand(args) {
3143
3145
  yield* client.updateTeamDeliverySettings(team.id, { delivery, expectedRevision: revision });
3144
3146
  return yield* log(delivery === "auto" ? `${team.key} delivers in full auto: a passing Review of the head approves it, and its Loops merge and release with nobody asked` : `${team.key} is gated: a person approves each merge and release`);
3145
3147
  }
3148
+ if (command.action === "scope") {
3149
+ const team = yield* teamNamed(client, workspaceId, requiredArg(command, "team"));
3150
+ const scope = command.args[1];
3151
+ if (scope !== "required" && scope !== "optional")
3152
+ return yield* new CliError({ message: "team scope requires <team> required|optional" });
3153
+ const { revision } = yield* client.getTeamDeliverySettings(team.id);
3154
+ yield* client.updateTeamDeliverySettings(team.id, {
3155
+ agentsStateScope: scope === "required",
3156
+ expectedRevision: revision
3157
+ });
3158
+ return yield* log(scope === "required" ? `${team.key}'s agents must state a Task's scope: one without a Promise is refused, with how to scope it` : `${team.key}'s agents may leave out a Task's scope`);
3159
+ }
3146
3160
  if (command.action === "invite") {
3147
3161
  const team = yield* teamNamed(client, workspaceId, requiredArg(command, "team"));
3148
3162
  const userId = command.args[1];
@@ -3515,7 +3529,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
3515
3529
  });
3516
3530
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
3517
3531
  defaultValue: () => (options) => gen(function* () {
3518
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-9t8afbrw.js"));
3532
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-96svx416.js"));
3519
3533
  return yield* makeRunnerRpcClient({
3520
3534
  runnerId: options.runnerId,
3521
3535
  bearer: options.bearer,
@@ -3820,7 +3834,7 @@ function startCanonicalHerdrRunnerCommand(input) {
3820
3834
  const checkouts = runCheckouts(path.join(runnerRootDir, ".kitman"), rpc.gitCredential);
3821
3835
  yield* controlPlane.client.listRepoBindings(runner.workspaceId).pipe(flatMap3(({ items }) => forEach(items.filter((binding) => binding.status === "active" && (teamId === undefined || binding.teamId === teamId)), (repoBinding) => map8(checkouts.reaches(repoBinding), (reachable) => ({ repoBinding, reachable })), { concurrency: 4 })), tap2((probed) => sync2(() => reached = probed)), catch_((error) => logWarning("runner_repository_probe_failed", error.message)), flatMap3(() => sleep(reached.some((probe) => !probe.reachable) ? repositoryRetryInterval : repositoryProbeInterval)), forever, forkScoped);
3822
3836
  const platform = yield* context();
3823
- const updated = yield* make15();
3837
+ const updated = yield* make16();
3824
3838
  const scope = yield* scope2;
3825
3839
  const startUpdate = (update) => update.pipe(catch_((error) => andThen2(restartOntoUpdate(input.runnerId), fail5(updated, error))), provideContext2(platform), forkIn(scope), asVoid);
3826
3840
  const refusedForProtocol = container ? updater.stopWhenDrained(new RunnerStopped({ problem: updateRequired })).pipe(catch_((stopped) => fail5(updated, stopped)), forkIn(scope), asVoid) : startUpdate(updater.updateRequired);
@@ -4072,7 +4086,7 @@ function mcpCommand(args) {
4072
4086
  if (command.action === "run") {
4073
4087
  if (command.args.length > 0)
4074
4088
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
4075
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-89hds8q4.js"));
4089
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-gj1padza.js"));
4076
4090
  return yield* runMcpServerCommand({ flags: command.flags });
4077
4091
  }
4078
4092
  if (command.action !== "setup")
@@ -4560,7 +4574,7 @@ function programLoopCommand(command) {
4560
4574
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
4561
4575
  });
4562
4576
  }
4563
- var docsModule = promise(() => import("./chunk-j974anp7.js"));
4577
+ var docsModule = promise(() => import("./chunk-ff1r9vcq.js"));
4564
4578
  function docsCommand(args) {
4565
4579
  return gen(function* () {
4566
4580
  const command = parseCommand(args);
@@ -5394,9 +5408,9 @@ function changeRequestCommand(args) {
5394
5408
  yield* log(command.action === "approve" ? `Approved ${short} of ${changeRequest.title}. A Run waiting on approval of ${short} resumes; one waiting on another head does not.` : `Requested changes to ${short} of ${changeRequest.title}`);
5395
5409
  });
5396
5410
  }
5397
- var KitWriter = map8(promise(() => import("./chunk-qj412x98.js")), (build) => build.writeKit);
5411
+ var KitWriter = map8(promise(() => import("./chunk-gr17n0z3.js")), (build) => build.writeKit);
5398
5412
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
5399
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-qj412x98.js")), (build) => build.buildKit(directory))
5413
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-gr17n0z3.js")), (build) => build.buildKit(directory))
5400
5414
  });
5401
5415
  var uploadKit = (client, workspaceId, built) => gen(function* () {
5402
5416
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -6173,7 +6187,7 @@ function downloadPresignedAsset(download, outputPath) {
6173
6187
  return gen(function* () {
6174
6188
  const fs = yield* FileSystem;
6175
6189
  const failed = (cause) => new CliError({ message: `Asset download failed: ${String(cause)}` });
6176
- const response = yield* send(make4(download.method)(download.url), failed);
6190
+ const response = yield* send(make5(download.method)(download.url), failed);
6177
6191
  if (response.status < 200 || response.status >= 300)
6178
6192
  return yield* new CliError({ message: `Asset download failed with ${response.status}` });
6179
6193
  const body = yield* response.arrayBuffer.pipe(mapError2((error) => failed(error.message)));
@@ -4,7 +4,7 @@ import {
4
4
  searchDocs2,
5
5
  readDoc2,
6
6
  pinnedLink2
7
- } from "./chunk-xc1grg7y.js";
7
+ } from "./chunk-a24jc5rx.js";
8
8
  export {
9
9
  DefaultDocsSearchLimit2 as DefaultDocsSearchLimit,
10
10
  pinnedLink2 as pinnedLink,