orbitmap 0.1.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 (114) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +200 -0
  3. package/dist/api-client.d.ts +234 -0
  4. package/dist/api-client.js +401 -0
  5. package/dist/api-client.js.map +1 -0
  6. package/dist/commands/agents.d.ts +3 -0
  7. package/dist/commands/agents.js +44 -0
  8. package/dist/commands/agents.js.map +1 -0
  9. package/dist/commands/assign.d.ts +5 -0
  10. package/dist/commands/assign.js +44 -0
  11. package/dist/commands/assign.js.map +1 -0
  12. package/dist/commands/context.d.ts +4 -0
  13. package/dist/commands/context.js +37 -0
  14. package/dist/commands/context.js.map +1 -0
  15. package/dist/commands/create.d.ts +12 -0
  16. package/dist/commands/create.js +54 -0
  17. package/dist/commands/create.js.map +1 -0
  18. package/dist/commands/dep.d.ts +11 -0
  19. package/dist/commands/dep.js +56 -0
  20. package/dist/commands/dep.js.map +1 -0
  21. package/dist/commands/doc-import.d.ts +9 -0
  22. package/dist/commands/doc-import.js +97 -0
  23. package/dist/commands/doc-import.js.map +1 -0
  24. package/dist/commands/doc-patch.d.ts +16 -0
  25. package/dist/commands/doc-patch.js +142 -0
  26. package/dist/commands/doc-patch.js.map +1 -0
  27. package/dist/commands/doc-share.d.ts +14 -0
  28. package/dist/commands/doc-share.js +60 -0
  29. package/dist/commands/doc-share.js.map +1 -0
  30. package/dist/commands/doc-update.d.ts +6 -0
  31. package/dist/commands/doc-update.js +64 -0
  32. package/dist/commands/doc-update.js.map +1 -0
  33. package/dist/commands/doc.d.ts +6 -0
  34. package/dist/commands/doc.js +108 -0
  35. package/dist/commands/doc.js.map +1 -0
  36. package/dist/commands/docs-cache.d.ts +11 -0
  37. package/dist/commands/docs-cache.js +119 -0
  38. package/dist/commands/docs-cache.js.map +1 -0
  39. package/dist/commands/docs.d.ts +6 -0
  40. package/dist/commands/docs.js +35 -0
  41. package/dist/commands/docs.js.map +1 -0
  42. package/dist/commands/get.d.ts +8 -0
  43. package/dist/commands/get.js +102 -0
  44. package/dist/commands/get.js.map +1 -0
  45. package/dist/commands/ideas.d.ts +23 -0
  46. package/dist/commands/ideas.js +155 -0
  47. package/dist/commands/ideas.js.map +1 -0
  48. package/dist/commands/init.d.ts +7 -0
  49. package/dist/commands/init.js +175 -0
  50. package/dist/commands/init.js.map +1 -0
  51. package/dist/commands/issues.d.ts +32 -0
  52. package/dist/commands/issues.js +206 -0
  53. package/dist/commands/issues.js.map +1 -0
  54. package/dist/commands/log.d.ts +6 -0
  55. package/dist/commands/log.js +47 -0
  56. package/dist/commands/log.js.map +1 -0
  57. package/dist/commands/login.d.ts +3 -0
  58. package/dist/commands/login.js +48 -0
  59. package/dist/commands/login.js.map +1 -0
  60. package/dist/commands/logout.d.ts +1 -0
  61. package/dist/commands/logout.js +13 -0
  62. package/dist/commands/logout.js.map +1 -0
  63. package/dist/commands/orbit.d.ts +18 -0
  64. package/dist/commands/orbit.js +159 -0
  65. package/dist/commands/orbit.js.map +1 -0
  66. package/dist/commands/overview.d.ts +4 -0
  67. package/dist/commands/overview.js +56 -0
  68. package/dist/commands/overview.js.map +1 -0
  69. package/dist/commands/projects.d.ts +3 -0
  70. package/dist/commands/projects.js +28 -0
  71. package/dist/commands/projects.js.map +1 -0
  72. package/dist/commands/setup-agent.d.ts +3 -0
  73. package/dist/commands/setup-agent.js +178 -0
  74. package/dist/commands/setup-agent.js.map +1 -0
  75. package/dist/commands/start.d.ts +4 -0
  76. package/dist/commands/start.js +38 -0
  77. package/dist/commands/start.js.map +1 -0
  78. package/dist/commands/status.d.ts +5 -0
  79. package/dist/commands/status.js +54 -0
  80. package/dist/commands/status.js.map +1 -0
  81. package/dist/commands/subtask.d.ts +7 -0
  82. package/dist/commands/subtask.js +26 -0
  83. package/dist/commands/subtask.js.map +1 -0
  84. package/dist/commands/task-edit-content.d.ts +7 -0
  85. package/dist/commands/task-edit-content.js +45 -0
  86. package/dist/commands/task-edit-content.js.map +1 -0
  87. package/dist/commands/task.d.ts +66 -0
  88. package/dist/commands/task.js +92 -0
  89. package/dist/commands/task.js.map +1 -0
  90. package/dist/commands/tasks.d.ts +7 -0
  91. package/dist/commands/tasks.js +35 -0
  92. package/dist/commands/tasks.js.map +1 -0
  93. package/dist/commands/vibes.d.ts +27 -0
  94. package/dist/commands/vibes.js +142 -0
  95. package/dist/commands/vibes.js.map +1 -0
  96. package/dist/config.d.ts +14 -0
  97. package/dist/config.js +34 -0
  98. package/dist/config.js.map +1 -0
  99. package/dist/doc-cache.d.ts +24 -0
  100. package/dist/doc-cache.js +116 -0
  101. package/dist/doc-cache.js.map +1 -0
  102. package/dist/errors.d.ts +16 -0
  103. package/dist/errors.js +26 -0
  104. package/dist/errors.js.map +1 -0
  105. package/dist/index.d.ts +2 -0
  106. package/dist/index.js +705 -0
  107. package/dist/index.js.map +1 -0
  108. package/dist/oauth.d.ts +42 -0
  109. package/dist/oauth.js +207 -0
  110. package/dist/oauth.js.map +1 -0
  111. package/dist/output.d.ts +4 -0
  112. package/dist/output.js +66 -0
  113. package/dist/output.js.map +1 -0
  114. package/package.json +50 -0
package/dist/index.js ADDED
@@ -0,0 +1,705 @@
1
+ #!/usr/bin/env node
2
+ import { Command } from 'commander';
3
+ import { initCommand } from './commands/init.js';
4
+ import { contextCommand } from './commands/context.js';
5
+ import { projectsCommand } from './commands/projects.js';
6
+ import { membersCommand } from './commands/agents.js';
7
+ import { overviewCommand } from './commands/overview.js';
8
+ import { tasksCommand } from './commands/tasks.js';
9
+ import { taskCommand } from './commands/task.js';
10
+ import { taskEditContentCommand } from './commands/task-edit-content.js';
11
+ import { startCommand } from './commands/start.js';
12
+ import { statusCommand } from './commands/status.js';
13
+ import { createCommand } from './commands/create.js';
14
+ import { subtaskCommand } from './commands/subtask.js';
15
+ import { assignCommand } from './commands/assign.js';
16
+ import { logCommand } from './commands/log.js';
17
+ import { docsCommand } from './commands/docs.js';
18
+ import { docCommand } from './commands/doc.js';
19
+ import { docImportCommand } from './commands/doc-import.js';
20
+ import { docUpdateCommand } from './commands/doc-update.js';
21
+ import { docPatchCommand } from './commands/doc-patch.js';
22
+ import { docShareCommand, docUnshareCommand, docVisibilityCommand } from './commands/doc-share.js';
23
+ import { docsPullCommand, docsListCacheCommand, docsCleanCommand } from './commands/docs-cache.js';
24
+ import { setupAgentCommand } from './commands/setup-agent.js';
25
+ import { loginCommand } from './commands/login.js';
26
+ import { logoutCommand } from './commands/logout.js';
27
+ import { issueRegisterCommand, issueListCommand, issueShowCommand, issueResolveCommand, issueStatusCommand, } from './commands/issues.js';
28
+ import { vibeLogCommand, vibeListCommand, vibeShowCommand, vibeUpdateCommand, } from './commands/vibes.js';
29
+ import { ideaListCommand, ideaShowCommand, ideaAddCommand, ideaStatusCommand, } from './commands/ideas.js';
30
+ import { orbitItemsCommand, orbitAttachCommand, orbitDetachCommand, } from './commands/orbit.js';
31
+ import { depAddCommand, depRemoveCommand } from './commands/dep.js';
32
+ import { getCommand } from './commands/get.js';
33
+ const program = new Command();
34
+ program
35
+ .name('orbitmap')
36
+ .description('CLI tool for OrbitMap Agent API')
37
+ .version('0.1.0')
38
+ .option('--json', 'Output in JSON format', false)
39
+ .option('--project <id>', 'Project ID or slug to use');
40
+ program
41
+ .command('init')
42
+ .description('Configure API credentials and generate MCP config')
43
+ .option('--key <api-key>', 'Agent API key (enables non-interactive mode)')
44
+ .option('--token <api-key>', 'Alias for --key')
45
+ .option('--project <id>', 'Default project ID')
46
+ .option('--profile <profile>', 'MCP profile: full, lite, manager (default: full)')
47
+ .option('--advanced', 'Show advanced options (e.g. custom API URL)')
48
+ .action(async (opts) => {
49
+ await initCommand({ advanced: opts.advanced, key: opts.key, token: opts.token, project: opts.project, profile: opts.profile });
50
+ });
51
+ program
52
+ .command('login')
53
+ .description('Log in via OAuth (browser-based)')
54
+ .option('--profile <profile>', 'MCP profile: full, lite, manager (default: full)')
55
+ .action(async (opts) => {
56
+ await loginCommand({ profile: opts.profile });
57
+ });
58
+ program
59
+ .command('logout')
60
+ .description('Log out and revoke OAuth tokens')
61
+ .action(async () => {
62
+ await logoutCommand();
63
+ });
64
+ program
65
+ .command('context')
66
+ .description('Show agent identity and current project info')
67
+ .action(async (_opts, cmd) => {
68
+ const globalOpts = cmd.optsWithGlobals();
69
+ await contextCommand({ json: globalOpts.json, project: globalOpts.project });
70
+ });
71
+ program
72
+ .command('projects')
73
+ .description('List all projects assigned to this agent')
74
+ .action(async (_opts, cmd) => {
75
+ const globalOpts = cmd.optsWithGlobals();
76
+ await projectsCommand({ json: globalOpts.json });
77
+ });
78
+ program
79
+ .command('members <project-id>')
80
+ .description('List all members (agents and users) in a project')
81
+ .action(async (projectId, _opts, cmd) => {
82
+ const globalOpts = cmd.optsWithGlobals();
83
+ await membersCommand(projectId, { json: globalOpts.json });
84
+ });
85
+ program
86
+ .command('overview [project-id]')
87
+ .description('Show project overview with task statistics')
88
+ .action(async (projectId, _opts, cmd) => {
89
+ const globalOpts = cmd.optsWithGlobals();
90
+ await overviewCommand(projectId, { json: globalOpts.json, project: globalOpts.project });
91
+ });
92
+ program
93
+ .command('tasks')
94
+ .description('List your assigned tasks')
95
+ .option('--status <statuses>', 'Filter by status (comma-separated)', 'todo,in_progress')
96
+ .option('--priority <priority>', 'Filter by priority')
97
+ .option('--orbit <id-or-slug>', 'Filter by orbit (UUID or slug)')
98
+ .action(async (opts, cmd) => {
99
+ const globalOpts = cmd.optsWithGlobals();
100
+ await tasksCommand({
101
+ json: globalOpts.json,
102
+ project: globalOpts.project,
103
+ status: opts.status,
104
+ priority: opts.priority,
105
+ orbit: opts.orbit,
106
+ });
107
+ });
108
+ program
109
+ .command('get <prefixed-id>')
110
+ .description('Show any object by prefixed ID (TS-xxx, IS-xxx, ID-xxx, VB-xxx)')
111
+ .action(async (prefixedId, _opts, cmd) => {
112
+ const globalOpts = cmd.optsWithGlobals();
113
+ await getCommand(prefixedId, { json: globalOpts.json, project: globalOpts.project });
114
+ });
115
+ program
116
+ .command('task <id>')
117
+ .description('Show full task details (UUID or task number)')
118
+ .action(async (id, _opts, cmd) => {
119
+ const globalOpts = cmd.optsWithGlobals();
120
+ await taskCommand(id, { json: globalOpts.json, project: globalOpts.project });
121
+ });
122
+ program
123
+ .command('task-edit-content <task-id>')
124
+ .description('Edit task content (title, description, agent instructions)')
125
+ .option('--title <title>', 'New title')
126
+ .option('--description <text>', 'New description')
127
+ .option('--agent-instructions <text>', 'New agent instructions')
128
+ .action(async (taskId, opts, cmd) => {
129
+ const globalOpts = cmd.optsWithGlobals();
130
+ await taskEditContentCommand(taskId, {
131
+ json: globalOpts.json,
132
+ project: globalOpts.project,
133
+ title: opts.title,
134
+ description: opts.description,
135
+ agentInstructions: opts.agentInstructions,
136
+ });
137
+ });
138
+ program
139
+ .command('start [task-id]')
140
+ .description('Start working on a task (auto-pick if no ID given)')
141
+ .action(async (taskId, _opts, cmd) => {
142
+ const globalOpts = cmd.optsWithGlobals();
143
+ await startCommand(taskId, { json: globalOpts.json, project: globalOpts.project });
144
+ });
145
+ program
146
+ .command('status <task-id> <status>')
147
+ .description('Update task status (backlog, todo, in_progress, in_review, review_changes, done, blocked)')
148
+ .option('--delivery <status>', 'Delivery status: on_branch, merged, released')
149
+ .action(async (taskId, status, opts, cmd) => {
150
+ const globalOpts = cmd.optsWithGlobals();
151
+ await statusCommand(taskId, status, {
152
+ json: globalOpts.json,
153
+ project: globalOpts.project,
154
+ delivery: opts.delivery,
155
+ });
156
+ });
157
+ program
158
+ .command('create <title>')
159
+ .description('Create a new task')
160
+ .option('--desc <description>', 'Task description')
161
+ .option('--priority <priority>', 'Priority (critical, high, medium, low)')
162
+ .option('--status <status>', 'Initial status')
163
+ .option('--effort <effort>', 'Estimated effort (e.g. 4h, 2d)')
164
+ .option('--agent-id <id>', 'Assign to agent')
165
+ .option('--branch <name>', 'Git branch name')
166
+ .option('--instructions <text>', 'Agent instructions')
167
+ .option('--from-issue <id-or-number>', 'Link task to an existing issue (UUID, number, or IS-prefixed)')
168
+ .action(async (title, opts, cmd) => {
169
+ const globalOpts = cmd.optsWithGlobals();
170
+ await createCommand(title, {
171
+ json: globalOpts.json,
172
+ project: globalOpts.project,
173
+ desc: opts.desc,
174
+ priority: opts.priority,
175
+ status: opts.status,
176
+ effort: opts.effort,
177
+ agentId: opts.agentId,
178
+ branch: opts.branch,
179
+ instructions: opts.instructions,
180
+ fromIssue: opts.fromIssue,
181
+ });
182
+ });
183
+ program
184
+ .command('subtask <parent-id> <title>')
185
+ .description('Create a subtask under a parent task')
186
+ .option('--desc <description>', 'Subtask description')
187
+ .option('--priority <priority>', 'Priority (critical, high, medium, low)')
188
+ .option('--effort <effort>', 'Estimated effort')
189
+ .action(async (parentId, title, opts, cmd) => {
190
+ const globalOpts = cmd.optsWithGlobals();
191
+ await subtaskCommand(parentId, title, {
192
+ json: globalOpts.json,
193
+ project: globalOpts.project,
194
+ desc: opts.desc,
195
+ priority: opts.priority,
196
+ effort: opts.effort,
197
+ });
198
+ });
199
+ program
200
+ .command('assign <task-id> [agent-id]')
201
+ .description('Assign a task to an agent or user')
202
+ .option('--user-id <id>', 'Assign to a user (by user ID) instead of an agent')
203
+ .action(async (taskId, agentId, opts, cmd) => {
204
+ const globalOpts = cmd.optsWithGlobals();
205
+ await assignCommand(taskId, agentId, {
206
+ json: globalOpts.json,
207
+ project: globalOpts.project,
208
+ userId: opts.userId,
209
+ });
210
+ });
211
+ program
212
+ .command('log <task-id> <message>')
213
+ .description('Log work on a task')
214
+ .option('--type <type>', 'Log type: note, code_change, decision, blocker, discovery, exploration, fix', 'note')
215
+ .option('--meta <json>', 'JSON metadata (e.g. \'{"files":["..."]}\')')
216
+ .action(async (taskId, message, opts, cmd) => {
217
+ const globalOpts = cmd.optsWithGlobals();
218
+ await logCommand(taskId, message, {
219
+ json: globalOpts.json,
220
+ project: globalOpts.project,
221
+ type: opts.type,
222
+ meta: opts.meta,
223
+ });
224
+ });
225
+ const docs = program
226
+ .command('docs')
227
+ .description('List project documents (with sections count and context)')
228
+ .option('--type <type>', 'Filter by type (spec, architecture, api, guide, decision, changelog, other)')
229
+ .option('--search <query>', 'Search by title')
230
+ .action(async (opts, cmd) => {
231
+ const globalOpts = cmd.optsWithGlobals();
232
+ await docsCommand({
233
+ json: globalOpts.json,
234
+ project: globalOpts.project,
235
+ type: opts.type,
236
+ search: opts.search,
237
+ });
238
+ });
239
+ docs
240
+ .command('pull [slug]')
241
+ .description('Download document(s) to local cache (.orbitmap/docs/)')
242
+ .action(async (slug, _opts, cmd) => {
243
+ const globalOpts = cmd.optsWithGlobals();
244
+ await docsPullCommand(slug, { json: globalOpts.json, project: globalOpts.project });
245
+ });
246
+ docs
247
+ .command('list-cache')
248
+ .description('Show locally cached documents')
249
+ .action(async (_opts, cmd) => {
250
+ const globalOpts = cmd.optsWithGlobals();
251
+ await docsListCacheCommand({ json: globalOpts.json });
252
+ });
253
+ docs
254
+ .command('clean')
255
+ .description('Remove stale cached documents (>7 days, not in available docs)')
256
+ .action(async (_opts, cmd) => {
257
+ const globalOpts = cmd.optsWithGlobals();
258
+ await docsCleanCommand({ json: globalOpts.json, project: globalOpts.project });
259
+ });
260
+ program
261
+ .command('doc <id-or-slug>')
262
+ .description('Show document (default: TOC, use --full for content, --section for a section)')
263
+ .option('--full', 'Show full document content')
264
+ .option('--section <heading>', 'Show a specific section (e.g. "## Authentication")')
265
+ .action(async (idOrSlug, opts, cmd) => {
266
+ const globalOpts = cmd.optsWithGlobals();
267
+ await docCommand(idOrSlug, {
268
+ json: globalOpts.json,
269
+ project: globalOpts.project,
270
+ full: opts.full,
271
+ section: opts.section,
272
+ });
273
+ });
274
+ program
275
+ .command('doc-import <title>')
276
+ .description('Import a markdown file as a document (project or workspace level)')
277
+ .requiredOption('--type <type>', 'Document type: spec, architecture, api, guide, decision, changelog, other')
278
+ .requiredOption('--file <path>', 'Path to markdown file')
279
+ .option('--source-path <path>', 'Original source path for reference')
280
+ .option('--context <text>', 'Short description of when this document is relevant')
281
+ .option('--workspace-id <uuid>', 'Create as workspace-level document (cross-project knowledge)')
282
+ .action(async (title, opts, cmd) => {
283
+ const globalOpts = cmd.optsWithGlobals();
284
+ await docImportCommand(title, {
285
+ json: globalOpts.json,
286
+ project: globalOpts.project,
287
+ type: opts.type,
288
+ file: opts.file,
289
+ sourcePath: opts.sourcePath,
290
+ context: opts.context,
291
+ workspaceId: opts.workspaceId,
292
+ });
293
+ });
294
+ program
295
+ .command('doc-update <id-or-slug>')
296
+ .description('Update a document with content from a file')
297
+ .requiredOption('--file <path>', 'Path to markdown file with new content')
298
+ .option('--changelog <text>', 'Description of what changed')
299
+ .action(async (idOrSlug, opts, cmd) => {
300
+ const globalOpts = cmd.optsWithGlobals();
301
+ await docUpdateCommand(idOrSlug, {
302
+ json: globalOpts.json,
303
+ project: globalOpts.project,
304
+ file: opts.file,
305
+ changelog: opts.changelog,
306
+ });
307
+ });
308
+ program
309
+ .command('doc-patch <id-or-slug>')
310
+ .description('Patch a document with section-based operations')
311
+ .requiredOption('--base-version <n>', 'Document version to patch against (optimistic lock)')
312
+ .option('--operations <json>', 'JSON array of patch operations')
313
+ .option('--replace-section <heading>', 'Replace a section body (requires --content)')
314
+ .option('--insert-section', 'Insert a new section (requires --content, optional --after)')
315
+ .option('--delete-section <heading>', 'Delete an entire section including heading')
316
+ .option('--append', 'Append content to end of document (requires --content)')
317
+ .option('--after <heading>', 'Insert after this heading (used with --insert-section)')
318
+ .option('--content <text>', 'Content for replace/insert/append operations')
319
+ .option('--changelog <text>', 'Description of what changed')
320
+ .action(async (idOrSlug, opts, cmd) => {
321
+ const globalOpts = cmd.optsWithGlobals();
322
+ await docPatchCommand(idOrSlug, {
323
+ json: globalOpts.json,
324
+ project: globalOpts.project,
325
+ operations: opts.operations,
326
+ baseVersion: opts.baseVersion,
327
+ changelog: opts.changelog,
328
+ replaceSection: opts.replaceSection,
329
+ insertSection: opts.insertSection,
330
+ deleteSection: opts.deleteSection,
331
+ append: opts.append,
332
+ after: opts.after,
333
+ content: opts.content,
334
+ });
335
+ });
336
+ program
337
+ .command('doc-share <document-id> <project-id>')
338
+ .description('Share a document with another project')
339
+ .option('--agents <ids>', 'Comma-separated agent IDs to restrict visibility')
340
+ .action(async (documentId, projectId, opts, cmd) => {
341
+ const globalOpts = cmd.optsWithGlobals();
342
+ await docShareCommand(documentId, projectId, {
343
+ json: globalOpts.json,
344
+ project: globalOpts.project,
345
+ agents: opts.agents,
346
+ });
347
+ });
348
+ program
349
+ .command('doc-unshare <document-id> <project-id>')
350
+ .description('Remove document sharing from a project')
351
+ .action(async (documentId, projectId, _opts, cmd) => {
352
+ const globalOpts = cmd.optsWithGlobals();
353
+ await docUnshareCommand(documentId, projectId, {
354
+ json: globalOpts.json,
355
+ project: globalOpts.project,
356
+ });
357
+ });
358
+ program
359
+ .command('doc-visibility <document-id> <target-project-id>')
360
+ .description('Update document visibility (restrict to specific agents or allow all)')
361
+ .option('--agents <ids>', 'Comma-separated agent IDs to restrict visibility (omit to allow all)')
362
+ .action(async (documentId, targetProjectId, opts, cmd) => {
363
+ const globalOpts = cmd.optsWithGlobals();
364
+ await docVisibilityCommand(documentId, targetProjectId, {
365
+ json: globalOpts.json,
366
+ project: globalOpts.project,
367
+ agents: opts.agents,
368
+ });
369
+ });
370
+ program
371
+ .command('setup-agent')
372
+ .description('Add OrbitMap instructions to your agent config file')
373
+ .option('--agent <type>', 'Agent type: claude, gemini, codex, cursor, windsurf, generic')
374
+ .action(async (opts) => {
375
+ await setupAgentCommand({ agent: opts.agent });
376
+ });
377
+ // ── Shortcut aliases ──
378
+ program
379
+ .command('issues')
380
+ .description('List issues (shortcut for issue list)')
381
+ .option('--status <statuses>', 'Filter by status (comma-separated)', 'open,investigating')
382
+ .option('--severity <level>', 'Filter by severity')
383
+ .option('--limit <n>', 'Limit results')
384
+ .action(async (opts, cmd) => {
385
+ const globalOpts = cmd.optsWithGlobals();
386
+ await issueListCommand({
387
+ json: globalOpts.json,
388
+ project: globalOpts.project,
389
+ status: opts.status,
390
+ severity: opts.severity,
391
+ limit: opts.limit,
392
+ });
393
+ });
394
+ program
395
+ .command('vibes')
396
+ .description('List vibes (shortcut for vibe list)')
397
+ .option('--type <type>', 'Filter by type')
398
+ .option('--since <date>', 'Filter since date (ISO or "today"/"this_week")')
399
+ .option('--limit <n>', 'Limit results')
400
+ .action(async (opts, cmd) => {
401
+ const globalOpts = cmd.optsWithGlobals();
402
+ await vibeListCommand({
403
+ json: globalOpts.json,
404
+ project: globalOpts.project,
405
+ type: opts.type,
406
+ since: opts.since,
407
+ limit: opts.limit,
408
+ });
409
+ });
410
+ program
411
+ .command('ideas')
412
+ .description('List ideas (shortcut for idea list)')
413
+ .option('--status <statuses>', 'Filter by status (comma-separated)', 'pending,accepted')
414
+ .option('--priority <priority>', 'Filter by priority (critical, high, medium, low)')
415
+ .option('--limit <n>', 'Limit results')
416
+ .action(async (opts, cmd) => {
417
+ const globalOpts = cmd.optsWithGlobals();
418
+ await ideaListCommand({
419
+ json: globalOpts.json,
420
+ project: globalOpts.project,
421
+ status: opts.status,
422
+ priority: opts.priority,
423
+ limit: opts.limit,
424
+ });
425
+ });
426
+ // ── Issue commands ──
427
+ const issue = program
428
+ .command('issue')
429
+ .description('Manage issues');
430
+ issue
431
+ .command('register')
432
+ .description('Register a new issue')
433
+ .requiredOption('--title <title>', 'Issue title')
434
+ .requiredOption('--description <text>', 'Issue description')
435
+ .option('--severity <level>', 'Severity: critical, high, medium, low')
436
+ .option('--related-task <id>', 'Related task UUID')
437
+ .action(async (opts, cmd) => {
438
+ const globalOpts = cmd.optsWithGlobals();
439
+ await issueRegisterCommand({
440
+ json: globalOpts.json,
441
+ project: globalOpts.project,
442
+ title: opts.title,
443
+ description: opts.description,
444
+ severity: opts.severity,
445
+ relatedTask: opts.relatedTask,
446
+ });
447
+ });
448
+ issue
449
+ .command('list')
450
+ .description('List issues')
451
+ .option('--status <statuses>', 'Filter by status (comma-separated)', 'open,investigating')
452
+ .option('--severity <level>', 'Filter by severity')
453
+ .option('--limit <n>', 'Limit results')
454
+ .action(async (opts, cmd) => {
455
+ const globalOpts = cmd.optsWithGlobals();
456
+ await issueListCommand({
457
+ json: globalOpts.json,
458
+ project: globalOpts.project,
459
+ status: opts.status,
460
+ severity: opts.severity,
461
+ limit: opts.limit,
462
+ });
463
+ });
464
+ issue
465
+ .command('show <id-or-number>')
466
+ .description('Show full issue details (UUID or issue number)')
467
+ .action(async (idOrNumber, _opts, cmd) => {
468
+ const globalOpts = cmd.optsWithGlobals();
469
+ await issueShowCommand(idOrNumber, {
470
+ json: globalOpts.json,
471
+ project: globalOpts.project,
472
+ });
473
+ });
474
+ issue
475
+ .command('resolve <id-or-number>')
476
+ .description('Resolve an issue')
477
+ .requiredOption('--status <status>', 'Resolve status: resolved, wont_fix, duplicate')
478
+ .option('--resolution <text>', 'Resolution description (required for resolved/wont_fix)')
479
+ .option('--resolved-task <id>', 'Task UUID that resolved this issue')
480
+ .action(async (idOrNumber, opts, cmd) => {
481
+ const globalOpts = cmd.optsWithGlobals();
482
+ await issueResolveCommand(idOrNumber, {
483
+ json: globalOpts.json,
484
+ project: globalOpts.project,
485
+ status: opts.status,
486
+ resolution: opts.resolution,
487
+ resolvedTask: opts.resolvedTask,
488
+ });
489
+ });
490
+ issue
491
+ .command('status <id-or-number> <status>')
492
+ .description('Update issue status (open, investigating, backlog, resolved, wont_fix, duplicate)')
493
+ .option('--resolution <text>', 'Resolution description (required for resolved/wont_fix)')
494
+ .option('--resolved-task <id>', 'Task UUID that resolved this issue')
495
+ .action(async (idOrNumber, status, opts, cmd) => {
496
+ const globalOpts = cmd.optsWithGlobals();
497
+ await issueStatusCommand(idOrNumber, status, {
498
+ json: globalOpts.json,
499
+ project: globalOpts.project,
500
+ resolution: opts.resolution,
501
+ resolvedTask: opts.resolvedTask,
502
+ });
503
+ });
504
+ // ── Vibe commands ──
505
+ const vibe = program
506
+ .command('vibe')
507
+ .description('Manage vibes');
508
+ vibe
509
+ .command('log')
510
+ .description('Log a new vibe')
511
+ .requiredOption('--content <text>', 'Vibe content')
512
+ .requiredOption('--type <type>', 'Type: note, code_change, decision, discovery, idea, exploration, fix')
513
+ .option('--title <title>', 'Optional title')
514
+ .option('--task <id>', 'Related task UUID')
515
+ .action(async (opts, cmd) => {
516
+ const globalOpts = cmd.optsWithGlobals();
517
+ await vibeLogCommand({
518
+ json: globalOpts.json,
519
+ project: globalOpts.project,
520
+ content: opts.content,
521
+ type: opts.type,
522
+ title: opts.title,
523
+ task: opts.task,
524
+ });
525
+ });
526
+ vibe
527
+ .command('list')
528
+ .description('List vibes')
529
+ .option('--type <type>', 'Filter by type')
530
+ .option('--since <date>', 'Filter since date (ISO or "today"/"this_week")')
531
+ .option('--limit <n>', 'Limit results')
532
+ .action(async (opts, cmd) => {
533
+ const globalOpts = cmd.optsWithGlobals();
534
+ await vibeListCommand({
535
+ json: globalOpts.json,
536
+ project: globalOpts.project,
537
+ type: opts.type,
538
+ since: opts.since,
539
+ limit: opts.limit,
540
+ });
541
+ });
542
+ vibe
543
+ .command('show <id>')
544
+ .description('Show full vibe details')
545
+ .action(async (id, _opts, cmd) => {
546
+ const globalOpts = cmd.optsWithGlobals();
547
+ await vibeShowCommand(id, {
548
+ json: globalOpts.json,
549
+ project: globalOpts.project,
550
+ });
551
+ });
552
+ vibe
553
+ .command('update <id>')
554
+ .description('Update a vibe')
555
+ .option('--type <type>', 'New type')
556
+ .option('--title <title>', 'New title')
557
+ .option('--content <text>', 'New content')
558
+ .option('--metadata <json>', 'JSON metadata')
559
+ .action(async (id, opts, cmd) => {
560
+ const globalOpts = cmd.optsWithGlobals();
561
+ await vibeUpdateCommand(id, {
562
+ json: globalOpts.json,
563
+ project: globalOpts.project,
564
+ type: opts.type,
565
+ title: opts.title,
566
+ content: opts.content,
567
+ metadata: opts.metadata,
568
+ });
569
+ });
570
+ // ── Idea commands ──
571
+ const idea = program
572
+ .command('idea')
573
+ .description('Manage ideas');
574
+ idea
575
+ .command('list')
576
+ .description('List ideas')
577
+ .option('--status <statuses>', 'Filter by status (comma-separated)', 'pending,accepted')
578
+ .option('--priority <priority>', 'Filter by priority (critical, high, medium, low)')
579
+ .option('--limit <n>', 'Limit results')
580
+ .action(async (opts, cmd) => {
581
+ const globalOpts = cmd.optsWithGlobals();
582
+ await ideaListCommand({
583
+ json: globalOpts.json,
584
+ project: globalOpts.project,
585
+ status: opts.status,
586
+ priority: opts.priority,
587
+ limit: opts.limit,
588
+ });
589
+ });
590
+ idea
591
+ .command('show <id-or-number>')
592
+ .description('Show full idea details (UUID or idea number)')
593
+ .action(async (idOrNumber, _opts, cmd) => {
594
+ const globalOpts = cmd.optsWithGlobals();
595
+ await ideaShowCommand(idOrNumber, {
596
+ json: globalOpts.json,
597
+ project: globalOpts.project,
598
+ });
599
+ });
600
+ idea
601
+ .command('add')
602
+ .description('Add a new idea')
603
+ .requiredOption('--content <text>', 'Idea content')
604
+ .option('--title <title>', 'Optional short title')
605
+ .option('--priority <priority>', 'Priority (critical, high, medium, low)')
606
+ .action(async (opts, cmd) => {
607
+ const globalOpts = cmd.optsWithGlobals();
608
+ await ideaAddCommand({
609
+ json: globalOpts.json,
610
+ project: globalOpts.project,
611
+ content: opts.content,
612
+ title: opts.title,
613
+ priority: opts.priority,
614
+ });
615
+ });
616
+ idea
617
+ .command('status <id-or-number>')
618
+ .description('Update idea status')
619
+ .requiredOption('--status <status>', 'New status: pending, accepted, used, rejected')
620
+ .action(async (idOrNumber, opts, cmd) => {
621
+ const globalOpts = cmd.optsWithGlobals();
622
+ await ideaStatusCommand(idOrNumber, {
623
+ json: globalOpts.json,
624
+ project: globalOpts.project,
625
+ status: opts.status,
626
+ });
627
+ });
628
+ // ── Orbit commands ──
629
+ const orbit = program
630
+ .command('orbit')
631
+ .description('Manage orbit items');
632
+ orbit
633
+ .command('items <orbit-id-or-slug>')
634
+ .description('List all items in an orbit')
635
+ .option('--type <type>', 'Filter by type: task, issue, vibe, document')
636
+ .action(async (orbitIdOrSlug, opts, cmd) => {
637
+ const globalOpts = cmd.optsWithGlobals();
638
+ await orbitItemsCommand(orbitIdOrSlug, {
639
+ json: globalOpts.json,
640
+ project: globalOpts.project,
641
+ type: opts.type,
642
+ });
643
+ });
644
+ orbit
645
+ .command('attach <orbit-id-or-slug>')
646
+ .description('Attach an object to an orbit')
647
+ .requiredOption('--type <type>', 'Object type: task, issue, vibe, document')
648
+ .requiredOption('--id <uuid>', 'Object UUID')
649
+ .option('--note <text>', 'Optional note for the attachment')
650
+ .action(async (orbitIdOrSlug, opts, cmd) => {
651
+ const globalOpts = cmd.optsWithGlobals();
652
+ await orbitAttachCommand(orbitIdOrSlug, {
653
+ json: globalOpts.json,
654
+ project: globalOpts.project,
655
+ type: opts.type,
656
+ id: opts.id,
657
+ note: opts.note,
658
+ });
659
+ });
660
+ orbit
661
+ .command('detach <orbit-id-or-slug>')
662
+ .description('Detach an object from an orbit')
663
+ .requiredOption('--type <type>', 'Object type: task, issue, vibe, document')
664
+ .requiredOption('--id <uuid>', 'Object UUID')
665
+ .action(async (orbitIdOrSlug, opts, cmd) => {
666
+ const globalOpts = cmd.optsWithGlobals();
667
+ await orbitDetachCommand(orbitIdOrSlug, {
668
+ json: globalOpts.json,
669
+ project: globalOpts.project,
670
+ type: opts.type,
671
+ id: opts.id,
672
+ });
673
+ });
674
+ // ── Dependency commands ──
675
+ const dep = program
676
+ .command('dep')
677
+ .description('Manage task dependencies');
678
+ dep
679
+ .command('add <task-id> <target-task-id>')
680
+ .description('Add a dependency between tasks')
681
+ .option('--type <type>', 'Dependency type: depends_on, related', 'depends_on')
682
+ .option('--note <text>', 'Optional note for the dependency')
683
+ .action(async (taskId, targetTaskId, opts, cmd) => {
684
+ const globalOpts = cmd.optsWithGlobals();
685
+ await depAddCommand(taskId, targetTaskId, {
686
+ json: globalOpts.json,
687
+ project: globalOpts.project,
688
+ type: opts.type,
689
+ note: opts.note,
690
+ });
691
+ });
692
+ dep
693
+ .command('remove <task-id> <target-task-id>')
694
+ .description('Remove a dependency between tasks')
695
+ .option('--type <type>', 'Dependency type to remove: depends_on, related')
696
+ .action(async (taskId, targetTaskId, opts, cmd) => {
697
+ const globalOpts = cmd.optsWithGlobals();
698
+ await depRemoveCommand(taskId, targetTaskId, {
699
+ json: globalOpts.json,
700
+ project: globalOpts.project,
701
+ type: opts.type,
702
+ });
703
+ });
704
+ program.parse();
705
+ //# sourceMappingURL=index.js.map