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.
Files changed (86) hide show
  1. package/README.md +73 -10
  2. package/dist/adapters/cloud.d.ts +85 -10
  3. package/dist/adapters/cloud.js +118 -17
  4. package/dist/adapters/cloud.js.map +1 -1
  5. package/dist/adapters/factory.js +7 -0
  6. package/dist/adapters/factory.js.map +1 -1
  7. package/dist/adapters/local/adapter.d.ts +47 -8
  8. package/dist/adapters/local/adapter.js +37 -17
  9. package/dist/adapters/local/adapter.js.map +1 -1
  10. package/dist/adapters/local/context.d.ts +13 -1
  11. package/dist/adapters/local/context.js +7 -2
  12. package/dist/adapters/local/context.js.map +1 -1
  13. package/dist/adapters/local/entities/documents.d.ts +18 -4
  14. package/dist/adapters/local/entities/documents.js +46 -7
  15. package/dist/adapters/local/entities/documents.js.map +1 -1
  16. package/dist/adapters/local/entities/planning.d.ts +36 -7
  17. package/dist/adapters/local/entities/planning.js +245 -39
  18. package/dist/adapters/local/entities/planning.js.map +1 -1
  19. package/dist/adapters/local/entities/tasks.d.ts +16 -7
  20. package/dist/adapters/local/entities/tasks.js +55 -42
  21. package/dist/adapters/local/entities/tasks.js.map +1 -1
  22. package/dist/adapters/local/entities/work-items.d.ts +28 -7
  23. package/dist/adapters/local/entities/work-items.js +111 -39
  24. package/dist/adapters/local/entities/work-items.js.map +1 -1
  25. package/dist/adapters/local/lists.d.ts +139 -0
  26. package/dist/adapters/local/lists.js +230 -0
  27. package/dist/adapters/local/lists.js.map +1 -0
  28. package/dist/adapters/local/rules.js +22 -0
  29. package/dist/adapters/local/rules.js.map +1 -1
  30. package/dist/adapters/local/shapes.d.ts +165 -22
  31. package/dist/adapters/local/shapes.js +338 -50
  32. package/dist/adapters/local/shapes.js.map +1 -1
  33. package/dist/adapters/local/types.d.ts +5 -0
  34. package/dist/adapters/local/types.js.map +1 -1
  35. package/dist/adapters/types.d.ts +72 -9
  36. package/dist/agent-instructions.d.ts +39 -10
  37. package/dist/agent-instructions.js +268 -68
  38. package/dist/agent-instructions.js.map +1 -1
  39. package/dist/commands/context.d.ts +62 -37
  40. package/dist/commands/context.js +105 -36
  41. package/dist/commands/context.js.map +1 -1
  42. package/dist/commands/docs.d.ts +4 -0
  43. package/dist/commands/docs.js +12 -5
  44. package/dist/commands/docs.js.map +1 -1
  45. package/dist/commands/ideas.d.ts +3 -0
  46. package/dist/commands/ideas.js +14 -7
  47. package/dist/commands/ideas.js.map +1 -1
  48. package/dist/commands/intent.d.ts +26 -0
  49. package/dist/commands/intent.js +110 -7
  50. package/dist/commands/intent.js.map +1 -1
  51. package/dist/commands/issues.d.ts +4 -0
  52. package/dist/commands/issues.js +15 -7
  53. package/dist/commands/issues.js.map +1 -1
  54. package/dist/commands/mission.d.ts +2 -0
  55. package/dist/commands/mission.js +9 -5
  56. package/dist/commands/mission.js.map +1 -1
  57. package/dist/commands/setup-agent.d.ts +34 -0
  58. package/dist/commands/setup-agent.js +95 -4
  59. package/dist/commands/setup-agent.js.map +1 -1
  60. package/dist/commands/start.d.ts +13 -0
  61. package/dist/commands/start.js +125 -13
  62. package/dist/commands/start.js.map +1 -1
  63. package/dist/commands/tasks.d.ts +23 -5
  64. package/dist/commands/tasks.js +46 -23
  65. package/dist/commands/tasks.js.map +1 -1
  66. package/dist/commands/vibes.d.ts +3 -0
  67. package/dist/commands/vibes.js +11 -5
  68. package/dist/commands/vibes.js.map +1 -1
  69. package/dist/errors.d.ts +23 -2
  70. package/dist/errors.js +31 -3
  71. package/dist/errors.js.map +1 -1
  72. package/dist/index.js +108 -36
  73. package/dist/index.js.map +1 -1
  74. package/dist/list-meta.d.ts +117 -0
  75. package/dist/list-meta.js +160 -0
  76. package/dist/list-meta.js.map +1 -0
  77. package/dist/list-options.d.ts +33 -0
  78. package/dist/list-options.js +70 -0
  79. package/dist/list-options.js.map +1 -0
  80. package/dist/workspace-resolve.d.ts +47 -1
  81. package/dist/workspace-resolve.js +74 -11
  82. package/dist/workspace-resolve.js.map +1 -1
  83. package/dist/write-target.d.ts +9 -0
  84. package/dist/write-target.js +11 -2
  85. package/dist/write-target.js.map +1 -1
  86. package/package.json +2 -2
@@ -8,6 +8,13 @@
8
8
  */
9
9
  import type { WorkLogEntry } from '../work-log.js';
10
10
  export interface WorkspaceAdapter {
11
+ /**
12
+ * `GET /context` — since API 10.0.0 this is MATCHING MATERIAL, not a work queue:
13
+ * `agent` first, then `area` (area branch) or `workspace`, `missions[]`, `intents[]`
14
+ * (no status filter — closed intents included), `workitems[]`, `areas[]`,
15
+ * `documents[]` metadata and `meta.more`. The old `tasks`, `active_mission`,
16
+ * `open_intents` and `agent.introduction` are gone.
17
+ */
11
18
  getContext(areaId?: string): Promise<unknown>;
12
19
  /**
13
20
  * The area this adapter is scoped to (slug or uuid), or `undefined` when none could be
@@ -16,15 +23,35 @@ export interface WorkspaceAdapter {
16
23
  * would demand cloud credentials even in local mode).
17
24
  */
18
25
  getDefaultArea(): Promise<string | undefined>;
26
+ /**
27
+ * `GET /tasks`. Since API 9.0.0 the answer spans every area the key reaches and every
28
+ * assignee unless a filter narrows it; `areaId` (one ref or several) is the ONLY thing
29
+ * that narrows by area — the `X-Orbitmap-Area` header no longer does.
30
+ */
19
31
  getTasks(options?: {
20
32
  status?: string;
21
33
  priority?: string;
22
- areaId?: string;
34
+ areaId?: string | string[];
23
35
  orbit?: string;
36
+ intentId?: string;
37
+ missionId?: string;
38
+ /** `me`, an agent slug or a uuid. */
39
+ agentId?: string;
40
+ unassigned?: boolean;
41
+ all?: boolean;
42
+ limit?: string | number;
43
+ /** Opaque keyset cursor from `meta.next_cursor`. */
44
+ cursor?: string;
24
45
  }): Promise<unknown>;
25
46
  getTask(taskId: string): Promise<unknown>;
26
47
  getTaskByNumber(taskNumber: string): Promise<unknown>;
27
- startTask(taskId?: string): Promise<unknown>;
48
+ /**
49
+ * `confirmReassign` answers a 409 `REASSIGN_CONFIRMATION_REQUIRED` — it reassigns a task
50
+ * held by another agent and starts it. Only ever sent after the USER said yes.
51
+ */
52
+ startTask(taskId?: string, options?: {
53
+ confirmReassign?: boolean;
54
+ }): Promise<unknown>;
28
55
  /**
29
56
  * `force` is the `--force` escape hatch of spec §6.2: it bypasses the "a parent task
30
57
  * cannot go to `done` with unfinished subtasks" rule. Only the LocalAdapter acts on it
@@ -86,7 +113,10 @@ export interface WorkspaceAdapter {
86
113
  getDocuments(options?: {
87
114
  type?: string;
88
115
  search?: string;
89
- areaId?: string;
116
+ areaId?: string | string[];
117
+ status?: string;
118
+ limit?: string | number;
119
+ cursor?: string;
90
120
  }): Promise<unknown>;
91
121
  getDocument(idOrSlug: string, mode?: 'inline' | 'file', options?: {
92
122
  full?: boolean;
@@ -187,7 +217,10 @@ export interface WorkspaceAdapter {
187
217
  listIssues(options?: {
188
218
  status?: string;
189
219
  severity?: string;
190
- limit?: string;
220
+ areaId?: string | string[];
221
+ intentId?: string;
222
+ limit?: string | number;
223
+ cursor?: string;
191
224
  }): Promise<unknown>;
192
225
  /** `GET /issues/{id_or_number}` — uuid, bare code or `IS-xxxxxx`; the server resolves it. */
193
226
  getIssue(idOrNumber: string): Promise<unknown>;
@@ -209,7 +242,9 @@ export interface WorkspaceAdapter {
209
242
  listVibes(options?: {
210
243
  type?: string;
211
244
  since?: string;
212
- limit?: string;
245
+ areaId?: string | string[];
246
+ limit?: string | number;
247
+ cursor?: string;
213
248
  }): Promise<unknown>;
214
249
  getVibe(id: string): Promise<unknown>;
215
250
  updateVibe(id: string, data: {
@@ -221,7 +256,9 @@ export interface WorkspaceAdapter {
221
256
  listIdeas(options?: {
222
257
  status?: string;
223
258
  priority?: string;
224
- limit?: string;
259
+ areaId?: string | string[];
260
+ limit?: string | number;
261
+ cursor?: string;
225
262
  }): Promise<unknown>;
226
263
  /** `GET /ideas/{id_or_number}` — uuid, bare code or `ID-xxxxxx`; the server resolves it. */
227
264
  getIdea(idOrNumber: string): Promise<unknown>;
@@ -272,9 +309,29 @@ export interface WorkspaceAdapter {
272
309
  }): Promise<unknown>;
273
310
  listIntents(options?: {
274
311
  status?: string;
275
- limit?: string;
312
+ missionId?: string;
313
+ limit?: string | number;
314
+ cursor?: string;
315
+ }): Promise<unknown>;
316
+ /**
317
+ * `GET /intents/{id_or_number}`. `logs: false` maps to `?logs=0` (API 10.0.0):
318
+ * the intent without its embedded `work_logs` tail — a measurably smaller payload
319
+ * for callers that only want the body fields.
320
+ *
321
+ * API 10.1.0 (IN-qqqna5):
322
+ * - `bundle: false` maps to `?bundle=0` — strips the context bundle
323
+ * (`data.bundle.{available_docs, workspace_knowledge, orbit_docs, mission,
324
+ * siblings, items}`) that show embeds by default.
325
+ * - `slim: true` maps to `?slim=1` — the freshness probe instead of the full body:
326
+ * `{number, name, status, outcome_tldr, design_tldr, plan_tldr, areas, mission,
327
+ * task_counts, updated_at, last_log_id}`. Slim wins over `logs`/`bundle`,
328
+ * exactly as the provider resolves the query params.
329
+ */
330
+ getIntent(idOrNumber: string, options?: {
331
+ logs?: boolean;
332
+ bundle?: boolean;
333
+ slim?: boolean;
276
334
  }): Promise<unknown>;
277
- getIntent(idOrNumber: string): Promise<unknown>;
278
335
  createIntent(data: {
279
336
  name: string;
280
337
  outcome?: string;
@@ -286,6 +343,10 @@ export interface WorkspaceAdapter {
286
343
  /**
287
344
  * `logs` is the status-transition batch: entries written verbatim, in order, inside the
288
345
  * same transaction as the update. The API rejects a status change that carries none (422).
346
+ *
347
+ * `area_ids` (API 10.0.0) DECLARES the intent's areas — each entry a slug or uuid,
348
+ * writing the `intent_area` pivot; it replaces the declared set. Declared areas beat
349
+ * task-derived ones in the `/context` matching material.
289
350
  */
290
351
  updateIntent(idOrNumber: string, data: {
291
352
  name?: string;
@@ -293,6 +354,7 @@ export interface WorkspaceAdapter {
293
354
  design?: string;
294
355
  plan?: string;
295
356
  status?: string;
357
+ area_ids?: string[];
296
358
  logs?: WorkLogEntry[];
297
359
  }): Promise<unknown>;
298
360
  linkIntentItem(idOrNumber: string, data: {
@@ -306,7 +368,8 @@ export interface WorkspaceAdapter {
306
368
  setIntentOrbit(idOrNumber: string, orbitId: string | null): Promise<unknown>;
307
369
  listMissions(options?: {
308
370
  status?: string;
309
- limit?: string;
371
+ limit?: string | number;
372
+ cursor?: string;
310
373
  }): Promise<unknown>;
311
374
  getMission(idOrNumber: string): Promise<unknown>;
312
375
  createMission(data: {