fuli-context 0.27.1 → 0.27.3
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.
- package/dist/web/assets/{AboutPage-BKyNoI0v.js → AboutPage-C-fJv2EQ.js} +1 -1
- package/dist/web/assets/AboutSectionHeading-CaZhhuuu.css +1 -0
- package/dist/web/assets/AboutSectionHeading-DLjnjHfb.js +1 -0
- package/dist/web/assets/AgentAppsPage-CBcUlh8U.js +1 -0
- package/dist/web/assets/AgentAvatar-Cu_TwSqc.js +1 -0
- package/dist/web/assets/AgentAvatar-VUEAsIqM.css +1 -0
- package/dist/web/assets/{AgentHand-BfRjs1He.js → AgentHand-1yBhYv72.js} +1 -1
- package/dist/web/assets/{AgentManagement-qCpr876m.js → AgentManagement-D8jHUEWK.js} +2 -2
- package/dist/web/assets/{AgentMentionCopy-_pr-D8vX.js → AgentMentionCopy-BRxaxi6r.js} +1 -1
- package/dist/web/assets/{AgentName-CUuWNrzE.js → AgentName-CL8xix6s.js} +1 -1
- package/dist/web/assets/AgentProfilePage-BosYAypt.js +5 -0
- package/dist/web/assets/AgentServicesPage-BQHw7Cyx.js +1 -0
- package/dist/web/assets/{AppViewerPage-Ct46NPXP.js → AppViewerPage-CO5-dW38.js} +1 -1
- package/dist/web/assets/{BackToTop-DOlt-xjQ.js → BackToTop-dl4Y4CgO.js} +1 -1
- package/dist/web/assets/{BoardCardFieldsMenu-RFcx_CAs.js → BoardCardFieldsMenu-BBqsgCq8.js} +1 -1
- package/dist/web/assets/{BoardMoveMenu-GJ8lpuZY.js → BoardMoveMenu-Rys8yvXz.js} +1 -1
- package/dist/web/assets/{Breadcrumb-DTo6Zvtb.js → Breadcrumb-DXXN0moP.js} +1 -1
- package/dist/web/assets/{CaptureChangePage-DRgWyCRo.js → CaptureChangePage-lNiPS4XI.js} +1 -1
- package/dist/web/assets/{CopyFixPrompt-1UXH_ItZ.js → CopyFixPrompt-Cpve4rdS.js} +1 -1
- package/dist/web/assets/{DataFormatPage-CgFXfOW_.js → DataFormatPage-DpBIwY-n.js} +1 -1
- package/dist/web/assets/DebugTurnPage-DzJ07GMF.js +1 -0
- package/dist/web/assets/{DebugTurnsPage-BGKSH3n0.js → DebugTurnsPage-CNAeNt5i.js} +1 -1
- package/dist/web/assets/{DialogTitle-CIVSlKqQ.js → DialogTitle-D0EVi01-.js} +1 -1
- package/dist/web/assets/{EmployeeRedirectPage-8qPpnbyP.js → EmployeeRedirectPage-qlH0SVZY.js} +1 -1
- package/dist/web/assets/EmployeeScopeDialog-C4B724Jj.js +1 -0
- package/dist/web/assets/EmployeeWorkbench-BgpxZ_1F.js +4 -0
- package/dist/web/assets/{EmployeeWorkbench-Bp9pUkfS.css → EmployeeWorkbench-rhY970vW.css} +1 -1
- package/dist/web/assets/FieldRoot-oxmAMICi.js +1 -0
- package/dist/web/assets/FlaBlockedTasks-CWa5T5nU.css +1 -0
- package/dist/web/assets/FlaBlockedTasks-DGw9I-j7.js +1 -0
- package/dist/web/assets/{FlaGrowth-CaFdmezv.js → FlaGrowth-Ct4GbCJZ.js} +1 -1
- package/dist/web/assets/{FlaOccupationKit-CFoBUWGF.js → FlaOccupationKit-Cbx058JA.js} +1 -1
- package/dist/web/assets/{FlaTaskSheets-BShmW9R5.js → FlaTaskSheets-CoWj7Gw3.js} +1 -1
- package/dist/web/assets/FlasPage-BGrz_P1x.js +1 -0
- package/dist/web/assets/{FlasPage-H99IZ9M6.css → FlasPage-D3CcJcvN.css} +1 -1
- package/dist/web/assets/{GrowthLoading-CVBn4r4q.js → GrowthLoading-BHxVzIoM.js} +1 -1
- package/dist/web/assets/HowtoPage-DfHVIb8E.css +1 -0
- package/dist/web/assets/HowtoPage-Dx7xGKQi.js +1 -0
- package/dist/web/assets/{InboxPage-D9VIDrsL.js → InboxPage-ByZQpihN.js} +1 -1
- package/dist/web/assets/{KnowledgeDeleteButton-C01O4FSO.js → KnowledgeDeleteButton-dvslN7EO.js} +1 -1
- package/dist/web/assets/{KnowledgeHardDeleteSection-jqad3dJN.js → KnowledgeHardDeleteSection-DMARNrze.js} +1 -1
- package/dist/web/assets/KnowledgeItemEditPage-D7X3K-Fu.js +1 -0
- package/dist/web/assets/{KnowledgeItemSummaryCard-XbkYp7Dy.js → KnowledgeItemSummaryCard-Carpboje.js} +1 -1
- package/dist/web/assets/KnowledgeOrganizerPage-CdFva4xO.js +1 -0
- package/dist/web/assets/KnowledgePage-CwrWmdLl.js +1 -0
- package/dist/web/assets/KnowledgePeek-C4QSXTOF.js +1 -0
- package/dist/web/assets/KnowledgeTurnReceiptPage-CY85DtmF.js +1 -0
- package/dist/web/assets/{KnowledgeWorkspace-CmzU6Vuh.js → KnowledgeWorkspace-D8Q8usZc.js} +3 -3
- package/dist/web/assets/{MeAvatar-D_LFqHrR.js → MeAvatar-WSCaLEJ1.js} +1 -1
- package/dist/web/assets/{MeLink-CeIxjFrm.js → MeLink-rP0IiTaj.js} +1 -1
- package/dist/web/assets/MenuSeparator-C_h65gsb.js +1 -0
- package/dist/web/assets/ModelSettingsPage-B_Udk6b7.js +1 -0
- package/dist/web/assets/{NewSessionPanel-BKrOFEMO.js → NewSessionPanel-DNYTQ0Lw.js} +1 -1
- package/dist/web/assets/{NotFoundPage-CdOCRj3P.js → NotFoundPage-BbnR0KYy.js} +1 -1
- package/dist/web/assets/NoticeRow-CcQ1J4wZ.js +1 -0
- package/dist/web/assets/{workbench-card-Dt0820yW.css → NoticeRow-DD-J76Yo.css} +1 -1
- package/dist/web/assets/OccupationsPage-DQGGceta.js +1 -0
- package/dist/web/assets/{PageOutline-VtLLW4kh.js → PageOutline-nKD_AvCJ.js} +1 -1
- package/dist/web/assets/PageStack-BMzrkyV4.css +1 -0
- package/dist/web/assets/PageStack-BVHOFq7x.js +1 -0
- package/dist/web/assets/PersonalProfilePage-Cm1NxyU0.js +1 -0
- package/dist/web/assets/PersonalProjectsPage-CgqC4u77.js +1 -0
- package/dist/web/assets/{PinIcon-DD3Un-hh.js → PinIcon-DxjWqB7x.js} +1 -1
- package/dist/web/assets/PopperContent-BkTZlJWP.js +1 -0
- package/dist/web/assets/{Presence-DqPb-1P1.js → Presence-DrSz_UA1.js} +1 -1
- package/dist/web/assets/{ProfileAuthorChip-Dm5GjcAt.js → ProfileAuthorChip-CN1ZYzKN.js} +1 -1
- package/dist/web/assets/ProjectAgentsPage-DMnRnXDT.js +5 -0
- package/dist/web/assets/{ProjectJudgmentPolicy-DVFV5Cai.js → ProjectJudgmentPolicy-DBszt68M.js} +1 -1
- package/dist/web/assets/{RoundtablesPage-DL-IOngN.css → RoundtablesPage-Cdbl7Tbx.css} +1 -1
- package/dist/web/assets/RoundtablesPage-QtNyNaDg.js +13 -0
- package/dist/web/assets/RovingFocusGroup-Dvddk8pN.js +1 -0
- package/dist/web/assets/{RovingFocusItem-C_N843Nb.js → RovingFocusItem-Ck-FCX8l.js} +1 -1
- package/dist/web/assets/SessionMigrationPage-Chm5L6p4.js +1 -0
- package/dist/web/assets/{SessionRecordsPage-Dy203sP2.js → SessionRecordsPage-BHPaCRH-.js} +1 -1
- package/dist/web/assets/SettingsPage-C80ljt40.js +1 -0
- package/dist/web/assets/SettingsPage-CnqtNPWd.css +1 -0
- package/dist/web/assets/{SharedJefaReportPage-CASkC5pc.js → SharedJefaReportPage-DHD4As4b.js} +1 -1
- package/dist/web/assets/StatementCalendarPage-lkq1OrUT.js +1 -0
- package/dist/web/assets/StatementCalendarPage-t8pJI4G6.css +1 -0
- package/dist/web/assets/StatementRows-DS-_XbkC.js +1 -0
- package/dist/web/assets/StatementRows-TQ2i_uXU.css +1 -0
- package/dist/web/assets/{TagVocabularyPage-Bd57YcUL.js → TagVocabularyPage-ap97B1fd.js} +1 -1
- package/dist/web/assets/TaskBlockerClear-xmjIgmON.js +1 -0
- package/dist/web/assets/TaskBlockerNotice-D3awZbiX.js +1 -0
- package/dist/web/assets/{TaskReason-BxYwBDoB.js → TaskReason-Y_gLRUR4.js} +1 -1
- package/dist/web/assets/{TeamCard-cWYC5z07.js → TeamCard-C5BOBfgK.js} +1 -1
- package/dist/web/assets/TeamCardsWidget-jLieh7GV.js +1 -0
- package/dist/web/assets/{TeamIsland-BD5s-zFZ.js → TeamIsland-C2U6j6W0.js} +1 -1
- package/dist/web/assets/{Teleport-DhMmMHjy.js → Teleport-RJS88HRO.js} +1 -1
- package/dist/web/assets/{TextField-XakqTnVl.js → TextField-CwecNrfC.js} +1 -1
- package/dist/web/assets/TodayPage-EJ8SWFE0.css +1 -0
- package/dist/web/assets/TodayPage-wkVzpeI1.js +1 -0
- package/dist/web/assets/{TonborgDelegationSwitch-B59PUZBz.js → TonborgDelegationSwitch-C9jrfVCw.js} +1 -1
- package/dist/web/assets/{UiChip-BFdfq8Jm.js → UiChip-DLTDKZh9.js} +1 -1
- package/dist/web/assets/UiDialog-u4ZkP4DG.js +1 -0
- package/dist/web/assets/{UiDisclosure-G3MiGB7F.js → UiDisclosure-CKVkr79z.js} +1 -1
- package/dist/web/assets/{UiIcon--qI1_q89.js → UiIcon-D2DJw7hg.js} +1 -1
- package/dist/web/assets/UiSegmented-D6pLjXXW.js +1 -0
- package/dist/web/assets/{UiWeight-BRA-6EY_.js → UiWeight-BOEi9suT.js} +1 -1
- package/dist/web/assets/{VirtualDirectoryList-Dm07NMxq.js → VirtualDirectoryList-BX3eeyRo.js} +1 -1
- package/dist/web/assets/{VisuallyHidden-DIg8c_z2.js → VisuallyHidden-DjqI8CEj.js} +1 -1
- package/dist/web/assets/{VisuallyHiddenInput-rcWqHewS.js → VisuallyHiddenInput-Cc2Qp6aL.js} +1 -1
- package/dist/web/assets/WidgetSlot-7bCPwUl2.js +2 -0
- package/dist/web/assets/WorkbenchListPage-BKT03RRO.css +1 -0
- package/dist/web/assets/WorkbenchListPage-DlE6S2WC.js +1 -0
- package/dist/web/assets/_plugin-vue_export-helper-BXUcxlz4.js +9 -0
- package/dist/web/assets/{agent-apps-Svxh5tiY.js → agent-apps-CFWQ-pVX.js} +1 -1
- package/dist/web/assets/agent-occupation-BQG-rvnx.js +1 -0
- package/dist/web/assets/{agent-pins-CvATgFji.js → agent-pins-XtAvsJ8S.js} +1 -1
- package/dist/web/assets/{agent-roster-records-CsYjmaNn.js → agent-roster-records-DiZKG26q.js} +1 -1
- package/dist/web/assets/{agent-work-summary-BOeJ4JXc.js → agent-work-summary-CvHRy3NR.js} +1 -1
- package/dist/web/assets/{attach-closest-edge-DFoBNGBU.js → attach-closest-edge-De5463t-.js} +1 -1
- package/dist/web/assets/{attention-store-CHxXJTuF.js → attention-store-CWRvv8xT.js} +1 -1
- package/dist/web/assets/{badge-DqHf-RNw.js → badge-CyUHAZlb.js} +1 -1
- package/dist/web/assets/{button-CdYobu4m.js → button-DgFpUg62.js} +1 -1
- package/dist/web/assets/{card-8xZot-73.js → card-BG73LSt9.js} +1 -1
- package/dist/web/assets/{catalog-h6KbvKdB.js → catalog-KaWiF7K5.js} +1 -1
- package/dist/web/assets/{checkbox-DZ6CDZ8r.js → checkbox-DNX0E3Ym.js} +1 -1
- package/dist/web/assets/{client-DRnUmjCk.js → client-eeoB__-w.js} +1 -1
- package/dist/web/assets/{client-links-store-DQY0A5PC.js → client-links-store-C1T7b2HQ.js} +1 -1
- package/dist/web/assets/combobox-BG6YUVkp.js +1 -0
- package/dist/web/assets/{console-BF8ZU9dG.js → console-KA3Jxkr4.js} +1 -1
- package/dist/web/assets/conversation-launcher-settings-QWrAaAPe.js +1 -0
- package/dist/web/assets/copy-mention-BwT-8AqP.js +1 -0
- package/dist/web/assets/{dialog-Bg5NVU4Y.js → dialog-CPHmFum7.js} +1 -1
- package/dist/web/assets/{dist--2DWcoU9.js → dist-CTCo5IXd.js} +1 -1
- package/dist/web/assets/{dist-INkzWhVF.js → dist-e1tihV1g.js} +1 -1
- package/dist/web/assets/dropdown-menu-BScsuHhH.js +1 -0
- package/dist/web/assets/{field-7G2bSNl5.js → field-8F_Pt8vb.js} +1 -1
- package/dist/web/assets/{format-bytes-Jj3-0UhP.js → format-bytes-DkVJGLsS.js} +1 -1
- package/dist/web/assets/{hover-card-llxR7wrX.js → hover-card-Db-Mrxk6.js} +1 -1
- package/dist/web/assets/identity-wfQfyysH.js +1 -0
- package/dist/web/assets/{index-HRZACEmh.css → index-CHDkJLQR.css} +1 -1
- package/dist/web/assets/index-CRSH-FaE.js +24 -0
- package/dist/web/assets/{input-z5o2wIZC.js → input-DFTIPfkE.js} +1 -1
- package/dist/web/assets/{label-BtTrlS8e.js → label-BDet7nvg.js} +1 -1
- package/dist/web/assets/label-table-BVh638Sy.js +1 -0
- package/dist/web/assets/{model-CGfhtR6w.js → model-BwEuimI0.js} +1 -1
- package/dist/web/assets/{model-CCaA3vRN.js → model-Bzgg7OTO.js} +1 -1
- package/dist/web/assets/model-C7J0jC4U.js +1 -0
- package/dist/web/assets/{model-BD6AfoOR.js → model-D3j-Q4br.js} +1 -1
- package/dist/web/assets/{model-BMd98Yux.js → model-DFuUc43Z.js} +1 -1
- package/dist/web/assets/{model-BKg9fdsn.js → model-DGpMX2GY.js} +1 -1
- package/dist/web/assets/{model-Ejc2vysd.js → model-LXhsHZ_S.js} +1 -1
- package/dist/web/assets/{model-Bhyqm3my.js → model-WhGp0XZv.js} +1 -1
- package/dist/web/assets/motion-0KGuL0P9.js +1 -0
- package/dist/web/assets/{motion-pePEUhOt.js → motion-BhDwEDuX.js} +1 -1
- package/dist/web/assets/{motion-preference-DTwjqiJ8.js → motion-preference--VYomm-z.js} +1 -1
- package/dist/web/assets/{occupation-catalog-ByjQk0EY.js → occupation-catalog-D5SQWfUI.js} +1 -1
- package/dist/web/assets/{occupation-kits-Dg6UZqc1.js → occupation-kits-CrqixyUx.js} +1 -1
- package/dist/web/assets/{option-BIjYeAh2.js → option-C9CkqCvy.js} +1 -1
- package/dist/web/assets/{orchestration-filters-3AfjDoHQ.js → orchestration-filters-DTnWbCEm.js} +1 -1
- package/dist/web/assets/overview-data-BvW9uhT4.js +1 -0
- package/dist/web/assets/{page-refresh-BTqRX45n.js → page-refresh-GRJ3nMpT.js} +1 -1
- package/dist/web/assets/{page-title-B5RyNTPD.js → page-title-B9HNL7K4.js} +1 -1
- package/dist/web/assets/{person-profile-BzPwdtix.js → person-profile-Cng7edLa.js} +1 -1
- package/dist/web/assets/{popover-BsWyCEy5.js → popover-BgaSR8Zf.js} +1 -1
- package/dist/web/assets/popup-host-CFQVWMSj.js +1 -0
- package/dist/web/assets/preference-conflicts-WphCdbo6.js +1 -0
- package/dist/web/assets/{profile-model-TAsyybji.js → profile-model-B9K6ylO1.js} +1 -1
- package/dist/web/assets/{project-board-layout-BwyHItDc.js → project-board-layout-GxgeqkX4.js} +1 -1
- package/dist/web/assets/{project-capture-I8-7JwsK.js → project-capture-C6NQkcJw.js} +1 -1
- package/dist/web/assets/{project-origin-B_Ku288r.js → project-origin-DuSzjbhd.js} +1 -1
- package/dist/web/assets/{quick-edit-api-Cm-W3ZVP.js → quick-edit-api-BDFnInRp.js} +1 -1
- package/dist/web/assets/radio-group-D6RUfdDr.js +1 -0
- package/dist/web/assets/{review-api-Gwr5nP1B.js → review-api-D31JYGWJ.js} +1 -1
- package/dist/web/assets/{review-list-CNeXKjBw.js → review-list-Cvacm108.js} +1 -1
- package/dist/web/assets/{review-store-BaMwO51r.js → review-store-D7_Vfhh7.js} +1 -1
- package/dist/web/assets/{role-names-C-F0XIE1.js → role-names-DebBvCND.js} +1 -1
- package/dist/web/assets/{roundtable-live-CM4Cqw2v.js → roundtable-live-DfN7Sw9Q.js} +1 -1
- package/dist/web/assets/{runtime-dom.esm-bundler-tA5o2TEo.js → runtime-dom.esm-bundler-DBdCxLeu.js} +1 -1
- package/dist/web/assets/select-C0ecw2Gn.js +1 -0
- package/dist/web/assets/{session-launch-offers-CEdCRTz9.js → session-launch-offers-BO40dDPk.js} +1 -1
- package/dist/web/assets/{settings-autosave-D3wBf_zN.js → settings-autosave-q7Wr9G3O.js} +1 -1
- package/dist/web/assets/settings-tabs-D7-3akvW.js +1 -0
- package/dist/web/assets/shared-report-j27wViAk.js +3 -0
- package/dist/web/assets/{source-adapters-BR-AAGhD.js → source-adapters-D3VpWZ6y.js} +1 -1
- package/dist/web/assets/{switch-BoOtTu6O.js → switch-ClI3aPV3.js} +1 -1
- package/dist/web/assets/tabs-BYpn35nj.js +1 -0
- package/dist/web/assets/{task-card-fields-BWlLtcKE.js → task-card-fields-CR_cHUml.js} +1 -1
- package/dist/web/assets/{task-evidence-DydhKn9x.js → task-evidence-D0XkNnb8.js} +1 -1
- package/dist/web/assets/{task-labels-BrNKooHK.js → task-labels-C6FR9pf_.js} +1 -1
- package/dist/web/assets/{task-reason-CvmaNQWE.js → task-reason-C2NjR8__.js} +1 -1
- package/dist/web/assets/{team-sheets-DkAuebg6.js → team-sheets-5rb7d8An.js} +1 -1
- package/dist/web/assets/{textarea-BQnuJ0v3.js → textarea-BW51g0FT.js} +1 -1
- package/dist/web/assets/ui-rJlFkhnh.js +1 -0
- package/dist/web/assets/{useAgentRecords-PysQYF4V.js → useAgentRecords-BDEGuChX.js} +1 -1
- package/dist/web/assets/{useAgentWorkSummary-DaNyOo2z.js → useAgentWorkSummary-B7fcYNAf.js} +1 -1
- package/dist/web/assets/{useApi-CROJJdhE-CgPyy2pi.js → useApi-CROJJdhE-CXkEmQ40.js} +1 -1
- package/dist/web/assets/{useClipboardCopy-Cf3GZrHC.js → useClipboardCopy-CLyPUkax.js} +1 -1
- package/dist/web/assets/useDirection-hD2Ki6e_.js +1 -0
- package/dist/web/assets/{useFocusReturn-uY18_eDg.js → useFocusReturn-BzZRnzjC.js} +1 -1
- package/dist/web/assets/{useForwardExpose-Ci_aBJDg.js → useForwardExpose-BFvXozfQ.js} +1 -1
- package/dist/web/assets/{useForwardPropsEmits-mGaDeNMp.js → useForwardPropsEmits-BQIBYWrX.js} +1 -1
- package/dist/web/assets/useForwardScopeId-DJpBz5AW.js +1 -0
- package/dist/web/assets/{useKnowledgeConfirm-PcqqgwNU.js → useKnowledgeConfirm-B7ljY3BE.js} +1 -1
- package/dist/web/assets/{useKnowledgeItemPeek-yjyrSFtf.js → useKnowledgeItemPeek-W54o0cXF.js} +1 -1
- package/dist/web/assets/{useMinimumLoadingDisplay-Bu6xyHby.js → useMinimumLoadingDisplay-i0As_nIh.js} +1 -1
- package/dist/web/assets/useNow-w9sbWus7.js +1 -0
- package/dist/web/assets/{usePageTools-DYi9x7HJ.js → usePageTools-ChjnsxqE.js} +1 -1
- package/dist/web/assets/usePrimitiveElement-tPtHrVAh.js +1 -0
- package/dist/web/assets/{useProjectAgentRoster-KPwWl2jE.js → useProjectAgentRoster-Cv-2h61l.js} +1 -1
- package/dist/web/assets/{useRoutePeek-BiHDBRKc.js → useRoutePeek-6T3XqFw1.js} +1 -1
- package/dist/web/assets/useTeamWork-rjEihEaF.js +1 -0
- package/dist/web/assets/{useTypeahead-D_Z5P9Xm.js → useTypeahead-BBlzBvAi.js} +1 -1
- package/dist/web/assets/{utils-CAAvfQSj.js → utils-Bhge2HAf.js} +1 -1
- package/dist/web/assets/{utils-D6RjkXrh.js → utils-DVo87S8o.js} +1 -1
- package/dist/web/assets/{verification-DoN2EFaZ.js → verification-BKmnZihv.js} +1 -1
- package/dist/web/assets/{version-DbJq2Cfv.js → version-BYqyCHiB.js} +1 -1
- package/dist/web/assets/{vue-router-BwoPnYha.js → vue-router-BJZE7CCr.js} +1 -1
- package/dist/web/index.html +77 -76
- package/docs/agent-roundtable.md +5 -3
- package/graph-provider/fuli_graph/app.py +4 -0
- package/graph-provider/fuli_graph/graph_field_contract.py +2 -0
- package/graph-provider/fuli_graph/graph_format_migrations.py +5 -0
- package/graph-provider/fuli_graph/knowledge_search.py +84 -7
- package/graph-provider/fuli_graph/knowledge_sensitivity.py +105 -0
- package/graph-provider/fuli_graph/knowledge_source_delete_copies.py +36 -0
- package/graph-provider/fuli_graph/knowledge_statement.py +230 -0
- package/graph-provider/fuli_graph/knowledge_statement_days.py +109 -0
- package/graph-provider/fuli_graph/models.py +25 -0
- package/graph-provider/fuli_graph/project_agent_remote_origins.py +27 -13
- package/graph-provider/pyproject.toml +1 -1
- package/native/win32/fuli-win-helper.exe +0 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/packages/roundtable/src/agents/claude-code/wake.js +13 -8
- package/packages/roundtable/src/host.js +21 -0
- package/packages/roundtable/src/peer/control-cli.js +35 -3
- package/packages/roundtable/src/peer/control.js +24 -5
- package/packages/roundtable/src/peer/coordinator-service.js +44 -21
- package/packages/roundtable/src/peer/coordinator-store.js +11 -4
- package/packages/roundtable/src/peer/lan-addresses.js +16 -1
- package/packages/roundtable/src/peer/nearby-discovery.js +105 -44
- package/packages/roundtable/src/peer/nearby-pairing.js +13 -1
- package/packages/roundtable/src/peer/origin-proof.js +17 -2
- package/packages/roundtable/src/peer/pairing-share.js +139 -0
- package/packages/roundtable/src/peer/peer-port.js +45 -7
- package/packages/roundtable/src/peer/peer-runtime.js +199 -46
- package/packages/roundtable/src/peer/protocol.js +68 -2
- package/packages/roundtable/src/peer/query-answer.js +78 -0
- package/packages/roundtable/src/peer/runner.js +107 -13
- package/packages/roundtable/src/roundtable/service.js +73 -14
- package/packages/roundtable/src/roundtable/store.js +8 -0
- package/packages/roundtable/src/roundtable/wake-attempt-store.js +26 -0
- package/packages/roundtable/src/roundtable/wake-failure.js +77 -0
- package/packages/roundtable/src/roundtable/wake-ladder.js +5 -0
- package/packages/roundtable/src/roundtable/wake.js +39 -15
- package/packages/roundtable/src/standalone/host.js +5 -2
- package/skills/capturing-session-knowledge/references/coordination.md +11 -0
- package/skills/operating-fuli/SKILL.md +13 -3
- package/skills/operating-fuli/references/workflow-recipes.md +4 -3
- package/src/agent-apps/host-tools/catalog.js +3 -0
- package/src/agent-delegation/operation-log.js +15 -1
- package/src/agent-delegation/port.js +1 -2
- package/src/agent-peer/http.js +15 -1
- package/src/agent-roundtable/tools.js +8 -0
- package/src/agent-tools/graph-definitions.js +2 -0
- package/src/agent-tools/graph-handlers.js +2 -0
- package/src/agent-tools/interface-catalog.js +6 -4
- package/src/agent-tools/statement-definitions.js +18 -0
- package/src/data-format/local-stores.js +3 -0
- package/src/desktop/windows-controller.js +17 -4
- package/src/desktop/windows-installation-context.js +26 -1
- package/src/diagnostics/failure-records.js +16 -0
- package/src/diagnostics/query.js +2 -2
- package/src/diagnostics/safe-event.js +4 -12
- package/src/external-knowledge/safe-diagnostic.js +2 -5
- package/src/graphiti/local-runtimes.js +9 -0
- package/src/graphiti/project-agent-task-sessions.js +49 -0
- package/src/graphiti/provider-client.js +8 -0
- package/src/graphiti/roundtable-host.js +53 -0
- package/src/graphiti/task-context-entry.js +10 -6
- package/src/http/api-router.js +4 -0
- package/src/http/graph-api-router.js +5 -2
- package/src/http/statement-api-router.js +27 -0
- package/src/http/visitor-access-api-router.js +37 -0
- package/src/judgment/store.js +9 -0
- package/src/knowledge-impressions/store.js +72 -9
- package/src/mcp/create-mcp-server.js +2 -0
- package/src/mcp/session-id.js +1 -1
- package/src/mcp/tool-annotations.js +4 -1
- package/src/notices/recent-notices.js +2 -1
- package/src/presence/windows-helper-pin.js +1 -1
- package/src/statement/agent-tool.js +29 -0
- package/src/statement/compounding-statement.js +134 -0
- package/src/text/control-characters.js +9 -0
- package/src/text/local-paths.js +48 -0
- package/src/text/shareable-text.js +23 -0
- package/src/visitor-access/port.js +194 -0
- package/src/visitor-access/rate-limit.js +26 -0
- package/src/visitor-access/shared-project-search.js +129 -0
- package/src/visitor-access/store.js +192 -0
- package/src/whats-new/lines/0.27.2.json +13 -0
- package/src/whats-new/lines/0.27.3.json +13 -0
- package/dist/web/assets/AboutSectionHeading-DjXpIV27.css +0 -1
- package/dist/web/assets/AboutSectionHeading-DwvCvoqO.js +0 -1
- package/dist/web/assets/AgentAppsPage-Cp2-sZXi.js +0 -1
- package/dist/web/assets/AgentAvatar-CDhU4m0T.js +0 -1
- package/dist/web/assets/AgentAvatar-DbsG1_BY.css +0 -1
- package/dist/web/assets/AgentProfilePage-DcOBhuHG.js +0 -5
- package/dist/web/assets/AgentServicesPage-CAL-JT1J.js +0 -1
- package/dist/web/assets/DebugTurnPage-B8YhpTPm.js +0 -1
- package/dist/web/assets/EmployeeScopeDialog-BZymZidB.js +0 -1
- package/dist/web/assets/EmployeeWorkbench-BnxEZCSS.js +0 -4
- package/dist/web/assets/FieldRoot-D6HtUgDA.js +0 -1
- package/dist/web/assets/FlasPage-DtkW-_9f.js +0 -1
- package/dist/web/assets/HowtoPage-B8f5J_An.js +0 -1
- package/dist/web/assets/HowtoPage-CrvMmT6K.css +0 -1
- package/dist/web/assets/KnowledgeItemEditPage-DV8TVpvf.js +0 -1
- package/dist/web/assets/KnowledgeOrganizerPage-C4G6JCmG.js +0 -1
- package/dist/web/assets/KnowledgePage-Afiw2Kxy.js +0 -1
- package/dist/web/assets/KnowledgePeek-DIcPS9WU.js +0 -1
- package/dist/web/assets/KnowledgeTurnReceiptPage-7ncXkxKd.js +0 -1
- package/dist/web/assets/MenuSeparator-yD3wld9s.js +0 -1
- package/dist/web/assets/ModelSettingsPage-BqClsFmC.js +0 -1
- package/dist/web/assets/NoticeRow-CQShZQtw.js +0 -1
- package/dist/web/assets/NoticeRow-ktVO_9Es.css +0 -1
- package/dist/web/assets/OccupationsPage-BrBus-nh.js +0 -1
- package/dist/web/assets/OverviewPage-Cq89Klha.js +0 -1
- package/dist/web/assets/OverviewPage-KVt4LcE-.css +0 -1
- package/dist/web/assets/PageColumns-CgIXTt4J.js +0 -1
- package/dist/web/assets/PageColumns-DEideeB7.css +0 -1
- package/dist/web/assets/PersonalProfilePage-C_dmUEuW.js +0 -1
- package/dist/web/assets/PersonalProjectsPage-CiCFHVt_.js +0 -1
- package/dist/web/assets/PopperContent-CCmt2yHl.js +0 -1
- package/dist/web/assets/ProjectAgentsPage-B5r0DKWL.js +0 -5
- package/dist/web/assets/RecentNotices-DYXEBfYm.js +0 -1
- package/dist/web/assets/RoundtablesPage-DlAXApKi.js +0 -13
- package/dist/web/assets/RovingFocusGroup-CI4aZr1z.js +0 -1
- package/dist/web/assets/SessionMigrationPage-CVKkTACn.js +0 -1
- package/dist/web/assets/SettingsPage-BcrAdXX7.js +0 -1
- package/dist/web/assets/SettingsPage-BlhCcwPn.css +0 -1
- package/dist/web/assets/TaskBlockerClear-DGaXP2ak.js +0 -1
- package/dist/web/assets/TaskBlockerNotice-8nogmPA-.js +0 -1
- package/dist/web/assets/TeamCardsWidget-BOf6oHOp.js +0 -1
- package/dist/web/assets/UiSegmented-CRJ06vHP.js +0 -1
- package/dist/web/assets/WidgetSlot-C5h--noP.js +0 -2
- package/dist/web/assets/WorkbenchListHead-D40-J4GT.js +0 -1
- package/dist/web/assets/WorkbenchListPage-BX6Z9gkB.css +0 -1
- package/dist/web/assets/WorkbenchListPage-CJUvq4Ac.js +0 -1
- package/dist/web/assets/_plugin-vue_export-helper-D9CtLGVz.js +0 -9
- package/dist/web/assets/agent-occupation-Dhoz7LjT.js +0 -1
- package/dist/web/assets/agent-workflows-BS4KlKFj.js +0 -1
- package/dist/web/assets/combobox-DE0HzdKP.js +0 -1
- package/dist/web/assets/conversation-launcher-settings-D4vYOpHN.js +0 -1
- package/dist/web/assets/copy-mention-Crs0NIJB.js +0 -1
- package/dist/web/assets/dropdown-menu-C5Kf9x2y.js +0 -1
- package/dist/web/assets/index-C2o_v2mq.js +0 -24
- package/dist/web/assets/label-table-CuTFbFd3.js +0 -1
- package/dist/web/assets/model-Bb0VtRJH.js +0 -1
- package/dist/web/assets/motion-Cw_hptY4.js +0 -1
- package/dist/web/assets/overview-data-BIeNATEJ.js +0 -1
- package/dist/web/assets/popup-host-DWJ1gygp.js +0 -1
- package/dist/web/assets/radio-group-DJ5np5d_.js +0 -1
- package/dist/web/assets/select-DJ7iyJ-X.js +0 -1
- package/dist/web/assets/settings-tabs-B9pCaEFP.js +0 -1
- package/dist/web/assets/shared-report-KyuP8oQk.js +0 -3
- package/dist/web/assets/tabs-D0TAS18R.js +0 -1
- package/dist/web/assets/ui-CJiEsCpv.js +0 -1
- package/dist/web/assets/useForwardScopeId-DYW8CZTp.js +0 -1
- package/dist/web/assets/usePrimitiveElement-DdC34jzt.js +0 -1
- package/dist/web/assets/useTeamPeople-Od3dDz6d.js +0 -1
- package/dist/web/assets/useTeamWork-CDKVZwYe.js +0 -1
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
// Sharing the leads of the projects both computers have, once per pairing.
|
|
2
|
+
//
|
|
3
|
+
// Confirming a pairing (the 6 digits on each computer, or joining with an
|
|
4
|
+
// invitation) is the person's consent, said before they confirm, to share the
|
|
5
|
+
// leads of at most AUTO_SHARE_LIMIT projects the other computer reports having
|
|
6
|
+
// too (the same own repository, matched on the coordinator). It happens only in
|
|
7
|
+
// a group of exactly these two computers: a share is published to the whole
|
|
8
|
+
// group, so with a third computer the person shares with one click instead,
|
|
9
|
+
// told that the others can ask too. More matches than the limit share nothing
|
|
10
|
+
// and leave the same one click, with the number in front of the person.
|
|
11
|
+
//
|
|
12
|
+
// What counts as an answer: the coordinator holds both computers' digests
|
|
13
|
+
// under its current key (a coordinator that moved its listener has a new key,
|
|
14
|
+
// and the other computer sends its digests again only at its next publish).
|
|
15
|
+
// Until then it asks again every attemptMs, for at most `attempts` times; only
|
|
16
|
+
// a real answer or that bound writes the record, which stays until the person
|
|
17
|
+
// turns the LAN roundtable off or revokes the device, so it runs once per
|
|
18
|
+
// paired device. An existing share is never changed and none is removed; a
|
|
19
|
+
// project the person shared or unticked since the pairing keeps their choice.
|
|
20
|
+
export const AUTO_SHARE_LIMIT = 8;
|
|
21
|
+
const ATTEMPT_MS = 10_000;
|
|
22
|
+
// 18 attempts 10 s apart: three minutes, three publish intervals of the other computer.
|
|
23
|
+
const ATTEMPTS = 18;
|
|
24
|
+
const RECORDS = 'autoShared';
|
|
25
|
+
|
|
26
|
+
// port: setting(key), setSetting(key, value), paired(), match(fingerprint),
|
|
27
|
+
// prepare(projects), sharedProjectIds(), touchedSince(projectId, since),
|
|
28
|
+
// writeShares(shares), afterWrite().
|
|
29
|
+
export function createPairingShare({ port, clock = Date.now, attemptMs = ATTEMPT_MS, attempts = ATTEMPTS, onError = () => {} }) {
|
|
30
|
+
// One waiting timer per device, and the pairing (its `since`) an attempt is
|
|
31
|
+
// running for: a new pairing of the same device runs its own attempt, and
|
|
32
|
+
// the older one stops at its next check, so nothing waits on a stale run.
|
|
33
|
+
const timers = new Map();
|
|
34
|
+
const running = new Map();
|
|
35
|
+
const records = () => port.setting(RECORDS) ?? {};
|
|
36
|
+
const write = (fingerprint, record) => port.setSetting(RECORDS, { ...records(), [fingerprint]: record });
|
|
37
|
+
|
|
38
|
+
// A new pairing with this device: nothing happens when it already ran.
|
|
39
|
+
function start(fingerprint) {
|
|
40
|
+
if (records()[fingerprint]) return;
|
|
41
|
+
cancel(fingerprint);
|
|
42
|
+
const since = clock();
|
|
43
|
+
write(fingerprint, { state: 'pending', since, until: since + attemptMs * (attempts - 1) });
|
|
44
|
+
return attempt(fingerprint);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function cancel(fingerprint) {
|
|
48
|
+
clearTimeout(timers.get(fingerprint));
|
|
49
|
+
timers.delete(fingerprint);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function later(fingerprint) {
|
|
53
|
+
cancel(fingerprint);
|
|
54
|
+
const timer = setTimeout(() => {
|
|
55
|
+
timers.delete(fingerprint);
|
|
56
|
+
attempt(fingerprint).catch(onError);
|
|
57
|
+
}, attemptMs);
|
|
58
|
+
timer.unref?.();
|
|
59
|
+
timers.set(fingerprint, timer);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const pending = (fingerprint, since) => {
|
|
63
|
+
const record = records()[fingerprint];
|
|
64
|
+
return record?.state === 'pending' && (since === undefined || record.since === since) ? record : null;
|
|
65
|
+
};
|
|
66
|
+
// Still this pairing, still paired: checked after every wait.
|
|
67
|
+
const current = (fingerprint, record) => Boolean(pending(fingerprint, record.since)) && port.paired();
|
|
68
|
+
|
|
69
|
+
async function attempt(fingerprint) {
|
|
70
|
+
const record = pending(fingerprint);
|
|
71
|
+
if (!record || running.get(fingerprint) === record.since || !port.paired()) return;
|
|
72
|
+
running.set(fingerprint, record.since);
|
|
73
|
+
try {
|
|
74
|
+
const match = await port.match(fingerprint);
|
|
75
|
+
if (!current(fingerprint, record)) return;
|
|
76
|
+
if (!match.settled) return waitMore(fingerprint, record);
|
|
77
|
+
if (match.others > 0) return finish(fingerprint, record, { projects: [], skipped: 'group', matched: match.common.length });
|
|
78
|
+
if (match.common.length > AUTO_SHARE_LIMIT) {
|
|
79
|
+
return finish(fingerprint, record, { projects: [], skipped: 'too_many', matched: match.common.length });
|
|
80
|
+
}
|
|
81
|
+
const fresh = (project) => !port.sharedProjectIds().has(project.projectId) && !port.touchedSince(project.projectId, record.since);
|
|
82
|
+
const prepared = await port.prepare(match.common.filter(fresh));
|
|
83
|
+
if (!current(fingerprint, record)) return;
|
|
84
|
+
// The group is read again: a device that joined while the shares were prepared would see them too.
|
|
85
|
+
const again = await port.match(fingerprint);
|
|
86
|
+
// Checked again right before writing, with no wait in between: a revoke, a
|
|
87
|
+
// turn-off or the person's own save may have come meanwhile.
|
|
88
|
+
if (!current(fingerprint, record)) return;
|
|
89
|
+
if (!again.settled) return waitMore(fingerprint, record);
|
|
90
|
+
if (again.others > 0) return finish(fingerprint, record, { projects: [], skipped: 'group', matched: match.common.length });
|
|
91
|
+
const added = prepared.filter((entry) => fresh(entry.share));
|
|
92
|
+
if (added.length) port.writeShares(added.map((entry) => entry.share));
|
|
93
|
+
finish(fingerprint, record, { projects: added.map(({ share, projectName }) => ({ projectId: share.projectId, projectName })) });
|
|
94
|
+
if (added.length) await port.afterWrite();
|
|
95
|
+
} finally { if (running.get(fingerprint) === record.since) running.delete(fingerprint); }
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function waitMore(fingerprint, record) {
|
|
99
|
+
if (clock() < record.until) later(fingerprint);
|
|
100
|
+
else finish(fingerprint, record, { projects: [], skipped: 'unanswered' });
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function finish(fingerprint, record, outcome) {
|
|
104
|
+
write(fingerprint, { state: 'done', since: record.since, at: new Date(clock()).toISOString(), ...outcome });
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// After a restart a pairing still waiting for its answer asks again.
|
|
108
|
+
function resume() {
|
|
109
|
+
for (const fingerprint of Object.keys(records())) if (pending(fingerprint)) attempt(fingerprint).catch(onError);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// A device revoked here or that left: its record and its waiting end.
|
|
113
|
+
function forget(fingerprint) {
|
|
114
|
+
cancel(fingerprint);
|
|
115
|
+
const { [fingerprint]: gone, ...rest } = records();
|
|
116
|
+
if (gone) port.setSetting(RECORDS, Object.keys(rest).length ? rest : null);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// The LAN roundtable turned off: every record and every waiting end.
|
|
120
|
+
function clear() {
|
|
121
|
+
close();
|
|
122
|
+
port.setSetting(RECORDS, null);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// What each finished pairing shared without a separate tick, or why it shared nothing.
|
|
126
|
+
const view = () => Object.entries(records()).filter(([, record]) => record.state === 'done')
|
|
127
|
+
.map(([nodeId, record]) => ({ nodeId, at: record.at, projects: record.projects,
|
|
128
|
+
...(record.skipped ? { skipped: record.skipped, matched: record.matched ?? 0 } : {}) }));
|
|
129
|
+
|
|
130
|
+
// A pairing still waiting for the coordinator's answer, so the card keeps reading status.
|
|
131
|
+
const waiting = () => Object.keys(records()).some((fingerprint) => pending(fingerprint));
|
|
132
|
+
|
|
133
|
+
function close() {
|
|
134
|
+
for (const timer of timers.values()) clearTimeout(timer);
|
|
135
|
+
timers.clear();
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return { start, resume, forget, clear, view, waiting, close };
|
|
139
|
+
}
|
|
@@ -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 } 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:
|
|
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: 'query' });
|
|
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(
|
|
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
|
}
|