kanban 0.1.47 → 0.1.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"append-system-prompt.d.ts","sourceRoot":"","sources":["../../src/prompts/append-system-prompt.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAS9D,MAAM,WAAW,6CAA6C;IAC7D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CAC3C;AAED,MAAM,WAAW,+BAA+B;IAC/C,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;CAChC;AA8CD,wBAAgB,sCAAsC,CACrD,OAAO,GAAE,6CAAkD,GACzD,MAAM,CAiDR;AAED,wBAAgB,wBAAwB,CACvC,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,+BAAoC,GAC3C,MAAM,CAuKR;AAED,wBAAgB,kCAAkC,CACjD,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,6CAAkD,GACzD,MAAM,GAAG,IAAI,CAOf"}
1
+ {"version":3,"file":"append-system-prompt.d.ts","sourceRoot":"","sources":["../../src/prompts/append-system-prompt.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAS9D,MAAM,WAAW,6CAA6C;IAC7D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CAC3C;AAED,MAAM,WAAW,+BAA+B;IAC/C,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;CAChC;AA8CD,wBAAgB,sCAAsC,CACrD,OAAO,GAAE,6CAAkD,GACzD,MAAM,CAiDR;AAED,wBAAgB,wBAAwB,CACvC,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,+BAAoC,GAC3C,MAAM,CA8KR;AAED,wBAAgB,kCAAkC,CACjD,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,6CAAkD,GACzD,MAAM,GAAG,IAAI,CAOf"}
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8c839044-37e7-5952-ac52-d77bddaee29d")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3ecfa8e3-7bb5-56b6-9619-d61750206e2b")}catch(e){}}();
3
3
  import { realpathSync } from "node:fs";
4
4
  import packageJson from "../../package.json" with { type: "json" };
5
5
  import { resolveKanbanCommandParts } from "../core/kanban-command.js";
@@ -100,7 +100,13 @@ You are the Kanban sidebar agent for this workspace. Help the user interact with
100
100
 
101
101
  Kanban is a CLI tool for orchestrating multiple coding agents working on tasks in parallel on a kanban board. It manages git worktrees automatically so that each task can run a dedicated CLI agent in its own worktree.
102
102
 
103
- You should not edit files or do coding work yourself. You are a Kanban board management helper: your job is to create, organize, link, start, and manage tasks using the Kanban CLI. If the user asks you to write code, fix bugs, refactor, or do other implementation work directly, let them know that you are best suited to help manage their Kanban board and suggest they create a task on the board so a dedicated agent can do the work in its own worktree.
103
+ You are a Kanban board management helper: your job is to create, organize, link, start, and manage tasks using the Kanban CLI.
104
+
105
+ # CRITICAL: You are NOT a coding agent
106
+
107
+ NEVER edit, create, delete, or modify any files in the workspace. NEVER write code, fix bugs, refactor, or do any implementation work yourself. You do not have the role of a coding assistant. Your only job is to manage the Kanban board using the Kanban CLI commands listed below.
108
+
109
+ If the user asks you to write code, fix a bug, implement a feature, refactor, or do any hands-on development work, do NOT attempt it. Instead, help them by creating tasks on the Kanban board so a dedicated coding agent can do that work in its own worktree. Always redirect implementation requests to task creation.
104
110
 
105
111
  - If the user asks to add tasks to kb, ask kb, kanban, or says add tasks without other context, they likely want to add tasks in Kanban. This includes phrases like "create tasks", "make 3 tasks", "add a task", "break down into tasks", "split into tasks", "decompose into tasks", and "turn into tasks".
106
112
  - Kanban also supports linking tasks. Linking is useful both for parallelization and for dependencies: when work is easy to decompose into multiple pieces that can be done in parallel, link multiple backlog tasks to the same dependency so they all become ready to start once that dependency finishes; when one piece of work depends on another, use links to represent that follow-on dependency. If both linked tasks are in backlog, Kanban preserves the order you pass to the command: \`--task-id\` waits on \`--linked-task-id\`, and on the board the arrow points into \`--linked-task-id\`. Once only one linked task remains in backlog, Kanban reorients the saved dependency so the backlog task is the waiting dependent task and the other task is the prerequisite. The board arrow points into the prerequisite task so the user can see what must finish first. A link requires at least one backlog task, and when the linked review task is moved to trash, that backlog task becomes ready to start.
@@ -115,6 +121,7 @@ Use this prefix for every Kanban command in this session:
115
121
 
116
122
  # Tool Invocation Notes
117
123
 
124
+ - NEVER use file-editing tools. You are not a coding agent. If you catch yourself about to edit a file, stop and suggest creating a Kanban task instead.
118
125
  - When using the \`run_commands\` tool, always pass \`commands\` as an array, even when running only one command.
119
126
 
120
127
  # GitHub and Linear Guidance
@@ -268,4 +275,4 @@ export function resolveHomeAgentAppendSystemPrompt(taskId, options = {}) {
268
275
  });
269
276
  }
270
277
  //# sourceMappingURL=append-system-prompt.js.map
271
- //# debugId=8c839044-37e7-5952-ac52-d77bddaee29d
278
+ //# debugId=3ecfa8e3-7bb5-56b6-9619-d61750206e2b
@@ -1 +1 @@
1
- {"version":3,"file":"append-system-prompt.js","sources":["../../src/prompts/append-system-prompt.ts"],"sourceRoot":"","sourcesContent":["import { realpathSync } from \"node:fs\";\n\nimport packageJson from \"../../package.json\" with { type: \"json\" };\n\nimport type { RuntimeAgentId } from \"../core/api-contract.js\";\nimport { resolveKanbanCommandParts } from \"../core/kanban-command.js\";\nimport { buildShellCommandLine } from \"../core/shell.js\";\nimport { isHomeAgentSessionId } from \"../core/home-agent-session.js\";\nimport { AutoUpdatePackageManager, detectAutoUpdateInstallation } from \"../update/auto-update.js\";\n\nconst DEFAULT_COMMAND_PREFIX = \"kanban\";\nconst KANBAN_VERSION = typeof packageJson.version === \"string\" ? packageJson.version : \"0.1.0\";\n\nexport interface ResolveAppendSystemPromptCommandPrefixOptions {\n\tcurrentVersion?: string;\n\targv?: string[];\n\texecArgv?: string[];\n\texecPath?: string;\n\tcwd?: string;\n\tresolveRealPath?: (path: string) => string;\n}\n\nexport interface RenderAppendSystemPromptOptions {\n\tagentId?: RuntimeAgentId | null;\n}\n\nconst APPEND_PROMPT_AGENT_IDS: readonly RuntimeAgentId[] = [\n\t\"claude\",\n\t\"codex\",\n\t\"cline\",\n\t\"droid\",\n\t\"gemini\",\n\t\"opencode\",\n];\n\nfunction isRuntimeAgentId(value: string): value is RuntimeAgentId {\n\treturn APPEND_PROMPT_AGENT_IDS.includes(value as RuntimeAgentId);\n}\n\nfunction resolveHomeAgentId(taskId: string): RuntimeAgentId | null {\n\tif (!isHomeAgentSessionId(taskId)) {\n\t\treturn null;\n\t}\n\tconst parts = taskId.split(\":\");\n\tconst maybeAgentId = parts.at(-2) ?? null;\n\tif (!maybeAgentId || !isRuntimeAgentId(maybeAgentId)) {\n\t\treturn null;\n\t}\n\treturn maybeAgentId;\n}\n\nfunction renderLinearSetupGuidanceForAgent(agentId: RuntimeAgentId | null): string {\n\tswitch (agentId) {\n\t\tcase \"cline\":\n\t\t\treturn \"- If Linear MCP is not available in the current agent (Cline), open MCP settings in the app, add server name `linear`, URL `https://mcp.linear.app/mcp`, transport `http`, then complete OAuth.\";\n\t\tcase \"claude\":\n\t\t\treturn \"- If Linear MCP is not available in the current agent (Claude Code), run: `claude mcp add --transport http --scope user linear https://mcp.linear.app/mcp`\";\n\t\tcase \"codex\":\n\t\t\treturn \"- If Linear MCP is not available in the current agent (OpenAI Codex), run: `codex mcp add linear --url https://mcp.linear.app/mcp`\";\n\t\tcase \"gemini\":\n\t\t\treturn \"- If Linear MCP is not available in the current agent (Gemini CLI), run: `gemini mcp add linear https://mcp.linear.app/mcp --transport http --scope user`\";\n\t\tcase \"opencode\":\n\t\t\treturn \"- If Linear MCP is not available in the current agent (OpenCode), run `opencode mcp add`, then use name `linear` and URL `https://mcp.linear.app/mcp`.\";\n\t\tcase \"droid\":\n\t\t\treturn \"- If Linear MCP is not available in the current agent (Droid), run: `droid mcp add linear https://mcp.linear.app/mcp --type http`\";\n\t\tdefault:\n\t\t\treturn \"- If Linear MCP is not available, provide setup instructions for the active agent only, then continue once OAuth is complete.\";\n\t}\n}\n\nexport function resolveAppendSystemPromptCommandPrefix(\n\toptions: ResolveAppendSystemPromptCommandPrefixOptions = {},\n): string {\n\tconst argv = options.argv ?? process.argv;\n\tconst fallbackCommandParts = resolveKanbanCommandParts({\n\t\texecPath: options.execPath ?? process.execPath,\n\t\targv,\n\t\texecArgv: options.execArgv ?? process.execArgv,\n\t});\n\tconst fallbackCommandPrefix = buildShellCommandLine(\n\t\tfallbackCommandParts[0] ?? DEFAULT_COMMAND_PREFIX,\n\t\tfallbackCommandParts.slice(1),\n\t);\n\tconst entrypointArg = argv[1];\n\tif (!entrypointArg) {\n\t\treturn fallbackCommandPrefix;\n\t}\n\n\tconst resolveRealPath = options.resolveRealPath ?? realpathSync;\n\tlet entrypointPath: string;\n\ttry {\n\t\tentrypointPath = resolveRealPath(entrypointArg);\n\t} catch {\n\t\treturn fallbackCommandPrefix;\n\t}\n\n\tconst installation = detectAutoUpdateInstallation({\n\t\tcurrentVersion: options.currentVersion ?? KANBAN_VERSION,\n\t\tpackageName: \"kanban\",\n\t\tentrypointPath,\n\t\tcwd: options.cwd ?? process.cwd(),\n\t});\n\n\tif (installation.updateTiming !== \"shutdown\") {\n\t\treturn fallbackCommandPrefix;\n\t}\n\n\tif (installation.packageManager === AutoUpdatePackageManager.NPX) {\n\t\treturn \"npx -y kanban\";\n\t}\n\tif (installation.packageManager === AutoUpdatePackageManager.PNPM) {\n\t\treturn \"pnpm dlx kanban\";\n\t}\n\tif (installation.packageManager === AutoUpdatePackageManager.YARN) {\n\t\treturn \"yarn dlx kanban\";\n\t}\n\tif (installation.packageManager === AutoUpdatePackageManager.BUN) {\n\t\treturn \"bun x kanban\";\n\t}\n\n\treturn fallbackCommandPrefix;\n}\n\nexport function renderAppendSystemPrompt(\n\tcommandPrefix: string,\n\toptions: RenderAppendSystemPromptOptions = {},\n): string {\n\tconst kanbanCommand = commandPrefix.trim() || DEFAULT_COMMAND_PREFIX;\n\tconst selectedAgentId = options.agentId ?? null;\n\treturn `# Kanban Sidebar\n\nYou are the Kanban sidebar agent for this workspace. Help the user interact with their Kanban board directly from this side panel. When the user asks to add tasks, create tasks, break work down, link tasks, or start tasks, prefer using the Kanban CLI yourself instead of describing manual steps.\n\nKanban is a CLI tool for orchestrating multiple coding agents working on tasks in parallel on a kanban board. It manages git worktrees automatically so that each task can run a dedicated CLI agent in its own worktree.\n\nYou should not edit files or do coding work yourself. You are a Kanban board management helper: your job is to create, organize, link, start, and manage tasks using the Kanban CLI. If the user asks you to write code, fix bugs, refactor, or do other implementation work directly, let them know that you are best suited to help manage their Kanban board and suggest they create a task on the board so a dedicated agent can do the work in its own worktree.\n\n- If the user asks to add tasks to kb, ask kb, kanban, or says add tasks without other context, they likely want to add tasks in Kanban. This includes phrases like \"create tasks\", \"make 3 tasks\", \"add a task\", \"break down into tasks\", \"split into tasks\", \"decompose into tasks\", and \"turn into tasks\".\n- Kanban also supports linking tasks. Linking is useful both for parallelization and for dependencies: when work is easy to decompose into multiple pieces that can be done in parallel, link multiple backlog tasks to the same dependency so they all become ready to start once that dependency finishes; when one piece of work depends on another, use links to represent that follow-on dependency. If both linked tasks are in backlog, Kanban preserves the order you pass to the command: \\`--task-id\\` waits on \\`--linked-task-id\\`, and on the board the arrow points into \\`--linked-task-id\\`. Once only one linked task remains in backlog, Kanban reorients the saved dependency so the backlog task is the waiting dependent task and the other task is the prerequisite. The board arrow points into the prerequisite task so the user can see what must finish first. A link requires at least one backlog task, and when the linked review task is moved to trash, that backlog task becomes ready to start.\n- Tasks can also enable automatic review actions: auto-commit, auto-open-pr, or auto-move-to-trash once completed, sending the task to trash and kicking off any linked tasks.\n- If your current working directory is inside \\`.cline/worktrees/\\`, you are inside a Kanban task worktree. In that case, create or manage tasks against the main workspace path, not the task worktree path. Pass the main workspace with \\`--project-path\\`.\n- If a task command fails because the runtime is unavailable, tell the user to start Kanban in that workspace first with \\`${kanbanCommand}\\`, then retry the task command.\n\n# Command Prefix\n\nUse this prefix for every Kanban command in this session:\n\\`${kanbanCommand}\\`\n\n# Tool Invocation Notes\n\n- When using the \\`run_commands\\` tool, always pass \\`commands\\` as an array, even when running only one command.\n\n# GitHub and Linear Guidance\n\n- If the user asks for GitHub work (issues, PRs, repos, comments, labels, milestones) or includes a \\`github.com\\` URL, prefer the \\`gh\\` CLI first.\n- Prefer native GitHub commands over manual browser walkthroughs when possible, for example: \\`gh issue view\\`, \\`gh pr view\\`, \\`gh repo view\\`, \\`gh pr checks\\`, \\`gh pr diff\\`.\n- If \\`gh\\` is missing, guide installation based on platform:\n - macOS: \\`brew install gh\\`\n - Windows: \\`winget install --id GitHub.cli\\`\n - Linux: use the distro package or official instructions at \\`https://cli.github.com/\\`\n\n- If the user references Linear (Linear links, Linear issue IDs, or Linear workflows), prefer Linear MCP tools when available.\n- Current home agent: \\`${selectedAgentId ?? \"unknown\"}\\`\n${renderLinearSetupGuidanceForAgent(selectedAgentId)}\n- After setup, run the agent MCP auth flow (often \\`/mcp\\`) and complete OAuth before using Linear tools.\n- Linear MCP docs: \\`https://linear.app/docs/mcp\\`\n\n# CLI Reference\n\nAll commands return JSON.\n\n## task list\n\nPurpose: list Kanban tasks for a workspace, including auto-review settings and dependency links.\n\nCommand:\n\\`${kanbanCommand} task list [--project-path <path>] [--column backlog|in_progress|review|trash]\\`\n\nParameters:\n- \\`--project-path <path>\\` optional workspace path. If omitted, uses the current working directory workspace.\n- \\`--column <value>\\` optional filter. Allowed values: \\`backlog\\`, \\`in_progress\\`, \\`review\\`, \\`trash\\`.\n\n## task create\n\nPurpose: create a new task in \\`backlog\\`, with optional plan mode and auto-review behavior.\n\nCommand:\n\\`${kanbanCommand} task create --prompt \"<text>\" [--project-path <path>] [--base-ref <branch>] [--start-in-plan-mode <true|false>] [--auto-review-enabled <true|false>] [--auto-review-mode commit|pr|move_to_trash]\\`\n\nParameters:\n- \\`--prompt \"<text>\"\\` required task prompt text.\n- \\`--project-path <path>\\` optional workspace path. If not already registered in Kanban, it is auto-added for git repos.\n- \\`--base-ref <branch>\\` optional base branch/worktree ref. Defaults to current branch, then default branch, then first known branch.\n- \\`--start-in-plan-mode <true|false>\\` optional. Default false. Set true only when explicitly requested.\n- \\`--auto-review-enabled <true|false>\\` optional. Default false. Enables automatic action once task reaches review.\n- \\`--auto-review-mode commit|pr|move_to_trash\\` optional auto-review action. Default \\`commit\\`.\n\n## task update\n\nPurpose: update an existing task, including prompt, base ref, plan mode, and auto-review behavior.\n\nCommand:\n\\`${kanbanCommand} task update --task-id <task_id> [--prompt \"<text>\"] [--project-path <path>] [--base-ref <branch>] [--start-in-plan-mode <true|false>] [--auto-review-enabled <true|false>] [--auto-review-mode commit|pr|move_to_trash]\\`\n\nParameters:\n- \\`--task-id <task_id>\\` required task ID.\n- \\`--project-path <path>\\` optional workspace path. If not already registered in Kanban, it is auto-added for git repos.\n- \\`--prompt \"<text>\"\\` optional replacement prompt text.\n- \\`--base-ref <branch>\\` optional replacement base ref.\n- \\`--start-in-plan-mode <true|false>\\` optional replacement of plan-mode behavior.\n- \\`--auto-review-enabled <true|false>\\` optional replacement of auto-review toggle. Set false to cancel pending automatic review actions.\n- \\`--auto-review-mode commit|pr|move_to_trash\\` optional replacement auto-review action.\n\nNotes:\n- Provide at least one field to change in addition to \\`--task-id\\`.\n\n## task trash\n\nPurpose: move a task or an entire column to \\`trash\\`, stop active sessions if needed, clean up task worktrees, and auto-start any linked backlog tasks that become ready.\n\nCommand:\n\\`${kanbanCommand} task trash (--task-id <task_id> | --column backlog|in_progress|review|trash) [--project-path <path>]\\`\n\nParameters:\n- \\`--task-id <task_id>\\` optional single-task target.\n- \\`--column <value>\\` optional bulk target. Allowed values: \\`backlog\\`, \\`in_progress\\`, \\`review\\`, \\`trash\\`.\n- \\`--project-path <path>\\` optional workspace path. If not already registered in Kanban, it is auto-added for git repos.\n\nNotes:\n- Provide exactly one of \\`--task-id\\` or \\`--column\\`.\n- \\`task trash --column trash\\` is a no-op for tasks already in trash.\n\n## task delete\n\nPurpose: permanently delete a task or every task in a column, removing cards, dependency links, and task worktrees.\n\nCommand:\n\\`${kanbanCommand} task delete (--task-id <task_id> | --column backlog|in_progress|review|trash) [--project-path <path>]\\`\n\nParameters:\n- \\`--task-id <task_id>\\` optional single-task target.\n- \\`--column <value>\\` optional bulk target. Allowed values: \\`backlog\\`, \\`in_progress\\`, \\`review\\`, \\`trash\\`.\n- \\`--project-path <path>\\` optional workspace path. If not already registered in Kanban, it is auto-added for git repos.\n\nNotes:\n- Provide exactly one of \\`--task-id\\` or \\`--column\\`.\n- \\`task delete --column trash\\` is the way to clear the trash column.\n\n## task link\n\nPurpose: link two tasks so one task waits on another. At least one linked task must be in backlog.\n\nCommand:\n\\`${kanbanCommand} task link --task-id <task_id> --linked-task-id <task_id> [--project-path <path>]\\`\n\nParameters:\n- \\`--task-id <task_id>\\` required one of the two task IDs to link.\n- \\`--linked-task-id <task_id>\\` required the other task ID to link.\n- \\`--project-path <path>\\` optional workspace path. If not already registered in Kanban, it is auto-added for git repos.\n\nNotes:\n- If both linked tasks are in backlog, Kanban preserves the order you pass: \\`--task-id\\` waits on \\`--linked-task-id\\`.\n- On the board, the dependency arrow points into the task that must finish first.\n- Once only one linked task remains in backlog, Kanban reorients the saved dependency so the backlog task is the waiting dependent task and the other task is the prerequisite.\n- When the prerequisite task finishes review and is moved to trash, the waiting backlog task becomes ready to start.\n\n## task unlink\n\nPurpose: remove an existing task link (dependency) by dependency ID.\n\nCommand:\n\\`${kanbanCommand} task unlink --dependency-id <dependency_id> [--project-path <path>]\\`\n\nParameters:\n- \\`--dependency-id <dependency_id>\\` required dependency ID. Use \\`task list\\` to inspect existing links.\n- \\`--project-path <path>\\` optional workspace path. If not already registered in Kanban, it is auto-added for git repos.\n\n## task start\n\nPurpose: start a task by ensuring its worktree, launching its agent session, and moving it to \\`in_progress\\`.\n\nCommand:\n\\`${kanbanCommand} task start --task-id <task_id> [--project-path <path>]\\`\n\nParameters:\n- \\`--task-id <task_id>\\` required task ID.\n- \\`--project-path <path>\\` optional workspace path. If not already registered in Kanban, it is auto-added for git repos.\n\n# Workflow Notes\n\n- Prefer \\`task list\\` first when task IDs or dependency IDs are needed.\n- To create multiple linked tasks, create tasks first, then call \\`task link\\` for each dependency edge.\n`;\n}\n\nexport function resolveHomeAgentAppendSystemPrompt(\n\ttaskId: string,\n\toptions: ResolveAppendSystemPromptCommandPrefixOptions = {},\n): string | null {\n\tif (!isHomeAgentSessionId(taskId)) {\n\t\treturn null;\n\t}\n\treturn renderAppendSystemPrompt(resolveAppendSystemPromptCommandPrefix(options), {\n\t\tagentId: resolveHomeAgentId(taskId),\n\t});\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,WAAW,MAAM,o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,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC;IACb,CAAC;IACD,OAAO,wBAAwB,CAAC,sCAAsC,CAAC,OAAO,CAAC,EAAE;QAChF,OAAO,EAAE,kBAAkB,CAAC,MAAM,CAAC;KACnC,CAAC,CAAC;AACJ,CAAC","debugId":"8c839044-37e7-5952-ac52-d77bddaee29d"}
1
+ {"version":3,"file":"append-system-prompt.js","sources":["../../src/prompts/append-system-prompt.ts"],"sourceRoot":"","sourcesContent":["import { realpathSync } from \"node:fs\";\n\nimport packageJson from \"../../package.json\" with { type: \"json\" };\n\nimport type { RuntimeAgentId } from \"../core/api-contract.js\";\nimport { resolveKanbanCommandParts } from \"../core/kanban-command.js\";\nimport { buildShellCommandLine } from \"../core/shell.js\";\nimport { isHomeAgentSessionId } from \"../core/home-agent-session.js\";\nimport { AutoUpdatePackageManager, detectAutoUpdateInstallation } from \"../update/auto-update.js\";\n\nconst DEFAULT_COMMAND_PREFIX = \"kanban\";\nconst KANBAN_VERSION = typeof packageJson.version === \"string\" ? packageJson.version : \"0.1.0\";\n\nexport interface ResolveAppendSystemPromptCommandPrefixOptions {\n\tcurrentVersion?: string;\n\targv?: string[];\n\texecArgv?: string[];\n\texecPath?: string;\n\tcwd?: string;\n\tresolveRealPath?: (path: string) => string;\n}\n\nexport interface RenderAppendSystemPromptOptions {\n\tagentId?: RuntimeAgentId | null;\n}\n\nconst APPEND_PROMPT_AGENT_IDS: readonly RuntimeAgentId[] = [\n\t\"claude\",\n\t\"codex\",\n\t\"cline\",\n\t\"droid\",\n\t\"gemini\",\n\t\"opencode\",\n];\n\nfunction isRuntimeAgentId(value: string): value is RuntimeAgentId {\n\treturn APPEND_PROMPT_AGENT_IDS.includes(value as RuntimeAgentId);\n}\n\nfunction resolveHomeAgentId(taskId: string): RuntimeAgentId | null {\n\tif (!isHomeAgentSessionId(taskId)) {\n\t\treturn null;\n\t}\n\tconst parts = taskId.split(\":\");\n\tconst maybeAgentId = parts.at(-2) ?? null;\n\tif (!maybeAgentId || !isRuntimeAgentId(maybeAgentId)) {\n\t\treturn null;\n\t}\n\treturn maybeAgentId;\n}\n\nfunction renderLinearSetupGuidanceForAgent(agentId: RuntimeAgentId | null): string {\n\tswitch (agentId) {\n\t\tcase \"cline\":\n\t\t\treturn \"- If Linear MCP is not available in the current agent (Cline), open MCP settings in the app, add server name `linear`, URL `https://mcp.linear.app/mcp`, transport `http`, then complete OAuth.\";\n\t\tcase \"claude\":\n\t\t\treturn \"- If Linear MCP is not available in the current agent (Claude Code), run: `claude mcp add --transport http --scope user linear https://mcp.linear.app/mcp`\";\n\t\tcase \"codex\":\n\t\t\treturn \"- If Linear MCP is not available in the current agent (OpenAI Codex), run: `codex mcp add linear --url https://mcp.linear.app/mcp`\";\n\t\tcase \"gemini\":\n\t\t\treturn \"- If Linear MCP is not available in the current agent (Gemini CLI), run: `gemini mcp add linear https://mcp.linear.app/mcp --transport http --scope user`\";\n\t\tcase \"opencode\":\n\t\t\treturn \"- If Linear MCP is not available in the current agent (OpenCode), run `opencode mcp add`, then use name `linear` and URL `https://mcp.linear.app/mcp`.\";\n\t\tcase \"droid\":\n\t\t\treturn \"- If Linear MCP is not available in the current agent (Droid), run: `droid mcp add linear https://mcp.linear.app/mcp --type http`\";\n\t\tdefault:\n\t\t\treturn \"- If Linear MCP is not available, provide setup instructions for the active agent only, then continue once OAuth is complete.\";\n\t}\n}\n\nexport function resolveAppendSystemPromptCommandPrefix(\n\toptions: ResolveAppendSystemPromptCommandPrefixOptions = {},\n): string {\n\tconst argv = options.argv ?? process.argv;\n\tconst fallbackCommandParts = resolveKanbanCommandParts({\n\t\texecPath: options.execPath ?? process.execPath,\n\t\targv,\n\t\texecArgv: options.execArgv ?? process.execArgv,\n\t});\n\tconst fallbackCommandPrefix = buildShellCommandLine(\n\t\tfallbackCommandParts[0] ?? DEFAULT_COMMAND_PREFIX,\n\t\tfallbackCommandParts.slice(1),\n\t);\n\tconst entrypointArg = argv[1];\n\tif (!entrypointArg) {\n\t\treturn fallbackCommandPrefix;\n\t}\n\n\tconst resolveRealPath = options.resolveRealPath ?? realpathSync;\n\tlet entrypointPath: string;\n\ttry {\n\t\tentrypointPath = resolveRealPath(entrypointArg);\n\t} catch {\n\t\treturn fallbackCommandPrefix;\n\t}\n\n\tconst installation = detectAutoUpdateInstallation({\n\t\tcurrentVersion: options.currentVersion ?? KANBAN_VERSION,\n\t\tpackageName: \"kanban\",\n\t\tentrypointPath,\n\t\tcwd: options.cwd ?? process.cwd(),\n\t});\n\n\tif (installation.updateTiming !== \"shutdown\") {\n\t\treturn fallbackCommandPrefix;\n\t}\n\n\tif (installation.packageManager === AutoUpdatePackageManager.NPX) {\n\t\treturn \"npx -y kanban\";\n\t}\n\tif (installation.packageManager === AutoUpdatePackageManager.PNPM) {\n\t\treturn \"pnpm dlx kanban\";\n\t}\n\tif (installation.packageManager === AutoUpdatePackageManager.YARN) {\n\t\treturn \"yarn dlx kanban\";\n\t}\n\tif (installation.packageManager === AutoUpdatePackageManager.BUN) {\n\t\treturn \"bun x kanban\";\n\t}\n\n\treturn fallbackCommandPrefix;\n}\n\nexport function renderAppendSystemPrompt(\n\tcommandPrefix: string,\n\toptions: RenderAppendSystemPromptOptions = {},\n): string {\n\tconst kanbanCommand = commandPrefix.trim() || DEFAULT_COMMAND_PREFIX;\n\tconst selectedAgentId = options.agentId ?? null;\n\treturn `# Kanban Sidebar\n\nYou are the Kanban sidebar agent for this workspace. Help the user interact with their Kanban board directly from this side panel. When the user asks to add tasks, create tasks, break work down, link tasks, or start tasks, prefer using the Kanban CLI yourself instead of describing manual steps.\n\nKanban is a CLI tool for orchestrating multiple coding agents working on tasks in parallel on a kanban board. It manages git worktrees automatically so that each task can run a dedicated CLI agent in its own worktree.\n\nYou are a Kanban board management helper: your job is to create, organize, link, start, and manage tasks using the Kanban CLI.\n\n# CRITICAL: You are NOT a coding agent\n\nNEVER edit, create, delete, or modify any files in the workspace. NEVER write code, fix bugs, refactor, or do any implementation work yourself. You do not have the role of a coding assistant. Your only job is to manage the Kanban board using the Kanban CLI commands listed below.\n\nIf the user asks you to write code, fix a bug, implement a feature, refactor, or do any hands-on development work, do NOT attempt it. Instead, help them by creating tasks on the Kanban board so a dedicated coding agent can do that work in its own worktree. Always redirect implementation requests to task creation.\n\n- If the user asks to add tasks to kb, ask kb, kanban, or says add tasks without other context, they likely want to add tasks in Kanban. This includes phrases like \"create tasks\", \"make 3 tasks\", \"add a task\", \"break down into tasks\", \"split into tasks\", \"decompose into tasks\", and \"turn into tasks\".\n- Kanban also supports linking tasks. Linking is useful both for parallelization and for dependencies: when work is easy to decompose into multiple pieces that can be done in parallel, link multiple backlog tasks to the same dependency so they all become ready to start once that dependency finishes; when one piece of work depends on another, use links to represent that follow-on dependency. If both linked tasks are in backlog, Kanban preserves the order you pass to the command: \\`--task-id\\` waits on \\`--linked-task-id\\`, and on the board the arrow points into \\`--linked-task-id\\`. Once only one linked task remains in backlog, Kanban reorients the saved dependency so the backlog task is the waiting dependent task and the other task is the prerequisite. The board arrow points into the prerequisite task so the user can see what must finish first. A link requires at least one backlog task, and when the linked review task is moved to trash, that backlog task becomes ready to start.\n- Tasks can also enable automatic review actions: auto-commit, auto-open-pr, or auto-move-to-trash once completed, sending the task to trash and kicking off any linked tasks.\n- If your current working directory is inside \\`.cline/worktrees/\\`, you are inside a Kanban task worktree. In that case, create or manage tasks against the main workspace path, not the task worktree path. Pass the main workspace with \\`--project-path\\`.\n- If a task command fails because the runtime is unavailable, tell the user to start Kanban in that workspace first with \\`${kanbanCommand}\\`, then retry the task command.\n\n# Command Prefix\n\nUse this prefix for every Kanban command in this session:\n\\`${kanbanCommand}\\`\n\n# Tool Invocation Notes\n\n- NEVER use file-editing tools. You are not a coding agent. If you catch yourself about to edit a file, stop and suggest creating a Kanban task instead.\n- When using the \\`run_commands\\` tool, always pass \\`commands\\` as an array, even when running only one command.\n\n# GitHub and Linear Guidance\n\n- If the user asks for GitHub work (issues, PRs, repos, comments, labels, milestones) or includes a \\`github.com\\` URL, prefer the \\`gh\\` CLI first.\n- Prefer native GitHub commands over manual browser walkthroughs when possible, for example: \\`gh issue view\\`, \\`gh pr view\\`, \\`gh repo view\\`, \\`gh pr checks\\`, \\`gh pr diff\\`.\n- If \\`gh\\` is missing, guide installation based on platform:\n - macOS: \\`brew install gh\\`\n - Windows: \\`winget install --id GitHub.cli\\`\n - Linux: use the distro package or official instructions at \\`https://cli.github.com/\\`\n\n- If the user references Linear (Linear links, Linear issue IDs, or Linear workflows), prefer Linear MCP tools when available.\n- Current home agent: \\`${selectedAgentId ?? \"unknown\"}\\`\n${renderLinearSetupGuidanceForAgent(selectedAgentId)}\n- After setup, run the agent MCP auth flow (often \\`/mcp\\`) and complete OAuth before using Linear tools.\n- Linear MCP docs: \\`https://linear.app/docs/mcp\\`\n\n# CLI Reference\n\nAll commands return JSON.\n\n## task list\n\nPurpose: list Kanban tasks for a workspace, including auto-review settings and dependency links.\n\nCommand:\n\\`${kanbanCommand} task list [--project-path <path>] [--column backlog|in_progress|review|trash]\\`\n\nParameters:\n- \\`--project-path <path>\\` optional workspace path. If omitted, uses the current working directory workspace.\n- \\`--column <value>\\` optional filter. Allowed values: \\`backlog\\`, \\`in_progress\\`, \\`review\\`, \\`trash\\`.\n\n## task create\n\nPurpose: create a new task in \\`backlog\\`, with optional plan mode and auto-review behavior.\n\nCommand:\n\\`${kanbanCommand} task create --prompt \"<text>\" [--project-path <path>] [--base-ref <branch>] [--start-in-plan-mode <true|false>] [--auto-review-enabled <true|false>] [--auto-review-mode commit|pr|move_to_trash]\\`\n\nParameters:\n- \\`--prompt \"<text>\"\\` required task prompt text.\n- \\`--project-path <path>\\` optional workspace path. If not already registered in Kanban, it is auto-added for git repos.\n- \\`--base-ref <branch>\\` optional base branch/worktree ref. Defaults to current branch, then default branch, then first known branch.\n- \\`--start-in-plan-mode <true|false>\\` optional. Default false. Set true only when explicitly requested.\n- \\`--auto-review-enabled <true|false>\\` optional. Default false. Enables automatic action once task reaches review.\n- \\`--auto-review-mode commit|pr|move_to_trash\\` optional auto-review action. Default \\`commit\\`.\n\n## task update\n\nPurpose: update an existing task, including prompt, base ref, plan mode, and auto-review behavior.\n\nCommand:\n\\`${kanbanCommand} task update --task-id <task_id> [--prompt \"<text>\"] [--project-path <path>] [--base-ref <branch>] [--start-in-plan-mode <true|false>] [--auto-review-enabled <true|false>] [--auto-review-mode commit|pr|move_to_trash]\\`\n\nParameters:\n- \\`--task-id <task_id>\\` required task ID.\n- \\`--project-path <path>\\` optional workspace path. If not already registered in Kanban, it is auto-added for git repos.\n- \\`--prompt \"<text>\"\\` optional replacement prompt text.\n- \\`--base-ref <branch>\\` optional replacement base ref.\n- \\`--start-in-plan-mode <true|false>\\` optional replacement of plan-mode behavior.\n- \\`--auto-review-enabled <true|false>\\` optional replacement of auto-review toggle. Set false to cancel pending automatic review actions.\n- \\`--auto-review-mode commit|pr|move_to_trash\\` optional replacement auto-review action.\n\nNotes:\n- Provide at least one field to change in addition to \\`--task-id\\`.\n\n## task trash\n\nPurpose: move a task or an entire column to \\`trash\\`, stop active sessions if needed, clean up task worktrees, and auto-start any linked backlog tasks that become ready.\n\nCommand:\n\\`${kanbanCommand} task trash (--task-id <task_id> | --column backlog|in_progress|review|trash) [--project-path <path>]\\`\n\nParameters:\n- \\`--task-id <task_id>\\` optional single-task target.\n- \\`--column <value>\\` optional bulk target. Allowed values: \\`backlog\\`, \\`in_progress\\`, \\`review\\`, \\`trash\\`.\n- \\`--project-path <path>\\` optional workspace path. If not already registered in Kanban, it is auto-added for git repos.\n\nNotes:\n- Provide exactly one of \\`--task-id\\` or \\`--column\\`.\n- \\`task trash --column trash\\` is a no-op for tasks already in trash.\n\n## task delete\n\nPurpose: permanently delete a task or every task in a column, removing cards, dependency links, and task worktrees.\n\nCommand:\n\\`${kanbanCommand} task delete (--task-id <task_id> | --column backlog|in_progress|review|trash) [--project-path <path>]\\`\n\nParameters:\n- \\`--task-id <task_id>\\` optional single-task target.\n- \\`--column <value>\\` optional bulk target. Allowed values: \\`backlog\\`, \\`in_progress\\`, \\`review\\`, \\`trash\\`.\n- \\`--project-path <path>\\` optional workspace path. If not already registered in Kanban, it is auto-added for git repos.\n\nNotes:\n- Provide exactly one of \\`--task-id\\` or \\`--column\\`.\n- \\`task delete --column trash\\` is the way to clear the trash column.\n\n## task link\n\nPurpose: link two tasks so one task waits on another. At least one linked task must be in backlog.\n\nCommand:\n\\`${kanbanCommand} task link --task-id <task_id> --linked-task-id <task_id> [--project-path <path>]\\`\n\nParameters:\n- \\`--task-id <task_id>\\` required one of the two task IDs to link.\n- \\`--linked-task-id <task_id>\\` required the other task ID to link.\n- \\`--project-path <path>\\` optional workspace path. If not already registered in Kanban, it is auto-added for git repos.\n\nNotes:\n- If both linked tasks are in backlog, Kanban preserves the order you pass: \\`--task-id\\` waits on \\`--linked-task-id\\`.\n- On the board, the dependency arrow points into the task that must finish first.\n- Once only one linked task remains in backlog, Kanban reorients the saved dependency so the backlog task is the waiting dependent task and the other task is the prerequisite.\n- When the prerequisite task finishes review and is moved to trash, the waiting backlog task becomes ready to start.\n\n## task unlink\n\nPurpose: remove an existing task link (dependency) by dependency ID.\n\nCommand:\n\\`${kanbanCommand} task unlink --dependency-id <dependency_id> [--project-path <path>]\\`\n\nParameters:\n- \\`--dependency-id <dependency_id>\\` required dependency ID. Use \\`task list\\` to inspect existing links.\n- \\`--project-path <path>\\` optional workspace path. If not already registered in Kanban, it is auto-added for git repos.\n\n## task start\n\nPurpose: start a task by ensuring its worktree, launching its agent session, and moving it to \\`in_progress\\`.\n\nCommand:\n\\`${kanbanCommand} task start --task-id <task_id> [--project-path <path>]\\`\n\nParameters:\n- \\`--task-id <task_id>\\` required task ID.\n- \\`--project-path <path>\\` optional workspace path. If not already registered in Kanban, it is auto-added for git repos.\n\n# Workflow Notes\n\n- Prefer \\`task list\\` first when task IDs or dependency IDs are needed.\n- To create multiple linked tasks, create tasks first, then call \\`task link\\` for each dependency edge.\n`;\n}\n\nexport function resolveHomeAgentAppendSystemPrompt(\n\ttaskId: string,\n\toptions: ResolveAppendSystemPromptCommandPrefixOptions = {},\n): string | null {\n\tif (!isHomeAgentSessionId(taskId)) {\n\t\treturn null;\n\t}\n\treturn renderAppendSystemPrompt(resolveAppendSystemPromptCommandPrefix(options), {\n\t\tagentId: resolveHomeAgentId(taskId),\n\t});\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,WAAW,MAAM,oBAAoB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAGnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAElG,MAAM,sBAAsB,GAAG,QAAQ,CAAC;AACxC,MAAM,cAAc,GAAG,OAAO,WAAW,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;AAe/F,MAAM,uBAAuB,GAA8B;IAC1D,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;IACP,QAAQ;IACR,UAAU;CACV,CAAC;AAEF,SAAS,gBAAgB,CAAC,KAAa;IACtC,OAAO,uBAAuB,CAAC,QAAQ,CAAC,KAAuB,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAc;IACzC,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC;IACb,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,YAAY,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,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;;IAahD,aAAa;;;;;;;;;;;IAWb,aAAa;;;;;;;;;;;;;;;IAeb,aAAa;;;;;;;;;;;;;;;;;;;IAmBb,aAAa;;;;;;;;;;;;;;;;IAgBb,aAAa;;;;;;;;;;;;;;;;IAgBb,aAAa;;;;;;;;;;;;;;;;;;IAkBb,aAAa;;;;;;;;;;;IAWb,aAAa;;;;;;;;;;CAUhB,CAAC;AACF,CAAC;AAED,MAAM,UAAU,kCAAkC,CACjD,MAAc,EACd,UAAyD,EAAE;IAE3D,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC;IACb,CAAC;IACD,OAAO,wBAAwB,CAAC,sCAAsC,CAAC,OAAO,CAAC,EAAE;QAChF,OAAO,EAAE,kBAAkB,CAAC,MAAM,CAAC;KACnC,CAAC,CAAC;AACJ,CAAC","debugId":"3ecfa8e3-7bb5-56b6-9619-d61750206e2b"}
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3c3f4955-afff-5d6f-879d-0974fec49e1f")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8de4e2d1-c4fe-5a56-a83e-229aec7d699b")}catch(e){}}();
3
3
  var __defProp = Object.defineProperty;
4
4
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5
5
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -32027,7 +32027,7 @@ function oPe({ projects: e, isLoadingProjects: t = false, currentProjectId: n, r
32027
32027
  }, [C]), E ? h.jsxs("aside", { className: "flex flex-col items-center min-h-0 overflow-hidden bg-surface-1 relative shrink-0 py-2 gap-1.5", style: { width: $, minWidth: $, borderRight: "1px solid var(--color-divider)" }, children: [h.jsx("div", { onMouseDown: j, className: "absolute top-0 right-0 bottom-0 w-1.5 cursor-ew-resize z-10 hover:bg-accent/20" }), f.map((M) => {
32028
32028
  const G = n === M.id, W = M.name.charAt(0).toUpperCase();
32029
32029
  return h.jsx("button", { type: "button", title: M.name, onClick: () => l(M.id), className: ot("w-8 h-8 rounded-md text-xs font-semibold shrink-0 border-0 cursor-pointer flex items-center justify-center", G ? "bg-accent text-white" : "bg-surface-3 text-text-secondary hover:text-text-primary hover:bg-surface-4"), children: W }, M.id);
32030
- }), h.jsx("button", { type: "button", title: "Add project", onClick: d, disabled: r !== null, className: "w-8 h-8 rounded-md text-xs shrink-0 border-0 cursor-pointer flex items-center justify-center bg-transparent text-text-tertiary hover:text-text-secondary hover:bg-surface-2 mt-auto", children: h.jsx(Va, { size: 16 }) })] }) : h.jsxs("aside", { className: "flex flex-col min-h-0 overflow-hidden bg-surface-1 relative shrink-0", style: { width: _, minWidth: O, maxWidth: A, borderRight: "1px solid var(--color-divider)" }, children: [h.jsx("div", { onMouseDown: j, className: "absolute top-0 right-0 bottom-0 w-1.5 cursor-ew-resize z-10 hover:bg-accent/20" }), h.jsxs("div", { style: { padding: "12px 12px 8px" }, children: [h.jsx("div", { children: h.jsxs("div", { className: "font-semibold text-base flex items-baseline gap-1.5", children: [h.jsx(rPe, { size: 18, className: "text-text-primary shrink-0 self-center" }), "Cline ", h.jsxs("span", { className: "text-text-secondary font-normal text-xs", children: ["v", "0.1.47"] })] }) }), h.jsx("div", { className: "mt-2 rounded-md bg-surface-2 p-1", children: h.jsxs("div", { className: "grid grid-cols-2 gap-1", children: [h.jsx("button", { type: "button", onClick: () => o("projects"), className: ot("cursor-pointer rounded-sm px-2 py-1 text-xs font-medium", i === "projects" ? "bg-surface-4 text-text-primary" : "text-text-secondary hover:text-text-primary"), children: "Projects" }), h.jsx("button", { type: "button", onClick: () => o("agent"), disabled: !s, className: ot("cursor-pointer rounded-sm px-2 py-1 text-xs font-medium", i === "agent" ? "bg-surface-4 text-text-primary" : "text-text-secondary hover:text-text-primary", s ? null : "cursor-not-allowed opacity-50"), children: "Kanban Agent" })] }) }), i === "agent" ? h.jsx("p", { className: "text-text-tertiary text-xs", style: { padding: "8px 4px 0" }, children: "Add tasks, link dependencies, break work down, and manage your board. Try asking to create and link some tasks to get started." }) : null] }), i === "projects" ? h.jsxs(h.Fragment, { children: [h.jsxs("div", { className: "flex-1 min-h-0 overflow-y-auto overscroll-contain flex flex-col gap-1", style: { padding: "4px 12px" }, children: [f.length === 0 && t ? h.jsx("div", { style: { padding: "4px 0" }, children: Array.from({ length: 3 }).map((M, G) => h.jsx(cPe, {}, `project-skeleton-${G}`)) }) : null, f.map((M) => h.jsx(dPe, { project: M, isCurrent: n === M.id, removingProjectId: r, onSelect: l, onRemove: (G) => {
32030
+ }), h.jsx("button", { type: "button", title: "Add project", onClick: d, disabled: r !== null, className: "w-8 h-8 rounded-md text-xs shrink-0 border-0 cursor-pointer flex items-center justify-center bg-transparent text-text-tertiary hover:text-text-secondary hover:bg-surface-2 mt-auto", children: h.jsx(Va, { size: 16 }) })] }) : h.jsxs("aside", { className: "flex flex-col min-h-0 overflow-hidden bg-surface-1 relative shrink-0", style: { width: _, minWidth: O, maxWidth: A, borderRight: "1px solid var(--color-divider)" }, children: [h.jsx("div", { onMouseDown: j, className: "absolute top-0 right-0 bottom-0 w-1.5 cursor-ew-resize z-10 hover:bg-accent/20" }), h.jsxs("div", { style: { padding: "12px 12px 8px" }, children: [h.jsx("div", { children: h.jsxs("div", { className: "font-semibold text-base flex items-baseline gap-1.5", children: [h.jsx(rPe, { size: 18, className: "text-text-primary shrink-0 self-center" }), "Cline ", h.jsxs("span", { className: "text-text-secondary font-normal text-xs", children: ["v", "0.1.48"] })] }) }), h.jsx("div", { className: "mt-2 rounded-md bg-surface-2 p-1", children: h.jsxs("div", { className: "grid grid-cols-2 gap-1", children: [h.jsx("button", { type: "button", onClick: () => o("projects"), className: ot("cursor-pointer rounded-sm px-2 py-1 text-xs font-medium", i === "projects" ? "bg-surface-4 text-text-primary" : "text-text-secondary hover:text-text-primary"), children: "Projects" }), h.jsx("button", { type: "button", onClick: () => o("agent"), disabled: !s, className: ot("cursor-pointer rounded-sm px-2 py-1 text-xs font-medium", i === "agent" ? "bg-surface-4 text-text-primary" : "text-text-secondary hover:text-text-primary", s ? null : "cursor-not-allowed opacity-50"), children: "Kanban Agent" })] }) }), i === "agent" ? h.jsx("p", { className: "text-text-tertiary text-xs", style: { padding: "8px 4px 0" }, children: "Add tasks, link dependencies, break work down, and manage your board. Try asking to create and link some tasks to get started." }) : null] }), i === "projects" ? h.jsxs(h.Fragment, { children: [h.jsxs("div", { className: "flex-1 min-h-0 overflow-y-auto overscroll-contain flex flex-col gap-1", style: { padding: "4px 12px" }, children: [f.length === 0 && t ? h.jsx("div", { style: { padding: "4px 0" }, children: Array.from({ length: 3 }).map((M, G) => h.jsx(cPe, {}, `project-skeleton-${G}`)) }) : null, f.map((M) => h.jsx(dPe, { project: M, isCurrent: n === M.id, removingProjectId: r, onSelect: l, onRemove: (G) => {
32031
32031
  const W = f.find((B) => B.id === G);
32032
32032
  W && g(W);
32033
32033
  } }, M.id)), t ? null : h.jsxs("button", { type: "button", className: "kb-project-row flex cursor-pointer items-center gap-1.5 rounded-md text-text-secondary hover:text-text-primary", style: { padding: "6px 8px" }, onClick: d, disabled: r !== null, children: [h.jsx(Va, { size: 14, className: "shrink-0" }), h.jsx("span", { className: "text-sm", children: "Add Project" })] })] }), h.jsx(uPe, {})] }) : h.jsx("div", { className: "flex flex-1 min-h-0 flex-col", children: h.jsx("div", { className: "flex flex-1 min-h-0 overflow-hidden bg-surface-1 px-2 pb-2 pt-1", children: a ?? h.jsx("div", { className: "flex w-full items-center justify-center rounded-md border border-border bg-surface-2 px-3 text-center text-sm text-text-secondary", children: "Select a project to use the agent." }) }) }), h.jsxs(Cd, { open: m !== null, onOpenChange: (M) => {
@@ -43030,7 +43030,7 @@ function Q3e({ children: e }) {
43030
43030
  const e6e = "https://061e8f494493d1cf3c7c918563cc0783@o4511098366263296.ingest.us.sentry.io/4511098568769536", t6e = "production";
43031
43031
  let Wz = false;
43032
43032
  function n6e() {
43033
- Wz || (G3e({ dsn: e6e, environment: t6e, release: "kanban@0.1.47", sendDefaultPii: false, initialScope: { tags: { app: "kanban", runtime_surface: "web" } } }), Wz = true);
43033
+ Wz || (G3e({ dsn: e6e, environment: t6e, release: "kanban@0.1.48", sendDefaultPii: false, initialScope: { tags: { app: "kanban", runtime_surface: "web" } } }), Wz = true);
43034
43034
  }
43035
43035
  var bX = v.createContext({ client: Jl, bootstrap: void 0 });
43036
43036
  function wX(e, t, n) {
@@ -43100,6 +43100,6 @@ n6e();
43100
43100
  const _X = document.getElementById("root");
43101
43101
  if (!_X) throw new Error("Root element was not found.");
43102
43102
  PJ.createRoot(_X).render(h.jsx(a6e, { children: h.jsx(Q3e, { children: h.jsxs(gre, { children: [h.jsx(YMe, {}), h.jsx(oQ, { theme: "dark", position: "bottom-right", toastOptions: { style: { background: "var(--color-surface-1)", border: "1px solid var(--color-border)", color: "var(--color-text-primary)", fontSize: "13px", whiteSpace: "pre-line" } } })] }) }) }));
43103
- //# sourceMappingURL=index-DGw_f0VG.js.map
43103
+ //# sourceMappingURL=index-BSAcYL3r.js.map
43104
43104
 
43105
- //# debugId=3c3f4955-afff-5d6f-879d-0974fec49e1f
43105
+ //# debugId=8de4e2d1-c4fe-5a56-a83e-229aec7d699b