@starlove/orbit 1.4.0 → 2.0.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 (329) hide show
  1. package/Dockerfile +10 -8
  2. package/README.md +146 -164
  3. package/dist/full/csp.txt +1 -0
  4. package/dist/full/fonts/JetBrains_Mono/JetBrainsMono-subset.woff2 +0 -0
  5. package/dist/full/fonts/JetBrains_Mono/README.txt +5 -0
  6. package/dist/full/fonts/Mona_Sans/MonaSans-subset.woff2 +0 -0
  7. package/{public/fonts/Open_Sans → dist/full/fonts/Mona_Sans}/OFL.txt +93 -93
  8. package/dist/full/fonts/Mona_Sans/README.txt +10 -0
  9. package/{public/fonts/JetBrains_Mono → dist/full/fonts/Newsreader}/OFL.txt +93 -93
  10. package/dist/full/fonts/Newsreader/README.txt +8 -0
  11. package/dist/full/fonts/Newsreader/newsreader.woff2 +0 -0
  12. package/dist/full/index.html +36 -653
  13. package/dist/full/js/app.BmuponPJ.js +32 -0
  14. package/dist/full/js/app.BmuponPJ.js.map +1 -0
  15. package/dist/full/js/chunk.1fJGQGbW.js +2 -0
  16. package/dist/full/js/chunk.1fJGQGbW.js.map +1 -0
  17. package/dist/full/js/chunk.5D7JO2zp.js +2 -0
  18. package/dist/full/js/chunk.5D7JO2zp.js.map +1 -0
  19. package/dist/full/js/chunk.BrNn_D79.js +2 -0
  20. package/dist/full/js/chunk.BrNn_D79.js.map +1 -0
  21. package/dist/full/js/chunk.CokJXIqM.js +2 -0
  22. package/dist/full/js/chunk.CokJXIqM.js.map +1 -0
  23. package/dist/full/js/chunk.D_Haqy6R.js +2 -0
  24. package/dist/full/js/chunk.D_Haqy6R.js.map +1 -0
  25. package/dist/full/js/chunk.RO0jsH6I.js +15 -0
  26. package/dist/full/js/chunk.RO0jsH6I.js.map +1 -0
  27. package/dist/full/js/chunk.dqWOEtBM.js +2 -0
  28. package/dist/full/js/chunk.dqWOEtBM.js.map +1 -0
  29. package/dist/full/js/warm.f260bbbc.js +15 -0
  30. package/dist/full/orbits-favicon.png +0 -0
  31. package/dist/full/orbits-logo-bg-wide.png +0 -0
  32. package/dist/full/orbits-logo-bg.png +0 -0
  33. package/dist/full/orbits-logo.png +0 -0
  34. package/dist/full/styles.2b154ffe.css +1 -0
  35. package/dist/full/vendor/starlove-ui/theme-init.js +66 -0
  36. package/dist/full/version.json +2 -2
  37. package/docs/AGENT_GUIDE.md +114 -0
  38. package/docs/UPDATING.md +249 -64
  39. package/lib/adapters/indexeddb/blobs.d.ts +3 -0
  40. package/lib/adapters/indexeddb/blobs.js +54 -0
  41. package/lib/adapters/indexeddb/database.d.ts +60 -0
  42. package/lib/adapters/indexeddb/database.js +126 -0
  43. package/lib/adapters/indexeddb/index.d.ts +5 -0
  44. package/lib/adapters/indexeddb/index.js +3 -0
  45. package/lib/adapters/indexeddb/locks.d.ts +14 -0
  46. package/lib/adapters/indexeddb/locks.js +40 -0
  47. package/lib/adapters/indexeddb/store.d.ts +40 -0
  48. package/lib/adapters/indexeddb/store.js +424 -0
  49. package/lib/adapters/indexeddb/tables.d.ts +43 -0
  50. package/lib/adapters/indexeddb/tables.js +127 -0
  51. package/lib/adapters/memory/blobs.d.ts +3 -0
  52. package/lib/adapters/memory/blobs.js +44 -0
  53. package/lib/adapters/memory/board.d.ts +41 -0
  54. package/lib/adapters/memory/board.js +521 -0
  55. package/lib/adapters/memory/index.d.ts +2 -0
  56. package/lib/adapters/memory/index.js +2 -0
  57. package/lib/adapters/memory/search.d.ts +6 -0
  58. package/lib/adapters/memory/search.js +30 -0
  59. package/lib/adapters/memory/store.d.ts +34 -0
  60. package/lib/adapters/memory/store.js +266 -0
  61. package/lib/adapters/sqlite/backups.d.ts +53 -0
  62. package/lib/adapters/sqlite/backups.js +232 -0
  63. package/lib/adapters/sqlite/blobs.d.ts +14 -0
  64. package/lib/adapters/sqlite/blobs.js +109 -0
  65. package/lib/adapters/sqlite/board.d.ts +77 -0
  66. package/lib/adapters/sqlite/board.js +328 -0
  67. package/lib/adapters/sqlite/database.d.ts +67 -0
  68. package/lib/adapters/sqlite/database.js +285 -0
  69. package/lib/adapters/sqlite/index.d.ts +3 -0
  70. package/lib/adapters/sqlite/index.js +2 -0
  71. package/lib/adapters/sqlite/lock.d.ts +11 -0
  72. package/lib/adapters/sqlite/lock.js +34 -0
  73. package/lib/adapters/sqlite/records.d.ts +54 -0
  74. package/lib/adapters/sqlite/records.js +546 -0
  75. package/lib/adapters/sqlite/schema.d.ts +54 -0
  76. package/lib/adapters/sqlite/schema.js +276 -0
  77. package/lib/adapters/sqlite/store.d.ts +39 -0
  78. package/lib/adapters/sqlite/store.js +385 -0
  79. package/lib/browser/in-page.d.ts +31 -0
  80. package/lib/browser/in-page.js +46 -0
  81. package/lib/browser/old-preview.d.ts +13 -0
  82. package/lib/browser/old-preview.js +80 -0
  83. package/lib/browser/preview-board.d.ts +8 -0
  84. package/lib/browser/preview-board.js +69 -0
  85. package/lib/cli/main.d.ts +7 -0
  86. package/lib/cli/main.js +343 -0
  87. package/lib/cli/orbit.d.ts +8 -0
  88. package/lib/cli/orbit.js +25 -0
  89. package/lib/client/http.d.ts +38 -0
  90. package/lib/client/http.js +334 -0
  91. package/lib/client/local.d.ts +26 -0
  92. package/lib/client/local.js +190 -0
  93. package/lib/client/object-url.d.ts +8 -0
  94. package/lib/client/object-url.js +21 -0
  95. package/lib/client/types.d.ts +268 -0
  96. package/lib/client/types.js +8 -0
  97. package/lib/commands/agent-tools.d.ts +31 -0
  98. package/lib/commands/agent-tools.js +100 -0
  99. package/lib/commands/index.d.ts +56 -0
  100. package/lib/commands/index.js +298 -0
  101. package/lib/commands/parse.d.ts +73 -0
  102. package/lib/commands/parse.js +231 -0
  103. package/lib/commands/present.d.ts +134 -0
  104. package/lib/commands/present.js +198 -0
  105. package/lib/commands/session.d.ts +85 -0
  106. package/lib/commands/session.js +138 -0
  107. package/lib/commands/verbs.d.ts +35 -0
  108. package/lib/commands/verbs.js +842 -0
  109. package/lib/core/actors.d.ts +18 -0
  110. package/lib/core/actors.js +45 -0
  111. package/lib/core/agent.d.ts +128 -0
  112. package/lib/core/agent.js +323 -0
  113. package/lib/core/boards.d.ts +113 -0
  114. package/lib/core/boards.js +288 -0
  115. package/lib/core/bootstrap.d.ts +47 -0
  116. package/lib/core/bootstrap.js +100 -0
  117. package/lib/core/bytes.d.ts +10 -0
  118. package/lib/core/bytes.js +52 -0
  119. package/lib/core/card-paths.d.ts +25 -0
  120. package/lib/core/card-paths.js +44 -0
  121. package/lib/core/context.d.ts +60 -0
  122. package/lib/core/context.js +42 -0
  123. package/lib/core/cross-board.d.ts +81 -0
  124. package/lib/core/cross-board.js +228 -0
  125. package/lib/core/describe.d.ts +21 -0
  126. package/lib/core/describe.js +81 -0
  127. package/lib/core/errors.d.ts +159 -0
  128. package/lib/core/errors.js +160 -0
  129. package/lib/core/files.d.ts +79 -0
  130. package/lib/core/files.js +262 -0
  131. package/lib/core/history.d.ts +20 -0
  132. package/lib/core/history.js +53 -0
  133. package/lib/core/image-types.d.ts +16 -0
  134. package/lib/core/image-types.js +36 -0
  135. package/lib/core/model.d.ts +263 -0
  136. package/lib/core/model.js +34 -0
  137. package/lib/core/nebula-link.d.ts +14 -0
  138. package/lib/core/nebula-link.js +39 -0
  139. package/lib/core/relations.d.ts +58 -0
  140. package/lib/core/relations.js +112 -0
  141. package/lib/core/search.d.ts +38 -0
  142. package/lib/core/search.js +92 -0
  143. package/lib/core/sessions.d.ts +44 -0
  144. package/lib/core/sessions.js +158 -0
  145. package/lib/core/snapshot-schema.d.ts +295 -0
  146. package/lib/core/snapshot-schema.js +82 -0
  147. package/lib/core/snapshots.d.ts +75 -0
  148. package/lib/core/snapshots.js +409 -0
  149. package/lib/core/states.d.ts +25 -0
  150. package/lib/core/states.js +126 -0
  151. package/lib/core/text.d.ts +40 -0
  152. package/lib/core/text.js +113 -0
  153. package/lib/core/tickets.d.ts +69 -0
  154. package/lib/core/tickets.js +311 -0
  155. package/lib/core/trello.d.ts +17 -0
  156. package/lib/core/trello.js +269 -0
  157. package/lib/core/verdicts.d.ts +28 -0
  158. package/lib/core/verdicts.js +92 -0
  159. package/lib/core/views.d.ts +95 -0
  160. package/lib/core/views.js +186 -0
  161. package/lib/http/app.d.ts +46 -0
  162. package/lib/http/app.js +491 -0
  163. package/lib/mcp-server.d.ts +10 -0
  164. package/lib/mcp-server.js +120 -0
  165. package/lib/node/assets.d.ts +7 -0
  166. package/lib/node/assets.js +68 -0
  167. package/lib/node/data-folder.d.ts +21 -0
  168. package/lib/node/data-folder.js +34 -0
  169. package/lib/node/env.d.ts +38 -0
  170. package/lib/node/env.js +49 -0
  171. package/lib/node/host-check.d.ts +24 -0
  172. package/lib/node/host-check.js +53 -0
  173. package/lib/node/host-services.d.ts +9 -0
  174. package/lib/node/host-services.js +150 -0
  175. package/lib/node/local.d.ts +22 -0
  176. package/lib/node/local.js +61 -0
  177. package/lib/node/migrate.d.ts +53 -0
  178. package/lib/node/migrate.js +635 -0
  179. package/lib/node/package.d.ts +7 -0
  180. package/lib/node/package.js +14 -0
  181. package/lib/node/repo-board.d.ts +49 -0
  182. package/lib/node/repo-board.js +245 -0
  183. package/lib/node/serve.d.ts +8 -0
  184. package/lib/node/serve.js +106 -0
  185. package/lib/orbit.d.ts +47 -0
  186. package/lib/orbit.js +44 -0
  187. package/lib/quiet-sqlite-warning.d.ts +1 -0
  188. package/lib/quiet-sqlite-warning.js +18 -0
  189. package/lib/store/blob-path.d.ts +6 -0
  190. package/lib/store/blob-path.js +12 -0
  191. package/lib/store/conformance.d.ts +52 -0
  192. package/lib/store/conformance.js +1449 -0
  193. package/lib/store/search-words.d.ts +10 -0
  194. package/lib/store/search-words.js +19 -0
  195. package/lib/store/types.d.ts +452 -0
  196. package/lib/store/types.js +34 -0
  197. package/llms.txt +63 -0
  198. package/package.json +109 -25
  199. package/src/cli/orbit.js +11 -658
  200. package/src/mcp-server.js +16 -876
  201. package/SKILL-ORBIT.md +0 -151
  202. package/build.mjs +0 -210
  203. package/dist/full/js/app.62905fcb.js +0 -952
  204. package/dist/full/js/app.62905fcb.js.map +0 -7
  205. package/dist/full/styles.4e60d824.css +0 -1
  206. package/docs/AGENT_PROTOCOL.md +0 -424
  207. package/docs/MCP_SETUP.md +0 -54
  208. package/docs/ORBIT_DISPATCH.md +0 -280
  209. package/docs/SS-Orbit-Dark.png +0 -0
  210. package/docs/SS-Orbit-Light.png +0 -0
  211. package/docs/mcp-client.example.json +0 -13
  212. package/docs/setup/orbit-init-wizard.md +0 -174
  213. package/public/apple-touch-icon.png +0 -0
  214. package/public/cursors/live_arrow.cur +0 -0
  215. package/public/cursors/live_link.cur +0 -0
  216. package/public/cursors/live_move.cur +0 -0
  217. package/public/cursors/live_select.cur +0 -0
  218. package/public/cursors/live_unavail.cur +0 -0
  219. package/public/favicon-32x32.png +0 -0
  220. package/public/fonts/Chakra_Petch/ChakraPetch-Bold.ttf +0 -0
  221. package/public/fonts/Chakra_Petch/ChakraPetch-BoldItalic.ttf +0 -0
  222. package/public/fonts/Chakra_Petch/ChakraPetch-Italic.ttf +0 -0
  223. package/public/fonts/Chakra_Petch/ChakraPetch-Light.ttf +0 -0
  224. package/public/fonts/Chakra_Petch/ChakraPetch-LightItalic.ttf +0 -0
  225. package/public/fonts/Chakra_Petch/ChakraPetch-Medium.ttf +0 -0
  226. package/public/fonts/Chakra_Petch/ChakraPetch-MediumItalic.ttf +0 -0
  227. package/public/fonts/Chakra_Petch/ChakraPetch-Regular.ttf +0 -0
  228. package/public/fonts/Chakra_Petch/ChakraPetch-SemiBold.ttf +0 -0
  229. package/public/fonts/Chakra_Petch/ChakraPetch-SemiBoldItalic.ttf +0 -0
  230. package/public/fonts/Chakra_Petch/OFL.txt +0 -93
  231. package/public/fonts/Inter/Inter-Italic-VariableFont_opsz,wght.ttf +0 -0
  232. package/public/fonts/Inter/Inter-VariableFont_opsz,wght.ttf +0 -0
  233. package/public/fonts/Inter/OFL.txt +0 -93
  234. package/public/fonts/Inter/README.txt +0 -118
  235. package/public/fonts/JetBrains_Mono/JetBrainsMono-Italic-VariableFont_wght.ttf +0 -0
  236. package/public/fonts/JetBrains_Mono/JetBrainsMono-VariableFont_wght.ttf +0 -0
  237. package/public/fonts/JetBrains_Mono/README.txt +0 -79
  238. package/public/fonts/OpenRing-Regular.ttf +0 -0
  239. package/public/fonts/Open_Sans/OpenSans-Italic-VariableFont_wdth,wght.ttf +0 -0
  240. package/public/fonts/Open_Sans/OpenSans-VariableFont_wdth,wght.ttf +0 -0
  241. package/public/fonts/Open_Sans/README.txt +0 -100
  242. package/public/fonts/Orbitron/OFL.txt +0 -93
  243. package/public/fonts/Orbitron/Orbitron-VariableFont_wght.ttf +0 -0
  244. package/public/fonts/Orbitron/README.txt +0 -68
  245. package/public/fonts/Rajdhani/OFL.txt +0 -93
  246. package/public/fonts/Rajdhani/Rajdhani-Bold.ttf +0 -0
  247. package/public/fonts/Rajdhani/Rajdhani-Light.ttf +0 -0
  248. package/public/fonts/Rajdhani/Rajdhani-Medium.ttf +0 -0
  249. package/public/fonts/Rajdhani/Rajdhani-Regular.ttf +0 -0
  250. package/public/fonts/Rajdhani/Rajdhani-SemiBold.ttf +0 -0
  251. package/public/fonts/runescape-uf.ttf +0 -0
  252. package/public/index.html +0 -769
  253. package/public/js/actor-labels.js +0 -65
  254. package/public/js/api.js +0 -39
  255. package/public/js/app.js +0 -45
  256. package/public/js/artifact-drawer.js +0 -79
  257. package/public/js/board-export.js +0 -161
  258. package/public/js/board-menu.js +0 -374
  259. package/public/js/card-actions.js +0 -545
  260. package/public/js/config.js +0 -20
  261. package/public/js/create-card.js +0 -190
  262. package/public/js/dom.js +0 -19
  263. package/public/js/drawer.js +0 -273
  264. package/public/js/font-preference.js +0 -229
  265. package/public/js/format.js +0 -433
  266. package/public/js/help-menu.js +0 -31
  267. package/public/js/icons.js +0 -16
  268. package/public/js/kanban.js +0 -694
  269. package/public/js/local-backend.js +0 -1015
  270. package/public/js/main.js +0 -161
  271. package/public/js/modal.js +0 -33
  272. package/public/js/motion-preference.js +0 -64
  273. package/public/js/panel.js +0 -58
  274. package/public/js/router.js +0 -134
  275. package/public/js/search.js +0 -56
  276. package/public/js/settings-tabs.js +0 -7
  277. package/public/js/settings.js +0 -1634
  278. package/public/js/sse.js +0 -159
  279. package/public/js/starscape.js +0 -332
  280. package/public/js/state.js +0 -129
  281. package/public/js/text-editing.js +0 -128
  282. package/public/js/theme-preference.js +0 -95
  283. package/public/js/ticket-detail.js +0 -1516
  284. package/public/js/ticket-typeahead.js +0 -49
  285. package/public/js/toast.js +0 -89
  286. package/public/js/topbar-notes.js +0 -155
  287. package/public/js/transport.js +0 -22
  288. package/public/js/typeahead.js +0 -206
  289. package/public/js/unread.js +0 -121
  290. package/public/js/update-check.js +0 -58
  291. package/public/js/url-routes.js +0 -94
  292. package/public/orbits-favicon.png +0 -0
  293. package/public/orbits-logo-bg-wide.png +0 -0
  294. package/public/orbits-logo-bg.png +0 -0
  295. package/public/orbits-logo.png +0 -0
  296. package/public/styles.css +0 -7709
  297. package/src/core/agent.js +0 -387
  298. package/src/core/agents-md.js +0 -109
  299. package/src/core/artifacts.js +0 -149
  300. package/src/core/attachments.js +0 -238
  301. package/src/core/auth.js +0 -85
  302. package/src/core/backups.js +0 -142
  303. package/src/core/board.js +0 -148
  304. package/src/core/boards.js +0 -409
  305. package/src/core/bootstrap.js +0 -170
  306. package/src/core/css-bundle.js +0 -30
  307. package/src/core/db.js +0 -315
  308. package/src/core/delete-board.js +0 -163
  309. package/src/core/dispatch.js +0 -1007
  310. package/src/core/events.js +0 -314
  311. package/src/core/http.js +0 -115
  312. package/src/core/migrate.js +0 -198
  313. package/src/core/paths.js +0 -55
  314. package/src/core/provision-repo-board.js +0 -119
  315. package/src/core/queries.js +0 -246
  316. package/src/core/registry.js +0 -211
  317. package/src/core/relations.js +0 -163
  318. package/src/core/review-verdicts.js +0 -138
  319. package/src/core/router.js +0 -556
  320. package/src/core/search.js +0 -183
  321. package/src/core/seed.js +0 -234
  322. package/src/core/snapshots.js +0 -692
  323. package/src/core/states.js +0 -167
  324. package/src/core/system-picker.js +0 -109
  325. package/src/core/tickets.js +0 -400
  326. package/src/core/util.js +0 -106
  327. package/src/core/version-check.js +0 -154
  328. package/src/mcp/orbit-client.js +0 -287
  329. package/src/server.js +0 -115
@@ -1,424 +0,0 @@
1
- # Agent Protocol
2
-
3
- The board is intentionally agent-first. Agents should not scrape the UI. They should call the API and ask for narrow context packs.
4
-
5
- If an MCP client is available, use the MCP server instead of rebuilding these HTTP calls yourself. The MCP tools map directly to the same core operations.
6
-
7
- Never edit `.orbit/board.db` directly to create or mutate cards. The SQLite file is Orbit's storage detail; use the HTTP API or MCP tools so validation, events, search indexing, backups, and cross-process locking all run.
8
-
9
- ## Core Flow
10
-
11
- 1. `POST /api/agent/claim-next`
12
- 2. Implement using the returned context pack.
13
- 3. Add progress comments with `POST /api/tickets/:id/comments`.
14
- 4. If blocked by human judgment, call `POST /api/agent/checkpoint`.
15
- 5. When ready for review, call `POST /api/agent/complete`.
16
-
17
- ### End-to-end example
18
-
19
- ```http
20
- POST /api/agent/claim-next
21
- Content-Type: application/json
22
-
23
- { "board": "your-board-slug" }
24
- ```
25
-
26
- The response includes the claimed `ticket` and a `context` pack. After working the ticket:
27
-
28
- ```http
29
- POST /api/tickets/abc123/comments
30
- Content-Type: application/json
31
-
32
- { "body": "Wired the new endpoint and added a smoke test.", "kind": "agent_note" }
33
- ```
34
-
35
- ```http
36
- POST /api/agent/complete
37
- Content-Type: application/json
38
-
39
- {
40
- "ticket_id": "abc123",
41
- "summary": "Implemented the new endpoint with input validation and tests.",
42
- "updates": "Hit a flaky test on Windows; pinned timeouts to 5s.",
43
- "pr_url": "https://github.com/you/repo/pull/42"
44
- }
45
- ```
46
-
47
- ## Endpoints
48
-
49
- ### List boards (thin)
50
-
51
- ```http
52
- GET /api/boards
53
- ```
54
-
55
- Returns `{ "boards": [ ... ] }` with registry metadata only (`id`, `slug`, `name`, `repo_path`, `repo_url`, `default_branch`, `db_path`, `last_active_at`). Does not load tickets or lanes. MCP equivalent: `board_list`.
56
-
57
- For the web UI’s full default-board snapshot (tickets, states, labels, entries), the SPA calls `GET /api/bootstrap`. Agents over MCP should use `board_list`, `board_set_active`, `board_context`, and ticket-scoped tools instead—there is no MCP mirror of bootstrap.
58
-
59
- ### Claim Next
60
-
61
- ```http
62
- POST /api/agent/claim-next
63
- Content-Type: application/json
64
-
65
- {
66
- "board": "your-board-slug",
67
- "type": "feature"
68
- }
69
- ```
70
-
71
- Returns the first schedulable `AI Ready` ticket. The scheduler skips tickets blocked by unresolved `blocked_by` relations.
72
-
73
- By default, `claim-next` skips `epic` cards because they are index/planning cards. To claim an epic for planning, pass `"type": "epic"` or `"include_epics": true`.
74
-
75
- The response shape is `{ claimed: true, ticket_id, context }` where `context` is the lightweight `board_read_ticket` pack (`ticket` with title/description/labels/state and the `board_manual`). Ticket comments are not included in the default claim context; call `GET /api/tickets/:id/comments` (or MCP `board_read_comments`) when an explicit chat/comment surface needs them. For the lean ticket relationship pack, call `GET /api/tickets/:id/context` (or MCP `board_get_ticket_context`). For the historical heavy pack with board manual/journal attached, call `GET /api/tickets/:id/context/full` (or MCP `board_get_ticket_context_full`).
76
-
77
- ### Read Lightweight Ticket
78
-
79
- ```http
80
- GET /api/tickets/:id
81
- GET /api/tickets/lookup?board=your-board-slug&number=42
82
- GET /api/tickets/lookup?board=your-board-slug&title=Exact%20Title
83
- ```
84
-
85
- MCP equivalent: `board_read_ticket`.
86
-
87
- Returns the lightweight agent read shape: `ticket` with identity, title, description, labels, state/type/priority, plus `board_manual`. Ticket comments, relations, blockers, child cards, and implementation fields are intentionally omitted. Use this for quick orientation and claim context. The `lookup` form is exact by per-board ticket number or exact title; it does not use fuzzy search or comment/implementation indexes.
88
-
89
- ### Get Lean Ticket Context Pack
90
-
91
- ```http
92
- GET /api/tickets/:id/context?depth=1
93
- ```
94
-
95
- Returns:
96
-
97
- - Ticket, board identity, state, labels.
98
- - Human-visible card fields: terse AI Plan (`ai_plan`), terse Work Summary (`implementation_summary`), and Revisions (`implementation_updates`); full handoffs/reports live in linked markdown artifact paths. Board Journal decisions/lessons carry the most important code/pattern/project context loaded for every agent on the board.
99
- - Parent epic/story ticket when present.
100
- - Child feature cards when the ticket is an epic/story.
101
- - Related tickets.
102
- - Blockers and blocking tickets.
103
-
104
- Project manual/journal (`agent_instructions` and board entries) and ticket comments are intentionally omitted from this default agent context. Human-only `project_notes` are not part of agent context surfaces. Fetch project context and comments explicitly when needed:
105
-
106
- ```http
107
- GET /api/boards/:board_id/context?include_struck=false
108
- GET /api/tickets/:id/comments
109
- ```
110
-
111
- MCP equivalents: `board_context` and `board_read_comments`.
112
-
113
- ### Get Full Ticket Context Pack
114
-
115
- ```http
116
- GET /api/tickets/:id/context/full?depth=1
117
- ```
118
-
119
- MCP equivalent: `board_get_ticket_context_full`.
120
-
121
- Returns the historical heavy context shape: everything in the lean ticket context plus the full board row and `board_manual` / journal. Comments are still intentionally omitted; explicit comment/chat consumers should call:
122
-
123
- ```http
124
- GET /api/tickets/:id/comments
125
- ```
126
-
127
- MCP equivalent: `board_read_comments`.
128
-
129
- ### Get Ticket Relations
130
-
131
- ```http
132
- GET /api/tickets/:id/relations
133
- ```
134
-
135
- Returns every link touching the ticket. Each entry has `type`, `direction` (`outgoing` / `incoming`), `source`, and a compact `other_ticket` summary.
136
-
137
- - `source: "relation"` — peer rows from the relations table (`relates_to` / `blocks` / `blocked_by`). These have a real `id` and are mutated via `POST /api/relations` and `DELETE /api/relations/:id`.
138
- - `source: "hierarchy"` — read-only synthetic entries surfacing epic ownership: `child_of` pointing at the parent epic, `parent_of` pointing at each child. `id` is `null`. Mutate via `PATCH /api/tickets/:id` setting `parent_ticket_id`; the relations endpoints reject `child_of` / `parent_of` writes (`hierarchy_uses_parent_ticket_id`).
139
-
140
- ### Get Ticket Blockers
141
-
142
- ```http
143
- GET /api/tickets/:id/blockers
144
- ```
145
-
146
- Returns:
147
-
148
- ```json
149
- {
150
- "ticket_id": "...",
151
- "can_start": false,
152
- "blockers": [
153
- { "id": "...", "number": 12, "title": "...", "state_name": "In Progress", "state_role": "in_progress" }
154
- ]
155
- }
156
- ```
157
-
158
- **Source of truth.** Blocker dependencies are defined exclusively by per-card `blocked_by` (and the inverse `blocks`) rows in the relations table — see `POST /api/tickets/:id/relations`. If a row exists, the blocker is unresolved. Rows are removed two ways: a user deletes the relation manually in the UI, or the *blocking* ticket moves into the Done lane (state role `done`) and the server auto-deletes every relation that named it as a blocker. `can_start` is `false` whenever any `blocked_by` row remains. Agents must not move a `can_start: false` ticket into a started state. The `claim-next` scheduler enforces this automatically.
159
-
160
- **Epic expansion.** When a `blocked_by` target is an epic, the epic itself is not treated as a blocker — its open children are. A child counts as "open" while it sits in any lane whose role is not `done` (and isn't archived). Each expanded blocker carries `via_epic_id` pointing at the epic that brought it into the list, so reports can explain the dependency.
161
-
162
- ### Create / Delete Relation
163
-
164
- ```http
165
- POST /api/relations
166
- Content-Type: application/json
167
-
168
- {
169
- "source_ticket_id": "...",
170
- "target_ticket_id": "...",
171
- "type": "blocked_by"
172
- }
173
- ```
174
-
175
- ```http
176
- DELETE /api/relations/:id
177
- ```
178
-
179
- Rejected with HTTP 400 if the pair already has a `parent_ticket_id` link in either direction (`relation_redundant_with_parent`) or if source equals target (`relation_self`). Use `parent_ticket_id` for epic ↔ direct-child ownership; use relations only for cross-cutting links.
180
-
181
- ### Search
182
-
183
- ```http
184
- GET /api/search?q=auth%20middleware&board=your-board-slug
185
- ```
186
-
187
- Searches ticket titles, descriptions, and comments.
188
-
189
- ### Board context (settings + journal)
190
-
191
- ```http
192
- GET /api/boards/:board_id/context?include_struck=false
193
- ```
194
-
195
- Returns the same shape as MCP `board_context`: agent-safe board metadata (`agent_instructions`, repository paths, default branch), `entries` (journal / decisions / lessons), and `deployment` paths. Human-only `project_notes` are intentionally excluded. Use `include_struck=true` to include struck journal rows (default off).
196
-
197
- MCP: `board_context` with optional `board_id` / `board_slug` / `board` and optional `include_struck`.
198
-
199
- ### Update Board
200
-
201
- ```http
202
- PATCH /api/boards/:board_id
203
- Content-Type: application/json
204
-
205
- {
206
- "name": "...",
207
- "repo_url": "https://github.com/you/repo",
208
- "system_path": "C:/path/to/repo",
209
- "default_branch": "main",
210
- "agent_instructions": "How agents should work here..."
211
- }
212
- ```
213
-
214
- Each board carries a `repo_url` and `system_path` (both optional). They surface in Settings → Repository and travel with the board through export/import.
215
-
216
- ### Add Board Memory Entry
217
-
218
- ```http
219
- POST /api/boards/:board_id/entries
220
- Content-Type: application/json
221
-
222
- {
223
- "type": "decision",
224
- "title": "Use journal entries as agent-facing project memory",
225
- "body": "Record Decisions for UX and architecture choices agents should follow. Record Lessons for mistakes or discoveries distilled as 'do X instead of Y when working with Z.'"
226
- }
227
- ```
228
-
229
- Allowed entry types:
230
-
231
- - `decision`: UX or architecture choices agents should follow instead of defaulting to generic codegen.
232
- - `lesson`: mistakes or discoveries distilled as "do X instead of Y when working with Z."
233
-
234
- Entries with `struck_at` set are retained for human review but omitted from board manual/context responses unless the REST client explicitly requests `include_struck=true`.
235
-
236
- ### Strike Or Restore Board Memory Entry
237
-
238
- ```http
239
- PATCH /api/board-entries/:entry_id
240
- Content-Type: application/json
241
-
242
- {
243
- "struck": true
244
- }
245
- ```
246
-
247
- ### Export Board Snapshot
248
-
249
- ```http
250
- GET /api/boards/:board_id/export?include_attachments=true
251
- ```
252
-
253
- Returns a JSON snapshot of the board, states, tickets, comments, relations, image attachment metadata, board entries, and relevant event history. Image bytes are excluded by default; pass `include_attachments=true` (or `include_images=true`) to embed present attachment files as base64. Missing attachment files are marked in metadata instead of failing the export.
254
-
255
- ### Import Board Snapshot
256
-
257
- ```http
258
- POST /api/admin/import
259
- Content-Type: application/json
260
-
261
- {
262
- "snapshot": { "...": "export payload" },
263
- "replace_existing": true
264
- }
265
- ```
266
-
267
- Replaces the current board with a previously exported snapshot. Export first if you want a rollback point.
268
-
269
- ### Add Comment
270
-
271
- ```http
272
- POST /api/tickets/:id/comments
273
- Content-Type: application/json
274
-
275
- {
276
- "body": "Implementation note...",
277
- "kind": "agent_note"
278
- }
279
- ```
280
-
281
- Comments are for discussion and event breadcrumbs. Use the dedicated fields below for durable implementation records.
282
-
283
- ### Ticket Field Contract
284
-
285
- ```http
286
- PATCH /api/tickets/:id
287
- Content-Type: application/json
288
-
289
- {
290
- "ai_plan": "Next: implement the sync queue, add conflict tests, verify with pnpm test.",
291
- "plan_artifact_path": ".orbit/dispatch-runs/.../handoff.md",
292
- "implementation_summary": "Shipped sync queue + conflict tests. pnpm test passed. Risk: mobile offline smoke remains human-owned.",
293
- "implementation_artifact_path": ".orbit/dispatch-runs/.../report.md",
294
- "implementation_updates": "Revision: narrowed conflict retry to failed operations only."
295
- }
296
- ```
297
-
298
- Field intent:
299
-
300
- - `ai_plan`: existing AI Plan field. Store a terse visible plan summary for humans. Use `plan_artifact_path` for full markdown/text handoffs or plan docs.
301
- - `plan_artifact_path`: human-editable local/repo-relative or hosted-readable markdown/text path, for example `docs/plan.md` or `./docs/plan.md`. The UI resolves it when opening the artifact; if it cannot resolve, the human can edit the path.
302
- - `implementation_summary`: existing Work Summary field. Store a terse visible result summary for humans. Use `implementation_artifact_path` for full reports/evidence.
303
- - `implementation_artifact_path`: human-editable local/repo-relative or hosted-readable markdown/text path to the full report/evidence artifact, for example `docs/report.md` or `./docs/report.md`.
304
- - `implementation_updates`: Revisions. Use only for terse later changes/corrections after initial implementation. Leave blank for normal first completion; do not store chronology, command logs, run receipts, or durable project lessons here.
305
- - Comments are for compact run receipts, transient breadcrumbs, and discussion.
306
- - Board Journal entries are for durable reusable project decisions/lessons.
307
-
308
- Direct `PATCH /api/tickets/:id` updates the fields exactly. For normal completion, prefer `/api/agent/complete`: its `summary` writes Work Summary (`implementation_summary`), `implementation_artifact_path` links the full report, and optional `updates` writes Revisions only when the run is a later correction/change.
309
-
310
- ### Archive, Restore, and Delete
311
-
312
- Removing a card is a two-step contract: archive first (soft-delete), then optionally permanently delete. Restore reverses an archive.
313
-
314
- ```http
315
- POST /api/tickets/:id/archive
316
- ```
317
-
318
- Soft-deletes the ticket: sets `archived_at` to the current time and bumps `updated_at`. Archived tickets are filtered out of `GET /api/bootstrap`, `GET /api/search`, `POST /api/agent/claim-next`, `GET /api/tickets/:id/blockers`, `GET /api/tickets/:id/relations`, and child-of-epic listings. Their data, comments, labels, and relations are preserved. Idempotent — archiving an already-archived ticket is a no-op.
319
-
320
- ```http
321
- POST /api/tickets/:id/restore
322
- ```
323
-
324
- Clears `archived_at`. The ticket reappears on the kanban in its previous lane (the `state_id` is preserved across archive/restore).
325
-
326
- ```http
327
- DELETE /api/tickets/:id
328
- ```
329
-
330
- Permanently removes the ticket. Returns `409 ticket_not_archived` if the ticket is not currently archived. Cascades delete all comments, ticket-label rows, and relations. Events for the ticket are kept but their `ticket_id` is set to `NULL`. Response: `{ "ok": true, "deleted_id": "..." }`.
331
-
332
- ```http
333
- GET /api/boards/:board_id/archive
334
- ```
335
-
336
- Returns `{ "tickets": [...] }` — all archived tickets for the board, ordered by `archived_at` descending (most recent first). Each ticket carries the same fields as `bootstrap.tickets`.
337
-
338
- Over MCP these are exposed as `board_archive_ticket`, `board_restore_ticket`, `board_delete_ticket`, and `board_list_archive`. Always archive when intent is "remove"; only delete when intent is "delete forever and you have already confirmed."
339
-
340
- ### Create Epic With Feature Cards
341
-
342
- Ticket types are `epic`, `feature`, `task`, and `bug`.
343
-
344
- MCP equivalent: `board_create_ticket`. Use it for new cards instead of modifying `.orbit/board.db`.
345
-
346
- Create the epic/story parent first:
347
-
348
- ```http
349
- POST /api/tickets
350
- Content-Type: application/json
351
-
352
- {
353
- "board_id": "board-id",
354
- "type": "epic",
355
- "title": "Build offline-first sync",
356
- "description": "High-level vision and outcome.",
357
- "ai_plan": "Feature 1: schema. Feature 2: queue. Feature 3: conflict UI.",
358
- "labels": ["ai-eligible"]
359
- }
360
- ```
361
-
362
- Then create feature cards with `parent_ticket_id`:
363
-
364
- ```http
365
- POST /api/tickets
366
- Content-Type: application/json
367
-
368
- {
369
- "board_id": "board-id",
370
- "type": "feature",
371
- "parent_ticket_id": "epic-ticket-id",
372
- "title": "Feature 1: sync schema",
373
- "ai_plan": "Implement the local operation log and migration.",
374
- "labels": ["ai-eligible"]
375
- }
376
- ```
377
-
378
- ### Checkpoint
379
-
380
- ```http
381
- POST /api/agent/checkpoint
382
- Content-Type: application/json
383
-
384
- {
385
- "ticket_id": "ticket-id",
386
- "message": "CHECKPOINT: Option A vs B..."
387
- }
388
- ```
389
-
390
- Moves the ticket to `Review` (same lane as `/api/agent/complete`) and adds a **`checkpoint`** comment with `message`—use it for mid-flight forks; use `complete` when work is done.
391
-
392
- ### Complete
393
-
394
- ```http
395
- POST /api/agent/complete
396
- Content-Type: application/json
397
-
398
- {
399
- "ticket_id": "ticket-id",
400
- "summary": "Implemented the requested change. Tests pass.",
401
- "updates": "Important implementation notes and lessons.",
402
- "pr_url": "https://github.com/you/repo/pull/123"
403
- }
404
- ```
405
-
406
- Moves the ticket to `Review` by default and writes `summary` into Work Summary (`implementation_summary`). If `updates` is present, it is appended to Revisions (`implementation_updates`) without timestamp headings; omit `updates` for normal first completion notes.
407
-
408
- ## Ticket Writing Contract
409
-
410
- Agents perform best when tickets include:
411
-
412
- - Clear requirements.
413
- - Acceptance criteria.
414
- - Relations for dependencies, especially `blocked_by`. Use `parent_ticket_id` for epic ownership, not relations.
415
- - Pointers to previous related tickets or comments.
416
-
417
- ## Two Relationship Models
418
-
419
- The board separates structural ownership from cross-cutting links. Treat these as non-overlapping:
420
-
421
- - **Hierarchy (`parent_ticket_id`)** — set on the ticket row. Only epics can own children; non-epics carry the parent id. Detach by `PATCH`-ing `parent_ticket_id: null`. The dispatcher and context pack walk this link to surface parent / child cards.
422
- - **Relations table** — typed links between any two tickets with `relates_to`, `blocks`, or `blocked_by`. The server rejects relation rows that mirror a `parent_ticket_id` link or point a ticket at itself, so the two models stay disjoint.
423
-
424
- A ticket is workable only when its `can_start` is `true` (no unresolved `blocked_by`). Use `GET /api/tickets/:id/blockers` for a status check, or read the context pack which already embeds blockers and relations.
package/docs/MCP_SETUP.md DELETED
@@ -1,54 +0,0 @@
1
- # MCP Setup
2
-
3
- Use `mcp-client.example.json` in this folder as a copy-editable starting point for any MCP-capable client, including VS Code, Cursor, Claude Desktop, Claude Code, Codex, OpenCode, and similar tools.
4
-
5
- The easiest path is **Settings -> AI** in the web app:
6
-
7
- 1. Confirm or change the detected operating system.
8
- 2. Choose the AI app or agent harness.
9
- 3. Copy the generated setup snippet.
10
- 4. Paste it into that app's MCP settings or run the generated CLI command.
11
-
12
- Orbit generates neutral template paths for Windows, macOS, and Linux. Replace those placeholders with the real path to **`src/mcp-server.js`** inside your Orbit checkout. That tells the AI client **how to spawn the MCP helper**; it does not ship markdown or project context—the agent reads files (like `SKILL-ORBIT.md`) from whichever repo/workspace you opened.
13
-
14
- Board data lives under each tracked repo at `.orbit/board.db` (flat file or `.orbit/boards/<slug>/` for extra boards)—not beside the MCP script.
15
-
16
- After installing Orbit as a package, run **`orbit init`** in (or with `--cwd` pointing at) the repo where you want `.orbit/`, **`AGENTS.md`**, and the managed **`SKILL-ORBIT.md`** so agents and MCP line up with that tree. Orbit enables the AI Ready / In Progress / Review agent lanes by default. Add `--no-ai` if you want AI collaboration disabled, and add `--example` if you want the onboarding example tickets. Keep repo-specific agent customization in `AGENTS.md` or board *Agent Instructions*; `SKILL-ORBIT.md` is Orbit-managed and may be overwritten by `orbit init` or refreshed by `orbit run`.
17
-
18
- The generated format changes by app:
19
-
20
- - Cursor, Claude Desktop, and generic MCP clients get `mcpServers` JSON.
21
- - VS Code gets an `mcp.json` snippet with a top-level `servers` object.
22
- - Claude Code gets a `claude mcp add ... -- node ...` command.
23
- - Codex gets a `[mcp_servers.starscape-orbit]` TOML snippet.
24
- - OpenCode gets an `opencode.json` snippet under `mcp`.
25
-
26
- The checked-in example file is not read automatically by Starscape Orbit. It exists so a user can:
27
-
28
- 1. Open the example.
29
- 2. Copy the `minimal-agent-board` server block into their own MCP client config.
30
- 3. Replace the path to `src/mcp-server.js` with the absolute path on your machine.
31
- 4. Restart the MCP client.
32
-
33
- By default MCP runs in local mode. It finds a board from an explicit project root first: pass `orbit mcp --cwd <repo>` or set `PROJECT_ROOT=<repo>` in persistent MCP configs. If neither is set, it falls back to the process cwd and walks upward to the first ancestor with `.orbit/board.db`. Prefer explicit roots for long-lived agent configs so launching the agent from another folder does not attach the wrong board.
34
-
35
- For a shared/deployed board, run MCP in remote mode instead: set `ORBIT_MODE=remote`, `ORBIT_API_URL=<server origin>`, and usually `ORBIT_DEFAULT_BOARD=<slug-or-id>`. Remote mode calls the HTTP API and does not open or auto-create local `.orbit` databases; it fails at startup if `ORBIT_API_URL` is missing. **`AGENTS.md` / `SKILL-ORBIT.md`** are unrelated to MCP transport: agents open them via the workspace file tree, `orbit init` keeps a terse Orbit pointer section in `AGENTS.md`, and `orbit run` refreshes managed `SKILL-ORBIT.md` copies for registered repos.
36
-
37
- Typical use:
38
-
39
- - Keep the web UI running with `orbit run` (`node src/server.js` is fine for source-tree development, but `orbit run` is the package command that refreshes managed `SKILL-ORBIT.md` copies).
40
- - Point the MCP client at `node src/cli/orbit.js mcp --cwd /absolute/project`, set `PROJECT_ROOT=/absolute/project` with `node src/mcp-server.js`, or paste the generated setup from Settings -> AI.
41
- - Use the MCP tools to claim tickets, read context, update implementation fields, and write project memory.
42
-
43
- ## System Impact
44
-
45
- Running the MCP server starts a small local helper process. It reads and updates the same local board data as the web app, does not publish the board to the internet, and can be removed from your AI app's MCP settings whenever you want.
46
-
47
- On Windows, that helper process can keep `.orbit/board.db` and its WAL/SHM sidecar files locked while the AI client is running. Before deleting or recloning a repo that has an Orbit board, close or restart the AI client, stop any Orbit runtime terminal, and prefer `orbit reset --cwd <repo>` for cleanup.
48
-
49
- The MCP server is only the bridge. Your AI app is still the part that decides what to do, and that app may send ticket context to its AI provider when you ask it to work on cards. Only connect AI apps you trust with this project.
50
-
51
- Important:
52
-
53
- - Run the MCP helper and web server against the **same Orbit checkout and `DATA_DIR`** (default `~/.orbit`, override with `DATA_DIR=/path`) so they share one `registry.db` and agree on paths to `.orbit/board.db` files—but remember **`AGENTS.md` / `SKILL-ORBIT.md` are plain repo text**, not streamed over MCP.
54
- - The generated setup assumes local/open mode. Protected deployments can still add MCP auth manually later.