orbitmap 0.2.0 → 0.4.0-next.0

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 (158) hide show
  1. package/README.md +443 -200
  2. package/dist/adapters/cloud.d.ts +334 -0
  3. package/dist/adapters/cloud.js +520 -0
  4. package/dist/adapters/cloud.js.map +1 -0
  5. package/dist/adapters/factory.d.ts +11 -0
  6. package/dist/adapters/factory.js +27 -0
  7. package/dist/adapters/factory.js.map +1 -0
  8. package/dist/adapters/local/adapter.d.ts +351 -0
  9. package/dist/adapters/local/adapter.js +346 -0
  10. package/dist/adapters/local/adapter.js.map +1 -0
  11. package/dist/adapters/local/context.d.ts +111 -0
  12. package/dist/adapters/local/context.js +136 -0
  13. package/dist/adapters/local/context.js.map +1 -0
  14. package/dist/adapters/local/entities/documents.d.ts +85 -0
  15. package/dist/adapters/local/entities/documents.js +251 -0
  16. package/dist/adapters/local/entities/documents.js.map +1 -0
  17. package/dist/adapters/local/entities/planning.d.ts +108 -0
  18. package/dist/adapters/local/entities/planning.js +540 -0
  19. package/dist/adapters/local/entities/planning.js.map +1 -0
  20. package/dist/adapters/local/entities/tasks.d.ts +95 -0
  21. package/dist/adapters/local/entities/tasks.js +442 -0
  22. package/dist/adapters/local/entities/tasks.js.map +1 -0
  23. package/dist/adapters/local/entities/work-items.d.ts +110 -0
  24. package/dist/adapters/local/entities/work-items.js +623 -0
  25. package/dist/adapters/local/entities/work-items.js.map +1 -0
  26. package/dist/adapters/local/rules.d.ts +172 -0
  27. package/dist/adapters/local/rules.js +319 -0
  28. package/dist/adapters/local/rules.js.map +1 -0
  29. package/dist/adapters/local/shapes.d.ts +209 -0
  30. package/dist/adapters/local/shapes.js +558 -0
  31. package/dist/adapters/local/shapes.js.map +1 -0
  32. package/dist/adapters/local/store.d.ts +200 -0
  33. package/dist/adapters/local/store.js +665 -0
  34. package/dist/adapters/local/store.js.map +1 -0
  35. package/dist/adapters/local/types.d.ts +226 -0
  36. package/dist/adapters/local/types.js +41 -0
  37. package/dist/adapters/local/types.js.map +1 -0
  38. package/dist/adapters/types.d.ts +332 -0
  39. package/dist/adapters/types.js +2 -0
  40. package/dist/adapters/types.js.map +1 -0
  41. package/dist/agent-instructions.d.ts +32 -0
  42. package/dist/agent-instructions.js +334 -0
  43. package/dist/agent-instructions.js.map +1 -0
  44. package/dist/api-client.d.ts +8 -239
  45. package/dist/api-client.js +8 -403
  46. package/dist/api-client.js.map +1 -1
  47. package/dist/commands/agents.d.ts +1 -1
  48. package/dist/commands/agents.js +10 -10
  49. package/dist/commands/agents.js.map +1 -1
  50. package/dist/commands/areas.d.ts +3 -0
  51. package/dist/commands/areas.js +29 -0
  52. package/dist/commands/areas.js.map +1 -0
  53. package/dist/commands/assign.d.ts +3 -2
  54. package/dist/commands/assign.js +47 -15
  55. package/dist/commands/assign.js.map +1 -1
  56. package/dist/commands/context.d.ts +1 -1
  57. package/dist/commands/context.js +18 -12
  58. package/dist/commands/context.js.map +1 -1
  59. package/dist/commands/create-area.d.ts +7 -0
  60. package/dist/commands/create-area.js +29 -0
  61. package/dist/commands/create-area.js.map +1 -0
  62. package/dist/commands/create.d.ts +3 -1
  63. package/dist/commands/create.js +4 -2
  64. package/dist/commands/create.js.map +1 -1
  65. package/dist/commands/dep.d.ts +2 -2
  66. package/dist/commands/dep.js +3 -3
  67. package/dist/commands/dep.js.map +1 -1
  68. package/dist/commands/doc-import.d.ts +1 -1
  69. package/dist/commands/doc-import.js +2 -2
  70. package/dist/commands/doc-import.js.map +1 -1
  71. package/dist/commands/doc-patch.d.ts +1 -1
  72. package/dist/commands/doc-patch.js +2 -2
  73. package/dist/commands/doc-patch.js.map +1 -1
  74. package/dist/commands/doc-share.d.ts +6 -6
  75. package/dist/commands/doc-share.js +13 -13
  76. package/dist/commands/doc-share.js.map +1 -1
  77. package/dist/commands/doc-update.d.ts +1 -1
  78. package/dist/commands/doc-update.js +2 -2
  79. package/dist/commands/doc-update.js.map +1 -1
  80. package/dist/commands/doc.d.ts +1 -1
  81. package/dist/commands/doc.js +5 -4
  82. package/dist/commands/doc.js.map +1 -1
  83. package/dist/commands/docs-cache.d.ts +2 -2
  84. package/dist/commands/docs-cache.js +3 -3
  85. package/dist/commands/docs-cache.js.map +1 -1
  86. package/dist/commands/docs.d.ts +1 -1
  87. package/dist/commands/docs.js +2 -2
  88. package/dist/commands/docs.js.map +1 -1
  89. package/dist/commands/get.d.ts +1 -1
  90. package/dist/commands/get.js +43 -3
  91. package/dist/commands/get.js.map +1 -1
  92. package/dist/commands/ideas.d.ts +4 -4
  93. package/dist/commands/ideas.js +5 -5
  94. package/dist/commands/ideas.js.map +1 -1
  95. package/dist/commands/init.d.ts +17 -3
  96. package/dist/commands/init.js +262 -30
  97. package/dist/commands/init.js.map +1 -1
  98. package/dist/commands/intent.d.ts +41 -0
  99. package/dist/commands/intent.js +237 -0
  100. package/dist/commands/intent.js.map +1 -0
  101. package/dist/commands/issues.d.ts +6 -5
  102. package/dist/commands/issues.js +7 -6
  103. package/dist/commands/issues.js.map +1 -1
  104. package/dist/commands/log.d.ts +1 -1
  105. package/dist/commands/log.js +2 -2
  106. package/dist/commands/log.js.map +1 -1
  107. package/dist/commands/mission.d.ts +42 -0
  108. package/dist/commands/mission.js +219 -0
  109. package/dist/commands/mission.js.map +1 -0
  110. package/dist/commands/orbit.d.ts +40 -3
  111. package/dist/commands/orbit.js +231 -58
  112. package/dist/commands/orbit.js.map +1 -1
  113. package/dist/commands/overview.d.ts +2 -2
  114. package/dist/commands/overview.js +25 -28
  115. package/dist/commands/overview.js.map +1 -1
  116. package/dist/commands/setup-agent.d.ts +11 -0
  117. package/dist/commands/setup-agent.js +96 -79
  118. package/dist/commands/setup-agent.js.map +1 -1
  119. package/dist/commands/setup-mcp.d.ts +1 -1
  120. package/dist/commands/setup-mcp.js +9 -9
  121. package/dist/commands/setup-mcp.js.map +1 -1
  122. package/dist/commands/start.d.ts +1 -1
  123. package/dist/commands/start.js +2 -2
  124. package/dist/commands/start.js.map +1 -1
  125. package/dist/commands/status.d.ts +2 -1
  126. package/dist/commands/status.js +3 -3
  127. package/dist/commands/status.js.map +1 -1
  128. package/dist/commands/subtask.d.ts +1 -1
  129. package/dist/commands/subtask.js +2 -2
  130. package/dist/commands/subtask.js.map +1 -1
  131. package/dist/commands/task-edit-content.d.ts +1 -1
  132. package/dist/commands/task-edit-content.js +2 -2
  133. package/dist/commands/task-edit-content.js.map +1 -1
  134. package/dist/commands/task.d.ts +10 -3
  135. package/dist/commands/task.js +16 -8
  136. package/dist/commands/task.js.map +1 -1
  137. package/dist/commands/tasks.d.ts +1 -1
  138. package/dist/commands/tasks.js +2 -2
  139. package/dist/commands/tasks.js.map +1 -1
  140. package/dist/commands/vibes.d.ts +4 -4
  141. package/dist/commands/vibes.js +5 -5
  142. package/dist/commands/vibes.js.map +1 -1
  143. package/dist/config.d.ts +10 -2
  144. package/dist/config.js +13 -4
  145. package/dist/config.js.map +1 -1
  146. package/dist/doc-cache.d.ts +2 -2
  147. package/dist/doc-cache.js.map +1 -1
  148. package/dist/errors.d.ts +19 -2
  149. package/dist/errors.js +35 -0
  150. package/dist/errors.js.map +1 -1
  151. package/dist/index.js +453 -94
  152. package/dist/index.js.map +1 -1
  153. package/dist/output.js +7 -2
  154. package/dist/output.js.map +1 -1
  155. package/dist/workspace-resolve.d.ts +126 -0
  156. package/dist/workspace-resolve.js +203 -0
  157. package/dist/workspace-resolve.js.map +1 -0
  158. package/package.json +53 -50
@@ -0,0 +1,32 @@
1
+ export declare const MARKER_START = "<!-- ORBITMAP_START -->";
2
+ export declare const MARKER_END = "<!-- ORBITMAP_END -->";
3
+ /** The core skill name (entry point). Kept for backwards compatibility. */
4
+ export declare const SKILL_NAME = "orbitmap";
5
+ export declare const SKILL_ORBITMAP_FRONTMATTER = "---\nname: orbitmap\ndescription: >\n OrbitMap project management via the orbitmap CLI. Use when the user mentions OrbitMap,\n orbit, tasks, backlog, missions, intents, ideas, issues, vibes, or asks to track,\n plan, or log work. Entry point: object model, context resolution, command reference.\n---";
6
+ export declare const SKILL_ORBITMAP_BODY = "# OrbitMap CLI \u2014 core\n\nOrbitMap is an agentic project management platform. You interact with it exclusively\nthrough the `orbitmap` CLI (run with `npx orbitmap \u2026` if not on PATH). The CLI works\nidentically in cloud mode and local-files mode \u2014 never assume which one is active, and\nnever read or write the workspace's data files directly. The CLI is the only interface.\n\n## General behaviour\n- Always prioritise the user's direct request. If the user asks you to do something\n (read a file, write code, answer a question), handle that first.\n- Only interact with OrbitMap when the user explicitly asks you to (e.g. \"check my\n tasks\", \"start a task\", \"what's on my backlog\", \"log this idea\").\n- When the user mentions OrbitMap, orbit, task, backlog, or project-management concepts\n in the context of tracking work, use `orbitmap` commands to handle the request.\n\n## Object model\n- Workspace = team level. Area = repo-level scope (formerly Project) \u2014 tasks, vibes and\n most issues live in an area. Mission (MS-) = time-boxed workspace focus; at most one\n active. Intent (IN-) = workspace-level goal grouping tasks/issues. Idea (ID-) = future\n possibility, not a problem. Issue (IS-) = problem/bug. Vibe (VB-) = ad-hoc work log\n outside a task. Task (TS-) = unit of work.\n- Entity numbers (TS-xxxxxx etc.) are accepted by every command that takes an id.\n\n## Context\n- Area resolves automatically (config/env). Override per call with `--area <slug>`.\n- If a command fails asking for area context, run `orbitmap areas` to list areas, then\n retry with `--area`.\n- `orbitmap context` shows who you are, the workspace, and the active area. Run it when\n unsure.\n\n## Task statuses\nbacklog, todo, in_progress, in_review, review_changes, done, blocked.\n`orbitmap tasks` defaults to todo,in_progress. Ask for others explicitly, e.g.\n`orbitmap tasks --status backlog` when the user asks about the backlog.\n\n## Command reference (all commands accept --json)\n- Context: `orbitmap context`, `orbitmap areas`, `orbitmap overview`\n- Tasks: `orbitmap tasks [--status s1,s2]`, `orbitmap task TS-x`, `orbitmap get <ID>`,\n `orbitmap start [TS-x]`, `orbitmap status TS-x <status> [--delivery <d>]`,\n `orbitmap create \"title\" [--intent IN-x|--mission MS-x] [--priority p]`,\n `orbitmap subtask TS-parent \"title\"`, `orbitmap assign TS-x [agent]`,\n `orbitmap dep add|remove TS-a TS-b`, `orbitmap log TS-x \"msg\" --type <t>`\n- Issues: `orbitmap issue register|list|show|status|resolve`\n- Ideas: `orbitmap idea add|list|show|status`\n- Vibes: `orbitmap vibe log|list|show`\n- Missions: `orbitmap mission list|show|create|update|status|link|unlink`\n- Intents: `orbitmap intent list|show|create|update|link|unlink`\n- Documents: `orbitmap docs`, `orbitmap doc <slug> [--section \"## H\"|--full]`,\n `orbitmap doc-import`, `orbitmap doc-update`\n\n## Error handling\n- If OrbitMap is unreachable (network down / workspace directory unavailable), inform\n the user and continue the primary work without logging. Do NOT retry failed orbitmap\n calls in a loop \u2014 report the issue and proceed with the task.";
7
+ export declare const SKILL_WORKING_FRONTMATTER = "---\nname: orbitmap-working\ndescription: >\n Working on OrbitMap tasks: starting/resuming, logging work, decisions and blockers,\n finishing with the correct status, git branches and delivery status. Use whenever\n implementing, resuming, or finishing a tracked task.\n---";
8
+ export declare const SKILL_WORKING_BODY = "# Working on OrbitMap tasks\n\n## Task workflow (on user request)\nWhen the user asks you to work on tasks:\n1. `orbitmap tasks --status in_progress` \u2014 check for unfinished work.\n2. If found \u2192 `orbitmap task TS-x` \u2192 read the work log \u2192 resume from the resume point.\n3. If not \u2192 `orbitmap start` \u2014 auto-picks the first todo task, sets it in_progress and\n prints full context (description, agent_instructions, logs).\n4. If no tasks \u2192 inform the user.\nUse `orbitmap start TS-x` to begin a specific task; `orbitmap task TS-x` only inspects.\n\n## Rules\n- Work on ONE task at a time.\n- Always read agent_instructions from the task before implementing. Task-level\n agent_instructions take precedence over area-level instructions.\n- Only work on subtasks assigned to you; do not pick up other agents' subtasks.\n- Do NOT mark a parent task done while it has unfinished subtasks, unless the user\n explicitly asks.\n\n## Logging\n- `orbitmap log TS-x \"\u2026\" --type note|code_change|decision|blocker` \u2014 work WITHIN a task.\n- `orbitmap vibe log \"\u2026\" --type discovery|exploration|fix` \u2014 ad-hoc work outside a task.\n- Use `--type decision` when you pick between approaches, reject an alternative, or lock\n in a non-obvious assumption \u2014 record the choice AND the why, not just the outcome.\n- `orbitmap idea add` \u2014 future possibilities, NOT problems (problems \u2192\n `orbitmap issue register`).\n- Keep log content concrete, concise, and useful for someone resuming work later.\n\n## End of session or task \u2014 MANDATORY\n- Task finished \u2192 default to **in_review** so a human verifies before closing:\n `orbitmap log TS-x \"Ready for review: \u2026\" --type note` then\n `orbitmap status TS-x in_review`.\n- Task finished AND the user's prompt or the task's agent_instructions explicitly say to\n close without review \u2192 `orbitmap log TS-x \"Summary: \u2026\" --type note` then\n `orbitmap status TS-x done`.\n- Blocked by an external dependency you cannot resolve (waiting on another task, missing\n access/credentials, unclear requirements, failing external service) \u2192\n `orbitmap log TS-x \"Blocked: <reason>\" --type blocker` then\n `orbitmap status TS-x blocked`.\n- Session ending, task not done but NOT blocked \u2192 `orbitmap log TS-x \"Resume point: \u2026\"\n --type note` \u2014 leave status in_progress.\n- NEVER leave a task without a final log entry.\n\n### Status decision guide\n- **in_review**: work is finished. THE DEFAULT for completed work. The requester should\n verify before closing.\n- **done**: only when the prompt or task agent_instructions explicitly allow closing\n without review (\"auto-close\", \"mark as done\", \"no review needed\"). A user saying \"do\n this task\" is NOT permission to auto-close.\n- **blocked**: an external factor outside your control stops you. Always log the\n specific blocker.\n- **in_progress** (keep): session ends but you can resume autonomously next time.\n\n## Git workflow\n- When the task context contains a branch_name, create or switch to it:\n `git checkout -b <branch_name>` (or `git checkout <branch_name>` if it exists).\n- If the task has NO branch_name, work on the current branch \u2014 do not create one.\n- Do NOT work directly on main/master/develop unless the task has no branch_name and you\n are already on a feature branch.\n\n## Delivery flow\n- Commit messages: prefix the entity number with its type tag \u2014\n `[TS-r5d8zf] Add delivery status field` (also `[IS-\u2026]`, `[ID-\u2026]`, `[VB-\u2026]`).\n- When you committed/pushed code during the task, finish with\n `orbitmap status TS-x <status> --delivery on_branch`.\n- When the user asks what's in a branch/PR: `git log target..source --oneline`, parse\n `[TS-\u2026]`/`[IS-\u2026]` tags, report the matched entities.\n- When the user reports a merge or release: update the relevant tasks with\n `--delivery merged` or `--delivery released`.\n\n## Planning mode (agents with a plan mode)\nWhen you create an implementation plan for a tracked task, you MUST include OrbitMap\nlifecycle steps as explicit plan items:\n- First step: reference the OrbitMap task number and title.\n- Last steps, always: (1) `orbitmap log` with a summary of all changes; (2)\n `orbitmap status` set per the status decision guide (or a resume-point log if\n incomplete).\n\n## Example: completing a task (default \u2192 in_review)\n1. `orbitmap tasks --status in_progress` \u2192 empty\n2. `orbitmap start` \u2192 task context\n3. read agent_instructions; implement; run tests; commit with `[TS-x]` prefix\n4. `orbitmap log TS-x \"Implemented X by doing Y\" --type code_change`\n5. `orbitmap log TS-x \"Ready for review: all tests pass.\" --type note`\n6. `orbitmap status TS-x in_review --delivery on_branch`";
9
+ export declare const SKILL_PLANNING_FRONTMATTER = "---\nname: orbitmap-planning\ndescription: >\n Planning with OrbitMap: missions (time-boxed focus), intents (goals grouping work),\n promoting ideas to tasks, triaging issues, decomposing work into tasks and subtasks.\n Use for \"plan\", \"roadmap\", \"mission\", \"intent\", \"break this down\", idea or issue\n triage requests.\n---";
10
+ export declare const SKILL_PLANNING_BODY = "# Planning in OrbitMap\n\n## Hierarchy\nMission (MS-) \u2192 Intent (IN-) \u2192 Task (TS-) / Issue (IS-). Missions and intents are\nworkspace-level; tasks live in areas. An intent groups the tasks/issues that realise one\ngoal; a mission time-boxes a set of intents (and directly-attached items) toward an\noutcome. At most ONE mission is active at a time.\n\n## Missions\n- `orbitmap mission list` / `orbitmap mission show MS-x`\n- `orbitmap mission create \"name\" [--outcome \"\u2026\"] [--start d] [--end d]`\n- `orbitmap mission status MS-x active|completed|cancelled` \u2014 activating fails while\n another mission is active; complete or cancel it first.\n- `orbitmap mission link MS-x IN-y|TS-y|IS-y|ID-y` / `mission unlink` \u2014 attach items.\n\n## Intents\n- `orbitmap intent create \"name\" [--mission MS-x]`, statuses:\n new \u2192 design \u2192 plan \u2192 build \u2192 done (or cancelled); update with\n `orbitmap intent update IN-x --status build`.\n- `orbitmap intent link IN-x TS-y|IS-y` attaches work items to the intent.\n- RULE (intent-exclusive): an item linked to an intent gets its mission THROUGH the\n intent \u2014 never set a direct mission on a task/issue that has an intent. The CLI\n enforces this; do not fight it.\n\n## Planning workflow (recommended when the user asks to plan a body of work)\n1. Clarify the outcome \u2192 `orbitmap mission create` (or pick the active mission).\n2. Split into goals \u2192 `orbitmap intent create` per goal, `mission link` them.\n3. Decompose each intent into concrete tasks \u2192\n `orbitmap create \"title\" --intent IN-x [--priority p]`, subtasks via\n `orbitmap subtask`.\n4. Wire ordering constraints \u2192 `orbitmap dep add TS-a TS-b` (a depends on b).\n5. Review: `orbitmap mission show MS-x` and `orbitmap overview`.\n\n## Ideas (opportunities, not problems)\n- Capture: `orbitmap idea add \"\u2026\" [--priority p]`.\n- Review: `orbitmap idea list` (default pending).\n- Promote to work: analyse the codebase first, then `orbitmap create \"task title\"\n --intent \u2026` referencing the idea in the description, then\n `orbitmap idea status ID-x used`. Reject with `\u2026 rejected`.\n\n## Issues (problems)\n- Report: `orbitmap issue register \"title\" --severity critical|high|medium|low\n [--description \"\u2026\"]`.\n- Start investigating: `orbitmap issue status IS-x investigating`.\n- Convert to work: `orbitmap create` a fix task, link it, and resolve with\n `orbitmap issue resolve IS-x --task TS-y --resolution \"\u2026\"` (or status wont_fix /\n duplicate with a reason).";
11
+ export declare const SKILL_DOCS_FRONTMATTER = "---\nname: orbitmap-docs\ndescription: >\n Reading and updating OrbitMap documents (specs, architecture, guides, decisions).\n Use when the user asks to read, import, or update project documentation tracked in\n OrbitMap.\n---";
12
+ export declare const SKILL_DOCS_BODY = "# OrbitMap documents\n\n## Choosing what to read\n`orbitmap docs` lists documents with their `context` (when the doc is relevant) and\n`sections_count`. Use context to pick the right document; use sections_count to decide\nwhether to fetch the TOC first (many sections) or go straight to full.\n\n## Token-efficient reading flow\n1. `orbitmap doc <slug>` \u2192 context + table of contents (cheap).\n2. `orbitmap doc <slug> --section \"## Auth\"` \u2192 just that section.\n3. `orbitmap doc <slug> --full` \u2192 full content (expensive \u2014 last resort).\nUse the lightest mode that answers your question. When the CLI reports a local file path\nfor the full content, read that file instead of printing the content into the\nconversation.\n\n## Editing\n- Import a new document: `orbitmap doc-import <file.md> --title \"\u2026\" --type\n spec|architecture|api|guide|decision|changelog|other [--context \"\u2026\"]`.\n- Update: `orbitmap doc-update <slug> --file <file.md>` (replaces content, bumps\n version).\n- To change an OrbitMap document, ALWAYS go through these commands \u2014 NEVER edit files\n inside the OrbitMap workspace/cache directories directly.";
13
+ export interface SkillDef {
14
+ /** Skill name = directory name under `.claude/skills/`. */
15
+ name: string;
16
+ /** Verbatim YAML frontmatter block, including the `---` fences. */
17
+ frontmatter: string;
18
+ /** Verbatim markdown body. */
19
+ body: string;
20
+ }
21
+ export declare const SKILLS: readonly SkillDef[];
22
+ export declare const THIN_HOOK_CLAUDE = "## OrbitMap\n\nThis project tracks work in OrbitMap via the `orbitmap` CLI (works the same whether data\nis in the cloud or in local files). When the user mentions tasks, backlog, missions,\nintents, ideas, issues, vibes, or asks you to work on / log / plan something, load the\nmatching skill: `orbitmap` (context & commands), `orbitmap-working` (doing tasks),\n`orbitmap-planning` (missions/intents/ideas/issues), `orbitmap-docs` (documents).\nGolden rules: work on ONE task at a time; NEVER finish a task session without a final\n`orbitmap log` entry and an `orbitmap status` update; finished work defaults to\n`in_review`, not `done`. NEVER edit files inside the OrbitMap workspace directory\ndirectly \u2014 always go through `orbitmap` commands.";
23
+ export declare const THIN_HOOK_GENERIC = "## OrbitMap\n\nThis project tracks work in OrbitMap via the `orbitmap` CLI (works the same whether data\nis in the cloud or in local files). When the user mentions tasks, backlog, missions,\nintents, ideas, issues, vibes, or asks you to work on / log / plan something, follow the\nsections below: core (context & commands), working on tasks, planning\n(missions/intents/ideas/issues), and documents.\nGolden rules: work on ONE task at a time; NEVER finish a task session without a final\n`orbitmap log` entry and an `orbitmap status` update; finished work defaults to\n`in_review`, not `done`. NEVER edit files inside the OrbitMap workspace directory\ndirectly \u2014 always go through `orbitmap` commands.";
24
+ /** Build one SKILL.md file (frontmatter + body) for Claude. */
25
+ export declare function buildSkillFile(skill: SkillDef): string;
26
+ /** Build the thin always-on block for a Claude config file (CLAUDE.md). */
27
+ export declare function buildClaudeHook(): string;
28
+ /**
29
+ * Build the markdown fallback block for non-Claude agents: the thin hook plus all four
30
+ * skill bodies inlined (no skill ecosystem to lean on).
31
+ */
32
+ export declare function buildGenericBlock(): string;
@@ -0,0 +1,334 @@
1
+ // Single source of truth for all OrbitMap agent-facing instruction text.
2
+ //
3
+ // Two layers, mirroring how the OrbitMap MCP server works:
4
+ // 1. THIN_HOOK — always-on, injected into CLAUDE.md / AGENTS.md (~10 lines).
5
+ // Equivalent of the MCP "system instructions" that are always
6
+ // in the system prompt. Guarantees the agent always knows the
7
+ // project uses OrbitMap and knows the workflow skeleton.
8
+ // 2. The four skills — the deep, on-demand layer. Equivalent of the MCP tool
9
+ // catalogue (INSTRUCTIONS_FULL), split by topic:
10
+ // orbitmap — object model, context, command map
11
+ // orbitmap-working — task lifecycle, logging, git/delivery
12
+ // orbitmap-planning — missions, intents, ideas, issues
13
+ // orbitmap-docs — documents
14
+ // Shipped two ways:
15
+ // - Claude: one `.claude/skills/<name>/SKILL.md` per skill,
16
+ // loaded on demand (zero per-turn context cost).
17
+ // - non-Claude: all four bodies concatenated into the agent
18
+ // config file (no skill ecosystem to lean on).
19
+ //
20
+ // The content below is normative: it is transcribed from §8 of
21
+ // `docs/local-mode-poc-spec.md`, which is itself the MCP oracle
22
+ // (`orbitmap-mcp/src/orbitmap_mcp/instructions.py`, INSTRUCTIONS_FULL) translated into
23
+ // CLI-command vocabulary. Do not paraphrase it; change the spec first.
24
+ export const MARKER_START = '<!-- ORBITMAP_START -->';
25
+ export const MARKER_END = '<!-- ORBITMAP_END -->';
26
+ /** The core skill name (entry point). Kept for backwards compatibility. */
27
+ export const SKILL_NAME = 'orbitmap';
28
+ // ── Skill: orbitmap (core) — §8.3 ──────────────────────────────────────────────
29
+ export const SKILL_ORBITMAP_FRONTMATTER = `---
30
+ name: orbitmap
31
+ description: >
32
+ OrbitMap project management via the orbitmap CLI. Use when the user mentions OrbitMap,
33
+ orbit, tasks, backlog, missions, intents, ideas, issues, vibes, or asks to track,
34
+ plan, or log work. Entry point: object model, context resolution, command reference.
35
+ ---`;
36
+ export const SKILL_ORBITMAP_BODY = `# OrbitMap CLI — core
37
+
38
+ OrbitMap is an agentic project management platform. You interact with it exclusively
39
+ through the \`orbitmap\` CLI (run with \`npx orbitmap …\` if not on PATH). The CLI works
40
+ identically in cloud mode and local-files mode — never assume which one is active, and
41
+ never read or write the workspace's data files directly. The CLI is the only interface.
42
+
43
+ ## General behaviour
44
+ - Always prioritise the user's direct request. If the user asks you to do something
45
+ (read a file, write code, answer a question), handle that first.
46
+ - Only interact with OrbitMap when the user explicitly asks you to (e.g. "check my
47
+ tasks", "start a task", "what's on my backlog", "log this idea").
48
+ - When the user mentions OrbitMap, orbit, task, backlog, or project-management concepts
49
+ in the context of tracking work, use \`orbitmap\` commands to handle the request.
50
+
51
+ ## Object model
52
+ - Workspace = team level. Area = repo-level scope (formerly Project) — tasks, vibes and
53
+ most issues live in an area. Mission (MS-) = time-boxed workspace focus; at most one
54
+ active. Intent (IN-) = workspace-level goal grouping tasks/issues. Idea (ID-) = future
55
+ possibility, not a problem. Issue (IS-) = problem/bug. Vibe (VB-) = ad-hoc work log
56
+ outside a task. Task (TS-) = unit of work.
57
+ - Entity numbers (TS-xxxxxx etc.) are accepted by every command that takes an id.
58
+
59
+ ## Context
60
+ - Area resolves automatically (config/env). Override per call with \`--area <slug>\`.
61
+ - If a command fails asking for area context, run \`orbitmap areas\` to list areas, then
62
+ retry with \`--area\`.
63
+ - \`orbitmap context\` shows who you are, the workspace, and the active area. Run it when
64
+ unsure.
65
+
66
+ ## Task statuses
67
+ backlog, todo, in_progress, in_review, review_changes, done, blocked.
68
+ \`orbitmap tasks\` defaults to todo,in_progress. Ask for others explicitly, e.g.
69
+ \`orbitmap tasks --status backlog\` when the user asks about the backlog.
70
+
71
+ ## Command reference (all commands accept --json)
72
+ - Context: \`orbitmap context\`, \`orbitmap areas\`, \`orbitmap overview\`
73
+ - Tasks: \`orbitmap tasks [--status s1,s2]\`, \`orbitmap task TS-x\`, \`orbitmap get <ID>\`,
74
+ \`orbitmap start [TS-x]\`, \`orbitmap status TS-x <status> [--delivery <d>]\`,
75
+ \`orbitmap create "title" [--intent IN-x|--mission MS-x] [--priority p]\`,
76
+ \`orbitmap subtask TS-parent "title"\`, \`orbitmap assign TS-x [agent]\`,
77
+ \`orbitmap dep add|remove TS-a TS-b\`, \`orbitmap log TS-x "msg" --type <t>\`
78
+ - Issues: \`orbitmap issue register|list|show|status|resolve\`
79
+ - Ideas: \`orbitmap idea add|list|show|status\`
80
+ - Vibes: \`orbitmap vibe log|list|show\`
81
+ - Missions: \`orbitmap mission list|show|create|update|status|link|unlink\`
82
+ - Intents: \`orbitmap intent list|show|create|update|link|unlink\`
83
+ - Documents: \`orbitmap docs\`, \`orbitmap doc <slug> [--section "## H"|--full]\`,
84
+ \`orbitmap doc-import\`, \`orbitmap doc-update\`
85
+
86
+ ## Error handling
87
+ - If OrbitMap is unreachable (network down / workspace directory unavailable), inform
88
+ the user and continue the primary work without logging. Do NOT retry failed orbitmap
89
+ calls in a loop — report the issue and proceed with the task.`;
90
+ // ── Skill: orbitmap-working — §8.4 ─────────────────────────────────────────────
91
+ export const SKILL_WORKING_FRONTMATTER = `---
92
+ name: orbitmap-working
93
+ description: >
94
+ Working on OrbitMap tasks: starting/resuming, logging work, decisions and blockers,
95
+ finishing with the correct status, git branches and delivery status. Use whenever
96
+ implementing, resuming, or finishing a tracked task.
97
+ ---`;
98
+ export const SKILL_WORKING_BODY = `# Working on OrbitMap tasks
99
+
100
+ ## Task workflow (on user request)
101
+ When the user asks you to work on tasks:
102
+ 1. \`orbitmap tasks --status in_progress\` — check for unfinished work.
103
+ 2. If found → \`orbitmap task TS-x\` → read the work log → resume from the resume point.
104
+ 3. If not → \`orbitmap start\` — auto-picks the first todo task, sets it in_progress and
105
+ prints full context (description, agent_instructions, logs).
106
+ 4. If no tasks → inform the user.
107
+ Use \`orbitmap start TS-x\` to begin a specific task; \`orbitmap task TS-x\` only inspects.
108
+
109
+ ## Rules
110
+ - Work on ONE task at a time.
111
+ - Always read agent_instructions from the task before implementing. Task-level
112
+ agent_instructions take precedence over area-level instructions.
113
+ - Only work on subtasks assigned to you; do not pick up other agents' subtasks.
114
+ - Do NOT mark a parent task done while it has unfinished subtasks, unless the user
115
+ explicitly asks.
116
+
117
+ ## Logging
118
+ - \`orbitmap log TS-x "…" --type note|code_change|decision|blocker\` — work WITHIN a task.
119
+ - \`orbitmap vibe log "…" --type discovery|exploration|fix\` — ad-hoc work outside a task.
120
+ - Use \`--type decision\` when you pick between approaches, reject an alternative, or lock
121
+ in a non-obvious assumption — record the choice AND the why, not just the outcome.
122
+ - \`orbitmap idea add\` — future possibilities, NOT problems (problems →
123
+ \`orbitmap issue register\`).
124
+ - Keep log content concrete, concise, and useful for someone resuming work later.
125
+
126
+ ## End of session or task — MANDATORY
127
+ - Task finished → default to **in_review** so a human verifies before closing:
128
+ \`orbitmap log TS-x "Ready for review: …" --type note\` then
129
+ \`orbitmap status TS-x in_review\`.
130
+ - Task finished AND the user's prompt or the task's agent_instructions explicitly say to
131
+ close without review → \`orbitmap log TS-x "Summary: …" --type note\` then
132
+ \`orbitmap status TS-x done\`.
133
+ - Blocked by an external dependency you cannot resolve (waiting on another task, missing
134
+ access/credentials, unclear requirements, failing external service) →
135
+ \`orbitmap log TS-x "Blocked: <reason>" --type blocker\` then
136
+ \`orbitmap status TS-x blocked\`.
137
+ - Session ending, task not done but NOT blocked → \`orbitmap log TS-x "Resume point: …"
138
+ --type note\` — leave status in_progress.
139
+ - NEVER leave a task without a final log entry.
140
+
141
+ ### Status decision guide
142
+ - **in_review**: work is finished. THE DEFAULT for completed work. The requester should
143
+ verify before closing.
144
+ - **done**: only when the prompt or task agent_instructions explicitly allow closing
145
+ without review ("auto-close", "mark as done", "no review needed"). A user saying "do
146
+ this task" is NOT permission to auto-close.
147
+ - **blocked**: an external factor outside your control stops you. Always log the
148
+ specific blocker.
149
+ - **in_progress** (keep): session ends but you can resume autonomously next time.
150
+
151
+ ## Git workflow
152
+ - When the task context contains a branch_name, create or switch to it:
153
+ \`git checkout -b <branch_name>\` (or \`git checkout <branch_name>\` if it exists).
154
+ - If the task has NO branch_name, work on the current branch — do not create one.
155
+ - Do NOT work directly on main/master/develop unless the task has no branch_name and you
156
+ are already on a feature branch.
157
+
158
+ ## Delivery flow
159
+ - Commit messages: prefix the entity number with its type tag —
160
+ \`[TS-r5d8zf] Add delivery status field\` (also \`[IS-…]\`, \`[ID-…]\`, \`[VB-…]\`).
161
+ - When you committed/pushed code during the task, finish with
162
+ \`orbitmap status TS-x <status> --delivery on_branch\`.
163
+ - When the user asks what's in a branch/PR: \`git log target..source --oneline\`, parse
164
+ \`[TS-…]\`/\`[IS-…]\` tags, report the matched entities.
165
+ - When the user reports a merge or release: update the relevant tasks with
166
+ \`--delivery merged\` or \`--delivery released\`.
167
+
168
+ ## Planning mode (agents with a plan mode)
169
+ When you create an implementation plan for a tracked task, you MUST include OrbitMap
170
+ lifecycle steps as explicit plan items:
171
+ - First step: reference the OrbitMap task number and title.
172
+ - Last steps, always: (1) \`orbitmap log\` with a summary of all changes; (2)
173
+ \`orbitmap status\` set per the status decision guide (or a resume-point log if
174
+ incomplete).
175
+
176
+ ## Example: completing a task (default → in_review)
177
+ 1. \`orbitmap tasks --status in_progress\` → empty
178
+ 2. \`orbitmap start\` → task context
179
+ 3. read agent_instructions; implement; run tests; commit with \`[TS-x]\` prefix
180
+ 4. \`orbitmap log TS-x "Implemented X by doing Y" --type code_change\`
181
+ 5. \`orbitmap log TS-x "Ready for review: all tests pass." --type note\`
182
+ 6. \`orbitmap status TS-x in_review --delivery on_branch\``;
183
+ // ── Skill: orbitmap-planning — §8.5 ────────────────────────────────────────────
184
+ export const SKILL_PLANNING_FRONTMATTER = `---
185
+ name: orbitmap-planning
186
+ description: >
187
+ Planning with OrbitMap: missions (time-boxed focus), intents (goals grouping work),
188
+ promoting ideas to tasks, triaging issues, decomposing work into tasks and subtasks.
189
+ Use for "plan", "roadmap", "mission", "intent", "break this down", idea or issue
190
+ triage requests.
191
+ ---`;
192
+ export const SKILL_PLANNING_BODY = `# Planning in OrbitMap
193
+
194
+ ## Hierarchy
195
+ Mission (MS-) → Intent (IN-) → Task (TS-) / Issue (IS-). Missions and intents are
196
+ workspace-level; tasks live in areas. An intent groups the tasks/issues that realise one
197
+ goal; a mission time-boxes a set of intents (and directly-attached items) toward an
198
+ outcome. At most ONE mission is active at a time.
199
+
200
+ ## Missions
201
+ - \`orbitmap mission list\` / \`orbitmap mission show MS-x\`
202
+ - \`orbitmap mission create "name" [--outcome "…"] [--start d] [--end d]\`
203
+ - \`orbitmap mission status MS-x active|completed|cancelled\` — activating fails while
204
+ another mission is active; complete or cancel it first.
205
+ - \`orbitmap mission link MS-x IN-y|TS-y|IS-y|ID-y\` / \`mission unlink\` — attach items.
206
+
207
+ ## Intents
208
+ - \`orbitmap intent create "name" [--mission MS-x]\`, statuses:
209
+ new → design → plan → build → done (or cancelled); update with
210
+ \`orbitmap intent update IN-x --status build\`.
211
+ - \`orbitmap intent link IN-x TS-y|IS-y\` attaches work items to the intent.
212
+ - RULE (intent-exclusive): an item linked to an intent gets its mission THROUGH the
213
+ intent — never set a direct mission on a task/issue that has an intent. The CLI
214
+ enforces this; do not fight it.
215
+
216
+ ## Planning workflow (recommended when the user asks to plan a body of work)
217
+ 1. Clarify the outcome → \`orbitmap mission create\` (or pick the active mission).
218
+ 2. Split into goals → \`orbitmap intent create\` per goal, \`mission link\` them.
219
+ 3. Decompose each intent into concrete tasks →
220
+ \`orbitmap create "title" --intent IN-x [--priority p]\`, subtasks via
221
+ \`orbitmap subtask\`.
222
+ 4. Wire ordering constraints → \`orbitmap dep add TS-a TS-b\` (a depends on b).
223
+ 5. Review: \`orbitmap mission show MS-x\` and \`orbitmap overview\`.
224
+
225
+ ## Ideas (opportunities, not problems)
226
+ - Capture: \`orbitmap idea add "…" [--priority p]\`.
227
+ - Review: \`orbitmap idea list\` (default pending).
228
+ - Promote to work: analyse the codebase first, then \`orbitmap create "task title"
229
+ --intent …\` referencing the idea in the description, then
230
+ \`orbitmap idea status ID-x used\`. Reject with \`… rejected\`.
231
+
232
+ ## Issues (problems)
233
+ - Report: \`orbitmap issue register "title" --severity critical|high|medium|low
234
+ [--description "…"]\`.
235
+ - Start investigating: \`orbitmap issue status IS-x investigating\`.
236
+ - Convert to work: \`orbitmap create\` a fix task, link it, and resolve with
237
+ \`orbitmap issue resolve IS-x --task TS-y --resolution "…"\` (or status wont_fix /
238
+ duplicate with a reason).`;
239
+ // ── Skill: orbitmap-docs — §8.6 ────────────────────────────────────────────────
240
+ export const SKILL_DOCS_FRONTMATTER = `---
241
+ name: orbitmap-docs
242
+ description: >
243
+ Reading and updating OrbitMap documents (specs, architecture, guides, decisions).
244
+ Use when the user asks to read, import, or update project documentation tracked in
245
+ OrbitMap.
246
+ ---`;
247
+ export const SKILL_DOCS_BODY = `# OrbitMap documents
248
+
249
+ ## Choosing what to read
250
+ \`orbitmap docs\` lists documents with their \`context\` (when the doc is relevant) and
251
+ \`sections_count\`. Use context to pick the right document; use sections_count to decide
252
+ whether to fetch the TOC first (many sections) or go straight to full.
253
+
254
+ ## Token-efficient reading flow
255
+ 1. \`orbitmap doc <slug>\` → context + table of contents (cheap).
256
+ 2. \`orbitmap doc <slug> --section "## Auth"\` → just that section.
257
+ 3. \`orbitmap doc <slug> --full\` → full content (expensive — last resort).
258
+ Use the lightest mode that answers your question. When the CLI reports a local file path
259
+ for the full content, read that file instead of printing the content into the
260
+ conversation.
261
+
262
+ ## Editing
263
+ - Import a new document: \`orbitmap doc-import <file.md> --title "…" --type
264
+ spec|architecture|api|guide|decision|changelog|other [--context "…"]\`.
265
+ - Update: \`orbitmap doc-update <slug> --file <file.md>\` (replaces content, bumps
266
+ version).
267
+ - To change an OrbitMap document, ALWAYS go through these commands — NEVER edit files
268
+ inside the OrbitMap workspace/cache directories directly.`;
269
+ export const SKILLS = [
270
+ {
271
+ name: 'orbitmap',
272
+ frontmatter: SKILL_ORBITMAP_FRONTMATTER,
273
+ body: SKILL_ORBITMAP_BODY,
274
+ },
275
+ {
276
+ name: 'orbitmap-working',
277
+ frontmatter: SKILL_WORKING_FRONTMATTER,
278
+ body: SKILL_WORKING_BODY,
279
+ },
280
+ {
281
+ name: 'orbitmap-planning',
282
+ frontmatter: SKILL_PLANNING_FRONTMATTER,
283
+ body: SKILL_PLANNING_BODY,
284
+ },
285
+ {
286
+ name: 'orbitmap-docs',
287
+ frontmatter: SKILL_DOCS_FRONTMATTER,
288
+ body: SKILL_DOCS_BODY,
289
+ },
290
+ ];
291
+ // ── The thin always-on hook (CLAUDE.md / AGENTS.md) ────────────────────────────
292
+ // Claude variant — §8.2, verbatim (without the markers, which buildClaudeHook adds).
293
+ export const THIN_HOOK_CLAUDE = `## OrbitMap
294
+
295
+ This project tracks work in OrbitMap via the \`orbitmap\` CLI (works the same whether data
296
+ is in the cloud or in local files). When the user mentions tasks, backlog, missions,
297
+ intents, ideas, issues, vibes, or asks you to work on / log / plan something, load the
298
+ matching skill: \`orbitmap\` (context & commands), \`orbitmap-working\` (doing tasks),
299
+ \`orbitmap-planning\` (missions/intents/ideas/issues), \`orbitmap-docs\` (documents).
300
+ Golden rules: work on ONE task at a time; NEVER finish a task session without a final
301
+ \`orbitmap log\` entry and an \`orbitmap status\` update; finished work defaults to
302
+ \`in_review\`, not \`done\`. NEVER edit files inside the OrbitMap workspace directory
303
+ directly — always go through \`orbitmap\` commands.`;
304
+ // Non-Claude variant: same rules, but points at the inlined sections below instead of
305
+ // skills that these agents cannot load.
306
+ export const THIN_HOOK_GENERIC = `## OrbitMap
307
+
308
+ This project tracks work in OrbitMap via the \`orbitmap\` CLI (works the same whether data
309
+ is in the cloud or in local files). When the user mentions tasks, backlog, missions,
310
+ intents, ideas, issues, vibes, or asks you to work on / log / plan something, follow the
311
+ sections below: core (context & commands), working on tasks, planning
312
+ (missions/intents/ideas/issues), and documents.
313
+ Golden rules: work on ONE task at a time; NEVER finish a task session without a final
314
+ \`orbitmap log\` entry and an \`orbitmap status\` update; finished work defaults to
315
+ \`in_review\`, not \`done\`. NEVER edit files inside the OrbitMap workspace directory
316
+ directly — always go through \`orbitmap\` commands.`;
317
+ // ── Assembly helpers ───────────────────────────────────────────────────────────
318
+ /** Build one SKILL.md file (frontmatter + body) for Claude. */
319
+ export function buildSkillFile(skill) {
320
+ return `${skill.frontmatter}\n\n${skill.body}\n`;
321
+ }
322
+ /** Build the thin always-on block for a Claude config file (CLAUDE.md). */
323
+ export function buildClaudeHook() {
324
+ return `${MARKER_START}\n${THIN_HOOK_CLAUDE}\n${MARKER_END}`;
325
+ }
326
+ /**
327
+ * Build the markdown fallback block for non-Claude agents: the thin hook plus all four
328
+ * skill bodies inlined (no skill ecosystem to lean on).
329
+ */
330
+ export function buildGenericBlock() {
331
+ const bodies = SKILLS.map((skill) => skill.body).join('\n\n---\n\n');
332
+ return `${MARKER_START}\n${THIN_HOOK_GENERIC}\n\n${bodies}\n${MARKER_END}`;
333
+ }
334
+ //# sourceMappingURL=agent-instructions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-instructions.js","sourceRoot":"","sources":["../src/agent-instructions.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,2DAA2D;AAC3D,oFAAoF;AACpF,oFAAoF;AACpF,oFAAoF;AACpF,+EAA+E;AAC/E,+EAA+E;AAC/E,uEAAuE;AACvE,iFAAiF;AACjF,oFAAoF;AACpF,+EAA+E;AAC/E,wDAAwD;AACxD,0CAA0C;AAC1C,wFAAwF;AACxF,uFAAuF;AACvF,oFAAoF;AACpF,qFAAqF;AACrF,EAAE;AACF,+DAA+D;AAC/D,gEAAgE;AAChE,uFAAuF;AACvF,uEAAuE;AAEvE,MAAM,CAAC,MAAM,YAAY,GAAG,yBAAyB,CAAC;AACtD,MAAM,CAAC,MAAM,UAAU,GAAG,uBAAuB,CAAC;AAElD,2EAA2E;AAC3E,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;AAErC,kFAAkF;AAElF,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;IAMtC,CAAC;AAEL,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gEAqD6B,CAAC;AAEjE,kFAAkF;AAElF,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;IAMrC,CAAC;AAEL,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2DAoFyB,CAAC;AAE5D,kFAAkF;AAElF,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;IAOtC,CAAC;AAEL,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA8CP,CAAC;AAE7B,kFAAkF;AAElF,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;IAMlC,CAAC;AAEL,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;4DAqB6B,CAAC;AAa7D,MAAM,CAAC,MAAM,MAAM,GAAwB;IACzC;QACE,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,0BAA0B;QACvC,IAAI,EAAE,mBAAmB;KAC1B;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,yBAAyB;QACtC,IAAI,EAAE,kBAAkB;KACzB;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,0BAA0B;QACvC,IAAI,EAAE,mBAAmB;KAC1B;IACD;QACE,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,sBAAsB;QACnC,IAAI,EAAE,eAAe;KACtB;CACO,CAAC;AAEX,kFAAkF;AAElF,qFAAqF;AACrF,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;oDAUoB,CAAC;AAErD,sFAAsF;AACtF,wCAAwC;AACxC,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;oDAUmB,CAAC;AAErD,kFAAkF;AAElF,+DAA+D;AAC/D,MAAM,UAAU,cAAc,CAAC,KAAe;IAC5C,OAAO,GAAG,KAAK,CAAC,WAAW,OAAO,KAAK,CAAC,IAAI,IAAI,CAAC;AACnD,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,eAAe;IAC7B,OAAO,GAAG,YAAY,KAAK,gBAAgB,KAAK,UAAU,EAAE,CAAC;AAC/D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACrE,OAAO,GAAG,YAAY,KAAK,iBAAiB,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;AAC7E,CAAC"}
@@ -1,239 +1,8 @@
1
- export declare class OrbitMapClient {
2
- private readonly apiKey;
3
- private readonly baseUrl;
4
- private readonly projectId?;
5
- constructor(apiKey: string, projectId?: string, apiUrl?: string);
6
- private request;
7
- getContext(projectId?: string): Promise<unknown>;
8
- getTasks(options?: {
9
- status?: string;
10
- priority?: string;
11
- projectId?: string;
12
- orbit?: string;
13
- }): Promise<unknown>;
14
- getTask(taskId: string): Promise<unknown>;
15
- getTaskByNumber(taskNumber: string): Promise<unknown>;
16
- startTask(taskId?: string): Promise<unknown>;
17
- updateTaskStatus(taskId: string, status?: string, deliveryStatus?: string | null): Promise<unknown>;
18
- createSubtasks(parentId: string, subtasks: Array<{
19
- title: string;
20
- description?: string;
21
- priority?: string;
22
- estimated_effort?: string;
23
- }>): Promise<unknown>;
24
- createTask(data: {
25
- title: string;
26
- description?: string;
27
- status?: string;
28
- priority?: string;
29
- agent_instructions?: string;
30
- branch_name?: string;
31
- estimated_effort?: string;
32
- agent_id?: string;
33
- project_id?: string;
34
- source_issue_id?: string;
35
- }): Promise<unknown>;
36
- assignTask(taskId: string, assignment: {
37
- agent_id: string;
38
- } | {
39
- user_id: number;
40
- }): Promise<unknown>;
41
- editTaskContent(taskId: string, data: {
42
- title?: string;
43
- description?: string;
44
- agent_instructions?: string;
45
- }): Promise<unknown>;
46
- addTaskDependency(taskId: string, data: {
47
- target_task_id: string;
48
- type?: string;
49
- note?: string;
50
- }): Promise<unknown>;
51
- removeTaskDependency(taskId: string, targetTaskId: string, type?: string): Promise<unknown>;
52
- logWork(taskId: string, type: string, content: string, metadata?: Record<string, unknown>): Promise<unknown>;
53
- getDocuments(options?: {
54
- type?: string;
55
- search?: string;
56
- projectId?: string;
57
- }): Promise<unknown>;
58
- getDocument(idOrSlug: string, mode?: 'inline' | 'file', options?: {
59
- full?: boolean;
60
- section?: string;
61
- }): Promise<unknown>;
62
- importDocument(data: {
63
- title: string;
64
- type: string;
65
- content: string;
66
- source_path?: string;
67
- context?: string;
68
- workspace_id?: string;
69
- }): Promise<unknown>;
70
- updateDocument(idOrSlug: string, content: string, changelog?: string): Promise<unknown>;
71
- patchDocument(idOrSlug: string, operations: Array<Record<string, unknown>>, baseVersion: number, changelog?: string): Promise<unknown>;
72
- requestUploadUrl(data: {
73
- title: string;
74
- type: string;
75
- filename?: string;
76
- source_path?: string;
77
- context?: string;
78
- workspace_id?: string;
79
- }): Promise<{
80
- data: {
81
- upload_id: string;
82
- document_id: string;
83
- presigned_url: string;
84
- storage_path: string;
85
- expires_at: string;
86
- };
87
- }>;
88
- confirmUpload(uploadId: string): Promise<{
89
- data: {
90
- document_id: string;
91
- slug: string;
92
- imported: boolean;
93
- };
94
- }>;
95
- requestUpdateUploadUrl(idOrSlug: string, changelog?: string): Promise<{
96
- data: {
97
- upload_id: string;
98
- document_id: string;
99
- version: number;
100
- presigned_url: string;
101
- storage_path: string;
102
- expires_at: string;
103
- };
104
- }>;
105
- confirmUpdateUpload(idOrSlug: string, uploadId: string): Promise<{
106
- data: {
107
- document_id: string;
108
- version: number;
109
- updated: boolean;
110
- };
111
- }>;
112
- uploadToPresignedUrl(presignedUrl: string, filePath: string, onProgress?: (bytesUploaded: number, totalBytes: number) => void): Promise<void>;
113
- /**
114
- * Attempts presigned URL upload for a new document.
115
- * Returns null if the endpoint is not available (404), signaling caller to fall back.
116
- */
117
- presignedImport(filePath: string, data: {
118
- title: string;
119
- type: string;
120
- source_path?: string;
121
- context?: string;
122
- workspace_id?: string;
123
- }, onProgress?: (bytesUploaded: number, totalBytes: number) => void): Promise<{
124
- data: {
125
- document_id: string;
126
- slug: string;
127
- imported: boolean;
128
- };
129
- upload_method: string;
130
- } | null>;
131
- /**
132
- * Attempts presigned URL upload for updating a document.
133
- * Returns null if the endpoint is not available (404), signaling caller to fall back.
134
- */
135
- presignedUpdate(idOrSlug: string, filePath: string, changelog?: string, onProgress?: (bytesUploaded: number, totalBytes: number) => void): Promise<{
136
- data: {
137
- document_id: string;
138
- version: number;
139
- updated: boolean;
140
- };
141
- upload_method: string;
142
- } | null>;
143
- shareDocument(documentId: string, projectId: string, agentIds?: string[]): Promise<unknown>;
144
- unshareDocument(documentId: string, projectId: string): Promise<unknown>;
145
- setDocumentVisibility(documentId: string, projectId: string, agentIds: string[]): Promise<unknown>;
146
- getProjects(): Promise<unknown>;
147
- getProjectMembers(projectId: string): Promise<unknown>;
148
- getProjectOverview(projectId: string): Promise<unknown>;
149
- createProject(data: {
150
- name: string;
151
- description?: string;
152
- slug?: string;
153
- }): Promise<unknown>;
154
- registerIssue(data: {
155
- title: string;
156
- description: string;
157
- severity?: string;
158
- related_task_id?: string;
159
- }): Promise<unknown>;
160
- listIssues(options?: {
161
- status?: string;
162
- severity?: string;
163
- limit?: string;
164
- }): Promise<unknown>;
165
- getIssue(idOrNumber: string): Promise<unknown>;
166
- getIssueByNumber(issueNumber: string): Promise<unknown>;
167
- resolveIssueByNumber(issueNumber: string, data: {
168
- status: string;
169
- resolution?: string;
170
- resolved_by_task_id?: string;
171
- }): Promise<unknown>;
172
- resolveIssue(idOrNumber: string, data: {
173
- status: string;
174
- resolution?: string;
175
- resolved_by_task_id?: string;
176
- }): Promise<unknown>;
177
- updateIssueStatus(idOrNumber: string, data: {
178
- status: string;
179
- resolution?: string;
180
- resolved_task_id?: string;
181
- }): Promise<unknown>;
182
- updateIssueStatusByNumber(issueNumber: string, data: {
183
- status: string;
184
- resolution?: string;
185
- resolved_task_id?: string;
186
- }): Promise<unknown>;
187
- logVibe(data: {
188
- content: string;
189
- type: string;
190
- title?: string;
191
- task_id?: string;
192
- }): Promise<unknown>;
193
- listVibes(options?: {
194
- type?: string;
195
- since?: string;
196
- limit?: string;
197
- }): Promise<unknown>;
198
- getVibe(id: string): Promise<unknown>;
199
- updateVibe(id: string, data: {
200
- type?: string;
201
- title?: string;
202
- content?: string;
203
- metadata?: Record<string, unknown>;
204
- }): Promise<unknown>;
205
- listIdeas(options?: {
206
- status?: string;
207
- priority?: string;
208
- limit?: string;
209
- }): Promise<unknown>;
210
- getIdea(idOrNumber: string): Promise<unknown>;
211
- getIdeaByNumber(ideaNumber: string): Promise<unknown>;
212
- createIdea(data: {
213
- content: string;
214
- title?: string;
215
- priority?: string;
216
- metadata?: Record<string, unknown>;
217
- }): Promise<unknown>;
218
- updateIdeaStatus(idOrNumber: string, data: {
219
- status: string;
220
- }): Promise<unknown>;
221
- updateIdeaStatusByNumber(ideaNumber: string, data: {
222
- status: string;
223
- }): Promise<unknown>;
224
- getOrbitItems(orbitIdOrSlug: string, options?: {
225
- type?: string;
226
- }): Promise<unknown>;
227
- orbitAttach(orbitIdOrSlug: string, data: {
228
- item_type: string;
229
- item_id: string;
230
- note?: string;
231
- }): Promise<unknown>;
232
- orbitDetach(orbitIdOrSlug: string, data: {
233
- item_type: string;
234
- item_id: string;
235
- }): Promise<unknown>;
236
- getWorkPrompt(): Promise<unknown>;
237
- getImportDocsPrompt(): Promise<unknown>;
238
- }
239
- export declare function createClient(explicitProjectId?: string): Promise<OrbitMapClient>;
1
+ /**
2
+ * Compatibility shim.
3
+ *
4
+ * The API client now lives in `src/adapters/cloud.ts` as `CloudAdapter`
5
+ * (re-exported here under its historical name `OrbitMapClient`). New code
6
+ * should import `createAdapter` from `./adapters/factory.js` instead.
7
+ */
8
+ export * from './adapters/cloud.js';