fuli-context 0.27.1 → 0.27.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 (311) hide show
  1. package/dist/web/assets/{AboutPage-BKyNoI0v.js → AboutPage-Bgcf03U0.js} +1 -1
  2. package/dist/web/assets/{AboutSectionHeading-DwvCvoqO.js → AboutSectionHeading-BaQBY_Xs.js} +1 -1
  3. package/dist/web/assets/{AgentAppsPage-Cp2-sZXi.js → AgentAppsPage-DNuujLT2.js} +1 -1
  4. package/dist/web/assets/{AgentAvatar-CDhU4m0T.js → AgentAvatar-DGXedNUs.js} +1 -1
  5. package/dist/web/assets/{AgentHand-BfRjs1He.js → AgentHand-BwE2VGth.js} +1 -1
  6. package/dist/web/assets/AgentManagement-2r8DUS1N.js +7 -0
  7. package/dist/web/assets/AgentManagement-hRkMpjvY.css +1 -0
  8. package/dist/web/assets/{AgentMentionCopy-_pr-D8vX.js → AgentMentionCopy-y3JD1Cef.js} +1 -1
  9. package/dist/web/assets/{AgentName-CUuWNrzE.js → AgentName-XrBcHq4R.js} +1 -1
  10. package/dist/web/assets/AgentProfilePage-DE7z980p.js +5 -0
  11. package/dist/web/assets/{AgentServicesPage-CAL-JT1J.js → AgentServicesPage-CWfGSxcb.js} +1 -1
  12. package/dist/web/assets/{AppViewerPage-Ct46NPXP.js → AppViewerPage-BaKMk9pp.js} +1 -1
  13. package/dist/web/assets/{BackToTop-DOlt-xjQ.js → BackToTop-DITd9y7X.js} +1 -1
  14. package/dist/web/assets/{BoardCardFieldsMenu-RFcx_CAs.js → BoardCardFieldsMenu-CWtHiVR-.js} +1 -1
  15. package/dist/web/assets/{BoardMoveMenu-GJ8lpuZY.js → BoardMoveMenu-CEDdltY7.js} +1 -1
  16. package/dist/web/assets/{Breadcrumb-DTo6Zvtb.js → Breadcrumb-C98voz9V.js} +1 -1
  17. package/dist/web/assets/{CaptureChangePage-DRgWyCRo.js → CaptureChangePage-CE8tJfiQ.js} +1 -1
  18. package/dist/web/assets/{CopyFixPrompt-1UXH_ItZ.js → CopyFixPrompt-C2hC04lV.js} +1 -1
  19. package/dist/web/assets/{DataFormatPage-CgFXfOW_.js → DataFormatPage-BjZkck9o.js} +1 -1
  20. package/dist/web/assets/{DebugTurnPage-B8YhpTPm.js → DebugTurnPage-B82geu1y.js} +1 -1
  21. package/dist/web/assets/{DebugTurnsPage-BGKSH3n0.js → DebugTurnsPage-BlDDz1Fk.js} +1 -1
  22. package/dist/web/assets/DialogTitle-fpANsAcy.js +1 -0
  23. package/dist/web/assets/{EmployeeRedirectPage-8qPpnbyP.js → EmployeeRedirectPage-CSSuvAqx.js} +1 -1
  24. package/dist/web/assets/{EmployeeScopeDialog-BZymZidB.js → EmployeeScopeDialog-BoEMQOEj.js} +1 -1
  25. package/dist/web/assets/EmployeeWorkbench-DvEojWb7.js +4 -0
  26. package/dist/web/assets/{EmployeeWorkbench-Bp9pUkfS.css → EmployeeWorkbench-rhY970vW.css} +1 -1
  27. package/dist/web/assets/FieldRoot-D3lnRut5.js +1 -0
  28. package/dist/web/assets/{FlaGrowth-CaFdmezv.js → FlaGrowth-OdlmgEVi.js} +1 -1
  29. package/dist/web/assets/{FlaOccupationKit-CFoBUWGF.js → FlaOccupationKit-CnouVWnU.js} +1 -1
  30. package/dist/web/assets/{FlaTaskSheets-BShmW9R5.js → FlaTaskSheets-rSIdCtzz.js} +1 -1
  31. package/dist/web/assets/FlasPage-BZ791caF.js +1 -0
  32. package/dist/web/assets/{FlasPage-H99IZ9M6.css → FlasPage-D3CcJcvN.css} +1 -1
  33. package/dist/web/assets/{GrowthLoading-CVBn4r4q.js → GrowthLoading-BYOSvxZY.js} +1 -1
  34. package/dist/web/assets/{HowtoPage-CrvMmT6K.css → HowtoPage-DNTwYQCD.css} +1 -1
  35. package/dist/web/assets/HowtoPage-lYwzi4Vm.js +1 -0
  36. package/dist/web/assets/{InboxPage-D9VIDrsL.js → InboxPage-C3cSvJjB.js} +1 -1
  37. package/dist/web/assets/{KnowledgeDeleteButton-C01O4FSO.js → KnowledgeDeleteButton-yc8Gi-BH.js} +1 -1
  38. package/dist/web/assets/{KnowledgeHardDeleteSection-jqad3dJN.js → KnowledgeHardDeleteSection-D9Ktc-uC.js} +1 -1
  39. package/dist/web/assets/KnowledgeItemEditPage-Csy4oOxD.js +1 -0
  40. package/dist/web/assets/{KnowledgeItemSummaryCard-XbkYp7Dy.js → KnowledgeItemSummaryCard-BH5UYmde.js} +1 -1
  41. package/dist/web/assets/KnowledgeOrganizerPage-BTeQX0gH.js +1 -0
  42. package/dist/web/assets/KnowledgePage-BuukvNxz.js +1 -0
  43. package/dist/web/assets/KnowledgePeek-D0pcU7U5.js +1 -0
  44. package/dist/web/assets/KnowledgeTurnReceiptPage-Bd_LIdCc.js +1 -0
  45. package/dist/web/assets/{KnowledgeWorkspace-CmzU6Vuh.js → KnowledgeWorkspace-Dr-zYpDQ.js} +3 -3
  46. package/dist/web/assets/{MeAvatar-D_LFqHrR.js → MeAvatar-CmhuRFOf.js} +1 -1
  47. package/dist/web/assets/{MeLink-CeIxjFrm.js → MeLink-BesUihiS.js} +1 -1
  48. package/dist/web/assets/MenuSeparator-BGo0DgyF.js +1 -0
  49. package/dist/web/assets/ModelSettingsPage-CBPwuIBM.js +1 -0
  50. package/dist/web/assets/{NewSessionPanel-BKrOFEMO.js → NewSessionPanel-Bvp9ElzU.js} +1 -1
  51. package/dist/web/assets/{NotFoundPage-CdOCRj3P.js → NotFoundPage-BrolI2fz.js} +1 -1
  52. package/dist/web/assets/{workbench-card-Dt0820yW.css → NoticeRow-DD-J76Yo.css} +1 -1
  53. package/dist/web/assets/NoticeRow-Q9QT5NqB.js +1 -0
  54. package/dist/web/assets/{OccupationsPage-BrBus-nh.js → OccupationsPage-CZCeeihl.js} +1 -1
  55. package/dist/web/assets/{PageOutline-VtLLW4kh.js → PageOutline-DULpqEwg.js} +1 -1
  56. package/dist/web/assets/PageStack-BMzrkyV4.css +1 -0
  57. package/dist/web/assets/PageStack-DTzWJuae.js +1 -0
  58. package/dist/web/assets/PersonalProfilePage-DbXWycCQ.js +1 -0
  59. package/dist/web/assets/PersonalProjectsPage-pdAJpnZd.js +1 -0
  60. package/dist/web/assets/{PinIcon-DD3Un-hh.js → PinIcon-YYoaYKTx.js} +1 -1
  61. package/dist/web/assets/PopperContent-CnNwFMIA.js +1 -0
  62. package/dist/web/assets/Presence-CuIoA2sH.js +3 -0
  63. package/dist/web/assets/{ProfileAuthorChip-Dm5GjcAt.js → ProfileAuthorChip-BEfiuJbm.js} +1 -1
  64. package/dist/web/assets/{ProjectAgentsPage-B5r0DKWL.js → ProjectAgentsPage-BPf2RLsw.js} +1 -1
  65. package/dist/web/assets/{ProjectJudgmentPolicy-DVFV5Cai.js → ProjectJudgmentPolicy-CCzHtmOb.js} +1 -1
  66. package/dist/web/assets/{RoundtablesPage-DlAXApKi.js → RoundtablesPage-BDU4W-bg.js} +1 -1
  67. package/dist/web/assets/RovingFocusGroup-DS4v3bEq.js +1 -0
  68. package/dist/web/assets/RovingFocusItem-bLEnnw2Y.js +1 -0
  69. package/dist/web/assets/SessionMigrationPage-DrK4df0L.js +1 -0
  70. package/dist/web/assets/{SessionRecordsPage-Dy203sP2.js → SessionRecordsPage-CFAgM65g.js} +1 -1
  71. package/dist/web/assets/SettingsPage-CsJxhhsu.js +1 -0
  72. package/dist/web/assets/SettingsPage-VX_e4ty2.css +1 -0
  73. package/dist/web/assets/{SharedJefaReportPage-CASkC5pc.js → SharedJefaReportPage-DbTPYwa_.js} +1 -1
  74. package/dist/web/assets/StatementCalendarPage-CIo5R14R.js +1 -0
  75. package/dist/web/assets/StatementCalendarPage-t8pJI4G6.css +1 -0
  76. package/dist/web/assets/StatementRows-CubaC9KG.js +1 -0
  77. package/dist/web/assets/StatementRows-TQ2i_uXU.css +1 -0
  78. package/dist/web/assets/{TagVocabularyPage-Bd57YcUL.js → TagVocabularyPage-BVlLmKv2.js} +1 -1
  79. package/dist/web/assets/TaskBlockerNotice-YSvmy6B4.js +1 -0
  80. package/dist/web/assets/{TaskReason-BxYwBDoB.js → TaskReason-CrLPeiOg.js} +1 -1
  81. package/dist/web/assets/{TeamCard-cWYC5z07.js → TeamCard-SBMJMd7P.js} +1 -1
  82. package/dist/web/assets/TeamCardsWidget-CGLW04TH.js +1 -0
  83. package/dist/web/assets/TeamIsland-jJKTwCJD.js +9 -0
  84. package/dist/web/assets/Teleport-CRjWb-eC.js +1 -0
  85. package/dist/web/assets/{TextField-XakqTnVl.js → TextField-Cd8UOHKv.js} +1 -1
  86. package/dist/web/assets/TodayPage-BvbZCEFJ.js +1 -0
  87. package/dist/web/assets/TodayPage-EJ8SWFE0.css +1 -0
  88. package/dist/web/assets/{TonborgDelegationSwitch-B59PUZBz.js → TonborgDelegationSwitch-BOidSjkk.js} +1 -1
  89. package/dist/web/assets/{UiChip-BFdfq8Jm.js → UiChip-B2z0UERX.js} +1 -1
  90. package/dist/web/assets/{UiDisclosure-G3MiGB7F.js → UiDisclosure-Bw4Wu0Dm.js} +1 -1
  91. package/dist/web/assets/{UiIcon--qI1_q89.js → UiIcon-BuaIQ57Z.js} +1 -1
  92. package/dist/web/assets/{UiSegmented-CRJ06vHP.js → UiSegmented-DlI1vR3k.js} +1 -1
  93. package/dist/web/assets/{UiWeight-BRA-6EY_.js → UiWeight-DpBexUUy.js} +1 -1
  94. package/dist/web/assets/{VirtualDirectoryList-Dm07NMxq.js → VirtualDirectoryList-RV2XtTPO.js} +1 -1
  95. package/dist/web/assets/{VisuallyHidden-DIg8c_z2.js → VisuallyHidden-DciDIEua.js} +1 -1
  96. package/dist/web/assets/{VisuallyHiddenInput-rcWqHewS.js → VisuallyHiddenInput-mfi7gVBu.js} +1 -1
  97. package/dist/web/assets/WidgetSlot-xFZKjZ5z.js +2 -0
  98. package/dist/web/assets/WorkbenchListPage-BKT03RRO.css +1 -0
  99. package/dist/web/assets/WorkbenchListPage-suawrzji.js +1 -0
  100. package/dist/web/assets/_plugin-vue_export-helper-CYsAcErn.js +9 -0
  101. package/dist/web/assets/{agent-apps-Svxh5tiY.js → agent-apps-B_0syRPr.js} +1 -1
  102. package/dist/web/assets/agent-occupation-C-9THmIG.js +1 -0
  103. package/dist/web/assets/{agent-pins-CvATgFji.js → agent-pins-B9wMvxGh.js} +1 -1
  104. package/dist/web/assets/{agent-roster-records-CsYjmaNn.js → agent-roster-records-CY0aSUNq.js} +1 -1
  105. package/dist/web/assets/{agent-work-summary-BOeJ4JXc.js → agent-work-summary-Cs8jPFL0.js} +1 -1
  106. package/dist/web/assets/{attach-closest-edge-DFoBNGBU.js → attach-closest-edge-BRDsvYPn.js} +1 -1
  107. package/dist/web/assets/{attention-store-CHxXJTuF.js → attention-store-HMiJ1K6M.js} +1 -1
  108. package/dist/web/assets/{badge-DqHf-RNw.js → badge-jafr8Jg1.js} +1 -1
  109. package/dist/web/assets/{button-CdYobu4m.js → button-d6TCVE0s.js} +1 -1
  110. package/dist/web/assets/{card-8xZot-73.js → card-ebnaJXQA.js} +1 -1
  111. package/dist/web/assets/{catalog-h6KbvKdB.js → catalog-CvdvPGYk.js} +1 -1
  112. package/dist/web/assets/checkbox-CdIozFRY.js +1 -0
  113. package/dist/web/assets/{client-DRnUmjCk.js → client--hZxcKYo.js} +1 -1
  114. package/dist/web/assets/{client-links-store-DQY0A5PC.js → client-links-store-XyR0EzJi.js} +1 -1
  115. package/dist/web/assets/combobox-DzLSYxyO.js +1 -0
  116. package/dist/web/assets/{console-BF8ZU9dG.js → console-D597wx3f.js} +1 -1
  117. package/dist/web/assets/conversation-launcher-settings-CFFH9C2y.js +1 -0
  118. package/dist/web/assets/copy-mention-CWsw8po1.js +1 -0
  119. package/dist/web/assets/dialog-SLa8cPbS.js +1 -0
  120. package/dist/web/assets/{dist--2DWcoU9.js → dist-B78L06NL.js} +1 -1
  121. package/dist/web/assets/{dist-INkzWhVF.js → dist-Dy5JoHWF.js} +1 -1
  122. package/dist/web/assets/dropdown-menu-C-PcZxRY.js +1 -0
  123. package/dist/web/assets/{field-7G2bSNl5.js → field-DeguT8it.js} +1 -1
  124. package/dist/web/assets/{format-bytes-Jj3-0UhP.js → format-bytes-Br4RwHnA.js} +1 -1
  125. package/dist/web/assets/hover-card-B-H7mMvg.js +1 -0
  126. package/dist/web/assets/identity-V8oA_IuB.js +1 -0
  127. package/dist/web/assets/{index-HRZACEmh.css → index-CHDkJLQR.css} +1 -1
  128. package/dist/web/assets/index-DdAVEwQV.js +24 -0
  129. package/dist/web/assets/{input-z5o2wIZC.js → input-CRCpCN_c.js} +1 -1
  130. package/dist/web/assets/label-DwMBzI2m.js +1 -0
  131. package/dist/web/assets/label-table-DiaZlHIp.js +1 -0
  132. package/dist/web/assets/{model-BKg9fdsn.js → model-B4AuKvPj.js} +1 -1
  133. package/dist/web/assets/model-BwOv-HBS.js +1 -0
  134. package/dist/web/assets/{model-BMd98Yux.js → model-C-60EMcI.js} +1 -1
  135. package/dist/web/assets/{model-Ejc2vysd.js → model-CB4ObIOH.js} +1 -1
  136. package/dist/web/assets/{model-Bhyqm3my.js → model-CUAxIOXR.js} +1 -1
  137. package/dist/web/assets/{model-CCaA3vRN.js → model-CjQPAeCy.js} +1 -1
  138. package/dist/web/assets/{model-CGfhtR6w.js → model-CwFZ_IgV.js} +1 -1
  139. package/dist/web/assets/{model-BD6AfoOR.js → model-D-vak-m0.js} +1 -1
  140. package/dist/web/assets/{motion-pePEUhOt.js → motion-Cr9JChF9.js} +1 -1
  141. package/dist/web/assets/motion-D5Fs3-ut.js +1 -0
  142. package/dist/web/assets/{motion-preference-DTwjqiJ8.js → motion-preference-DgdzdVh8.js} +1 -1
  143. package/dist/web/assets/{occupation-catalog-ByjQk0EY.js → occupation-catalog-DHsjkd_q.js} +1 -1
  144. package/dist/web/assets/{occupation-kits-Dg6UZqc1.js → occupation-kits-BVLLRN4V.js} +1 -1
  145. package/dist/web/assets/{option-BIjYeAh2.js → option-DhAwzags.js} +1 -1
  146. package/dist/web/assets/{orchestration-filters-3AfjDoHQ.js → orchestration-filters-lhR2CHlQ.js} +1 -1
  147. package/dist/web/assets/overview-data-QDnygL-x.js +1 -0
  148. package/dist/web/assets/{page-refresh-BTqRX45n.js → page-refresh-BVRlo-dI.js} +1 -1
  149. package/dist/web/assets/{page-title-B5RyNTPD.js → page-title-ReSXziuS.js} +1 -1
  150. package/dist/web/assets/{person-profile-BzPwdtix.js → person-profile-BgUfg57K.js} +1 -1
  151. package/dist/web/assets/popover-UYksnAeH.js +1 -0
  152. package/dist/web/assets/popup-host-DMoMkD3v.js +1 -0
  153. package/dist/web/assets/preference-conflicts-a-H51vUw.js +1 -0
  154. package/dist/web/assets/{profile-model-TAsyybji.js → profile-model-CM98TJsj.js} +1 -1
  155. package/dist/web/assets/{project-board-layout-BwyHItDc.js → project-board-layout-RH6UXkCA.js} +1 -1
  156. package/dist/web/assets/{project-capture-I8-7JwsK.js → project-capture-DcQ8cXIt.js} +1 -1
  157. package/dist/web/assets/{project-origin-B_Ku288r.js → project-origin-BNzeAazi.js} +1 -1
  158. package/dist/web/assets/{quick-edit-api-Cm-W3ZVP.js → quick-edit-api-COKVNuPk.js} +1 -1
  159. package/dist/web/assets/radio-group-DfegNkLG.js +1 -0
  160. package/dist/web/assets/{review-api-Gwr5nP1B.js → review-api-CAKGInLD.js} +1 -1
  161. package/dist/web/assets/{review-list-CNeXKjBw.js → review-list-CbpXvBp-.js} +1 -1
  162. package/dist/web/assets/{review-store-BaMwO51r.js → review-store-BzrmqVoj.js} +1 -1
  163. package/dist/web/assets/{role-names-C-F0XIE1.js → role-names-Ba0c6AbS.js} +1 -1
  164. package/dist/web/assets/{roundtable-live-CM4Cqw2v.js → roundtable-live-CoKmaXKd.js} +1 -1
  165. package/dist/web/assets/{runtime-dom.esm-bundler-tA5o2TEo.js → runtime-dom.esm-bundler-CaYBCU9Y.js} +1 -1
  166. package/dist/web/assets/select-Bq2TQ0Gw.js +1 -0
  167. package/dist/web/assets/{session-launch-offers-CEdCRTz9.js → session-launch-offers-C-oBkMKe.js} +1 -1
  168. package/dist/web/assets/{settings-autosave-D3wBf_zN.js → settings-autosave-C3bTildI.js} +1 -1
  169. package/dist/web/assets/settings-tabs-DFZcxOaQ.js +1 -0
  170. package/dist/web/assets/{shared-report-KyuP8oQk.js → shared-report-Ci1jBiYV.js} +3 -3
  171. package/dist/web/assets/{source-adapters-BR-AAGhD.js → source-adapters-CunVF9JG.js} +1 -1
  172. package/dist/web/assets/switch-DaUSEDq0.js +1 -0
  173. package/dist/web/assets/tabs-B_7xQRfl.js +1 -0
  174. package/dist/web/assets/{task-card-fields-BWlLtcKE.js → task-card-fields-Ce11pWnv.js} +1 -1
  175. package/dist/web/assets/{task-evidence-DydhKn9x.js → task-evidence-D0XkNnb8.js} +1 -1
  176. package/dist/web/assets/{task-labels-BrNKooHK.js → task-labels-BulIuDQB.js} +1 -1
  177. package/dist/web/assets/{task-reason-CvmaNQWE.js → task-reason-gHlp8KHO.js} +1 -1
  178. package/dist/web/assets/{team-sheets-DkAuebg6.js → team-sheets-BzV1WjjK.js} +1 -1
  179. package/dist/web/assets/{textarea-BQnuJ0v3.js → textarea-D6czUY3a.js} +1 -1
  180. package/dist/web/assets/{ui-CJiEsCpv.js → ui-BCHzwL4X.js} +1 -1
  181. package/dist/web/assets/{useAgentRecords-PysQYF4V.js → useAgentRecords-DijrJ79w.js} +1 -1
  182. package/dist/web/assets/{useAgentWorkSummary-DaNyOo2z.js → useAgentWorkSummary-CUv88AVP.js} +1 -1
  183. package/dist/web/assets/{useApi-CROJJdhE-CgPyy2pi.js → useApi-CROJJdhE-CxqsMZ6P.js} +1 -1
  184. package/dist/web/assets/{useClipboardCopy-Cf3GZrHC.js → useClipboardCopy-uGyNKuWB.js} +1 -1
  185. package/dist/web/assets/useDirection-Bi78LycK.js +1 -0
  186. package/dist/web/assets/{useFocusReturn-uY18_eDg.js → useFocusReturn-7BKdKvqF.js} +1 -1
  187. package/dist/web/assets/{useForwardPropsEmits-mGaDeNMp.js → useForwardPropsEmits-BMeknK03.js} +1 -1
  188. package/dist/web/assets/useForwardScopeId-DHGSyWlZ.js +1 -0
  189. package/dist/web/assets/{useKnowledgeConfirm-PcqqgwNU.js → useKnowledgeConfirm-mFWI8EbK.js} +1 -1
  190. package/dist/web/assets/{useKnowledgeItemPeek-yjyrSFtf.js → useKnowledgeItemPeek-DtazLM2s.js} +1 -1
  191. package/dist/web/assets/{useMinimumLoadingDisplay-Bu6xyHby.js → useMinimumLoadingDisplay-D5UC2KRz.js} +1 -1
  192. package/dist/web/assets/{usePageTools-DYi9x7HJ.js → usePageTools-BXkR_gpB.js} +1 -1
  193. package/dist/web/assets/usePrimitiveElement-BxOn-Fn_.js +1 -0
  194. package/dist/web/assets/{useProjectAgentRoster-KPwWl2jE.js → useProjectAgentRoster-blZ5REnH.js} +1 -1
  195. package/dist/web/assets/{useRoutePeek-BiHDBRKc.js → useRoutePeek-D_j5KVFv.js} +1 -1
  196. package/dist/web/assets/useTeamWork-e57CKhLW.js +1 -0
  197. package/dist/web/assets/{useTypeahead-D_Z5P9Xm.js → useTypeahead-6a1q-4Oq.js} +1 -1
  198. package/dist/web/assets/{utils-CAAvfQSj.js → utils-BQtZ8ZUw.js} +1 -1
  199. package/dist/web/assets/{utils-D6RjkXrh.js → utils-DBsOpQt4.js} +1 -1
  200. package/dist/web/assets/{verification-DoN2EFaZ.js → verification-BlF0avgs.js} +1 -1
  201. package/dist/web/assets/{version-DbJq2Cfv.js → version-oG6VyAd6.js} +1 -1
  202. package/dist/web/assets/{vue-router-BwoPnYha.js → vue-router-CCvxNose.js} +1 -1
  203. package/dist/web/index.html +74 -75
  204. package/graph-provider/fuli_graph/app.py +4 -0
  205. package/graph-provider/fuli_graph/knowledge_statement.py +230 -0
  206. package/graph-provider/fuli_graph/knowledge_statement_days.py +109 -0
  207. package/graph-provider/pyproject.toml +1 -1
  208. package/native/win32/fuli-win-helper.exe +0 -0
  209. package/npm-shrinkwrap.json +2 -2
  210. package/package.json +1 -1
  211. package/packages/roundtable/src/peer/control-cli.js +31 -3
  212. package/packages/roundtable/src/peer/control.js +14 -2
  213. package/packages/roundtable/src/peer/coordinator-service.js +14 -8
  214. package/packages/roundtable/src/peer/lan-addresses.js +16 -1
  215. package/packages/roundtable/src/peer/nearby-discovery.js +105 -44
  216. package/packages/roundtable/src/peer/pairing-share.js +139 -0
  217. package/packages/roundtable/src/peer/peer-runtime.js +179 -42
  218. package/skills/operating-fuli/SKILL.md +9 -1
  219. package/skills/operating-fuli/references/workflow-recipes.md +2 -1
  220. package/src/agent-apps/host-tools/catalog.js +2 -0
  221. package/src/agent-delegation/operation-log.js +15 -1
  222. package/src/agent-delegation/port.js +1 -2
  223. package/src/agent-tools/graph-definitions.js +2 -0
  224. package/src/agent-tools/graph-handlers.js +2 -0
  225. package/src/agent-tools/interface-catalog.js +1 -0
  226. package/src/agent-tools/statement-definitions.js +18 -0
  227. package/src/graphiti/local-runtimes.js +5 -0
  228. package/src/graphiti/project-agent-task-sessions.js +49 -0
  229. package/src/graphiti/provider-client.js +8 -0
  230. package/src/graphiti/roundtable-host.js +4 -0
  231. package/src/graphiti/task-context-entry.js +10 -6
  232. package/src/http/api-router.js +2 -0
  233. package/src/http/graph-api-router.js +5 -2
  234. package/src/http/statement-api-router.js +27 -0
  235. package/src/judgment/store.js +9 -0
  236. package/src/knowledge-impressions/store.js +72 -9
  237. package/src/mcp/tool-annotations.js +1 -0
  238. package/src/notices/recent-notices.js +2 -1
  239. package/src/presence/windows-helper-pin.js +1 -1
  240. package/src/statement/agent-tool.js +29 -0
  241. package/src/statement/compounding-statement.js +134 -0
  242. package/src/whats-new/lines/0.27.2.json +13 -0
  243. package/dist/web/assets/AgentManagement-Cc00RLSO.css +0 -1
  244. package/dist/web/assets/AgentManagement-qCpr876m.js +0 -7
  245. package/dist/web/assets/AgentProfilePage-DcOBhuHG.js +0 -5
  246. package/dist/web/assets/DialogTitle-CIVSlKqQ.js +0 -1
  247. package/dist/web/assets/EmployeeWorkbench-BnxEZCSS.js +0 -4
  248. package/dist/web/assets/FieldRoot-D6HtUgDA.js +0 -1
  249. package/dist/web/assets/FlasPage-DtkW-_9f.js +0 -1
  250. package/dist/web/assets/HowtoPage-B8f5J_An.js +0 -1
  251. package/dist/web/assets/KnowledgeItemEditPage-DV8TVpvf.js +0 -1
  252. package/dist/web/assets/KnowledgeOrganizerPage-C4G6JCmG.js +0 -1
  253. package/dist/web/assets/KnowledgePage-Afiw2Kxy.js +0 -1
  254. package/dist/web/assets/KnowledgePeek-DIcPS9WU.js +0 -1
  255. package/dist/web/assets/KnowledgeTurnReceiptPage-7ncXkxKd.js +0 -1
  256. package/dist/web/assets/MenuSeparator-yD3wld9s.js +0 -1
  257. package/dist/web/assets/ModelSettingsPage-BqClsFmC.js +0 -1
  258. package/dist/web/assets/NoticeRow-CQShZQtw.js +0 -1
  259. package/dist/web/assets/NoticeRow-ktVO_9Es.css +0 -1
  260. package/dist/web/assets/OverviewPage-Cq89Klha.js +0 -1
  261. package/dist/web/assets/OverviewPage-KVt4LcE-.css +0 -1
  262. package/dist/web/assets/PageColumns-CgIXTt4J.js +0 -1
  263. package/dist/web/assets/PageColumns-DEideeB7.css +0 -1
  264. package/dist/web/assets/PersonalProfilePage-C_dmUEuW.js +0 -1
  265. package/dist/web/assets/PersonalProjectsPage-CiCFHVt_.js +0 -1
  266. package/dist/web/assets/PopperContent-CCmt2yHl.js +0 -1
  267. package/dist/web/assets/Presence-DqPb-1P1.js +0 -3
  268. package/dist/web/assets/RecentNotices-DYXEBfYm.js +0 -1
  269. package/dist/web/assets/RovingFocusGroup-CI4aZr1z.js +0 -1
  270. package/dist/web/assets/RovingFocusItem-C_N843Nb.js +0 -1
  271. package/dist/web/assets/SessionMigrationPage-CVKkTACn.js +0 -1
  272. package/dist/web/assets/SettingsPage-BcrAdXX7.js +0 -1
  273. package/dist/web/assets/SettingsPage-BlhCcwPn.css +0 -1
  274. package/dist/web/assets/TaskBlockerClear-BBmPbomO.css +0 -1
  275. package/dist/web/assets/TaskBlockerClear-DGaXP2ak.js +0 -1
  276. package/dist/web/assets/TaskBlockerNotice-8nogmPA-.js +0 -1
  277. package/dist/web/assets/TeamCardsWidget-BOf6oHOp.js +0 -1
  278. package/dist/web/assets/TeamIsland-BD5s-zFZ.js +0 -9
  279. package/dist/web/assets/Teleport-DhMmMHjy.js +0 -1
  280. package/dist/web/assets/WidgetSlot-C5h--noP.js +0 -2
  281. package/dist/web/assets/WorkbenchListHead-D40-J4GT.js +0 -1
  282. package/dist/web/assets/WorkbenchListPage-BX6Z9gkB.css +0 -1
  283. package/dist/web/assets/WorkbenchListPage-CJUvq4Ac.js +0 -1
  284. package/dist/web/assets/_plugin-vue_export-helper-D9CtLGVz.js +0 -9
  285. package/dist/web/assets/agent-occupation-Dhoz7LjT.js +0 -1
  286. package/dist/web/assets/agent-workflows-BS4KlKFj.js +0 -1
  287. package/dist/web/assets/checkbox-DZ6CDZ8r.js +0 -1
  288. package/dist/web/assets/combobox-DE0HzdKP.js +0 -1
  289. package/dist/web/assets/conversation-launcher-settings-D4vYOpHN.js +0 -1
  290. package/dist/web/assets/copy-mention-Crs0NIJB.js +0 -1
  291. package/dist/web/assets/dialog-Bg5NVU4Y.js +0 -1
  292. package/dist/web/assets/dropdown-menu-C5Kf9x2y.js +0 -1
  293. package/dist/web/assets/hover-card-llxR7wrX.js +0 -1
  294. package/dist/web/assets/index-C2o_v2mq.js +0 -24
  295. package/dist/web/assets/label-BtTrlS8e.js +0 -1
  296. package/dist/web/assets/label-table-CuTFbFd3.js +0 -1
  297. package/dist/web/assets/model-Bb0VtRJH.js +0 -1
  298. package/dist/web/assets/motion-Cw_hptY4.js +0 -1
  299. package/dist/web/assets/overview-data-BIeNATEJ.js +0 -1
  300. package/dist/web/assets/popover-BsWyCEy5.js +0 -1
  301. package/dist/web/assets/popup-host-DWJ1gygp.js +0 -1
  302. package/dist/web/assets/radio-group-DJ5np5d_.js +0 -1
  303. package/dist/web/assets/select-DJ7iyJ-X.js +0 -1
  304. package/dist/web/assets/settings-tabs-B9pCaEFP.js +0 -1
  305. package/dist/web/assets/switch-BoOtTu6O.js +0 -1
  306. package/dist/web/assets/tabs-D0TAS18R.js +0 -1
  307. package/dist/web/assets/useForwardExpose-Ci_aBJDg.js +0 -1
  308. package/dist/web/assets/useForwardScopeId-DYW8CZTp.js +0 -1
  309. package/dist/web/assets/usePrimitiveElement-DdC34jzt.js +0 -1
  310. package/dist/web/assets/useTeamPeople-Od3dDz6d.js +0 -1
  311. package/dist/web/assets/useTeamWork-CDKVZwYe.js +0 -1
@@ -0,0 +1,109 @@
1
+ """The graph's part of the compounding statement day by day (复利账单的日历).
2
+
3
+ For one personal space and a range of at most 371 days, per local day: the
4
+ items learned (captured) and confirmed, and the uses Agents reported. The
5
+ definitions are the weekly statement's own (`item_facts`, `USES_MATCH`); only
6
+ the grouping differs. Three aggregate queries run side by side, each grouped by
7
+ day in Cypher; no item text, id or vector leaves the Provider.
8
+
9
+ A day is the caller's local day: the range's own UTC offset (both ends carry
10
+ the same one) is added before the instant is cut into days, so an item
11
+ captured at 23:30 local time counts on that day, not the next.
12
+ """
13
+ import asyncio
14
+ from datetime import date, datetime, timedelta
15
+
16
+ from pydantic import Field, model_validator
17
+
18
+ from .knowledge_item_view import personal_reader_space
19
+ from .knowledge_statement import BASIS_FRAGMENTS, COUNTED_CONFIRMERS, USES_MATCH, _INSTANT, item_facts
20
+ from .model_base import StrictModel
21
+
22
+ MAX_DAYS = 371
23
+ _DAY_MS = 24 * 60 * 60 * 1000
24
+ _EPOCH = date(1970, 1, 1)
25
+
26
+
27
+ def _local_day(instant: str) -> str:
28
+ """The local day of a Neo4j datetime, as whole days since 1970-01-01."""
29
+ return f'toInteger(floor(({instant}.epochMillis + $offset_ms) / {_DAY_MS}.0))'
30
+
31
+
32
+ class KnowledgeStatementDaysRequest(StrictModel):
33
+ personal_space_id: str = Field(min_length=1, max_length=128)
34
+ since: datetime
35
+ until: datetime
36
+
37
+ @model_validator(mode='after')
38
+ def validate_range(self):
39
+ if self.since.tzinfo is None or self.until.tzinfo is None:
40
+ raise ValueError('statement times need a time zone')
41
+ if self.since.utcoffset() != self.until.utcoffset():
42
+ raise ValueError('since and until must carry the same UTC offset')
43
+ if self.since >= self.until:
44
+ raise ValueError('since must be before until')
45
+ if self.until - self.since > timedelta(days=MAX_DAYS):
46
+ raise ValueError(f'since and until may be at most {MAX_DAYS} days apart')
47
+ return self
48
+
49
+
50
+ class StatementDay(StrictModel):
51
+ day: date
52
+ learned: int
53
+ confirmed: int
54
+ used: int
55
+
56
+
57
+ class KnowledgeStatementDays(StrictModel):
58
+ # Oldest first; a day with nothing to count is left out.
59
+ days: list[StatementDay]
60
+
61
+
62
+ def item_days_query(item_kind: str) -> str:
63
+ return item_facts(item_kind) + f'''
64
+ WITH collect(item.fuli_replaced_by_item_id) AS versions,
65
+ collect(CASE WHEN created_at >= $since AND created_at < $until
66
+ THEN [item.uuid, {_local_day('created_at')}] END) AS created,
67
+ collect(CASE WHEN confirmer IN {COUNTED_CONFIRMERS}
68
+ AND confirmed_at >= $since AND confirmed_at < $until
69
+ THEN [item.uuid, {_local_day('confirmed_at')}] END) AS confirmations
70
+ UNWIND [row IN created WHERE NOT row[0] IN versions | ['learned', row[1]]]
71
+ + [row IN confirmations WHERE NOT row[0] IN versions | ['confirmed', row[1]]] AS event
72
+ RETURN event[0] AS measure, event[1] AS day, count(*) AS count
73
+ '''
74
+
75
+
76
+ USES_DAYS_QUERY = USES_MATCH + f'''
77
+ WITH audit, {_local_day('audit.created_at')} AS day
78
+ RETURN 'used' AS measure, day, count(audit) AS count
79
+ '''
80
+
81
+
82
+ async def knowledge_statement_days(store, space, request: KnowledgeStatementDaysRequest) -> KnowledgeStatementDays:
83
+ offset_ms = int(request.since.utcoffset().total_seconds() * 1000)
84
+ window = {'since': request.since, 'until': request.until, 'offset_ms': offset_ms, 'routing_': 'r'}
85
+
86
+ async def rows(query, **values):
87
+ records, _, _ = await store.runtime.driver.execute_query(query, **window, **values)
88
+ return [dict(record) for record in records]
89
+
90
+ item_values = {'group_id': space['group_id'], 'instant': _INSTANT, **BASIS_FRAGMENTS}
91
+ parts = await asyncio.gather(
92
+ rows(item_days_query('entity'), **item_values),
93
+ rows(item_days_query('relationship'), **item_values),
94
+ rows(USES_DAYS_QUERY, space_id=space['id']))
95
+ days: dict[int, dict[str, int]] = {}
96
+ for part in parts:
97
+ for row in part:
98
+ counts = days.setdefault(int(row['day']), {'learned': 0, 'confirmed': 0, 'used': 0})
99
+ counts[row['measure']] += int(row['count'] or 0)
100
+ return KnowledgeStatementDays(days=[
101
+ StatementDay(day=_EPOCH + timedelta(days=number), **counts)
102
+ for number, counts in sorted(days.items()) if any(counts.values())])
103
+
104
+
105
+ def register_knowledge_statement_days_route(application, store, Actor) -> None:
106
+ @application.post('/v1/knowledge/statement/days', response_model=KnowledgeStatementDays)
107
+ async def read_knowledge_statement_days(request: KnowledgeStatementDaysRequest, actor: Actor):
108
+ space = await personal_reader_space(store, actor, request.personal_space_id)
109
+ return await knowledge_statement_days(store, space, request)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fuli-graph-provider"
3
- version = "0.27.1"
3
+ version = "0.27.2"
4
4
  description = "Graphiti-backed personal and shared project provider for Fuli."
5
5
  requires-python = ">=3.12"
6
6
  dependencies = [
Binary file
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "fuli-context",
3
- "version": "0.27.1",
3
+ "version": "0.27.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "fuli-context",
9
- "version": "0.27.1",
9
+ "version": "0.27.2",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@agentclientprotocol/sdk": "1.5.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fuli-context",
3
- "version": "0.27.1",
3
+ "version": "0.27.2",
4
4
  "description": "Local-first collaboration relationship graph for AI agents.",
5
5
  "type": "module",
6
6
  "files": [
@@ -7,11 +7,13 @@ export function peerUsage(command) {
7
7
  status
8
8
  nearby [on [--name NAME] | off | clear-attempts] list nearby FULI; on: be seen and listen for pairing
9
9
  pair FINGERPRINT pair with a nearby FULI (first 4+ characters from the list)
10
- confirm CODE the 6 digits the person reads on the OTHER computer
10
+ confirm CODE the 6 digits the person reads on the OTHER computer;
11
+ pairing shares the leads of up to 8 projects both computers have (a group of two only)
11
12
  cancel cancel the pairing waiting here
12
13
  host --address IP [--port PORT] [--name NAME] turn this computer into the coordinator
13
14
  invite print a one-use pairing invitation (10 minutes)
14
15
  join (--invitation TEXT | --invitation-file FILE) [--name NAME]
16
+ also shares the leads of up to 8 projects both computers have (a group of two only)
15
17
  share --project ID --clients codex[,claude_code] [--folder DIR] (repeat --project for more; replaces the list)
16
18
  revoke --device FINGERPRINT coordinator only
17
19
  off leave: stop listening, sharing and trusting devices`;
@@ -74,6 +76,8 @@ export async function runPeerControlCommand(args, { baseUrl, command, notRunning
74
76
  const file = option(rest, '--invitation-file');
75
77
  const invitation = option(rest, '--invitation') ?? (file ? readFileSync(file, 'utf8').trim() : null);
76
78
  if (!invitation) throw new Error('Pass --invitation or --invitation-file.');
79
+ // Joining is the consent to share the common projects' leads: said first, as the console does.
80
+ write(SHARE_ON_PAIRING);
77
81
  return printStatus(await call('POST', '/api/peer/join', { invitation, name: option(rest, '--name') }), write);
78
82
  }
79
83
  case 'share': {
@@ -115,14 +119,35 @@ function printStatus(status, write) {
115
119
  for (const project of status.shareable.filter((entry) => entry.sameProjectOn?.length)) {
116
120
  write(` same project on ${project.sameProjectOn.map((device) => device.name).join(', ')}: ${project.projectName} (${project.projectId})${project.knownFolder ? '' : ' · no known folder here, pass --folder'}`);
117
121
  }
122
+ printAutoShared(status, write);
118
123
  if (status.lastPublish?.error) write(`The coordinator did not get this device's shared list: ${status.lastPublish.error}.`);
119
124
  else if (status.lastPublish) write(`Shared list sent to the coordinator: ${status.lastPublish.agents} Agent(s) at ${status.lastPublish.at}`);
120
125
  }
121
126
 
127
+ // What pairing shared without a separate tick (the leads of the projects the other computer reports too), or why nothing.
128
+ const NOT_AUTO_SHARED = {
129
+ group: (record) => `Not shared after pairing: ${record.matched} same project(s), but other computers in this group could ask them too. Share them yourself if you want.`,
130
+ too_many: (record) => `Not shared after pairing: ${record.matched} same projects is more than 8. Share the ones you want yourself.`,
131
+ unanswered: () => 'Not shared after pairing: the coordinator did not answer which projects both computers have.',
132
+ };
133
+ function printAutoShared(status, write) {
134
+ for (const record of status.autoShared ?? []) {
135
+ if (record.skipped) write(NOT_AUTO_SHARED[record.skipped]?.(record) ?? `Not shared after pairing (${record.skipped}).`);
136
+ else write(record.projects.length
137
+ ? `Shared after pairing (projects the other computer has too): ${record.projects.map((project) => project.projectName).join(', ')}`
138
+ : 'Shared after pairing: none (no project both computers have that could be shared).');
139
+ }
140
+ // A member cannot check the group itself: the coordinating computer says who else is in it.
141
+ if (status.role === 'member' && (status.autoShared ?? []).some((record) => record.projects.length)) {
142
+ write('The other computer decides who else is in the group; untick any you are unsure of.');
143
+ }
144
+ }
145
+
122
146
  function printNearby(status, write, command) {
123
147
  const { nearby } = status;
124
148
  const ended = NEARBY_ENDED[nearby.ended?.kind];
125
149
  if (ended) write(ended(nearby.ended));
150
+ printAutoShared(status, write);
126
151
  if (!nearby.on) {
127
152
  write(`Nearby pairing: off. \`${command} peer nearby on [--name NAME]\` lets computers on this network see that this one runs FULI (for 30 minutes).`);
128
153
  return;
@@ -141,11 +166,14 @@ function printNearby(status, write, command) {
141
166
  } else if (pairing.state === 'confirm' || pairing.state === 'finishing') {
142
167
  write(`Pairing with ${device}: code ${pairing.code}. ${pairing.coordinator === 'this' ? 'This computer' : 'The other computer'} will coordinate.`);
143
168
  write(pairing.confirmedHere
144
- ? `Confirmed here; waiting for the person on the other computer${pairing.confirmedThere ? ' (confirmed there too, finishing)' : ''}.`
145
- : `Compare it with the code on the other computer; if they match, run \`${command} peer confirm <the code shown there>\` before ${pairing.expiresAt}.`);
169
+ ? `Confirmed here; waiting for the person on the other computer${pairing.confirmedThere ? ' (confirmed there too, finishing)' : ''}. \`${command} peer status\` then lists what was shared.`
170
+ : `Compare it with the code on the other computer; if they match, run \`${command} peer confirm <the code shown there>\` before ${pairing.expiresAt}.\n${SHARE_ON_PAIRING}`);
146
171
  } else write(`Pairing with ${device}: ${pairing.state}${pairing.reason ? ` (${pairing.reason})` : ''}`);
147
172
  }
148
173
 
174
+ // Said before the person confirms a pairing or joins with an invitation.
175
+ const SHARE_ON_PAIRING = 'Once confirmed, leads of up to 8 projects the other computer says it has too can talk. Nothing else.';
176
+
149
177
  // Why nearby pairing turned itself off, or what it last did.
150
178
  const NEARBY_ENDED = {
151
179
  paired: (ended) => `Paired with ${ended.name}; nearby pairing turned itself off.`,
@@ -14,7 +14,7 @@ export async function handlePeerControlRequest({ request, response, url, peer, r
14
14
  return true;
15
15
  }
16
16
  try {
17
- const result = await route(request, url.pathname, peer, readJson);
17
+ const result = await route(request, url, peer, readJson);
18
18
  if (result === undefined) return false;
19
19
  sendJson(response, 200, result);
20
20
  } catch (error) {
@@ -26,9 +26,16 @@ export async function handlePeerControlRequest({ request, response, url, peer, r
26
26
  return true;
27
27
  }
28
28
 
29
- async function route(request, pathname, peer, readJson) {
29
+ async function route(request, url, peer, readJson) {
30
30
  const { method } = request;
31
+ const { pathname } = url;
31
32
  if (pathname === '/api/peer' && method === 'GET') return peer.status();
33
+ if (pathname === '/api/peer/shareable' && method === 'GET') {
34
+ const limit = url.searchParams.get('limit');
35
+ return peer.searchShareable({ query: url.searchParams.get('query') ?? '', ...(limit ? { limit: Number(limit) } : {}) });
36
+ }
37
+ const shareable = /^\/api\/peer\/shareable\/([^/]+)$/.exec(pathname);
38
+ if (shareable && method === 'GET') return peer.shareableProject(projectIdOf(shareable[1]));
32
39
  if (pathname === '/api/peer/coordinator' && method === 'POST') {
33
40
  const body = await readJson(request);
34
41
  return peer.enableCoordinator({ host: body.host, port: body.port ?? 0, name: body.name });
@@ -59,3 +66,8 @@ async function route(request, pathname, peer, readJson) {
59
66
  if (pathname === '/api/peer/nearby/attempts/clear' && method === 'POST') { await readJson(request); return peer.clearPairingAttempts(); }
60
67
  return undefined;
61
68
  }
69
+
70
+ function projectIdOf(segment) {
71
+ try { return decodeURIComponent(segment); }
72
+ catch { throw new PeerError('project_not_found', 'No project of this computer can be shared under that id', 404); }
73
+ }
@@ -29,7 +29,7 @@ const DAY_MS = 24 * 60 * 60_000;
29
29
  // Routes messages between paired devices. It never executes anything: each
30
30
  // receiving device re-checks its own shares and identity authority.
31
31
  export function createCoordinatorService({ store, identity, authority, name, clock = Date.now,
32
- randomCode = () => randomBytes(32).toString('base64url'), idFactory = randomUUID, onTrustChange = () => {},
32
+ randomCode = () => randomBytes(32).toString('base64url'), idFactory = randomUUID, onTrustChange = () => {}, onRevoked = () => {},
33
33
  repositoryChanges = memoryRecord() }) {
34
34
  const iso = (offsetMs = 0) => new Date(clock() + offsetMs).toISOString();
35
35
  const pairingFailures = [];
@@ -111,16 +111,20 @@ export function createCoordinatorService({ store, identity, authority, name, clo
111
111
  }
112
112
 
113
113
  // Another device's digests never leave the coordinator: each device learns
114
- // only which of its own digests another paired device also has.
114
+ // only which of its own digests another paired device also has, and whether
115
+ // the coordinator holds a set under its current key (for itself and each other
116
+ // device), so an empty match can be told from digests not sent yet.
115
117
  function directory(nodeId) {
116
118
  const now = clock();
117
119
  const mine = new Set(repositories.get(nodeId) ?? []);
118
- return { devices: store.nodes().filter((node) => node.status === 'active' && node.id !== nodeId).map((node) => ({
119
- nodeId: node.id, name: node.name,
120
- online: seenWithin(node, now, ONLINE_MS),
121
- agents: JSON.parse(node.directory_json),
122
- sameRepositories: (repositories.get(node.id) ?? []).filter((digest) => mine.has(digest)),
123
- })) };
120
+ return { ownRepositoriesKnown: repositories.has(nodeId),
121
+ devices: store.nodes().filter((node) => node.status === 'active' && node.id !== nodeId).map((node) => ({
122
+ nodeId: node.id, name: node.name,
123
+ online: seenWithin(node, now, ONLINE_MS),
124
+ agents: JSON.parse(node.directory_json),
125
+ sameRepositories: (repositories.get(node.id) ?? []).filter((digest) => mine.has(digest)),
126
+ repositoriesKnown: repositories.has(node.id),
127
+ })) };
124
128
  }
125
129
 
126
130
  // The same set again is free; a new set counts, and past the daily limit the earlier set stays.
@@ -291,6 +295,8 @@ export function createCoordinatorService({ store, identity, authority, name, clo
291
295
  });
292
296
  rotateRepositoryKey();
293
297
  onTrustChange();
298
+ // Also when the device itself left (POST /peer/1/leave): the host ends what it kept for that device.
299
+ onRevoked(nodeId);
294
300
  return { revoked: true };
295
301
  }
296
302
 
@@ -16,6 +16,17 @@ export function announcedAddresses(interfaces) {
16
16
  return (physical.length ? physical : all).map((entry) => entry.address);
17
17
  }
18
18
 
19
+ // One address per physical adapter, where nearby discovery sends and listens:
20
+ // an adapter joins the multicast group once however many addresses it has.
21
+ export function discoveryAdapters(interfaces) {
22
+ return Object.entries(interfaces()).flatMap(([name, list]) => {
23
+ if (VIRTUAL_ADAPTER.test(name)) return [];
24
+ // 169.254/16 is what an adapter gives itself when it has no network.
25
+ const first = (list ?? []).find((entry) => lanIPv4(entry) && !entry.address.startsWith('169.254.'));
26
+ return first ? [first.address] : [];
27
+ });
28
+ }
29
+
19
30
  // Addresses of virtual and VPN adapters, where nearby pairing does not answer.
20
31
  export function virtualAddresses(interfaces) {
21
32
  return classified(interfaces).filter((entry) => entry.virtual).map((entry) => entry.address);
@@ -23,6 +34,10 @@ export function virtualAddresses(interfaces) {
23
34
 
24
35
  function classified(interfaces) {
25
36
  return Object.entries(interfaces()).flatMap(([name, list]) => (list ?? [])
26
- .filter((entry) => entry && !entry.internal && (entry.family === 'IPv4' || entry.family === 4))
37
+ .filter(lanIPv4)
27
38
  .map((entry) => ({ address: entry.address, virtual: VIRTUAL_ADAPTER.test(name) })));
28
39
  }
40
+
41
+ function lanIPv4(entry) {
42
+ return Boolean(entry) && !entry.internal && (entry.family === 'IPv4' || entry.family === 4);
43
+ }
@@ -6,62 +6,123 @@ export const NEARBY_SERVICE_TYPE = 'fuli-peer';
6
6
  // JavaScript). Nothing binds the multicast socket until something is
7
7
  // advertised or browsed, so a FULI with nearby pairing off sends nothing.
8
8
  //
9
- // The multicast socket failing to bind (UDP 5353 taken or not allowed) is an
10
- // 'error' event that would end the process: it goes to onFailure instead, and
11
- // the caller turns nearby pairing off. Sending into a network that went away
12
- // (an interface down, sleep and wake) is only a warning; mDNS retries itself.
13
- export function createBonjourDiscovery({ onFailure = () => {}, options = undefined } = {}) {
14
- let bonjour = null;
15
- const instance = () => {
16
- if (bonjour) return bonjour;
17
- const created = new Bonjour(options, () => {});
18
- const mdns = created.server?.mdns;
19
- mdns?.on('error', (error) => {
20
- if (bonjour === created) bonjour = null;
21
- quietly(() => created.destroy());
22
- onFailure(error);
23
- });
24
- mdns?.on('warning', () => {});
25
- bonjour = created;
9
+ // One mDNS endpoint per physical LAN adapter (`adapters()`): left to itself the
10
+ // library sends from whichever adapter the system prefers, and a VPN or a
11
+ // virtual-machine adapter with a better metric then takes every query and
12
+ // announcement while the real LAN hears nothing. Each endpoint joins and sends
13
+ // on its adapter but binds every address: macOS and Linux deliver multicast
14
+ // only to a socket bound that way. With no physical adapter there is one
15
+ // endpoint on the system's default. The adapters are read again at each
16
+ // refresh, so a computer that changed network is found again.
17
+ //
18
+ // A multicast socket that fails (UDP 5353 taken or not allowed) is an 'error'
19
+ // event that would end the process. That endpoint is dropped; when none is
20
+ // left the error goes to onFailure and the caller turns nearby pairing off.
21
+ // Sending into a network that went away (an interface down, sleep and wake) is
22
+ // only a warning; mDNS retries itself.
23
+ export function createBonjourDiscovery({ onFailure = () => {}, options = undefined, adapters = () => [],
24
+ create = (target) => new Bonjour(target, () => {}) } = {}) {
25
+ let endpoints = null;
26
+ let opened = '';
27
+ let advert = null;
28
+ let watch = null;
29
+
30
+ const targets = () => (options ? [options] : adapters().map((address) => ({ interface: address, bind: '0.0.0.0' })));
31
+ const open = () => {
32
+ if (endpoints) return endpoints;
33
+ const wanted = targets();
34
+ const created = (wanted.length ? wanted : [undefined]).map((target) => ({ bonjour: create(target), service: null, browser: null }));
35
+ for (const endpoint of created) {
36
+ const mdns = endpoint.bonjour.server?.mdns;
37
+ mdns?.on('error', (error) => {
38
+ if (endpoints !== created || !created.includes(endpoint)) return;
39
+ created.splice(created.indexOf(endpoint), 1);
40
+ quietly(() => endpoint.bonjour.destroy());
41
+ if (created.length) return;
42
+ endpoints = null;
43
+ onFailure(error);
44
+ });
45
+ mdns?.on('warning', () => {});
46
+ }
47
+ endpoints = created;
48
+ opened = JSON.stringify(wanted);
26
49
  return created;
27
50
  };
28
- return {
29
- // addresses: the only IPv4 addresses announced for this computer (others
30
- // such as virtual adapters are left out); null announces every one.
31
- advertise({ name, host, port, txt, addresses = null }) {
32
- const service = instance().publish({ name, host, port, txt, type: NEARBY_SERVICE_TYPE, disableIPv6: true });
33
- if (addresses) {
34
- const allowed = new Set(addresses);
51
+ const shut = () => {
52
+ const current = endpoints ?? [];
53
+ endpoints = null;
54
+ for (const endpoint of current) quietly(() => endpoint.bonjour.destroy());
55
+ };
56
+
57
+ // The address filter is installed right after publish: the library first
58
+ // asks the network whether the name is taken and only then reads the records.
59
+ // Every endpoint has its own instance name, so two adapters on one LAN (wired
60
+ // and Wi-Fi) never take each other for a name already in use.
61
+ const publish = () => {
62
+ if (!advert) return;
63
+ open().forEach((endpoint, index) => {
64
+ const suffix = index ? `-${index + 1}` : '';
65
+ const service = endpoint.bonjour.publish({ name: `${advert.name}${suffix}`, host: advert.host.replace(/(\.local)?$/, `${suffix}$1`),
66
+ port: advert.port, txt: advert.txt, type: NEARBY_SERVICE_TYPE, disableIPv6: true });
67
+ if (advert.addresses) {
68
+ const allowed = new Set(advert.addresses);
35
69
  const records = service.records.bind(service);
36
70
  service.records = () => records().filter((record) => record.type !== 'A' || allowed.has(record.data));
37
71
  }
38
72
  service.on?.('error', () => {});
39
- return { stop: () => quietly(() => service.stop?.()) };
73
+ endpoint.service = service;
74
+ });
75
+ };
76
+ const unpublish = () => {
77
+ for (const endpoint of endpoints ?? []) { const { service } = endpoint; endpoint.service = null; quietly(() => service?.stop?.()); }
78
+ };
79
+
80
+ // The addresses the computer announces (its physical LAN ones) come before
81
+ // the one its packet arrived from, which may be a virtual adapter.
82
+ const view = (service) => ({ name: service.name, port: service.port, txt: service.txt ?? {},
83
+ addresses: [...(service.addresses ?? []), service.referer?.address].filter(Boolean) });
84
+ const look = () => {
85
+ if (!watch) return;
86
+ for (const endpoint of open()) {
87
+ const browser = endpoint.bonjour.find({ type: NEARBY_SERVICE_TYPE });
88
+ browser.on('up', (service) => watch.onUp(view(service)));
89
+ browser.on('txt-update', (service) => watch.onUp(view(service)));
90
+ browser.on('srv-update', (service) => watch.onUp(view(service)));
91
+ browser.on('down', (service) => watch.onDown(view(service)));
92
+ endpoint.browser = browser;
93
+ }
94
+ };
95
+ const unlook = () => {
96
+ for (const endpoint of endpoints ?? []) { const { browser } = endpoint; endpoint.browser = null; quietly(() => browser?.stop()); }
97
+ };
98
+
99
+ return {
100
+ // addresses: the only IPv4 addresses announced for this computer (others
101
+ // such as virtual adapters are left out); null announces every one.
102
+ advertise({ name, host, port, txt, addresses = null }) {
103
+ unpublish();
104
+ advert = { name, host, port, txt, addresses };
105
+ publish();
106
+ return { stop: () => { advert = null; unpublish(); } };
40
107
  },
41
108
  browse({ onUp, onDown }) {
42
- let browser = null;
43
- // The addresses the computer announces (its physical LAN ones) come
44
- // before the one its packet arrived from, which may be a virtual adapter.
45
- const view = (service) => ({ name: service.name, port: service.port, txt: service.txt ?? {},
46
- addresses: [...(service.addresses ?? []), service.referer?.address].filter(Boolean) });
47
- const start = () => {
48
- browser = instance().find({ type: NEARBY_SERVICE_TYPE });
49
- browser.on('up', (service) => onUp(view(service)));
50
- browser.on('txt-update', (service) => onUp(view(service)));
51
- browser.on('srv-update', (service) => onUp(view(service)));
52
- browser.on('down', (service) => onDown(view(service)));
53
- };
54
- start();
109
+ watch = { onUp, onDown };
110
+ look();
55
111
  return {
56
- stop: () => quietly(() => browser?.stop()),
57
- // A fresh browser asks again, so every computer still there answers anew.
58
- refresh: () => { quietly(() => browser?.stop()); quietly(start); },
112
+ stop: () => { watch = null; unlook(); },
113
+ // Fresh browsers ask again, so every computer still there answers
114
+ // anew; on adapters that changed, everything starts over.
115
+ refresh: () => quietly(() => {
116
+ if (endpoints && JSON.stringify(targets()) !== opened) { shut(); publish(); }
117
+ else unlook();
118
+ look();
119
+ }),
59
120
  };
60
121
  },
61
122
  close() {
62
- const current = bonjour;
63
- bonjour = null;
64
- quietly(() => current?.destroy());
123
+ advert = null;
124
+ watch = null;
125
+ shut();
65
126
  },
66
127
  };
67
128
  }
@@ -0,0 +1,139 @@
1
+ // Sharing the leads of the projects both computers have, once per pairing.
2
+ //
3
+ // Confirming a pairing (the 6 digits on each computer, or joining with an
4
+ // invitation) is the person's consent, said before they confirm, to share the
5
+ // leads of at most AUTO_SHARE_LIMIT projects the other computer reports having
6
+ // too (the same own repository, matched on the coordinator). It happens only in
7
+ // a group of exactly these two computers: a share is published to the whole
8
+ // group, so with a third computer the person shares with one click instead,
9
+ // told that the others can ask too. More matches than the limit share nothing
10
+ // and leave the same one click, with the number in front of the person.
11
+ //
12
+ // What counts as an answer: the coordinator holds both computers' digests
13
+ // under its current key (a coordinator that moved its listener has a new key,
14
+ // and the other computer sends its digests again only at its next publish).
15
+ // Until then it asks again every attemptMs, for at most `attempts` times; only
16
+ // a real answer or that bound writes the record, which stays until the person
17
+ // turns the LAN roundtable off or revokes the device, so it runs once per
18
+ // paired device. An existing share is never changed and none is removed; a
19
+ // project the person shared or unticked since the pairing keeps their choice.
20
+ export const AUTO_SHARE_LIMIT = 8;
21
+ const ATTEMPT_MS = 10_000;
22
+ // 18 attempts 10 s apart: three minutes, three publish intervals of the other computer.
23
+ const ATTEMPTS = 18;
24
+ const RECORDS = 'autoShared';
25
+
26
+ // port: setting(key), setSetting(key, value), paired(), match(fingerprint),
27
+ // prepare(projects), sharedProjectIds(), touchedSince(projectId, since),
28
+ // writeShares(shares), afterWrite().
29
+ export function createPairingShare({ port, clock = Date.now, attemptMs = ATTEMPT_MS, attempts = ATTEMPTS, onError = () => {} }) {
30
+ // One waiting timer per device, and the pairing (its `since`) an attempt is
31
+ // running for: a new pairing of the same device runs its own attempt, and
32
+ // the older one stops at its next check, so nothing waits on a stale run.
33
+ const timers = new Map();
34
+ const running = new Map();
35
+ const records = () => port.setting(RECORDS) ?? {};
36
+ const write = (fingerprint, record) => port.setSetting(RECORDS, { ...records(), [fingerprint]: record });
37
+
38
+ // A new pairing with this device: nothing happens when it already ran.
39
+ function start(fingerprint) {
40
+ if (records()[fingerprint]) return;
41
+ cancel(fingerprint);
42
+ const since = clock();
43
+ write(fingerprint, { state: 'pending', since, until: since + attemptMs * (attempts - 1) });
44
+ return attempt(fingerprint);
45
+ }
46
+
47
+ function cancel(fingerprint) {
48
+ clearTimeout(timers.get(fingerprint));
49
+ timers.delete(fingerprint);
50
+ }
51
+
52
+ function later(fingerprint) {
53
+ cancel(fingerprint);
54
+ const timer = setTimeout(() => {
55
+ timers.delete(fingerprint);
56
+ attempt(fingerprint).catch(onError);
57
+ }, attemptMs);
58
+ timer.unref?.();
59
+ timers.set(fingerprint, timer);
60
+ }
61
+
62
+ const pending = (fingerprint, since) => {
63
+ const record = records()[fingerprint];
64
+ return record?.state === 'pending' && (since === undefined || record.since === since) ? record : null;
65
+ };
66
+ // Still this pairing, still paired: checked after every wait.
67
+ const current = (fingerprint, record) => Boolean(pending(fingerprint, record.since)) && port.paired();
68
+
69
+ async function attempt(fingerprint) {
70
+ const record = pending(fingerprint);
71
+ if (!record || running.get(fingerprint) === record.since || !port.paired()) return;
72
+ running.set(fingerprint, record.since);
73
+ try {
74
+ const match = await port.match(fingerprint);
75
+ if (!current(fingerprint, record)) return;
76
+ if (!match.settled) return waitMore(fingerprint, record);
77
+ if (match.others > 0) return finish(fingerprint, record, { projects: [], skipped: 'group', matched: match.common.length });
78
+ if (match.common.length > AUTO_SHARE_LIMIT) {
79
+ return finish(fingerprint, record, { projects: [], skipped: 'too_many', matched: match.common.length });
80
+ }
81
+ const fresh = (project) => !port.sharedProjectIds().has(project.projectId) && !port.touchedSince(project.projectId, record.since);
82
+ const prepared = await port.prepare(match.common.filter(fresh));
83
+ if (!current(fingerprint, record)) return;
84
+ // The group is read again: a device that joined while the shares were prepared would see them too.
85
+ const again = await port.match(fingerprint);
86
+ // Checked again right before writing, with no wait in between: a revoke, a
87
+ // turn-off or the person's own save may have come meanwhile.
88
+ if (!current(fingerprint, record)) return;
89
+ if (!again.settled) return waitMore(fingerprint, record);
90
+ if (again.others > 0) return finish(fingerprint, record, { projects: [], skipped: 'group', matched: match.common.length });
91
+ const added = prepared.filter((entry) => fresh(entry.share));
92
+ if (added.length) port.writeShares(added.map((entry) => entry.share));
93
+ finish(fingerprint, record, { projects: added.map(({ share, projectName }) => ({ projectId: share.projectId, projectName })) });
94
+ if (added.length) await port.afterWrite();
95
+ } finally { if (running.get(fingerprint) === record.since) running.delete(fingerprint); }
96
+ }
97
+
98
+ function waitMore(fingerprint, record) {
99
+ if (clock() < record.until) later(fingerprint);
100
+ else finish(fingerprint, record, { projects: [], skipped: 'unanswered' });
101
+ }
102
+
103
+ function finish(fingerprint, record, outcome) {
104
+ write(fingerprint, { state: 'done', since: record.since, at: new Date(clock()).toISOString(), ...outcome });
105
+ }
106
+
107
+ // After a restart a pairing still waiting for its answer asks again.
108
+ function resume() {
109
+ for (const fingerprint of Object.keys(records())) if (pending(fingerprint)) attempt(fingerprint).catch(onError);
110
+ }
111
+
112
+ // A device revoked here or that left: its record and its waiting end.
113
+ function forget(fingerprint) {
114
+ cancel(fingerprint);
115
+ const { [fingerprint]: gone, ...rest } = records();
116
+ if (gone) port.setSetting(RECORDS, Object.keys(rest).length ? rest : null);
117
+ }
118
+
119
+ // The LAN roundtable turned off: every record and every waiting end.
120
+ function clear() {
121
+ close();
122
+ port.setSetting(RECORDS, null);
123
+ }
124
+
125
+ // What each finished pairing shared without a separate tick, or why it shared nothing.
126
+ const view = () => Object.entries(records()).filter(([, record]) => record.state === 'done')
127
+ .map(([nodeId, record]) => ({ nodeId, at: record.at, projects: record.projects,
128
+ ...(record.skipped ? { skipped: record.skipped, matched: record.matched ?? 0 } : {}) }));
129
+
130
+ // A pairing still waiting for the coordinator's answer, so the card keeps reading status.
131
+ const waiting = () => Object.keys(records()).some((fingerprint) => pending(fingerprint));
132
+
133
+ function close() {
134
+ for (const timer of timers.values()) clearTimeout(timer);
135
+ timers.clear();
136
+ }
137
+
138
+ return { start, resume, forget, clear, view, waiting, close };
139
+ }