fuli-context 0.25.2 → 0.27.0
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-Bp2Edkdg.js} +1 -1
- package/dist/web/assets/{AboutSectionHeading-BdhpM609.js → AboutSectionHeading-DFfY2f_Z.js} +1 -1
- package/dist/web/assets/{AgentAppsPage-5VW0uCTz.js → AgentAppsPage-CjyvPZSs.js} +1 -1
- package/dist/web/assets/{AgentAvatar-DlAQP7gm.js → AgentAvatar-w-2A3nsJ.js} +1 -1
- package/dist/web/assets/{AgentHand-FPFg9-Y1.js → AgentHand-BGGU49Jt.js} +1 -1
- package/dist/web/assets/{AgentManagement-CLFw9oV9.css → AgentManagement-Cc00RLSO.css} +1 -1
- package/dist/web/assets/{AgentManagement-UTe4I3WA.js → AgentManagement-MMGrwdD2.js} +2 -2
- package/dist/web/assets/{AgentMentionCopy-C5ExlutT.js → AgentMentionCopy-BAHZjubz.js} +1 -1
- package/dist/web/assets/{AgentName-C8mYbtKs.js → AgentName-CXlsC-4o.js} +1 -1
- package/dist/web/assets/{AgentProfilePage-DumsVHP1.css → AgentProfilePage-Ce25JSzZ.css} +1 -1
- package/dist/web/assets/{AgentProfilePage-BLeyT3By.js → AgentProfilePage-eDKbJJwY.js} +5 -5
- package/dist/web/assets/{AgentServicesPage-BXi152Xc.js → AgentServicesPage-CZwsN5U2.js} +1 -1
- package/dist/web/assets/{AppViewerPage-BR8ttEGa.js → AppViewerPage-6gWP6nAf.js} +1 -1
- package/dist/web/assets/{BackToTop-5_AQRMZl.js → BackToTop-Cs5_rV99.js} +1 -1
- package/dist/web/assets/{BoardCardFieldsMenu-Bb_Z9a4Q.js → BoardCardFieldsMenu-CvFrsIgy.js} +1 -1
- package/dist/web/assets/{BoardMoveMenu-B-f8O6cC.js → BoardMoveMenu-B5isxIcK.js} +1 -1
- package/dist/web/assets/{Breadcrumb-DtM5lZy5.js → Breadcrumb-BXTA4e-W.js} +1 -1
- package/dist/web/assets/CaptureChangePage-Ca72_PHc.js +1 -0
- package/dist/web/assets/{CopyFixPrompt-CVFYWDSt.js → CopyFixPrompt-wGATZKOq.js} +1 -1
- package/dist/web/assets/{DataFormatPage-DwL4Ofc9.js → DataFormatPage-CQKkFhcH.js} +1 -1
- package/dist/web/assets/{DebugTurnPage-UpK_3ZWY.js → DebugTurnPage-CUqbuhgX.js} +1 -1
- package/dist/web/assets/{DebugTurnsPage-C0aZg5-3.js → DebugTurnsPage-HwaTG8Fa.js} +1 -1
- package/dist/web/assets/{DialogTitle-BQXOe8EK.js → DialogTitle-HYzAHbGg.js} +1 -1
- package/dist/web/assets/{EmployeeRedirectPage-BjWpXDSM.js → EmployeeRedirectPage-C2SHpAEF.js} +1 -1
- package/dist/web/assets/{EmployeeScopeDialog-Bt3ZlDyZ.js → EmployeeScopeDialog-yUCgujKT.js} +1 -1
- package/dist/web/assets/{EmployeeWorkbench-GtJIUD5G.js → EmployeeWorkbench-CbRJhkJO.js} +3 -3
- package/dist/web/assets/FieldRoot-BLcsuPMA.js +1 -0
- package/dist/web/assets/{FlaGrowth-OQtTLTng.js → FlaGrowth-DGnUPN7D.js} +1 -1
- package/dist/web/assets/{FlaOccupationKit-C-x4VrKk.js → FlaOccupationKit-DAJjSrmL.js} +1 -1
- package/dist/web/assets/{FlaTaskSheets-CoaF5CbQ.js → FlaTaskSheets-DRLgfrVC.js} +1 -1
- package/dist/web/assets/{FlasPage-CgIVOGFM.js → FlasPage-CMv2awKJ.js} +1 -1
- package/dist/web/assets/{GrowthLoading-VuVo2vLf.js → GrowthLoading-NLj2W4jj.js} +1 -1
- package/dist/web/assets/{HowtoPage-CZ3mOdLc.js → HowtoPage-CkGRrKpf.js} +1 -1
- package/dist/web/assets/InboxPage-Bv8XUdl8.css +1 -0
- package/dist/web/assets/InboxPage-DfQvtnyq.js +6 -0
- package/dist/web/assets/{KnowledgeDeleteButton-BlUnSG3b.js → KnowledgeDeleteButton-DaT-gTmm.js} +1 -1
- package/dist/web/assets/{KnowledgeHardDeleteSection-CznXBtHY.js → KnowledgeHardDeleteSection-C9d7DVLa.js} +1 -1
- package/dist/web/assets/{KnowledgeItemEditPage-DGRNkAYd.js → KnowledgeItemEditPage-BUKQK37o.js} +1 -1
- package/dist/web/assets/{KnowledgeItemSummaryCard-Co5JKBHl.js → KnowledgeItemSummaryCard-eLzjKvgN.js} +1 -1
- package/dist/web/assets/KnowledgeOrganizerPage-CiZ9JlNX.js +1 -0
- package/dist/web/assets/KnowledgePage-C3_Cvz4g.js +1 -0
- package/dist/web/assets/{KnowledgePeek-CwZVuSkf.css → KnowledgePeek-D6SeISIM.css} +1 -1
- package/dist/web/assets/KnowledgePeek-DtOOiARX.js +1 -0
- package/dist/web/assets/{KnowledgeTurnReceiptPage-Csyjimeg.js → KnowledgeTurnReceiptPage-Dne5NQ9q.js} +1 -1
- package/dist/web/assets/KnowledgeWorkspace-Cq_XYcma.js +4 -0
- package/dist/web/assets/KnowledgeWorkspace-DDg3tUb3.css +1 -0
- package/dist/web/assets/{MeAvatar-aY_q8cKs.js → MeAvatar-f6qxg9dN.js} +1 -1
- package/dist/web/assets/{MeLink-B0pNwVLa.js → MeLink-DTvFYaYE.js} +1 -1
- package/dist/web/assets/{MenuSeparator-BR-uLovR.js → MenuSeparator-CLmsZ9rj.js} +1 -1
- package/dist/web/assets/ModelSettingsPage-B38R-kBZ.css +1 -0
- package/dist/web/assets/ModelSettingsPage-COVaW4eh.js +1 -0
- package/dist/web/assets/NewSessionPanel-9yINjwyx.js +1 -0
- package/dist/web/assets/NewSessionPanel-CTdd7xpN.css +1 -0
- package/dist/web/assets/{NotFoundPage-Cr1MaPuk.js → NotFoundPage-CqevPz0_.js} +1 -1
- package/dist/web/assets/NoticeRow-D5MWTeBY.js +1 -0
- package/dist/web/assets/{OccupationsPage-CkVqZ2pz.js → OccupationsPage-BKd051j1.js} +1 -1
- package/dist/web/assets/OverviewPage-C90G_adj.js +1 -0
- package/dist/web/assets/{OverviewPage-Dr4jrXW4.css → OverviewPage-KVt4LcE-.css} +1 -1
- package/dist/web/assets/{PageColumns-DvehZlYm.js → PageColumns-Df60nEzj.js} +1 -1
- package/dist/web/assets/PageOutline-D5h1GuKt.css +1 -0
- package/dist/web/assets/PageOutline-HHUlu2x3.js +1 -0
- package/dist/web/assets/{PersonalProfilePage-TxsNr44t.js → PersonalProfilePage-DIDgG3NH.js} +1 -1
- package/dist/web/assets/PersonalProjectsPage-DwhlEpNg.js +1 -0
- package/dist/web/assets/{PinIcon-BTQsnxRY.js → PinIcon-DP-9Iisk.js} +1 -1
- package/dist/web/assets/{PopperContent-DtMksk76.js → PopperContent-DWCMeKSL.js} +1 -1
- package/dist/web/assets/{Presence-B0zMpCF4.js → Presence-Ba3jqPYx.js} +1 -1
- package/dist/web/assets/{ProfileAuthorChip-BqT9Vv65.js → ProfileAuthorChip-BKZJC_N2.js} +1 -1
- package/dist/web/assets/ProjectAgentsPage-BefVF9ZP.js +5 -0
- package/dist/web/assets/ProjectJudgmentPolicy-BHyiqKLV.css +1 -0
- package/dist/web/assets/ProjectJudgmentPolicy-BJ5sVuFI.js +2 -0
- package/dist/web/assets/{RecentNotices-vJobVOcm.js → RecentNotices-CDHGIky1.js} +1 -1
- package/dist/web/assets/{RoundtablesPage-C3dYekQ5.js → RoundtablesPage-D5Xc3yun.js} +2 -2
- package/dist/web/assets/{RovingFocusGroup-CUqyjFSs.js → RovingFocusGroup-DoGybG5V.js} +1 -1
- package/dist/web/assets/{RovingFocusItem-CyyuWXjE.js → RovingFocusItem-B455TzUI.js} +1 -1
- package/dist/web/assets/{SessionMigrationPage-DukDM0TP.js → SessionMigrationPage-BAzXqxxO.js} +1 -1
- package/dist/web/assets/{SessionRecordsPage-DZ5ZBiuS.js → SessionRecordsPage-C6U5YGSt.js} +1 -1
- package/dist/web/assets/SettingsPage-7mNL3bwe.js +1 -0
- package/dist/web/assets/SettingsPage-Cku8SoLk.css +1 -0
- package/dist/web/assets/{SharedJefaReportPage-DUY03VLS.js → SharedJefaReportPage-rH6I4cI9.js} +1 -1
- package/dist/web/assets/{TagVocabularyPage-BKLFJiSu.js → TagVocabularyPage-Brpr-Q-y.js} +1 -1
- package/dist/web/assets/{TaskBlockerClear-BxOiiuK8.js → TaskBlockerClear-BHOMZYwm.js} +1 -1
- package/dist/web/assets/TaskBlockerNotice-POmS2neR.js +1 -0
- package/dist/web/assets/{TaskReason-D5j7L8tl.js → TaskReason-RKKs4Kb5.js} +1 -1
- package/dist/web/assets/{TeamCard-CDunbIrP.js → TeamCard-8hjo1h0x.js} +1 -1
- package/dist/web/assets/{TeamCardsWidget-CUW-fPn7.js → TeamCardsWidget-DIHFUDrF.js} +1 -1
- package/dist/web/assets/{TeamIsland-CmpDmIX2.js → TeamIsland-DdhEcVOZ.js} +1 -1
- package/dist/web/assets/{Teleport-Dzdr8umQ.js → Teleport-CukHuRhz.js} +1 -1
- package/dist/web/assets/{TextField-BPhEpEv9.js → TextField-G2fJ4aFQ.js} +1 -1
- package/dist/web/assets/{TonborgDelegationSwitch-C1nkJqkJ.js → TonborgDelegationSwitch-BA3Qb8Wr.js} +1 -1
- package/dist/web/assets/{UiChip-BEQ067LV.js → UiChip-BHEJVA6L.js} +1 -1
- package/dist/web/assets/{UiChip-DulygSq8.css → UiChip-BiUmvjdz.css} +1 -1
- package/dist/web/assets/{UiDialog-JjqzOA0z.js → UiDialog-bUwGQz96.js} +1 -1
- package/dist/web/assets/{UiDisclosure-L6GEJHSw.js → UiDisclosure-B1pd8qXW.js} +1 -1
- package/dist/web/assets/UiIcon-K7OhYTSy.js +1 -0
- package/dist/web/assets/{UiIconButton-ZCBdABdM.css → UiIconButton-D3R6WwwI.css} +1 -1
- package/dist/web/assets/UiIconButton-DlLZ5_Yc.js +1 -0
- package/dist/web/assets/{UiSegmented-CIIm3KoV.js → UiSegmented-CYrTxDn1.js} +1 -1
- package/dist/web/assets/{UiWeight-D-2iZ_Kc.js → UiWeight-eAw682rH.js} +1 -1
- package/dist/web/assets/{VirtualDirectoryList-BV8KsA-Z.js → VirtualDirectoryList-BGum1GZc.js} +1 -1
- package/dist/web/assets/{VisuallyHidden-BxKxuXRF.js → VisuallyHidden-Ck6D7rq-.js} +1 -1
- package/dist/web/assets/{VisuallyHiddenInput-DD4vhlqT.js → VisuallyHiddenInput-DXWhIUlB.js} +1 -1
- package/dist/web/assets/WidgetSlot-D6vCSWaz.js +2 -0
- package/dist/web/assets/{WorkbenchListHead-B0TjHsTO.js → WorkbenchListHead-CR_fDYYr.js} +1 -1
- package/dist/web/assets/WorkbenchListPage-Zr5PW-cf.js +1 -0
- package/dist/web/assets/_plugin-vue_export-helper-BRS32yXs.js +9 -0
- package/dist/web/assets/{agent-apps-B1Je-mpY.js → agent-apps-D0eG1aMx.js} +1 -1
- package/dist/web/assets/agent-occupation-CEd3bAhb.js +1 -0
- package/dist/web/assets/{agent-pins-DxHlJ96z.js → agent-pins-OYjJQ38F.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-D3VeY6Yz.js} +1 -1
- package/dist/web/assets/{attach-closest-edge-DUc_VUVO.js → attach-closest-edge-C75rKXiz.js} +1 -1
- package/dist/web/assets/{attention-store-Bod20yM3.js → attention-store-k4mPCefZ.js} +1 -1
- package/dist/web/assets/{badge-tMy2Qr94.js → badge-B2rll-68.js} +1 -1
- package/dist/web/assets/{button-DnKFsImW.js → button-q6JhonlL.js} +1 -1
- package/dist/web/assets/{card-Ccu7HCNb.js → card-CPQiMHSu.js} +1 -1
- package/dist/web/assets/{catalog-CJUV8OJ6.js → catalog-CBPcEkXC.js} +1 -1
- package/dist/web/assets/{checkbox-D1R6kTUB.js → checkbox-C67upxzl.js} +1 -1
- package/dist/web/assets/{client-D-G2i5VU.js → client-KFFphxpK.js} +1 -1
- package/dist/web/assets/{client-links-store-UgmraFBZ.js → client-links-store-Cw9c8MWc.js} +1 -1
- package/dist/web/assets/{combobox-C7QLYGzs.js → combobox-yHRJ-zN-.js} +1 -1
- package/dist/web/assets/console-BCR2S3AF.js +1 -0
- package/dist/web/assets/conversation-launcher-settings-28CqC1Gn.js +1 -0
- package/dist/web/assets/{copy-mention-C0EJhDPy.js → copy-mention-C4Nos381.js} +1 -1
- package/dist/web/assets/{dialog-Bbq93W68.js → dialog-Cjoy4nsv.js} +1 -1
- package/dist/web/assets/{dist-PpsW5ZE3.js → dist-CaVgk2QB.js} +1 -1
- package/dist/web/assets/{dist-Dd8yFhv6.js → dist-D73EXNtz.js} +1 -1
- package/dist/web/assets/{dropdown-menu-1fGUL0V3.js → dropdown-menu-Dto6hjoc.js} +1 -1
- package/dist/web/assets/{field-DjVv_wIS.js → field-BaUOZtN5.js} +1 -1
- package/dist/web/assets/{format-bytes-BKq_E0Hs.js → format-bytes-D5eCtdg1.js} +1 -1
- package/dist/web/assets/{hover-card-BO-929hq.js → hover-card-Bg0dulGq.js} +1 -1
- package/dist/web/assets/index-B-aRUs9w.js +24 -0
- package/dist/web/assets/index-HRZACEmh.css +1 -0
- package/dist/web/assets/{input-DmwRmYO2.js → input-Dxh25T4M.js} +1 -1
- package/dist/web/assets/{label-BvwPUTS4.js → label-CbrduZla.js} +1 -1
- package/dist/web/assets/label-table-_YAtPkRI.js +1 -0
- package/dist/web/assets/{model-Tmn6HvL-.js → model--lR9icA_.js} +1 -1
- package/dist/web/assets/{model-DpkZUZUL.js → model-Bgh75q3j.js} +1 -1
- package/dist/web/assets/model-Big7Ppeu.js +1 -0
- package/dist/web/assets/{model-BF_ZMPLi.js → model-Blk5Wgg2.js} +1 -1
- package/dist/web/assets/{model-0TZRbkN2.js → model-CWMP5GOL.js} +1 -1
- package/dist/web/assets/{model-y7OUvtKz.js → model-D4DkvMH-.js} +1 -1
- package/dist/web/assets/{model-CaR7VPg7.js → model-DcsCYhXk.js} +1 -1
- package/dist/web/assets/model-ZwOxwk2m.js +3 -0
- package/dist/web/assets/{model-Dfe81jZT.js → model-jC3F-J2F.js} +1 -1
- package/dist/web/assets/{motion-mAmbRj_M.js → motion-BL3lek9c.js} +1 -1
- package/dist/web/assets/{motion-C1fZrqmI.js → motion-_MepnmMC.js} +1 -1
- package/dist/web/assets/{motion-preference-Dz9S1bZa.js → motion-preference-D3UMHojT.js} +1 -1
- package/dist/web/assets/{occupation-catalog-_SnxxRbK.js → occupation-catalog-BeJ2O9nm.js} +1 -1
- package/dist/web/assets/{occupation-kits-DFC6Auuc.js → occupation-kits-Bkiu6MzD.js} +1 -1
- package/dist/web/assets/{option-DC8frdbr.js → option-Crs2MA88.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-Bz5r7A_Q.js} +1 -1
- package/dist/web/assets/{page-title-Cm9u_qw1.js → page-title-KYZApNys.js} +1 -1
- package/dist/web/assets/{person-profile-BH2AzOfw.js → person-profile-mhLxWtq7.js} +1 -1
- package/dist/web/assets/{popover-DW__YCSE.js → popover-CMahoDLo.js} +1 -1
- package/dist/web/assets/popup-host-DKN99Od3.js +1 -0
- package/dist/web/assets/{profile-model-DtISOJ-X.js → profile-model-DWutKuCZ.js} +1 -1
- package/dist/web/assets/{project-board-layout-CTM8kAgq.js → project-board-layout-CWMHQuUA.js} +1 -1
- package/dist/web/assets/{project-capture-B3pNhpFF.js → project-capture-CebFSnn0.js} +1 -1
- package/dist/web/assets/{project-origin-BO8Ngccf.js → project-origin-BnUVE0be.js} +1 -1
- package/dist/web/assets/{quick-edit-api-B169r5Qb.js → quick-edit-api-YwzoODMc.js} +1 -1
- package/dist/web/assets/{radio-group-DqA46cXQ.js → radio-group-vRt8y8mF.js} +1 -1
- package/dist/web/assets/review-api-WhNB3ppo.js +1 -0
- package/dist/web/assets/{review-list-BbV-Mle7.js → review-list-_PN7ljSY.js} +1 -1
- package/dist/web/assets/review-store-CobX9No6.js +1 -0
- package/dist/web/assets/{role-names-By0xdfTn.js → role-names-wD9l8uz5.js} +1 -1
- package/dist/web/assets/{roundtable-live-u9qUU6aA.js → roundtable-live-Dm4Vwo75.js} +1 -1
- package/dist/web/assets/{runtime-dom.esm-bundler-DhFy4Djs.js → runtime-dom.esm-bundler-DzfwnSj8.js} +1 -1
- package/dist/web/assets/{select-TqPBladU.js → select-B9mVptgx.js} +1 -1
- package/dist/web/assets/{session-launch-offers-CtQeY4Qk.js → session-launch-offers-C9UkoKUJ.js} +1 -1
- package/dist/web/assets/{settings-autosave-C7vW3_SP.js → settings-autosave-L0zSXnBO.js} +1 -1
- package/dist/web/assets/{npm-copies-GRyMAduA.css → settings-tabs-C9VDs91j.css} +1 -1
- package/dist/web/assets/settings-tabs-DTbgqX8g.js +1 -0
- package/dist/web/assets/{shared-report-DQBSigHB.js → shared-report-0FO_y0sa.js} +3 -3
- package/dist/web/assets/source-adapters-r-NIqO77.js +1 -0
- package/dist/web/assets/{switch-D7w_0h3m.js → switch-BCzrGc4W.js} +1 -1
- package/dist/web/assets/{tabs-DR8k0PN9.js → tabs-CB38D8N0.js} +1 -1
- package/dist/web/assets/{task-card-fields-X1ZYCm_j.js → task-card-fields-B1z1PmTT.js} +1 -1
- package/dist/web/assets/task-evidence-DydhKn9x.js +1 -0
- package/dist/web/assets/{task-labels-LuXoQhF9.js → task-labels-DTc5OuFF.js} +1 -1
- package/dist/web/assets/{task-reason-ChpbGtyx.js → task-reason-CneTZWRv.js} +1 -1
- package/dist/web/assets/{team-sheets-DYCQqa8I.js → team-sheets-CUt3Vp2s.js} +1 -1
- package/dist/web/assets/{textarea-D53VYanK.js → textarea-DJ0ucCir.js} +1 -1
- package/dist/web/assets/{ui-DmNbL8MW.js → ui-M_UKzb_A.js} +1 -1
- package/dist/web/assets/{useAgentRecords-Hy9nqMs7.js → useAgentRecords-CwkwZy8H.js} +1 -1
- package/dist/web/assets/{useAgentWorkSummary-mloD4p12.js → useAgentWorkSummary-DoiCqME7.js} +1 -1
- package/dist/web/assets/{useApi-CROJJdhE-DnUGUb8O.js → useApi-CROJJdhE-CenjhnR5.js} +1 -1
- package/dist/web/assets/{useClipboardCopy-BTuQMeWI.js → useClipboardCopy-Ba86PzjA.js} +1 -1
- package/dist/web/assets/{useFocusReturn-4hUmSzj9.js → useFocusReturn-B0ErBkt_.js} +1 -1
- package/dist/web/assets/{useForwardExpose-BDmW7q7u.js → useForwardExpose-DJ6fcpI2.js} +1 -1
- package/dist/web/assets/{useForwardPropsEmits-BzT2luD4.js → useForwardPropsEmits-D1vvIUcB.js} +1 -1
- package/dist/web/assets/useForwardScopeId-CoSQtoUU.js +1 -0
- package/dist/web/assets/{useKnowledgeConfirm-L8wnJCuX.js → useKnowledgeConfirm-781LUhoU.js} +1 -1
- package/dist/web/assets/{useKnowledgeItemPeek-C_huXt6E.js → useKnowledgeItemPeek-CnuCvJKQ.js} +1 -1
- package/dist/web/assets/{useMinimumLoadingDisplay-Dkl8NQru.js → useMinimumLoadingDisplay-DCC9EfQ9.js} +1 -1
- package/dist/web/assets/{usePageTools-CbDOdIrg.js → usePageTools-BaB021q0.js} +1 -1
- package/dist/web/assets/usePrimitiveElement-iRKqOVuY.js +1 -0
- package/dist/web/assets/{useProjectAgentRoster-BBmRvcgr.js → useProjectAgentRoster-M3wbWpS-.js} +1 -1
- package/dist/web/assets/{useRoutePeek-CRbCDqsm.js → useRoutePeek-CYg5JyYt.js} +1 -1
- package/dist/web/assets/useTeamPeople-CPC62La3.js +1 -0
- package/dist/web/assets/{useTeamWork-CXEQwF4n.js → useTeamWork-Dql3_qLV.js} +1 -1
- package/dist/web/assets/{useTypeahead-CVYuxPOD.js → useTypeahead-DYb5kVkH.js} +1 -1
- package/dist/web/assets/{utils-BnrWDlfm.js → utils-B7sUn8rD.js} +1 -1
- package/dist/web/assets/{utils-BsGjKHV8.js → utils-Cli0RsEd.js} +1 -1
- package/dist/web/assets/{verification-DbCo_dnY.js → verification-DY7kllTI.js} +1 -1
- package/dist/web/assets/version-CBgUEmnM.js +1 -0
- package/dist/web/assets/{vue-router-D4_ms6om.js → vue-router-ab7kABlJ.js} +1 -1
- package/dist/web/index.html +82 -86
- package/docs/agent-conversations-and-collaboration.md +6 -0
- package/docs/agent-interface-architecture.md +4 -1
- 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 +6 -4
- package/docs/project-agent-memory.md +12 -1
- package/graph-provider/fuli_graph/app.py +12 -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 +0 -1
- package/graph-provider/fuli_graph/knowledge_index_scan.py +13 -6
- package/graph-provider/fuli_graph/knowledge_search.py +111 -45
- package/graph-provider/fuli_graph/knowledge_semantic.py +9 -0
- 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 +1 -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/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 +0 -27
- package/graph-provider/fuli_graph/project_agent_task_models.py +0 -18
- 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_recruitment.py +1 -61
- 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_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 +2 -2
- package/package.json +1 -2
- package/packages/roundtable/src/agents/codex/wake.js +25 -2
- package/packages/roundtable/src/agents/session-log.js +29 -7
- package/packages/roundtable/src/host.js +3 -0
- 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 +183 -49
- package/packages/roundtable/src/roundtable/stand-in.js +64 -0
- package/packages/roundtable/src/roundtable/store.js +8 -6
- package/packages/roundtable/src/roundtable/wake-ladder.js +63 -0
- package/packages/roundtable/src/roundtable/wake.js +7 -0
- 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 +39 -0
- 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 +6 -23
- package/skills/operating-fuli/SKILL.md +36 -8
- package/skills/operating-fuli/references/workflow-recipes.md +3 -2
- package/src/agent-apps/host-tools/catalog.js +2 -25
- 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/tools.js +2 -2
- 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 +5 -43
- package/src/agent-tools/interface-catalog.js +11 -15
- package/src/agent-tools/interface-definitions.js +0 -7
- 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 +0 -1
- package/src/agent-tools/project-agent-tool-definitions.js +0 -16
- package/src/agent-tools/project-organizing-definitions.js +31 -0
- package/src/agent-tools/project-space-definitions.js +4 -83
- package/src/agent-tools/retired-tools.js +37 -0
- 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 +3 -11
- 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 +19 -4
- package/src/agents/jsonl-tail.js +35 -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 +1 -1
- package/src/conversations/person-words.js +0 -5
- 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/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/federated-application.js +11 -132
- package/src/graphiti/first-run-guide.js +25 -4
- 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-workflows.js +0 -16
- package/src/graphiti/provider-client.js +26 -167
- package/src/graphiti/reply-echo-group.js +7 -6
- package/src/graphiti/roundtable-host.js +5 -0
- package/src/graphiti/session-knowledge-capture.js +5 -31
- package/src/graphiti/task-entry-owner-change.js +66 -0
- package/src/graphiti/task-entry-preferences.js +16 -4
- package/src/graphiti/task-entry-project-scope.js +5 -1
- package/src/graphiti/task-knowledge-checkpoint.js +30 -14
- package/src/graphiti/topic-proposals.js +31 -8
- package/src/graphiti/topic-team-handoff.js +121 -0
- package/src/graphiti/workflow-learning.js +0 -25
- package/src/graphiti/workspace-provider-client.js +4 -50
- package/src/http/api-router.js +15 -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/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 +33 -36
- package/src/judgment/explain-method.js +8 -7
- package/src/judgment/http.js +3 -1
- package/src/judgment/question-options.js +117 -74
- package/src/judgment/question-tools.js +54 -34
- package/src/judgment/review-delegation.js +16 -3
- package/src/judgment/review-prompt.js +29 -33
- package/src/judgment/routing.js +4 -3
- package/src/judgment/service.js +50 -8
- 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 +12 -32
- package/src/mcp/direct-call.js +0 -2
- package/src/mcp/preference-delivery.js +4 -2
- package/src/mcp/provider-task-context-registry.js +14 -0
- package/src/mcp/session-id.js +1 -33
- package/src/mcp/tool-annotations.js +3 -44
- 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 +17 -4
- package/src/model-backends/port.js +10 -4
- package/src/model-backends/runtime.js +6 -13
- package/src/model-backends/secret-store.js +2 -20
- package/src/native-runtime/runtime.js +13 -2
- package/src/presence/windows-helper-pin.js +1 -1
- package/src/project-organizing/agent-tool.js +65 -0
- package/src/project-organizing/model-tiers.js +31 -0
- package/src/project-organizing/port.js +130 -0
- package/src/server.js +22 -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/whats-new/lines/0.27.0.json +13 -0
- 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/FieldRoot-DRf4wM5x.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/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/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/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/TaskBlockerNotice-iUiD3BuZ.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/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/source-adapters-DPJzumzC.js +0 -1
- package/dist/web/assets/task-evidence-DIbw2U42.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,15 +1,12 @@
|
|
|
1
1
|
import json
|
|
2
|
-
import
|
|
3
|
-
from datetime import datetime, timedelta, timezone
|
|
2
|
+
from datetime import datetime, timezone
|
|
4
3
|
|
|
5
4
|
from fastapi import HTTPException
|
|
6
5
|
|
|
7
6
|
from .models import ConfirmationBasis
|
|
8
7
|
from .personal_global_preference_models import (
|
|
9
|
-
PersonalGlobalPreferenceDecisionApply,
|
|
10
8
|
PersonalGlobalPreferenceDecisionInspection,
|
|
11
9
|
PersonalGlobalPreferenceDecisionIntent,
|
|
12
|
-
PersonalGlobalPreferenceDecisionPreview,
|
|
13
10
|
PersonalGlobalPreferenceDecisionRecord,
|
|
14
11
|
PersonalGlobalPreferenceDecisionRevision,
|
|
15
12
|
PersonalGlobalPreferenceDecisionStatusRequest,
|
|
@@ -22,17 +19,12 @@ from .personal_global_preference_models import (
|
|
|
22
19
|
from .provider_values import (
|
|
23
20
|
json_object,
|
|
24
21
|
native_datetime,
|
|
25
|
-
now_utc,
|
|
26
22
|
preference_key,
|
|
27
23
|
preference_qualifiers,
|
|
28
24
|
sha256_text,
|
|
29
|
-
stable_uuid,
|
|
30
25
|
)
|
|
31
26
|
|
|
32
27
|
|
|
33
|
-
DECISION_PREVIEW_TTL = timedelta(minutes=10)
|
|
34
|
-
|
|
35
|
-
|
|
36
28
|
async def personal_global_preference_scope_options(
|
|
37
29
|
store,
|
|
38
30
|
actor: dict,
|
|
@@ -121,277 +113,6 @@ async def inspect_personal_global_preference_decision(
|
|
|
121
113
|
)
|
|
122
114
|
|
|
123
115
|
|
|
124
|
-
async def preview_personal_global_preference_decision(
|
|
125
|
-
store,
|
|
126
|
-
actor: dict,
|
|
127
|
-
candidate_id: str,
|
|
128
|
-
request: PersonalGlobalPreferenceDecisionIntent,
|
|
129
|
-
*,
|
|
130
|
-
created_at: datetime | None = None,
|
|
131
|
-
token_factory=secrets.token_urlsafe,
|
|
132
|
-
) -> PersonalGlobalPreferenceDecisionPreview:
|
|
133
|
-
space = await _personal_space(
|
|
134
|
-
store,
|
|
135
|
-
actor,
|
|
136
|
-
request.personal_space_id,
|
|
137
|
-
'maintainer',
|
|
138
|
-
)
|
|
139
|
-
snapshots, eligible_target_scopes = await _validated_source_snapshots(
|
|
140
|
-
store,
|
|
141
|
-
space,
|
|
142
|
-
candidate_id,
|
|
143
|
-
request,
|
|
144
|
-
)
|
|
145
|
-
issued_at = created_at or now_utc()
|
|
146
|
-
expires_at = issued_at + DECISION_PREVIEW_TTL
|
|
147
|
-
approval_token = token_factory(32)
|
|
148
|
-
token_hash = sha256_text(approval_token)
|
|
149
|
-
payload_fingerprint = _decision_payload_fingerprint(candidate_id, request)
|
|
150
|
-
preview_id = stable_uuid(
|
|
151
|
-
space['id'],
|
|
152
|
-
'personal-global-preference-preview',
|
|
153
|
-
token_hash,
|
|
154
|
-
)
|
|
155
|
-
records, _, _ = await store.runtime.driver.execute_query(
|
|
156
|
-
_CREATE_DECISION_PREVIEW_QUERY,
|
|
157
|
-
space_id=space['id'],
|
|
158
|
-
candidate_id=candidate_id,
|
|
159
|
-
candidate_version=request.candidate_version,
|
|
160
|
-
decision_revision=request.decision_revision,
|
|
161
|
-
target_scope=request.target_scope,
|
|
162
|
-
target_project_id=request.target_project_id,
|
|
163
|
-
preview_id=preview_id,
|
|
164
|
-
token_hash=token_hash,
|
|
165
|
-
payload_fingerprint=payload_fingerprint,
|
|
166
|
-
issued_to_actor_id=actor['id'],
|
|
167
|
-
issued_channel='independent_human_review',
|
|
168
|
-
created_at=issued_at,
|
|
169
|
-
expires_at=expires_at,
|
|
170
|
-
)
|
|
171
|
-
if not records:
|
|
172
|
-
raise HTTPException(
|
|
173
|
-
status_code=409,
|
|
174
|
-
detail='personal-global decision changed before preview was created',
|
|
175
|
-
)
|
|
176
|
-
return PersonalGlobalPreferenceDecisionPreview(
|
|
177
|
-
preview_id=preview_id,
|
|
178
|
-
candidate_id=candidate_id,
|
|
179
|
-
candidate_version=request.candidate_version,
|
|
180
|
-
decision_revision=request.decision_revision,
|
|
181
|
-
target_scope=request.target_scope,
|
|
182
|
-
target_project_id=request.target_project_id,
|
|
183
|
-
eligible_target_scopes=eligible_target_scopes,
|
|
184
|
-
payload_fingerprint=payload_fingerprint,
|
|
185
|
-
approval_token=approval_token,
|
|
186
|
-
expires_at=expires_at,
|
|
187
|
-
source_snapshots=snapshots,
|
|
188
|
-
)
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
async def apply_personal_global_preference_decision(
|
|
192
|
-
store,
|
|
193
|
-
actor: dict,
|
|
194
|
-
candidate_id: str,
|
|
195
|
-
request: PersonalGlobalPreferenceDecisionApply,
|
|
196
|
-
*,
|
|
197
|
-
applied_at: datetime | None = None,
|
|
198
|
-
) -> PersonalGlobalPreferenceDecisionRecord:
|
|
199
|
-
space = await _personal_space(
|
|
200
|
-
store,
|
|
201
|
-
actor,
|
|
202
|
-
request.personal_space_id,
|
|
203
|
-
'maintainer',
|
|
204
|
-
)
|
|
205
|
-
payload_fingerprint = _decision_payload_fingerprint(candidate_id, request)
|
|
206
|
-
event_id = stable_uuid(
|
|
207
|
-
space['id'],
|
|
208
|
-
'personal-global-preference-decision-event',
|
|
209
|
-
candidate_id,
|
|
210
|
-
request.candidate_version,
|
|
211
|
-
request.idempotency_key,
|
|
212
|
-
)
|
|
213
|
-
existing_rows, _, _ = await store.runtime.driver.execute_query(
|
|
214
|
-
_DECISION_EVENT_QUERY,
|
|
215
|
-
space_id=space['id'],
|
|
216
|
-
event_id=event_id,
|
|
217
|
-
routing_='r',
|
|
218
|
-
)
|
|
219
|
-
if existing_rows:
|
|
220
|
-
if existing_rows[0].get('payload_fingerprint') != payload_fingerprint:
|
|
221
|
-
raise HTTPException(
|
|
222
|
-
status_code=409,
|
|
223
|
-
detail=(
|
|
224
|
-
'personal-global decision idempotency key was used for '
|
|
225
|
-
'another candidate version or payload'
|
|
226
|
-
),
|
|
227
|
-
)
|
|
228
|
-
return _decision_record(existing_rows[0])
|
|
229
|
-
|
|
230
|
-
snapshots, eligible_target_scopes = await _validated_source_snapshots(
|
|
231
|
-
store,
|
|
232
|
-
space,
|
|
233
|
-
candidate_id,
|
|
234
|
-
request,
|
|
235
|
-
)
|
|
236
|
-
changed_at = applied_at or now_utc()
|
|
237
|
-
decision_status = (
|
|
238
|
-
'approved' if request.decision == 'approve' else 'rejected'
|
|
239
|
-
)
|
|
240
|
-
global_assertion_id = (
|
|
241
|
-
stable_uuid(
|
|
242
|
-
space['group_id'],
|
|
243
|
-
'personal-global-preference-assertion',
|
|
244
|
-
event_id,
|
|
245
|
-
payload_fingerprint,
|
|
246
|
-
)
|
|
247
|
-
if request.decision == 'approve'
|
|
248
|
-
else None
|
|
249
|
-
)
|
|
250
|
-
episode_id = (
|
|
251
|
-
stable_uuid(
|
|
252
|
-
space['group_id'],
|
|
253
|
-
'personal-global-preference-episode',
|
|
254
|
-
event_id,
|
|
255
|
-
)
|
|
256
|
-
if global_assertion_id
|
|
257
|
-
else None
|
|
258
|
-
)
|
|
259
|
-
source_uris = sorted({
|
|
260
|
-
uri
|
|
261
|
-
for snapshot in snapshots
|
|
262
|
-
for uri in snapshot.source_uris
|
|
263
|
-
})
|
|
264
|
-
attributes = {
|
|
265
|
-
'candidateId': candidate_id,
|
|
266
|
-
'candidateVersion': request.candidate_version,
|
|
267
|
-
'decisionRevision': request.decision_revision + 1,
|
|
268
|
-
'preferenceKey': request.preference_key,
|
|
269
|
-
'targetScope': request.target_scope,
|
|
270
|
-
'targetProjectId': request.target_project_id,
|
|
271
|
-
'eligibleTargetScopes': [
|
|
272
|
-
scope.model_dump(mode='json')
|
|
273
|
-
for scope in eligible_target_scopes
|
|
274
|
-
],
|
|
275
|
-
'scopeDecision': decision_status,
|
|
276
|
-
'humanConfirmationReason': request.human_confirmation_reason,
|
|
277
|
-
'sourceItemIds': [item.item_id for item in snapshots],
|
|
278
|
-
'sourceProjectIds': [item.project_id for item in snapshots],
|
|
279
|
-
'sourceUris': source_uris,
|
|
280
|
-
'sourcePreferenceSnapshots': [
|
|
281
|
-
snapshot.model_dump(mode='json') for snapshot in snapshots
|
|
282
|
-
],
|
|
283
|
-
'searchTerms': [candidate_id, request.candidate_version],
|
|
284
|
-
}
|
|
285
|
-
confirmation_basis = ConfirmationBasis.model_validate({
|
|
286
|
-
'existence_reason': request.human_confirmation_reason,
|
|
287
|
-
'quadrant_reason': request.human_confirmation_reason,
|
|
288
|
-
'proposed_by': {
|
|
289
|
-
'kind': 'user',
|
|
290
|
-
'label': 'Independent human scope review',
|
|
291
|
-
},
|
|
292
|
-
'confirmed_by': {
|
|
293
|
-
'kind': 'user',
|
|
294
|
-
'label': 'Authenticated personal-space maintainer',
|
|
295
|
-
},
|
|
296
|
-
'confirmed_at': request.confirmed_at,
|
|
297
|
-
})
|
|
298
|
-
embedding = (
|
|
299
|
-
await store.runtime.embedder.create(request.global_title)
|
|
300
|
-
if global_assertion_id
|
|
301
|
-
else None
|
|
302
|
-
)
|
|
303
|
-
token_hash = sha256_text(request.approval_token)
|
|
304
|
-
records, _, _ = await store.runtime.driver.execute_query(
|
|
305
|
-
_APPLY_DECISION_QUERY,
|
|
306
|
-
space_id=space['id'],
|
|
307
|
-
group_id=space['group_id'],
|
|
308
|
-
candidate_id=candidate_id,
|
|
309
|
-
candidate_version=request.candidate_version,
|
|
310
|
-
decision_revision=request.decision_revision,
|
|
311
|
-
decision_status=decision_status,
|
|
312
|
-
target_scope=request.target_scope,
|
|
313
|
-
target_project_id=request.target_project_id,
|
|
314
|
-
source_project_ids=sorted({
|
|
315
|
-
snapshot.project_id for snapshot in snapshots
|
|
316
|
-
}),
|
|
317
|
-
expected_parent_scopes=[
|
|
318
|
-
{
|
|
319
|
-
'target_project_id': scope.target_project_id,
|
|
320
|
-
'max_distance': scope.max_distance,
|
|
321
|
-
}
|
|
322
|
-
for scope in eligible_target_scopes
|
|
323
|
-
if scope.target_scope == 'parent_project'
|
|
324
|
-
],
|
|
325
|
-
token_hash=token_hash,
|
|
326
|
-
payload_fingerprint=payload_fingerprint,
|
|
327
|
-
event_id=event_id,
|
|
328
|
-
actor_id=actor['id'],
|
|
329
|
-
global_assertion_id=global_assertion_id,
|
|
330
|
-
episode_id=episode_id,
|
|
331
|
-
global_key=(
|
|
332
|
-
'personal-preference-convergence:'
|
|
333
|
-
f'{candidate_id}:{request.target_scope}:'
|
|
334
|
-
f'{request.target_project_id or "personal-global"}'
|
|
335
|
-
),
|
|
336
|
-
global_title=request.global_title,
|
|
337
|
-
global_instruction=request.global_instruction,
|
|
338
|
-
profile_aspect=request.profile_aspect,
|
|
339
|
-
preference_scope=(
|
|
340
|
-
'project'
|
|
341
|
-
if request.target_scope == 'parent_project'
|
|
342
|
-
else 'global'
|
|
343
|
-
),
|
|
344
|
-
preference_project_id=request.target_project_id,
|
|
345
|
-
inheritance_mode=(
|
|
346
|
-
'descendants'
|
|
347
|
-
if request.target_scope == 'parent_project'
|
|
348
|
-
else 'local_only'
|
|
349
|
-
),
|
|
350
|
-
confirmation_basis_json=json.dumps(
|
|
351
|
-
confirmation_basis.model_dump(mode='json'),
|
|
352
|
-
ensure_ascii=False,
|
|
353
|
-
sort_keys=True,
|
|
354
|
-
),
|
|
355
|
-
human_confirmation_reason=request.human_confirmation_reason,
|
|
356
|
-
attributes_json=json.dumps(
|
|
357
|
-
attributes,
|
|
358
|
-
ensure_ascii=False,
|
|
359
|
-
sort_keys=True,
|
|
360
|
-
),
|
|
361
|
-
source_uri=source_uris[0] if source_uris else None,
|
|
362
|
-
session_id=request.session_id,
|
|
363
|
-
source_items=[
|
|
364
|
-
item.model_dump(mode='json') for item in request.source_items
|
|
365
|
-
],
|
|
366
|
-
source_items_json=json.dumps(
|
|
367
|
-
[item.model_dump(mode='json') for item in request.source_items],
|
|
368
|
-
ensure_ascii=False,
|
|
369
|
-
sort_keys=True,
|
|
370
|
-
),
|
|
371
|
-
source_snapshots=[
|
|
372
|
-
_source_cas_row(snapshot) for snapshot in snapshots
|
|
373
|
-
],
|
|
374
|
-
source_snapshots_json=json.dumps(
|
|
375
|
-
[snapshot.model_dump(mode='json') for snapshot in snapshots],
|
|
376
|
-
ensure_ascii=False,
|
|
377
|
-
sort_keys=True,
|
|
378
|
-
),
|
|
379
|
-
embedding=embedding,
|
|
380
|
-
confirmed_at=request.confirmed_at,
|
|
381
|
-
changed_at=changed_at,
|
|
382
|
-
expires_after=changed_at,
|
|
383
|
-
)
|
|
384
|
-
if not records:
|
|
385
|
-
raise HTTPException(
|
|
386
|
-
status_code=409,
|
|
387
|
-
detail=(
|
|
388
|
-
'personal-global review token is invalid, expired, used, '
|
|
389
|
-
'stale, or another decision won this revision'
|
|
390
|
-
),
|
|
391
|
-
)
|
|
392
|
-
return _decision_record(records[0])
|
|
393
|
-
|
|
394
|
-
|
|
395
116
|
async def personal_global_preference_decision_status(
|
|
396
117
|
store,
|
|
397
118
|
actor: dict,
|
|
@@ -716,33 +437,6 @@ def _decision_payload_fingerprint(
|
|
|
716
437
|
))
|
|
717
438
|
|
|
718
439
|
|
|
719
|
-
def _source_cas_row(
|
|
720
|
-
snapshot: PersonalGlobalPreferenceSourceSnapshot,
|
|
721
|
-
) -> dict:
|
|
722
|
-
return {
|
|
723
|
-
'item_id': snapshot.item_id,
|
|
724
|
-
'item_kind': snapshot.item_kind,
|
|
725
|
-
'project_id': snapshot.project_id,
|
|
726
|
-
'key': snapshot.key,
|
|
727
|
-
'preference_key': snapshot.preference_key,
|
|
728
|
-
'title': snapshot.title,
|
|
729
|
-
'instruction': snapshot.instruction,
|
|
730
|
-
'profile_aspect': snapshot.profile_aspect,
|
|
731
|
-
'confirmation_status': snapshot.confirmation_status,
|
|
732
|
-
'confirmation_basis_json': (
|
|
733
|
-
snapshot.stored_confirmation_basis_json
|
|
734
|
-
),
|
|
735
|
-
'human_change_version': snapshot.human_change_version,
|
|
736
|
-
'usage_generation': snapshot.usage_generation,
|
|
737
|
-
'last_human_changed_at': snapshot.last_human_changed_at,
|
|
738
|
-
'negative_evidence_count': snapshot.negative_evidence_count,
|
|
739
|
-
'requires_attention': snapshot.requires_attention,
|
|
740
|
-
'last_feedback_at': snapshot.last_feedback_at,
|
|
741
|
-
'source_uris': snapshot.source_uris,
|
|
742
|
-
'attributes_json': snapshot.stored_attributes_json,
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
|
|
746
440
|
def _decision_record(record) -> PersonalGlobalPreferenceDecisionRecord:
|
|
747
441
|
value = dict(record)
|
|
748
442
|
return PersonalGlobalPreferenceDecisionRecord(
|
|
@@ -886,329 +580,10 @@ RETURN coalesce(decision.decision_revision, 0) AS decision_revision
|
|
|
886
580
|
'''
|
|
887
581
|
|
|
888
582
|
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
space_id: $space_id,
|
|
894
|
-
candidate_id: $candidate_id
|
|
895
|
-
})
|
|
896
|
-
ON CREATE SET decision.decision_revision = 0,
|
|
897
|
-
decision.created_at = $created_at
|
|
898
|
-
WITH space, decision
|
|
899
|
-
WHERE decision.decision_revision = $decision_revision
|
|
900
|
-
CREATE (preview:FuliPersonalGlobalPreferenceDecisionPreview {
|
|
901
|
-
id: $preview_id,
|
|
902
|
-
space_id: $space_id,
|
|
903
|
-
candidate_id: $candidate_id,
|
|
904
|
-
candidate_version: $candidate_version,
|
|
905
|
-
decision_revision: $decision_revision,
|
|
906
|
-
target_scope: $target_scope,
|
|
907
|
-
target_project_id: $target_project_id,
|
|
908
|
-
token_hash: $token_hash,
|
|
909
|
-
payload_fingerprint: $payload_fingerprint,
|
|
910
|
-
issued_to_actor_id: $issued_to_actor_id,
|
|
911
|
-
issued_channel: $issued_channel,
|
|
912
|
-
created_at: $created_at,
|
|
913
|
-
expires_at: $expires_at,
|
|
914
|
-
used_at: null
|
|
915
|
-
})
|
|
916
|
-
RETURN preview.id AS preview_id
|
|
917
|
-
'''
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
_DECISION_EVENT_QUERY = '''
|
|
921
|
-
/* fuli:personal-global-decision-event */
|
|
922
|
-
MATCH (event:FuliPersonalGlobalPreferenceDecisionEvent {
|
|
923
|
-
space_id: $space_id,
|
|
924
|
-
id: $event_id
|
|
925
|
-
})
|
|
926
|
-
OPTIONAL MATCH (current:FuliPersonalGlobalPreferenceDecision {
|
|
927
|
-
space_id: $space_id,
|
|
928
|
-
candidate_id: event.candidate_id,
|
|
929
|
-
current_event_id: event.id
|
|
930
|
-
})
|
|
931
|
-
OPTIONAL MATCH (assertion:Entity {uuid: event.global_assertion_id})
|
|
932
|
-
RETURN event.id AS decision_event_id,
|
|
933
|
-
event.payload_fingerprint AS payload_fingerprint,
|
|
934
|
-
event.candidate_id AS candidate_id,
|
|
935
|
-
event.candidate_version AS candidate_version,
|
|
936
|
-
event.decision_revision AS decision_revision,
|
|
937
|
-
event.decision AS decision,
|
|
938
|
-
coalesce(event.target_scope, 'personal_global') AS target_scope,
|
|
939
|
-
event.target_project_id AS target_project_id,
|
|
940
|
-
event.global_assertion_id AS global_assertion_id,
|
|
941
|
-
current IS NOT NULL
|
|
942
|
-
AND event.global_assertion_id IS NOT NULL
|
|
943
|
-
AND assertion IS NOT NULL
|
|
944
|
-
AND assertion.fuli_invalid_at IS NULL AS global_assertion_active,
|
|
945
|
-
event.decision_revision AS decision_sequence,
|
|
946
|
-
event.decided_at AS decided_at,
|
|
947
|
-
event.human_confirmation_reason AS human_confirmation_reason
|
|
948
|
-
'''
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
_APPLY_DECISION_QUERY = '''
|
|
952
|
-
/* fuli:apply-personal-global-decision */
|
|
953
|
-
MATCH (space:FuliSpace {id: $space_id, kind: 'personal'})
|
|
954
|
-
MATCH (current:FuliPersonalGlobalPreferenceDecision {
|
|
955
|
-
space_id: $space_id,
|
|
956
|
-
candidate_id: $candidate_id
|
|
957
|
-
})
|
|
958
|
-
SET current.cas_lock = coalesce(current.cas_lock, 0) + 1
|
|
959
|
-
WITH space, current
|
|
960
|
-
WHERE current.decision_revision = $decision_revision
|
|
961
|
-
MATCH (preview:FuliPersonalGlobalPreferenceDecisionPreview {
|
|
962
|
-
space_id: $space_id,
|
|
963
|
-
candidate_id: $candidate_id,
|
|
964
|
-
candidate_version: $candidate_version,
|
|
965
|
-
decision_revision: $decision_revision,
|
|
966
|
-
token_hash: $token_hash,
|
|
967
|
-
payload_fingerprint: $payload_fingerprint
|
|
968
|
-
})
|
|
969
|
-
WHERE preview.used_at IS NULL
|
|
970
|
-
AND preview.expires_at > $expires_after
|
|
971
|
-
AND preview.issued_to_actor_id = $actor_id
|
|
972
|
-
CALL {
|
|
973
|
-
WITH space
|
|
974
|
-
UNWIND [source IN $source_snapshots
|
|
975
|
-
WHERE source.item_kind = 'entity'] AS source
|
|
976
|
-
OPTIONAL MATCH (item:Entity {
|
|
977
|
-
group_id: $group_id,
|
|
978
|
-
uuid: source.item_id
|
|
979
|
-
})
|
|
980
|
-
OPTIONAL MATCH (episode:Episodic {group_id: $group_id})-[:MENTIONS]->(item)
|
|
981
|
-
WITH source, item,
|
|
982
|
-
[uri IN collect(DISTINCT episode.fuli_source_uri)
|
|
983
|
-
WHERE uri IS NOT NULL] AS current_source_uris
|
|
984
|
-
WHERE item.fuli_invalid_at IS NULL
|
|
985
|
-
AND item.fuli_preference_scope = 'project'
|
|
986
|
-
AND item.fuli_preference_project_id = source.project_id
|
|
987
|
-
AND coalesce(item.fuli_key, item.uuid) = source.key
|
|
988
|
-
AND item.name = source.title
|
|
989
|
-
AND coalesce(item.summary, '') = source.instruction
|
|
990
|
-
AND item.fuli_profile_aspect = source.profile_aspect
|
|
991
|
-
AND item.fuli_confirmation_status = source.confirmation_status
|
|
992
|
-
AND coalesce(item.fuli_confirmation_basis_json, '{}') =
|
|
993
|
-
source.confirmation_basis_json
|
|
994
|
-
AND coalesce(item.fuli_human_change_version, 0) =
|
|
995
|
-
source.human_change_version
|
|
996
|
-
AND coalesce(item.fuli_usage_generation, 1) = source.usage_generation
|
|
997
|
-
AND (
|
|
998
|
-
item.fuli_last_human_changed_at = source.last_human_changed_at
|
|
999
|
-
OR (
|
|
1000
|
-
item.fuli_last_human_changed_at IS NULL
|
|
1001
|
-
AND source.last_human_changed_at IS NULL
|
|
1002
|
-
)
|
|
1003
|
-
)
|
|
1004
|
-
AND coalesce(item.fuli_negative_evidence_count, 0) =
|
|
1005
|
-
source.negative_evidence_count
|
|
1006
|
-
AND coalesce(item.fuli_requires_attention, false) =
|
|
1007
|
-
source.requires_attention
|
|
1008
|
-
AND (
|
|
1009
|
-
item.fuli_last_feedback_at = source.last_feedback_at
|
|
1010
|
-
OR (
|
|
1011
|
-
item.fuli_last_feedback_at IS NULL
|
|
1012
|
-
AND source.last_feedback_at IS NULL
|
|
1013
|
-
)
|
|
1014
|
-
)
|
|
1015
|
-
AND coalesce(item.fuli_attributes_json, '{}') = source.attributes_json
|
|
1016
|
-
AND size(current_source_uris) = size(source.source_uris)
|
|
1017
|
-
AND all(uri IN current_source_uris WHERE uri IN source.source_uris)
|
|
1018
|
-
RETURN count(item) AS valid_entity_count
|
|
1019
|
-
}
|
|
1020
|
-
CALL {
|
|
1021
|
-
WITH space
|
|
1022
|
-
UNWIND [source IN $source_snapshots
|
|
1023
|
-
WHERE source.item_kind = 'relationship'] AS source
|
|
1024
|
-
OPTIONAL MATCH ()-[item:RELATES_TO {
|
|
1025
|
-
group_id: $group_id,
|
|
1026
|
-
uuid: source.item_id
|
|
1027
|
-
}]->()
|
|
1028
|
-
OPTIONAL MATCH (episode:Episodic {group_id: $group_id})
|
|
1029
|
-
WHERE episode.uuid IN coalesce(item.episodes, [])
|
|
1030
|
-
WITH source, item,
|
|
1031
|
-
[uri IN collect(DISTINCT episode.fuli_source_uri)
|
|
1032
|
-
WHERE uri IS NOT NULL] AS current_source_uris
|
|
1033
|
-
WHERE item.invalid_at IS NULL
|
|
1034
|
-
AND item.fuli_preference_scope = 'project'
|
|
1035
|
-
AND item.fuli_preference_project_id = source.project_id
|
|
1036
|
-
AND coalesce(item.fuli_key, item.uuid) = source.key
|
|
1037
|
-
AND coalesce(item.name, 'Preference relationship') = source.title
|
|
1038
|
-
AND coalesce(item.fact, '') = source.instruction
|
|
1039
|
-
AND item.fuli_profile_aspect = source.profile_aspect
|
|
1040
|
-
AND item.fuli_confirmation_status = source.confirmation_status
|
|
1041
|
-
AND coalesce(item.fuli_confirmation_basis_json, '{}') =
|
|
1042
|
-
source.confirmation_basis_json
|
|
1043
|
-
AND coalesce(item.fuli_human_change_version, 0) =
|
|
1044
|
-
source.human_change_version
|
|
1045
|
-
AND coalesce(item.fuli_usage_generation, 1) = source.usage_generation
|
|
1046
|
-
AND (
|
|
1047
|
-
item.fuli_last_human_changed_at = source.last_human_changed_at
|
|
1048
|
-
OR (
|
|
1049
|
-
item.fuli_last_human_changed_at IS NULL
|
|
1050
|
-
AND source.last_human_changed_at IS NULL
|
|
1051
|
-
)
|
|
1052
|
-
)
|
|
1053
|
-
AND coalesce(item.fuli_negative_evidence_count, 0) =
|
|
1054
|
-
source.negative_evidence_count
|
|
1055
|
-
AND coalesce(item.fuli_requires_attention, false) =
|
|
1056
|
-
source.requires_attention
|
|
1057
|
-
AND (
|
|
1058
|
-
item.fuli_last_feedback_at = source.last_feedback_at
|
|
1059
|
-
OR (
|
|
1060
|
-
item.fuli_last_feedback_at IS NULL
|
|
1061
|
-
AND source.last_feedback_at IS NULL
|
|
1062
|
-
)
|
|
1063
|
-
)
|
|
1064
|
-
AND coalesce(item.fuli_attributes_json, '{}') = source.attributes_json
|
|
1065
|
-
AND size(current_source_uris) = size(source.source_uris)
|
|
1066
|
-
AND all(uri IN current_source_uris WHERE uri IN source.source_uris)
|
|
1067
|
-
RETURN count(item) AS valid_relationship_count
|
|
1068
|
-
}
|
|
1069
|
-
CALL {
|
|
1070
|
-
WITH space
|
|
1071
|
-
UNWIND $source_project_ids AS source_project_id
|
|
1072
|
-
MATCH (space)-[:CONTAINS_PROJECT]->
|
|
1073
|
-
(source:FuliPersonalProject {project_id: source_project_id})
|
|
1074
|
-
MATCH path=(source)-[:PERSONAL_PROJECT_RELATION*1..2]->
|
|
1075
|
-
(target:FuliPersonalProject)
|
|
1076
|
-
WHERE all(relation IN relationships(path)
|
|
1077
|
-
WHERE relation.relation_type = 'PART_OF'
|
|
1078
|
-
AND relation.status = 'active'
|
|
1079
|
-
AND relation.confirmation_authority = 'human_review')
|
|
1080
|
-
AND EXISTS {
|
|
1081
|
-
MATCH (space)-[:CONTAINS_PROJECT]->(target)
|
|
1082
|
-
}
|
|
1083
|
-
AND NOT target.project_id IN $source_project_ids
|
|
1084
|
-
WITH target, source_project_id, min(length(path)) AS distance
|
|
1085
|
-
WITH target,
|
|
1086
|
-
collect(DISTINCT source_project_id) AS covered_source_project_ids,
|
|
1087
|
-
max(distance) AS max_distance
|
|
1088
|
-
WHERE size(covered_source_project_ids) = size($source_project_ids)
|
|
1089
|
-
WITH {
|
|
1090
|
-
target_project_id: target.project_id,
|
|
1091
|
-
max_distance: max_distance
|
|
1092
|
-
} AS option
|
|
1093
|
-
ORDER BY option.max_distance ASC, option.target_project_id ASC
|
|
1094
|
-
RETURN collect(option) AS current_parent_scopes
|
|
1095
|
-
}
|
|
1096
|
-
WITH space, preview, current, valid_entity_count,
|
|
1097
|
-
valid_relationship_count, current_parent_scopes
|
|
1098
|
-
WHERE valid_entity_count = size([
|
|
1099
|
-
source IN $source_snapshots WHERE source.item_kind = 'entity'
|
|
1100
|
-
])
|
|
1101
|
-
AND valid_relationship_count = size([
|
|
1102
|
-
source IN $source_snapshots WHERE source.item_kind = 'relationship'
|
|
1103
|
-
])
|
|
1104
|
-
AND current_parent_scopes = $expected_parent_scopes
|
|
1105
|
-
OPTIONAL MATCH (old_assertion:Entity {
|
|
1106
|
-
uuid: current.global_assertion_id,
|
|
1107
|
-
group_id: $group_id
|
|
1108
|
-
})
|
|
1109
|
-
SET preview.used_at = $changed_at
|
|
1110
|
-
FOREACH (_ IN CASE WHEN old_assertion IS NULL THEN [] ELSE [1] END |
|
|
1111
|
-
SET old_assertion.fuli_ai_review_lock_version =
|
|
1112
|
-
coalesce(old_assertion.fuli_ai_review_lock_version, 0) + 1,
|
|
1113
|
-
old_assertion.fuli_invalid_at = $changed_at,
|
|
1114
|
-
old_assertion.expired_at = $changed_at
|
|
1115
|
-
)
|
|
1116
|
-
SET current.candidate_version = $candidate_version,
|
|
1117
|
-
current.decision_revision = $decision_revision + 1,
|
|
1118
|
-
current.decision = $decision_status,
|
|
1119
|
-
current.target_scope = $target_scope,
|
|
1120
|
-
current.target_project_id = $target_project_id,
|
|
1121
|
-
current.global_assertion_id = $global_assertion_id,
|
|
1122
|
-
current.current_event_id = $event_id,
|
|
1123
|
-
current.updated_at = $changed_at
|
|
1124
|
-
CREATE (event:FuliPersonalGlobalPreferenceDecisionEvent {
|
|
1125
|
-
id: $event_id,
|
|
1126
|
-
space_id: $space_id,
|
|
1127
|
-
candidate_id: $candidate_id,
|
|
1128
|
-
candidate_version: $candidate_version,
|
|
1129
|
-
decision_revision: $decision_revision + 1,
|
|
1130
|
-
decision: $decision_status,
|
|
1131
|
-
target_scope: $target_scope,
|
|
1132
|
-
target_project_id: $target_project_id,
|
|
1133
|
-
payload_fingerprint: $payload_fingerprint,
|
|
1134
|
-
global_assertion_id: $global_assertion_id,
|
|
1135
|
-
decided_by_actor_id: $actor_id,
|
|
1136
|
-
decision_channel: 'independent_human_review_token',
|
|
1137
|
-
human_confirmation_reason: $human_confirmation_reason,
|
|
1138
|
-
source_items_json: $source_items_json,
|
|
1139
|
-
source_snapshots_json: $source_snapshots_json,
|
|
1140
|
-
decided_at: $confirmed_at,
|
|
1141
|
-
recorded_at: $changed_at
|
|
1142
|
-
})
|
|
1143
|
-
FOREACH (_ IN CASE WHEN $global_assertion_id IS NULL THEN [] ELSE [1] END |
|
|
1144
|
-
MERGE (assertion:Entity {uuid: $global_assertion_id})
|
|
1145
|
-
ON CREATE SET assertion.group_id = $group_id,
|
|
1146
|
-
assertion.name = $global_title,
|
|
1147
|
-
assertion.name_embedding = $embedding,
|
|
1148
|
-
assertion.summary = $global_instruction,
|
|
1149
|
-
assertion.created_at = $changed_at,
|
|
1150
|
-
assertion.fuli_key = $global_key,
|
|
1151
|
-
assertion.fuli_type = 'PersonalPreference',
|
|
1152
|
-
assertion.fuli_origin_quadrant = 'known_known',
|
|
1153
|
-
assertion.fuli_current_quadrant = 'known_known',
|
|
1154
|
-
assertion.fuli_epistemic_status = 'confirmed',
|
|
1155
|
-
assertion.fuli_confirmation_status = 'confirmed',
|
|
1156
|
-
assertion.fuli_confirmation_basis_json =
|
|
1157
|
-
$confirmation_basis_json,
|
|
1158
|
-
assertion.fuli_reasoning_summary =
|
|
1159
|
-
$human_confirmation_reason,
|
|
1160
|
-
assertion.fuli_profile_aspect = $profile_aspect,
|
|
1161
|
-
assertion.fuli_preference_scope = $preference_scope,
|
|
1162
|
-
assertion.fuli_preference_project_id =
|
|
1163
|
-
$preference_project_id,
|
|
1164
|
-
assertion.fuli_inheritance_mode = $inheritance_mode,
|
|
1165
|
-
assertion.fuli_inherited_project_ids = [],
|
|
1166
|
-
assertion.fuli_attributes_json = $attributes_json,
|
|
1167
|
-
assertion.fuli_utility_score = 0.0,
|
|
1168
|
-
assertion.fuli_confidence_score = 1.0,
|
|
1169
|
-
assertion.fuli_qualified_use_count = 0,
|
|
1170
|
-
assertion.fuli_distinct_task_count = 0,
|
|
1171
|
-
assertion.fuli_usage_generation = 1,
|
|
1172
|
-
assertion.fuli_invalid_at = null
|
|
1173
|
-
SET assertion.fuli_ai_review_lock_version =
|
|
1174
|
-
coalesce(assertion.fuli_ai_review_lock_version, 0) + 1
|
|
1175
|
-
MERGE (episode:Episodic {uuid: $episode_id})
|
|
1176
|
-
ON CREATE SET episode.group_id = $group_id,
|
|
1177
|
-
episode.name = 'Personal-global preference human review',
|
|
1178
|
-
episode.source = 'json',
|
|
1179
|
-
episode.source_description = $human_confirmation_reason,
|
|
1180
|
-
episode.content = '',
|
|
1181
|
-
episode.valid_at = $confirmed_at,
|
|
1182
|
-
episode.created_at = $changed_at,
|
|
1183
|
-
episode.entity_edges = [],
|
|
1184
|
-
episode.fuli_session_id = $session_id,
|
|
1185
|
-
episode.fuli_source_kind = 'human_scope_decision',
|
|
1186
|
-
episode.fuli_source_uri = $source_uri,
|
|
1187
|
-
episode.fuli_summary = $global_instruction,
|
|
1188
|
-
episode.fuli_sensitivity = 'private',
|
|
1189
|
-
episode.fuli_personal_project_id =
|
|
1190
|
-
$preference_project_id,
|
|
1191
|
-
episode.fuli_idempotency_key = $event_id
|
|
1192
|
-
MERGE (episode)-[mention:MENTIONS]->(assertion)
|
|
1193
|
-
ON CREATE SET mention.uuid = $event_id + ':mention',
|
|
1194
|
-
mention.group_id = $group_id,
|
|
1195
|
-
mention.created_at = $changed_at
|
|
1196
|
-
)
|
|
1197
|
-
RETURN event.id AS decision_event_id,
|
|
1198
|
-
event.candidate_id AS candidate_id,
|
|
1199
|
-
event.candidate_version AS candidate_version,
|
|
1200
|
-
event.decision_revision AS decision_revision,
|
|
1201
|
-
event.decision AS decision,
|
|
1202
|
-
event.target_scope AS target_scope,
|
|
1203
|
-
event.target_project_id AS target_project_id,
|
|
1204
|
-
event.global_assertion_id AS global_assertion_id,
|
|
1205
|
-
event.global_assertion_id IS NOT NULL AS global_assertion_active,
|
|
1206
|
-
event.decision_revision AS decision_sequence,
|
|
1207
|
-
event.decided_at AS decided_at,
|
|
1208
|
-
event.human_confirmation_reason AS human_confirmation_reason
|
|
1209
|
-
'''
|
|
1210
|
-
|
|
1211
|
-
|
|
583
|
+
# Decisions are only read since 11-11 (the apply route was removed). Events an
|
|
584
|
+
# earlier version stored also carry decided_by_actor_id and decision_channel,
|
|
585
|
+
# its previews issued_to_actor_id and issued_channel; nothing reads them, and
|
|
586
|
+
# they leave the field contract with the next graph version.
|
|
1212
587
|
_DECISION_STATUS_QUERY = '''
|
|
1213
588
|
/* fuli:personal-global-decision-status */
|
|
1214
589
|
UNWIND $candidates AS requested
|
|
@@ -139,7 +139,9 @@ async def defer_preference_conflict(
|
|
|
139
139
|
left_item_kind=request.left_item_kind,
|
|
140
140
|
right_item_id=request.right_item_id,
|
|
141
141
|
right_item_kind=request.right_item_kind,
|
|
142
|
-
|
|
142
|
+
# Its body defaults to 'human': only the console's proof makes it the person's.
|
|
143
|
+
requested_by=('human' if request.operation_actor == 'human'
|
|
144
|
+
and actor.get('_human_review_verified') is True else 'agent'),
|
|
143
145
|
reason=request.reason,
|
|
144
146
|
deferred_at=deferred_at,
|
|
145
147
|
)
|