fuli-context 0.27.2 → 0.27.4

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 (414) hide show
  1. package/dist/web/assets/{AboutPage-Bgcf03U0.js → AboutPage-DJxp-WMU.js} +1 -1
  2. package/dist/web/assets/AboutSectionHeading-BUu85T3-.js +1 -0
  3. package/dist/web/assets/AboutSectionHeading-CaZhhuuu.css +1 -0
  4. package/dist/web/assets/AgentAppsPage-Di4HU1sH.js +1 -0
  5. package/dist/web/assets/AgentAvatar-N7IaseYC.js +1 -0
  6. package/dist/web/assets/AgentAvatar-VUEAsIqM.css +1 -0
  7. package/dist/web/assets/{AgentHand-BwE2VGth.js → AgentHand-BDCERx8p.js} +1 -1
  8. package/dist/web/assets/AgentManagement-CJLZoyuq.js +7 -0
  9. package/dist/web/assets/AgentManagement-Cc00RLSO.css +1 -0
  10. package/dist/web/assets/{AgentMentionCopy-y3JD1Cef.js → AgentMentionCopy-Cpsy2XwV.js} +1 -1
  11. package/dist/web/assets/{AgentName-XrBcHq4R.js → AgentName-B150JTrl.js} +1 -1
  12. package/dist/web/assets/{AgentProfilePage-DE7z980p.js → AgentProfilePage-rckt2qEt.js} +3 -3
  13. package/dist/web/assets/AgentServicesPage-_rY596Cl.js +1 -0
  14. package/dist/web/assets/{AppViewerPage-BaKMk9pp.js → AppViewerPage-Kq3r1mwI.js} +1 -1
  15. package/dist/web/assets/{BackToTop-DITd9y7X.js → BackToTop-Da6u7_d8.js} +1 -1
  16. package/dist/web/assets/{BoardCardFieldsMenu-CWtHiVR-.js → BoardCardFieldsMenu-CyJSO3vT.js} +1 -1
  17. package/dist/web/assets/{BoardMoveMenu-CEDdltY7.js → BoardMoveMenu-B_lUROwH.js} +1 -1
  18. package/dist/web/assets/{Breadcrumb-C98voz9V.js → Breadcrumb-CA0zg3OI.js} +1 -1
  19. package/dist/web/assets/{CaptureChangePage-CE8tJfiQ.js → CaptureChangePage-nnCFkG4H.js} +1 -1
  20. package/dist/web/assets/Collection-CL-ehAUe.js +1 -0
  21. package/dist/web/assets/{CopyFixPrompt-C2hC04lV.js → CopyFixPrompt-Bp3GsUzJ.js} +1 -1
  22. package/dist/web/assets/{DataFormatPage-BjZkck9o.js → DataFormatPage-COPJnuZH.js} +1 -1
  23. package/dist/web/assets/DebugTurnPage-CuREiHr-.js +1 -0
  24. package/dist/web/assets/{DebugTurnsPage-BlDDz1Fk.js → DebugTurnsPage-i2jPDad3.js} +1 -1
  25. package/dist/web/assets/DialogTitle-aiTJ0Qmu.js +1 -0
  26. package/dist/web/assets/{EmployeeRedirectPage-CSSuvAqx.js → EmployeeRedirectPage-DPSjSW-l.js} +1 -1
  27. package/dist/web/assets/EmployeeScopeDialog-Bui2TPpl.js +1 -0
  28. package/dist/web/assets/{EmployeeWorkbench-DvEojWb7.js → EmployeeWorkbench-DAC8kuJP.js} +1 -1
  29. package/dist/web/assets/FieldRoot-B2x8LUg_.js +1 -0
  30. package/dist/web/assets/FlaBlockedTasks-CWa5T5nU.css +1 -0
  31. package/dist/web/assets/FlaBlockedTasks-Ds1c5xaw.js +1 -0
  32. package/dist/web/assets/{FlaGrowth-OdlmgEVi.js → FlaGrowth-CJSExsDl.js} +1 -1
  33. package/dist/web/assets/{FlaOccupationKit-CnouVWnU.js → FlaOccupationKit-yibMGA7g.js} +1 -1
  34. package/dist/web/assets/{FlaTaskSheets-rSIdCtzz.js → FlaTaskSheets-CJSjxa9s.js} +1 -1
  35. package/dist/web/assets/{FlasPage-BZ791caF.js → FlasPage-BvIsNjmr.js} +1 -1
  36. package/dist/web/assets/{GrowthLoading-BYOSvxZY.js → GrowthLoading-Ddj4TqCR.js} +1 -1
  37. package/dist/web/assets/{HowtoPage-DNTwYQCD.css → HowtoPage-DfHVIb8E.css} +1 -1
  38. package/dist/web/assets/HowtoPage-kSC2Tym0.js +1 -0
  39. package/dist/web/assets/{InboxPage-C3cSvJjB.js → InboxPage-Qfx9kB6z.js} +3 -3
  40. package/dist/web/assets/{KnowledgeDeleteButton-yc8Gi-BH.js → KnowledgeDeleteButton-yq2NE_5V.js} +1 -1
  41. package/dist/web/assets/{KnowledgeHardDeleteSection-D9Ktc-uC.js → KnowledgeHardDeleteSection-DYLuMTkw.js} +1 -1
  42. package/dist/web/assets/{KnowledgeItemEditPage-Csy4oOxD.js → KnowledgeItemEditPage-C_6CCT0l.js} +1 -1
  43. package/dist/web/assets/{KnowledgeItemSummaryCard-BH5UYmde.js → KnowledgeItemSummaryCard-DaS6I6IJ.js} +1 -1
  44. package/dist/web/assets/KnowledgeOrganizerPage-C0TW5FWc.js +1 -0
  45. package/dist/web/assets/KnowledgePage-CpU8zlbY.js +1 -0
  46. package/dist/web/assets/KnowledgePeek-C8KO5NBx.js +1 -0
  47. package/dist/web/assets/{KnowledgeTurnReceiptPage-Bd_LIdCc.js → KnowledgeTurnReceiptPage-Bss7rO8X.js} +1 -1
  48. package/dist/web/assets/{KnowledgeWorkspace-Be2gUul5.css → KnowledgeWorkspace-B2YB4aaQ.css} +1 -1
  49. package/dist/web/assets/KnowledgeWorkspace-NBt_5LEZ.js +4 -0
  50. package/dist/web/assets/{MeAvatar-CmhuRFOf.js → MeAvatar-ec_0AfqZ.js} +1 -1
  51. package/dist/web/assets/{MeLink-BesUihiS.js → MeLink-mcOCZh0y.js} +1 -1
  52. package/dist/web/assets/MenuSeparator-BdUe-nrq.js +1 -0
  53. package/dist/web/assets/ModelSettingsPage-DG4g9dZG.js +1 -0
  54. package/dist/web/assets/{NewSessionPanel-Bvp9ElzU.js → NewSessionPanel-Dp9REysi.js} +1 -1
  55. package/dist/web/assets/{NotFoundPage-BrolI2fz.js → NotFoundPage-mQNgXOdV.js} +1 -1
  56. package/dist/web/assets/NoticeRow-CVxAQhy5.js +1 -0
  57. package/dist/web/assets/NoticeRow-ktVO_9Es.css +1 -0
  58. package/dist/web/assets/OccupationsPage-M2bNGjfX.js +1 -0
  59. package/dist/web/assets/{PageOutline-DULpqEwg.js → PageOutline-BIuKlaez.js} +1 -1
  60. package/dist/web/assets/{PageStack-DTzWJuae.js → PageStack-CJdqrH8a.js} +1 -1
  61. package/dist/web/assets/PersonalProfilePage-CbgimIFG.js +1 -0
  62. package/dist/web/assets/PersonalProjectsPage-Dm38FUPv.js +1 -0
  63. package/dist/web/assets/{PinIcon-YYoaYKTx.js → PinIcon-DBS7pHXp.js} +1 -1
  64. package/dist/web/assets/PopperContent-DyZQrl-r.js +1 -0
  65. package/dist/web/assets/Presence-wz-KVyjT.js +3 -0
  66. package/dist/web/assets/{ProfileAuthorChip-BEfiuJbm.js → ProfileAuthorChip-DAY42zZ8.js} +1 -1
  67. package/dist/web/assets/ProjectAgentsPage-BKWGB-4t.js +5 -0
  68. package/dist/web/assets/{ProjectJudgmentPolicy-CCzHtmOb.js → ProjectJudgmentPolicy-D1UHlAih.js} +1 -1
  69. package/dist/web/assets/RequesterModeSelect-BpaRF_th.js +1 -0
  70. package/dist/web/assets/RequesterModeSelect-DH1PGLmn.css +1 -0
  71. package/dist/web/assets/RoundtablesPage-9mlvO7FV.js +13 -0
  72. package/dist/web/assets/{RoundtablesPage-DL-IOngN.css → RoundtablesPage-Cdbl7Tbx.css} +1 -1
  73. package/dist/web/assets/RovingFocusGroup-CHDkM3pP.js +1 -0
  74. package/dist/web/assets/RovingFocusItem-H6anRCEm.js +1 -0
  75. package/dist/web/assets/{SessionMigrationPage-DrK4df0L.js → SessionMigrationPage-DZfyUaJe.js} +1 -1
  76. package/dist/web/assets/{SessionRecordsPage-CFAgM65g.js → SessionRecordsPage-CK6iztwv.js} +1 -1
  77. package/dist/web/assets/SettingsPage-CVM1Gw0D.js +1 -0
  78. package/dist/web/assets/SettingsPage-DqZGF8J1.css +1 -0
  79. package/dist/web/assets/{SharedJefaReportPage-DbTPYwa_.js → SharedJefaReportPage-cfEk0Tzn.js} +1 -1
  80. package/dist/web/assets/{StatementCalendarPage-CIo5R14R.js → StatementCalendarPage-OmZa4AdL.js} +1 -1
  81. package/dist/web/assets/{StatementRows-CubaC9KG.js → StatementRows-Cdv1wlMo.js} +1 -1
  82. package/dist/web/assets/{TagVocabularyPage-BVlLmKv2.js → TagVocabularyPage-C9pRT-Co.js} +1 -1
  83. package/dist/web/assets/TaskBlockerClear-BBmPbomO.css +1 -0
  84. package/dist/web/assets/TaskBlockerClear-BGpJYYbz.js +1 -0
  85. package/dist/web/assets/TaskBlockerNotice-BtOREiqc.js +1 -0
  86. package/dist/web/assets/{TaskReason-CrLPeiOg.js → TaskReason-Dys3TUp_.js} +1 -1
  87. package/dist/web/assets/{TeamCard-SBMJMd7P.js → TeamCard-D7FU45G4.js} +1 -1
  88. package/dist/web/assets/{TeamCardsWidget-CGLW04TH.js → TeamCardsWidget-hYsXSXcW.js} +1 -1
  89. package/dist/web/assets/TeamIsland-Bw875ekj.js +9 -0
  90. package/dist/web/assets/Teleport-DcReQWaw.js +1 -0
  91. package/dist/web/assets/{TextField-Cd8UOHKv.js → TextField-BO5vPcVo.js} +1 -1
  92. package/dist/web/assets/TodayPage-D9HV_tMn.js +1 -0
  93. package/dist/web/assets/TodayPage-uBkMchn5.css +1 -0
  94. package/dist/web/assets/{TonborgDelegationSwitch-BOidSjkk.js → TonborgDelegationSwitch-TCl6Nu4Q.js} +1 -1
  95. package/dist/web/assets/{UiChip-B2z0UERX.js → UiChip-BDaNYy7i.js} +1 -1
  96. package/dist/web/assets/UiDialog-CkrPgXkI.js +1 -0
  97. package/dist/web/assets/{UiDisclosure-Bw4Wu0Dm.js → UiDisclosure-DHBkq9rj.js} +1 -1
  98. package/dist/web/assets/{UiIcon-BuaIQ57Z.js → UiIcon-BBBPl7ce.js} +1 -1
  99. package/dist/web/assets/UiSegmented-EzA-Ehx4.js +1 -0
  100. package/dist/web/assets/{UiWeight-DpBexUUy.js → UiWeight-EHzBhu5a.js} +1 -1
  101. package/dist/web/assets/{VirtualDirectoryList-RV2XtTPO.js → VirtualDirectoryList-BJrM_eeP.js} +1 -1
  102. package/dist/web/assets/VisitRequestDialog-ISewTzM3.css +1 -0
  103. package/dist/web/assets/VisitRequestDialog-jbgJBF2e.js +1 -0
  104. package/dist/web/assets/VisitRequestsPage-Bkxxiaxy.js +1 -0
  105. package/dist/web/assets/VisitRequestsPage-DfIzoLBx.css +1 -0
  106. package/dist/web/assets/{VisuallyHidden-DciDIEua.js → VisuallyHidden-CgxInDXj.js} +1 -1
  107. package/dist/web/assets/VisuallyHiddenInput-CaWSS7uB.js +1 -0
  108. package/dist/web/assets/WidgetSlot-DENSHLjb.js +2 -0
  109. package/dist/web/assets/WorkbenchListPage-J-UpUosh.js +1 -0
  110. package/dist/web/assets/_plugin-vue_export-helper-B0wc-mt_.js +9 -0
  111. package/dist/web/assets/{agent-apps-B_0syRPr.js → agent-apps-BNje45bS.js} +1 -1
  112. package/dist/web/assets/agent-occupation-aAG5t3l1.js +1 -0
  113. package/dist/web/assets/{agent-pins-B9wMvxGh.js → agent-pins-BCrkTGGW.js} +1 -1
  114. package/dist/web/assets/{agent-roster-records-CY0aSUNq.js → agent-roster-records-BFUsBcZY.js} +1 -1
  115. package/dist/web/assets/{agent-work-summary-Cs8jPFL0.js → agent-work-summary-B_VLOm6o.js} +1 -1
  116. package/dist/web/assets/{attach-closest-edge-BRDsvYPn.js → attach-closest-edge-BPnS_9Lk.js} +1 -1
  117. package/dist/web/assets/{attention-store-HMiJ1K6M.js → attention-store-qIzsiW3O.js} +1 -1
  118. package/dist/web/assets/{badge-jafr8Jg1.js → badge-CtWdRMi-.js} +1 -1
  119. package/dist/web/assets/{button-d6TCVE0s.js → button-_gyKncGb.js} +1 -1
  120. package/dist/web/assets/{card-ebnaJXQA.js → card-BYD6uklY.js} +1 -1
  121. package/dist/web/assets/{catalog-CvdvPGYk.js → catalog-PjA5J9yg.js} +1 -1
  122. package/dist/web/assets/checkbox-5re4FS0U.js +1 -0
  123. package/dist/web/assets/{client--hZxcKYo.js → client-LxAXnO12.js} +1 -1
  124. package/dist/web/assets/{client-links-store-XyR0EzJi.js → client-links-store-CYdBPEgD.js} +1 -1
  125. package/dist/web/assets/combobox-BPUtDA5_.js +1 -0
  126. package/dist/web/assets/{console-D597wx3f.js → console-D45-ZZfX.js} +1 -1
  127. package/dist/web/assets/{conversation-launcher-settings-CFFH9C2y.js → conversation-launcher-settings-BS2bz1uR.js} +1 -1
  128. package/dist/web/assets/copy-mention-D0xSzmH6.js +1 -0
  129. package/dist/web/assets/dialog-xaUosJps.js +1 -0
  130. package/dist/web/assets/{dist-B78L06NL.js → dist-C0lQzDOh.js} +1 -1
  131. package/dist/web/assets/{dist-Dy5JoHWF.js → dist-C1Hez3C6.js} +1 -1
  132. package/dist/web/assets/dropdown-menu-8tDY2fah.js +1 -0
  133. package/dist/web/assets/{field-DeguT8it.js → field-B9eFY0rX.js} +1 -1
  134. package/dist/web/assets/{format-bytes-Br4RwHnA.js → format-bytes-DHztF0Wp.js} +1 -1
  135. package/dist/web/assets/hover-card-CCcSIBsB.js +1 -0
  136. package/dist/web/assets/{identity-V8oA_IuB.js → identity-CW-Srg08.js} +1 -1
  137. package/dist/web/assets/index-CpxVWv-F.js +24 -0
  138. package/dist/web/assets/{input-CRCpCN_c.js → input-BiH7RC9P.js} +1 -1
  139. package/dist/web/assets/label-BdftnoQ0.js +1 -0
  140. package/dist/web/assets/label-table-CLQKbitJ.js +1 -0
  141. package/dist/web/assets/{model-BwOv-HBS.js → model-C7tDPa_1.js} +1 -1
  142. package/dist/web/assets/{model-CB4ObIOH.js → model-Cg5zXaMF.js} +1 -1
  143. package/dist/web/assets/{model-CwFZ_IgV.js → model-DDyIT1eK.js} +1 -1
  144. package/dist/web/assets/{model-CjQPAeCy.js → model-DMd25lv5.js} +1 -1
  145. package/dist/web/assets/{model-C-60EMcI.js → model-DXpi8vqS.js} +1 -1
  146. package/dist/web/assets/{model-D-vak-m0.js → model-DaJv8e-8.js} +1 -1
  147. package/dist/web/assets/{model-B4AuKvPj.js → model-Q1SCdf0F.js} +1 -1
  148. package/dist/web/assets/{model-CUAxIOXR.js → model-qBLcWPQW.js} +1 -1
  149. package/dist/web/assets/{motion-D5Fs3-ut.js → motion-4AmdlpVT.js} +1 -1
  150. package/dist/web/assets/{motion-Cr9JChF9.js → motion-D-GVIJyc.js} +1 -1
  151. package/dist/web/assets/{motion-preference-DgdzdVh8.js → motion-preference-CXHE1-Z7.js} +1 -1
  152. package/dist/web/assets/{occupation-catalog-DHsjkd_q.js → occupation-catalog-CsWai-cw.js} +1 -1
  153. package/dist/web/assets/{occupation-kits-BVLLRN4V.js → occupation-kits-CZQzDPeY.js} +1 -1
  154. package/dist/web/assets/{option-DhAwzags.js → option-B_OFUmRs.js} +1 -1
  155. package/dist/web/assets/{orchestration-filters-lhR2CHlQ.js → orchestration-filters-DqAPmniI.js} +1 -1
  156. package/dist/web/assets/{overview-data-QDnygL-x.js → overview-data-BbAd5G_f.js} +1 -1
  157. package/dist/web/assets/{page-refresh-BVRlo-dI.js → page-refresh-abwcdMEQ.js} +1 -1
  158. package/dist/web/assets/{page-title-ReSXziuS.js → page-title-cvuGZaZo.js} +1 -1
  159. package/dist/web/assets/{person-profile-BgUfg57K.js → person-profile-C8eoODdy.js} +1 -1
  160. package/dist/web/assets/popover-h4zQ7MDI.js +1 -0
  161. package/dist/web/assets/popup-host-8S4Sf9UR.js +1 -0
  162. package/dist/web/assets/{preference-conflicts-a-H51vUw.js → preference-conflicts-Cu00Gk8W.js} +1 -1
  163. package/dist/web/assets/{profile-model-CM98TJsj.js → profile-model-BZIzIQTS.js} +1 -1
  164. package/dist/web/assets/{project-board-layout-RH6UXkCA.js → project-board-layout-DxdyuEpb.js} +1 -1
  165. package/dist/web/assets/{project-capture-DcQ8cXIt.js → project-capture-BQ0ryWdP.js} +1 -1
  166. package/dist/web/assets/{project-origin-BNzeAazi.js → project-origin-CdqHLvij.js} +1 -1
  167. package/dist/web/assets/{quick-edit-api-COKVNuPk.js → quick-edit-api-sf5vVWXR.js} +1 -1
  168. package/dist/web/assets/radio-group-BdWVlNgf.js +1 -0
  169. package/dist/web/assets/{review-api-CAKGInLD.js → review-api-Cbrwrt6C.js} +1 -1
  170. package/dist/web/assets/{review-list-CbpXvBp-.js → review-list-D18L_t-q.js} +1 -1
  171. package/dist/web/assets/{review-store-BzrmqVoj.js → review-store-1jNUbNaJ.js} +1 -1
  172. package/dist/web/assets/{role-names-Ba0c6AbS.js → role-names-CiUKQtV9.js} +1 -1
  173. package/dist/web/assets/{roundtable-live-CoKmaXKd.js → roundtable-live-BzB34cUe.js} +1 -1
  174. package/dist/web/assets/{runtime-dom.esm-bundler-CaYBCU9Y.js → runtime-dom.esm-bundler-BwoD95K8.js} +1 -1
  175. package/dist/web/assets/select-D9sqPsDx.js +1 -0
  176. package/dist/web/assets/{session-launch-offers-C-oBkMKe.js → session-launch-offers-BOZp9NmT.js} +1 -1
  177. package/dist/web/assets/{settings-autosave-C3bTildI.js → settings-autosave-F9mwjeN-.js} +1 -1
  178. package/dist/web/assets/{settings-tabs-C9VDs91j.css → settings-tabs-D8608YHW.css} +1 -1
  179. package/dist/web/assets/settings-tabs-dWS8xFQR.js +1 -0
  180. package/dist/web/assets/shared-report-BmpdFBj3.js +3 -0
  181. package/dist/web/assets/{source-adapters-CunVF9JG.js → source-adapters-CZGvDHoP.js} +1 -1
  182. package/dist/web/assets/switch-BFhMPFpu.js +1 -0
  183. package/dist/web/assets/tabs-B6N6pM8p.js +1 -0
  184. package/dist/web/assets/{task-card-fields-Ce11pWnv.js → task-card-fields-G9NoV8iz.js} +1 -1
  185. package/dist/web/assets/{task-labels-BulIuDQB.js → task-labels-Y0y3oeAL.js} +1 -1
  186. package/dist/web/assets/{task-reason-gHlp8KHO.js → task-reason-D84kviwH.js} +1 -1
  187. package/dist/web/assets/{team-sheets-BzV1WjjK.js → team-sheets-DtMFWcPH.js} +1 -1
  188. package/dist/web/assets/{textarea-D6czUY3a.js → textarea-8EWEgEpw.js} +1 -1
  189. package/dist/web/assets/ui-BxmkvkMK.js +1 -0
  190. package/dist/web/assets/{useAgentRecords-DijrJ79w.js → useAgentRecords-D5CXJVEf.js} +1 -1
  191. package/dist/web/assets/{useAgentWorkSummary-CUv88AVP.js → useAgentWorkSummary-D1Ep9uAl.js} +1 -1
  192. package/dist/web/assets/{useApi-CROJJdhE-CxqsMZ6P.js → useApi-CROJJdhE-Cb6lwzpM.js} +1 -1
  193. package/dist/web/assets/{useClipboardCopy-uGyNKuWB.js → useClipboardCopy-C3PFlW0X.js} +1 -1
  194. package/dist/web/assets/{useFocusReturn-7BKdKvqF.js → useFocusReturn-B73WeAHQ.js} +1 -1
  195. package/dist/web/assets/useFormControl-DwHlZ4bV.js +1 -0
  196. package/dist/web/assets/useForwardExpose-4rpHye8H.js +1 -0
  197. package/dist/web/assets/{useForwardPropsEmits-BMeknK03.js → useForwardPropsEmits-DX7VZylm.js} +1 -1
  198. package/dist/web/assets/useForwardScopeId-BJDKoqyi.js +1 -0
  199. package/dist/web/assets/{useKnowledgeConfirm-mFWI8EbK.js → useKnowledgeConfirm-yhZ8Iqzc.js} +1 -1
  200. package/dist/web/assets/{useKnowledgeItemPeek-DtazLM2s.js → useKnowledgeItemPeek-D-zThKj5.js} +1 -1
  201. package/dist/web/assets/useListPages-BNB3C09x.js +1 -0
  202. package/dist/web/assets/{useMinimumLoadingDisplay-D5UC2KRz.js → useMinimumLoadingDisplay-DzHl6chR.js} +1 -1
  203. package/dist/web/assets/useNow-ChD63hSg.js +1 -0
  204. package/dist/web/assets/{usePageTools-BXkR_gpB.js → usePageTools-D3N7UX5-.js} +1 -1
  205. package/dist/web/assets/usePrimitiveElement-CdgGZRug.js +1 -0
  206. package/dist/web/assets/{useProjectAgentRoster-blZ5REnH.js → useProjectAgentRoster-BhjNHid8.js} +1 -1
  207. package/dist/web/assets/{useRoutePeek-D_j5KVFv.js → useRoutePeek-C2k0liTX.js} +1 -1
  208. package/dist/web/assets/{useTeamWork-e57CKhLW.js → useTeamWork-Bo2hjiA1.js} +1 -1
  209. package/dist/web/assets/{useTypeahead-6a1q-4Oq.js → useTypeahead-DTOx7gNa.js} +1 -1
  210. package/dist/web/assets/{utils-DBsOpQt4.js → utils-DXRJ1hJ4.js} +1 -1
  211. package/dist/web/assets/utils-DeBPoCtM.js +1 -0
  212. package/dist/web/assets/{verification-BlF0avgs.js → verification-DRKJF06P.js} +1 -1
  213. package/dist/web/assets/{version-oG6VyAd6.js → version-B2XiHNBv.js} +1 -1
  214. package/dist/web/assets/{vue-router-CCvxNose.js → vue-router-CbcwRkrV.js} +1 -1
  215. package/dist/web/assets/{NoticeRow-DD-J76Yo.css → workbench-card-Dt0820yW.css} +1 -1
  216. package/dist/web/index.html +77 -74
  217. package/docs/agent-roundtable.md +214 -3
  218. package/graph-provider/fuli_graph/graph_field_contract.py +2 -0
  219. package/graph-provider/fuli_graph/graph_format_migrations.py +5 -0
  220. package/graph-provider/fuli_graph/knowledge_search.py +84 -7
  221. package/graph-provider/fuli_graph/knowledge_sensitivity.py +105 -0
  222. package/graph-provider/fuli_graph/knowledge_source_delete_copies.py +36 -0
  223. package/graph-provider/fuli_graph/models.py +25 -0
  224. package/graph-provider/fuli_graph/project_agent_remote_origins.py +27 -13
  225. package/graph-provider/pyproject.toml +1 -1
  226. package/native/win32/fuli-win-helper.exe +0 -0
  227. package/npm-shrinkwrap.json +2 -2
  228. package/package.json +1 -1
  229. package/packages/roundtable/src/agents/claude-code/constrained-run.js +58 -0
  230. package/packages/roundtable/src/agents/claude-code/wake.js +32 -12
  231. package/packages/roundtable/src/agents/codex/wake.js +25 -7
  232. package/packages/roundtable/src/agents/wake-usage.js +14 -0
  233. package/packages/roundtable/src/host.js +33 -0
  234. package/packages/roundtable/src/peer/control-cli.js +5 -1
  235. package/packages/roundtable/src/peer/control.js +10 -3
  236. package/packages/roundtable/src/peer/coordinator-service.js +30 -13
  237. package/packages/roundtable/src/peer/coordinator-store.js +11 -4
  238. package/packages/roundtable/src/peer/lan-addresses.js +8 -2
  239. package/packages/roundtable/src/peer/nearby-pairing.js +13 -1
  240. package/packages/roundtable/src/peer/origin-proof.js +17 -2
  241. package/packages/roundtable/src/peer/peer-port.js +45 -7
  242. package/packages/roundtable/src/peer/peer-runtime.js +40 -6
  243. package/packages/roundtable/src/peer/protocol.js +89 -2
  244. package/packages/roundtable/src/peer/query-answer.js +110 -0
  245. package/packages/roundtable/src/peer/runner.js +108 -13
  246. package/packages/roundtable/src/roundtable/constrained-run.js +48 -0
  247. package/packages/roundtable/src/roundtable/group-discussion.js +1 -1
  248. package/packages/roundtable/src/roundtable/service.js +120 -21
  249. package/packages/roundtable/src/roundtable/store.js +14 -0
  250. package/packages/roundtable/src/roundtable/wake-attempt-store.js +41 -0
  251. package/packages/roundtable/src/roundtable/wake-claim-release.js +20 -12
  252. package/packages/roundtable/src/roundtable/wake-failure.js +81 -0
  253. package/packages/roundtable/src/roundtable/wake-ladder.js +5 -0
  254. package/packages/roundtable/src/roundtable/wake.js +69 -24
  255. package/packages/roundtable/src/standalone/host.js +5 -2
  256. package/skills/capturing-session-knowledge/references/coordination.md +19 -0
  257. package/skills/operating-fuli/SKILL.md +12 -3
  258. package/skills/operating-fuli/references/workflow-recipes.md +7 -3
  259. package/src/agent-apps/host-tools/catalog.js +1 -0
  260. package/src/agent-kits/fuli-mcp-entry.js +25 -0
  261. package/src/agent-peer/http.js +15 -1
  262. package/src/agent-roundtable/tools.js +11 -0
  263. package/src/agent-tools/interface-catalog.js +21 -6
  264. package/src/agent-tools/statement-definitions.js +3 -1
  265. package/src/agents/claude-code/hook-contract.js +29 -0
  266. package/src/agents/claude-code/lifecycle-event.js +337 -0
  267. package/src/agents/claude-code/lifecycle-hook.js +10 -296
  268. package/src/agents/codex/hook-contract.js +31 -0
  269. package/src/agents/codex/lifecycle-event.js +350 -0
  270. package/src/agents/codex/lifecycle-hook.js +10 -326
  271. package/src/agents/lifecycle-events.js +75 -0
  272. package/src/agents/lifecycle-failure.js +3 -2
  273. package/src/agents/lifecycle-forwarder.js +268 -0
  274. package/src/agents/lifecycle-hook-calls.js +93 -0
  275. package/src/agents/source-applications.js +8 -0
  276. package/src/agents/token-usage-resolver.js +10 -0
  277. package/src/data-format/data-newer-than-package.js +65 -0
  278. package/src/data-format/local-stores.js +4 -1
  279. package/src/desktop/failed-update-recovery.js +80 -0
  280. package/src/desktop/macos-app-update.js +86 -22
  281. package/src/desktop/windows-controller.js +17 -4
  282. package/src/desktop/windows-installation-context.js +26 -1
  283. package/src/desktop/windows-installation-switch.js +83 -21
  284. package/src/desktop/windows-rollback.js +4 -4
  285. package/src/desktop/windows-tray-update.js +1 -1
  286. package/src/desktop/windows-update-command.js +4 -1
  287. package/src/desktop/windows-update.js +4 -4
  288. package/src/diagnostics/failure-records.js +18 -2
  289. package/src/diagnostics/query.js +2 -2
  290. package/src/diagnostics/safe-event.js +38 -12
  291. package/src/external-knowledge/safe-diagnostic.js +2 -5
  292. package/src/graphiti/federated-application.js +2 -1
  293. package/src/graphiti/local-runtimes.js +25 -1
  294. package/src/graphiti/project-agent-task-sessions.js +1 -8
  295. package/src/graphiti/roundtable-host.js +62 -0
  296. package/src/graphiti/runtime-config.js +3 -1
  297. package/src/graphiti/task-context-entry.js +6 -3
  298. package/src/guest-access/failed-bearer-limit.js +31 -0
  299. package/src/guest-access/guest-card.js +22 -0
  300. package/src/guest-access/guest-mcp.js +34 -0
  301. package/src/guest-access/guest-routes.js +144 -0
  302. package/src/guest-access/listener.js +152 -0
  303. package/src/guest-access/refusal-tally.js +37 -0
  304. package/src/guest-access/runtime.js +117 -0
  305. package/src/http/api-router.js +10 -1
  306. package/src/http/guest-links-api-router.js +42 -0
  307. package/src/http/lifecycle-hooks-api-router.js +128 -0
  308. package/src/http/response.js +7 -6
  309. package/src/http/statement-api-router.js +10 -3
  310. package/src/http/visitor-access-api-router.js +51 -0
  311. package/src/judgment/routing.js +6 -1
  312. package/src/knowledge-impressions/store.js +30 -6
  313. package/src/local-runtime/console-autostart-record.js +10 -0
  314. package/src/local-runtime/console-health.js +7 -2
  315. package/src/local-runtime/lifecycle.js +2 -3
  316. package/src/mcp/create-mcp-server.js +2 -0
  317. package/src/mcp/http-session-transport.js +384 -0
  318. package/src/mcp/remote-http-server.js +27 -357
  319. package/src/mcp/session-id.js +1 -1
  320. package/src/mcp/tool-annotations.js +3 -1
  321. package/src/native-runtime/runtime.js +28 -3
  322. package/src/native-runtime/windows-processes.js +6 -6
  323. package/src/presence/windows-helper-pin.js +1 -1
  324. package/src/server/lan-access.js +43 -9
  325. package/src/server.js +31 -2
  326. package/src/setup/graph-runtime.js +10 -6
  327. package/src/statement/agent-tool.js +16 -8
  328. package/src/statement/compounding-statement.js +55 -0
  329. package/src/system/doctor.js +1 -1
  330. package/src/system/fuli-process-scan.js +81 -0
  331. package/src/system/system-service.js +2 -2
  332. package/src/text/control-characters.js +9 -0
  333. package/src/text/local-paths.js +98 -0
  334. package/src/text/shareable-text.js +23 -0
  335. package/src/visit-requests/auto-envelope.js +101 -0
  336. package/src/visit-requests/git-names.js +10 -0
  337. package/src/visit-requests/http.js +105 -0
  338. package/src/visit-requests/peer-entry.js +18 -0
  339. package/src/visit-requests/records.js +140 -0
  340. package/src/visit-requests/runner.js +164 -0
  341. package/src/visit-requests/service.js +575 -0
  342. package/src/visit-requests/worktree.js +351 -0
  343. package/src/visitor-access/guest-links.js +75 -0
  344. package/src/visitor-access/port.js +269 -0
  345. package/src/visitor-access/rate-limit.js +49 -0
  346. package/src/visitor-access/shared-project-search.js +129 -0
  347. package/src/visitor-access/store.js +313 -0
  348. package/src/whats-new/lines/0.27.3.json +13 -0
  349. package/src/whats-new/lines/0.27.4.json +13 -0
  350. package/dist/web/assets/AboutSectionHeading-BaQBY_Xs.js +0 -1
  351. package/dist/web/assets/AboutSectionHeading-DjXpIV27.css +0 -1
  352. package/dist/web/assets/AgentAppsPage-DNuujLT2.js +0 -1
  353. package/dist/web/assets/AgentAvatar-DGXedNUs.js +0 -1
  354. package/dist/web/assets/AgentAvatar-DbsG1_BY.css +0 -1
  355. package/dist/web/assets/AgentManagement-2r8DUS1N.js +0 -7
  356. package/dist/web/assets/AgentManagement-hRkMpjvY.css +0 -1
  357. package/dist/web/assets/AgentServicesPage-CWfGSxcb.js +0 -1
  358. package/dist/web/assets/DebugTurnPage-B82geu1y.js +0 -1
  359. package/dist/web/assets/DialogTitle-fpANsAcy.js +0 -1
  360. package/dist/web/assets/EmployeeScopeDialog-BoEMQOEj.js +0 -1
  361. package/dist/web/assets/FieldRoot-D3lnRut5.js +0 -1
  362. package/dist/web/assets/HowtoPage-lYwzi4Vm.js +0 -1
  363. package/dist/web/assets/KnowledgeOrganizerPage-BTeQX0gH.js +0 -1
  364. package/dist/web/assets/KnowledgePage-BuukvNxz.js +0 -1
  365. package/dist/web/assets/KnowledgePeek-D0pcU7U5.js +0 -1
  366. package/dist/web/assets/KnowledgeWorkspace-Dr-zYpDQ.js +0 -4
  367. package/dist/web/assets/MenuSeparator-BGo0DgyF.js +0 -1
  368. package/dist/web/assets/ModelSettingsPage-CBPwuIBM.js +0 -1
  369. package/dist/web/assets/NoticeRow-Q9QT5NqB.js +0 -1
  370. package/dist/web/assets/OccupationsPage-CZCeeihl.js +0 -1
  371. package/dist/web/assets/PersonalProfilePage-DbXWycCQ.js +0 -1
  372. package/dist/web/assets/PersonalProjectsPage-pdAJpnZd.js +0 -1
  373. package/dist/web/assets/PopperContent-CnNwFMIA.js +0 -1
  374. package/dist/web/assets/Presence-CuIoA2sH.js +0 -3
  375. package/dist/web/assets/ProjectAgentsPage-BPf2RLsw.js +0 -5
  376. package/dist/web/assets/RoundtablesPage-BDU4W-bg.js +0 -13
  377. package/dist/web/assets/RovingFocusGroup-DS4v3bEq.js +0 -1
  378. package/dist/web/assets/RovingFocusItem-bLEnnw2Y.js +0 -1
  379. package/dist/web/assets/SettingsPage-CsJxhhsu.js +0 -1
  380. package/dist/web/assets/SettingsPage-VX_e4ty2.css +0 -1
  381. package/dist/web/assets/TaskBlockerNotice-YSvmy6B4.js +0 -1
  382. package/dist/web/assets/TeamIsland-jJKTwCJD.js +0 -9
  383. package/dist/web/assets/Teleport-CRjWb-eC.js +0 -1
  384. package/dist/web/assets/TodayPage-BvbZCEFJ.js +0 -1
  385. package/dist/web/assets/TodayPage-EJ8SWFE0.css +0 -1
  386. package/dist/web/assets/UiSegmented-DlI1vR3k.js +0 -1
  387. package/dist/web/assets/VisuallyHiddenInput-mfi7gVBu.js +0 -1
  388. package/dist/web/assets/WidgetSlot-xFZKjZ5z.js +0 -2
  389. package/dist/web/assets/WorkbenchListPage-suawrzji.js +0 -1
  390. package/dist/web/assets/_plugin-vue_export-helper-CYsAcErn.js +0 -9
  391. package/dist/web/assets/agent-occupation-C-9THmIG.js +0 -1
  392. package/dist/web/assets/checkbox-CdIozFRY.js +0 -1
  393. package/dist/web/assets/combobox-DzLSYxyO.js +0 -1
  394. package/dist/web/assets/copy-mention-CWsw8po1.js +0 -1
  395. package/dist/web/assets/dialog-SLa8cPbS.js +0 -1
  396. package/dist/web/assets/dropdown-menu-C-PcZxRY.js +0 -1
  397. package/dist/web/assets/hover-card-B-H7mMvg.js +0 -1
  398. package/dist/web/assets/index-DdAVEwQV.js +0 -24
  399. package/dist/web/assets/label-DwMBzI2m.js +0 -1
  400. package/dist/web/assets/label-table-DiaZlHIp.js +0 -1
  401. package/dist/web/assets/popover-UYksnAeH.js +0 -1
  402. package/dist/web/assets/popup-host-DMoMkD3v.js +0 -1
  403. package/dist/web/assets/radio-group-DfegNkLG.js +0 -1
  404. package/dist/web/assets/select-Bq2TQ0Gw.js +0 -1
  405. package/dist/web/assets/settings-tabs-DFZcxOaQ.js +0 -1
  406. package/dist/web/assets/shared-report-Ci1jBiYV.js +0 -3
  407. package/dist/web/assets/switch-DaUSEDq0.js +0 -1
  408. package/dist/web/assets/tabs-B_7xQRfl.js +0 -1
  409. package/dist/web/assets/ui-BCHzwL4X.js +0 -1
  410. package/dist/web/assets/useDirection-Bi78LycK.js +0 -1
  411. package/dist/web/assets/useForwardScopeId-DHGSyWlZ.js +0 -1
  412. package/dist/web/assets/usePrimitiveElement-BxOn-Fn_.js +0 -1
  413. package/dist/web/assets/utils-BQtZ8ZUw.js +0 -1
  414. package/src/system/mcp-process-scan.js +0 -55
@@ -3,8 +3,12 @@ import { homedir } from 'node:os';
3
3
  import { join } from 'node:path';
4
4
 
5
5
  import { findFile, firstField, lastEntries, listDirectory } from '../session-log.js';
6
+ import { reportedWakeUsage } from '../wake-usage.js';
6
7
 
7
8
  const TURN_START = 'task_started';
9
+ const DELEGATION_VARIABLES = Object.freeze(['FULI_ROUNDTABLE_DELEGATION', 'FULI_ROUNDTABLE_PEER_DEPTH']);
10
+ // A TOML array of strings; JSON's string escapes are valid TOML basic strings.
11
+ const tomlArray = (values) => `[${values.map((value) => JSON.stringify(value)).join(',')}]`;
8
12
  const TURN_ENDS = new Set(['task_complete', 'turn_aborted']);
9
13
 
10
14
  // Wakes Codex headlessly with a read-only sandbox. Resuming records the exchange in
@@ -21,13 +25,23 @@ export const codexWake = Object.freeze({
21
25
  return bundled && fileExists(bundled) ? bundled : null;
22
26
  },
23
27
 
24
- args({ sessionId, cwd, delegated = false }) {
28
+ // Every mode (roundtable/wake.js WAKE_MODES) runs in the read-only sandbox.
29
+ // mcpServers ({ name: { command, args, settings? } }, possibly empty): a
30
+ // read_only wake then replaces the whole mcp_servers table with exactly
31
+ // these (not verified that Codex replaces rather than merges the table).
32
+ args({ sessionId, cwd, delegated = false, mode, mcpServers = null }) {
33
+ const replaced = mcpServers && mode === 'read_only';
34
+ const only = replaced ? ['-c', `mcp_servers={ ${Object.entries(mcpServers).map(([name, entry]) => `${name} = { ${[
35
+ `command = ${JSON.stringify(entry.command)}`, `args = ${tomlArray(entry.args)}`,
36
+ ...Object.entries(entry.settings ?? {}).map(([key, value]) => `${key} = ${JSON.stringify(value)}`)].join(', ')} }`).join(', ')} }`] : [];
25
37
  // Codex MCP children inherit a filtered environment. Pass variable names,
26
- // never the private capability itself in argv or persisted client config.
27
- const authority = delegated ? ['-c', 'mcp_servers.fuli.env_vars=["FULI_ROUNDTABLE_DELEGATION","FULI_ROUNDTABLE_PEER_DEPTH"]'] : [];
38
+ // never the private capability itself in argv or persisted client config;
39
+ // only to FULI's server, when there is one.
40
+ const authority = delegated && (!replaced || mcpServers.fuli)
41
+ ? ['-c', `mcp_servers.fuli.env_vars=${tomlArray(DELEGATION_VARIABLES)}`] : [];
28
42
  return sessionId
29
- ? ['exec', 'resume', '--json', '--skip-git-repo-check', '-c', 'sandbox_mode="read-only"', ...authority, sessionId, '-']
30
- : ['exec', '--json', '--skip-git-repo-check', '--sandbox', 'read-only', '-C', cwd, ...authority, '-'];
43
+ ? ['exec', 'resume', '--json', '--skip-git-repo-check', '-c', 'sandbox_mode="read-only"', ...only, ...authority, sessionId, '-']
44
+ : ['exec', '--json', '--skip-git-repo-check', '--sandbox', 'read-only', '-C', cwd, ...only, ...authority, '-'];
31
45
  },
32
46
 
33
47
  // A session resumes only from the directory it started in.
@@ -54,11 +68,15 @@ export const codexWake = Object.freeze({
54
68
 
55
69
  // `codex exec --json` streams items; the last agent message before turn.completed is the answer.
56
70
  // No event names the model, so a Codex wake's model stays unknown (rec#129).
57
- initialState: () => ({ body: '', completed: false, failed: false }),
71
+ // turn.completed's usage counts the turn's tokens; its input already holds the cached part.
72
+ initialState: () => ({ body: '', completed: false, failed: false, usage: null }),
58
73
  nativeSessionId: event => event.type === 'thread.started' ? event.thread_id : null,
59
74
  readEvent(event, state) {
60
75
  if (event.type === 'item.completed' && event.item?.type === 'agent_message') state.body = event.item.text ?? '';
61
- if (event.type === 'turn.completed') state.completed = true;
76
+ if (event.type === 'turn.completed') {
77
+ state.completed = true;
78
+ state.usage = reportedWakeUsage({ inputParts: [event.usage?.input_tokens], output: event.usage?.output_tokens });
79
+ }
62
80
  if (event.type === 'turn.failed' || event.type === 'error') state.failed = true;
63
81
  },
64
82
  });
@@ -0,0 +1,14 @@
1
+ // The tokens a woken client reported for its run, as that client counts
2
+ // them: inputParts are disjoint counts that add up to the whole input. A part
3
+ // that is missing or not a whole count makes that side unknown (null); FULI
4
+ // never fills one in. Null when the client reported neither side.
5
+ export function reportedWakeUsage({ inputParts, output }) {
6
+ const counts = inputParts.map(tokenCount);
7
+ const usage = { inputTokens: counts.includes(null) ? null : counts.reduce((sum, count) => sum + count, 0),
8
+ outputTokens: tokenCount(output) };
9
+ return usage.inputTokens === null && usage.outputTokens === null ? null : usage;
10
+ }
11
+
12
+ function tokenCount(value) {
13
+ return Number.isSafeInteger(value) && value >= 0 ? value : null;
14
+ }
@@ -36,6 +36,9 @@
36
36
  // { agent_id, proof }: signed origin for a cross-device ask or chat
37
37
  // remoteOriginAuthority() public keys that verify those origins
38
38
  // recordMemoryUsage(input) optional: { recorded, reason? }
39
+ // agentLooks() optional: the faces the person changed, [{ agentId, kind, seed? }];
40
+ // a 'generated' seed is shared with paired devices
41
+ // (LAN directory `look`), nothing else is
39
42
  // projectFolder(projectId) optional: the project's known folder for fresh sessions
40
43
  // folderRepository(path) optional: the normalised origin address of the Git
41
44
  // repository holding path, or null (LAN share folder check)
@@ -47,6 +50,36 @@
47
50
  // standInScope({ agentId, name, occupation, projectId, text, client, sessionId })
48
51
  // optional: the Agent's shareable index for a session that
49
52
  // stands in for it (stand-in.js); never its private memory
53
+ // searchSharedProject({ projectId, agentId, workingDirectory, requester: { node, name, agentName },
54
+ // query: { action: 'card' | 'search' | 'request' | 'request_status', queries?, request?, requestId? } })
55
+ // optional: a paired device's read-only look at one shared project
56
+ // (projectId and agentId from this device's share, never from the
57
+ // asker; node the asking device's verified fingerprint, name and
58
+ // agentName display text), every card and search rate limited and
59
+ // recorded by the host: card { ok: true, name, responsibility,
60
+ // projectName }, search { ok: true, results, truncated }, or
61
+ // { ok: false, code }; without it this device refuses every
62
+ // visitor query (query_unsupported). request asks for work done
63
+ // here ({ ok: true, requestId, state }); request_status reads one
64
+ // request, only for the device that made it (workingDirectory: the
65
+ // share's folder, or null)
66
+ // peerDeviceRevoked(nodeId) optional: a paired device was revoked or left; the host ends
67
+ // what it kept open for it (its visit requests)
68
+ // peerSharesChanged(shares) optional: the shares this device offers now ([{ projectId,
69
+ // agentId }]); the host ends what was open for others
70
+ // fuliMcpServer(client) optional, sync: the host's own MCP server entry for a wake
71
+ // client ({ command, args, settings? }) as its installer writes
72
+ // it, or null; the read_only wake of an ask from another computer
73
+ // then loads only that server, and without it no MCP server at all
74
+ // refuseSharedQuery({ requester: { node, name, agentName }, action, code })
75
+ // optional: records a visitor query this device refused before
76
+ // searchSharedProject (not shared, a wrong proof, a replay) once
77
+ // the asking device was proven, counted toward its limits
78
+ // redactDiagnostic(text) optional, sync: a failed wake's captured client output as it
79
+ // may be kept (paths, credentials, secrets removed); without
80
+ // it the output is dropped and only codes are kept
81
+ // recordWakeFailure({ client, sessionMode, code, detail, exitCode, signal, durationMs, remote })
82
+ // optional, sync, never throws: the host's diagnostics of a failed wake
50
83
  // requestSignal() optional, sync: the current request's AbortSignal
51
84
  // inRestrictedWorker() optional, sync: true inside a sealed worker run
52
85
  export const ROUNDTABLE_HOST_METHODS = Object.freeze([
@@ -56,6 +56,7 @@ export async function runPeerControlCommand(args, { baseUrl, command, notRunning
56
56
  if (!/^\d{6}$/.test(code)) throw new Error('Pass the 6-digit code shown on the other computer.');
57
57
  const pairing = (await call('GET', '/api/peer')).nearby?.pairing;
58
58
  if (!pairing?.requestId || pairing.state !== 'confirm') throw new Error('No pairing is waiting for confirmation here.');
59
+ if (pairing.coordinator === 'other') write(MEMBER_TRUST);
59
60
  return printNearby(await call('POST', '/api/peer/nearby/confirm', { requestId: pairing.requestId, code }), write, command);
60
61
  }
61
62
  case 'cancel': return printNearby(await call('POST', '/api/peer/nearby/cancel', {}), write, command);
@@ -78,6 +79,7 @@ export async function runPeerControlCommand(args, { baseUrl, command, notRunning
78
79
  if (!invitation) throw new Error('Pass --invitation or --invitation-file.');
79
80
  // Joining is the consent to share the common projects' leads: said first, as the console does.
80
81
  write(SHARE_ON_PAIRING);
82
+ write(MEMBER_TRUST);
81
83
  return printStatus(await call('POST', '/api/peer/join', { invitation, name: option(rest, '--name') }), write);
82
84
  }
83
85
  case 'share': {
@@ -167,12 +169,14 @@ function printNearby(status, write, command) {
167
169
  write(`Pairing with ${device}: code ${pairing.code}. ${pairing.coordinator === 'this' ? 'This computer' : 'The other computer'} will coordinate.`);
168
170
  write(pairing.confirmedHere
169
171
  ? `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}`);
172
+ : `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}${pairing.coordinator === 'other' ? `\n${MEMBER_TRUST}` : ''}`);
171
173
  } else write(`Pairing with ${device}: ${pairing.state}${pairing.reason ? ` (${pairing.reason})` : ''}`);
172
174
  }
173
175
 
174
176
  // Said before the person confirms a pairing or joins with an invitation.
175
177
  const SHARE_ON_PAIRING = 'Once confirmed, leads of up to 8 projects the other computer says it has too can talk. Nothing else.';
178
+ // Said to the side that will join another computer's group, when it consents.
179
+ const MEMBER_TRUST = 'The other computer relays messages and decides who else is in the group. Pair only if you trust it.';
176
180
 
177
181
  // Why nearby pairing turned itself off, or what it last did.
178
182
  const NEARBY_ENDED = {
@@ -8,8 +8,7 @@ const LOOPBACK = new Set(['127.0.0.1', '::1', '::ffff:127.0.0.1']);
8
8
  export async function handlePeerControlRequest({ request, response, url, peer, readJson, sendJson, unavailableMessage }) {
9
9
  if (!url.pathname.startsWith('/api/peer')) return false;
10
10
  if (!peer) { sendJson(response, 404, { error: 'peer_unavailable', message: unavailableMessage }); return true; }
11
- const host = String(request.headers.host ?? '');
12
- if (!LOOPBACK.has(request.socket?.remoteAddress) || !/^(127\.0\.0\.1|\[::1\])(:\d+)?$/.test(host)) {
11
+ if (!isLocalOwnerRequest(request)) {
13
12
  sendJson(response, 403, { error: 'local_owner_only', message: 'LAN roundtable settings can only be changed on this computer' });
14
13
  return true;
15
14
  }
@@ -26,6 +25,13 @@ export async function handlePeerControlRequest({ request, response, url, peer, r
26
25
  return true;
27
26
  }
28
27
 
28
+ // A request from this computer's own loopback address naming a loopback Host:
29
+ // what every owner-only LAN roundtable page answers, including who visited it.
30
+ export function isLocalOwnerRequest(request) {
31
+ return LOOPBACK.has(request.socket?.remoteAddress)
32
+ && /^(127\.0\.0\.1|\[::1\])(:\d+)?$/.test(String(request.headers?.host ?? ''));
33
+ }
34
+
29
35
  async function route(request, url, peer, readJson) {
30
36
  const { method } = request;
31
37
  const { pathname } = url;
@@ -60,7 +66,8 @@ async function route(request, url, peer, readJson) {
60
66
  if (pathname === '/api/peer/nearby/pair' && method === 'POST') return peer.pairNearby({ fingerprint: (await readJson(request)).fingerprint });
61
67
  if (pathname === '/api/peer/nearby/confirm' && method === 'POST') {
62
68
  const body = await readJson(request);
63
- return peer.confirmPairing({ requestId: body.requestId, code: body.code });
69
+ return peer.confirmPairing({ requestId: body.requestId, code: body.code,
70
+ ...(body.fingerprint === undefined ? {} : { fingerprint: body.fingerprint }) });
64
71
  }
65
72
  if (pathname === '/api/peer/nearby/cancel' && method === 'POST') { await readJson(request); return peer.cancelPairing(); }
66
73
  if (pathname === '/api/peer/nearby/attempts/clear' && method === 'POST') { await readJson(request); return peer.clearPairingAttempts(); }
@@ -4,10 +4,21 @@ import { certificateFingerprint, verifyDeviceSignature } from './device-identity
4
4
  import { isAuthorityKey } from './origin-proof.js';
5
5
  import { createCoordinatorChat } from './chat-coordinator.js';
6
6
  import {
7
- canonicalJson, encodeInvitation, PEER_LIMITS, PeerError, peerCleanup, pemToDer, publicDirectoryEntry,
8
- graphemePrefix, RESULT_OUTCOMES, sha256Hex, TERMINAL_STATUSES, validateAssertion, withoutControls,
7
+ canonicalJson, encodeInvitation, PEER_LIMITS, PEER_QUERY_PROTOCOL, PeerError, peerCleanup, peerMessageKey, pemToDer, publicDirectoryEntry,
8
+ graphemePrefix, RESULT_OUTCOMES, sha256Hex, TERMINAL_STATUSES, validateAssertion, validateQuery, withoutControls,
9
9
  } from './protocol.js';
10
10
 
11
+ // What the queue holds: messages that may wake a lead, and visitors' read-only
12
+ // queries, each with its own validation, per-device queue cap and answer size.
13
+ const KINDS = Object.freeze({
14
+ message: { validate: validateAssertion, queueCap: PEER_LIMITS.queuePerNode, replyBytes: Infinity },
15
+ query: { validate: validateQuery, queueCap: PEER_LIMITS.queryQueuePerNode, senderCap: PEER_LIMITS.queryQueuePerSender,
16
+ replyBytes: PEER_LIMITS.queryReplyBytes },
17
+ });
18
+ // Queries claimed in a row while a message waits, at most; then a message goes.
19
+ const QUERY_STREAK = 3;
20
+ const kindOf = (message) => (JSON.parse(message.assertion_json).protocol === PEER_QUERY_PROTOCOL ? KINDS.query : KINDS.message);
21
+
11
22
  const ONLINE_MS = 90_000;
12
23
  // last_seen_at only feeds the "online" flag of directory() and devices(); no trust,
13
24
  // revocation or claim decision reads it. A connected device re-authenticates on every
@@ -33,6 +44,8 @@ export function createCoordinatorService({ store, identity, authority, name, clo
33
44
  repositoryChanges = memoryRecord() }) {
34
45
  const iso = (offsetMs = 0) => new Date(clock() + offsetMs).toISOString();
35
46
  const pairingFailures = [];
47
+ // Per receiving device: how many queries were claimed in a row (claim order only, kept in memory).
48
+ const queryStreaks = new Map();
36
49
  const repositories = new Map();
37
50
  let repositoryKey = null;
38
51
  rotateRepositoryKey();
@@ -151,7 +164,8 @@ export function createCoordinatorService({ store, identity, authority, name, clo
151
164
  }
152
165
 
153
166
  function submit(nodeId, { assertion, signature }) {
154
- validateAssertion(assertion, { now: clock() });
167
+ const kind = assertion?.protocol === PEER_QUERY_PROTOCOL ? KINDS.query : KINDS.message;
168
+ kind.validate(assertion, { now: clock() });
155
169
  if (assertion.from.node !== nodeId) throw new PeerError('sender_mismatch', 'The message sender is not this device', 403);
156
170
  const sender = store.node(nodeId);
157
171
  if (!verifyDeviceSignature(sender.cert_pem, assertion, signature)) throw new PeerError('invalid_signature', 'The message signature is invalid', 403);
@@ -162,7 +176,7 @@ export function createCoordinatorService({ store, identity, authority, name, clo
162
176
  if (!shared) throw new PeerError('agent_not_shared', 'That Agent is not shared by the receiving device', 404);
163
177
  const assertionJson = canonicalJson(assertion);
164
178
  return store.transaction(() => {
165
- const key = messageKey(nodeId, assertion.messageId);
179
+ const key = peerMessageKey(nodeId, assertion.messageId);
166
180
  const existing = store.message(key);
167
181
  if (existing) {
168
182
  if (existing.assertion_json !== assertionJson) {
@@ -171,7 +185,10 @@ export function createCoordinatorService({ store, identity, authority, name, clo
171
185
  return statusView(existing);
172
186
  }
173
187
  chat.validateWake(assertion);
174
- if (store.queuedCount(target.id) >= PEER_LIMITS.queuePerNode) throw new PeerError('queue_full', 'The receiving device has too many waiting messages', 429);
188
+ if (store.queuedCount(target.id, assertion.protocol) >= kind.queueCap
189
+ || (kind.senderCap && store.queuedCount(target.id, assertion.protocol, nodeId) >= kind.senderCap)) {
190
+ throw new PeerError('queue_full', 'The receiving device has too many waiting messages', 429);
191
+ }
175
192
  store.insertMessage({ id: key, senderNode: nodeId, targetNode: target.id,
176
193
  bindingId: assertion.to.bindingId, assertionJson, signature, expiresAt: assertion.expiresAt, at: iso() });
177
194
  return statusView(store.message(key));
@@ -180,8 +197,10 @@ export function createCoordinatorService({ store, identity, authority, name, clo
180
197
 
181
198
  function claim(nodeId) {
182
199
  return store.transaction(() => {
183
- const next = store.nextQueued(nodeId, iso());
200
+ // Queries first, but never more than QUERY_STREAK in a row while a message waits.
201
+ const next = store.nextQueued(nodeId, iso(), (queryStreaks.get(nodeId) ?? 0) >= QUERY_STREAK ? 'message' : 'query');
184
202
  if (!next) return null;
203
+ queryStreaks.set(nodeId, kindOf(next) === KINDS.query ? (queryStreaks.get(nodeId) ?? 0) + 1 : 0);
185
204
  try { chat.validateWake(JSON.parse(next.assertion_json)); }
186
205
  catch (error) {
187
206
  store.updateMessage(next.id, { status: 'failed', error: error.code ?? 'chat_wake_rejected' }, iso(), 'failed');
@@ -232,6 +251,9 @@ export function createCoordinatorService({ store, identity, authority, name, clo
232
251
  }
233
252
  return store.transaction(() => {
234
253
  const message = currentAttempt(nodeId, messageId, attemptId);
254
+ if (outcome === 'answered' && Buffer.byteLength(reply) > kindOf(message).replyBytes) {
255
+ throw new PeerError('invalid_result', 'The answer is larger than this kind of ask allows');
256
+ }
235
257
  if (TERMINAL_STATUSES.has(message.status) && message.status !== 'unknown') return statusView(message);
236
258
  const detail = typeof error === 'string' ? error.slice(0, 120) : null;
237
259
  if (outcome === 'never_started') {
@@ -260,7 +282,7 @@ export function createCoordinatorService({ store, identity, authority, name, clo
260
282
 
261
283
  function addressed(nodeId, messageId) {
262
284
  if (typeof messageId !== 'string' || messageId.length > 128) return null;
263
- const sent = store.message(messageKey(nodeId, messageId));
285
+ const sent = store.message(peerMessageKey(nodeId, messageId));
264
286
  if (sent) return sent;
265
287
  const received = store.message(messageId);
266
288
  return received?.target_node === nodeId ? received : null;
@@ -276,7 +298,7 @@ export function createCoordinatorService({ store, identity, authority, name, clo
276
298
 
277
299
  function cancel(nodeId, { messageId }) {
278
300
  return store.transaction(() => {
279
- const message = typeof messageId === 'string' ? store.message(messageKey(nodeId, messageId)) : null;
301
+ const message = typeof messageId === 'string' ? store.message(peerMessageKey(nodeId, messageId)) : null;
280
302
  if (!message) throw new PeerError('message_not_found', 'No such message sent by this device', 404);
281
303
  if (message.status === 'queued') store.updateMessage(message.id, { status: 'cancelled', error: 'cancelled' }, iso(), 'cancelled');
282
304
  else if (['claimed', 'running'].includes(message.status)) store.updateMessage(message.id, { cancel_requested: 1 }, iso(), 'cancel_requested');
@@ -343,11 +365,6 @@ function seenWithin(node, now, windowMs) {
343
365
  return age >= 0 && age < windowMs;
344
366
  }
345
367
 
346
- // Message IDs are chosen by senders, so the coordinator keys them per sending device.
347
- function messageKey(senderNode, messageId) {
348
- return sha256Hex(`${senderNode}:${messageId}`);
349
- }
350
-
351
368
  function statusView(message) {
352
369
  return { messageId: JSON.parse(message.assertion_json).messageId, status: message.status, reply: message.reply ?? null, error: message.error ?? null,
353
370
  via: message.via ?? null, verified: message.verified === 1, updatedAt: message.updated_at,
@@ -91,13 +91,20 @@ export function createCoordinatorStore(path = ':memory:') {
91
91
  event(row.at, { messageId: row.id, nodeId: row.senderNode, kind: 'queued' });
92
92
  },
93
93
  message: (id) => database.prepare('SELECT * FROM messages WHERE id = ?').get(id) ?? null,
94
- queuedCount: (targetNode) => database.prepare(
95
- "SELECT count(*) AS count FROM messages WHERE target_node = ? AND status IN ('queued','claimed','running')").get(targetNode).count,
96
- nextQueued: (targetNode, at) => database.prepare(`SELECT q.* FROM messages q WHERE q.target_node = ? AND q.status = 'queued'
94
+ // Open messages of one protocol for one device, optionally from one sender:
95
+ // messages and queries have separate caps, and queries one per sender too.
96
+ queuedCount: (targetNode, protocol, senderNode = null) => database.prepare(
97
+ `SELECT count(*) AS count FROM messages WHERE target_node = ? AND status IN ('queued','claimed','running')
98
+ AND json_extract(assertion_json, '$.protocol') = ? AND (? IS NULL OR sender_node = ?)`)
99
+ .get(targetNode, protocol, senderNode, senderNode).count,
100
+ // The oldest waiting entry, of the kind first (query or message) when one of
101
+ // that kind waits; the coordinator decides which kind goes first.
102
+ nextQueued: (targetNode, at, first) => database.prepare(`SELECT q.* FROM messages q WHERE q.target_node = ? AND q.status = 'queued'
97
103
  AND q.expires_at > ? AND q.cancel_requested = 0 AND (json_type(q.assertion_json,'$.chatWake') IS NULL OR NOT EXISTS (SELECT 1 FROM messages a
98
104
  WHERE a.target_node=q.target_node AND json_extract(a.assertion_json,'$.to.agentId')=json_extract(q.assertion_json,'$.to.agentId')
99
105
  AND (a.status IN ('claimed','running','unknown') OR a.cleanup_status='unconfirmed')))
100
- ORDER BY q.created_at LIMIT 1`).get(targetNode, at) ?? null,
106
+ ORDER BY (json_extract(q.assertion_json, '$.protocol') = 'peer-query/1') = ? DESC, q.created_at LIMIT 1`)
107
+ .get(targetNode, at, first === 'query' ? 1 : 0) ?? null,
101
108
  updateMessage(id, changes, at, kind, detail = null) {
102
109
  const columns = Object.keys(changes);
103
110
  database.prepare(`UPDATE messages SET ${columns.map((column) => `${column} = ?`).join(', ')}, updated_at = ? WHERE id = ?`)
@@ -3,6 +3,12 @@
3
3
  // AWDL): another computer on the LAN usually cannot reach their addresses.
4
4
  const VIRTUAL_ADAPTER = /^(vethernet|virtualbox|vboxnet|vmware|vmnet|docker|br-|veth|virbr|utun|tun|tap|wg|zt|zerotier|tailscale|awdl|llw|bridge|hyper-v|wsl|nordlynx)/i;
5
5
 
6
+ // Whether an adapter, by its name, is one of those. FULI's guest link listener
7
+ // (src/server/lan-access.js) offers physical adapters' addresses first by it.
8
+ export function isVirtualAdapter(name) {
9
+ return VIRTUAL_ADAPTER.test(name);
10
+ }
11
+
6
12
  // This computer's IPv4 LAN addresses, those of physical adapters first.
7
13
  export function lanAddresses(interfaces) {
8
14
  const all = classified(interfaces);
@@ -20,7 +26,7 @@ export function announcedAddresses(interfaces) {
20
26
  // an adapter joins the multicast group once however many addresses it has.
21
27
  export function discoveryAdapters(interfaces) {
22
28
  return Object.entries(interfaces()).flatMap(([name, list]) => {
23
- if (VIRTUAL_ADAPTER.test(name)) return [];
29
+ if (isVirtualAdapter(name)) return [];
24
30
  // 169.254/16 is what an adapter gives itself when it has no network.
25
31
  const first = (list ?? []).find((entry) => lanIPv4(entry) && !entry.address.startsWith('169.254.'));
26
32
  return first ? [first.address] : [];
@@ -35,7 +41,7 @@ export function virtualAddresses(interfaces) {
35
41
  function classified(interfaces) {
36
42
  return Object.entries(interfaces()).flatMap(([name, list]) => (list ?? [])
37
43
  .filter(lanIPv4)
38
- .map((entry) => ({ address: entry.address, virtual: VIRTUAL_ADAPTER.test(name) })));
44
+ .map((entry) => ({ address: entry.address, virtual: isVirtualAdapter(name) })));
39
45
  }
40
46
 
41
47
  function lanIPv4(entry) {
@@ -337,10 +337,16 @@ export function createNearbyPairing({ local, attempts, connect, clock = Date.now
337
337
 
338
338
  // ---- The person's own controls on either computer (local only) ----
339
339
 
340
- function confirm({ requestId, code }) {
340
+ // `fingerprint` names the device the caller means (16 or more leading characters). A caller
341
+ // that did not compare two screens passes it, so a request from another device is refused
342
+ // and left as it is for the person to see.
343
+ function confirm({ requestId, code, fingerprint }) {
341
344
  const current = open();
342
345
  if (!current || current.id !== requestId) throw new PeerError('pairing_not_found', 'No pairing is waiting for confirmation here', 404);
343
346
  if (current.state !== 'confirm') throw new PeerError('pairing_not_ready', 'The pairing code is not ready yet', 409);
347
+ if (fingerprint !== undefined && !namesDevice(fingerprint, current.peer.fingerprint)) {
348
+ throw new PeerError('device_mismatch', 'The pairing waiting here is with another device; nothing was confirmed', 409);
349
+ }
344
350
  if (String(code ?? '').replace(/\s+/g, '') !== current.code) {
345
351
  stop(current, 'code_mismatch');
346
352
  throw new PeerError('code_mismatch', 'That code is not the one on this computer; the pairing was cancelled', 409);
@@ -413,6 +419,12 @@ function deviceKey(peer) {
413
419
  return `${peer.fingerprint}|${peer.address ?? ''}`;
414
420
  }
415
421
 
422
+ // Whether the text names this device: at least the 16 characters shown as its short fingerprint.
423
+ function namesDevice(text, fingerprint) {
424
+ const prefix = String(text ?? '').replace(/\s+/g, '').toLowerCase();
425
+ return /^[0-9a-f]{16,64}$/.test(prefix) && typeof fingerprint === 'string' && fingerprint.startsWith(prefix);
426
+ }
427
+
416
428
  function commitmentText(nonce) {
417
429
  return `fuli-pair-commit:${NEARBY_PROTOCOL}:${nonce}`;
418
430
  }
@@ -2,7 +2,15 @@ import { createPublicKey, verify } from 'node:crypto';
2
2
 
3
3
  import { canonicalJson, canonicalTime, PeerError, sha256Hex } from './protocol.js';
4
4
 
5
- const PROOF_VERSION = 'fuli-remote-origin/1';
5
+ // Each purpose signs under its own version, so a verifier that knows only some
6
+ // purposes rejects the others. Execution keeps the version and wire shape it had
7
+ // before purposes existed; every other proof also signs its purpose.
8
+ const PROOF_VERSIONS = Object.freeze({
9
+ execution: 'fuli-remote-origin/1',
10
+ chat: 'fuli-chat-origin/1',
11
+ query: 'fuli-query-origin/1',
12
+ request: 'fuli-request-origin/1'
13
+ });
6
14
  const CLOCK_SKEW_MS = 60_000;
7
15
 
8
16
  // The digest the sending Provider signs: the whole message except the proof itself.
@@ -11,6 +19,11 @@ export function assertionDigest(assertion) {
11
19
  return sha256Hex(canonicalJson(signed));
12
20
  }
13
21
 
22
+ // The version a proof for purpose signs under, or null for a purpose no FULI issues.
23
+ export function originProofVersion(purpose) {
24
+ return Object.hasOwn(PROOF_VERSIONS, purpose) ? PROOF_VERSIONS[purpose] : null;
25
+ }
26
+
14
27
  export function isAuthorityKey(value) {
15
28
  return Boolean(value) && typeof value.keyId === 'string' && /^[0-9a-f]{32}$/.test(value.keyId)
16
29
  && typeof value.publicKey === 'string' && Buffer.from(value.publicKey, 'base64url').length === 32;
@@ -29,6 +42,8 @@ export function authorityFromProvider(response) {
29
42
  // and purpose until a short expiry. Execution keeps its project-lead restriction.
30
43
  export function verifyOriginProof(assertion, authority, { now = Date.now(), purpose = 'execution' } = {}) {
31
44
  const fail = (message) => { throw new PeerError('origin_rejected', message, 403); };
45
+ const version = originProofVersion(purpose);
46
+ if (!version) fail('The origin proof was checked for an unknown purpose');
32
47
  if (!isAuthorityKey(authority)) fail('No origin authority was bound when this device was paired');
33
48
  const proof = assertion?.origin;
34
49
  if (typeof proof?.payload !== 'string' || typeof proof?.signature !== 'string'
@@ -40,8 +55,8 @@ export function verifyOriginProof(assertion, authority, { now = Date.now(), purp
40
55
  if (!valid) fail('The origin proof signature is invalid');
41
56
  let claims;
42
57
  try { claims = JSON.parse(payload.toString('utf8')); } catch { fail('The origin proof is malformed'); }
43
- const version = purpose === 'chat' ? 'fuli-chat-origin/1' : PROOF_VERSION;
44
58
  if (claims?.version !== version || claims.key_id !== authority.keyId) fail('The origin proof uses another authority or purpose');
59
+ // An execution proof signs no purpose; every other one signs exactly its own.
45
60
  if ((claims.purpose ?? 'execution') !== purpose) fail('The origin proof has a different purpose');
46
61
  if (claims.digest !== assertionDigest(assertion)) fail('The origin proof covers a different message');
47
62
  if (claims.message_id !== assertion.messageId || claims.agent_id !== assertion.from.agentId
@@ -7,13 +7,18 @@ import { loadDeviceIdentity } from './device-identity.js';
7
7
  import { createNodeStore } from './node-store.js';
8
8
  import { assertionDigest, authorityFromProvider } from './origin-proof.js';
9
9
  import { createPeerClient } from './peer-transport.js';
10
- import { PEER_LIMITS, PEER_PROTOCOL, PeerError, peerCleanup, TERMINAL_STATUSES } from './protocol.js';
10
+ import { PEER_LIMITS, PEER_PROTOCOL, PEER_QUERY_PROTOCOL, PeerError, peerCleanup, peerLook, TERMINAL_STATUSES } from './protocol.js';
11
11
  import { createPeerChatPort } from './chat-port.js';
12
+ import { parseQueryAnswer, queryCode, queryPurpose } from './query-answer.js';
12
13
  import { matchesAgentDiscovery } from '../roundtable/discovery.js';
13
14
 
14
15
  const ADDRESS = /^peer:([0-9a-f]{16}):([A-Za-z0-9][A-Za-z0-9._:-]{0,127})$/;
15
16
  const STATUS_POLL_MS = 2_000;
16
17
  const PROOF_MARGIN_MS = 60_000;
18
+ // A query is answered within a claim tick and one search: poll briefly, give up soon.
19
+ const QUERY_POLL_MS = 300;
20
+ const QUERY_WAIT_MS = 20_000;
21
+ const refused = (code) => ({ ok: false, code: queryCode(code) });
17
22
 
18
23
  // The coordinator's answer is untrusted here: only a bounded cleanup report passes.
19
24
  function boundedState(state) {
@@ -30,7 +35,7 @@ export function peerDirectory(dataDir) {
30
35
  // What Agents on this device use to reach shared project leads on other paired
31
36
  // devices. It never pairs, shares or listens: those stay with the local owner.
32
37
  export function createPeerPort({ dataDir, host, clock = Date.now, idFactory = randomUUID,
33
- statusPollMs = STATUS_POLL_MS }) {
38
+ statusPollMs = STATUS_POLL_MS, createClient = createPeerClient }) {
34
39
  const directory = peerDirectory(dataDir);
35
40
  let store = null;
36
41
  let session = null;
@@ -48,7 +53,7 @@ export function createPeerPort({ dataDir, host, clock = Date.now, idFactory = ra
48
53
  session?.client.close();
49
54
  const identity = await loadDeviceIdentity(directory);
50
55
  session = { fingerprint: current.coordinator.fingerprint, url: current.coordinator.url, identity,
51
- client: createPeerClient({ identity, coordinator: current.coordinator }) };
56
+ client: createClient({ identity, coordinator: current.coordinator }) };
52
57
  return session;
53
58
  }
54
59
 
@@ -77,7 +82,7 @@ export function createPeerPort({ dataDir, host, clock = Date.now, idFactory = ra
77
82
  address: `peer:${device.nodeId.slice(0, 16)}:${agent.bindingId}`, name: agent.name,
78
83
  role: agent.communicationOnly ? 'shared_agent' : 'shared_project_lead', agentId: agent.agentId,
79
84
  occupation: agent.occupation ?? null, capabilities: agent.capabilities ?? [], projectId: agent.projectId ?? null,
80
- communicationOnly: agent.communicationOnly === true,
85
+ communicationOnly: agent.communicationOnly === true, ...(peerLook(agent.look) ? { look: peerLook(agent.look) } : {}),
81
86
  employeeNumber: agent.employeeNumber, responsibility: agent.responsibility, projectName: agent.projectName,
82
87
  device: { name: device.name, online: device.online } })))
83
88
  .filter((agent) => matchesAgentDiscovery(agent, { occupation, capability }) && (!projectId || agent.projectId === projectId)
@@ -116,6 +121,39 @@ export function createPeerPort({ dataDir, host, clock = Date.now, idFactory = ra
116
121
  return post('/peer/1/messages', { assertion, signature: identity.sign(assertion) });
117
122
  }
118
123
 
124
+ // A visitor's read-only question to a shared lead's project on another
125
+ // device, for one verified local task: answered there from its shared
126
+ // knowledge without waking anything. Returns { ok: true, remote } with the
127
+ // reply's validated fields only, or { ok: false, code } with a plain code.
128
+ async function query(target, question, { taskContextToken, sourceApplication, from, signal }) {
129
+ const { identity } = await connection();
130
+ const now = clock();
131
+ const assertion = { protocol: PEER_QUERY_PROTOCOL, messageId: idFactory(),
132
+ from: { node: identity.fingerprint, agentId: from.agentId, name: from.name },
133
+ to: { node: target.node, bindingId: target.bindingId, agentId: target.agentId }, query: question,
134
+ issuedAt: new Date(now).toISOString(), expiresAt: new Date(now + PEER_LIMITS.queryTtlSeconds * 1000).toISOString() };
135
+ const issued = await host.issueRemoteOrigin({ taskContextToken, client: sourceApplication, messageId: assertion.messageId,
136
+ digest: assertionDigest(assertion), targetNode: target.node, bindingId: target.bindingId, expiresAt: assertion.expiresAt,
137
+ purpose: queryPurpose(question.action) });
138
+ if (issued.agent_id !== from.agentId) throw new PeerError('origin_mismatch', 'The local authority attributed this task to another Agent', 409);
139
+ assertion.origin = issued.proof;
140
+ let state;
141
+ try {
142
+ await post('/peer/1/messages', { assertion, signature: identity.sign(assertion) }, { signal });
143
+ state = await waitFor(assertion.messageId, QUERY_WAIT_MS, { signal, pollMs: QUERY_POLL_MS });
144
+ } catch (error) {
145
+ if (signal?.aborted) throw error;
146
+ return refused(error.code);
147
+ }
148
+ if (!TERMINAL_STATUSES.has(state.status)) {
149
+ await cancel(assertion.messageId).catch(() => {});
150
+ return refused('query_timeout');
151
+ }
152
+ if (state.status !== 'answered') return refused(state.error ?? state.status);
153
+ const remote = parseQueryAnswer(state.reply, question.action);
154
+ return remote ? { ok: true, remote } : refused('invalid_answer');
155
+ }
156
+
119
157
  async function status(messageId, options) {
120
158
  return boundedState(await post('/peer/1/status', { messageId }, options));
121
159
  }
@@ -124,14 +162,14 @@ export function createPeerPort({ dataDir, host, clock = Date.now, idFactory = ra
124
162
  return boundedState(await post('/peer/1/cancel', { messageId }));
125
163
  }
126
164
 
127
- async function waitFor(messageId, timeoutMs, { signal } = {}) {
165
+ async function waitFor(messageId, timeoutMs, { signal, pollMs = statusPollMs } = {}) {
128
166
  const deadline = clock() + timeoutMs;
129
167
  let last = null;
130
168
  for (;;) {
131
169
  signal?.throwIfAborted();
132
170
  try { last = await status(messageId, { signal }); } catch (error) { if (!last) last = { status: 'queued', error: error.code }; }
133
171
  if (TERMINAL_STATUSES.has(last.status) || clock() >= deadline) return last;
134
- await delay(Math.min(statusPollMs, Math.max(0, deadline - clock())), undefined, { signal });
172
+ await delay(Math.min(pollMs, Math.max(0, deadline - clock())), undefined, { signal });
135
173
  }
136
174
  }
137
175
 
@@ -151,6 +189,6 @@ export function createPeerPort({ dataDir, host, clock = Date.now, idFactory = ra
151
189
  }
152
190
 
153
191
  return { ...createPeerChatPort({ connection, post, nodeStore, host, clock }),
154
- configured, isRemoteAddress, remoteAgents, resolveRemote, send, status, cancel, waitFor, hasSent, localAuthority,
192
+ configured, isRemoteAddress, remoteAgents, resolveRemote, send, query, status, cancel, waitFor, hasSent, localAuthority,
155
193
  nodeStore, directory, idFactory, close };
156
194
  }