@kitman-sh/cli 0.10.78 → 0.10.80

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 (26) hide show
  1. package/dist/{chunk-bqpj1be3.js → chunk-0dwnwx45.js} +6 -132
  2. package/dist/{chunk-k0bjhj9m.js → chunk-0wy2gwj2.js} +8 -8
  3. package/dist/{chunk-cn6h21ar.js → chunk-1xn27063.js} +5 -5
  4. package/dist/{chunk-76ctrqm6.js → chunk-2afjvt1c.js} +1 -1
  5. package/dist/{chunk-9zd52pda.js → chunk-4tjeks83.js} +5 -5
  6. package/dist/{chunk-apjzbve5.js → chunk-5v9pywm3.js} +151 -53
  7. package/dist/{chunk-g4j97dv5.js → chunk-61jk9k82.js} +269 -187
  8. package/dist/{chunk-5aebee0q.js → chunk-7b6qsc4y.js} +23 -23
  9. package/dist/{chunk-tzz4fv17.js → chunk-80z95x19.js} +1 -1
  10. package/dist/{chunk-whyjvrf2.js → chunk-84gm9qq8.js} +27 -26
  11. package/dist/{chunk-xb70ys3n.js → chunk-bxxym84e.js} +31 -165
  12. package/dist/{chunk-b0cscqbw.js → chunk-ctfv3bg6.js} +2 -2
  13. package/dist/{chunk-nnq8d7k0.js → chunk-czxcs1ce.js} +7 -7
  14. package/dist/{chunk-bj8jqwk3.js → chunk-f3k1vjtf.js} +21 -21
  15. package/dist/{chunk-545b129z.js → chunk-fwsq4r8a.js} +9 -2
  16. package/dist/{chunk-t07tn0ay.js → chunk-hr6etnzn.js} +4 -4
  17. package/dist/{chunk-fq47a5yd.js → chunk-kjms81x1.js} +2 -2
  18. package/dist/{chunk-5sdw5ws3.js → chunk-twms8y72.js} +4 -4
  19. package/dist/{chunk-jbwk6k6m.js → chunk-v9nqb2tp.js} +226 -40
  20. package/dist/{chunk-6h16wtxk.js → chunk-vcvnk771.js} +4 -4
  21. package/dist/{chunk-98sg1yyd.js → chunk-wqv9y3dk.js} +14 -60
  22. package/dist/{chunk-e8zm8z3a.js → chunk-xkqbgz5j.js} +8 -8
  23. package/dist/{chunk-697qeg1j.js → chunk-yp10rhmv.js} +7 -7
  24. package/dist/{chunk-qbsqc416.js → chunk-z0tv3ak5.js} +3 -3
  25. package/dist/index.js +4 -4
  26. package/package.json +1 -1
@@ -23,24 +23,24 @@ import {
23
23
  fnUntraced,
24
24
  encodePrettyJsonString,
25
25
  decodeJsonStringSync
26
- } from "./chunk-jbwk6k6m.js";
26
+ } from "./chunk-v9nqb2tp.js";
27
27
  import {
28
28
  isJsonObject,
29
29
  isString
30
- } from "./chunk-tzz4fv17.js";
30
+ } from "./chunk-80z95x19.js";
31
31
  import {
32
32
  FileSystem,
33
33
  Path,
34
34
  optionalEnv
35
- } from "./chunk-xb70ys3n.js";
35
+ } from "./chunk-bxxym84e.js";
36
36
  import {
37
37
  AgentHarnessIds,
38
38
  sha2562,
39
39
  runCommand2
40
- } from "./chunk-g4j97dv5.js";
40
+ } from "./chunk-61jk9k82.js";
41
41
  import {
42
42
  NpmRegistry
43
- } from "./chunk-qbsqc416.js";
43
+ } from "./chunk-z0tv3ak5.js";
44
44
 
45
45
  // packages/agent-runtime/src/config-convergence.ts
46
46
  var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
@@ -631,133 +631,7 @@ async ({ kitman }) => {
631
631
  }
632
632
  \`\`\`
633
633
  `,
634
- "references/mcp-tools.md": `# Kitman Code Mode MCP
635
-
636
- Kitman 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.
637
-
638
- ## Default Tools
639
-
640
- Use these as the normal MCP entry points:
641
-
642
- - \`execute\`: execute JavaScript that calls typed \`kitman.*\` public operations through a host-side SDK/API proxy.
643
- - \`skills\`: fetch on-demand Code Mode guidance, especially \`skills({ name: "execute" })\`.
644
- - \`resume\`: resume paused approval or elicitation flows when the MCP session exposes it.
645
-
646
- ## Auth, Grants, And Fallbacks
647
-
648
- Local 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.
649
-
650
- The 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.
651
-
652
- If 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.
653
-
654
- Use 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.
655
-
656
- ## Team Context
657
-
658
- Repo-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.
659
-
660
- When the user asks for the current Team ID or Team context, use Code Mode MCP resolution before inspecting local files or searching the repository:
661
-
662
- \`\`\`execute
663
- async ({ kitman }) => await kitman.context.resolveTeam({})
664
- \`\`\`
665
-
666
- Answer 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.
667
-
668
- Local 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.
669
-
670
- Workspace 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.
671
-
672
- When a mutation is ambiguous, retry with explicit canonical IDs such as \`workspaceId\`, \`teamId\`, \`taskId\`, \`sessionId\`, \`dependencyId\`, or \`assetId\`.
673
-
674
- ## Code Mode Patterns
675
-
676
- Search when you do not know the operation:
677
-
678
- \`\`\`execute
679
- const query = 'session update';
680
- return kitman.search({ query }).items
681
- .map(({ name, summary, namespacePath, sdk, inputSchema, outputSchema, inputTypeScript, outputTypeScript, examples, auth, approvalPolicy }) => ({
682
- name,
683
- call: \`kitman.\${namespacePath.join('.')}({...})\`,
684
- parameters: sdk.parameters,
685
- inputSchema,
686
- outputSchema,
687
- inputTypeScript,
688
- outputTypeScript,
689
- examples,
690
- auth,
691
- approvalPolicy,
692
- summary
693
- }));
694
- \`\`\`
695
-
696
- Descriptor 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.
697
-
698
- That descriptor output is the source of truth for Code Mode call shape. For example, if the descriptor says \`namespacePath: ['sessions', 'recordUpdate']\` and parameters \`sessionId\` and \`input\`, call \`kitman.sessions.recordUpdate({ sessionId, input })\` through \`execute\`.
699
-
700
- Execute related work through typed operations:
701
-
702
- \`\`\`execute
703
- async ({ kitman }) => {
704
- const team = await kitman.teams.get({ workspaceId: 'workspace_123', teamId: 'team_123' });
705
- if (!team.ok) return team.error;
706
-
707
- const tasks = await kitman.tasks.list({ teamId: 'team_123', options: { statuses: ['ready', 'in_progress'] } });
708
- if (!tasks.ok) return tasks.error;
709
-
710
- return {
711
- team: team.data,
712
- tasks: tasks.data.items.map((task) => ({ id: task.id, teamId: task.teamId, title: task.title, status: task.status }))
713
- };
714
- }
715
- \`\`\`
716
-
717
- Use 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.
718
-
719
- Parallel calls are appropriate for independent reads:
720
-
721
- \`\`\`execute
722
- async ({ kitman }) => {
723
- const [task, dependencies, sessions] = await Promise.all([
724
- kitman.tasks.get({ taskId: 'task_123' }),
725
- kitman.taskDependencies.list({ taskId: 'task_123' }),
726
- kitman.sessions.listForTask({ taskId: 'task_123' })
727
- ]);
728
-
729
- return { task, dependencies, sessions };
730
- }
731
- \`\`\`
732
-
733
- ## Required Work Discipline
734
-
735
- Use Code Mode operations to keep normal Kitman workflow discipline:
736
-
737
- - Resolve or identify the Task before starting work.
738
- - Read TaskDependencies for build order when relevant.
739
- - Generate or read the appropriate ContextPack before implementation or review work.
740
- - Record meaningful findings, decisions, blockers, test results, and file references as SessionUpdates or Task thread entries.
741
- - Propose Memory only when the learning is durable and reusable.
742
- - Link delivery artifacts such as merge requests with \`kitman.taskLinks.create\` and verify them with \`kitman.taskLinks.list\`.
743
- - Generate a handoff before stopping.
744
-
745
- ## Safety Rules
746
-
747
- Never put these in Memory, SessionUpdates, handoffs, examples, or cloud audit metadata:
748
-
749
- - secrets,
750
- - private keys,
751
- - bearer tokens,
752
- - raw auth-store contents,
753
- - raw terminal logs,
754
- - raw source snapshots,
755
- - raw diffs,
756
- - private customer data,
757
- - presigned upload or download URLs.
758
-
759
- Do not use Code Mode to bypass Kitman authorization, Team privacy, human review, Memory approval, Proposal approval, or AgentIdentity lifecycle restrictions.
760
- `,
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, namespacePath, sdk, inputSchema, outputSchema, inputTypeScript, outputTypeScript, examples, auth, approvalPolicy }) => ({\n name,\n call: `kitman.${namespacePath.join(\'.\')}({...})`,\n parameters: sdk.parameters,\n inputSchema,\n outputSchema,\n inputTypeScript,\n outputTypeScript,\n examples,\n auth,\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.\n\nThat descriptor output is the source of truth for Code Mode call shape. For example, if the descriptor says `namespacePath: [\'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',
761
635
  "references/privacy-and-safety.md": `# Privacy And Safety
762
636
 
763
637
  Kitman is durable shared state. Treat every SessionUpdate, Memory proposal, ContextPack, and handoff as something future humans and Agents may read.
@@ -12,30 +12,30 @@ import {
12
12
  orElseSucceed,
13
13
  decodeJsonString,
14
14
  encodePrettyJsonString
15
- } from "./chunk-jbwk6k6m.js";
16
- import"./chunk-545b129z.js";
15
+ } from "./chunk-v9nqb2tp.js";
16
+ import"./chunk-fwsq4r8a.js";
17
17
  import {
18
18
  isJsonObject
19
- } from "./chunk-tzz4fv17.js";
19
+ } from "./chunk-80z95x19.js";
20
20
  import {
21
21
  FileSystem,
22
22
  Path
23
- } from "./chunk-xb70ys3n.js";
23
+ } from "./chunk-bxxym84e.js";
24
24
  import {
25
25
  tomlTableHeader2,
26
26
  tomlKeyPath2,
27
27
  kitmanSkillEntry,
28
28
  isPathWithin2
29
- } from "./chunk-bqpj1be3.js";
29
+ } from "./chunk-0dwnwx45.js";
30
30
  import {
31
31
  instructionsStart,
32
32
  instructionsEnd,
33
33
  renderMcpServer,
34
34
  materializeKitSetup,
35
35
  tomlInline
36
- } from "./chunk-g4j97dv5.js";
37
- import"./chunk-qbsqc416.js";
38
- import"./chunk-98sg1yyd.js";
36
+ } from "./chunk-61jk9k82.js";
37
+ import"./chunk-wqv9y3dk.js";
38
+ import"./chunk-z0tv3ak5.js";
39
39
 
40
40
  // packages/agent-runtime/src/kit-setup-sync.ts
41
41
  class KitSyncError extends TaggedError("KitSyncError") {
@@ -96,7 +96,7 @@ import {
96
96
  Defect,
97
97
  Exit,
98
98
  toCodecJson
99
- } from "./chunk-jbwk6k6m.js";
99
+ } from "./chunk-v9nqb2tp.js";
100
100
  import {
101
101
  interrupt,
102
102
  getCurrent,
@@ -108,7 +108,7 @@ import {
108
108
  shutdownUnsafe,
109
109
  fromQueue,
110
110
  unwrap
111
- } from "./chunk-xb70ys3n.js";
111
+ } from "./chunk-bxxym84e.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-g4j97dv5.js";
126
+ } from "./chunk-61jk9k82.js";
127
127
 
128
128
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/workers/Transferable.js
129
129
  class Collector extends (/* @__PURE__ */ Service2()("effect/workers/Transferable/Collector")) {
@@ -483,7 +483,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
483
483
  };
484
484
  });
485
485
  var clientIdCounter = 0;
486
- var make4 = /* @__PURE__ */ fnUntraced(function* (group, options) {
486
+ var make3 = /* @__PURE__ */ fnUntraced(function* (group, options) {
487
487
  const clientId = clientIdCounter++;
488
488
  const {
489
489
  codecFor,
@@ -829,4 +829,4 @@ var layerProtocolSocket = (options) => effect(Protocol)(makeProtocolSocket(optio
829
829
  class ConnectionHooks extends (/* @__PURE__ */ Service2()("effect/rpc/RpcClient/ConnectionHooks")) {
830
830
  }
831
831
 
832
- export { layerJson, make4, withHeaders, layerProtocolSocket, ConnectionHooks };
832
+ export { layerJson, make3, withHeaders, layerProtocolSocket, ConnectionHooks };
@@ -3,7 +3,7 @@ import {
3
3
  Random,
4
4
  succeed6,
5
5
  withFiber2
6
- } from "./chunk-jbwk6k6m.js";
6
+ } from "./chunk-v9nqb2tp.js";
7
7
 
8
8
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Random.js
9
9
  var Random2 = Random;
@@ -7,11 +7,11 @@ import {
7
7
  decoded2,
8
8
  readOpencode2,
9
9
  runOpencodeReader2
10
- } from "./chunk-e8zm8z3a.js";
11
- import"./chunk-98sg1yyd.js";
12
- import"./chunk-tzz4fv17.js";
13
- import"./chunk-xb70ys3n.js";
14
- import"./chunk-jbwk6k6m.js";
10
+ } from "./chunk-xkqbgz5j.js";
11
+ import"./chunk-wqv9y3dk.js";
12
+ import"./chunk-80z95x19.js";
13
+ import"./chunk-bxxym84e.js";
14
+ import"./chunk-v9nqb2tp.js";
15
15
  export {
16
16
  decoded2 as decoded,
17
17
  decodedOption2 as decodedOption,