orbitmap 0.3.0 → 0.4.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/README.md +443 -212
  2. package/dist/adapters/cloud.d.ts +334 -0
  3. package/dist/adapters/cloud.js +520 -0
  4. package/dist/adapters/cloud.js.map +1 -0
  5. package/dist/adapters/factory.d.ts +11 -0
  6. package/dist/adapters/factory.js +27 -0
  7. package/dist/adapters/factory.js.map +1 -0
  8. package/dist/adapters/local/adapter.d.ts +351 -0
  9. package/dist/adapters/local/adapter.js +346 -0
  10. package/dist/adapters/local/adapter.js.map +1 -0
  11. package/dist/adapters/local/context.d.ts +111 -0
  12. package/dist/adapters/local/context.js +136 -0
  13. package/dist/adapters/local/context.js.map +1 -0
  14. package/dist/adapters/local/entities/documents.d.ts +85 -0
  15. package/dist/adapters/local/entities/documents.js +251 -0
  16. package/dist/adapters/local/entities/documents.js.map +1 -0
  17. package/dist/adapters/local/entities/planning.d.ts +108 -0
  18. package/dist/adapters/local/entities/planning.js +540 -0
  19. package/dist/adapters/local/entities/planning.js.map +1 -0
  20. package/dist/adapters/local/entities/tasks.d.ts +95 -0
  21. package/dist/adapters/local/entities/tasks.js +442 -0
  22. package/dist/adapters/local/entities/tasks.js.map +1 -0
  23. package/dist/adapters/local/entities/work-items.d.ts +110 -0
  24. package/dist/adapters/local/entities/work-items.js +623 -0
  25. package/dist/adapters/local/entities/work-items.js.map +1 -0
  26. package/dist/adapters/local/rules.d.ts +172 -0
  27. package/dist/adapters/local/rules.js +319 -0
  28. package/dist/adapters/local/rules.js.map +1 -0
  29. package/dist/adapters/local/shapes.d.ts +209 -0
  30. package/dist/adapters/local/shapes.js +558 -0
  31. package/dist/adapters/local/shapes.js.map +1 -0
  32. package/dist/adapters/local/store.d.ts +200 -0
  33. package/dist/adapters/local/store.js +665 -0
  34. package/dist/adapters/local/store.js.map +1 -0
  35. package/dist/adapters/local/types.d.ts +226 -0
  36. package/dist/adapters/local/types.js +41 -0
  37. package/dist/adapters/local/types.js.map +1 -0
  38. package/dist/adapters/types.d.ts +332 -0
  39. package/dist/adapters/types.js +2 -0
  40. package/dist/adapters/types.js.map +1 -0
  41. package/dist/agent-instructions.d.ts +25 -9
  42. package/dist/agent-instructions.js +285 -237
  43. package/dist/agent-instructions.js.map +1 -1
  44. package/dist/api-client.d.ts +8 -239
  45. package/dist/api-client.js +8 -403
  46. package/dist/api-client.js.map +1 -1
  47. package/dist/commands/agents.d.ts +1 -1
  48. package/dist/commands/agents.js +10 -10
  49. package/dist/commands/agents.js.map +1 -1
  50. package/dist/commands/areas.d.ts +3 -0
  51. package/dist/commands/areas.js +29 -0
  52. package/dist/commands/areas.js.map +1 -0
  53. package/dist/commands/assign.d.ts +3 -2
  54. package/dist/commands/assign.js +47 -15
  55. package/dist/commands/assign.js.map +1 -1
  56. package/dist/commands/context.d.ts +1 -1
  57. package/dist/commands/context.js +18 -12
  58. package/dist/commands/context.js.map +1 -1
  59. package/dist/commands/create-area.d.ts +7 -0
  60. package/dist/commands/create-area.js +29 -0
  61. package/dist/commands/create-area.js.map +1 -0
  62. package/dist/commands/create.d.ts +3 -1
  63. package/dist/commands/create.js +4 -2
  64. package/dist/commands/create.js.map +1 -1
  65. package/dist/commands/dep.d.ts +2 -2
  66. package/dist/commands/dep.js +3 -3
  67. package/dist/commands/dep.js.map +1 -1
  68. package/dist/commands/doc-import.d.ts +1 -1
  69. package/dist/commands/doc-import.js +2 -2
  70. package/dist/commands/doc-import.js.map +1 -1
  71. package/dist/commands/doc-patch.d.ts +1 -1
  72. package/dist/commands/doc-patch.js +2 -2
  73. package/dist/commands/doc-patch.js.map +1 -1
  74. package/dist/commands/doc-share.d.ts +6 -6
  75. package/dist/commands/doc-share.js +13 -13
  76. package/dist/commands/doc-share.js.map +1 -1
  77. package/dist/commands/doc-update.d.ts +1 -1
  78. package/dist/commands/doc-update.js +2 -2
  79. package/dist/commands/doc-update.js.map +1 -1
  80. package/dist/commands/doc.d.ts +1 -1
  81. package/dist/commands/doc.js +5 -4
  82. package/dist/commands/doc.js.map +1 -1
  83. package/dist/commands/docs-cache.d.ts +2 -2
  84. package/dist/commands/docs-cache.js +3 -3
  85. package/dist/commands/docs-cache.js.map +1 -1
  86. package/dist/commands/docs.d.ts +1 -1
  87. package/dist/commands/docs.js +2 -2
  88. package/dist/commands/docs.js.map +1 -1
  89. package/dist/commands/get.d.ts +1 -1
  90. package/dist/commands/get.js +43 -3
  91. package/dist/commands/get.js.map +1 -1
  92. package/dist/commands/ideas.d.ts +4 -4
  93. package/dist/commands/ideas.js +5 -5
  94. package/dist/commands/ideas.js.map +1 -1
  95. package/dist/commands/init.d.ts +17 -3
  96. package/dist/commands/init.js +262 -30
  97. package/dist/commands/init.js.map +1 -1
  98. package/dist/commands/intent.d.ts +41 -0
  99. package/dist/commands/intent.js +237 -0
  100. package/dist/commands/intent.js.map +1 -0
  101. package/dist/commands/issues.d.ts +6 -5
  102. package/dist/commands/issues.js +7 -6
  103. package/dist/commands/issues.js.map +1 -1
  104. package/dist/commands/log.d.ts +1 -1
  105. package/dist/commands/log.js +2 -2
  106. package/dist/commands/log.js.map +1 -1
  107. package/dist/commands/mission.d.ts +42 -0
  108. package/dist/commands/mission.js +219 -0
  109. package/dist/commands/mission.js.map +1 -0
  110. package/dist/commands/orbit.d.ts +40 -3
  111. package/dist/commands/orbit.js +231 -58
  112. package/dist/commands/orbit.js.map +1 -1
  113. package/dist/commands/overview.d.ts +2 -2
  114. package/dist/commands/overview.js +25 -28
  115. package/dist/commands/overview.js.map +1 -1
  116. package/dist/commands/setup-agent.d.ts +11 -0
  117. package/dist/commands/setup-agent.js +47 -25
  118. package/dist/commands/setup-agent.js.map +1 -1
  119. package/dist/commands/setup-mcp.d.ts +1 -1
  120. package/dist/commands/setup-mcp.js +9 -9
  121. package/dist/commands/setup-mcp.js.map +1 -1
  122. package/dist/commands/start.d.ts +1 -1
  123. package/dist/commands/start.js +2 -2
  124. package/dist/commands/start.js.map +1 -1
  125. package/dist/commands/status.d.ts +2 -1
  126. package/dist/commands/status.js +3 -3
  127. package/dist/commands/status.js.map +1 -1
  128. package/dist/commands/subtask.d.ts +1 -1
  129. package/dist/commands/subtask.js +2 -2
  130. package/dist/commands/subtask.js.map +1 -1
  131. package/dist/commands/task-edit-content.d.ts +1 -1
  132. package/dist/commands/task-edit-content.js +2 -2
  133. package/dist/commands/task-edit-content.js.map +1 -1
  134. package/dist/commands/task.d.ts +10 -3
  135. package/dist/commands/task.js +16 -8
  136. package/dist/commands/task.js.map +1 -1
  137. package/dist/commands/tasks.d.ts +1 -1
  138. package/dist/commands/tasks.js +2 -2
  139. package/dist/commands/tasks.js.map +1 -1
  140. package/dist/commands/vibes.d.ts +4 -4
  141. package/dist/commands/vibes.js +5 -5
  142. package/dist/commands/vibes.js.map +1 -1
  143. package/dist/config.d.ts +10 -2
  144. package/dist/config.js +13 -4
  145. package/dist/config.js.map +1 -1
  146. package/dist/doc-cache.d.ts +2 -2
  147. package/dist/doc-cache.js.map +1 -1
  148. package/dist/errors.d.ts +19 -2
  149. package/dist/errors.js +35 -0
  150. package/dist/errors.js.map +1 -1
  151. package/dist/index.js +452 -93
  152. package/dist/index.js.map +1 -1
  153. package/dist/output.js +7 -2
  154. package/dist/output.js.map +1 -1
  155. package/dist/workspace-resolve.d.ts +126 -0
  156. package/dist/workspace-resolve.js +203 -0
  157. package/dist/workspace-resolve.js.map +1 -0
  158. package/package.json +53 -50
@@ -0,0 +1,334 @@
1
+ import type { WorkspaceAdapter } from './types.js';
2
+ export declare class CloudAdapter implements WorkspaceAdapter {
3
+ private readonly apiKey;
4
+ private readonly baseUrl;
5
+ private readonly area?;
6
+ constructor(apiKey: string, area?: string, apiUrl?: string);
7
+ private request;
8
+ getContext(areaId?: string): Promise<unknown>;
9
+ /**
10
+ * The area this client was constructed with (`--area` → `ORBITMAP_AREA` → config
11
+ * `area` → legacy `project_id`, resolved by `createClient`). No request is made.
12
+ */
13
+ getDefaultArea(): Promise<string | undefined>;
14
+ getTasks(options?: {
15
+ status?: string;
16
+ priority?: string;
17
+ areaId?: string;
18
+ orbit?: string;
19
+ }): Promise<unknown>;
20
+ getTask(taskId: string): Promise<unknown>;
21
+ getTaskByNumber(taskNumber: string): Promise<unknown>;
22
+ startTask(taskId?: string): Promise<unknown>;
23
+ updateTaskStatus(taskId: string, status?: string, deliveryStatus?: string | null, _force?: boolean): Promise<unknown>;
24
+ createSubtasks(parentId: string, subtasks: Array<{
25
+ title: string;
26
+ description?: string;
27
+ priority?: string;
28
+ estimated_effort?: string;
29
+ }>): Promise<unknown>;
30
+ createTask(data: {
31
+ title: string;
32
+ description?: string;
33
+ status?: string;
34
+ priority?: string;
35
+ agent_instructions?: string;
36
+ branch_name?: string;
37
+ estimated_effort?: string;
38
+ agent_id?: string;
39
+ area_id?: string;
40
+ source_issue_id?: string;
41
+ intent_id?: string;
42
+ orbit_id?: string | null;
43
+ }): Promise<unknown>;
44
+ editTaskContent(taskId: string, data: {
45
+ title?: string;
46
+ description?: string;
47
+ agent_instructions?: string;
48
+ }): Promise<unknown>;
49
+ assignTask(taskId: string, assignment: {
50
+ agent_id: string;
51
+ } | {
52
+ user_id: number;
53
+ }): Promise<unknown>;
54
+ assignItem(objectType: 'task' | 'issue' | 'idea' | 'intent', objectId: string, assignment: {
55
+ agent_id: string;
56
+ } | {
57
+ user_id: number;
58
+ }): Promise<unknown>;
59
+ addTaskDependency(taskId: string, data: {
60
+ target_task_id: string;
61
+ type?: string;
62
+ note?: string;
63
+ }): Promise<unknown>;
64
+ removeTaskDependency(taskId: string, targetTaskId: string, type?: string): Promise<unknown>;
65
+ logWork(taskId: string, type: string, content: string, metadata?: Record<string, unknown>): Promise<unknown>;
66
+ getDocuments(options?: {
67
+ type?: string;
68
+ search?: string;
69
+ areaId?: string;
70
+ }): Promise<unknown>;
71
+ getDocument(idOrSlug: string, mode?: 'inline' | 'file', options?: {
72
+ full?: boolean;
73
+ section?: string;
74
+ }): Promise<unknown>;
75
+ importDocument(data: {
76
+ title: string;
77
+ type: string;
78
+ content: string;
79
+ source_path?: string;
80
+ context?: string;
81
+ workspace_id?: string;
82
+ }): Promise<unknown>;
83
+ updateDocument(idOrSlug: string, content: string, changelog?: string): Promise<unknown>;
84
+ patchDocument(idOrSlug: string, operations: Array<Record<string, unknown>>, baseVersion: number, changelog?: string): Promise<unknown>;
85
+ requestUploadUrl(data: {
86
+ title: string;
87
+ type: string;
88
+ filename?: string;
89
+ source_path?: string;
90
+ context?: string;
91
+ workspace_id?: string;
92
+ }): Promise<{
93
+ data: {
94
+ upload_id: string;
95
+ document_id: string;
96
+ presigned_url: string;
97
+ storage_path: string;
98
+ expires_at: string;
99
+ };
100
+ }>;
101
+ confirmUpload(uploadId: string): Promise<{
102
+ data: {
103
+ document_id: string;
104
+ slug: string;
105
+ imported: boolean;
106
+ };
107
+ }>;
108
+ requestUpdateUploadUrl(idOrSlug: string, changelog?: string): Promise<{
109
+ data: {
110
+ upload_id: string;
111
+ document_id: string;
112
+ version: number;
113
+ presigned_url: string;
114
+ storage_path: string;
115
+ expires_at: string;
116
+ };
117
+ }>;
118
+ confirmUpdateUpload(idOrSlug: string, uploadId: string): Promise<{
119
+ data: {
120
+ document_id: string;
121
+ version: number;
122
+ updated: boolean;
123
+ };
124
+ }>;
125
+ uploadToPresignedUrl(presignedUrl: string, filePath: string, onProgress?: (bytesUploaded: number, totalBytes: number) => void): Promise<void>;
126
+ /**
127
+ * Attempts presigned URL upload for a new document.
128
+ * Returns null if the endpoint is not available (404), signaling caller to fall back.
129
+ */
130
+ presignedImport(filePath: string, data: {
131
+ title: string;
132
+ type: string;
133
+ source_path?: string;
134
+ context?: string;
135
+ workspace_id?: string;
136
+ }, onProgress?: (bytesUploaded: number, totalBytes: number) => void): Promise<{
137
+ data: {
138
+ document_id: string;
139
+ slug: string;
140
+ imported: boolean;
141
+ };
142
+ upload_method: string;
143
+ } | null>;
144
+ /**
145
+ * Attempts presigned URL upload for updating a document.
146
+ * Returns null if the endpoint is not available (404), signaling caller to fall back.
147
+ */
148
+ presignedUpdate(idOrSlug: string, filePath: string, changelog?: string, onProgress?: (bytesUploaded: number, totalBytes: number) => void): Promise<{
149
+ data: {
150
+ document_id: string;
151
+ version: number;
152
+ updated: boolean;
153
+ };
154
+ upload_method: string;
155
+ } | null>;
156
+ shareDocument(documentId: string, areaId: string, agentIds?: string[]): Promise<unknown>;
157
+ unshareDocument(documentId: string, areaId: string): Promise<unknown>;
158
+ setDocumentVisibility(documentId: string, areaId: string, agentIds: string[]): Promise<unknown>;
159
+ getAreas(): Promise<unknown>;
160
+ getAreaMembers(areaId: string): Promise<unknown>;
161
+ getAreaOverview(areaId: string): Promise<unknown>;
162
+ createArea(data: {
163
+ name: string;
164
+ description?: string;
165
+ slug?: string;
166
+ workspace_id?: string;
167
+ }): Promise<unknown>;
168
+ registerIssue(data: {
169
+ title: string;
170
+ description: string;
171
+ severity?: string;
172
+ related_task_id?: string;
173
+ intent_id?: string;
174
+ }): Promise<unknown>;
175
+ listIssues(options?: {
176
+ status?: string;
177
+ severity?: string;
178
+ limit?: string;
179
+ }): Promise<unknown>;
180
+ getIssue(idOrNumber: string): Promise<unknown>;
181
+ getIssueByNumber(issueNumber: string): Promise<unknown>;
182
+ resolveIssueByNumber(issueNumber: string, data: {
183
+ status: string;
184
+ resolution?: string;
185
+ resolved_by_task_id?: string;
186
+ }): Promise<unknown>;
187
+ resolveIssue(idOrNumber: string, data: {
188
+ status: string;
189
+ resolution?: string;
190
+ resolved_by_task_id?: string;
191
+ }): Promise<unknown>;
192
+ updateIssueStatus(idOrNumber: string, data: {
193
+ status: string;
194
+ resolution?: string;
195
+ resolved_task_id?: string;
196
+ }): Promise<unknown>;
197
+ updateIssueStatusByNumber(issueNumber: string, data: {
198
+ status: string;
199
+ resolution?: string;
200
+ resolved_task_id?: string;
201
+ }): Promise<unknown>;
202
+ logVibe(data: {
203
+ content: string;
204
+ type: string;
205
+ title?: string;
206
+ task_id?: string;
207
+ }): Promise<unknown>;
208
+ listVibes(options?: {
209
+ type?: string;
210
+ since?: string;
211
+ limit?: string;
212
+ }): Promise<unknown>;
213
+ getVibe(id: string): Promise<unknown>;
214
+ updateVibe(id: string, data: {
215
+ type?: string;
216
+ title?: string;
217
+ content?: string;
218
+ metadata?: Record<string, unknown>;
219
+ }): Promise<unknown>;
220
+ listIdeas(options?: {
221
+ status?: string;
222
+ priority?: string;
223
+ limit?: string;
224
+ }): Promise<unknown>;
225
+ getIdea(idOrNumber: string): Promise<unknown>;
226
+ getIdeaByNumber(ideaNumber: string): Promise<unknown>;
227
+ createIdea(data: {
228
+ content: string;
229
+ title?: string;
230
+ priority?: string;
231
+ metadata?: Record<string, unknown>;
232
+ }): Promise<unknown>;
233
+ updateIdeaStatus(idOrNumber: string, data: {
234
+ status: string;
235
+ }): Promise<unknown>;
236
+ updateIdeaStatusByNumber(ideaNumber: string, data: {
237
+ status: string;
238
+ }): Promise<unknown>;
239
+ listOrbits(options?: {
240
+ areaId?: string;
241
+ workspaceId?: string;
242
+ }): Promise<unknown>;
243
+ getOrbit(idOrSlug: string): Promise<unknown>;
244
+ createOrbit(data: {
245
+ name: string;
246
+ description?: string;
247
+ color?: string;
248
+ area_ids?: string[];
249
+ }): Promise<unknown>;
250
+ updateOrbit(idOrSlug: string, data: {
251
+ name?: string;
252
+ description?: string;
253
+ status?: string;
254
+ color?: string;
255
+ }): Promise<unknown>;
256
+ getOrbitItems(orbitIdOrSlug: string, options?: {
257
+ type?: string;
258
+ }): Promise<unknown>;
259
+ orbitAttach(orbitIdOrSlug: string, data: {
260
+ object_type: string;
261
+ object_id: string;
262
+ note?: string;
263
+ }): Promise<unknown>;
264
+ orbitDetach(orbitIdOrSlug: string, data: {
265
+ object_type: string;
266
+ object_id: string;
267
+ }): Promise<unknown>;
268
+ addOrbitArea(orbitIdOrSlug: string, areaId: string): Promise<unknown>;
269
+ removeOrbitArea(orbitIdOrSlug: string, areaId: string): Promise<unknown>;
270
+ addOrbitDependency(orbitIdOrSlug: string, data: {
271
+ target_orbit_id: string;
272
+ note?: string;
273
+ }): Promise<unknown>;
274
+ listIntents(options?: {
275
+ status?: string;
276
+ limit?: string;
277
+ }): Promise<unknown>;
278
+ getIntent(idOrNumber: string): Promise<unknown>;
279
+ createIntent(data: {
280
+ name: string;
281
+ outcome?: string;
282
+ status?: string;
283
+ area_id?: string;
284
+ }): Promise<unknown>;
285
+ updateIntent(idOrNumber: string, data: {
286
+ name?: string;
287
+ outcome?: string;
288
+ status?: string;
289
+ }): Promise<unknown>;
290
+ linkIntentItem(idOrNumber: string, data: {
291
+ item_type: string;
292
+ item_id: string;
293
+ }): Promise<unknown>;
294
+ unlinkIntentItem(idOrNumber: string, data: {
295
+ item_type: string;
296
+ item_id: string;
297
+ }): Promise<unknown>;
298
+ setIntentOrbit(idOrNumber: string, orbitId: string | null): Promise<unknown>;
299
+ listMissions(options?: {
300
+ status?: string;
301
+ limit?: string;
302
+ }): Promise<unknown>;
303
+ getMission(idOrNumber: string): Promise<unknown>;
304
+ createMission(data: {
305
+ name: string;
306
+ description?: string;
307
+ outcome?: string;
308
+ end_date?: string;
309
+ area_id?: string;
310
+ }): Promise<unknown>;
311
+ updateMission(idOrNumber: string, data: {
312
+ name?: string;
313
+ description?: string;
314
+ outcome?: string;
315
+ end_date?: string;
316
+ }): Promise<unknown>;
317
+ setMissionStatus(idOrNumber: string, data: {
318
+ status: string;
319
+ move_target_mission_id?: string;
320
+ }): Promise<unknown>;
321
+ linkMissionItem(idOrNumber: string, data: {
322
+ item_type: string;
323
+ item_id: string;
324
+ }): Promise<unknown>;
325
+ unlinkMissionItem(idOrNumber: string, data: {
326
+ item_type: string;
327
+ item_id: string;
328
+ }): Promise<unknown>;
329
+ getWorkPrompt(): Promise<unknown>;
330
+ getImportDocsPrompt(): Promise<unknown>;
331
+ }
332
+ /** Backwards-compatible alias for the pre-adapter class name. */
333
+ export { CloudAdapter as OrbitMapClient };
334
+ export declare function createClient(explicitArea?: string): Promise<CloudAdapter>;