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
|
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
5
5
|
import { readWindowsNativeBundle } from '../native-runtime/windows-assets.js';
|
|
6
6
|
import { isMainModule } from '../system/main-module.js';
|
|
7
7
|
import { runTrayAction } from './desktop-controller.js';
|
|
8
|
-
import { readWindowsInstallation } from './windows-installation-context.js';
|
|
8
|
+
import { readWindowsInstallation, WindowsInstallationSupersededError } from './windows-installation-context.js';
|
|
9
9
|
import { removeRetiredLaunchers } from './windows-node-launcher.js';
|
|
10
10
|
|
|
11
11
|
const PACKAGE_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '../..');
|
|
@@ -53,12 +53,24 @@ export function loadTrayContext({ packageRoot = PACKAGE_ROOT, env = process.env
|
|
|
53
53
|
}
|
|
54
54
|
const installed = readWindowsInstallation(root);
|
|
55
55
|
const dataDir = installed?.dataDir ?? validateTrayDataDir(root, config.dataDir, env);
|
|
56
|
-
return { packageRoot: root, dataDir, installRoot: installed?.installRoot ?? null,
|
|
57
|
-
instanceKey: createHash('sha256').update(dataDir.toLowerCase()).digest('hex').slice(0, 32),
|
|
56
|
+
return { packageRoot: root, dataDir, installRoot: installed?.installRoot ?? null, instanceKey: trayInstanceKey(dataDir),
|
|
58
57
|
nodePath: join(root, 'runtime', 'node', 'node.exe'), cliPath: join(root, 'src', 'cli.js'),
|
|
59
58
|
logDir: join(dataDir, 'logs'), nativeLogDir: join(dataDir, 'native-runtime', 'personal', 'logs') };
|
|
60
59
|
}
|
|
61
60
|
|
|
61
|
+
// The one-client lock of a data directory (windows-update-lock.js names the same).
|
|
62
|
+
const trayInstanceKey = dataDir => createHash('sha256').update(dataDir.toLowerCase()).digest('hex').slice(0, 32);
|
|
63
|
+
|
|
64
|
+
// What a client that runs from a version the installation replaced is told,
|
|
65
|
+
// for any action: nothing runs from it, but it still takes this data's
|
|
66
|
+
// one-client lock, so an update closes it and a second launch shows the
|
|
67
|
+
// running client, and it offers to open currentPackageRoot instead.
|
|
68
|
+
export function supersededReply(error) {
|
|
69
|
+
const { dataDir, packageRoot } = error.installation;
|
|
70
|
+
return { ok: false, status: 'superseded', error: error.message, dataDir,
|
|
71
|
+
instanceKey: trayInstanceKey(dataDir), currentPackageRoot: packageRoot };
|
|
72
|
+
}
|
|
73
|
+
|
|
62
74
|
// What a tray start tidies first: launchers an update set aside while a
|
|
63
75
|
// client still ran them (FuliNode.exe.<id>.old), once nothing holds them.
|
|
64
76
|
// Only the running tray starts FULI, and it holds the tray mutex every
|
|
@@ -81,7 +93,8 @@ if (isMainModule(import.meta.url)) {
|
|
|
81
93
|
process.stdout.write(JSON.stringify(result) + '\n');
|
|
82
94
|
if (!result.ok) process.exitCode = 1;
|
|
83
95
|
} catch (error) {
|
|
84
|
-
process.stdout.write(JSON.stringify(
|
|
96
|
+
process.stdout.write(JSON.stringify(error instanceof WindowsInstallationSupersededError ? supersededReply(error)
|
|
97
|
+
: { ok: false, status: 'unknown', error: error.message }) + '\n');
|
|
85
98
|
process.exitCode = 1;
|
|
86
99
|
}
|
|
87
100
|
}
|
|
@@ -17,6 +17,22 @@ export function windowsInstallPathsOverlap(a, b) {
|
|
|
17
17
|
return contains(a, b) || contains(b, a);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
const UNUSABLE_RECORD = 'FULI 的安装记录读不出来,或程序文件夹被移动过。请重新安装 FULI,数据文件夹不受影响。'
|
|
21
|
+
+ ' / FULI\'s installation record can\'t be read, or its program folder was moved. Reinstall FULI; your data folder is kept.';
|
|
22
|
+
|
|
23
|
+
// A version kept for rollback (or one an update replaced while it ran) after
|
|
24
|
+
// the installation moved on: its own receipt is intact, but installation.json
|
|
25
|
+
// names another version of the same installation and data. installation is
|
|
26
|
+
// that record; its packageRoot is the copy to open instead.
|
|
27
|
+
export class WindowsInstallationSupersededError extends Error {
|
|
28
|
+
constructor(installation) {
|
|
29
|
+
super('这是旧版本的 FULI,新版本已经装好了。请从开始菜单或桌面打开 FULI。'
|
|
30
|
+
+ ' / This is an older version of FULI; the new one is installed. Open FULI from the Start menu or Desktop.');
|
|
31
|
+
this.code = 'installation_superseded';
|
|
32
|
+
this.installation = installation;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
20
36
|
// A candidate cannot opt into daily data by changing its kind. Only a matching
|
|
21
37
|
// registration outside the package, at the registered slot, binds installed data.
|
|
22
38
|
export function readWindowsInstallation(packageRoot) {
|
|
@@ -24,7 +40,7 @@ export function readWindowsInstallation(packageRoot) {
|
|
|
24
40
|
const receiptPath = join(root, 'installed-context.json');
|
|
25
41
|
if (!existsSync(receiptPath)) return null;
|
|
26
42
|
const receipt = JSON.parse(readFileSync(receiptPath, 'utf8'));
|
|
27
|
-
const fail = () => { throw new Error(
|
|
43
|
+
const fail = () => { throw new Error(UNUSABLE_RECORD); };
|
|
28
44
|
if (receipt.version !== 1 || receipt.kind !== 'windows-user-installation'
|
|
29
45
|
|| !/^[a-f0-9-]{36}$/.test(receipt.installationId ?? '')
|
|
30
46
|
|| !['installRoot', 'packageRoot', 'dataDir'].every(key => typeof receipt[key] === 'string' && isAbsolute(receipt[key]))) fail();
|
|
@@ -34,6 +50,7 @@ export function readWindowsInstallation(packageRoot) {
|
|
|
34
50
|
|| root !== canonicalWindowsInstallPath(join(installRoot, 'versions', receipt.installationId))
|
|
35
51
|
|| windowsInstallPathsOverlap(installRoot, dataDir)) fail();
|
|
36
52
|
const record = JSON.parse(readFileSync(join(installRoot, 'installation.json'), 'utf8'));
|
|
53
|
+
if (supersedes(record, receipt)) throw new WindowsInstallationSupersededError(record);
|
|
37
54
|
if (record.status !== 'installed' || ['version', 'kind', 'installationId', 'installRoot', 'packageRoot', 'dataDir', 'inventorySha256']
|
|
38
55
|
.some(key => record[key] !== receipt[key])
|
|
39
56
|
|| record.applicationVersion !== JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')).version
|
|
@@ -42,6 +59,14 @@ export function readWindowsInstallation(packageRoot) {
|
|
|
42
59
|
return record;
|
|
43
60
|
}
|
|
44
61
|
|
|
62
|
+
// The record names another installed version of this installation and its data.
|
|
63
|
+
function supersedes(record, receipt) {
|
|
64
|
+
return record.status === 'installed' && record.kind === receipt.kind && /^[a-f0-9-]{36}$/.test(record.installationId ?? '')
|
|
65
|
+
&& record.installationId !== receipt.installationId && record.installRoot === receipt.installRoot
|
|
66
|
+
&& record.dataDir === receipt.dataDir
|
|
67
|
+
&& record.packageRoot === join(receipt.installRoot, 'versions', record.installationId);
|
|
68
|
+
}
|
|
69
|
+
|
|
45
70
|
// What an installed package runs to move adopted container data to native.
|
|
46
71
|
export function windowsMigrationCommand(packageRoot) {
|
|
47
72
|
return '"' + join(packageRoot, 'runtime', 'node', 'node.exe') + '" "' + join(packageRoot, 'src', 'cli.js')
|
|
@@ -32,6 +32,22 @@ export function recordToolFailure(log, { toolName, error, sessionId = null, star
|
|
|
32
32
|
}));
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
// A roundtable wake that did not answer (packages/roundtable wake-failure.js):
|
|
36
|
+
// codes, exit code and signal only. The client's output stays, redacted, in
|
|
37
|
+
// the roundtable store of this computer.
|
|
38
|
+
export function recordWakeFailure(log, { client, sessionMode, code, detail = null, exitCode = null, signal = null,
|
|
39
|
+
durationMs = null, remote = false }) {
|
|
40
|
+
return recorded(log, () => ({
|
|
41
|
+
component: 'roundtable',
|
|
42
|
+
operation: `wake ${client} ${sessionMode}`,
|
|
43
|
+
outcome: 'failed',
|
|
44
|
+
code: detail ?? code,
|
|
45
|
+
reason: `${remote ? 'A paired device\'s ask' : 'An ask'} could not wake ${client} in a ${sessionMode} session: ${code}`
|
|
46
|
+
+ `${detail ? ` (${detail})` : ''}${exitCode === null ? '' : `, exit code ${exitCode}`}${signal ? `, signal ${signal}` : ''}`,
|
|
47
|
+
durationMs
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
|
|
35
51
|
// Never throws: the caller's answer is already decided.
|
|
36
52
|
function recorded(log, fields) {
|
|
37
53
|
try { return log ? log.record(fields()) : false; } catch { return false; }
|
package/src/diagnostics/query.js
CHANGED
|
@@ -13,8 +13,8 @@ export const MAX_DIAGNOSTIC_LIMIT = 100;
|
|
|
13
13
|
const MAX_CODE_GROUPS = 50;
|
|
14
14
|
const CODE = /^[A-Za-z_][A-Za-z0-9_]{0,63}$/;
|
|
15
15
|
const CURSOR = /^(\d{1,15})\.([0-9a-f-]{36})$/;
|
|
16
|
-
const NOT_COVERED = 'Only failures caught at FULI\'s lifecycle hooks, HTTP API errors, native Graph Provider start '
|
|
17
|
-
+ '
|
|
16
|
+
const NOT_COVERED = 'Only failures caught at FULI\'s lifecycle hooks, HTTP API errors, native Graph Provider start, '
|
|
17
|
+
+ 'MCP tool errors and roundtable wakes that did not answer are recorded. A hard power loss, a process killed before it wrote, and failures outside '
|
|
18
18
|
+ 'these seams leave no event.';
|
|
19
19
|
|
|
20
20
|
export function diagnosticEventsAnswer(log, input = {}) {
|
|
@@ -2,7 +2,7 @@ import { randomUUID } from 'node:crypto';
|
|
|
2
2
|
|
|
3
3
|
import { isControlledError } from '../app/application-error.js';
|
|
4
4
|
import { FULI_VERSION } from '../package-metadata.js';
|
|
5
|
-
import {
|
|
5
|
+
import { shareableText } from '../text/shareable-text.js';
|
|
6
6
|
import { singleLine } from '../text/single-line.js';
|
|
7
7
|
import { utf8Preview } from '../text/utf8-preview.js';
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ import { utf8Preview } from '../text/utf8-preview.js';
|
|
|
13
13
|
// caller and never repeating a value); never a raw exception message.
|
|
14
14
|
|
|
15
15
|
export const DIAGNOSTIC_EVENT_VERSION = 1;
|
|
16
|
-
export const DIAGNOSTIC_COMPONENTS = Object.freeze(['hook', 'http', 'provider', 'mcp']);
|
|
16
|
+
export const DIAGNOSTIC_COMPONENTS = Object.freeze(['hook', 'http', 'provider', 'mcp', 'roundtable']);
|
|
17
17
|
export const DIAGNOSTIC_LEVELS = Object.freeze(['error', 'warning']);
|
|
18
18
|
// failed: FULI could not do it. refused: FULI answered the caller with an error it can act on.
|
|
19
19
|
const LEVEL_OF_OUTCOME = Object.freeze({ failed: 'error', refused: 'warning' });
|
|
@@ -24,11 +24,6 @@ const OPERATION_BYTES = 120;
|
|
|
24
24
|
const REASON_BYTES = 240;
|
|
25
25
|
const MAX_DURATION_MS = 24 * 60 * 60 * 1000;
|
|
26
26
|
|
|
27
|
-
const URL_WITH_PARTS = /\b([a-z][a-z0-9+.-]*:\/\/)(?:[^\s/@]*@)?([^\s?#]*)(\?[^\s#]*)?(#\S*)?/gi;
|
|
28
|
-
// A long opaque value (task token, session secret, signed id) with no name before it.
|
|
29
|
-
const OPAQUE_VALUE = /\b[A-Za-z0-9_-]{32,}\b/g;
|
|
30
|
-
const LOCAL_PATH = /(?:\b[A-Za-z]:[\\/]|\\\\|(?<![\w.])\/(?:home|Users|mnt|root|tmp|var|private)\/)[^\s'"]*/g;
|
|
31
|
-
|
|
32
27
|
// An error's code or class when it is a fixed identifier; null otherwise.
|
|
33
28
|
export function errorCode(error) {
|
|
34
29
|
return [error?.code, error?.name].find(value => typeof value === 'string' && SAFE_CODE.test(value)) ?? null;
|
|
@@ -44,11 +39,8 @@ export function failureReason(error, fallback) {
|
|
|
44
39
|
// Text kept for an Agent to read: one line, URL credentials dropped and query
|
|
45
40
|
// values masked, local paths, secrets and long opaque values replaced.
|
|
46
41
|
function safeText(value, limit = REASON_BYTES) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
`${scheme}${rest}${query && `?${query.slice(1).split('&').map(pair => `${pair.split('=')[0]}=…`).join('&')}`}`)
|
|
50
|
-
.replace(LOCAL_PATH, '[path]');
|
|
51
|
-
return utf8Preview(redactSensitiveContent(text).replace(OPAQUE_VALUE, '[redacted:opaque]'), limit);
|
|
42
|
+
// An operation names the console's own routes (POST /api/…), which are no local paths.
|
|
43
|
+
return utf8Preview(shareableText(singleLine(value), { mode: 'keep-routes' }), limit);
|
|
52
44
|
}
|
|
53
45
|
|
|
54
46
|
// One event as it is stored. component, outcome and operation are required;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { detectSensitiveContent } from '../security/sensitive-content.js';
|
|
2
|
+
import { withoutControls } from '../text/control-characters.js';
|
|
2
3
|
|
|
3
4
|
const PROTECTED_DIAGNOSTIC = 'External source failed; protected diagnostic omitted.';
|
|
4
5
|
|
|
5
6
|
export function safeExternalSourceDiagnostic(reason) {
|
|
6
7
|
const message = reason instanceof Error ? reason.message : String(reason ?? '');
|
|
7
8
|
if (detectSensitiveContent(message).restricted) return PROTECTED_DIAGNOSTIC;
|
|
8
|
-
const normalized = message
|
|
9
|
-
.replace(/[\p{Cc}\p{Cf}\p{Cs}]+/gu, ' ')
|
|
10
|
-
.replace(/\s+/gu, ' ')
|
|
11
|
-
.trim()
|
|
12
|
-
.slice(0, 1_000);
|
|
9
|
+
const normalized = withoutControls(message).slice(0, 1_000);
|
|
13
10
|
return normalized || 'External source failed without a diagnostic.';
|
|
14
11
|
}
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
import { createStandingAssignments } from '../standing-assignments/port.js';
|
|
23
23
|
import { createAgentWorkflows } from '../agent-workflows/port.js';
|
|
24
24
|
import { RecallImpressionsStore } from '../knowledge-impressions/store.js';
|
|
25
|
+
import { DELEGATION_LOG_FILE, DelegatedOperationLog } from '../agent-delegation/operation-log.js';
|
|
25
26
|
import { createAgentAvatars } from '../agent-avatars/port.js';
|
|
26
27
|
import { createProjectChangeLog } from '../project-change-log/port.js';
|
|
27
28
|
import { createPersonProfile } from '../person-profile/port.js';
|
|
@@ -29,6 +30,7 @@ import { createProjectOrganizing } from '../project-organizing/port.js';
|
|
|
29
30
|
import { isLoopbackUrl } from '../external-knowledge/connectors/response-values.js';
|
|
30
31
|
import { entryPromptRecords } from '../agent-delegation/entry-prompts.js';
|
|
31
32
|
import { createWorkSurfaces } from '../work-surfaces/port.js';
|
|
33
|
+
import { createVisitorAccess } from '../visitor-access/port.js';
|
|
32
34
|
import { createOldDataShelf } from '../old-data/port.js';
|
|
33
35
|
import { createOccupationPlugins } from '../occupation-plugins/port.js';
|
|
34
36
|
import { workSurfaceNames, workSurfaceSources } from '../work-surfaces/sources.js';
|
|
@@ -97,8 +99,13 @@ export function openLocalRuntimes(app, { runtimeConfigPath, paths, env, fetchImp
|
|
|
97
99
|
app.agentWorkflows = createAgentWorkflows({ path: join(dataDir, 'agent-workflows.sqlite') });
|
|
98
100
|
// Which knowledge the automatic recall showed and which the Agent reported using (rec#63); recall reads it as a ranking prior.
|
|
99
101
|
app.recallImpressions = new RecallImpressionsStore(join(dataDir, 'recall-impressions.sqlite'));
|
|
102
|
+
// Read here only for the compounding statement's count of changes made for the person;
|
|
103
|
+
// the console's delegation port alone records them. A missing file reads as none.
|
|
104
|
+
app.delegatedOperations = new DelegatedOperationLog(join(dataDir, DELEGATION_LOG_FILE));
|
|
100
105
|
// Each Agent's look as the person chose it (rec#11 D-89); the file is created by the first choice.
|
|
101
106
|
app.agentAvatars = createAgentAvatars({ path: join(dataDir, 'agent-avatars.sqlite') });
|
|
107
|
+
// What visitors from other computers read of a shared project, and each requester's mode; created by the first one.
|
|
108
|
+
app.visitorAccess = createVisitorAccess({ path: join(dataDir, 'visitor-access.sqlite'), application: app });
|
|
102
109
|
// What changed in each project's profile; the file is created by the first change.
|
|
103
110
|
app.projectChangeLog = createProjectChangeLog({ path: join(dataDir, 'project-change-log.sqlite') });
|
|
104
111
|
// The person's own name and picture (「我」); the file is created by the first change.
|
|
@@ -137,7 +144,9 @@ export function closeLocalRuntimes(app) {
|
|
|
137
144
|
app.standingAssignments?.close();
|
|
138
145
|
app.agentWorkflows?.close();
|
|
139
146
|
app.recallImpressions?.close();
|
|
147
|
+
app.delegatedOperations?.close();
|
|
140
148
|
app.agentAvatars?.close();
|
|
149
|
+
app.visitorAccess?.close();
|
|
141
150
|
app.occupationPlugins?.close();
|
|
142
151
|
app.projectChangeLog?.close();
|
|
143
152
|
app.workSurfaces?.close();
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { isFuliProcessSession } from '../mcp/session-id.js';
|
|
2
|
+
|
|
3
|
+
// Which client sessions an open task runs in, for 今天's 正在干活: only what the
|
|
4
|
+
// task's own records name. Each progress event keeps the client and session
|
|
5
|
+
// that reported it, and the task keeps the session it came from. Nothing is
|
|
6
|
+
// guessed: a task that names no client has no sessions. One per client, its
|
|
7
|
+
// latest session, so the console shows one mark per client. A client whose
|
|
8
|
+
// only session ID is one FULI gave its own MCP process is still listed, with
|
|
9
|
+
// no session: the client is known, the conversation to open is not. Read from
|
|
10
|
+
// the task as already listed, so it costs no further read.
|
|
11
|
+
const TASK_SESSION_LIMIT = 3;
|
|
12
|
+
const FINISHED = new Set(['completed', 'failed', 'cancelled']);
|
|
13
|
+
|
|
14
|
+
// The console writes a client lower-case with spaces and dashes as underscores,
|
|
15
|
+
// so `claude-code`, `Claude Code` and `claude_code` are one client there too.
|
|
16
|
+
function normalisedClient(value) {
|
|
17
|
+
return typeof value === 'string'
|
|
18
|
+
? value.trim().toLocaleLowerCase().replaceAll('-', '_').replaceAll(' ', '_')
|
|
19
|
+
: '';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** At most three `{ client, sessionId | null }`, one per client: the latest reporters first, then the session the task came from. */
|
|
23
|
+
export function taskSessions(task) {
|
|
24
|
+
if (FINISHED.has(task.status)) return [];
|
|
25
|
+
const events = task.events ?? [];
|
|
26
|
+
const sessions = new Map();
|
|
27
|
+
const complete = () => sessions.size === TASK_SESSION_LIMIT
|
|
28
|
+
&& [...sessions.values()].every(session => session.sessionId);
|
|
29
|
+
const record = (reported, sessionId) => {
|
|
30
|
+
const client = normalisedClient(reported);
|
|
31
|
+
// The console shows nothing for `other`, so it takes no place here either.
|
|
32
|
+
if (!client || client === 'other') return;
|
|
33
|
+
// A session ID FULI gave its own MCP process names no conversation the person could open.
|
|
34
|
+
const opens = sessionId && !isFuliProcessSession(sessionId) ? sessionId : null;
|
|
35
|
+
const listed = sessions.get(client);
|
|
36
|
+
if (listed) listed.sessionId ??= opens;
|
|
37
|
+
else if (sessions.size < TASK_SESSION_LIMIT) sessions.set(client, { client, sessionId: opens });
|
|
38
|
+
};
|
|
39
|
+
// Newest first, without copying the list: once three clients each name a
|
|
40
|
+
// session, an older event can only repeat a client already listed.
|
|
41
|
+
for (let index = events.length - 1; index >= 0; index -= 1) {
|
|
42
|
+
const event = events[index];
|
|
43
|
+
if (!event || typeof event !== 'object') continue;
|
|
44
|
+
record(event.sourceApplication, event.sourceSessionId);
|
|
45
|
+
if (complete()) break;
|
|
46
|
+
}
|
|
47
|
+
record(task.sourceApplication, task.sourceSessionId);
|
|
48
|
+
return [...sessions.values()];
|
|
49
|
+
}
|
|
@@ -626,6 +626,14 @@ export class GraphitiProviderClient {
|
|
|
626
626
|
method: 'POST', body: { personal_space_id: personalSpaceId }
|
|
627
627
|
});
|
|
628
628
|
}
|
|
629
|
+
// The graph's counts for the person's compounding statement (src/statement); counts only.
|
|
630
|
+
readKnowledgeStatement(input) {
|
|
631
|
+
return this.#request('/v1/knowledge/statement', { method: 'POST', body: input });
|
|
632
|
+
}
|
|
633
|
+
// The same counts per local day of the range's offset, days with nothing left out.
|
|
634
|
+
readKnowledgeStatementDays(input) {
|
|
635
|
+
return this.#request('/v1/knowledge/statement/days', { method: 'POST', body: input });
|
|
636
|
+
}
|
|
629
637
|
// rec#20: a turn's receipt as an Agent reads it (knowledge-reader.js). The
|
|
630
638
|
// console's item views and full reads use its own port (src/knowledge-owner-reads).
|
|
631
639
|
readTurnReceipt(input) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { assertRoundtableHost } from '../../packages/roundtable/src/host.js';
|
|
2
|
+
import { QUERY_REFUSED } from '../../packages/roundtable/src/peer/query-answer.js';
|
|
2
3
|
import { loadProjectTeam } from './project-team-view.js';
|
|
3
4
|
import { recordProjectMemoryUsage } from './project-memory-usage.js';
|
|
4
5
|
import { activeAgentRequestSignal, activeSealedWorkerRequest } from '../app/agent-request-context.js';
|
|
@@ -7,6 +8,13 @@ import { identityKey } from '../text/name-identity.js';
|
|
|
7
8
|
import { groupMemberContext } from './group-member-context.js';
|
|
8
9
|
import { localOriginRemoteKey, ownRemotes } from './repository-remote.js';
|
|
9
10
|
import { findRepositoryRoot } from './project-path-context.js';
|
|
11
|
+
import { recordWakeFailure } from '../diagnostics/failure-records.js';
|
|
12
|
+
import { withoutControls } from '../text/control-characters.js';
|
|
13
|
+
import { shareableText } from '../text/shareable-text.js';
|
|
14
|
+
|
|
15
|
+
// What the host refuses on its own (the share's lead): the sender learns only QUERY_REFUSED.
|
|
16
|
+
const LEAD_REFUSALS = new Set(['lead_unreadable', 'lead_changed']);
|
|
17
|
+
const SESSION_PROJECT_ID = /^conversation-[0-9a-f]{64}$/;
|
|
10
18
|
|
|
11
19
|
// FULI as the Roundtable host: Agents, projects, task identity and wake
|
|
12
20
|
// authority all come from the Provider of this device's personal space.
|
|
@@ -14,11 +22,19 @@ export function createFuliRoundtableHost(app, { warn = line => process.stderr.wr
|
|
|
14
22
|
const spaceId = () => app.config.personal.spaceId;
|
|
15
23
|
const projectView = project => ({ projectId: project.project_id ?? project.personal_project_id ?? project.id,
|
|
16
24
|
name: project.profile?.name ?? project.name ?? null, temporary: project.scope_type === 'temporary',
|
|
25
|
+
// The project task entry makes for a session it could not match: it has no repository and no name of its own.
|
|
26
|
+
sessionOnly: SESSION_PROJECT_ID.test(project.project_id ?? '') || project.profile?.origin === 'conversation_fallback',
|
|
17
27
|
archived: project.profile?.lifecycle === 'archived', repositories: ownRemotes(project) });
|
|
18
28
|
const projects = async () => {
|
|
19
29
|
const value = await app.personal.listPersonalProjects(spaceId());
|
|
20
30
|
return Array.isArray(value) ? value : value?.projects ?? [];
|
|
21
31
|
};
|
|
32
|
+
const visitor = requester => ({ key: `peer:${requester.node}`, label: requester.name, agentName: requester.agentName });
|
|
33
|
+
// The lead a visit is checked against, as read now; null when it cannot be read.
|
|
34
|
+
// A card needs the lead's name and responsibility; a search only its id.
|
|
35
|
+
const currentLead = (projectId, action) => (action === 'card'
|
|
36
|
+
? loadProjectTeam(app, spaceId(), projectId).then(team => team?.lead ?? null, () => null)
|
|
37
|
+
: projectLeadId(projectId).then(agentId => (agentId ? { agentId } : null), () => null));
|
|
22
38
|
const projectLeadId = async projectId =>
|
|
23
39
|
(await app.personal.getProjectAgentCoordinationPolicy(spaceId(), projectId)).team_lead_agent_id ?? null;
|
|
24
40
|
// A standing-assignments store this run cannot read (a newer format, a
|
|
@@ -36,6 +52,7 @@ export function createFuliRoundtableHost(app, { warn = line => process.stderr.wr
|
|
|
36
52
|
return assertRoundtableHost({
|
|
37
53
|
spaceId,
|
|
38
54
|
listAgents: () => app.listProjectAgents({ personalSpaceId: spaceId() }),
|
|
55
|
+
agentLooks: () => app.agentAvatars?.list(spaceId()).avatars ?? [],
|
|
39
56
|
async recentSessions({ agentId, projectId = null, limit = 5 }) {
|
|
40
57
|
const sessions = await app.personal.recentAgentSessions({ personalSpaceId: spaceId(), agentId,
|
|
41
58
|
personalProjectId: projectId, limit });
|
|
@@ -108,10 +125,46 @@ export function createFuliRoundtableHost(app, { warn = line => process.stderr.wr
|
|
|
108
125
|
source_application: client, message_id: messageId, digest, target_node: targetNode,
|
|
109
126
|
binding_id: bindingId, expires_at: expiresAt, ...(purpose ? { purpose } : {}) }),
|
|
110
127
|
remoteOriginAuthority: () => app.personal.getRemoteOriginAuthority(spaceId()),
|
|
128
|
+
// A paired device's visiting assistant reads one shared project (its lead's
|
|
129
|
+
// card, or a search) through the visitor-access port, which reserves,
|
|
130
|
+
// records and counts the attempt first; only then are the lead and the
|
|
131
|
+
// project read, so a device past its limits causes no Provider read. It
|
|
132
|
+
// answers only while the share's Agent is, as read now, the project's lead:
|
|
133
|
+
// an id missing on either side or a lead that cannot be read refuses
|
|
134
|
+
// (recorded with its code; the sender gets the one word every refusal
|
|
135
|
+
// before the search gets). The requester key is the asking device's
|
|
136
|
+
// verified fingerprint (requester.node, checked by the runner against its
|
|
137
|
+
// certificate); name and agentName are display text only.
|
|
138
|
+
async searchSharedProject({ projectId, agentId, requester, query }) {
|
|
139
|
+
if (!app.visitorAccess) return { ok: false, code: 'search_unavailable' };
|
|
140
|
+
const who = visitor(requester);
|
|
141
|
+
const leadRefusal = lead => (!lead ? 'lead_unreadable' : lead.agentId && lead.agentId === agentId ? null : 'lead_changed');
|
|
142
|
+
const currentShareLead = () => (typeof agentId === 'string' && agentId ? currentLead(projectId, query.action) : null);
|
|
143
|
+
const answer = query.action === 'card'
|
|
144
|
+
? await app.visitorAccess.showSharedCard({ projectId, requester: who, card: async () => {
|
|
145
|
+
const lead = await currentShareLead();
|
|
146
|
+
const code = leadRefusal(lead);
|
|
147
|
+
if (code) return { code };
|
|
148
|
+
const project = await app.personal.getPersonalProject(spaceId(), projectId).then(projectView, () => null);
|
|
149
|
+
return { name: lead.name, responsibility: lead.responsibility, projectName: project?.name };
|
|
150
|
+
} })
|
|
151
|
+
: await app.visitorAccess.searchSharedProject({ projectId, queries: query.queries, requester: who,
|
|
152
|
+
confirm: async () => leadRefusal(await currentShareLead()) });
|
|
153
|
+
return !answer.ok && LEAD_REFUSALS.has(answer.code) ? { ok: false, code: QUERY_REFUSED } : answer;
|
|
154
|
+
},
|
|
155
|
+
// A visiting query the runner refused once the asking device was proven,
|
|
156
|
+
// with the project of the share it named when that share is known.
|
|
157
|
+
refuseSharedQuery: ({ requester, action, code, projectId = null }) =>
|
|
158
|
+
app.visitorAccess?.recordRefusedVisit({ requester: visitor(requester), action, code, projectId }) ?? { ok: false, code: 'search_unavailable' },
|
|
111
159
|
// A stand-in reads what a `#FLG 一起看` session reads of one member: its
|
|
112
160
|
// shareable index, never its working memory (group-member-context.js).
|
|
113
161
|
standInScope: ({ agentId, name, occupation, projectId, text, client, sessionId }) =>
|
|
114
162
|
groupMemberContext(app, [{ agentId, name, occupation, projectId }], text, { sourceApplication: client, sessionId }),
|
|
163
|
+
// A failed wake's captured client output, as this computer may keep it:
|
|
164
|
+
// controls dropped per line (so a path still ends with its line), then
|
|
165
|
+
// strict redaction of paths, URL credentials, secrets and opaque tokens.
|
|
166
|
+
redactDiagnostic: text => withoutControls(shareableText(String(text).split(/\r?\n/).map(withoutControls).join('\n'))),
|
|
167
|
+
recordWakeFailure: failure => recordWakeFailure(app.diagnosticEvents, failure),
|
|
115
168
|
requestSignal: activeAgentRequestSignal,
|
|
116
169
|
inRestrictedWorker: activeSealedWorkerRequest,
|
|
117
170
|
recordMemoryUsage: input => app.personal.recordProjectMemoryUsage
|
|
@@ -107,16 +107,20 @@ export async function beginTaskFromPreferences(application, preferences, {
|
|
|
107
107
|
entryVia
|
|
108
108
|
});
|
|
109
109
|
// rec#63: record which recalled items the Agent was shown, so ranking can
|
|
110
|
-
// later learn "shown but not used" from "shown and used"
|
|
111
|
-
//
|
|
112
|
-
|
|
110
|
+
// later learn "shown but not used" from "shown and used", and which
|
|
111
|
+
// preferences the entry delivered from which client, for the compounding
|
|
112
|
+
// statement. One local write; it never fails task entry and is skipped for
|
|
113
|
+
// a resumed task.
|
|
114
|
+
if (!resumed) {
|
|
113
115
|
try {
|
|
114
|
-
application.recallImpressions?.
|
|
116
|
+
application.recallImpressions?.recordDelivered({
|
|
115
117
|
taskContextToken: task.token,
|
|
116
118
|
personalSpaceId: preferences.context?.personal_space_id,
|
|
117
119
|
personalProjectId: preferences.context?.personal_project_id ?? null,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
+
sourceApplication: task.sourceApplication ?? sourceApplication,
|
|
121
|
+
facts: preferences.task_knowledge_recall?.facts,
|
|
122
|
+
entities: preferences.task_knowledge_recall?.entities,
|
|
123
|
+
preferences: preferences.effective_preferences
|
|
120
124
|
});
|
|
121
125
|
} catch {
|
|
122
126
|
// Ignore: the impression must never fail task entry.
|
package/src/http/api-router.js
CHANGED
|
@@ -33,6 +33,7 @@ import { handleWorkSurfacesRequest } from './work-surfaces-api-router.js';
|
|
|
33
33
|
import { handleAgentDelegationRequest } from './agent-delegation-api-router.js';
|
|
34
34
|
import { handleRoundtableApiRequest } from '../agent-roundtable/http.js';
|
|
35
35
|
import { handlePeerApiRequest } from '../agent-peer/http.js';
|
|
36
|
+
import { handleVisitorAccessRequest } from './visitor-access-api-router.js';
|
|
36
37
|
import { handleJudgmentApiRequest } from '../judgment/http.js';
|
|
37
38
|
import { KNOWLEDGE_EMBEDDING_OPERATION } from '../model-backends/config.js';
|
|
38
39
|
import { handleModelBackendApiRequest } from '../model-backends/http.js';
|
|
@@ -43,6 +44,7 @@ import { ASTRO_OPERATION } from '../graphiti/assistant-project-candidate.js';
|
|
|
43
44
|
import { DREAMING_OPERATION } from '../dreaming/run.js';
|
|
44
45
|
import { handleDreamingRequest } from './dreaming-api-router.js';
|
|
45
46
|
import { handleNoticesRequest } from './notices-api-router.js';
|
|
47
|
+
import { handleStatementRequest } from './statement-api-router.js';
|
|
46
48
|
import { handleRetrospectivesRequest } from './retrospectives-api-router.js';
|
|
47
49
|
import { handleSemanticRequest } from './semantic-api-router.js';
|
|
48
50
|
import { handleEmbeddingModelsRequest } from './embedding-models-api-router.js';
|
|
@@ -79,6 +81,7 @@ export async function handleApiRequest({
|
|
|
79
81
|
}) {
|
|
80
82
|
const url = new URL(request.url, 'http://127.0.0.1');
|
|
81
83
|
if (await handlePeerApiRequest({ request, response, url, peer })) return true;
|
|
84
|
+
if (await handleVisitorAccessRequest({ request, response, url, visitorAccess: app.visitorAccess ?? null })) return true;
|
|
82
85
|
if (await handleModelKeyRequest({ request, response, url, secrets: modelSecrets })) return true;
|
|
83
86
|
if (await handleModelListRequest({ request, response, url, secrets: modelSecrets })) return true;
|
|
84
87
|
if (await handleClientLinksRequest({ request, response, url, clientLinks })) return true;
|
|
@@ -234,6 +237,7 @@ export async function handleApiRequest({
|
|
|
234
237
|
if (await handleOccupationPluginsRequest({ request, response, url, app })) return true;
|
|
235
238
|
if (await handleDreamingRequest({ request, response, url, app, ownerReads: knowledgeOwnerReads })) return true;
|
|
236
239
|
if (await handleNoticesRequest({ request, response, url, app, delegation: agentDelegation, system })) return true;
|
|
240
|
+
if (await handleStatementRequest({ request, response, url, app })) return true;
|
|
237
241
|
if (await handleRetrospectivesRequest({ request, response, url, app })) return true;
|
|
238
242
|
if (await handleSemanticRequest({ request, response, url, app, indexer: app.semanticIndexer ?? null })) return true;
|
|
239
243
|
if (await handleEmbeddingModelsRequest({ request, response, url, embeddingModels: app.embeddingModels ?? null })) return true;
|
|
@@ -14,6 +14,7 @@ import { handleSessionRecordsRequest } from './session-records-api-router.js';
|
|
|
14
14
|
import { handleCaptureChangeRequest } from './capture-change-api-router.js';
|
|
15
15
|
import { handleCaptureOnboardingRequest, handleFirstRunGuideRequest } from './capture-onboarding-api-router.js';
|
|
16
16
|
import { PERSON_WRITER } from '../graphiti/project-profile-authors.js';
|
|
17
|
+
import { taskSessions } from '../graphiti/project-agent-task-sessions.js';
|
|
17
18
|
|
|
18
19
|
// The Provider keeps a confirmer's label of at most this many characters.
|
|
19
20
|
const CONFIRMER_LABEL_LIMIT = 160;
|
|
@@ -372,13 +373,15 @@ export async function handleGraphApiRequest({
|
|
|
372
373
|
return true;
|
|
373
374
|
}
|
|
374
375
|
if (url.pathname === '/api/project-agent-tasks' && request.method === 'GET') {
|
|
375
|
-
|
|
376
|
+
const tasks = await app.listProjectAgentTasks({
|
|
376
377
|
personalSpaceId: url.searchParams.get('personalSpaceId'),
|
|
377
378
|
personalProjectId: url.searchParams.get('personalProjectId'),
|
|
378
379
|
agentId: url.searchParams.get('agentId'),
|
|
379
380
|
status: url.searchParams.get('status'),
|
|
380
381
|
limit: numberParam(url, 'limit', null)
|
|
381
|
-
})
|
|
382
|
+
});
|
|
383
|
+
// The console shows which client each open task runs in (今天's 正在干活).
|
|
384
|
+
sendJson(response, 200, tasks.map((task) => ({ ...task, sessions: taskSessions(task) })));
|
|
382
385
|
return true;
|
|
383
386
|
}
|
|
384
387
|
if (url.pathname === '/api/project-agent-task-pages' && request.method === 'GET') {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { InvalidInputError } from '../app/application-error.js';
|
|
2
|
+
import { compoundingStatement, statementDays, statementDaysWindow, statementWindow } from '../statement/compounding-statement.js';
|
|
3
|
+
import { refuseRemoteDecision } from './request-policy.js';
|
|
4
|
+
import { sendJson } from './response.js';
|
|
5
|
+
|
|
6
|
+
// The person's compounding statement (src/statement). Read only and only on
|
|
7
|
+
// this computer, like the workbench's notices: it counts what was done for
|
|
8
|
+
// the person. from/to are the person's local week bounds the console computed;
|
|
9
|
+
// /days takes a range of local days with the person's UTC offset.
|
|
10
|
+
const PATH = '/api/statement';
|
|
11
|
+
const DAYS_PATH = '/api/statement/days';
|
|
12
|
+
|
|
13
|
+
export async function handleStatementRequest({ request, response, url, app }) {
|
|
14
|
+
if (url.pathname !== PATH && url.pathname !== DAYS_PATH) return false;
|
|
15
|
+
response.setHeader('Cache-Control', 'no-store');
|
|
16
|
+
if (refuseRemoteDecision(request, response, 'The statement is read only on this computer')) return true;
|
|
17
|
+
if (request.method !== 'GET') { sendJson(response, 405, { error: 'Method not allowed' }); return true; }
|
|
18
|
+
const params = url.searchParams;
|
|
19
|
+
if (url.pathname === DAYS_PATH) {
|
|
20
|
+
sendJson(response, 200, await statementDays(app, statementDaysWindow({ from: params.get('from'), to: params.get('to') })));
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
if (params.has('weeks') && !/^\d{1,2}$/.test(params.get('weeks'))) throw new InvalidInputError('weeks must be a whole number of weeks');
|
|
24
|
+
sendJson(response, 200, await compoundingStatement(app, statementWindow({ from: params.get('from'), to: params.get('to'),
|
|
25
|
+
...(params.has('weeks') ? { weeks: Number(params.get('weeks')) } : {}) })));
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { isLocalOwnerRequest } from '../../packages/roundtable/src/peer/control.js';
|
|
2
|
+
import { sendJson } from './response.js';
|
|
3
|
+
|
|
4
|
+
// 「最近被问」 in Settings › 局域网圆桌: every contact visitors from paired
|
|
5
|
+
// computers made with this computer's shared projects (who, their Agent, the
|
|
6
|
+
// project, a card or what they searched, the outcome, when). It names the
|
|
7
|
+
// visitors and their questions, so it answers under the LAN roundtable
|
|
8
|
+
// controls' own guard: this computer's loopback address and a loopback Host.
|
|
9
|
+
const READS_PATH = '/api/visitor-access/reads';
|
|
10
|
+
const DEFAULT_LIMIT = 20;
|
|
11
|
+
|
|
12
|
+
export async function handleVisitorAccessRequest({ request, response, url, visitorAccess }) {
|
|
13
|
+
if (url.pathname !== READS_PATH) return false;
|
|
14
|
+
response.setHeader('Cache-Control', 'no-store');
|
|
15
|
+
if (!isLocalOwnerRequest(request)) {
|
|
16
|
+
sendJson(response, 403, { error: 'local_owner_only', message: 'Visitor reads are shown only on this computer' });
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
if (request.method !== 'GET') {
|
|
20
|
+
sendJson(response, 405, { error: 'Method not allowed' });
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
if (!visitorAccess) {
|
|
24
|
+
sendJson(response, 503, { error: 'Visitor reads need a local FULI installation', code: 'visitor_access_unavailable' });
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
const limit = Number(url.searchParams.get('limit') ?? DEFAULT_LIMIT);
|
|
28
|
+
const recent = visitorAccess.recentReads({ limit: Number.isSafeInteger(limit) ? limit : DEFAULT_LIMIT });
|
|
29
|
+
if (!recent.ok) {
|
|
30
|
+
sendJson(response, 400, { error: recent.code, code: recent.code });
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
sendJson(response, 200, { reads: recent.reads.map(read => ({ id: read.id, requester: read.requesterLabel,
|
|
34
|
+
agentName: read.agentName, projectId: read.projectId, action: read.action, outcome: read.outcome, code: read.code,
|
|
35
|
+
queries: read.queries, resultsCount: read.resultsCount, at: read.at })) });
|
|
36
|
+
return true;
|
|
37
|
+
}
|
package/src/judgment/store.js
CHANGED
|
@@ -214,6 +214,15 @@ export class JudgmentStore {
|
|
|
214
214
|
AND json_extract(value,'$.mode') IN ('shared','autonomous')) OR (key=? AND json_extract(value,'$.enabled')=1))
|
|
215
215
|
LIMIT 1`).get(space, DELEGATION_KEY)?.enabled === 1;
|
|
216
216
|
}
|
|
217
|
+
// How many judgments Tonborg applied in [from, to), and how many the person
|
|
218
|
+
// undid there (the undo is its own receipt). Counts only, like pins:
|
|
219
|
+
// readable while text recovery waits.
|
|
220
|
+
executionCounts(space, from, to) {
|
|
221
|
+
return this.db.prepare(`SELECT COUNT(DISTINCT CASE WHEN e.status='applied' THEN e.decision END) AS applied,
|
|
222
|
+
COUNT(DISTINCT CASE WHEN e.status='undone' THEN e.decision END) AS undone
|
|
223
|
+
FROM judgment_execution e JOIN judgment_records r ON r.id = e.decision
|
|
224
|
+
WHERE r.space=? AND e.status IN ('applied','undone') AND e.created_at >= ? AND e.created_at < ?`).get(space, from, to);
|
|
225
|
+
}
|
|
217
226
|
// relay: the FLA that relayed the person's vote and their words (rec#80), or null.
|
|
218
227
|
feedback(space, id, vote, reason, expectedRevision, relay = null) {
|
|
219
228
|
return this.transaction(() => {
|