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,7 +1,6 @@
|
|
|
1
|
-
// What one model request is made of, by source.
|
|
2
|
-
//
|
|
1
|
+
// What one model request is made of, by source. Tokens come from the answer's
|
|
2
|
+
// own usage, so only their total is what was counted.
|
|
3
3
|
|
|
4
|
-
const size = (value) => Buffer.byteLength(typeof value === 'string' ? value : JSON.stringify(value ?? ''), 'utf8');
|
|
5
4
|
const textBlocks = (content) => (typeof content === 'string' ? [content]
|
|
6
5
|
: (Array.isArray(content) ? content : []).filter(block => block?.type === 'text').map(block => block.text ?? ''));
|
|
7
6
|
// FULI's task entry and rules, however a host wraps them in the turn.
|
|
@@ -14,18 +13,6 @@ const PERSON_FILES = /Contents of .*(CLAUDE|AGENTS|MEMORY)\.md/;
|
|
|
14
13
|
// block that merely mentions FULI next to other hooks' text is not FULI's.
|
|
15
14
|
const pieces = (text) => text.split(/(?=<system-reminder>)|(?<=<\/system-reminder>)|(?=\b[A-Za-z]+ hook additional context:)|(?=<EXTREMELY_IMPORTANT>)|(?<=<\/EXTREMELY_IMPORTANT>)/);
|
|
16
15
|
|
|
17
|
-
function messageSections(messages = []) {
|
|
18
|
-
let fuliContext = 0;
|
|
19
|
-
let total = 0;
|
|
20
|
-
for (const message of messages) {
|
|
21
|
-
total += size(message.content);
|
|
22
|
-
for (const text of textBlocks(message.content)) {
|
|
23
|
-
for (const piece of pieces(text)) if (isFuliPiece(piece)) fuliContext += size(piece);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return { fuliContext, conversation: total - fuliContext };
|
|
27
|
-
}
|
|
28
|
-
|
|
29
16
|
const systemText = (system) => textBlocks(system).join('\n\n');
|
|
30
17
|
const blockText = (block) => (block?.type === 'text' ? block.text ?? '' : JSON.stringify(block));
|
|
31
18
|
const contentText = (content) => (typeof content === 'string' ? content : (content ?? []).map(blockText).join('\n'));
|
|
@@ -75,18 +62,6 @@ export function requestParts(body, usage) {
|
|
|
75
62
|
return { prompt: prompt || 'Model request', parts };
|
|
76
63
|
}
|
|
77
64
|
|
|
78
|
-
export function requestSections(body) {
|
|
79
|
-
const tools = Array.isArray(body?.tools) ? body.tools : [];
|
|
80
|
-
const fuliTools = tools.filter(tool => /^mcp__fuli__/.test(tool?.name ?? ''));
|
|
81
|
-
const otherTools = tools.filter(tool => !fuliTools.includes(tool));
|
|
82
|
-
return {
|
|
83
|
-
system: size(body?.system),
|
|
84
|
-
clientTools: size(otherTools),
|
|
85
|
-
fuliTools: size(fuliTools),
|
|
86
|
-
...messageSections(body?.messages),
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
|
|
90
65
|
/** Token counts from a streamed or plain response, null when it reported none. */
|
|
91
66
|
export function usageFrom(text) {
|
|
92
67
|
const usage = {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs';
|
|
1
|
+
import { readdirSync, readFileSync, statSync } from 'node:fs';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
3
|
import { join, posix } from 'node:path';
|
|
4
4
|
|
|
5
|
-
import { detectClients } from '../agent-kits/client-detection.js';
|
|
5
|
+
import { detectClients, entryState } from '../agent-kits/client-detection.js';
|
|
6
6
|
import { agentKitPorts } from '../agent-kits/ports.js';
|
|
7
7
|
import { resolveSetupPaths } from '../setup/paths.js';
|
|
8
8
|
|
|
@@ -11,6 +11,9 @@ import { resolveSetupPaths } from '../setup/paths.js';
|
|
|
11
11
|
// runtime configuration (`--runtime-config <dataDir>/graph-runtime.json`) in
|
|
12
12
|
// its own configuration file. agent-installer names those files; they are
|
|
13
13
|
// only read here, as text, never parsed in a client's own format or written.
|
|
14
|
+
// A client whose entry is a plugin directory (DeepSeek Harness's bundle, whose
|
|
15
|
+
// index.js and cordis.patch.yml name the copy) is read file by file, one level
|
|
16
|
+
// deep.
|
|
14
17
|
//
|
|
15
18
|
// Answers Map(packageRoot → { shares: true | false | null, dataDir }): true
|
|
16
19
|
// when a client of that copy uses this data directory, false (with that
|
|
@@ -19,15 +22,16 @@ import { resolveSetupPaths } from '../setup/paths.js';
|
|
|
19
22
|
const PRESENT = new Set(['current', 'outdated', 'conflict']);
|
|
20
23
|
|
|
21
24
|
export function npmCopyDataUse(copies, { runtimeConfigPath, clients, homeDir = homedir(), readText = readFileSync,
|
|
22
|
-
platform = process.platform }) {
|
|
25
|
+
listFiles = filesIn, platform = process.platform }) {
|
|
23
26
|
// Paths in any client's file, JSON- or TOML-escaped or not, compared with
|
|
24
27
|
// forward slashes, and without case on Windows.
|
|
25
28
|
const normal = (path) => String(path).replaceAll('\\\\', '\\').replaceAll('\\', '/').replace(/\/+$/, '');
|
|
26
29
|
const key = (path) => platform === 'win32' ? path.toLowerCase() : path;
|
|
27
30
|
const native = (path) => platform === 'win32' ? path.replaceAll('/', '\\') : path;
|
|
28
|
-
const texts = clients.filter((client) => PRESENT.has(client.components
|
|
29
|
-
.flatMap((client) => client.mcpPaths ?? [])
|
|
30
|
-
.
|
|
31
|
+
const texts = clients.filter((client) => PRESENT.has(entryState(client.components)))
|
|
32
|
+
.flatMap((client) => client.entryPaths ?? client.mcpPaths ?? [])
|
|
33
|
+
.flatMap((path) => listFiles(path.replace(/^~(?=[\\/])/, homeDir)))
|
|
34
|
+
.map((path) => { try { return normal(readText(path, 'utf8')); } catch { return null; } })
|
|
31
35
|
.filter(Boolean);
|
|
32
36
|
const ours = key(normal(runtimeConfigPath));
|
|
33
37
|
const answer = new Map();
|
|
@@ -42,6 +46,16 @@ export function npmCopyDataUse(copies, { runtimeConfigPath, clients, homeDir = h
|
|
|
42
46
|
return answer;
|
|
43
47
|
}
|
|
44
48
|
|
|
49
|
+
// A file as itself; a directory as the files directly in it.
|
|
50
|
+
function filesIn(path) {
|
|
51
|
+
try {
|
|
52
|
+
if (!statSync(path).isDirectory()) return [path];
|
|
53
|
+
return readdirSync(path, { withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => join(path, entry.name));
|
|
54
|
+
} catch {
|
|
55
|
+
return [path];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
45
59
|
// The clients agent-installer finds, read for the desktop app's own data directory.
|
|
46
60
|
export async function clientDataUse(context, copies, { detect = detectClients } = {}) {
|
|
47
61
|
const paths = resolveSetupPaths({ dataDir: context.dataDir, packageRoot: context.packageRoot });
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// The embedding model catalog (registry/embedding-models.json): small models
|
|
2
|
+
// a person may download to search by meaning on this computer, with where
|
|
3
|
+
// each file comes from and the digest it must have. It is data and may be
|
|
4
|
+
// updated from main without a FULI release, so a copy is accepted only whole
|
|
5
|
+
// and only when every field is exactly as written here: a fetched copy can
|
|
6
|
+
// name only data files the graph service reads (never a program), only on the
|
|
7
|
+
// hosts below, only under licences FULI may point people to.
|
|
8
|
+
|
|
9
|
+
const FORMAT_ID = 'fuli-embedding-models';
|
|
10
|
+
const FORMAT_VERSION = 1;
|
|
11
|
+
// Ends in a letter or digit: Windows drops a trailing dot from a folder name.
|
|
12
|
+
export const EMBEDDING_MODEL_ID = /^[a-z0-9](?:[a-z0-9._-]{0,62}[a-z0-9])?$/;
|
|
13
|
+
// The three files the graph service runs (graph-provider/fuli_graph/builtin_embedding.py).
|
|
14
|
+
export const EMBEDDING_MODEL_FILES = Object.freeze(['config.json', 'vocab.txt', 'model.safetensors']);
|
|
15
|
+
const DOWNLOAD_HOSTS = new Set(['huggingface.co', 'hf-mirror.com']);
|
|
16
|
+
const LICENSES = new Set(['MIT', 'Apache-2.0']);
|
|
17
|
+
const LANGUAGES = new Set(['zh', 'en', 'multi']);
|
|
18
|
+
const POOLING = new Set(['cls', 'mean']);
|
|
19
|
+
const MAX_MODELS = 32;
|
|
20
|
+
const MAX_URLS = 4;
|
|
21
|
+
const MAX_FILE_BYTES = 1024 * 1024 * 1024;
|
|
22
|
+
const SHA256 = /^[0-9a-f]{64}$/;
|
|
23
|
+
const REVISION = /^[0-9a-f]{40}$/;
|
|
24
|
+
|
|
25
|
+
class EmbeddingModelsManifestError extends TypeError {
|
|
26
|
+
constructor(message) {
|
|
27
|
+
super(`Embedding model catalog: ${message}`);
|
|
28
|
+
this.code = 'embedding_models_invalid';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const fail = message => { throw new EmbeddingModelsManifestError(message); };
|
|
33
|
+
|
|
34
|
+
function exactKeys(value, keys, label) {
|
|
35
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) fail(`${label} must be an object`);
|
|
36
|
+
const extra = Object.keys(value).filter(key => !keys.includes(key));
|
|
37
|
+
if (extra.length) fail(`${label} has unknown fields: ${extra.join(', ')}`);
|
|
38
|
+
for (const key of keys) if (!Object.hasOwn(value, key)) fail(`${label} needs ${key}`);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function text(value, label, max) {
|
|
42
|
+
if (typeof value !== 'string' || !value.trim() || value.length > max || /[\u0000-\u001f\u007f]/.test(value)) {
|
|
43
|
+
fail(`${label} must be text of at most ${max} characters`);
|
|
44
|
+
}
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function whole(value, label, min, max) {
|
|
49
|
+
if (!Number.isInteger(value) || value < min || value > max) fail(`${label} must be a whole number from ${min} to ${max}`);
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function flag(value, label) {
|
|
54
|
+
if (typeof value !== 'boolean') fail(`${label} must be true or false`);
|
|
55
|
+
return value;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function downloadUrl(value, label) {
|
|
59
|
+
text(value, label, 512);
|
|
60
|
+
let url;
|
|
61
|
+
try { url = new URL(value); } catch { fail(`${label} must be an https URL`); }
|
|
62
|
+
if (url.protocol !== 'https:' || url.username || url.password || url.port || url.search || url.hash
|
|
63
|
+
|| !DOWNLOAD_HOSTS.has(url.hostname)) {
|
|
64
|
+
fail(`${label} must be an https URL on ${[...DOWNLOAD_HOSTS].join(' or ')}`);
|
|
65
|
+
}
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// The address after the URL parser has resolved it: `..` segments, encoded
|
|
70
|
+
// slashes or another repository cannot stand in for the pinned file.
|
|
71
|
+
function pinnedFileUrl(value, label, { repository, revision, path }) {
|
|
72
|
+
downloadUrl(value, label);
|
|
73
|
+
const url = new URL(value);
|
|
74
|
+
if (url.href !== value || url.pathname !== `${repository}/resolve/${revision}/${path}`) {
|
|
75
|
+
fail(`${label} must be exactly <model repository>/resolve/<revision>/${path}`);
|
|
76
|
+
}
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function parseFile(file, label, { repository, revision }) {
|
|
81
|
+
exactKeys(file, ['path', 'bytes', 'sha256', 'urls'], label);
|
|
82
|
+
if (!EMBEDDING_MODEL_FILES.includes(file.path)) fail(`${label}.path must be one of ${EMBEDDING_MODEL_FILES.join(', ')}`);
|
|
83
|
+
if (typeof file.sha256 !== 'string' || !SHA256.test(file.sha256)) fail(`${label}.sha256 must be a lowercase SHA-256`);
|
|
84
|
+
if (!Array.isArray(file.urls) || !file.urls.length || file.urls.length > MAX_URLS) fail(`${label}.urls must list 1 to ${MAX_URLS} URLs`);
|
|
85
|
+
// A link names the exact commit of the model's own repository, so the file behind it cannot change.
|
|
86
|
+
const urls = file.urls.map((url, index) => pinnedFileUrl(url, `${label}.urls[${index}]`, { repository, revision, path: file.path }));
|
|
87
|
+
return { path: file.path, bytes: whole(file.bytes, `${label}.bytes`, 1, MAX_FILE_BYTES), sha256: file.sha256, urls };
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function parseModel(model, label) {
|
|
91
|
+
exactKeys(model, ['id', 'name', 'license', 'languages', 'dimensions', 'maxTokens', 'pooling', 'lowercase', 'stripAccents',
|
|
92
|
+
'recommended', 'memoryMb', 'summary', 'source', 'revision', 'files'], label);
|
|
93
|
+
if (typeof model.id !== 'string' || !EMBEDDING_MODEL_ID.test(model.id)) fail(`${label}.id must be lowercase letters, digits, dots or dashes`);
|
|
94
|
+
if (!LICENSES.has(model.license)) fail(`${label}.license must be one of ${[...LICENSES].join(', ')}`);
|
|
95
|
+
if (!Array.isArray(model.languages) || !model.languages.length || model.languages.some(language => !LANGUAGES.has(language))
|
|
96
|
+
|| new Set(model.languages).size !== model.languages.length) {
|
|
97
|
+
fail(`${label}.languages must list some of ${[...LANGUAGES].join(', ')}`);
|
|
98
|
+
}
|
|
99
|
+
if (!POOLING.has(model.pooling)) fail(`${label}.pooling must be cls or mean`);
|
|
100
|
+
exactKeys(model.summary, ['zh', 'en'], `${label}.summary`);
|
|
101
|
+
if (typeof model.revision !== 'string' || !REVISION.test(model.revision)) fail(`${label}.revision must be a full commit id`);
|
|
102
|
+
if (!Array.isArray(model.files) || model.files.length !== EMBEDDING_MODEL_FILES.length) {
|
|
103
|
+
fail(`${label}.files must be exactly ${EMBEDDING_MODEL_FILES.join(', ')}`);
|
|
104
|
+
}
|
|
105
|
+
const source = downloadUrl(model.source, `${label}.source`);
|
|
106
|
+
// /owner/name, as every file address must start.
|
|
107
|
+
const repository = new URL(source).pathname.replace(/\/+$/, '');
|
|
108
|
+
if (!/^\/[A-Za-z0-9][A-Za-z0-9._-]*\/[A-Za-z0-9][A-Za-z0-9._-]*$/.test(repository)) fail(`${label}.source must be a model repository`);
|
|
109
|
+
const files = model.files.map((file, index) => parseFile(file, `${label}.files[${index}]`, { repository, revision: model.revision }));
|
|
110
|
+
if (new Set(files.map(file => file.path)).size !== files.length) fail(`${label}.files repeats a file`);
|
|
111
|
+
return {
|
|
112
|
+
id: model.id, name: text(model.name, `${label}.name`, 80), license: model.license, languages: [...model.languages],
|
|
113
|
+
dimensions: whole(model.dimensions, `${label}.dimensions`, 16, 4096), maxTokens: whole(model.maxTokens, `${label}.maxTokens`, 8, 8192),
|
|
114
|
+
pooling: model.pooling, lowercase: flag(model.lowercase, `${label}.lowercase`),
|
|
115
|
+
stripAccents: flag(model.stripAccents, `${label}.stripAccents`), recommended: flag(model.recommended, `${label}.recommended`),
|
|
116
|
+
memoryMb: whole(model.memoryMb, `${label}.memoryMb`, 1, 65536),
|
|
117
|
+
summary: { zh: text(model.summary.zh, `${label}.summary.zh`, 100), en: text(model.summary.en, `${label}.summary.en`, 160) },
|
|
118
|
+
source, revision: model.revision, files
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function parseEmbeddingModelsManifest(raw) {
|
|
123
|
+
exactKeys(raw, ['format', 'formatVersion', 'manifestVersion', 'updatedAt', 'models'], 'manifest');
|
|
124
|
+
if (raw.format !== FORMAT_ID || raw.formatVersion !== FORMAT_VERSION) fail(`format must be ${FORMAT_ID} version ${FORMAT_VERSION}`);
|
|
125
|
+
whole(raw.manifestVersion, 'manifestVersion', 1, Number.MAX_SAFE_INTEGER);
|
|
126
|
+
if (typeof raw.updatedAt !== 'string' || !/^\d{4}-\d{2}-\d{2}$/.test(raw.updatedAt)) fail('updatedAt must be a date (YYYY-MM-DD)');
|
|
127
|
+
if (!Array.isArray(raw.models) || !raw.models.length || raw.models.length > MAX_MODELS) fail(`models must list 1 to ${MAX_MODELS} models`);
|
|
128
|
+
const models = raw.models.map((model, index) => parseModel(model, `models[${index}]`));
|
|
129
|
+
if (new Set(models.map(model => model.id)).size !== models.length) fail('models repeats an id');
|
|
130
|
+
if (models.filter(model => model.recommended).length !== 1) fail('exactly one model must be recommended');
|
|
131
|
+
return { format: FORMAT_ID, formatVersion: FORMAT_VERSION, manifestVersion: raw.manifestVersion, updatedAt: raw.updatedAt, models };
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// What an update changes, for the person who applies it.
|
|
135
|
+
export function diffEmbeddingModels(current, next) {
|
|
136
|
+
const before = new Map(current.models.map(model => [model.id, model]));
|
|
137
|
+
const after = new Map(next.models.map(model => [model.id, model]));
|
|
138
|
+
return {
|
|
139
|
+
fromVersion: current.manifestVersion, toVersion: next.manifestVersion,
|
|
140
|
+
added: [...after.keys()].filter(id => !before.has(id)),
|
|
141
|
+
removed: [...before.keys()].filter(id => !after.has(id)),
|
|
142
|
+
changed: [...after.keys()].filter(id => before.has(id) && JSON.stringify(before.get(id)) !== JSON.stringify(after.get(id)))
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// How much a model downloads, in bytes.
|
|
147
|
+
export const embeddingModelBytes = model => model.files.reduce((sum, file) => sum + file.bytes, 0);
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { embeddingSettingsTag } from './store.js';
|
|
2
|
+
import { ApplicationError } from '../app/application-error.js';
|
|
3
|
+
import {
|
|
4
|
+
BUILTIN_EMBEDDING_ENDPOINT, BUILTIN_EMBEDDING_PROTOCOL, KNOWLEDGE_EMBEDDING_OPERATION, SEMANTIC_ROLE
|
|
5
|
+
} from '../model-backends/config.js';
|
|
6
|
+
import { embeddingModelBytes } from './manifest.js';
|
|
7
|
+
|
|
8
|
+
// Built-in embedding models as the console and Agents use them: what the
|
|
9
|
+
// catalog offers, what is on this computer, which one search uses; download
|
|
10
|
+
// one, use one, remove one. A model runs in the graph service on this
|
|
11
|
+
// computer, so using it needs no key and sends nothing out.
|
|
12
|
+
//
|
|
13
|
+
// registry: the catalog (registry.js). store: the files (store.js).
|
|
14
|
+
// modelBackends: the model port, read for which model search uses.
|
|
15
|
+
// roleSettings: saves the semantic role (model-backends/role-settings.js).
|
|
16
|
+
// unload(): the graph service lets go of the loaded model's files.
|
|
17
|
+
// fillIndex(): starts filling the meaning index now.
|
|
18
|
+
|
|
19
|
+
// The one connection a built-in model is saved as.
|
|
20
|
+
const CONNECTION_ID = 'builtin-embedding';
|
|
21
|
+
// The files' revision and the tokenizer and pooling settings are part of the
|
|
22
|
+
// saved model name (`id@revision.settings`), so new weights or other settings
|
|
23
|
+
// under the same id are another model to the meaning index and to the query
|
|
24
|
+
// cache: both rebuild instead of mixing two kinds of vectors.
|
|
25
|
+
const REVISION_CHARS = 12;
|
|
26
|
+
const savedModel = (id, { revision, settings }) => (revision ? `${id}@${String(revision).slice(0, REVISION_CHARS)}.${settings}` : id);
|
|
27
|
+
export const builtinModelId = model => String(model).split('@')[0];
|
|
28
|
+
|
|
29
|
+
export function createEmbeddingModels({ registry, store, modelBackends, roleSettings, unload = async () => {},
|
|
30
|
+
fillIndex = () => {} }) {
|
|
31
|
+
const catalog = () => registry.current().manifest;
|
|
32
|
+
|
|
33
|
+
function entry(id) {
|
|
34
|
+
const model = catalog().models.find(item => item.id === id);
|
|
35
|
+
if (!model) throw new ApplicationError('embedding_model_unknown', 'This model is not in the catalog.', { status: 404 });
|
|
36
|
+
return model;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// The built-in model search uses now, or null (none, or the person's own model service).
|
|
40
|
+
function inUse() {
|
|
41
|
+
const semantic = modelBackends.roles().roles.find(item => item.role === SEMANTIC_ROLE);
|
|
42
|
+
return semantic?.state === 'enabled' && semantic.connection.protocol === BUILTIN_EMBEDDING_PROTOCOL
|
|
43
|
+
? builtinModelId(semantic.connection.model) : null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function list() {
|
|
47
|
+
const current = registry.current();
|
|
48
|
+
const installed = new Map(store.installed().map(item => [item.id, item]));
|
|
49
|
+
const used = inUse();
|
|
50
|
+
return {
|
|
51
|
+
catalog: { manifestVersion: current.manifest.manifestVersion, updatedAt: current.manifest.updatedAt,
|
|
52
|
+
autoUpdate: current.autoUpdate, lastCheckedAt: current.lastCheckedAt },
|
|
53
|
+
inUse: used,
|
|
54
|
+
models: current.manifest.models.map(model => ({
|
|
55
|
+
id: model.id, name: model.name, summary: model.summary, languages: model.languages, license: model.license,
|
|
56
|
+
source: model.source, dimensions: model.dimensions, memoryMb: model.memoryMb, recommended: model.recommended,
|
|
57
|
+
downloadBytes: embeddingModelBytes(model),
|
|
58
|
+
// A catalog update may name a newer revision of a model already here.
|
|
59
|
+
installed: installed.has(model.id), outdated: installed.has(model.id) && (installed.get(model.id).revision !== model.revision
|
|
60
|
+
|| installed.get(model.id).settings !== embeddingSettingsTag(model)),
|
|
61
|
+
inUse: used === model.id, download: store.progress(model.id)
|
|
62
|
+
})),
|
|
63
|
+
// On this computer but no longer in the catalog: still usable, and removable.
|
|
64
|
+
retired: [...installed.keys()].filter(id => !current.manifest.models.some(model => model.id === id))
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Search uses this model from now on; the index fills for it in the background.
|
|
69
|
+
function use(id) {
|
|
70
|
+
const installed = store.installed().find(item => item.id === id);
|
|
71
|
+
if (!installed) {
|
|
72
|
+
throw new ApplicationError('embedding_model_not_downloaded', 'Download this model first.', { status: 409 });
|
|
73
|
+
}
|
|
74
|
+
const saved = roleSettings.save(SEMANTIC_ROLE, {
|
|
75
|
+
revision: modelBackends.roles().revision,
|
|
76
|
+
connectionId: CONNECTION_ID,
|
|
77
|
+
connection: { protocol: BUILTIN_EMBEDDING_PROTOCOL, endpoint: BUILTIN_EMBEDDING_ENDPOINT,
|
|
78
|
+
model: savedModel(id, installed) },
|
|
79
|
+
settings: { enabled: true, allowedOperations: [KNOWLEDGE_EMBEDDING_OPERATION], budget: {} }
|
|
80
|
+
});
|
|
81
|
+
fillIndex();
|
|
82
|
+
return { ...list(), history: saved.history };
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Starts the download and answers at once ({ started, done }); `list()` shows how far it is.
|
|
86
|
+
// With useAfter, search switches to the model when the download is whole.
|
|
87
|
+
function download(id, { useAfter = false } = {}) {
|
|
88
|
+
const model = entry(id);
|
|
89
|
+
const done = (async () => {
|
|
90
|
+
// A copy being replaced must not be held open by the graph service.
|
|
91
|
+
await store.download(model, { beforeReplace: () => unload().catch(() => {}) });
|
|
92
|
+
// New files for the model search already uses are saved as its new revision, so the index rebuilds.
|
|
93
|
+
if (useAfter || inUse() === id) use(id);
|
|
94
|
+
})();
|
|
95
|
+
// The outcome is read from list(): a failed download shows there with its reason.
|
|
96
|
+
done.catch(() => {});
|
|
97
|
+
return { started: id, done };
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function refuseInUse(id) {
|
|
101
|
+
if (inUse() !== id) return;
|
|
102
|
+
throw new ApplicationError('embedding_model_in_use', 'Search uses this model. Switch to another model or turn search by meaning off first.',
|
|
103
|
+
{ status: 409 });
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async function remove(id) {
|
|
107
|
+
refuseInUse(id);
|
|
108
|
+
await unload().catch(() => {});
|
|
109
|
+
// Search may have switched to this model while the graph service let go of it:
|
|
110
|
+
// checked again here, with nothing awaited before the files go.
|
|
111
|
+
refuseInUse(id);
|
|
112
|
+
store.remove(id);
|
|
113
|
+
return list();
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return { list, download, use, remove };
|
|
117
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
|
|
3
|
+
import { jsonFormat } from '../storage/json-format.js';
|
|
4
|
+
import { createUpdatableManifest } from '../registry/updatable-manifest.js';
|
|
5
|
+
import { diffEmbeddingModels, parseEmbeddingModelsManifest } from './manifest.js';
|
|
6
|
+
|
|
7
|
+
// The catalog FULI ships, and the public copy it updates to, so a new model
|
|
8
|
+
// reaches people without a FULI release.
|
|
9
|
+
const EMBEDDING_MODELS_REMOTE_URL = 'https://raw.githubusercontent.com/JevonsCode/fuli/main/registry/embedding-models.json';
|
|
10
|
+
const BUNDLED_MANIFEST = new URL('../../registry/embedding-models.json', import.meta.url);
|
|
11
|
+
export const EMBEDDING_MODELS_STATE_FORMAT = jsonFormat({ store: 'embedding-models', versions: [1] });
|
|
12
|
+
|
|
13
|
+
const readBundledManifest = () => JSON.parse(readFileSync(BUNDLED_MANIFEST, 'utf8'));
|
|
14
|
+
|
|
15
|
+
// Updated once a day unless the person turned that off: the catalog only
|
|
16
|
+
// lists what may be downloaded; nothing is downloaded until a person asks.
|
|
17
|
+
export function createEmbeddingModelRegistry({
|
|
18
|
+
statePath, remoteUrl = EMBEDDING_MODELS_REMOTE_URL, fetchImpl = globalThis.fetch,
|
|
19
|
+
now = () => new Date(), readBundled = readBundledManifest
|
|
20
|
+
}) {
|
|
21
|
+
return createUpdatableManifest({ statePath, format: EMBEDDING_MODELS_STATE_FORMAT, remoteUrl, readBundled,
|
|
22
|
+
parse: parseEmbeddingModelsManifest, diff: diffEmbeddingModels, changedCode: 'embedding_models_changed',
|
|
23
|
+
autoUpdateDefault: true, fetchImpl, now });
|
|
24
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { createWriteStream, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { Readable } from 'node:stream';
|
|
5
|
+
import { pipeline } from 'node:stream/promises';
|
|
6
|
+
|
|
7
|
+
import { ApplicationError } from '../app/application-error.js';
|
|
8
|
+
import { EMBEDDING_MODEL_ID, embeddingModelBytes } from './manifest.js';
|
|
9
|
+
|
|
10
|
+
// The embedding models on this computer: one folder per model under
|
|
11
|
+
// <data>/models/embedding, holding the three files the catalog names and
|
|
12
|
+
// `fuli-model.json`, written last. A folder without that file is not a model.
|
|
13
|
+
// A download keeps each file only when its size and SHA-256 are the catalog's;
|
|
14
|
+
// anything else is thrown away, so a cut or altered download never runs.
|
|
15
|
+
|
|
16
|
+
// What the graph service reads beside the files (graph-provider/fuli_graph/builtin_embedding.py).
|
|
17
|
+
export const MODEL_SPEC_FILE = 'fuli-model.json';
|
|
18
|
+
const PARTIAL_PREFIX = '.partial-';
|
|
19
|
+
// The copy a newer download replaces waits here until the new one is in place.
|
|
20
|
+
const RETIRED_PREFIX = '.retired-';
|
|
21
|
+
// Windows refuses to move or delete a file something still maps or scans; it lets go within moments.
|
|
22
|
+
const HELD = { maxRetries: 20, retryDelay: 100 };
|
|
23
|
+
const HELD_CODES = new Set(['EPERM', 'EBUSY', 'EACCES', 'ENOTEMPTY']);
|
|
24
|
+
// What the file system says when it will not take a file.
|
|
25
|
+
const LOCAL_WRITE_CODES = new Set(['EACCES', 'EPERM', 'EROFS', 'ENOSPC', 'EDQUOT', 'EBUSY', 'ENOTEMPTY', 'EMFILE', 'ENFILE']);
|
|
26
|
+
// A download that sends nothing for this long is given up.
|
|
27
|
+
const IDLE_TIMEOUT_MS = 60_000;
|
|
28
|
+
|
|
29
|
+
// How a model turns text into a vector besides its weights: a catalog fix to any of these gives
|
|
30
|
+
// other vectors from the same files, so it is part of what an index was built with.
|
|
31
|
+
export const embeddingSettingsTag = model => createHash('sha256')
|
|
32
|
+
.update(JSON.stringify([model.pooling ?? null, model.lowercase ?? null, model.stripAccents ?? null, model.maxTokens ?? null]))
|
|
33
|
+
.digest('hex').slice(0, 6);
|
|
34
|
+
|
|
35
|
+
export const embeddingModelsDirectory = dataDir => join(dataDir, 'models', 'embedding');
|
|
36
|
+
|
|
37
|
+
// rename(from, to) moves a folder; a test makes it fail the way a held file does.
|
|
38
|
+
export function createEmbeddingModelStore({ directory, fetchImpl = globalThis.fetch, idleTimeoutMs = IDLE_TIMEOUT_MS,
|
|
39
|
+
openFile = createWriteStream, rename = renameSync }) {
|
|
40
|
+
// id -> { status: 'downloading' | 'failed', receivedBytes, totalBytes, reason }
|
|
41
|
+
const downloads = new Map();
|
|
42
|
+
|
|
43
|
+
function spec(id) {
|
|
44
|
+
if (!EMBEDDING_MODEL_ID.test(id)) return null;
|
|
45
|
+
try {
|
|
46
|
+
return JSON.parse(readFileSync(join(directory, id, MODEL_SPEC_FILE), 'utf8'));
|
|
47
|
+
} catch {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// The models that finished downloading: { id, revision, settings, dimensions, bytes }.
|
|
53
|
+
function installed() {
|
|
54
|
+
let names = [];
|
|
55
|
+
try { names = readdirSync(directory); } catch { return []; }
|
|
56
|
+
return names.map(id => ({ id, spec: spec(id) })).filter(entry => entry.spec)
|
|
57
|
+
.map(({ id, spec: found }) => ({ id, revision: found.revision ?? null, settings: embeddingSettingsTag(found),
|
|
58
|
+
dimensions: found.dimensions ?? null, bytes: found.bytes ?? null }));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const progress = id => downloads.get(id) ?? null;
|
|
62
|
+
|
|
63
|
+
async function fetchFile(file, target, state, signal) {
|
|
64
|
+
let last = 'unavailable';
|
|
65
|
+
for (const url of file.urls) {
|
|
66
|
+
const before = state.receivedBytes;
|
|
67
|
+
try {
|
|
68
|
+
await fetchOne(url, file, target, state, signal);
|
|
69
|
+
return;
|
|
70
|
+
} catch (error) {
|
|
71
|
+
if (signal?.aborted) throw error;
|
|
72
|
+
const local = notWritten(error);
|
|
73
|
+
if (local) throw local;
|
|
74
|
+
state.receivedBytes = before;
|
|
75
|
+
last = error?.code === 'embedding_model_altered' ? error.code : (error?.message ?? String(error));
|
|
76
|
+
if (error?.code === 'embedding_model_altered') continue;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
throw new ApplicationError(last === 'embedding_model_altered' ? last : 'embedding_model_unavailable',
|
|
80
|
+
last === 'embedding_model_altered'
|
|
81
|
+
? `${file.path} did not match the catalog's digest from any source, so it was not kept.`
|
|
82
|
+
: `${file.path} could not be downloaded: ${last}`, { status: 502 });
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// openFile(path) makes the file's write stream; a test can make it fail the way a full disk does.
|
|
86
|
+
async function fetchOne(url, file, target, state, signal) {
|
|
87
|
+
const idle = new AbortController();
|
|
88
|
+
let timer = setTimeout(() => idle.abort(new Error('the download stalled')), idleTimeoutMs);
|
|
89
|
+
const combined = signal ? AbortSignal.any([signal, idle.signal]) : idle.signal;
|
|
90
|
+
try {
|
|
91
|
+
// The model host answers with a redirect to its file store; the digest decides what is kept.
|
|
92
|
+
const response = await fetchImpl(url, { redirect: 'follow', signal: combined });
|
|
93
|
+
if (!response.ok || !response.body) throw new Error(`HTTP ${response.status}`);
|
|
94
|
+
const hash = createHash('sha256');
|
|
95
|
+
let received = 0;
|
|
96
|
+
const checked = async function* (source) {
|
|
97
|
+
for await (const chunk of source) {
|
|
98
|
+
received += chunk.length;
|
|
99
|
+
if (received > file.bytes) throw altered();
|
|
100
|
+
hash.update(chunk);
|
|
101
|
+
state.receivedBytes += chunk.length;
|
|
102
|
+
clearTimeout(timer);
|
|
103
|
+
timer = setTimeout(() => idle.abort(new Error('the download stalled')), idleTimeoutMs);
|
|
104
|
+
yield chunk;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
// pipeline carries a read, check or write error to this await and closes the file either way:
|
|
108
|
+
// a disk that fills up fails this download instead of raising an unhandled stream error.
|
|
109
|
+
await pipeline(Readable.from(response.body), checked, openFile(target), { signal: combined });
|
|
110
|
+
if (received !== file.bytes || hash.digest('hex') !== file.sha256) throw altered();
|
|
111
|
+
} finally {
|
|
112
|
+
clearTimeout(timer);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Throws away a partial download. Windows may still hold a file that just failed to write, so it
|
|
117
|
+
// is tried a few times, and a folder that will not go is left for the next download to clear:
|
|
118
|
+
// the failure that brought us here is the one the person hears about.
|
|
119
|
+
function discard(folder) {
|
|
120
|
+
try {
|
|
121
|
+
rmSync(folder, { recursive: true, force: true, ...HELD });
|
|
122
|
+
} catch { /* The next download of this model removes it first. */ }
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// A folder moves whole or not at all; one that is held for a moment is tried again.
|
|
126
|
+
async function move(from, to) {
|
|
127
|
+
for (let attempt = 0; ; attempt += 1) {
|
|
128
|
+
try {
|
|
129
|
+
return rename(from, to);
|
|
130
|
+
} catch (error) {
|
|
131
|
+
if (!HELD_CODES.has(error?.code) || attempt >= HELD.maxRetries) throw error;
|
|
132
|
+
await new Promise(resolve => setTimeout(resolve, HELD.retryDelay));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// This computer refused the file: a full disk, or a folder FULI may not write. Trying another
|
|
138
|
+
// source cannot help, and the person is told it is the disk, not the network (rec#117).
|
|
139
|
+
const notWritten = error => (LOCAL_WRITE_CODES.has(error?.code)
|
|
140
|
+
? new ApplicationError('embedding_model_not_written', `The model could not be written on this computer (${error.code}).`, { status: 507 })
|
|
141
|
+
: null);
|
|
142
|
+
|
|
143
|
+
const altered = () => Object.assign(new Error('digest mismatch'), { code: 'embedding_model_altered' });
|
|
144
|
+
|
|
145
|
+
// Downloads a catalog model whole. Answers when it is on disk; one download per model at a time.
|
|
146
|
+
// beforeReplace(): called just before an installed copy is replaced, so whoever holds its files open lets go.
|
|
147
|
+
async function download(model, { signal = null, beforeReplace = async () => {} } = {}) {
|
|
148
|
+
if (downloads.get(model.id)?.status === 'downloading') {
|
|
149
|
+
throw new ApplicationError('embedding_model_downloading', 'This model is already downloading.', { status: 409 });
|
|
150
|
+
}
|
|
151
|
+
const state = { status: 'downloading', receivedBytes: 0, totalBytes: embeddingModelBytes(model), reason: null };
|
|
152
|
+
downloads.set(model.id, state);
|
|
153
|
+
const partial = join(directory, `${PARTIAL_PREFIX}${model.id}`);
|
|
154
|
+
try {
|
|
155
|
+
rmSync(partial, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 });
|
|
156
|
+
mkdirSync(partial, { recursive: true });
|
|
157
|
+
for (const file of model.files) await fetchFile(file, join(partial, file.path), state, signal);
|
|
158
|
+
// The spec is written last: only a folder that has it is a model.
|
|
159
|
+
writeFileSync(join(partial, MODEL_SPEC_FILE), `${JSON.stringify({
|
|
160
|
+
id: model.id, revision: model.revision, dimensions: model.dimensions, bytes: state.totalBytes,
|
|
161
|
+
pooling: model.pooling, lowercase: model.lowercase, stripAccents: model.stripAccents, maxTokens: model.maxTokens,
|
|
162
|
+
files: Object.fromEntries(model.files.map(file => [file.path, file.sha256]))
|
|
163
|
+
}, null, 2)}\n`);
|
|
164
|
+
const final = join(directory, model.id);
|
|
165
|
+
const retired = join(directory, `${RETIRED_PREFIX}${model.id}`);
|
|
166
|
+
discard(retired);
|
|
167
|
+
// The installed copy is moved aside, never deleted first: if anything fails from here on it
|
|
168
|
+
// goes back, so a model in use is the old one or the new one and never half of either.
|
|
169
|
+
const replacing = existsSync(final);
|
|
170
|
+
if (replacing) {
|
|
171
|
+
await beforeReplace();
|
|
172
|
+
await move(final, retired);
|
|
173
|
+
}
|
|
174
|
+
try {
|
|
175
|
+
await move(partial, final);
|
|
176
|
+
} catch (error) {
|
|
177
|
+
if (replacing) await move(retired, final).catch(() => {});
|
|
178
|
+
throw error;
|
|
179
|
+
}
|
|
180
|
+
discard(retired);
|
|
181
|
+
downloads.delete(model.id);
|
|
182
|
+
return { id: model.id, bytes: state.totalBytes };
|
|
183
|
+
} catch (cause) {
|
|
184
|
+
const error = notWritten(cause) ?? cause;
|
|
185
|
+
discard(partial);
|
|
186
|
+
downloads.set(model.id, { ...state, status: 'failed', reason: error?.code ?? 'embedding_model_unavailable' });
|
|
187
|
+
throw error;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function remove(id) {
|
|
192
|
+
if (!EMBEDDING_MODEL_ID.test(id)) throw new TypeError('Unknown embedding model');
|
|
193
|
+
if (downloads.get(id)?.status === 'downloading') {
|
|
194
|
+
throw new ApplicationError('embedding_model_downloading', 'This model is downloading; wait for it to finish.', { status: 409 });
|
|
195
|
+
}
|
|
196
|
+
downloads.delete(id);
|
|
197
|
+
const existed = existsSync(join(directory, id));
|
|
198
|
+
// Whole or not at all: the folder leaves its name first, so a file Windows still holds
|
|
199
|
+
// never leaves half a model under the id.
|
|
200
|
+
const retired = join(directory, `${RETIRED_PREFIX}${id}`);
|
|
201
|
+
discard(retired);
|
|
202
|
+
if (existed) rename(join(directory, id), retired);
|
|
203
|
+
discard(retired);
|
|
204
|
+
return { id, removed: existed };
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return { installed, progress, download, remove };
|
|
208
|
+
}
|
|
@@ -35,6 +35,10 @@ export function createCustomConnector({ directory }) {
|
|
|
35
35
|
name: '自定义代码',
|
|
36
36
|
capabilities: ['discover', 'sync', 'retrieve'],
|
|
37
37
|
|
|
38
|
+
// The module is local code and reads the environment variables its
|
|
39
|
+
// configuration names: only the person connects one (连接 page).
|
|
40
|
+
personOnlyFields: () => ['module'],
|
|
41
|
+
|
|
38
42
|
async check(context) {
|
|
39
43
|
const implementation = await load(context);
|
|
40
44
|
const capabilities = ['discover', 'sync', 'retrieve']
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from '@modelcontextprotocol/sdk/client/stdio.js';
|
|
6
6
|
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
7
7
|
import { requiredString } from '../../validation/values.js';
|
|
8
|
-
import { dateTimeOrNull, onlineUrl } from './response-values.js';
|
|
8
|
+
import { dateTimeOrNull, isLoopbackUrl, onlineUrl } from './response-values.js';
|
|
9
9
|
|
|
10
10
|
const LOCAL_CURSOR_PREFIX = 'fuli-mcp-v1:';
|
|
11
11
|
|
|
@@ -15,6 +15,18 @@ export function createMcpConnector({ openSession = defaultOpenSession } = {}) {
|
|
|
15
15
|
name: 'MCP',
|
|
16
16
|
capabilities: ['discover', 'sync', 'retrieve'],
|
|
17
17
|
|
|
18
|
+
// A local command runs as the person, a credential here goes to an
|
|
19
|
+
// endpoint the caller chose, and a loopback URL reaches a local service:
|
|
20
|
+
// only the person sets these up (连接 page).
|
|
21
|
+
personOnlyFields(config) {
|
|
22
|
+
return [
|
|
23
|
+
config.transport === 'stdio' && 'transport',
|
|
24
|
+
isLoopbackUrl(config.url) && 'url',
|
|
25
|
+
config.tokenEnv && 'tokenEnv',
|
|
26
|
+
Object.keys(plainObject(config.headerEnv) ?? {}).length > 0 && 'headerEnv'
|
|
27
|
+
].filter(Boolean);
|
|
28
|
+
},
|
|
29
|
+
|
|
18
30
|
async check(context) {
|
|
19
31
|
return withSession(openSession, context, async (client) => {
|
|
20
32
|
const capabilities = client.getServerCapabilities?.() ?? {};
|
|
@@ -32,3 +32,11 @@ export function timeoutMilliseconds(value, label, fallback = 30_000) {
|
|
|
32
32
|
}
|
|
33
33
|
return value;
|
|
34
34
|
}
|
|
35
|
+
|
|
36
|
+
// Whether a connector URL points at this computer. An Agent may not send
|
|
37
|
+
// FULI's own requests to a local service the person did not connect.
|
|
38
|
+
export function isLoopbackUrl(value) {
|
|
39
|
+
try {
|
|
40
|
+
return ['localhost', '127.0.0.1', '[::1]'].includes(new URL(String(value)).hostname);
|
|
41
|
+
} catch { return false; }
|
|
42
|
+
}
|