forge-openclaw-plugin 0.3.15 → 0.3.17

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 (415) hide show
  1. package/README.md +6 -6
  2. package/dist/assets/{action-bar-B9MYlps2.js → action-bar-D3CEYlj4.js} +1 -1
  3. package/dist/assets/{activity-page-DbzbChcE.js → activity-page-Ce1pHIu5.js} +1 -1
  4. package/dist/assets/{ai-surface-workspace-CF0257Hs.js → ai-surface-workspace-DEliwOjF.js} +1 -1
  5. package/dist/assets/artifacts-page-BgyFVIVM.js +2 -0
  6. package/dist/assets/{atlas-panel-CO3RYAKn.js → atlas-panel-VZOnJa1c.js} +1 -1
  7. package/dist/assets/{board-CuxQRKPJ.js → board-DprRipIG.js} +1 -1
  8. package/dist/assets/{calendar-page-BuuHKEHC.js → calendar-page-Zstsn4uG.js} +1 -1
  9. package/dist/assets/{calendar-rules-DKftgNx5.js → calendar-rules-BGIBuEDk.js} +1 -1
  10. package/dist/assets/{calendar-week-toolbar-ChIpkT-G.js → calendar-week-toolbar-DXFkMkbq.js} +1 -1
  11. package/dist/assets/{charts-BzT4pUPg.js → charts-C5S0-BL7.js} +1 -1
  12. package/dist/assets/{companion-sync-lab-page-BZRX4Btw.js → companion-sync-lab-page-DIPPLFKt.js} +1 -1
  13. package/dist/assets/{daily-metrics-dashboard-CXDsaAQd.js → daily-metrics-dashboard-CG-OOCJz.js} +1 -1
  14. package/dist/assets/{define-workbench-box-CpG0Zb1L.js → define-workbench-box-BEEdtBkQ.js} +1 -1
  15. package/dist/assets/{entity-link-multiselect-Dl4rZqdg.js → entity-link-multiselect-BfDAROHB.js} +1 -1
  16. package/dist/assets/{entity-note-count-link-Bs1aKYyD.js → entity-note-count-link-BGOiaash.js} +1 -1
  17. package/dist/assets/{entity-notes-surface-B56XSw7M.js → entity-notes-surface-DPsJwqQa.js} +1 -1
  18. package/dist/assets/execution-board-Dg-2GSKv.js +1 -0
  19. package/dist/assets/{faceted-token-search-Dg2rjknH.js → faceted-token-search-DV7MSVYb.js} +1 -1
  20. package/dist/assets/{flagship-signal-deck-C6KVPhmM.js → flagship-signal-deck-D3wVL3bC.js} +1 -1
  21. package/dist/assets/{floating-action-menu-DAFAEBcA.js → floating-action-menu-BUs382px.js} +1 -1
  22. package/dist/assets/{forms-D1qJ3oOP.js → forms-ByKjodjN.js} +1 -1
  23. package/dist/assets/{generic-node-view-C6DK5hJ6.js → generic-node-view-BY5dbPXJ.js} +1 -1
  24. package/dist/assets/{goal-detail-page-CC4VXud6.js → goal-detail-page-MYr6j2B4.js} +1 -1
  25. package/dist/assets/{goal-dialog-15hD8EBp.js → goal-dialog-nkdME5Uy.js} +1 -1
  26. package/dist/assets/goals-page-BsFeBzU1.js +1 -0
  27. package/dist/assets/{graph-BF4IsheG.js → graph-CHVj0Z7n.js} +1 -1
  28. package/dist/assets/habits-page-wO461EVU.js +1 -0
  29. package/dist/assets/{health-boxes-DqgvIYoL.js → health-boxes-BphMeSJj.js} +1 -1
  30. package/dist/assets/index-CSd8ylsy.css +1 -0
  31. package/dist/assets/index-gmPaoLN-.js +2 -0
  32. package/dist/assets/{inline-note-fields-COgzxr_7.js → inline-note-fields-BvQwmMAv.js} +1 -1
  33. package/dist/assets/{insight-flow-dialog-Dmb6NSGp.js → insight-flow-dialog-H_eaOmst.js} +1 -1
  34. package/dist/assets/{insights-page-OnqR4cYI.js → insights-page-DINYe3cB.js} +3 -3
  35. package/dist/assets/{kanban-boxes-BWUzntCV.js → kanban-boxes-oACOTDYG.js} +1 -1
  36. package/dist/assets/{kanban-page-BI16Gzp_.js → kanban-page-BGLXH91f.js} +1 -1
  37. package/dist/assets/knowledge-graph-page-VfMvw5jL.js +1 -0
  38. package/dist/assets/{life-force-page-CDEXEQai.js → life-force-page-DQPb6UL-.js} +1 -1
  39. package/dist/assets/{life-force-workspace-C7UOnJEf.js → life-force-workspace-BJ1aI3JE.js} +1 -1
  40. package/dist/assets/{maps-BTVHALP8.js → maps-CvEHVkBk.js} +1 -1
  41. package/dist/assets/{metric-tile-boeHB1R1.js → metric-tile-CbEe19Gd.js} +1 -1
  42. package/dist/assets/{motion-DcgUnXhY.js → motion-BibSzp57.js} +1 -1
  43. package/dist/assets/{movement-boxes-BUSqaTL2.js → movement-boxes-dtDYhw5c.js} +1 -1
  44. package/dist/assets/{movement-page-DcbO0497.js → movement-page-BhmwCHjs.js} +1 -1
  45. package/dist/assets/{note-markdown-DXXI3W3V.js → note-markdown-CG8u2d6p.js} +1 -1
  46. package/dist/assets/{note-tags-input-CYh3TVW2.js → note-tags-input-D_conqDO.js} +1 -1
  47. package/dist/assets/{notes-boxes-CMJXX2K0.js → notes-boxes-BLKucFqW.js} +1 -1
  48. package/dist/assets/notes-page-CafVxWjb.js +1 -0
  49. package/dist/assets/{open-in-graph-button-4UYrp1XP.js → open-in-graph-button-DFQ4r6SN.js} +1 -1
  50. package/dist/assets/{orbit-map-BwK7sDaC.js → orbit-map-DsEl3ori.js} +1 -1
  51. package/dist/assets/overview-page-BffcX-pM.js +1 -0
  52. package/dist/assets/page-hero-U603l9rQ.js +1 -0
  53. package/dist/assets/pill-cluster-BYVFNppV.js +1 -0
  54. package/dist/assets/{preference-entity-handoff-button-C2ATjvws.js → preference-entity-handoff-button-cPrTpHsV.js} +1 -1
  55. package/dist/assets/{preferences-page-BAexXHye.js → preferences-page-DQjFIOmt.js} +1 -1
  56. package/dist/assets/{project-collections-B9nr-Ts-.js → project-collections-B9OGHGqm.js} +1 -1
  57. package/dist/assets/project-detail-page-r1Sw2kcO.js +1 -0
  58. package/dist/assets/{project-dialog-CBA-D65n.js → project-dialog-B2_PcXAf.js} +1 -1
  59. package/dist/assets/project-management-hierarchy-page-qLNG8hsh.js +1 -0
  60. package/dist/assets/{project-management-section-nav-DJ3QKCtr.js → project-management-section-nav-DFUlmMEB.js} +1 -1
  61. package/dist/assets/{projects-boxes-iBu_PRqe.js → projects-boxes-BA7_XaqX.js} +1 -1
  62. package/dist/assets/projects-page-B6ggXWFw.js +1 -0
  63. package/dist/assets/psyche-behaviors-page-ByWpXlLq.js +5 -0
  64. package/dist/assets/{psyche-flashcards-page-DQaw_vUQ.js → psyche-flashcards-page-B9nSc0mk.js} +1 -1
  65. package/dist/assets/{psyche-goal-map-page-C-ZTVOEP.js → psyche-goal-map-page-BQU7qI88.js} +1 -1
  66. package/dist/assets/{psyche-graph-DYzeClxn.js → psyche-graph-DCeP7r2b.js} +1 -1
  67. package/dist/assets/{psyche-metrics-page-C9hKn10A.js → psyche-metrics-page-DD2lOP-J.js} +1 -1
  68. package/dist/assets/psyche-mode-guide-page-DbtZgnjr.js +1 -0
  69. package/dist/assets/psyche-modes-page-3zFJWFQf.js +1 -0
  70. package/dist/assets/psyche-page-D5vXYkfB.js +1 -0
  71. package/dist/assets/psyche-patterns-page-BneAAeKS.js +5 -0
  72. package/dist/assets/{psyche-questionnaire-builder-page-gRwdGXde.js → psyche-questionnaire-builder-page-BH1la5C9.js} +1 -1
  73. package/dist/assets/{psyche-questionnaire-detail-page-CIP9b2UI.js → psyche-questionnaire-detail-page-DYav634P.js} +1 -1
  74. package/dist/assets/psyche-questionnaire-run-detail-page-9VaijhJm.js +1 -0
  75. package/dist/assets/{psyche-questionnaire-run-page-CXiJyd5i.js → psyche-questionnaire-run-page-e1T6k_dS.js} +1 -1
  76. package/dist/assets/{psyche-questionnaires-page-CFPKwA3O.js → psyche-questionnaires-page-Dyv367z9.js} +1 -1
  77. package/dist/assets/{psyche-report-detail-page-dU30a2WE.js → psyche-report-detail-page-hqxHIXw2.js} +3 -3
  78. package/dist/assets/psyche-reports-page-DhIfcGbt.js +1 -0
  79. package/dist/assets/{psyche-schemas-DDol0j-g.js → psyche-schemas-Cg51Ztxz.js} +1 -1
  80. package/dist/assets/psyche-schemas-beliefs-page-Dgb5o9vx.js +9 -0
  81. package/dist/assets/{psyche-screen-time-page-lIe6GQxJ.js → psyche-screen-time-page-D6MnJGNa.js} +1 -1
  82. package/dist/assets/{psyche-self-observation-page-BTE3KfIl.js → psyche-self-observation-page-C1Vyezbv.js} +1 -1
  83. package/dist/assets/{psyche-values-page-DclBZ9xw.js → psyche-values-page-B_JWVw1Q.js} +2 -2
  84. package/dist/assets/{question-flow-dialog-Ded2E85L.js → question-flow-dialog-yMYVk998.js} +2 -2
  85. package/dist/assets/{report-chain-fields-DY640iqL.js → report-chain-fields-D4NM9a6I.js} +1 -1
  86. package/dist/assets/rewards-page-B5-bcL4R.js +1 -0
  87. package/dist/assets/{scheduling-rules-editor-jakFfxqF.js → scheduling-rules-editor-De72IUax.js} +1 -1
  88. package/dist/assets/{schema-badge-30B5syHA.js → schema-badge-jX28kUa6.js} +1 -1
  89. package/dist/assets/{schemas-Db29G8NU.js → schemas-BlFy-uPR.js} +1 -1
  90. package/dist/assets/{select-menu-BF2zI3RW.js → select-menu-BXv1rsVc.js} +1 -1
  91. package/dist/assets/{settings-agents-page-Bh-Bv6FQ.js → settings-agents-page-DN_np10S.js} +1 -1
  92. package/dist/assets/settings-bin-page-BM5BpK_i.js +1 -0
  93. package/dist/assets/{settings-calendar-page-BA4_Qqiu.js → settings-calendar-page-Cg0gSSFs.js} +3 -3
  94. package/dist/assets/{settings-data-page-K4kpmQJY.js → settings-data-page-Dwmp2rLy.js} +1 -1
  95. package/dist/assets/{settings-logs-page-DkuNPAZo.js → settings-logs-page-DQNM21Re.js} +1 -1
  96. package/dist/assets/{settings-mobile-page-4pCNwD91.js → settings-mobile-page-DQdiRa-a.js} +1 -1
  97. package/dist/assets/settings-models-page-CAEPpuHF.js +1 -0
  98. package/dist/assets/{settings-page-B_Be0vOY.js → settings-page-Cl2KiCFg.js} +1 -1
  99. package/dist/assets/{settings-rewards-page-C6nFTWJu.js → settings-rewards-page-DoIUumhe.js} +1 -1
  100. package/dist/assets/{settings-section-nav-Lo-VKCfZ.js → settings-section-nav-D_N87IG0.js} +1 -1
  101. package/dist/assets/{settings-users-page-CVzNp4-m.js → settings-users-page-CPesR62N.js} +1 -1
  102. package/dist/assets/{settings-wiki-page-DXM--7BB.js → settings-wiki-page-BxMQM5Vi.js} +1 -1
  103. package/dist/assets/{sleep-page-DvPdZMKx.js → sleep-page-DUYmQKrg.js} +1 -1
  104. package/dist/assets/{sports-page-DjuZlOur.js → sports-page-Bzi5TF9T.js} +1 -1
  105. package/dist/assets/{state-Bpe5dF3T.js → state-BFyKSULP.js} +1 -1
  106. package/dist/assets/{strategies-page-PE1IlatS.js → strategies-page-C-T2MZx4.js} +1 -1
  107. package/dist/assets/{strategy-detail-page-C4KiEGCI.js → strategy-detail-page-3tYuSZu-.js} +1 -1
  108. package/dist/assets/{strategy-dialog-Cwf7Y3P5.js → strategy-dialog-BWm4slo4.js} +1 -1
  109. package/dist/assets/{surface-ubuOfukq.js → surface-BJObZeRw.js} +1 -1
  110. package/dist/assets/{table-U7otr5go.js → table-CTLroJKN.js} +1 -1
  111. package/dist/assets/task-detail-page-ZZOXSpSF.js +1 -0
  112. package/dist/assets/{task-dialog-CI_Fy_FW.js → task-dialog-2wy0xI7f.js} +5 -5
  113. package/dist/assets/timebox-planning-dialog-C6h0Hp71.js +1 -0
  114. package/dist/assets/{today-boxes-CYuxSkZf.js → today-boxes-B_TdgSDz.js} +1 -1
  115. package/dist/assets/today-page-Dipns9tl.js +1 -0
  116. package/dist/assets/training-load-page-B78e1-o-.js +1 -0
  117. package/dist/assets/{ui-B9TWEtCx.js → ui-uo_bNP7c.js} +1 -1
  118. package/dist/assets/{use-anchored-overlay-position-BY4kNzPj.js → use-anchored-overlay-position-BSxFX6Hi.js} +1 -1
  119. package/dist/assets/{use-psyche-focus-target-BhNedCZB.js → use-psyche-focus-target-1GLkhYiv.js} +1 -1
  120. package/dist/assets/{user-badge-ByhC6bMU.js → user-badge-C4eZu1e_.js} +1 -1
  121. package/dist/assets/{user-select-field-fx129Uh6.js → user-select-field-CmKwcbZt.js} +1 -1
  122. package/dist/assets/{utility-widgets-ilORjDmg.js → utility-widgets-B06wQFrd.js} +2 -2
  123. package/dist/assets/{vendor-BwL6m4SE.js → vendor-B7FKSwHK.js} +222 -212
  124. package/dist/assets/{vitals-page-mdEqIm_9.js → vitals-page-BC7QFsm2.js} +1 -1
  125. package/dist/assets/{weekly-review-page-C8W-yg5r.js → weekly-review-page-BjNsNoWj.js} +1 -1
  126. package/dist/assets/{weight-loss-page-BApTknCn.js → weight-loss-page-BOahGY9r.js} +1 -1
  127. package/dist/assets/{wiki-article-markdown-DBccllQg.js → wiki-article-markdown-DO47HnZf.js} +2 -2
  128. package/dist/assets/{wiki-editor-page-BfRfH1O3.js → wiki-editor-page-OWRUHl4O.js} +5 -5
  129. package/dist/assets/{wiki-ingest-history-page-C-6H3MU6.js → wiki-ingest-history-page-CuHpg2lZ.js} +1 -1
  130. package/dist/assets/{wiki-ingest-modal-DnlhByD_.js → wiki-ingest-modal-EZ3kX-vA.js} +1 -1
  131. package/dist/assets/wiki-page-BPV3HIgu.js +1 -0
  132. package/dist/assets/{workbench-flow-page-_-NKIx5R.js → workbench-flow-page-C53KueEz.js} +3 -3
  133. package/dist/assets/{workbench-page-NIAzggwX.js → workbench-page-DJ7nT2JQ.js} +1 -1
  134. package/dist/assets/workout-detail-page-Dhyu0q7o.js +2 -0
  135. package/dist/index.html +8 -8
  136. package/dist/openclaw/api-client.js +28 -2
  137. package/dist/openclaw/local-runtime.js +31 -14
  138. package/dist/openclaw/parity.d.ts +1 -1
  139. package/dist/openclaw/parity.js +10 -0
  140. package/dist/openclaw/routes.js +78 -0
  141. package/dist/openclaw/tools.js +42 -0
  142. package/dist/server/apps/api/migrations/072_artifact_store.sql +106 -0
  143. package/dist/server/{server → apps/api}/src/app.js +365 -4
  144. package/dist/server/{server → apps/api}/src/connectors/box-registry.js +3 -3
  145. package/dist/server/{server → apps/api}/src/db.js +23 -4
  146. package/dist/server/{server → apps/api}/src/health-weight-loss.js +1 -1
  147. package/dist/server/{server → apps/api}/src/openapi.js +570 -1
  148. package/dist/server/{server → apps/api}/src/questionnaire-seeds.js +1 -1
  149. package/dist/server/{server → apps/api}/src/repositories/ai-connectors.js +1 -1
  150. package/dist/server/apps/api/src/repositories/entity-links.js +66 -0
  151. package/dist/server/{server → apps/api}/src/repositories/habits.js +1 -1
  152. package/dist/server/apps/api/src/services/artifacts.js +1059 -0
  153. package/dist/server/{server → apps/api}/src/services/companion-iroh.js +4 -1
  154. package/dist/server/{server → apps/api}/src/services/doctor.js +3 -3
  155. package/dist/server/{server → apps/api}/src/services/entity-crud.js +22 -0
  156. package/dist/server/{server → apps/api}/src/services/gamification-assets.js +1 -1
  157. package/dist/server/{server → apps/api}/src/services/gamification.js +1 -1
  158. package/dist/server/{server → apps/api}/src/services/knowledge-graph.js +48 -3
  159. package/dist/server/{server → apps/api}/src/services/psyche-observation-calendar.js +1 -0
  160. package/dist/server/{server → apps/api}/src/types.js +4 -2
  161. package/dist/server/{server → apps/api}/src/watch-mobile.js +1 -1
  162. package/dist/server/{src → apps/web/src}/lib/api.js +69 -0
  163. package/dist/server/{src → apps/web/src}/lib/entity-visuals.js +10 -1
  164. package/dist/server/{src → apps/web/src}/lib/knowledge-graph-types.js +9 -0
  165. package/openclaw.plugin.json +2 -1
  166. package/package.json +3 -3
  167. package/server/index.js +3 -3
  168. package/server/migrations/072_artifact_store.sql +106 -0
  169. package/skills/forge-openclaw/SKILL.md +60 -7
  170. package/skills/forge-openclaw/entity_conversation_playbooks.md +212 -14
  171. package/skills/forge-openclaw/psyche_entity_playbooks.md +20 -0
  172. package/dist/assets/execution-board-D66C_ikW.js +0 -1
  173. package/dist/assets/goals-page-CQ2lJMzI.js +0 -1
  174. package/dist/assets/habits-page-a7KVPaQp.js +0 -1
  175. package/dist/assets/index-ClJbJhca.css +0 -1
  176. package/dist/assets/index-FpGANF9S.js +0 -2
  177. package/dist/assets/knowledge-graph-page-DxEBaEke.js +0 -1
  178. package/dist/assets/notes-page-DvHMcQey.js +0 -1
  179. package/dist/assets/overview-page-Z5vaUTm3.js +0 -1
  180. package/dist/assets/page-hero-DvrM83_C.js +0 -1
  181. package/dist/assets/pill-cluster-DYI3Ibj8.js +0 -1
  182. package/dist/assets/project-detail-page-B9PqyPu9.js +0 -1
  183. package/dist/assets/project-management-hierarchy-page-DXK14jn0.js +0 -1
  184. package/dist/assets/projects-page-CdAk-ByT.js +0 -1
  185. package/dist/assets/psyche-behaviors-page-CbhhTfU2.js +0 -5
  186. package/dist/assets/psyche-mode-guide-page-CR8e984W.js +0 -1
  187. package/dist/assets/psyche-modes-page-lQdpAcY3.js +0 -1
  188. package/dist/assets/psyche-page-CTdIDkw9.js +0 -1
  189. package/dist/assets/psyche-patterns-page-Drgm-f7I.js +0 -5
  190. package/dist/assets/psyche-questionnaire-run-detail-page-SYndwtF3.js +0 -1
  191. package/dist/assets/psyche-reports-page-Cn0EBndy.js +0 -1
  192. package/dist/assets/psyche-schemas-beliefs-page-Bab4xSWv.js +0 -9
  193. package/dist/assets/rewards-page-FxUXB76B.js +0 -1
  194. package/dist/assets/settings-bin-page-DT8JJero.js +0 -1
  195. package/dist/assets/settings-models-page-CZHG3t7W.js +0 -1
  196. package/dist/assets/task-detail-page-B3SMFZQ3.js +0 -1
  197. package/dist/assets/timebox-planning-dialog-BtFuVoA1.js +0 -1
  198. package/dist/assets/today-page-CHGpLEZ3.js +0 -1
  199. package/dist/assets/training-load-page-GZJF-Yy5.js +0 -1
  200. package/dist/assets/wiki-page-DPZ55e3x.js +0 -1
  201. package/dist/assets/workout-detail-page-3fxr6HL4.js +0 -2
  202. /package/dist/server/{server → apps/api}/migrations/001_core.sql +0 -0
  203. /package/dist/server/{server → apps/api}/migrations/002_psyche.sql +0 -0
  204. /package/dist/server/{server → apps/api}/migrations/003_habits.sql +0 -0
  205. /package/dist/server/{server → apps/api}/migrations/004_habit_links.sql +0 -0
  206. /package/dist/server/{server → apps/api}/migrations/005_habit_psyche_links.sql +0 -0
  207. /package/dist/server/{server → apps/api}/migrations/006_work_adjustments.sql +0 -0
  208. /package/dist/server/{server → apps/api}/migrations/007_weekly_review_closures.sql +0 -0
  209. /package/dist/server/{server → apps/api}/migrations/008_calendar_execution.sql +0 -0
  210. /package/dist/server/{server → apps/api}/migrations/009_true_calendar_events.sql +0 -0
  211. /package/dist/server/{server → apps/api}/migrations/010_calendar_selection_state.sql +0 -0
  212. /package/dist/server/{server → apps/api}/migrations/011_calendar_timezone_backfill.sql +0 -0
  213. /package/dist/server/{server → apps/api}/migrations/012_work_block_ranges.sql +0 -0
  214. /package/dist/server/{server → apps/api}/migrations/013_microsoft_local_auth_settings.sql +0 -0
  215. /package/dist/server/{server → apps/api}/migrations/014_note_tags_and_ephemeral.sql +0 -0
  216. /package/dist/server/{server → apps/api}/migrations/015_multi_user_and_strategies.sql +0 -0
  217. /package/dist/server/{server → apps/api}/migrations/016_health_companion.sql +0 -0
  218. /package/dist/server/{server → apps/api}/migrations/016_strategy_contracts_and_user_graph.sql +0 -0
  219. /package/dist/server/{server → apps/api}/migrations/017_preferences.sql +0 -0
  220. /package/dist/server/{server → apps/api}/migrations/018_preference_catalogs.sql +0 -0
  221. /package/dist/server/{server → apps/api}/migrations/019_wiki_memory.sql +0 -0
  222. /package/dist/server/{server → apps/api}/migrations/020_wiki_page_hierarchy.sql +0 -0
  223. /package/dist/server/{server → apps/api}/migrations/021_hide_evidence_from_wiki_index.sql +0 -0
  224. /package/dist/server/{server → apps/api}/migrations/022_wiki_ingest_background.sql +0 -0
  225. /package/dist/server/{server → apps/api}/migrations/023_diagnostic_logs.sql +0 -0
  226. /package/dist/server/{server → apps/api}/migrations/024_questionnaires.sql +0 -0
  227. /package/dist/server/{server → apps/api}/migrations/025_ai_model_connections.sql +0 -0
  228. /package/dist/server/{server → apps/api}/migrations/026_custom_theme_settings.sql +0 -0
  229. /package/dist/server/{server → apps/api}/migrations/027_ai_processors.sql +0 -0
  230. /package/dist/server/{server → apps/api}/migrations/028_movement_domain.sql +0 -0
  231. /package/dist/server/{server → apps/api}/migrations/029_watch_micro_capture.sql +0 -0
  232. /package/dist/server/{server → apps/api}/migrations/030_surface_layouts.sql +0 -0
  233. /package/dist/server/{server → apps/api}/migrations/031_ai_processor_runtime_upgrades.sql +0 -0
  234. /package/dist/server/{server → apps/api}/migrations/032_ai_connectors.sql +0 -0
  235. /package/dist/server/{server → apps/api}/migrations/033_movement_trip_point_sync.sql +0 -0
  236. /package/dist/server/{server → apps/api}/migrations/034_movement_segment_sync.sql +0 -0
  237. /package/dist/server/{server → apps/api}/migrations/035_google_local_auth_settings.sql +0 -0
  238. /package/dist/server/{server → apps/api}/migrations/036_google_local_auth_client_secret.sql +0 -0
  239. /package/dist/server/{server → apps/api}/migrations/037_workbench_public_inputs_and_run_inputs.sql +0 -0
  240. /package/dist/server/{server → apps/api}/migrations/038_data_management_settings.sql +0 -0
  241. /package/dist/server/{server → apps/api}/migrations/039_life_force_and_action_points.sql +0 -0
  242. /package/dist/server/{server → apps/api}/migrations/040_screen_time_domain.sql +0 -0
  243. /package/dist/server/{server → apps/api}/migrations/041_companion_source_states.sql +0 -0
  244. /package/dist/server/{server → apps/api}/migrations/042_movement_boxes.sql +0 -0
  245. /package/dist/server/{server → apps/api}/migrations/043_movement_box_overlap_overrides.sql +0 -0
  246. /package/dist/server/{server → apps/api}/migrations/044_macos_local_calendar_provider.sql +0 -0
  247. /package/dist/server/{server → apps/api}/migrations/045_sleep_nights_and_raw_segments.sql +0 -0
  248. /package/dist/server/{server → apps/api}/migrations/046_work_item_hierarchy.sql +0 -0
  249. /package/dist/server/{server → apps/api}/migrations/047_sleep_source_records.sql +0 -0
  250. /package/dist/server/{server → apps/api}/migrations/048_task_run_git_context.sql +0 -0
  251. /package/dist/server/{server → apps/api}/migrations/049_agent_runtime_sessions.sql +0 -0
  252. /package/dist/server/{server → apps/api}/migrations/050_agent_token_bootstrap_policy.sql +0 -0
  253. /package/dist/server/{server → apps/api}/migrations/051_agent_token_scope_policy.sql +0 -0
  254. /package/dist/server/{server → apps/api}/migrations/052_agent_identity_tightening.sql +0 -0
  255. /package/dist/server/{server → apps/api}/migrations/053_agent_runtime_session_canonical_labels.sql +0 -0
  256. /package/dist/server/{server → apps/api}/migrations/054_sqlite_backed_wiki_memory.sql +0 -0
  257. /package/dist/server/{server → apps/api}/migrations/055_gamification_progression.sql +0 -0
  258. /package/dist/server/{server → apps/api}/migrations/056_gamification_equipment.sql +0 -0
  259. /package/dist/server/{server → apps/api}/migrations/057_gamification_catalog_cleanup.sql +0 -0
  260. /package/dist/server/{server → apps/api}/migrations/058_gamification_theme_preference.sql +0 -0
  261. /package/dist/server/{server → apps/api}/migrations/059_data_backup_retention.sql +0 -0
  262. /package/dist/server/{server → apps/api}/migrations/060_psyche_devrage_metrics.sql +0 -0
  263. /package/dist/server/{server → apps/api}/migrations/061_health_workout_raw_evidence.sql +0 -0
  264. /package/dist/server/{server → apps/api}/migrations/062_health_mobile_sync_sessions.sql +0 -0
  265. /package/dist/server/{server → apps/api}/migrations/063_psyche_flashcards.sql +0 -0
  266. /package/dist/server/{server → apps/api}/migrations/064_health_workout_time_series_identity.sql +0 -0
  267. /package/dist/server/{server → apps/api}/migrations/065_weight_loss_nutrition_insights.sql +0 -0
  268. /package/dist/server/{server → apps/api}/migrations/066_watch_action_receipts.sql +0 -0
  269. /package/dist/server/{server → apps/api}/migrations/067_weight_loss_daily_active_overrides.sql +0 -0
  270. /package/dist/server/{server → apps/api}/migrations/068_remove_generated_movement_wiki_logs.sql +0 -0
  271. /package/dist/server/{server → apps/api}/migrations/069_psyche_devrage_cumulative_rage.sql +0 -0
  272. /package/dist/server/{server → apps/api}/migrations/070_health_mobile_sync_completion_index.sql +0 -0
  273. /package/dist/server/{server → apps/api}/migrations/071_agent_runtime_claude_identity.sql +0 -0
  274. /package/dist/server/{server → apps/api}/src/data-management-types.js +0 -0
  275. /package/dist/server/{server → apps/api}/src/debug.js +0 -0
  276. /package/dist/server/{server → apps/api}/src/demo-data.js +0 -0
  277. /package/dist/server/{server → apps/api}/src/discovery-advertiser.js +0 -0
  278. /package/dist/server/{server → apps/api}/src/e2e-server.js +0 -0
  279. /package/dist/server/{server → apps/api}/src/errors.js +0 -0
  280. /package/dist/server/{server → apps/api}/src/health-workout-adapters.js +0 -0
  281. /package/dist/server/{server → apps/api}/src/health-workout-analytics.js +0 -0
  282. /package/dist/server/{server → apps/api}/src/health.js +0 -0
  283. /package/dist/server/{server → apps/api}/src/index.js +0 -0
  284. /package/dist/server/{server → apps/api}/src/managers/base.js +0 -0
  285. /package/dist/server/{server → apps/api}/src/managers/contracts.js +0 -0
  286. /package/dist/server/{server → apps/api}/src/managers/platform/api-gateway-manager.js +0 -0
  287. /package/dist/server/{server → apps/api}/src/managers/platform/audit-manager.js +0 -0
  288. /package/dist/server/{server → apps/api}/src/managers/platform/authentication-manager.js +0 -0
  289. /package/dist/server/{server → apps/api}/src/managers/platform/authorization-manager.js +0 -0
  290. /package/dist/server/{server → apps/api}/src/managers/platform/background-job-manager.js +0 -0
  291. /package/dist/server/{server → apps/api}/src/managers/platform/configuration-manager.js +0 -0
  292. /package/dist/server/{server → apps/api}/src/managers/platform/database-manager.js +0 -0
  293. /package/dist/server/{server → apps/api}/src/managers/platform/event-bus-manager.js +0 -0
  294. /package/dist/server/{server → apps/api}/src/managers/platform/external-service-manager.js +0 -0
  295. /package/dist/server/{server → apps/api}/src/managers/platform/health-manager.js +0 -0
  296. /package/dist/server/{server → apps/api}/src/managers/platform/llm-manager.js +0 -0
  297. /package/dist/server/{server → apps/api}/src/managers/platform/migration-manager.js +0 -0
  298. /package/dist/server/{server → apps/api}/src/managers/platform/mock-workbench-provider.js +0 -0
  299. /package/dist/server/{server → apps/api}/src/managers/platform/openai-responses-provider.js +0 -0
  300. /package/dist/server/{server → apps/api}/src/managers/platform/search-index-manager.js +0 -0
  301. /package/dist/server/{server → apps/api}/src/managers/platform/secrets-manager.js +0 -0
  302. /package/dist/server/{server → apps/api}/src/managers/platform/session-manager.js +0 -0
  303. /package/dist/server/{server → apps/api}/src/managers/platform/storage-manager.js +0 -0
  304. /package/dist/server/{server → apps/api}/src/managers/platform/token-manager.js +0 -0
  305. /package/dist/server/{server → apps/api}/src/managers/platform/transaction-manager.js +0 -0
  306. /package/dist/server/{server → apps/api}/src/managers/platform/trusted-network.js +0 -0
  307. /package/dist/server/{server → apps/api}/src/managers/runtime.js +0 -0
  308. /package/dist/server/{server → apps/api}/src/managers/type-guards.js +0 -0
  309. /package/dist/server/{server → apps/api}/src/movement.js +0 -0
  310. /package/dist/server/{server → apps/api}/src/preferences-seeds.js +0 -0
  311. /package/dist/server/{server → apps/api}/src/preferences-types.js +0 -0
  312. /package/dist/server/{server → apps/api}/src/psyche-types.js +0 -0
  313. /package/dist/server/{server → apps/api}/src/questionnaire-flow.js +0 -0
  314. /package/dist/server/{server → apps/api}/src/questionnaire-types.js +0 -0
  315. /package/dist/server/{server → apps/api}/src/repositories/activity-events.js +0 -0
  316. /package/dist/server/{server → apps/api}/src/repositories/agent-runtime-sessions.js +0 -0
  317. /package/dist/server/{server → apps/api}/src/repositories/ai-processors.js +0 -0
  318. /package/dist/server/{server → apps/api}/src/repositories/calendar.js +0 -0
  319. /package/dist/server/{server → apps/api}/src/repositories/collaboration.js +0 -0
  320. /package/dist/server/{server → apps/api}/src/repositories/deleted-entities.js +0 -0
  321. /package/dist/server/{server → apps/api}/src/repositories/diagnostic-logs.js +0 -0
  322. /package/dist/server/{server → apps/api}/src/repositories/domains.js +0 -0
  323. /package/dist/server/{server → apps/api}/src/repositories/entity-ownership.js +0 -0
  324. /package/dist/server/{server → apps/api}/src/repositories/event-log.js +0 -0
  325. /package/dist/server/{server → apps/api}/src/repositories/gamification.js +0 -0
  326. /package/dist/server/{server → apps/api}/src/repositories/goals.js +0 -0
  327. /package/dist/server/{server → apps/api}/src/repositories/model-settings.js +0 -0
  328. /package/dist/server/{server → apps/api}/src/repositories/notes.js +0 -0
  329. /package/dist/server/{server → apps/api}/src/repositories/preferences.js +0 -0
  330. /package/dist/server/{server → apps/api}/src/repositories/projects.js +0 -0
  331. /package/dist/server/{server → apps/api}/src/repositories/psyche.js +0 -0
  332. /package/dist/server/{server → apps/api}/src/repositories/questionnaires.js +0 -0
  333. /package/dist/server/{server → apps/api}/src/repositories/rewards.js +0 -0
  334. /package/dist/server/{server → apps/api}/src/repositories/settings.js +0 -0
  335. /package/dist/server/{server → apps/api}/src/repositories/strategies.js +0 -0
  336. /package/dist/server/{server → apps/api}/src/repositories/surface-layouts.js +0 -0
  337. /package/dist/server/{server → apps/api}/src/repositories/tags.js +0 -0
  338. /package/dist/server/{server → apps/api}/src/repositories/task-runs.js +0 -0
  339. /package/dist/server/{server → apps/api}/src/repositories/tasks.js +0 -0
  340. /package/dist/server/{server → apps/api}/src/repositories/users.js +0 -0
  341. /package/dist/server/{server → apps/api}/src/repositories/weekly-reviews.js +0 -0
  342. /package/dist/server/{server → apps/api}/src/repositories/wiki-memory.js +0 -0
  343. /package/dist/server/{server → apps/api}/src/repositories/work-adjustments.js +0 -0
  344. /package/dist/server/{server → apps/api}/src/runtime-data-root.js +0 -0
  345. /package/dist/server/{server → apps/api}/src/screen-time.js +0 -0
  346. /package/dist/server/{server → apps/api}/src/seed-demo.js +0 -0
  347. /package/dist/server/{server → apps/api}/src/services/calendar-runtime.js +0 -0
  348. /package/dist/server/{server → apps/api}/src/services/context.js +0 -0
  349. /package/dist/server/{server → apps/api}/src/services/dashboard.js +0 -0
  350. /package/dist/server/{server → apps/api}/src/services/data-management.js +0 -0
  351. /package/dist/server/{server → apps/api}/src/services/devrage-scanner.js +0 -0
  352. /package/dist/server/{server → apps/api}/src/services/devrage.js +0 -0
  353. /package/dist/server/{server → apps/api}/src/services/git-helper.js +0 -0
  354. /package/dist/server/{server → apps/api}/src/services/google-calendar-oauth-config.js +0 -0
  355. /package/dist/server/{server → apps/api}/src/services/insights.js +0 -0
  356. /package/dist/server/{server → apps/api}/src/services/legacy-wiki-markdown-import.js +0 -0
  357. /package/dist/server/{server → apps/api}/src/services/life-force-model.js +0 -0
  358. /package/dist/server/{server → apps/api}/src/services/life-force.js +0 -0
  359. /package/dist/server/{server → apps/api}/src/services/macos-calendar-helper.js +0 -0
  360. /package/dist/server/{server → apps/api}/src/services/openai-codex-oauth.js +0 -0
  361. /package/dist/server/{server → apps/api}/src/services/projects.js +0 -0
  362. /package/dist/server/{server → apps/api}/src/services/psyche.js +0 -0
  363. /package/dist/server/{server → apps/api}/src/services/relations.js +0 -0
  364. /package/dist/server/{server → apps/api}/src/services/reviews.js +0 -0
  365. /package/dist/server/{server → apps/api}/src/services/run-recovery.js +0 -0
  366. /package/dist/server/{server → apps/api}/src/services/tagging.js +0 -0
  367. /package/dist/server/{server → apps/api}/src/services/task-run-watchdog.js +0 -0
  368. /package/dist/server/{server → apps/api}/src/services/work-time.js +0 -0
  369. /package/dist/server/{server → apps/api}/src/web.js +0 -0
  370. /package/dist/server/{src → apps/web/src}/components/customization/utility-widgets.js +0 -0
  371. /package/dist/server/{src → apps/web/src}/components/ui/info-tooltip.js +0 -0
  372. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/calendar/calendar-boxes.js +0 -0
  373. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/goals/goals-boxes.js +0 -0
  374. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/habits/habits-boxes.js +0 -0
  375. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/health/health-boxes.js +0 -0
  376. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/insights/insights-boxes.js +0 -0
  377. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/kanban/kanban-boxes.js +0 -0
  378. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/movement/movement-boxes.js +0 -0
  379. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/notes/notes-boxes.js +0 -0
  380. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/overview/overview-boxes.js +0 -0
  381. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/preferences/preferences-boxes.js +0 -0
  382. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/projects/projects-boxes.js +0 -0
  383. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/psyche/psyche-boxes.js +0 -0
  384. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/questionnaires/questionnaires-boxes.js +0 -0
  385. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/review/review-boxes.js +0 -0
  386. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/shared/define-workbench-box.js +0 -0
  387. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/shared/generic-node-view.js +0 -0
  388. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/strategies/strategies-boxes.js +0 -0
  389. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/tasks/tasks-boxes.js +0 -0
  390. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/today/today-boxes.js +0 -0
  391. /package/dist/server/{src → apps/web/src}/components/workbench-boxes/wiki/wiki-boxes.js +0 -0
  392. /package/dist/server/{src → apps/web/src}/lib/api-error.js +0 -0
  393. /package/dist/server/{src → apps/web/src}/lib/calendar-name-deduper.js +0 -0
  394. /package/dist/server/{src → apps/web/src}/lib/data-management-types.js +0 -0
  395. /package/dist/server/{src → apps/web/src}/lib/date-keys.js +0 -0
  396. /package/dist/server/{src → apps/web/src}/lib/diagnostics.js +0 -0
  397. /package/dist/server/{src → apps/web/src}/lib/gamification-catalog.js +0 -0
  398. /package/dist/server/{src → apps/web/src}/lib/knowledge-graph.js +0 -0
  399. /package/dist/server/{src → apps/web/src}/lib/psyche-schemas.js +0 -0
  400. /package/dist/server/{src → apps/web/src}/lib/psyche-types.js +0 -0
  401. /package/dist/server/{src → apps/web/src}/lib/questionnaire-types.js +0 -0
  402. /package/dist/server/{src → apps/web/src}/lib/runtime-paths.js +0 -0
  403. /package/dist/server/{src → apps/web/src}/lib/schemas.js +0 -0
  404. /package/dist/server/{src → apps/web/src}/lib/snapshot-normalizer.js +0 -0
  405. /package/dist/server/{src → apps/web/src}/lib/theme-system.js +0 -0
  406. /package/dist/server/{src → apps/web/src}/lib/types.js +0 -0
  407. /package/dist/server/{src → apps/web/src}/lib/utils.js +0 -0
  408. /package/dist/server/{src → apps/web/src}/lib/weight-loss-energy-model.js +0 -0
  409. /package/dist/server/{src → apps/web/src}/lib/weight-loss-types.js +0 -0
  410. /package/dist/server/{src → apps/web/src}/lib/workbench/boxes.js +0 -0
  411. /package/dist/server/{src → apps/web/src}/lib/workbench/contracts.js +0 -0
  412. /package/dist/server/{src → apps/web/src}/lib/workbench/nodes.js +0 -0
  413. /package/dist/server/{src → apps/web/src}/lib/workbench/registry.js +0 -0
  414. /package/dist/server/{src → apps/web/src}/lib/workbench/runtime.js +0 -0
  415. /package/dist/server/{src → apps/web/src}/lib/workbench/tool-catalog.js +0 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: forge-openclaw-plugin
3
- description: use when the user wants to save, search, update, review, start, stop, reward, explain, compare, or run Forge records, or when the conversation is clearly about a Forge entity or domain surface such as a goal, project, strategy, task, habit, note, wiki_page, calendar_event, calendar_connection, work_block_template, task_timebox, task_run, work_adjustment, insight, preference item, preference context, preference catalog, preference judgment, preference signal, questionnaire instrument, questionnaire run, self observation, movement, life_force, workbench, psyche_value, behavior_pattern, behavior, belief_entry, mode_profile, mode_guide_session, flashcard, trigger_report, event_type, emotion_definition, sleep_session, workout_session, or training_load. identify the exact Forge object or specialized surface, keep the main conversation natural, guide psyche intake with active listening before storing it, and for psyche issues that need understanding first usually begin with one exploratory question before any formulation or save suggestion.
3
+ description: use when the user wants to save, search, update, review, start, stop, reward, explain, compare, or run Forge records, or when the conversation is clearly about a Forge entity or domain surface such as a goal, project, strategy, task, habit, note, wiki_page, artifact, calendar_event, calendar_connection, work_block_template, task_timebox, task_run, work_adjustment, insight, preference item, preference context, preference catalog, preference judgment, preference signal, questionnaire instrument, questionnaire run, self observation, operator_overview, operator_context, calendar_overview, sleep_overview, sports_overview, training_load, weight_loss, movement, life_force, workbench, psyche_value, behavior_pattern, behavior, belief_entry, mode_profile, mode_guide_session, flashcard, trigger_report, event_type, emotion_definition, sleep_session, or workout_session. identify the exact Forge object or specialized surface, keep the main conversation natural, guide psyche intake with active listening before storing it, and for psyche issues that need understanding first usually begin with one exploratory question before any formulation or save suggestion.
4
4
  ---
5
5
 
6
6
  Forge is the user's structured system for planning work, doing work, reflecting on patterns, and keeping a truthful record of what is happening. Use it when the user is clearly working inside that system, or when they are describing something that naturally belongs there and would benefit from being stored, updated, reviewed, or acted on in Forge. Keep the conversation natural first. Do not turn every message into intake. When a real Forge entity is clearly present, name the exact entity type plainly, help with the substance of the conversation, and then offer Forge once, lightly, if storing it would genuinely help.
@@ -59,7 +59,7 @@ PM surface rule:
59
59
  human/bot ownership filters.
60
60
  - Guided modal flows handle create, edit, move, link, and closeout actions.
61
61
 
62
- Forge has four major stored-entity surfaces and three specialized domain surfaces. The planning side covers goals, projects, strategies, tasks, habits, notes, calendar events, recurring work blocks, task timeboxes, live work sessions, and agent-authored insights. The Health side covers sleep sessions, sports and workout sessions, the read-only training-load surface for cardiovascular load and HR zone review, companion pairing, and habit-generated workout records that should still stay linked to the broader Forge graph. The Preferences side covers contextual taste modeling, pairwise comparisons, direct signals, editable concept libraries, and preference items that can come from Forge entities or seeded concept domains such as food, activities, places, countries, fashion, people, media, and tools. The Psyche side covers values, patterns, behaviors, beliefs, modes, guided mode sessions, flashcards, trigger reports, event types, and reusable emotion definitions. The specialized domain surfaces are Movement, Life Force, and Workbench; agents must use their dedicated route families instead of forcing them through batch CRUD. Forge also has a SQLite-backed Wiki memory layer with explicit spaces, Markdown content in database rows, backlinks, optional embeddings, and structured links back to Forge entities. Forge is also multi-user: every entity can belong to a typed `human` or `bot` user through `userId`, and read routes can scope to one or many users with `userId` or repeated `userIds`. The current access posture is configurable through a directional user graph, but the live default is still permissive: Forge can list users directly, every relationship edge starts open, and a user can read or affect another user's linked records when the route explicitly asks for them. Use `forge_get_user_directory` when owner identity or cross-user access matters. Strategies can also be locked into a contract with `isLocked`; once locked, do not mutate the graph or target structure unless the user explicitly wants the strategy unlocked first. The model should use the real entity names, not vague substitutes. Say `project`, not “initiative”. Say `behavior_pattern`, not “theme”. Say `trigger_report`, not “incident note”.
62
+ Forge has four major stored-entity surfaces, read-model surfaces, specialized CRUD surfaces, and three specialized domain surfaces. The planning side covers goals, projects, strategies, tasks, habits, notes, calendar events, recurring work blocks, task timeboxes, live work sessions, and agent-authored insights. The Health side covers sleep sessions, sports and workout sessions, the read-only training-load surface for cardiovascular load and HR zone review, the weight-loss and nutrition workflow, companion pairing, and habit-generated workout records that should still stay linked to the broader Forge graph. The Preferences side covers contextual taste modeling, pairwise comparisons, direct signals, editable concept libraries, and preference items that can come from Forge entities or seeded concept domains such as food, activities, places, countries, fashion, people, media, and tools. The Psyche side covers values, patterns, behaviors, beliefs, modes, guided mode sessions, flashcards, trigger reports, event types, reusable emotion definitions, questionnaire instruments, questionnaire runs, and the note-backed self-observation calendar. Read-model surfaces include `operator_overview`, `operator_context`, `calendar_overview`, `sleep_overview`, `sports_overview`, `training_load`, `weight_loss`, and the self-observation calendar; ask what practical decision the read should support before adding write-shaped questions. The specialized domain surfaces are Movement, Life Force, and Workbench; agents must use their dedicated route families instead of forcing them through batch CRUD. Forge also has a SQLite-backed Wiki memory layer with explicit spaces, Markdown content in database rows, backlinks, optional embeddings, and structured links back to Forge entities. The Artifact Store is a specialized CRUD surface for trusted stored files such as spreadsheets, documents, PDFs, text, structured text, and images; artifact relationships use the general `entity_links` model, and agents must not download, open, execute, preview, or transform stored file bytes. Forge is also multi-user: every entity can belong to a typed `human` or `bot` user through `userId`, and read routes can scope to one or many users with `userId` or repeated `userIds`. The current access posture is configurable through a directional user graph, but the live default is still permissive: Forge can list users directly, every relationship edge starts open, and a user can read or affect another user's linked records when the route explicitly asks for them. Use `forge_get_user_directory` when owner identity or cross-user access matters. Strategies can also be locked into a contract with `isLocked`; once locked, do not mutate the graph or target structure unless the user explicitly wants the strategy unlocked first. The model should use the real entity names, not vague substitutes. Say `project`, not “initiative”. Say `behavior_pattern`, not “theme”. Say `trigger_report`, not “incident note”.
63
63
  Habits are a first-class recurring entity in the planning side.
64
64
  NEGATIVE HABIT CHECK-IN RULE: for a `negative` habit, the correct aligned/resisted outcome is `missed`. `missed` means the bad habit was resisted, the user stayed aligned, and the habit should award its XP bonus.
65
65
 
@@ -78,12 +78,40 @@ save confirmation. Report product actions such as "saved the belief", "corrected
78
78
  missing stay", "updated the weekday energy pattern", or "read the failed node" before
79
79
  any route-key or endpoint detail.
80
80
 
81
+ Use the known-target fast path when the user already supplied the object, action, and
82
+ likely lane. For normal entities, ask only for parent, owner, or duplicate-disambiguation that changes the write. For task hierarchy, ask only for the project,
83
+ issue, or parent task that changes placement. For Movement, ask only for the missing
84
+ interval, boundary, saved object, or confirmation. For Life Force, ask only for the
85
+ weekday, profile field, signal intensity, or planning effect. For Workbench, ask only
86
+ for the missing flow, run, node, input, output, or preservation choice. For direct
87
+ Psyche saves, ask one accuracy or consent question instead of restarting exploration.
88
+
89
+ Use the active-listening turn contract before deepening: reflect the specific stake,
90
+ working shape, or product object in one sentence; decide internally whether the next
91
+ answer would change wording, placement, timing, route scope, support action,
92
+ verification read, preservation choice, or consent; then ask one question. For Psyche,
93
+ name the felt stake, protection, prediction, payoff, cost, or value conflict, and when
94
+ a functional loop or belief sentence is already visible, offer one tentative
95
+ hypothesis plus one fit-or-correction question instead of another broad exploration.
96
+ For logistical records, keep the reflection short and ask for the operational detail.
97
+
98
+ Use the route execution handoff before any read, write, run, repair, or publish call:
99
+ freeze the accepted user-facing target, choose exactly one lane, use batch CRUD only
100
+ for catalog entities, use named tools or documented routes for specialized CRUD and
101
+ action workflows, and for Movement, Life Force, Workbench, or Artifact Store verify `routeKey`,
102
+ method, path, and `pathParams` from live onboarding `methodRoutes` before calling.
103
+ Never hide placeholders in `query` or `body`, and never guess a nearby path.
104
+
81
105
  - Batch CRUD is the default for normal stored entities, including `goal`, `project`,
82
106
  `strategy`, `task`, `habit`, `tag`, `note`, `insight`, `calendar_event`,
83
107
  `work_block_template`, `task_timebox`, all main Psyche records, basic Preferences
84
108
  CRUD records, `questionnaire_instrument`, `sleep_session`, and `workout_session`.
85
- - `wiki_page` and `calendar_connection` are specialized CRUD surfaces. Use the wiki
86
- tools for wiki pages and the calendar connection tools for provider setup and sync.
109
+ - `wiki_page`, `calendar_connection`, and `artifact` are specialized CRUD surfaces.
110
+ Use the wiki tools for wiki pages, the calendar connection tools for provider setup
111
+ and sync, and the Artifact Store route family for trusted file upload, metadata,
112
+ static scan, LLM metadata enrichment, generic entity links, trust state, versions,
113
+ and audit. Batch CRUD may search, update, delete, and restore artifact metadata, but
114
+ it must not create file artifacts or access file bytes.
87
115
  - `task_run`, `work_adjustment`, `questionnaire_run`, `preference_judgment`,
88
116
  `preference_signal`, and `self_observation` are action workflows. Use their
89
117
  dedicated tools or note-backed write model instead of generic entity create/update
@@ -97,6 +125,12 @@ any route-key or endpoint detail.
97
125
  exact `/api/v1/*` route or OpenClaw `/forge/v1/*` mirror published in onboarding.
98
126
  Life Force may be keyed as `lifeForce` and as the entity-style alias `life_force`;
99
127
  both point to the same `/api/v1/life-force/*` route family.
128
+ - Artifact Store route keys live under
129
+ `forge_get_agent_onboarding.entityRouteModel.specializedCrudEntities.artifact`.
130
+ When the adapter exposes `forge_call_artifact_route`, use it for artifact list,
131
+ trusted upload, metadata update, static rescan, LLM enrichment, generic entity-link
132
+ replacement, trust state, versions, or audit. Do not expose or call the download
133
+ route from agent tools; downloads are human-operator-only.
100
134
  - The live onboarding `routeKeys` list, `methodRoutes` map, and specialized
101
135
  route-key tool schemas include the exact route-key to method/path map. Use
102
136
  `routeKeys` for the allowed names and `methodRoutes` as the
@@ -186,6 +220,16 @@ Concrete route-key examples for internal use:
186
220
  `{"routeKey":"runByPayload","body":{"flow":{"title":"One-off digest","nodes":[]},"input":{"topic":"question flow quality"}}}`
187
221
  - Workbench flow chat follow-up:
188
222
  `{"routeKey":"chatFlow","pathParams":{"id":"flow_research_digest"},"body":{"message":"Refine the summary around API route risks and keep the published output stable."}}`
223
+ - Artifact metadata list:
224
+ `{"routeKey":"list","query":{"query":"thesis budget","formatFamily":"spreadsheet","limit":20}}`
225
+ - Artifact trusted upload:
226
+ `{"routeKey":"createWithBytes","body":{"originalFileName":"budget.xlsx","contentBase64":"<base64>","title":"Thesis budget workbook","sourceLabel":"Uploaded by the operator from local files","useLlmEnrichment":true,"links":[{"entityType":"project","entityId":"project_thesis","relationship":"evidence"}]}}`
227
+ - Artifact generic entity-link replacement:
228
+ `{"routeKey":"replaceGenericLinks","pathParams":{"id":"artifact_123"},"body":{"links":[{"entityType":"wiki_page","entityId":"note_thesis_budget","relationship":"embedded_reference"}]}}`
229
+ - Artifact audit read:
230
+ `{"routeKey":"audit","pathParams":{"id":"artifact_123"}}`
231
+ - Artifact forbidden agent action:
232
+ do not call `/api/v1/artifacts/:id/download`; hand the human to the Forge web app for download.
189
233
 
190
234
  Preferences rule:
191
235
 
@@ -252,12 +296,12 @@ Health rule:
252
296
  `forge_parse_food_log_with_chatgpt` must use Forge's configured `openai-codex`
253
297
  ChatGPT subscription connection, not a metered OpenAI Platform API path.
254
298
  - In `forge_get_agent_onboarding.entityRouteModel.readModelOnlySurfaces`, operator,
255
- calendar, self-observation, sleep, sports, and training-load read models are published with
299
+ calendar, self-observation, sleep, sports, training-load, and weight-loss read models are published with
256
300
  both camelCase names and entity-style aliases where useful, including
257
301
  `operatorOverview`, `operatorContext`, `calendarOverview`, `sleepOverview`,
258
- `sportsOverview`, `trainingLoad`, `operator_overview`, `operator_context`,
302
+ `sportsOverview`, `trainingLoad`, `weightLoss`, `operator_overview`, `operator_context`,
259
303
  `calendar_overview`, `self_observation`, `sleep_overview`,
260
- `sports_overview`, and `training_load`. Treat those as read-only surfaces,
304
+ `sports_overview`, `training_load`, and `weight_loss`. Treat those as read-only surfaces,
261
305
  not batch CRUD entities.
262
306
  - Use `forge_get_operator_overview` for a broad Forge status read, `forge_get_operator_context`
263
307
  for current work and risk, and `forge_get_calendar_overview` before calendar-aware
@@ -289,6 +333,14 @@ Entity conversation rule:
289
333
  route lane, target object, correction, link, verification read, run/publish/preserve
290
334
  action, or consent. If the question would only add warmth, completeness, optional
291
335
  metadata, or form polish, skip it, summarize what is clear, and act or close.
336
+ - Use the user-facing wording guard after openings, reads, writes, and confirmations:
337
+ do not say "that sounds important" unless you name the specific stake; do not ask
338
+ "what would you like to do with this?" when the user's verb or the read result
339
+ already makes one next action visible; replace endpoint, payload, mutation, batch
340
+ route, and route key language with product nouns such as missing stay, weekday
341
+ energy curve, saved flow, failed run, node output, belief sentence, pattern,
342
+ flashcard, wiki page, calendar connection, or task run; if no answer-changing
343
+ uncertainty remains, summarize the product result and stop.
292
344
  - Treat partial answers as progress. Before another follow-up, identify what is
293
345
  already usable: operation, entity or surface, target record or time span, working
294
346
  wording, owner or placement, route lane, and consent. Ask only for the first missing
@@ -915,6 +967,7 @@ When the user asks which Forge tools are available, list exactly these tools:
915
967
  `forge_call_movement_route`
916
968
  `forge_call_life_force_route`
917
969
  `forge_call_workbench_route`
970
+ `forge_call_artifact_route`
918
971
  `forge_get_user_directory`
919
972
  `forge_get_ui_entrypoint`
920
973
  `forge_get_psyche_overview`
@@ -49,11 +49,8 @@ Forge correctly, and gather only the structure that still matters.
49
49
  feels important to keep true before you ask for labels, dates, or taxonomy.
50
50
  - When the user is clear, say what the record seems to be becoming and move straight to
51
51
  the last missing structural detail.
52
- - For straightforward logistical entities such as tasks, calendar events, work blocks,
53
- timeboxes, and task runs, use a fast path:
54
- one brief confirming sentence -> one operational question.
55
- - For logistical records such as tasks, calendar events, work blocks, timeboxes, and
56
- task runs, use a fast path:
52
+ - For straightforward logistical entities such as tasks, calendar events, work
53
+ blocks, timeboxes, and task runs, use a fast path:
57
54
  one brief confirming sentence -> one operational question.
58
55
  - For action-heavy flows such as work adjustments, preference judgments, preference
59
56
  signals, and Movement, Life Force, or Workbench work, first
@@ -142,11 +139,34 @@ With the user, say the human thing:
142
139
  - "Movement timeline", "place", "trip", "missing block", or "time window"
143
140
  - "Energy model", "weekday pattern", or "fatigue signal"
144
141
  - "Workbench flow", "run", "published output", or "node result"
145
- - "Wiki page", "note", "trigger report", "behavior pattern", "belief", or "mode"
142
+ - "Wiki page", "artifact file", "provenance", "note", "trigger report",
143
+ "behavior pattern", "belief", or "mode"
146
144
 
147
145
  The API path still matters, but it should not leak into the question unless the user
148
146
  is explicitly asking about implementation.
149
147
 
148
+ ## User-facing wording guard
149
+
150
+ Use this guard after the opening question too. Later turns, read summaries, and
151
+ confirmations should stay as concrete as the first question.
152
+
153
+ - Do not say "that sounds important" unless you name the stake: what the user is
154
+ trying to protect, recover, decide, remember, repair, schedule, or publish.
155
+ - Do not ask "what would you like to do with this?" after the user's verb, the read
156
+ result, or the selected route lane already makes one next action visible. Name the
157
+ next action and ask only for the missing product detail, or close cleanly.
158
+ - Replace implementation words with product nouns before the sentence reaches the
159
+ user. Say missing stay, place boundary, weekday energy curve, saved flow, failed
160
+ run, node output, belief sentence, pattern, flashcard, wiki page, calendar
161
+ connection, artifact file, provenance, generic entity link, or task run instead of
162
+ endpoint, payload, mutation, batch route, or route key.
163
+ - If the only honest next sentence would be a generic reflection or a route-shaped
164
+ question, pause and identify the product noun internally. If you still cannot name
165
+ it, ask one grounding question about the real moment, span, object, or decision.
166
+ - After a read or write, never add a conversational tail just to sound warm. If no
167
+ answer-changing uncertainty remains, summarize the result in product language and
168
+ stop.
169
+
150
170
  ## Internal action trace, external wording
151
171
 
152
172
  Before you ask or act, keep a private action trace: intent, entity or dedicated
@@ -165,6 +185,33 @@ missing detail that would change the action. Do not narrate that trace to the us
165
185
  - This is especially important after mixed-intent requests. The user should feel a
166
186
  coherent sequence, not see your internal routing table.
167
187
 
188
+ ## Known-target fast path
189
+
190
+ Use this when the user's words already name the object, action, and likely route lane.
191
+ The agent should not make the user pass through the general opener again.
192
+
193
+ - For normal stored entities, if the user gave the accepted wording and the intended
194
+ operation, ask only for the parent, owner, or duplicate-disambiguation detail that
195
+ would change the write. If none would change it, summarize and save.
196
+ - For task hierarchy work, if the user already says issue, task, or subtask, keep that
197
+ level and ask only for the missing project, issue, or parent task that would change
198
+ placement.
199
+ - For Movement, if the user already names the missing span, saved overlay, place,
200
+ stay, trip, or trip point, ask only for the missing interval, boundary, saved
201
+ object, or confirmation that is still missing; do not ask whether this is day,
202
+ timeline, or repair work.
203
+ - For Life Force, if the user already names a weekday pattern, profile assumption, or
204
+ right-now fatigue state, ask only for the weekday/time shape, profile field, signal
205
+ intensity, or planning effect that would change the dedicated write.
206
+ - For Workbench, if the user already names a flow, run, node, latest output, or
207
+ published result, ask only for the missing flow, run, node, input, output, or
208
+ preservation choice. Do not reopen flow-creation or flow-edit intake before reading
209
+ the requested artifact.
210
+ - For direct Psyche saves, if the belief sentence, functional loop, part voice,
211
+ trigger episode, value phrase, event kind, emotion signature, or flashcard message
212
+ is already usable, move to one accuracy or consent question instead of restarting
213
+ exploration.
214
+
168
215
  ## Dedicated surface lane translation
169
216
 
170
217
  Use this when Movement, Life Force, or Workbench work needs a route choice. The route
@@ -372,6 +419,10 @@ to the stronger container:
372
419
  label will improve future trigger reports.
373
420
  - Use `wiki_page` when the user wants durable memory, a book/article/source summary,
374
421
  a reference page, a concept page, or a reusable personal manual.
422
+ - Use `artifact` when the user wants Forge to store a trusted file for human
423
+ retrieval, audit, provenance, or evidence. Link it to other Forge records through
424
+ the general entity-link model; do not create an artifact-specific relationship
425
+ system.
375
426
  - Use a linked `note` when nuance should be preserved without pretending it is the
376
427
  whole structured model.
377
428
 
@@ -591,9 +642,12 @@ Use this quick split before the conversation gets too detailed.
591
642
  - Every normal entity section below inherits that batch-route default unless its own
592
643
  route note says otherwise. Do not invent one-off entity endpoints for ordinary
593
644
  stored records.
594
- - `wiki_page` and `calendar_connection` are specialized CRUD areas. Use the wiki
595
- page routes and calendar connection setup or sync routes instead of pretending they
596
- are simple batch records.
645
+ - `wiki_page`, `calendar_connection`, and `artifact` are specialized CRUD areas. Use
646
+ the wiki page routes, calendar connection setup or sync routes, and artifact routes
647
+ instead of pretending they are simple batch records. Batch CRUD may search, update,
648
+ delete, and restore artifact metadata, but file upload, scan, enrichment, trust,
649
+ versions, audit, and generic entity-link replacement stay on the Artifact Store
650
+ route family.
597
651
  - `task_run`, `work_adjustment`, `questionnaire_run`, `preference_judgment`,
598
652
  `preference_signal`, and `self_observation` are action workflows. Start from what
599
653
  the user is trying to do, then use the dedicated action tool or note-backed write
@@ -615,6 +669,48 @@ Use this quick split before the conversation gets too detailed.
615
669
  - If the tool schema and live onboarding disagree about a specialized route key or
616
670
  path, treat that as a contract mismatch to fix. Do not guess a nearby route.
617
671
 
672
+ ## Route execution handoff
673
+
674
+ Use this after the conversation has enough information and before any read, write,
675
+ run, repair, or publish call. This is an internal checklist; do not turn it into a
676
+ user-facing API explanation.
677
+
678
+ 1. Freeze the accepted user-facing formulation or target object: title, belief
679
+ sentence, movement span, weekday, flow, run, node, or published result.
680
+ 2. Choose exactly one execution lane: shared batch CRUD, specialized CRUD, action
681
+ workflow, read-model route, or specialized domain route.
682
+ 3. For shared batch CRUD, use the catalog `entityType` exactly and the batch
683
+ create/update/delete/restore/search routes. Search or read first for update,
684
+ delete, restore, link, duplicate-disambiguation, or review work.
685
+ 4. For specialized CRUD or action workflows, use the named tool or documented route
686
+ for wiki pages, calendar connections, artifacts, task runs, work adjustments,
687
+ questionnaire runs, preference judgments/signals, and self-observation notes.
688
+ 5. For Movement, Life Force, and Workbench, verify the `routeKey`, method, path, and
689
+ every placeholder in `methodRoutes`; fill `pathParams` by placeholder name before
690
+ the call. Do not put IDs into `routeKey`, hide placeholders in `query` or `body`,
691
+ or use nearby guessed paths.
692
+ 6. After the call, confirm the product result in the user's language and run the
693
+ verification read only when it proves a repair, explains impact, or grounds the
694
+ next decision.
695
+
696
+ ## Read-Model Alias Handling
697
+
698
+ Live onboarding publishes several read-model surfaces with both camelCase and
699
+ entity-style aliases. Treat each pair as the same user-facing flow and normalize it
700
+ internally before asking questions:
701
+
702
+ - `operatorOverview` and `operator_overview`
703
+ - `operatorContext` and `operator_context`
704
+ - `calendarOverview` and `calendar_overview`
705
+ - `sleepOverview` and `sleep_overview`
706
+ - `sportsOverview` and `sports_overview`
707
+ - `trainingLoad` and `training_load`
708
+ - `weightLoss` and `weight_loss`
709
+ - `selfObservation` and `self_observation`
710
+
711
+ Do not ask the user which alias they mean. Ask the practical question the read should
712
+ answer, then use the published read route for that alias pair.
713
+
618
714
  ## Full Route Posture Matrix
619
715
 
620
716
  Use this as an internal checklist when simulating or handling an entity flow. Do not
@@ -645,6 +741,11 @@ still knowing the exact write/read family before it acts.
645
741
  - `calendar_connection`: specialized CRUD. Use provider discovery, connection CRUD,
646
742
  selected-calendar rediscovery, sync, and delete routes rather than batch entity
647
743
  tools.
744
+ - `artifact`: specialized CRUD. Use `/api/v1/artifacts` for trusted file upload,
745
+ metadata reads and updates, static rescan, optional LLM metadata enrichment,
746
+ trust-state decisions, version and audit reads, and replacement of general
747
+ `entity_links`. Do not download, open, execute, preview, or transform file bytes as
748
+ an agent; download is a human-operator-only action.
648
749
  - `operator_overview`: read-model-only operator surface. Use
649
750
  `forge_get_operator_overview` or `/api/v1/operator/overview` when the user wants
650
751
  the current Forge picture, attention cues, or broad status before choosing a
@@ -728,6 +829,31 @@ Update record:
728
829
 
729
830
  - "Before I change it, what feels newly true now, and what should stay intact?"
730
831
 
832
+ ## Active-listening turn contract
833
+
834
+ Use this before deepening any create, update, review, or guide flow. The turn should
835
+ prove that the agent heard the user and knows what the next answer would change.
836
+
837
+ 1. Reflect the specific stake, working shape, or product object in one sentence.
838
+ Avoid generic warmth such as "that sounds important".
839
+ 2. Classify the next useful move internally: wording, boundary, placement, timing,
840
+ route scope, support action, verification read, preservation choice, or consent.
841
+ 3. Ask one question whose answer would change that move.
842
+ 4. If the answer would only add polish, optional metadata, or therapist-like color,
843
+ do not ask it.
844
+
845
+ For Psyche-adjacent material, the reflection should name a felt stake, protection,
846
+ prediction, payoff, cost, or value conflict. If a functional loop or belief sentence
847
+ is already visible, move toward one tentative formulation instead of mirroring again.
848
+
849
+ For logistical entities, keep the reflection short and route to the operational
850
+ detail: parent, owner, time, recurrence, run target, comparison item, or save
851
+ confirmation.
852
+
853
+ For Movement, Life Force, and Workbench, reflect the product object first:
854
+ movement span, place boundary, weekday curve, fatigue signal, flow, run, node output,
855
+ or published result. Then ask only for the missing route-selecting detail.
856
+
731
857
  ## Turn shapes
732
858
 
733
859
  Use these as small conversation molds when you need the next turn to feel guided
@@ -1251,6 +1377,22 @@ Arc:
1251
1377
  5. Ask what would make it easier to do: due date, priority, owner, human/bot
1252
1378
  assignees, acceptance criteria, or one line of context.
1253
1379
 
1380
+ Level-specific handling:
1381
+
1382
+ - For `issue`, ask what vertical slice of the project should become true and whether
1383
+ it is AFK or HITL before asking for one-session execution instructions.
1384
+ - For `task`, ask what one focused session should finish and which issue it belongs
1385
+ under when the hierarchy matters.
1386
+ - For `subtask`, ask which parent task it breaks down and what small child step it
1387
+ names. Do not inflate a subtask into a full task or issue unless the described work
1388
+ no longer fits as a lightweight child step.
1389
+ - When the user already says issue, task, or subtask, keep that word in the
1390
+ user-facing reflection and confirmation. Do not collapse all three into "task" just
1391
+ because the API entity type is `task`.
1392
+ - All three levels still use the shared batch entity route with `entityType: "task"`
1393
+ and the appropriate `level`. The level distinction is product meaning, not a
1394
+ separate route family.
1395
+
1254
1396
  Helpful follow-up lanes:
1255
1397
 
1256
1398
  - turn vague intent into an actionable verb
@@ -1405,6 +1547,62 @@ Preferred opening question:
1405
1547
 
1406
1548
  - "What do you want this wiki page to help you remember or reuse later?"
1407
1549
 
1550
+ ## Artifact
1551
+
1552
+ Aim: store a trusted file so a human can find it, understand what it is, trace where
1553
+ it came from, and download it later without letting agents run or inspect the file
1554
+ bytes.
1555
+
1556
+ Arc:
1557
+
1558
+ 1. Ask what the file should help the human retrieve, prove, review, or preserve later.
1559
+ 2. Ask for the human-readable title, short description, provenance, and source path
1560
+ only when the user has not already supplied them.
1561
+ 3. Ask which Forge record the artifact should be linked to only when that link will
1562
+ improve retrieval or context. Use Forge's general entity-to-entity link model.
1563
+ 4. Ask whether optional LLM enrichment should fill missing description/provenance
1564
+ fields and produce a danger summary when an LLM connection exists.
1565
+ 5. Keep trust explicit: only a trusted human/operator or trusted agent may add file
1566
+ bytes, and the agent must not download, open, execute, preview, or transform the
1567
+ stored file.
1568
+ 6. After upload, summarize the stored artifact metadata, scan result, danger score,
1569
+ and linked Forge records in product language.
1570
+
1571
+ Helpful follow-up lanes:
1572
+
1573
+ - what the file should help someone retrieve, prove, review, or preserve
1574
+ - missing title, short description, provenance, source path, or owner
1575
+ - whether the artifact belongs with a project, task, wiki page, note, Psyche record,
1576
+ or other Forge entity through a general `entity_links` relationship
1577
+ - whether to request LLM metadata enrichment when descriptions are missing
1578
+ - whether the static scan or danger score requires quarantine, rejection, or a human
1579
+ trust decision
1580
+
1581
+ Routing rule:
1582
+
1583
+ - `artifact` is a specialized CRUD surface. Use the Artifact Store route family for
1584
+ trusted file upload, metadata reads and updates, static scan, LLM enrichment,
1585
+ trust-state changes, versions, audit reads, and replacement of general
1586
+ `entity_links`.
1587
+ - Do not create or use artifact-specific links. Artifact relationships are normal
1588
+ Forge entity-to-entity links with `sourceEntityType`, `sourceEntityId`,
1589
+ `targetEntityType`, `targetEntityId`, optional `relationship`, and optional
1590
+ `anchorKey`.
1591
+ - Agents may list and update artifact metadata when authorized, but they must not
1592
+ download, open, execute, preview, transform, or autonomously process stored file
1593
+ bytes.
1594
+
1595
+ Ready to save when:
1596
+
1597
+ - the file is present and the actor is trusted to upload it
1598
+ - title or filename, provenance or source path, and basic purpose are clear enough
1599
+ - the desired generic Forge entity links are known or intentionally absent
1600
+ - the user has chosen whether missing metadata should be filled by LLM enrichment
1601
+
1602
+ Preferred opening question:
1603
+
1604
+ - "What should this file help you find, prove, review, or preserve later?"
1605
+
1408
1606
  ## Insight
1409
1607
 
1410
1608
  Aim: capture one grounded observation or recommendation clearly enough that it stays
@@ -2132,9 +2330,9 @@ Arc:
2132
2330
  9. If the truth of one uncertain span is still unclear, read the timeline or saved-box
2133
2331
  detail before you mutate it.
2134
2332
  10. Skip the meta lane question when the user already named the exact correction or
2135
- review target and only one ambiguity remains.
2333
+ review target and only one ambiguity remains.
2136
2334
  11. Use the dedicated movement route once you know whether the user needs timeline
2137
- review, overlay, place or trip detail, selection summary, settings, or repair.
2335
+ review, overlay, place or trip detail, selection summary, settings, or repair.
2138
2336
 
2139
2337
  Direct action rules:
2140
2338
 
@@ -2355,10 +2553,10 @@ Arc:
2355
2553
  9. If the user already named the flow and action clearly, skip the meta lane
2356
2554
  question and ask only for the missing run, node, or output scope.
2357
2555
  10. If the user wants a stable public input contract or published output, prefer those
2358
- dedicated reads instead of detouring through run history first.
2556
+ dedicated reads instead of detouring through run history first.
2359
2557
  11. If the user is debugging one failed run, ask whether the useful artifact is the run
2360
- summary, one node result, the latest node output, or the published output before
2361
- you start asking for edits.
2558
+ summary, one node result, the latest node output, or the published output before
2559
+ you start asking for edits.
2362
2560
  12. Route to the dedicated workbench route family once the execution lane is clear.
2363
2561
 
2364
2562
  Helpful follow-up lanes:
@@ -182,6 +182,26 @@ Connect:
182
182
  - when another record is clearly present, ask whether the user wants to link it now,
183
183
  save it separately later, or just keep it in the note/context for now
184
184
 
185
+ ## Psyche active-listening turn contract
186
+
187
+ Use this before every deeper Psyche follow-up. The goal is to help the user feel
188
+ accurately understood while still moving toward a saveable formulation.
189
+
190
+ 1. Reflect the specific felt stake or protective move you heard: danger, shame,
191
+ pressure, grief, longing, protection, relief, cost, or value conflict.
192
+ 2. Decide internally which Psyche lane the next answer would change: belief sentence,
193
+ functional loop, behavior move, mode voice, trigger sequence, value phrase, event
194
+ kind, emotion signature, flashcard cue, link, or consent.
195
+ 3. Ask one question that changes that lane.
196
+ 4. If a concrete example already supports a functional interpretation, offer one
197
+ tentative hypothesis and one fit-or-correction question instead of asking another
198
+ broad exploratory question.
199
+ 5. If the user accepts or corrects the formulation, bridge toward the nearest
200
+ saveable record rather than reopening origin, evidence, or repair.
201
+
202
+ This is active listening, not just mirroring. A strong turn names what seems at stake,
203
+ keeps the hypothesis correctable, and reduces the user's burden of wording.
204
+
185
205
  ## Interpretive Hypotheses
186
206
 
187
207
  Use hypotheses when reflection alone would leave the user circling around the same
@@ -1 +0,0 @@
1
- import{r as N,b3 as Je,c8 as Fe,c5 as Qe,cq as he,j as t,c1 as je,b2 as pt,c4 as Xe,cr as Ye,cs as Ze,bC as xt,b9 as gt,c3 as bt,aO as ht,aP as ve,bD as Ue,ct as vt}from"./vendor-BwL6m4SE.js";import{u as wt,a as jt,D as yt,S as Pe,v as qe,e as Nt,p as kt,f as St,P as It,g as Te,b as et,C as tt}from"./board-CuxQRKPJ.js";import{u as ye,C as it,B as Ve,c as W,R as Ct,a as rt,b as le,k as S,E as at}from"./index-FpGANF9S.js";import{U as we}from"./user-badge-ByhC6bMU.js";import{E as zt}from"./entity-note-count-link-Bs1aKYyD.js";import{F as Dt}from"./floating-action-menu-DAFAEBcA.js";function $t(e){if(typeof e=="number"&&Number.isInteger(e)&&e>0)return e;if(typeof e=="string"){const r=e.match(/(\d+)/);if(r){const l=Number.parseInt(r[1]??"",10);return Number.isInteger(l)&&l>0?l:null}}return null}function Ge(e){return e.split(/\r?\n/).map(r=>r.trim()).reduce((r,l)=>{const o=l.match(/^[-*+]\s+\[([ xX])\]\s+(.+)$/);if(o)return r.push({label:o[2].trim(),completed:o[1].toLowerCase()==="x"}),r;const c=l.match(/^(?:[-*+]|\d+\.)\s+(.+)$/);return c&&r.push({label:c[1].trim(),completed:null}),r},[]).filter(r=>r.label.length>0)}function _t(e){if(e.acceptanceCriteria.length>0)return{total:e.acceptanceCriteria.length,completed:e.status==="done"?e.acceptanceCriteria.length:0,source:"acceptance_criteria",items:e.acceptanceCriteria};const r=Ge(e.aiInstructions);if(r.length>0){const o=e.status==="done"?r.length:r.filter(c=>c.completed===!0).length;return{total:r.length,completed:o,source:"ai_instructions",items:r.map(c=>c.label)}}const l=Ge(e.description);if(l.length>0){const o=e.status==="done"?l.length:l.filter(c=>c.completed===!0).length;return{total:l.length,completed:o,source:"description",items:l.map(c=>c.label)}}return null}function He(e,r){return e.find(l=>l.refType===r)??null}function nt(e,r=null){var f,x,w,D,k,C,$,U,_,B,R;const l=new Set(((f=e.completionReport)==null?void 0:f.linkedGitRefIds)??[]),o=He(e.gitRefs,"branch"),c=He(e.gitRefs,"pull_request"),u=(r==null?void 0:r.gitContext)??null,m=(u==null?void 0:u.pullRequestNumber)??$t((c==null?void 0:c.refValue)??(c==null?void 0:c.displayTitle)??null);return{actor:(r==null?void 0:r.actor)??null,activeRun:r,stepSummary:_t(e),changedFileCount:((x=e.completionReport)==null?void 0:x.modifiedFiles.length)??0,changedFilesPreview:(((w=e.completionReport)==null?void 0:w.modifiedFiles)??[]).slice(0,2),git:{provider:((D=u==null?void 0:u.provider)==null?void 0:D.trim())||((k=o==null?void 0:o.provider)==null?void 0:k.trim())||((C=c==null?void 0:c.provider)==null?void 0:C.trim())||null,repository:(($=u==null?void 0:u.repository)==null?void 0:$.trim())||((U=o==null?void 0:o.repository)==null?void 0:U.trim())||((_=c==null?void 0:c.repository)==null?void 0:_.trim())||null,branch:((B=u==null?void 0:u.branch)==null?void 0:B.trim())||((R=o==null?void 0:o.refValue)==null?void 0:R.trim())||null,branchUrl:(u==null?void 0:u.branchUrl)??(o==null?void 0:o.url)??null,pullRequestNumber:m,pullRequestUrl:(u==null?void 0:u.pullRequestUrl)??(c==null?void 0:c.url)??null,compareUrl:(u==null?void 0:u.compareUrl)??null,linkedRefCount:l.size}}}const I=["backlog","focus","in_progress","blocked","done"];function Bt(e){if(!e)return null;const r=Date.parse(e);return Number.isNaN(r)?null:new Date(r).toISOString().slice(0,10)}function Mt({task:e,onOpenTask:r,onEditTask:l,onLinkTask:o,onCreateTaskForIssue:c,onCreateSubtaskForTask:u,onMove:m,onDeleteTask:f,deletePendingTaskId:x,onRequestDelete:w}){const D=e.level==="issue"?{id:"create-task",label:"Create task",description:"Add a focused execution task under this issue.",icon:he,onSelect:()=>c==null?void 0:c(e.id)}:e.level==="task"?{id:"create-subtask",label:"Create subtask",description:"Add a granular child step under this task.",icon:he,onSelect:()=>u==null?void 0:u(e.id)}:null;return[{id:"open-task",label:"Open",description:"Jump to the work-item detail view.",icon:Je,onSelect:()=>r==null?void 0:r(e.id)},{id:"edit-task",label:"Edit",description:"Open the guided work-item editor.",icon:Fe,onSelect:()=>l==null?void 0:l(e.id)},{id:"link-task",label:"Link",description:"Open the placement step to relink this work item.",icon:Qe,onSelect:()=>o==null?void 0:o(e.id)},...D?[D]:[],{id:"delete-task",label:e.level==="issue"?"Delete issue":e.level==="subtask"?"Delete subtask":"Delete task",description:"Remove this work item directly from the board menu.",icon:je,tone:"danger",disabled:!f||x===e.id,onSelect:()=>w(e)},...I.filter(k=>k!==e.status).map(k=>({id:`move-task-${k}`,label:`Move to ${k.replaceAll("_"," ")}`,description:"Update the workflow lane for this work item.",onSelect:()=>void m(e.id,k)}))]}function st(e){return e.startsWith("lane:")||e.includes(":lane:")}function At(e){var r,l;return((l=(r=e.data)==null?void 0:r.current)==null?void 0:l.type)==="lane"||st(String(e.id))}function Lt(e){var r,l;return((l=(r=e.data)==null?void 0:r.current)==null?void 0:l.type)==="trash"}function Et(e,r){const l=Math.max(0,Math.min(e.right,r.right)-Math.max(e.left,r.left)),o=Math.max(0,Math.min(e.bottom,r.bottom)-Math.max(e.top,r.top));return l*o}const Rt=e=>{const r=kt(e),l=r.find(m=>{const f=e.droppableContainers.find(x=>x.id===m.id);return f?Lt(f):!1});if(l)return[l];const o=r.find(m=>st(String(m.id)));if(o)return[o];const u=e.droppableContainers.filter(m=>At(m)).map(m=>{const f=e.droppableRects.get(m.id);if(!f)return null;const x=Et(e.collisionRect,f);return x<=0?null:{id:m.id,data:{droppableContainer:m,value:x}}}).filter(Boolean).sort((m,f)=>{var x,w;return(((x=f==null?void 0:f.data)==null?void 0:x.value)??0)-(((w=m==null?void 0:m.data)==null?void 0:w.value)??0)});return u.length>0?u:r.length>0?r:St(e)};function Ot(e,r){return r&&r.trim().length>0?r:e!=null&&e.actor?`${e.actor} session`:"Active work"}function Ut(e,r){return[(e==null?void 0:e.actor)??null,r].filter(Boolean).join(" · ")}function Ke(e){e.preventDefault(),e.stopPropagation()}function lt({task:e,goal:r,tags:l,activeRun:o,isSelected:c,isDragging:u=!1,isOverlay:m=!1,style:f,setNodeRef:x,dragAttributes:w,dragListeners:D,isMobile:k=!1,onSelect:C,onStartTask:$,onStopTask:U,onQuickReopen:_,onStepTask:B,onSplitTask:R,onOpenMenu:P,notesSummaryByEntity:q}){var X;const{t:M,formatDate:ae}=ye(),j=nt(e,o??null),z=j.stepSummary,h=I[I.indexOf(e.status)-1]??null,A=I[I.indexOf(e.status)+1]??null,oe=Ct(q,"task",e.id).count,L=e.level==="issue"?"issue":"task",ce=rt(L),te=e.level==="subtask"?"136,146,255":ce.colorToken.rgb.join(", "),V=e.dueDate&&!Number.isNaN(Date.parse(e.dueDate))?ae(e.dueDate):"No due date",J=z&&z.total>0?Math.max(8,Math.round(z.completed/z.total*100)):null,b=j.git.branch,F=j.git.branchUrl,G=j.git.pullRequestNumber?`PR #${j.git.pullRequestNumber}`:null,Q=j.git.pullRequestUrl;return t.jsxs("article",{ref:x,style:{...f,"--board-card-accent":te},className:W("w-full max-w-full min-w-0 overflow-hidden rounded-[18px] p-3 shadow-[inset_0_0_0_1px_rgba(var(--board-card-accent),0.12)] transition cursor-grab active:cursor-grabbing",k&&"touch-none select-none",m&&"rotate-[0.5deg] bg-[linear-gradient(180deg,rgba(var(--board-card-accent),0.22),rgba(var(--board-card-accent),0.08))] shadow-[var(--ui-shadow-floating)]",u&&!m&&"opacity-35 shadow-[inset_0_0_0_1px_rgba(var(--board-card-accent),0.08)]",c?"bg-[linear-gradient(180deg,rgba(var(--board-card-accent),0.18),rgba(var(--board-card-accent),0.06))] shadow-[var(--ui-shadow-soft)]":"bg-[linear-gradient(180deg,rgba(var(--board-card-accent),0.08),color-mix(in_srgb,var(--ui-surface-1)_72%,transparent))]"),"data-dragging":u?"true":"false","data-testid":`task-card-${e.id}`,onClick:()=>C(e.id),...w,...D,children:[t.jsx("div",{className:"mb-3 h-px w-full rounded-full",style:{background:`linear-gradient(90deg, rgba(${te}, 0.96), rgba(${te}, 0.18))`}}),t.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[t.jsx(le,{kind:L,label:e.level,compact:!0,size:"xs",gradient:!1,className:"shrink-0"}),t.jsx(S,{size:"xs",className:"shrink-0 text-[10px] text-[var(--tertiary)]",children:e.priority}),j.actor?t.jsxs(S,{size:"xs",className:"shrink-0 bg-cyan-400/12 text-[var(--info)]",children:[t.jsx(pt,{className:"mr-1 size-3"}),j.actor]}):null]}),t.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-end gap-1.5",children:[P?t.jsx("button",{type:"button","aria-label":`Open ${e.title} actions`,className:"inline-flex size-8 items-center justify-center rounded-full bg-[var(--ui-surface-2)] text-[var(--ui-ink-soft)] transition hover:bg-[var(--ui-surface-3)] hover:text-[var(--ui-ink-strong)]",onClick:g=>{g.preventDefault(),g.stopPropagation(),P(g,e)},children:t.jsx(Xe,{className:"size-3.5"})}):null,k?t.jsxs("div",{className:"flex items-center gap-1",onClick:g=>g.stopPropagation(),children:[t.jsx("button",{type:"button","aria-label":`Move ${e.title} to the previous lane`,className:"inline-flex size-7 items-center justify-center rounded-full bg-[var(--ui-surface-2)] text-[var(--ui-ink-soft)] transition hover:bg-[var(--ui-surface-3)] hover:text-[var(--ui-ink-strong)] disabled:opacity-35",disabled:!h,onClick:()=>{h&&(B==null||B(e.id,"previous"))},children:t.jsx(Ye,{className:"size-3.5"})}),t.jsx("button",{type:"button","aria-label":`Move ${e.title} to the next lane`,className:"inline-flex size-7 items-center justify-center rounded-full bg-[var(--ui-surface-2)] text-[var(--ui-ink-soft)] transition hover:bg-[var(--ui-surface-3)] hover:text-[var(--ui-ink-strong)] disabled:opacity-35",disabled:!A,onClick:()=>{A&&(B==null||B(e.id,"next"))},children:t.jsx(Ze,{className:"size-3.5"})})]}):null,o?t.jsx("button",{type:"button","aria-label":`Stop work on ${e.title}`,className:"inline-flex size-8 items-center justify-center rounded-full bg-rose-500/16 text-[var(--danger)] transition hover:bg-rose-500/24",onClick:g=>{g.preventDefault(),g.stopPropagation(),U==null||U(o)},children:t.jsx(xt,{className:"size-3.5 fill-current"})}):e.status!=="done"?t.jsx("button",{type:"button","aria-label":`Start work on ${e.title}`,className:"inline-flex size-8 items-center justify-center rounded-full bg-[var(--primary)]/16 text-[var(--primary)] transition hover:bg-[var(--primary)]/24",onClick:g=>{g.preventDefault(),g.stopPropagation(),$==null||$(e.id)},children:t.jsx(gt,{className:"size-4 fill-current"})}):null,(X=e.splitSuggestion)!=null&&X.shouldSplit&&R?t.jsxs("button",{type:"button","aria-label":`Split ${e.title}`,className:"inline-flex items-center gap-1 rounded-full bg-amber-400/12 px-2.5 py-1 text-[10px] font-medium tracking-[0.14em] text-[var(--warning)] transition hover:bg-amber-400/18",onClick:g=>{g.preventDefault(),g.stopPropagation(),R(e.id)},children:[t.jsx(bt,{className:"size-3.5"}),"Split it"]}):null,t.jsxs("span",{className:"shrink-0 text-[11px] text-[var(--ui-ink-faint)]",children:[e.points," xp"]})]})]}),t.jsx(at,{kind:L,label:e.title,className:"max-w-full",lines:3,labelClassName:"[overflow-wrap:anywhere]"}),t.jsx("p",{className:"mt-1.5 line-clamp-3 [overflow-wrap:anywhere] text-[12px] leading-5 text-[var(--ui-ink-soft)]",children:e.description||M("common.executionBoard.noExecutionNote")}),z?t.jsxs("div",{className:"mt-3 rounded-[16px] border border-[var(--ui-border-subtle)] bg-[var(--ui-surface-1)] p-3",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 text-[11px] text-[var(--ui-ink-soft)]",children:[t.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[t.jsx(ht,{className:"size-3.5 text-[var(--info)]"}),z.total," step",z.total===1?"":"s"]}),t.jsxs("span",{className:"tabular-nums text-[var(--ui-ink-soft)]",children:[z.completed,"/",z.total]})]}),t.jsx("div",{className:"mt-2 h-1.5 overflow-hidden rounded-full bg-[var(--ui-surface-2)]",children:t.jsx("div",{className:"h-full rounded-full bg-[linear-gradient(90deg,rgba(56,189,248,0.96),rgba(125,211,252,0.62))]",style:{width:`${J??0}%`}})}),t.jsx("div",{className:"mt-2 grid gap-1.5",children:z.items.slice(0,2).map(g=>t.jsx("div",{className:"truncate text-[11px] text-[var(--ui-ink-soft)]",children:g},`${e.id}-${g}`))})]}):null,t.jsxs("div",{className:"mt-2.5 flex min-w-0 flex-wrap gap-1.5",children:[b?F?t.jsxs("a",{href:F,target:"_blank",rel:"noreferrer",className:"inline-flex min-w-0 max-w-full items-center gap-1 rounded-full border border-sky-300/18 bg-sky-400/12 px-2.5 py-1 text-[11px] text-[var(--info)] transition hover:bg-sky-400/18",onClick:Ke,children:[t.jsx(ve,{className:"size-3.5 shrink-0"}),t.jsx("span",{className:"truncate",children:b})]}):t.jsxs(S,{size:"xs",className:"min-w-0 max-w-full bg-sky-400/12 text-[var(--info)]",children:[t.jsx(ve,{className:"mr-1 size-3"}),t.jsx("span",{className:"truncate",children:b})]}):null,G?Q?t.jsxs("a",{href:Q,target:"_blank",rel:"noreferrer",className:"inline-flex min-w-0 max-w-full items-center gap-1 rounded-full border border-fuchsia-300/18 bg-fuchsia-400/12 px-2.5 py-1 text-[11px] text-[var(--primary)] transition hover:bg-fuchsia-400/18",onClick:Ke,children:[t.jsx(Ue,{className:"size-3.5 shrink-0"}),t.jsx("span",{className:"truncate",children:G})]}):t.jsxs(S,{size:"xs",className:"bg-fuchsia-400/12 text-[var(--primary)]",children:[t.jsx(Ue,{className:"mr-1 size-3"}),G]}):null,j.changedFileCount>0?t.jsxs(S,{size:"xs",className:"bg-amber-400/12 text-[var(--warning)]",children:[t.jsx(vt,{className:"mr-1 size-3"}),j.changedFileCount," file",j.changedFileCount===1?"":"s"]}):null,j.git.repository?t.jsx(S,{size:"xs",className:"bg-[var(--ui-surface-2)] text-[var(--ui-ink-soft)]",children:j.git.repository}):null]}),j.changedFilesPreview.length>0?t.jsx("div",{className:"mt-2 flex min-w-0 flex-wrap gap-1.5",children:j.changedFilesPreview.map(g=>t.jsx(S,{size:"xs",wrap:!0,className:"min-w-0 max-w-full bg-[var(--ui-surface-2)] font-mono text-[10px] text-[var(--ui-ink-soft)]",children:g},g))}):null,t.jsxs("div",{className:"mt-2.5 flex min-w-0 flex-wrap gap-1.5",children:[r?t.jsx(le,{kind:"goal",label:r.title,compact:!0,size:"xs",wrap:!0,className:"min-w-0 max-w-full"}):null,t.jsx(we,{user:e.user,compact:!0,size:"xs"}),t.jsx(zt,{entityType:"task",entityId:e.id,count:oe,compact:!0}),e.actionPointSummary?t.jsxs(S,{size:"xs",className:"bg-[var(--primary)]/12 text-[var(--primary)]",children:[Math.round(e.actionPointSummary.totalCostAp)," AP"]}):null,e.actionPointSummary?t.jsx(S,{size:"xs",className:"bg-[var(--ui-surface-2)] text-[var(--ui-ink-soft)]",children:e.actionPointSummary.costBand}):null,e.actionPointSummary?t.jsxs(S,{size:"xs",className:"bg-[var(--ui-surface-2)] text-[var(--ui-ink-soft)]",children:[Math.round(e.actionPointSummary.expectedDurationSeconds/3600)," ","h target"]}):null,e.time.totalCreditedSeconds>0?t.jsxs(S,{size:"xs",className:"bg-[var(--ui-surface-2)] text-[var(--ui-ink-soft)]",children:[Math.floor(e.time.totalCreditedSeconds/60)," min"]}):null,e.time.activeRunCount>0?t.jsxs(S,{size:"xs",className:"bg-emerald-500/12 text-[var(--success)]",children:[e.time.activeRunCount," live"]}):null,l.slice(0,2).map(g=>t.jsx(S,{size:"xs",className:"bg-[var(--ui-surface-2)]",style:{color:g.color},children:g.name},g.id))]}),t.jsxs("div",{className:"mt-2.5 flex min-w-0 items-center justify-between gap-2 text-[11px] text-[var(--ui-ink-faint)]",children:[t.jsxs("span",{className:"min-w-0 truncate",children:[e.effort," / ",e.energy]}),t.jsxs("div",{className:"flex min-w-0 shrink-0 items-center gap-2 text-right",children:[e.status==="done"&&_?t.jsx("button",{type:"button",className:"rounded-full bg-[var(--ui-surface-2)] px-3 py-1 text-[10px] tracking-[0.16em] text-[var(--ui-ink-strong)] transition hover:bg-[var(--ui-surface-3)]",onClick:g=>{g.preventDefault(),g.stopPropagation(),_(e.id)},children:M("common.executionBoard.reopen")}):null,t.jsx("span",{children:V})]})]})]})}function ge(e){const{task:r,sortableId:l}=e,{attributes:o,listeners:c,setNodeRef:u,transform:m,transition:f,isDragging:x}=et({id:l,data:{type:"task",taskId:r.id,status:r.status}});return t.jsx(lt,{...e,setNodeRef:u,dragAttributes:o,dragListeners:c,isDragging:x,isMobile:e.isMobile,onStartTask:e.onStartTask,onStopTask:e.onStopTask,onStepTask:e.onStepTask,onSplitTask:e.onSplitTask,notesSummaryByEntity:e.notesSummaryByEntity,style:{transform:tt.Transform.toString(m),transition:f}})}function ot({project:e,goal:r,isDragging:l=!1,isOverlay:o=!1,style:c,setNodeRef:u,dragAttributes:m,dragListeners:f,isMobile:x=!1,onStepProject:w,onOpenMenu:D}){const{formatDate:k}=ye(),C=I[I.indexOf(e.workflowStatus)-1]??null,$=I[I.indexOf(e.workflowStatus)+1]??null,_=rt("project").colorToken.rgb.join(", "),B=e.workflowStatus.replaceAll("_"," "),R=e.status.replaceAll("_"," "),P=Bt(e.updatedAt),q=P?k(P):"No recent update";return t.jsxs("article",{ref:u,style:{...c,"--board-card-accent":_},className:W("w-full max-w-full min-w-0 overflow-hidden rounded-[18px] p-3 shadow-[inset_0_0_0_1px_rgba(var(--board-card-accent),0.12)] transition cursor-grab active:cursor-grabbing",x&&"touch-none select-none",o&&"rotate-[0.5deg] bg-[linear-gradient(180deg,rgba(var(--board-card-accent),0.22),rgba(var(--board-card-accent),0.08))] shadow-[var(--ui-shadow-floating)]",l&&!o&&"opacity-35 shadow-[inset_0_0_0_1px_rgba(var(--board-card-accent),0.08)]",!l&&!o&&"bg-[linear-gradient(180deg,rgba(var(--board-card-accent),0.08),color-mix(in_srgb,var(--ui-surface-1)_72%,transparent))]"),"data-testid":`project-card-${e.id}`,...m,...f,children:[t.jsx("div",{className:"mb-3 h-px w-full rounded-full",style:{background:`linear-gradient(90deg, rgba(${_}, 0.96), rgba(${_}, 0.18))`}}),t.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[t.jsx(le,{kind:"project",label:"project",compact:!0,size:"xs",gradient:!1,className:"shrink-0"}),t.jsx(S,{size:"xs",className:"shrink-0 bg-[var(--primary)]/12 text-[var(--primary)]",children:B}),t.jsx(S,{size:"xs",className:"shrink-0 bg-[var(--ui-surface-2)] text-[var(--ui-ink-soft)]",children:R})]}),t.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-end gap-1.5",children:[D?t.jsx("button",{type:"button","aria-label":`Open ${e.title} actions`,className:"inline-flex size-8 items-center justify-center rounded-full bg-[var(--ui-surface-2)] text-[var(--ui-ink-soft)] transition hover:bg-[var(--ui-surface-3)] hover:text-[var(--ui-ink-strong)]",onClick:M=>{M.preventDefault(),M.stopPropagation(),D(M,e)},children:t.jsx(Xe,{className:"size-3.5"})}):null,x?t.jsxs("div",{className:"flex items-center gap-1",onClick:M=>M.stopPropagation(),children:[t.jsx("button",{type:"button","aria-label":`Move ${e.title} to the previous lane`,className:"inline-flex size-7 items-center justify-center rounded-full bg-[var(--ui-surface-2)] text-[var(--ui-ink-soft)] transition hover:bg-[var(--ui-surface-3)] hover:text-[var(--ui-ink-strong)] disabled:opacity-35",disabled:!C,onClick:()=>{C&&(w==null||w(e.id,"previous"))},children:t.jsx(Ye,{className:"size-3.5"})}),t.jsx("button",{type:"button","aria-label":`Move ${e.title} to the next lane`,className:"inline-flex size-7 items-center justify-center rounded-full bg-[var(--ui-surface-2)] text-[var(--ui-ink-soft)] transition hover:bg-[var(--ui-surface-3)] hover:text-[var(--ui-ink-strong)] disabled:opacity-35",disabled:!$,onClick:()=>{$&&(w==null||w(e.id,"next"))},children:t.jsx(Ze,{className:"size-3.5"})})]}):null]})]}),t.jsx(at,{kind:"project",label:e.title,className:"max-w-full",lines:3,labelClassName:"[overflow-wrap:anywhere]"}),t.jsx("p",{className:"mt-1.5 line-clamp-3 [overflow-wrap:anywhere] text-[12px] leading-5 text-[var(--ui-ink-soft)]",children:e.description||"PRD-backed initiative spanning multiple work items."}),t.jsxs("div",{className:"mt-2.5 flex min-w-0 flex-wrap gap-1.5",children:[r?t.jsx(le,{kind:"goal",label:r.title,compact:!0,size:"xs",wrap:!0,className:"min-w-0 max-w-full"}):null,t.jsx(we,{user:e.user,compact:!0,size:"xs"}),(e.assignees??[]).slice(0,2).map(M=>t.jsx(we,{user:M,compact:!0,size:"xs"},M.id)),t.jsxs(S,{size:"xs",className:"bg-[var(--primary)]/12 text-[var(--primary)]",children:[e.progress,"% progress"]}),t.jsxs(S,{size:"xs",className:"bg-[var(--ui-surface-2)] text-[var(--ui-ink-soft)]",children:[e.totalTasks," linked tasks"]})]}),t.jsxs("div",{className:"mt-2.5 flex min-w-0 items-center justify-between gap-2 text-[11px] text-[var(--ui-ink-faint)]",children:[t.jsx("span",{className:"min-w-0 truncate",children:e.goalTitle}),t.jsx("span",{children:q})]})]})}function be(e){const{project:r,sortableId:l}=e,{attributes:o,listeners:c,setNodeRef:u,transform:m,transition:f,isDragging:x}=et({id:l,data:{type:"project",projectId:r.id,status:r.workflowStatus}});return t.jsx(ot,{...e,setNodeRef:u,dragAttributes:o,dragListeners:c,isDragging:x,style:{transform:tt.Transform.toString(m),transition:f}})}function We({droppableId:e,status:r,title:l,detail:o,count:c,dragging:u,children:m}){const{setNodeRef:f,isOver:x}=Te({id:e,data:{type:"lane",status:r}});return t.jsx("div",{ref:f,className:W("w-full max-w-full min-w-0 overflow-hidden rounded-[24px] transition",x&&"scale-[1.005]"),"data-lane-id":r,"data-testid":`kanban-lane-${r}`,"data-lane-hover":x?"true":"false",children:t.jsxs(it,{className:W("h-full w-full max-w-full min-w-0 overflow-hidden p-3 transition-[background-color,box-shadow,border-color,transform]",u&&"border border-[var(--ui-border-subtle)]",x?"border border-[color-mix(in_srgb,var(--info)_38%,transparent)] bg-[var(--ui-info-soft)] shadow-[var(--ui-shadow-soft)]":"border border-transparent"),children:[t.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"type-label text-[var(--ui-ink-faint)]",children:o}),t.jsx("h3",{className:"mt-1 break-words text-[1.45rem] leading-[1] text-[var(--ui-ink-strong)]",children:l})]}),t.jsx("div",{className:"shrink-0 font-display text-[1.45rem] text-[var(--primary)]",children:c})]}),t.jsx("div",{className:W("grid w-full max-w-full min-w-0 min-h-48 content-start gap-2 rounded-[18px] p-2 transition",x?"bg-[var(--ui-info-soft)]":"bg-[var(--ui-surface-1)]"),children:m})]})})}function Pt({title:e,detail:r,children:l}){return t.jsxs("div",{className:"rounded-[20px] border border-[color-mix(in_srgb,var(--info)_24%,transparent)] bg-[var(--ui-info-soft)] p-2.5 shadow-[inset_0_0_0_1px_var(--ui-border-subtle)]",children:[t.jsx("div",{className:"mb-2 flex items-start justify-between gap-3 px-1",children:t.jsxs("div",{className:"min-w-0",children:[t.jsxs("div",{className:"inline-flex items-center gap-2 text-[11px] uppercase tracking-[0.16em] text-[var(--info)]/86",children:[t.jsx(ve,{className:"size-3.5"}),t.jsx("span",{className:"truncate",children:e})]}),r?t.jsx("div",{className:"mt-1 text-[11px] text-[var(--ui-ink-faint)]",children:r}):null]})}),t.jsx("div",{className:"grid gap-2",children:l})]})}function qt({droppableId:e,title:r,detail:l}){const{setNodeRef:o,isOver:c}=Te({id:e,data:{type:"trash"}});return t.jsx("div",{ref:o,className:W("pointer-events-auto fixed right-4 top-4 z-50 w-[min(18rem,calc(100vw-2rem))] rounded-[28px] border px-5 py-4 shadow-[var(--ui-shadow-floating)] backdrop-blur-2xl transition lg:right-6 lg:top-6",c?"border-[color-mix(in_srgb,var(--danger)_38%,transparent)] bg-[var(--ui-danger-soft)] text-[var(--ui-ink-strong)] scale-[1.02]":"border-[var(--ui-border-subtle)] bg-[var(--ui-surface-popover)] text-[var(--ui-ink-medium)]"),"data-testid":"kanban-trash-dropzone","data-trash-hover":c?"true":"false",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:W("flex size-12 items-center justify-center rounded-full border transition",c?"border-[var(--ui-border-strong)] bg-[var(--ui-surface-3)]":"border-[var(--ui-border-subtle)] bg-[var(--ui-surface-1)]"),children:t.jsx(je,{className:"size-5"})}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"font-label text-[11px] uppercase tracking-[0.2em] text-[var(--ui-ink-soft)]",children:"Bin"}),t.jsx("div",{className:"mt-1 text-base font-medium text-[var(--ui-ink-strong)]",children:r}),t.jsx("div",{className:"mt-1 text-sm leading-5 text-[var(--ui-ink-soft)]",children:l})]})]})})}function Ft({tasks:e,projects:r=[],activeRuns:l=[],goals:o,tags:c,selectedTaskId:u,onMove:m,onMoveProject:f,onSelectTask:x,onStartTask:w,onStopTask:D,onQuickReopenTask:k,onDeleteTask:C,onOpenProject:$,onOpenTask:U,onEditProject:_,onEditTask:B,onLinkProject:R,onLinkTask:P,onCreateIssueForProject:q,onCreateTaskForIssue:M,onCreateSubtaskForTask:ae,onSplitTask:j,notesSummaryByEntity:z}){var _e,Be;const{t:h}=ye(),A=N.useId(),oe=`${A}:trash`,[L,ce]=N.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(max-width: 1023px)").matches),te=wt(jt(It,{activationConstraint:{distance:6}})),[V,J]=N.useState(null),[b,F]=N.useState(null),[G,Q]=N.useState(null),[X,g]=N.useState(null),[Ne,ct]=N.useState(()=>typeof window>"u"?!1:window.localStorage.getItem("forge.kanban-skip-delete-confirmation")==="true"),[ke,ne]=N.useState(!1),[Se,Y]=N.useState({}),[Ie,ie]=N.useState({}),se={backlog:{title:h("common.executionBoard.laneBacklogTitle"),detail:h("common.executionBoard.laneBacklogDetail")},focus:{title:h("common.executionBoard.laneFocusTitle"),detail:h("common.executionBoard.laneFocusDetail")},in_progress:{title:h("common.executionBoard.laneProgressTitle"),detail:h("common.executionBoard.laneProgressDetail")},blocked:{title:h("common.executionBoard.laneBlockedTitle"),detail:h("common.executionBoard.laneBlockedDetail")},done:{title:h("common.executionBoard.laneDoneTitle"),detail:h("common.executionBoard.laneDoneDetail")}},Z=N.useMemo(()=>e.map(i=>{const a=Se[i.id];return a?{...i,status:a}:i}),[Se,e]),T=N.useMemo(()=>r.map(i=>{const a=Ie[i.id];return a?{...i,workflowStatus:a}:i}),[Ie,r]),Ce=N.useMemo(()=>{const i=new Map;for(const a of l){if(a.status!=="active")continue;const n=i.get(a.taskId);(!n||a.isCurrent||a.updatedAt>n.updatedAt)&&i.set(a.taskId,a)}return i},[l]),K=N.useMemo(()=>[...T.map(i=>({kind:"project",id:i.id,status:i.workflowStatus,project:i,goal:o.find(a=>a.id===i.goalId)})),...Z.map(i=>({kind:"task",id:i.id,status:i.status,task:i,goal:o.find(a=>a.id===i.goalId),tags:i.tagIds.map(a=>c.find(n=>n.id===a)).filter(Boolean),activeRun:Ce.get(i.id)??null}))],[Ce,T,Z,o,c]),O=V?K.find(i=>i.id===V)??null:null,dt=N.useMemo(()=>{if(!b)return[];if(b.kind==="project"){const a=T.find(n=>n.id===b.entityId);return a?[{id:"open-project",label:"Open",description:"Jump to the project detail view.",icon:Je,onSelect:()=>$==null?void 0:$(a.id)},{id:"edit-project",label:"Edit",description:"Open the guided project editor.",icon:Fe,onSelect:()=>_==null?void 0:_(a.id)},{id:"link-project",label:"Link",description:"Open the anchor step to relink the project to its goal.",icon:Qe,onSelect:()=>R==null?void 0:R(a.id)},{id:"create-issue",label:"Create issue",description:"Break this project into a new vertical slice issue.",icon:he,onSelect:()=>q==null?void 0:q(a.id)},...I.filter(n=>n!==a.workflowStatus).map(n=>({id:`move-project-${n}`,label:`Move to ${n.replaceAll("_"," ")}`,description:"Update the project workflow lane without leaving the board.",onSelect:()=>void(f==null?void 0:f(a.id,n))}))]:[]}const i=Z.find(a=>a.id===b.entityId);return i?Mt({task:i,onOpenTask:U,onEditTask:B,onLinkTask:P,onCreateTaskForIssue:M,onCreateSubtaskForTask:ae,onMove:m,onDeleteTask:C,deletePendingTaskId:X,onRequestDelete:$e}):[]},[T,Z,b,q,ae,M,_,B,R,P,m,f,C,$,U,X,Ne]);function ze(i){var n;if(i.length===0)return t.jsx("div",{className:"w-full max-w-full rounded-[18px] border border-dashed border-[var(--ui-border-subtle)] px-4 py-8 text-center text-sm text-[var(--ui-ink-faint)]",children:h("common.executionBoard.emptyLane")});if(((n=i[0])==null?void 0:n.status)!=="in_progress")return i.map(d=>d.kind==="task"?t.jsx(ge,{sortableId:`${A}:task:${d.task.id}`,task:d.task,goal:d.goal,tags:d.tags,activeRun:d.activeRun,isSelected:u===d.task.id,isMobile:L,onSelect:x,onStartTask:w,onStopTask:D,onQuickReopen:k,onStepTask:de,onOpenMenu:me,onSplitTask:j,notesSummaryByEntity:z},d.task.id):t.jsx(be,{sortableId:`${A}:project:${d.project.id}`,project:d.project,goal:d.goal,isMobile:L,onStepProject:ue,onOpenMenu:fe},d.project.id));const a=new Map;for(const d of i){if(d.kind!=="task"||!d.activeRun){const E=a.get("ungrouped");E?E.items.push(d):a.set("ungrouped",{title:"Active work",detail:"Tasks in progress without a tracked branch",items:[d]});continue}const p=nt(d.task,d.activeRun),s=[d.activeRun.actor,p.git.repository??"",p.git.branch??""].join("::"),v=a.get(s);if(v){v.items.push(d);continue}a.set(s,{title:Ot(d.activeRun,p.git.branch),detail:Ut(d.activeRun,p.git.repository),items:[d]})}return Array.from(a.entries()).map(([d,p])=>d==="ungrouped"?p.items.map(s=>s.kind==="task"?t.jsx(ge,{sortableId:`${A}:task:${s.task.id}`,task:s.task,goal:s.goal,tags:s.tags,activeRun:s.activeRun,isSelected:u===s.task.id,isMobile:L,onSelect:x,onStartTask:w,onStopTask:D,onQuickReopen:k,onStepTask:de,onOpenMenu:me,onSplitTask:j,notesSummaryByEntity:z},s.task.id):t.jsx(be,{sortableId:`${A}:project:${s.project.id}`,project:s.project,goal:s.goal,isMobile:L,onStepProject:ue,onOpenMenu:fe},s.project.id)):t.jsx(Pt,{title:p.title,detail:p.detail,children:p.items.map(s=>s.kind==="task"?t.jsx(ge,{sortableId:`${A}:task:${s.task.id}`,task:s.task,goal:s.goal,tags:s.tags,activeRun:s.activeRun,isSelected:u===s.task.id,isMobile:L,onSelect:x,onStartTask:w,onStopTask:D,onQuickReopen:k,onStepTask:de,onOpenMenu:me,onSplitTask:j,notesSummaryByEntity:z},s.task.id):t.jsx(be,{sortableId:`${A}:project:${s.project.id}`,project:s.project,goal:s.goal,isMobile:L,onStepProject:ue,onOpenMenu:fe},s.project.id))},d))}N.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const i=window.matchMedia("(max-width: 1023px)"),a=n=>{ce(n?n.matches:i.matches)};return a(),typeof i.addEventListener=="function"?(i.addEventListener("change",a),()=>i.removeEventListener("change",a)):(i.addListener(a),()=>i.removeListener(a))},[]),N.useEffect(()=>{if(!V){document.body.style.cursor="";return}return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[V]),N.useEffect(()=>{Y(i=>{const a=new Set(e.map(p=>p.id));let n=!1;const d={};for(const[p,s]of Object.entries(i)){const v=e.find(E=>E.id===p);if(!a.has(p)||!v||v.status===s){n=!0;continue}d[p]=s}return n?d:i})},[e]),N.useEffect(()=>{ie(i=>{const a=new Set(r.map(p=>p.id));let n=!1;const d={};for(const[p,s]of Object.entries(i)){const v=r.find(E=>E.id===p);if(!a.has(p)||!v||v.workflowStatus===s){n=!0;continue}d[p]=s}return n?d:i})},[r]);function ut(i){var d,p;const a=(d=i.active.data.current)==null?void 0:d.taskId,n=(p=i.active.data.current)==null?void 0:p.projectId;typeof a=="string"?J(a):typeof n=="string"&&J(n)}const mt=i=>{ct(i),typeof window<"u"&&window.localStorage.setItem("forge.kanban-skip-delete-confirmation","true")},De=async(i,a)=>{if(C){g(i.id);try{a&&mt(!0),await C(i.id),Q(null),ne(!1),Y(n=>{const d={...n};return delete d[i.id],d})}finally{g(null)}}};function $e(i){if(C){if(Ne){De(i,!1);return}ne(!1),Q(i)}}async function ft(i){var Me,Ae,Le,Ee,Re,Oe;const{active:a,over:n}=i;if(J(null),!n||a.id===n.id)return;const d=typeof((Me=a.data.current)==null?void 0:Me.taskId)=="string"?a.data.current.taskId:null,p=typeof((Ae=a.data.current)==null?void 0:Ae.projectId)=="string"?a.data.current.projectId:null,s=(d?K.find(y=>y.kind==="task"&&y.id===d):null)??(p?K.find(y=>y.kind==="project"&&y.id===p):null);if(!s)return;if(((Le=n.data.current)==null?void 0:Le.type)==="trash"){if(s.kind!=="task"||!C)return;$e(s.task);return}const v=typeof((Ee=n.data.current)==null?void 0:Ee.status)=="string"?n.data.current.status:null,E=typeof((Re=n.data.current)==null?void 0:Re.taskId)=="string"?n.data.current.taskId:null,H=typeof((Oe=n.data.current)==null?void 0:Oe.projectId)=="string"?n.data.current.projectId:null,pe=(E?K.find(y=>y.kind==="task"&&y.id===E):null)??(H?K.find(y=>y.kind==="project"&&y.id===H):null),ee=v??(pe==null?void 0:pe.status)??s.status;if(!(ee===s.status||!I.includes(ee))){if(s.kind==="task"){Y(y=>({...y,[s.task.id]:ee}));try{await m(s.task.id,ee)}catch(y){throw Y(xe=>{const re={...xe};return delete re[s.task.id],re}),y}return}if(f){ie(y=>({...y,[s.project.id]:ee}));try{await f(s.project.id,ee)}catch(y){throw ie(xe=>{const re={...xe};return delete re[s.project.id],re}),y}}}}async function de(i,a){const n=Z.find(v=>v.id===i);if(!n)return;const d=I.indexOf(n.status),p=a==="previous"?d-1:d+1,s=I[p]??null;if(!(!s||s===n.status)){Y(v=>({...v,[n.id]:s}));try{await m(n.id,s)}catch(v){throw Y(E=>{const H={...E};return delete H[n.id],H}),v}}}async function ue(i,a){const n=T.find(v=>v.id===i);if(!n||!f)return;const d=I.indexOf(n.workflowStatus),p=a==="previous"?d-1:d+1,s=I[p]??null;if(!(!s||s===n.workflowStatus)){ie(v=>({...v,[n.id]:s}));try{await f(n.id,s)}catch(v){throw ie(E=>{const H={...E};return delete H[n.id],H}),v}}}function me(i,a){const n=i.currentTarget.getBoundingClientRect();F({kind:"task",entityId:a.id,position:{x:n.right-8,y:n.bottom+8}})}function fe(i,a){const n=i.currentTarget.getBoundingClientRect();F({kind:"project",entityId:a.id,position:{x:n.right-8,y:n.bottom+8}})}return t.jsxs(yt,{sensors:te,collisionDetection:Rt,onDragStart:ut,onDragCancel:()=>J(null),onDragEnd:i=>void ft(i),children:[(O==null?void 0:O.kind)==="task"&&C?t.jsx(qt,{droppableId:oe,title:h("common.executionBoard.deleteDropTitle"),detail:h("common.executionBoard.deleteDropDetail")}):null,t.jsx("div",{className:"w-full max-w-full min-w-0 pb-2",children:L?t.jsx("div",{className:"grid w-full max-w-full min-w-0 gap-2",children:I.map(i=>{const a=K.filter(n=>n.status===i);return t.jsx(Pe,{items:a.map(n=>`${A}:${n.kind}:${n.id}`),strategy:qe,children:t.jsx(We,{droppableId:`${A}:lane:${i}`,status:i,title:se[i].title,detail:se[i].detail,count:a.length,dragging:V!==null,children:ze(a)})},i)})}):t.jsx("div",{className:"grid w-full min-w-0 gap-0.5 xl:grid-cols-[repeat(5,minmax(0,1fr))]",children:I.map(i=>{const a=K.filter(n=>n.status===i);return t.jsx(Pe,{items:a.map(n=>`${A}:${n.kind}:${n.id}`),strategy:qe,children:t.jsx(We,{droppableId:`${A}:lane:${i}`,status:i,title:se[i].title,detail:se[i].detail,count:a.length,dragging:V!==null,children:ze(a)})},i)})})}),t.jsx(Nt,{adjustScale:!1,dropAnimation:null,children:O?t.jsx("div",{className:"w-[20rem] max-w-[calc(100vw-2rem)]",children:O.kind==="task"?t.jsx(lt,{task:O.task,goal:O.goal,tags:O.tags,activeRun:O.activeRun,isSelected:u===O.task.id,isDragging:!0,isOverlay:!0,isMobile:L,onSelect:()=>{},onStartTask:w,onSplitTask:j,notesSummaryByEntity:z}):t.jsx(ot,{project:O.project,goal:O.goal,isDragging:!0,isOverlay:!0,isMobile:L})}):null}),t.jsx(Dt,{open:b!==null,title:(b==null?void 0:b.kind)==="project"?((_e=T.find(i=>i.id===b.entityId))==null?void 0:_e.title)??"Project actions":((Be=Z.find(i=>i.id===(b==null?void 0:b.entityId)))==null?void 0:Be.title)??"Work item actions",subtitle:(b==null?void 0:b.kind)==="project"?"Edit, relink, move, or break this project into issues.":"Edit, relink, move, or create the next child work item.",items:dt,position:(b==null?void 0:b.position)??null,onClose:()=>F(null)}),G?t.jsx("div",{className:"surface-overlay fixed inset-0 z-[60] flex items-center justify-center p-4 backdrop-blur-xl",children:t.jsxs(it,{className:"surface-modal-panel w-full max-w-md",children:[t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("div",{className:"mt-1 flex size-11 shrink-0 items-center justify-center rounded-full bg-[var(--ui-danger-soft)] text-[var(--danger)]",children:t.jsx(je,{className:"size-5"})}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"font-display text-[1.35rem] leading-tight text-[var(--ui-ink-strong)]",children:h("common.executionBoard.deleteConfirmTitle")}),t.jsx("div",{className:"mt-2 text-sm leading-6 text-[var(--ui-ink-soft)]",children:h("common.executionBoard.deleteConfirmDescription",{title:G.title})})]})]}),t.jsxs("label",{className:"mt-5 flex items-center gap-3 rounded-[18px] bg-[var(--ui-surface-2)] px-4 py-3 text-sm text-[var(--ui-ink-medium)]",children:[t.jsx("input",{type:"checkbox",checked:ke,onChange:i=>ne(i.target.checked),className:"size-4 rounded border-[var(--ui-border-strong)] bg-transparent text-[var(--primary)]"}),t.jsx("span",{children:h("common.executionBoard.deleteConfirmCheckbox")})]}),t.jsxs("div",{className:"mt-5 flex flex-wrap justify-end gap-3",children:[t.jsx(Ve,{variant:"secondary",onClick:()=>{Q(null),ne(!1)},children:h("common.executionBoard.deleteConfirmCancel")}),t.jsx(Ve,{className:"bg-[var(--ui-danger-soft)] text-[var(--danger)] shadow-[var(--ui-shadow-soft)]",pending:X===G.id,pendingLabel:h("common.executionBoard.deletingTask"),onClick:()=>void De(G,ke),children:h("common.executionBoard.deleteConfirmSubmit")})]})]})}):null]})}export{Ft as E};
@@ -1 +0,0 @@
1
- import{r as p,j as e,aC as b,b_ as P,bW as C}from"./vendor-BwL6m4SE.js";import{P as S}from"./page-hero-DvrM83_C.js";import{E as G}from"./entity-note-count-link-Bs1aKYyD.js";import{C as k,B as y,b as w,E as h,k as l,c as N,d as E,h as z,R as L,P as T}from"./index-FpGANF9S.js";import{GoalDialog as B}from"./goal-dialog-15hD8EBp.js";import{P as I}from"./pill-cluster-DYI3Ibj8.js";import{b as R,f as D,P as F}from"./project-collections-B9nr-Ts-.js";import{U}from"./user-badge-ByhC6bMU.js";import{g as M}from"./user-ownership-DJGl4rAj.js";import"./state-Bpe5dF3T.js";import"./motion-DcgUnXhY.js";import"./ui-B9TWEtCx.js";import"./board-CuxQRKPJ.js";import"./forms-D1qJ3oOP.js";import"./question-flow-dialog-Ded2E85L.js";import"./inline-note-fields-COgzxr_7.js";import"./user-select-field-fx129Uh6.js";import"./schemas-Db29G8NU.js";function O({goals:t,tags:r,users:o,defaultUserId:d=null,pending:c=!1,onCreate:n,onUpdate:v}){const[f,m]=p.useState(!1),[g,u]=p.useState(null),a=t.find(s=>s.id===g)??null;return e.jsxs(e.Fragment,{children:[e.jsxs(k,{children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"font-label text-[11px] uppercase tracking-[0.18em] text-[var(--ui-ink-faint)]",children:"Goal arcs"}),e.jsx("h3",{className:"mt-2 font-display text-3xl text-[var(--ui-ink-strong)]",children:"Strategic arcs before tickets"}),e.jsx("p",{className:"mt-3 max-w-3xl text-sm leading-7 text-[var(--ui-ink-soft)]",children:"This is the long-horizon map. Each arc shows why it matters, how much ground has been covered, and which project should move next."})]}),e.jsx(y,{onClick:()=>{u(null),m(!0)},children:"Create goal"})]}),e.jsxs("div",{className:"mt-5 grid gap-3 xl:grid-cols-2",children:[t.length===0?e.jsx("div",{className:"rounded-[24px] bg-[var(--ui-surface-2)] p-5 text-sm leading-7 text-[var(--ui-ink-soft)] xl:col-span-2",children:"Start with a life goal. Once the destination is clear, you can attach projects and then fill those projects with tasks."}):null,t.map(s=>{const x=`${Math.max(6,Math.min(100,s.progress))}%`;return e.jsxs(b,{to:`/goals/${s.id}`,className:"rounded-[24px] border border-[var(--ui-border-subtle)] bg-[var(--ui-surface-1)] p-4 transition hover:bg-[var(--ui-surface-hover)]",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx(w,{kind:"goal",compact:!0,gradient:!1}),e.jsx("div",{className:"mt-2",children:e.jsx(h,{kind:"goal",label:s.title,variant:"heading",size:"lg",showKind:!1,lines:2})}),e.jsx("p",{className:"mt-2 text-sm leading-6 text-[var(--ui-ink-soft)]",children:s.description||"No strategic note attached yet."})]}),e.jsx("button",{className:"rounded-full bg-[var(--ui-surface-2)] p-2 text-[var(--ui-ink-soft)] transition hover:bg-[var(--ui-surface-hover)] hover:text-[var(--ui-ink-strong)]",type:"button",onClick:i=>{i.preventDefault(),i.stopPropagation(),u(s.id),m(!0)},children:e.jsx(P,{className:"size-4"})})]}),e.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[e.jsx(l,{className:"bg-[var(--ui-surface-2)] text-[var(--ui-ink-soft)]",children:s.horizon}),e.jsx(l,{className:s.status==="active"?"text-[var(--success)]":s.status==="paused"?"text-[var(--warning)]":"text-[var(--tertiary)]",children:s.status}),e.jsxs(l,{className:"bg-[var(--ui-surface-2)] text-[var(--ui-ink-soft)]",children:[s.earnedPoints," / ",s.targetPoints," xp"]}),e.jsxs(l,{className:"bg-[var(--ui-surface-2)] text-[var(--ui-ink-soft)]",children:[s.totalTasks," tasks"]})]}),e.jsx("div",{className:"mt-4 h-1.5 rounded-full bg-[var(--ui-surface-2)]",children:e.jsx("div",{className:"h-full rounded-full bg-[var(--primary)]",style:{width:x}})}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:s.tags.map(i=>e.jsx(l,{className:"bg-[var(--ui-surface-2)] text-[var(--ui-ink-soft)]",children:i.name},i.id))}),e.jsxs("div",{className:"mt-3 flex items-center justify-between gap-3 text-[11px] uppercase tracking-[0.16em] text-[var(--ui-ink-faint)]",children:[e.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.momentumLabel}),e.jsxs("span",{className:"inline-flex shrink-0 items-center gap-2",style:{color:s.themeColor},children:["Open arc",e.jsx(C,{className:"size-3.5"})]})]})]},s.id)})]})]}),e.jsx(B,{open:f,pending:c,editingGoal:a,tags:r,users:o,defaultUserId:d,onOpenChange:s=>{m(s),s||u(null)},onSubmit:async(s,x)=>{if(x){await v(x,s);return}await n(s)}})]})}function $({eyebrow:t,title:r,description:o,meta:d,actions:c,className:n}){return e.jsxs("div",{className:N("flex flex-wrap items-start justify-between gap-3",n),children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[t?e.jsx("div",{className:"font-label text-[11px] uppercase tracking-[0.18em] text-[var(--ui-ink-faint)]",children:t}):null,e.jsxs("div",{className:N("min-w-0",t&&"mt-2"),children:[e.jsx("div",{className:"min-w-0 text-lg text-[var(--ui-ink-strong)]",children:r}),o?e.jsx("div",{className:"mt-2 text-sm leading-6 text-[var(--ui-ink-soft)]",children:o}):null]})]}),d||c?e.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-end gap-2",children:[d,c]}):null]})}function ne(){const t=E(),[r,o]=p.useState("active"),[d,c]=p.useState(null),n=t.snapshot.dashboard.goals.length>0,v=R(t.snapshot.dashboard.projects),f=D(t.snapshot.dashboard.projects,r),m=M(t.selectedUserIds),g=new Map(t.snapshot.dashboard.goals.map(a=>[a.id,f.filter(s=>s.goalId===a.id)])),u=async a=>{c(a);try{await t.patchProject(a,{status:"active"})}finally{c(null)}};return e.jsxs("div",{className:"grid gap-5",children:[e.jsx(S,{entityKind:"goal",title:e.jsx(h,{kind:"goal",label:"Life Goals",variant:"heading",size:"lg"}),titleText:"Life Goals",description:"Life goals are the destinations you care about over the long run. Each one can hold several projects, and those projects turn direction into real work.",badge:`${t.snapshot.dashboard.goals.length} active goals`,actions:n?e.jsxs("div",{className:"inline-flex min-h-10 items-center rounded-full border border-[var(--ui-border-subtle)] bg-[var(--ui-surface-2)] px-4 py-2 text-sm whitespace-nowrap text-[var(--ui-ink-soft)]",children:[t.snapshot.dashboard.projects.length," live project",t.snapshot.dashboard.projects.length===1?"":"s"," ","attached"]}):null}),e.jsx(O,{goals:t.snapshot.dashboard.goals,tags:t.snapshot.tags,users:t.snapshot.users,defaultUserId:m,onCreate:t.createGoal,onUpdate:t.patchGoal}),n?e.jsx(F,{value:r,counts:v,onChange:o}):null,n?null:e.jsx(z,{eyebrow:"Life goals",title:"No life goals yet",description:"Define the first long-horizon direction above so Forge can attach projects, tasks, momentum, and evidence to something meaningful."}),n?e.jsx("div",{className:"grid gap-4",children:t.snapshot.dashboard.goals.map(a=>{const s=g.get(a.id)??[],x=L(t.snapshot.dashboard.notesSummaryByEntity,"goal",a.id);return e.jsx(b,{to:`/goals/${a.id}`,className:"min-w-0 overflow-hidden rounded-[28px] border border-[var(--ui-border-subtle)] bg-[var(--ui-surface-1)] p-4 transition hover:bg-[var(--ui-surface-hover)] sm:p-5",children:e.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1.15fr)_minmax(0,0.85fr)] xl:gap-5",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs(I,{children:[a.tags.slice(0,3).map(i=>e.jsx(l,{className:"bg-[var(--ui-surface-2)]",style:{color:i.color},children:i.name},i.id)),e.jsx(l,{className:"bg-[var(--ui-surface-2)] text-[var(--ui-ink-soft)]",children:a.horizon}),e.jsx(U,{user:a.user,compact:!0})]}),e.jsx("div",{className:"mt-4",children:e.jsx(h,{kind:"goal",label:a.title,variant:"heading",size:"xl",lines:2})}),e.jsx("p",{className:"mt-3 max-w-2xl text-sm leading-7 text-[var(--ui-ink-soft)]",children:a.description}),e.jsxs("div",{className:"mt-4 grid gap-3 sm:grid-cols-3",children:[e.jsxs("div",{className:"rounded-[18px] bg-[var(--ui-surface-2)] px-3.5 py-3",children:[e.jsx("div",{className:"font-label text-[11px] uppercase tracking-[0.16em] text-[var(--ui-ink-faint)]",children:"Progress"}),e.jsxs("div",{className:"mt-2 text-xl text-[var(--ui-ink-strong)]",children:[a.progress,"%"]})]}),e.jsxs("div",{className:"rounded-[18px] bg-[var(--ui-surface-2)] px-3.5 py-3",children:[e.jsx("div",{className:"font-label text-[11px] uppercase tracking-[0.16em] text-[var(--ui-ink-faint)]",children:"Tasks done"}),e.jsxs("div",{className:"mt-2 text-xl text-[var(--ui-ink-strong)]",children:[a.completedTasks,"/",Math.max(a.totalTasks,1)]})]}),e.jsxs("div",{className:"rounded-[18px] bg-[var(--ui-surface-2)] px-3.5 py-3",children:[e.jsx("div",{className:"font-label text-[11px] uppercase tracking-[0.16em] text-[var(--ui-ink-faint)]",children:"XP banked"}),e.jsx("div",{className:"mt-2 text-xl text-[var(--ui-ink-strong)]",children:a.earnedPoints})]})]}),e.jsx("div",{className:"mt-4",children:e.jsx(T,{value:a.progress})}),e.jsx("div",{className:"mt-4",children:e.jsx(G,{entityType:"goal",entityId:a.id,count:x.count})})]}),e.jsxs("div",{className:"min-w-0 rounded-[24px] bg-[var(--ui-surface-2)] p-4",children:[e.jsx($,{title:"Projects carrying this direction",meta:e.jsx("div",{className:"shrink-0 text-sm text-[var(--ui-ink-faint)]",children:s.length}),className:"gap-2"}),s.length===0?e.jsx("div",{className:"mt-4 text-sm leading-6 text-[var(--ui-ink-soft)]",children:r==="active"?"No active project is attached yet. Create one so this direction starts producing visible work.":"No projects in this lifecycle view are attached yet. Switch filters or restart one to bring it back into active motion."}):e.jsx("div",{className:"mt-4 grid gap-3",children:s.slice(0,3).map(i=>e.jsxs("div",{className:"rounded-[18px] bg-[var(--ui-surface-hover)] px-4 py-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[e.jsx(w,{kind:"project",compact:!0,gradient:!1}),e.jsx(h,{kind:"project",label:i.title,className:"min-w-0",showIcon:!1,lines:2})]}),e.jsx(l,{className:"shrink-0",children:i.status})]}),e.jsx("div",{className:"mt-2 text-sm leading-6 text-[var(--ui-ink-soft)]",children:i.description}),e.jsxs("div",{className:"mt-3 text-sm text-[var(--ui-ink-faint)]",children:["Next move:"," ",i.nextTaskTitle??"Define the first attached task"]}),r!=="active"&&i.status!=="active"?e.jsx("div",{className:"mt-4 flex justify-end",children:e.jsx(y,{variant:"secondary",size:"sm",pending:d===i.id,pendingLabel:"Restarting…",onClick:j=>{j.preventDefault(),j.stopPropagation(),u(i.id)},children:"Restart"})}):null]},i.id))})]})]})},a.id)})}):e.jsx(k,{children:e.jsx("div",{className:"rounded-[20px] bg-[var(--ui-surface-2)] p-4 text-sm text-[var(--ui-ink-soft)]",children:"Goal cards will appear here once the first long-horizon direction is created."})})]})}export{ne as GoalsPage};