fuli-context 0.25.2 → 0.27.1
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/README.md +23 -3
- package/README.zh-CN.md +19 -4
- package/dist/web/assets/{AboutPage-Dx07_Z8u.js → AboutPage-BKyNoI0v.js} +1 -1
- package/dist/web/assets/{AboutSectionHeading-BdhpM609.js → AboutSectionHeading-DwvCvoqO.js} +1 -1
- package/dist/web/assets/AgentAppsPage-Cp2-sZXi.js +1 -0
- package/dist/web/assets/{AgentAvatar-DlAQP7gm.js → AgentAvatar-CDhU4m0T.js} +1 -1
- package/dist/web/assets/{AgentHand-FPFg9-Y1.js → AgentHand-BfRjs1He.js} +1 -1
- package/dist/web/assets/{AgentManagement-CLFw9oV9.css → AgentManagement-Cc00RLSO.css} +1 -1
- package/dist/web/assets/{AgentManagement-UTe4I3WA.js → AgentManagement-qCpr876m.js} +2 -2
- package/dist/web/assets/{AgentMentionCopy-C5ExlutT.js → AgentMentionCopy-_pr-D8vX.js} +1 -1
- package/dist/web/assets/{AgentName-C8mYbtKs.js → AgentName-CUuWNrzE.js} +1 -1
- package/dist/web/assets/{AgentProfilePage-DumsVHP1.css → AgentProfilePage-Ce25JSzZ.css} +1 -1
- package/dist/web/assets/AgentProfilePage-DcOBhuHG.js +5 -0
- package/dist/web/assets/AgentServicesPage-CAL-JT1J.js +1 -0
- package/dist/web/assets/{AppViewerPage-BR8ttEGa.js → AppViewerPage-Ct46NPXP.js} +1 -1
- package/dist/web/assets/{BackToTop-5_AQRMZl.js → BackToTop-DOlt-xjQ.js} +1 -1
- package/dist/web/assets/{BoardCardFieldsMenu-Bb_Z9a4Q.js → BoardCardFieldsMenu-RFcx_CAs.js} +1 -1
- package/dist/web/assets/{BoardMoveMenu-B-f8O6cC.js → BoardMoveMenu-GJ8lpuZY.js} +1 -1
- package/dist/web/assets/Breadcrumb-DTo6Zvtb.js +1 -0
- package/dist/web/assets/CaptureChangePage-DRgWyCRo.js +1 -0
- package/dist/web/assets/{CopyFixPrompt-CVFYWDSt.js → CopyFixPrompt-1UXH_ItZ.js} +1 -1
- package/dist/web/assets/DataFormatPage-CgFXfOW_.js +2 -0
- package/dist/web/assets/DebugTurnPage-B8YhpTPm.js +1 -0
- package/dist/web/assets/DebugTurnsPage-BGKSH3n0.js +1 -0
- package/dist/web/assets/{DialogTitle-BQXOe8EK.js → DialogTitle-CIVSlKqQ.js} +1 -1
- package/dist/web/assets/{EmployeeRedirectPage-BjWpXDSM.js → EmployeeRedirectPage-8qPpnbyP.js} +1 -1
- package/dist/web/assets/EmployeeScopeDialog-BZymZidB.js +1 -0
- package/dist/web/assets/EmployeeWorkbench-BnxEZCSS.js +4 -0
- package/dist/web/assets/FieldRoot-D6HtUgDA.js +1 -0
- package/dist/web/assets/{FlaGrowth-OQtTLTng.js → FlaGrowth-CaFdmezv.js} +1 -1
- package/dist/web/assets/{FlaOccupationKit-C-x4VrKk.js → FlaOccupationKit-CFoBUWGF.js} +1 -1
- package/dist/web/assets/{FlaTaskSheets-CoaF5CbQ.js → FlaTaskSheets-BShmW9R5.js} +1 -1
- package/dist/web/assets/FlasPage-DtkW-_9f.js +1 -0
- package/dist/web/assets/{GrowthLoading-VuVo2vLf.js → GrowthLoading-CVBn4r4q.js} +1 -1
- package/dist/web/assets/{HowtoPage-CZ3mOdLc.js → HowtoPage-B8f5J_An.js} +1 -1
- package/dist/web/assets/InboxPage-Bv8XUdl8.css +1 -0
- package/dist/web/assets/InboxPage-D9VIDrsL.js +6 -0
- package/dist/web/assets/{KnowledgeDeleteButton-BlUnSG3b.js → KnowledgeDeleteButton-C01O4FSO.js} +1 -1
- package/dist/web/assets/{KnowledgeHardDeleteSection-CznXBtHY.js → KnowledgeHardDeleteSection-jqad3dJN.js} +1 -1
- package/dist/web/assets/KnowledgeItemEditPage-DV8TVpvf.js +1 -0
- package/dist/web/assets/{KnowledgeItemSummaryCard-Co5JKBHl.js → KnowledgeItemSummaryCard-XbkYp7Dy.js} +1 -1
- package/dist/web/assets/KnowledgeOrganizerPage-C4G6JCmG.js +1 -0
- package/dist/web/assets/KnowledgePage-Afiw2Kxy.js +1 -0
- package/dist/web/assets/{KnowledgePeek-CwZVuSkf.css → KnowledgePeek-D6SeISIM.css} +1 -1
- package/dist/web/assets/KnowledgePeek-DIcPS9WU.js +1 -0
- package/dist/web/assets/{KnowledgeTurnReceiptPage-Csyjimeg.js → KnowledgeTurnReceiptPage-7ncXkxKd.js} +1 -1
- package/dist/web/assets/KnowledgeWorkspace-Be2gUul5.css +1 -0
- package/dist/web/assets/KnowledgeWorkspace-CmzU6Vuh.js +4 -0
- package/dist/web/assets/{MeAvatar-aY_q8cKs.js → MeAvatar-D_LFqHrR.js} +1 -1
- package/dist/web/assets/{MeLink-B0pNwVLa.js → MeLink-CeIxjFrm.js} +1 -1
- package/dist/web/assets/{MenuSeparator-BR-uLovR.js → MenuSeparator-yD3wld9s.js} +1 -1
- package/dist/web/assets/ModelSettingsPage-BZcyT7Vy.css +1 -0
- package/dist/web/assets/ModelSettingsPage-BqClsFmC.js +1 -0
- package/dist/web/assets/NewSessionPanel-BKrOFEMO.js +1 -0
- package/dist/web/assets/NewSessionPanel-CTdd7xpN.css +1 -0
- package/dist/web/assets/{NotFoundPage-Cr1MaPuk.js → NotFoundPage-CdOCRj3P.js} +1 -1
- package/dist/web/assets/NoticeRow-CQShZQtw.js +1 -0
- package/dist/web/assets/OccupationsPage-BrBus-nh.js +1 -0
- package/dist/web/assets/OverviewPage-Cq89Klha.js +1 -0
- package/dist/web/assets/{OverviewPage-Dr4jrXW4.css → OverviewPage-KVt4LcE-.css} +1 -1
- package/dist/web/assets/{PageColumns-DvehZlYm.js → PageColumns-CgIXTt4J.js} +1 -1
- package/dist/web/assets/PageOutline-D5h1GuKt.css +1 -0
- package/dist/web/assets/PageOutline-VtLLW4kh.js +1 -0
- package/dist/web/assets/{PersonalProfilePage-DnjNX2xK.css → PersonalProfilePage-BE5q2bqc.css} +1 -1
- package/dist/web/assets/PersonalProfilePage-C_dmUEuW.js +1 -0
- package/dist/web/assets/PersonalProjectsPage-CiCFHVt_.js +1 -0
- package/dist/web/assets/{PinIcon-BTQsnxRY.js → PinIcon-DD3Un-hh.js} +1 -1
- package/dist/web/assets/{PopperContent-DtMksk76.js → PopperContent-CCmt2yHl.js} +1 -1
- package/dist/web/assets/{Presence-B0zMpCF4.js → Presence-DqPb-1P1.js} +1 -1
- package/dist/web/assets/{ProfileAuthorChip-BqT9Vv65.js → ProfileAuthorChip-Dm5GjcAt.js} +1 -1
- package/dist/web/assets/ProjectAgentsPage-B5r0DKWL.js +5 -0
- package/dist/web/assets/ProjectJudgmentPolicy-BHyiqKLV.css +1 -0
- package/dist/web/assets/ProjectJudgmentPolicy-DVFV5Cai.js +2 -0
- package/dist/web/assets/{RecentNotices-vJobVOcm.js → RecentNotices-DYXEBfYm.js} +1 -1
- package/dist/web/assets/{RoundtablesPage-C3dYekQ5.js → RoundtablesPage-DlAXApKi.js} +2 -2
- package/dist/web/assets/{RovingFocusGroup-CUqyjFSs.js → RovingFocusGroup-CI4aZr1z.js} +1 -1
- package/dist/web/assets/{RovingFocusItem-CyyuWXjE.js → RovingFocusItem-C_N843Nb.js} +1 -1
- package/dist/web/assets/{SessionMigrationPage-DukDM0TP.js → SessionMigrationPage-CVKkTACn.js} +1 -1
- package/dist/web/assets/{SessionRecordsPage-DZ5ZBiuS.js → SessionRecordsPage-Dy203sP2.js} +1 -1
- package/dist/web/assets/SettingsPage-BcrAdXX7.js +1 -0
- package/dist/web/assets/SettingsPage-BlhCcwPn.css +1 -0
- package/dist/web/assets/SharedJefaReportPage-CASkC5pc.js +1 -0
- package/dist/web/assets/{TagVocabularyPage-BKLFJiSu.js → TagVocabularyPage-Bd57YcUL.js} +1 -1
- package/dist/web/assets/TaskBlockerClear-DGaXP2ak.js +1 -0
- package/dist/web/assets/TaskBlockerNotice-8nogmPA-.js +1 -0
- package/dist/web/assets/{TaskReason-D5j7L8tl.js → TaskReason-BxYwBDoB.js} +1 -1
- package/dist/web/assets/{TeamCard-CDunbIrP.js → TeamCard-cWYC5z07.js} +1 -1
- package/dist/web/assets/{TeamCardsWidget-CUW-fPn7.js → TeamCardsWidget-BOf6oHOp.js} +1 -1
- package/dist/web/assets/{TeamIsland-CmpDmIX2.js → TeamIsland-BD5s-zFZ.js} +1 -1
- package/dist/web/assets/{Teleport-Dzdr8umQ.js → Teleport-DhMmMHjy.js} +1 -1
- package/dist/web/assets/{TextField-BPhEpEv9.js → TextField-XakqTnVl.js} +1 -1
- package/dist/web/assets/TonborgDelegationSwitch-B59PUZBz.js +1 -0
- package/dist/web/assets/TonborgDelegationSwitch-BFb1JkWe.css +1 -0
- package/dist/web/assets/{UiChip-BEQ067LV.js → UiChip-BFdfq8Jm.js} +1 -1
- package/dist/web/assets/{UiChip-DulygSq8.css → UiChip-BiUmvjdz.css} +1 -1
- package/dist/web/assets/{UiDisclosure-L6GEJHSw.js → UiDisclosure-G3MiGB7F.js} +1 -1
- package/dist/web/assets/UiIcon--qI1_q89.js +1 -0
- package/dist/web/assets/UiSegmented-CRJ06vHP.js +1 -0
- package/dist/web/assets/{UiWeight-D-2iZ_Kc.js → UiWeight-BRA-6EY_.js} +1 -1
- package/dist/web/assets/{VirtualDirectoryList-BV8KsA-Z.js → VirtualDirectoryList-Dm07NMxq.js} +1 -1
- package/dist/web/assets/{VisuallyHidden-BxKxuXRF.js → VisuallyHidden-DIg8c_z2.js} +1 -1
- package/dist/web/assets/{VisuallyHiddenInput-DD4vhlqT.js → VisuallyHiddenInput-rcWqHewS.js} +1 -1
- package/dist/web/assets/WidgetSlot-C5h--noP.js +2 -0
- package/dist/web/assets/{WorkbenchListHead-B0TjHsTO.js → WorkbenchListHead-D40-J4GT.js} +1 -1
- package/dist/web/assets/WorkbenchListPage-CJUvq4Ac.js +1 -0
- package/dist/web/assets/_plugin-vue_export-helper-D9CtLGVz.js +9 -0
- package/dist/web/assets/{agent-apps-B1Je-mpY.js → agent-apps-Svxh5tiY.js} +1 -1
- package/dist/web/assets/agent-occupation-Dhoz7LjT.js +1 -0
- package/dist/web/assets/{agent-pins-DxHlJ96z.js → agent-pins-CvATgFji.js} +1 -1
- package/dist/web/assets/agent-profile-TuRobv9N.css +1 -0
- package/dist/web/assets/agent-roster-records-CsYjmaNn.js +1 -0
- package/dist/web/assets/{agent-work-summary-o_9-QWBL.js → agent-work-summary-BOeJ4JXc.js} +1 -1
- package/dist/web/assets/{agent-workflows-DgdbJqpg.js → agent-workflows-BS4KlKFj.js} +1 -1
- package/dist/web/assets/{attach-closest-edge-DUc_VUVO.js → attach-closest-edge-DFoBNGBU.js} +1 -1
- package/dist/web/assets/{attention-store-Bod20yM3.js → attention-store-CHxXJTuF.js} +1 -1
- package/dist/web/assets/{badge-tMy2Qr94.js → badge-DqHf-RNw.js} +1 -1
- package/dist/web/assets/{button-DnKFsImW.js → button-CdYobu4m.js} +1 -1
- package/dist/web/assets/{card-Ccu7HCNb.js → card-8xZot-73.js} +1 -1
- package/dist/web/assets/{catalog-CJUV8OJ6.js → catalog-h6KbvKdB.js} +1 -1
- package/dist/web/assets/{checkbox-D1R6kTUB.js → checkbox-DZ6CDZ8r.js} +1 -1
- package/dist/web/assets/{client-D-G2i5VU.js → client-DRnUmjCk.js} +1 -1
- package/dist/web/assets/{client-links-store-UgmraFBZ.js → client-links-store-DQY0A5PC.js} +1 -1
- package/dist/web/assets/{combobox-C7QLYGzs.js → combobox-DE0HzdKP.js} +1 -1
- package/dist/web/assets/console-BF8ZU9dG.js +1 -0
- package/dist/web/assets/conversation-launcher-settings-D4vYOpHN.js +1 -0
- package/dist/web/assets/{copy-mention-C0EJhDPy.js → copy-mention-Crs0NIJB.js} +1 -1
- package/dist/web/assets/{dialog-Bbq93W68.js → dialog-Bg5NVU4Y.js} +1 -1
- package/dist/web/assets/{dist-PpsW5ZE3.js → dist--2DWcoU9.js} +1 -1
- package/dist/web/assets/{dist-Dd8yFhv6.js → dist-INkzWhVF.js} +1 -1
- package/dist/web/assets/{dropdown-menu-1fGUL0V3.js → dropdown-menu-C5Kf9x2y.js} +1 -1
- package/dist/web/assets/{field-DjVv_wIS.js → field-7G2bSNl5.js} +1 -1
- package/dist/web/assets/{format-bytes-BKq_E0Hs.js → format-bytes-Jj3-0UhP.js} +1 -1
- package/dist/web/assets/{hover-card-BO-929hq.js → hover-card-llxR7wrX.js} +1 -1
- package/dist/web/assets/index-C2o_v2mq.js +24 -0
- package/dist/web/assets/index-HRZACEmh.css +1 -0
- package/dist/web/assets/{input-DmwRmYO2.js → input-z5o2wIZC.js} +1 -1
- package/dist/web/assets/{label-BvwPUTS4.js → label-BtTrlS8e.js} +1 -1
- package/dist/web/assets/label-table-CuTFbFd3.js +1 -0
- package/dist/web/assets/{model-0TZRbkN2.js → model-BD6AfoOR.js} +1 -1
- package/dist/web/assets/model-BKg9fdsn.js +3 -0
- package/dist/web/assets/{model-BF_ZMPLi.js → model-BMd98Yux.js} +1 -1
- package/dist/web/assets/{model-CaR7VPg7.js → model-Bb0VtRJH.js} +1 -1
- package/dist/web/assets/{model-Tmn6HvL-.js → model-Bhyqm3my.js} +1 -1
- package/dist/web/assets/model-Big7Ppeu.js +1 -0
- package/dist/web/assets/{model-Dfe81jZT.js → model-CCaA3vRN.js} +1 -1
- package/dist/web/assets/{model-y7OUvtKz.js → model-CGfhtR6w.js} +1 -1
- package/dist/web/assets/{model-DpkZUZUL.js → model-Ejc2vysd.js} +1 -1
- package/dist/web/assets/{motion-C1fZrqmI.js → motion-Cw_hptY4.js} +1 -1
- package/dist/web/assets/{motion-mAmbRj_M.js → motion-pePEUhOt.js} +1 -1
- package/dist/web/assets/{motion-preference-Dz9S1bZa.js → motion-preference-DTwjqiJ8.js} +1 -1
- package/dist/web/assets/{occupation-catalog-_SnxxRbK.js → occupation-catalog-ByjQk0EY.js} +1 -1
- package/dist/web/assets/{occupation-kits-DFC6Auuc.js → occupation-kits-Dg6UZqc1.js} +1 -1
- package/dist/web/assets/{option-DC8frdbr.js → option-BIjYeAh2.js} +1 -1
- package/dist/web/assets/{orchestration-filters-UeiAHJqn.js → orchestration-filters-3AfjDoHQ.js} +1 -1
- package/dist/web/assets/overview-data-BIeNATEJ.js +1 -0
- package/dist/web/assets/{page-refresh-DdRJaxMv.js → page-refresh-BTqRX45n.js} +1 -1
- package/dist/web/assets/{page-title-Cm9u_qw1.js → page-title-B5RyNTPD.js} +1 -1
- package/dist/web/assets/{person-profile-BH2AzOfw.js → person-profile-BzPwdtix.js} +1 -1
- package/dist/web/assets/{popover-DW__YCSE.js → popover-BsWyCEy5.js} +1 -1
- package/dist/web/assets/popup-host-DWJ1gygp.js +1 -0
- package/dist/web/assets/{profile-model-DtISOJ-X.js → profile-model-TAsyybji.js} +1 -1
- package/dist/web/assets/{project-board-layout-CTM8kAgq.js → project-board-layout-BwyHItDc.js} +1 -1
- package/dist/web/assets/{project-capture-B3pNhpFF.js → project-capture-I8-7JwsK.js} +1 -1
- package/dist/web/assets/{project-origin-BO8Ngccf.js → project-origin-B_Ku288r.js} +1 -1
- package/dist/web/assets/{quick-edit-api-B169r5Qb.js → quick-edit-api-Cm-W3ZVP.js} +1 -1
- package/dist/web/assets/{radio-group-DqA46cXQ.js → radio-group-DJ5np5d_.js} +1 -1
- package/dist/web/assets/review-api-Gwr5nP1B.js +1 -0
- package/dist/web/assets/{review-list-BbV-Mle7.js → review-list-CNeXKjBw.js} +1 -1
- package/dist/web/assets/review-store-BaMwO51r.js +1 -0
- package/dist/web/assets/{role-names-By0xdfTn.js → role-names-C-F0XIE1.js} +1 -1
- package/dist/web/assets/{roundtable-live-u9qUU6aA.js → roundtable-live-CM4Cqw2v.js} +1 -1
- package/dist/web/assets/{runtime-dom.esm-bundler-DhFy4Djs.js → runtime-dom.esm-bundler-tA5o2TEo.js} +1 -1
- package/dist/web/assets/{select-TqPBladU.js → select-DJ7iyJ-X.js} +1 -1
- package/dist/web/assets/{session-launch-offers-CtQeY4Qk.js → session-launch-offers-CEdCRTz9.js} +1 -1
- package/dist/web/assets/{settings-autosave-C7vW3_SP.js → settings-autosave-D3wBf_zN.js} +1 -1
- package/dist/web/assets/settings-tabs-B9pCaEFP.js +1 -0
- package/dist/web/assets/{npm-copies-GRyMAduA.css → settings-tabs-C9VDs91j.css} +1 -1
- package/dist/web/assets/shared-report-KyuP8oQk.js +3 -0
- package/dist/web/assets/source-adapters-BR-AAGhD.js +1 -0
- package/dist/web/assets/{switch-D7w_0h3m.js → switch-BoOtTu6O.js} +1 -1
- package/dist/web/assets/{tabs-DR8k0PN9.js → tabs-D0TAS18R.js} +1 -1
- package/dist/web/assets/{task-card-fields-X1ZYCm_j.js → task-card-fields-BWlLtcKE.js} +1 -1
- package/dist/web/assets/task-evidence-DydhKn9x.js +1 -0
- package/dist/web/assets/{task-labels-LuXoQhF9.js → task-labels-BrNKooHK.js} +1 -1
- package/dist/web/assets/{task-reason-ChpbGtyx.js → task-reason-CvmaNQWE.js} +1 -1
- package/dist/web/assets/{team-sheets-DYCQqa8I.js → team-sheets-DkAuebg6.js} +1 -1
- package/dist/web/assets/{textarea-D53VYanK.js → textarea-BQnuJ0v3.js} +1 -1
- package/dist/web/assets/ui-CJiEsCpv.js +1 -0
- package/dist/web/assets/ui-CgwSWg1F.css +1 -0
- package/dist/web/assets/{useAgentRecords-Hy9nqMs7.js → useAgentRecords-PysQYF4V.js} +1 -1
- package/dist/web/assets/{useAgentWorkSummary-mloD4p12.js → useAgentWorkSummary-DaNyOo2z.js} +1 -1
- package/dist/web/assets/{useApi-CROJJdhE-DnUGUb8O.js → useApi-CROJJdhE-CgPyy2pi.js} +1 -1
- package/dist/web/assets/{useClipboardCopy-BTuQMeWI.js → useClipboardCopy-Cf3GZrHC.js} +1 -1
- package/dist/web/assets/{useFocusReturn-4hUmSzj9.js → useFocusReturn-uY18_eDg.js} +1 -1
- package/dist/web/assets/{useForwardExpose-BDmW7q7u.js → useForwardExpose-Ci_aBJDg.js} +1 -1
- package/dist/web/assets/{useForwardPropsEmits-BzT2luD4.js → useForwardPropsEmits-mGaDeNMp.js} +1 -1
- package/dist/web/assets/useForwardScopeId-DYW8CZTp.js +1 -0
- package/dist/web/assets/{useKnowledgeConfirm-L8wnJCuX.js → useKnowledgeConfirm-PcqqgwNU.js} +1 -1
- package/dist/web/assets/{useKnowledgeItemPeek-C_huXt6E.js → useKnowledgeItemPeek-yjyrSFtf.js} +1 -1
- package/dist/web/assets/{useMinimumLoadingDisplay-Dkl8NQru.js → useMinimumLoadingDisplay-Bu6xyHby.js} +1 -1
- package/dist/web/assets/{usePageTools-CbDOdIrg.js → usePageTools-DYi9x7HJ.js} +1 -1
- package/dist/web/assets/usePrimitiveElement-DdC34jzt.js +1 -0
- package/dist/web/assets/{useProjectAgentRoster-BBmRvcgr.js → useProjectAgentRoster-KPwWl2jE.js} +1 -1
- package/dist/web/assets/{useRoutePeek-CRbCDqsm.js → useRoutePeek-BiHDBRKc.js} +1 -1
- package/dist/web/assets/useTeamPeople-Od3dDz6d.js +1 -0
- package/dist/web/assets/{useTeamWork-CXEQwF4n.js → useTeamWork-CDKVZwYe.js} +1 -1
- package/dist/web/assets/{useTypeahead-CVYuxPOD.js → useTypeahead-D_Z5P9Xm.js} +1 -1
- package/dist/web/assets/{utils-BsGjKHV8.js → utils-CAAvfQSj.js} +1 -1
- package/dist/web/assets/{utils-BnrWDlfm.js → utils-D6RjkXrh.js} +1 -1
- package/dist/web/assets/{verification-DbCo_dnY.js → verification-DoN2EFaZ.js} +1 -1
- package/dist/web/assets/version-DbJq2Cfv.js +1 -0
- package/dist/web/assets/{vue-router-D4_ms6om.js → vue-router-BwoPnYha.js} +1 -1
- package/dist/web/index.html +80 -87
- package/docs/agent-conversations-and-collaboration.md +6 -0
- package/docs/agent-interface-architecture.md +4 -1
- package/docs/agent-roundtable.md +45 -3
- package/docs/client-connections.md +29 -5
- package/docs/employee-agents.md +1 -1
- package/docs/external-knowledge-architecture.md +8 -3
- package/docs/judgment-and-autonomy.md +8 -4
- package/docs/project-agent-memory.md +12 -1
- package/graph-provider/fuli_graph/app.py +14 -234
- package/graph-provider/fuli_graph/auth.py +10 -0
- package/graph-provider/fuli_graph/builtin_embedding.py +388 -0
- package/graph-provider/fuli_graph/builtin_embedding_routes.py +53 -0
- package/graph-provider/fuli_graph/client_coverage.py +2 -2
- package/graph-provider/fuli_graph/config.py +3 -0
- package/graph-provider/fuli_graph/knowledge_duplicates.py +27 -15
- package/graph-provider/fuli_graph/knowledge_index_scan.py +13 -6
- package/graph-provider/fuli_graph/knowledge_search.py +142 -77
- package/graph-provider/fuli_graph/knowledge_semantic.py +47 -11
- package/graph-provider/fuli_graph/knowledge_semantic_index.py +5 -3
- package/graph-provider/fuli_graph/knowledge_tags.py +5 -10
- package/graph-provider/fuli_graph/models.py +16 -81
- package/graph-provider/fuli_graph/personal_global_preference_models.py +0 -23
- package/graph-provider/fuli_graph/personal_global_preferences.py +5 -630
- package/graph-provider/fuli_graph/preference_conflicts.py +3 -1
- package/graph-provider/fuli_graph/preference_organizing.py +162 -0
- package/graph-provider/fuli_graph/project_agent_delegations.py +6 -1
- package/graph-provider/fuli_graph/project_agent_executor_models.py +0 -26
- package/graph-provider/fuli_graph/project_agent_models.py +1 -0
- package/graph-provider/fuli_graph/project_agent_routes.py +22 -27
- package/graph-provider/fuli_graph/project_agent_task_models.py +26 -20
- package/graph-provider/fuli_graph/project_agent_work_log.py +4 -2
- package/graph-provider/fuli_graph/project_knowledge.py +2 -1
- package/graph-provider/fuli_graph/retired_graph_labels.py +30 -0
- package/graph-provider/fuli_graph/store_identity.py +4 -16
- package/graph-provider/fuli_graph/store_project_agent_executor_learning.py +0 -7
- package/graph-provider/fuli_graph/store_project_agent_executor_routing.py +0 -2
- package/graph-provider/fuli_graph/store_project_agent_executors.py +0 -8
- package/graph-provider/fuli_graph/store_project_agent_task_activity.py +51 -11
- package/graph-provider/fuli_graph/store_project_agent_task_blockers.py +13 -6
- package/graph-provider/fuli_graph/store_project_agent_task_person_close.py +82 -0
- package/graph-provider/fuli_graph/store_project_agent_task_recruitment.py +1 -61
- package/graph-provider/fuli_graph/store_project_agent_tasks.py +18 -1
- package/graph-provider/fuli_graph/store_project_agents.py +1 -1
- package/graph-provider/fuli_graph/store_projects.py +0 -151
- package/graph-provider/fuli_graph/store_publication.py +1 -160
- package/graph-provider/fuli_graph/store_records.py +0 -43
- package/graph-provider/fuli_graph/store_task_contexts.py +10 -0
- package/graph-provider/fuli_graph/task_blocker.py +10 -0
- package/graph-provider/fuli_graph/task_checkpoint_amendment.py +77 -0
- package/graph-provider/fuli_graph/task_context_auto_close.py +1 -1
- package/graph-provider/fuli_graph/task_context_models.py +19 -0
- package/graph-provider/fuli_graph/task_context_routes.py +5 -1
- package/graph-provider/fuli_graph/workflow_candidate_models.py +1 -61
- package/graph-provider/fuli_graph/workflow_candidates.py +7 -446
- package/graph-provider/fuli_graph/workflow_observation_models.py +1 -1
- package/graph-provider/pyproject.toml +1 -1
- package/native/win32/fuli-win-helper.exe +0 -0
- package/npm-shrinkwrap.json +57 -9
- package/package.json +4 -4
- package/packages/roundtable/package.json +1 -0
- package/packages/roundtable/src/agents/claude-code/wake.js +4 -2
- package/packages/roundtable/src/agents/codex/wake.js +26 -2
- package/packages/roundtable/src/agents/session-log.js +29 -7
- package/packages/roundtable/src/host.js +7 -1
- package/packages/roundtable/src/peer/control-cli.js +75 -2
- package/packages/roundtable/src/peer/control.js +15 -1
- package/packages/roundtable/src/peer/coordinator-http.js +23 -2
- package/packages/roundtable/src/peer/coordinator-service.js +81 -9
- package/packages/roundtable/src/peer/coordinator-store.js +2 -1
- package/packages/roundtable/src/peer/lan-addresses.js +28 -0
- package/packages/roundtable/src/peer/nearby-attempts.js +73 -0
- package/packages/roundtable/src/peer/nearby-discovery.js +71 -0
- package/packages/roundtable/src/peer/nearby-pairing.js +422 -0
- package/packages/roundtable/src/peer/nearby-presence.js +93 -0
- package/packages/roundtable/src/peer/node-store.js +10 -0
- package/packages/roundtable/src/peer/peer-runtime.js +528 -70
- package/packages/roundtable/src/peer/peer-transport.js +58 -3
- package/packages/roundtable/src/peer/protocol.js +24 -1
- package/packages/roundtable/src/roundtable/chat-service.js +14 -3
- package/packages/roundtable/src/roundtable/chat.js +1 -0
- package/packages/roundtable/src/roundtable/delivery-state.js +2 -1
- package/packages/roundtable/src/roundtable/group-discussion-store.js +130 -5
- package/packages/roundtable/src/roundtable/group-discussion.js +596 -111
- package/packages/roundtable/src/roundtable/near-names.js +27 -0
- package/packages/roundtable/src/roundtable/reply-inbox.js +6 -2
- package/packages/roundtable/src/roundtable/service.js +191 -49
- package/packages/roundtable/src/roundtable/stand-in.js +64 -0
- package/packages/roundtable/src/roundtable/store.js +19 -7
- package/packages/roundtable/src/roundtable/wake-ladder.js +63 -0
- package/packages/roundtable/src/roundtable/wake.js +10 -1
- package/packages/roundtable/src/standalone/cli.js +1 -1
- package/packages/roundtable/src/standalone/mcp.js +0 -5
- package/packages/roundtable/src/standalone/serve.js +13 -0
- package/registry/embedding-models.json +208 -0
- package/skills/capturing-session-knowledge/SKILL.md +2 -2
- package/skills/capturing-session-knowledge/references/capture.md +15 -34
- package/skills/capturing-session-knowledge/references/coordination.md +67 -4
- package/skills/capturing-session-knowledge/references/retrieval.md +9 -13
- package/skills/grilling-project/SKILL.md +8 -53
- package/skills/grilling-project/agents/openai.yaml +2 -2
- package/skills/grilling-project/references/project-profile.md +18 -27
- package/skills/operating-fuli/SKILL.md +56 -11
- package/skills/operating-fuli/references/workflow-recipes.md +8 -4
- package/src/agent-apps/host-tools/catalog.js +2 -25
- package/src/agent-delegation/port.js +1 -1
- package/src/agent-delegation/refusals.js +12 -4
- package/src/agent-kits/client-detection.js +14 -4
- package/src/agent-kits/installer-manifest.js +16 -5
- package/src/agent-kits/pack-manifest.js +7 -2
- package/src/agent-kits/pins.js +6 -6
- package/src/agent-kits/session-clients.js +1 -0
- package/src/agent-kits/vendor/agent-installer/README.md +1 -1
- package/src/agent-roundtable/task-context.js +1 -1
- package/src/agent-roundtable/tools.js +7 -4
- package/src/agent-roundtable/turn-receipt.js +65 -0
- package/src/agent-tools/graph-definitions.js +4 -2
- package/src/agent-tools/graph-handlers.js +9 -46
- package/src/agent-tools/interface-catalog.js +20 -15
- package/src/agent-tools/interface-definitions.js +3 -9
- package/src/agent-tools/judgment-definitions.js +1 -1
- package/src/agent-tools/knowledge-curation-definitions.js +1 -63
- package/src/agent-tools/knowledge-definitions.js +11 -124
- package/src/agent-tools/project-agent-definitions.js +2 -2
- package/src/agent-tools/project-agent-tool-definitions.js +0 -16
- package/src/agent-tools/project-organizing-definitions.js +34 -0
- package/src/agent-tools/project-space-definitions.js +6 -83
- package/src/agent-tools/retired-tools.js +37 -0
- package/src/agent-tools/session-fuli-gate.js +6 -1
- package/src/agent-tools/task-entry-definitions.js +4 -3
- package/src/agent-tools/tonborg-question-definitions.js +3 -3
- package/src/agent-tools.js +5 -1
- package/src/agents/choice-answers.js +2 -1
- package/src/agents/claude-code/choice-answers.js +2 -24
- package/src/agents/claude-desktop/app-control.js +23 -0
- package/src/agents/client-apps.js +8 -0
- package/src/agents/codex/choice-answers.js +61 -0
- package/src/agents/codex/lifecycle-hook.js +6 -12
- package/src/agents/dsh/bundle.js +50 -0
- package/src/agents/dsh/lifecycle-hook.js +18 -0
- package/src/agents/dsh/plugin.js +111 -0
- package/src/agents/identity-receipt.js +22 -5
- package/src/agents/jsonl-tail.js +35 -0
- package/src/agents/native-session-env.js +7 -0
- package/src/agents/opencode/lifecycle-hook.js +9 -174
- package/src/agents/opencode/plugin-file.js +7 -29
- package/src/agents/opencode/plugin.js +3 -76
- package/src/agents/plugin-hook-process.js +87 -0
- package/src/agents/plugin-lifecycle-hook.js +174 -0
- package/src/agents/plugin-module-source.js +26 -0
- package/src/agents/source-applications.js +3 -3
- package/src/agents/token-usage-resolver.js +0 -6
- package/src/cli/clients-command.js +3 -3
- package/src/cli/command-registry.js +1 -2
- package/src/cli/connect-command.js +1 -1
- package/src/cli/mcp-command.js +1 -1
- package/src/cli/setup-command.js +3 -2
- package/src/cli.js +0 -5
- package/src/conversations/entry-budget.js +4 -3
- package/src/conversations/entry-inline-budget.js +40 -10
- package/src/conversations/person-words.js +0 -5
- package/src/conversations/preference-lifecycle.js +3 -3
- package/src/conversations/turn-findings.js +9 -2
- package/src/data-format/local-stores.js +6 -0
- package/src/debug-turns/model-request.js +2 -27
- package/src/desktop/npm-copy-data.js +20 -6
- package/src/embedding-models/manifest.js +147 -0
- package/src/embedding-models/port.js +117 -0
- package/src/embedding-models/registry.js +24 -0
- package/src/embedding-models/store.js +208 -0
- package/src/external-knowledge/connectors/custom.js +4 -0
- package/src/external-knowledge/connectors/mcp.js +13 -1
- package/src/external-knowledge/connectors/response-values.js +8 -0
- package/src/external-knowledge/connectors/retrieval-api.js +5 -1
- package/src/external-knowledge/service.js +22 -5
- package/src/graphiti/agent-conversations.js +3 -2
- package/src/graphiti/agent-knowledge-workflows.js +1 -6
- package/src/graphiti/agent-project-resolution.js +18 -0
- package/src/graphiti/capture-change-confirmation.js +1 -1
- package/src/graphiti/checkpoint-amendment.js +50 -0
- package/src/graphiti/checkpoint-capture.js +7 -3
- package/src/graphiti/checkpoint-save-status.js +71 -0
- package/src/graphiti/collaboration-preference-entry.js +5 -2
- package/src/graphiti/current-project-knowledge-search.js +3 -3
- package/src/graphiti/federated-application.js +11 -132
- package/src/graphiti/first-run-guide.js +25 -4
- package/src/graphiti/fla-mention.js +48 -9
- package/src/graphiti/fuli-markup.js +1 -1
- package/src/graphiti/human-review-channel.js +4 -2
- package/src/graphiti/knowledge-curation.js +12 -24
- package/src/graphiti/knowledge-provider-mapping.js +0 -21
- package/src/graphiti/knowledge-reader.js +0 -7
- package/src/graphiti/knowledge-spaces.js +36 -0
- package/src/graphiti/local-runtimes.js +9 -1
- package/src/graphiti/personal-global-preference-candidates.js +0 -44
- package/src/graphiti/project-agent-control-plane.js +5 -12
- package/src/graphiti/project-agent-mapping.js +0 -13
- package/src/graphiti/project-agent-task-summaries.js +82 -0
- package/src/graphiti/project-agent-workflows.js +8 -21
- package/src/graphiti/project-path-context.js +23 -9
- package/src/graphiti/provider-client.js +41 -168
- package/src/graphiti/reply-echo-group.js +7 -6
- package/src/graphiti/repository-remote.js +34 -8
- package/src/graphiti/roundtable-host.js +14 -1
- package/src/graphiti/session-knowledge-capture.js +5 -31
- package/src/graphiti/task-context-entry.js +4 -1
- package/src/graphiti/task-entry-group-discussion.js +111 -25
- package/src/graphiti/task-entry-owner-change.js +86 -0
- package/src/graphiti/task-entry-preferences.js +23 -6
- package/src/graphiti/task-entry-project-scope.js +24 -1
- package/src/graphiti/task-knowledge-checkpoint.js +30 -14
- package/src/graphiti/task-preference-pages.js +3 -3
- package/src/graphiti/task-preference-reader.js +44 -9
- package/src/graphiti/topic-proposals.js +31 -8
- package/src/graphiti/topic-team-handoff.js +121 -0
- package/src/graphiti/worker-task-context.js +1 -1
- package/src/graphiti/workflow-learning.js +0 -25
- package/src/graphiti/workspace-provider-client.js +4 -50
- package/src/http/api-router.js +18 -0
- package/src/http/capture-onboarding-api-router.js +13 -4
- package/src/http/embedding-models-api-router.js +36 -0
- package/src/http/graph-api-router.js +3 -125
- package/src/http/project-organizing-api-router.js +27 -0
- package/src/http/reply-echo-api-router.js +2 -2
- package/src/http/request-policy.js +0 -4
- package/src/http/task-blocker-api-router.js +11 -1
- package/src/http/task-close-api-router.js +59 -0
- package/src/judgment/acceptance.js +2 -2
- package/src/judgment/agent-view.js +8 -8
- package/src/judgment/conversation.js +75 -69
- package/src/judgment/engine.js +39 -37
- package/src/judgment/explain-method.js +8 -7
- package/src/judgment/http.js +5 -3
- package/src/judgment/question-options.js +117 -74
- package/src/judgment/question-tools.js +54 -34
- package/src/judgment/review-delegation.js +32 -7
- package/src/judgment/review-egress.js +25 -0
- package/src/judgment/review-prompt.js +29 -33
- package/src/judgment/routing.js +4 -3
- package/src/judgment/service.js +51 -9
- package/src/judgment/verdict-schema.js +2 -7
- package/src/knowledge-hard-delete/console-port.js +1 -7
- package/src/knowledge-hard-delete/forget-references.js +1 -1
- package/src/knowledge-owner-reads/console-port.js +8 -19
- package/src/mcp/chat-listing.js +1 -1
- package/src/mcp/create-mcp-server.js +13 -33
- package/src/mcp/direct-call.js +3 -4
- package/src/mcp/preference-delivery.js +65 -5
- package/src/mcp/provider-task-context-registry.js +14 -0
- package/src/mcp/session-id.js +13 -37
- package/src/mcp/tool-annotations.js +3 -44
- package/src/mcp/tool-result.js +8 -6
- package/src/model-backends/adapters/builtin-embeddings.js +44 -0
- package/src/model-backends/adapters/registry.js +3 -1
- package/src/model-backends/config.js +24 -4
- package/src/model-backends/egress.js +8 -0
- package/src/model-backends/failures.js +8 -0
- package/src/model-backends/port.js +46 -17
- package/src/model-backends/role-trust.js +3 -9
- package/src/model-backends/runtime.js +6 -13
- package/src/model-backends/secret-store.js +2 -20
- package/src/model-backends/usage-ledger.js +20 -9
- package/src/native-runtime/runtime.js +13 -2
- package/src/presence/windows-helper-pin.js +1 -1
- package/src/project-organizing/agent-tool.js +92 -0
- package/src/project-organizing/model-tiers.js +31 -0
- package/src/project-organizing/port.js +130 -0
- package/src/server.js +29 -13
- package/src/setup/agents/claude-code/descriptor.json +1 -5
- package/src/setup/agents/codex/descriptor.json +1 -5
- package/src/setup/agents/cursor/descriptor.json +1 -5
- package/src/setup/agents/descriptor-schema.js +4 -1
- package/src/setup/agents/opencode/descriptor.json +1 -5
- package/src/setup/paths.js +1 -0
- package/src/system/client-connection-install.js +12 -2
- package/src/system/client-connection-status.js +90 -20
- package/src/system/client-restart.js +72 -0
- package/src/system/configured-install.js +103 -0
- package/src/system/doctor-repair.js +3 -1
- package/src/system/doctor.js +3 -1
- package/src/system/system-service.js +14 -2
- package/src/task-blockers/agent-resume.js +73 -0
- package/src/task-blockers/console-port.js +5 -2
- package/src/task-blockers/resume-status.js +2 -0
- package/src/task-closing/console-port.js +26 -0
- package/src/whats-new/lines/0.27.0.json +13 -0
- package/src/whats-new/lines/0.27.1.json +13 -0
- package/dist/web/assets/AgentAppsPage-5VW0uCTz.js +0 -1
- package/dist/web/assets/AgentProfilePage-BLeyT3By.js +0 -5
- package/dist/web/assets/AgentServicesPage-BXi152Xc.js +0 -1
- package/dist/web/assets/Breadcrumb-DtM5lZy5.js +0 -1
- package/dist/web/assets/CaptureChangePage-BzwcfacI.js +0 -1
- package/dist/web/assets/ConnectionsPage-C_vgqwF2.js +0 -1
- package/dist/web/assets/ConnectionsPage-DS2PEG6K.css +0 -1
- package/dist/web/assets/DataFormatPage-DwL4Ofc9.js +0 -2
- package/dist/web/assets/DebugTurnPage-UpK_3ZWY.js +0 -1
- package/dist/web/assets/DebugTurnsPage-C0aZg5-3.js +0 -1
- package/dist/web/assets/EmployeeScopeDialog-Bt3ZlDyZ.js +0 -1
- package/dist/web/assets/EmployeeWorkbench-GtJIUD5G.js +0 -4
- package/dist/web/assets/FieldRoot-DRf4wM5x.js +0 -1
- package/dist/web/assets/FlasPage-CgIVOGFM.js +0 -1
- package/dist/web/assets/InboxPage-1ue8vA7H.css +0 -1
- package/dist/web/assets/InboxPage-zNUnnYeJ.js +0 -6
- package/dist/web/assets/KnowledgeItemEditPage-DGRNkAYd.js +0 -1
- package/dist/web/assets/KnowledgeOrganizerPage-BWvF1GEu.js +0 -1
- package/dist/web/assets/KnowledgePage--Z4_kAhq.js +0 -1
- package/dist/web/assets/KnowledgePeek-BgzQA9SI.js +0 -1
- package/dist/web/assets/KnowledgeWorkspace-0yOpWtEB.js +0 -4
- package/dist/web/assets/KnowledgeWorkspace-BgWo6lBj.css +0 -1
- package/dist/web/assets/ModelSettingsPage-B9PS1Kay.css +0 -1
- package/dist/web/assets/ModelSettingsPage-BL6MsF7C.js +0 -1
- package/dist/web/assets/NoticeRow-BXZWn4EZ.js +0 -1
- package/dist/web/assets/OccupationsPage-CkVqZ2pz.js +0 -1
- package/dist/web/assets/OverviewPage-_9e2idJR.js +0 -1
- package/dist/web/assets/PageOutline-CFGtHmOK.js +0 -1
- package/dist/web/assets/PageOutline-DG5ZYtA8.css +0 -1
- package/dist/web/assets/PersonalProfilePage-TxsNr44t.js +0 -1
- package/dist/web/assets/PersonalProjectsPage-AhgP6CL8.js +0 -1
- package/dist/web/assets/ProjectAgentsPage-O-cMavcz.js +0 -5
- package/dist/web/assets/ProjectJudgmentPolicy-CyHAu0nm.js +0 -2
- package/dist/web/assets/ProjectJudgmentPolicy-DnjMniaz.css +0 -1
- package/dist/web/assets/PublicProjectsPage-Ck1QSR0R.js +0 -1
- package/dist/web/assets/PublicProjectsPage-CskSzffL.css +0 -1
- package/dist/web/assets/SettingsPage-Cj3pEWcd.css +0 -1
- package/dist/web/assets/SettingsPage-bLssMIz6.js +0 -1
- package/dist/web/assets/SharedJefaReportPage-DUY03VLS.js +0 -1
- package/dist/web/assets/TaskBlockerClear-BxOiiuK8.js +0 -1
- package/dist/web/assets/TaskBlockerNotice-iUiD3BuZ.js +0 -1
- package/dist/web/assets/TonborgDelegationSwitch-C1nkJqkJ.js +0 -1
- package/dist/web/assets/TonborgDelegationSwitch-DeqERWoo.css +0 -1
- package/dist/web/assets/UiDialog-JjqzOA0z.js +0 -1
- package/dist/web/assets/UiIcon-vgD4v8q8.js +0 -1
- package/dist/web/assets/UiIconButton-BzyMc14P.js +0 -1
- package/dist/web/assets/UiIconButton-ZCBdABdM.css +0 -1
- package/dist/web/assets/UiSegmented-CIIm3KoV.js +0 -1
- package/dist/web/assets/WidgetSlot-Dw5nWlb7.js +0 -2
- package/dist/web/assets/WorkbenchListPage-D0xX-YNl.js +0 -1
- package/dist/web/assets/_plugin-vue_export-helper-B4pFJCwG.js +0 -9
- package/dist/web/assets/agent-occupation-CjfQqSzd.js +0 -1
- package/dist/web/assets/agent-profile-BNPLhDog.css +0 -1
- package/dist/web/assets/agent-roster-records-Bi5HWDif.js +0 -1
- package/dist/web/assets/console-DgRc8Itw.js +0 -1
- package/dist/web/assets/conversation-launcher-settings-CZAfuu8B.js +0 -1
- package/dist/web/assets/identity-DIG-uOiU.js +0 -1
- package/dist/web/assets/index-C2VDC1uO.js +0 -24
- package/dist/web/assets/index-DF0TcfPY.css +0 -1
- package/dist/web/assets/label-table-CDzYRZpc.js +0 -1
- package/dist/web/assets/model-BjUERpoQ.js +0 -3
- package/dist/web/assets/npm-copies-BLRc0FXW.js +0 -1
- package/dist/web/assets/overview-data-Cq1gefY5.js +0 -1
- package/dist/web/assets/popup-host-ctKYu9Ze.js +0 -1
- package/dist/web/assets/review-api-CJaNgPMA.js +0 -1
- package/dist/web/assets/review-store-DSQpb5P8.js +0 -1
- package/dist/web/assets/shared-report-DQBSigHB.js +0 -3
- package/dist/web/assets/source-adapters-DPJzumzC.js +0 -1
- package/dist/web/assets/task-evidence-DIbw2U42.js +0 -1
- package/dist/web/assets/ui-D4nAhcmu.css +0 -1
- package/dist/web/assets/ui-DmNbL8MW.js +0 -1
- package/dist/web/assets/useForwardScopeId-DZCnSswO.js +0 -1
- package/dist/web/assets/usePrimitiveElement-tPQM7XJs.js +0 -1
- package/dist/web/assets/useTeamPeople-D_5cxxf1.js +0 -1
- package/dist/web/assets/version-lXtOG8uf.js +0 -1
- package/docs/public-personal-architecture.md +0 -73
- package/graph-provider/fuli_graph/common_knowledge.py +0 -459
- package/graph-provider/fuli_graph/common_knowledge_models.py +0 -54
- package/graph-provider/fuli_graph/project_management.py +0 -251
- package/skills/flreview/SKILL.md +0 -101
- package/skills/flreview/agents/openai.yaml +0 -6
- package/src/agent-tools/project-relation-definitions.js +0 -36
- package/src/agents/codex/acp-process.js +0 -244
- package/src/agents/codex/acp-session.js +0 -190
- package/src/agents/codex/acp-worker.js +0 -54
- package/src/agents/codex/review-command.js +0 -29
- package/src/cli/worker-command.js +0 -80
- package/src/graphiti/checkpoint-provider-outage.js +0 -23
- package/src/graphiti/common-knowledge-candidates.js +0 -222
- package/src/graphiti/public-project-relations.js +0 -28
- package/src/graphiti/public-projects.js +0 -125
- package/src/graphiti/public-submission-reconciliation.js +0 -37
- package/src/graphiti/public-submission.js +0 -77
- package/src/graphiti/publication-draft-capture.js +0 -28
- package/src/graphiti/publication-draft-input.js +0 -11
- package/src/graphiti/publication-review-queues.js +0 -50
- package/src/graphiti/worker-plan-host.js +0 -92
- package/src/graphiti/worker-run-host.js +0 -287
- package/src/graphiti/workflow-observation.js +0 -72
- package/src/mcp/common-knowledge-preview-tokens.js +0 -67
- package/src/server/worker-plan-runtime.js +0 -56
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import math
|
|
1
2
|
import re
|
|
2
3
|
from datetime import datetime
|
|
3
4
|
|
|
@@ -21,12 +22,32 @@ from .search_projection import (
|
|
|
21
22
|
read_edge_epistemic_metadata,
|
|
22
23
|
source_uris_from_references,
|
|
23
24
|
)
|
|
24
|
-
from .knowledge_semantic import fused_ranking,
|
|
25
|
+
from .knowledge_semantic import cosine_parts, fused_ranking, standing_out, usable_cosine, vector_norm
|
|
25
26
|
from .knowledge_weight import knowledge_weight, ranking_weight
|
|
26
27
|
from .knowledge_tag_ranking import TagRanking
|
|
27
28
|
from .knowledge_visibility import AgentReader, fla_endpoints_visible_cypher, fla_visible, reader_parameter
|
|
28
29
|
|
|
29
30
|
MIN_TERM_COVERAGE = 0.25
|
|
31
|
+
# How much of an item's rank its relevance alone decides; the rest scales with
|
|
32
|
+
# its knowledge weight. At 0.5 an exact match that is still pending ranks above a
|
|
33
|
+
# partial match a person confirmed, and no tag boost (at most 1.25) lifts an item
|
|
34
|
+
# flagged for attention above an unflagged one that matches as well.
|
|
35
|
+
RELEVANCE_SHARE = 0.5
|
|
36
|
+
# With the query's terms weighed by how few candidates carry them
|
|
37
|
+
# (_term_weights), a record must carry this share of the query's weight.
|
|
38
|
+
MIN_WEIGHTED_COVERAGE = 0.33
|
|
39
|
+
# ...and one of the terms it carries must be distinctive: carried by fewer
|
|
40
|
+
# than about one candidate in six. Carrying nearly the whole query needs no
|
|
41
|
+
# distinctive term.
|
|
42
|
+
DISTINCTIVE_TERM_WEIGHT = math.log(6)
|
|
43
|
+
WHOLE_QUERY_COVERAGE = 0.75
|
|
44
|
+
# Below this many candidates, how many carry a term says nothing about the
|
|
45
|
+
# term: every term counts the same, as without weights.
|
|
46
|
+
MIN_WEIGHED_CANDIDATES = 8
|
|
47
|
+
# A term no candidate carries is either a word nobody wrote down or two
|
|
48
|
+
# characters that only meet across a word boundary (按钮设计 -> 钮设): it
|
|
49
|
+
# counts against a match, at half the weight of the rarest real term.
|
|
50
|
+
UNSEEN_TERM_FACTOR = 0.5
|
|
30
51
|
# How many items with a vector of the query's model one search compares (rec#88).
|
|
31
52
|
SEMANTIC_CANDIDATE_LIMIT = 5000
|
|
32
53
|
# A preference key's separators, so `reply-language` is also the words "reply language".
|
|
@@ -41,6 +62,8 @@ CHINESE_QUERY_FILLERS = (
|
|
|
41
62
|
'请问', '麻烦', '帮忙', '帮我', '告诉我', '查找', '查询', '是什么', '在哪里',
|
|
42
63
|
'在哪儿', '为什么', '怎么样', '怎样', '怎么', '哪里', '哪个', '多少', '有没有',
|
|
43
64
|
'是否', '一下',
|
|
65
|
+
# After the longer forms above: the bare question words name nothing either.
|
|
66
|
+
'什么', '如何', '哪些',
|
|
44
67
|
)
|
|
45
68
|
|
|
46
69
|
|
|
@@ -60,7 +83,7 @@ async def search_knowledge(store, actor: dict, request: SearchRequest, *, tag_ex
|
|
|
60
83
|
edges = [*edges, *(edge for edge in term_edges if edge.uuid not in found)]
|
|
61
84
|
lexical_ids = {edge.uuid for edge in edges}
|
|
62
85
|
# Relationships found by meaning pass the very same filters below.
|
|
63
|
-
|
|
86
|
+
meaning_scores, meaning_edges = await _semantic_edge_candidates(store, personal_space, request)
|
|
64
87
|
edges = [*edges, *(edge for edge in meaning_edges if edge.uuid not in lexical_ids)]
|
|
65
88
|
if not request.include_historical:
|
|
66
89
|
edges = [edge for edge in edges if edge.invalid_at is None]
|
|
@@ -96,33 +119,23 @@ async def search_knowledge(store, actor: dict, request: SearchRequest, *, tag_ex
|
|
|
96
119
|
]
|
|
97
120
|
names = await _entity_names(store, edges)
|
|
98
121
|
tag_ranking = await TagRanking.for_search(store, personal_space, request, project_scopes)
|
|
99
|
-
|
|
122
|
+
in_scope_scores = {edge.uuid: meaning_scores[edge.uuid] for edge in edges if edge.uuid in meaning_scores}
|
|
100
123
|
edges = [edge for edge in edges if edge.uuid in lexical_ids]
|
|
101
|
-
|
|
102
|
-
(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
epistemic.get(edge.uuid, {}),
|
|
114
|
-
),
|
|
115
|
-
edge,
|
|
116
|
-
)
|
|
117
|
-
for position, edge in enumerate(edges)
|
|
118
|
-
),
|
|
119
|
-
key=lambda item: (item[0], _tie_weight(epistemic.get(item[1].uuid, {}))),
|
|
120
|
-
reverse=True,
|
|
121
|
-
)
|
|
122
|
-
ranked_edges = [item for item in ranked_edges if item[0] > 0]
|
|
124
|
+
matched_edges = [
|
|
125
|
+
(_edge_relevance(request.query, edge, names, position, len(edges), edge_terms.get(edge.uuid)), edge)
|
|
126
|
+
for position, edge in enumerate(edges)
|
|
127
|
+
]
|
|
128
|
+
# Same score and weight: the closer match first (a band holds unequal matches).
|
|
129
|
+
ranked_edges = [
|
|
130
|
+
(score, edge) for score, _, edge in sorted(
|
|
131
|
+
((_ranked_relevance(matched, epistemic.get(edge.uuid, {})), matched, edge) for matched, edge in matched_edges),
|
|
132
|
+
key=lambda item: (item[0], _tie_weight(epistemic.get(item[2].uuid, {})), item[1]),
|
|
133
|
+
reverse=True,
|
|
134
|
+
) if score > 0
|
|
135
|
+
]
|
|
123
136
|
meaning_edges = {edge.uuid: edge for edge in meaning_edges}
|
|
124
137
|
ranked_edges, edge_matches = _fused_with_meaning(
|
|
125
|
-
ranked_edges, [meaning_edges[edge_id] for edge_id in
|
|
138
|
+
ranked_edges, [meaning_edges[edge_id] for edge_id in standing_out(in_scope_scores, request.limit)],
|
|
126
139
|
lambda edge: edge.uuid)
|
|
127
140
|
if personal_space:
|
|
128
141
|
ranked_edges = _dedupe_ranked_edges(
|
|
@@ -343,21 +356,8 @@ async def _personal_entities(
|
|
|
343
356
|
if not project_scopes and not request.include_personal_global:
|
|
344
357
|
return []
|
|
345
358
|
scoped_records = await _scoped_entity_records(store, space, request, project_scopes)
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
(
|
|
349
|
-
record,
|
|
350
|
-
_ranked_relevance(
|
|
351
|
-
_relevance(request.query, record),
|
|
352
|
-
record,
|
|
353
|
-
),
|
|
354
|
-
)
|
|
355
|
-
for record in scoped_records
|
|
356
|
-
),
|
|
357
|
-
key=lambda item: (item[1], _tie_weight(item[0]), _timestamp(item[0].get('created_at'))),
|
|
358
|
-
reverse=True,
|
|
359
|
-
)
|
|
360
|
-
ranked = [item for item in ranked if item[1] > 0]
|
|
359
|
+
term_weights = _term_weights(request.query, scoped_records)
|
|
360
|
+
ranked = _ranked_records([(record, _relevance(request.query, record, term_weights)) for record in scoped_records])
|
|
361
361
|
meaning = await _semantic_entities(store, space, request, project_scopes)
|
|
362
362
|
fused, entity_matches = _fused_with_meaning(
|
|
363
363
|
[(score, record) for record, score in ranked], meaning, lambda record: record['id'])
|
|
@@ -378,8 +378,9 @@ async def _personal_entities(
|
|
|
378
378
|
async def _scoped_entity_records(store, space, request: SearchRequest, project_scopes: dict[str, dict],
|
|
379
379
|
*, semantic_model: str | None = None) -> list[dict]:
|
|
380
380
|
"""The entities this search may return, with their scope. With a
|
|
381
|
-
semantic_model, only those carrying a vector of that model, and
|
|
382
|
-
|
|
381
|
+
semantic_model, only those carrying a vector of that model, and what
|
|
382
|
+
its cosine with the query is made of: the same filters decide either way
|
|
383
|
+
(rec#88)."""
|
|
383
384
|
records, _, _ = await store.runtime.driver.execute_query(
|
|
384
385
|
'''
|
|
385
386
|
MATCH (node:Entity {group_id: $group_id})
|
|
@@ -470,8 +471,7 @@ async def _scoped_entity_records(store, space, request: SearchRequest, project_s
|
|
|
470
471
|
node.fuli_last_feedback_at AS last_feedback_at,
|
|
471
472
|
node.fuli_retrieval_terms AS retrieval_terms,
|
|
472
473
|
node.fuli_retrieval_context AS retrieval_context,
|
|
473
|
-
|
|
474
|
-
AS semantic_vector,
|
|
474
|
+
<semantic parts>,
|
|
475
475
|
CASE WHEN $semantic_model IS NOT NULL THEN node.fuli_semantic_hash END
|
|
476
476
|
AS semantic_hash,
|
|
477
477
|
[episode IN episodes | episode.uuid] AS evidence_ids,
|
|
@@ -484,13 +484,15 @@ async def _scoped_entity_records(store, space, request: SearchRequest, project_s
|
|
|
484
484
|
}] AS source_references
|
|
485
485
|
ORDER BY node.name, node.uuid
|
|
486
486
|
LIMIT $candidate_limit
|
|
487
|
-
''',
|
|
487
|
+
'''.replace('<semantic parts>',
|
|
488
|
+
cosine_parts('node.fuli_semantic_vector') if semantic_model else 'null AS semantic_dot'),
|
|
488
489
|
group_id=space['group_id'],
|
|
489
490
|
space_id=space['id'],
|
|
490
491
|
project_ids=list(project_scopes),
|
|
491
492
|
include_historical=request.include_historical,
|
|
492
493
|
include_pending=request.include_pending,
|
|
493
494
|
semantic_model=semantic_model,
|
|
495
|
+
**({'query_vector': request.semantic.vector, 'length': len(request.semantic.vector)} if semantic_model else {}),
|
|
494
496
|
candidate_limit=SEMANTIC_CANDIDATE_LIMIT if semantic_model else store.settings.graph_limit,
|
|
495
497
|
routing_='r',
|
|
496
498
|
)
|
|
@@ -526,21 +528,21 @@ async def _semantic_entities(store, space, request: SearchRequest, project_scope
|
|
|
526
528
|
return []
|
|
527
529
|
records = await _scoped_entity_records(store, space, request, project_scopes,
|
|
528
530
|
semantic_model=request.semantic.model)
|
|
529
|
-
|
|
530
|
-
by_id,
|
|
531
|
+
query_norm = vector_norm(request.semantic.vector)
|
|
532
|
+
by_id, scores = {}, {}
|
|
531
533
|
for record in records:
|
|
532
|
-
|
|
533
|
-
if
|
|
534
|
-
by_id[record['id']],
|
|
535
|
-
return [by_id[item_id] for item_id in
|
|
534
|
+
score = usable_cosine('entity', record, query_norm)
|
|
535
|
+
if score is not None:
|
|
536
|
+
by_id[record['id']], scores[record['id']] = record, score
|
|
537
|
+
return [by_id[item_id] for item_id in standing_out(scores, request.limit)]
|
|
536
538
|
|
|
537
539
|
|
|
538
540
|
async def _semantic_edge_candidates(store, space, request: SearchRequest) -> tuple[dict, list[EntityEdge]]:
|
|
539
541
|
"""Every relationship of the personal space with a usable vector of the
|
|
540
|
-
query's model, as candidates for the
|
|
542
|
+
query's model and its cosine with the query, as candidates for the
|
|
543
|
+
search's own filters (rec#88)."""
|
|
541
544
|
if request.semantic is None or space is None:
|
|
542
545
|
return {}, []
|
|
543
|
-
length = len(request.semantic.vector)
|
|
544
546
|
records, _, _ = await store.runtime.driver.execute_query(
|
|
545
547
|
'''
|
|
546
548
|
MATCH (source:Entity)-[edge:RELATES_TO {group_id: $group_id}]->(target:Entity)
|
|
@@ -550,25 +552,27 @@ async def _semantic_edge_candidates(store, space, request: SearchRequest) -> tup
|
|
|
550
552
|
edge.group_id AS group_id, edge.name AS name, edge.fact AS fact,
|
|
551
553
|
coalesce(edge.episodes, []) AS episodes, edge.created_at AS created_at,
|
|
552
554
|
edge.valid_at AS valid_at, edge.invalid_at AS invalid_at, edge.expired_at AS expired_at,
|
|
553
|
-
|
|
555
|
+
<semantic parts>, edge.fuli_semantic_hash AS semantic_hash,
|
|
554
556
|
edge.fuli_retrieval_terms AS retrieval_terms, edge.fuli_retrieval_context AS retrieval_context
|
|
555
557
|
ORDER BY edge.uuid
|
|
556
558
|
LIMIT $candidate_limit
|
|
557
|
-
''',
|
|
559
|
+
'''.replace('<semantic parts>', cosine_parts('edge.fuli_semantic_vector')),
|
|
558
560
|
group_id=space['group_id'],
|
|
559
561
|
semantic_model=request.semantic.model,
|
|
560
|
-
|
|
562
|
+
query_vector=request.semantic.vector,
|
|
563
|
+
length=len(request.semantic.vector),
|
|
561
564
|
candidate_limit=SEMANTIC_CANDIDATE_LIMIT,
|
|
562
565
|
routing_='r',
|
|
563
566
|
)
|
|
564
|
-
|
|
567
|
+
query_norm = vector_norm(request.semantic.vector)
|
|
568
|
+
scores, edges = {}, []
|
|
565
569
|
for record in records:
|
|
566
|
-
|
|
567
|
-
if
|
|
570
|
+
score = usable_cosine('relationship', record, query_norm)
|
|
571
|
+
if score is None:
|
|
568
572
|
continue
|
|
569
|
-
|
|
573
|
+
scores[record['uuid']] = score
|
|
570
574
|
edges.append(_edge_from_record(record))
|
|
571
|
-
return
|
|
575
|
+
return scores, edges
|
|
572
576
|
|
|
573
577
|
|
|
574
578
|
async def _term_edge_candidates(store, space, request: SearchRequest) -> tuple[dict, list[EntityEdge]]:
|
|
@@ -611,12 +615,6 @@ def _edge_from_record(record) -> EntityEdge:
|
|
|
611
615
|
)
|
|
612
616
|
|
|
613
617
|
|
|
614
|
-
def _meaning_order(request: SearchRequest, vectors: dict) -> list[str]:
|
|
615
|
-
if request.semantic is None:
|
|
616
|
-
return []
|
|
617
|
-
return list(meaning_matches(vectors, request.semantic.vector, request.limit))
|
|
618
|
-
|
|
619
|
-
|
|
620
618
|
def _fused_with_meaning(lexical, meaning, item_id):
|
|
621
619
|
"""lexical: [(score, payload)] in its ranked order; meaning: [payload] best
|
|
622
620
|
first. Without meaning the lexical result stands as it is. Otherwise every
|
|
@@ -760,14 +758,37 @@ def _agent_scope_metadata(project_id: str, scope: dict, agent_id: str) -> dict:
|
|
|
760
758
|
}
|
|
761
759
|
|
|
762
760
|
|
|
761
|
+
def _ranked_records(matched_records):
|
|
762
|
+
"""Records with how well each matched, best first as (record, score). At
|
|
763
|
+
the same score and weight the closer match comes first, then the newer: a
|
|
764
|
+
band holds unequal matches, and the newer one is not the better answer."""
|
|
765
|
+
return [
|
|
766
|
+
(record, score) for record, score, _ in sorted(
|
|
767
|
+
((record, _ranked_relevance(matched, record), matched) for record, matched in matched_records),
|
|
768
|
+
key=lambda item: (item[1], _tie_weight(item[0]), item[2], _timestamp(item[0].get('created_at'))),
|
|
769
|
+
reverse=True,
|
|
770
|
+
) if score > 0
|
|
771
|
+
]
|
|
772
|
+
|
|
773
|
+
|
|
763
774
|
def _ranked_relevance(base_score: float, metadata) -> float:
|
|
764
|
-
"""Relevance
|
|
775
|
+
"""Relevance first, then the item's knowledge weight (the one people see):
|
|
776
|
+
at equal relevance the stronger confirmation always ranks higher, but a
|
|
777
|
+
weak match no longer outranks a strong one only because it is confirmed."""
|
|
765
778
|
if base_score <= 0:
|
|
766
779
|
return 0.0
|
|
767
780
|
scope_distance = int(metadata.get('scope_distance') or 0)
|
|
768
781
|
scope_factor = max(0.65, 1.0 - scope_distance * 0.15)
|
|
769
782
|
weight = ranking_weight(metadata, evidence_ids=metadata.get('evidence_ids') or [])
|
|
770
|
-
return round(base_score * weight * scope_factor, 4)
|
|
783
|
+
return round(_relevance_band(base_score) * (RELEVANCE_SHARE + (1 - RELEVANCE_SHARE) * weight) * scope_factor, 4)
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
def _relevance_band(base_score: float) -> float:
|
|
787
|
+
"""Relevance in whole steps: items that match about equally well share a
|
|
788
|
+
band, so inside it the weight alone orders them (a small difference in
|
|
789
|
+
semantic order never puts a pending item above a confirmed one)."""
|
|
790
|
+
# Half a step is what semantic order adds at most (_edge_relevance): it stays in the band.
|
|
791
|
+
return float(math.ceil(base_score - 0.5)) or base_score
|
|
771
792
|
|
|
772
793
|
|
|
773
794
|
def _scope_precedence(
|
|
@@ -871,7 +892,8 @@ def _entity_search_result(record, score: float, space_id: str, matched_by: str =
|
|
|
871
892
|
'has_global_episode',
|
|
872
893
|
'reference_project_ids',
|
|
873
894
|
'inherited',
|
|
874
|
-
'
|
|
895
|
+
'semantic_dot',
|
|
896
|
+
'semantic_norm2',
|
|
875
897
|
'semantic_hash',
|
|
876
898
|
'retrieval_terms',
|
|
877
899
|
'retrieval_context',
|
|
@@ -912,20 +934,53 @@ async def _entity_names(store, edges: list[EntityEdge]) -> dict[str, str]:
|
|
|
912
934
|
return {record['uuid']: record['name'] for record in records}
|
|
913
935
|
|
|
914
936
|
|
|
915
|
-
def
|
|
916
|
-
|
|
917
|
-
haystack = _normalized(' '.join(filter(None, [
|
|
937
|
+
def _haystack(record) -> str:
|
|
938
|
+
return _normalized(' '.join(filter(None, [
|
|
918
939
|
record.get('name'), record.get('type'), record.get('summary'),
|
|
919
940
|
record.get('reasoning_summary'), record.get('profile_aspect'), record.get('retrieval_context'),
|
|
920
941
|
])))
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
def _term_weights(query: str, records) -> dict[str, float]:
|
|
945
|
+
"""How much each term of the query tells apart the records this search
|
|
946
|
+
may return: a word most of them carry (the product's name, 控制台, fla)
|
|
947
|
+
says little, one few carry says a lot. Sharing only common words with the
|
|
948
|
+
query is then not a match (rec#111). The usual inverse document frequency,
|
|
949
|
+
over the search's own candidates; empty (no weighing) for a handful of them."""
|
|
950
|
+
terms = _terms(_normalized(query))
|
|
951
|
+
if not terms or len(records) < MIN_WEIGHED_CANDIDATES:
|
|
952
|
+
return {}
|
|
953
|
+
carried = dict.fromkeys(terms, 0)
|
|
954
|
+
for record in records:
|
|
955
|
+
for term in terms & _terms(_haystack(record)):
|
|
956
|
+
carried[term] += 1
|
|
957
|
+
total = len(records)
|
|
958
|
+
return {term: math.log((total - count + 0.5) / (count + 0.5) + 1) * (1.0 if count else UNSEEN_TERM_FACTOR)
|
|
959
|
+
for term, count in carried.items()}
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
def _too_common(matched, coverage: float, term_weights: dict[str, float]) -> bool:
|
|
963
|
+
"""Not a match: too little of the query's weight, or only words most candidates carry."""
|
|
964
|
+
if coverage < MIN_WEIGHTED_COVERAGE:
|
|
965
|
+
return True
|
|
966
|
+
return (coverage < WHOLE_QUERY_COVERAGE
|
|
967
|
+
and max((term_weights.get(term, 0.0) for term in matched), default=0.0) < DISTINCTIVE_TERM_WEIGHT)
|
|
968
|
+
|
|
969
|
+
|
|
970
|
+
def _relevance(query: str, record, term_weights: dict[str, float] | None = None) -> float:
|
|
971
|
+
needle = _normalized(query)
|
|
972
|
+
haystack = _haystack(record)
|
|
921
973
|
if not needle:
|
|
922
974
|
return 0.0
|
|
923
|
-
score = 8.0 if needle in haystack else 0.0
|
|
975
|
+
score = 8.0 if needle in haystack or _joined(needle) in _joined(haystack) else 0.0
|
|
924
976
|
score = max(score, _alias_relevance(needle, _retrieval_aliases(record)))
|
|
925
977
|
terms = _terms(needle)
|
|
926
978
|
if terms:
|
|
927
|
-
|
|
928
|
-
|
|
979
|
+
matched = terms & _terms(haystack)
|
|
980
|
+
whole = sum(term_weights.get(term, 1.0) for term in terms) if term_weights else len(terms)
|
|
981
|
+
coverage = (sum(term_weights.get(term, 1.0) for term in matched) if term_weights else len(matched)) / whole
|
|
982
|
+
if not score and (_too_common(matched, coverage, term_weights) if term_weights
|
|
983
|
+
else coverage < MIN_TERM_COVERAGE):
|
|
929
984
|
return 0.0
|
|
930
985
|
score += coverage * 4.0
|
|
931
986
|
if score and record.get('profile_aspect'):
|
|
@@ -953,7 +1008,17 @@ def _edge_relevance(query: str, edge, names: dict[str, str], position: int, tota
|
|
|
953
1008
|
return round(lexical + semantic_order, 4)
|
|
954
1009
|
|
|
955
1010
|
|
|
1011
|
+
# 的 and 之 between two Chinese characters only link them: 控制台的端口 is the
|
|
1012
|
+
# phrase 控制台端口, as a whole and in its two-character terms.
|
|
1013
|
+
_LINKING_PARTICLE = re.compile(r'(?<=[一-鿿])[的之](?=[一-鿿])')
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
def _joined(value: str) -> str:
|
|
1017
|
+
return _LINKING_PARTICLE.sub('', value)
|
|
1018
|
+
|
|
1019
|
+
|
|
956
1020
|
def _terms(value: str) -> set[str]:
|
|
1021
|
+
value = _joined(value)
|
|
957
1022
|
latin = {
|
|
958
1023
|
_word_stem(term) for term in re.findall(r'[a-z0-9_]+', value)
|
|
959
1024
|
if term not in LATIN_QUERY_FILLERS
|
|
@@ -19,6 +19,11 @@ MIN_IN_SCOPE_ITEMS = 12
|
|
|
19
19
|
# Kept: a cosine at least this many standard deviations above the mean of
|
|
20
20
|
# every in-scope item for this query. No model-specific number is needed.
|
|
21
21
|
FLOOR_STANDARD_DEVIATIONS = 3
|
|
22
|
+
# The single closest item needs to stand out less: a question in other words
|
|
23
|
+
# than the knowledge often leaves its one answer between 2.5 and 3 (measured
|
|
24
|
+
# with a built-in model on paraphrased questions; questions with no answer
|
|
25
|
+
# stayed under 2.4), and one item costs the reader little.
|
|
26
|
+
BEST_FLOOR_STANDARD_DEVIATIONS = 2.5
|
|
22
27
|
|
|
23
28
|
|
|
24
29
|
def item_text(item_kind: str, record: dict) -> str:
|
|
@@ -50,17 +55,44 @@ def usable_vector(item_kind: str, record: dict, length: int) -> list[float] | No
|
|
|
50
55
|
return vector
|
|
51
56
|
|
|
52
57
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
# Cypher for a search: the stored vector's dot product with the query's and
|
|
59
|
+
# its own squared length, when it has the query's length. The database does
|
|
60
|
+
# the arithmetic so the vectors themselves never travel: reading 5000 of them
|
|
61
|
+
# back cost a search most of its time (rec#126).
|
|
62
|
+
#
|
|
63
|
+
# The one-element list binds the stored vector once. Indexing the property
|
|
64
|
+
# itself inside reduce made Neo4j read the whole vector from the store again
|
|
65
|
+
# for every element wherever the plan did not happen to cache it: 1400
|
|
66
|
+
# entities of 512 floats took 7.3 s, bound once 0.14 s (rec#126).
|
|
67
|
+
def cosine_parts(vector: str) -> str:
|
|
68
|
+
stored = f'[stored IN [{vector}] WHERE size(stored) = $length |'
|
|
69
|
+
return f'''head({stored}
|
|
70
|
+
reduce(sum = 0.0, i IN range(0, $length - 1) | sum + stored[i] * $query_vector[i])])
|
|
71
|
+
AS semantic_dot,
|
|
72
|
+
head({stored}
|
|
73
|
+
reduce(sum = 0.0, value IN stored | sum + value * value)])
|
|
74
|
+
AS semantic_norm2'''
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def vector_norm(vector: list[float]) -> float:
|
|
78
|
+
return math.sqrt(sum(value * value for value in vector))
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def usable_cosine(item_kind: str, record: dict, query_norm: float) -> float | None:
|
|
82
|
+
"""The cosine of the record's stored vector (already read for the query's
|
|
83
|
+
model) with the query, from cosine_parts: None when the vector has another
|
|
84
|
+
length or no length at all, or was computed from an earlier text."""
|
|
85
|
+
dot, norm2 = record.get('semantic_dot'), record.get('semantic_norm2')
|
|
86
|
+
if dot is None or not norm2 or not query_norm:
|
|
87
|
+
return None
|
|
88
|
+
if record.get('semantic_hash') != semantic_hash(semantic_text(item_kind, record)):
|
|
89
|
+
return None
|
|
90
|
+
return dot / (query_norm * math.sqrt(norm2))
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def standing_out(scores: dict, limit: int) -> dict:
|
|
94
|
+
"""{key: cosine} of the scores ({key: cosine}, every in-scope item with a
|
|
95
|
+
usable vector) that stand out for this query, best first, at most limit."""
|
|
64
96
|
if len(scores) < MIN_IN_SCOPE_ITEMS:
|
|
65
97
|
return {}
|
|
66
98
|
mean = fmean(scores.values())
|
|
@@ -70,6 +102,10 @@ def meaning_matches(candidates: dict, query_vector: list[float], limit: int) ->
|
|
|
70
102
|
floor = mean + FLOOR_STANDARD_DEVIATIONS * deviation
|
|
71
103
|
kept = sorted((key for key, score in scores.items() if score >= floor),
|
|
72
104
|
key=lambda key: (-scores[key], key))[:limit]
|
|
105
|
+
if not kept and limit > 0:
|
|
106
|
+
best = min(scores, key=lambda key: (-scores[key], key))
|
|
107
|
+
if scores[best] >= mean + BEST_FLOOR_STANDARD_DEVIATIONS * deviation:
|
|
108
|
+
kept = [best]
|
|
73
109
|
return {key: scores[key] for key in kept}
|
|
74
110
|
|
|
75
111
|
|
|
@@ -4,7 +4,9 @@ storing the vectors Node computed, and how far the index is.
|
|
|
4
4
|
A vector is derived data, an index: storing one writes no history and no
|
|
5
5
|
human-change record, and changes no version, lock_version or timestamp. It
|
|
6
6
|
lives on the item, so a permanent delete takes it along. Only the items
|
|
7
|
-
knowledge_index_scan covers are indexed
|
|
7
|
+
knowledge_index_scan covers are indexed, here including those still waiting
|
|
8
|
+
for confirmation, so a search that asks for pending items finds them by
|
|
9
|
+
meaning as well. The text embedded includes the
|
|
8
10
|
item's retrieval terms (rec#92), so storing terms leaves the item pending
|
|
9
11
|
until it is embedded again.
|
|
10
12
|
"""
|
|
@@ -32,7 +34,7 @@ def _indexed(item_kind: str, record, model: str) -> tuple[bool, str, str]:
|
|
|
32
34
|
async def pending_semantic_items(store, actor, request: SemanticPendingRequest) -> SemanticPendingPage:
|
|
33
35
|
space = await personal_reader_space(store, actor, request.personal_space_id)
|
|
34
36
|
items = []
|
|
35
|
-
async for item_kind, record in indexable_from(store, space, request.after):
|
|
37
|
+
async for item_kind, record in indexable_from(store, space, request.after, include_pending=True):
|
|
36
38
|
indexed, text, text_hash = _indexed(item_kind, record, request.model)
|
|
37
39
|
if indexed:
|
|
38
40
|
continue
|
|
@@ -49,7 +51,7 @@ async def semantic_status(store, actor, request: SemanticStatusRequest) -> Seman
|
|
|
49
51
|
space = await personal_reader_space(store, actor, request.personal_space_id)
|
|
50
52
|
total = done = 0
|
|
51
53
|
for item_kind in ITEM_KINDS:
|
|
52
|
-
async for record in indexable_items(store, space, item_kind):
|
|
54
|
+
async for record in indexable_items(store, space, item_kind, include_pending=True):
|
|
53
55
|
total += 1
|
|
54
56
|
done += _indexed(item_kind, record, request.model)[0]
|
|
55
57
|
return SemanticStatus(total=total, done=done)
|
|
@@ -16,6 +16,8 @@ from datetime import datetime, timedelta, timezone
|
|
|
16
16
|
|
|
17
17
|
from fastapi import HTTPException
|
|
18
18
|
|
|
19
|
+
from .auth import require_human_proof
|
|
20
|
+
|
|
19
21
|
from .knowledge_tag_models import (
|
|
20
22
|
DISTINCT_FROM_MAX,
|
|
21
23
|
KnowledgeTagAliasCreate,
|
|
@@ -56,7 +58,6 @@ _ALIAS_HELD = 'Another visible tag already holds this word: attach that tag inst
|
|
|
56
58
|
_ALIAS_PROPOSED = 'Saved as a proposal; resolve ignores it until a person adds the same alias.'
|
|
57
59
|
_SHARED_REFUSED = 'shared vocabulary changes need governance and are not available yet'
|
|
58
60
|
_NO_CURRENT_PROJECT = 'with no current project, set namespace personal explicitly'
|
|
59
|
-
_HUMAN_PROOF = 'independent human review proof required'
|
|
60
61
|
_RETIRED = 'A person retired this tag; only they can bring it back, from the FULI console.'
|
|
61
62
|
_REVIVE_PREVIEW = ('Bringing this retired tag back would drop relations or aliases that no longer fit; '
|
|
62
63
|
'nothing changed. Confirm the revival preview in the FULI console.')
|
|
@@ -66,12 +67,6 @@ def project_namespace(project_id: str) -> str:
|
|
|
66
67
|
return f'project:{project_id}'
|
|
67
68
|
|
|
68
69
|
|
|
69
|
-
def _require_human_proof(actor: dict, operation_actor: str) -> None:
|
|
70
|
-
"""A change recorded as the person's own needs the console's human-review proof."""
|
|
71
|
-
if operation_actor == 'human' and actor.get('_human_review_verified') is not True:
|
|
72
|
-
raise HTTPException(status_code=403, detail=_HUMAN_PROOF)
|
|
73
|
-
|
|
74
|
-
|
|
75
70
|
async def resolve_tags(store, actor: dict, request: KnowledgeTagResolve) -> KnowledgeTagResolveResult:
|
|
76
71
|
space, namespaces = await visible_tag_scope(store, actor, request, 'reader')
|
|
77
72
|
candidates = await find_candidates(
|
|
@@ -83,7 +78,7 @@ async def resolve_tags(store, actor: dict, request: KnowledgeTagResolve) -> Know
|
|
|
83
78
|
|
|
84
79
|
|
|
85
80
|
async def create_tag(store, actor: dict, request: KnowledgeTagCreate) -> KnowledgeTagCreateResult:
|
|
86
|
-
|
|
81
|
+
require_human_proof(actor, request.operation_actor)
|
|
87
82
|
namespace = _new_tag_namespace(request)
|
|
88
83
|
space, visible = await visible_tag_scope(store, actor, request, 'maintainer')
|
|
89
84
|
key = identity_key(request.name)
|
|
@@ -147,7 +142,7 @@ async def _reuse_earlier_identity(vocabulary, space: dict, actor: dict, earlier:
|
|
|
147
142
|
|
|
148
143
|
|
|
149
144
|
async def add_tag_alias(store, actor: dict, request: KnowledgeTagAliasCreate) -> KnowledgeTagAliasResult:
|
|
150
|
-
|
|
145
|
+
require_human_proof(actor, request.operation_actor)
|
|
151
146
|
space, namespaces = await visible_tag_scope(store, actor, request, 'maintainer')
|
|
152
147
|
key = identity_key(request.alias)
|
|
153
148
|
async with store.knowledge_tag_vocabulary().locked(space['id']) as vocabulary:
|
|
@@ -201,7 +196,7 @@ async def _change_link(store, actor: dict, request: KnowledgeTagLinkChange, *, a
|
|
|
201
196
|
race to a hard delete finds no item (no orphan link), and one that loses a
|
|
202
197
|
race to a merge lands on the merged-into tag, never on a tag that no longer
|
|
203
198
|
resolves. A hard delete and a merge take the same space lock."""
|
|
204
|
-
|
|
199
|
+
require_human_proof(actor, request.operation_actor)
|
|
205
200
|
space, namespaces = await visible_tag_scope(store, actor, request, 'maintainer')
|
|
206
201
|
port = store.knowledge_tag_vocabulary()
|
|
207
202
|
await visible_tag(port.reader(space['id']), namespaces, request.tag_id)
|