fuli-context 0.20.1 → 0.21.0-beta.2

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 (262) hide show
  1. package/dist/web/assets/{AboutPage-CjDenGS_.js → AboutPage-D0dTwKq8.js} +1 -1
  2. package/dist/web/assets/{AgentName-DdlJlpT3.js → AgentName-n4oqQUwE.js} +1 -1
  3. package/dist/web/assets/{AgentProfilePage-Cx_Uf5Vf.js → AgentProfilePage-DH54S93r.js} +1 -1
  4. package/dist/web/assets/{AgentsDirectoryPage-DylT-GSW.js → AgentsDirectoryPage-xwIRrNb8.js} +1 -1
  5. package/dist/web/assets/{BackLink-D7oAvDG5.js → BackLink-nM3e40IT.js} +1 -1
  6. package/dist/web/assets/{BoardMoveMenu-B0pA7LLx.js → BoardMoveMenu-Cxgkbwkl.js} +1 -1
  7. package/dist/web/assets/{CaptureChangePage-DEuqPb14.js → CaptureChangePage-DWdz9dEk.js} +1 -1
  8. package/dist/web/assets/{Card-BZFLZ_2I.js → Card-89NKHANE.js} +1 -1
  9. package/dist/web/assets/{CardHeader-C_c0keQn.js → CardHeader-9MwjWRxl.js} +1 -1
  10. package/dist/web/assets/{CardTitle-yXOhV577.js → CardTitle-BAhmXjAK.js} +1 -1
  11. package/dist/web/assets/{ConnectionsPage-DlnHdtwn.js → ConnectionsPage-Yf4UvjDT.js} +1 -1
  12. package/dist/web/assets/{CreateProjectDialog-BVJqWdlT.js → CreateProjectDialog-crpLTyDf.js} +1 -1
  13. package/dist/web/assets/{DataFormatPage-BdcjcyhZ.js → DataFormatPage-BPuUH0PG.js} +1 -1
  14. package/dist/web/assets/{DialogFooter-DYawfDCD.js → DialogFooter-D9A9hRP4.js} +1 -1
  15. package/dist/web/assets/{EmployeeRecruitDialog-CB4ARFkM.js → EmployeeRecruitDialog-DeB0XHeM.js} +1 -1
  16. package/dist/web/assets/EmployeeWorkbenchPage-0oK2RfIh.js +3 -0
  17. package/dist/web/assets/{EmployeeWorkbenchPage-BenZP7De.css → EmployeeWorkbenchPage-CMutwFBC.css} +1 -1
  18. package/dist/web/assets/{GrowthLoading-smW3-Gfp.js → GrowthLoading-Cs9brXcN.js} +1 -1
  19. package/dist/web/assets/{InboxPage-Crn1UU7s.js → InboxPage-CTQ425Ez.js} +1 -1
  20. package/dist/web/assets/{Input-F1oftPWh.js → Input-DGf4juEs.js} +1 -1
  21. package/dist/web/assets/{KnowledgeEditDialog-VdQwbX4E.js → KnowledgeEditDialog-Ccgj30Wu.js} +1 -1
  22. package/dist/web/assets/{KnowledgeHardDeleteSection-CXRmNnZF.js → KnowledgeHardDeleteSection-CSnqisUv.js} +1 -1
  23. package/dist/web/assets/{KnowledgeItemEditPage-CQo3TbCJ.js → KnowledgeItemEditPage-C0Y2DsHz.js} +1 -1
  24. package/dist/web/assets/{KnowledgeItemSummaryCard-Dd2McM-d.js → KnowledgeItemSummaryCard-BRvaf4Fw.js} +1 -1
  25. package/dist/web/assets/{KnowledgeOrganizerPage-BVgAyu6U.js → KnowledgeOrganizerPage-CRC3mk0j.js} +1 -1
  26. package/dist/web/assets/KnowledgePage-NsKFUWth.js +1 -0
  27. package/dist/web/assets/{KnowledgePeek-BNBkh1ey.js → KnowledgePeek-Bc0bqyZp.js} +1 -1
  28. package/dist/web/assets/{KnowledgeTurnReceiptPage-Ckw_olrt.js → KnowledgeTurnReceiptPage-Dl0KeFDe.js} +1 -1
  29. package/dist/web/assets/{KnowledgeWorkspace-pH2tAFld.js → KnowledgeWorkspace-BGlODG7G.js} +1 -1
  30. package/dist/web/assets/{Label-yDCtlpkb.js → Label-CafdTnDF.js} +1 -1
  31. package/dist/web/assets/ModelSettingsPage-Bz1tMXtW.js +1 -0
  32. package/dist/web/assets/ModelSettingsPage-DJuEaw6p.css +1 -0
  33. package/dist/web/assets/{NotFoundPage-8gVVukRR.js → NotFoundPage-TfZ2eoA2.js} +1 -1
  34. package/dist/web/assets/{OccupationsPage-PNoqE21Y.js → OccupationsPage-CnSp6362.js} +1 -1
  35. package/dist/web/assets/{OverviewPage-DiwYSnhh.js → OverviewPage-D5W-DhOz.js} +2 -2
  36. package/dist/web/assets/{PersonalProfilePage-C_v2BFee.js → PersonalProfilePage-CndOcRQ6.js} +1 -1
  37. package/dist/web/assets/{PersonalProjectsPage-DGRV8cM5.js → PersonalProjectsPage-CXBOwEqC.js} +1 -1
  38. package/dist/web/assets/{PopperContent-5zqbtnYr.js → PopperContent-BXbztFFi.js} +1 -1
  39. package/dist/web/assets/{Presence-BYfYJNMD.js → Presence-BLar6FCs.js} +1 -1
  40. package/dist/web/assets/{ProjectAgentDetailPage-BQ9ffaCX.js → ProjectAgentDetailPage-SmZ2NYTw.js} +1 -1
  41. package/dist/web/assets/{ProjectAgentDialog-BGckQDTq.js → ProjectAgentDialog-Bg0V3Zr2.js} +1 -1
  42. package/dist/web/assets/{ProjectAgentFirstTask-DrSd3nR-.js → ProjectAgentFirstTask-CbOWaP7Q.js} +1 -1
  43. package/dist/web/assets/{ProjectAgentsPage-U4Om3EPu.js → ProjectAgentsPage-Y6qCYRZj.js} +1 -1
  44. package/dist/web/assets/{ProjectScopePicker-D0oxbwOd.js → ProjectScopePicker-ClDUoUHW.js} +1 -1
  45. package/dist/web/assets/{PublicProjectsPage-CvkQ3E8I.js → PublicProjectsPage-C63vW9UZ.js} +1 -1
  46. package/dist/web/assets/{RadioGroupItem-CBpbQlHx.js → RadioGroupItem-tL_2upmD.js} +1 -1
  47. package/dist/web/assets/{RoundtablesPage-BEUaKOjI.js → RoundtablesPage-2Akxagrm.js} +1 -1
  48. package/dist/web/assets/{RovingFocusGroup-X9U-ufYr.js → RovingFocusGroup-D5mf9s6I.js} +1 -1
  49. package/dist/web/assets/{RovingFocusItem-_uA_OCLT.js → RovingFocusItem-DAumq9xD.js} +1 -1
  50. package/dist/web/assets/{SessionMigrationPage-WVFSDcUO.js → SessionMigrationPage-B5r2PWCF.js} +1 -1
  51. package/dist/web/assets/{SessionRecordsPage-Bs2eLXEi.js → SessionRecordsPage-DIc2GoCQ.js} +1 -1
  52. package/dist/web/assets/{SettingsPage-DlIwICIz.js → SettingsPage-BAxKpnBx.js} +1 -1
  53. package/dist/web/assets/{SharedJefaReportPage-B_rreEep.js → SharedJefaReportPage-B54qEdIV.js} +1 -1
  54. package/dist/web/assets/{TabsContent-8pXwYJPz.js → TabsContent-DZQE2Iq8.js} +1 -1
  55. package/dist/web/assets/{TabsTrigger-Cd6SI2yI.js → TabsTrigger-CHnq6mkI.js} +1 -1
  56. package/dist/web/assets/{TagVocabularyPage-BQiuKG-4.js → TagVocabularyPage-BIsHYk2i.js} +1 -1
  57. package/dist/web/assets/{TaskExecutionPlan-CupxJeyo.js → TaskExecutionPlan-IYG_JeuT.js} +1 -1
  58. package/dist/web/assets/{TaskSchedulesPage-zYQs7s6T.js → TaskSchedulesPage-Cxjqc8XQ.js} +1 -1
  59. package/dist/web/assets/{Teleport-BZX1Eb7R.js → Teleport-BKN3dSMk.js} +1 -1
  60. package/dist/web/assets/{TextField-CielK4l3.js → TextField-DoKtn--E.js} +1 -1
  61. package/dist/web/assets/{UiDialog-BSDblUpR.js → UiDialog-7pnZ-eQA.js} +1 -1
  62. package/dist/web/assets/{UiDisclosure-DLmVwmy1.js → UiDisclosure-COV4NwHI.js} +1 -1
  63. package/dist/web/assets/{UiIcon-B8eZeuGI.js → UiIcon-BADOYtHM.js} +1 -1
  64. package/dist/web/assets/{UiIconButton-e754Tmnq.js → UiIconButton-CkBP6pnX.js} +1 -1
  65. package/dist/web/assets/{UiSegmented-D1HD-qin.js → UiSegmented-FwOnE2IZ.js} +1 -1
  66. package/dist/web/assets/{UiSelect-CbkTsi2e.js → UiSelect-BIhr03Gk.js} +1 -1
  67. package/dist/web/assets/{UiToggle-Dz93aXFK.js → UiToggle-bpyawyIe.js} +1 -1
  68. package/dist/web/assets/{UiWeight-CUvyApSB.js → UiWeight-TyBehy3K.js} +1 -1
  69. package/dist/web/assets/{UnassignedConversationsPanel-xY7gsFot.js → UnassignedConversationsPanel-B4PqImRi.js} +1 -1
  70. package/dist/web/assets/{VirtualDirectoryList-Dv6PwLjU.js → VirtualDirectoryList-DNQP6X8j.js} +1 -1
  71. package/dist/web/assets/{Workbench3D--4N_uKzp.js → Workbench3D-DNwgymIE.js} +1 -1
  72. package/dist/web/assets/{WritingTastePage-B7KojA4r.js → WritingTastePage-D-ELo7mh.js} +1 -1
  73. package/dist/web/assets/{_plugin-vue_export-helper-BmfQlfI8.js → _plugin-vue_export-helper-RegzAV-H.js} +1 -1
  74. package/dist/web/assets/{accordion-gXElbGP_.js → accordion-DpqAdXTB.js} +1 -1
  75. package/dist/web/assets/{agent-occupation-ChN-1QjC.js → agent-occupation-Ba5Fl0ys.js} +1 -1
  76. package/dist/web/assets/{agent-pins-Chh_rdBi.js → agent-pins-Bb7-1Uoz.js} +1 -1
  77. package/dist/web/assets/{agent-profile.css_vue_type_style_index_0_src_true_lang-DWlz7UoN.js → agent-profile.css_vue_type_style_index_0_src_true_lang-wT8gjVyZ.js} +1 -1
  78. package/dist/web/assets/{agent-work-summary-C9yMf019.js → agent-work-summary-D0a836ik.js} +1 -1
  79. package/dist/web/assets/{attention-store-CG9cF6DX.js → attention-store-g2-_vAhV.js} +1 -1
  80. package/dist/web/assets/{badge-DvvDq2Wb.js → badge-BIoC0hjn.js} +1 -1
  81. package/dist/web/assets/{button-CFEnxtio.js → button-A2esxd6G.js} +1 -1
  82. package/dist/web/assets/{checkbox-DovdRz8u.js → checkbox-DxBVlC6t.js} +1 -1
  83. package/dist/web/assets/{client-lh80ewvs.js → client-DAoXcTUz.js} +1 -1
  84. package/dist/web/assets/{console-CQMgYkk9.js → console-DiNe1hFP.js} +1 -1
  85. package/dist/web/assets/{conversation-launcher-settings-B1QM-wZB.js → conversation-launcher-settings-CtOlr9uP.js} +1 -1
  86. package/dist/web/assets/{design-lab-BDKwIbI8.js → design-lab-UWXx2ZtA.js} +1 -1
  87. package/dist/web/assets/{dialog-D2mO6m3B.js → dialog-DTVE8tN1.js} +1 -1
  88. package/dist/web/assets/{dist-PmK0PfVA.js → dist-D-8b3yGa.js} +1 -1
  89. package/dist/web/assets/{dropdown-menu-YzCnvjAb.js → dropdown-menu-NcUrhhmG.js} +1 -1
  90. package/dist/web/assets/{field-BMEFEyVC.js → field-6mg5DSC8.js} +1 -1
  91. package/dist/web/assets/{identity-bK-fJdnj.js → identity-FG3YqHVj.js} +1 -1
  92. package/dist/web/assets/index-BpQe3IT5.js +2 -0
  93. package/dist/web/assets/{judgment-types-DJnAr9c0.js → judgment-types-rLsl2Cis.js} +1 -1
  94. package/dist/web/assets/{model-Cengn9fg.js → model-BCnsjEuP.js} +1 -1
  95. package/dist/web/assets/{model-rumuELTi.js → model-BcMr6R8m.js} +1 -1
  96. package/dist/web/assets/{model-DpVrfbnj.js → model-CYJ_LZ47.js} +1 -1
  97. package/dist/web/assets/{model-BwNZZZNP.js → model-CeF2BATq.js} +1 -1
  98. package/dist/web/assets/{model-CuY1vtEy.js → model-CtmCtjml.js} +1 -1
  99. package/dist/web/assets/{model-CPMYnu3S.js → model-t2ZvD7wL.js} +1 -1
  100. package/dist/web/assets/{motion-preference-A1AMssSH.js → motion-preference-DeZURhN7.js} +1 -1
  101. package/dist/web/assets/{occupation-catalog-DxwlYD1L.js → occupation-catalog-q0ZjGx2o.js} +1 -1
  102. package/dist/web/assets/{orchestration-filters-DZpJ0FN3.js → orchestration-filters-CKf_Gzdl.js} +1 -1
  103. package/dist/web/assets/{page-title-Bg-mVyrS.js → page-title-BLHrexaP.js} +1 -1
  104. package/dist/web/assets/{personal-profile-graph-tMneNj_m.js → personal-profile-graph-IYovB9sV.js} +1 -1
  105. package/dist/web/assets/{project-capture-QgMw6qvo.js → project-capture-BvIPecIS.js} +1 -1
  106. package/dist/web/assets/{project-origin-ppsYHpYL.js → project-origin-JnGPwlfA.js} +1 -1
  107. package/dist/web/assets/project-team-api-Cfn41MCR.js +1 -0
  108. package/dist/web/assets/{quick-edit-api-BiyK3ih-.js → quick-edit-api-DzpRAPsr.js} +1 -1
  109. package/dist/web/assets/{shared-report-D3Hem1t5.js → shared-report-BLmBg2FG.js} +3 -3
  110. package/dist/web/assets/{task-labels-7KyNw9id.js → task-labels-BArOYZEW.js} +1 -1
  111. package/dist/web/assets/{ui-Ck58paqr.js → ui-CtW0tAA1.js} +1 -1
  112. package/dist/web/assets/{useAgentRecords-C6RrZwwv.js → useAgentRecords-BoOqLQcf.js} +1 -1
  113. package/dist/web/assets/{useApi-CROJJdhE-BujjnKN_.js → useApi-CROJJdhE-CH5wlWTU.js} +1 -1
  114. package/dist/web/assets/{useFocusReturn-D9IOIg17.js → useFocusReturn-DX2zmPSK.js} +1 -1
  115. package/dist/web/assets/{useKnowledgeItemPeek-C6nAzvDL.js → useKnowledgeItemPeek-Cfvr5H1q.js} +1 -1
  116. package/dist/web/assets/{useMinimumLoadingDisplay-HnxkDut6.js → useMinimumLoadingDisplay-GhG1ICNJ.js} +1 -1
  117. package/dist/web/assets/{useRoutePeek-BvYFc1BA.js → useRoutePeek-DydCbUhy.js} +1 -1
  118. package/dist/web/assets/{vue-router-Bl55c88B.js → vue-router-Dad-4p7O.js} +1 -1
  119. package/dist/web/index.html +32 -32
  120. package/docs/agent-conversations-and-collaboration.md +10 -0
  121. package/docs/employee-agents.md +3 -1
  122. package/docs/judgment-and-autonomy.md +30 -1
  123. package/graph-provider/fuli_graph/agent_conversation_models.py +7 -0
  124. package/graph-provider/fuli_graph/agent_conversation_routes.py +5 -1
  125. package/graph-provider/fuli_graph/default_project_lead.py +7 -3
  126. package/graph-provider/fuli_graph/store_agent_conversations.py +66 -34
  127. package/graph-provider/pyproject.toml +1 -1
  128. package/native/win32/fuli-win-helper.exe +0 -0
  129. package/npm-shrinkwrap.json +2 -2
  130. package/package.json +1 -1
  131. package/packages/roundtable/src/host.js +5 -0
  132. package/packages/roundtable/src/peer/coordinator-service.js +20 -3
  133. package/packages/roundtable/src/roundtable/service.js +31 -5
  134. package/skills/capturing-session-knowledge/references/retrieval.md +10 -2
  135. package/skills/operating-fuli/references/workflow-recipes.md +2 -0
  136. package/src/agent-apps/host-tools/catalog.js +1 -0
  137. package/src/agent-tools/executor-routing-definitions.js +194 -0
  138. package/src/agent-tools/graph-definitions.js +20 -1279
  139. package/src/agent-tools/graph-handlers.js +6 -2
  140. package/src/agent-tools/graph-tool-fields.js +43 -0
  141. package/src/agent-tools/interface-catalog.js +5 -1
  142. package/src/agent-tools/knowledge-curation-definitions.js +167 -0
  143. package/src/agent-tools/knowledge-definitions.js +431 -0
  144. package/src/agent-tools/project-agent-tool-definitions.js +271 -0
  145. package/src/agent-tools/project-space-definitions.js +155 -0
  146. package/src/agent-tools/session-fuli-gate.js +33 -31
  147. package/src/agent-tools/standing-assignment-definitions.js +32 -0
  148. package/src/agent-tools/task-entry-definitions.js +105 -0
  149. package/src/agent-tools.js +5 -4
  150. package/src/agents/claude-code/lifecycle-hook.js +16 -2
  151. package/src/agents/claude-code/preference-evidence.js +11 -1
  152. package/src/app/application-error.js +21 -3
  153. package/src/conversations/capture-window.js +8 -3
  154. package/src/conversations/entry-budget.js +2 -10
  155. package/src/conversations/entry-inline-budget.js +144 -0
  156. package/src/conversations/entry-rules.js +1 -1
  157. package/src/conversations/entry-time.js +15 -0
  158. package/src/conversations/preference-evidence.js +19 -0
  159. package/src/conversations/preference-lifecycle.js +28 -7
  160. package/src/conversations/preference-session.js +26 -10
  161. package/src/conversations/preference-snapshot.js +12 -1
  162. package/src/conversations/sync-transcript.js +10 -6
  163. package/src/conversations/transcript-guard.js +4 -3
  164. package/src/conversations/transcript-lifecycle.js +6 -3
  165. package/src/data-format/local-stores.js +3 -0
  166. package/src/desktop/windows-installation.js +2 -1
  167. package/src/external-knowledge/connectors/feishu.js +3 -1
  168. package/src/graphiti/active-personal-space.js +5 -0
  169. package/src/graphiti/agent-conversations.js +23 -28
  170. package/src/graphiti/agent-knowledge-workflows.js +12 -1299
  171. package/src/graphiti/agent-project-resolution.js +11 -0
  172. package/src/graphiti/agent-view-records.js +19 -0
  173. package/src/graphiti/capture-notice.js +20 -6
  174. package/src/graphiti/collaboration-preference-entry.js +89 -0
  175. package/src/graphiti/collaboration-preference-workflow.js +1 -1
  176. package/src/graphiti/common-knowledge-candidates.js +222 -0
  177. package/src/graphiti/cross-project-knowledge-similarity.js +59 -0
  178. package/src/graphiti/current-project-knowledge-search.js +86 -0
  179. package/src/graphiti/decision-trace.js +136 -0
  180. package/src/graphiti/federated-application.js +158 -795
  181. package/src/graphiti/human-knowledge-changes.js +45 -0
  182. package/src/graphiti/knowledge-credential-guard.js +43 -0
  183. package/src/graphiti/knowledge-curation.js +178 -0
  184. package/src/graphiti/knowledge-feedback.js +25 -0
  185. package/src/graphiti/knowledge-graph-reads.js +62 -0
  186. package/src/graphiti/local-runtimes.js +78 -0
  187. package/src/graphiti/personal-global-preference-candidates.js +431 -0
  188. package/src/graphiti/personal-projects.js +33 -0
  189. package/src/graphiti/preference-conflict-requests.js +57 -0
  190. package/src/graphiti/preference-project-resolution.js +39 -0
  191. package/src/graphiti/preference-task-scope.js +18 -0
  192. package/src/graphiti/project-agent-control-plane.js +6 -1
  193. package/src/graphiti/project-agent-task-entry.js +18 -1
  194. package/src/graphiti/project-path-context.js +28 -9
  195. package/src/graphiti/provider-client.js +1 -1
  196. package/src/graphiti/public-project-relations.js +28 -0
  197. package/src/graphiti/public-projects.js +125 -0
  198. package/src/graphiti/publication-review-queues.js +50 -0
  199. package/src/graphiti/roundtable-host.js +35 -3
  200. package/src/graphiti/session-capture-pause-request.js +3 -2
  201. package/src/graphiti/session-fuli-switch.js +4 -3
  202. package/src/graphiti/session-knowledge-capture.js +59 -0
  203. package/src/graphiti/session-records.js +4 -3
  204. package/src/graphiti/source-marker.js +13 -3
  205. package/src/graphiti/standing-assignment-confirmation.js +66 -0
  206. package/src/graphiti/standing-assignment-correction.js +148 -0
  207. package/src/graphiti/standing-assignment-entry.js +223 -0
  208. package/src/graphiti/task-context-entry.js +114 -0
  209. package/src/graphiti/task-entry-preferences.js +4 -1
  210. package/src/graphiti/task-entry-project-mention.js +13 -2
  211. package/src/graphiti/task-entry-project-scope.js +12 -3
  212. package/src/graphiti/task-entry-standing-owner.js +141 -0
  213. package/src/graphiti/task-knowledge-checkpoint.js +212 -0
  214. package/src/graphiti/task-knowledge-guidance.js +13 -0
  215. package/src/graphiti/task-knowledge-recall.js +113 -2
  216. package/src/graphiti/task-preference-reader.js +1 -1
  217. package/src/graphiti/workflow-learning.js +38 -0
  218. package/src/graphiti/workspace-provider-client.js +10 -0
  219. package/src/http/api-router.js +13 -3
  220. package/src/http/standing-assignment-api-router.js +35 -0
  221. package/src/judgment/agent-view.js +29 -7
  222. package/src/judgment/conversation.js +8 -2
  223. package/src/judgment/engine.js +16 -4
  224. package/src/judgment/http.js +37 -5
  225. package/src/judgment/review-injection-precheck.js +97 -0
  226. package/src/judgment/review-suggestions.js +46 -0
  227. package/src/judgment/store.js +8 -0
  228. package/src/knowledge-hard-delete/delete-ledger.js +12 -3
  229. package/src/knowledge-hard-delete/recovery-gate.js +4 -4
  230. package/src/knowledge-owner-reads/console-port.js +8 -0
  231. package/src/knowledge-owner-reads/owner-proof.js +35 -0
  232. package/src/local-runtime/lifecycle.js +2 -1
  233. package/src/local-runtime/provider-readiness.js +35 -11
  234. package/src/mcp/instructions.js +3 -3
  235. package/src/mcp/preference-delivery.js +13 -3
  236. package/src/mcp/session-id.js +2 -0
  237. package/src/mcp/tool-annotations.js +3 -2
  238. package/src/model-backends/http.js +45 -8
  239. package/src/model-backends/role-settings.js +25 -3
  240. package/src/model-backends/role-trust.js +39 -6
  241. package/src/model-backends/runtime.js +10 -3
  242. package/src/model-backends/settings-history-list.js +132 -0
  243. package/src/model-backends/settings-history.js +175 -0
  244. package/src/native-runtime/java-runtime.js +4 -4
  245. package/src/presence/windows-helper-pin.js +1 -1
  246. package/src/semantic-version.js +5 -1
  247. package/src/server.js +3 -2
  248. package/src/setup/claude-code-config.js +1 -1
  249. package/src/setup/graph-runtime.js +42 -15
  250. package/src/setup/paths.js +2 -0
  251. package/src/standing-assignments/port.js +189 -44
  252. package/src/standing-assignments/store.js +12 -1
  253. package/src/standing-assignments/term-match.js +7 -0
  254. package/src/system/file-identity.js +11 -0
  255. package/src/system/platform-path.js +38 -0
  256. package/src/validation/values.js +22 -6
  257. package/dist/web/assets/EmployeeWorkbenchPage-BUMfMBc8.js +0 -3
  258. package/dist/web/assets/KnowledgePage-Bfbfz_Z8.js +0 -1
  259. package/dist/web/assets/ModelSettingsPage-C3eBDWRL.js +0 -1
  260. package/dist/web/assets/ModelSettingsPage-DZkrJw7R.css +0 -1
  261. package/dist/web/assets/index-r-WFOs21.js +0 -2
  262. package/dist/web/assets/project-team-api-DwP0O3rn.js +0 -1
@@ -12,6 +12,7 @@ import { deliveredConversationFrame, deliveredRecentFrame, MAX_RECENT_FRAMES, ow
12
12
  validRecentFrames, withoutDeliveryProofs } from './recent-context.js';
13
13
  import { preferenceDeliveryReason } from '../mcp/preference-delivery.js';
14
14
  import { locatePreferenceTranscript } from '../agents/preference-evidence.js';
15
+ import { fitUncached, WHOLE_ENTRY } from './entry-inline-budget.js';
15
16
 
16
17
  const SESSION = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
17
18
  const MAX_PENDING = 16;
@@ -68,10 +69,14 @@ export function createSessionPreferenceDelivery({ directory, locate = locatePref
68
69
  } catch { /* A cache failure never changes explicit history delivery. */ }
69
70
  return result;
70
71
  },
71
- async deliver(value, origin, format) {
72
+ // `fit` bounds the entry to a host's inline limit (entry-inline-budget.js);
73
+ // the pending record is for the set the chosen frame actually delivers.
74
+ async deliver(value, origin, format, fit = WHOLE_ENTRY) {
72
75
  const output = projected => format(withoutDeliveryProofs(projected));
73
76
  const snapshot = preferenceSnapshot(value);
74
- if (!snapshot || !SESSION.test(snapshot.sessionId) || origin.sourceApplication !== snapshot.sourceApplication) return output(value);
77
+ if (!snapshot || !SESSION.test(snapshot.sessionId) || origin.sourceApplication !== snapshot.sourceApplication) {
78
+ return fitUncached(fit, value, output);
79
+ }
75
80
  const verified = origin.nativeSessionId === snapshot.sessionId;
76
81
  let result;
77
82
  try {
@@ -89,22 +94,33 @@ export function createSessionPreferenceDelivery({ directory, locate = locatePref
89
94
  // none carries a revision.
90
95
  const { baseline, shown } = proof.known && state.floor !== null ? acknowledgedSnapshot(value, snapshot, state, proof)
91
96
  : { baseline: null, shown: null };
92
- const preferences = origin.forceFull ? completePreferenceFrame(value, shown) : projectPreferenceDelta(value, baseline, shown);
93
- const recent = projectRecentContext(preferences, origin.forceFull ? undefined
97
+ const evidence = origin.forceFull ? undefined
94
98
  : recentEvidence(proof, state.recent, { sessionId: snapshot.sessionId, adapter: proof.adapter,
95
- floor: state.floor === null ? null : state.floor ?? 0 }));
99
+ floor: state.floor === null ? null : state.floor ?? 0 });
100
+ const project = candidate => {
101
+ const preferences = origin.forceFull ? completePreferenceFrame(candidate, shown)
102
+ : projectPreferenceDelta(candidate, baseline, shown);
103
+ const recent = projectRecentContext(preferences, evidence);
104
+ return { candidate, recent, result: output(recent.value) };
105
+ };
106
+ const complete = candidate => ({ candidate, result: output(completePreferenceFrame(candidate, shown)) });
107
+ const chosen = fit(value, { deliver: project, complete });
108
+ const { recent } = chosen;
96
109
  const projected = recent.value;
97
- result = output(projected);
110
+ // The set this frame delivers: a bounded frame's own subset, never
111
+ // the preferences it leaves out (D-54).
112
+ const delivered = preferenceSnapshot(chosen.candidate);
113
+ result = chosen.result;
98
114
  const next = { ...state };
99
115
  // A pending hash means only produced. Only a matching complete native
100
116
  // record above can acknowledge it in a later call/process; a frame
101
117
  // without a revision can never be named as a base, so it keeps none.
102
- if (!result.isError && result.structuredContent?.preferences_complete !== false
118
+ if (delivered && !result.isError && result.structuredContent?.preferences_complete !== false
103
119
  && shownRevision(result.structuredContent)
104
120
  && preferenceDeliveryReason(projected, result.structuredContent) === null
105
121
  && result.structuredContent?.preference_delivery?.status !== 'blocked') {
106
- const pending = { scopeHash: snapshot.scopeHash, snapshotHash: snapshot.snapshotHash,
107
- frameHash: preferenceFrameHash(result.structuredContent), scene: pendingScene(snapshot) };
122
+ const pending = { scopeHash: delivered.scopeHash, snapshotHash: delivered.snapshotHash,
123
+ frameHash: preferenceFrameHash(result.structuredContent), scene: pendingScene(delivered) };
108
124
  next.pending = [...(state.pending ?? []).filter(item => item.frameHash !== pending.frameHash), pending].slice(-MAX_PENDING);
109
125
  }
110
126
  const frame = deliveredRecentFrame(recent.frame, projected, result);
@@ -115,7 +131,7 @@ export function createSessionPreferenceDelivery({ directory, locate = locatePref
115
131
  }
116
132
  return result;
117
133
  });
118
- } catch { return result ?? output(value); }
134
+ } catch { return result ?? fitUncached(fit, value, output); }
119
135
  },
120
136
  // True once the next delivery for the session is a full one: the cache was
121
137
  // reset, or this session is never delta-delivered. False when it could not
@@ -39,6 +39,11 @@ export function framePreferenceSnapshot(value, frame, scene) {
39
39
  preference_scope: { version: 1, work_kind: scene.work_kind, workflow: scene.workflow } })) : null;
40
40
  }
41
41
 
42
+ // The work kind the producer persisted for this task, or null.
43
+ export function entryWorkKind(value) {
44
+ return value?.[SCOPE]?.preference_scope?.work_kind ?? null;
45
+ }
46
+
42
47
  // The scene a pending record keeps for the frame it was produced as.
43
48
  export function pendingScene(snapshot) {
44
49
  return { work_kind: snapshot.scene.work_kind ?? null, workflow: snapshot.scene.workflow ?? null, table: TASK_SCENE_VERSION };
@@ -105,12 +110,17 @@ export function projectPreferenceDelta(value, baseline, shown) {
105
110
  const full = withRevision(plain, snapshot, shown);
106
111
  const revision = full.revision;
107
112
  if (!revision || !baseline?.revision || baseline.authorityHash !== snapshot.authorityHash) return full;
113
+ // A frame bounded to an inline budget (entry-inline-budget.js, D-54) lists
114
+ // only the set it delivers; what it leaves out may still be in force. So it
115
+ // never names a removal or takes back a scene's items: it is a delta that
116
+ // only adds or changes, or a complete frame.
117
+ const bounded = Object.hasOwn(value, 'preferences_omitted');
108
118
  // Same space, project, Agent, client and session in another scene: only the
109
119
  // scene-replaceable set is listed and replaced (D-27.8). Boundaries and hard
110
120
  // constraints stay as delivered; if one of them changed too, a complete
111
121
  // frame is sent instead.
112
122
  if (baseline.scopeHash !== snapshot.scopeHash) {
113
- if (contentHash(boundaryUnits(baseline.units)) !== contentHash(boundaryUnits(snapshot.units))) return full;
123
+ if (bounded || contentHash(boundaryUnits(baseline.units)) !== contentHash(boundaryUnits(snapshot.units))) return full;
114
124
  return smaller(withPreferenceScope({ ...plain,
115
125
  effective_preferences: snapshot.preferences.filter(item => snapshot.units[unitId(item)].scene),
116
126
  preference_delivery: { status: 'scene_switch', supersedes: baseline.revision, revision, scene: sceneName(snapshot.scene),
@@ -119,6 +129,7 @@ export function projectPreferenceDelta(value, baseline, shown) {
119
129
  const updates = snapshot.preferences.filter(item => baseline.units[unitId(item)]?.hash !== snapshot.units[unitId(item)].hash);
120
130
  const removed = Object.entries(baseline.units).filter(([id]) => !Object.hasOwn(snapshot.units,id))
121
131
  .map(([,unit]) => unit.identity);
132
+ if (bounded && removed.length) return full;
122
133
  // A delta stays in its base's scene, so it does not repeat it.
123
134
  const { effective_preferences, ...current } = plain;
124
135
  return smaller({ ...current, preference_updates: updates, preference_delivery: {
@@ -127,9 +127,10 @@ export async function syncConversationTranscript(application, input, sourceAppli
127
127
 
128
128
  // Looks for the handoff prompt after the guard's scan cursor, saving progress
129
129
  // in the guard: null once it is ready (its boundary found), otherwise why the
130
- // handoff stays pending. An entered handoff looks only before the native end
131
- // its entry saw (entryEnd), so the entered task's own turn after it can never
132
- // hide the prompt.
130
+ // handoff stays pending. An entered handoff looks only before entryEnd, the
131
+ // native EOF its entry hook measured after task entry returned (see
132
+ // keepEnteredHandoff), so the entered task's own turn after it can never hide
133
+ // the prompt.
133
134
  async function scanHandoffPrompt(guard, input, adapter) {
134
135
  for (let page = 0; page < TRANSCRIPT_PAGES_PER_HOOK; page++) {
135
136
  const state = guard.value;
@@ -190,9 +191,12 @@ async function finishEnteredHandoff(application, claim, input, adapter, guard, f
190
191
  // An entry whose capture window expired after its handoff began has still
191
192
  // entered its task. With the lock it holds, the hook records that task in the
192
193
  // guard for the next hook to finish the handoff (finishEnteredHandoff): as a
193
- // claim once the old tail was flushed, otherwise with the native end the entry
194
- // saw, after which everything is the entered task's. Only the entry's own
195
- // prompt is recorded, and only once; nothing else is changed.
194
+ // claim once the old tail was flushed, otherwise with entryEnd, after which
195
+ // everything is the entered task's. entryEnd is the verified native EOF read
196
+ // here, after task entry returned and before the hook returns; it is not a
197
+ // snapshot of what the expired capture had read. A prompt the host writes
198
+ // only after its hook (Codex) lies after it. Only the entry's own prompt is
199
+ // recorded, and only once; nothing else is changed.
196
200
  export async function keepEnteredHandoff(guard, input, adapter, context) {
197
201
  const state = guard?.value;
198
202
  const token = context?.taskContextToken ?? context?.task_context_token;
@@ -79,9 +79,10 @@ export async function withTranscriptGuard(runtimeConfigPath, input, source, enab
79
79
 
80
80
  // A handoff whose prompt already entered its task (nextOwner, that task's
81
81
  // token digest): the entry recorded its claim ('claim'), or its capture window
82
- // expired before the old task's tail was flushed and it kept the native end it
83
- // had seen (entryEnd), so that a later hook finishes the handoff as the entry
84
- // would have (rec#16).
82
+ // expired before the old task's tail was flushed and its hook kept entryEnd,
83
+ // the native EOF measured after task entry returned and before the hook
84
+ // returned (not a snapshot from when the capture started), so that a later
85
+ // hook finishes the handoff as the entry would have (rec#16).
85
86
  export function enteredHandoff(value) {
86
87
  return value?.phase === 'claim' || (['scan', 'ready'].includes(value?.phase)
87
88
  && Number.isSafeInteger(value.entryEnd) && typeof value.nextOwner === 'string');
@@ -53,9 +53,9 @@ async function hookTranscriptLifecycle({ application, runtimeConfigPath, input,
53
53
  && captureSettingsVersion(application, input.session_id) === settings) ledger.record(settings);
54
54
  };
55
55
  let started = false, output, context;
56
- const invoke = async () => {
56
+ const invoke = async ({ continued = false } = {}) => {
57
57
  started = true;
58
- output = await withCaptureBudget(captureTimeoutMs, () => run(value => { context = value; }));
58
+ output = await withCaptureBudget(captureTimeoutMs, () => run(value => { context = value; }), { continued });
59
59
  return output;
60
60
  };
61
61
  try {
@@ -104,7 +104,10 @@ async function hookTranscriptLifecycle({ application, runtimeConfigPath, input,
104
104
  }
105
105
  const entryGuard = sync.status === 'capture_disabled' ? null : guard;
106
106
  if (entry && entryGuard?.value) await entryGuard.write({ ...entryGuard.value, phase: 'beginning' });
107
- await invoke();
107
+ // The guard now records this entry: the claim below, or the next hook
108
+ // (keepEnteredHandoff), hands the transcript to the entered task, whose
109
+ // import writes its conversation. A begin cut short is deferred to it.
110
+ await invoke({ continued: Boolean(entry && entryGuard?.value) });
108
111
  if (entry) {
109
112
  sync = await capture(async (app, held) => {
110
113
  await recordTranscriptTaskEntry(entryGuard ? held : null, context);
@@ -27,6 +27,7 @@ import { MODEL_BACKEND_CONFIG_FORMAT } from '../model-backends/config.js';
27
27
  import { MODEL_EVALUATIONS_FORMAT } from '../model-backends/evaluation-record.js';
28
28
  import { MODEL_TRUST_FORMAT } from '../model-backends/role-trust.js';
29
29
  import { ROLE_WORK_FORMAT } from '../model-backends/role-work-store.js';
30
+ import { MODEL_SETTINGS_HISTORY_FORMAT } from '../model-backends/settings-history.js';
30
31
  import { ROLE_SUGGESTIONS_FORMAT } from '../model-backends/suggestion-log.js';
31
32
  import { MODEL_USAGE_FORMAT } from '../model-backends/usage-ledger.js';
32
33
  import { inspectJsonStore } from '../storage/json-format.js';
@@ -54,6 +55,8 @@ const sqliteStores = () => [
54
55
  ['role-suggestions.sqlite', ROLE_SUGGESTIONS_FORMAT],
55
56
  // Each role's 「只给建议」 choice and trust-warning acknowledgement (rec#10 D-36); absent until the first change.
56
57
  ['model-trust.sqlite', MODEL_TRUST_FORMAT],
58
+ // What changed in the model settings and execution modes, and when (rec#11 D-42); never pruned.
59
+ ['model-settings-history.sqlite', MODEL_SETTINGS_HISTORY_FORMAT],
57
60
  ['agent-apps/registry.sqlite', AGENT_APP_FORMAT],
58
61
  ['employees/data/management.sqlite', EMPLOYEE_MANAGEMENT_FORMAT],
59
62
  ['peer/node.sqlite', NODE_FORMAT],
@@ -3,6 +3,7 @@ import { randomUUID } from 'node:crypto';
3
3
  import { closeSync, constants, existsSync, fstatSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, realpathSync, rmdirSync, unlinkSync, writeFileSync } from 'node:fs';
4
4
  import { dirname, isAbsolute, join, relative } from 'node:path';
5
5
  import { readWindowsNativeBundle, resolveWindowsNativeBundle } from '../native-runtime/windows-assets.js';
6
+ import { fileIdentity } from '../system/file-identity.js';
6
7
  import { canonicalWindowsInstallPath, installationSha256, windowsInstallPathsOverlap } from './windows-installation-context.js';
7
8
 
8
9
  function powershell(script) {
@@ -41,7 +42,7 @@ export function readWindowsShortcut(path, sha256) {
41
42
 
42
43
  // Windows file IDs exceed 2^53, so identities are compared as exact bigints.
43
44
  const EXACT = { bigint: true };
44
- const sameInode = (a, b) => a.dev === b.dev && a.ino === b.ino;
45
+ const sameInode = (a, b) => fileIdentity(a) === fileIdentity(b);
45
46
  const sameFile = (a, b) => sameInode(a, b) && a.size === b.size && a.mtimeNs === b.mtimeNs;
46
47
 
47
48
  export function trayInventory(source) {
@@ -1,3 +1,5 @@
1
+ import { setTimeout as delay } from 'node:timers/promises';
2
+
1
3
  import { nonEmptyText, requiredString, uniqueTextArray } from '../../validation/values.js';
2
4
  import { onlineUrl, timeoutMilliseconds } from './response-values.js';
3
5
 
@@ -10,7 +12,7 @@ const API_ROOTS = Object.freeze({
10
12
 
11
13
  export function createFeishuConnector({
12
14
  fetchImpl = globalThis.fetch,
13
- sleep = (milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds))
15
+ sleep = delay
14
16
  } = {}) {
15
17
  const tokenCache = new Map();
16
18
  let nextRawRequestAt = 0;
@@ -0,0 +1,5 @@
1
+ export function assertActivePersonalSpace(application, personalSpaceId) {
2
+ if (personalSpaceId !== application.config.personal.spaceId) {
3
+ throw new TypeError('Knowledge changes must use the active personal space');
4
+ }
5
+ }
@@ -1,6 +1,6 @@
1
1
  import { detectSensitiveContent } from '../security/sensitive-content.js';
2
2
  import { agentContinuation, taskAgentReceipt } from '../agents/identity-receipt.js';
3
- import { captureWindow } from '../conversations/capture-window.js';
3
+ import { captureContinued, captureWindow } from '../conversations/capture-window.js';
4
4
  import { captureDecision, captureDisabled, taskCaptureScope } from './capture-decision.js';
5
5
  import { singleLine } from '../text/single-line.js';
6
6
  import { utf8Preview } from '../text/utf8-preview.js';
@@ -25,6 +25,10 @@ export function safeConversationContent(value) {
25
25
  const unavailable = (error, step = null) => ({ status: 'unsaved', retryable: true,
26
26
  ...(step ? { step } : {}), reason: errorReason(error),
27
27
  guidance: 'Conversation persistence is unavailable. Do not claim this conversation was saved; retry after the Provider recovers.' });
28
+ // A begin the capture budget cut short in a hook whose next run continues it:
29
+ // this task's conversation is written from the native transcript then.
30
+ const deferred = step => ({ status: 'deferred', step, reason: 'transcript_capture_timeout',
31
+ guidance: 'Conversation saving is deferred: the next FULI hook of this session saves it from the native transcript. It is not saved yet; do not claim it was saved now, and do not retry.' });
28
32
 
29
33
  // Only codes FULI itself names (provider-client.js, capture-window.js) or Node's network codes
30
34
  // are repeated; a Provider passes its own detail.code through, so any other
@@ -49,42 +53,33 @@ export async function beginConversation(application, task) {
49
53
  let step = 'capture_window';
50
54
  try {
51
55
  return await captureWindow(application, null, async application => {
52
- const scope = conversationScope(application, task);
53
- step = 'session';
54
- const session = await application.personal.conversation('query', { ...scope, mode: 'session', session_id: task.sessionId });
55
- // A different native chat is a new task, not implicit consent to resume
56
- // whichever conversation happened to finish last. Explicit resume binds
57
- // that conversation to this session before the next entry.
58
- const previousId = session.conversation_id ?? null;
59
- // Recover before opening this turn. Native visible messages are persisted
60
- // only by the transcript collector, with its stable byte-based event IDs.
61
- // Asking as this session adds the Provider's delivery proofs, so the host
62
- // leaves out only what this session's own context provably holds.
63
- step = 'context';
64
- const previous = previousId
65
- ? await application.personal.conversation('query', { ...scope, mode: 'context', conversation_id: previousId,
66
- session_id: task.sessionId })
67
- : null;
68
- step = 'recent';
69
- const pointer = previousId ? null : await recentConversation(application, scope);
70
- step = 'append';
71
- const saved = await application.personal.conversation('append', {
72
- ...conversationTask(application, task), events: []
73
- });
74
- return { ...saved, recovery: previous?.context ?? null, recovered_from: previousId ?? null,
56
+ step = 'begin';
57
+ // One Provider round trip, so the whole entry fits the capture budget
58
+ // (rec#11 D-53). The Provider reads, in one transaction: the conversation
59
+ // bound to this native session, its recovery window asked as this session
60
+ // (delivery proofs, so the host leaves out only what this session's own
61
+ // context provably holds), or else the latest conversation of this scope;
62
+ // then it opens this task's conversation with no events, since native
63
+ // visible messages are persisted only by the transcript collector. A
64
+ // different native chat is a new task, never implicit consent to resume
65
+ // whichever conversation finished last; explicit resume binds one.
66
+ const { recovered_from: previousId = null, previous = null, recent = null, ...saved } =
67
+ await application.personal.conversation('begin', conversationTask(application, task));
68
+ const pointer = previousId ? null : recentPointer(recent);
69
+ return { ...saved, recovery: previous?.context ?? null, recovered_from: previousId,
75
70
  compacted: (previous?.compacted_through ?? 0) > 0,
76
71
  ...(pointer ? { recent_conversation: pointer } : {}), guidance: CONVERSATION_GUIDANCE };
77
72
  });
78
- } catch (error) { return unavailable(error, step); }
73
+ } catch (error) {
74
+ return error?.code === 'transcript_capture_timeout' && captureContinued() ? deferred(step) : unavailable(error, step);
75
+ }
79
76
  }
80
77
 
81
78
  // A new native chat learns only which conversation of this same space, project,
82
79
  // Agent and client permission was active last (rec#10 D-27.6): no messages, no
83
80
  // binding. Continuing it is still an explicit resume_agent_conversation. The
84
81
  // title is historical text, cut to one line of POINTER_TITLE_BYTES as sent.
85
- async function recentConversation(application, scope) {
86
- const { conversations } = await application.personal.conversation('query', { ...scope, mode: 'list', limit: 1 });
87
- const latest = conversations?.[0];
82
+ function recentPointer(latest) {
88
83
  if (!latest?.id) return null;
89
84
  const title = utf8Preview(singleLine(latest.summary), POINTER_TITLE_BYTES, text => Buffer.byteLength(JSON.stringify(text)));
90
85
  const pointer = { id: latest.id, updated_at: latest.last_activity ?? null, ...(title ? { title } : {}) };