@kitman-sh/cli 0.11.7 → 0.12.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-y1rfbqaf.js → chunk-1sy32p83.js} +5 -4
- package/dist/{chunk-g31s31k7.js → chunk-66xhktcp.js} +162 -45
- package/dist/{chunk-0wv30032.js → chunk-82xjnghh.js} +3 -3
- package/dist/{chunk-ntfk63fx.js → chunk-8yyj061t.js} +1 -1
- package/dist/chunk-a8jgegds.js +13 -0
- package/dist/{chunk-sr6ag7ye.js → chunk-bjnvrsej.js} +69 -15
- package/dist/{chunk-5wvqtbfp.js → chunk-dc57c8s5.js} +21 -5
- package/dist/{chunk-z2dnw6ey.js → chunk-ejhfa1t6.js} +1 -1
- package/dist/{chunk-akzke77d.js → chunk-kfwp70pn.js} +2 -2
- package/dist/{chunk-8zg8nv7h.js → chunk-p3jbjz2a.js} +3 -3
- package/dist/{chunk-f3cbjk00.js → chunk-rm3vqk5d.js} +1 -1
- package/dist/{chunk-z9zqctv2.js → chunk-rr0yw34p.js} +1 -1
- package/dist/{chunk-m1sqgdym.js → chunk-s7xcdcqx.js} +175 -27
- package/dist/{chunk-c41b37fd.js → chunk-tcyqkqzj.js} +5 -5
- package/dist/chunk-wf8ajpyy.js +1460 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -37,10 +37,10 @@ import {
|
|
|
37
37
|
AgentHarnessIds,
|
|
38
38
|
sha2562,
|
|
39
39
|
runCommand2
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-dc57c8s5.js";
|
|
41
41
|
import {
|
|
42
42
|
NpmRegistry
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-ejhfa1t6.js";
|
|
44
44
|
|
|
45
45
|
// packages/agent-runtime/src/config-convergence.ts
|
|
46
46
|
var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
|
|
@@ -440,6 +440,7 @@ For repeated queue-draining orchestration across many ready Tasks, use the separ
|
|
|
440
440
|
1. Identify the Task from the user, assignment, Code Mode MCP operations, or claimable Task operations.
|
|
441
441
|
2. When the user asks for the current Team ID or Team context, call Code Mode MCP \`kitman.context.resolveTeam({})\` first and answer from its canonical result. Do not infer Team context from local repository search, environment variables, or local config unless MCP resolution is unavailable and you report that limitation.
|
|
442
442
|
3. Use Code Mode MCP operation search when you do not know the exact SDK/API operation. MCP should have public API/CLI parity; missing parity is a Kitman bug to record or report.
|
|
443
|
+
To learn how Kitman works, such as Kits, Agents and their layers (\`extends\`, \`harness\`, \`fallbacks\`), Loops, Runners or a CLI command, search its docs with \`kitman.docs.search({ query })\` in Code Mode or \`kitman docs search "<query>"\`, and read a section with \`kitman.docs.read({ path })\` or \`kitman docs read <path>\`. Do this before reading the SDK's \`.d.ts\` files or guessing CLI syntax.
|
|
443
444
|
4. If runtime binding is missing, inspect Workspace and Team RepoBindings and create only non-secret RepoBindings when authorized.
|
|
444
445
|
5. If blocked by dependencies or missing context, record the blocker or propose a graph change instead of forcing execution.
|
|
445
446
|
6. Move status to \`in_progress\` only when work actually starts.
|
|
@@ -500,7 +501,7 @@ Use \`kitman.searchOperations({ query })\` for tokenized descriptor search.
|
|
|
500
501
|
async ({ operations }) => {
|
|
501
502
|
return operations
|
|
502
503
|
.filter((operation) => /task|context|session/i.test(\`\${operation.name} \${operation.summary}\`))
|
|
503
|
-
.map(({ name, summary,
|
|
504
|
+
.map(({ name, summary, path, inputTypeScript }) => ({ name, summary, path, inputTypeScript }));
|
|
504
505
|
}
|
|
505
506
|
\`\`\`
|
|
506
507
|
|
|
@@ -631,7 +632,7 @@ async ({ kitman }) => {
|
|
|
631
632
|
}
|
|
632
633
|
\`\`\`
|
|
633
634
|
`,
|
|
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,
|
|
635
|
+
"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',
|
|
635
636
|
"references/privacy-and-safety.md": `# Privacy And Safety
|
|
636
637
|
|
|
637
638
|
Kitman is durable shared state. Treat every SessionUpdate, Memory proposal, ContextPack, and handoff as something future humans and Agents may read.
|