orbitmap 0.4.4 → 0.5.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.
- package/README.md +73 -10
- package/dist/adapters/cloud.d.ts +85 -10
- package/dist/adapters/cloud.js +118 -17
- package/dist/adapters/cloud.js.map +1 -1
- package/dist/adapters/factory.js +7 -0
- package/dist/adapters/factory.js.map +1 -1
- package/dist/adapters/local/adapter.d.ts +47 -8
- package/dist/adapters/local/adapter.js +37 -17
- package/dist/adapters/local/adapter.js.map +1 -1
- package/dist/adapters/local/context.d.ts +13 -1
- package/dist/adapters/local/context.js +7 -2
- package/dist/adapters/local/context.js.map +1 -1
- package/dist/adapters/local/entities/documents.d.ts +18 -4
- package/dist/adapters/local/entities/documents.js +46 -7
- package/dist/adapters/local/entities/documents.js.map +1 -1
- package/dist/adapters/local/entities/planning.d.ts +36 -7
- package/dist/adapters/local/entities/planning.js +245 -39
- package/dist/adapters/local/entities/planning.js.map +1 -1
- package/dist/adapters/local/entities/tasks.d.ts +16 -7
- package/dist/adapters/local/entities/tasks.js +55 -42
- package/dist/adapters/local/entities/tasks.js.map +1 -1
- package/dist/adapters/local/entities/work-items.d.ts +28 -7
- package/dist/adapters/local/entities/work-items.js +111 -39
- package/dist/adapters/local/entities/work-items.js.map +1 -1
- package/dist/adapters/local/lists.d.ts +139 -0
- package/dist/adapters/local/lists.js +230 -0
- package/dist/adapters/local/lists.js.map +1 -0
- package/dist/adapters/local/rules.js +22 -0
- package/dist/adapters/local/rules.js.map +1 -1
- package/dist/adapters/local/shapes.d.ts +165 -22
- package/dist/adapters/local/shapes.js +338 -50
- package/dist/adapters/local/shapes.js.map +1 -1
- package/dist/adapters/local/types.d.ts +5 -0
- package/dist/adapters/local/types.js.map +1 -1
- package/dist/adapters/types.d.ts +72 -9
- package/dist/agent-instructions.d.ts +39 -10
- package/dist/agent-instructions.js +268 -68
- package/dist/agent-instructions.js.map +1 -1
- package/dist/commands/context.d.ts +62 -37
- package/dist/commands/context.js +105 -36
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/docs.d.ts +4 -0
- package/dist/commands/docs.js +12 -5
- package/dist/commands/docs.js.map +1 -1
- package/dist/commands/ideas.d.ts +3 -0
- package/dist/commands/ideas.js +14 -7
- package/dist/commands/ideas.js.map +1 -1
- package/dist/commands/intent.d.ts +26 -0
- package/dist/commands/intent.js +110 -7
- package/dist/commands/intent.js.map +1 -1
- package/dist/commands/issues.d.ts +4 -0
- package/dist/commands/issues.js +15 -7
- package/dist/commands/issues.js.map +1 -1
- package/dist/commands/mission.d.ts +2 -0
- package/dist/commands/mission.js +9 -5
- package/dist/commands/mission.js.map +1 -1
- package/dist/commands/setup-agent.d.ts +34 -0
- package/dist/commands/setup-agent.js +95 -4
- package/dist/commands/setup-agent.js.map +1 -1
- package/dist/commands/start.d.ts +13 -0
- package/dist/commands/start.js +125 -13
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/tasks.d.ts +23 -5
- package/dist/commands/tasks.js +46 -23
- package/dist/commands/tasks.js.map +1 -1
- package/dist/commands/vibes.d.ts +3 -0
- package/dist/commands/vibes.js +11 -5
- package/dist/commands/vibes.js.map +1 -1
- package/dist/errors.d.ts +23 -2
- package/dist/errors.js +31 -3
- package/dist/errors.js.map +1 -1
- package/dist/index.js +108 -36
- package/dist/index.js.map +1 -1
- package/dist/list-meta.d.ts +117 -0
- package/dist/list-meta.js +160 -0
- package/dist/list-meta.js.map +1 -0
- package/dist/list-options.d.ts +33 -0
- package/dist/list-options.js +70 -0
- package/dist/list-options.js.map +1 -0
- package/dist/workspace-resolve.d.ts +47 -1
- package/dist/workspace-resolve.js +74 -11
- package/dist/workspace-resolve.js.map +1 -1
- package/dist/write-target.d.ts +9 -0
- package/dist/write-target.js +11 -2
- package/dist/write-target.js.map +1 -1
- package/package.json +2 -2
package/dist/errors.d.ts
CHANGED
|
@@ -33,10 +33,22 @@ export declare const AREA_CONTEXT_REQUIRED = "AREA_CONTEXT_REQUIRED";
|
|
|
33
33
|
*/
|
|
34
34
|
export declare const WORKSPACE_CONTEXT_REQUIRED = "WORKSPACE_CONTEXT_REQUIRED";
|
|
35
35
|
/**
|
|
36
|
-
* `X-Orbitmap-Workspace` and `X-Orbitmap-Area` named different workspaces (422).
|
|
37
|
-
*
|
|
36
|
+
* `X-Orbitmap-Workspace` and `X-Orbitmap-Area` named different workspaces (422).
|
|
37
|
+
*
|
|
38
|
+
* @deprecated UNREACHABLE since Agent API 9.0.0: the workspace ceiling refuses a foreign
|
|
39
|
+
* `X-Orbitmap-Workspace` with 403 `ACCESS_DENIED` before the area and the workspace are ever
|
|
40
|
+
* compared, so the server can no longer emit this. Nothing in the CLI dispatches on it any
|
|
41
|
+
* more; the constant survives only because the vendored contract fixtures are still pinned
|
|
42
|
+
* to 8.5.0 and one of them is this error body. Delete it with the 9.0.0 re-vendor.
|
|
38
43
|
*/
|
|
39
44
|
export declare const AREA_WORKSPACE_MISMATCH = "AREA_WORKSPACE_MISMATCH";
|
|
45
|
+
/**
|
|
46
|
+
* 409 from `POST /tasks/start`: the next task exists but belongs to another agent, so
|
|
47
|
+
* auto-pick refuses to take it. The error carries `task_id`, `task_number`, `task_title`,
|
|
48
|
+
* `current_owner` and a `suggestion`; the CLI puts the question to the user and only then
|
|
49
|
+
* retries with `confirm_reassign=true` (see `src/commands/start.ts`).
|
|
50
|
+
*/
|
|
51
|
+
export declare const REASSIGN_CONFIRMATION_REQUIRED = "REASSIGN_CONFIRMATION_REQUIRED";
|
|
40
52
|
/** The caller's agent has no access to the area (same code the API uses). */
|
|
41
53
|
export declare const NO_AREA_ACCESS = "NO_AREA_ACCESS";
|
|
42
54
|
/** The caller's role in the area is too low for the operation (same code the API uses). */
|
|
@@ -85,6 +97,15 @@ export declare class OrbitMapAPIError extends Error {
|
|
|
85
97
|
readonly status: number;
|
|
86
98
|
readonly details?: Record<string, unknown>;
|
|
87
99
|
constructor(message: string, code: string, status: number, details?: Record<string, unknown>);
|
|
100
|
+
/**
|
|
101
|
+
* Build the error from the standard `{error: {code, message, status, details?}}` envelope.
|
|
102
|
+
*
|
|
103
|
+
* Anything ELSE the `error` object carries is folded into `details` rather than dropped:
|
|
104
|
+
* the rich errors put their payload at the top level of `error` — the 403s' `required_role`
|
|
105
|
+
* / `current_role` / `suggestion`, and the 409 `REASSIGN_CONFIRMATION_REQUIRED`'s
|
|
106
|
+
* `task_id` / `task_number` / `task_title` / `current_owner`. Dropping those left the CLI
|
|
107
|
+
* unable to ask the very question the server asked it to ask.
|
|
108
|
+
*/
|
|
88
109
|
static fromResponse(body: ApiErrorBody): OrbitMapAPIError;
|
|
89
110
|
static fromFlatResponse(body: FlatApiErrorBody, httpStatus: number): OrbitMapAPIError;
|
|
90
111
|
static workspaceNotFound(message?: string): OrbitMapAPIError;
|
package/dist/errors.js
CHANGED
|
@@ -16,10 +16,22 @@ export const AREA_CONTEXT_REQUIRED = 'AREA_CONTEXT_REQUIRED';
|
|
|
16
16
|
*/
|
|
17
17
|
export const WORKSPACE_CONTEXT_REQUIRED = 'WORKSPACE_CONTEXT_REQUIRED';
|
|
18
18
|
/**
|
|
19
|
-
* `X-Orbitmap-Workspace` and `X-Orbitmap-Area` named different workspaces (422).
|
|
20
|
-
*
|
|
19
|
+
* `X-Orbitmap-Workspace` and `X-Orbitmap-Area` named different workspaces (422).
|
|
20
|
+
*
|
|
21
|
+
* @deprecated UNREACHABLE since Agent API 9.0.0: the workspace ceiling refuses a foreign
|
|
22
|
+
* `X-Orbitmap-Workspace` with 403 `ACCESS_DENIED` before the area and the workspace are ever
|
|
23
|
+
* compared, so the server can no longer emit this. Nothing in the CLI dispatches on it any
|
|
24
|
+
* more; the constant survives only because the vendored contract fixtures are still pinned
|
|
25
|
+
* to 8.5.0 and one of them is this error body. Delete it with the 9.0.0 re-vendor.
|
|
21
26
|
*/
|
|
22
27
|
export const AREA_WORKSPACE_MISMATCH = 'AREA_WORKSPACE_MISMATCH';
|
|
28
|
+
/**
|
|
29
|
+
* 409 from `POST /tasks/start`: the next task exists but belongs to another agent, so
|
|
30
|
+
* auto-pick refuses to take it. The error carries `task_id`, `task_number`, `task_title`,
|
|
31
|
+
* `current_owner` and a `suggestion`; the CLI puts the question to the user and only then
|
|
32
|
+
* retries with `confirm_reassign=true` (see `src/commands/start.ts`).
|
|
33
|
+
*/
|
|
34
|
+
export const REASSIGN_CONFIRMATION_REQUIRED = 'REASSIGN_CONFIRMATION_REQUIRED';
|
|
23
35
|
/** The caller's agent has no access to the area (same code the API uses). */
|
|
24
36
|
export const NO_AREA_ACCESS = 'NO_AREA_ACCESS';
|
|
25
37
|
/** The caller's role in the area is too low for the operation (same code the API uses). */
|
|
@@ -91,9 +103,25 @@ export class OrbitMapAPIError extends Error {
|
|
|
91
103
|
this.status = status;
|
|
92
104
|
this.details = details;
|
|
93
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Build the error from the standard `{error: {code, message, status, details?}}` envelope.
|
|
108
|
+
*
|
|
109
|
+
* Anything ELSE the `error` object carries is folded into `details` rather than dropped:
|
|
110
|
+
* the rich errors put their payload at the top level of `error` — the 403s' `required_role`
|
|
111
|
+
* / `current_role` / `suggestion`, and the 409 `REASSIGN_CONFIRMATION_REQUIRED`'s
|
|
112
|
+
* `task_id` / `task_number` / `task_title` / `current_owner`. Dropping those left the CLI
|
|
113
|
+
* unable to ask the very question the server asked it to ask.
|
|
114
|
+
*/
|
|
94
115
|
static fromResponse(body) {
|
|
95
116
|
const { code, message, status, details } = body.error;
|
|
96
|
-
|
|
117
|
+
const extras = {};
|
|
118
|
+
for (const [key, value] of Object.entries(body.error)) {
|
|
119
|
+
if (key === 'code' || key === 'message' || key === 'status' || key === 'details')
|
|
120
|
+
continue;
|
|
121
|
+
extras[key] = value;
|
|
122
|
+
}
|
|
123
|
+
const merged = Object.keys(extras).length > 0 ? { ...(details ?? {}), ...extras } : details;
|
|
124
|
+
return new OrbitMapAPIError(message, code, status, merged);
|
|
97
125
|
}
|
|
98
126
|
static fromFlatResponse(body, httpStatus) {
|
|
99
127
|
const message = body.message || body.error;
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAmBA,iFAAiF;AACjF,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAEnD,wDAAwD;AACxD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAErC,qFAAqF;AACrF,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAE7D;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,4BAA4B,CAAC;AAEvE
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAmBA,iFAAiF;AACjF,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAEnD,wDAAwD;AACxD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAErC,qFAAqF;AACrF,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAE7D;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,4BAA4B,CAAC;AAEvE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,gCAAgC,CAAC;AAE/E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAE/C,2FAA2F;AAC3F,MAAM,CAAC,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AAE/D,oFAAoF;AACpF,MAAM,CAAC,MAAM,oBAAoB,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CACL,OAAO,IAAI,KAAK,QAAQ;YACxB,IAAI,KAAK,IAAI;YACb,OAAO,IAAI,IAAI;YACf,OAAQ,IAAyB,CAAC,KAAK,KAAK,QAAQ,CACrD,CAAC;IACJ,CAAC;CACF"}
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ import { docUpdateCommand } from './commands/doc-update.js';
|
|
|
21
21
|
import { docPatchCommand } from './commands/doc-patch.js';
|
|
22
22
|
import { docShareCommand, docUnshareCommand, docVisibilityCommand } from './commands/doc-share.js';
|
|
23
23
|
import { docsPullCommand, docsListCacheCommand, docsCleanCommand } from './commands/docs-cache.js';
|
|
24
|
-
import { setupAgentCommand } from './commands/setup-agent.js';
|
|
24
|
+
import { setupAgentCommand, warnIfInstructionsDrift } from './commands/setup-agent.js';
|
|
25
25
|
import { setupMcpCommand } from './commands/setup-mcp.js';
|
|
26
26
|
import { loginCommand } from './commands/login.js';
|
|
27
27
|
import { logoutCommand } from './commands/logout.js';
|
|
@@ -36,6 +36,8 @@ import { getCommand } from './commands/get.js';
|
|
|
36
36
|
import { createRequire } from 'node:module';
|
|
37
37
|
import { createAreaCommand } from './commands/create-area.js';
|
|
38
38
|
import { setWorkspaceFlag, setWorkspaceIdFlag } from './workspace-resolve.js';
|
|
39
|
+
import { printValidationError } from './output.js';
|
|
40
|
+
import { ALL_HELP, commandPath, DOCS_DESCRIPTION, IDEA_STATUS_HELP, IDEAS_DESCRIPTION, INTENT_STATUS_HELP, INTENTS_DESCRIPTION, ISSUE_STATUS_HELP, ISSUES_DESCRIPTION, LIMIT_HELP, MISSION_STATUS_HELP, MISSIONS_DESCRIPTION, multiAreaRejection, TASKS_DESCRIPTION, TASK_STATUS_HELP, VIBES_DESCRIPTION, } from './list-options.js';
|
|
39
41
|
const program = new Command();
|
|
40
42
|
/**
|
|
41
43
|
* `--version` reads the real package version instead of a hardcoded literal, which had gone
|
|
@@ -63,7 +65,9 @@ program
|
|
|
63
65
|
.description('CLI tool for OrbitMap Agent API')
|
|
64
66
|
.version(version)
|
|
65
67
|
.option('--json', 'Output in JSON format', false)
|
|
66
|
-
.option('--area <
|
|
68
|
+
.option('--area <ids>', 'Narrow to one area or several, comma-separated (`--area web,api`). Slugs or UUIDs. ' +
|
|
69
|
+
'Lists span every area you can reach unless you pass this; `--area all` spans them ' +
|
|
70
|
+
'again from inside an area-mapped directory. For writes it names the target area')
|
|
67
71
|
.option('--workspace <path>', 'Local workspace directory to use (local mode)')
|
|
68
72
|
.option('--workspace-id <slug-or-uuid>', 'Workspace to use (slug or UUID)')
|
|
69
73
|
// Satisfies the write-target confirmation non-interactively (see src/write-target.ts).
|
|
@@ -79,6 +83,15 @@ program
|
|
|
79
83
|
// but never sent `X-Orbitmap-Workspace` — the same flag reached the header ladder or not
|
|
80
84
|
// purely depending on where the user typed it.
|
|
81
85
|
program.hook('preAction', (thisCommand, actionCommand) => {
|
|
86
|
+
const path = commandPath(actionCommand.name(), actionCommand.parent?.name());
|
|
87
|
+
const area = actionCommand.opts()['area'] ??
|
|
88
|
+
thisCommand.opts()['area'];
|
|
89
|
+
const rejected = multiAreaRejection(path, area);
|
|
90
|
+
if (rejected) {
|
|
91
|
+
printValidationError(rejected, Boolean(thisCommand.opts()['json']));
|
|
92
|
+
// `printValidationError` sets the exit code; stop before the command writes anything.
|
|
93
|
+
process.exit(1);
|
|
94
|
+
}
|
|
82
95
|
setWorkspaceFlag(thisCommand.opts()['workspace']);
|
|
83
96
|
const subcommandWorkspaceId = actionCommand.opts()['workspaceId'];
|
|
84
97
|
setWorkspaceIdFlag(subcommandWorkspaceId ?? thisCommand.opts()['workspaceId']);
|
|
@@ -104,6 +117,8 @@ program
|
|
|
104
117
|
'directory) or project (this directory only)')
|
|
105
118
|
.option('--global', 'Cloud: write to ~/.orbitmap/config.json instead of ./.orbitmap/config.json')
|
|
106
119
|
.action(async (opts, command) => {
|
|
120
|
+
// Stale-instructions check (IS-bej5d8): one stderr line, only here and on `context`.
|
|
121
|
+
warnIfInstructionsDrift();
|
|
107
122
|
// `--workspace` also exists as a program-level flag, and Commander binds it there;
|
|
108
123
|
// `optsWithGlobals()` picks it up whichever position it was given in.
|
|
109
124
|
const all = command.optsWithGlobals();
|
|
@@ -143,6 +158,9 @@ program
|
|
|
143
158
|
.command('context')
|
|
144
159
|
.description('Show agent identity and current area info')
|
|
145
160
|
.action(async (_opts, cmd) => {
|
|
161
|
+
// Stale-instructions check (IS-bej5d8): one stderr line, only here and on `init`.
|
|
162
|
+
// stderr keeps `--json` stdout parseable.
|
|
163
|
+
warnIfInstructionsDrift();
|
|
146
164
|
const globalOpts = cmd.optsWithGlobals();
|
|
147
165
|
await contextCommand({ json: globalOpts.json, area: globalOpts.area });
|
|
148
166
|
});
|
|
@@ -187,11 +205,16 @@ program
|
|
|
187
205
|
});
|
|
188
206
|
program
|
|
189
207
|
.command('tasks')
|
|
190
|
-
.description(
|
|
191
|
-
'
|
|
192
|
-
.option('--status <statuses>', 'Filter by status (comma-separated)', 'todo,in_progress')
|
|
208
|
+
.description(TASKS_DESCRIPTION)
|
|
209
|
+
.option('--status <statuses>', TASK_STATUS_HELP, 'todo,in_progress')
|
|
193
210
|
.option('--priority <priority>', 'Filter by priority')
|
|
194
211
|
.option('--orbit <id-or-slug>', 'Filter by orbit (UUID or slug)')
|
|
212
|
+
.option('--intent <id-or-number>', 'Only tasks of this intent (IN-xxxxxx, code or UUID)')
|
|
213
|
+
.option('--mission <id-or-number>', 'Only tasks of this mission (MS-xxxxxx, code or UUID)')
|
|
214
|
+
.option('--agent <me-or-slug-or-id>', "Only this agent's tasks (`me`, a slug or a UUID)")
|
|
215
|
+
.option('--unassigned', 'Only tasks nobody holds — the free backlog', false)
|
|
216
|
+
.option('--limit <n>', 'Rows per page (default 30, max 100)')
|
|
217
|
+
.option('--all', 'Follow every page to the end and print every row', false)
|
|
195
218
|
.action(async (opts, cmd) => {
|
|
196
219
|
const globalOpts = cmd.optsWithGlobals();
|
|
197
220
|
await tasksCommand({
|
|
@@ -200,6 +223,12 @@ program
|
|
|
200
223
|
status: opts.status,
|
|
201
224
|
priority: opts.priority,
|
|
202
225
|
orbit: opts.orbit,
|
|
226
|
+
intent: opts.intent,
|
|
227
|
+
mission: opts.mission,
|
|
228
|
+
agent: opts.agent,
|
|
229
|
+
unassigned: opts.unassigned,
|
|
230
|
+
limit: opts.limit,
|
|
231
|
+
all: opts.all,
|
|
203
232
|
});
|
|
204
233
|
});
|
|
205
234
|
program
|
|
@@ -337,9 +366,11 @@ program
|
|
|
337
366
|
});
|
|
338
367
|
const docs = program
|
|
339
368
|
.command('docs')
|
|
340
|
-
.description(
|
|
369
|
+
.description(DOCS_DESCRIPTION)
|
|
341
370
|
.option('--type <type>', 'Filter by type (spec, architecture, api, guide, decision, changelog, other)')
|
|
342
371
|
.option('--search <query>', 'Search by title')
|
|
372
|
+
.option('--limit <n>', LIMIT_HELP)
|
|
373
|
+
.option('--all', ALL_HELP, false)
|
|
343
374
|
.action(async (opts, cmd) => {
|
|
344
375
|
const globalOpts = cmd.optsWithGlobals();
|
|
345
376
|
await docsCommand({
|
|
@@ -347,6 +378,8 @@ const docs = program
|
|
|
347
378
|
area: globalOpts.area,
|
|
348
379
|
type: opts.type,
|
|
349
380
|
search: opts.search,
|
|
381
|
+
limit: opts.limit,
|
|
382
|
+
all: opts.all,
|
|
350
383
|
});
|
|
351
384
|
});
|
|
352
385
|
docs
|
|
@@ -522,10 +555,12 @@ program
|
|
|
522
555
|
// ── Shortcut aliases ──
|
|
523
556
|
program
|
|
524
557
|
.command('issues')
|
|
525
|
-
.description('
|
|
526
|
-
.option('--status <statuses>',
|
|
558
|
+
.description(ISSUES_DESCRIPTION + ' (shortcut for issue list)')
|
|
559
|
+
.option('--status <statuses>', ISSUE_STATUS_HELP, 'open,investigating')
|
|
527
560
|
.option('--severity <level>', 'Filter by severity')
|
|
528
|
-
.option('--
|
|
561
|
+
.option('--intent <id-or-number>', 'Only issues of this intent (IN-xxxxxx, code or UUID)')
|
|
562
|
+
.option('--limit <n>', LIMIT_HELP)
|
|
563
|
+
.option('--all', ALL_HELP, false)
|
|
529
564
|
.action(async (opts, cmd) => {
|
|
530
565
|
const globalOpts = cmd.optsWithGlobals();
|
|
531
566
|
await issueListCommand({
|
|
@@ -533,15 +568,18 @@ program
|
|
|
533
568
|
area: globalOpts.area,
|
|
534
569
|
status: opts.status,
|
|
535
570
|
severity: opts.severity,
|
|
571
|
+
intent: opts.intent,
|
|
536
572
|
limit: opts.limit,
|
|
573
|
+
all: opts.all,
|
|
537
574
|
});
|
|
538
575
|
});
|
|
539
576
|
program
|
|
540
577
|
.command('vibes')
|
|
541
|
-
.description('
|
|
578
|
+
.description(VIBES_DESCRIPTION + ' (shortcut for vibe list)')
|
|
542
579
|
.option('--type <type>', 'Filter by type')
|
|
543
580
|
.option('--since <date>', 'Filter since date (ISO or "today"/"this_week")')
|
|
544
|
-
.option('--limit <n>',
|
|
581
|
+
.option('--limit <n>', LIMIT_HELP)
|
|
582
|
+
.option('--all', ALL_HELP, false)
|
|
545
583
|
.action(async (opts, cmd) => {
|
|
546
584
|
const globalOpts = cmd.optsWithGlobals();
|
|
547
585
|
await vibeListCommand({
|
|
@@ -550,14 +588,16 @@ program
|
|
|
550
588
|
type: opts.type,
|
|
551
589
|
since: opts.since,
|
|
552
590
|
limit: opts.limit,
|
|
591
|
+
all: opts.all,
|
|
553
592
|
});
|
|
554
593
|
});
|
|
555
594
|
program
|
|
556
595
|
.command('ideas')
|
|
557
|
-
.description('
|
|
558
|
-
.option('--status <statuses>',
|
|
596
|
+
.description(IDEAS_DESCRIPTION + ' (shortcut for idea list)')
|
|
597
|
+
.option('--status <statuses>', IDEA_STATUS_HELP, 'pending,accepted')
|
|
559
598
|
.option('--priority <priority>', 'Filter by priority (critical, high, medium, low)')
|
|
560
|
-
.option('--limit <n>',
|
|
599
|
+
.option('--limit <n>', LIMIT_HELP)
|
|
600
|
+
.option('--all', ALL_HELP, false)
|
|
561
601
|
.action(async (opts, cmd) => {
|
|
562
602
|
const globalOpts = cmd.optsWithGlobals();
|
|
563
603
|
await ideaListCommand({
|
|
@@ -566,27 +606,33 @@ program
|
|
|
566
606
|
status: opts.status,
|
|
567
607
|
priority: opts.priority,
|
|
568
608
|
limit: opts.limit,
|
|
609
|
+
all: opts.all,
|
|
569
610
|
});
|
|
570
611
|
});
|
|
571
612
|
program
|
|
572
613
|
.command('intents')
|
|
573
|
-
.description('
|
|
574
|
-
.option('--status <statuses>',
|
|
575
|
-
.option('--
|
|
614
|
+
.description(INTENTS_DESCRIPTION + ' (shortcut for intent list)')
|
|
615
|
+
.option('--status <statuses>', INTENT_STATUS_HELP)
|
|
616
|
+
.option('--mission <id-or-number>', 'Only intents of this mission (MS-xxxxxx, code or UUID)')
|
|
617
|
+
.option('--limit <n>', LIMIT_HELP)
|
|
618
|
+
.option('--all', ALL_HELP, false)
|
|
576
619
|
.action(async (opts, cmd) => {
|
|
577
620
|
const globalOpts = cmd.optsWithGlobals();
|
|
578
621
|
await intentListCommand({
|
|
579
622
|
json: globalOpts.json,
|
|
580
623
|
area: globalOpts.area,
|
|
581
624
|
status: opts.status,
|
|
625
|
+
mission: opts.mission,
|
|
582
626
|
limit: opts.limit,
|
|
627
|
+
all: opts.all,
|
|
583
628
|
});
|
|
584
629
|
});
|
|
585
630
|
program
|
|
586
631
|
.command('missions')
|
|
587
|
-
.description('
|
|
588
|
-
.option('--status <statuses>',
|
|
589
|
-
.option('--limit <n>',
|
|
632
|
+
.description(MISSIONS_DESCRIPTION + ' (shortcut for mission list)')
|
|
633
|
+
.option('--status <statuses>', MISSION_STATUS_HELP)
|
|
634
|
+
.option('--limit <n>', LIMIT_HELP)
|
|
635
|
+
.option('--all', ALL_HELP, false)
|
|
590
636
|
.action(async (opts, cmd) => {
|
|
591
637
|
const globalOpts = cmd.optsWithGlobals();
|
|
592
638
|
await missionListCommand({
|
|
@@ -594,6 +640,7 @@ program
|
|
|
594
640
|
area: globalOpts.area,
|
|
595
641
|
status: opts.status,
|
|
596
642
|
limit: opts.limit,
|
|
643
|
+
all: opts.all,
|
|
597
644
|
});
|
|
598
645
|
});
|
|
599
646
|
// ── Issue commands ──
|
|
@@ -629,10 +676,12 @@ issue
|
|
|
629
676
|
});
|
|
630
677
|
issue
|
|
631
678
|
.command('list')
|
|
632
|
-
.description(
|
|
633
|
-
.option('--status <statuses>',
|
|
679
|
+
.description(ISSUES_DESCRIPTION)
|
|
680
|
+
.option('--status <statuses>', ISSUE_STATUS_HELP, 'open,investigating')
|
|
634
681
|
.option('--severity <level>', 'Filter by severity')
|
|
635
|
-
.option('--
|
|
682
|
+
.option('--intent <id-or-number>', 'Only issues of this intent (IN-xxxxxx, code or UUID)')
|
|
683
|
+
.option('--limit <n>', LIMIT_HELP)
|
|
684
|
+
.option('--all', ALL_HELP, false)
|
|
636
685
|
.action(async (opts, cmd) => {
|
|
637
686
|
const globalOpts = cmd.optsWithGlobals();
|
|
638
687
|
await issueListCommand({
|
|
@@ -640,7 +689,9 @@ issue
|
|
|
640
689
|
area: globalOpts.area,
|
|
641
690
|
status: opts.status,
|
|
642
691
|
severity: opts.severity,
|
|
692
|
+
intent: opts.intent,
|
|
643
693
|
limit: opts.limit,
|
|
694
|
+
all: opts.all,
|
|
644
695
|
});
|
|
645
696
|
});
|
|
646
697
|
issue
|
|
@@ -714,10 +765,11 @@ vibe
|
|
|
714
765
|
});
|
|
715
766
|
vibe
|
|
716
767
|
.command('list')
|
|
717
|
-
.description(
|
|
768
|
+
.description(VIBES_DESCRIPTION)
|
|
718
769
|
.option('--type <type>', 'Filter by type')
|
|
719
770
|
.option('--since <date>', 'Filter since date (ISO or "today"/"this_week")')
|
|
720
|
-
.option('--limit <n>',
|
|
771
|
+
.option('--limit <n>', LIMIT_HELP)
|
|
772
|
+
.option('--all', ALL_HELP, false)
|
|
721
773
|
.action(async (opts, cmd) => {
|
|
722
774
|
const globalOpts = cmd.optsWithGlobals();
|
|
723
775
|
await vibeListCommand({
|
|
@@ -726,6 +778,7 @@ vibe
|
|
|
726
778
|
type: opts.type,
|
|
727
779
|
since: opts.since,
|
|
728
780
|
limit: opts.limit,
|
|
781
|
+
all: opts.all,
|
|
729
782
|
});
|
|
730
783
|
});
|
|
731
784
|
vibe
|
|
@@ -762,10 +815,11 @@ const idea = program
|
|
|
762
815
|
.description('Manage ideas');
|
|
763
816
|
idea
|
|
764
817
|
.command('list')
|
|
765
|
-
.description(
|
|
766
|
-
.option('--status <statuses>',
|
|
818
|
+
.description(IDEAS_DESCRIPTION)
|
|
819
|
+
.option('--status <statuses>', IDEA_STATUS_HELP, 'pending,accepted')
|
|
767
820
|
.option('--priority <priority>', 'Filter by priority (critical, high, medium, low)')
|
|
768
|
-
.option('--limit <n>',
|
|
821
|
+
.option('--limit <n>', LIMIT_HELP)
|
|
822
|
+
.option('--all', ALL_HELP, false)
|
|
769
823
|
.action(async (opts, cmd) => {
|
|
770
824
|
const globalOpts = cmd.optsWithGlobals();
|
|
771
825
|
await ideaListCommand({
|
|
@@ -774,6 +828,7 @@ idea
|
|
|
774
828
|
status: opts.status,
|
|
775
829
|
priority: opts.priority,
|
|
776
830
|
limit: opts.limit,
|
|
831
|
+
all: opts.all,
|
|
777
832
|
});
|
|
778
833
|
});
|
|
779
834
|
idea
|
|
@@ -973,26 +1028,39 @@ const intent = program
|
|
|
973
1028
|
.description('Manage intents (workspace-level desired outcomes)');
|
|
974
1029
|
intent
|
|
975
1030
|
.command('list')
|
|
976
|
-
.description(
|
|
977
|
-
.option('--status <statuses>',
|
|
978
|
-
.option('--
|
|
1031
|
+
.description(INTENTS_DESCRIPTION)
|
|
1032
|
+
.option('--status <statuses>', INTENT_STATUS_HELP)
|
|
1033
|
+
.option('--mission <id-or-number>', 'Only intents of this mission (MS-xxxxxx, code or UUID)')
|
|
1034
|
+
.option('--limit <n>', LIMIT_HELP)
|
|
1035
|
+
.option('--all', ALL_HELP, false)
|
|
979
1036
|
.action(async (opts, cmd) => {
|
|
980
1037
|
const globalOpts = cmd.optsWithGlobals();
|
|
981
1038
|
await intentListCommand({
|
|
982
1039
|
json: globalOpts.json,
|
|
983
1040
|
area: globalOpts.area,
|
|
984
1041
|
status: opts.status,
|
|
1042
|
+
mission: opts.mission,
|
|
985
1043
|
limit: opts.limit,
|
|
1044
|
+
all: opts.all,
|
|
986
1045
|
});
|
|
987
1046
|
});
|
|
988
1047
|
intent
|
|
989
1048
|
.command('show <id-or-number>')
|
|
990
1049
|
.description('Show full intent details (UUID or IN-prefixed number)')
|
|
991
|
-
.
|
|
1050
|
+
// Commander turns `--no-logs` into `opts.logs === false` (default true).
|
|
1051
|
+
.option('--no-logs', 'Skip the embedded work-log tail (`?logs=0`) — a smaller payload')
|
|
1052
|
+
// Same Commander negation pattern: `--no-bundle` → `opts.bundle === false`.
|
|
1053
|
+
.option('--no-bundle', 'Skip the embedded context bundle (`?bundle=0`) — docs, mission, siblings, items')
|
|
1054
|
+
.option('--slim', 'Freshness probe (`?slim=1`): handle, TL;DRs, task counts and the ' +
|
|
1055
|
+
'updated_at/last_log_id pair instead of the full body (wins over the other flags)')
|
|
1056
|
+
.action(async (idOrNumber, opts, cmd) => {
|
|
992
1057
|
const globalOpts = cmd.optsWithGlobals();
|
|
993
1058
|
await intentShowCommand(idOrNumber, {
|
|
994
1059
|
json: globalOpts.json,
|
|
995
1060
|
area: globalOpts.area,
|
|
1061
|
+
logs: opts.logs,
|
|
1062
|
+
bundle: opts.bundle,
|
|
1063
|
+
slim: opts.slim,
|
|
996
1064
|
});
|
|
997
1065
|
});
|
|
998
1066
|
intent
|
|
@@ -1019,12 +1087,13 @@ intent
|
|
|
1019
1087
|
});
|
|
1020
1088
|
intent
|
|
1021
1089
|
.command('update <id-or-number>')
|
|
1022
|
-
.description('Update an intent (title, outcome, design, plan, status)')
|
|
1090
|
+
.description('Update an intent (title, outcome, design, plan, status, declared areas)')
|
|
1023
1091
|
.option('--title <title>', 'New title')
|
|
1024
1092
|
.option('--outcome <text>', 'New outcome')
|
|
1025
1093
|
.option('--design <text>', 'New design notes (markdown)')
|
|
1026
1094
|
.option('--plan <text>', 'New plan notes (markdown)')
|
|
1027
1095
|
.option('--status <status>', 'Status: new, design, plan, build, done, cancelled')
|
|
1096
|
+
.option('--areas <slugs>', "Declare the intent's areas: comma-separated slugs or UUIDs (replaces the declared set)")
|
|
1028
1097
|
.option('--log <type:content>', LOG_FLAG_HELP, collect, [])
|
|
1029
1098
|
.action(async (idOrNumber, opts, cmd) => {
|
|
1030
1099
|
const globalOpts = cmd.optsWithGlobals();
|
|
@@ -1036,6 +1105,7 @@ intent
|
|
|
1036
1105
|
design: opts.design,
|
|
1037
1106
|
plan: opts.plan,
|
|
1038
1107
|
status: opts.status,
|
|
1108
|
+
areas: opts.areas,
|
|
1039
1109
|
log: opts.log,
|
|
1040
1110
|
});
|
|
1041
1111
|
});
|
|
@@ -1085,9 +1155,10 @@ const mission = program
|
|
|
1085
1155
|
.description('Manage missions (time-boxed workspace focus)');
|
|
1086
1156
|
mission
|
|
1087
1157
|
.command('list')
|
|
1088
|
-
.description(
|
|
1089
|
-
.option('--status <statuses>',
|
|
1090
|
-
.option('--limit <n>',
|
|
1158
|
+
.description(MISSIONS_DESCRIPTION)
|
|
1159
|
+
.option('--status <statuses>', MISSION_STATUS_HELP)
|
|
1160
|
+
.option('--limit <n>', LIMIT_HELP)
|
|
1161
|
+
.option('--all', ALL_HELP, false)
|
|
1091
1162
|
.action(async (opts, cmd) => {
|
|
1092
1163
|
const globalOpts = cmd.optsWithGlobals();
|
|
1093
1164
|
await missionListCommand({
|
|
@@ -1095,6 +1166,7 @@ mission
|
|
|
1095
1166
|
area: globalOpts.area,
|
|
1096
1167
|
status: opts.status,
|
|
1097
1168
|
limit: opts.limit,
|
|
1169
|
+
all: opts.all,
|
|
1098
1170
|
});
|
|
1099
1171
|
});
|
|
1100
1172
|
mission
|