@useorgx/openclaw-plugin 0.7.11 → 0.7.15

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 (189) hide show
  1. package/README.md +94 -122
  2. package/dashboard/dist/assets/0RUEVzJa.js +1 -0
  3. package/dashboard/dist/assets/0RUEVzJa.js.br +0 -0
  4. package/dashboard/dist/assets/0RUEVzJa.js.gz +0 -0
  5. package/dashboard/dist/assets/3TtV4moZ.js +1 -0
  6. package/dashboard/dist/assets/3TtV4moZ.js.br +0 -0
  7. package/dashboard/dist/assets/3TtV4moZ.js.gz +0 -0
  8. package/dashboard/dist/assets/3VwNyxUf.js +1 -0
  9. package/dashboard/dist/assets/3VwNyxUf.js.br +0 -0
  10. package/dashboard/dist/assets/3VwNyxUf.js.gz +0 -0
  11. package/dashboard/dist/assets/{beHYBbh6.js → 7DhYqBrM.js} +2 -2
  12. package/dashboard/dist/assets/7DhYqBrM.js.br +0 -0
  13. package/dashboard/dist/assets/7DhYqBrM.js.gz +0 -0
  14. package/dashboard/dist/assets/{tcEHYcbW.js → BCudUvwg.js} +1 -1
  15. package/dashboard/dist/assets/BCudUvwg.js.br +0 -0
  16. package/dashboard/dist/assets/BCudUvwg.js.gz +0 -0
  17. package/dashboard/dist/assets/BV0BcV1u.js +53 -0
  18. package/dashboard/dist/assets/BV0BcV1u.js.br +0 -0
  19. package/dashboard/dist/assets/BV0BcV1u.js.gz +0 -0
  20. package/dashboard/dist/assets/BVvffj0x.js +1 -0
  21. package/dashboard/dist/assets/BVvffj0x.js.br +0 -0
  22. package/dashboard/dist/assets/BVvffj0x.js.gz +0 -0
  23. package/dashboard/dist/assets/BiOgVMED.js +1 -0
  24. package/dashboard/dist/assets/BiOgVMED.js.br +0 -0
  25. package/dashboard/dist/assets/BiOgVMED.js.gz +0 -0
  26. package/dashboard/dist/assets/BjK42gtU.js +1 -0
  27. package/dashboard/dist/assets/BjK42gtU.js.br +0 -0
  28. package/dashboard/dist/assets/BjK42gtU.js.gz +0 -0
  29. package/dashboard/dist/assets/C-MOJWHs.js +1 -0
  30. package/dashboard/dist/assets/C-MOJWHs.js.br +0 -0
  31. package/dashboard/dist/assets/C-MOJWHs.js.gz +0 -0
  32. package/dashboard/dist/assets/{CD-q5mdP.js → C91KLKit.js} +1 -1
  33. package/dashboard/dist/assets/C91KLKit.js.br +0 -0
  34. package/dashboard/dist/assets/C91KLKit.js.gz +0 -0
  35. package/dashboard/dist/assets/{AqVoI3SF.js → C9fvfXmS.js} +1 -1
  36. package/dashboard/dist/assets/C9fvfXmS.js.br +0 -0
  37. package/dashboard/dist/assets/C9fvfXmS.js.gz +0 -0
  38. package/dashboard/dist/assets/CFZ4Swr5.js +1 -0
  39. package/dashboard/dist/assets/CFZ4Swr5.js.br +0 -0
  40. package/dashboard/dist/assets/CFZ4Swr5.js.gz +0 -0
  41. package/dashboard/dist/assets/{DCP-C7fn.js → CGj8kRhg.js} +1 -1
  42. package/dashboard/dist/assets/CGj8kRhg.js.br +0 -0
  43. package/dashboard/dist/assets/CGj8kRhg.js.gz +0 -0
  44. package/dashboard/dist/assets/CJjEAGFN.js +1 -0
  45. package/dashboard/dist/assets/CJjEAGFN.js.br +0 -0
  46. package/dashboard/dist/assets/CJjEAGFN.js.gz +0 -0
  47. package/dashboard/dist/assets/CKrH5fYO.js +1 -0
  48. package/dashboard/dist/assets/CKrH5fYO.js.br +0 -0
  49. package/dashboard/dist/assets/CKrH5fYO.js.gz +0 -0
  50. package/dashboard/dist/assets/CMTTPXch.js +1 -0
  51. package/dashboard/dist/assets/CMTTPXch.js.br +0 -0
  52. package/dashboard/dist/assets/CMTTPXch.js.gz +0 -0
  53. package/dashboard/dist/assets/CSlBSRyv.js +1 -0
  54. package/dashboard/dist/assets/CSlBSRyv.js.br +0 -0
  55. package/dashboard/dist/assets/CSlBSRyv.js.gz +0 -0
  56. package/dashboard/dist/assets/CnPC783_.js +1 -0
  57. package/dashboard/dist/assets/CnPC783_.js.br +0 -0
  58. package/dashboard/dist/assets/CnPC783_.js.gz +0 -0
  59. package/dashboard/dist/assets/Ctw95IkC.js +1 -0
  60. package/dashboard/dist/assets/Ctw95IkC.js.br +0 -0
  61. package/dashboard/dist/assets/Ctw95IkC.js.gz +0 -0
  62. package/dashboard/dist/assets/DHz-aQPw.js +1 -0
  63. package/dashboard/dist/assets/DHz-aQPw.js.br +0 -0
  64. package/dashboard/dist/assets/DHz-aQPw.js.gz +0 -0
  65. package/dashboard/dist/assets/DNX2foSJ.css +1 -0
  66. package/dashboard/dist/assets/DNX2foSJ.css.br +0 -0
  67. package/dashboard/dist/assets/DNX2foSJ.css.gz +0 -0
  68. package/dashboard/dist/assets/Dj2k1r16.js +8 -0
  69. package/dashboard/dist/assets/Dj2k1r16.js.br +0 -0
  70. package/dashboard/dist/assets/Dj2k1r16.js.gz +0 -0
  71. package/dashboard/dist/assets/DxUw4FMR.js +212 -0
  72. package/dashboard/dist/assets/DxUw4FMR.js.br +0 -0
  73. package/dashboard/dist/assets/DxUw4FMR.js.gz +0 -0
  74. package/dashboard/dist/assets/T2NFtzAv.js +1 -0
  75. package/dashboard/dist/assets/T2NFtzAv.js.br +0 -0
  76. package/dashboard/dist/assets/T2NFtzAv.js.gz +0 -0
  77. package/dashboard/dist/assets/cX2e-TLi.js +1 -0
  78. package/dashboard/dist/assets/cX2e-TLi.js.br +0 -0
  79. package/dashboard/dist/assets/cX2e-TLi.js.gz +0 -0
  80. package/dashboard/dist/assets/eeHXe_OQ.js +9 -0
  81. package/dashboard/dist/assets/eeHXe_OQ.js.br +0 -0
  82. package/dashboard/dist/assets/eeHXe_OQ.js.gz +0 -0
  83. package/dashboard/dist/assets/{Du1wfrXa.js → gZr_xKlA.js} +2 -2
  84. package/dashboard/dist/assets/gZr_xKlA.js.br +0 -0
  85. package/dashboard/dist/assets/gZr_xKlA.js.gz +0 -0
  86. package/dashboard/dist/brand/control-tower.png +0 -0
  87. package/dashboard/dist/brand/design-codex.png +0 -0
  88. package/dashboard/dist/brand/engineering-autopilot.png +0 -0
  89. package/dashboard/dist/brand/launch-captain.png +0 -0
  90. package/dashboard/dist/brand/orgx-logo.png +0 -0
  91. package/dashboard/dist/brand/pipeline-intelligence.png +0 -0
  92. package/dashboard/dist/brand/product-orchestrator.png +0 -0
  93. package/dashboard/dist/brand/xandy-orchestrator.png +0 -0
  94. package/dashboard/dist/index.html +8 -6
  95. package/dashboard/dist/index.html.br +0 -0
  96. package/dashboard/dist/index.html.gz +0 -0
  97. package/dist/hash-utils.d.ts +1 -0
  98. package/dist/hash-utils.js +4 -0
  99. package/dist/http/helpers/auto-continue-engine.js +124 -67
  100. package/dist/http/helpers/autopilot-slice-utils.js +112 -66
  101. package/dist/http/helpers/hash-utils.d.ts +1 -1
  102. package/dist/http/helpers/hash-utils.js +1 -1
  103. package/dist/http/helpers/mission-control.js +5 -2
  104. package/dist/http/helpers/queue-constants.d.ts +37 -0
  105. package/dist/http/helpers/queue-constants.js +34 -0
  106. package/dist/http/helpers/slice-experience-v2.js +2 -5
  107. package/dist/http/helpers/slice-run-projections.js +2 -5
  108. package/dist/http/helpers/workspace-scope.js +4 -3
  109. package/dist/http/index.js +101 -60
  110. package/dist/http/routes/chat.js +1 -21
  111. package/dist/http/routes/live-snapshot.js +4 -23
  112. package/dist/http/routes/mission-control-actions.js +2 -18
  113. package/dist/http/routes/mission-control-read.js +4 -107
  114. package/dist/lib/type-coercion.d.ts +10 -0
  115. package/dist/lib/type-coercion.js +82 -0
  116. package/dist/mcp-http-handler.js +14 -2
  117. package/dist/openclaw.plugin.json +1 -1
  118. package/dist/services/experiment-randomization.js +9 -2
  119. package/openclaw.plugin.json +1 -1
  120. package/package.json +3 -2
  121. package/dashboard/dist/assets/AqVoI3SF.js.br +0 -0
  122. package/dashboard/dist/assets/AqVoI3SF.js.gz +0 -0
  123. package/dashboard/dist/assets/BC4WvnHJ.js +0 -1
  124. package/dashboard/dist/assets/BC4WvnHJ.js.br +0 -0
  125. package/dashboard/dist/assets/BC4WvnHJ.js.gz +0 -0
  126. package/dashboard/dist/assets/BG5mwTkg.js +0 -1
  127. package/dashboard/dist/assets/BG5mwTkg.js.br +0 -0
  128. package/dashboard/dist/assets/BG5mwTkg.js.gz +0 -0
  129. package/dashboard/dist/assets/BJgZIVUQ.js +0 -53
  130. package/dashboard/dist/assets/BJgZIVUQ.js.br +0 -0
  131. package/dashboard/dist/assets/BJgZIVUQ.js.gz +0 -0
  132. package/dashboard/dist/assets/BNh-XYPV.js +0 -1
  133. package/dashboard/dist/assets/BNh-XYPV.js.br +0 -0
  134. package/dashboard/dist/assets/BNh-XYPV.js.gz +0 -0
  135. package/dashboard/dist/assets/BTAEErUY.js +0 -1
  136. package/dashboard/dist/assets/BTAEErUY.js.br +0 -0
  137. package/dashboard/dist/assets/BTAEErUY.js.gz +0 -0
  138. package/dashboard/dist/assets/BepW_590.js +0 -1
  139. package/dashboard/dist/assets/BepW_590.js.br +0 -0
  140. package/dashboard/dist/assets/BepW_590.js.gz +0 -0
  141. package/dashboard/dist/assets/BerAfzjq.js +0 -1
  142. package/dashboard/dist/assets/BerAfzjq.js.br +0 -0
  143. package/dashboard/dist/assets/BerAfzjq.js.gz +0 -0
  144. package/dashboard/dist/assets/Bp3N-QL5.js +0 -212
  145. package/dashboard/dist/assets/Bp3N-QL5.js.br +0 -0
  146. package/dashboard/dist/assets/Bp3N-QL5.js.gz +0 -0
  147. package/dashboard/dist/assets/C-KIc3Wc.js +0 -1
  148. package/dashboard/dist/assets/C-KIc3Wc.js.br +0 -0
  149. package/dashboard/dist/assets/C-KIc3Wc.js.gz +0 -0
  150. package/dashboard/dist/assets/C3dZRz9P.css +0 -1
  151. package/dashboard/dist/assets/C3dZRz9P.css.br +0 -0
  152. package/dashboard/dist/assets/C3dZRz9P.css.gz +0 -0
  153. package/dashboard/dist/assets/CD-q5mdP.js.br +0 -0
  154. package/dashboard/dist/assets/CD-q5mdP.js.gz +0 -0
  155. package/dashboard/dist/assets/CL_wXqR7.js +0 -1
  156. package/dashboard/dist/assets/CL_wXqR7.js.br +0 -0
  157. package/dashboard/dist/assets/CL_wXqR7.js.gz +0 -0
  158. package/dashboard/dist/assets/CdvjC9G9.js +0 -1
  159. package/dashboard/dist/assets/CdvjC9G9.js.br +0 -0
  160. package/dashboard/dist/assets/CdvjC9G9.js.gz +0 -0
  161. package/dashboard/dist/assets/Ck2agw-s.js +0 -1
  162. package/dashboard/dist/assets/Ck2agw-s.js.br +0 -0
  163. package/dashboard/dist/assets/Ck2agw-s.js.gz +0 -0
  164. package/dashboard/dist/assets/CxQ08qFN.js +0 -9
  165. package/dashboard/dist/assets/CxQ08qFN.js.br +0 -0
  166. package/dashboard/dist/assets/CxQ08qFN.js.gz +0 -0
  167. package/dashboard/dist/assets/D2CH1H6k.js +0 -1
  168. package/dashboard/dist/assets/D2CH1H6k.js.br +0 -0
  169. package/dashboard/dist/assets/D2CH1H6k.js.gz +0 -0
  170. package/dashboard/dist/assets/D9esz7jd.js +0 -1
  171. package/dashboard/dist/assets/D9esz7jd.js.br +0 -0
  172. package/dashboard/dist/assets/D9esz7jd.js.gz +0 -0
  173. package/dashboard/dist/assets/DCP-C7fn.js.br +0 -0
  174. package/dashboard/dist/assets/DCP-C7fn.js.gz +0 -0
  175. package/dashboard/dist/assets/DJASCd69.js +0 -1
  176. package/dashboard/dist/assets/DJASCd69.js.br +0 -0
  177. package/dashboard/dist/assets/DJASCd69.js.gz +0 -0
  178. package/dashboard/dist/assets/Dm9AybAp.js +0 -1
  179. package/dashboard/dist/assets/Dm9AybAp.js.br +0 -0
  180. package/dashboard/dist/assets/Dm9AybAp.js.gz +0 -0
  181. package/dashboard/dist/assets/Du1wfrXa.js.br +0 -0
  182. package/dashboard/dist/assets/Du1wfrXa.js.gz +0 -0
  183. package/dashboard/dist/assets/beHYBbh6.js.br +0 -0
  184. package/dashboard/dist/assets/beHYBbh6.js.gz +0 -0
  185. package/dashboard/dist/assets/cNrhgGc1.js +0 -8
  186. package/dashboard/dist/assets/cNrhgGc1.js.br +0 -0
  187. package/dashboard/dist/assets/cNrhgGc1.js.gz +0 -0
  188. package/dashboard/dist/assets/tcEHYcbW.js.br +0 -0
  189. package/dashboard/dist/assets/tcEHYcbW.js.gz +0 -0
package/README.md CHANGED
@@ -10,10 +10,20 @@ OrgX plugin for [OpenClaw](https://openclaw.ai) — connect your AI agents to Or
10
10
  4. Sign in at [useorgx.com](https://useorgx.com) and approve the connection.
11
11
  5. Return to OpenClaw. The plugin stores a dedicated credential and runs first sync automatically (no key copy/paste).
12
12
 
13
+ Primary UI route is `http://127.0.0.1:18789/orgx/live`. The plugin does not serve a separate `/orgx/chat` app route.
14
+
13
15
  If Claude/Cursor/Codex MCP configs are detected on this machine, the pairing flow also installs a local MCP bridge entry (no OAuth) pointing at `http://127.0.0.1:18789/orgx/mcp`. To avoid overwriting your hosted `orgx` server entry, the local bridge is installed under the name `orgx-openclaw`. To opt out entirely, set `ORGX_DISABLE_MCP_CLIENT_AUTOCONFIG=1`.
14
16
 
15
17
  Manual API key entry is still available as a permanent fallback from the onboarding panel.
16
18
 
19
+ ## What's New (0.7.x)
20
+
21
+ - Mission Control lifecycle UX now cleanly separates `Next Up` queue intent from `In Progress` runtime state, with stronger task/workstream hierarchy rendering and queue controls (`Play`, `Pin`, `Reorder`, `Move`, `Bulk`, `Clear`).
22
+ - Autopilot and manual `Play` now share the same lifecycle contract and spawn-guard behavior, including deterministic blocked/needs-decision handling surfaced in triage and activity.
23
+ - Workspace-scoped reads/writes were hardened across Mission Control graph, Next Up, slices, and snapshot surfaces to avoid cross-workspace leakage.
24
+ - Activity and session detail surfaces were upgraded with clearer run outcome metadata, safer error messaging, and improved context labels.
25
+ - Dashboard build output was stabilized by fixing chunk-splitting behavior and eliminating circular-chunk warnings in production builds.
26
+
17
27
  ## Architecture Overview
18
28
 
19
29
  ```
@@ -47,7 +57,7 @@ Manual API key entry is still available as a permanent fallback from the onboard
47
57
  │ │ │ HTTP Handler │ │ │
48
58
  │ │ │ │ │ │
49
59
  │ │ │ /orgx/live → Dashboard SPA (Vite-built React app) │ │ │
50
- │ │ │ /orgx/api/* → 33+ REST endpoints │ │ │
60
+ │ │ │ /orgx/api/* → Modular REST routes │ │ │
51
61
  │ │ │ /orgx/mcp → MCP bridge (tools/list, tools/call) │ │ │
52
62
  │ │ │ /orgx/api/live/* → Polling + SSE for real-time data │ │ │
53
63
  │ │ └────────────────────────────────┬────────────────────────────────┘ │ │
@@ -70,7 +80,7 @@ Manual API key entry is still available as a permanent fallback from the onboard
70
80
  │ └──────────────────────────────────────────────────────────────────────┘ │
71
81
  └──────────────────────────────────────────────────────────────────────────────┘
72
82
 
73
- Polling (every 8s)
83
+ SSE primary + polling fallback
74
84
 
75
85
  ┌──────────────┴───────────────┐
76
86
  │ React Dashboard │
@@ -92,7 +102,8 @@ Agent calls MCP tool (e.g. orgx_emit_activity)
92
102
  → Plugin validates + forwards to OrgX Cloud
93
103
  → Cloud persists, returns updated state
94
104
  → Plugin caches snapshot locally
95
- → Dashboard polls /orgx/api/live/sessions every 8s
105
+ → Dashboard subscribes to /orgx/api/live/stream (SSE)
106
+ → Falls back to /orgx/api/live/snapshot-v2 polling when needed
96
107
  → useLiveData hook merges + renders
97
108
 
98
109
  If cloud is unreachable:
@@ -163,7 +174,7 @@ Environment overrides:
163
174
 
164
175
  ### MCP Tools
165
176
 
166
- The plugin currently registers **27 MCP tools** from `src/tools/core-tools.ts`.
177
+ The plugin currently registers **30 MCP tools** from `src/tools/core-tools.ts`.
167
178
 
168
179
  Core sync/reporting:
169
180
  - `orgx_status`
@@ -202,6 +213,11 @@ Decision and config/policy:
202
213
  - `get_agent_config`
203
214
  - `update_agent_config`
204
215
 
216
+ Session continuity:
217
+ - `orgx_agent_sessions`
218
+ - `orgx_resume_agent_session`
219
+ - `orgx_clear_agent_session`
220
+
205
221
  The local MCP bridge endpoints are:
206
222
  - `/orgx/mcp` (full tool surface)
207
223
  - `/orgx/mcp/{domain}` (domain-scoped subset)
@@ -212,19 +228,26 @@ Access the OrgX command center at `http://127.0.0.1:18789/orgx/live` (or your ga
212
228
  The Vite dev server (`http://localhost:5173`) is only for local preview; the installed plugin runs on the OpenClaw port (18789).
213
229
 
214
230
  Shows:
215
- - Active initiatives with progress
216
- - Agent status and current tasks
217
- - Pending decisions requiring approval
218
- - Activity stream
231
+ - Mission Control hierarchy (initiative -> workstream -> milestone -> task)
232
+ - `Next Up` queue controls (play/pin/reorder/move/bulk/clear)
233
+ - `In Progress` runtime lane for active slices and agents
234
+ - Activity feed + detail modal with decision/review context
235
+ - Triage queue for blocked and needs-decision work
219
236
  - Outbox replay visibility for buffered offline events
220
237
 
221
238
  ### Auto-Continue (Scaffold to Agent Execution)
222
239
 
223
- If you scaffold an initiative from chat (for example, "plan X" and then create/scaffold), OrgX can automatically start executing the first workstream via the stream auto-continue pipeline.
240
+ If you scaffold an initiative from chat (for example, "plan X" then create/scaffold), OrgX can automatically execute queued slices through the auto-continue pipeline.
241
+
242
+ Execution behavior:
243
+ - `Play` on a `Next Up` card executes the same guarded lifecycle used by autopilot.
244
+ - `manual` automation level blocks auto-dispatch unless explicitly triggered.
245
+ - `supervised` automation level executes one slice then pauses.
246
+ - `active` automation level continues dispatch until completion, block, or explicit stop.
224
247
 
225
248
  Troubleshooting:
226
249
  - If agents do not start automatically, say: `start agents` to re-trigger dispatch.
227
- - Open the live link (Mission Control) to see stream status (`ready`, `active`, `blocked`) and any upgrade/approval decisions.
250
+ - Open Mission Control to inspect `auto-continue` status (`ready`, `active`, `blocked`) and any upgrade/approval decisions.
228
251
 
229
252
  ### Model Routing
230
253
 
@@ -269,11 +292,15 @@ The plugin starts a lightweight watchdog daemon that periodically probes the loc
269
292
  |-----------|--------|-------|
270
293
  | Browser pairing onboarding | Done | `POST /orgx/api/onboarding/start` + polling flow |
271
294
  | Manual API key fallback | Done | In onboarding gate and `manual-key` endpoint |
272
- | Live sessions + activity + handoffs | Done | SSE with local fallback paths |
295
+ | Live sessions + activity + handoffs | Done | SSE-first transport with snapshot fallback |
273
296
  | Mission Control hierarchy view | Done | Initiative -> workstream -> milestone -> task |
297
+ | Next Up -> In Progress lifecycle lanes | Done | Queue intent separated from active runtime state |
298
+ | Play + Autopilot unified contract | Done | Shared spawn-guard + decision semantics |
299
+ | Workspace-scoped mission control reads | Done | Scope-safe graph/queue/slice retrieval |
274
300
  | Run control shortcuts | Done | Pause/resume/cancel/checkpoint/rollback in Session Detail |
275
301
  | Outbox buffering + replay | Done | Local queue + auto replay on sync |
276
302
  | Outbox observability in dashboard | Done | Pending/replay indicators in header/notifications |
303
+ | Triage queue actions | Done | `GET/POST /orgx/api/live/triage*` for blocked/review items |
277
304
  | Plugin diagnostics (`doctor`) | Done | CLI + `GET /orgx/api/health` |
278
305
  | Full-auto codex dispatch | Done | `npm run job:dispatch` with retries + rollups |
279
306
 
@@ -380,22 +407,26 @@ When the plugin is loaded, these HTTP endpoints are available:
380
407
  | Endpoint | Description |
381
408
  |----------|-------------|
382
409
  | `GET /orgx/live` | Live dashboard SPA |
383
- | `GET /orgx/api/status` | Org status summary |
384
- | `GET /orgx/api/agents` | Agent states |
385
- | `GET /orgx/api/activity` | Activity feed |
386
- | `GET /orgx/api/initiatives` | Initiative data |
410
+ | `GET /orgx/api/status` | Health/status probe summary |
387
411
  | `GET /orgx/api/health` | Plugin diagnostics + outbox/sync health |
388
- | `GET /orgx/api/onboarding` | Config/setup state |
412
+ | `GET /orgx/api/onboarding` | Legacy onboarding state |
389
413
  | `POST /orgx/api/onboarding/start` | Start browser pairing flow |
390
414
  | `GET /orgx/api/onboarding/status` | Poll pairing status / auto-connect |
391
415
  | `POST /orgx/api/onboarding/manual-key` | Manual key validation and persist |
392
416
  | `POST /orgx/api/onboarding/disconnect` | Clear local plugin credential |
393
- | `GET /orgx/api/live/sessions` | Live session tree |
394
- | `GET /orgx/api/live/activity` | Live activity feed |
417
+ | `GET /orgx/api/live/snapshot-v2` | Canonical live snapshot for dashboard state |
395
418
  | `GET /orgx/api/live/stream` | Live SSE stream |
396
- | `GET /orgx/api/handoffs` | Handoff summaries |
419
+ | `GET /orgx/api/live/triage` | Blocked/review queue items |
420
+ | `POST /orgx/api/live/triage/action` | Resolve triage items (approve/reject/stop) |
421
+ | `POST /orgx/api/live/decisions/approve` | Approve/reject decisions |
422
+ | `GET /orgx/api/mission-control/graph` | Mission Control hierarchy graph |
423
+ | `GET /orgx/api/mission-control/next-up` | Next Up queue |
424
+ | `GET /orgx/api/mission-control/slices` | Slice list for mission control |
425
+ | `GET /orgx/api/mission-control/auto-continue/status` | Auto-continue runtime status |
397
426
  | `POST /orgx/mcp` | Local MCP bridge (tools/list, tools/call) |
398
427
 
428
+ Legacy compatibility endpoints such as `/orgx/api/agents`, `/orgx/api/activity`, and `/orgx/api/initiatives` return `410` with replacement routes.
429
+
399
430
  ## Contributing
400
431
 
401
432
  ### Prerequisites
@@ -452,55 +483,37 @@ npm run dev:main
452
483
 
453
484
  ```
454
485
  src/ # Plugin core (TypeScript, ES modules)
455
- index.ts # Entry point: config resolution, tool registration,
456
- # background sync, CLI commands (4.4k lines)
457
- http-handler.ts # HTTP API: 33+ routes, dashboard serving,
458
- # MCP bridge, SSE streaming (12.3k lines)
459
- contracts/
460
- client.ts # OrgXClient all cloud API calls
461
- types.ts # Shared type contracts
462
- auth-store.ts # Credential persistence (~/.orgx/plugin/auth.json)
463
- snapshot-store.ts # Cached org snapshot for offline fallback
464
- outbox.ts # Offline event queue + auto-replay
465
- activity-store.ts # Paginated activity timeline persistence
466
- agent-suite.ts # Agent provisioning (profiles, skills, managed files)
467
- agent-run-store.ts # Spawned agent run records
468
- agent-context-store.ts # Launch context for agent runs
486
+ index.ts # Plugin bootstrap + tool registration
487
+ http/
488
+ index.ts # HTTP surface composition under /orgx/api/*
489
+ router.ts # Lightweight dependency-free router
490
+ routes/ # Route modules (mission control, snapshot, onboarding, etc.)
491
+ helpers/ # Shared mission-control/autopilot/runtime helpers
492
+ tools/core-tools.ts # MCP tool registrations (30 tools)
469
493
  mcp-http-handler.ts # Local MCP bridge at /orgx/mcp
470
494
  mcp-client-setup.ts # Auto-config for Claude/Codex/Cursor
471
- gateway-watchdog.ts # Local gateway health monitor
472
- local-openclaw.ts # Fallback: read OpenClaw local state when cloud down
473
- byok-store.ts # Provider key management (OpenAI, Anthropic, etc.)
495
+ outbox.ts # Offline queue + replay
496
+ snapshot-store.ts # Cached snapshot fallback
497
+ activity-store.ts # Activity persistence
498
+ next-up-queue-store.ts # Queue ordering + pin state
474
499
  runtime-instance-store.ts # Runtime process tracking
475
- next-up-queue-store.ts # Task ordering for auto-dispatch
476
- worker-supervisor.ts # Detect failed agent handshakes
477
- skill-pack-state.ts # Skill pack download/install tracking
478
- fs-utils.ts # Atomic file writes, corruption recovery
479
- paths.ts # Config directory paths (~/.orgx/plugin/)
500
+ skill-pack-state.ts # Skill pack/policy state
480
501
 
481
502
  dashboard/ # React SPA (served at /orgx/live)
482
503
  src/
483
- App.tsx # Root component, view routing (2.3k lines)
504
+ App.tsx # Root shell and view routing
484
505
  components/
485
- activity/ # ActivityTimeline (live feed, 4.3k lines)
486
- mission-control/ # Hierarchy view: initiative -> workstream -> task
487
- sessions/ # Session inspector, agent chats
488
- decisions/ # Decision queue (approve/reject with notes)
489
- initiatives/ # Initiative detail + list
490
- artifacts/ # Artifact viewer modal
491
- agents/ # Agent panel, status indicators
492
- handoffs/ # Handoff list
506
+ mission-control/ # Queue + hierarchy + slice views
507
+ activity/ # Activity feed and detail
508
+ sessions/ # Session inspector + agent context
509
+ decisions/ # Decision and triage actions
493
510
  onboarding/ # Browser pairing gate
494
511
  settings/ # Connection, BYOK, agent suite panels
495
- shared/ # Modal, Badge, EntityIcon, MarkdownText
496
- hooks/ # 17 custom hooks
497
- useLiveData.ts # Core data hook (polling, state merge)
498
- useConnection.ts # Connection status
499
- useOnboarding.ts # Pairing flow
500
- useMissionControlGraph.ts # Hierarchy visualization
501
- useEntityMutations.ts # Entity CRUD operations
502
- lib/
503
- tokens.ts # Design tokens (lime, teal, background, etc.)
512
+ hooks/
513
+ useLiveData.ts # SSE-first data transport + polling fallback
514
+ useMissionControlGraph.ts # Hierarchy graph state
515
+ useNextUpQueue.ts # Queue operations and optimistic updates
516
+ lib/tokens.ts # Design tokens (shared UI language)
504
517
 
505
518
  scripts/ # Orchestration and QA (not shipped in package)
506
519
  run-codex-dispatch-job.mjs # Full-auto agent dispatch
@@ -508,72 +521,31 @@ scripts/ # Orchestration and QA (not shipped in package
508
521
  ship.mjs # Commit, PR, auto-merge
509
522
 
510
523
  skills/ # Agent skill packs (9 domains)
511
- tests/ # 26 test suites (Node test runner)
524
+ tests/ # Node test suites
512
525
  docs/ # ADRs, ops guides, launch plans
513
526
  ```
514
527
 
515
- ### Known Architecture Debt
516
-
517
- This is an honest accounting of where the codebase is messy. If you're looking for high-impact contributions, these are the places that need the most love.
518
-
519
- **1. God files**
520
-
521
- Three files account for most of the complexity:
522
-
523
- | File | Lines | Problem |
524
- |------|------:|---------|
525
- | `src/http-handler.ts` | 12,253 | 33 routes in one `if/else` chain inside a single 8,700-line closure. No router, no middleware, no controller separation. Business logic (auto-continue orchestration, LLM headline summarization, spawn guard enforcement) lives inline with route dispatch. |
526
- | `src/index.ts` | 4,355 | Plugin bootstrap, tool registration, config resolution, sync logic, and CLI commands all in one file. |
527
- | `dashboard/src/components/activity/ActivityTimeline.tsx` | 4,326 | Rendering, data transformation, outcome classification, and interaction logic in one component. |
528
-
529
- The HTTP handler is the worst offender. Every new endpoint means modifying a 12k-line file. A 25-line negated boolean guard (listing every known route) must be manually updated each time a route is added.
528
+ ### Architecture Notes
530
529
 
531
- **Ideal decomposition for `http-handler.ts`:**
532
- - `routes/onboarding.ts` pairing, manual key, disconnect
533
- - `routes/live.ts` sessions, activity, SSE streaming
534
- - `routes/entities.ts` CRUD, comments, artifacts
535
- - `routes/mission-control.ts` graph, next-up, auto-continue
536
- - `routes/decisions.ts` — approval queue, mutations
537
- - `routes/agents.ts` — launch, stop, suite provisioning
538
- - `routes/dashboard.ts` — SPA serving, asset caching
539
- - A thin router with route registration instead of the `if/else` cascade.
530
+ - The HTTP surface is route-modularized under `src/http/routes/*` with a lightweight in-repo router (`src/http/router.ts`).
531
+ - Live transport is SSE-first (`/orgx/api/live/stream`) with resilient polling fallback (`/orgx/api/live/snapshot-v2`).
532
+ - The plugin still keeps zero production dependencies and uses file-backed local state for portability in OpenClaw environments.
533
+ - Mission Control queue/run state is split intentionally: `Next Up` models intent and scheduling, while runtime projections drive `In Progress`.
534
+ - Local MCP bridge + client auto-configuration is now a first-class flow for Claude/Codex/Cursor (`orgx-openclaw` server entry).
540
535
 
541
- **2. State store sprawl**
542
-
543
- Eight separate file-based stores under `~/.orgx/plugin/`:
544
-
545
- ```
546
- auth-store.ts → auth.json
547
- snapshot-store.ts → snapshot.json
548
- activity-store.ts → activity pages
549
- outbox.ts → outbox/<session>.json
550
- agent-run-store.ts → agent run records
551
- agent-context-store.ts → launch context
552
- next-up-queue-store.ts → task ordering
553
- skill-pack-state.ts → skill checksums
554
- ```
555
-
556
- Each has its own read/write/corruption-recovery logic. Some overlap (outbox events become activity items; agent-run and agent-context track the same runs from different angles). A unified local store with a single persistence layer would reduce duplication.
557
-
558
- **3. Type duplication**
559
-
560
- Two separate `types.ts` files that can desync:
561
- - `src/contracts/types.ts` — cloud API contract types
562
- - `dashboard/src/types.ts` — dashboard-specific types
563
-
564
- The `LiveDecision` interface exists in the dashboard types but has no shared definition with the server. The HTTP handler manually shapes responses to match what the dashboard expects, with no compile-time guarantee they agree.
565
-
566
- **4. No routing abstraction**
567
-
568
- The HTTP handler uses raw `if (method === "POST" && route === "...")` checks. Adding a new route requires:
569
- 1. Adding a boolean variable to the route-matching block
570
- 2. Adding it to the 25-line negated guard for unknown routes
571
- 3. Adding the handler body somewhere in the 8,700-line function
572
- 4. Hoping you don't accidentally shadow another route
536
+ ### Known Architecture Debt
573
537
 
574
- **5. Dashboard polls by default**
538
+ Resolved in the recent 0.7.x cycle:
539
+ - Route decomposition is complete (moved from monolithic handler flow to `src/http/routes/*`).
540
+ - Live transport is now SSE-first with explicit snapshot fallback, instead of polling-only assumptions.
541
+ - Dashboard/server contract drift around core live entities (`LiveDecision`, `LiveActivityItem`, `SessionTree*`) is reduced via shared imports from `src/contracts/shared-types.ts`.
575
542
 
576
- SSE streaming exists (`/orgx/api/live/stream`) but the dashboard defaults to polling every 8 seconds. This works but means decisions and activity can feel delayed. The SSE path exists but isn't the primary code path.
543
+ Next highest-priority debt (in order):
544
+ 1. `dashboard/src/components/activity/ActivityTimeline.tsx` is still oversized (6k+ lines) and should be split into feature modules (timeline list, detail orchestration, artifact preview, triage actions).
545
+ 2. `src/http/index.ts` and `src/index.ts` remain large composition roots and should be further sliced into bootstrap modules (routing assembly, background services, tool registration, and compatibility shims).
546
+ 3. Route response shapes are still assembled manually in multiple places; add a single contract-normalization layer for live snapshot/mission-control/triage payloads.
547
+ 4. Local store behavior is standardized, but domain stores still duplicate reconciliation logic; centralize replay/merge semantics for outbox, activity, and runtime projections.
548
+ 5. Add deeper integration tests around SSE reconnect + snapshot fallback and workspace-scoped mission-control queues to prevent regressions in queue/run separation.
577
549
 
578
550
  ### Design Decisions (Why Things Are This Way)
579
551
 
@@ -587,10 +559,10 @@ Not all of the above is accidental. Some context for why the architecture looks
587
559
 
588
560
  ### What Makes a Good Contribution
589
561
 
590
- - **Splitting `http-handler.ts`** into route modules would be the single highest-impact refactor. Even extracting one domain (e.g., onboarding routes) into its own file would be a great start.
591
- - **Dashboard component extraction** — breaking `ActivityTimeline.tsx` into smaller components (OutcomeCard, ActivityItem, FilterBar) would make it approachable.
592
- - **Shared types** — creating a shared `types/` directory that both `src/` and `dashboard/src/` import from would catch desync bugs at compile time.
593
- - **Bug fixes and UX improvements** to the dashboard are always welcome. The design language is in `dashboard/src/lib/tokens.ts`.
562
+ - **Keep route contracts explicit** update route modules and their tests together (especially mission-control and snapshot responses).
563
+ - **Improve queue/run UX clarity** — preserve the `Next Up` vs `In Progress` separation and keep triage/activity states actionable.
564
+ - **Strengthen shared contracts** — when changing response shapes, update both server and dashboard type usage in the same PR.
565
+ - **Dashboard polish with restraint** follow `dashboard/src/lib/tokens.ts` and existing interaction patterns.
594
566
 
595
567
  ### Code Conventions
596
568