fuli-context 0.25.2 → 0.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -3
- package/README.zh-CN.md +19 -4
- package/dist/web/assets/{AboutPage-Dx07_Z8u.js → AboutPage-BKyNoI0v.js} +1 -1
- package/dist/web/assets/{AboutSectionHeading-BdhpM609.js → AboutSectionHeading-DwvCvoqO.js} +1 -1
- package/dist/web/assets/AgentAppsPage-Cp2-sZXi.js +1 -0
- package/dist/web/assets/{AgentAvatar-DlAQP7gm.js → AgentAvatar-CDhU4m0T.js} +1 -1
- package/dist/web/assets/{AgentHand-FPFg9-Y1.js → AgentHand-BfRjs1He.js} +1 -1
- package/dist/web/assets/{AgentManagement-CLFw9oV9.css → AgentManagement-Cc00RLSO.css} +1 -1
- package/dist/web/assets/{AgentManagement-UTe4I3WA.js → AgentManagement-qCpr876m.js} +2 -2
- package/dist/web/assets/{AgentMentionCopy-C5ExlutT.js → AgentMentionCopy-_pr-D8vX.js} +1 -1
- package/dist/web/assets/{AgentName-C8mYbtKs.js → AgentName-CUuWNrzE.js} +1 -1
- package/dist/web/assets/{AgentProfilePage-DumsVHP1.css → AgentProfilePage-Ce25JSzZ.css} +1 -1
- package/dist/web/assets/AgentProfilePage-DcOBhuHG.js +5 -0
- package/dist/web/assets/AgentServicesPage-CAL-JT1J.js +1 -0
- package/dist/web/assets/{AppViewerPage-BR8ttEGa.js → AppViewerPage-Ct46NPXP.js} +1 -1
- package/dist/web/assets/{BackToTop-5_AQRMZl.js → BackToTop-DOlt-xjQ.js} +1 -1
- package/dist/web/assets/{BoardCardFieldsMenu-Bb_Z9a4Q.js → BoardCardFieldsMenu-RFcx_CAs.js} +1 -1
- package/dist/web/assets/{BoardMoveMenu-B-f8O6cC.js → BoardMoveMenu-GJ8lpuZY.js} +1 -1
- package/dist/web/assets/Breadcrumb-DTo6Zvtb.js +1 -0
- package/dist/web/assets/CaptureChangePage-DRgWyCRo.js +1 -0
- package/dist/web/assets/{CopyFixPrompt-CVFYWDSt.js → CopyFixPrompt-1UXH_ItZ.js} +1 -1
- package/dist/web/assets/DataFormatPage-CgFXfOW_.js +2 -0
- package/dist/web/assets/DebugTurnPage-B8YhpTPm.js +1 -0
- package/dist/web/assets/DebugTurnsPage-BGKSH3n0.js +1 -0
- package/dist/web/assets/{DialogTitle-BQXOe8EK.js → DialogTitle-CIVSlKqQ.js} +1 -1
- package/dist/web/assets/{EmployeeRedirectPage-BjWpXDSM.js → EmployeeRedirectPage-8qPpnbyP.js} +1 -1
- package/dist/web/assets/EmployeeScopeDialog-BZymZidB.js +1 -0
- package/dist/web/assets/EmployeeWorkbench-BnxEZCSS.js +4 -0
- package/dist/web/assets/FieldRoot-D6HtUgDA.js +1 -0
- package/dist/web/assets/{FlaGrowth-OQtTLTng.js → FlaGrowth-CaFdmezv.js} +1 -1
- package/dist/web/assets/{FlaOccupationKit-C-x4VrKk.js → FlaOccupationKit-CFoBUWGF.js} +1 -1
- package/dist/web/assets/{FlaTaskSheets-CoaF5CbQ.js → FlaTaskSheets-BShmW9R5.js} +1 -1
- package/dist/web/assets/FlasPage-DtkW-_9f.js +1 -0
- package/dist/web/assets/{GrowthLoading-VuVo2vLf.js → GrowthLoading-CVBn4r4q.js} +1 -1
- package/dist/web/assets/{HowtoPage-CZ3mOdLc.js → HowtoPage-B8f5J_An.js} +1 -1
- package/dist/web/assets/InboxPage-Bv8XUdl8.css +1 -0
- package/dist/web/assets/InboxPage-D9VIDrsL.js +6 -0
- package/dist/web/assets/{KnowledgeDeleteButton-BlUnSG3b.js → KnowledgeDeleteButton-C01O4FSO.js} +1 -1
- package/dist/web/assets/{KnowledgeHardDeleteSection-CznXBtHY.js → KnowledgeHardDeleteSection-jqad3dJN.js} +1 -1
- package/dist/web/assets/KnowledgeItemEditPage-DV8TVpvf.js +1 -0
- package/dist/web/assets/{KnowledgeItemSummaryCard-Co5JKBHl.js → KnowledgeItemSummaryCard-XbkYp7Dy.js} +1 -1
- package/dist/web/assets/KnowledgeOrganizerPage-C4G6JCmG.js +1 -0
- package/dist/web/assets/KnowledgePage-Afiw2Kxy.js +1 -0
- package/dist/web/assets/{KnowledgePeek-CwZVuSkf.css → KnowledgePeek-D6SeISIM.css} +1 -1
- package/dist/web/assets/KnowledgePeek-DIcPS9WU.js +1 -0
- package/dist/web/assets/{KnowledgeTurnReceiptPage-Csyjimeg.js → KnowledgeTurnReceiptPage-7ncXkxKd.js} +1 -1
- package/dist/web/assets/KnowledgeWorkspace-Be2gUul5.css +1 -0
- package/dist/web/assets/KnowledgeWorkspace-CmzU6Vuh.js +4 -0
- package/dist/web/assets/{MeAvatar-aY_q8cKs.js → MeAvatar-D_LFqHrR.js} +1 -1
- package/dist/web/assets/{MeLink-B0pNwVLa.js → MeLink-CeIxjFrm.js} +1 -1
- package/dist/web/assets/{MenuSeparator-BR-uLovR.js → MenuSeparator-yD3wld9s.js} +1 -1
- package/dist/web/assets/ModelSettingsPage-BZcyT7Vy.css +1 -0
- package/dist/web/assets/ModelSettingsPage-BqClsFmC.js +1 -0
- package/dist/web/assets/NewSessionPanel-BKrOFEMO.js +1 -0
- package/dist/web/assets/NewSessionPanel-CTdd7xpN.css +1 -0
- package/dist/web/assets/{NotFoundPage-Cr1MaPuk.js → NotFoundPage-CdOCRj3P.js} +1 -1
- package/dist/web/assets/NoticeRow-CQShZQtw.js +1 -0
- package/dist/web/assets/OccupationsPage-BrBus-nh.js +1 -0
- package/dist/web/assets/OverviewPage-Cq89Klha.js +1 -0
- package/dist/web/assets/{OverviewPage-Dr4jrXW4.css → OverviewPage-KVt4LcE-.css} +1 -1
- package/dist/web/assets/{PageColumns-DvehZlYm.js → PageColumns-CgIXTt4J.js} +1 -1
- package/dist/web/assets/PageOutline-D5h1GuKt.css +1 -0
- package/dist/web/assets/PageOutline-VtLLW4kh.js +1 -0
- package/dist/web/assets/{PersonalProfilePage-DnjNX2xK.css → PersonalProfilePage-BE5q2bqc.css} +1 -1
- package/dist/web/assets/PersonalProfilePage-C_dmUEuW.js +1 -0
- package/dist/web/assets/PersonalProjectsPage-CiCFHVt_.js +1 -0
- package/dist/web/assets/{PinIcon-BTQsnxRY.js → PinIcon-DD3Un-hh.js} +1 -1
- package/dist/web/assets/{PopperContent-DtMksk76.js → PopperContent-CCmt2yHl.js} +1 -1
- package/dist/web/assets/{Presence-B0zMpCF4.js → Presence-DqPb-1P1.js} +1 -1
- package/dist/web/assets/{ProfileAuthorChip-BqT9Vv65.js → ProfileAuthorChip-Dm5GjcAt.js} +1 -1
- package/dist/web/assets/ProjectAgentsPage-B5r0DKWL.js +5 -0
- package/dist/web/assets/ProjectJudgmentPolicy-BHyiqKLV.css +1 -0
- package/dist/web/assets/ProjectJudgmentPolicy-DVFV5Cai.js +2 -0
- package/dist/web/assets/{RecentNotices-vJobVOcm.js → RecentNotices-DYXEBfYm.js} +1 -1
- package/dist/web/assets/{RoundtablesPage-C3dYekQ5.js → RoundtablesPage-DlAXApKi.js} +2 -2
- package/dist/web/assets/{RovingFocusGroup-CUqyjFSs.js → RovingFocusGroup-CI4aZr1z.js} +1 -1
- package/dist/web/assets/{RovingFocusItem-CyyuWXjE.js → RovingFocusItem-C_N843Nb.js} +1 -1
- package/dist/web/assets/{SessionMigrationPage-DukDM0TP.js → SessionMigrationPage-CVKkTACn.js} +1 -1
- package/dist/web/assets/{SessionRecordsPage-DZ5ZBiuS.js → SessionRecordsPage-Dy203sP2.js} +1 -1
- package/dist/web/assets/SettingsPage-BcrAdXX7.js +1 -0
- package/dist/web/assets/SettingsPage-BlhCcwPn.css +1 -0
- package/dist/web/assets/SharedJefaReportPage-CASkC5pc.js +1 -0
- package/dist/web/assets/{TagVocabularyPage-BKLFJiSu.js → TagVocabularyPage-Bd57YcUL.js} +1 -1
- package/dist/web/assets/TaskBlockerClear-DGaXP2ak.js +1 -0
- package/dist/web/assets/TaskBlockerNotice-8nogmPA-.js +1 -0
- package/dist/web/assets/{TaskReason-D5j7L8tl.js → TaskReason-BxYwBDoB.js} +1 -1
- package/dist/web/assets/{TeamCard-CDunbIrP.js → TeamCard-cWYC5z07.js} +1 -1
- package/dist/web/assets/{TeamCardsWidget-CUW-fPn7.js → TeamCardsWidget-BOf6oHOp.js} +1 -1
- package/dist/web/assets/{TeamIsland-CmpDmIX2.js → TeamIsland-BD5s-zFZ.js} +1 -1
- package/dist/web/assets/{Teleport-Dzdr8umQ.js → Teleport-DhMmMHjy.js} +1 -1
- package/dist/web/assets/{TextField-BPhEpEv9.js → TextField-XakqTnVl.js} +1 -1
- package/dist/web/assets/TonborgDelegationSwitch-B59PUZBz.js +1 -0
- package/dist/web/assets/TonborgDelegationSwitch-BFb1JkWe.css +1 -0
- package/dist/web/assets/{UiChip-BEQ067LV.js → UiChip-BFdfq8Jm.js} +1 -1
- package/dist/web/assets/{UiChip-DulygSq8.css → UiChip-BiUmvjdz.css} +1 -1
- package/dist/web/assets/{UiDisclosure-L6GEJHSw.js → UiDisclosure-G3MiGB7F.js} +1 -1
- package/dist/web/assets/UiIcon--qI1_q89.js +1 -0
- package/dist/web/assets/UiSegmented-CRJ06vHP.js +1 -0
- package/dist/web/assets/{UiWeight-D-2iZ_Kc.js → UiWeight-BRA-6EY_.js} +1 -1
- package/dist/web/assets/{VirtualDirectoryList-BV8KsA-Z.js → VirtualDirectoryList-Dm07NMxq.js} +1 -1
- package/dist/web/assets/{VisuallyHidden-BxKxuXRF.js → VisuallyHidden-DIg8c_z2.js} +1 -1
- package/dist/web/assets/{VisuallyHiddenInput-DD4vhlqT.js → VisuallyHiddenInput-rcWqHewS.js} +1 -1
- package/dist/web/assets/WidgetSlot-C5h--noP.js +2 -0
- package/dist/web/assets/{WorkbenchListHead-B0TjHsTO.js → WorkbenchListHead-D40-J4GT.js} +1 -1
- package/dist/web/assets/WorkbenchListPage-CJUvq4Ac.js +1 -0
- package/dist/web/assets/_plugin-vue_export-helper-D9CtLGVz.js +9 -0
- package/dist/web/assets/{agent-apps-B1Je-mpY.js → agent-apps-Svxh5tiY.js} +1 -1
- package/dist/web/assets/agent-occupation-Dhoz7LjT.js +1 -0
- package/dist/web/assets/{agent-pins-DxHlJ96z.js → agent-pins-CvATgFji.js} +1 -1
- package/dist/web/assets/agent-profile-TuRobv9N.css +1 -0
- package/dist/web/assets/agent-roster-records-CsYjmaNn.js +1 -0
- package/dist/web/assets/{agent-work-summary-o_9-QWBL.js → agent-work-summary-BOeJ4JXc.js} +1 -1
- package/dist/web/assets/{agent-workflows-DgdbJqpg.js → agent-workflows-BS4KlKFj.js} +1 -1
- package/dist/web/assets/{attach-closest-edge-DUc_VUVO.js → attach-closest-edge-DFoBNGBU.js} +1 -1
- package/dist/web/assets/{attention-store-Bod20yM3.js → attention-store-CHxXJTuF.js} +1 -1
- package/dist/web/assets/{badge-tMy2Qr94.js → badge-DqHf-RNw.js} +1 -1
- package/dist/web/assets/{button-DnKFsImW.js → button-CdYobu4m.js} +1 -1
- package/dist/web/assets/{card-Ccu7HCNb.js → card-8xZot-73.js} +1 -1
- package/dist/web/assets/{catalog-CJUV8OJ6.js → catalog-h6KbvKdB.js} +1 -1
- package/dist/web/assets/{checkbox-D1R6kTUB.js → checkbox-DZ6CDZ8r.js} +1 -1
- package/dist/web/assets/{client-D-G2i5VU.js → client-DRnUmjCk.js} +1 -1
- package/dist/web/assets/{client-links-store-UgmraFBZ.js → client-links-store-DQY0A5PC.js} +1 -1
- package/dist/web/assets/{combobox-C7QLYGzs.js → combobox-DE0HzdKP.js} +1 -1
- package/dist/web/assets/console-BF8ZU9dG.js +1 -0
- package/dist/web/assets/conversation-launcher-settings-D4vYOpHN.js +1 -0
- package/dist/web/assets/{copy-mention-C0EJhDPy.js → copy-mention-Crs0NIJB.js} +1 -1
- package/dist/web/assets/{dialog-Bbq93W68.js → dialog-Bg5NVU4Y.js} +1 -1
- package/dist/web/assets/{dist-PpsW5ZE3.js → dist--2DWcoU9.js} +1 -1
- package/dist/web/assets/{dist-Dd8yFhv6.js → dist-INkzWhVF.js} +1 -1
- package/dist/web/assets/{dropdown-menu-1fGUL0V3.js → dropdown-menu-C5Kf9x2y.js} +1 -1
- package/dist/web/assets/{field-DjVv_wIS.js → field-7G2bSNl5.js} +1 -1
- package/dist/web/assets/{format-bytes-BKq_E0Hs.js → format-bytes-Jj3-0UhP.js} +1 -1
- package/dist/web/assets/{hover-card-BO-929hq.js → hover-card-llxR7wrX.js} +1 -1
- package/dist/web/assets/index-C2o_v2mq.js +24 -0
- package/dist/web/assets/index-HRZACEmh.css +1 -0
- package/dist/web/assets/{input-DmwRmYO2.js → input-z5o2wIZC.js} +1 -1
- package/dist/web/assets/{label-BvwPUTS4.js → label-BtTrlS8e.js} +1 -1
- package/dist/web/assets/label-table-CuTFbFd3.js +1 -0
- package/dist/web/assets/{model-0TZRbkN2.js → model-BD6AfoOR.js} +1 -1
- package/dist/web/assets/model-BKg9fdsn.js +3 -0
- package/dist/web/assets/{model-BF_ZMPLi.js → model-BMd98Yux.js} +1 -1
- package/dist/web/assets/{model-CaR7VPg7.js → model-Bb0VtRJH.js} +1 -1
- package/dist/web/assets/{model-Tmn6HvL-.js → model-Bhyqm3my.js} +1 -1
- package/dist/web/assets/model-Big7Ppeu.js +1 -0
- package/dist/web/assets/{model-Dfe81jZT.js → model-CCaA3vRN.js} +1 -1
- package/dist/web/assets/{model-y7OUvtKz.js → model-CGfhtR6w.js} +1 -1
- package/dist/web/assets/{model-DpkZUZUL.js → model-Ejc2vysd.js} +1 -1
- package/dist/web/assets/{motion-C1fZrqmI.js → motion-Cw_hptY4.js} +1 -1
- package/dist/web/assets/{motion-mAmbRj_M.js → motion-pePEUhOt.js} +1 -1
- package/dist/web/assets/{motion-preference-Dz9S1bZa.js → motion-preference-DTwjqiJ8.js} +1 -1
- package/dist/web/assets/{occupation-catalog-_SnxxRbK.js → occupation-catalog-ByjQk0EY.js} +1 -1
- package/dist/web/assets/{occupation-kits-DFC6Auuc.js → occupation-kits-Dg6UZqc1.js} +1 -1
- package/dist/web/assets/{option-DC8frdbr.js → option-BIjYeAh2.js} +1 -1
- package/dist/web/assets/{orchestration-filters-UeiAHJqn.js → orchestration-filters-3AfjDoHQ.js} +1 -1
- package/dist/web/assets/overview-data-BIeNATEJ.js +1 -0
- package/dist/web/assets/{page-refresh-DdRJaxMv.js → page-refresh-BTqRX45n.js} +1 -1
- package/dist/web/assets/{page-title-Cm9u_qw1.js → page-title-B5RyNTPD.js} +1 -1
- package/dist/web/assets/{person-profile-BH2AzOfw.js → person-profile-BzPwdtix.js} +1 -1
- package/dist/web/assets/{popover-DW__YCSE.js → popover-BsWyCEy5.js} +1 -1
- package/dist/web/assets/popup-host-DWJ1gygp.js +1 -0
- package/dist/web/assets/{profile-model-DtISOJ-X.js → profile-model-TAsyybji.js} +1 -1
- package/dist/web/assets/{project-board-layout-CTM8kAgq.js → project-board-layout-BwyHItDc.js} +1 -1
- package/dist/web/assets/{project-capture-B3pNhpFF.js → project-capture-I8-7JwsK.js} +1 -1
- package/dist/web/assets/{project-origin-BO8Ngccf.js → project-origin-B_Ku288r.js} +1 -1
- package/dist/web/assets/{quick-edit-api-B169r5Qb.js → quick-edit-api-Cm-W3ZVP.js} +1 -1
- package/dist/web/assets/{radio-group-DqA46cXQ.js → radio-group-DJ5np5d_.js} +1 -1
- package/dist/web/assets/review-api-Gwr5nP1B.js +1 -0
- package/dist/web/assets/{review-list-BbV-Mle7.js → review-list-CNeXKjBw.js} +1 -1
- package/dist/web/assets/review-store-BaMwO51r.js +1 -0
- package/dist/web/assets/{role-names-By0xdfTn.js → role-names-C-F0XIE1.js} +1 -1
- package/dist/web/assets/{roundtable-live-u9qUU6aA.js → roundtable-live-CM4Cqw2v.js} +1 -1
- package/dist/web/assets/{runtime-dom.esm-bundler-DhFy4Djs.js → runtime-dom.esm-bundler-tA5o2TEo.js} +1 -1
- package/dist/web/assets/{select-TqPBladU.js → select-DJ7iyJ-X.js} +1 -1
- package/dist/web/assets/{session-launch-offers-CtQeY4Qk.js → session-launch-offers-CEdCRTz9.js} +1 -1
- package/dist/web/assets/{settings-autosave-C7vW3_SP.js → settings-autosave-D3wBf_zN.js} +1 -1
- package/dist/web/assets/settings-tabs-B9pCaEFP.js +1 -0
- package/dist/web/assets/{npm-copies-GRyMAduA.css → settings-tabs-C9VDs91j.css} +1 -1
- package/dist/web/assets/shared-report-KyuP8oQk.js +3 -0
- package/dist/web/assets/source-adapters-BR-AAGhD.js +1 -0
- package/dist/web/assets/{switch-D7w_0h3m.js → switch-BoOtTu6O.js} +1 -1
- package/dist/web/assets/{tabs-DR8k0PN9.js → tabs-D0TAS18R.js} +1 -1
- package/dist/web/assets/{task-card-fields-X1ZYCm_j.js → task-card-fields-BWlLtcKE.js} +1 -1
- package/dist/web/assets/task-evidence-DydhKn9x.js +1 -0
- package/dist/web/assets/{task-labels-LuXoQhF9.js → task-labels-BrNKooHK.js} +1 -1
- package/dist/web/assets/{task-reason-ChpbGtyx.js → task-reason-CvmaNQWE.js} +1 -1
- package/dist/web/assets/{team-sheets-DYCQqa8I.js → team-sheets-DkAuebg6.js} +1 -1
- package/dist/web/assets/{textarea-D53VYanK.js → textarea-BQnuJ0v3.js} +1 -1
- package/dist/web/assets/ui-CJiEsCpv.js +1 -0
- package/dist/web/assets/ui-CgwSWg1F.css +1 -0
- package/dist/web/assets/{useAgentRecords-Hy9nqMs7.js → useAgentRecords-PysQYF4V.js} +1 -1
- package/dist/web/assets/{useAgentWorkSummary-mloD4p12.js → useAgentWorkSummary-DaNyOo2z.js} +1 -1
- package/dist/web/assets/{useApi-CROJJdhE-DnUGUb8O.js → useApi-CROJJdhE-CgPyy2pi.js} +1 -1
- package/dist/web/assets/{useClipboardCopy-BTuQMeWI.js → useClipboardCopy-Cf3GZrHC.js} +1 -1
- package/dist/web/assets/{useFocusReturn-4hUmSzj9.js → useFocusReturn-uY18_eDg.js} +1 -1
- package/dist/web/assets/{useForwardExpose-BDmW7q7u.js → useForwardExpose-Ci_aBJDg.js} +1 -1
- package/dist/web/assets/{useForwardPropsEmits-BzT2luD4.js → useForwardPropsEmits-mGaDeNMp.js} +1 -1
- package/dist/web/assets/useForwardScopeId-DYW8CZTp.js +1 -0
- package/dist/web/assets/{useKnowledgeConfirm-L8wnJCuX.js → useKnowledgeConfirm-PcqqgwNU.js} +1 -1
- package/dist/web/assets/{useKnowledgeItemPeek-C_huXt6E.js → useKnowledgeItemPeek-yjyrSFtf.js} +1 -1
- package/dist/web/assets/{useMinimumLoadingDisplay-Dkl8NQru.js → useMinimumLoadingDisplay-Bu6xyHby.js} +1 -1
- package/dist/web/assets/{usePageTools-CbDOdIrg.js → usePageTools-DYi9x7HJ.js} +1 -1
- package/dist/web/assets/usePrimitiveElement-DdC34jzt.js +1 -0
- package/dist/web/assets/{useProjectAgentRoster-BBmRvcgr.js → useProjectAgentRoster-KPwWl2jE.js} +1 -1
- package/dist/web/assets/{useRoutePeek-CRbCDqsm.js → useRoutePeek-BiHDBRKc.js} +1 -1
- package/dist/web/assets/useTeamPeople-Od3dDz6d.js +1 -0
- package/dist/web/assets/{useTeamWork-CXEQwF4n.js → useTeamWork-CDKVZwYe.js} +1 -1
- package/dist/web/assets/{useTypeahead-CVYuxPOD.js → useTypeahead-D_Z5P9Xm.js} +1 -1
- package/dist/web/assets/{utils-BsGjKHV8.js → utils-CAAvfQSj.js} +1 -1
- package/dist/web/assets/{utils-BnrWDlfm.js → utils-D6RjkXrh.js} +1 -1
- package/dist/web/assets/{verification-DbCo_dnY.js → verification-DoN2EFaZ.js} +1 -1
- package/dist/web/assets/version-DbJq2Cfv.js +1 -0
- package/dist/web/assets/{vue-router-D4_ms6om.js → vue-router-BwoPnYha.js} +1 -1
- package/dist/web/index.html +80 -87
- package/docs/agent-conversations-and-collaboration.md +6 -0
- package/docs/agent-interface-architecture.md +4 -1
- package/docs/agent-roundtable.md +45 -3
- package/docs/client-connections.md +29 -5
- package/docs/employee-agents.md +1 -1
- package/docs/external-knowledge-architecture.md +8 -3
- package/docs/judgment-and-autonomy.md +8 -4
- package/docs/project-agent-memory.md +12 -1
- package/graph-provider/fuli_graph/app.py +14 -234
- package/graph-provider/fuli_graph/auth.py +10 -0
- package/graph-provider/fuli_graph/builtin_embedding.py +388 -0
- package/graph-provider/fuli_graph/builtin_embedding_routes.py +53 -0
- package/graph-provider/fuli_graph/client_coverage.py +2 -2
- package/graph-provider/fuli_graph/config.py +3 -0
- package/graph-provider/fuli_graph/knowledge_duplicates.py +27 -15
- package/graph-provider/fuli_graph/knowledge_index_scan.py +13 -6
- package/graph-provider/fuli_graph/knowledge_search.py +142 -77
- package/graph-provider/fuli_graph/knowledge_semantic.py +47 -11
- package/graph-provider/fuli_graph/knowledge_semantic_index.py +5 -3
- package/graph-provider/fuli_graph/knowledge_tags.py +5 -10
- package/graph-provider/fuli_graph/models.py +16 -81
- package/graph-provider/fuli_graph/personal_global_preference_models.py +0 -23
- package/graph-provider/fuli_graph/personal_global_preferences.py +5 -630
- package/graph-provider/fuli_graph/preference_conflicts.py +3 -1
- package/graph-provider/fuli_graph/preference_organizing.py +162 -0
- package/graph-provider/fuli_graph/project_agent_delegations.py +6 -1
- package/graph-provider/fuli_graph/project_agent_executor_models.py +0 -26
- package/graph-provider/fuli_graph/project_agent_models.py +1 -0
- package/graph-provider/fuli_graph/project_agent_routes.py +22 -27
- package/graph-provider/fuli_graph/project_agent_task_models.py +26 -20
- package/graph-provider/fuli_graph/project_agent_work_log.py +4 -2
- package/graph-provider/fuli_graph/project_knowledge.py +2 -1
- package/graph-provider/fuli_graph/retired_graph_labels.py +30 -0
- package/graph-provider/fuli_graph/store_identity.py +4 -16
- package/graph-provider/fuli_graph/store_project_agent_executor_learning.py +0 -7
- package/graph-provider/fuli_graph/store_project_agent_executor_routing.py +0 -2
- package/graph-provider/fuli_graph/store_project_agent_executors.py +0 -8
- package/graph-provider/fuli_graph/store_project_agent_task_activity.py +51 -11
- package/graph-provider/fuli_graph/store_project_agent_task_blockers.py +13 -6
- package/graph-provider/fuli_graph/store_project_agent_task_person_close.py +82 -0
- package/graph-provider/fuli_graph/store_project_agent_task_recruitment.py +1 -61
- package/graph-provider/fuli_graph/store_project_agent_tasks.py +18 -1
- package/graph-provider/fuli_graph/store_project_agents.py +1 -1
- package/graph-provider/fuli_graph/store_projects.py +0 -151
- package/graph-provider/fuli_graph/store_publication.py +1 -160
- package/graph-provider/fuli_graph/store_records.py +0 -43
- package/graph-provider/fuli_graph/store_task_contexts.py +10 -0
- package/graph-provider/fuli_graph/task_blocker.py +10 -0
- package/graph-provider/fuli_graph/task_checkpoint_amendment.py +77 -0
- package/graph-provider/fuli_graph/task_context_auto_close.py +1 -1
- package/graph-provider/fuli_graph/task_context_models.py +19 -0
- package/graph-provider/fuli_graph/task_context_routes.py +5 -1
- package/graph-provider/fuli_graph/workflow_candidate_models.py +1 -61
- package/graph-provider/fuli_graph/workflow_candidates.py +7 -446
- package/graph-provider/fuli_graph/workflow_observation_models.py +1 -1
- package/graph-provider/pyproject.toml +1 -1
- package/native/win32/fuli-win-helper.exe +0 -0
- package/npm-shrinkwrap.json +57 -9
- package/package.json +4 -4
- package/packages/roundtable/package.json +1 -0
- package/packages/roundtable/src/agents/claude-code/wake.js +4 -2
- package/packages/roundtable/src/agents/codex/wake.js +26 -2
- package/packages/roundtable/src/agents/session-log.js +29 -7
- package/packages/roundtable/src/host.js +7 -1
- package/packages/roundtable/src/peer/control-cli.js +75 -2
- package/packages/roundtable/src/peer/control.js +15 -1
- package/packages/roundtable/src/peer/coordinator-http.js +23 -2
- package/packages/roundtable/src/peer/coordinator-service.js +81 -9
- package/packages/roundtable/src/peer/coordinator-store.js +2 -1
- package/packages/roundtable/src/peer/lan-addresses.js +28 -0
- package/packages/roundtable/src/peer/nearby-attempts.js +73 -0
- package/packages/roundtable/src/peer/nearby-discovery.js +71 -0
- package/packages/roundtable/src/peer/nearby-pairing.js +422 -0
- package/packages/roundtable/src/peer/nearby-presence.js +93 -0
- package/packages/roundtable/src/peer/node-store.js +10 -0
- package/packages/roundtable/src/peer/peer-runtime.js +528 -70
- package/packages/roundtable/src/peer/peer-transport.js +58 -3
- package/packages/roundtable/src/peer/protocol.js +24 -1
- package/packages/roundtable/src/roundtable/chat-service.js +14 -3
- package/packages/roundtable/src/roundtable/chat.js +1 -0
- package/packages/roundtable/src/roundtable/delivery-state.js +2 -1
- package/packages/roundtable/src/roundtable/group-discussion-store.js +130 -5
- package/packages/roundtable/src/roundtable/group-discussion.js +596 -111
- package/packages/roundtable/src/roundtable/near-names.js +27 -0
- package/packages/roundtable/src/roundtable/reply-inbox.js +6 -2
- package/packages/roundtable/src/roundtable/service.js +191 -49
- package/packages/roundtable/src/roundtable/stand-in.js +64 -0
- package/packages/roundtable/src/roundtable/store.js +19 -7
- package/packages/roundtable/src/roundtable/wake-ladder.js +63 -0
- package/packages/roundtable/src/roundtable/wake.js +10 -1
- package/packages/roundtable/src/standalone/cli.js +1 -1
- package/packages/roundtable/src/standalone/mcp.js +0 -5
- package/packages/roundtable/src/standalone/serve.js +13 -0
- package/registry/embedding-models.json +208 -0
- package/skills/capturing-session-knowledge/SKILL.md +2 -2
- package/skills/capturing-session-knowledge/references/capture.md +15 -34
- package/skills/capturing-session-knowledge/references/coordination.md +67 -4
- package/skills/capturing-session-knowledge/references/retrieval.md +9 -13
- package/skills/grilling-project/SKILL.md +8 -53
- package/skills/grilling-project/agents/openai.yaml +2 -2
- package/skills/grilling-project/references/project-profile.md +18 -27
- package/skills/operating-fuli/SKILL.md +56 -11
- package/skills/operating-fuli/references/workflow-recipes.md +8 -4
- package/src/agent-apps/host-tools/catalog.js +2 -25
- package/src/agent-delegation/port.js +1 -1
- package/src/agent-delegation/refusals.js +12 -4
- package/src/agent-kits/client-detection.js +14 -4
- package/src/agent-kits/installer-manifest.js +16 -5
- package/src/agent-kits/pack-manifest.js +7 -2
- package/src/agent-kits/pins.js +6 -6
- package/src/agent-kits/session-clients.js +1 -0
- package/src/agent-kits/vendor/agent-installer/README.md +1 -1
- package/src/agent-roundtable/task-context.js +1 -1
- package/src/agent-roundtable/tools.js +7 -4
- package/src/agent-roundtable/turn-receipt.js +65 -0
- package/src/agent-tools/graph-definitions.js +4 -2
- package/src/agent-tools/graph-handlers.js +9 -46
- package/src/agent-tools/interface-catalog.js +20 -15
- package/src/agent-tools/interface-definitions.js +3 -9
- package/src/agent-tools/judgment-definitions.js +1 -1
- package/src/agent-tools/knowledge-curation-definitions.js +1 -63
- package/src/agent-tools/knowledge-definitions.js +11 -124
- package/src/agent-tools/project-agent-definitions.js +2 -2
- package/src/agent-tools/project-agent-tool-definitions.js +0 -16
- package/src/agent-tools/project-organizing-definitions.js +34 -0
- package/src/agent-tools/project-space-definitions.js +6 -83
- package/src/agent-tools/retired-tools.js +37 -0
- package/src/agent-tools/session-fuli-gate.js +6 -1
- package/src/agent-tools/task-entry-definitions.js +4 -3
- package/src/agent-tools/tonborg-question-definitions.js +3 -3
- package/src/agent-tools.js +5 -1
- package/src/agents/choice-answers.js +2 -1
- package/src/agents/claude-code/choice-answers.js +2 -24
- package/src/agents/claude-desktop/app-control.js +23 -0
- package/src/agents/client-apps.js +8 -0
- package/src/agents/codex/choice-answers.js +61 -0
- package/src/agents/codex/lifecycle-hook.js +6 -12
- package/src/agents/dsh/bundle.js +50 -0
- package/src/agents/dsh/lifecycle-hook.js +18 -0
- package/src/agents/dsh/plugin.js +111 -0
- package/src/agents/identity-receipt.js +22 -5
- package/src/agents/jsonl-tail.js +35 -0
- package/src/agents/native-session-env.js +7 -0
- package/src/agents/opencode/lifecycle-hook.js +9 -174
- package/src/agents/opencode/plugin-file.js +7 -29
- package/src/agents/opencode/plugin.js +3 -76
- package/src/agents/plugin-hook-process.js +87 -0
- package/src/agents/plugin-lifecycle-hook.js +174 -0
- package/src/agents/plugin-module-source.js +26 -0
- package/src/agents/source-applications.js +3 -3
- package/src/agents/token-usage-resolver.js +0 -6
- package/src/cli/clients-command.js +3 -3
- package/src/cli/command-registry.js +1 -2
- package/src/cli/connect-command.js +1 -1
- package/src/cli/mcp-command.js +1 -1
- package/src/cli/setup-command.js +3 -2
- package/src/cli.js +0 -5
- package/src/conversations/entry-budget.js +4 -3
- package/src/conversations/entry-inline-budget.js +40 -10
- package/src/conversations/person-words.js +0 -5
- package/src/conversations/preference-lifecycle.js +3 -3
- package/src/conversations/turn-findings.js +9 -2
- package/src/data-format/local-stores.js +6 -0
- package/src/debug-turns/model-request.js +2 -27
- package/src/desktop/npm-copy-data.js +20 -6
- package/src/embedding-models/manifest.js +147 -0
- package/src/embedding-models/port.js +117 -0
- package/src/embedding-models/registry.js +24 -0
- package/src/embedding-models/store.js +208 -0
- package/src/external-knowledge/connectors/custom.js +4 -0
- package/src/external-knowledge/connectors/mcp.js +13 -1
- package/src/external-knowledge/connectors/response-values.js +8 -0
- package/src/external-knowledge/connectors/retrieval-api.js +5 -1
- package/src/external-knowledge/service.js +22 -5
- package/src/graphiti/agent-conversations.js +3 -2
- package/src/graphiti/agent-knowledge-workflows.js +1 -6
- package/src/graphiti/agent-project-resolution.js +18 -0
- package/src/graphiti/capture-change-confirmation.js +1 -1
- package/src/graphiti/checkpoint-amendment.js +50 -0
- package/src/graphiti/checkpoint-capture.js +7 -3
- package/src/graphiti/checkpoint-save-status.js +71 -0
- package/src/graphiti/collaboration-preference-entry.js +5 -2
- package/src/graphiti/current-project-knowledge-search.js +3 -3
- package/src/graphiti/federated-application.js +11 -132
- package/src/graphiti/first-run-guide.js +25 -4
- package/src/graphiti/fla-mention.js +48 -9
- package/src/graphiti/fuli-markup.js +1 -1
- package/src/graphiti/human-review-channel.js +4 -2
- package/src/graphiti/knowledge-curation.js +12 -24
- package/src/graphiti/knowledge-provider-mapping.js +0 -21
- package/src/graphiti/knowledge-reader.js +0 -7
- package/src/graphiti/knowledge-spaces.js +36 -0
- package/src/graphiti/local-runtimes.js +9 -1
- package/src/graphiti/personal-global-preference-candidates.js +0 -44
- package/src/graphiti/project-agent-control-plane.js +5 -12
- package/src/graphiti/project-agent-mapping.js +0 -13
- package/src/graphiti/project-agent-task-summaries.js +82 -0
- package/src/graphiti/project-agent-workflows.js +8 -21
- package/src/graphiti/project-path-context.js +23 -9
- package/src/graphiti/provider-client.js +41 -168
- package/src/graphiti/reply-echo-group.js +7 -6
- package/src/graphiti/repository-remote.js +34 -8
- package/src/graphiti/roundtable-host.js +14 -1
- package/src/graphiti/session-knowledge-capture.js +5 -31
- package/src/graphiti/task-context-entry.js +4 -1
- package/src/graphiti/task-entry-group-discussion.js +111 -25
- package/src/graphiti/task-entry-owner-change.js +86 -0
- package/src/graphiti/task-entry-preferences.js +23 -6
- package/src/graphiti/task-entry-project-scope.js +24 -1
- package/src/graphiti/task-knowledge-checkpoint.js +30 -14
- package/src/graphiti/task-preference-pages.js +3 -3
- package/src/graphiti/task-preference-reader.js +44 -9
- package/src/graphiti/topic-proposals.js +31 -8
- package/src/graphiti/topic-team-handoff.js +121 -0
- package/src/graphiti/worker-task-context.js +1 -1
- package/src/graphiti/workflow-learning.js +0 -25
- package/src/graphiti/workspace-provider-client.js +4 -50
- package/src/http/api-router.js +18 -0
- package/src/http/capture-onboarding-api-router.js +13 -4
- package/src/http/embedding-models-api-router.js +36 -0
- package/src/http/graph-api-router.js +3 -125
- package/src/http/project-organizing-api-router.js +27 -0
- package/src/http/reply-echo-api-router.js +2 -2
- package/src/http/request-policy.js +0 -4
- package/src/http/task-blocker-api-router.js +11 -1
- package/src/http/task-close-api-router.js +59 -0
- package/src/judgment/acceptance.js +2 -2
- package/src/judgment/agent-view.js +8 -8
- package/src/judgment/conversation.js +75 -69
- package/src/judgment/engine.js +39 -37
- package/src/judgment/explain-method.js +8 -7
- package/src/judgment/http.js +5 -3
- package/src/judgment/question-options.js +117 -74
- package/src/judgment/question-tools.js +54 -34
- package/src/judgment/review-delegation.js +32 -7
- package/src/judgment/review-egress.js +25 -0
- package/src/judgment/review-prompt.js +29 -33
- package/src/judgment/routing.js +4 -3
- package/src/judgment/service.js +51 -9
- package/src/judgment/verdict-schema.js +2 -7
- package/src/knowledge-hard-delete/console-port.js +1 -7
- package/src/knowledge-hard-delete/forget-references.js +1 -1
- package/src/knowledge-owner-reads/console-port.js +8 -19
- package/src/mcp/chat-listing.js +1 -1
- package/src/mcp/create-mcp-server.js +13 -33
- package/src/mcp/direct-call.js +3 -4
- package/src/mcp/preference-delivery.js +65 -5
- package/src/mcp/provider-task-context-registry.js +14 -0
- package/src/mcp/session-id.js +13 -37
- package/src/mcp/tool-annotations.js +3 -44
- package/src/mcp/tool-result.js +8 -6
- package/src/model-backends/adapters/builtin-embeddings.js +44 -0
- package/src/model-backends/adapters/registry.js +3 -1
- package/src/model-backends/config.js +24 -4
- package/src/model-backends/egress.js +8 -0
- package/src/model-backends/failures.js +8 -0
- package/src/model-backends/port.js +46 -17
- package/src/model-backends/role-trust.js +3 -9
- package/src/model-backends/runtime.js +6 -13
- package/src/model-backends/secret-store.js +2 -20
- package/src/model-backends/usage-ledger.js +20 -9
- package/src/native-runtime/runtime.js +13 -2
- package/src/presence/windows-helper-pin.js +1 -1
- package/src/project-organizing/agent-tool.js +92 -0
- package/src/project-organizing/model-tiers.js +31 -0
- package/src/project-organizing/port.js +130 -0
- package/src/server.js +29 -13
- package/src/setup/agents/claude-code/descriptor.json +1 -5
- package/src/setup/agents/codex/descriptor.json +1 -5
- package/src/setup/agents/cursor/descriptor.json +1 -5
- package/src/setup/agents/descriptor-schema.js +4 -1
- package/src/setup/agents/opencode/descriptor.json +1 -5
- package/src/setup/paths.js +1 -0
- package/src/system/client-connection-install.js +12 -2
- package/src/system/client-connection-status.js +90 -20
- package/src/system/client-restart.js +72 -0
- package/src/system/configured-install.js +103 -0
- package/src/system/doctor-repair.js +3 -1
- package/src/system/doctor.js +3 -1
- package/src/system/system-service.js +14 -2
- package/src/task-blockers/agent-resume.js +73 -0
- package/src/task-blockers/console-port.js +5 -2
- package/src/task-blockers/resume-status.js +2 -0
- package/src/task-closing/console-port.js +26 -0
- package/src/whats-new/lines/0.27.0.json +13 -0
- package/src/whats-new/lines/0.27.1.json +13 -0
- package/dist/web/assets/AgentAppsPage-5VW0uCTz.js +0 -1
- package/dist/web/assets/AgentProfilePage-BLeyT3By.js +0 -5
- package/dist/web/assets/AgentServicesPage-BXi152Xc.js +0 -1
- package/dist/web/assets/Breadcrumb-DtM5lZy5.js +0 -1
- package/dist/web/assets/CaptureChangePage-BzwcfacI.js +0 -1
- package/dist/web/assets/ConnectionsPage-C_vgqwF2.js +0 -1
- package/dist/web/assets/ConnectionsPage-DS2PEG6K.css +0 -1
- package/dist/web/assets/DataFormatPage-DwL4Ofc9.js +0 -2
- package/dist/web/assets/DebugTurnPage-UpK_3ZWY.js +0 -1
- package/dist/web/assets/DebugTurnsPage-C0aZg5-3.js +0 -1
- package/dist/web/assets/EmployeeScopeDialog-Bt3ZlDyZ.js +0 -1
- package/dist/web/assets/EmployeeWorkbench-GtJIUD5G.js +0 -4
- package/dist/web/assets/FieldRoot-DRf4wM5x.js +0 -1
- package/dist/web/assets/FlasPage-CgIVOGFM.js +0 -1
- package/dist/web/assets/InboxPage-1ue8vA7H.css +0 -1
- package/dist/web/assets/InboxPage-zNUnnYeJ.js +0 -6
- package/dist/web/assets/KnowledgeItemEditPage-DGRNkAYd.js +0 -1
- package/dist/web/assets/KnowledgeOrganizerPage-BWvF1GEu.js +0 -1
- package/dist/web/assets/KnowledgePage--Z4_kAhq.js +0 -1
- package/dist/web/assets/KnowledgePeek-BgzQA9SI.js +0 -1
- package/dist/web/assets/KnowledgeWorkspace-0yOpWtEB.js +0 -4
- package/dist/web/assets/KnowledgeWorkspace-BgWo6lBj.css +0 -1
- package/dist/web/assets/ModelSettingsPage-B9PS1Kay.css +0 -1
- package/dist/web/assets/ModelSettingsPage-BL6MsF7C.js +0 -1
- package/dist/web/assets/NoticeRow-BXZWn4EZ.js +0 -1
- package/dist/web/assets/OccupationsPage-CkVqZ2pz.js +0 -1
- package/dist/web/assets/OverviewPage-_9e2idJR.js +0 -1
- package/dist/web/assets/PageOutline-CFGtHmOK.js +0 -1
- package/dist/web/assets/PageOutline-DG5ZYtA8.css +0 -1
- package/dist/web/assets/PersonalProfilePage-TxsNr44t.js +0 -1
- package/dist/web/assets/PersonalProjectsPage-AhgP6CL8.js +0 -1
- package/dist/web/assets/ProjectAgentsPage-O-cMavcz.js +0 -5
- package/dist/web/assets/ProjectJudgmentPolicy-CyHAu0nm.js +0 -2
- package/dist/web/assets/ProjectJudgmentPolicy-DnjMniaz.css +0 -1
- package/dist/web/assets/PublicProjectsPage-Ck1QSR0R.js +0 -1
- package/dist/web/assets/PublicProjectsPage-CskSzffL.css +0 -1
- package/dist/web/assets/SettingsPage-Cj3pEWcd.css +0 -1
- package/dist/web/assets/SettingsPage-bLssMIz6.js +0 -1
- package/dist/web/assets/SharedJefaReportPage-DUY03VLS.js +0 -1
- package/dist/web/assets/TaskBlockerClear-BxOiiuK8.js +0 -1
- package/dist/web/assets/TaskBlockerNotice-iUiD3BuZ.js +0 -1
- package/dist/web/assets/TonborgDelegationSwitch-C1nkJqkJ.js +0 -1
- package/dist/web/assets/TonborgDelegationSwitch-DeqERWoo.css +0 -1
- package/dist/web/assets/UiDialog-JjqzOA0z.js +0 -1
- package/dist/web/assets/UiIcon-vgD4v8q8.js +0 -1
- package/dist/web/assets/UiIconButton-BzyMc14P.js +0 -1
- package/dist/web/assets/UiIconButton-ZCBdABdM.css +0 -1
- package/dist/web/assets/UiSegmented-CIIm3KoV.js +0 -1
- package/dist/web/assets/WidgetSlot-Dw5nWlb7.js +0 -2
- package/dist/web/assets/WorkbenchListPage-D0xX-YNl.js +0 -1
- package/dist/web/assets/_plugin-vue_export-helper-B4pFJCwG.js +0 -9
- package/dist/web/assets/agent-occupation-CjfQqSzd.js +0 -1
- package/dist/web/assets/agent-profile-BNPLhDog.css +0 -1
- package/dist/web/assets/agent-roster-records-Bi5HWDif.js +0 -1
- package/dist/web/assets/console-DgRc8Itw.js +0 -1
- package/dist/web/assets/conversation-launcher-settings-CZAfuu8B.js +0 -1
- package/dist/web/assets/identity-DIG-uOiU.js +0 -1
- package/dist/web/assets/index-C2VDC1uO.js +0 -24
- package/dist/web/assets/index-DF0TcfPY.css +0 -1
- package/dist/web/assets/label-table-CDzYRZpc.js +0 -1
- package/dist/web/assets/model-BjUERpoQ.js +0 -3
- package/dist/web/assets/npm-copies-BLRc0FXW.js +0 -1
- package/dist/web/assets/overview-data-Cq1gefY5.js +0 -1
- package/dist/web/assets/popup-host-ctKYu9Ze.js +0 -1
- package/dist/web/assets/review-api-CJaNgPMA.js +0 -1
- package/dist/web/assets/review-store-DSQpb5P8.js +0 -1
- package/dist/web/assets/shared-report-DQBSigHB.js +0 -3
- package/dist/web/assets/source-adapters-DPJzumzC.js +0 -1
- package/dist/web/assets/task-evidence-DIbw2U42.js +0 -1
- package/dist/web/assets/ui-D4nAhcmu.css +0 -1
- package/dist/web/assets/ui-DmNbL8MW.js +0 -1
- package/dist/web/assets/useForwardScopeId-DZCnSswO.js +0 -1
- package/dist/web/assets/usePrimitiveElement-tPQM7XJs.js +0 -1
- package/dist/web/assets/useTeamPeople-D_5cxxf1.js +0 -1
- package/dist/web/assets/version-lXtOG8uf.js +0 -1
- package/docs/public-personal-architecture.md +0 -73
- package/graph-provider/fuli_graph/common_knowledge.py +0 -459
- package/graph-provider/fuli_graph/common_knowledge_models.py +0 -54
- package/graph-provider/fuli_graph/project_management.py +0 -251
- package/skills/flreview/SKILL.md +0 -101
- package/skills/flreview/agents/openai.yaml +0 -6
- package/src/agent-tools/project-relation-definitions.js +0 -36
- package/src/agents/codex/acp-process.js +0 -244
- package/src/agents/codex/acp-session.js +0 -190
- package/src/agents/codex/acp-worker.js +0 -54
- package/src/agents/codex/review-command.js +0 -29
- package/src/cli/worker-command.js +0 -80
- package/src/graphiti/checkpoint-provider-outage.js +0 -23
- package/src/graphiti/common-knowledge-candidates.js +0 -222
- package/src/graphiti/public-project-relations.js +0 -28
- package/src/graphiti/public-projects.js +0 -125
- package/src/graphiti/public-submission-reconciliation.js +0 -37
- package/src/graphiti/public-submission.js +0 -77
- package/src/graphiti/publication-draft-capture.js +0 -28
- package/src/graphiti/publication-draft-input.js +0 -11
- package/src/graphiti/publication-review-queues.js +0 -50
- package/src/graphiti/worker-plan-host.js +0 -92
- package/src/graphiti/worker-run-host.js +0 -287
- package/src/graphiti/workflow-observation.js +0 -72
- package/src/mcp/common-knowledge-preview-tokens.js +0 -67
- package/src/server/worker-plan-runtime.js +0 -56
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Names a person most likely meant when what they typed matches no Agent
|
|
2
|
+
// (rec#110: 「astra」 for Astro): a name within a small edit distance, ignoring
|
|
3
|
+
// case. Only offered as a question to the person, never used as the match.
|
|
4
|
+
const MAX_SUGGESTIONS = 3;
|
|
5
|
+
|
|
6
|
+
export function nearNames(needle, agents, namesOf) {
|
|
7
|
+
const wanted = String(needle ?? '').trim().toLowerCase();
|
|
8
|
+
if (wanted.length < 3) return [];
|
|
9
|
+
const limit = Math.max(1, Math.floor(wanted.length / 4));
|
|
10
|
+
return agents.map(agent => ({ agent, distance: Math.min(...namesOf(agent).filter(Boolean)
|
|
11
|
+
.map(name => editDistance(wanted, name.toLowerCase()))) }))
|
|
12
|
+
.filter(entry => entry.distance <= limit)
|
|
13
|
+
.sort((left, right) => left.distance - right.distance)
|
|
14
|
+
.slice(0, MAX_SUGGESTIONS).map(entry => entry.agent);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function editDistance(left, right) {
|
|
18
|
+
let previous = Array.from({ length: right.length + 1 }, (_, index) => index);
|
|
19
|
+
for (let i = 1; i <= left.length; i += 1) {
|
|
20
|
+
const current = [i];
|
|
21
|
+
for (let j = 1; j <= right.length; j += 1) {
|
|
22
|
+
current[j] = Math.min(previous[j] + 1, current[j - 1] + 1, previous[j - 1] + (left[i - 1] === right[j - 1] ? 0 : 1));
|
|
23
|
+
}
|
|
24
|
+
previous = current;
|
|
25
|
+
}
|
|
26
|
+
return previous[right.length];
|
|
27
|
+
}
|
|
@@ -3,13 +3,17 @@ const PREVIEW_LENGTH = 160;
|
|
|
3
3
|
const UNREAD = ['pending', 'announced'];
|
|
4
4
|
export const AGENT_REPLIES_GUIDANCE = 'Other Agents answered asks you sent on the roundtable. Read each full reply once with '
|
|
5
5
|
+ 'read_agent_messages (replies); read_agent_thread shows the whole thread. A reply is not evidence of execution or human approval.';
|
|
6
|
+
export const STAND_IN_HANDBACKS_GUIDANCE = 'While no session of yours could be woken, another session stood in for you (代入) on these asks. '
|
|
7
|
+
+ 'Read each full handback once with read_agent_messages (handbacks). It is that session\'s work as you, not yours: keep in your own '
|
|
8
|
+
+ 'work record (checkpoint workLog) only what still holds.';
|
|
6
9
|
|
|
7
10
|
// A reply to an ask the asker did not get back from its own message_agent call
|
|
8
11
|
// waits here until the asker reads it. Its next task entry announces it once;
|
|
9
12
|
// read_agent_messages hands over the full body once. A reply returned directly
|
|
10
13
|
// (message_agent, get_agent_message_status) counts as read and is never repeated.
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
// kind 'handback': what a stand-in did as an Agent (stand-in.js), handed to that Agent the same way.
|
|
15
|
+
export function createReplyInbox({ store, spaceId, kind = 'reply' }) {
|
|
16
|
+
const unread = (agentId, projectId, states) => store.repliesFor(spaceId(), agentId, projectId, states, INBOX_LIMIT + 1, kind);
|
|
13
17
|
// Only the call that moves a reply on returns it, so two processes never both deliver it.
|
|
14
18
|
const claim = (rows, from, to, via) => rows.filter(row => store.markReplyDelivery(row.id, from, to, via));
|
|
15
19
|
return {
|
|
@@ -8,13 +8,16 @@ import { flaAddress } from './fla-address.js';
|
|
|
8
8
|
import { createGroupDiscussion } from './group-discussion.js';
|
|
9
9
|
import { createPersonConversation } from './person-conversation.js';
|
|
10
10
|
import { ATTENTION_REPLIES_GUIDANCE, createAttentionInbox } from './attention-inbox.js';
|
|
11
|
-
import { createReplyInbox } from './reply-inbox.js';
|
|
11
|
+
import { STAND_IN_HANDBACKS_GUIDANCE, createReplyInbox } from './reply-inbox.js';
|
|
12
12
|
import { agentDiscoveryProfile, matchesAgentDiscovery } from './discovery.js';
|
|
13
13
|
import { CLIENT_LABELS, deliveryState } from './delivery-state.js';
|
|
14
14
|
|
|
15
15
|
import { RoundtableError } from '../errors.js';
|
|
16
16
|
import { assertRoundtableHost } from '../host.js';
|
|
17
|
-
import {
|
|
17
|
+
import { nearNames } from './near-names.js';
|
|
18
|
+
import { WAKE_CLIENTS, resolveClientCommand, sessionTurnRunning, sessionWorkingDirectory, wakeAgent } from './wake.js';
|
|
19
|
+
import { createWakeLadder, standInAllowed } from './wake-ladder.js';
|
|
20
|
+
import { enterStandIn, recordStandInReply, standInState } from './stand-in.js';
|
|
18
21
|
|
|
19
22
|
const THREAD_MESSAGE_LIMIT = 24;
|
|
20
23
|
const NESTED_ASK_LIMIT = 3;
|
|
@@ -26,7 +29,7 @@ const RECORDED_REFUSALS = new Set(['execution_claimed', 'cleanup_unconfirmed']);
|
|
|
26
29
|
// Agents talk to each other directly: an ask wakes the recipient in its own
|
|
27
30
|
// client and returns its answer, or waits in its inbox for its next task.
|
|
28
31
|
export function createAgentRoundtable({ host, peer = null, openStore, wake = wakeAgent, idFactory = randomUUID,
|
|
29
|
-
env = process.env, locateCwd = sessionWorkingDirectory, clientAvailable = (client) => Boolean(resolveClientCommand(client)),
|
|
32
|
+
env = process.env, locateCwd = sessionWorkingDirectory, turnRunning = sessionTurnRunning, clientAvailable = (client) => Boolean(resolveClientCommand(client)),
|
|
30
33
|
// Boot-anchor evidence recorded with a cleanup hold. Production records none
|
|
31
34
|
// (null) until a separately verified proof exists; release stays disabled.
|
|
32
35
|
bootEvidence = async () => null, now = Date.now,
|
|
@@ -59,8 +62,14 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
59
62
|
async function agentById(agentId) {
|
|
60
63
|
return (await agents()).find((agent) => agent.agentId === agentId) ?? null;
|
|
61
64
|
}
|
|
65
|
+
const agentNames = agent => [agent.profile.displayName, agent.profile.name];
|
|
66
|
+
function didYouMean(needle, all) {
|
|
67
|
+
const near = nearNames(needle, all, agentNames);
|
|
68
|
+
return near.length ? ` Did you mean ${near.map(agent => `${label(agent)} (${agent.agentId})`).join(', ')}? Ask the person before using it.` : '';
|
|
69
|
+
}
|
|
62
70
|
async function recipient(to) {
|
|
63
|
-
|
|
71
|
+
// find_agents' address (local:<agentId>) is accepted as it is (rec#110).
|
|
72
|
+
const needle = String(to ?? '').trim().replace(/^@\{?|\}$/g, '').replace(/^local:/, '');
|
|
64
73
|
const all = await agents();
|
|
65
74
|
const exact = all.find((agent) => agent.agentId === needle || agent.agentId === decodeURIComponent(needle));
|
|
66
75
|
if (exact) return exact;
|
|
@@ -72,7 +81,7 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
72
81
|
if (named.length === 1) return named[0];
|
|
73
82
|
throw validation(named.length
|
|
74
83
|
? `More than one Agent is named "${needle}"; use its agentId: ${named.map((agent) => agent.agentId).join(', ')}`
|
|
75
|
-
: `No active Agent matches "${needle}"
|
|
84
|
+
: `No active Agent matches "${needle}".${didYouMean(needle, all)} Call find_agents first.`);
|
|
76
85
|
}
|
|
77
86
|
|
|
78
87
|
// An Agent addressed by ID who works only in another project is a cross-project
|
|
@@ -136,7 +145,11 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
136
145
|
recentConversations: await conversations(agent, personalProjectId)
|
|
137
146
|
})));
|
|
138
147
|
const remote = peer ? await peer.remoteAgents({ query: needle, occupation, capability, projectId }).catch(() => null) : null;
|
|
148
|
+
// Nothing matched what the person typed: the closest names, as a question to them (rec#110).
|
|
149
|
+
const near = !local.length && needle && !project ? nearNames(needle, await agents(), agentNames) : [];
|
|
139
150
|
return { agents: local, ...(workUnavailable ? { workUnavailable } : {}),
|
|
151
|
+
...(near.length ? { didYouMean: near.map(agent => ({ agentId: agent.agentId, name: label(agent) })),
|
|
152
|
+
didYouMeanGuidance: 'No Agent has that name; ask the person whether they meant one of these before messaging it.' } : {}),
|
|
140
153
|
...(project ? { project: { projectId: personalProjectId, address: `project:${personalProjectId}`, reason: project.reason } } : {}),
|
|
141
154
|
...(remote ? { remoteAgents: remote.agents, ...(remote.unavailable ? { remoteUnavailable: remote.unavailable } : {}) } : {}),
|
|
142
155
|
guidance: remote
|
|
@@ -144,11 +157,15 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
144
157
|
: 'message_agent sends to an Agent (optionally one of its recentConversations) and returns its answer.' };
|
|
145
158
|
}
|
|
146
159
|
|
|
147
|
-
// Ordered attempts: the chosen conversation (or the Agent's
|
|
148
|
-
// fresh session with the Agent's memory in
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
160
|
+
// Ordered attempts (wake-ladder.js): the chosen conversation (or the Agent's
|
|
161
|
+
// latest one), then a fresh session with the Agent's memory, in the sender's
|
|
162
|
+
// own client first (preferClient), then in the Agent's other clients. Each
|
|
163
|
+
// candidate passed over is said on the ladder with why.
|
|
164
|
+
async function deliveryTargets(agent, conversation, projectId, projectPath, { clients = null, freshCwd = null, strictCwd = false,
|
|
165
|
+
preferClient = null, ladder = null } = {}) {
|
|
166
|
+
const permitted = (agent.profile.allowedClients ?? []).filter((client) => WAKE_CLIENTS.includes(client)
|
|
167
|
+
&& (!clients || clients.includes(client)));
|
|
168
|
+
const allowed = permitted.filter(client => clientAvailable(client));
|
|
152
169
|
const explicit = Boolean(conversation) && !['auto', 'new'].includes(conversation);
|
|
153
170
|
let resumable = null;
|
|
154
171
|
if (conversation !== 'new') {
|
|
@@ -156,16 +173,25 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
156
173
|
const candidates = explicit
|
|
157
174
|
? known.filter((session) => session.sessionId === conversation && (!strictCwd || session.projectId === projectId))
|
|
158
175
|
: known.filter((session) => !projectId || session.projectId === projectId);
|
|
176
|
+
if (!candidates.length) ladder?.skip('resume', { reason: 'no_previous_session' });
|
|
159
177
|
for (const session of candidates) {
|
|
160
|
-
|
|
178
|
+
const passed = reason => ladder?.skip('resume', { client: session.client, session: session.sessionId, reason });
|
|
179
|
+
if (!allowed.includes(session.client)) { passed(permitted.includes(session.client) ? 'client_unavailable' : 'client_not_allowed'); continue; }
|
|
161
180
|
const cwd = locateCwd(session.client, session.sessionId);
|
|
162
|
-
if (cwd) {
|
|
181
|
+
if (!cwd) { passed('session_not_found'); continue; }
|
|
182
|
+
// A running turn is never joined: a desktop app queues behind it, a headless wake passes it over (deliver).
|
|
183
|
+
resumable = { client: session.client, sessionId: session.sessionId, cwd,
|
|
184
|
+
...(turnRunning(session.client, session.sessionId) ? { busy: true } : {}) };
|
|
185
|
+
break;
|
|
163
186
|
}
|
|
164
187
|
if (explicit && !resumable) throw validation('That conversation cannot be resumed on this machine');
|
|
165
188
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
189
|
+
if (!explicit && preferClient && WAKE_CLIENTS.includes(preferClient) && !allowed.includes(preferClient)) {
|
|
190
|
+
ladder?.skip('new_session', { client: preferClient,
|
|
191
|
+
reason: permitted.includes(preferClient) ? 'client_unavailable' : 'client_not_allowed' });
|
|
192
|
+
}
|
|
193
|
+
const freshClients = explicit ? [resumable.client]
|
|
194
|
+
: [...new Set([preferClient ?? resumable?.client, ...WAKE_CLIENTS])].filter((client) => allowed.includes(client));
|
|
169
195
|
// A strict delivery only starts new sessions in a folder known for this project.
|
|
170
196
|
const strictFolder = strictCwd ? freshCwd ?? resumable?.cwd ?? await projectFolder(agent, projectId) : null;
|
|
171
197
|
if (strictCwd && !strictFolder) return resumable ? [resumable] : [];
|
|
@@ -188,13 +214,19 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
188
214
|
// Tries each target until one answers as the restored Agent. The grant is the
|
|
189
215
|
// only authority the woken session receives and is revoked after every attempt.
|
|
190
216
|
async function deliver({ ask, attempts, prompt, timeoutMs, issueGrant, signal, onSpawn, peerDepth, oneGrant = false,
|
|
191
|
-
readOnly = false }) {
|
|
217
|
+
readOnly = false, ladder = null }) {
|
|
192
218
|
const unusable = new Set();
|
|
193
219
|
let failure = 'wake_failed';
|
|
194
220
|
let cleanup = null;
|
|
195
221
|
for (const delivery of attempts) {
|
|
196
222
|
if (unusable.has(delivery.client)) continue;
|
|
197
223
|
if (signal?.aborted) { failure = 'cancelled'; break; }
|
|
224
|
+
// Resuming in place would write into a turn that is still running.
|
|
225
|
+
if (delivery.busy) {
|
|
226
|
+
failure = 'session_busy';
|
|
227
|
+
ladder?.skip('resume', { client: delivery.client, session: delivery.sessionId, reason: failure });
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
198
230
|
store.updateMessage(ask.id, { status: 'delivering', toClient: delivery.client, toSession: delivery.sessionId });
|
|
199
231
|
let answer;
|
|
200
232
|
let grant;
|
|
@@ -209,7 +241,10 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
209
241
|
{ code: 'delegation_not_redeemed' });
|
|
210
242
|
store.recordMemoryResult(ask.id, verified.memoryResultCount ?? 0);
|
|
211
243
|
} catch (error) {
|
|
212
|
-
failure = error
|
|
244
|
+
failure = attemptFailure(error);
|
|
245
|
+
ladder?.attempt(delivery, 'failed', failure);
|
|
246
|
+
// The team rules refused this Agent: no other channel or stand-in may reach it.
|
|
247
|
+
if (failure === 'not_permitted') break;
|
|
213
248
|
// A process that may still be running must not get a sibling on another channel.
|
|
214
249
|
if (error.cleanup) {
|
|
215
250
|
cleanup = error.cleanup;
|
|
@@ -230,6 +265,7 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
230
265
|
// the fail-closed backstop if the Provider is temporarily unreachable.
|
|
231
266
|
if (grant?.token) await host.revokeDelegation({ token: grant.token }).catch(() => {});
|
|
232
267
|
}
|
|
268
|
+
ladder?.attempt(delivery, 'answered');
|
|
233
269
|
return { answer, delivery, via: `${delivery.client}:${delivery.sessionId ? 'resume' : 'new'}` };
|
|
234
270
|
}
|
|
235
271
|
throw Object.assign(new Error('No client answered'), { code: failure, ...(cleanup ? { cleanup } : {}) });
|
|
@@ -261,7 +297,12 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
261
297
|
const target = resolved?.agent ?? await recipient(to);
|
|
262
298
|
const targetProjectId = projectId ?? agentProjectOutsideSender(target, from) ?? from.projectId;
|
|
263
299
|
const crossProject = Boolean(targetProjectId && from.projectId && targetProjectId !== from.projectId);
|
|
264
|
-
|
|
300
|
+
// The same FLA in another session is another instance of it (rec#109): it
|
|
301
|
+
// is reached by naming that session, never by its bare name.
|
|
302
|
+
if (from.agent?.agentId === target.agentId && !crossProject && !threadId
|
|
303
|
+
&& (['auto', 'new'].includes(conversation ?? 'auto') || conversation === from.session)) {
|
|
304
|
+
throw validation(await sameAgentGuidance(target, from));
|
|
305
|
+
}
|
|
265
306
|
const { thread, history } = openThread(threadId, from.projectId, body, label(target));
|
|
266
307
|
const ask = store.appendMessage(thread.id, { id: idFactory(), kind: 'ask', body, status: 'queued',
|
|
267
308
|
from: { agentId: from.agent?.agentId, name: from.agent ? label(from.agent) : CLIENT_LABELS[from.client] ?? from.client,
|
|
@@ -271,11 +312,14 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
271
312
|
// The source token never enters the communication log.
|
|
272
313
|
const nested = history.filter((message) => message.kind === 'ask' && message.status === 'delivering').length;
|
|
273
314
|
if (!wait || nested >= NESTED_ASK_LIMIT) return queued(thread, ask, target, nested ? 'nested_limit' : 'not_waiting');
|
|
274
|
-
if (!taskContextToken
|
|
275
|
-
const
|
|
315
|
+
if (!taskContextToken) return queued(thread, ask, target, 'task_context_required');
|
|
316
|
+
const ladder = createWakeLadder();
|
|
317
|
+
// A task outside every project holds no authority the Provider can pass on.
|
|
318
|
+
const woken = !from.projectId ? withoutGrant(ask, ladder) : await wakeAsk({ thread, ask, target, chatWakeChatId, signal, readOnly, ladder,
|
|
276
319
|
timeoutMs: Math.min(Math.max(timeoutSeconds, 30), 900) * 1000,
|
|
277
320
|
targets: async () => deliveryTargets(target, conversation, targetProjectId, crossProject ? null : projectPath,
|
|
278
|
-
|
|
321
|
+
{ preferClient: from.client, ladder,
|
|
322
|
+
...(crossProject ? { strictCwd: true, freshCwd: await verifiedProjectFolder(host, targetProjectId, projectPath) } : {}) }),
|
|
279
323
|
noTargets: () => crossProject && WAKE_CLIENTS.some(client => target.profile.allowedClients.includes(client) && clientAvailable(client))
|
|
280
324
|
? 'no_working_directory' : 'no_client',
|
|
281
325
|
prompt: wakePrompt({ thread, ask, target, senderName: ask.from_name, senderClient: from.client,
|
|
@@ -286,12 +330,27 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
286
330
|
targetSessionId: delivery.client === 'codex' ? delivery.sessionId : null,
|
|
287
331
|
lifetimeSeconds: lifetime }),
|
|
288
332
|
replyTo: { agentId: from.agent?.agentId, name: ask.from_name, client: from.client, session: from.session } });
|
|
289
|
-
if (woken.status !== 'answered')
|
|
333
|
+
if (woken.status !== 'answered') {
|
|
334
|
+
// Nobody could come: the sender's own session takes the recipient on, unless
|
|
335
|
+
// the recipient may still be running, the rules refused it, or this is a woken session.
|
|
336
|
+
// A cross-project ask keeps its strict boundary, and a chat or discussion turn
|
|
337
|
+
// must be the member itself.
|
|
338
|
+
if (woken.reason !== 'waiting_in_desktop_app' && standInAllowed(woken.reason) && !woken.cleanup
|
|
339
|
+
&& !env.FULI_ROUNDTABLE_DELEGATION && !crossProject && !readOnly && !chatWakeChatId) {
|
|
340
|
+
return { ...await enterStandIn({ host, store, thread, ask, target: { agentId: target.agentId, name: label(target),
|
|
341
|
+
occupation: target.occupation ?? null }, from: { name: ask.from_name, client: from.client, session: from.session },
|
|
342
|
+
projectId: targetProjectId, reason: woken.reason }), ladder: ladder.view('stand_in') };
|
|
343
|
+
}
|
|
344
|
+
return { ...queued(thread, ask, target, woken.reason, woken), ...cleanupView(woken.cleanup), ladder: ladder.view(woken.tier ?? null) };
|
|
345
|
+
}
|
|
290
346
|
replyInbox.handOver(woken.reply, 'message_agent');
|
|
291
347
|
const observation = await observeReturnedMemory(host, store, { ask, reply: woken.reply, from, taskContextToken });
|
|
292
348
|
return { status: 'answered', threadId: thread.id, messageId: ask.id, recipient: { agentId: target.agentId, name: label(target) },
|
|
293
349
|
...(observation ? { memoryObservation: observation } : {}),
|
|
294
|
-
via: woken.via, reply: woken.reply.body
|
|
350
|
+
via: woken.via, reply: woken.reply.body, ladder: ladder.view(woken.tier),
|
|
351
|
+
// A discussion turn records who answered with what (rec#129); other asks stay as they were.
|
|
352
|
+
...(readOnly ? { executor: { client: woken.reply.from_client, session: woken.reply.from_session,
|
|
353
|
+
model: woken.model ?? null } } : {}) };
|
|
295
354
|
}
|
|
296
355
|
|
|
297
356
|
// The one way an ask wakes its recipient, whoever sent it: a durable execution
|
|
@@ -299,7 +358,7 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
299
358
|
// verified answer becomes its reply. An ask that is not answered stays queued
|
|
300
359
|
// with the reason, so the recipient still sees it when it next works.
|
|
301
360
|
async function wakeAsk({ thread, ask, target, targets, noTargets, prompt, timeoutMs, signal, issueGrant, replyTo,
|
|
302
|
-
chatWakeChatId = null, readOnly = false }) {
|
|
361
|
+
chatWakeChatId = null, readOnly = false, ladder = null }) {
|
|
303
362
|
await wakeClaims.release(spaceId(), target.agentId);
|
|
304
363
|
const claim = store.claimExecution(spaceId(), target.agentId, ask.id, { chatWakeChatId });
|
|
305
364
|
if (!claim.claimed) {
|
|
@@ -318,15 +377,16 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
318
377
|
}
|
|
319
378
|
// A read-only turn cannot go to a desktop conversation, which runs with the person's own settings.
|
|
320
379
|
const app = readOnly ? null : desktopApp(attempts[0].client);
|
|
321
|
-
if (app) return handToDesktop({ thread, ask, target, delivery: attempts[0], app, timeoutMs, signal });
|
|
380
|
+
if (app) return handToDesktop({ thread, ask, target, delivery: attempts[0], app, timeoutMs, signal, ladder });
|
|
322
381
|
try {
|
|
323
|
-
const { answer, delivery, via } = await deliver({ ask, attempts, prompt, timeoutMs, signal, readOnly, issueGrant });
|
|
382
|
+
const { answer, delivery, via } = await deliver({ ask, attempts, prompt, timeoutMs, signal, readOnly, issueGrant, ladder });
|
|
324
383
|
finishWake(ask);
|
|
325
384
|
store.updateMessage(ask.id, { status: 'answered', via });
|
|
326
385
|
const reply = store.appendMessage(thread.id, { id: idFactory(), kind: 'reply', body: answer.body, status: 'sent',
|
|
327
386
|
inReplyTo: ask.id, via, from: { agentId: target.agentId, name: label(target), client: delivery.client,
|
|
328
387
|
session: answer.sessionId }, to: replyTo, delivery: replyInbox.pendingFor(replyTo) });
|
|
329
|
-
return { status: 'answered', reply, via
|
|
388
|
+
return { status: 'answered', reply, via, tier: delivery.sessionId ? 'resume' : 'new_session',
|
|
389
|
+
...(answer.model ? { model: answer.model } : {}) };
|
|
330
390
|
} catch (error) {
|
|
331
391
|
finishWake(ask, error);
|
|
332
392
|
store.updateMessage(ask.id, { status: 'queued', error: error.code ?? 'wake_failed' });
|
|
@@ -334,27 +394,64 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
334
394
|
}
|
|
335
395
|
}
|
|
336
396
|
|
|
337
|
-
// The ask joins
|
|
338
|
-
//
|
|
339
|
-
//
|
|
340
|
-
//
|
|
341
|
-
|
|
397
|
+
// The ask joins a conversation in the desktop app, where the person sees it
|
|
398
|
+
// being worked on: the Agent's own latest conversation when it has one (the
|
|
399
|
+
// app queues it behind a running turn), else the Agent's inbox conversation.
|
|
400
|
+
// The conversation answers with reply_agent_message. The caller waits for that
|
|
401
|
+
// reply up to its timeout; after it, the ask stays queued and the reply still
|
|
402
|
+
// reaches the thread.
|
|
403
|
+
async function handToDesktop({ thread, ask, target, delivery, app, timeoutMs, signal, ladder = null }) {
|
|
342
404
|
const inbox = { spaceId: spaceId(), agentId: target.agentId, projectId: messageProject(ask) ?? '', client: delivery.client };
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
405
|
+
const message = wakePrompt({ thread, ask, target, senderName: ask.from_name,
|
|
406
|
+
senderClient: ask.from_client, targetProjectId: ask.target_project_id, replyInInbox: true });
|
|
407
|
+
const handTo = async conversationId => {
|
|
346
408
|
store.updateMessage(ask.id, { status: 'queued', toClient: delivery.client, toSession: conversationId });
|
|
347
|
-
await app.handOff({ threadId: conversationId, message
|
|
348
|
-
|
|
409
|
+
await app.handOff({ threadId: conversationId, message });
|
|
410
|
+
};
|
|
411
|
+
let tier = null;
|
|
412
|
+
try {
|
|
413
|
+
if (delivery.sessionId) {
|
|
414
|
+
try {
|
|
415
|
+
await handTo(delivery.sessionId);
|
|
416
|
+
ladder?.attempt(delivery, 'handed_off');
|
|
417
|
+
tier = 'resume';
|
|
418
|
+
} catch (error) {
|
|
419
|
+
ladder?.attempt(delivery, 'failed', error.code ?? 'codex_app_failed');
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
if (!tier) {
|
|
423
|
+
const conversationId = store.desktopInboxes.find(inbox) ?? store.desktopInboxes.remember({ ...inbox,
|
|
424
|
+
conversationId: await app.createInbox({ cwd: delivery.cwd, greeting: inboxGreeting(target) }) });
|
|
425
|
+
await handTo(conversationId);
|
|
426
|
+
ladder?.attempt({ client: delivery.client, sessionId: null }, 'handed_off');
|
|
427
|
+
tier = 'new_session';
|
|
428
|
+
}
|
|
349
429
|
} catch (error) {
|
|
430
|
+
ladder?.attempt({ client: delivery.client, sessionId: null }, 'failed', error.code ?? 'wake_failed');
|
|
350
431
|
store.updateMessage(ask.id, { status: 'queued', error: error.code ?? 'wake_failed' });
|
|
351
432
|
return { status: 'queued', reason: error.code ?? 'wake_failed' };
|
|
352
433
|
} finally { finishWake(ask); }
|
|
353
434
|
const replied = await waitForChatChange(() => store.messages(thread.id).find(message => message.in_reply_to === ask.id) ?? null,
|
|
354
435
|
{ store: store.chat, signal, timeoutSeconds: timeoutMs / 1000, ready: Boolean }).catch(() => null);
|
|
355
436
|
const handed = store.getMessage(ask.id);
|
|
356
|
-
return replied ? { status: 'answered', reply: replied, via: replied.via }
|
|
357
|
-
: { status: 'queued', reason: 'waiting_in_desktop_app', toClient: handed.to_client, toSession: handed.to_session };
|
|
437
|
+
return replied ? { status: 'answered', reply: replied, via: replied.via, tier }
|
|
438
|
+
: { status: 'queued', reason: 'waiting_in_desktop_app', toClient: handed.to_client, toSession: handed.to_session, tier };
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
// A sender outside every project cannot grant a wake; the ladder says so for
|
|
442
|
+
// both tiers that need the grant.
|
|
443
|
+
function withoutGrant(ask, ladder) {
|
|
444
|
+
for (const tier of ['resume', 'new_session']) ladder.skip(tier, { reason: 'sender_without_project' });
|
|
445
|
+
store.updateMessage(ask.id, { status: 'queued', error: 'sender_without_project' });
|
|
446
|
+
return { status: 'queued', reason: 'sender_without_project' };
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
// Addressing one's own FLA by name: name the other session instead.
|
|
450
|
+
async function sameAgentGuidance(target, from) {
|
|
451
|
+
const others = (await conversations(target, null)).filter(session => session.sessionId !== from.session);
|
|
452
|
+
return `${label(target)} is the current task's own FLA. To reach another session of it, pass conversation: `
|
|
453
|
+
+ (others.length ? others.map(session => `"${session.sessionId}" (${CLIENT_LABELS[session.client] ?? session.client})`).join(', ')
|
|
454
|
+
: 'a sessionId from find_agents recentConversations (none is known now)') + '.';
|
|
358
455
|
}
|
|
359
456
|
|
|
360
457
|
// The recipient is resolved before the thread, so an unknown threadId never
|
|
@@ -523,7 +620,7 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
523
620
|
return { status: ask.status, threadId: ask.thread_id, messageId: ask.id,
|
|
524
621
|
recipient: { agentId: ask.to_agent, name: ask.to_name }, ...(reply ? { reply: reply.body, via: reply.via } : {}),
|
|
525
622
|
...(ask.error ? { reason: ask.error } : {}), ...cleanupView(storedCleanup(ask)),
|
|
526
|
-
...(ask.status === 'queued' ? await queuedState(ask) : {}) };
|
|
623
|
+
...(ask.status === 'queued' ? await queuedState(ask) : {}), ...(ask.status === 'stand_in' ? standInState(ask) : {}) };
|
|
527
624
|
}
|
|
528
625
|
|
|
529
626
|
async function cancelMessage({ taskContextToken, sourceApplication, messageId }) {
|
|
@@ -537,9 +634,9 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
537
634
|
function taskScopedAsk(me, messageId) {
|
|
538
635
|
const ask = store.getMessage(messageId);
|
|
539
636
|
const thread = ask && store.getThread(ask.thread_id);
|
|
540
|
-
if (!ask || ask.kind !== 'ask' || !me.agent ||
|
|
541
|
-
|| !((ask.from_agent === me.agent.agentId && thread.project_id
|
|
542
|
-
|| (ask.to_agent === me.agent.agentId && messageProject(ask)
|
|
637
|
+
if (!ask || ask.kind !== 'ask' || !me.agent || thread?.space_id !== spaceId()
|
|
638
|
+
|| !((ask.from_agent === me.agent.agentId && sameProject(thread.project_id, me.projectId))
|
|
639
|
+
|| (ask.to_agent === me.agent.agentId && sameProject(messageProject(ask), me.projectId)))) {
|
|
543
640
|
throw validation('No such message for this Agent in the current project');
|
|
544
641
|
}
|
|
545
642
|
return ask;
|
|
@@ -552,7 +649,7 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
552
649
|
if (!REMOTE_PENDING.has(ask.status)) return remoteView(ask);
|
|
553
650
|
return remoteView(applyRemote(ask.id, await peer.cancel(ask.id)));
|
|
554
651
|
}
|
|
555
|
-
if (ask.status
|
|
652
|
+
if (['queued', 'stand_in'].includes(ask.status)) store.updateMessage(ask.id, { status: 'cancelled', error: 'cancelled' });
|
|
556
653
|
else if (ask.status === 'delivering') throw validation('This message is being answered in another process; it ends at its timeout');
|
|
557
654
|
return statusOf(store.getMessage(ask.id));
|
|
558
655
|
}
|
|
@@ -570,30 +667,60 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
570
667
|
if (!me.agent) return { messages: [] };
|
|
571
668
|
const attentionReplies = me.projectId ? attentionInbox.read(me.agent.agentId, me.projectId) : [];
|
|
572
669
|
const { replies, more } = me.projectId ? replyInbox.read(me.agent.agentId, me.projectId) : { replies: [] };
|
|
670
|
+
const { replies: handbacks } = me.projectId ? handbackInbox.read(me.agent.agentId, me.projectId) : { replies: [] };
|
|
573
671
|
return { messages: store.pendingFor(spaceId(), me.agent.agentId)
|
|
574
672
|
.filter(message => messageProject(message) === me.projectId).map(inboxItem),
|
|
575
673
|
guidance: 'Answer each with reply_agent_message.',
|
|
576
674
|
...(replies.length ? { replies, repliesGuidance: `Answers to asks you sent, each returned once.${more
|
|
577
675
|
? ' More are waiting: call read_agent_messages again.' : ''}` } : {}),
|
|
676
|
+
...(handbacks.length ? { handbacks, handbacksGuidance: STAND_IN_HANDBACKS_GUIDANCE } : {}),
|
|
578
677
|
...(attentionReplies.length ? { attentionReplies, attentionRepliesGuidance: ATTENTION_REPLIES_GUIDANCE } : {}) };
|
|
579
678
|
}
|
|
580
679
|
|
|
581
680
|
async function replyMessage({ taskContextToken, sourceApplication, messageId, body }) {
|
|
582
681
|
const me = await sender({ taskContextToken, sourceApplication });
|
|
583
682
|
const ask = store.getMessage(messageId);
|
|
584
|
-
|
|
585
|
-
|
|
683
|
+
// The session that stood in answers for the Agent it stood in for; the Agent
|
|
684
|
+
// itself can still answer its own ask first.
|
|
685
|
+
if (ask?.kind === 'ask' && ask.status === 'stand_in' && me.session && ask.from_session === me.session
|
|
686
|
+
&& (ask.from_agent ?? null) === (me.agent?.agentId ?? null) && ask.to_client === me.client && ask.to_session === me.session) {
|
|
687
|
+
if (!standInInScope(ask, me)) throw validation('No such message for this Agent in the current project');
|
|
688
|
+
return recordStandInReply({ store, ask, executor: { client: me.client, session: me.session }, body, idFactory });
|
|
689
|
+
}
|
|
690
|
+
// The conversation FULI handed the ask to answers for its recipient, whichever
|
|
691
|
+
// FLA its task was entered as: a member's desktop conversation enters as the
|
|
692
|
+
// project lead it reports to, and its answer was refused (rec#111).
|
|
693
|
+
const handedHere = ask?.kind === 'ask' && Boolean(me.session) && ask.to_client === me.client && ask.to_session === me.session
|
|
694
|
+
&& ask.from_session !== me.session;
|
|
695
|
+
// The store reads by ID only: an ask of another space is never this task's to answer.
|
|
696
|
+
if (!ask || ask.kind !== 'ask' || !(handedHere || (me.agent && ask.to_agent === me.agent.agentId))
|
|
697
|
+
|| store.getThread(ask.thread_id)?.space_id !== spaceId()
|
|
698
|
+
|| !sameProject(messageProject(ask), me.projectId)) throw validation('No such message for this Agent');
|
|
699
|
+
const answering = me.agent && ask.to_agent === me.agent.agentId
|
|
700
|
+
? { agentId: me.agent.agentId, name: label(me.agent) } : { agentId: ask.to_agent, name: ask.to_name };
|
|
586
701
|
if (ask.target_project_id && ask.target_project_id !== store.getThread(ask.thread_id)?.project_id) {
|
|
587
|
-
if (await host.projectLeadId(ask.target_project_id) !==
|
|
702
|
+
if (await host.projectLeadId(ask.target_project_id) !== answering.agentId) throw validation('The target project lead changed');
|
|
588
703
|
}
|
|
589
704
|
if (ask.status === 'answered') throw validation('This message was already answered');
|
|
590
705
|
if (ask.from_agent?.startsWith('peer:')) throw validation('A remote device message is answered by its delivery, not from the inbox');
|
|
591
706
|
store.updateMessage(ask.id, { status: 'answered', via: `${me.client}:inbox` });
|
|
592
707
|
const to = { agentId: ask.from_agent, name: ask.from_name, client: ask.from_client, session: ask.from_session };
|
|
593
708
|
store.appendMessage(ask.thread_id, { id: idFactory(), kind: 'reply', body, status: 'sent', inReplyTo: ask.id,
|
|
594
|
-
via: `${me.client}:inbox`, from: {
|
|
709
|
+
via: `${me.client}:inbox`, from: { ...answering, client: me.client, session: me.session },
|
|
595
710
|
to, delivery: replyInbox.pendingFor(to) });
|
|
596
|
-
|
|
711
|
+
// asker: who this answer is for, so the turn's receipt can name them.
|
|
712
|
+
return { status: 'sent', threadId: ask.thread_id,
|
|
713
|
+
...(ask.from_agent ? { asker: { agentId: ask.from_agent, name: ask.from_name } } : {}) };
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
// A stand-in answers only inside the space and project its ask was sent from,
|
|
717
|
+
// and a stand-in is never cross-project (messageAgent), so the ask's target
|
|
718
|
+
// project is that same project. A task outside every project matches only null.
|
|
719
|
+
function standInInScope(ask, me) {
|
|
720
|
+
const thread = store.getThread(ask.thread_id);
|
|
721
|
+
if (!thread || thread.space_id !== spaceId()) return false;
|
|
722
|
+
const project = thread.project_id ?? null;
|
|
723
|
+
return project === (me.projectId ?? null) && (ask.target_project_id ?? project) === project;
|
|
597
724
|
}
|
|
598
725
|
|
|
599
726
|
function refreshRemote({ threadId = null } = {}) {
|
|
@@ -666,9 +793,12 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
666
793
|
? { token: env.FULI_ROUNDTABLE_DELEGATION, sessionId: sessionId ?? null } : null;
|
|
667
794
|
}
|
|
668
795
|
|
|
796
|
+
// A task with no project (a global assistant) reaches the messages of no project.
|
|
797
|
+
const sameProject = (left, right) => (left ?? null) === (right ?? null);
|
|
669
798
|
const messageProject = message => message.target_project_id ?? store.getThread(message.thread_id)?.project_id ?? null;
|
|
670
799
|
const attentionInbox = createAttentionInbox({ store, spaceId });
|
|
671
800
|
const replyInbox = createReplyInbox({ store, spaceId });
|
|
801
|
+
const handbackInbox = createReplyInbox({ store, spaceId, kind: 'handback' });
|
|
672
802
|
// A reply returned to the asker directly is not delivered again from its inbox.
|
|
673
803
|
const handedOver = (view, via) => {
|
|
674
804
|
if (view.reply) replyInbox.handOver(store.messages(view.threadId).find(message => message.in_reply_to === view.messageId), via);
|
|
@@ -702,12 +832,16 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
702
832
|
const ownerThread = async ({ threadId }) => ({ ...thread({ threadId }), ...await person.view(threadId) });
|
|
703
833
|
return { ...chat, findAgents, messageAgent, readMessages, replyMessage, threads, thread, refreshRemote, taskEntryDelegation,
|
|
704
834
|
messageStatus, cancelMessage, answerRemote,
|
|
835
|
+
// The folder a fresh wake of this lead would use: its latest session in the project, else the host's.
|
|
836
|
+
knownProjectFolder: ({ agentId, projectId }) => projectFolder({ agentId }, projectId),
|
|
705
837
|
discuss: discussions.discuss,
|
|
706
838
|
ownerGroupDiscussion: discussions.ownerView,
|
|
707
839
|
ownerStopGroupDiscussion: discussions.ownerStop,
|
|
708
840
|
recordGroupChoice: discussions.ownerRecordChoice,
|
|
709
841
|
requestGroupFollowUp: discussions.ownerFollowUp,
|
|
710
842
|
groupDiscussionStatus: discussions.ownerStatus,
|
|
843
|
+
joinGroupDiscussion: discussions.ownerJoin,
|
|
844
|
+
groupDiscussionTurns: discussions.ownerSessionTurn,
|
|
711
845
|
ownerMessageStatus: ({ messageId }) => statusOf(ownedAsk(messageId)),
|
|
712
846
|
// Cancelling is not evidence that a possibly running process exited; any cleanup hold stays.
|
|
713
847
|
ownerCancelMessage: ({ messageId }) => cancelAsk(ownedAsk(messageId)),
|
|
@@ -716,6 +850,7 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
716
850
|
deliverAttentionReply: attentionInbox.deliver,
|
|
717
851
|
attentionReplies: attentionInbox.taskEntry,
|
|
718
852
|
agentReplies: replyInbox.announce,
|
|
853
|
+
standInHandbacks: handbackInbox.announce,
|
|
719
854
|
ownerThread,
|
|
720
855
|
ownerSend: async input => ownerThread({ threadId: await person.send(input) }),
|
|
721
856
|
ownerSetMode: async input => ownerThread({ threadId: await person.setMode(input) }),
|
|
@@ -725,6 +860,13 @@ export function createAgentRoundtable({ host, peer = null, openStore, wake = wak
|
|
|
725
860
|
} };
|
|
726
861
|
}
|
|
727
862
|
|
|
863
|
+
// A Provider refusal of the grant without a code of its own (403: the
|
|
864
|
+
// reporting lines do not connect these Agents) is the team rules saying no.
|
|
865
|
+
function attemptFailure(error) {
|
|
866
|
+
if (error.status === 403 && (!error.code || error.code === 'provider_error')) return 'not_permitted';
|
|
867
|
+
return error.code ?? 'wake_failed';
|
|
868
|
+
}
|
|
869
|
+
|
|
728
870
|
function remoteRowId(kind, parts) {
|
|
729
871
|
return `peer-${kind}-${createHash('sha256').update(JSON.stringify(parts)).digest('hex').slice(0, 40)}`;
|
|
730
872
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { CLIENT_LABELS } from './delivery-state.js';
|
|
2
|
+
|
|
3
|
+
// The ladder's last tier (wake-ladder.js, rec#109): no session of the recipient
|
|
4
|
+
// could be brought in, so the sender's own session takes it on as a labelled
|
|
5
|
+
// 「代入」 (stand-in). It grants nothing: the session reads only the recipient's
|
|
6
|
+
// shareable index (the same one a `#FLG 一起看` session reads), and writes only
|
|
7
|
+
// to the roundtable: the stand-in's answer, recorded as the recipient's reply
|
|
8
|
+
// with the real executor, and a handback the recipient itself reads at its next
|
|
9
|
+
// task. Each FLA's own checkpoint keeps only its own work.
|
|
10
|
+
|
|
11
|
+
const STAND_IN_VIA = 'stand_in';
|
|
12
|
+
// The executor's model is what the client runs; FULI does not see it, and never guesses.
|
|
13
|
+
const UNKNOWN_MODEL = '-';
|
|
14
|
+
|
|
15
|
+
const STAND_IN_GUIDANCE = 'No session of this FLA could be brought in (see ladder), so this session stands in for it as 「代入」. '
|
|
16
|
+
+ 'Show the present line once. Prefix everything the stand-in says with speaker. Read only standIn.scope and the stand-in\'s own items on demand; '
|
|
17
|
+
+ 'never put your own private memory into its answer or its context into yours. Your checkpoint records only your own work. '
|
|
18
|
+
+ 'When it is done, call reply_agent_message(messageId, body = its increment: what it did, conclusions, blockers): FULI records that as its stand-in reply '
|
|
19
|
+
+ 'and hands it to the FLA for its next task. End the reply with standIn.receipt.markdown.';
|
|
20
|
+
|
|
21
|
+
export async function enterStandIn({ host, store, thread, ask, target, from, projectId, reason }) {
|
|
22
|
+
store.updateMessage(ask.id, { status: 'stand_in', error: reason, toClient: from.client, toSession: from.session });
|
|
23
|
+
let scope = null, scopeUnavailable = null;
|
|
24
|
+
try {
|
|
25
|
+
scope = await host.standInScope?.({ agentId: target.agentId, name: target.name, occupation: target.occupation,
|
|
26
|
+
projectId, text: ask.body, client: from.client, sessionId: from.session }) ?? null;
|
|
27
|
+
} catch (error) { scopeUnavailable = error.code ?? 'scope_unavailable'; }
|
|
28
|
+
const executor = { client: from.client, session: from.session, model: UNKNOWN_MODEL };
|
|
29
|
+
return { status: 'stand_in', threadId: thread.id, messageId: ask.id, reason,
|
|
30
|
+
recipient: { agentId: target.agentId, name: target.name },
|
|
31
|
+
standIn: {
|
|
32
|
+
present: `在场:${from.name} & ${target.name}(代入)`,
|
|
33
|
+
speaker: `【${target.name} · 代入】`,
|
|
34
|
+
...(scope ? { scope } : {}), ...(scopeUnavailable ? { scopeUnavailable } : {}),
|
|
35
|
+
receipt: { identity: { agentId: target.agentId, name: target.name }, mode: STAND_IN_VIA, executor,
|
|
36
|
+
markdown: `代入:${target.name}(实际执行:${clientName(from.client)} 本会话,模型 ${UNKNOWN_MODEL};不是 ${target.name} 自己的客户端)` },
|
|
37
|
+
guidance: STAND_IN_GUIDANCE } };
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// The stand-in's answer, given by the session that stood in: the recipient's
|
|
41
|
+
// reply (the asker wrote it, so nothing waits in the asker's inbox) and the
|
|
42
|
+
// recipient's handback. Both name the real client and session.
|
|
43
|
+
export function recordStandInReply({ store, ask, executor, body, idFactory }) {
|
|
44
|
+
const via = `${executor.client}:${STAND_IN_VIA}`;
|
|
45
|
+
store.updateMessage(ask.id, { status: 'answered', via });
|
|
46
|
+
const recipient = { agentId: ask.to_agent, name: ask.to_name };
|
|
47
|
+
store.appendMessage(ask.thread_id, { id: idFactory(), kind: 'reply', body, status: 'sent', inReplyTo: ask.id, via,
|
|
48
|
+
from: { ...recipient, client: executor.client, session: executor.session },
|
|
49
|
+
to: { agentId: ask.from_agent, name: ask.from_name, client: ask.from_client, session: ask.from_session } });
|
|
50
|
+
store.appendMessage(ask.thread_id, { id: idFactory(), kind: 'handback', body, status: 'sent', inReplyTo: ask.id, via,
|
|
51
|
+
from: { agentId: ask.from_agent, name: ask.from_name, client: executor.client, session: executor.session },
|
|
52
|
+
to: recipient, targetProjectId: ask.target_project_id, delivery: 'pending' });
|
|
53
|
+
return { status: 'sent', threadId: ask.thread_id, standIn: true };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// What get_agent_message_status says about an ask a session stands in for.
|
|
57
|
+
export function standInState(ask) {
|
|
58
|
+
return { delivery: STAND_IN_VIA, guidance: `${ask.from_name}'s ${clientName(ask.to_client)} session is standing in for ${ask.to_name} (代入). `
|
|
59
|
+
+ `${ask.to_name} also sees it in its inbox and may answer first; the stand-in answers with reply_agent_message.` };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function clientName(client) {
|
|
63
|
+
return CLIENT_LABELS[client] ?? client;
|
|
64
|
+
}
|