orbitmap 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +546 -212
- package/dist/adapters/cloud.d.ts +367 -0
- package/dist/adapters/cloud.js +582 -0
- package/dist/adapters/cloud.js.map +1 -0
- package/dist/adapters/factory.d.ts +15 -0
- package/dist/adapters/factory.js +31 -0
- package/dist/adapters/factory.js.map +1 -0
- package/dist/adapters/local/adapter.d.ts +351 -0
- package/dist/adapters/local/adapter.js +346 -0
- package/dist/adapters/local/adapter.js.map +1 -0
- package/dist/adapters/local/context.d.ts +112 -0
- package/dist/adapters/local/context.js +137 -0
- package/dist/adapters/local/context.js.map +1 -0
- package/dist/adapters/local/entities/documents.d.ts +85 -0
- package/dist/adapters/local/entities/documents.js +251 -0
- package/dist/adapters/local/entities/documents.js.map +1 -0
- package/dist/adapters/local/entities/planning.d.ts +108 -0
- package/dist/adapters/local/entities/planning.js +540 -0
- package/dist/adapters/local/entities/planning.js.map +1 -0
- package/dist/adapters/local/entities/tasks.d.ts +95 -0
- package/dist/adapters/local/entities/tasks.js +442 -0
- package/dist/adapters/local/entities/tasks.js.map +1 -0
- package/dist/adapters/local/entities/work-items.d.ts +110 -0
- package/dist/adapters/local/entities/work-items.js +623 -0
- package/dist/adapters/local/entities/work-items.js.map +1 -0
- package/dist/adapters/local/rules.d.ts +172 -0
- package/dist/adapters/local/rules.js +319 -0
- package/dist/adapters/local/rules.js.map +1 -0
- package/dist/adapters/local/shapes.d.ts +209 -0
- package/dist/adapters/local/shapes.js +558 -0
- package/dist/adapters/local/shapes.js.map +1 -0
- package/dist/adapters/local/store.d.ts +200 -0
- package/dist/adapters/local/store.js +665 -0
- package/dist/adapters/local/store.js.map +1 -0
- package/dist/adapters/local/types.d.ts +226 -0
- package/dist/adapters/local/types.js +41 -0
- package/dist/adapters/local/types.js.map +1 -0
- package/dist/adapters/types.d.ts +332 -0
- package/dist/adapters/types.js +2 -0
- package/dist/adapters/types.js.map +1 -0
- package/dist/agent-instructions.d.ts +25 -9
- package/dist/agent-instructions.js +285 -237
- package/dist/agent-instructions.js.map +1 -1
- package/dist/api-client.d.ts +8 -239
- package/dist/api-client.js +8 -403
- package/dist/api-client.js.map +1 -1
- package/dist/commands/agents.d.ts +1 -1
- package/dist/commands/agents.js +10 -10
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/areas.d.ts +3 -0
- package/dist/commands/areas.js +29 -0
- package/dist/commands/areas.js.map +1 -0
- package/dist/commands/assign.d.ts +3 -2
- package/dist/commands/assign.js +52 -15
- package/dist/commands/assign.js.map +1 -1
- package/dist/commands/context.d.ts +1 -1
- package/dist/commands/context.js +18 -12
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/create-area.d.ts +7 -0
- package/dist/commands/create-area.js +29 -0
- package/dist/commands/create-area.js.map +1 -0
- package/dist/commands/create.d.ts +3 -1
- package/dist/commands/create.js +5 -8
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/dep.d.ts +2 -2
- package/dist/commands/dep.js +3 -3
- package/dist/commands/dep.js.map +1 -1
- package/dist/commands/doc-import.d.ts +1 -1
- package/dist/commands/doc-import.js +2 -2
- package/dist/commands/doc-import.js.map +1 -1
- package/dist/commands/doc-patch.d.ts +1 -1
- package/dist/commands/doc-patch.js +2 -2
- package/dist/commands/doc-patch.js.map +1 -1
- package/dist/commands/doc-share.d.ts +6 -6
- package/dist/commands/doc-share.js +13 -13
- package/dist/commands/doc-share.js.map +1 -1
- package/dist/commands/doc-update.d.ts +1 -1
- package/dist/commands/doc-update.js +2 -2
- package/dist/commands/doc-update.js.map +1 -1
- package/dist/commands/doc.d.ts +1 -1
- package/dist/commands/doc.js +5 -4
- package/dist/commands/doc.js.map +1 -1
- package/dist/commands/docs-cache.d.ts +2 -2
- package/dist/commands/docs-cache.js +3 -3
- package/dist/commands/docs-cache.js.map +1 -1
- package/dist/commands/docs.d.ts +1 -1
- package/dist/commands/docs.js +2 -2
- package/dist/commands/docs.js.map +1 -1
- package/dist/commands/get.d.ts +1 -1
- package/dist/commands/get.js +43 -3
- package/dist/commands/get.js.map +1 -1
- package/dist/commands/ideas.d.ts +4 -4
- package/dist/commands/ideas.js +6 -11
- package/dist/commands/ideas.js.map +1 -1
- package/dist/commands/init.d.ts +45 -3
- package/dist/commands/init.js +452 -104
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/intent.d.ts +41 -0
- package/dist/commands/intent.js +237 -0
- package/dist/commands/intent.js.map +1 -0
- package/dist/commands/issues.d.ts +6 -5
- package/dist/commands/issues.js +8 -12
- package/dist/commands/issues.js.map +1 -1
- package/dist/commands/log.d.ts +1 -1
- package/dist/commands/log.js +2 -2
- package/dist/commands/log.js.map +1 -1
- package/dist/commands/mission.d.ts +42 -0
- package/dist/commands/mission.js +219 -0
- package/dist/commands/mission.js.map +1 -0
- package/dist/commands/orbit.d.ts +40 -3
- package/dist/commands/orbit.js +231 -58
- package/dist/commands/orbit.js.map +1 -1
- package/dist/commands/overview.d.ts +2 -2
- package/dist/commands/overview.js +25 -28
- package/dist/commands/overview.js.map +1 -1
- package/dist/commands/setup-agent.d.ts +27 -0
- package/dist/commands/setup-agent.js +85 -30
- package/dist/commands/setup-agent.js.map +1 -1
- package/dist/commands/setup-mcp.d.ts +1 -1
- package/dist/commands/setup-mcp.js +20 -49
- package/dist/commands/setup-mcp.js.map +1 -1
- package/dist/commands/start.d.ts +1 -1
- package/dist/commands/start.js +2 -2
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/status.d.ts +2 -1
- package/dist/commands/status.js +3 -3
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/subtask.d.ts +1 -1
- package/dist/commands/subtask.js +2 -2
- package/dist/commands/subtask.js.map +1 -1
- package/dist/commands/task-edit-content.d.ts +1 -1
- package/dist/commands/task-edit-content.js +2 -2
- package/dist/commands/task-edit-content.js.map +1 -1
- package/dist/commands/task.d.ts +10 -3
- package/dist/commands/task.js +19 -21
- package/dist/commands/task.js.map +1 -1
- package/dist/commands/tasks.d.ts +1 -1
- package/dist/commands/tasks.js +2 -2
- package/dist/commands/tasks.js.map +1 -1
- package/dist/commands/vibes.d.ts +4 -4
- package/dist/commands/vibes.js +5 -5
- package/dist/commands/vibes.js.map +1 -1
- package/dist/config.d.ts +69 -9
- package/dist/config.js +206 -23
- package/dist/config.js.map +1 -1
- package/dist/doc-cache.d.ts +23 -3
- package/dist/doc-cache.js +72 -12
- package/dist/doc-cache.js.map +1 -1
- package/dist/errors.d.ts +19 -2
- package/dist/errors.js +35 -0
- package/dist/errors.js.map +1 -1
- package/dist/id-resolve.d.ts +61 -0
- package/dist/id-resolve.js +87 -0
- package/dist/id-resolve.js.map +1 -0
- package/dist/index.js +477 -104
- package/dist/index.js.map +1 -1
- package/dist/mcp-config.d.ts +36 -0
- package/dist/mcp-config.js +51 -0
- package/dist/mcp-config.js.map +1 -0
- package/dist/oauth.d.ts +8 -0
- package/dist/oauth.js +54 -15
- package/dist/oauth.js.map +1 -1
- package/dist/output.js +7 -2
- package/dist/output.js.map +1 -1
- package/dist/paths.d.ts +97 -0
- package/dist/paths.js +178 -0
- package/dist/paths.js.map +1 -0
- package/dist/project-config.d.ts +75 -0
- package/dist/project-config.js +55 -0
- package/dist/project-config.js.map +1 -0
- package/dist/workspace-resolve.d.ts +158 -0
- package/dist/workspace-resolve.js +284 -0
- package/dist/workspace-resolve.js.map +1 -0
- package/package.json +53 -50
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Command } from 'commander';
|
|
3
3
|
import { initCommand } from './commands/init.js';
|
|
4
4
|
import { contextCommand } from './commands/context.js';
|
|
5
|
-
import {
|
|
5
|
+
import { areasCommand } from './commands/areas.js';
|
|
6
6
|
import { membersCommand } from './commands/agents.js';
|
|
7
7
|
import { overviewCommand } from './commands/overview.js';
|
|
8
8
|
import { tasksCommand } from './commands/tasks.js';
|
|
@@ -28,27 +28,66 @@ import { logoutCommand } from './commands/logout.js';
|
|
|
28
28
|
import { issueRegisterCommand, issueListCommand, issueShowCommand, issueResolveCommand, issueStatusCommand, } from './commands/issues.js';
|
|
29
29
|
import { vibeLogCommand, vibeListCommand, vibeShowCommand, vibeUpdateCommand, } from './commands/vibes.js';
|
|
30
30
|
import { ideaListCommand, ideaShowCommand, ideaAddCommand, ideaStatusCommand, } from './commands/ideas.js';
|
|
31
|
-
import { orbitItemsCommand, orbitAttachCommand, orbitDetachCommand, } from './commands/orbit.js';
|
|
31
|
+
import { orbitListCommand, orbitShowCommand, orbitCreateCommand, orbitUpdateCommand, orbitItemsCommand, orbitAttachCommand, orbitDetachCommand, orbitAreaLinkCommand, orbitAreaUnlinkCommand, orbitDepAddCommand, } from './commands/orbit.js';
|
|
32
|
+
import { intentListCommand, intentShowCommand, intentCreateCommand, intentUpdateCommand, intentLinkCommand, intentUnlinkCommand, intentOrbitCommand, } from './commands/intent.js';
|
|
33
|
+
import { missionListCommand, missionShowCommand, missionCreateCommand, missionUpdateCommand, missionStatusCommand, missionLinkCommand, missionUnlinkCommand, } from './commands/mission.js';
|
|
32
34
|
import { depAddCommand, depRemoveCommand } from './commands/dep.js';
|
|
33
35
|
import { getCommand } from './commands/get.js';
|
|
34
|
-
import {
|
|
36
|
+
import { createRequire } from 'node:module';
|
|
37
|
+
import { createAreaCommand } from './commands/create-area.js';
|
|
38
|
+
import { setWorkspaceFlag } from './workspace-resolve.js';
|
|
35
39
|
const program = new Command();
|
|
40
|
+
/**
|
|
41
|
+
* `--version` reads the real package version instead of a hardcoded literal, which had gone
|
|
42
|
+
* stale (it still said 0.3.0 two releases later, so `orbitmap --version` lied about what was
|
|
43
|
+
* installed). `../package.json` resolves to the repo root from both `src/` and `dist/`, and npm
|
|
44
|
+
* always ships package.json in the tarball regardless of the `files` allow-list.
|
|
45
|
+
*/
|
|
46
|
+
const { version } = createRequire(import.meta.url)('../package.json');
|
|
36
47
|
program
|
|
37
48
|
.name('orbitmap')
|
|
38
49
|
.description('CLI tool for OrbitMap Agent API')
|
|
39
|
-
.version(
|
|
50
|
+
.version(version)
|
|
40
51
|
.option('--json', 'Output in JSON format', false)
|
|
41
|
-
.option('--
|
|
52
|
+
.option('--area <id>', 'Area ID or slug to use')
|
|
53
|
+
.option('--workspace <path>', 'Local workspace directory to use (local mode)');
|
|
54
|
+
// The workspace flag is program-level and consumed by the resolver, not by the
|
|
55
|
+
// command modules, so capture it once before any action runs.
|
|
56
|
+
program.hook('preAction', (thisCommand) => {
|
|
57
|
+
setWorkspaceFlag(thisCommand.opts()['workspace']);
|
|
58
|
+
});
|
|
42
59
|
program
|
|
43
60
|
.command('init')
|
|
44
|
-
.description('
|
|
61
|
+
.description('Set up OrbitMap (cloud account or local files) and install the agent skills')
|
|
45
62
|
.option('--key <api-key>', 'Agent API key (enables non-interactive mode)')
|
|
46
63
|
.option('--token <api-key>', 'Alias for --key')
|
|
47
|
-
.option('--
|
|
64
|
+
.option('--area <id>', 'Default area ID (cloud) or first area name (local)')
|
|
48
65
|
.option('--profile <profile>', 'MCP profile: full, lite, manager (default: full)')
|
|
49
66
|
.option('--advanced', 'Show advanced options (e.g. custom API URL)')
|
|
50
|
-
.
|
|
51
|
-
|
|
67
|
+
.option('--local', 'Set up local-files mode without the interactive question')
|
|
68
|
+
.option('--workspace <path>', 'Local workspace directory (default: ./.orbitmap)')
|
|
69
|
+
.option('--workspace-name <name>', 'Local workspace name (default: current directory name)')
|
|
70
|
+
.option('--no-skills', 'Skip installing the OrbitMap agent skills')
|
|
71
|
+
.option('--agent <type>', 'Coding agent to install the skills for: claude, gemini, codex, cursor, windsurf, generic ' +
|
|
72
|
+
'(default: detected from this directory, or asked)')
|
|
73
|
+
.option('--global', 'Cloud: write to ~/.orbitmap/config.json instead of ./.orbitmap/config.json')
|
|
74
|
+
.action(async (opts, command) => {
|
|
75
|
+
// `--workspace` also exists as a program-level flag, and Commander binds it there;
|
|
76
|
+
// `optsWithGlobals()` picks it up whichever position it was given in.
|
|
77
|
+
const all = command.optsWithGlobals();
|
|
78
|
+
await initCommand({
|
|
79
|
+
advanced: opts.advanced,
|
|
80
|
+
key: opts.key,
|
|
81
|
+
token: opts.token,
|
|
82
|
+
area: opts.area ?? all['area'],
|
|
83
|
+
profile: opts.profile,
|
|
84
|
+
local: opts.local,
|
|
85
|
+
workspace: opts.workspace ?? all['workspace'],
|
|
86
|
+
workspaceName: opts.workspaceName,
|
|
87
|
+
skills: opts.skills,
|
|
88
|
+
agent: opts.agent,
|
|
89
|
+
global: opts.global,
|
|
90
|
+
});
|
|
52
91
|
});
|
|
53
92
|
program
|
|
54
93
|
.command('login')
|
|
@@ -65,45 +104,47 @@ program
|
|
|
65
104
|
});
|
|
66
105
|
program
|
|
67
106
|
.command('context')
|
|
68
|
-
.description('Show agent identity and current
|
|
107
|
+
.description('Show agent identity and current area info')
|
|
69
108
|
.action(async (_opts, cmd) => {
|
|
70
109
|
const globalOpts = cmd.optsWithGlobals();
|
|
71
|
-
await contextCommand({ json: globalOpts.json,
|
|
110
|
+
await contextCommand({ json: globalOpts.json, area: globalOpts.area });
|
|
72
111
|
});
|
|
73
112
|
program
|
|
74
|
-
.command('
|
|
75
|
-
.description('List all
|
|
113
|
+
.command('areas')
|
|
114
|
+
.description('List all areas assigned to this agent')
|
|
76
115
|
.action(async (_opts, cmd) => {
|
|
77
116
|
const globalOpts = cmd.optsWithGlobals();
|
|
78
|
-
await
|
|
117
|
+
await areasCommand({ json: globalOpts.json });
|
|
79
118
|
});
|
|
80
119
|
program
|
|
81
|
-
.command('create-
|
|
82
|
-
.description('Create a new
|
|
83
|
-
.option('--desc <description>', '
|
|
84
|
-
.option('--slug <slug>', '
|
|
120
|
+
.command('create-area <name>')
|
|
121
|
+
.description('Create a new area')
|
|
122
|
+
.option('--desc <description>', 'Area description')
|
|
123
|
+
.option('--slug <slug>', 'Area slug (auto-generated from name if omitted)')
|
|
124
|
+
.option('--workspace-id <uuid>', 'Workspace to create the area in')
|
|
85
125
|
.action(async (name, opts, cmd) => {
|
|
86
126
|
const globalOpts = cmd.optsWithGlobals();
|
|
87
|
-
await
|
|
127
|
+
await createAreaCommand(name, {
|
|
88
128
|
json: globalOpts.json,
|
|
89
|
-
|
|
129
|
+
area: globalOpts.area,
|
|
90
130
|
desc: opts.desc,
|
|
91
131
|
slug: opts.slug,
|
|
132
|
+
workspaceId: opts.workspaceId,
|
|
92
133
|
});
|
|
93
134
|
});
|
|
94
135
|
program
|
|
95
|
-
.command('members <
|
|
96
|
-
.description('List all members (agents and users) in
|
|
97
|
-
.action(async (
|
|
136
|
+
.command('members <area-id>')
|
|
137
|
+
.description('List all members (agents and users) in an area')
|
|
138
|
+
.action(async (areaId, _opts, cmd) => {
|
|
98
139
|
const globalOpts = cmd.optsWithGlobals();
|
|
99
|
-
await membersCommand(
|
|
140
|
+
await membersCommand(areaId, { json: globalOpts.json });
|
|
100
141
|
});
|
|
101
142
|
program
|
|
102
|
-
.command('overview [
|
|
103
|
-
.description('Show
|
|
104
|
-
.action(async (
|
|
143
|
+
.command('overview [area-id]')
|
|
144
|
+
.description('Show area overview with task statistics')
|
|
145
|
+
.action(async (areaId, _opts, cmd) => {
|
|
105
146
|
const globalOpts = cmd.optsWithGlobals();
|
|
106
|
-
await overviewCommand(
|
|
147
|
+
await overviewCommand(areaId, { json: globalOpts.json, area: globalOpts.area });
|
|
107
148
|
});
|
|
108
149
|
program
|
|
109
150
|
.command('tasks')
|
|
@@ -115,7 +156,7 @@ program
|
|
|
115
156
|
const globalOpts = cmd.optsWithGlobals();
|
|
116
157
|
await tasksCommand({
|
|
117
158
|
json: globalOpts.json,
|
|
118
|
-
|
|
159
|
+
area: globalOpts.area,
|
|
119
160
|
status: opts.status,
|
|
120
161
|
priority: opts.priority,
|
|
121
162
|
orbit: opts.orbit,
|
|
@@ -123,20 +164,20 @@ program
|
|
|
123
164
|
});
|
|
124
165
|
program
|
|
125
166
|
.command('get <prefixed-id>')
|
|
126
|
-
.description('Show any object by prefixed ID (TS-xxx, IS-xxx, ID-xxx, VB-xxx)')
|
|
167
|
+
.description('Show any object by prefixed ID (TS-xxx, IS-xxx, ID-xxx, VB-xxx, IN-xxx, MS-xxx)')
|
|
127
168
|
.action(async (prefixedId, _opts, cmd) => {
|
|
128
169
|
const globalOpts = cmd.optsWithGlobals();
|
|
129
|
-
await getCommand(prefixedId, { json: globalOpts.json,
|
|
170
|
+
await getCommand(prefixedId, { json: globalOpts.json, area: globalOpts.area });
|
|
130
171
|
});
|
|
131
172
|
program
|
|
132
|
-
.command('task <id>')
|
|
133
|
-
.description('Show full task details (UUID or task number)')
|
|
173
|
+
.command('task <id-or-number>')
|
|
174
|
+
.description('Show full task details (UUID, TS-prefixed ID, or task number)')
|
|
134
175
|
.action(async (id, _opts, cmd) => {
|
|
135
176
|
const globalOpts = cmd.optsWithGlobals();
|
|
136
|
-
await taskCommand(id, { json: globalOpts.json,
|
|
177
|
+
await taskCommand(id, { json: globalOpts.json, area: globalOpts.area });
|
|
137
178
|
});
|
|
138
179
|
program
|
|
139
|
-
.command('task-edit-content <
|
|
180
|
+
.command('task-edit-content <id-or-number>')
|
|
140
181
|
.description('Edit task content (title, description, agent instructions)')
|
|
141
182
|
.option('--title <title>', 'New title')
|
|
142
183
|
.option('--description <text>', 'New description')
|
|
@@ -145,29 +186,31 @@ program
|
|
|
145
186
|
const globalOpts = cmd.optsWithGlobals();
|
|
146
187
|
await taskEditContentCommand(taskId, {
|
|
147
188
|
json: globalOpts.json,
|
|
148
|
-
|
|
189
|
+
area: globalOpts.area,
|
|
149
190
|
title: opts.title,
|
|
150
191
|
description: opts.description,
|
|
151
192
|
agentInstructions: opts.agentInstructions,
|
|
152
193
|
});
|
|
153
194
|
});
|
|
154
195
|
program
|
|
155
|
-
.command('start [
|
|
196
|
+
.command('start [id-or-number]')
|
|
156
197
|
.description('Start working on a task (auto-pick if no ID given)')
|
|
157
198
|
.action(async (taskId, _opts, cmd) => {
|
|
158
199
|
const globalOpts = cmd.optsWithGlobals();
|
|
159
|
-
await startCommand(taskId, { json: globalOpts.json,
|
|
200
|
+
await startCommand(taskId, { json: globalOpts.json, area: globalOpts.area });
|
|
160
201
|
});
|
|
161
202
|
program
|
|
162
|
-
.command('status <
|
|
203
|
+
.command('status <id-or-number> <status>')
|
|
163
204
|
.description('Update task status (backlog, todo, in_progress, in_review, review_changes, done, blocked)')
|
|
164
205
|
.option('--delivery <status>', 'Delivery status: on_branch, merged, released')
|
|
206
|
+
.option('--force', 'Allow done even with unfinished subtasks')
|
|
165
207
|
.action(async (taskId, status, opts, cmd) => {
|
|
166
208
|
const globalOpts = cmd.optsWithGlobals();
|
|
167
209
|
await statusCommand(taskId, status, {
|
|
168
210
|
json: globalOpts.json,
|
|
169
|
-
|
|
211
|
+
area: globalOpts.area,
|
|
170
212
|
delivery: opts.delivery,
|
|
213
|
+
force: opts.force,
|
|
171
214
|
});
|
|
172
215
|
});
|
|
173
216
|
program
|
|
@@ -181,11 +224,13 @@ program
|
|
|
181
224
|
.option('--branch <name>', 'Git branch name')
|
|
182
225
|
.option('--instructions <text>', 'Agent instructions')
|
|
183
226
|
.option('--from-issue <id-or-number>', 'Link task to an existing issue (UUID, number, or IS-prefixed)')
|
|
227
|
+
.option('--intent <id>', 'Link task to an intent')
|
|
228
|
+
.option('--orbit <id>', 'Attach task to an orbit (omit to inherit the intent orbit)')
|
|
184
229
|
.action(async (title, opts, cmd) => {
|
|
185
230
|
const globalOpts = cmd.optsWithGlobals();
|
|
186
231
|
await createCommand(title, {
|
|
187
232
|
json: globalOpts.json,
|
|
188
|
-
|
|
233
|
+
area: globalOpts.area,
|
|
189
234
|
desc: opts.desc,
|
|
190
235
|
priority: opts.priority,
|
|
191
236
|
status: opts.status,
|
|
@@ -194,10 +239,12 @@ program
|
|
|
194
239
|
branch: opts.branch,
|
|
195
240
|
instructions: opts.instructions,
|
|
196
241
|
fromIssue: opts.fromIssue,
|
|
242
|
+
intent: opts.intent,
|
|
243
|
+
orbit: opts.orbit,
|
|
197
244
|
});
|
|
198
245
|
});
|
|
199
246
|
program
|
|
200
|
-
.command('subtask <parent-id> <title>')
|
|
247
|
+
.command('subtask <parent-id-or-number> <title>')
|
|
201
248
|
.description('Create a subtask under a parent task')
|
|
202
249
|
.option('--desc <description>', 'Subtask description')
|
|
203
250
|
.option('--priority <priority>', 'Priority (critical, high, medium, low)')
|
|
@@ -206,26 +253,28 @@ program
|
|
|
206
253
|
const globalOpts = cmd.optsWithGlobals();
|
|
207
254
|
await subtaskCommand(parentId, title, {
|
|
208
255
|
json: globalOpts.json,
|
|
209
|
-
|
|
256
|
+
area: globalOpts.area,
|
|
210
257
|
desc: opts.desc,
|
|
211
258
|
priority: opts.priority,
|
|
212
259
|
effort: opts.effort,
|
|
213
260
|
});
|
|
214
261
|
});
|
|
215
262
|
program
|
|
216
|
-
.command('assign <
|
|
217
|
-
.description('Assign a task to an agent or user')
|
|
263
|
+
.command('assign <id-or-number> [agent-id]')
|
|
264
|
+
.description('Assign a task, issue, idea, or intent to an agent or user')
|
|
218
265
|
.option('--user-id <id>', 'Assign to a user (by user ID) instead of an agent')
|
|
219
|
-
.
|
|
266
|
+
.option('--type <type>', 'Object type: task, issue, idea, intent (auto-detected from prefixed IDs; default task)')
|
|
267
|
+
.action(async (objectId, agentId, opts, cmd) => {
|
|
220
268
|
const globalOpts = cmd.optsWithGlobals();
|
|
221
|
-
await assignCommand(
|
|
269
|
+
await assignCommand(objectId, agentId, {
|
|
222
270
|
json: globalOpts.json,
|
|
223
|
-
|
|
271
|
+
area: globalOpts.area,
|
|
224
272
|
userId: opts.userId,
|
|
273
|
+
type: opts.type,
|
|
225
274
|
});
|
|
226
275
|
});
|
|
227
276
|
program
|
|
228
|
-
.command('log <
|
|
277
|
+
.command('log <id-or-number> <message>')
|
|
229
278
|
.description('Log work on a task')
|
|
230
279
|
.option('--type <type>', 'Log type: note, code_change, decision, blocker, discovery, exploration, fix', 'note')
|
|
231
280
|
.option('--meta <json>', 'JSON metadata (e.g. \'{"files":["..."]}\')')
|
|
@@ -233,21 +282,21 @@ program
|
|
|
233
282
|
const globalOpts = cmd.optsWithGlobals();
|
|
234
283
|
await logCommand(taskId, message, {
|
|
235
284
|
json: globalOpts.json,
|
|
236
|
-
|
|
285
|
+
area: globalOpts.area,
|
|
237
286
|
type: opts.type,
|
|
238
287
|
meta: opts.meta,
|
|
239
288
|
});
|
|
240
289
|
});
|
|
241
290
|
const docs = program
|
|
242
291
|
.command('docs')
|
|
243
|
-
.description('List
|
|
292
|
+
.description('List area documents (with sections count and context)')
|
|
244
293
|
.option('--type <type>', 'Filter by type (spec, architecture, api, guide, decision, changelog, other)')
|
|
245
294
|
.option('--search <query>', 'Search by title')
|
|
246
295
|
.action(async (opts, cmd) => {
|
|
247
296
|
const globalOpts = cmd.optsWithGlobals();
|
|
248
297
|
await docsCommand({
|
|
249
298
|
json: globalOpts.json,
|
|
250
|
-
|
|
299
|
+
area: globalOpts.area,
|
|
251
300
|
type: opts.type,
|
|
252
301
|
search: opts.search,
|
|
253
302
|
});
|
|
@@ -257,7 +306,7 @@ docs
|
|
|
257
306
|
.description('Download document(s) to local cache (.orbitmap/docs/)')
|
|
258
307
|
.action(async (slug, _opts, cmd) => {
|
|
259
308
|
const globalOpts = cmd.optsWithGlobals();
|
|
260
|
-
await docsPullCommand(slug, { json: globalOpts.json,
|
|
309
|
+
await docsPullCommand(slug, { json: globalOpts.json, area: globalOpts.area });
|
|
261
310
|
});
|
|
262
311
|
docs
|
|
263
312
|
.command('list-cache')
|
|
@@ -271,7 +320,7 @@ docs
|
|
|
271
320
|
.description('Remove stale cached documents (>7 days, not in available docs)')
|
|
272
321
|
.action(async (_opts, cmd) => {
|
|
273
322
|
const globalOpts = cmd.optsWithGlobals();
|
|
274
|
-
await docsCleanCommand({ json: globalOpts.json,
|
|
323
|
+
await docsCleanCommand({ json: globalOpts.json, area: globalOpts.area });
|
|
275
324
|
});
|
|
276
325
|
program
|
|
277
326
|
.command('doc <id-or-slug>')
|
|
@@ -282,24 +331,24 @@ program
|
|
|
282
331
|
const globalOpts = cmd.optsWithGlobals();
|
|
283
332
|
await docCommand(idOrSlug, {
|
|
284
333
|
json: globalOpts.json,
|
|
285
|
-
|
|
334
|
+
area: globalOpts.area,
|
|
286
335
|
full: opts.full,
|
|
287
336
|
section: opts.section,
|
|
288
337
|
});
|
|
289
338
|
});
|
|
290
339
|
program
|
|
291
340
|
.command('doc-import <title>')
|
|
292
|
-
.description('Import a markdown file as a document (
|
|
341
|
+
.description('Import a markdown file as a document (area or workspace level)')
|
|
293
342
|
.requiredOption('--type <type>', 'Document type: spec, architecture, api, guide, decision, changelog, other')
|
|
294
343
|
.requiredOption('--file <path>', 'Path to markdown file')
|
|
295
344
|
.option('--source-path <path>', 'Original source path for reference')
|
|
296
345
|
.option('--context <text>', 'Short description of when this document is relevant')
|
|
297
|
-
.option('--workspace-id <uuid>', 'Create as workspace-level document (cross-
|
|
346
|
+
.option('--workspace-id <uuid>', 'Create as workspace-level document (cross-area knowledge)')
|
|
298
347
|
.action(async (title, opts, cmd) => {
|
|
299
348
|
const globalOpts = cmd.optsWithGlobals();
|
|
300
349
|
await docImportCommand(title, {
|
|
301
350
|
json: globalOpts.json,
|
|
302
|
-
|
|
351
|
+
area: globalOpts.area,
|
|
303
352
|
type: opts.type,
|
|
304
353
|
file: opts.file,
|
|
305
354
|
sourcePath: opts.sourcePath,
|
|
@@ -316,7 +365,7 @@ program
|
|
|
316
365
|
const globalOpts = cmd.optsWithGlobals();
|
|
317
366
|
await docUpdateCommand(idOrSlug, {
|
|
318
367
|
json: globalOpts.json,
|
|
319
|
-
|
|
368
|
+
area: globalOpts.area,
|
|
320
369
|
file: opts.file,
|
|
321
370
|
changelog: opts.changelog,
|
|
322
371
|
});
|
|
@@ -337,7 +386,7 @@ program
|
|
|
337
386
|
const globalOpts = cmd.optsWithGlobals();
|
|
338
387
|
await docPatchCommand(idOrSlug, {
|
|
339
388
|
json: globalOpts.json,
|
|
340
|
-
|
|
389
|
+
area: globalOpts.area,
|
|
341
390
|
operations: opts.operations,
|
|
342
391
|
baseVersion: opts.baseVersion,
|
|
343
392
|
changelog: opts.changelog,
|
|
@@ -350,42 +399,43 @@ program
|
|
|
350
399
|
});
|
|
351
400
|
});
|
|
352
401
|
program
|
|
353
|
-
.command('doc-share <document-id> <
|
|
354
|
-
.description('Share a document with another
|
|
402
|
+
.command('doc-share <document-id> <area-id>')
|
|
403
|
+
.description('Share a document with another area')
|
|
355
404
|
.option('--agents <ids>', 'Comma-separated agent IDs to restrict visibility')
|
|
356
|
-
.action(async (documentId,
|
|
405
|
+
.action(async (documentId, areaId, opts, cmd) => {
|
|
357
406
|
const globalOpts = cmd.optsWithGlobals();
|
|
358
|
-
await docShareCommand(documentId,
|
|
407
|
+
await docShareCommand(documentId, areaId, {
|
|
359
408
|
json: globalOpts.json,
|
|
360
|
-
|
|
409
|
+
area: globalOpts.area,
|
|
361
410
|
agents: opts.agents,
|
|
362
411
|
});
|
|
363
412
|
});
|
|
364
413
|
program
|
|
365
|
-
.command('doc-unshare <document-id> <
|
|
366
|
-
.description('Remove document sharing from
|
|
367
|
-
.action(async (documentId,
|
|
414
|
+
.command('doc-unshare <document-id> <area-id>')
|
|
415
|
+
.description('Remove document sharing from an area')
|
|
416
|
+
.action(async (documentId, areaId, _opts, cmd) => {
|
|
368
417
|
const globalOpts = cmd.optsWithGlobals();
|
|
369
|
-
await docUnshareCommand(documentId,
|
|
418
|
+
await docUnshareCommand(documentId, areaId, {
|
|
370
419
|
json: globalOpts.json,
|
|
371
|
-
|
|
420
|
+
area: globalOpts.area,
|
|
372
421
|
});
|
|
373
422
|
});
|
|
374
423
|
program
|
|
375
|
-
.command('doc-visibility <document-id> <target-
|
|
424
|
+
.command('doc-visibility <document-id> <target-area-id>')
|
|
376
425
|
.description('Update document visibility (restrict to specific agents or allow all)')
|
|
377
426
|
.option('--agents <ids>', 'Comma-separated agent IDs to restrict visibility (omit to allow all)')
|
|
378
|
-
.action(async (documentId,
|
|
427
|
+
.action(async (documentId, targetAreaId, opts, cmd) => {
|
|
379
428
|
const globalOpts = cmd.optsWithGlobals();
|
|
380
|
-
await docVisibilityCommand(documentId,
|
|
429
|
+
await docVisibilityCommand(documentId, targetAreaId, {
|
|
381
430
|
json: globalOpts.json,
|
|
382
|
-
|
|
431
|
+
area: globalOpts.area,
|
|
383
432
|
agents: opts.agents,
|
|
384
433
|
});
|
|
385
434
|
});
|
|
386
435
|
program
|
|
387
436
|
.command('setup-agent')
|
|
388
|
-
.description('
|
|
437
|
+
.description('Refresh the OrbitMap agent instructions/skills, or add another agent type ' +
|
|
438
|
+
'(`init` already installs them once)')
|
|
389
439
|
.option('--agent <type>', 'Agent type: claude, gemini, codex, cursor, windsurf, generic')
|
|
390
440
|
.action(async (opts) => {
|
|
391
441
|
await setupAgentCommand({ agent: opts.agent });
|
|
@@ -395,14 +445,14 @@ program
|
|
|
395
445
|
.description('Install OrbitMap MCP entry into .mcp.json in the current directory (no API calls)')
|
|
396
446
|
.option('--token <api-key>', 'Agent API key (Bearer auth)')
|
|
397
447
|
.option('--oauth', 'Use OAuth (no Authorization header; auth happens on first MCP use)')
|
|
398
|
-
.option('--
|
|
448
|
+
.option('--area <slug>', 'Area slug or UUID (required for --token, optional for --oauth)')
|
|
399
449
|
.option('--profile <profile>', 'MCP profile: full, lite, manager (default: full)')
|
|
400
450
|
.action(async (opts, cmd) => {
|
|
401
451
|
const globalOpts = cmd.optsWithGlobals();
|
|
402
452
|
await setupMcpCommand({
|
|
403
453
|
token: opts.token,
|
|
404
454
|
oauth: opts.oauth,
|
|
405
|
-
|
|
455
|
+
area: opts.area || globalOpts.area,
|
|
406
456
|
profile: opts.profile,
|
|
407
457
|
});
|
|
408
458
|
});
|
|
@@ -417,7 +467,7 @@ program
|
|
|
417
467
|
const globalOpts = cmd.optsWithGlobals();
|
|
418
468
|
await issueListCommand({
|
|
419
469
|
json: globalOpts.json,
|
|
420
|
-
|
|
470
|
+
area: globalOpts.area,
|
|
421
471
|
status: opts.status,
|
|
422
472
|
severity: opts.severity,
|
|
423
473
|
limit: opts.limit,
|
|
@@ -433,7 +483,7 @@ program
|
|
|
433
483
|
const globalOpts = cmd.optsWithGlobals();
|
|
434
484
|
await vibeListCommand({
|
|
435
485
|
json: globalOpts.json,
|
|
436
|
-
|
|
486
|
+
area: globalOpts.area,
|
|
437
487
|
type: opts.type,
|
|
438
488
|
since: opts.since,
|
|
439
489
|
limit: opts.limit,
|
|
@@ -449,12 +499,40 @@ program
|
|
|
449
499
|
const globalOpts = cmd.optsWithGlobals();
|
|
450
500
|
await ideaListCommand({
|
|
451
501
|
json: globalOpts.json,
|
|
452
|
-
|
|
502
|
+
area: globalOpts.area,
|
|
453
503
|
status: opts.status,
|
|
454
504
|
priority: opts.priority,
|
|
455
505
|
limit: opts.limit,
|
|
456
506
|
});
|
|
457
507
|
});
|
|
508
|
+
program
|
|
509
|
+
.command('intents')
|
|
510
|
+
.description('List intents (shortcut for intent list)')
|
|
511
|
+
.option('--status <statuses>', 'Filter by status (comma-separated; default new,design,plan,build)')
|
|
512
|
+
.option('--limit <n>', 'Limit results')
|
|
513
|
+
.action(async (opts, cmd) => {
|
|
514
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
515
|
+
await intentListCommand({
|
|
516
|
+
json: globalOpts.json,
|
|
517
|
+
area: globalOpts.area,
|
|
518
|
+
status: opts.status,
|
|
519
|
+
limit: opts.limit,
|
|
520
|
+
});
|
|
521
|
+
});
|
|
522
|
+
program
|
|
523
|
+
.command('missions')
|
|
524
|
+
.description('List missions (shortcut for mission list)')
|
|
525
|
+
.option('--status <statuses>', 'Filter by status (comma-separated; default new,active)')
|
|
526
|
+
.option('--limit <n>', 'Limit results')
|
|
527
|
+
.action(async (opts, cmd) => {
|
|
528
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
529
|
+
await missionListCommand({
|
|
530
|
+
json: globalOpts.json,
|
|
531
|
+
area: globalOpts.area,
|
|
532
|
+
status: opts.status,
|
|
533
|
+
limit: opts.limit,
|
|
534
|
+
});
|
|
535
|
+
});
|
|
458
536
|
// ── Issue commands ──
|
|
459
537
|
const issue = program
|
|
460
538
|
.command('issue')
|
|
@@ -466,15 +544,17 @@ issue
|
|
|
466
544
|
.requiredOption('--description <text>', 'Issue description')
|
|
467
545
|
.option('--severity <level>', 'Severity: critical, high, medium, low')
|
|
468
546
|
.option('--related-task <id>', 'Related task UUID')
|
|
547
|
+
.option('--intent <id>', 'Link issue to an intent')
|
|
469
548
|
.action(async (opts, cmd) => {
|
|
470
549
|
const globalOpts = cmd.optsWithGlobals();
|
|
471
550
|
await issueRegisterCommand({
|
|
472
551
|
json: globalOpts.json,
|
|
473
|
-
|
|
552
|
+
area: globalOpts.area,
|
|
474
553
|
title: opts.title,
|
|
475
554
|
description: opts.description,
|
|
476
555
|
severity: opts.severity,
|
|
477
556
|
relatedTask: opts.relatedTask,
|
|
557
|
+
intent: opts.intent,
|
|
478
558
|
});
|
|
479
559
|
});
|
|
480
560
|
issue
|
|
@@ -487,7 +567,7 @@ issue
|
|
|
487
567
|
const globalOpts = cmd.optsWithGlobals();
|
|
488
568
|
await issueListCommand({
|
|
489
569
|
json: globalOpts.json,
|
|
490
|
-
|
|
570
|
+
area: globalOpts.area,
|
|
491
571
|
status: opts.status,
|
|
492
572
|
severity: opts.severity,
|
|
493
573
|
limit: opts.limit,
|
|
@@ -500,7 +580,7 @@ issue
|
|
|
500
580
|
const globalOpts = cmd.optsWithGlobals();
|
|
501
581
|
await issueShowCommand(idOrNumber, {
|
|
502
582
|
json: globalOpts.json,
|
|
503
|
-
|
|
583
|
+
area: globalOpts.area,
|
|
504
584
|
});
|
|
505
585
|
});
|
|
506
586
|
issue
|
|
@@ -513,7 +593,7 @@ issue
|
|
|
513
593
|
const globalOpts = cmd.optsWithGlobals();
|
|
514
594
|
await issueResolveCommand(idOrNumber, {
|
|
515
595
|
json: globalOpts.json,
|
|
516
|
-
|
|
596
|
+
area: globalOpts.area,
|
|
517
597
|
status: opts.status,
|
|
518
598
|
resolution: opts.resolution,
|
|
519
599
|
resolvedTask: opts.resolvedTask,
|
|
@@ -528,7 +608,7 @@ issue
|
|
|
528
608
|
const globalOpts = cmd.optsWithGlobals();
|
|
529
609
|
await issueStatusCommand(idOrNumber, status, {
|
|
530
610
|
json: globalOpts.json,
|
|
531
|
-
|
|
611
|
+
area: globalOpts.area,
|
|
532
612
|
resolution: opts.resolution,
|
|
533
613
|
resolvedTask: opts.resolvedTask,
|
|
534
614
|
});
|
|
@@ -548,7 +628,7 @@ vibe
|
|
|
548
628
|
const globalOpts = cmd.optsWithGlobals();
|
|
549
629
|
await vibeLogCommand({
|
|
550
630
|
json: globalOpts.json,
|
|
551
|
-
|
|
631
|
+
area: globalOpts.area,
|
|
552
632
|
content: opts.content,
|
|
553
633
|
type: opts.type,
|
|
554
634
|
title: opts.title,
|
|
@@ -565,7 +645,7 @@ vibe
|
|
|
565
645
|
const globalOpts = cmd.optsWithGlobals();
|
|
566
646
|
await vibeListCommand({
|
|
567
647
|
json: globalOpts.json,
|
|
568
|
-
|
|
648
|
+
area: globalOpts.area,
|
|
569
649
|
type: opts.type,
|
|
570
650
|
since: opts.since,
|
|
571
651
|
limit: opts.limit,
|
|
@@ -578,7 +658,7 @@ vibe
|
|
|
578
658
|
const globalOpts = cmd.optsWithGlobals();
|
|
579
659
|
await vibeShowCommand(id, {
|
|
580
660
|
json: globalOpts.json,
|
|
581
|
-
|
|
661
|
+
area: globalOpts.area,
|
|
582
662
|
});
|
|
583
663
|
});
|
|
584
664
|
vibe
|
|
@@ -592,7 +672,7 @@ vibe
|
|
|
592
672
|
const globalOpts = cmd.optsWithGlobals();
|
|
593
673
|
await vibeUpdateCommand(id, {
|
|
594
674
|
json: globalOpts.json,
|
|
595
|
-
|
|
675
|
+
area: globalOpts.area,
|
|
596
676
|
type: opts.type,
|
|
597
677
|
title: opts.title,
|
|
598
678
|
content: opts.content,
|
|
@@ -613,7 +693,7 @@ idea
|
|
|
613
693
|
const globalOpts = cmd.optsWithGlobals();
|
|
614
694
|
await ideaListCommand({
|
|
615
695
|
json: globalOpts.json,
|
|
616
|
-
|
|
696
|
+
area: globalOpts.area,
|
|
617
697
|
status: opts.status,
|
|
618
698
|
priority: opts.priority,
|
|
619
699
|
limit: opts.limit,
|
|
@@ -626,7 +706,7 @@ idea
|
|
|
626
706
|
const globalOpts = cmd.optsWithGlobals();
|
|
627
707
|
await ideaShowCommand(idOrNumber, {
|
|
628
708
|
json: globalOpts.json,
|
|
629
|
-
|
|
709
|
+
area: globalOpts.area,
|
|
630
710
|
});
|
|
631
711
|
});
|
|
632
712
|
idea
|
|
@@ -639,7 +719,7 @@ idea
|
|
|
639
719
|
const globalOpts = cmd.optsWithGlobals();
|
|
640
720
|
await ideaAddCommand({
|
|
641
721
|
json: globalOpts.json,
|
|
642
|
-
|
|
722
|
+
area: globalOpts.area,
|
|
643
723
|
content: opts.content,
|
|
644
724
|
title: opts.title,
|
|
645
725
|
priority: opts.priority,
|
|
@@ -653,37 +733,93 @@ idea
|
|
|
653
733
|
const globalOpts = cmd.optsWithGlobals();
|
|
654
734
|
await ideaStatusCommand(idOrNumber, {
|
|
655
735
|
json: globalOpts.json,
|
|
656
|
-
|
|
736
|
+
area: globalOpts.area,
|
|
657
737
|
status: opts.status,
|
|
658
738
|
});
|
|
659
739
|
});
|
|
660
740
|
// ── Orbit commands ──
|
|
661
741
|
const orbit = program
|
|
662
742
|
.command('orbit')
|
|
663
|
-
.description('Manage orbit items');
|
|
743
|
+
.description('Manage orbits and orbit items');
|
|
744
|
+
orbit
|
|
745
|
+
.command('list')
|
|
746
|
+
.description('List orbits (workspace-scoped from the area context)')
|
|
747
|
+
.option('--workspace <id>', 'Filter by workspace UUID')
|
|
748
|
+
.action(async (opts, cmd) => {
|
|
749
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
750
|
+
await orbitListCommand({
|
|
751
|
+
json: globalOpts.json,
|
|
752
|
+
area: globalOpts.area,
|
|
753
|
+
workspace: opts.workspace,
|
|
754
|
+
});
|
|
755
|
+
});
|
|
756
|
+
orbit
|
|
757
|
+
.command('show <orbit-id-or-slug>')
|
|
758
|
+
.description('Show orbit details (areas, task counts, resources)')
|
|
759
|
+
.action(async (orbitIdOrSlug, _opts, cmd) => {
|
|
760
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
761
|
+
await orbitShowCommand(orbitIdOrSlug, {
|
|
762
|
+
json: globalOpts.json,
|
|
763
|
+
area: globalOpts.area,
|
|
764
|
+
});
|
|
765
|
+
});
|
|
766
|
+
orbit
|
|
767
|
+
.command('create <name>')
|
|
768
|
+
.description('Create a new orbit (no delete exists — archive via orbit update)')
|
|
769
|
+
.option('--desc <description>', 'Orbit description')
|
|
770
|
+
.option('--color <hex>', 'Color (#rgb or #rrggbb, e.g. #5B8DEF)')
|
|
771
|
+
.option('--areas <ids>', 'Comma-separated area UUIDs to link')
|
|
772
|
+
.action(async (name, opts, cmd) => {
|
|
773
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
774
|
+
await orbitCreateCommand(name, {
|
|
775
|
+
json: globalOpts.json,
|
|
776
|
+
area: globalOpts.area,
|
|
777
|
+
desc: opts.desc,
|
|
778
|
+
color: opts.color,
|
|
779
|
+
areas: opts.areas,
|
|
780
|
+
});
|
|
781
|
+
});
|
|
782
|
+
orbit
|
|
783
|
+
.command('update <orbit-id-or-slug>')
|
|
784
|
+
.description('Update an orbit (name, description, status, color)')
|
|
785
|
+
.option('--name <name>', 'New name')
|
|
786
|
+
.option('--desc <description>', 'New description')
|
|
787
|
+
.option('--status <status>', 'Status: active, completed, archived')
|
|
788
|
+
.option('--color <hex>', 'Color (#rgb or #rrggbb)')
|
|
789
|
+
.action(async (orbitIdOrSlug, opts, cmd) => {
|
|
790
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
791
|
+
await orbitUpdateCommand(orbitIdOrSlug, {
|
|
792
|
+
json: globalOpts.json,
|
|
793
|
+
area: globalOpts.area,
|
|
794
|
+
name: opts.name,
|
|
795
|
+
desc: opts.desc,
|
|
796
|
+
status: opts.status,
|
|
797
|
+
color: opts.color,
|
|
798
|
+
});
|
|
799
|
+
});
|
|
664
800
|
orbit
|
|
665
801
|
.command('items <orbit-id-or-slug>')
|
|
666
802
|
.description('List all items in an orbit')
|
|
667
|
-
.option('--type <type>', 'Filter by type: task, issue, vibe, document')
|
|
803
|
+
.option('--type <type>', 'Filter by type: task, issue, vibe, idea, document')
|
|
668
804
|
.action(async (orbitIdOrSlug, opts, cmd) => {
|
|
669
805
|
const globalOpts = cmd.optsWithGlobals();
|
|
670
806
|
await orbitItemsCommand(orbitIdOrSlug, {
|
|
671
807
|
json: globalOpts.json,
|
|
672
|
-
|
|
808
|
+
area: globalOpts.area,
|
|
673
809
|
type: opts.type,
|
|
674
810
|
});
|
|
675
811
|
});
|
|
676
812
|
orbit
|
|
677
813
|
.command('attach <orbit-id-or-slug>')
|
|
678
814
|
.description('Attach an object to an orbit')
|
|
679
|
-
.requiredOption('--type <type>', 'Object type: task, issue, vibe, document')
|
|
815
|
+
.requiredOption('--type <type>', 'Object type: task, issue, vibe, idea, document')
|
|
680
816
|
.requiredOption('--id <uuid>', 'Object UUID')
|
|
681
817
|
.option('--note <text>', 'Optional note for the attachment')
|
|
682
818
|
.action(async (orbitIdOrSlug, opts, cmd) => {
|
|
683
819
|
const globalOpts = cmd.optsWithGlobals();
|
|
684
820
|
await orbitAttachCommand(orbitIdOrSlug, {
|
|
685
821
|
json: globalOpts.json,
|
|
686
|
-
|
|
822
|
+
area: globalOpts.area,
|
|
687
823
|
type: opts.type,
|
|
688
824
|
id: opts.id,
|
|
689
825
|
note: opts.note,
|
|
@@ -692,13 +828,250 @@ orbit
|
|
|
692
828
|
orbit
|
|
693
829
|
.command('detach <orbit-id-or-slug>')
|
|
694
830
|
.description('Detach an object from an orbit')
|
|
695
|
-
.requiredOption('--type <type>', 'Object type: task, issue, vibe, document')
|
|
831
|
+
.requiredOption('--type <type>', 'Object type: task, issue, vibe, idea, document')
|
|
696
832
|
.requiredOption('--id <uuid>', 'Object UUID')
|
|
697
833
|
.action(async (orbitIdOrSlug, opts, cmd) => {
|
|
698
834
|
const globalOpts = cmd.optsWithGlobals();
|
|
699
835
|
await orbitDetachCommand(orbitIdOrSlug, {
|
|
700
836
|
json: globalOpts.json,
|
|
701
|
-
|
|
837
|
+
area: globalOpts.area,
|
|
838
|
+
type: opts.type,
|
|
839
|
+
id: opts.id,
|
|
840
|
+
});
|
|
841
|
+
});
|
|
842
|
+
const orbitArea = orbit
|
|
843
|
+
.command('area')
|
|
844
|
+
.description('Manage orbit-area links');
|
|
845
|
+
orbitArea
|
|
846
|
+
.command('link <orbit-id-or-slug> <area-id>')
|
|
847
|
+
.description('Link an area to an orbit')
|
|
848
|
+
.action(async (orbitIdOrSlug, areaId, _opts, cmd) => {
|
|
849
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
850
|
+
await orbitAreaLinkCommand(orbitIdOrSlug, areaId, {
|
|
851
|
+
json: globalOpts.json,
|
|
852
|
+
area: globalOpts.area,
|
|
853
|
+
});
|
|
854
|
+
});
|
|
855
|
+
orbitArea
|
|
856
|
+
.command('unlink <orbit-id-or-slug> <area-id>')
|
|
857
|
+
.description('Unlink an area from an orbit')
|
|
858
|
+
.action(async (orbitIdOrSlug, areaId, _opts, cmd) => {
|
|
859
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
860
|
+
await orbitAreaUnlinkCommand(orbitIdOrSlug, areaId, {
|
|
861
|
+
json: globalOpts.json,
|
|
862
|
+
area: globalOpts.area,
|
|
863
|
+
});
|
|
864
|
+
});
|
|
865
|
+
orbit
|
|
866
|
+
.command('dep <orbit-id-or-slug> <target-orbit-id>')
|
|
867
|
+
.description('Add an orbit-to-orbit dependency (no remove exists in the API)')
|
|
868
|
+
.option('--note <text>', 'Optional note for the dependency')
|
|
869
|
+
.action(async (orbitIdOrSlug, targetOrbitId, opts, cmd) => {
|
|
870
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
871
|
+
await orbitDepAddCommand(orbitIdOrSlug, targetOrbitId, {
|
|
872
|
+
json: globalOpts.json,
|
|
873
|
+
area: globalOpts.area,
|
|
874
|
+
note: opts.note,
|
|
875
|
+
});
|
|
876
|
+
});
|
|
877
|
+
// ── Intent commands ──
|
|
878
|
+
const intent = program
|
|
879
|
+
.command('intent')
|
|
880
|
+
.description('Manage intents (workspace-level desired outcomes)');
|
|
881
|
+
intent
|
|
882
|
+
.command('list')
|
|
883
|
+
.description('List intents')
|
|
884
|
+
.option('--status <statuses>', 'Filter by status (comma-separated; default new,design,plan,build)')
|
|
885
|
+
.option('--limit <n>', 'Limit results')
|
|
886
|
+
.action(async (opts, cmd) => {
|
|
887
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
888
|
+
await intentListCommand({
|
|
889
|
+
json: globalOpts.json,
|
|
890
|
+
area: globalOpts.area,
|
|
891
|
+
status: opts.status,
|
|
892
|
+
limit: opts.limit,
|
|
893
|
+
});
|
|
894
|
+
});
|
|
895
|
+
intent
|
|
896
|
+
.command('show <id-or-number>')
|
|
897
|
+
.description('Show full intent details (UUID or IN-prefixed number)')
|
|
898
|
+
.action(async (idOrNumber, _opts, cmd) => {
|
|
899
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
900
|
+
await intentShowCommand(idOrNumber, {
|
|
901
|
+
json: globalOpts.json,
|
|
902
|
+
area: globalOpts.area,
|
|
903
|
+
});
|
|
904
|
+
});
|
|
905
|
+
intent
|
|
906
|
+
.command('create <title>')
|
|
907
|
+
.description('Create a new intent')
|
|
908
|
+
.option('--outcome <text>', 'Desired outcome')
|
|
909
|
+
.option('--status <status>', 'Initial status: new, design, plan, build, done, cancelled (default new)')
|
|
910
|
+
.option('--orbit <id>', 'Attach the intent to an orbit after creation')
|
|
911
|
+
.action(async (title, opts, cmd) => {
|
|
912
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
913
|
+
await intentCreateCommand(title, {
|
|
914
|
+
json: globalOpts.json,
|
|
915
|
+
area: globalOpts.area,
|
|
916
|
+
outcome: opts.outcome,
|
|
917
|
+
status: opts.status,
|
|
918
|
+
orbit: opts.orbit,
|
|
919
|
+
});
|
|
920
|
+
});
|
|
921
|
+
intent
|
|
922
|
+
.command('update <id-or-number>')
|
|
923
|
+
.description('Update an intent (title, outcome, status)')
|
|
924
|
+
.option('--title <title>', 'New title')
|
|
925
|
+
.option('--outcome <text>', 'New outcome')
|
|
926
|
+
.option('--status <status>', 'Status: new, design, plan, build, done, cancelled')
|
|
927
|
+
.action(async (idOrNumber, opts, cmd) => {
|
|
928
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
929
|
+
await intentUpdateCommand(idOrNumber, {
|
|
930
|
+
json: globalOpts.json,
|
|
931
|
+
area: globalOpts.area,
|
|
932
|
+
title: opts.title,
|
|
933
|
+
outcome: opts.outcome,
|
|
934
|
+
status: opts.status,
|
|
935
|
+
});
|
|
936
|
+
});
|
|
937
|
+
intent
|
|
938
|
+
.command('link <id-or-number>')
|
|
939
|
+
.description('Link a task or issue to an intent')
|
|
940
|
+
.requiredOption('--type <type>', 'Object type: task, issue')
|
|
941
|
+
.requiredOption('--id <uuid>', 'Object UUID')
|
|
942
|
+
.action(async (idOrNumber, opts, cmd) => {
|
|
943
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
944
|
+
await intentLinkCommand(idOrNumber, {
|
|
945
|
+
json: globalOpts.json,
|
|
946
|
+
area: globalOpts.area,
|
|
947
|
+
type: opts.type,
|
|
948
|
+
id: opts.id,
|
|
949
|
+
});
|
|
950
|
+
});
|
|
951
|
+
intent
|
|
952
|
+
.command('unlink <id-or-number>')
|
|
953
|
+
.description('Unlink a task or issue from an intent')
|
|
954
|
+
.requiredOption('--type <type>', 'Object type: task, issue')
|
|
955
|
+
.requiredOption('--id <uuid>', 'Object UUID')
|
|
956
|
+
.action(async (idOrNumber, opts, cmd) => {
|
|
957
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
958
|
+
await intentUnlinkCommand(idOrNumber, {
|
|
959
|
+
json: globalOpts.json,
|
|
960
|
+
area: globalOpts.area,
|
|
961
|
+
type: opts.type,
|
|
962
|
+
id: opts.id,
|
|
963
|
+
});
|
|
964
|
+
});
|
|
965
|
+
intent
|
|
966
|
+
.command('orbit <id-or-number> [orbit-id]')
|
|
967
|
+
.description('Set or clear the orbit of an intent')
|
|
968
|
+
.option('--clear', 'Clear the orbit instead of setting one')
|
|
969
|
+
.action(async (idOrNumber, orbitId, opts, cmd) => {
|
|
970
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
971
|
+
await intentOrbitCommand(idOrNumber, orbitId, {
|
|
972
|
+
json: globalOpts.json,
|
|
973
|
+
area: globalOpts.area,
|
|
974
|
+
clear: opts.clear,
|
|
975
|
+
});
|
|
976
|
+
});
|
|
977
|
+
// ── Mission commands ──
|
|
978
|
+
const mission = program
|
|
979
|
+
.command('mission')
|
|
980
|
+
.description('Manage missions (time-boxed workspace focus)');
|
|
981
|
+
mission
|
|
982
|
+
.command('list')
|
|
983
|
+
.description('List missions')
|
|
984
|
+
.option('--status <statuses>', 'Filter by status (comma-separated; default new,active)')
|
|
985
|
+
.option('--limit <n>', 'Limit results')
|
|
986
|
+
.action(async (opts, cmd) => {
|
|
987
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
988
|
+
await missionListCommand({
|
|
989
|
+
json: globalOpts.json,
|
|
990
|
+
area: globalOpts.area,
|
|
991
|
+
status: opts.status,
|
|
992
|
+
limit: opts.limit,
|
|
993
|
+
});
|
|
994
|
+
});
|
|
995
|
+
mission
|
|
996
|
+
.command('show <id-or-number>')
|
|
997
|
+
.description('Show full mission details (UUID or MS-prefixed number)')
|
|
998
|
+
.action(async (idOrNumber, _opts, cmd) => {
|
|
999
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
1000
|
+
await missionShowCommand(idOrNumber, {
|
|
1001
|
+
json: globalOpts.json,
|
|
1002
|
+
area: globalOpts.area,
|
|
1003
|
+
});
|
|
1004
|
+
});
|
|
1005
|
+
mission
|
|
1006
|
+
.command('create <title>')
|
|
1007
|
+
.description('Create a new mission (always starts as "new")')
|
|
1008
|
+
.option('--desc <description>', 'Mission description')
|
|
1009
|
+
.option('--outcome <text>', 'Desired outcome (max 500 chars)')
|
|
1010
|
+
.option('--end-date <date>', 'Target end date (YYYY-MM-DD)')
|
|
1011
|
+
.action(async (title, opts, cmd) => {
|
|
1012
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
1013
|
+
await missionCreateCommand(title, {
|
|
1014
|
+
json: globalOpts.json,
|
|
1015
|
+
area: globalOpts.area,
|
|
1016
|
+
desc: opts.desc,
|
|
1017
|
+
outcome: opts.outcome,
|
|
1018
|
+
endDate: opts.endDate,
|
|
1019
|
+
});
|
|
1020
|
+
});
|
|
1021
|
+
mission
|
|
1022
|
+
.command('update <id-or-number>')
|
|
1023
|
+
.description('Update a mission (title, description, outcome, end date)')
|
|
1024
|
+
.option('--title <title>', 'New title')
|
|
1025
|
+
.option('--desc <description>', 'New description')
|
|
1026
|
+
.option('--outcome <text>', 'New outcome')
|
|
1027
|
+
.option('--end-date <date>', 'New end date (YYYY-MM-DD)')
|
|
1028
|
+
.action(async (idOrNumber, opts, cmd) => {
|
|
1029
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
1030
|
+
await missionUpdateCommand(idOrNumber, {
|
|
1031
|
+
json: globalOpts.json,
|
|
1032
|
+
area: globalOpts.area,
|
|
1033
|
+
title: opts.title,
|
|
1034
|
+
desc: opts.desc,
|
|
1035
|
+
outcome: opts.outcome,
|
|
1036
|
+
endDate: opts.endDate,
|
|
1037
|
+
});
|
|
1038
|
+
});
|
|
1039
|
+
mission
|
|
1040
|
+
.command('status <id-or-number> <status>')
|
|
1041
|
+
.description('Set mission lifecycle status (active, completed, cancelled; only one mission can be active)')
|
|
1042
|
+
.option('--move-to <mission-id>', 'Mission to move unfinished work to when completing/cancelling')
|
|
1043
|
+
.action(async (idOrNumber, status, opts, cmd) => {
|
|
1044
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
1045
|
+
await missionStatusCommand(idOrNumber, status, {
|
|
1046
|
+
json: globalOpts.json,
|
|
1047
|
+
area: globalOpts.area,
|
|
1048
|
+
moveTo: opts.moveTo,
|
|
1049
|
+
});
|
|
1050
|
+
});
|
|
1051
|
+
mission
|
|
1052
|
+
.command('link <id-or-number>')
|
|
1053
|
+
.description('Link a task, issue, idea, or intent to a mission (clears intent_id on tasks/issues)')
|
|
1054
|
+
.requiredOption('--type <type>', 'Object type: task, issue, idea, intent')
|
|
1055
|
+
.requiredOption('--id <uuid>', 'Object UUID')
|
|
1056
|
+
.action(async (idOrNumber, opts, cmd) => {
|
|
1057
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
1058
|
+
await missionLinkCommand(idOrNumber, {
|
|
1059
|
+
json: globalOpts.json,
|
|
1060
|
+
area: globalOpts.area,
|
|
1061
|
+
type: opts.type,
|
|
1062
|
+
id: opts.id,
|
|
1063
|
+
});
|
|
1064
|
+
});
|
|
1065
|
+
mission
|
|
1066
|
+
.command('unlink <id-or-number>')
|
|
1067
|
+
.description('Unlink a directly-linked item from a mission')
|
|
1068
|
+
.requiredOption('--type <type>', 'Object type: task, issue, idea, intent')
|
|
1069
|
+
.requiredOption('--id <uuid>', 'Object UUID')
|
|
1070
|
+
.action(async (idOrNumber, opts, cmd) => {
|
|
1071
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
1072
|
+
await missionUnlinkCommand(idOrNumber, {
|
|
1073
|
+
json: globalOpts.json,
|
|
1074
|
+
area: globalOpts.area,
|
|
702
1075
|
type: opts.type,
|
|
703
1076
|
id: opts.id,
|
|
704
1077
|
});
|
|
@@ -708,7 +1081,7 @@ const dep = program
|
|
|
708
1081
|
.command('dep')
|
|
709
1082
|
.description('Manage task dependencies');
|
|
710
1083
|
dep
|
|
711
|
-
.command('add <
|
|
1084
|
+
.command('add <id-or-number> <target-id-or-number>')
|
|
712
1085
|
.description('Add a dependency between tasks')
|
|
713
1086
|
.option('--type <type>', 'Dependency type: depends_on, related', 'depends_on')
|
|
714
1087
|
.option('--note <text>', 'Optional note for the dependency')
|
|
@@ -716,20 +1089,20 @@ dep
|
|
|
716
1089
|
const globalOpts = cmd.optsWithGlobals();
|
|
717
1090
|
await depAddCommand(taskId, targetTaskId, {
|
|
718
1091
|
json: globalOpts.json,
|
|
719
|
-
|
|
1092
|
+
area: globalOpts.area,
|
|
720
1093
|
type: opts.type,
|
|
721
1094
|
note: opts.note,
|
|
722
1095
|
});
|
|
723
1096
|
});
|
|
724
1097
|
dep
|
|
725
|
-
.command('remove <
|
|
1098
|
+
.command('remove <id-or-number> <target-id-or-number>')
|
|
726
1099
|
.description('Remove a dependency between tasks')
|
|
727
1100
|
.option('--type <type>', 'Dependency type to remove: depends_on, related')
|
|
728
1101
|
.action(async (taskId, targetTaskId, opts, cmd) => {
|
|
729
1102
|
const globalOpts = cmd.optsWithGlobals();
|
|
730
1103
|
await depRemoveCommand(taskId, targetTaskId, {
|
|
731
1104
|
json: globalOpts.json,
|
|
732
|
-
|
|
1105
|
+
area: globalOpts.area,
|
|
733
1106
|
type: opts.type,
|
|
734
1107
|
});
|
|
735
1108
|
});
|