fuli-context 0.27.0 → 0.27.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/assets/{AboutPage-Bp2Edkdg.js → AboutPage-Bgcf03U0.js} +1 -1
- package/dist/web/assets/{AboutSectionHeading-DFfY2f_Z.js → AboutSectionHeading-BaQBY_Xs.js} +1 -1
- package/dist/web/assets/AgentAppsPage-DNuujLT2.js +1 -0
- package/dist/web/assets/{AgentAvatar-w-2A3nsJ.js → AgentAvatar-DGXedNUs.js} +1 -1
- package/dist/web/assets/{AgentHand-BGGU49Jt.js → AgentHand-BwE2VGth.js} +1 -1
- package/dist/web/assets/AgentManagement-2r8DUS1N.js +7 -0
- package/dist/web/assets/AgentManagement-hRkMpjvY.css +1 -0
- package/dist/web/assets/{AgentMentionCopy-BAHZjubz.js → AgentMentionCopy-y3JD1Cef.js} +1 -1
- package/dist/web/assets/{AgentName-CXlsC-4o.js → AgentName-XrBcHq4R.js} +1 -1
- package/dist/web/assets/AgentProfilePage-DE7z980p.js +5 -0
- package/dist/web/assets/AgentServicesPage-CWfGSxcb.js +1 -0
- package/dist/web/assets/{AppViewerPage-6gWP6nAf.js → AppViewerPage-BaKMk9pp.js} +1 -1
- package/dist/web/assets/{BackToTop-Cs5_rV99.js → BackToTop-DITd9y7X.js} +1 -1
- package/dist/web/assets/{BoardCardFieldsMenu-CvFrsIgy.js → BoardCardFieldsMenu-CWtHiVR-.js} +1 -1
- package/dist/web/assets/{BoardMoveMenu-B5isxIcK.js → BoardMoveMenu-CEDdltY7.js} +1 -1
- package/dist/web/assets/Breadcrumb-C98voz9V.js +1 -0
- package/dist/web/assets/{CaptureChangePage-Ca72_PHc.js → CaptureChangePage-CE8tJfiQ.js} +1 -1
- package/dist/web/assets/{CopyFixPrompt-wGATZKOq.js → CopyFixPrompt-C2hC04lV.js} +1 -1
- package/dist/web/assets/DataFormatPage-BjZkck9o.js +2 -0
- package/dist/web/assets/DebugTurnPage-B82geu1y.js +1 -0
- package/dist/web/assets/DebugTurnsPage-BlDDz1Fk.js +1 -0
- package/dist/web/assets/DialogTitle-fpANsAcy.js +1 -0
- package/dist/web/assets/{EmployeeRedirectPage-C2SHpAEF.js → EmployeeRedirectPage-CSSuvAqx.js} +1 -1
- package/dist/web/assets/EmployeeScopeDialog-BoEMQOEj.js +1 -0
- package/dist/web/assets/EmployeeWorkbench-DvEojWb7.js +4 -0
- package/dist/web/assets/{EmployeeWorkbench-Bp9pUkfS.css → EmployeeWorkbench-rhY970vW.css} +1 -1
- package/dist/web/assets/FieldRoot-D3lnRut5.js +1 -0
- package/dist/web/assets/{FlaGrowth-DGnUPN7D.js → FlaGrowth-OdlmgEVi.js} +1 -1
- package/dist/web/assets/{FlaOccupationKit-DAJjSrmL.js → FlaOccupationKit-CnouVWnU.js} +1 -1
- package/dist/web/assets/{FlaTaskSheets-DRLgfrVC.js → FlaTaskSheets-rSIdCtzz.js} +1 -1
- package/dist/web/assets/FlasPage-BZ791caF.js +1 -0
- package/dist/web/assets/{FlasPage-H99IZ9M6.css → FlasPage-D3CcJcvN.css} +1 -1
- package/dist/web/assets/{GrowthLoading-NLj2W4jj.js → GrowthLoading-BYOSvxZY.js} +1 -1
- package/dist/web/assets/{HowtoPage-CrvMmT6K.css → HowtoPage-DNTwYQCD.css} +1 -1
- package/dist/web/assets/HowtoPage-lYwzi4Vm.js +1 -0
- package/dist/web/assets/InboxPage-C3cSvJjB.js +6 -0
- package/dist/web/assets/{KnowledgeDeleteButton-DaT-gTmm.js → KnowledgeDeleteButton-yc8Gi-BH.js} +1 -1
- package/dist/web/assets/{KnowledgeHardDeleteSection-C9d7DVLa.js → KnowledgeHardDeleteSection-D9Ktc-uC.js} +1 -1
- package/dist/web/assets/KnowledgeItemEditPage-Csy4oOxD.js +1 -0
- package/dist/web/assets/{KnowledgeItemSummaryCard-eLzjKvgN.js → KnowledgeItemSummaryCard-BH5UYmde.js} +1 -1
- package/dist/web/assets/KnowledgeOrganizerPage-BTeQX0gH.js +1 -0
- package/dist/web/assets/KnowledgePage-BuukvNxz.js +1 -0
- package/dist/web/assets/KnowledgePeek-D0pcU7U5.js +1 -0
- package/dist/web/assets/KnowledgeTurnReceiptPage-Bd_LIdCc.js +1 -0
- package/dist/web/assets/{KnowledgeWorkspace-DDg3tUb3.css → KnowledgeWorkspace-Be2gUul5.css} +1 -1
- package/dist/web/assets/KnowledgeWorkspace-Dr-zYpDQ.js +4 -0
- package/dist/web/assets/{MeAvatar-f6qxg9dN.js → MeAvatar-CmhuRFOf.js} +1 -1
- package/dist/web/assets/{MeLink-DTvFYaYE.js → MeLink-BesUihiS.js} +1 -1
- package/dist/web/assets/MenuSeparator-BGo0DgyF.js +1 -0
- package/dist/web/assets/{ModelSettingsPage-B38R-kBZ.css → ModelSettingsPage-BZcyT7Vy.css} +1 -1
- package/dist/web/assets/ModelSettingsPage-CBPwuIBM.js +1 -0
- package/dist/web/assets/{NewSessionPanel-9yINjwyx.js → NewSessionPanel-Bvp9ElzU.js} +1 -1
- package/dist/web/assets/{NotFoundPage-CqevPz0_.js → NotFoundPage-BrolI2fz.js} +1 -1
- package/dist/web/assets/{workbench-card-Dt0820yW.css → NoticeRow-DD-J76Yo.css} +1 -1
- package/dist/web/assets/NoticeRow-Q9QT5NqB.js +1 -0
- package/dist/web/assets/OccupationsPage-CZCeeihl.js +1 -0
- package/dist/web/assets/{PageOutline-HHUlu2x3.js → PageOutline-DULpqEwg.js} +1 -1
- package/dist/web/assets/PageStack-BMzrkyV4.css +1 -0
- package/dist/web/assets/PageStack-DTzWJuae.js +1 -0
- package/dist/web/assets/{PersonalProfilePage-DnjNX2xK.css → PersonalProfilePage-BE5q2bqc.css} +1 -1
- package/dist/web/assets/PersonalProfilePage-DbXWycCQ.js +1 -0
- package/dist/web/assets/PersonalProjectsPage-pdAJpnZd.js +1 -0
- package/dist/web/assets/{PinIcon-DP-9Iisk.js → PinIcon-YYoaYKTx.js} +1 -1
- package/dist/web/assets/PopperContent-CnNwFMIA.js +1 -0
- package/dist/web/assets/Presence-CuIoA2sH.js +3 -0
- package/dist/web/assets/{ProfileAuthorChip-BKZJC_N2.js → ProfileAuthorChip-BEfiuJbm.js} +1 -1
- package/dist/web/assets/ProjectAgentsPage-BPf2RLsw.js +5 -0
- package/dist/web/assets/{ProjectJudgmentPolicy-BJ5sVuFI.js → ProjectJudgmentPolicy-CCzHtmOb.js} +1 -1
- package/dist/web/assets/{RoundtablesPage-D5Xc3yun.js → RoundtablesPage-BDU4W-bg.js} +1 -1
- package/dist/web/assets/RovingFocusGroup-DS4v3bEq.js +1 -0
- package/dist/web/assets/RovingFocusItem-bLEnnw2Y.js +1 -0
- package/dist/web/assets/SessionMigrationPage-DrK4df0L.js +1 -0
- package/dist/web/assets/{SessionRecordsPage-C6U5YGSt.js → SessionRecordsPage-CFAgM65g.js} +1 -1
- package/dist/web/assets/SettingsPage-CsJxhhsu.js +1 -0
- package/dist/web/assets/SettingsPage-VX_e4ty2.css +1 -0
- package/dist/web/assets/SharedJefaReportPage-DbTPYwa_.js +1 -0
- package/dist/web/assets/StatementCalendarPage-CIo5R14R.js +1 -0
- package/dist/web/assets/StatementCalendarPage-t8pJI4G6.css +1 -0
- package/dist/web/assets/StatementRows-CubaC9KG.js +1 -0
- package/dist/web/assets/StatementRows-TQ2i_uXU.css +1 -0
- package/dist/web/assets/{TagVocabularyPage-Brpr-Q-y.js → TagVocabularyPage-BVlLmKv2.js} +1 -1
- package/dist/web/assets/TaskBlockerNotice-YSvmy6B4.js +1 -0
- package/dist/web/assets/{TaskReason-RKKs4Kb5.js → TaskReason-CrLPeiOg.js} +1 -1
- package/dist/web/assets/{TeamCard-8hjo1h0x.js → TeamCard-SBMJMd7P.js} +1 -1
- package/dist/web/assets/TeamCardsWidget-CGLW04TH.js +1 -0
- package/dist/web/assets/TeamIsland-jJKTwCJD.js +9 -0
- package/dist/web/assets/Teleport-CRjWb-eC.js +1 -0
- package/dist/web/assets/{TextField-G2fJ4aFQ.js → TextField-Cd8UOHKv.js} +1 -1
- package/dist/web/assets/TodayPage-BvbZCEFJ.js +1 -0
- package/dist/web/assets/TodayPage-EJ8SWFE0.css +1 -0
- package/dist/web/assets/TonborgDelegationSwitch-BFb1JkWe.css +1 -0
- package/dist/web/assets/TonborgDelegationSwitch-BOidSjkk.js +1 -0
- package/dist/web/assets/{UiChip-BHEJVA6L.js → UiChip-B2z0UERX.js} +1 -1
- package/dist/web/assets/{UiDisclosure-B1pd8qXW.js → UiDisclosure-Bw4Wu0Dm.js} +1 -1
- package/dist/web/assets/{UiIcon-K7OhYTSy.js → UiIcon-BuaIQ57Z.js} +1 -1
- package/dist/web/assets/UiSegmented-DlI1vR3k.js +1 -0
- package/dist/web/assets/{UiWeight-eAw682rH.js → UiWeight-DpBexUUy.js} +1 -1
- package/dist/web/assets/{VirtualDirectoryList-BGum1GZc.js → VirtualDirectoryList-RV2XtTPO.js} +1 -1
- package/dist/web/assets/{VisuallyHidden-Ck6D7rq-.js → VisuallyHidden-DciDIEua.js} +1 -1
- package/dist/web/assets/{VisuallyHiddenInput-DXWhIUlB.js → VisuallyHiddenInput-mfi7gVBu.js} +1 -1
- package/dist/web/assets/WidgetSlot-xFZKjZ5z.js +2 -0
- package/dist/web/assets/WorkbenchListPage-BKT03RRO.css +1 -0
- package/dist/web/assets/WorkbenchListPage-suawrzji.js +1 -0
- package/dist/web/assets/_plugin-vue_export-helper-CYsAcErn.js +9 -0
- package/dist/web/assets/{agent-apps-D0eG1aMx.js → agent-apps-B_0syRPr.js} +1 -1
- package/dist/web/assets/agent-occupation-C-9THmIG.js +1 -0
- package/dist/web/assets/{agent-pins-OYjJQ38F.js → agent-pins-B9wMvxGh.js} +1 -1
- package/dist/web/assets/{agent-roster-records-CsYjmaNn.js → agent-roster-records-CY0aSUNq.js} +1 -1
- package/dist/web/assets/{agent-work-summary-BOeJ4JXc.js → agent-work-summary-Cs8jPFL0.js} +1 -1
- package/dist/web/assets/{attach-closest-edge-C75rKXiz.js → attach-closest-edge-BRDsvYPn.js} +1 -1
- package/dist/web/assets/{attention-store-k4mPCefZ.js → attention-store-HMiJ1K6M.js} +1 -1
- package/dist/web/assets/{badge-B2rll-68.js → badge-jafr8Jg1.js} +1 -1
- package/dist/web/assets/{button-q6JhonlL.js → button-d6TCVE0s.js} +1 -1
- package/dist/web/assets/{card-CPQiMHSu.js → card-ebnaJXQA.js} +1 -1
- package/dist/web/assets/{catalog-CBPcEkXC.js → catalog-CvdvPGYk.js} +1 -1
- package/dist/web/assets/checkbox-CdIozFRY.js +1 -0
- package/dist/web/assets/{client-KFFphxpK.js → client--hZxcKYo.js} +1 -1
- package/dist/web/assets/{client-links-store-Cw9c8MWc.js → client-links-store-XyR0EzJi.js} +1 -1
- package/dist/web/assets/combobox-DzLSYxyO.js +1 -0
- package/dist/web/assets/{console-BCR2S3AF.js → console-D597wx3f.js} +1 -1
- package/dist/web/assets/conversation-launcher-settings-CFFH9C2y.js +1 -0
- package/dist/web/assets/copy-mention-CWsw8po1.js +1 -0
- package/dist/web/assets/dialog-SLa8cPbS.js +1 -0
- package/dist/web/assets/{dist-CaVgk2QB.js → dist-B78L06NL.js} +1 -1
- package/dist/web/assets/{dist-D73EXNtz.js → dist-Dy5JoHWF.js} +1 -1
- package/dist/web/assets/dropdown-menu-C-PcZxRY.js +1 -0
- package/dist/web/assets/{field-BaUOZtN5.js → field-DeguT8it.js} +1 -1
- package/dist/web/assets/{format-bytes-D5eCtdg1.js → format-bytes-Br4RwHnA.js} +1 -1
- package/dist/web/assets/hover-card-B-H7mMvg.js +1 -0
- package/dist/web/assets/identity-V8oA_IuB.js +1 -0
- package/dist/web/assets/{index-HRZACEmh.css → index-CHDkJLQR.css} +1 -1
- package/dist/web/assets/index-DdAVEwQV.js +24 -0
- package/dist/web/assets/{input-Dxh25T4M.js → input-CRCpCN_c.js} +1 -1
- package/dist/web/assets/label-DwMBzI2m.js +1 -0
- package/dist/web/assets/label-table-DiaZlHIp.js +1 -0
- package/dist/web/assets/{model-ZwOxwk2m.js → model-B4AuKvPj.js} +1 -1
- package/dist/web/assets/model-BwOv-HBS.js +1 -0
- package/dist/web/assets/{model-Blk5Wgg2.js → model-C-60EMcI.js} +1 -1
- package/dist/web/assets/{model-Bgh75q3j.js → model-CB4ObIOH.js} +1 -1
- package/dist/web/assets/{model--lR9icA_.js → model-CUAxIOXR.js} +1 -1
- package/dist/web/assets/{model-jC3F-J2F.js → model-CjQPAeCy.js} +1 -1
- package/dist/web/assets/{model-D4DkvMH-.js → model-CwFZ_IgV.js} +1 -1
- package/dist/web/assets/{model-CWMP5GOL.js → model-D-vak-m0.js} +1 -1
- package/dist/web/assets/{motion-BL3lek9c.js → motion-Cr9JChF9.js} +1 -1
- package/dist/web/assets/motion-D5Fs3-ut.js +1 -0
- package/dist/web/assets/{motion-preference-D3UMHojT.js → motion-preference-DgdzdVh8.js} +1 -1
- package/dist/web/assets/{occupation-catalog-BeJ2O9nm.js → occupation-catalog-DHsjkd_q.js} +1 -1
- package/dist/web/assets/{occupation-kits-Bkiu6MzD.js → occupation-kits-BVLLRN4V.js} +1 -1
- package/dist/web/assets/{option-Crs2MA88.js → option-DhAwzags.js} +1 -1
- package/dist/web/assets/{orchestration-filters-3AfjDoHQ.js → orchestration-filters-lhR2CHlQ.js} +1 -1
- package/dist/web/assets/overview-data-QDnygL-x.js +1 -0
- package/dist/web/assets/{page-refresh-Bz5r7A_Q.js → page-refresh-BVRlo-dI.js} +1 -1
- package/dist/web/assets/{page-title-KYZApNys.js → page-title-ReSXziuS.js} +1 -1
- package/dist/web/assets/{person-profile-mhLxWtq7.js → person-profile-BgUfg57K.js} +1 -1
- package/dist/web/assets/popover-UYksnAeH.js +1 -0
- package/dist/web/assets/popup-host-DMoMkD3v.js +1 -0
- package/dist/web/assets/preference-conflicts-a-H51vUw.js +1 -0
- package/dist/web/assets/{profile-model-DWutKuCZ.js → profile-model-CM98TJsj.js} +1 -1
- package/dist/web/assets/{project-board-layout-CWMHQuUA.js → project-board-layout-RH6UXkCA.js} +1 -1
- package/dist/web/assets/{project-capture-CebFSnn0.js → project-capture-DcQ8cXIt.js} +1 -1
- package/dist/web/assets/{project-origin-BnUVE0be.js → project-origin-BNzeAazi.js} +1 -1
- package/dist/web/assets/{quick-edit-api-YwzoODMc.js → quick-edit-api-COKVNuPk.js} +1 -1
- package/dist/web/assets/radio-group-DfegNkLG.js +1 -0
- package/dist/web/assets/review-api-CAKGInLD.js +1 -0
- package/dist/web/assets/{review-list-_PN7ljSY.js → review-list-CbpXvBp-.js} +1 -1
- package/dist/web/assets/{review-store-CobX9No6.js → review-store-BzrmqVoj.js} +1 -1
- package/dist/web/assets/{role-names-wD9l8uz5.js → role-names-Ba0c6AbS.js} +1 -1
- package/dist/web/assets/{roundtable-live-Dm4Vwo75.js → roundtable-live-CoKmaXKd.js} +1 -1
- package/dist/web/assets/{runtime-dom.esm-bundler-DzfwnSj8.js → runtime-dom.esm-bundler-CaYBCU9Y.js} +1 -1
- package/dist/web/assets/select-Bq2TQ0Gw.js +1 -0
- package/dist/web/assets/{session-launch-offers-C9UkoKUJ.js → session-launch-offers-C-oBkMKe.js} +1 -1
- package/dist/web/assets/{settings-autosave-L0zSXnBO.js → settings-autosave-C3bTildI.js} +1 -1
- package/dist/web/assets/settings-tabs-DFZcxOaQ.js +1 -0
- package/dist/web/assets/shared-report-Ci1jBiYV.js +3 -0
- package/dist/web/assets/{source-adapters-r-NIqO77.js → source-adapters-CunVF9JG.js} +1 -1
- package/dist/web/assets/switch-DaUSEDq0.js +1 -0
- package/dist/web/assets/tabs-B_7xQRfl.js +1 -0
- package/dist/web/assets/{task-card-fields-B1z1PmTT.js → task-card-fields-Ce11pWnv.js} +1 -1
- package/dist/web/assets/{task-evidence-DydhKn9x.js → task-evidence-D0XkNnb8.js} +1 -1
- package/dist/web/assets/{task-labels-DTc5OuFF.js → task-labels-BulIuDQB.js} +1 -1
- package/dist/web/assets/{task-reason-CneTZWRv.js → task-reason-gHlp8KHO.js} +1 -1
- package/dist/web/assets/{team-sheets-CUt3Vp2s.js → team-sheets-BzV1WjjK.js} +1 -1
- package/dist/web/assets/{textarea-DJ0ucCir.js → textarea-D6czUY3a.js} +1 -1
- package/dist/web/assets/ui-BCHzwL4X.js +1 -0
- package/dist/web/assets/ui-CgwSWg1F.css +1 -0
- package/dist/web/assets/{useAgentRecords-CwkwZy8H.js → useAgentRecords-DijrJ79w.js} +1 -1
- package/dist/web/assets/{useAgentWorkSummary-DoiCqME7.js → useAgentWorkSummary-CUv88AVP.js} +1 -1
- package/dist/web/assets/{useApi-CROJJdhE-CenjhnR5.js → useApi-CROJJdhE-CxqsMZ6P.js} +1 -1
- package/dist/web/assets/{useClipboardCopy-Ba86PzjA.js → useClipboardCopy-uGyNKuWB.js} +1 -1
- package/dist/web/assets/useDirection-Bi78LycK.js +1 -0
- package/dist/web/assets/{useFocusReturn-B0ErBkt_.js → useFocusReturn-7BKdKvqF.js} +1 -1
- package/dist/web/assets/{useForwardPropsEmits-D1vvIUcB.js → useForwardPropsEmits-BMeknK03.js} +1 -1
- package/dist/web/assets/useForwardScopeId-DHGSyWlZ.js +1 -0
- package/dist/web/assets/{useKnowledgeConfirm-781LUhoU.js → useKnowledgeConfirm-mFWI8EbK.js} +1 -1
- package/dist/web/assets/{useKnowledgeItemPeek-CnuCvJKQ.js → useKnowledgeItemPeek-DtazLM2s.js} +1 -1
- package/dist/web/assets/{useMinimumLoadingDisplay-DCC9EfQ9.js → useMinimumLoadingDisplay-D5UC2KRz.js} +1 -1
- package/dist/web/assets/{usePageTools-BaB021q0.js → usePageTools-BXkR_gpB.js} +1 -1
- package/dist/web/assets/usePrimitiveElement-BxOn-Fn_.js +1 -0
- package/dist/web/assets/{useProjectAgentRoster-M3wbWpS-.js → useProjectAgentRoster-blZ5REnH.js} +1 -1
- package/dist/web/assets/{useRoutePeek-CYg5JyYt.js → useRoutePeek-D_j5KVFv.js} +1 -1
- package/dist/web/assets/useTeamWork-e57CKhLW.js +1 -0
- package/dist/web/assets/{useTypeahead-DYb5kVkH.js → useTypeahead-6a1q-4Oq.js} +1 -1
- package/dist/web/assets/{utils-Cli0RsEd.js → utils-BQtZ8ZUw.js} +1 -1
- package/dist/web/assets/{utils-B7sUn8rD.js → utils-DBsOpQt4.js} +1 -1
- package/dist/web/assets/{verification-DY7kllTI.js → verification-BlF0avgs.js} +1 -1
- package/dist/web/assets/{version-CBgUEmnM.js → version-oG6VyAd6.js} +1 -1
- package/dist/web/assets/{vue-router-ab7kABlJ.js → vue-router-CCvxNose.js} +1 -1
- package/dist/web/index.html +75 -79
- package/docs/agent-roundtable.md +45 -3
- package/docs/judgment-and-autonomy.md +2 -0
- package/graph-provider/fuli_graph/app.py +6 -0
- package/graph-provider/fuli_graph/knowledge_duplicates.py +27 -14
- package/graph-provider/fuli_graph/knowledge_search.py +31 -32
- package/graph-provider/fuli_graph/knowledge_semantic.py +38 -11
- package/graph-provider/fuli_graph/knowledge_statement.py +230 -0
- package/graph-provider/fuli_graph/knowledge_statement_days.py +109 -0
- package/graph-provider/fuli_graph/models.py +15 -0
- package/graph-provider/fuli_graph/preference_organizing.py +162 -0
- package/graph-provider/fuli_graph/project_agent_routes.py +22 -0
- package/graph-provider/fuli_graph/project_agent_task_models.py +26 -2
- 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_tasks.py +18 -1
- package/graph-provider/fuli_graph/task_blocker.py +10 -0
- 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 -3
- 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 +1 -0
- package/packages/roundtable/src/host.js +4 -1
- package/packages/roundtable/src/peer/control-cli.js +103 -2
- package/packages/roundtable/src/peer/control.js +29 -3
- package/packages/roundtable/src/peer/coordinator-http.js +23 -2
- package/packages/roundtable/src/peer/coordinator-service.js +92 -14
- package/packages/roundtable/src/peer/coordinator-store.js +2 -1
- package/packages/roundtable/src/peer/lan-addresses.js +43 -0
- package/packages/roundtable/src/peer/nearby-attempts.js +73 -0
- package/packages/roundtable/src/peer/nearby-discovery.js +132 -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/pairing-share.js +139 -0
- package/packages/roundtable/src/peer/peer-runtime.js +684 -89
- 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/service.js +10 -2
- package/packages/roundtable/src/roundtable/store.js +11 -1
- package/packages/roundtable/src/roundtable/wake.js +3 -1
- package/packages/roundtable/src/standalone/cli.js +1 -1
- package/skills/capturing-session-knowledge/SKILL.md +1 -1
- package/skills/capturing-session-knowledge/references/coordination.md +28 -4
- package/skills/grilling-project/references/project-profile.md +13 -5
- package/skills/operating-fuli/SKILL.md +30 -5
- package/skills/operating-fuli/references/workflow-recipes.md +6 -2
- package/src/agent-apps/host-tools/catalog.js +2 -0
- package/src/agent-delegation/operation-log.js +15 -1
- package/src/agent-delegation/port.js +2 -3
- package/src/agent-delegation/refusals.js +12 -4
- package/src/agent-roundtable/task-context.js +1 -1
- package/src/agent-roundtable/tools.js +5 -2
- package/src/agent-tools/graph-definitions.js +2 -0
- package/src/agent-tools/graph-handlers.js +6 -3
- package/src/agent-tools/interface-catalog.js +11 -1
- package/src/agent-tools/interface-definitions.js +3 -2
- package/src/agent-tools/project-agent-definitions.js +2 -1
- package/src/agent-tools/project-organizing-definitions.js +7 -4
- package/src/agent-tools/project-space-definitions.js +2 -0
- package/src/agent-tools/session-fuli-gate.js +6 -1
- package/src/agent-tools/statement-definitions.js +18 -0
- package/src/agents/codex/lifecycle-hook.js +3 -1
- package/src/agents/identity-receipt.js +3 -1
- package/src/agents/native-session-env.js +7 -0
- package/src/conversations/entry-budget.js +3 -2
- package/src/conversations/entry-inline-budget.js +40 -10
- package/src/conversations/preference-lifecycle.js +3 -3
- package/src/conversations/turn-findings.js +9 -2
- package/src/graphiti/agent-project-resolution.js +18 -0
- package/src/graphiti/collaboration-preference-entry.js +5 -2
- package/src/graphiti/current-project-knowledge-search.js +3 -3
- package/src/graphiti/fla-mention.js +48 -9
- package/src/graphiti/local-runtimes.js +5 -0
- package/src/graphiti/project-agent-task-sessions.js +49 -0
- package/src/graphiti/project-agent-task-summaries.js +82 -0
- package/src/graphiti/project-agent-workflows.js +8 -5
- package/src/graphiti/project-path-context.js +23 -9
- package/src/graphiti/provider-client.js +23 -1
- package/src/graphiti/repository-remote.js +34 -8
- package/src/graphiti/roundtable-host.js +13 -1
- package/src/graphiti/task-context-entry.js +14 -7
- package/src/graphiti/task-entry-group-discussion.js +111 -25
- package/src/graphiti/task-entry-owner-change.js +22 -2
- package/src/graphiti/task-entry-preferences.js +9 -4
- package/src/graphiti/task-entry-project-scope.js +19 -0
- package/src/graphiti/task-preference-pages.js +3 -3
- package/src/graphiti/task-preference-reader.js +44 -9
- package/src/graphiti/worker-task-context.js +1 -1
- package/src/http/api-router.js +5 -0
- package/src/http/graph-api-router.js +5 -2
- package/src/http/statement-api-router.js +27 -0
- package/src/http/task-blocker-api-router.js +11 -1
- package/src/http/task-close-api-router.js +59 -0
- package/src/judgment/engine.js +6 -1
- package/src/judgment/http.js +2 -2
- package/src/judgment/review-delegation.js +16 -4
- package/src/judgment/review-egress.js +25 -0
- package/src/judgment/service.js +1 -1
- package/src/judgment/store.js +9 -0
- package/src/knowledge-impressions/store.js +72 -9
- package/src/mcp/create-mcp-server.js +2 -2
- package/src/mcp/direct-call.js +3 -2
- package/src/mcp/preference-delivery.js +64 -6
- package/src/mcp/session-id.js +12 -4
- package/src/mcp/tool-annotations.js +1 -0
- package/src/mcp/tool-result.js +8 -6
- package/src/model-backends/config.js +7 -0
- package/src/model-backends/egress.js +8 -0
- package/src/model-backends/failures.js +8 -0
- package/src/model-backends/port.js +39 -16
- package/src/model-backends/role-trust.js +3 -9
- package/src/model-backends/usage-ledger.js +20 -9
- package/src/notices/recent-notices.js +2 -1
- package/src/presence/windows-helper-pin.js +1 -1
- package/src/project-organizing/agent-tool.js +34 -7
- package/src/server.js +7 -0
- package/src/statement/agent-tool.js +29 -0
- package/src/statement/compounding-statement.js +134 -0
- 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.1.json +13 -0
- package/src/whats-new/lines/0.27.2.json +13 -0
- package/dist/web/assets/AgentAppsPage-CjyvPZSs.js +0 -1
- package/dist/web/assets/AgentManagement-Cc00RLSO.css +0 -1
- package/dist/web/assets/AgentManagement-MMGrwdD2.js +0 -7
- package/dist/web/assets/AgentProfilePage-eDKbJJwY.js +0 -5
- package/dist/web/assets/AgentServicesPage-CZwsN5U2.js +0 -1
- package/dist/web/assets/Breadcrumb-BXTA4e-W.js +0 -1
- package/dist/web/assets/DataFormatPage-CQKkFhcH.js +0 -2
- package/dist/web/assets/DebugTurnPage-CUqbuhgX.js +0 -1
- package/dist/web/assets/DebugTurnsPage-HwaTG8Fa.js +0 -1
- package/dist/web/assets/DialogTitle-HYzAHbGg.js +0 -1
- package/dist/web/assets/EmployeeScopeDialog-yUCgujKT.js +0 -1
- package/dist/web/assets/EmployeeWorkbench-CbRJhkJO.js +0 -4
- package/dist/web/assets/FieldRoot-BLcsuPMA.js +0 -1
- package/dist/web/assets/FlasPage-CMv2awKJ.js +0 -1
- package/dist/web/assets/HowtoPage-CkGRrKpf.js +0 -1
- package/dist/web/assets/InboxPage-DfQvtnyq.js +0 -6
- package/dist/web/assets/KnowledgeItemEditPage-BUKQK37o.js +0 -1
- package/dist/web/assets/KnowledgeOrganizerPage-CiZ9JlNX.js +0 -1
- package/dist/web/assets/KnowledgePage-C3_Cvz4g.js +0 -1
- package/dist/web/assets/KnowledgePeek-DtOOiARX.js +0 -1
- package/dist/web/assets/KnowledgeTurnReceiptPage-Dne5NQ9q.js +0 -1
- package/dist/web/assets/KnowledgeWorkspace-Cq_XYcma.js +0 -4
- package/dist/web/assets/MenuSeparator-CLmsZ9rj.js +0 -1
- package/dist/web/assets/ModelSettingsPage-COVaW4eh.js +0 -1
- package/dist/web/assets/NoticeRow-D5MWTeBY.js +0 -1
- package/dist/web/assets/NoticeRow-ktVO_9Es.css +0 -1
- package/dist/web/assets/OccupationsPage-BKd051j1.js +0 -1
- package/dist/web/assets/OverviewPage-C90G_adj.js +0 -1
- package/dist/web/assets/OverviewPage-KVt4LcE-.css +0 -1
- package/dist/web/assets/PageColumns-DEideeB7.css +0 -1
- package/dist/web/assets/PageColumns-Df60nEzj.js +0 -1
- package/dist/web/assets/PersonalProfilePage-DIDgG3NH.js +0 -1
- package/dist/web/assets/PersonalProjectsPage-DwhlEpNg.js +0 -1
- package/dist/web/assets/PopperContent-DWCMeKSL.js +0 -1
- package/dist/web/assets/Presence-Ba3jqPYx.js +0 -3
- package/dist/web/assets/ProjectAgentsPage-BefVF9ZP.js +0 -5
- package/dist/web/assets/RecentNotices-CDHGIky1.js +0 -1
- package/dist/web/assets/RovingFocusGroup-DoGybG5V.js +0 -1
- package/dist/web/assets/RovingFocusItem-B455TzUI.js +0 -1
- package/dist/web/assets/SessionMigrationPage-BAzXqxxO.js +0 -1
- package/dist/web/assets/SettingsPage-7mNL3bwe.js +0 -1
- package/dist/web/assets/SettingsPage-Cku8SoLk.css +0 -1
- package/dist/web/assets/SharedJefaReportPage-rH6I4cI9.js +0 -1
- package/dist/web/assets/TaskBlockerClear-BBmPbomO.css +0 -1
- package/dist/web/assets/TaskBlockerClear-BHOMZYwm.js +0 -1
- package/dist/web/assets/TaskBlockerNotice-POmS2neR.js +0 -1
- package/dist/web/assets/TeamCardsWidget-DIHFUDrF.js +0 -1
- package/dist/web/assets/TeamIsland-DdhEcVOZ.js +0 -9
- package/dist/web/assets/Teleport-CukHuRhz.js +0 -1
- package/dist/web/assets/TonborgDelegationSwitch-BA3Qb8Wr.js +0 -1
- package/dist/web/assets/TonborgDelegationSwitch-DeqERWoo.css +0 -1
- package/dist/web/assets/UiDialog-bUwGQz96.js +0 -1
- package/dist/web/assets/UiIconButton-D3R6WwwI.css +0 -1
- package/dist/web/assets/UiIconButton-DlLZ5_Yc.js +0 -1
- package/dist/web/assets/UiSegmented-CYrTxDn1.js +0 -1
- package/dist/web/assets/WidgetSlot-D6vCSWaz.js +0 -2
- package/dist/web/assets/WorkbenchListHead-CR_fDYYr.js +0 -1
- package/dist/web/assets/WorkbenchListPage-BX6Z9gkB.css +0 -1
- package/dist/web/assets/WorkbenchListPage-Zr5PW-cf.js +0 -1
- package/dist/web/assets/_plugin-vue_export-helper-BRS32yXs.js +0 -9
- package/dist/web/assets/agent-occupation-CEd3bAhb.js +0 -1
- package/dist/web/assets/agent-workflows-D3VeY6Yz.js +0 -1
- package/dist/web/assets/checkbox-C67upxzl.js +0 -1
- package/dist/web/assets/combobox-yHRJ-zN-.js +0 -1
- package/dist/web/assets/conversation-launcher-settings-28CqC1Gn.js +0 -1
- package/dist/web/assets/copy-mention-C4Nos381.js +0 -1
- package/dist/web/assets/dialog-Cjoy4nsv.js +0 -1
- package/dist/web/assets/dropdown-menu-Dto6hjoc.js +0 -1
- package/dist/web/assets/hover-card-Bg0dulGq.js +0 -1
- package/dist/web/assets/index-B-aRUs9w.js +0 -24
- package/dist/web/assets/label-CbrduZla.js +0 -1
- package/dist/web/assets/label-table-_YAtPkRI.js +0 -1
- package/dist/web/assets/model-DcsCYhXk.js +0 -1
- package/dist/web/assets/motion-_MepnmMC.js +0 -1
- package/dist/web/assets/overview-data-BIeNATEJ.js +0 -1
- package/dist/web/assets/popover-CMahoDLo.js +0 -1
- package/dist/web/assets/popup-host-DKN99Od3.js +0 -1
- package/dist/web/assets/radio-group-vRt8y8mF.js +0 -1
- package/dist/web/assets/review-api-WhNB3ppo.js +0 -1
- package/dist/web/assets/select-B9mVptgx.js +0 -1
- package/dist/web/assets/settings-tabs-DTbgqX8g.js +0 -1
- package/dist/web/assets/shared-report-0FO_y0sa.js +0 -3
- package/dist/web/assets/switch-BCzrGc4W.js +0 -1
- package/dist/web/assets/tabs-CB38D8N0.js +0 -1
- package/dist/web/assets/ui-D4nAhcmu.css +0 -1
- package/dist/web/assets/ui-M_UKzb_A.js +0 -1
- package/dist/web/assets/useForwardExpose-DJ6fcpI2.js +0 -1
- package/dist/web/assets/useForwardScopeId-CoSQtoUU.js +0 -1
- package/dist/web/assets/usePrimitiveElement-iRKqOVuY.js +0 -1
- package/dist/web/assets/useTeamPeople-CPC62La3.js +0 -1
- package/dist/web/assets/useTeamWork-Dql3_qLV.js +0 -1
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"""The person's current preferences, read for an AI that tidies them with the
|
|
2
|
+
person (rec#121): a page of them, compact, and on the first page the copies
|
|
3
|
+
the duplicate pair rules (knowledge_duplicate_rules, through
|
|
4
|
+
knowledge_duplicates.duplicate_pairs) call one. Preferences are never merged
|
|
5
|
+
automatically (their own conflict review), so here a duplicate is only a
|
|
6
|
+
proposal: the AI asks the person and applies a yes with the existing
|
|
7
|
+
knowledge tools. Copies are compared within one aspect and one scope, and a
|
|
8
|
+
relationship also within one relation type and the same two endpoints, as the
|
|
9
|
+
periodic merge compares them; a preference repeated across projects is the
|
|
10
|
+
global-candidate check's (personal_global_preferences). Read only, and as an
|
|
11
|
+
Agent reads: another FLA's own preferences stay hidden (knowledge_visibility).
|
|
12
|
+
"""
|
|
13
|
+
from typing import Literal
|
|
14
|
+
|
|
15
|
+
from fastapi import HTTPException
|
|
16
|
+
from pydantic import Field
|
|
17
|
+
|
|
18
|
+
from .knowledge_audit_models import KnowledgeItemKind
|
|
19
|
+
from .knowledge_duplicates import duplicate_item_fields, duplicate_pairs
|
|
20
|
+
from .knowledge_semantic import item_text
|
|
21
|
+
from .knowledge_visibility import fla_relationship_visible_cypher, fla_visible_cypher, knowledge_reader, \
|
|
22
|
+
reader_parameter
|
|
23
|
+
from .model_base import StrictModel
|
|
24
|
+
|
|
25
|
+
# A preference is one sentence or two; a longer text is cut, its id reads the rest.
|
|
26
|
+
TEXT_CHARS = 300
|
|
27
|
+
MAX_DUPLICATE_GROUPS = 100
|
|
28
|
+
|
|
29
|
+
_PLACE = '''item.fuli_profile_aspect AS aspect, coalesce(item.fuli_preference_scope, 'global') AS scope,
|
|
30
|
+
item.fuli_preference_project_id AS project_id, coalesce(item.fuli_preference_project_ids, []) AS project_ids,
|
|
31
|
+
item.fuli_preference_agent_id AS agent_id'''
|
|
32
|
+
_SCANS = {
|
|
33
|
+
'entity': f'''
|
|
34
|
+
MATCH (item:Entity {{group_id: $group_id}})
|
|
35
|
+
WHERE item.fuli_invalid_at IS NULL AND item.fuli_profile_aspect IS NOT NULL
|
|
36
|
+
AND {fla_visible_cypher('item', 'entity')}
|
|
37
|
+
OPTIONAL MATCH (episode:Episodic {{group_id: $group_id}})-[:MENTIONS]->(item)
|
|
38
|
+
WITH item, max(episode.created_at) AS said_at
|
|
39
|
+
RETURN item {duplicate_item_fields('item', 'said_at')} AS item, {_PLACE}''',
|
|
40
|
+
# Retired ones too: their endpoints are preference subjects all the same.
|
|
41
|
+
'relationship': f'''
|
|
42
|
+
MATCH (source:Entity {{group_id: $group_id}})-[item:RELATES_TO {{group_id: $group_id}}]->(target:Entity)
|
|
43
|
+
WHERE item.fuli_profile_aspect IS NOT NULL
|
|
44
|
+
AND {fla_relationship_visible_cypher('item', 'source', 'target')}
|
|
45
|
+
RETURN item {duplicate_item_fields('item')} AS item, item.invalid_at IS NULL AS current, item.name AS relation,
|
|
46
|
+
source.uuid AS source_id, target.uuid AS target_id, {_PLACE}''',
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class PreferenceOrganizingRead(StrictModel):
|
|
51
|
+
personal_space_id: str = Field(min_length=1, max_length=128)
|
|
52
|
+
offset: int = Field(default=0, ge=0)
|
|
53
|
+
limit: int = Field(default=50, ge=1, le=100)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class OrganizingPreference(StrictModel):
|
|
57
|
+
item_kind: KnowledgeItemKind
|
|
58
|
+
item_id: str
|
|
59
|
+
aspect: str
|
|
60
|
+
scope: str
|
|
61
|
+
project_id: str | None = None
|
|
62
|
+
status: str
|
|
63
|
+
text: str
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class DuplicateCopy(StrictModel):
|
|
67
|
+
item_id: str
|
|
68
|
+
rule: Literal['same_text', 'covers', 'same_meaning']
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class PreferenceDuplicateGroup(StrictModel):
|
|
72
|
+
item_kind: KnowledgeItemKind
|
|
73
|
+
keep: str
|
|
74
|
+
same: list[DuplicateCopy]
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class PreferenceOrganizingPage(StrictModel):
|
|
78
|
+
"""Empty fields are left out of the answer: no next_offset on the last
|
|
79
|
+
page, no duplicates after the first."""
|
|
80
|
+
total: int
|
|
81
|
+
pending: int
|
|
82
|
+
preferences: list[OrganizingPreference]
|
|
83
|
+
next_offset: int | None = None
|
|
84
|
+
duplicates: list[PreferenceDuplicateGroup] | None = None
|
|
85
|
+
duplicates_truncated: bool | None = None
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
async def read_preference_organizing(store, actor, request: PreferenceOrganizingRead) -> PreferenceOrganizingPage:
|
|
89
|
+
store._require_personal()
|
|
90
|
+
space = await store.authorize(actor, request.personal_space_id, 'reader')
|
|
91
|
+
if space['kind'] != 'personal':
|
|
92
|
+
raise HTTPException(status_code=422, detail='preference organising is personal-only')
|
|
93
|
+
reader = await knowledge_reader(store, actor, space, personal_project_id=None, project_agent_id=None)
|
|
94
|
+
scanned = {}
|
|
95
|
+
for item_kind, scan in _SCANS.items():
|
|
96
|
+
records, _, _ = await store.runtime.driver.execute_query(
|
|
97
|
+
'// preference organising: scan\n' + scan, group_id=space['group_id'],
|
|
98
|
+
reader=reader_parameter(reader), routing_='r')
|
|
99
|
+
scanned[item_kind] = [dict(record) for record in records]
|
|
100
|
+
# As the console lists them: an entity a preference relationship this reader
|
|
101
|
+
# sees hangs on (current or retired) is that preference's subject, not one of its own.
|
|
102
|
+
subjects = {record[end] for record in scanned['relationship'] for end in ('source_id', 'target_id')}
|
|
103
|
+
current = {'entity': [record for record in scanned['entity'] if record['item']['item_id'] not in subjects],
|
|
104
|
+
'relationship': [record for record in scanned['relationship'] if record['current']]}
|
|
105
|
+
preferences = sorted((_preference(item_kind, record) for item_kind, records in current.items() for record in records),
|
|
106
|
+
key=lambda item: (item.scope != 'global', item.project_id or '', item.aspect, item.text))
|
|
107
|
+
end = request.offset + request.limit
|
|
108
|
+
page = PreferenceOrganizingPage(
|
|
109
|
+
total=len(preferences), pending=sum(item.status == 'pending' for item in preferences),
|
|
110
|
+
preferences=preferences[request.offset:end], next_offset=end if end < len(preferences) else None)
|
|
111
|
+
if request.offset:
|
|
112
|
+
return page
|
|
113
|
+
groups = []
|
|
114
|
+
for item_kind, records in current.items():
|
|
115
|
+
pairs = await duplicate_pairs(store, space, item_kind, [_comparable(item_kind, record) for record in records])
|
|
116
|
+
groups += _duplicate_groups(item_kind, pairs)
|
|
117
|
+
page.duplicates = groups[:MAX_DUPLICATE_GROUPS]
|
|
118
|
+
page.duplicates_truncated = len(groups) > MAX_DUPLICATE_GROUPS
|
|
119
|
+
return page
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def _duplicate_groups(item_kind: str, pairs) -> list[PreferenceDuplicateGroup]:
|
|
123
|
+
"""The pairs as groups around the copy that stays: a copy kept in one pair
|
|
124
|
+
and dropped in a later one joins the group of the copy that finally stays."""
|
|
125
|
+
kept_by = {merge.drop['item_id']: (merge.keep['item_id'], merge.rule) for merge in pairs}
|
|
126
|
+
|
|
127
|
+
def stays(item_id):
|
|
128
|
+
while item_id in kept_by:
|
|
129
|
+
item_id = kept_by[item_id][0]
|
|
130
|
+
return item_id
|
|
131
|
+
|
|
132
|
+
groups = {}
|
|
133
|
+
for drop_id, (_, rule) in kept_by.items():
|
|
134
|
+
groups.setdefault(stays(drop_id), []).append(DuplicateCopy(item_id=drop_id, rule=rule))
|
|
135
|
+
return [PreferenceDuplicateGroup(item_kind=item_kind, keep=keep, same=same) for keep, same in groups.items()]
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
def _comparable(item_kind: str, record: dict) -> dict:
|
|
139
|
+
"""Two preferences are compared only within one aspect and one scope; two
|
|
140
|
+
relationships also only with one relation type between the same two
|
|
141
|
+
entities, as the periodic merge compares them."""
|
|
142
|
+
place = [record['scope'], record['project_id'] or '', ','.join(sorted(record['project_ids'])), record['agent_id'] or '']
|
|
143
|
+
if item_kind == 'relationship':
|
|
144
|
+
return {'item': record['item'], 'kind_key': (record['aspect'], record['relation']),
|
|
145
|
+
'places': [[*place, record['source_id'], record['target_id']]]}
|
|
146
|
+
return {'item': record['item'], 'kind_key': record['aspect'], 'places': [place]}
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def _preference(item_kind: str, record: dict) -> OrganizingPreference:
|
|
150
|
+
item = record['item']
|
|
151
|
+
text = item_text(item_kind, item)
|
|
152
|
+
return OrganizingPreference(
|
|
153
|
+
item_kind=item_kind, item_id=item['item_id'], aspect=record['aspect'], scope=record['scope'],
|
|
154
|
+
project_id=record['project_id'], status=item['confirmation_status'],
|
|
155
|
+
text=text if len(text) <= TEXT_CHARS else text[:TEXT_CHARS - 1] + '…')
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def register_preference_organizing_routes(application, store, Actor) -> None:
|
|
159
|
+
@application.post('/v1/knowledge/preferences/organizing', response_model=PreferenceOrganizingPage,
|
|
160
|
+
response_model_exclude_none=True)
|
|
161
|
+
async def preference_organizing(request: PreferenceOrganizingRead, actor: Actor):
|
|
162
|
+
return await read_preference_organizing(store, actor, request)
|
|
@@ -56,6 +56,7 @@ from .project_agent_task_models import (
|
|
|
56
56
|
ProjectAgentTaskBlockerClear,
|
|
57
57
|
ProjectAgentTaskBlockerClearResult,
|
|
58
58
|
ProjectAgentTaskBlockerPersonClear,
|
|
59
|
+
ProjectAgentTaskPersonClose,
|
|
59
60
|
ProjectAgentTaskBlockerProgress,
|
|
60
61
|
ProjectAgentTaskBlockerProgressResult,
|
|
61
62
|
ProjectAgentTaskRecord,
|
|
@@ -291,7 +292,12 @@ def register_project_agent_routes(
|
|
|
291
292
|
] = None,
|
|
292
293
|
status: Annotated[str | None, Query()] = None,
|
|
293
294
|
limit: Annotated[int, Query(ge=1, le=200)] = 100,
|
|
295
|
+
# The last task a caller already listed: its updated_at and task_id.
|
|
296
|
+
after_updated_at: datetime | None = None,
|
|
297
|
+
after_task_id: Annotated[str | None, Query(min_length=1, max_length=128)] = None,
|
|
294
298
|
) -> list[ProjectAgentTaskRecord]:
|
|
299
|
+
if (after_updated_at is None) != (after_task_id is None):
|
|
300
|
+
raise HTTPException(422, 'after_updated_at and after_task_id go together')
|
|
295
301
|
return await store.list_project_agent_tasks(
|
|
296
302
|
actor,
|
|
297
303
|
personal_space_id,
|
|
@@ -299,6 +305,8 @@ def register_project_agent_routes(
|
|
|
299
305
|
agent_id=agent_id,
|
|
300
306
|
status=status,
|
|
301
307
|
limit=limit,
|
|
308
|
+
after_updated_at=after_updated_at,
|
|
309
|
+
after_task_id=after_task_id,
|
|
302
310
|
)
|
|
303
311
|
|
|
304
312
|
@application.get('/v1/project-agent-task-pages', response_model=ProjectAgentTaskPage)
|
|
@@ -422,6 +430,20 @@ def register_project_agent_routes(
|
|
|
422
430
|
notify_task_change(request.personal_space_id, task_id)
|
|
423
431
|
return task
|
|
424
432
|
|
|
433
|
+
@application.post(
|
|
434
|
+
'/v1/project-agent-tasks/{task_id}/close',
|
|
435
|
+
response_model=ProjectAgentTaskRecord,
|
|
436
|
+
)
|
|
437
|
+
async def close_task_by_person(
|
|
438
|
+
task_id: str,
|
|
439
|
+
request: ProjectAgentTaskPersonClose,
|
|
440
|
+
actor: HumanReviewer,
|
|
441
|
+
) -> ProjectAgentTaskRecord:
|
|
442
|
+
"""The person completes or cancels a task, or an FLA relaying their words; human-review channel only."""
|
|
443
|
+
task = await store.close_task_by_person(actor, task_id, request)
|
|
444
|
+
notify_task_change(request.personal_space_id, task_id)
|
|
445
|
+
return task
|
|
446
|
+
|
|
425
447
|
@application.get(
|
|
426
448
|
'/v1/project-agents/{agent_id}/activity',
|
|
427
449
|
response_model=ProjectAgentActivityResult,
|
|
@@ -498,13 +498,17 @@ class ProjectAgentTaskBlockerPersonClear(StrictModel):
|
|
|
498
498
|
confirm_hint: the person confirms the block FULI saw as probably resolved.
|
|
499
499
|
cleared_by 'agent' (with the FLA, its client and session when known): an
|
|
500
500
|
FLA made the clear for the person through run_delegated_action; note is
|
|
501
|
-
then its reason.
|
|
501
|
+
then its reason. resume_status: the task goes on running, or back to its
|
|
502
|
+
queue when the clearing Agent's report asks for queued (rec#123).
|
|
502
503
|
"""
|
|
503
504
|
|
|
504
505
|
personal_space_id: str = Field(min_length=1, max_length=128)
|
|
505
506
|
personal_project_id: str = Field(min_length=1, max_length=128)
|
|
506
507
|
note: str | None = Field(default=None, min_length=1, max_length=500)
|
|
507
508
|
confirm_hint: bool = False
|
|
509
|
+
resume_status: Literal['running', 'queued'] = 'running'
|
|
510
|
+
# The revision the clearer read; a task that changed since is not cleared.
|
|
511
|
+
expected_revision: int | None = Field(default=None, ge=0)
|
|
508
512
|
cleared_by: Literal['person', 'agent'] = 'person'
|
|
509
513
|
agent_id: str | None = Field(default=None, min_length=1, max_length=128)
|
|
510
514
|
source_application: SourceApplication | None = None
|
|
@@ -521,6 +525,24 @@ class ProjectAgentTaskBlockerPersonClear(StrictModel):
|
|
|
521
525
|
return self
|
|
522
526
|
|
|
523
527
|
|
|
528
|
+
class ProjectAgentTaskPersonClose(StrictModel):
|
|
529
|
+
"""The person completes or cancels a task themself (rec#123), on the human-review channel.
|
|
530
|
+
|
|
531
|
+
It is the person's acceptance, so it needs no participating Agent and no
|
|
532
|
+
verified artifact revision. relayed_by names the FLA that relayed the
|
|
533
|
+
person's words through run_delegated_action, with its client and session;
|
|
534
|
+
summary carries those words.
|
|
535
|
+
"""
|
|
536
|
+
|
|
537
|
+
personal_space_id: str = Field(min_length=1, max_length=128)
|
|
538
|
+
personal_project_id: str = Field(min_length=1, max_length=128)
|
|
539
|
+
status: Literal['completed', 'cancelled']
|
|
540
|
+
summary: str = Field(min_length=1, max_length=2000)
|
|
541
|
+
relayed_by: str | None = Field(default=None, min_length=1, max_length=128)
|
|
542
|
+
source_application: SourceApplication | None = None
|
|
543
|
+
source_session_id: str | None = Field(default=None, min_length=1, max_length=256)
|
|
544
|
+
|
|
545
|
+
|
|
524
546
|
class ProjectAgentTaskBlockerProgress(StrictModel):
|
|
525
547
|
"""An Agent's recorded work in a project, from one client session.
|
|
526
548
|
|
|
@@ -746,8 +768,10 @@ class ProjectAgentTaskActivityCreate(StrictModel):
|
|
|
746
768
|
@model_validator(mode='after')
|
|
747
769
|
def validate_actual_model(self):
|
|
748
770
|
if self.status in {'completed', 'failed'} and not self.agent_id:
|
|
771
|
+
# Never borrow a participant's ID to close for someone else (rec#123).
|
|
749
772
|
raise ValueError(
|
|
750
|
-
'completed or failed activity requires the participating Agent ID'
|
|
773
|
+
'completed or failed activity requires the participating Agent ID. '
|
|
774
|
+
'The person closing it? Relay their words via run_delegated_action, task close route'
|
|
751
775
|
)
|
|
752
776
|
if bool(self.actual_model_provider) != bool(self.actual_model):
|
|
753
777
|
raise ValueError('actual model provider and model must be reported together')
|
|
@@ -18,6 +18,38 @@ from .task_participant_running import running_since_set
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
TERMINAL_TASK_STATUSES = {"completed", "failed", "cancelled"}
|
|
21
|
+
# A revision named in a refusal; the whole message is cut at 240 characters.
|
|
22
|
+
_REVISION_SHOWN = 32
|
|
23
|
+
# rec#123 review: an Agent never writes the person's event; the person's own close is a relayed decision.
|
|
24
|
+
PERSON_EVENT_REFUSAL = ("actorKind human is the person's own event and is written only from the FULI console; "
|
|
25
|
+
'report as agent. If the person themself said the task is done or cancelled, relay '
|
|
26
|
+
'their words via run_delegated_action, task close route')
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _unverified_completion(raw_task: dict, artifact_revision: str | None) -> str | None:
|
|
30
|
+
"""Why an Agent cannot complete a verified task on its own account yet, or None.
|
|
31
|
+
|
|
32
|
+
Every task but a default_lead staffing record is verified before an Agent
|
|
33
|
+
completes it. FULI records no "has no artifact" fact, so a task without
|
|
34
|
+
files names what it delivered (a config digest, an evidence ID) as its
|
|
35
|
+
revision; exempting tasks on the reporter's word would exempt every task.
|
|
36
|
+
The person's own close is their acceptance and needs none (rec#123); only
|
|
37
|
+
the no-revision guidance names it, for when the person themself said so.
|
|
38
|
+
An Agent whose revision failed or differs is never pointed past verification.
|
|
39
|
+
"""
|
|
40
|
+
verified = raw_task.get('verified_artifact_revision')
|
|
41
|
+
if raw_task.get('quality_gate') == 'passed' and verified and verified == artifact_revision:
|
|
42
|
+
return None
|
|
43
|
+
if not artifact_revision:
|
|
44
|
+
return ('Pass the artifactRevision (commit, or digest/ID of what you delivered) that '
|
|
45
|
+
'record_agent_verification passed, else report awaiting_review. Person themself said it '
|
|
46
|
+
'is done? Relay their words via run_delegated_action, task close route.')
|
|
47
|
+
if raw_task.get('quality_gate') == 'passed' and verified:
|
|
48
|
+
return (f'Verification passed for revision {verified[:_REVISION_SHOWN]}, not '
|
|
49
|
+
f'{artifact_revision[:_REVISION_SHOWN]}: complete with that one or verify yours.')
|
|
50
|
+
return (f'Revision {artifact_revision[:_REVISION_SHOWN]} not verified (gate '
|
|
51
|
+
f"{raw_task.get('quality_gate') or 'not run'}): run record_agent_verification "
|
|
52
|
+
'or report awaiting_review.')
|
|
21
53
|
|
|
22
54
|
|
|
23
55
|
class StoreProjectAgentTaskActivity:
|
|
@@ -37,6 +69,10 @@ class StoreProjectAgentTaskActivity:
|
|
|
37
69
|
request: ProjectAgentTaskActivityCreate,
|
|
38
70
|
) -> ProjectAgentTaskRecord:
|
|
39
71
|
self._require_personal()
|
|
72
|
+
if request.actor_kind == 'human' and actor.get('_human_review_verified') is not True:
|
|
73
|
+
# A person's event (a completion counts as 人确认) comes only on the
|
|
74
|
+
# console's human-review channel, like every other human-only write.
|
|
75
|
+
raise HTTPException(403, PERSON_EVENT_REFUSAL)
|
|
40
76
|
space = await self.authorize(actor, request.personal_space_id, 'maintainer')
|
|
41
77
|
await authorize_personal_project(
|
|
42
78
|
self,
|
|
@@ -111,9 +147,9 @@ class StoreProjectAgentTaskActivity:
|
|
|
111
147
|
if request.worker_run_id and await self._worker_run_superseded(request):
|
|
112
148
|
return self._task_from_row(row)
|
|
113
149
|
if request.status == 'completed' and raw_task.get('verification_required'):
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
raise HTTPException(409,
|
|
150
|
+
refusal = _unverified_completion(raw_task, request.artifact_revision)
|
|
151
|
+
if refusal:
|
|
152
|
+
raise HTTPException(409, refusal)
|
|
117
153
|
if request.expected_verification_attempt_id is not None:
|
|
118
154
|
if (request.status != 'completed' or raw_task.get('quality_gate') != 'passed'
|
|
119
155
|
or raw_task.get('verified_attempt_id') != request.expected_verification_attempt_id
|
|
@@ -132,14 +168,6 @@ class StoreProjectAgentTaskActivity:
|
|
|
132
168
|
from_blocking_session = blocked_in_session(
|
|
133
169
|
blocker, request.source_application, request.source_session_id,
|
|
134
170
|
)
|
|
135
|
-
if not worker_only:
|
|
136
|
-
self._validate_task_transition(
|
|
137
|
-
raw_task.get('status'),
|
|
138
|
-
request.status,
|
|
139
|
-
has_actual_executor=bool(request.actual_executor_id),
|
|
140
|
-
from_blocking_session=from_blocking_session,
|
|
141
|
-
from_lead=bool(request.agent_id) and request.agent_id == raw_task.get('lead_agent_id'),
|
|
142
|
-
)
|
|
143
171
|
# A report from another session that moves a blocked task on is the
|
|
144
172
|
# Agent's word that the block is resolved; its event says so.
|
|
145
173
|
blocker_cleared_by = 'agent' if (
|
|
@@ -184,6 +212,18 @@ class StoreProjectAgentTaskActivity:
|
|
|
184
212
|
{'agent_id': request.agent_id, 'profile': profile},
|
|
185
213
|
application,
|
|
186
214
|
)
|
|
215
|
+
# The transition is checked last: a blocked task's refusal
|
|
216
|
+
# (task_blocked_elsewhere) then means every other check of this report
|
|
217
|
+
# passed, so the Agent tool may clear the block for the person and
|
|
218
|
+
# record it without the report failing after the clear (rec#123).
|
|
219
|
+
if not worker_only:
|
|
220
|
+
self._validate_task_transition(
|
|
221
|
+
raw_task.get('status'),
|
|
222
|
+
request.status,
|
|
223
|
+
has_actual_executor=bool(request.actual_executor_id),
|
|
224
|
+
from_blocking_session=from_blocking_session,
|
|
225
|
+
from_lead=bool(request.agent_id) and request.agent_id == raw_task.get('lead_agent_id'),
|
|
226
|
+
)
|
|
187
227
|
if request.status in TERMINAL_TASK_STATUSES:
|
|
188
228
|
await self.close_task_agent_loans(actor, request.personal_space_id, request.task_id)
|
|
189
229
|
now = now_utc()
|
|
@@ -99,6 +99,7 @@ class StoreProjectAgentTaskBlockers:
|
|
|
99
99
|
if not await self._clear_task_blocker(
|
|
100
100
|
request.personal_space_id, task_id, cause,
|
|
101
101
|
project_id=request.personal_project_id, note=request.note, clearer=clearer,
|
|
102
|
+
resume_status=request.resume_status, expected_revision=request.expected_revision,
|
|
102
103
|
):
|
|
103
104
|
raise HTTPException(409, 'the task is no longer blocked, or nothing says it is probably resolved; reload it')
|
|
104
105
|
return await self.get_project_agent_task(
|
|
@@ -158,9 +159,9 @@ class StoreProjectAgentTaskBlockers:
|
|
|
158
159
|
|
|
159
160
|
async def _clear_task_blocker(
|
|
160
161
|
self, space_id: str, task_id: str, cause: BlockerClearCause, *, session=None,
|
|
161
|
-
project_id=None, note=None, clearer=None,
|
|
162
|
+
project_id=None, note=None, clearer=None, resume_status='running', expected_revision=None,
|
|
162
163
|
) -> bool:
|
|
163
|
-
"""Move one blocked task to running. session, when given, must be the reporting one.
|
|
164
|
+
"""Move one blocked task to running (or queued). session, when given, must be the reporting one.
|
|
164
165
|
|
|
165
166
|
The person's own clear ('person') is a human event whose summary is
|
|
166
167
|
their note; their confirmation ('person_confirmed') needs the block's
|
|
@@ -174,6 +175,11 @@ class StoreProjectAgentTaskBlockers:
|
|
|
174
175
|
blocker = scoped._blocker_from_row(row) if row else None
|
|
175
176
|
if not blocker or (session and not blocked_in_session(blocker, *session)):
|
|
176
177
|
return False
|
|
178
|
+
current = int(dict(row['task']).get('revision') or 0)
|
|
179
|
+
if expected_revision is not None and expected_revision != current:
|
|
180
|
+
# Checked under the task lock: a block reported again since is not cleared.
|
|
181
|
+
raise HTTPException(409, f'task revision is stale: expected {expected_revision}, current '
|
|
182
|
+
f'{current}; nothing was cleared, read the task again')
|
|
177
183
|
hint = blocker.probably_resolved
|
|
178
184
|
if cause == 'person_confirmed' and not hint:
|
|
179
185
|
return False
|
|
@@ -194,24 +200,25 @@ class StoreProjectAgentTaskBlockers:
|
|
|
194
200
|
})
|
|
195
201
|
CREATE (event:FuliProjectAgentTaskEvent {
|
|
196
202
|
id: $event_id, event_id: $event_id, task_id: $task_id,
|
|
197
|
-
agent_id: $agent_id, status:
|
|
203
|
+
agent_id: $agent_id, status: $resume_status, actor_kind: $actor_kind,
|
|
198
204
|
summary: $summary, source_application: $application,
|
|
199
205
|
source_session_id: $session_id, blocker_cleared_by: $cause,
|
|
200
206
|
created_at: $updated_at
|
|
201
207
|
})
|
|
202
208
|
MERGE (task)-[:HAS_TASK_EVENT]->(event)
|
|
203
|
-
SET task.status =
|
|
209
|
+
SET task.status = $resume_status,
|
|
204
210
|
task.updated_at = $updated_at,
|
|
205
211
|
task.revision = coalesce(task.revision, 0) + 1
|
|
206
212
|
WITH task
|
|
207
213
|
OPTIONAL MATCH (task)-[participant:HAS_PARTICIPANT]->()
|
|
208
214
|
WHERE participant.status = 'blocked'
|
|
209
215
|
FOREACH (_ IN CASE WHEN participant IS NULL THEN [] ELSE [1] END |
|
|
210
|
-
SET ''' + running_since_set('participant',
|
|
211
|
-
participant.status =
|
|
216
|
+
SET ''' + running_since_set('participant', '$resume_status') + '''
|
|
217
|
+
participant.status = $resume_status,
|
|
212
218
|
participant.updated_at = $updated_at
|
|
213
219
|
)
|
|
214
220
|
''',
|
|
221
|
+
resume_status=resume_status,
|
|
215
222
|
space_id=space_id, task_id=task_id,
|
|
216
223
|
event_id=stable_uuid(
|
|
217
224
|
self.settings.provider_id, space_id, 'project-agent-task-blocker-clear',
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""The person completes or cancels a task themself (rec#123).
|
|
2
|
+
|
|
3
|
+
An Agent's own completion needs its participating Agent ID and, for a task
|
|
4
|
+
that is verified, the exact artifact revision a verifier passed. The person's
|
|
5
|
+
own close needs neither: it is their acceptance (FULI is human-authoritative).
|
|
6
|
+
It comes only on the console's human-review channel, from the person's click
|
|
7
|
+
or from an FLA relaying the person's words through run_delegated_action; the
|
|
8
|
+
event is the person's (actor_kind human) and names the relaying FLA, its
|
|
9
|
+
client and session. A blocked task's block ends with it.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from types import SimpleNamespace
|
|
13
|
+
|
|
14
|
+
from fastapi import HTTPException
|
|
15
|
+
|
|
16
|
+
from .project_agent_task_models import ProjectAgentTaskPersonClose, ProjectAgentTaskRecord
|
|
17
|
+
from .provider_values import now_utc, stable_uuid
|
|
18
|
+
from .store_project_agent_task_activity import TERMINAL_TASK_STATUSES
|
|
19
|
+
from .store_project_agent_task_blockers import STATUS_UPDATE_RESPONSE
|
|
20
|
+
from .store_transactions import query_store_transaction
|
|
21
|
+
from .task_participant_running import running_since_set
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class StoreProjectAgentTaskPersonClose:
|
|
25
|
+
async def close_task_by_person(
|
|
26
|
+
self, actor: dict, task_id: str, request: ProjectAgentTaskPersonClose,
|
|
27
|
+
) -> ProjectAgentTaskRecord:
|
|
28
|
+
self._require_personal()
|
|
29
|
+
if actor.get('_human_review_verified') is not True:
|
|
30
|
+
raise HTTPException(403, 'only the person closes a task this way, from the local console')
|
|
31
|
+
await self.authorize(actor, request.personal_space_id, 'maintainer')
|
|
32
|
+
async with query_store_transaction(self) as scoped:
|
|
33
|
+
await scoped._lock_task_activity(request.personal_space_id, task_id)
|
|
34
|
+
row = await scoped._find_task_row(request.personal_space_id, task_id, request.personal_project_id)
|
|
35
|
+
if not row:
|
|
36
|
+
raise HTTPException(404, 'project Agent task not found')
|
|
37
|
+
was = dict(row['task'])['status']
|
|
38
|
+
if was in TERMINAL_TASK_STATUSES:
|
|
39
|
+
raise HTTPException(409, f'the task is already {was}; reload it')
|
|
40
|
+
now = now_utc()
|
|
41
|
+
await scoped.runtime.driver.execute_query(
|
|
42
|
+
'''
|
|
43
|
+
MATCH (:FuliSpace {id: $space_id, kind: 'personal'})-[:HAS_PROJECT_AGENT_TASK]->
|
|
44
|
+
(task:FuliProjectAgentTask {personal_space_id: $space_id, task_id: $task_id})
|
|
45
|
+
CREATE (event:FuliProjectAgentTaskEvent {
|
|
46
|
+
id: $event_id, event_id: $event_id, task_id: $task_id,
|
|
47
|
+
agent_id: $relayed_by, status: $status, actor_kind: 'human',
|
|
48
|
+
summary: $summary, source_application: $application,
|
|
49
|
+
source_session_id: $session_id, blocker_cleared_by: $cleared_by,
|
|
50
|
+
created_at: $updated_at
|
|
51
|
+
})
|
|
52
|
+
MERGE (task)-[:HAS_TASK_EVENT]->(event)
|
|
53
|
+
SET task.status = $status,
|
|
54
|
+
task.result_summary = $summary,
|
|
55
|
+
task.completed_at = $updated_at,
|
|
56
|
+
task.updated_at = $updated_at,
|
|
57
|
+
task.revision = coalesce(task.revision, 0) + 1
|
|
58
|
+
WITH task
|
|
59
|
+
OPTIONAL MATCH (task)-[participant:HAS_PARTICIPANT]->()
|
|
60
|
+
WHERE NOT coalesce(participant.status, '') IN ['completed', 'failed', 'cancelled']
|
|
61
|
+
FOREACH (_ IN CASE WHEN participant IS NULL THEN [] ELSE [1] END |
|
|
62
|
+
SET ''' + running_since_set('participant') + '''
|
|
63
|
+
participant.status = $status,
|
|
64
|
+
participant.updated_at = $updated_at,
|
|
65
|
+
participant.ended_at = $updated_at
|
|
66
|
+
)
|
|
67
|
+
''',
|
|
68
|
+
space_id=request.personal_space_id, task_id=task_id, status=request.status,
|
|
69
|
+
event_id=stable_uuid(self.settings.provider_id, request.personal_space_id,
|
|
70
|
+
'project-agent-task-person-close', task_id, now.isoformat()),
|
|
71
|
+
relayed_by=request.relayed_by, summary=request.summary,
|
|
72
|
+
application=request.source_application, session_id=request.source_session_id,
|
|
73
|
+
cleared_by='person' if was == 'blocked' else None, updated_at=now,
|
|
74
|
+
)
|
|
75
|
+
if was == 'blocked':
|
|
76
|
+
await scoped._close_blocker_attention(request.personal_space_id, task_id, STATUS_UPDATE_RESPONSE, now)
|
|
77
|
+
await scoped.close_task_agent_loans(actor, request.personal_space_id, task_id)
|
|
78
|
+
await scoped._archive_finished_temporary_agent(SimpleNamespace(
|
|
79
|
+
status=request.status, personal_space_id=request.personal_space_id, task_id=task_id), None, now)
|
|
80
|
+
return await self.get_project_agent_task(
|
|
81
|
+
actor, request.personal_space_id, task_id, personal_project_id=request.personal_project_id,
|
|
82
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import json
|
|
2
2
|
from collections import defaultdict
|
|
3
|
-
from datetime import date
|
|
3
|
+
from datetime import date, datetime
|
|
4
4
|
from fastapi import HTTPException
|
|
5
5
|
from .system_hr_identity import resolve_hr_alias
|
|
6
6
|
from .personal_project_access import authorize_personal_project
|
|
@@ -29,12 +29,15 @@ from .store_project_agent_task_staffing import (
|
|
|
29
29
|
from .store_project_agent_coordination_policy import StoreProjectAgentCoordinationPolicy
|
|
30
30
|
from .store_project_agent_task_activity import StoreProjectAgentTaskActivity, TERMINAL_TASK_STATUSES
|
|
31
31
|
from .store_project_agent_task_blockers import StoreProjectAgentTaskBlockers
|
|
32
|
+
from .store_project_agent_task_person_close import StoreProjectAgentTaskPersonClose
|
|
32
33
|
from .store_transactions import TransactionQueryDriver, query_store_transaction
|
|
33
34
|
from .task_activity_origin import coordination_activity_origin, read_activity_origin
|
|
35
|
+
from .task_blocker import BLOCKED_ELSEWHERE_CODE, BLOCKED_MOVE_GUIDANCE
|
|
34
36
|
from .project_agent_hierarchy import reporting_parent, bind_task_coordinator, validate_task_reports
|
|
35
37
|
class StoreProjectAgentTasks(
|
|
36
38
|
StoreProjectAgentTaskActivity,
|
|
37
39
|
StoreProjectAgentTaskBlockers,
|
|
40
|
+
StoreProjectAgentTaskPersonClose,
|
|
38
41
|
StoreProjectAgentCoordinationPolicy,
|
|
39
42
|
StoreProjectAgentTaskRecruitment,
|
|
40
43
|
StoreProjectAgentTaskReads,
|
|
@@ -556,7 +559,10 @@ class StoreProjectAgentTasks(
|
|
|
556
559
|
agent_id: str | None = None,
|
|
557
560
|
status: str | None = None,
|
|
558
561
|
limit: int = 100,
|
|
562
|
+
after_updated_at: datetime | None = None,
|
|
563
|
+
after_task_id: str | None = None,
|
|
559
564
|
) -> list[ProjectAgentTaskRecord]:
|
|
565
|
+
"""The space's tasks, latest change first; after_* continues past one listed task."""
|
|
560
566
|
self._require_personal()
|
|
561
567
|
space = await self.authorize(actor, personal_space_id, 'reader')
|
|
562
568
|
agent_id = await resolve_hr_alias(self, personal_space_id, agent_id)
|
|
@@ -586,6 +592,10 @@ class StoreProjectAgentTasks(
|
|
|
586
592
|
MATCH (:FuliTaskContext {personal_space_id: $personal_space_id,
|
|
587
593
|
project_agent_id: $agent_id})-[:COORDINATES_TASK]->(task)
|
|
588
594
|
})
|
|
595
|
+
AND ($after_updated_at IS NULL
|
|
596
|
+
OR task.updated_at < datetime($after_updated_at)
|
|
597
|
+
OR (task.updated_at = datetime($after_updated_at)
|
|
598
|
+
AND task.task_id > $after_task_id))
|
|
589
599
|
'''
|
|
590
600
|
) + '\nORDER BY task.updated_at DESC, task.task_id LIMIT $limit',
|
|
591
601
|
personal_space_id=personal_space_id,
|
|
@@ -593,6 +603,8 @@ class StoreProjectAgentTasks(
|
|
|
593
603
|
agent_id=agent_id,
|
|
594
604
|
status=status,
|
|
595
605
|
limit=limit,
|
|
606
|
+
after_updated_at=after_updated_at.isoformat() if after_updated_at else None,
|
|
607
|
+
after_task_id=after_task_id,
|
|
596
608
|
routing_='r',
|
|
597
609
|
)
|
|
598
610
|
return [self._task_from_row(row) for row in records]
|
|
@@ -743,6 +755,11 @@ class StoreProjectAgentTasks(
|
|
|
743
755
|
'completed', 'cancelled', 'failed',
|
|
744
756
|
}
|
|
745
757
|
if requested not in allowed.get(current, set()):
|
|
758
|
+
if current == 'blocked':
|
|
759
|
+
# A deliberate boundary (human-authoritative): another session's
|
|
760
|
+
# word alone does not end a block; the refusal names the way that does.
|
|
761
|
+
raise HTTPException(409, {'code': BLOCKED_ELSEWHERE_CODE,
|
|
762
|
+
'message': f'blocked -> {requested} {BLOCKED_MOVE_GUIDANCE}'})
|
|
746
763
|
raise HTTPException(
|
|
747
764
|
status_code=409,
|
|
748
765
|
detail=f'illegal project Agent task transition: {current} -> {requested}',
|
|
@@ -17,6 +17,16 @@ from .provider_values import native_datetime
|
|
|
17
17
|
PERSON_CLEAR_SUMMARY = 'Marked as unblocked by the person in FULI.'
|
|
18
18
|
# The person confirmed a block FULI saw as probably resolved, without a note.
|
|
19
19
|
PERSON_CONFIRM_SUMMARY = 'Confirmed as unblocked by the person after the Agent went on in another session.'
|
|
20
|
+
# Why another session's status report cannot move a blocked task on, and what
|
|
21
|
+
# does (rec#123). The Agent-facing message is cut at 240 characters and the
|
|
22
|
+
# Node client turns ':' into ' —', so it names the route without its path. Its
|
|
23
|
+
# code lets the Agent tool clear the block under the person's AI permission
|
|
24
|
+
# and record the report in one call (src/task-blockers/agent-resume.js).
|
|
25
|
+
BLOCKED_ELSEWHERE_CODE = 'task_blocked_elsewhere'
|
|
26
|
+
BLOCKED_MOVE_GUIDANCE = (
|
|
27
|
+
'needs its reporting session or lead Agent. Fixed it? Resend running/queued with taskContextToken '
|
|
28
|
+
"(FULI clears it under the person's AI permission) or use run_delegated_action, task blocker/clear route"
|
|
29
|
+
)
|
|
20
30
|
|
|
21
31
|
|
|
22
32
|
def current_blocker(
|
|
Binary file
|