fuli-context 0.23.0 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (681) hide show
  1. package/README.md +169 -979
  2. package/README.zh-CN.md +157 -830
  3. package/dist/web/assets/{AboutPage-S8QFfzpA.js → AboutPage-Dx07_Z8u.js} +1 -1
  4. package/dist/web/assets/{AboutSectionHeading-B5CzH4Zs.js → AboutSectionHeading-BdhpM609.js} +1 -1
  5. package/dist/web/assets/AgentAppsPage-5VW0uCTz.js +1 -0
  6. package/dist/web/assets/{AgentAppsPage-BuJWNNdL.css → AgentAppsPage-BCxrjrsE.css} +1 -1
  7. package/dist/web/assets/AgentAvatar-DbsG1_BY.css +1 -0
  8. package/dist/web/assets/AgentAvatar-DlAQP7gm.js +1 -0
  9. package/dist/web/assets/{AgentHand-BGGdVdd9.js → AgentHand-FPFg9-Y1.js} +1 -1
  10. package/dist/web/assets/AgentManagement-CLFw9oV9.css +1 -0
  11. package/dist/web/assets/AgentManagement-UTe4I3WA.js +7 -0
  12. package/dist/web/assets/AgentMentionCopy-B9eIIr3L.css +1 -0
  13. package/dist/web/assets/AgentMentionCopy-C5ExlutT.js +1 -0
  14. package/dist/web/assets/{AgentName-CUjBNQ8j.js → AgentName-C8mYbtKs.js} +1 -1
  15. package/dist/web/assets/AgentProfilePage-BLeyT3By.js +5 -0
  16. package/dist/web/assets/{AgentProfilePage-D5QUzw5N.css → AgentProfilePage-DumsVHP1.css} +1 -1
  17. package/dist/web/assets/AgentServicesPage-B2mDUgYZ.css +1 -0
  18. package/dist/web/assets/AgentServicesPage-BXi152Xc.js +1 -0
  19. package/dist/web/assets/{AppViewerPage-CcOlwxck.js → AppViewerPage-BR8ttEGa.js} +1 -1
  20. package/dist/web/assets/{BackToTop-C3KYEoCW.js → BackToTop-5_AQRMZl.js} +1 -1
  21. package/dist/web/assets/{BoardCardFieldsMenu-BlBWT1j7.js → BoardCardFieldsMenu-Bb_Z9a4Q.js} +1 -1
  22. package/dist/web/assets/{BoardMoveMenu-Bc7xC1Uh.js → BoardMoveMenu-B-f8O6cC.js} +1 -1
  23. package/dist/web/assets/{Breadcrumb-C_xMiD-Z.js → Breadcrumb-DtM5lZy5.js} +1 -1
  24. package/dist/web/assets/{CaptureChangePage-Bekp1aWg.js → CaptureChangePage-BzwcfacI.js} +1 -1
  25. package/dist/web/assets/ConnectionsPage-C_vgqwF2.js +1 -0
  26. package/dist/web/assets/ConnectionsPage-DS2PEG6K.css +1 -0
  27. package/dist/web/assets/{CopyFixPrompt-Bp-UX4Hq.js → CopyFixPrompt-CErC3Paj.js} +1 -1
  28. package/dist/web/assets/DataFormatPage-Ccy_e9rf.css +1 -0
  29. package/dist/web/assets/DataFormatPage-DwL4Ofc9.js +2 -0
  30. package/dist/web/assets/DebugTurnPage-UpK_3ZWY.js +1 -0
  31. package/dist/web/assets/DebugTurnsPage-C0aZg5-3.js +1 -0
  32. package/dist/web/assets/{DialogTitle-Lj5s6nwG.js → DialogTitle-BQXOe8EK.js} +1 -1
  33. package/dist/web/assets/{EmployeeRedirectPage-DnvwJeCN.js → EmployeeRedirectPage-BjWpXDSM.js} +1 -1
  34. package/dist/web/assets/EmployeeScopeDialog-Bt3ZlDyZ.js +1 -0
  35. package/dist/web/assets/EmployeeScopeDialog-U_-eNH0Z.css +1 -0
  36. package/dist/web/assets/{EmployeeWorkbench-BhReI8l6.css → EmployeeWorkbench-Bp9pUkfS.css} +1 -1
  37. package/dist/web/assets/EmployeeWorkbench-GtJIUD5G.js +4 -0
  38. package/dist/web/assets/FieldRoot-DRf4wM5x.js +1 -0
  39. package/dist/web/assets/FlaGrowth-DgVLB8hp.css +1 -0
  40. package/dist/web/assets/FlaGrowth-OQtTLTng.js +1 -0
  41. package/dist/web/assets/FlaOccupationKit-BvrKsosv.css +1 -0
  42. package/dist/web/assets/FlaOccupationKit-C-x4VrKk.js +1 -0
  43. package/dist/web/assets/{FlaTaskSheets-CNdaBy1P.js → FlaTaskSheets-CoaF5CbQ.js} +1 -1
  44. package/dist/web/assets/FlasPage-CgIVOGFM.js +1 -0
  45. package/dist/web/assets/FlasPage-H99IZ9M6.css +1 -0
  46. package/dist/web/assets/{GrowthLoading-Cr8xZwwO.js → GrowthLoading-VuVo2vLf.js} +1 -1
  47. package/dist/web/assets/{HowtoPage-Cv1YQy1s.js → HowtoPage-CZ3mOdLc.js} +1 -1
  48. package/dist/web/assets/{HowtoPage-t12tDDpS.css → HowtoPage-CrvMmT6K.css} +1 -1
  49. package/dist/web/assets/InboxPage-1ue8vA7H.css +1 -0
  50. package/dist/web/assets/InboxPage-zNUnnYeJ.js +6 -0
  51. package/dist/web/assets/{KnowledgeDeleteButton-FEyEvhlR.js → KnowledgeDeleteButton-BlUnSG3b.js} +1 -1
  52. package/dist/web/assets/{KnowledgeHardDeleteSection-CVwTeMEJ.js → KnowledgeHardDeleteSection-CznXBtHY.js} +1 -1
  53. package/dist/web/assets/KnowledgeItemEditPage-DGRNkAYd.js +1 -0
  54. package/dist/web/assets/{KnowledgeItemSummaryCard-49EADY_Z.js → KnowledgeItemSummaryCard-Co5JKBHl.js} +1 -1
  55. package/dist/web/assets/KnowledgeOrganizerPage-BWvF1GEu.js +1 -0
  56. package/dist/web/assets/KnowledgeOrganizerPage-CJaFkfS7.css +1 -0
  57. package/dist/web/assets/KnowledgePage--Z4_kAhq.js +1 -0
  58. package/dist/web/assets/KnowledgePeek-BgzQA9SI.js +1 -0
  59. package/dist/web/assets/{KnowledgePeek-Bm5jRVA9.css → KnowledgePeek-CwZVuSkf.css} +1 -1
  60. package/dist/web/assets/{KnowledgeTurnReceiptPage-BOz7IpaK.js → KnowledgeTurnReceiptPage-Csyjimeg.js} +1 -1
  61. package/dist/web/assets/KnowledgeWorkspace-0yOpWtEB.js +4 -0
  62. package/dist/web/assets/{KnowledgeWorkspace-DCoVFyf0.css → KnowledgeWorkspace-BgWo6lBj.css} +1 -1
  63. package/dist/web/assets/{MeAvatar-CYVcRiuW.js → MeAvatar-aY_q8cKs.js} +1 -1
  64. package/dist/web/assets/{MeLink-BdqkzhT6.js → MeLink-B0pNwVLa.js} +1 -1
  65. package/dist/web/assets/MenuSeparator-BR-uLovR.js +1 -0
  66. package/dist/web/assets/ModelSettingsPage-B9PS1Kay.css +1 -0
  67. package/dist/web/assets/ModelSettingsPage-BL6MsF7C.js +1 -0
  68. package/dist/web/assets/{NotFoundPage-Dmn32VWo.js → NotFoundPage-Cr1MaPuk.js} +1 -1
  69. package/dist/web/assets/NoticeRow-BXZWn4EZ.js +1 -0
  70. package/dist/web/assets/NoticeRow-ktVO_9Es.css +1 -0
  71. package/dist/web/assets/OccupationsPage-CkVqZ2pz.js +1 -0
  72. package/dist/web/assets/OccupationsPage-Dup7WzNh.css +1 -0
  73. package/dist/web/assets/OverviewPage-DFW3Ua0Z.js +1 -0
  74. package/dist/web/assets/OverviewPage-Dr4jrXW4.css +1 -0
  75. package/dist/web/assets/{PageColumns-DpfaPeu7.js → PageColumns-DvehZlYm.js} +1 -1
  76. package/dist/web/assets/PageOutline-CFGtHmOK.js +1 -0
  77. package/dist/web/assets/PageOutline-DG5ZYtA8.css +1 -0
  78. package/dist/web/assets/{PersonalProfilePage-DdBfHnqq.css → PersonalProfilePage-DnjNX2xK.css} +1 -1
  79. package/dist/web/assets/PersonalProfilePage-TxsNr44t.js +1 -0
  80. package/dist/web/assets/PersonalProjectsPage-AhgP6CL8.js +1 -0
  81. package/dist/web/assets/{PinIcon-B7dvh7ld.js → PinIcon-BTQsnxRY.js} +1 -1
  82. package/dist/web/assets/PopperContent-DtMksk76.js +1 -0
  83. package/dist/web/assets/{Presence-D3HKb5Hb.js → Presence-B0zMpCF4.js} +1 -1
  84. package/dist/web/assets/ProfileAuthorChip-BqT9Vv65.js +1 -0
  85. package/dist/web/assets/ProfileAuthorChip-CAWNGoW3.css +1 -0
  86. package/dist/web/assets/{ProjectAgentsPage-RpfiV2Fm.css → ProjectAgentsPage-CjeXFzHr.css} +1 -1
  87. package/dist/web/assets/ProjectAgentsPage-O-cMavcz.js +5 -0
  88. package/dist/web/assets/{ProjectJudgmentPolicy-GA33aSRi.js → ProjectJudgmentPolicy-CyHAu0nm.js} +2 -2
  89. package/dist/web/assets/{PublicProjectsPage-PJlBI8IE.js → PublicProjectsPage-Ck1QSR0R.js} +1 -1
  90. package/dist/web/assets/RecentNotices-vJobVOcm.js +1 -0
  91. package/dist/web/assets/{RoundtablesPage-DT5DUXsa.js → RoundtablesPage-C3dYekQ5.js} +6 -6
  92. package/dist/web/assets/{RoundtablesPage-DK9A9J-y.css → RoundtablesPage-DL-IOngN.css} +1 -1
  93. package/dist/web/assets/RovingFocusGroup-CUqyjFSs.js +1 -0
  94. package/dist/web/assets/{RovingFocusItem-CFd7tXzD.js → RovingFocusItem-CyyuWXjE.js} +1 -1
  95. package/dist/web/assets/{SessionMigrationPage-BZ1lEDQr.js → SessionMigrationPage-DukDM0TP.js} +1 -1
  96. package/dist/web/assets/SessionRecordsPage-DZ5ZBiuS.js +1 -0
  97. package/dist/web/assets/SettingsPage-BVIU7iFS.js +1 -0
  98. package/dist/web/assets/SettingsPage-Cj3pEWcd.css +1 -0
  99. package/dist/web/assets/SharedJefaReportPage-DUY03VLS.js +1 -0
  100. package/dist/web/assets/TagVocabularyPage-BKLFJiSu.js +1 -0
  101. package/dist/web/assets/TaskBlockerClear-BBmPbomO.css +1 -0
  102. package/dist/web/assets/TaskBlockerClear-BxOiiuK8.js +1 -0
  103. package/dist/web/assets/TaskBlockerNotice-iUiD3BuZ.js +1 -0
  104. package/dist/web/assets/{TaskReason-LQ0CFiKu.js → TaskReason-D5j7L8tl.js} +1 -1
  105. package/dist/web/assets/TeamCard-CDunbIrP.js +1 -0
  106. package/dist/web/assets/TeamCard-CihQsZZ1.css +1 -0
  107. package/dist/web/assets/{TeamCardsWidget-DGX9k0S6.js → TeamCardsWidget-CUW-fPn7.js} +1 -1
  108. package/dist/web/assets/TeamIsland-CmpDmIX2.js +9 -0
  109. package/dist/web/assets/{TeamIsland-BBQbpozz.css → TeamIsland-DvtcsAsb.css} +1 -1
  110. package/dist/web/assets/{Teleport-C1upABpY.js → Teleport-Dzdr8umQ.js} +1 -1
  111. package/dist/web/assets/{TextField-ZnmRqG0h.js → TextField-BPhEpEv9.js} +1 -1
  112. package/dist/web/assets/TonborgDelegationSwitch-C1nkJqkJ.js +1 -0
  113. package/dist/web/assets/TonborgDelegationSwitch-DeqERWoo.css +1 -0
  114. package/dist/web/assets/{UiChip-CizeOu1Q.js → UiChip-BEQ067LV.js} +1 -1
  115. package/dist/web/assets/{UiDialog-CGTzxn3-.js → UiDialog-JjqzOA0z.js} +1 -1
  116. package/dist/web/assets/{UiDisclosure-ueMA4jl0.js → UiDisclosure-L6GEJHSw.js} +1 -1
  117. package/dist/web/assets/{UiIcon-sD1hUsOF.js → UiIcon-vgD4v8q8.js} +1 -1
  118. package/dist/web/assets/UiIconButton-BzyMc14P.js +1 -0
  119. package/dist/web/assets/{UiSegmented-BZ-jqnPE.js → UiSegmented-CIIm3KoV.js} +1 -1
  120. package/dist/web/assets/{UiWeight-BRO3oVMZ.js → UiWeight-D-2iZ_Kc.js} +1 -1
  121. package/dist/web/assets/VirtualDirectoryList-BJecsQct.css +1 -0
  122. package/dist/web/assets/VirtualDirectoryList-BV8KsA-Z.js +1 -0
  123. package/dist/web/assets/{VisuallyHidden-B8wfJ_mU.js → VisuallyHidden-BxKxuXRF.js} +1 -1
  124. package/dist/web/assets/VisuallyHiddenInput-DD4vhlqT.js +1 -0
  125. package/dist/web/assets/WidgetSlot-Dw5nWlb7.js +2 -0
  126. package/dist/web/assets/WorkbenchListHead-B0TjHsTO.js +1 -0
  127. package/dist/web/assets/WorkbenchListPage-BX6Z9gkB.css +1 -0
  128. package/dist/web/assets/WorkbenchListPage-D0xX-YNl.js +1 -0
  129. package/dist/web/assets/_plugin-vue_export-helper-B4pFJCwG.js +9 -0
  130. package/dist/web/assets/agent-apps-B1Je-mpY.js +1 -0
  131. package/dist/web/assets/agent-occupation-CjfQqSzd.js +1 -0
  132. package/dist/web/assets/{agent-pins-8KX0ynzy.js → agent-pins-DxHlJ96z.js} +1 -1
  133. package/dist/web/assets/agent-profile-BNPLhDog.css +1 -0
  134. package/dist/web/assets/{agent-roster-records-PfAgndHp.js → agent-roster-records-Bi5HWDif.js} +1 -1
  135. package/dist/web/assets/agent-work-summary-o_9-QWBL.js +1 -0
  136. package/dist/web/assets/{agent-workflows-DQlqVOoA.js → agent-workflows-DgdbJqpg.js} +1 -1
  137. package/dist/web/assets/{attach-closest-edge-D2qlayPy.js → attach-closest-edge-DUc_VUVO.js} +1 -1
  138. package/dist/web/assets/{attention-store-BnZ8l3kk.js → attention-store-Bod20yM3.js} +1 -1
  139. package/dist/web/assets/{badge-DX_xrLV6.js → badge-tMy2Qr94.js} +1 -1
  140. package/dist/web/assets/{button-CEkPBC1E.js → button-DnKFsImW.js} +1 -1
  141. package/dist/web/assets/{card-DNQ0_6vT.js → card-Ccu7HCNb.js} +1 -1
  142. package/dist/web/assets/{catalog-KnpBkv5t.js → catalog-CJUV8OJ6.js} +1 -1
  143. package/dist/web/assets/checkbox-D1R6kTUB.js +1 -0
  144. package/dist/web/assets/{client-CSQcWFRh.js → client-D-G2i5VU.js} +2 -2
  145. package/dist/web/assets/client-links-store-UgmraFBZ.js +1 -0
  146. package/dist/web/assets/combobox-C7QLYGzs.js +1 -0
  147. package/dist/web/assets/console-DgRc8Itw.js +1 -0
  148. package/dist/web/assets/{conversation-launcher-settings-CXFE-q_A.js → conversation-launcher-settings-CZAfuu8B.js} +1 -1
  149. package/dist/web/assets/copy-mention-C0EJhDPy.js +1 -0
  150. package/dist/web/assets/{dialog-CxhKMo0D.js → dialog-Bbq93W68.js} +1 -1
  151. package/dist/web/assets/{dist-B9GqMC5C.js → dist-Dd8yFhv6.js} +1 -1
  152. package/dist/web/assets/{dist-DIJqkL4O.js → dist-PpsW5ZE3.js} +1 -1
  153. package/dist/web/assets/dropdown-menu-1fGUL0V3.js +1 -0
  154. package/dist/web/assets/{field-LNsBZqam.js → field-DjVv_wIS.js} +1 -1
  155. package/dist/web/assets/{format-bytes-Bqefdt37.js → format-bytes-BKq_E0Hs.js} +1 -1
  156. package/dist/web/assets/hover-card-BO-929hq.js +1 -0
  157. package/dist/web/assets/{identity-DRfhWjty.js → identity-DIG-uOiU.js} +1 -1
  158. package/dist/web/assets/index-C7IVLf_v.js +24 -0
  159. package/dist/web/assets/index-DF0TcfPY.css +1 -0
  160. package/dist/web/assets/{input-UoZ-0Xne.js → input-DmwRmYO2.js} +1 -1
  161. package/dist/web/assets/is-equal-8VOV02sH.js +1 -0
  162. package/dist/web/assets/{label-DpjbTOxt.js → label-BvwPUTS4.js} +1 -1
  163. package/dist/web/assets/label-table-CDzYRZpc.js +1 -0
  164. package/dist/web/assets/{model-CpuIG8Du.js → model-0TZRbkN2.js} +1 -1
  165. package/dist/web/assets/model-BF_ZMPLi.js +1 -0
  166. package/dist/web/assets/model-BjUERpoQ.js +3 -0
  167. package/dist/web/assets/model-CaR7VPg7.js +1 -0
  168. package/dist/web/assets/{model-pJ6k3zYD.js → model-Dfe81jZT.js} +1 -1
  169. package/dist/web/assets/{model-BYKHVgJr.js → model-DpkZUZUL.js} +1 -1
  170. package/dist/web/assets/{model-13BQndfF.js → model-Tmn6HvL-.js} +1 -1
  171. package/dist/web/assets/{model-B5g0CFcM.js → model-y7OUvtKz.js} +1 -1
  172. package/dist/web/assets/motion-C1fZrqmI.js +1 -0
  173. package/dist/web/assets/{motion-C-ZimCUS.js → motion-mAmbRj_M.js} +1 -1
  174. package/dist/web/assets/{motion-preference-BQiiwhab.js → motion-preference-Dz9S1bZa.js} +1 -1
  175. package/dist/web/assets/npm-copies-BLRc0FXW.js +1 -0
  176. package/dist/web/assets/{client-connection-model-DVwA-GIu.css → npm-copies-GRyMAduA.css} +1 -1
  177. package/dist/web/assets/occupation-catalog-_SnxxRbK.js +1 -0
  178. package/dist/web/assets/occupation-kits-DFC6Auuc.js +1 -0
  179. package/dist/web/assets/{option-CcHPBOo6.js → option-DC8frdbr.js} +1 -1
  180. package/dist/web/assets/{orchestration-filters-DmF4Qs8E.js → orchestration-filters-UeiAHJqn.js} +1 -1
  181. package/dist/web/assets/overview-data-Cq1gefY5.js +1 -0
  182. package/dist/web/assets/page-refresh-DdRJaxMv.js +1 -0
  183. package/dist/web/assets/{page-title-NXphgeQI.js → page-title-Cm9u_qw1.js} +1 -1
  184. package/dist/web/assets/person-profile-BH2AzOfw.js +1 -0
  185. package/dist/web/assets/{popover-xSRzcSmY.js → popover-DW__YCSE.js} +1 -1
  186. package/dist/web/assets/popup-host-ctKYu9Ze.js +1 -0
  187. package/dist/web/assets/profile-model-DtISOJ-X.js +1 -0
  188. package/dist/web/assets/{project-board-layout-DBQeP_QP.js → project-board-layout-CTM8kAgq.js} +1 -1
  189. package/dist/web/assets/{project-capture-BhYsDWwJ.js → project-capture-B3pNhpFF.js} +1 -1
  190. package/dist/web/assets/{project-origin-D8jy8EF_.js → project-origin-BO8Ngccf.js} +1 -1
  191. package/dist/web/assets/quick-edit-api-B169r5Qb.js +1 -0
  192. package/dist/web/assets/radio-group-DqA46cXQ.js +1 -0
  193. package/dist/web/assets/review-api-CJaNgPMA.js +1 -0
  194. package/dist/web/assets/review-list-BbV-Mle7.js +1 -0
  195. package/dist/web/assets/review-store-DSQpb5P8.js +1 -0
  196. package/dist/web/assets/{role-names-PECaMfQo.js → role-names-By0xdfTn.js} +1 -1
  197. package/dist/web/assets/roundtable-live-u9qUU6aA.js +1 -0
  198. package/dist/web/assets/{runtime-dom.esm-bundler-f39i44Mt.js → runtime-dom.esm-bundler-DhFy4Djs.js} +1 -1
  199. package/dist/web/assets/save-file-oGyIokMI.js +1 -0
  200. package/dist/web/assets/select-TqPBladU.js +1 -0
  201. package/dist/web/assets/{session-launch-offers-X9b0DwF1.js → session-launch-offers-CtQeY4Qk.js} +1 -1
  202. package/dist/web/assets/{settings-restart-BnwcTv3i.js → settings-autosave-C7vW3_SP.js} +1 -1
  203. package/dist/web/assets/settings-restart-p12HUUve.js +1 -0
  204. package/dist/web/assets/{shared-report-BxNVLalR.js → shared-report-DQBSigHB.js} +3 -3
  205. package/dist/web/assets/{source-adapters-aupsL146.js → source-adapters-DPJzumzC.js} +1 -1
  206. package/dist/web/assets/{switch-B3Y3oE_n.js → switch-D7w_0h3m.js} +1 -1
  207. package/dist/web/assets/tabs-DR8k0PN9.js +1 -0
  208. package/dist/web/assets/{task-card-fields-DAx6zMLz.js → task-card-fields-X1ZYCm_j.js} +1 -1
  209. package/dist/web/assets/{task-labels-BdDFvSAy.js → task-labels-LuXoQhF9.js} +1 -1
  210. package/dist/web/assets/{task-reason-7WnPreht.js → task-reason-ChpbGtyx.js} +1 -1
  211. package/dist/web/assets/{team-sheets-Cr0ZTPw3.js → team-sheets-DYCQqa8I.js} +1 -1
  212. package/dist/web/assets/{textarea-CRzFqL9a.js → textarea-D53VYanK.js} +1 -1
  213. package/dist/web/assets/ui-D4nAhcmu.css +1 -0
  214. package/dist/web/assets/ui-DmNbL8MW.js +1 -0
  215. package/dist/web/assets/{useAgentRecords-CMtpd3Fj.js → useAgentRecords-Hy9nqMs7.js} +1 -1
  216. package/dist/web/assets/useAgentWorkSummary-mloD4p12.js +1 -0
  217. package/dist/web/assets/{useApi-CROJJdhE-CRCgNOqq.js → useApi-CROJJdhE-DnUGUb8O.js} +1 -1
  218. package/dist/web/assets/{useClipboardCopy-DkqKK3wY.js → useClipboardCopy-BTuQMeWI.js} +1 -1
  219. package/dist/web/assets/{useFocusReturn-BZpVmQnM.js → useFocusReturn-4hUmSzj9.js} +1 -1
  220. package/dist/web/assets/{useForwardExpose-Di-MnbTz.js → useForwardExpose-BDmW7q7u.js} +1 -1
  221. package/dist/web/assets/{useForwardPropsEmits-L9XcB5DG.js → useForwardPropsEmits-BzT2luD4.js} +1 -1
  222. package/dist/web/assets/useForwardScopeId-DZCnSswO.js +1 -0
  223. package/dist/web/assets/useKnowledgeConfirm-L8wnJCuX.js +1 -0
  224. package/dist/web/assets/useKnowledgeItemPeek-C_huXt6E.js +1 -0
  225. package/dist/web/assets/{useMinimumLoadingDisplay-CWPiOaDl.js → useMinimumLoadingDisplay-Dkl8NQru.js} +1 -1
  226. package/dist/web/assets/usePageTools-CbDOdIrg.js +1 -0
  227. package/dist/web/assets/usePrimitiveElement-tPQM7XJs.js +1 -0
  228. package/dist/web/assets/{useProjectAgentRoster-CWVpSsQ3.js → useProjectAgentRoster-BBmRvcgr.js} +1 -1
  229. package/dist/web/assets/{useRoutePeek-DxLVksbJ.js → useRoutePeek-CRbCDqsm.js} +1 -1
  230. package/dist/web/assets/useTeamPeople-D_5cxxf1.js +1 -0
  231. package/dist/web/assets/{useTeamWork-BTZd_wKs.js → useTeamWork-CXEQwF4n.js} +1 -1
  232. package/dist/web/assets/{useTypeahead-pEZNpBls.js → useTypeahead-CVYuxPOD.js} +1 -1
  233. package/dist/web/assets/{utils-BsxOjD1Q.js → utils-BnrWDlfm.js} +1 -1
  234. package/dist/web/assets/utils-BsGjKHV8.js +1 -0
  235. package/dist/web/assets/verification-DbCo_dnY.js +1 -0
  236. package/dist/web/assets/{version-db3QWWjt.js → version-1lwoVj6f.js} +1 -1
  237. package/dist/web/assets/{vue-router-B79HWW1l.js → vue-router-D4_ms6om.js} +1 -1
  238. package/dist/web/assets/workbench-card-Dt0820yW.css +1 -0
  239. package/dist/web/index.html +90 -74
  240. package/docs/agent-conversations-and-collaboration.md +55 -58
  241. package/docs/agent-interface-architecture.md +7 -2
  242. package/docs/agent-roundtable.md +7 -7
  243. package/docs/client-connections.md +85 -8
  244. package/docs/client-links.md +16 -1
  245. package/docs/employee-agents.md +1 -1
  246. package/docs/judgment-and-autonomy.md +2 -0
  247. package/docs/public-personal-architecture.md +1 -1
  248. package/graph-provider/fuli_graph/app.py +2 -0
  249. package/graph-provider/fuli_graph/graph_field_contract.py +6 -3
  250. package/graph-provider/fuli_graph/graph_format_migrations.py +6 -0
  251. package/graph-provider/fuli_graph/graph_models.py +11 -62
  252. package/graph-provider/fuli_graph/graph_query.py +46 -105
  253. package/graph-provider/fuli_graph/knowledge_batch_confirmation.py +7 -5
  254. package/graph-provider/fuli_graph/knowledge_duplicate_models.py +24 -0
  255. package/graph-provider/fuli_graph/knowledge_duplicate_rules.py +157 -0
  256. package/graph-provider/fuli_graph/knowledge_duplicates.py +357 -0
  257. package/graph-provider/fuli_graph/knowledge_item_routes.py +3 -1
  258. package/graph-provider/fuli_graph/knowledge_item_view.py +45 -2
  259. package/graph-provider/fuli_graph/knowledge_item_view_models.py +21 -0
  260. package/graph-provider/fuli_graph/knowledge_management.py +6 -1
  261. package/graph-provider/fuli_graph/knowledge_outdated.py +15 -5
  262. package/graph-provider/fuli_graph/knowledge_review.py +65 -2
  263. package/graph-provider/fuli_graph/knowledge_review_models.py +5 -0
  264. package/graph-provider/fuli_graph/knowledge_search.py +0 -31
  265. package/graph-provider/fuli_graph/knowledge_versions.py +12 -1
  266. package/graph-provider/fuli_graph/models.py +9 -2
  267. package/graph-provider/fuli_graph/preference_versions.py +28 -7
  268. package/graph-provider/fuli_graph/project_agent_routes.py +60 -2
  269. package/graph-provider/fuli_graph/project_agent_task_models.py +63 -5
  270. package/graph-provider/fuli_graph/store.py +2 -0
  271. package/graph-provider/fuli_graph/store_project_agent_task_activity.py +12 -3
  272. package/graph-provider/fuli_graph/store_project_agent_task_blockers.py +110 -23
  273. package/graph-provider/fuli_graph/store_project_agent_task_pages.py +186 -0
  274. package/graph-provider/fuli_graph/store_project_agent_task_reads.py +6 -4
  275. package/graph-provider/fuli_graph/store_project_agent_task_recruitment.py +0 -7
  276. package/graph-provider/fuli_graph/store_project_agent_tasks.py +4 -3
  277. package/graph-provider/fuli_graph/store_task_contexts.py +14 -4
  278. package/graph-provider/fuli_graph/task_blocker.py +38 -6
  279. package/graph-provider/fuli_graph/tonborg_confirmation.py +48 -0
  280. package/graph-provider/pyproject.toml +1 -1
  281. package/native/win32/fuli-win-helper.exe +0 -0
  282. package/npm-shrinkwrap.json +16 -50
  283. package/package.json +2 -2
  284. package/packages/roundtable/src/peer/node-store.js +2 -6
  285. package/packages/roundtable/src/roundtable/chat-service.js +2 -1
  286. package/packages/roundtable/src/roundtable/chat.js +11 -1
  287. package/packages/roundtable/src/roundtable/delivery-state.js +43 -0
  288. package/packages/roundtable/src/roundtable/fla-address.js +6 -0
  289. package/packages/roundtable/src/roundtable/group-discussion-store.js +2 -2
  290. package/packages/roundtable/src/roundtable/group-discussion.js +15 -15
  291. package/packages/roundtable/src/roundtable/person-conversation.js +2 -1
  292. package/packages/roundtable/src/roundtable/service.js +38 -9
  293. package/packages/roundtable/src/roundtable/store.js +8 -5
  294. package/packages/roundtable/src/storage/database-format.js +21 -16
  295. package/registry/client-links.json +66 -4
  296. package/registry/occupation-plugins.json +593 -0
  297. package/skills/capturing-session-knowledge/SKILL.md +15 -2
  298. package/skills/capturing-session-knowledge/references/capture.md +22 -6
  299. package/skills/capturing-session-knowledge/references/coordination.md +16 -6
  300. package/skills/capturing-session-knowledge/references/retrieval.md +23 -6
  301. package/skills/flreview/SKILL.md +1 -1
  302. package/skills/operating-fuli/SKILL.md +39 -12
  303. package/skills/operating-fuli/references/workflow-recipes.md +9 -5
  304. package/src/acceptance-checks/port.js +37 -0
  305. package/src/adaptive-runtime/settings.js +1 -1
  306. package/src/adaptive-runtime/state.js +3 -3
  307. package/src/agent-apps/host-tools/catalog.js +7 -0
  308. package/src/agent-apps/store.js +2 -10
  309. package/src/agent-delegation/person-words.js +15 -1
  310. package/src/agent-kits/cli-presence.js +78 -0
  311. package/src/agent-kits/client-installer.js +9 -5
  312. package/src/agent-kits/installer-manifest.js +11 -6
  313. package/src/agent-kits/legacy-hook-cleanup.js +4 -3
  314. package/src/agent-kits/new-sessions.js +82 -0
  315. package/src/agent-kits/opencode-plugin-gate.js +3 -1
  316. package/src/agent-kits/pins.js +12 -12
  317. package/src/agent-kits/ports.js +5 -2
  318. package/src/agent-kits/session-launcher.js +11 -4
  319. package/src/agent-kits/vendor/agent-installer/README.md +1 -1
  320. package/src/agent-kits/vendor/agent-installer/index.d.ts +1 -1
  321. package/src/agent-kits/vendor/agent-session-launcher/README.md +1 -1
  322. package/src/agent-kits/vendor/agent-session-launcher/index.d.ts +30 -1
  323. package/src/agent-kits/vendor/agent-session-launcher/index.mjs +8 -0
  324. package/src/agent-roundtable/tools.js +3 -3
  325. package/src/agent-services/store.js +2 -4
  326. package/src/agent-tools/agent-workflow-definitions.js +7 -3
  327. package/src/agent-tools/checkpoint-definitions.js +5 -4
  328. package/src/agent-tools/fla-lesson-definitions.js +24 -0
  329. package/src/agent-tools/graph-definitions.js +8 -0
  330. package/src/agent-tools/graph-handlers.js +10 -1
  331. package/src/agent-tools/interface-catalog.js +34 -9
  332. package/src/agent-tools/model-backend-definitions.js +1 -1
  333. package/src/agent-tools/occupation-kit-definitions.js +20 -0
  334. package/src/agent-tools/project-agent-definitions.js +19 -40
  335. package/src/agent-tools/project-agent-tool-definitions.js +5 -1
  336. package/src/agent-tools/reply-echo-definitions.js +18 -0
  337. package/src/agent-tools/tonborg-question-definitions.js +26 -0
  338. package/src/agent-workflows/agent-tools.js +69 -3
  339. package/src/agent-workflows/port.js +32 -4
  340. package/src/agent-workflows/store.js +16 -9
  341. package/src/agents/choice-answers.js +19 -0
  342. package/src/agents/claude-code/choice-answers.js +49 -0
  343. package/src/agents/claude-code/fla-menu-command.js +14 -0
  344. package/src/agents/claude-code/lifecycle-hook.js +16 -9
  345. package/src/agents/claude-code/turn-records.js +38 -0
  346. package/src/agents/codex/fla-prompts.js +98 -0
  347. package/src/agents/codex/lifecycle-hook.js +8 -7
  348. package/src/agents/cursor/lifecycle-hook.js +3 -2
  349. package/src/agents/identity-receipt.js +9 -7
  350. package/src/agents/lifecycle-failure.js +9 -0
  351. package/src/agents/lifecycle-message.js +4 -5
  352. package/src/agents/opencode/lifecycle-hook.js +12 -7
  353. package/src/agents/opencode/plugin.js +7 -2
  354. package/src/agents/token-usage-resolver.js +1 -1
  355. package/src/agents/turn-receipt.js +5 -4
  356. package/src/cli/command-registry.js +1 -1
  357. package/src/cli/local-runtime-command.js +5 -2
  358. package/src/cli/local-runtime-options.js +7 -3
  359. package/src/cli/models-command.js +15 -11
  360. package/src/cli/update-command.js +2 -2
  361. package/src/cli/update-installation.js +23 -6
  362. package/src/cli/workspace-connection-command.js +2 -2
  363. package/src/client-links/registry.js +6 -112
  364. package/src/conversations/entry-skeleton.js +113 -55
  365. package/src/conversations/human-interaction.js +1 -1
  366. package/src/conversations/person-words.js +29 -0
  367. package/src/conversations/preference-session.js +17 -14
  368. package/src/conversations/stop-auto-close.js +28 -7
  369. package/src/conversations/task-context-view.js +113 -27
  370. package/src/conversations/turn-findings.js +105 -0
  371. package/src/data-format/format-notices.js +2 -1
  372. package/src/data-format/local-stores.js +22 -1
  373. package/src/debug-turns/model-capture.js +1 -1
  374. package/src/debug-turns/record.js +1 -1
  375. package/src/desktop/cli-path.js +253 -0
  376. package/src/desktop/desktop-app-package.js +31 -0
  377. package/src/desktop/{fuli-links.js → desktop-client-links.js} +20 -16
  378. package/src/desktop/desktop-controller.js +35 -3
  379. package/src/desktop/npm-adoption-store.js +7 -0
  380. package/src/desktop/npm-adoption.js +119 -0
  381. package/src/desktop/npm-copies.js +73 -0
  382. package/src/desktop/npm-copy-control.js +56 -0
  383. package/src/desktop/npm-copy-data.js +51 -0
  384. package/src/desktop/npm-copy-uninstall.js +67 -0
  385. package/src/desktop/windows-controller.js +13 -1
  386. package/src/desktop/windows-installation-switch.js +1 -1
  387. package/src/desktop/windows-node-launcher.js +11 -0
  388. package/src/desktop/windows-uninstall.js +3 -0
  389. package/src/dreaming/astro-calls.js +47 -0
  390. package/src/dreaming/projects.js +39 -0
  391. package/src/dreaming/run.js +38 -36
  392. package/src/dreaming/scheduler.js +2 -2
  393. package/src/employees/builtin/jefa/board-store.js +2 -10
  394. package/src/employees/builtin/jefa/tools.js +1 -1
  395. package/src/employees/management-policy.js +1 -1
  396. package/src/employees/manifest.js +1 -1
  397. package/src/employees/service.js +11 -1
  398. package/src/external-knowledge/document-mapping.js +1 -1
  399. package/src/external-knowledge/index.js +0 -4
  400. package/src/fla-growth/lessons.js +40 -0
  401. package/src/fla-growth/task-verification.js +25 -0
  402. package/src/fla-growth/tool-suggestions.js +107 -0
  403. package/src/fla-growth/verification.js +30 -0
  404. package/src/graphiti/agent-access-policy.js +1 -1
  405. package/src/graphiti/agent-conversations.js +2 -2
  406. package/src/graphiti/agent-growth.js +32 -4
  407. package/src/graphiti/capture-change-confirmation.js +4 -1
  408. package/src/graphiti/capture-notice.js +2 -1
  409. package/src/graphiti/capture-onboarding.js +1 -1
  410. package/src/graphiti/collaboration-preference-projection.js +1 -1
  411. package/src/graphiti/conversation-triage.js +1 -1
  412. package/src/graphiti/execution-mode.js +1 -1
  413. package/src/graphiti/federated-application.js +16 -8
  414. package/src/graphiti/fla-mention.js +105 -96
  415. package/src/graphiti/fla-menu-reader.js +25 -0
  416. package/src/graphiti/fla-menu.js +108 -0
  417. package/src/graphiti/fla-picker.js +21 -16
  418. package/src/graphiti/fuli-markup.js +60 -0
  419. package/src/graphiti/group-member-context.js +1 -1
  420. package/src/graphiti/human-review-channel.js +16 -2
  421. package/src/graphiti/knowledge-result-budget.js +2 -2
  422. package/src/graphiti/knowledge-review.js +2 -1
  423. package/src/graphiti/local-runtimes.js +11 -0
  424. package/src/graphiti/preference-task-scope.js +1 -1
  425. package/src/graphiti/project-agent-control-plane.js +6 -0
  426. package/src/graphiti/project-agent-mapping.js +23 -10
  427. package/src/graphiti/project-agent-mention.js +10 -28
  428. package/src/graphiti/project-agent-task-entry.js +1 -1
  429. package/src/graphiti/project-agent-task-sheets.js +1 -1
  430. package/src/graphiti/project-agent-workflows.js +20 -5
  431. package/src/graphiti/project-knowledge-presence.js +27 -0
  432. package/src/graphiti/project-path-context.js +2 -2
  433. package/src/graphiti/provider-client.js +24 -0
  434. package/src/graphiti/recall-policy.js +1 -1
  435. package/src/graphiti/reply-echo-agent-tool.js +36 -0
  436. package/src/graphiti/reply-echo-group.js +85 -0
  437. package/src/graphiti/reply-echo.js +87 -0
  438. package/src/graphiti/session-knowledge-migration.js +2 -1
  439. package/src/graphiti/session-prompt-sentences.js +52 -0
  440. package/src/graphiti/session-records.js +3 -2
  441. package/src/graphiti/source-marker.js +14 -0
  442. package/src/graphiti/task-blocker-progress.js +24 -1
  443. package/src/graphiti/task-context-entry.js +11 -0
  444. package/src/graphiti/task-entry-group-discussion.js +31 -31
  445. package/src/graphiti/task-entry-named-fla.js +40 -70
  446. package/src/graphiti/task-entry-preferences.js +1 -1
  447. package/src/graphiti/task-entry-project-scope.js +4 -4
  448. package/src/graphiti/task-entry-read-only.js +1 -1
  449. package/src/graphiti/task-entry-standing-owner.js +3 -3
  450. package/src/graphiti/task-experiences.js +21 -3
  451. package/src/graphiti/task-knowledge-checkpoint.js +4 -1
  452. package/src/graphiti/task-knowledge-recall.js +140 -25
  453. package/src/graphiti/task-prompt-statement.js +49 -0
  454. package/src/graphiti/task-remember.js +23 -9
  455. package/src/graphiti/task-stated-rules.js +75 -0
  456. package/src/graphiti/temporary-project-scope.js +1 -1
  457. package/src/graphiti/topic-proposals.js +6 -5
  458. package/src/graphiti/user-taste-skill.js +1 -1
  459. package/src/graphiti/workflow-candidate-mapping.js +1 -1
  460. package/src/http/agent-delegation-gate.js +9 -0
  461. package/src/http/api-router.js +16 -0
  462. package/src/http/cli-path-api-router.js +35 -0
  463. package/src/http/desktop-client-api-router.js +18 -0
  464. package/src/http/dreaming-api-router.js +10 -7
  465. package/src/http/graph-api-router.js +17 -0
  466. package/src/http/notices-api-router.js +37 -0
  467. package/src/http/npm-copies-api-router.js +36 -0
  468. package/src/http/occupation-plugins-api-router.js +43 -0
  469. package/src/http/reply-echo-api-router.js +53 -0
  470. package/src/http/response.js +1 -1
  471. package/src/http/retrospectives-api-router.js +18 -0
  472. package/src/http/session-launch-api-router.js +34 -1
  473. package/src/http/static-handler.js +1 -1
  474. package/src/http/task-blocker-api-router.js +17 -5
  475. package/src/http/task-verification-api-router.js +16 -0
  476. package/src/http/whats-new-api-router.js +34 -0
  477. package/src/judgment/acceptance.js +10 -3
  478. package/src/judgment/agent-view.js +21 -4
  479. package/src/judgment/conversation.js +86 -2
  480. package/src/judgment/delegated-reviews.js +23 -0
  481. package/src/judgment/engine.js +49 -16
  482. package/src/judgment/explain-method.js +11 -0
  483. package/src/judgment/http.js +17 -2
  484. package/src/judgment/question-options.js +97 -0
  485. package/src/judgment/question-tools.js +235 -0
  486. package/src/judgment/review-delegation.js +89 -0
  487. package/src/judgment/review-prompt.js +44 -3
  488. package/src/judgment/review-verdicts.js +13 -4
  489. package/src/judgment/runtime.js +3 -1
  490. package/src/judgment/service.js +25 -5
  491. package/src/judgment/store.js +44 -8
  492. package/src/judgment/verdict-schema.js +6 -0
  493. package/src/judgment/visible-items.js +15 -4
  494. package/src/knowledge-duplicates/scheduler.js +28 -0
  495. package/src/knowledge-hard-delete/forget-references.js +5 -2
  496. package/src/knowledge-impressions/store.js +17 -5
  497. package/src/local-runtime/console-autostart-record.js +95 -0
  498. package/src/local-runtime/console-autostart.js +143 -0
  499. package/src/local-runtime/console-health.js +26 -0
  500. package/src/local-runtime/installed-console-launcher.js +73 -0
  501. package/src/local-runtime/lifecycle.js +85 -21
  502. package/src/local-runtime/processes.js +15 -2
  503. package/src/local-runtime/unresponsive-console.js +77 -0
  504. package/src/mcp/create-mcp-server.js +4 -0
  505. package/src/mcp/fla-menu-prompts.js +60 -0
  506. package/src/mcp/runtime.js +11 -3
  507. package/src/mcp/session-id.js +3 -2
  508. package/src/mcp/tool-annotations.js +5 -2
  509. package/src/mcp/tool-profiles.js +1 -1
  510. package/src/mcp/tool-result.js +3 -1
  511. package/src/model-backends/adapters/anthropic-messages.js +2 -2
  512. package/src/model-backends/adapters/ollama-local-build.js +1 -1
  513. package/src/model-backends/adapters/openai-chat.js +2 -2
  514. package/src/model-backends/budget.js +10 -1
  515. package/src/model-backends/config.js +2 -2
  516. package/src/model-backends/endpoint-models.js +80 -0
  517. package/src/model-backends/http.js +3 -1
  518. package/src/model-backends/keys-http.js +5 -4
  519. package/src/model-backends/models-http.js +54 -0
  520. package/src/model-backends/port.js +32 -5
  521. package/src/model-backends/prompt.js +11 -1
  522. package/src/model-backends/role-settings.js +27 -2
  523. package/src/model-backends/role-trust.js +3 -15
  524. package/src/model-backends/role-work-store.js +2 -12
  525. package/src/model-backends/runtime.js +11 -2
  526. package/src/model-backends/secret-store.js +61 -12
  527. package/src/model-backends/suggestion-log.js +6 -15
  528. package/src/model-backends/usage-ledger.js +28 -18
  529. package/src/notices/recent-notices.js +175 -0
  530. package/src/notifications/needs-person.js +1 -1
  531. package/src/occupation-plugins/agent-tools.js +59 -0
  532. package/src/occupation-plugins/choice-store.js +65 -0
  533. package/src/occupation-plugins/manifest.js +165 -0
  534. package/src/occupation-plugins/port.js +104 -0
  535. package/src/occupation-plugins/recruitment.js +38 -0
  536. package/src/presence/windows-helper-pin.js +1 -1
  537. package/src/registry/updatable-manifest.js +127 -0
  538. package/src/retrieval-terms/fill.js +1 -1
  539. package/src/retrospectives/run.js +113 -0
  540. package/src/retrospectives/runs.js +18 -0
  541. package/src/retrospectives/scheduler.js +58 -0
  542. package/src/server/application-lifecycle.js +1 -1
  543. package/src/server/signal-shutdown.js +31 -0
  544. package/src/server.js +26 -18
  545. package/src/setup/first-run-capture.js +6 -2
  546. package/src/setup/graph-runtime.js +46 -38
  547. package/src/setup/neo4j-memory-profile.js +1 -1
  548. package/src/setup/paths.js +2 -0
  549. package/src/standing-assignments/store.js +2 -4
  550. package/src/system/client-connection-status.js +3 -1
  551. package/src/system/doctor.js +19 -2
  552. package/src/system/graph-migration.js +1 -1
  553. package/src/system/platform-path.js +21 -9
  554. package/src/system/runtime-settings.js +19 -7
  555. package/src/system/settings-guide.js +7 -0
  556. package/src/system/system-service.js +41 -2
  557. package/src/task-blockers/console-port.js +12 -6
  558. package/src/text/markdown-link.js +12 -0
  559. package/src/text/single-line.js +6 -0
  560. package/src/text/utf8-preview.js +7 -6
  561. package/src/whats-new/lines/0.25.0.json +17 -0
  562. package/src/whats-new/release-lines.js +66 -0
  563. package/src/whats-new/whats-new.js +70 -0
  564. package/src/work-surfaces/store.js +2 -4
  565. package/dist/web/assets/AgentAppsPage-BYXraPFM.js +0 -1
  566. package/dist/web/assets/AgentManagement-Bza8k5ra.js +0 -7
  567. package/dist/web/assets/AgentManagement-CeF4mjtg.css +0 -1
  568. package/dist/web/assets/AgentMentionCopy-C72hY2QL.js +0 -1
  569. package/dist/web/assets/AgentMentionCopy-CNKrzZvE.css +0 -1
  570. package/dist/web/assets/AgentProfilePage-kp7-gRRx.js +0 -5
  571. package/dist/web/assets/AgentServicesPage-ARIWfmuh.css +0 -1
  572. package/dist/web/assets/AgentServicesPage-IsGaz7FY.js +0 -1
  573. package/dist/web/assets/ConnectionsPage-BpvecWXD.js +0 -1
  574. package/dist/web/assets/ConnectionsPage-Cwt-knQQ.css +0 -1
  575. package/dist/web/assets/DataFormatPage-dsy8d3oA.js +0 -2
  576. package/dist/web/assets/DataFormatPage-sSnjjUY4.css +0 -1
  577. package/dist/web/assets/DebugTurnPage-cIJV7xDW.js +0 -1
  578. package/dist/web/assets/DebugTurnsPage-B6Te_Alp.js +0 -1
  579. package/dist/web/assets/EmployeeScopeDialog-CXNZ62Ab.js +0 -1
  580. package/dist/web/assets/EmployeeScopeDialog-Do5PHQh7.css +0 -1
  581. package/dist/web/assets/EmployeeWorkbench-DALIO-cM.js +0 -4
  582. package/dist/web/assets/FieldRoot-DRnAC66O.js +0 -1
  583. package/dist/web/assets/FlaGrowth-7wlv31Tl.js +0 -1
  584. package/dist/web/assets/FlaGrowth-BzXY8pcx.css +0 -1
  585. package/dist/web/assets/FlasPage-BCs1Ffpf.js +0 -1
  586. package/dist/web/assets/FlasPage-SLQDMv47.css +0 -1
  587. package/dist/web/assets/InboxPage-Bkx6nIhb.css +0 -1
  588. package/dist/web/assets/InboxPage-CgJnymOY.js +0 -4
  589. package/dist/web/assets/KnowledgeItemEditPage-rwpM8cF1.js +0 -1
  590. package/dist/web/assets/KnowledgeOrganizerPage-7IdnjM3L.js +0 -1
  591. package/dist/web/assets/KnowledgeOrganizerPage-CNm2jvJZ.css +0 -1
  592. package/dist/web/assets/KnowledgePage-gxqOIZxf.js +0 -1
  593. package/dist/web/assets/KnowledgePeek-CQyCxHFj.js +0 -1
  594. package/dist/web/assets/KnowledgeWorkspace-A7zVb26p.js +0 -4
  595. package/dist/web/assets/MenuSeparator-quqkZZXY.js +0 -1
  596. package/dist/web/assets/ModelSettingsPage-B8jC_uew.js +0 -3
  597. package/dist/web/assets/ModelSettingsPage-DhCn_SF6.css +0 -1
  598. package/dist/web/assets/OccupationsPage-BVREfX_R.js +0 -1
  599. package/dist/web/assets/OccupationsPage-Di7B-bPl.css +0 -1
  600. package/dist/web/assets/OverviewPage-CHyEbdP4.js +0 -1
  601. package/dist/web/assets/OverviewPage-xdF5g6bZ.css +0 -1
  602. package/dist/web/assets/PageOutline-BKBQ1T4d.js +0 -1
  603. package/dist/web/assets/PageOutline-BqVgnlos.css +0 -1
  604. package/dist/web/assets/PersonalProfilePage-Cxp2gn6J.js +0 -1
  605. package/dist/web/assets/PersonalProjectsPage-821imOxR.js +0 -1
  606. package/dist/web/assets/PopperContent-DNqbLkNa.js +0 -1
  607. package/dist/web/assets/ProfileAuthorChip-7HSHODdR.js +0 -1
  608. package/dist/web/assets/ProfileAuthorChip-C_0hzDoP.css +0 -1
  609. package/dist/web/assets/ProjectAgentsPage-DBsXS6Xa.js +0 -5
  610. package/dist/web/assets/RovingFocusGroup-BB0d3k17.js +0 -1
  611. package/dist/web/assets/SessionRecordsPage-BMAAtIAt.js +0 -1
  612. package/dist/web/assets/SettingsPage-BYNEk6BM.js +0 -1
  613. package/dist/web/assets/SettingsPage-Uj1IpZpS.css +0 -1
  614. package/dist/web/assets/SharedJefaReportPage-g35o6jUb.js +0 -1
  615. package/dist/web/assets/TagVocabularyPage-COubNJXz.js +0 -1
  616. package/dist/web/assets/TaskBlockerClear-B5MpHdlh.js +0 -1
  617. package/dist/web/assets/TaskBlockerClear-CjSNfpyP.css +0 -1
  618. package/dist/web/assets/TaskBlockerNotice-CIN0HRiE.js +0 -1
  619. package/dist/web/assets/TeamCard-CsmWDw2Q.css +0 -1
  620. package/dist/web/assets/TeamCard-D-kLa5rT.js +0 -1
  621. package/dist/web/assets/TeamIsland-BIo-l49b.js +0 -9
  622. package/dist/web/assets/UiIconButton-CCo4NPYv.js +0 -1
  623. package/dist/web/assets/UiNotice-DGPFbVo7.js +0 -1
  624. package/dist/web/assets/VirtualDirectoryList-1vLi41SD.css +0 -1
  625. package/dist/web/assets/VirtualDirectoryList-BkV3gj5E.js +0 -1
  626. package/dist/web/assets/VisuallyHiddenInput-Bdcr9CwC.js +0 -1
  627. package/dist/web/assets/WidgetSlot-DFojQaSo.js +0 -2
  628. package/dist/web/assets/_plugin-vue_export-helper-B9AJmZbc.js +0 -9
  629. package/dist/web/assets/agent-apps-CKGFfySp.js +0 -1
  630. package/dist/web/assets/agent-avatar-V6M_DF3r.js +0 -1
  631. package/dist/web/assets/agent-occupation-PZ2YAIM8.js +0 -1
  632. package/dist/web/assets/agent-profile-Clb-gYu-.css +0 -1
  633. package/dist/web/assets/agent-work-summary-bzTwEUaA.js +0 -1
  634. package/dist/web/assets/checkbox-DPyLHneg.js +0 -1
  635. package/dist/web/assets/client-connection-model-vO2cap6a.js +0 -1
  636. package/dist/web/assets/client-links-store-DMqe0MbK.js +0 -1
  637. package/dist/web/assets/combobox-zUq9bkyM.js +0 -1
  638. package/dist/web/assets/console-DaoAO-EO.js +0 -1
  639. package/dist/web/assets/context-menu-CcGDnF_k.js +0 -1
  640. package/dist/web/assets/dropdown-menu-CXmMnCBh.js +0 -1
  641. package/dist/web/assets/fla-mention-D_Qb7VeY.js +0 -1
  642. package/dist/web/assets/index-B4AMPpl_.css +0 -1
  643. package/dist/web/assets/index-BYIOAXnn.js +0 -2
  644. package/dist/web/assets/label-table-BnWNYfyk.js +0 -1
  645. package/dist/web/assets/model-CDevUwUw.js +0 -1
  646. package/dist/web/assets/model-P5fSGsiJ.js +0 -1
  647. package/dist/web/assets/motion-QY5FKKko.js +0 -1
  648. package/dist/web/assets/occupation-catalog-uDDhZwKK.js +0 -1
  649. package/dist/web/assets/person-profile-DXXfpvta.js +0 -1
  650. package/dist/web/assets/popup-host-Bmvrf-2t.js +0 -1
  651. package/dist/web/assets/profile-model-6gTmScHC.js +0 -1
  652. package/dist/web/assets/quick-edit-api-WLh_88w6.js +0 -1
  653. package/dist/web/assets/radio-group-B4r78nDh.js +0 -1
  654. package/dist/web/assets/roundtable-live-DFeDF56c.js +0 -1
  655. package/dist/web/assets/save-file-rPduHi2f.js +0 -1
  656. package/dist/web/assets/select-_JO3Mxdp.js +0 -1
  657. package/dist/web/assets/tabs-BlcZiEMY.js +0 -1
  658. package/dist/web/assets/ui-BopQuQfc.js +0 -1
  659. package/dist/web/assets/ui-CoUaCzmO.css +0 -1
  660. package/dist/web/assets/useAgentWorkSummary-BQbhaHov.js +0 -1
  661. package/dist/web/assets/useForwardScopeId-CUQFIAIj.js +0 -1
  662. package/dist/web/assets/useKnowledgeItemPeek-PmQJixw5.js +0 -1
  663. package/dist/web/assets/useTeamPeople-CDISP0PM.js +0 -1
  664. package/dist/web/assets/utils-B4pBTmyh.js +0 -1
  665. package/src/workspace-protocol/array-validation.js +0 -19
  666. package/src/workspace-protocol/base64url-contract.js +0 -27
  667. package/src/workspace-protocol/constants.js +0 -37
  668. package/src/workspace-protocol/error-contract.js +0 -24
  669. package/src/workspace-protocol/fact-contract.js +0 -110
  670. package/src/workspace-protocol/governance-contract.js +0 -47
  671. package/src/workspace-protocol/index.js +0 -53
  672. package/src/workspace-protocol/json-budget.js +0 -19
  673. package/src/workspace-protocol/manifest-contract.js +0 -186
  674. package/src/workspace-protocol/publication-contract.js +0 -212
  675. package/src/workspace-protocol/query-contract.js +0 -149
  676. package/src/workspace-protocol/scalar-contract.js +0 -192
  677. package/src/workspace-protocol/sync-contract.js +0 -184
  678. package/src/workspace-protocol/text-contract.js +0 -39
  679. package/src/workspace-protocol/validation.js +0 -66
  680. /package/dist/web/assets/{UiNotice-ZCBdABdM.css → UiIconButton-ZCBdABdM.css} +0 -0
  681. /package/dist/web/assets/{settings-restart-BU_GGtbG.css → settings-autosave-BU_GGtbG.css} +0 -0
@@ -0,0 +1,253 @@
1
+ import { execFileSync } from 'node:child_process';
2
+ import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from 'node:fs';
3
+ import { homedir } from 'node:os';
4
+ import { join } from 'node:path';
5
+
6
+ import { jsonFormat, readJsonRecord, updateVersionedJsonFileAtomic } from '../storage/json-format.js';
7
+
8
+ // The desktop app's own `fl` and `fuli` in a terminal (Jevons 11-08): the app
9
+ // does not live on PATH, so a terminal kept finding an older npm copy (rec#41).
10
+ // Two small launcher scripts in a folder the person owns, and that folder put
11
+ // first on their PATH. Everything is reversible: removing deletes the folder,
12
+ // takes out exactly the marked block FULI added to a shell profile, and takes
13
+ // the folder out of the Windows user PATH. The person turns it off in
14
+ // Settings; it is then never added again.
15
+ //
16
+ // macOS: ~/.fuli/bin, added at the end of ~/.zshrc (zsh is the default shell;
17
+ // the end comes after nvm or Homebrew put their folders first) and of
18
+ // ~/.bash_profile when that exists. Windows (installed app only): <install
19
+ // root>\bin, first in the user PATH; the system PATH still comes first there,
20
+ // so an npm folder in the system PATH wins until that copy is removed.
21
+
22
+ export const CLI_PATH_FILE = 'cli-path.json';
23
+ export const CLI_PATH_FORMAT = jsonFormat({ store: 'cli-path', versions: [1] });
24
+ const BLOCK_START = '# >>> FULI desktop app: fl and fuli >>>';
25
+ const BLOCK_END = '# <<< FULI desktop app <<<';
26
+ const COMMANDS = ['fl', 'fuli'];
27
+
28
+ // Where this app's commands go, or null where the app has none (a portable
29
+ // Windows tray, any other platform).
30
+ export function cliPathPlan(context, { platform = process.platform, homeDir = homedir() } = {}) {
31
+ if (platform === 'darwin') {
32
+ // An app opened from its disk image or a translocated copy moves away; its commands would break.
33
+ if (typeof context.packageRoot !== 'string' || /^\/Volumes\/|\/AppTranslocation\//.test(context.packageRoot)) return null;
34
+ return { platform, binDir: join(homeDir, '.fuli', 'bin'),
35
+ profiles: [join(homeDir, '.zshrc'), join(homeDir, '.bash_profile')], packageRoot: context.packageRoot };
36
+ }
37
+ if (platform === 'win32' && context.installRoot) return { platform, binDir: join(context.installRoot, 'bin'), installRoot: context.installRoot };
38
+ return null;
39
+ }
40
+
41
+ // The launcher scripts, by file name.
42
+ export function cliScripts(plan) {
43
+ if (plan.platform === 'win32') {
44
+ return Object.fromEntries(COMMANDS.map((name) => [`${name}.cmd`,
45
+ `@echo off\r\nrem FULI desktop app: ${name}. Turn it off in FULI Settings.\r\n"%~dp0..\\FuliNode.exe" src\\cli.js %*\r\n`]));
46
+ }
47
+ const node = `${plan.packageRoot}/runtime/node/bin/node`;
48
+ return Object.fromEntries(COMMANDS.map((name) => [name, `#!/bin/sh
49
+ # FULI desktop app: ${name}. Turn it off in FULI Settings.
50
+ if [ ! -x ${shellQuote(node)} ]; then
51
+ echo "FULI.app is no longer at ${plan.packageRoot.replace(/\/Contents\/Resources\/fuli$/, '')}. Open FULI again, or remove ~/.fuli/bin." >&2
52
+ exit 127
53
+ fi
54
+ exec ${shellQuote(node)} ${shellQuote(`${plan.packageRoot}/src/cli.js`)} "$@"
55
+ `]));
56
+ }
57
+
58
+ const PROFILE_BLOCK = `${BLOCK_START}\nexport PATH="$HOME/.fuli/bin:$PATH"\n${BLOCK_END}\n`;
59
+
60
+ // What FULI appends to a shell profile that lacks its block: the separator
61
+ // (nothing in an empty file, a blank line otherwise) and the block. A profile
62
+ // that has the block anywhere is left as it is: answers null.
63
+ export function profileAddition(text) {
64
+ if (text.includes(BLOCK_START)) return null;
65
+ const separator = text === '' ? '' : text.endsWith('\n') ? '\n' : '\n\n';
66
+ return { separator, text: text + separator + PROFILE_BLOCK };
67
+ }
68
+
69
+ // The profile as it was before FULI's addition, byte for byte while the
70
+ // separator FULI recorded still ends it; a block the person moved is taken
71
+ // out alone. Without a block the text is unchanged.
72
+ export function withoutProfileBlock(text, separator = null) {
73
+ if (separator !== null && text.endsWith(separator + PROFILE_BLOCK)) return text.slice(0, text.length - (separator + PROFILE_BLOCK).length);
74
+ const at = text.indexOf(PROFILE_BLOCK);
75
+ return at < 0 ? text : text.slice(0, at) + text.slice(at + PROFILE_BLOCK.length);
76
+ }
77
+
78
+ // A Windows PATH value with binDir first and nowhere else (case-insensitive).
79
+ export function withFolderFirst(value, binDir) {
80
+ return [binDir, ...withoutFolder(value, binDir).split(';').filter(Boolean)].join(';');
81
+ }
82
+
83
+ export function withoutFolder(value, binDir) {
84
+ const same = (entry) => entry.replace(/\\+$/, '').toLowerCase() === binDir.replace(/\\+$/, '').toLowerCase();
85
+ return String(value ?? '').split(';').filter((entry) => entry && !same(entry)).join(';');
86
+ }
87
+
88
+ // Puts the commands in place unless the person turned them off. Answers
89
+ // { status: 'on' | 'off' | 'unsupported', changed: [what changed] }.
90
+ export function ensureCliPath(context, { platform = process.platform, homeDir = homedir(), files = fileSystem,
91
+ userPath = windowsUserPath } = {}) {
92
+ const plan = cliPathPlan(context, { platform, homeDir });
93
+ if (!plan) return { status: 'unsupported', changed: [] };
94
+ if (readCliPathSetting(context.dataDir).enabled === false) return { status: 'off', changed: [] };
95
+ const changed = [];
96
+ files.mkdir(plan.binDir);
97
+ for (const [name, text] of Object.entries(cliScripts(plan))) {
98
+ const file = join(plan.binDir, name);
99
+ if (files.read(file) !== text) { files.write(file, text, platform === 'win32' ? undefined : 0o755); changed.push(file); }
100
+ }
101
+ if (platform === 'darwin') {
102
+ const added = {};
103
+ for (const profile of plan.profiles) {
104
+ const current = files.read(profile);
105
+ // ~/.zshrc is made when missing; another shell's profile only when the person has one.
106
+ if (current === null && !profile.endsWith('.zshrc')) continue;
107
+ const addition = profileAddition(current ?? '');
108
+ if (!addition) continue;
109
+ files.writeAtomic(profile, addition.text);
110
+ added[profile] = { separator: addition.separator, created: current === null };
111
+ changed.push(profile);
112
+ }
113
+ if (Object.keys(added).length) recordProfiles(context.dataDir, added);
114
+ } else {
115
+ // A user PATH that could not be read is never written: it would lose what is there.
116
+ const current = userPath.read();
117
+ const next = current === null ? null : withFolderFirst(current, plan.binDir);
118
+ if (next !== null && next !== current) { userPath.write(next); changed.push('user PATH'); }
119
+ }
120
+ return { status: 'on', changed };
121
+ }
122
+
123
+ // Takes everything ensureCliPath added out again.
124
+ export function removeCliPath(context, { platform = process.platform, homeDir = homedir(), files = fileSystem,
125
+ userPath = windowsUserPath } = {}) {
126
+ const plan = cliPathPlan(context, { platform, homeDir });
127
+ if (!plan) return { status: 'unsupported', changed: [] };
128
+ const changed = [];
129
+ if (platform === 'darwin') {
130
+ const added = readCliPathRecord(context.dataDir)?.profiles ?? {};
131
+ for (const profile of plan.profiles) {
132
+ const current = files.read(profile);
133
+ if (current === null) continue;
134
+ const separator = typeof added[profile]?.separator === 'string' ? added[profile].separator : null;
135
+ const next = withoutProfileBlock(current, separator);
136
+ if (next === current) continue;
137
+ // A profile FULI made, and nothing else wrote to, goes away again.
138
+ if (next === '' && added[profile]?.created === true) files.unlink(profile); else files.writeAtomic(profile, next);
139
+ changed.push(profile);
140
+ }
141
+ if (Object.keys(added).length) recordProfiles(context.dataDir, null);
142
+ } else if (files.exists(plan.binDir)) {
143
+ // Only an installation that has the commands has a PATH entry to take out.
144
+ const current = userPath.read();
145
+ if (current !== null) {
146
+ const next = withoutFolder(current, plan.binDir);
147
+ if (next !== current) { userPath.write(next); changed.push('user PATH'); }
148
+ }
149
+ }
150
+ if (files.exists(plan.binDir)) { files.remove(plan.binDir); changed.push(plan.binDir); }
151
+ return { status: 'off', changed };
152
+ }
153
+
154
+ // The person's choice, kept in the data directory: { enabled: true | false | null }.
155
+ export function readCliPathSetting(dataDir) {
156
+ const record = readCliPathRecord(dataDir);
157
+ return { enabled: typeof record?.enabled === 'boolean' ? record.enabled : null };
158
+ }
159
+
160
+ export function writeCliPathSetting(dataDir, enabled, now = new Date()) {
161
+ updateCliPathRecord(dataDir, (record) => ({ ...record, enabled, changedAt: now.toISOString() }));
162
+ }
163
+
164
+ // The record also keeps what FULI added to each shell profile, so turning the
165
+ // commands off restores each one exactly; null forgets it.
166
+ function recordProfiles(dataDir, added) {
167
+ if (!dataDir) return;
168
+ updateCliPathRecord(dataDir, (record) => ({ ...record, profiles: added === null ? {} : { ...record.profiles, ...added } }));
169
+ }
170
+
171
+ function readCliPathRecord(dataDir) {
172
+ const record = dataDir ? readJsonRecord(join(dataDir, CLI_PATH_FILE), CLI_PATH_FORMAT) : null;
173
+ return record?.status === 'unreadable' ? null : record;
174
+ }
175
+
176
+ function updateCliPathRecord(dataDir, mutate) {
177
+ updateVersionedJsonFileAtomic(join(dataDir, CLI_PATH_FILE), CLI_PATH_FORMAT,
178
+ (current) => mutate({ version: 1, enabled: null, changedAt: null, profiles: {}, ...current }));
179
+ }
180
+
181
+ const fileSystem = {
182
+ read: (path) => { try { return readFileSync(path, 'utf8'); } catch (error) { if (error.code === 'ENOENT') return null; throw error; } },
183
+ write: (path, text, mode) => writeFileSync(path, text, mode === undefined ? 'utf8' : { encoding: 'utf8', mode }),
184
+ // A shell profile is replaced in one step, keeping its permissions, so a terminal never reads half of it.
185
+ writeAtomic: (path, text) => {
186
+ let mode = 0o644;
187
+ try { mode = statSync(path).mode & 0o777; } catch { /* a new profile */ }
188
+ const temporary = `${path}.fuli-${process.pid}.tmp`;
189
+ writeFileSync(temporary, text, { encoding: 'utf8', mode });
190
+ try { renameSync(temporary, path); } catch (error) { rmSync(temporary, { force: true }); throw error; }
191
+ },
192
+ unlink: (path) => rmSync(path, { force: true }),
193
+ mkdir: (path) => mkdirSync(path, { recursive: true }),
194
+ exists: existsSync,
195
+ remove: (path) => rmSync(path, { recursive: true, force: true })
196
+ };
197
+
198
+ // The user PATH as the registry keeps it (unexpanded), written back as
199
+ // REG_EXPAND_SZ and announced so new terminals see it without signing out.
200
+ // Both directions carry the value as base64 of its UTF-8 bytes, so a folder
201
+ // name in any language survives the console code page (GBK on Chinese Windows).
202
+ const windowsUserPath = {
203
+ read() {
204
+ const script = '$ErrorActionPreference="Stop"; $ProgressPreference="SilentlyContinue"; '
205
+ + '$v=(Get-Item HKCU:\\Environment).GetValue("Path", $null, "DoNotExpandEnvironmentNames"); '
206
+ + 'if ($null -eq $v) { "NONE" } else { [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes([string]$v)) }';
207
+ try {
208
+ return decodeUserPathOutput(execFileSync(powershellPath(), ['-NoProfile', '-NonInteractive', '-EncodedCommand',
209
+ Buffer.from(script, 'utf16le').toString('base64')], { encoding: 'ascii', windowsHide: true, stdio: ['ignore', 'pipe', 'ignore'] }));
210
+ } catch {
211
+ return null;
212
+ }
213
+ },
214
+ write(value) {
215
+ const script = '$ErrorActionPreference="Stop"; $ProgressPreference="SilentlyContinue"; '
216
+ + '$v=[Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($env:FULI_USER_PATH)); '
217
+ + 'New-ItemProperty -Path HKCU:\\Environment -Name Path -PropertyType ExpandString -Value $v -Force | Out-Null; '
218
+ + 'Add-Type -Namespace Fuli -Name Env -MemberDefinition \'[DllImport("user32.dll", CharSet=CharSet.Unicode)] public static extern IntPtr SendMessageTimeout(IntPtr h, uint m, UIntPtr w, string l, uint f, uint t, out UIntPtr r);\'; '
219
+ + '$r=[UIntPtr]::Zero; [Fuli.Env]::SendMessageTimeout([IntPtr]0xffff, 0x1A, [UIntPtr]::Zero, "Environment", 2, 5000, [ref]$r) | Out-Null';
220
+ execFileSync(powershellPath(), ['-NoProfile', '-NonInteractive', '-EncodedCommand', Buffer.from(script, 'utf16le').toString('base64')],
221
+ { windowsHide: true, stdio: 'ignore', env: { ...process.env, FULI_USER_PATH: encodeUserPath(value) } });
222
+ }
223
+ };
224
+
225
+ const powershellPath = () => join(process.env.SystemRoot ?? 'C:\\Windows', 'System32', 'WindowsPowerShell', 'v1.0', 'powershell.exe');
226
+
227
+ // The value as the write script receives it.
228
+ export const encodeUserPath = (value) => Buffer.from(value, 'utf8').toString('base64');
229
+
230
+ // The read script's answer: "NONE" for no user PATH (an empty one), base64 of
231
+ // the UTF-8 value, or null for anything else, which is never written over.
232
+ export function decodeUserPathOutput(output) {
233
+ const text = String(output ?? '').trim();
234
+ if (text === 'NONE') return '';
235
+ if (!/^[A-Za-z0-9+/]*={0,2}$/.test(text)) return null;
236
+ return Buffer.from(text, 'base64').toString('utf8');
237
+ }
238
+
239
+ const shellQuote = (value) => `'${String(value).replaceAll("'", "'\\''")}'`;
240
+
241
+ // The console's switch (Settings › 客户端): context { dataDir, packageRoot, installRoot }.
242
+ export function createCliPathControl(context, options = {}) {
243
+ const status = () => ({ supported: cliPathPlan(context, options) !== null,
244
+ enabled: readCliPathSetting(context.dataDir).enabled !== false });
245
+ return {
246
+ status,
247
+ set(enabled) {
248
+ writeCliPathSetting(context.dataDir, enabled);
249
+ const result = enabled ? ensureCliPath(context, options) : removeCliPath(context, options);
250
+ return { ...status(), changed: result.changed.length > 0 };
251
+ }
252
+ };
253
+ }
@@ -0,0 +1,31 @@
1
+ import { realpathSync } from 'node:fs';
2
+
3
+ import { readMacosNativeBundle } from '../native-runtime/macos-assets.js';
4
+ import { readWindowsNativeBundle } from '../native-runtime/windows-assets.js';
5
+
6
+ // Whether a FULI package is the desktop client's own copy: the package inside
7
+ // FULI.app on macOS, or a Windows package that carries its native bundle
8
+ // (installed or the portable tray). An npm installation or a source checkout
9
+ // is neither.
10
+ const MACOS_APP_PACKAGE = /\.app\/Contents\/Resources\/fuli\/?$/;
11
+
12
+ export const isMacosAppPackage = (packageRoot) => MACOS_APP_PACKAGE.test(String(packageRoot).replaceAll('\\', '/'));
13
+
14
+ export function isDesktopAppPackage(packageRoot, { platform = process.platform } = {}) {
15
+ if (typeof packageRoot !== 'string' || !packageRoot) return false;
16
+ try {
17
+ if (platform === 'win32') return readWindowsNativeBundle(packageRoot) !== null;
18
+ return platform === 'darwin' && isMacosAppPackage(packageRoot) && readMacosNativeBundle(packageRoot) !== null;
19
+ } catch {
20
+ return false;
21
+ }
22
+ }
23
+
24
+ // Whether two package roots name the same folder, followed through links;
25
+ // Windows paths compare without case.
26
+ export function samePackageRoot(a, b, { platform = process.platform } = {}) {
27
+ if (typeof a !== 'string' || typeof b !== 'string' || !a || !b) return false;
28
+ const real = (path) => { try { return realpathSync(path); } catch { return path; } };
29
+ const [left, right] = [real(a), real(b)].map((path) => path.replace(/[\\/]+$/, ''));
30
+ return platform === 'win32' ? left.toLowerCase() === right.toLowerCase() : left === right;
31
+ }
@@ -2,36 +2,40 @@ import { execFileSync } from 'node:child_process';
2
2
  import { dirname, join, win32 } from 'node:path';
3
3
  import { fileURLToPath } from 'node:url';
4
4
 
5
+ import { isDesktopAppPackage } from './desktop-app-package.js';
5
6
  import { readWindowsInstallation } from './windows-installation-context.js';
6
7
 
7
- // Receipt links as `fuli://` links (rec#11 D-80): the FULI desktop client of
8
- // this Windows installation registers the scheme for its user
9
- // (desktop/flutter windows_url_scheme.dart), opens the page with whatever port
10
- // the console uses now, and only navigates. Until the scheme opens this
11
- // installation's launcher, receipts keep their http links. Checked at most
12
- // once a minute; anything unexpected also keeps http links.
8
+ // Whether this installation's FULI desktop client opens `fuli://` links, so
9
+ // the console in a browser can offer 「在客户端打开」. On Windows the client
10
+ // registers the scheme for its user once it runs
11
+ // (desktop/flutter windows_url_scheme.dart); the scheme must start this
12
+ // installation's launcher, checked at most once a minute. On macOS the app
13
+ // declares the scheme itself (Info.plist), so its own package is enough.
14
+ // Anything else, or anything unexpected, answers false.
13
15
 
14
16
  const COMMAND_KEY = 'HKCU\\Software\\Classes\\fuli\\shell\\open\\command';
15
17
  const RECHECK_MS = 60_000;
16
18
  const PACKAGE_ROOT = dirname(dirname(dirname(fileURLToPath(import.meta.url))));
17
19
 
18
- // `fuli:/` + `/settings` is `fuli://settings`, the form the client reads.
19
- export const FULI_LINK_ORIGIN = 'fuli:/';
20
-
21
- export function fuliLinkOrigin({ platform = process.platform, packageRoot = PACKAGE_ROOT,
22
- readInstallation = readWindowsInstallation, readCommand = readSchemeCommand, now = Date.now } = {}) {
23
- if (platform !== 'win32') return () => null;
20
+ export function desktopClientOpensLinks({ platform = process.platform, packageRoot = PACKAGE_ROOT,
21
+ readInstallation = readWindowsInstallation, readCommand = readSchemeCommand,
22
+ isAppPackage = isDesktopAppPackage, now = Date.now } = {}) {
23
+ if (platform === 'darwin') {
24
+ const opens = isAppPackage(packageRoot, { platform });
25
+ return () => opens;
26
+ }
27
+ if (platform !== 'win32') return () => false;
24
28
  let installRoot;
25
29
  try { installRoot = readInstallation(packageRoot)?.installRoot ?? null; } catch { installRoot = null; }
26
- if (!installRoot) return () => null;
30
+ if (!installRoot) return () => false;
27
31
  let checkedAt = -Infinity;
28
- let origin = null;
32
+ let opens = false;
29
33
  return () => {
30
34
  if (now() - checkedAt >= RECHECK_MS) {
31
35
  checkedAt = now();
32
- origin = opensInstallation(readCommand(), installRoot) ? FULI_LINK_ORIGIN : null;
36
+ opens = opensInstallation(readCommand(), installRoot);
33
37
  }
34
- return origin;
38
+ return opens;
35
39
  };
36
40
  }
37
41
 
@@ -5,6 +5,10 @@ import { resolveSetupPaths } from '../setup/paths.js';
5
5
  import { switchConsolePort } from '../system/console-port-switch.js';
6
6
  import { reservedPortProblem } from '../system/reserved-ports.js';
7
7
  import { readRuntimeSettings } from '../system/runtime-settings.js';
8
+ import { ensureCliPath } from './cli-path.js';
9
+ import { adoptionHold, otherPackageConsole, reconnectAfterAdoption } from './npm-adoption.js';
10
+ import { clientDataUse } from './npm-copy-data.js';
11
+ import { findNpmCopies } from './npm-copies.js';
8
12
 
9
13
  // What the desktop client asks of a packaged FULI: status, start (first-time
10
14
  // setup in native mode), stop, open and the console port change, all through
@@ -48,8 +52,12 @@ async function consolePortBlocked(context) {
48
52
  host: settings.lanAccess ? '0.0.0.0' : '127.0.0.1' }) !== null;
49
53
  }
50
54
 
55
+ // A stubbed CLI never looks for npm copies on the machine running the test.
51
56
  export async function runTrayAction(action, context, {
52
- runCli = executeCli, portBlocked = consolePortBlocked, switchPort = switchConsolePort
57
+ runCli = executeCli, portBlocked = consolePortBlocked, switchPort = switchConsolePort,
58
+ otherConsole = otherPackageConsole, findCopies = runCli === executeCli ? findNpmCopies : () => [],
59
+ cliPath = runCli === executeCli ? ensureCliPath : () => null,
60
+ dataUse = runCli === executeCli ? clientDataUse : async () => new Map(), holdAdoption = adoptionHold
53
61
  } = {}) {
54
62
  if (!ACTIONS.has(action)) throw new Error('Unsupported tray action: ' + action);
55
63
  const invoke = (args) => runCli(context, [...args, '--data-dir', context.dataDir]);
@@ -68,6 +76,9 @@ export async function runTrayAction(action, context, {
68
76
  };
69
77
  let starting = false;
70
78
  let notice = null;
79
+ let replaced = null;
80
+ let hold = null;
81
+ let adopted = null;
71
82
  try {
72
83
  if (['start', 'start-open', 'stop', 'change-port'].includes(action)) assertNativeSelection(context);
73
84
  if (action === 'change-port') {
@@ -95,10 +106,21 @@ export async function runTrayAction(action, context, {
95
106
  if (setup.code !== 0 && String(setup.stderr ?? '').trim()) throw cliError(setup);
96
107
  } else {
97
108
  const before = await inspect();
98
- if (before.status !== 'running') await command(['start']);
109
+ // The app is the one FULI of its data: a console another FULI package
110
+ // runs (an npm copy) is replaced by the app's own (npm-adoption.js),
111
+ // unless the data is busy or that copy is newer than the app.
112
+ const other = otherConsole(context);
113
+ hold = holdAdoption(context, other);
114
+ if (other && !hold) { replaced = other; await command(['restart']); }
115
+ else if (before.status !== 'running') await command(['start']);
99
116
  }
100
117
  const ready = await inspect();
101
118
  if (ready.status !== 'running') throw new Error('Fuli did not reach its running state.');
119
+ // Clients still pointed at an npm copy are pointed at the app's; a failure here never fails the start.
120
+ if (hold) notice = adoptionHoldNotice(hold);
121
+ else adopted = await reconnectAfterAdoption(context, { replaced, invoke, findCopies, dataUse }).catch(() => null);
122
+ // The app's own fl and fuli in a terminal (cli-path.js), unless the person turned them off.
123
+ try { cliPath(context); } catch { /* a terminal keeps what it had; Settings shows the state */ }
102
124
  }
103
125
  if (['open', 'start-open', 'change-port'].includes(action)) await command(['open']);
104
126
  if (action === 'stop') await command(['stop']);
@@ -106,7 +128,8 @@ export async function runTrayAction(action, context, {
106
128
  if (action === 'stop' && !['stopped', 'not_configured'].includes(state.status)) {
107
129
  throw new Error('Fuli did not confirm that the selected runtime stopped.');
108
130
  }
109
- return { ok: true, action, status: state.status, label: trayStateLabel(state), state, ...(notice ? { notice } : {}) };
131
+ return { ok: true, action, status: state.status, label: trayStateLabel(state), state, ...(notice ? { notice } : {}),
132
+ ...(replaced ? { replacedConsole: replaced.pid } : {}), ...(adopted ? { adopted } : {}) };
110
133
  } catch (error) {
111
134
  // A failed start can already own processes. Keep their CLI state and report
112
135
  // what is actually running; never kill by process name or delete the data.
@@ -120,6 +143,15 @@ export async function runTrayAction(action, context, {
120
143
  }
121
144
  }
122
145
 
146
+ // What the app says when it did not take over this time.
147
+ function adoptionHoldNotice(hold) {
148
+ return hold.reason === 'npm_newer'
149
+ ? `npm 装的 FULI v${hold.version} 比桌面版新,桌面版没有替换它。请先更新桌面版。`
150
+ + ` / The npm copy of FULI (v${hold.version}) is newer than the desktop app, which left it running. Update the desktop app first.`
151
+ : '数据正在做格式更新或恢复,桌面版这次没有接管 npm 版,下次启动再试。'
152
+ + ' / A data format step or restore is under way, so the desktop app did not take over the npm copy this time; it tries again at the next start.';
153
+ }
154
+
123
155
  function cliError(result) {
124
156
  // CLI error details are written to stderr. Do not copy setup/start stdout:
125
157
  // LAN output can contain a temporary access code.
@@ -0,0 +1,7 @@
1
+ import { jsonFormat } from '../storage/json-format.js';
2
+
3
+ // The desktop app's record of the npm copies it adopted (npm-adoption.js):
4
+ // which ones had their clients pointed at the app, what data each one's
5
+ // clients use, and which console notices the person closed.
6
+ export const DESKTOP_ADOPTION_FILE = 'desktop-app-adoption.json';
7
+ export const DESKTOP_ADOPTION_FORMAT = jsonFormat({ store: 'desktop-app-adoption', versions: [1] });
@@ -0,0 +1,119 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+
4
+ import { dataWaitsForPerson } from '../local-runtime/console-autostart.js';
5
+ import { isProcessAlive } from '../local-runtime/processes.js';
6
+ import { FULI_VERSION } from '../package-metadata.js';
7
+ import { compareSemanticVersions } from '../semantic-version.js';
8
+ import { readJsonFile } from '../storage/json-file.js';
9
+ import { readJsonRecord, updateVersionedJsonFileAtomic } from '../storage/json-format.js';
10
+ import { samePackageRoot } from './desktop-app-package.js';
11
+ import { DESKTOP_ADOPTION_FILE, DESKTOP_ADOPTION_FORMAT } from './npm-adoption-store.js';
12
+ import { clientDataUse } from './npm-copy-data.js';
13
+ import { findNpmCopies } from './npm-copies.js';
14
+
15
+ // How the desktop app becomes the one FULI of its data directory when the
16
+ // person installed FULI with npm first (both use the same data directory,
17
+ // src/setup/paths.js):
18
+ // - a console another package started (an npm copy, a checkout, an app
19
+ // version from before consoles recorded their package) is restarted from
20
+ // the app, so the app's code serves the shared data;
21
+ // - then every client FULI was connected to is pointed at the app's copy
22
+ // (`setup --connected-only`, as an app update does), once per npm copy
23
+ // whose clients use this data directory (npm-copy-data.js).
24
+ // It waits while a whole-store restore holds the data or a format step waits
25
+ // for the person (adoptionHold), and it leaves alone an npm copy that is newer
26
+ // than the app or serves other data, with the clients connected to it.
27
+ // The npm copy stays installed until the person removes it
28
+ // (npm-copy-control.js). Nothing in the data directory is moved or deleted.
29
+
30
+
31
+ // The console this data directory records, when a live process of another
32
+ // FULI package runs it: { pid, packageRoot } (packageRoot null when the
33
+ // console is from before consoles recorded it), else null.
34
+ export function otherPackageConsole(context, { readState = readRuntimeState, isAlive = isProcessAlive,
35
+ platform = process.platform } = {}) {
36
+ const state = readState(join(context.dataDir, 'graph-runtime-state.json'));
37
+ if (!Number.isInteger(state?.pid) || !isAlive(state.pid)) return null;
38
+ if (samePackageRoot(state.packageRoot, context.packageRoot, { platform })) return null;
39
+ return { pid: state.pid, packageRoot: typeof state.packageRoot === 'string' ? state.packageRoot : null };
40
+ }
41
+
42
+ // Why the app does not take over this time, or null: { reason: 'data_busy' }
43
+ // (try again at the next start) or { reason: 'npm_newer', version } (the
44
+ // person updates the app first). other: otherPackageConsole's answer.
45
+ export function adoptionHold(context, other, { busy = dataWaitsForPerson, appVersion = FULI_VERSION,
46
+ readVersion = packageVersion } = {}) {
47
+ if (busy(context.dataDir)) return { reason: 'data_busy' };
48
+ const version = other?.packageRoot ? readVersion(other.packageRoot) : null;
49
+ return version && compareSemanticVersions(version, appVersion) > 0 ? { reason: 'npm_newer', version } : null;
50
+ }
51
+
52
+ // After the app's console runs: reconnects the clients when this start
53
+ // replaced another package's console, or found an npm copy not adopted
54
+ // before whose clients use this data directory. Nothing is reconnected while
55
+ // any npm copy is newer than the app or has clients on other data: one
56
+ // reconnection rewrites every connected client. invoke(args) runs the app's
57
+ // own CLI on this data directory. Answers null when there was nothing to do,
58
+ // else { clients: 'reconnected' | 'not_reconnected' | 'kept', npmCopies }. A
59
+ // reconnection that fails leaves the clients to the 体检's repair; it is not
60
+ // tried again at every start.
61
+ export async function reconnectAfterAdoption(context, { replaced, invoke, findCopies = findNpmCopies,
62
+ dataUse = clientDataUse, appVersion = FULI_VERSION, now = () => new Date() }) {
63
+ const copies = findCopies({ ownRoot: context.packageRoot, extraRoots: replaced?.packageRoot ? [replaced.packageRoot] : [] });
64
+ if (!copies.length && !replaced) return null;
65
+ const path = join(context.dataDir, DESKTOP_ADOPTION_FILE);
66
+ const record = readJsonRecord(path, DESKTOP_ADOPTION_FORMAT);
67
+ const known = new Set(Array.isArray(record?.npmCopies) ? record.npmCopies : []);
68
+ const use = copies.length ? await dataUse(context, copies) : new Map();
69
+ const seen = copies.map((copy) => ({ packageRoot: copy.packageRoot, version: copy.version,
70
+ ...(use.get(copy.packageRoot) ?? { shares: null, dataDir: null }),
71
+ newer: compareSemanticVersions(copy.version, appVersion) > 0 }));
72
+ const kept = seen.filter((copy) => copy.shares === false || copy.newer);
73
+ const fresh = seen.filter((copy) => copy.shares === true && !known.has(copy.packageRoot));
74
+ const reconnect = !kept.length && (Boolean(replaced) || fresh.length > 0);
75
+ const clients = reconnect ? ((await invoke(['setup', '--yes', '--connected-only'])).code === 0 ? 'reconnected' : 'not_reconnected')
76
+ : 'kept';
77
+ if (record?.status !== 'unreadable') {
78
+ updateVersionedJsonFileAtomic(path, DESKTOP_ADOPTION_FORMAT, (current) => {
79
+ const next = { ...emptyRecord(), ...current,
80
+ copies: Object.fromEntries(seen.map(({ packageRoot, shares, dataDir }) => [packageRoot, { shares, dataDir }])) };
81
+ return reconnect ? { ...next, adoptedAt: now().toISOString(), clients,
82
+ npmCopies: [...known, ...fresh.map((copy) => copy.packageRoot)] } : next;
83
+ });
84
+ }
85
+ return reconnect || kept.length ? { clients, npmCopies: copies.length } : null;
86
+ }
87
+
88
+ // What the person's console says about each copy: the other data its
89
+ // clients use, as the last start found it (reconnectAfterAdoption).
90
+ export function npmCopyDataSeen(dataDir) {
91
+ const record = readJsonRecord(join(dataDir, DESKTOP_ADOPTION_FILE), DESKTOP_ADOPTION_FORMAT);
92
+ return record?.copies && typeof record.copies === 'object' ? record.copies : {};
93
+ }
94
+
95
+ // The npm copies whose console notice the person closed; a closed notice
96
+ // stays closed, and Settings still lists the copy.
97
+ export function dismissedNpmNotices(dataDir) {
98
+ const record = readJsonRecord(join(dataDir, DESKTOP_ADOPTION_FILE), DESKTOP_ADOPTION_FORMAT);
99
+ return new Set(Array.isArray(record?.dismissed) ? record.dismissed : []);
100
+ }
101
+
102
+ export function setNpmNoticeDismissed(dataDir, packageRoot, dismissed) {
103
+ updateVersionedJsonFileAtomic(join(dataDir, DESKTOP_ADOPTION_FILE), DESKTOP_ADOPTION_FORMAT, (current) => {
104
+ const next = { ...emptyRecord(), ...current };
105
+ const roots = new Set(next.dismissed);
106
+ if (dismissed) roots.add(packageRoot); else roots.delete(packageRoot);
107
+ return { ...next, dismissed: [...roots] };
108
+ });
109
+ }
110
+
111
+ const emptyRecord = () => ({ version: 1, adoptedAt: null, npmCopies: [], clients: null, dismissed: [], copies: {} });
112
+
113
+ function packageVersion(packageRoot) {
114
+ try { return JSON.parse(readFileSync(join(packageRoot, 'package.json'), 'utf8')).version ?? null; } catch { return null; }
115
+ }
116
+
117
+ function readRuntimeState(path) {
118
+ try { return readJsonFile(path, null); } catch { return null; }
119
+ }
@@ -0,0 +1,73 @@
1
+ import { readdirSync, readFileSync } from 'node:fs';
2
+ import { homedir } from 'node:os';
3
+
4
+ import { inspectUpdateInstallation, npmGlobalPrefix, npmUninstallCommand } from '../cli/update-installation.js';
5
+ import { FULI_PACKAGE_NAME } from '../package-metadata.js';
6
+ import { platformPath } from '../system/platform-path.js';
7
+ import { samePackageRoot } from './desktop-app-package.js';
8
+
9
+ // The FULI copies npm installed on this machine beside the desktop app's own
10
+ // (`npm i -g fuli-context`): both use the same data directory, so the app
11
+ // takes over the service and the clients, and the person removes the npm
12
+ // copy when they choose. Only files are read: no launcher is executed and npm
13
+ // is never asked.
14
+ //
15
+ // A desktop app does not inherit the shell's PATH (a macOS app started from
16
+ // Finder sees /usr/bin:/bin), so the folders npm usually links its commands
17
+ // into are read too. The app's own CLI is not on PATH, so a `fl` found here
18
+ // is what a terminal runs.
19
+ //
20
+ // Answers [{ packageRoot, version, launchers: [path], shellCommands, removeCommand }];
21
+ // shellCommands: the bare commands (fl, fuli) a terminal answers with this copy.
22
+ // extraRoots: package roots known from elsewhere, such as the one a running
23
+ // console recorded; only an npm global package among them counts.
24
+ export function findNpmCopies({ ownRoot, extraRoots = [], env = process.env, platform = process.platform,
25
+ homeDir = homedir(), inspect = inspectUpdateInstallation, listDirectory = readdirSync, readText = readFileSync } = {}) {
26
+ const path = platformPath(platform);
27
+ const pathKey = Object.keys(env).find((name) => name.toLowerCase() === 'path') ?? 'PATH';
28
+ const directories = [...(env[pathKey] ?? '').split(path.delimiter).filter(Boolean),
29
+ ...usualNpmBinDirectories({ env, platform, homeDir, listDirectory })];
30
+ const { launchers } = inspect({ env: { PATH: [...new Set(directories)].join(path.delimiter) }, platform });
31
+ const copies = new Map();
32
+ const add = (packageRoot, version, launcher = null) => {
33
+ if (!npmUninstallCommand(packageRoot, platform) || samePackageRoot(packageRoot, ownRoot, { platform })) return;
34
+ // A project's own node_modules (its folder has a package.json) is never an npm global install.
35
+ if (packageVersion(path.join(npmGlobalPrefix(packageRoot, platform), 'package.json'), readText, { anyName: true })) return;
36
+ const key = platform === 'win32' ? packageRoot.toLowerCase() : packageRoot;
37
+ const copy = copies.get(key) ?? { packageRoot, version, launchers: [], removeCommand: npmUninstallCommand(packageRoot, platform) };
38
+ if (launcher && !copy.launchers.includes(launcher)) copy.launchers.push(launcher);
39
+ copies.set(key, copy);
40
+ };
41
+ for (const launcher of launchers) {
42
+ if (launcher.version) add(path.dirname(path.dirname(launcher.target)), launcher.version, launcher.path);
43
+ }
44
+ for (const root of extraRoots) {
45
+ if (typeof root !== 'string' || !root) continue;
46
+ const version = packageVersion(path.join(root, 'package.json'), readText);
47
+ if (version) add(root, version);
48
+ }
49
+ return [...copies.values()].map((copy) => ({ ...copy,
50
+ shellCommands: [...new Set(copy.launchers.map((launcher) => path.basename(launcher).replace(/\.cmd$/i, '')))] }));
51
+ }
52
+
53
+ // Where npm links global commands when its own folder is not on the app's PATH.
54
+ function usualNpmBinDirectories({ env, platform, homeDir, listDirectory }) {
55
+ const path = platformPath(platform);
56
+ if (platform === 'win32') {
57
+ return [path.join(env.APPDATA || path.join(homeDir, 'AppData', 'Roaming'), 'npm')];
58
+ }
59
+ const nvm = path.join(homeDir, '.nvm', 'versions', 'node');
60
+ let nvmVersions = [];
61
+ try { nvmVersions = listDirectory(nvm).map((version) => path.join(nvm, version, 'bin')); } catch { /* no nvm */ }
62
+ return ['/opt/homebrew/bin', '/usr/local/bin', path.join(homeDir, '.npm-global', 'bin'),
63
+ path.join(homeDir, '.volta', 'bin'), ...nvmVersions];
64
+ }
65
+
66
+ function packageVersion(file, readText, { anyName = false } = {}) {
67
+ try {
68
+ const manifest = JSON.parse(readText(file, 'utf8'));
69
+ return (anyName || manifest.name === FULI_PACKAGE_NAME) && typeof manifest.version === 'string' ? manifest.version : null;
70
+ } catch {
71
+ return null;
72
+ }
73
+ }