fuli-context 0.27.0 → 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 (431) hide show
  1. package/dist/web/assets/{AboutPage-Bp2Edkdg.js → AboutPage-Bgcf03U0.js} +1 -1
  2. package/dist/web/assets/{AboutSectionHeading-DFfY2f_Z.js → AboutSectionHeading-BaQBY_Xs.js} +1 -1
  3. package/dist/web/assets/AgentAppsPage-DNuujLT2.js +1 -0
  4. package/dist/web/assets/{AgentAvatar-w-2A3nsJ.js → AgentAvatar-DGXedNUs.js} +1 -1
  5. package/dist/web/assets/{AgentHand-BGGU49Jt.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-BAHZjubz.js → AgentMentionCopy-y3JD1Cef.js} +1 -1
  9. package/dist/web/assets/{AgentName-CXlsC-4o.js → AgentName-XrBcHq4R.js} +1 -1
  10. package/dist/web/assets/AgentProfilePage-DE7z980p.js +5 -0
  11. package/dist/web/assets/AgentServicesPage-CWfGSxcb.js +1 -0
  12. package/dist/web/assets/{AppViewerPage-6gWP6nAf.js → AppViewerPage-BaKMk9pp.js} +1 -1
  13. package/dist/web/assets/{BackToTop-Cs5_rV99.js → BackToTop-DITd9y7X.js} +1 -1
  14. package/dist/web/assets/{BoardCardFieldsMenu-CvFrsIgy.js → BoardCardFieldsMenu-CWtHiVR-.js} +1 -1
  15. package/dist/web/assets/{BoardMoveMenu-B5isxIcK.js → BoardMoveMenu-CEDdltY7.js} +1 -1
  16. package/dist/web/assets/Breadcrumb-C98voz9V.js +1 -0
  17. package/dist/web/assets/{CaptureChangePage-Ca72_PHc.js → CaptureChangePage-CE8tJfiQ.js} +1 -1
  18. package/dist/web/assets/{CopyFixPrompt-wGATZKOq.js → CopyFixPrompt-C2hC04lV.js} +1 -1
  19. package/dist/web/assets/DataFormatPage-BjZkck9o.js +2 -0
  20. package/dist/web/assets/DebugTurnPage-B82geu1y.js +1 -0
  21. package/dist/web/assets/DebugTurnsPage-BlDDz1Fk.js +1 -0
  22. package/dist/web/assets/DialogTitle-fpANsAcy.js +1 -0
  23. package/dist/web/assets/{EmployeeRedirectPage-C2SHpAEF.js → EmployeeRedirectPage-CSSuvAqx.js} +1 -1
  24. package/dist/web/assets/EmployeeScopeDialog-BoEMQOEj.js +1 -0
  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-DGnUPN7D.js → FlaGrowth-OdlmgEVi.js} +1 -1
  29. package/dist/web/assets/{FlaOccupationKit-DAJjSrmL.js → FlaOccupationKit-CnouVWnU.js} +1 -1
  30. package/dist/web/assets/{FlaTaskSheets-DRLgfrVC.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-NLj2W4jj.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-C3cSvJjB.js +6 -0
  37. package/dist/web/assets/{KnowledgeDeleteButton-DaT-gTmm.js → KnowledgeDeleteButton-yc8Gi-BH.js} +1 -1
  38. package/dist/web/assets/{KnowledgeHardDeleteSection-C9d7DVLa.js → KnowledgeHardDeleteSection-D9Ktc-uC.js} +1 -1
  39. package/dist/web/assets/KnowledgeItemEditPage-Csy4oOxD.js +1 -0
  40. package/dist/web/assets/{KnowledgeItemSummaryCard-eLzjKvgN.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-DDg3tUb3.css → KnowledgeWorkspace-Be2gUul5.css} +1 -1
  46. package/dist/web/assets/KnowledgeWorkspace-Dr-zYpDQ.js +4 -0
  47. package/dist/web/assets/{MeAvatar-f6qxg9dN.js → MeAvatar-CmhuRFOf.js} +1 -1
  48. package/dist/web/assets/{MeLink-DTvFYaYE.js → MeLink-BesUihiS.js} +1 -1
  49. package/dist/web/assets/MenuSeparator-BGo0DgyF.js +1 -0
  50. package/dist/web/assets/{ModelSettingsPage-B38R-kBZ.css → ModelSettingsPage-BZcyT7Vy.css} +1 -1
  51. package/dist/web/assets/ModelSettingsPage-CBPwuIBM.js +1 -0
  52. package/dist/web/assets/{NewSessionPanel-9yINjwyx.js → NewSessionPanel-Bvp9ElzU.js} +1 -1
  53. package/dist/web/assets/{NotFoundPage-CqevPz0_.js → NotFoundPage-BrolI2fz.js} +1 -1
  54. package/dist/web/assets/{workbench-card-Dt0820yW.css → NoticeRow-DD-J76Yo.css} +1 -1
  55. package/dist/web/assets/NoticeRow-Q9QT5NqB.js +1 -0
  56. package/dist/web/assets/OccupationsPage-CZCeeihl.js +1 -0
  57. package/dist/web/assets/{PageOutline-HHUlu2x3.js → PageOutline-DULpqEwg.js} +1 -1
  58. package/dist/web/assets/PageStack-BMzrkyV4.css +1 -0
  59. package/dist/web/assets/PageStack-DTzWJuae.js +1 -0
  60. package/dist/web/assets/{PersonalProfilePage-DnjNX2xK.css → PersonalProfilePage-BE5q2bqc.css} +1 -1
  61. package/dist/web/assets/PersonalProfilePage-DbXWycCQ.js +1 -0
  62. package/dist/web/assets/PersonalProjectsPage-pdAJpnZd.js +1 -0
  63. package/dist/web/assets/{PinIcon-DP-9Iisk.js → PinIcon-YYoaYKTx.js} +1 -1
  64. package/dist/web/assets/PopperContent-CnNwFMIA.js +1 -0
  65. package/dist/web/assets/Presence-CuIoA2sH.js +3 -0
  66. package/dist/web/assets/{ProfileAuthorChip-BKZJC_N2.js → ProfileAuthorChip-BEfiuJbm.js} +1 -1
  67. package/dist/web/assets/ProjectAgentsPage-BPf2RLsw.js +5 -0
  68. package/dist/web/assets/{ProjectJudgmentPolicy-BJ5sVuFI.js → ProjectJudgmentPolicy-CCzHtmOb.js} +1 -1
  69. package/dist/web/assets/{RoundtablesPage-D5Xc3yun.js → RoundtablesPage-BDU4W-bg.js} +1 -1
  70. package/dist/web/assets/RovingFocusGroup-DS4v3bEq.js +1 -0
  71. package/dist/web/assets/RovingFocusItem-bLEnnw2Y.js +1 -0
  72. package/dist/web/assets/SessionMigrationPage-DrK4df0L.js +1 -0
  73. package/dist/web/assets/{SessionRecordsPage-C6U5YGSt.js → SessionRecordsPage-CFAgM65g.js} +1 -1
  74. package/dist/web/assets/SettingsPage-CsJxhhsu.js +1 -0
  75. package/dist/web/assets/SettingsPage-VX_e4ty2.css +1 -0
  76. package/dist/web/assets/SharedJefaReportPage-DbTPYwa_.js +1 -0
  77. package/dist/web/assets/StatementCalendarPage-CIo5R14R.js +1 -0
  78. package/dist/web/assets/StatementCalendarPage-t8pJI4G6.css +1 -0
  79. package/dist/web/assets/StatementRows-CubaC9KG.js +1 -0
  80. package/dist/web/assets/StatementRows-TQ2i_uXU.css +1 -0
  81. package/dist/web/assets/{TagVocabularyPage-Brpr-Q-y.js → TagVocabularyPage-BVlLmKv2.js} +1 -1
  82. package/dist/web/assets/TaskBlockerNotice-YSvmy6B4.js +1 -0
  83. package/dist/web/assets/{TaskReason-RKKs4Kb5.js → TaskReason-CrLPeiOg.js} +1 -1
  84. package/dist/web/assets/{TeamCard-8hjo1h0x.js → TeamCard-SBMJMd7P.js} +1 -1
  85. package/dist/web/assets/TeamCardsWidget-CGLW04TH.js +1 -0
  86. package/dist/web/assets/TeamIsland-jJKTwCJD.js +9 -0
  87. package/dist/web/assets/Teleport-CRjWb-eC.js +1 -0
  88. package/dist/web/assets/{TextField-G2fJ4aFQ.js → TextField-Cd8UOHKv.js} +1 -1
  89. package/dist/web/assets/TodayPage-BvbZCEFJ.js +1 -0
  90. package/dist/web/assets/TodayPage-EJ8SWFE0.css +1 -0
  91. package/dist/web/assets/TonborgDelegationSwitch-BFb1JkWe.css +1 -0
  92. package/dist/web/assets/TonborgDelegationSwitch-BOidSjkk.js +1 -0
  93. package/dist/web/assets/{UiChip-BHEJVA6L.js → UiChip-B2z0UERX.js} +1 -1
  94. package/dist/web/assets/{UiDisclosure-B1pd8qXW.js → UiDisclosure-Bw4Wu0Dm.js} +1 -1
  95. package/dist/web/assets/{UiIcon-K7OhYTSy.js → UiIcon-BuaIQ57Z.js} +1 -1
  96. package/dist/web/assets/UiSegmented-DlI1vR3k.js +1 -0
  97. package/dist/web/assets/{UiWeight-eAw682rH.js → UiWeight-DpBexUUy.js} +1 -1
  98. package/dist/web/assets/{VirtualDirectoryList-BGum1GZc.js → VirtualDirectoryList-RV2XtTPO.js} +1 -1
  99. package/dist/web/assets/{VisuallyHidden-Ck6D7rq-.js → VisuallyHidden-DciDIEua.js} +1 -1
  100. package/dist/web/assets/{VisuallyHiddenInput-DXWhIUlB.js → VisuallyHiddenInput-mfi7gVBu.js} +1 -1
  101. package/dist/web/assets/WidgetSlot-xFZKjZ5z.js +2 -0
  102. package/dist/web/assets/WorkbenchListPage-BKT03RRO.css +1 -0
  103. package/dist/web/assets/WorkbenchListPage-suawrzji.js +1 -0
  104. package/dist/web/assets/_plugin-vue_export-helper-CYsAcErn.js +9 -0
  105. package/dist/web/assets/{agent-apps-D0eG1aMx.js → agent-apps-B_0syRPr.js} +1 -1
  106. package/dist/web/assets/agent-occupation-C-9THmIG.js +1 -0
  107. package/dist/web/assets/{agent-pins-OYjJQ38F.js → agent-pins-B9wMvxGh.js} +1 -1
  108. package/dist/web/assets/{agent-roster-records-CsYjmaNn.js → agent-roster-records-CY0aSUNq.js} +1 -1
  109. package/dist/web/assets/{agent-work-summary-BOeJ4JXc.js → agent-work-summary-Cs8jPFL0.js} +1 -1
  110. package/dist/web/assets/{attach-closest-edge-C75rKXiz.js → attach-closest-edge-BRDsvYPn.js} +1 -1
  111. package/dist/web/assets/{attention-store-k4mPCefZ.js → attention-store-HMiJ1K6M.js} +1 -1
  112. package/dist/web/assets/{badge-B2rll-68.js → badge-jafr8Jg1.js} +1 -1
  113. package/dist/web/assets/{button-q6JhonlL.js → button-d6TCVE0s.js} +1 -1
  114. package/dist/web/assets/{card-CPQiMHSu.js → card-ebnaJXQA.js} +1 -1
  115. package/dist/web/assets/{catalog-CBPcEkXC.js → catalog-CvdvPGYk.js} +1 -1
  116. package/dist/web/assets/checkbox-CdIozFRY.js +1 -0
  117. package/dist/web/assets/{client-KFFphxpK.js → client--hZxcKYo.js} +1 -1
  118. package/dist/web/assets/{client-links-store-Cw9c8MWc.js → client-links-store-XyR0EzJi.js} +1 -1
  119. package/dist/web/assets/combobox-DzLSYxyO.js +1 -0
  120. package/dist/web/assets/{console-BCR2S3AF.js → console-D597wx3f.js} +1 -1
  121. package/dist/web/assets/conversation-launcher-settings-CFFH9C2y.js +1 -0
  122. package/dist/web/assets/copy-mention-CWsw8po1.js +1 -0
  123. package/dist/web/assets/dialog-SLa8cPbS.js +1 -0
  124. package/dist/web/assets/{dist-CaVgk2QB.js → dist-B78L06NL.js} +1 -1
  125. package/dist/web/assets/{dist-D73EXNtz.js → dist-Dy5JoHWF.js} +1 -1
  126. package/dist/web/assets/dropdown-menu-C-PcZxRY.js +1 -0
  127. package/dist/web/assets/{field-BaUOZtN5.js → field-DeguT8it.js} +1 -1
  128. package/dist/web/assets/{format-bytes-D5eCtdg1.js → format-bytes-Br4RwHnA.js} +1 -1
  129. package/dist/web/assets/hover-card-B-H7mMvg.js +1 -0
  130. package/dist/web/assets/identity-V8oA_IuB.js +1 -0
  131. package/dist/web/assets/{index-HRZACEmh.css → index-CHDkJLQR.css} +1 -1
  132. package/dist/web/assets/index-DdAVEwQV.js +24 -0
  133. package/dist/web/assets/{input-Dxh25T4M.js → input-CRCpCN_c.js} +1 -1
  134. package/dist/web/assets/label-DwMBzI2m.js +1 -0
  135. package/dist/web/assets/label-table-DiaZlHIp.js +1 -0
  136. package/dist/web/assets/{model-ZwOxwk2m.js → model-B4AuKvPj.js} +1 -1
  137. package/dist/web/assets/model-BwOv-HBS.js +1 -0
  138. package/dist/web/assets/{model-Blk5Wgg2.js → model-C-60EMcI.js} +1 -1
  139. package/dist/web/assets/{model-Bgh75q3j.js → model-CB4ObIOH.js} +1 -1
  140. package/dist/web/assets/{model--lR9icA_.js → model-CUAxIOXR.js} +1 -1
  141. package/dist/web/assets/{model-jC3F-J2F.js → model-CjQPAeCy.js} +1 -1
  142. package/dist/web/assets/{model-D4DkvMH-.js → model-CwFZ_IgV.js} +1 -1
  143. package/dist/web/assets/{model-CWMP5GOL.js → model-D-vak-m0.js} +1 -1
  144. package/dist/web/assets/{motion-BL3lek9c.js → motion-Cr9JChF9.js} +1 -1
  145. package/dist/web/assets/motion-D5Fs3-ut.js +1 -0
  146. package/dist/web/assets/{motion-preference-D3UMHojT.js → motion-preference-DgdzdVh8.js} +1 -1
  147. package/dist/web/assets/{occupation-catalog-BeJ2O9nm.js → occupation-catalog-DHsjkd_q.js} +1 -1
  148. package/dist/web/assets/{occupation-kits-Bkiu6MzD.js → occupation-kits-BVLLRN4V.js} +1 -1
  149. package/dist/web/assets/{option-Crs2MA88.js → option-DhAwzags.js} +1 -1
  150. package/dist/web/assets/{orchestration-filters-3AfjDoHQ.js → orchestration-filters-lhR2CHlQ.js} +1 -1
  151. package/dist/web/assets/overview-data-QDnygL-x.js +1 -0
  152. package/dist/web/assets/{page-refresh-Bz5r7A_Q.js → page-refresh-BVRlo-dI.js} +1 -1
  153. package/dist/web/assets/{page-title-KYZApNys.js → page-title-ReSXziuS.js} +1 -1
  154. package/dist/web/assets/{person-profile-mhLxWtq7.js → person-profile-BgUfg57K.js} +1 -1
  155. package/dist/web/assets/popover-UYksnAeH.js +1 -0
  156. package/dist/web/assets/popup-host-DMoMkD3v.js +1 -0
  157. package/dist/web/assets/preference-conflicts-a-H51vUw.js +1 -0
  158. package/dist/web/assets/{profile-model-DWutKuCZ.js → profile-model-CM98TJsj.js} +1 -1
  159. package/dist/web/assets/{project-board-layout-CWMHQuUA.js → project-board-layout-RH6UXkCA.js} +1 -1
  160. package/dist/web/assets/{project-capture-CebFSnn0.js → project-capture-DcQ8cXIt.js} +1 -1
  161. package/dist/web/assets/{project-origin-BnUVE0be.js → project-origin-BNzeAazi.js} +1 -1
  162. package/dist/web/assets/{quick-edit-api-YwzoODMc.js → quick-edit-api-COKVNuPk.js} +1 -1
  163. package/dist/web/assets/radio-group-DfegNkLG.js +1 -0
  164. package/dist/web/assets/review-api-CAKGInLD.js +1 -0
  165. package/dist/web/assets/{review-list-_PN7ljSY.js → review-list-CbpXvBp-.js} +1 -1
  166. package/dist/web/assets/{review-store-CobX9No6.js → review-store-BzrmqVoj.js} +1 -1
  167. package/dist/web/assets/{role-names-wD9l8uz5.js → role-names-Ba0c6AbS.js} +1 -1
  168. package/dist/web/assets/{roundtable-live-Dm4Vwo75.js → roundtable-live-CoKmaXKd.js} +1 -1
  169. package/dist/web/assets/{runtime-dom.esm-bundler-DzfwnSj8.js → runtime-dom.esm-bundler-CaYBCU9Y.js} +1 -1
  170. package/dist/web/assets/select-Bq2TQ0Gw.js +1 -0
  171. package/dist/web/assets/{session-launch-offers-C9UkoKUJ.js → session-launch-offers-C-oBkMKe.js} +1 -1
  172. package/dist/web/assets/{settings-autosave-L0zSXnBO.js → settings-autosave-C3bTildI.js} +1 -1
  173. package/dist/web/assets/settings-tabs-DFZcxOaQ.js +1 -0
  174. package/dist/web/assets/shared-report-Ci1jBiYV.js +3 -0
  175. package/dist/web/assets/{source-adapters-r-NIqO77.js → source-adapters-CunVF9JG.js} +1 -1
  176. package/dist/web/assets/switch-DaUSEDq0.js +1 -0
  177. package/dist/web/assets/tabs-B_7xQRfl.js +1 -0
  178. package/dist/web/assets/{task-card-fields-B1z1PmTT.js → task-card-fields-Ce11pWnv.js} +1 -1
  179. package/dist/web/assets/{task-evidence-DydhKn9x.js → task-evidence-D0XkNnb8.js} +1 -1
  180. package/dist/web/assets/{task-labels-DTc5OuFF.js → task-labels-BulIuDQB.js} +1 -1
  181. package/dist/web/assets/{task-reason-CneTZWRv.js → task-reason-gHlp8KHO.js} +1 -1
  182. package/dist/web/assets/{team-sheets-CUt3Vp2s.js → team-sheets-BzV1WjjK.js} +1 -1
  183. package/dist/web/assets/{textarea-DJ0ucCir.js → textarea-D6czUY3a.js} +1 -1
  184. package/dist/web/assets/ui-BCHzwL4X.js +1 -0
  185. package/dist/web/assets/ui-CgwSWg1F.css +1 -0
  186. package/dist/web/assets/{useAgentRecords-CwkwZy8H.js → useAgentRecords-DijrJ79w.js} +1 -1
  187. package/dist/web/assets/{useAgentWorkSummary-DoiCqME7.js → useAgentWorkSummary-CUv88AVP.js} +1 -1
  188. package/dist/web/assets/{useApi-CROJJdhE-CenjhnR5.js → useApi-CROJJdhE-CxqsMZ6P.js} +1 -1
  189. package/dist/web/assets/{useClipboardCopy-Ba86PzjA.js → useClipboardCopy-uGyNKuWB.js} +1 -1
  190. package/dist/web/assets/useDirection-Bi78LycK.js +1 -0
  191. package/dist/web/assets/{useFocusReturn-B0ErBkt_.js → useFocusReturn-7BKdKvqF.js} +1 -1
  192. package/dist/web/assets/{useForwardPropsEmits-D1vvIUcB.js → useForwardPropsEmits-BMeknK03.js} +1 -1
  193. package/dist/web/assets/useForwardScopeId-DHGSyWlZ.js +1 -0
  194. package/dist/web/assets/{useKnowledgeConfirm-781LUhoU.js → useKnowledgeConfirm-mFWI8EbK.js} +1 -1
  195. package/dist/web/assets/{useKnowledgeItemPeek-CnuCvJKQ.js → useKnowledgeItemPeek-DtazLM2s.js} +1 -1
  196. package/dist/web/assets/{useMinimumLoadingDisplay-DCC9EfQ9.js → useMinimumLoadingDisplay-D5UC2KRz.js} +1 -1
  197. package/dist/web/assets/{usePageTools-BaB021q0.js → usePageTools-BXkR_gpB.js} +1 -1
  198. package/dist/web/assets/usePrimitiveElement-BxOn-Fn_.js +1 -0
  199. package/dist/web/assets/{useProjectAgentRoster-M3wbWpS-.js → useProjectAgentRoster-blZ5REnH.js} +1 -1
  200. package/dist/web/assets/{useRoutePeek-CYg5JyYt.js → useRoutePeek-D_j5KVFv.js} +1 -1
  201. package/dist/web/assets/useTeamWork-e57CKhLW.js +1 -0
  202. package/dist/web/assets/{useTypeahead-DYb5kVkH.js → useTypeahead-6a1q-4Oq.js} +1 -1
  203. package/dist/web/assets/{utils-Cli0RsEd.js → utils-BQtZ8ZUw.js} +1 -1
  204. package/dist/web/assets/{utils-B7sUn8rD.js → utils-DBsOpQt4.js} +1 -1
  205. package/dist/web/assets/{verification-DY7kllTI.js → verification-BlF0avgs.js} +1 -1
  206. package/dist/web/assets/{version-CBgUEmnM.js → version-oG6VyAd6.js} +1 -1
  207. package/dist/web/assets/{vue-router-ab7kABlJ.js → vue-router-CCvxNose.js} +1 -1
  208. package/dist/web/index.html +75 -79
  209. package/docs/agent-roundtable.md +45 -3
  210. package/docs/judgment-and-autonomy.md +2 -0
  211. package/graph-provider/fuli_graph/app.py +6 -0
  212. package/graph-provider/fuli_graph/knowledge_duplicates.py +27 -14
  213. package/graph-provider/fuli_graph/knowledge_search.py +31 -32
  214. package/graph-provider/fuli_graph/knowledge_semantic.py +38 -11
  215. package/graph-provider/fuli_graph/knowledge_statement.py +230 -0
  216. package/graph-provider/fuli_graph/knowledge_statement_days.py +109 -0
  217. package/graph-provider/fuli_graph/models.py +15 -0
  218. package/graph-provider/fuli_graph/preference_organizing.py +162 -0
  219. package/graph-provider/fuli_graph/project_agent_routes.py +22 -0
  220. package/graph-provider/fuli_graph/project_agent_task_models.py +26 -2
  221. package/graph-provider/fuli_graph/store_project_agent_task_activity.py +51 -11
  222. package/graph-provider/fuli_graph/store_project_agent_task_blockers.py +13 -6
  223. package/graph-provider/fuli_graph/store_project_agent_task_person_close.py +82 -0
  224. package/graph-provider/fuli_graph/store_project_agent_tasks.py +18 -1
  225. package/graph-provider/fuli_graph/task_blocker.py +10 -0
  226. package/graph-provider/pyproject.toml +1 -1
  227. package/native/win32/fuli-win-helper.exe +0 -0
  228. package/npm-shrinkwrap.json +57 -9
  229. package/package.json +4 -3
  230. package/packages/roundtable/package.json +1 -0
  231. package/packages/roundtable/src/agents/claude-code/wake.js +4 -2
  232. package/packages/roundtable/src/agents/codex/wake.js +1 -0
  233. package/packages/roundtable/src/host.js +4 -1
  234. package/packages/roundtable/src/peer/control-cli.js +103 -2
  235. package/packages/roundtable/src/peer/control.js +29 -3
  236. package/packages/roundtable/src/peer/coordinator-http.js +23 -2
  237. package/packages/roundtable/src/peer/coordinator-service.js +92 -14
  238. package/packages/roundtable/src/peer/coordinator-store.js +2 -1
  239. package/packages/roundtable/src/peer/lan-addresses.js +43 -0
  240. package/packages/roundtable/src/peer/nearby-attempts.js +73 -0
  241. package/packages/roundtable/src/peer/nearby-discovery.js +132 -0
  242. package/packages/roundtable/src/peer/nearby-pairing.js +422 -0
  243. package/packages/roundtable/src/peer/nearby-presence.js +93 -0
  244. package/packages/roundtable/src/peer/node-store.js +10 -0
  245. package/packages/roundtable/src/peer/pairing-share.js +139 -0
  246. package/packages/roundtable/src/peer/peer-runtime.js +684 -89
  247. package/packages/roundtable/src/peer/peer-transport.js +58 -3
  248. package/packages/roundtable/src/peer/protocol.js +24 -1
  249. package/packages/roundtable/src/roundtable/chat-service.js +14 -3
  250. package/packages/roundtable/src/roundtable/chat.js +1 -0
  251. package/packages/roundtable/src/roundtable/delivery-state.js +2 -1
  252. package/packages/roundtable/src/roundtable/group-discussion-store.js +130 -5
  253. package/packages/roundtable/src/roundtable/group-discussion.js +596 -111
  254. package/packages/roundtable/src/roundtable/service.js +10 -2
  255. package/packages/roundtable/src/roundtable/store.js +11 -1
  256. package/packages/roundtable/src/roundtable/wake.js +3 -1
  257. package/packages/roundtable/src/standalone/cli.js +1 -1
  258. package/skills/capturing-session-knowledge/SKILL.md +1 -1
  259. package/skills/capturing-session-knowledge/references/coordination.md +28 -4
  260. package/skills/grilling-project/references/project-profile.md +13 -5
  261. package/skills/operating-fuli/SKILL.md +30 -5
  262. package/skills/operating-fuli/references/workflow-recipes.md +6 -2
  263. package/src/agent-apps/host-tools/catalog.js +2 -0
  264. package/src/agent-delegation/operation-log.js +15 -1
  265. package/src/agent-delegation/port.js +2 -3
  266. package/src/agent-delegation/refusals.js +12 -4
  267. package/src/agent-roundtable/task-context.js +1 -1
  268. package/src/agent-roundtable/tools.js +5 -2
  269. package/src/agent-tools/graph-definitions.js +2 -0
  270. package/src/agent-tools/graph-handlers.js +6 -3
  271. package/src/agent-tools/interface-catalog.js +11 -1
  272. package/src/agent-tools/interface-definitions.js +3 -2
  273. package/src/agent-tools/project-agent-definitions.js +2 -1
  274. package/src/agent-tools/project-organizing-definitions.js +7 -4
  275. package/src/agent-tools/project-space-definitions.js +2 -0
  276. package/src/agent-tools/session-fuli-gate.js +6 -1
  277. package/src/agent-tools/statement-definitions.js +18 -0
  278. package/src/agents/codex/lifecycle-hook.js +3 -1
  279. package/src/agents/identity-receipt.js +3 -1
  280. package/src/agents/native-session-env.js +7 -0
  281. package/src/conversations/entry-budget.js +3 -2
  282. package/src/conversations/entry-inline-budget.js +40 -10
  283. package/src/conversations/preference-lifecycle.js +3 -3
  284. package/src/conversations/turn-findings.js +9 -2
  285. package/src/graphiti/agent-project-resolution.js +18 -0
  286. package/src/graphiti/collaboration-preference-entry.js +5 -2
  287. package/src/graphiti/current-project-knowledge-search.js +3 -3
  288. package/src/graphiti/fla-mention.js +48 -9
  289. package/src/graphiti/local-runtimes.js +5 -0
  290. package/src/graphiti/project-agent-task-sessions.js +49 -0
  291. package/src/graphiti/project-agent-task-summaries.js +82 -0
  292. package/src/graphiti/project-agent-workflows.js +8 -5
  293. package/src/graphiti/project-path-context.js +23 -9
  294. package/src/graphiti/provider-client.js +23 -1
  295. package/src/graphiti/repository-remote.js +34 -8
  296. package/src/graphiti/roundtable-host.js +13 -1
  297. package/src/graphiti/task-context-entry.js +14 -7
  298. package/src/graphiti/task-entry-group-discussion.js +111 -25
  299. package/src/graphiti/task-entry-owner-change.js +22 -2
  300. package/src/graphiti/task-entry-preferences.js +9 -4
  301. package/src/graphiti/task-entry-project-scope.js +19 -0
  302. package/src/graphiti/task-preference-pages.js +3 -3
  303. package/src/graphiti/task-preference-reader.js +44 -9
  304. package/src/graphiti/worker-task-context.js +1 -1
  305. package/src/http/api-router.js +5 -0
  306. package/src/http/graph-api-router.js +5 -2
  307. package/src/http/statement-api-router.js +27 -0
  308. package/src/http/task-blocker-api-router.js +11 -1
  309. package/src/http/task-close-api-router.js +59 -0
  310. package/src/judgment/engine.js +6 -1
  311. package/src/judgment/http.js +2 -2
  312. package/src/judgment/review-delegation.js +16 -4
  313. package/src/judgment/review-egress.js +25 -0
  314. package/src/judgment/service.js +1 -1
  315. package/src/judgment/store.js +9 -0
  316. package/src/knowledge-impressions/store.js +72 -9
  317. package/src/mcp/create-mcp-server.js +2 -2
  318. package/src/mcp/direct-call.js +3 -2
  319. package/src/mcp/preference-delivery.js +64 -6
  320. package/src/mcp/session-id.js +12 -4
  321. package/src/mcp/tool-annotations.js +1 -0
  322. package/src/mcp/tool-result.js +8 -6
  323. package/src/model-backends/config.js +7 -0
  324. package/src/model-backends/egress.js +8 -0
  325. package/src/model-backends/failures.js +8 -0
  326. package/src/model-backends/port.js +39 -16
  327. package/src/model-backends/role-trust.js +3 -9
  328. package/src/model-backends/usage-ledger.js +20 -9
  329. package/src/notices/recent-notices.js +2 -1
  330. package/src/presence/windows-helper-pin.js +1 -1
  331. package/src/project-organizing/agent-tool.js +34 -7
  332. package/src/server.js +7 -0
  333. package/src/statement/agent-tool.js +29 -0
  334. package/src/statement/compounding-statement.js +134 -0
  335. package/src/task-blockers/agent-resume.js +73 -0
  336. package/src/task-blockers/console-port.js +5 -2
  337. package/src/task-blockers/resume-status.js +2 -0
  338. package/src/task-closing/console-port.js +26 -0
  339. package/src/whats-new/lines/0.27.1.json +13 -0
  340. package/src/whats-new/lines/0.27.2.json +13 -0
  341. package/dist/web/assets/AgentAppsPage-CjyvPZSs.js +0 -1
  342. package/dist/web/assets/AgentManagement-Cc00RLSO.css +0 -1
  343. package/dist/web/assets/AgentManagement-MMGrwdD2.js +0 -7
  344. package/dist/web/assets/AgentProfilePage-eDKbJJwY.js +0 -5
  345. package/dist/web/assets/AgentServicesPage-CZwsN5U2.js +0 -1
  346. package/dist/web/assets/Breadcrumb-BXTA4e-W.js +0 -1
  347. package/dist/web/assets/DataFormatPage-CQKkFhcH.js +0 -2
  348. package/dist/web/assets/DebugTurnPage-CUqbuhgX.js +0 -1
  349. package/dist/web/assets/DebugTurnsPage-HwaTG8Fa.js +0 -1
  350. package/dist/web/assets/DialogTitle-HYzAHbGg.js +0 -1
  351. package/dist/web/assets/EmployeeScopeDialog-yUCgujKT.js +0 -1
  352. package/dist/web/assets/EmployeeWorkbench-CbRJhkJO.js +0 -4
  353. package/dist/web/assets/FieldRoot-BLcsuPMA.js +0 -1
  354. package/dist/web/assets/FlasPage-CMv2awKJ.js +0 -1
  355. package/dist/web/assets/HowtoPage-CkGRrKpf.js +0 -1
  356. package/dist/web/assets/InboxPage-DfQvtnyq.js +0 -6
  357. package/dist/web/assets/KnowledgeItemEditPage-BUKQK37o.js +0 -1
  358. package/dist/web/assets/KnowledgeOrganizerPage-CiZ9JlNX.js +0 -1
  359. package/dist/web/assets/KnowledgePage-C3_Cvz4g.js +0 -1
  360. package/dist/web/assets/KnowledgePeek-DtOOiARX.js +0 -1
  361. package/dist/web/assets/KnowledgeTurnReceiptPage-Dne5NQ9q.js +0 -1
  362. package/dist/web/assets/KnowledgeWorkspace-Cq_XYcma.js +0 -4
  363. package/dist/web/assets/MenuSeparator-CLmsZ9rj.js +0 -1
  364. package/dist/web/assets/ModelSettingsPage-COVaW4eh.js +0 -1
  365. package/dist/web/assets/NoticeRow-D5MWTeBY.js +0 -1
  366. package/dist/web/assets/NoticeRow-ktVO_9Es.css +0 -1
  367. package/dist/web/assets/OccupationsPage-BKd051j1.js +0 -1
  368. package/dist/web/assets/OverviewPage-C90G_adj.js +0 -1
  369. package/dist/web/assets/OverviewPage-KVt4LcE-.css +0 -1
  370. package/dist/web/assets/PageColumns-DEideeB7.css +0 -1
  371. package/dist/web/assets/PageColumns-Df60nEzj.js +0 -1
  372. package/dist/web/assets/PersonalProfilePage-DIDgG3NH.js +0 -1
  373. package/dist/web/assets/PersonalProjectsPage-DwhlEpNg.js +0 -1
  374. package/dist/web/assets/PopperContent-DWCMeKSL.js +0 -1
  375. package/dist/web/assets/Presence-Ba3jqPYx.js +0 -3
  376. package/dist/web/assets/ProjectAgentsPage-BefVF9ZP.js +0 -5
  377. package/dist/web/assets/RecentNotices-CDHGIky1.js +0 -1
  378. package/dist/web/assets/RovingFocusGroup-DoGybG5V.js +0 -1
  379. package/dist/web/assets/RovingFocusItem-B455TzUI.js +0 -1
  380. package/dist/web/assets/SessionMigrationPage-BAzXqxxO.js +0 -1
  381. package/dist/web/assets/SettingsPage-7mNL3bwe.js +0 -1
  382. package/dist/web/assets/SettingsPage-Cku8SoLk.css +0 -1
  383. package/dist/web/assets/SharedJefaReportPage-rH6I4cI9.js +0 -1
  384. package/dist/web/assets/TaskBlockerClear-BBmPbomO.css +0 -1
  385. package/dist/web/assets/TaskBlockerClear-BHOMZYwm.js +0 -1
  386. package/dist/web/assets/TaskBlockerNotice-POmS2neR.js +0 -1
  387. package/dist/web/assets/TeamCardsWidget-DIHFUDrF.js +0 -1
  388. package/dist/web/assets/TeamIsland-DdhEcVOZ.js +0 -9
  389. package/dist/web/assets/Teleport-CukHuRhz.js +0 -1
  390. package/dist/web/assets/TonborgDelegationSwitch-BA3Qb8Wr.js +0 -1
  391. package/dist/web/assets/TonborgDelegationSwitch-DeqERWoo.css +0 -1
  392. package/dist/web/assets/UiDialog-bUwGQz96.js +0 -1
  393. package/dist/web/assets/UiIconButton-D3R6WwwI.css +0 -1
  394. package/dist/web/assets/UiIconButton-DlLZ5_Yc.js +0 -1
  395. package/dist/web/assets/UiSegmented-CYrTxDn1.js +0 -1
  396. package/dist/web/assets/WidgetSlot-D6vCSWaz.js +0 -2
  397. package/dist/web/assets/WorkbenchListHead-CR_fDYYr.js +0 -1
  398. package/dist/web/assets/WorkbenchListPage-BX6Z9gkB.css +0 -1
  399. package/dist/web/assets/WorkbenchListPage-Zr5PW-cf.js +0 -1
  400. package/dist/web/assets/_plugin-vue_export-helper-BRS32yXs.js +0 -9
  401. package/dist/web/assets/agent-occupation-CEd3bAhb.js +0 -1
  402. package/dist/web/assets/agent-workflows-D3VeY6Yz.js +0 -1
  403. package/dist/web/assets/checkbox-C67upxzl.js +0 -1
  404. package/dist/web/assets/combobox-yHRJ-zN-.js +0 -1
  405. package/dist/web/assets/conversation-launcher-settings-28CqC1Gn.js +0 -1
  406. package/dist/web/assets/copy-mention-C4Nos381.js +0 -1
  407. package/dist/web/assets/dialog-Cjoy4nsv.js +0 -1
  408. package/dist/web/assets/dropdown-menu-Dto6hjoc.js +0 -1
  409. package/dist/web/assets/hover-card-Bg0dulGq.js +0 -1
  410. package/dist/web/assets/index-B-aRUs9w.js +0 -24
  411. package/dist/web/assets/label-CbrduZla.js +0 -1
  412. package/dist/web/assets/label-table-_YAtPkRI.js +0 -1
  413. package/dist/web/assets/model-DcsCYhXk.js +0 -1
  414. package/dist/web/assets/motion-_MepnmMC.js +0 -1
  415. package/dist/web/assets/overview-data-BIeNATEJ.js +0 -1
  416. package/dist/web/assets/popover-CMahoDLo.js +0 -1
  417. package/dist/web/assets/popup-host-DKN99Od3.js +0 -1
  418. package/dist/web/assets/radio-group-vRt8y8mF.js +0 -1
  419. package/dist/web/assets/review-api-WhNB3ppo.js +0 -1
  420. package/dist/web/assets/select-B9mVptgx.js +0 -1
  421. package/dist/web/assets/settings-tabs-DTbgqX8g.js +0 -1
  422. package/dist/web/assets/shared-report-0FO_y0sa.js +0 -3
  423. package/dist/web/assets/switch-BCzrGc4W.js +0 -1
  424. package/dist/web/assets/tabs-CB38D8N0.js +0 -1
  425. package/dist/web/assets/ui-D4nAhcmu.css +0 -1
  426. package/dist/web/assets/ui-M_UKzb_A.js +0 -1
  427. package/dist/web/assets/useForwardExpose-DJ6fcpI2.js +0 -1
  428. package/dist/web/assets/useForwardScopeId-CoSQtoUU.js +0 -1
  429. package/dist/web/assets/usePrimitiveElement-iRKqOVuY.js +0 -1
  430. package/dist/web/assets/useTeamPeople-CPC62La3.js +0 -1
  431. package/dist/web/assets/useTeamWork-Dql3_qLV.js +0 -1
@@ -1,19 +1,20 @@
1
1
  {
2
2
  "name": "fuli-context",
3
- "version": "0.27.0",
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.0",
9
+ "version": "0.27.2",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@agentclientprotocol/sdk": "1.5.0",
13
- "@hono/node-server": "2.1.5",
13
+ "@hono/node-server": "2.1.8",
14
14
  "@internationalized/date": "3.12.4",
15
15
  "@modelcontextprotocol/sdk": "^1.31.0",
16
16
  "@peculiar/x509": "2.1.0",
17
+ "bonjour-service": "1.4.4",
17
18
  "reflect-metadata": "0.2.2",
18
19
  "smol-toml": "1.9.1",
19
20
  "zod": "^4.6.7"
@@ -552,9 +553,9 @@
552
553
  }
553
554
  },
554
555
  "node_modules/@hono/node-server": {
555
- "version": "2.1.5",
556
- "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.5.tgz",
557
- "integrity": "sha512-MgP/I06GdvsilDspMk/qmRzpk8LOUStP6jFAbSRi40W09DhoyUn+Mj7eyKICPqeYKybOjVFLVIAQzvu1bfIa7Q==",
556
+ "version": "2.1.8",
557
+ "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.8.tgz",
558
+ "integrity": "sha512-jdf7FHh6A1lzjpHHQUgxsg2GeER2vMetnAOfeActzcoli6jamlK+NAwL6Dsr5Fl3BS3tYUQzCdtZjU8Qxv7bEA==",
558
559
  "license": "MIT",
559
560
  "engines": {
560
561
  "node": ">=20"
@@ -704,6 +705,12 @@
704
705
  "@jridgewell/sourcemap-codec": "^1.4.14"
705
706
  }
706
707
  },
708
+ "node_modules/@leichtgewicht/ip-codec": {
709
+ "version": "2.0.5",
710
+ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz",
711
+ "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==",
712
+ "license": "MIT"
713
+ },
707
714
  "node_modules/@modelcontextprotocol/sdk": {
708
715
  "version": "1.32.1",
709
716
  "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.32.1.tgz",
@@ -2908,6 +2915,16 @@
2908
2915
  "url": "https://opencollective.com/express"
2909
2916
  }
2910
2917
  },
2918
+ "node_modules/bonjour-service": {
2919
+ "version": "1.4.4",
2920
+ "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.4.4.tgz",
2921
+ "integrity": "sha512-jCZcVv7eoc4QesRscwEZtSROBen+6LpKAmBIsQYQrsAeVHLyMXWX/t6eIV5KiRZYNUBl8eVqImEEMQ8L5+c/Kw==",
2922
+ "license": "MIT",
2923
+ "dependencies": {
2924
+ "fast-deep-equal": "^3.1.3",
2925
+ "multicast-dns": "^7.2.5"
2926
+ }
2927
+ },
2911
2928
  "node_modules/boolbase": {
2912
2929
  "version": "1.0.0",
2913
2930
  "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
@@ -3698,6 +3715,18 @@
3698
3715
  "node": ">=8"
3699
3716
  }
3700
3717
  },
3718
+ "node_modules/dns-packet": {
3719
+ "version": "5.6.1",
3720
+ "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.1.tgz",
3721
+ "integrity": "sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==",
3722
+ "license": "MIT",
3723
+ "dependencies": {
3724
+ "@leichtgewicht/ip-codec": "^2.0.1"
3725
+ },
3726
+ "engines": {
3727
+ "node": ">=6"
3728
+ }
3729
+ },
3701
3730
  "node_modules/dom-serializer": {
3702
3731
  "version": "2.0.0",
3703
3732
  "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
@@ -4268,9 +4297,9 @@
4268
4297
  "license": "MIT"
4269
4298
  },
4270
4299
  "node_modules/hono": {
4271
- "version": "4.13.13",
4272
- "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.13.tgz",
4273
- "integrity": "sha512-CQ46U0ZkAGmbT/4UxdzzGJpacP2IeKgY4a5/tOI9AABbpOMfK739wfDXmv1usCk+3RkKj1hQy4/fjhiwa2xlrA==",
4300
+ "version": "4.13.18",
4301
+ "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.18.tgz",
4302
+ "integrity": "sha512-H9q/E1XizaWstJxUW881dmLxEj+t/TrGGnyxINkm4+sK0qUwsMtFdo2BWI9Vs3cIS19MU6b6iCijoUoEf4f3DA==",
4274
4303
  "license": "MIT",
4275
4304
  "engines": {
4276
4305
  "node": ">=16.9.0"
@@ -5148,6 +5177,19 @@
5148
5177
  "dev": true,
5149
5178
  "license": "MIT"
5150
5179
  },
5180
+ "node_modules/multicast-dns": {
5181
+ "version": "7.2.5",
5182
+ "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz",
5183
+ "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==",
5184
+ "license": "MIT",
5185
+ "dependencies": {
5186
+ "dns-packet": "^5.2.2",
5187
+ "thunky": "^1.0.2"
5188
+ },
5189
+ "bin": {
5190
+ "multicast-dns": "cli.js"
5191
+ }
5192
+ },
5151
5193
  "node_modules/nanoid": {
5152
5194
  "version": "3.3.20",
5153
5195
  "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz",
@@ -6101,6 +6143,12 @@
6101
6143
  "url": "https://opencollective.com/webpack"
6102
6144
  }
6103
6145
  },
6146
+ "node_modules/thunky": {
6147
+ "version": "1.1.0",
6148
+ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz",
6149
+ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==",
6150
+ "license": "MIT"
6151
+ },
6104
6152
  "node_modules/tinybench": {
6105
6153
  "version": "2.9.0",
6106
6154
  "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fuli-context",
3
- "version": "0.27.0",
3
+ "version": "0.27.2",
4
4
  "description": "Local-first collaboration relationship graph for AI agents.",
5
5
  "type": "module",
6
6
  "files": [
@@ -87,10 +87,11 @@
87
87
  "license": "Apache-2.0",
88
88
  "dependencies": {
89
89
  "@agentclientprotocol/sdk": "1.5.0",
90
- "@hono/node-server": "2.1.5",
90
+ "@hono/node-server": "2.1.8",
91
91
  "@internationalized/date": "3.12.4",
92
92
  "@modelcontextprotocol/sdk": "^1.31.0",
93
93
  "@peculiar/x509": "2.1.0",
94
+ "bonjour-service": "1.4.4",
94
95
  "reflect-metadata": "0.2.2",
95
96
  "smol-toml": "1.9.1",
96
97
  "zod": "^4.6.7"
@@ -133,7 +134,7 @@
133
134
  },
134
135
  "overrides": {
135
136
  "@modelcontextprotocol/sdk": {
136
- "@hono/node-server": "2.1.5"
137
+ "@hono/node-server": "2.1.8"
137
138
  },
138
139
  "brace-expansion": "$brace-expansion",
139
140
  "fast-uri": "3.1.9",
@@ -23,6 +23,7 @@
23
23
  "dependencies": {
24
24
  "@modelcontextprotocol/sdk": "^1.31.0",
25
25
  "@peculiar/x509": "2.1.0",
26
+ "bonjour-service": "1.4.4",
26
27
  "zod": "^4.4.3"
27
28
  },
28
29
  "bin": {
@@ -41,10 +41,12 @@ export const claudeCodeWake = Object.freeze({
41
41
  return null;
42
42
  },
43
43
 
44
- // stream-json ends with one `result` event carrying the final answer.
45
- initialState: () => ({ body: '', completed: true, failed: false }),
44
+ // stream-json ends with one `result` event carrying the final answer. Its
45
+ // `system` `init` event names the model the session runs (rec#129).
46
+ initialState: () => ({ body: '', completed: true, failed: false, model: null }),
46
47
  nativeSessionId: event => event.type === 'system' && event.subtype === 'init' ? event.session_id : null,
47
48
  readEvent(event, state) {
49
+ if (event.type === 'system' && event.subtype === 'init' && typeof event.model === 'string') state.model = event.model;
48
50
  if (event.type !== 'result') return;
49
51
  state.body = event.result ?? '';
50
52
  state.failed ||= Boolean(event.is_error);
@@ -53,6 +53,7 @@ export const codexWake = Object.freeze({
53
53
  },
54
54
 
55
55
  // `codex exec --json` streams items; the last agent message before turn.completed is the answer.
56
+ // No event names the model, so a Codex wake's model stays unknown (rec#129).
56
57
  initialState: () => ({ body: '', completed: false, failed: false }),
57
58
  nativeSessionId: event => event.type === 'thread.started' ? event.thread_id : null,
58
59
  readEvent(event, state) {
@@ -6,7 +6,8 @@
6
6
  // Agent { agentId, employeeNumber?, occupation?, assignments?, personalProjectId?,
7
7
  // profile: { name, displayName?, responsibility?, capabilities?, allowedClients, status } }
8
8
  // Session { client, sessionId, projectId, lastActive }
9
- // Project { projectId, name, temporary, archived }
9
+ // Project { projectId, name, temporary, archived, repositories? } repositories: the normalised
10
+ // addresses of the project's own repositories (host/path), which paired devices compare as digests
10
11
  // Team { lead: { agentId, name, employeeNumber?, responsibility? } | null, people: [same shape] }
11
12
  //
12
13
  // Methods (async unless marked sync)
@@ -36,6 +37,8 @@
36
37
  // remoteOriginAuthority() public keys that verify those origins
37
38
  // recordMemoryUsage(input) optional: { recorded, reason? }
38
39
  // projectFolder(projectId) optional: the project's known folder for fresh sessions
40
+ // folderRepository(path) optional: the normalised origin address of the Git
41
+ // repository holding path, or null (LAN share folder check)
39
42
  // matchWork(query) optional: leads the person's own names for work point to, in
40
43
  // this space: [{ agentId, projectId, project, responsibility?,
41
44
  // matchedTerms? }] (a project name, or an active standing assignment);
@@ -5,9 +5,15 @@ import { shortFingerprint } from './protocol.js';
5
5
  export function peerUsage(command) {
6
6
  return `${command} peer <action> (LAN roundtable Beta; the local service must be running)
7
7
  status
8
+ nearby [on [--name NAME] | off | clear-attempts] list nearby FULI; on: be seen and listen for pairing
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;
11
+ pairing shares the leads of up to 8 projects both computers have (a group of two only)
12
+ cancel cancel the pairing waiting here
8
13
  host --address IP [--port PORT] [--name NAME] turn this computer into the coordinator
9
14
  invite print a one-use pairing invitation (10 minutes)
10
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)
11
17
  share --project ID --clients codex[,claude_code] [--folder DIR] (repeat --project for more; replaces the list)
12
18
  revoke --device FINGERPRINT coordinator only
13
19
  off leave: stop listening, sharing and trusting devices`;
@@ -32,6 +38,27 @@ export async function runPeerControlCommand(args, { baseUrl, command, notRunning
32
38
  };
33
39
  switch (action) {
34
40
  case 'status': return printStatus(await call('GET', '/api/peer'), write);
41
+ case 'nearby': {
42
+ const [toggle] = positional(rest);
43
+ if (toggle === 'on') return printNearby(await call('POST', '/api/peer/nearby', { on: true, name: option(rest, '--name') }), write, command);
44
+ if (toggle === 'off') return printNearby(await call('POST', '/api/peer/nearby', { on: false }), write, command);
45
+ if (toggle === 'clear-attempts') return printNearby(await call('POST', '/api/peer/nearby/attempts/clear', {}), write, command);
46
+ if (toggle) throw new Error(`Unknown nearby action: ${toggle}\n${peerUsage(command)}`);
47
+ return printNearby(await call('GET', '/api/peer'), write, command);
48
+ }
49
+ case 'pair': {
50
+ const [fingerprint] = positional(rest);
51
+ if (!fingerprint) throw new Error(`Pass the fingerprint of a computer from \`${command} peer nearby\`.`);
52
+ return printNearby(await call('POST', '/api/peer/nearby/pair', { fingerprint }), write, command);
53
+ }
54
+ case 'confirm': {
55
+ const code = positional(rest).join('');
56
+ if (!/^\d{6}$/.test(code)) throw new Error('Pass the 6-digit code shown on the other computer.');
57
+ const pairing = (await call('GET', '/api/peer')).nearby?.pairing;
58
+ if (!pairing?.requestId || pairing.state !== 'confirm') throw new Error('No pairing is waiting for confirmation here.');
59
+ return printNearby(await call('POST', '/api/peer/nearby/confirm', { requestId: pairing.requestId, code }), write, command);
60
+ }
61
+ case 'cancel': return printNearby(await call('POST', '/api/peer/nearby/cancel', {}), write, command);
35
62
  case 'host': {
36
63
  const address = option(rest, '--address');
37
64
  if (!address) throw new Error(`Pass --address with one of this computer's LAN addresses (see \`${command} peer status\`).`);
@@ -49,6 +76,8 @@ export async function runPeerControlCommand(args, { baseUrl, command, notRunning
49
76
  const file = option(rest, '--invitation-file');
50
77
  const invitation = option(rest, '--invitation') ?? (file ? readFileSync(file, 'utf8').trim() : null);
51
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);
52
81
  return printStatus(await call('POST', '/api/peer/join', { invitation, name: option(rest, '--name') }), write);
53
82
  }
54
83
  case 'share': {
@@ -79,14 +108,86 @@ function printStatus(status, write) {
79
108
  write(`LAN roundtable (Beta): ${status.role === 'coordinator' ? 'coordinator' : 'paired device'}`);
80
109
  write(`This device: ${status.device.shortFingerprint}`);
81
110
  write(`Coordinator: ${status.coordinator.name} ${status.coordinator.url} (${status.coordinator.shortFingerprint})`);
111
+ const failure = status.coordinator.listenFailure;
112
+ if (failure) write(`Not listening: could not open ${failure.address}:${failure.port} (${failure.code}). Paired devices cannot reach this computer; turn the LAN roundtable off and on again.`);
82
113
  for (const device of status.devices.filter((entry) => !entry.self)) {
83
- write(` device ${device.name} ${device.shortFingerprint} ${device.status}${device.online ? ' online' : ''} ${device.nodeId}`);
114
+ write(` device ${device.name} ${device.shortFingerprint} ${device.status}${device.online ? ' online' : ''} · shared Agents ${device.sharedAgents} · ${device.nodeId}`);
84
115
  }
85
116
  for (const share of status.shares) {
86
- write(` shared project lead: ${share.projectName} · ${share.clients.join(', ')} · ${share.state}${share.workingDirectory ? '' : ' · folder from recent sessions'}`);
117
+ write(` shared project lead: ${share.projectName} · ${share.clients.join(', ')} · ${share.state}${share.reason ? ` (${share.reason})` : ''}${share.workingDirectory ? '' : ' · folder from recent sessions'}`);
118
+ }
119
+ for (const project of status.shareable.filter((entry) => entry.sameProjectOn?.length)) {
120
+ write(` same project on ${project.sameProjectOn.map((device) => device.name).join(', ')}: ${project.projectName} (${project.projectId})${project.knownFolder ? '' : ' · no known folder here, pass --folder'}`);
121
+ }
122
+ printAutoShared(status, write);
123
+ if (status.lastPublish?.error) write(`The coordinator did not get this device's shared list: ${status.lastPublish.error}.`);
124
+ else if (status.lastPublish) write(`Shared list sent to the coordinator: ${status.lastPublish.agents} Agent(s) at ${status.lastPublish.at}`);
125
+ }
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.');
87
143
  }
88
144
  }
89
145
 
146
+ function printNearby(status, write, command) {
147
+ const { nearby } = status;
148
+ const ended = NEARBY_ENDED[nearby.ended?.kind];
149
+ if (ended) write(ended(nearby.ended));
150
+ printAutoShared(status, write);
151
+ if (!nearby.on) {
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).`);
153
+ return;
154
+ }
155
+ write(`Nearby pairing: on until ${nearby.until}, seen as "${nearby.name}"${nearby.reason ? ` (${nearby.reason})` : ''}`);
156
+ const tried = nearby.attempts;
157
+ if (nearby.limited) write(`Too many pairing attempts (${tried.lastWindow} in 10 minutes, ${tried.lastDay} in 24 hours). Wait, or the person on this computer runs \`${command} peer nearby clear-attempts\`.`);
158
+ else if (tried?.lastDay) write(`Pairing attempts: ${tried.lastWindow} in the last 10 minutes, ${tried.lastDay} in 24 hours.`);
159
+ if (!nearby.devices.length) write(' No other FULI seen on this network yet.');
160
+ for (const device of nearby.devices) write(` ${device.name} · ${device.shortFingerprint}${device.paired ? ' · paired' : ''}`);
161
+ const { pairing } = nearby;
162
+ if (!pairing) return;
163
+ const device = `${pairing.device.name} (${pairing.device.shortFingerprint ?? '…'})`;
164
+ if (pairing.direction === 'incoming' && pairing.state === 'connecting') {
165
+ write(`${device} asks to pair with this computer. \`${command} peer cancel\` refuses it.`);
166
+ } else if (pairing.state === 'confirm' || pairing.state === 'finishing') {
167
+ write(`Pairing with ${device}: code ${pairing.code}. ${pairing.coordinator === 'this' ? 'This computer' : 'The other computer'} will coordinate.`);
168
+ write(pairing.confirmedHere
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}`);
171
+ } else write(`Pairing with ${device}: ${pairing.state}${pairing.reason ? ` (${pairing.reason})` : ''}`);
172
+ }
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
+
177
+ // Why nearby pairing turned itself off, or what it last did.
178
+ const NEARBY_ENDED = {
179
+ paired: (ended) => `Paired with ${ended.name}; nearby pairing turned itself off.`,
180
+ timeout: () => 'Nearby pairing turned itself off after 30 minutes.',
181
+ discovery_failed: (ended) => `Nearby discovery could not start: ${ended.reason}. Nearby pairing is off; the rest keeps running.`,
182
+ trust_withdrawn: (ended) => `${ended.name} never connected after pairing, so this computer no longer trusts it.`,
183
+ };
184
+
185
+ // The words before the first --option.
186
+ function positional(args) {
187
+ const first = args.findIndex((value) => value.startsWith('--'));
188
+ return first < 0 ? args : args.slice(0, first);
189
+ }
190
+
90
191
  function option(args, name) {
91
192
  const index = args.indexOf(name);
92
193
  return index >= 0 && index + 1 < args.length ? args[index + 1] : undefined;
@@ -14,19 +14,28 @@ 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) {
21
21
  if (!(error instanceof PeerError)) throw error;
22
- sendJson(response, error.status ?? 400, { error: error.code, message: error.message });
22
+ // A refusal is always an error status, whatever another device answered.
23
+ const status = Number.isInteger(error.status) && error.status >= 400 && error.status < 600 ? error.status : 502;
24
+ sendJson(response, status, { error: error.code, message: error.message });
23
25
  }
24
26
  return true;
25
27
  }
26
28
 
27
- async function route(request, pathname, peer, readJson) {
29
+ async function route(request, url, peer, readJson) {
28
30
  const { method } = request;
31
+ const { pathname } = url;
29
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]));
30
39
  if (pathname === '/api/peer/coordinator' && method === 'POST') {
31
40
  const body = await readJson(request);
32
41
  return peer.enableCoordinator({ host: body.host, port: body.port ?? 0, name: body.name });
@@ -43,5 +52,22 @@ async function route(request, pathname, peer, readJson) {
43
52
  const revoke = /^\/api\/peer\/devices\/([0-9a-f]{64})\/revoke$/.exec(pathname);
44
53
  if (revoke && method === 'POST') { await readJson(request); return peer.revokeDevice(revoke[1]); }
45
54
  if (pathname === '/api/peer/disable' && method === 'POST') { await readJson(request); return peer.disable(); }
55
+ if (pathname === '/api/peer/nearby' && method === 'POST') {
56
+ const body = await readJson(request);
57
+ if (typeof body.on !== 'boolean') throw new PeerError('invalid_nearby', 'Pass on: true or on: false', 422);
58
+ return body.on ? peer.nearbyOn({ name: body.name }) : peer.nearbyOff();
59
+ }
60
+ if (pathname === '/api/peer/nearby/pair' && method === 'POST') return peer.pairNearby({ fingerprint: (await readJson(request)).fingerprint });
61
+ if (pathname === '/api/peer/nearby/confirm' && method === 'POST') {
62
+ const body = await readJson(request);
63
+ return peer.confirmPairing({ requestId: body.requestId, code: body.code });
64
+ }
65
+ if (pathname === '/api/peer/nearby/cancel' && method === 'POST') { await readJson(request); return peer.cancelPairing(); }
66
+ if (pathname === '/api/peer/nearby/attempts/clear' && method === 'POST') { await readJson(request); return peer.clearPairingAttempts(); }
46
67
  return undefined;
47
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
+ }
@@ -8,8 +8,11 @@ const SWEEP_MS = 5_000;
8
8
 
9
9
  // The only network listener of the LAN roundtable. Every route requires a
10
10
  // TLS-verified, currently paired device, except one-use pairing, which accepts
11
- // a not-yet-trusted client certificate and authorizes it by invitation code.
12
- export async function startCoordinatorServer({ service, identity, host, port = 0, claimWaitMs = PEER_LIMITS.claimWaitMs }) {
11
+ // a not-yet-trusted client certificate and authorizes it by invitation code,
12
+ // and nearby pairing (nearby-pairing.js), which trusts nothing until the person
13
+ // on each computer confirmed the same code.
14
+ export async function startCoordinatorServer({ service, identity, host, port = 0, claimWaitMs = PEER_LIMITS.claimWaitMs,
15
+ nearby = null, onReached = () => {} }) {
13
16
  const secureContext = () => ({ ...identity.tlsOptions, ca: service.trustedCertificates() });
14
17
  const server = createServer({
15
18
  ...secureContext(), requestCert: true, rejectUnauthorized: false, minVersion: 'TLSv1.3',
@@ -19,6 +22,8 @@ export async function startCoordinatorServer({ service, identity, host, port = 0
19
22
  { error: error instanceof PeerError ? error.code : 'internal_error', message: error instanceof PeerError ? error.message : 'Request failed' }));
20
23
  });
21
24
  server.keepAliveTimeout = 5_000;
25
+ // The local address each paired device last reached this listener on.
26
+ const reached = new Map();
22
27
 
23
28
  async function handle(request, response) {
24
29
  const { pathname } = new URL(request.url, 'https://peer.invalid');
@@ -31,8 +36,20 @@ export async function startCoordinatorServer({ service, identity, host, port = 0
31
36
  sendJson(response, service.pair({ code: body.code, name: body.name, authority: body.authority, certPem: derToPem(certificate.raw) }));
32
37
  return;
33
38
  }
39
+ // While nearby pairing is off, or on an adapter it does not answer on, these paths answer exactly as any unknown path.
40
+ if (pathname.startsWith('/peer/1/nearby/') && nearby?.listening(plainAddress(request.socket.localAddress))) {
41
+ const { value, after } = await nearby.handle(pathname, body, { certPem: derToPem(certificate.raw),
42
+ fingerprint: sha256Hex(certificate.raw), address: plainAddress(request.socket.remoteAddress),
43
+ localAddress: plainAddress(request.socket.localAddress) });
44
+ // A step that closes this listener (joining the other computer) runs once the answer is out.
45
+ if (after) response.once('finish', after);
46
+ sendJson(response, value);
47
+ return;
48
+ }
34
49
  if (!request.socket.authorized) throw new PeerError('device_not_trusted', 'This device is not paired', 403);
35
50
  const nodeId = service.authenticate(sha256Hex(certificate.raw)).id;
51
+ const reachedAt = plainAddress(request.socket.localAddress);
52
+ if (reached.get(nodeId) !== reachedAt) { reached.set(nodeId, reachedAt); onReached(nodeId, reachedAt); }
36
53
  switch (pathname) {
37
54
  case '/peer/1/directory/publish': return sendJson(response, service.publishDirectory(nodeId, body));
38
55
  case '/peer/1/directory': return sendJson(response, service.directory(nodeId));
@@ -118,6 +135,10 @@ function readBody(request) {
118
135
  });
119
136
  }
120
137
 
138
+ function plainAddress(address) {
139
+ return typeof address === 'string' ? address.replace(/^::ffff:/, '') : null;
140
+ }
141
+
121
142
  function send(response, status, value) {
122
143
  if (response.headersSent) return;
123
144
  const body = JSON.stringify(value);
@@ -5,7 +5,7 @@ import { isAuthorityKey } from './origin-proof.js';
5
5
  import { createCoordinatorChat } from './chat-coordinator.js';
6
6
  import {
7
7
  canonicalJson, encodeInvitation, PEER_LIMITS, PeerError, peerCleanup, pemToDer, publicDirectoryEntry,
8
- RESULT_OUTCOMES, sha256Hex, TERMINAL_STATUSES, validateAssertion,
8
+ graphemePrefix, RESULT_OUTCOMES, sha256Hex, TERMINAL_STATUSES, validateAssertion, withoutControls,
9
9
  } from './protocol.js';
10
10
 
11
11
  const ONLINE_MS = 90_000;
@@ -19,13 +19,23 @@ const ONLINE_MS = 90_000;
19
19
  const LAST_SEEN_WRITE_MS = 15_000;
20
20
  const PAIRING_FAILURE_WINDOW_MS = 10 * 60_000;
21
21
  const PAIRING_FAILURE_LIMIT = 10;
22
+ const REPOSITORY_DIGEST = /^[0-9a-f]{32}$/;
23
+ // A paired device could publish guessed addresses to learn what others have:
24
+ // at most this many digests per device, and its set may change this often a day.
25
+ const REPOSITORY_LIMIT = 50;
26
+ const REPOSITORY_CHANGES_PER_DAY = 3;
27
+ const DAY_MS = 24 * 60 * 60_000;
22
28
 
23
29
  // Routes messages between paired devices. It never executes anything: each
24
30
  // receiving device re-checks its own shares and identity authority.
25
31
  export function createCoordinatorService({ store, identity, authority, name, clock = Date.now,
26
- randomCode = () => randomBytes(32).toString('base64url'), idFactory = randomUUID, onTrustChange = () => {} }) {
32
+ randomCode = () => randomBytes(32).toString('base64url'), idFactory = randomUUID, onTrustChange = () => {}, onRevoked = () => {},
33
+ repositoryChanges = memoryRecord() }) {
27
34
  const iso = (offsetMs = 0) => new Date(clock() + offsetMs).toISOString();
28
35
  const pairingFailures = [];
36
+ const repositories = new Map();
37
+ let repositoryKey = null;
38
+ rotateRepositoryKey();
29
39
  if (!isAuthorityKey(authority)) throw new PeerError('authority_unavailable', 'The coordinator needs its local origin authority', 500);
30
40
  store.upsertNode({ id: identity.fingerprint, name, certPem: identity.certPem, authority, at: iso() });
31
41
  const chat = createCoordinatorChat({ store, identity, clock });
@@ -51,13 +61,28 @@ export function createCoordinatorService({ store, identity, authority, name, clo
51
61
  pairingFailures.push(now);
52
62
  throw new PeerError('invalid_pairing_code', 'This invitation is invalid, expired or already used', 403);
53
63
  }
64
+ return trustDevice({ fingerprint, certPem, name: deviceName, authority: deviceAuthority }, () => {
65
+ if (!store.useInvitation(codeHash, fingerprint, iso())) throw new PeerError('invalid_pairing_code', 'This invitation was already used', 403);
66
+ });
67
+ }
68
+
69
+ // Nearby pairing (nearby-pairing.js) writes the same trust record an
70
+ // invitation does, after the person on each computer confirmed the same code.
71
+ function trustNearbyDevice({ certPem, name: deviceName, authority: deviceAuthority }) {
72
+ const fingerprint = certificateFingerprint(certPem);
73
+ if (fingerprint === identity.fingerprint) throw new PeerError('invalid_pairing', 'A device cannot pair with itself', 400);
74
+ return trustDevice({ fingerprint, certPem, name: deviceName, authority: deviceAuthority });
75
+ }
76
+
77
+ function trustDevice({ fingerprint, certPem, name: deviceName, authority: deviceAuthority }, claimInvitation = () => {}) {
54
78
  if (!isAuthorityKey(deviceAuthority)) throw new PeerError('invalid_pairing', 'The device did not present its origin authority', 400);
55
79
  const label = cleanName(deviceName) || `FULI device ${fingerprint.slice(0, 8)}`;
56
80
  store.transaction(() => {
57
- if (!store.useInvitation(codeHash, fingerprint, iso())) throw new PeerError('invalid_pairing_code', 'This invitation was already used', 403);
81
+ claimInvitation();
58
82
  store.upsertNode({ id: fingerprint, name: label, certPem,
59
83
  authority: { keyId: deviceAuthority.keyId, publicKey: deviceAuthority.publicKey }, at: iso() });
60
84
  });
85
+ repositories.delete(fingerprint);
61
86
  onTrustChange();
62
87
  return { nodeId: fingerprint, coordinatorNodeId: identity.fingerprint, coordinatorName: name };
63
88
  }
@@ -70,20 +95,59 @@ export function createCoordinatorService({ store, identity, authority, name, clo
70
95
  return node;
71
96
  }
72
97
 
73
- function publishDirectory(nodeId, { agents }) {
98
+ function publishDirectory(nodeId, { agents, repositories: projectRepositories }) {
74
99
  if (!Array.isArray(agents) || agents.length > PEER_LIMITS.directoryAgents) throw new PeerError('invalid_directory', 'Invalid shared Agent list');
75
- const entries = agents.map(publicDirectoryEntry);
100
+ const entries = agents.map((agent, index) => {
101
+ try { return publicDirectoryEntry(agent); }
102
+ catch (error) { throw new PeerError(error.code, `${error.message} (entry ${index + 1})`, error.status); }
103
+ });
76
104
  store.setDirectory(nodeId, entries);
77
- return { published: entries.length };
105
+ // Each device's own repository addresses, keyed with a secret only the
106
+ // paired group gets (repositoryKey, from this answer). Like online state
107
+ // they are kept only in memory and published again within a minute; a
108
+ // digest made with an older key is dropped.
109
+ if (projectRepositories?.keyId === repositoryKey.id) acceptRepositories(nodeId, repositoryDigests(projectRepositories.digests));
110
+ return { published: entries.length, repositoryKey };
78
111
  }
79
112
 
113
+ // Another device's digests never leave the coordinator: each device learns
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.
80
117
  function directory(nodeId) {
81
118
  const now = clock();
82
- return { devices: store.nodes().filter((node) => node.status === 'active' && node.id !== nodeId).map((node) => ({
83
- nodeId: node.id, name: node.name,
84
- online: seenWithin(node, now, ONLINE_MS),
85
- agents: JSON.parse(node.directory_json),
86
- })) };
119
+ const mine = new Set(repositories.get(nodeId) ?? []);
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
+ })) };
128
+ }
129
+
130
+ // The same set again is free; a new set counts, and past the daily limit the earlier set stays.
131
+ // The count is kept in the host's store (repositoryChanges), so a restart
132
+ // does not reset it. The first set a device sends under a new key (after a
133
+ // restart or a revoke) is free, so a revoke never locks out the others.
134
+ function acceptRepositories(nodeId, digests) {
135
+ const current = repositories.get(nodeId);
136
+ if (current && current.length === digests.length && digests.every((digest) => current.includes(digest))) return;
137
+ const now = clock();
138
+ const all = repositoryChanges.read() ?? {};
139
+ const record = all[nodeId] ?? {};
140
+ const changes = (Array.isArray(record.at) ? record.at : []).filter((at) => Number.isFinite(at) && at > now - DAY_MS);
141
+ const firstUnderKey = record.keyId !== repositoryKey.id;
142
+ if (!firstUnderKey && changes.length >= REPOSITORY_CHANGES_PER_DAY) return;
143
+ repositoryChanges.write({ ...all, [nodeId]: { keyId: repositoryKey.id, at: firstUnderKey ? changes : [...changes, now] } });
144
+ repositories.set(nodeId, digests);
145
+ }
146
+
147
+ // A revoked device keeps the old key, so the group gets a new one.
148
+ function rotateRepositoryKey() {
149
+ repositoryKey = { id: randomUUID(), key: randomBytes(32).toString('base64url') };
150
+ repositories.clear();
87
151
  }
88
152
 
89
153
  function submit(nodeId, { assertion, signature }) {
@@ -229,7 +293,10 @@ export function createCoordinatorService({ store, identity, authority, name, clo
229
293
  else store.updateMessage(message.id, { cancel_requested: 1 }, iso(), 'cancel_requested', 'device_revoked');
230
294
  }
231
295
  });
296
+ rotateRepositoryKey();
232
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);
233
300
  return { revoked: true };
234
301
  }
235
302
 
@@ -258,12 +325,12 @@ export function createCoordinatorService({ store, identity, authority, name, clo
258
325
  function devices() {
259
326
  const now = clock();
260
327
  return store.nodes().map((node) => ({ nodeId: node.id, name: node.name, status: node.status,
261
- self: node.id === identity.fingerprint, pairedAt: node.paired_at, revokedAt: node.revoked_at,
328
+ self: node.id === identity.fingerprint, pairedAt: node.paired_at, revokedAt: node.revoked_at, lastSeenAt: node.last_seen_at ?? null,
262
329
  online: node.id === identity.fingerprint || seenWithin(node, now, ONLINE_MS),
263
330
  sharedAgents: JSON.parse(node.directory_json).length }));
264
331
  }
265
332
 
266
- return { chat: chat.execute, chatOwner: chat.ownerRead, chatUpdates: chat.ownerUpdates, createInvitation, pair, authenticate, publishDirectory, directory, submit, claim, renew, result,
333
+ return { chat: chat.execute, chatOwner: chat.ownerRead, chatUpdates: chat.ownerUpdates, createInvitation, pair, trustNearbyDevice, authenticate, publishDirectory, directory, submit, claim, renew, result,
267
334
  status, cancel, revoke, sweep, devices, trustedCertificates: () => store.activeCertificates(),
268
335
  openInvitations: () => store.openInvitations(iso()).length };
269
336
  }
@@ -287,6 +354,17 @@ function statusView(message) {
287
354
  ...(message.cleanup_status ? { cleanup: { status: message.cleanup_status, code: message.cleanup_code ?? null } } : {}) };
288
355
  }
289
356
 
357
+ // Only 32-hex digests pass (peer-runtime.js makes them); anything else is dropped, never echoed.
358
+ function repositoryDigests(value) {
359
+ return Array.isArray(value) ? [...new Set(value.filter((digest) => typeof digest === 'string' && REPOSITORY_DIGEST.test(digest)))]
360
+ .slice(0, REPOSITORY_LIMIT) : [];
361
+ }
362
+
363
+ function memoryRecord() {
364
+ let value = {};
365
+ return { read: () => value, write: (next) => { value = next; } };
366
+ }
367
+
290
368
  export function cleanName(value) {
291
- return typeof value === 'string' ? value.replace(/[\u0000-\u001f\u007f]/g, '').trim().slice(0, 60) : '';
369
+ return typeof value === 'string' ? graphemePrefix(withoutControls(value).trim(), 60).trim() : '';
292
370
  }