fuli-context 0.25.2 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -3
- package/README.zh-CN.md +19 -4
- package/dist/web/assets/{AboutPage-Dx07_Z8u.js → AboutPage-Bp2Edkdg.js} +1 -1
- package/dist/web/assets/{AboutSectionHeading-BdhpM609.js → AboutSectionHeading-DFfY2f_Z.js} +1 -1
- package/dist/web/assets/{AgentAppsPage-5VW0uCTz.js → AgentAppsPage-CjyvPZSs.js} +1 -1
- package/dist/web/assets/{AgentAvatar-DlAQP7gm.js → AgentAvatar-w-2A3nsJ.js} +1 -1
- package/dist/web/assets/{AgentHand-FPFg9-Y1.js → AgentHand-BGGU49Jt.js} +1 -1
- package/dist/web/assets/{AgentManagement-CLFw9oV9.css → AgentManagement-Cc00RLSO.css} +1 -1
- package/dist/web/assets/{AgentManagement-UTe4I3WA.js → AgentManagement-MMGrwdD2.js} +2 -2
- package/dist/web/assets/{AgentMentionCopy-C5ExlutT.js → AgentMentionCopy-BAHZjubz.js} +1 -1
- package/dist/web/assets/{AgentName-C8mYbtKs.js → AgentName-CXlsC-4o.js} +1 -1
- package/dist/web/assets/{AgentProfilePage-DumsVHP1.css → AgentProfilePage-Ce25JSzZ.css} +1 -1
- package/dist/web/assets/{AgentProfilePage-BLeyT3By.js → AgentProfilePage-eDKbJJwY.js} +5 -5
- package/dist/web/assets/{AgentServicesPage-BXi152Xc.js → AgentServicesPage-CZwsN5U2.js} +1 -1
- package/dist/web/assets/{AppViewerPage-BR8ttEGa.js → AppViewerPage-6gWP6nAf.js} +1 -1
- package/dist/web/assets/{BackToTop-5_AQRMZl.js → BackToTop-Cs5_rV99.js} +1 -1
- package/dist/web/assets/{BoardCardFieldsMenu-Bb_Z9a4Q.js → BoardCardFieldsMenu-CvFrsIgy.js} +1 -1
- package/dist/web/assets/{BoardMoveMenu-B-f8O6cC.js → BoardMoveMenu-B5isxIcK.js} +1 -1
- package/dist/web/assets/{Breadcrumb-DtM5lZy5.js → Breadcrumb-BXTA4e-W.js} +1 -1
- package/dist/web/assets/CaptureChangePage-Ca72_PHc.js +1 -0
- package/dist/web/assets/{CopyFixPrompt-CVFYWDSt.js → CopyFixPrompt-wGATZKOq.js} +1 -1
- package/dist/web/assets/{DataFormatPage-DwL4Ofc9.js → DataFormatPage-CQKkFhcH.js} +1 -1
- package/dist/web/assets/{DebugTurnPage-UpK_3ZWY.js → DebugTurnPage-CUqbuhgX.js} +1 -1
- package/dist/web/assets/{DebugTurnsPage-C0aZg5-3.js → DebugTurnsPage-HwaTG8Fa.js} +1 -1
- package/dist/web/assets/{DialogTitle-BQXOe8EK.js → DialogTitle-HYzAHbGg.js} +1 -1
- package/dist/web/assets/{EmployeeRedirectPage-BjWpXDSM.js → EmployeeRedirectPage-C2SHpAEF.js} +1 -1
- package/dist/web/assets/{EmployeeScopeDialog-Bt3ZlDyZ.js → EmployeeScopeDialog-yUCgujKT.js} +1 -1
- package/dist/web/assets/{EmployeeWorkbench-GtJIUD5G.js → EmployeeWorkbench-CbRJhkJO.js} +3 -3
- package/dist/web/assets/FieldRoot-BLcsuPMA.js +1 -0
- package/dist/web/assets/{FlaGrowth-OQtTLTng.js → FlaGrowth-DGnUPN7D.js} +1 -1
- package/dist/web/assets/{FlaOccupationKit-C-x4VrKk.js → FlaOccupationKit-DAJjSrmL.js} +1 -1
- package/dist/web/assets/{FlaTaskSheets-CoaF5CbQ.js → FlaTaskSheets-DRLgfrVC.js} +1 -1
- package/dist/web/assets/{FlasPage-CgIVOGFM.js → FlasPage-CMv2awKJ.js} +1 -1
- package/dist/web/assets/{GrowthLoading-VuVo2vLf.js → GrowthLoading-NLj2W4jj.js} +1 -1
- package/dist/web/assets/{HowtoPage-CZ3mOdLc.js → HowtoPage-CkGRrKpf.js} +1 -1
- package/dist/web/assets/InboxPage-Bv8XUdl8.css +1 -0
- package/dist/web/assets/InboxPage-DfQvtnyq.js +6 -0
- package/dist/web/assets/{KnowledgeDeleteButton-BlUnSG3b.js → KnowledgeDeleteButton-DaT-gTmm.js} +1 -1
- package/dist/web/assets/{KnowledgeHardDeleteSection-CznXBtHY.js → KnowledgeHardDeleteSection-C9d7DVLa.js} +1 -1
- package/dist/web/assets/{KnowledgeItemEditPage-DGRNkAYd.js → KnowledgeItemEditPage-BUKQK37o.js} +1 -1
- package/dist/web/assets/{KnowledgeItemSummaryCard-Co5JKBHl.js → KnowledgeItemSummaryCard-eLzjKvgN.js} +1 -1
- package/dist/web/assets/KnowledgeOrganizerPage-CiZ9JlNX.js +1 -0
- package/dist/web/assets/KnowledgePage-C3_Cvz4g.js +1 -0
- package/dist/web/assets/{KnowledgePeek-CwZVuSkf.css → KnowledgePeek-D6SeISIM.css} +1 -1
- package/dist/web/assets/KnowledgePeek-DtOOiARX.js +1 -0
- package/dist/web/assets/{KnowledgeTurnReceiptPage-Csyjimeg.js → KnowledgeTurnReceiptPage-Dne5NQ9q.js} +1 -1
- package/dist/web/assets/KnowledgeWorkspace-Cq_XYcma.js +4 -0
- package/dist/web/assets/KnowledgeWorkspace-DDg3tUb3.css +1 -0
- package/dist/web/assets/{MeAvatar-aY_q8cKs.js → MeAvatar-f6qxg9dN.js} +1 -1
- package/dist/web/assets/{MeLink-B0pNwVLa.js → MeLink-DTvFYaYE.js} +1 -1
- package/dist/web/assets/{MenuSeparator-BR-uLovR.js → MenuSeparator-CLmsZ9rj.js} +1 -1
- package/dist/web/assets/ModelSettingsPage-B38R-kBZ.css +1 -0
- package/dist/web/assets/ModelSettingsPage-COVaW4eh.js +1 -0
- package/dist/web/assets/NewSessionPanel-9yINjwyx.js +1 -0
- package/dist/web/assets/NewSessionPanel-CTdd7xpN.css +1 -0
- package/dist/web/assets/{NotFoundPage-Cr1MaPuk.js → NotFoundPage-CqevPz0_.js} +1 -1
- package/dist/web/assets/NoticeRow-D5MWTeBY.js +1 -0
- package/dist/web/assets/{OccupationsPage-CkVqZ2pz.js → OccupationsPage-BKd051j1.js} +1 -1
- package/dist/web/assets/OverviewPage-C90G_adj.js +1 -0
- package/dist/web/assets/{OverviewPage-Dr4jrXW4.css → OverviewPage-KVt4LcE-.css} +1 -1
- package/dist/web/assets/{PageColumns-DvehZlYm.js → PageColumns-Df60nEzj.js} +1 -1
- package/dist/web/assets/PageOutline-D5h1GuKt.css +1 -0
- package/dist/web/assets/PageOutline-HHUlu2x3.js +1 -0
- package/dist/web/assets/{PersonalProfilePage-TxsNr44t.js → PersonalProfilePage-DIDgG3NH.js} +1 -1
- package/dist/web/assets/PersonalProjectsPage-DwhlEpNg.js +1 -0
- package/dist/web/assets/{PinIcon-BTQsnxRY.js → PinIcon-DP-9Iisk.js} +1 -1
- package/dist/web/assets/{PopperContent-DtMksk76.js → PopperContent-DWCMeKSL.js} +1 -1
- package/dist/web/assets/{Presence-B0zMpCF4.js → Presence-Ba3jqPYx.js} +1 -1
- package/dist/web/assets/{ProfileAuthorChip-BqT9Vv65.js → ProfileAuthorChip-BKZJC_N2.js} +1 -1
- package/dist/web/assets/ProjectAgentsPage-BefVF9ZP.js +5 -0
- package/dist/web/assets/ProjectJudgmentPolicy-BHyiqKLV.css +1 -0
- package/dist/web/assets/ProjectJudgmentPolicy-BJ5sVuFI.js +2 -0
- package/dist/web/assets/{RecentNotices-vJobVOcm.js → RecentNotices-CDHGIky1.js} +1 -1
- package/dist/web/assets/{RoundtablesPage-C3dYekQ5.js → RoundtablesPage-D5Xc3yun.js} +2 -2
- package/dist/web/assets/{RovingFocusGroup-CUqyjFSs.js → RovingFocusGroup-DoGybG5V.js} +1 -1
- package/dist/web/assets/{RovingFocusItem-CyyuWXjE.js → RovingFocusItem-B455TzUI.js} +1 -1
- package/dist/web/assets/{SessionMigrationPage-DukDM0TP.js → SessionMigrationPage-BAzXqxxO.js} +1 -1
- package/dist/web/assets/{SessionRecordsPage-DZ5ZBiuS.js → SessionRecordsPage-C6U5YGSt.js} +1 -1
- package/dist/web/assets/SettingsPage-7mNL3bwe.js +1 -0
- package/dist/web/assets/SettingsPage-Cku8SoLk.css +1 -0
- package/dist/web/assets/{SharedJefaReportPage-DUY03VLS.js → SharedJefaReportPage-rH6I4cI9.js} +1 -1
- package/dist/web/assets/{TagVocabularyPage-BKLFJiSu.js → TagVocabularyPage-Brpr-Q-y.js} +1 -1
- package/dist/web/assets/{TaskBlockerClear-BxOiiuK8.js → TaskBlockerClear-BHOMZYwm.js} +1 -1
- package/dist/web/assets/TaskBlockerNotice-POmS2neR.js +1 -0
- package/dist/web/assets/{TaskReason-D5j7L8tl.js → TaskReason-RKKs4Kb5.js} +1 -1
- package/dist/web/assets/{TeamCard-CDunbIrP.js → TeamCard-8hjo1h0x.js} +1 -1
- package/dist/web/assets/{TeamCardsWidget-CUW-fPn7.js → TeamCardsWidget-DIHFUDrF.js} +1 -1
- package/dist/web/assets/{TeamIsland-CmpDmIX2.js → TeamIsland-DdhEcVOZ.js} +1 -1
- package/dist/web/assets/{Teleport-Dzdr8umQ.js → Teleport-CukHuRhz.js} +1 -1
- package/dist/web/assets/{TextField-BPhEpEv9.js → TextField-G2fJ4aFQ.js} +1 -1
- package/dist/web/assets/{TonborgDelegationSwitch-C1nkJqkJ.js → TonborgDelegationSwitch-BA3Qb8Wr.js} +1 -1
- package/dist/web/assets/{UiChip-BEQ067LV.js → UiChip-BHEJVA6L.js} +1 -1
- package/dist/web/assets/{UiChip-DulygSq8.css → UiChip-BiUmvjdz.css} +1 -1
- package/dist/web/assets/{UiDialog-JjqzOA0z.js → UiDialog-bUwGQz96.js} +1 -1
- package/dist/web/assets/{UiDisclosure-L6GEJHSw.js → UiDisclosure-B1pd8qXW.js} +1 -1
- package/dist/web/assets/UiIcon-K7OhYTSy.js +1 -0
- package/dist/web/assets/{UiIconButton-ZCBdABdM.css → UiIconButton-D3R6WwwI.css} +1 -1
- package/dist/web/assets/UiIconButton-DlLZ5_Yc.js +1 -0
- package/dist/web/assets/{UiSegmented-CIIm3KoV.js → UiSegmented-CYrTxDn1.js} +1 -1
- package/dist/web/assets/{UiWeight-D-2iZ_Kc.js → UiWeight-eAw682rH.js} +1 -1
- package/dist/web/assets/{VirtualDirectoryList-BV8KsA-Z.js → VirtualDirectoryList-BGum1GZc.js} +1 -1
- package/dist/web/assets/{VisuallyHidden-BxKxuXRF.js → VisuallyHidden-Ck6D7rq-.js} +1 -1
- package/dist/web/assets/{VisuallyHiddenInput-DD4vhlqT.js → VisuallyHiddenInput-DXWhIUlB.js} +1 -1
- package/dist/web/assets/WidgetSlot-D6vCSWaz.js +2 -0
- package/dist/web/assets/{WorkbenchListHead-B0TjHsTO.js → WorkbenchListHead-CR_fDYYr.js} +1 -1
- package/dist/web/assets/WorkbenchListPage-Zr5PW-cf.js +1 -0
- package/dist/web/assets/_plugin-vue_export-helper-BRS32yXs.js +9 -0
- package/dist/web/assets/{agent-apps-B1Je-mpY.js → agent-apps-D0eG1aMx.js} +1 -1
- package/dist/web/assets/agent-occupation-CEd3bAhb.js +1 -0
- package/dist/web/assets/{agent-pins-DxHlJ96z.js → agent-pins-OYjJQ38F.js} +1 -1
- package/dist/web/assets/agent-profile-TuRobv9N.css +1 -0
- package/dist/web/assets/agent-roster-records-CsYjmaNn.js +1 -0
- package/dist/web/assets/{agent-work-summary-o_9-QWBL.js → agent-work-summary-BOeJ4JXc.js} +1 -1
- package/dist/web/assets/{agent-workflows-DgdbJqpg.js → agent-workflows-D3VeY6Yz.js} +1 -1
- package/dist/web/assets/{attach-closest-edge-DUc_VUVO.js → attach-closest-edge-C75rKXiz.js} +1 -1
- package/dist/web/assets/{attention-store-Bod20yM3.js → attention-store-k4mPCefZ.js} +1 -1
- package/dist/web/assets/{badge-tMy2Qr94.js → badge-B2rll-68.js} +1 -1
- package/dist/web/assets/{button-DnKFsImW.js → button-q6JhonlL.js} +1 -1
- package/dist/web/assets/{card-Ccu7HCNb.js → card-CPQiMHSu.js} +1 -1
- package/dist/web/assets/{catalog-CJUV8OJ6.js → catalog-CBPcEkXC.js} +1 -1
- package/dist/web/assets/{checkbox-D1R6kTUB.js → checkbox-C67upxzl.js} +1 -1
- package/dist/web/assets/{client-D-G2i5VU.js → client-KFFphxpK.js} +1 -1
- package/dist/web/assets/{client-links-store-UgmraFBZ.js → client-links-store-Cw9c8MWc.js} +1 -1
- package/dist/web/assets/{combobox-C7QLYGzs.js → combobox-yHRJ-zN-.js} +1 -1
- package/dist/web/assets/console-BCR2S3AF.js +1 -0
- package/dist/web/assets/conversation-launcher-settings-28CqC1Gn.js +1 -0
- package/dist/web/assets/{copy-mention-C0EJhDPy.js → copy-mention-C4Nos381.js} +1 -1
- package/dist/web/assets/{dialog-Bbq93W68.js → dialog-Cjoy4nsv.js} +1 -1
- package/dist/web/assets/{dist-PpsW5ZE3.js → dist-CaVgk2QB.js} +1 -1
- package/dist/web/assets/{dist-Dd8yFhv6.js → dist-D73EXNtz.js} +1 -1
- package/dist/web/assets/{dropdown-menu-1fGUL0V3.js → dropdown-menu-Dto6hjoc.js} +1 -1
- package/dist/web/assets/{field-DjVv_wIS.js → field-BaUOZtN5.js} +1 -1
- package/dist/web/assets/{format-bytes-BKq_E0Hs.js → format-bytes-D5eCtdg1.js} +1 -1
- package/dist/web/assets/{hover-card-BO-929hq.js → hover-card-Bg0dulGq.js} +1 -1
- package/dist/web/assets/index-B-aRUs9w.js +24 -0
- package/dist/web/assets/index-HRZACEmh.css +1 -0
- package/dist/web/assets/{input-DmwRmYO2.js → input-Dxh25T4M.js} +1 -1
- package/dist/web/assets/{label-BvwPUTS4.js → label-CbrduZla.js} +1 -1
- package/dist/web/assets/label-table-_YAtPkRI.js +1 -0
- package/dist/web/assets/{model-Tmn6HvL-.js → model--lR9icA_.js} +1 -1
- package/dist/web/assets/{model-DpkZUZUL.js → model-Bgh75q3j.js} +1 -1
- package/dist/web/assets/model-Big7Ppeu.js +1 -0
- package/dist/web/assets/{model-BF_ZMPLi.js → model-Blk5Wgg2.js} +1 -1
- package/dist/web/assets/{model-0TZRbkN2.js → model-CWMP5GOL.js} +1 -1
- package/dist/web/assets/{model-y7OUvtKz.js → model-D4DkvMH-.js} +1 -1
- package/dist/web/assets/{model-CaR7VPg7.js → model-DcsCYhXk.js} +1 -1
- package/dist/web/assets/model-ZwOxwk2m.js +3 -0
- package/dist/web/assets/{model-Dfe81jZT.js → model-jC3F-J2F.js} +1 -1
- package/dist/web/assets/{motion-mAmbRj_M.js → motion-BL3lek9c.js} +1 -1
- package/dist/web/assets/{motion-C1fZrqmI.js → motion-_MepnmMC.js} +1 -1
- package/dist/web/assets/{motion-preference-Dz9S1bZa.js → motion-preference-D3UMHojT.js} +1 -1
- package/dist/web/assets/{occupation-catalog-_SnxxRbK.js → occupation-catalog-BeJ2O9nm.js} +1 -1
- package/dist/web/assets/{occupation-kits-DFC6Auuc.js → occupation-kits-Bkiu6MzD.js} +1 -1
- package/dist/web/assets/{option-DC8frdbr.js → option-Crs2MA88.js} +1 -1
- package/dist/web/assets/{orchestration-filters-UeiAHJqn.js → orchestration-filters-3AfjDoHQ.js} +1 -1
- package/dist/web/assets/overview-data-BIeNATEJ.js +1 -0
- package/dist/web/assets/{page-refresh-DdRJaxMv.js → page-refresh-Bz5r7A_Q.js} +1 -1
- package/dist/web/assets/{page-title-Cm9u_qw1.js → page-title-KYZApNys.js} +1 -1
- package/dist/web/assets/{person-profile-BH2AzOfw.js → person-profile-mhLxWtq7.js} +1 -1
- package/dist/web/assets/{popover-DW__YCSE.js → popover-CMahoDLo.js} +1 -1
- package/dist/web/assets/popup-host-DKN99Od3.js +1 -0
- package/dist/web/assets/{profile-model-DtISOJ-X.js → profile-model-DWutKuCZ.js} +1 -1
- package/dist/web/assets/{project-board-layout-CTM8kAgq.js → project-board-layout-CWMHQuUA.js} +1 -1
- package/dist/web/assets/{project-capture-B3pNhpFF.js → project-capture-CebFSnn0.js} +1 -1
- package/dist/web/assets/{project-origin-BO8Ngccf.js → project-origin-BnUVE0be.js} +1 -1
- package/dist/web/assets/{quick-edit-api-B169r5Qb.js → quick-edit-api-YwzoODMc.js} +1 -1
- package/dist/web/assets/{radio-group-DqA46cXQ.js → radio-group-vRt8y8mF.js} +1 -1
- package/dist/web/assets/review-api-WhNB3ppo.js +1 -0
- package/dist/web/assets/{review-list-BbV-Mle7.js → review-list-_PN7ljSY.js} +1 -1
- package/dist/web/assets/review-store-CobX9No6.js +1 -0
- package/dist/web/assets/{role-names-By0xdfTn.js → role-names-wD9l8uz5.js} +1 -1
- package/dist/web/assets/{roundtable-live-u9qUU6aA.js → roundtable-live-Dm4Vwo75.js} +1 -1
- package/dist/web/assets/{runtime-dom.esm-bundler-DhFy4Djs.js → runtime-dom.esm-bundler-DzfwnSj8.js} +1 -1
- package/dist/web/assets/{select-TqPBladU.js → select-B9mVptgx.js} +1 -1
- package/dist/web/assets/{session-launch-offers-CtQeY4Qk.js → session-launch-offers-C9UkoKUJ.js} +1 -1
- package/dist/web/assets/{settings-autosave-C7vW3_SP.js → settings-autosave-L0zSXnBO.js} +1 -1
- package/dist/web/assets/{npm-copies-GRyMAduA.css → settings-tabs-C9VDs91j.css} +1 -1
- package/dist/web/assets/settings-tabs-DTbgqX8g.js +1 -0
- package/dist/web/assets/{shared-report-DQBSigHB.js → shared-report-0FO_y0sa.js} +3 -3
- package/dist/web/assets/source-adapters-r-NIqO77.js +1 -0
- package/dist/web/assets/{switch-D7w_0h3m.js → switch-BCzrGc4W.js} +1 -1
- package/dist/web/assets/{tabs-DR8k0PN9.js → tabs-CB38D8N0.js} +1 -1
- package/dist/web/assets/{task-card-fields-X1ZYCm_j.js → task-card-fields-B1z1PmTT.js} +1 -1
- package/dist/web/assets/task-evidence-DydhKn9x.js +1 -0
- package/dist/web/assets/{task-labels-LuXoQhF9.js → task-labels-DTc5OuFF.js} +1 -1
- package/dist/web/assets/{task-reason-ChpbGtyx.js → task-reason-CneTZWRv.js} +1 -1
- package/dist/web/assets/{team-sheets-DYCQqa8I.js → team-sheets-CUt3Vp2s.js} +1 -1
- package/dist/web/assets/{textarea-D53VYanK.js → textarea-DJ0ucCir.js} +1 -1
- package/dist/web/assets/{ui-DmNbL8MW.js → ui-M_UKzb_A.js} +1 -1
- package/dist/web/assets/{useAgentRecords-Hy9nqMs7.js → useAgentRecords-CwkwZy8H.js} +1 -1
- package/dist/web/assets/{useAgentWorkSummary-mloD4p12.js → useAgentWorkSummary-DoiCqME7.js} +1 -1
- package/dist/web/assets/{useApi-CROJJdhE-DnUGUb8O.js → useApi-CROJJdhE-CenjhnR5.js} +1 -1
- package/dist/web/assets/{useClipboardCopy-BTuQMeWI.js → useClipboardCopy-Ba86PzjA.js} +1 -1
- package/dist/web/assets/{useFocusReturn-4hUmSzj9.js → useFocusReturn-B0ErBkt_.js} +1 -1
- package/dist/web/assets/{useForwardExpose-BDmW7q7u.js → useForwardExpose-DJ6fcpI2.js} +1 -1
- package/dist/web/assets/{useForwardPropsEmits-BzT2luD4.js → useForwardPropsEmits-D1vvIUcB.js} +1 -1
- package/dist/web/assets/useForwardScopeId-CoSQtoUU.js +1 -0
- package/dist/web/assets/{useKnowledgeConfirm-L8wnJCuX.js → useKnowledgeConfirm-781LUhoU.js} +1 -1
- package/dist/web/assets/{useKnowledgeItemPeek-C_huXt6E.js → useKnowledgeItemPeek-CnuCvJKQ.js} +1 -1
- package/dist/web/assets/{useMinimumLoadingDisplay-Dkl8NQru.js → useMinimumLoadingDisplay-DCC9EfQ9.js} +1 -1
- package/dist/web/assets/{usePageTools-CbDOdIrg.js → usePageTools-BaB021q0.js} +1 -1
- package/dist/web/assets/usePrimitiveElement-iRKqOVuY.js +1 -0
- package/dist/web/assets/{useProjectAgentRoster-BBmRvcgr.js → useProjectAgentRoster-M3wbWpS-.js} +1 -1
- package/dist/web/assets/{useRoutePeek-CRbCDqsm.js → useRoutePeek-CYg5JyYt.js} +1 -1
- package/dist/web/assets/useTeamPeople-CPC62La3.js +1 -0
- package/dist/web/assets/{useTeamWork-CXEQwF4n.js → useTeamWork-Dql3_qLV.js} +1 -1
- package/dist/web/assets/{useTypeahead-CVYuxPOD.js → useTypeahead-DYb5kVkH.js} +1 -1
- package/dist/web/assets/{utils-BnrWDlfm.js → utils-B7sUn8rD.js} +1 -1
- package/dist/web/assets/{utils-BsGjKHV8.js → utils-Cli0RsEd.js} +1 -1
- package/dist/web/assets/{verification-DbCo_dnY.js → verification-DY7kllTI.js} +1 -1
- package/dist/web/assets/version-CBgUEmnM.js +1 -0
- package/dist/web/assets/{vue-router-D4_ms6om.js → vue-router-ab7kABlJ.js} +1 -1
- package/dist/web/index.html +82 -86
- package/docs/agent-conversations-and-collaboration.md +6 -0
- package/docs/agent-interface-architecture.md +4 -1
- package/docs/client-connections.md +29 -5
- package/docs/employee-agents.md +1 -1
- package/docs/external-knowledge-architecture.md +8 -3
- package/docs/judgment-and-autonomy.md +6 -4
- package/docs/project-agent-memory.md +12 -1
- package/graph-provider/fuli_graph/app.py +12 -234
- package/graph-provider/fuli_graph/auth.py +10 -0
- package/graph-provider/fuli_graph/builtin_embedding.py +388 -0
- package/graph-provider/fuli_graph/builtin_embedding_routes.py +53 -0
- package/graph-provider/fuli_graph/client_coverage.py +2 -2
- package/graph-provider/fuli_graph/config.py +3 -0
- package/graph-provider/fuli_graph/knowledge_duplicates.py +0 -1
- package/graph-provider/fuli_graph/knowledge_index_scan.py +13 -6
- package/graph-provider/fuli_graph/knowledge_search.py +111 -45
- package/graph-provider/fuli_graph/knowledge_semantic.py +9 -0
- package/graph-provider/fuli_graph/knowledge_semantic_index.py +5 -3
- package/graph-provider/fuli_graph/knowledge_tags.py +5 -10
- package/graph-provider/fuli_graph/models.py +1 -81
- package/graph-provider/fuli_graph/personal_global_preference_models.py +0 -23
- package/graph-provider/fuli_graph/personal_global_preferences.py +5 -630
- package/graph-provider/fuli_graph/preference_conflicts.py +3 -1
- package/graph-provider/fuli_graph/project_agent_delegations.py +6 -1
- package/graph-provider/fuli_graph/project_agent_executor_models.py +0 -26
- package/graph-provider/fuli_graph/project_agent_models.py +1 -0
- package/graph-provider/fuli_graph/project_agent_routes.py +0 -27
- package/graph-provider/fuli_graph/project_agent_task_models.py +0 -18
- package/graph-provider/fuli_graph/project_agent_work_log.py +4 -2
- package/graph-provider/fuli_graph/project_knowledge.py +2 -1
- package/graph-provider/fuli_graph/retired_graph_labels.py +30 -0
- package/graph-provider/fuli_graph/store_identity.py +4 -16
- package/graph-provider/fuli_graph/store_project_agent_executor_learning.py +0 -7
- package/graph-provider/fuli_graph/store_project_agent_executor_routing.py +0 -2
- package/graph-provider/fuli_graph/store_project_agent_executors.py +0 -8
- package/graph-provider/fuli_graph/store_project_agent_task_recruitment.py +1 -61
- package/graph-provider/fuli_graph/store_project_agents.py +1 -1
- package/graph-provider/fuli_graph/store_projects.py +0 -151
- package/graph-provider/fuli_graph/store_publication.py +1 -160
- package/graph-provider/fuli_graph/store_records.py +0 -43
- package/graph-provider/fuli_graph/store_task_contexts.py +10 -0
- package/graph-provider/fuli_graph/task_checkpoint_amendment.py +77 -0
- package/graph-provider/fuli_graph/task_context_auto_close.py +1 -1
- package/graph-provider/fuli_graph/task_context_models.py +19 -0
- package/graph-provider/fuli_graph/task_context_routes.py +5 -1
- package/graph-provider/fuli_graph/workflow_candidate_models.py +1 -61
- package/graph-provider/fuli_graph/workflow_candidates.py +7 -446
- package/graph-provider/fuli_graph/workflow_observation_models.py +1 -1
- package/graph-provider/pyproject.toml +1 -1
- package/native/win32/fuli-win-helper.exe +0 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -2
- package/packages/roundtable/src/agents/codex/wake.js +25 -2
- package/packages/roundtable/src/agents/session-log.js +29 -7
- package/packages/roundtable/src/host.js +3 -0
- package/packages/roundtable/src/roundtable/near-names.js +27 -0
- package/packages/roundtable/src/roundtable/reply-inbox.js +6 -2
- package/packages/roundtable/src/roundtable/service.js +183 -49
- package/packages/roundtable/src/roundtable/stand-in.js +64 -0
- package/packages/roundtable/src/roundtable/store.js +8 -6
- package/packages/roundtable/src/roundtable/wake-ladder.js +63 -0
- package/packages/roundtable/src/roundtable/wake.js +7 -0
- package/packages/roundtable/src/standalone/mcp.js +0 -5
- package/packages/roundtable/src/standalone/serve.js +13 -0
- package/registry/embedding-models.json +208 -0
- package/skills/capturing-session-knowledge/SKILL.md +2 -2
- package/skills/capturing-session-knowledge/references/capture.md +15 -34
- package/skills/capturing-session-knowledge/references/coordination.md +39 -0
- package/skills/capturing-session-knowledge/references/retrieval.md +9 -13
- package/skills/grilling-project/SKILL.md +8 -53
- package/skills/grilling-project/agents/openai.yaml +2 -2
- package/skills/grilling-project/references/project-profile.md +6 -23
- package/skills/operating-fuli/SKILL.md +36 -8
- package/skills/operating-fuli/references/workflow-recipes.md +3 -2
- package/src/agent-apps/host-tools/catalog.js +2 -25
- package/src/agent-kits/client-detection.js +14 -4
- package/src/agent-kits/installer-manifest.js +16 -5
- package/src/agent-kits/pack-manifest.js +7 -2
- package/src/agent-kits/pins.js +6 -6
- package/src/agent-kits/session-clients.js +1 -0
- package/src/agent-kits/vendor/agent-installer/README.md +1 -1
- package/src/agent-roundtable/tools.js +2 -2
- package/src/agent-roundtable/turn-receipt.js +65 -0
- package/src/agent-tools/graph-definitions.js +4 -2
- package/src/agent-tools/graph-handlers.js +5 -43
- package/src/agent-tools/interface-catalog.js +11 -15
- package/src/agent-tools/interface-definitions.js +0 -7
- package/src/agent-tools/judgment-definitions.js +1 -1
- package/src/agent-tools/knowledge-curation-definitions.js +1 -63
- package/src/agent-tools/knowledge-definitions.js +11 -124
- package/src/agent-tools/project-agent-definitions.js +0 -1
- package/src/agent-tools/project-agent-tool-definitions.js +0 -16
- package/src/agent-tools/project-organizing-definitions.js +31 -0
- package/src/agent-tools/project-space-definitions.js +4 -83
- package/src/agent-tools/retired-tools.js +37 -0
- package/src/agent-tools/task-entry-definitions.js +4 -3
- package/src/agent-tools/tonborg-question-definitions.js +3 -3
- package/src/agent-tools.js +5 -1
- package/src/agents/choice-answers.js +2 -1
- package/src/agents/claude-code/choice-answers.js +2 -24
- package/src/agents/claude-desktop/app-control.js +23 -0
- package/src/agents/client-apps.js +8 -0
- package/src/agents/codex/choice-answers.js +61 -0
- package/src/agents/codex/lifecycle-hook.js +3 -11
- package/src/agents/dsh/bundle.js +50 -0
- package/src/agents/dsh/lifecycle-hook.js +18 -0
- package/src/agents/dsh/plugin.js +111 -0
- package/src/agents/identity-receipt.js +19 -4
- package/src/agents/jsonl-tail.js +35 -0
- package/src/agents/opencode/lifecycle-hook.js +9 -174
- package/src/agents/opencode/plugin-file.js +7 -29
- package/src/agents/opencode/plugin.js +3 -76
- package/src/agents/plugin-hook-process.js +87 -0
- package/src/agents/plugin-lifecycle-hook.js +174 -0
- package/src/agents/plugin-module-source.js +26 -0
- package/src/agents/source-applications.js +3 -3
- package/src/agents/token-usage-resolver.js +0 -6
- package/src/cli/clients-command.js +3 -3
- package/src/cli/command-registry.js +1 -2
- package/src/cli/connect-command.js +1 -1
- package/src/cli/mcp-command.js +1 -1
- package/src/cli/setup-command.js +3 -2
- package/src/cli.js +0 -5
- package/src/conversations/entry-budget.js +1 -1
- package/src/conversations/person-words.js +0 -5
- package/src/data-format/local-stores.js +6 -0
- package/src/debug-turns/model-request.js +2 -27
- package/src/desktop/npm-copy-data.js +20 -6
- package/src/embedding-models/manifest.js +147 -0
- package/src/embedding-models/port.js +117 -0
- package/src/embedding-models/registry.js +24 -0
- package/src/embedding-models/store.js +208 -0
- package/src/external-knowledge/connectors/custom.js +4 -0
- package/src/external-knowledge/connectors/mcp.js +13 -1
- package/src/external-knowledge/connectors/response-values.js +8 -0
- package/src/external-knowledge/connectors/retrieval-api.js +5 -1
- package/src/external-knowledge/service.js +22 -5
- package/src/graphiti/agent-conversations.js +3 -2
- package/src/graphiti/agent-knowledge-workflows.js +1 -6
- package/src/graphiti/capture-change-confirmation.js +1 -1
- package/src/graphiti/checkpoint-amendment.js +50 -0
- package/src/graphiti/checkpoint-capture.js +7 -3
- package/src/graphiti/checkpoint-save-status.js +71 -0
- package/src/graphiti/federated-application.js +11 -132
- package/src/graphiti/first-run-guide.js +25 -4
- package/src/graphiti/fuli-markup.js +1 -1
- package/src/graphiti/human-review-channel.js +4 -2
- package/src/graphiti/knowledge-curation.js +12 -24
- package/src/graphiti/knowledge-provider-mapping.js +0 -21
- package/src/graphiti/knowledge-reader.js +0 -7
- package/src/graphiti/knowledge-spaces.js +36 -0
- package/src/graphiti/local-runtimes.js +9 -1
- package/src/graphiti/personal-global-preference-candidates.js +0 -44
- package/src/graphiti/project-agent-control-plane.js +5 -12
- package/src/graphiti/project-agent-mapping.js +0 -13
- package/src/graphiti/project-agent-workflows.js +0 -16
- package/src/graphiti/provider-client.js +26 -167
- package/src/graphiti/reply-echo-group.js +7 -6
- package/src/graphiti/roundtable-host.js +5 -0
- package/src/graphiti/session-knowledge-capture.js +5 -31
- package/src/graphiti/task-entry-owner-change.js +66 -0
- package/src/graphiti/task-entry-preferences.js +16 -4
- package/src/graphiti/task-entry-project-scope.js +5 -1
- package/src/graphiti/task-knowledge-checkpoint.js +30 -14
- package/src/graphiti/topic-proposals.js +31 -8
- package/src/graphiti/topic-team-handoff.js +121 -0
- package/src/graphiti/workflow-learning.js +0 -25
- package/src/graphiti/workspace-provider-client.js +4 -50
- package/src/http/api-router.js +15 -0
- package/src/http/capture-onboarding-api-router.js +13 -4
- package/src/http/embedding-models-api-router.js +36 -0
- package/src/http/graph-api-router.js +3 -125
- package/src/http/project-organizing-api-router.js +27 -0
- package/src/http/reply-echo-api-router.js +2 -2
- package/src/http/request-policy.js +0 -4
- package/src/judgment/acceptance.js +2 -2
- package/src/judgment/agent-view.js +8 -8
- package/src/judgment/conversation.js +75 -69
- package/src/judgment/engine.js +33 -36
- package/src/judgment/explain-method.js +8 -7
- package/src/judgment/http.js +3 -1
- package/src/judgment/question-options.js +117 -74
- package/src/judgment/question-tools.js +54 -34
- package/src/judgment/review-delegation.js +16 -3
- package/src/judgment/review-prompt.js +29 -33
- package/src/judgment/routing.js +4 -3
- package/src/judgment/service.js +50 -8
- package/src/judgment/verdict-schema.js +2 -7
- package/src/knowledge-hard-delete/console-port.js +1 -7
- package/src/knowledge-hard-delete/forget-references.js +1 -1
- package/src/knowledge-owner-reads/console-port.js +8 -19
- package/src/mcp/chat-listing.js +1 -1
- package/src/mcp/create-mcp-server.js +12 -32
- package/src/mcp/direct-call.js +0 -2
- package/src/mcp/preference-delivery.js +4 -2
- package/src/mcp/provider-task-context-registry.js +14 -0
- package/src/mcp/session-id.js +1 -33
- package/src/mcp/tool-annotations.js +3 -44
- package/src/model-backends/adapters/builtin-embeddings.js +44 -0
- package/src/model-backends/adapters/registry.js +3 -1
- package/src/model-backends/config.js +17 -4
- package/src/model-backends/port.js +10 -4
- package/src/model-backends/runtime.js +6 -13
- package/src/model-backends/secret-store.js +2 -20
- package/src/native-runtime/runtime.js +13 -2
- package/src/presence/windows-helper-pin.js +1 -1
- package/src/project-organizing/agent-tool.js +65 -0
- package/src/project-organizing/model-tiers.js +31 -0
- package/src/project-organizing/port.js +130 -0
- package/src/server.js +22 -13
- package/src/setup/agents/claude-code/descriptor.json +1 -5
- package/src/setup/agents/codex/descriptor.json +1 -5
- package/src/setup/agents/cursor/descriptor.json +1 -5
- package/src/setup/agents/descriptor-schema.js +4 -1
- package/src/setup/agents/opencode/descriptor.json +1 -5
- package/src/setup/paths.js +1 -0
- package/src/system/client-connection-install.js +12 -2
- package/src/system/client-connection-status.js +90 -20
- package/src/system/client-restart.js +72 -0
- package/src/system/configured-install.js +103 -0
- package/src/system/doctor-repair.js +3 -1
- package/src/system/doctor.js +3 -1
- package/src/system/system-service.js +14 -2
- package/src/whats-new/lines/0.27.0.json +13 -0
- package/dist/web/assets/CaptureChangePage-BzwcfacI.js +0 -1
- package/dist/web/assets/ConnectionsPage-C_vgqwF2.js +0 -1
- package/dist/web/assets/ConnectionsPage-DS2PEG6K.css +0 -1
- package/dist/web/assets/FieldRoot-DRf4wM5x.js +0 -1
- package/dist/web/assets/InboxPage-1ue8vA7H.css +0 -1
- package/dist/web/assets/InboxPage-zNUnnYeJ.js +0 -6
- package/dist/web/assets/KnowledgeOrganizerPage-BWvF1GEu.js +0 -1
- package/dist/web/assets/KnowledgePage--Z4_kAhq.js +0 -1
- package/dist/web/assets/KnowledgePeek-BgzQA9SI.js +0 -1
- package/dist/web/assets/KnowledgeWorkspace-0yOpWtEB.js +0 -4
- package/dist/web/assets/KnowledgeWorkspace-BgWo6lBj.css +0 -1
- package/dist/web/assets/ModelSettingsPage-B9PS1Kay.css +0 -1
- package/dist/web/assets/ModelSettingsPage-BL6MsF7C.js +0 -1
- package/dist/web/assets/NoticeRow-BXZWn4EZ.js +0 -1
- package/dist/web/assets/OverviewPage-_9e2idJR.js +0 -1
- package/dist/web/assets/PageOutline-CFGtHmOK.js +0 -1
- package/dist/web/assets/PageOutline-DG5ZYtA8.css +0 -1
- package/dist/web/assets/PersonalProjectsPage-AhgP6CL8.js +0 -1
- package/dist/web/assets/ProjectAgentsPage-O-cMavcz.js +0 -5
- package/dist/web/assets/ProjectJudgmentPolicy-CyHAu0nm.js +0 -2
- package/dist/web/assets/ProjectJudgmentPolicy-DnjMniaz.css +0 -1
- package/dist/web/assets/PublicProjectsPage-Ck1QSR0R.js +0 -1
- package/dist/web/assets/PublicProjectsPage-CskSzffL.css +0 -1
- package/dist/web/assets/SettingsPage-Cj3pEWcd.css +0 -1
- package/dist/web/assets/SettingsPage-bLssMIz6.js +0 -1
- package/dist/web/assets/TaskBlockerNotice-iUiD3BuZ.js +0 -1
- package/dist/web/assets/UiIcon-vgD4v8q8.js +0 -1
- package/dist/web/assets/UiIconButton-BzyMc14P.js +0 -1
- package/dist/web/assets/WidgetSlot-Dw5nWlb7.js +0 -2
- package/dist/web/assets/WorkbenchListPage-D0xX-YNl.js +0 -1
- package/dist/web/assets/_plugin-vue_export-helper-B4pFJCwG.js +0 -9
- package/dist/web/assets/agent-occupation-CjfQqSzd.js +0 -1
- package/dist/web/assets/agent-profile-BNPLhDog.css +0 -1
- package/dist/web/assets/agent-roster-records-Bi5HWDif.js +0 -1
- package/dist/web/assets/console-DgRc8Itw.js +0 -1
- package/dist/web/assets/conversation-launcher-settings-CZAfuu8B.js +0 -1
- package/dist/web/assets/identity-DIG-uOiU.js +0 -1
- package/dist/web/assets/index-C2VDC1uO.js +0 -24
- package/dist/web/assets/index-DF0TcfPY.css +0 -1
- package/dist/web/assets/label-table-CDzYRZpc.js +0 -1
- package/dist/web/assets/model-BjUERpoQ.js +0 -3
- package/dist/web/assets/npm-copies-BLRc0FXW.js +0 -1
- package/dist/web/assets/overview-data-Cq1gefY5.js +0 -1
- package/dist/web/assets/popup-host-ctKYu9Ze.js +0 -1
- package/dist/web/assets/review-api-CJaNgPMA.js +0 -1
- package/dist/web/assets/review-store-DSQpb5P8.js +0 -1
- package/dist/web/assets/source-adapters-DPJzumzC.js +0 -1
- package/dist/web/assets/task-evidence-DIbw2U42.js +0 -1
- package/dist/web/assets/useForwardScopeId-DZCnSswO.js +0 -1
- package/dist/web/assets/usePrimitiveElement-tPQM7XJs.js +0 -1
- package/dist/web/assets/useTeamPeople-D_5cxxf1.js +0 -1
- package/dist/web/assets/version-lXtOG8uf.js +0 -1
- package/docs/public-personal-architecture.md +0 -73
- package/graph-provider/fuli_graph/common_knowledge.py +0 -459
- package/graph-provider/fuli_graph/common_knowledge_models.py +0 -54
- package/graph-provider/fuli_graph/project_management.py +0 -251
- package/skills/flreview/SKILL.md +0 -101
- package/skills/flreview/agents/openai.yaml +0 -6
- package/src/agent-tools/project-relation-definitions.js +0 -36
- package/src/agents/codex/acp-process.js +0 -244
- package/src/agents/codex/acp-session.js +0 -190
- package/src/agents/codex/acp-worker.js +0 -54
- package/src/agents/codex/review-command.js +0 -29
- package/src/cli/worker-command.js +0 -80
- package/src/graphiti/checkpoint-provider-outage.js +0 -23
- package/src/graphiti/common-knowledge-candidates.js +0 -222
- package/src/graphiti/public-project-relations.js +0 -28
- package/src/graphiti/public-projects.js +0 -125
- package/src/graphiti/public-submission-reconciliation.js +0 -37
- package/src/graphiti/public-submission.js +0 -77
- package/src/graphiti/publication-draft-capture.js +0 -28
- package/src/graphiti/publication-draft-input.js +0 -11
- package/src/graphiti/publication-review-queues.js +0 -50
- package/src/graphiti/worker-plan-host.js +0 -92
- package/src/graphiti/worker-run-host.js +0 -287
- package/src/graphiti/workflow-observation.js +0 -72
- package/src/mcp/common-knowledge-preview-tokens.js +0 -67
- package/src/server/worker-plan-runtime.js +0 -56
|
@@ -13,7 +13,6 @@ import { endTurnsObservedAtEntry, refreshCurrentTaskInPlace, settleHeldTurns, ST
|
|
|
13
13
|
import { transcriptCaptureLedger } from '../../conversations/transcript-capture-gap.js';
|
|
14
14
|
import { transcriptDigest } from '../../conversations/transcript-guard.js';
|
|
15
15
|
import { normalizeCodexRecord, verifyCodexTranscript } from './conversation-transcript.js';
|
|
16
|
-
import { CODEX_REVIEW_OFF_REASON, CODEX_REVIEW_UNVERIFIED_REASON, isCodexReviewCommand, withCodexReviewGuidance } from './review-command.js';
|
|
17
16
|
import { sessionFuliCommandResult, sessionFuliEntryRefusal, sessionFuliOffContext, sessionFuliSessionBegan }
|
|
18
17
|
from '../../conversations/session-fuli-entry.js';
|
|
19
18
|
|
|
@@ -65,10 +64,8 @@ export async function codexLifecycleOutput(event, input, invoke, { delivery, cur
|
|
|
65
64
|
if (!input?.session_id || typeof input.cwd !== 'string' || typeof input.prompt !== 'string') {
|
|
66
65
|
throw new TypeError('Codex task entry requires session, cwd and prompt');
|
|
67
66
|
}
|
|
68
|
-
|
|
69
|
-
// A session FULI is off for (rec#5 C3b) gets no task entry, no refresh and no review.
|
|
67
|
+
// A session FULI is off for (rec#5 C3b) gets no task entry and no refresh.
|
|
70
68
|
const off = await entryRefusal?.();
|
|
71
|
-
if (off && review) return { decision: 'block', reason: CODEX_REVIEW_OFF_REASON };
|
|
72
69
|
if (off) return { hookSpecificOutput: { hookEventName: event, additionalContext: sessionFuliOffContext(off) } };
|
|
73
70
|
if (codexRefreshTurn(event, input)) return refreshCurrentTaskInPlace(event, input, invoke, CODEX_UNRESOLVED_TURNS,
|
|
74
71
|
{ delivery, currentTask, onCurrentTask });
|
|
@@ -76,9 +73,8 @@ export async function codexLifecycleOutput(event, input, invoke, { delivery, cur
|
|
|
76
73
|
turnId: input.turn_id ?? null, projectPath: input.cwd, taskPrompt: withoutDebugMark(input.prompt).slice(0, 8192),
|
|
77
74
|
sourceApplication: 'codex', sourceSessionId: input.session_id, ...taskSceneInput(withoutDebugMark(input.prompt)) });
|
|
78
75
|
const entry = compactTaskContext(context);
|
|
79
|
-
|
|
76
|
+
return preferenceHookOutput(entry, event, input, delivery, 'codex',
|
|
80
77
|
'Fuli task context. Apply effective_preferences. ' + taskClosingInstruction(entry) + PASS_TASK_TOKEN + TASK_RULES_ON_DEMAND);
|
|
81
|
-
return review ? withCodexReviewGuidance(output) : output;
|
|
82
78
|
}
|
|
83
79
|
|
|
84
80
|
export async function runCodexLifecycleHook(args, dependencies = {}) {
|
|
@@ -243,10 +239,6 @@ async function closeQuietly(resource) {
|
|
|
243
239
|
// The cause says whether the hook ran out of time or failed, so a report can
|
|
244
240
|
// tell a slow first start from a broken install without exposing details.
|
|
245
241
|
function codexLifecycleUnavailable(event, input, cause, incomplete = '', recovery = '') {
|
|
246
|
-
// The person's review line never reaches the model unverified (rec#22).
|
|
247
|
-
if (event === 'UserPromptSubmit' && isCodexReviewCommand(input?.prompt)) {
|
|
248
|
-
return { decision: 'block', reason: CODEX_REVIEW_UNVERIFIED_REASON };
|
|
249
|
-
}
|
|
250
242
|
const warning = `Fuli context is unavailable (${cause}). Continue with the user request; saved context and checkpoint were not verified.${recovery}`;
|
|
251
243
|
// A refresh turn is never told to begin a task for "the current user request".
|
|
252
244
|
if (codexRefreshTurn(event, input)) return { systemMessage: warning, hookSpecificOutput: {
|
|
@@ -266,7 +258,7 @@ function codexLifecycleUnavailable(event, input, cause, incomplete = '', recover
|
|
|
266
258
|
// At the deadline an entry that already wrote its task delivers its token and
|
|
267
259
|
// what is missing (entry-budget.js); otherwise the fallback says what to fetch.
|
|
268
260
|
function codexEntryDeadlineOutput(event, input, budget, cause, recovery = '') {
|
|
269
|
-
const partial = event === 'UserPromptSubmit'
|
|
261
|
+
const partial = event === 'UserPromptSubmit' ? partialEntryText(budget) : null;
|
|
270
262
|
const output = partial ? { systemMessage: `Fuli task context is partial (${cause}).`,
|
|
271
263
|
hookSpecificOutput: { hookEventName: event, additionalContext: partial } }
|
|
272
264
|
: codexLifecycleUnavailable(event, input, cause, NO_TASK_AT_DEADLINE, recovery);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { dirname, join } from 'node:path';
|
|
2
|
+
|
|
3
|
+
import { FULI_VERSION } from '../../package-metadata.js';
|
|
4
|
+
import { pluginModuleImport } from '../plugin-module-source.js';
|
|
5
|
+
import { DSH_LIFECYCLE_MARKER } from './plugin.js';
|
|
6
|
+
|
|
7
|
+
// The DeepSeek Harness bundle FULI setup writes beside its installer manifest
|
|
8
|
+
// (installer-manifest.js). agent-installer copies it to
|
|
9
|
+
// `<DSH home>/plugins/fuli` and links that copy into every DSH profile, as
|
|
10
|
+
// `dsh plugin --profile <name> add link:<directory>` does. DSH loads a bundle
|
|
11
|
+
// through its package.json `dsh.bundle.patch`, whose rows here start FULI's
|
|
12
|
+
// lifecycle plugin (plugin.js) and FULI's MCP server, run as the `dsh`
|
|
13
|
+
// source. The files bind this installation's paths and name FULI's version,
|
|
14
|
+
// so the copy is outdated after each FULI update until the update's
|
|
15
|
+
// reconnect (`fuli setup --connected-only`) copies it again.
|
|
16
|
+
const DSH_BUNDLE_PACKAGE = 'fuli-dsh';
|
|
17
|
+
const HEADER = `// FULI managed DeepSeek Harness plugin (${DSH_LIFECYCLE_MARKER}): fuli setup rewrites this file.`;
|
|
18
|
+
// The hook's own prompt deadline (plugin-lifecycle-hook.js caps it at 15 s).
|
|
19
|
+
const PROMPT_TIMEOUT_MS = 15_000;
|
|
20
|
+
|
|
21
|
+
// Answers { 'package.json', 'index.js', 'cordis.patch.yml' }: file name to text.
|
|
22
|
+
export function dshBundleFiles(context) {
|
|
23
|
+
const directory = join(dirname(context.mcpServerPath), 'agents', 'dsh');
|
|
24
|
+
const config = {
|
|
25
|
+
nodePath: context.nodePath,
|
|
26
|
+
hookPath: join(directory, 'lifecycle-hook.js'),
|
|
27
|
+
runtimeConfigPath: context.runtimeConfigPath,
|
|
28
|
+
timeoutMs: PROMPT_TIMEOUT_MS
|
|
29
|
+
};
|
|
30
|
+
const manifest = { name: DSH_BUNDLE_PACKAGE, version: FULI_VERSION, private: true, type: 'module', main: 'index.js',
|
|
31
|
+
description: 'FULI memory, preferences and task records for DeepSeek Harness',
|
|
32
|
+
dsh: { bundle: { patch: './cordis.patch.yml' } } };
|
|
33
|
+
return {
|
|
34
|
+
'package.json': `${JSON.stringify(manifest, null, 2)}\n`,
|
|
35
|
+
'index.js': `${HEADER}\n${pluginModuleImport(join(directory, 'plugin.js'), context.nodePath, 'fuliDshPlugin')}\n`
|
|
36
|
+
+ `export const { name, inject, apply } = fuliDshPlugin(${JSON.stringify(config, null, 2)});\n`,
|
|
37
|
+
'cordis.patch.yml': patchText(context)
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// JSON is YAML, so each row is written as one JSON flow mapping.
|
|
42
|
+
function patchText(context) {
|
|
43
|
+
const rows = [
|
|
44
|
+
{ id: 'fuli', name: DSH_BUNDLE_PACKAGE },
|
|
45
|
+
{ id: 'fuli-mcp', name: '@deepseek-ai/dsh-mcp-client', config: { transport: 'stdio', serverName: 'fuli',
|
|
46
|
+
command: context.nodePath, args: [context.mcpServerPath, '--runtime-config', context.runtimeConfigPath,
|
|
47
|
+
'--source-application', 'dsh', '--tool-profile', 'chat'] } }
|
|
48
|
+
];
|
|
49
|
+
return `# ${HEADER.slice(3)}\n- insert:\n${rows.map((row) => ` - ${JSON.stringify(row)}\n`).join('')}`;
|
|
50
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { pluginLifecycleOutput, runPluginLifecycleCommand } from '../plugin-lifecycle-hook.js';
|
|
3
|
+
import { isMainModule } from '../../system/main-module.js';
|
|
4
|
+
|
|
5
|
+
// The FULI side of the DeepSeek Harness plugin (plugin.js). DSH runs as its
|
|
6
|
+
// own source application, `dsh`; its MCP entry (bundle.js) runs as `dsh` too,
|
|
7
|
+
// so a hook task and the model's MCP calls share one session namespace.
|
|
8
|
+
const DSH = Object.freeze({ id: 'dsh', name: 'DeepSeek Harness', sourceApplication: 'dsh' });
|
|
9
|
+
|
|
10
|
+
export const dshLifecycleOutput = (...args) => pluginLifecycleOutput(DSH, ...args);
|
|
11
|
+
export const runDshLifecycleCommand = (...args) => runPluginLifecycleCommand(DSH, ...args);
|
|
12
|
+
|
|
13
|
+
// The answer is the process's whole job: it exits once the line is flushed,
|
|
14
|
+
// so a detached close never lingers on an open handle.
|
|
15
|
+
if (isMainModule(import.meta.url)) {
|
|
16
|
+
await runDshLifecycleCommand(process.argv.slice(2));
|
|
17
|
+
process.stdout.write('', () => process.exit(0));
|
|
18
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
|
|
3
|
+
import { bounded, entryText, KILL_GRACE_MS, MAX_PROMPT_CHARS, sessionQueue, spawnHook } from '../plugin-hook-process.js';
|
|
4
|
+
|
|
5
|
+
// The DeepSeek Harness (DSH) Cordis plugin. DSH loads it inside its own Node
|
|
6
|
+
// process from the bundle FULI setup installs into each DSH profile
|
|
7
|
+
// (bundle.js), so this module imports Node built-ins only and never a DSH
|
|
8
|
+
// package: the bundle is linked from FULI's installation, where no DSH
|
|
9
|
+
// package resolves. Each event starts FULI's lifecycle hook
|
|
10
|
+
// (lifecycle-hook.js) with FULI's Node. A turn is one prompt of the person:
|
|
11
|
+
// - its first step (`agent/pre-step`, step 1, a waterfall the loop awaits
|
|
12
|
+
// before the step's messages are committed) begins its task and appends
|
|
13
|
+
// the entry as one context message after the person's own, which stays
|
|
14
|
+
// unchanged. DSH keeps that message in the session history, so later steps
|
|
15
|
+
// of the turn need no second copy;
|
|
16
|
+
// - its close, as a Stop hook: `turn/end` with reason `completed`. An error or
|
|
17
|
+
// a cancellation closes nothing, as an interrupted Claude Code or Codex turn
|
|
18
|
+
// runs no Stop hook; its task stays open for the next entry. Each turn
|
|
19
|
+
// closes once.
|
|
20
|
+
// A subagent's session (`header.origin === 'subagent'`) belongs to its
|
|
21
|
+
// parent's task. Every path fails open: FULI slow, down or broken never blocks
|
|
22
|
+
// or crashes DSH, and adds at most one line for that turn.
|
|
23
|
+
//
|
|
24
|
+
// `dsh --profile headless` exits right after the turn's end, so a close runs
|
|
25
|
+
// detached from DSH's process group, holds nothing open, and disposal only
|
|
26
|
+
// waits until each close's input is handed over.
|
|
27
|
+
|
|
28
|
+
export const DSH_LIFECYCLE_MARKER = '--fuli-dsh-lifecycle';
|
|
29
|
+
const PLUGIN_NAME = 'fuli';
|
|
30
|
+
// The message source kind DSH records for FULI's entry; DSH's consumers fall
|
|
31
|
+
// through kinds they do not know.
|
|
32
|
+
const CONTEXT_SOURCE = Object.freeze({ kind: 'fuli-context', form: 'instructions' });
|
|
33
|
+
// A close is short work; the next prompt of the session waits for it.
|
|
34
|
+
const STOP_TIMEOUT_MS = 5_000;
|
|
35
|
+
const DISPOSE_HANDOFF_MS = 1_000;
|
|
36
|
+
|
|
37
|
+
export function fuliDshPlugin({ nodePath, hookPath, runtimeConfigPath, timeoutMs }, { runHook = spawnHook } = {}) {
|
|
38
|
+
const run = (event, input, limitMs, extra = {}) => runHook({ command: nodePath, input, killAfterMs: limitMs + KILL_GRACE_MS,
|
|
39
|
+
args: [hookPath, DSH_LIFECYCLE_MARKER, '--runtime-config', runtimeConfigPath, '--event', event,
|
|
40
|
+
'--timeout-ms', String(limitMs)], ...extra });
|
|
41
|
+
return {
|
|
42
|
+
name: PLUGIN_NAME,
|
|
43
|
+
inject: ['agents'],
|
|
44
|
+
apply(ctx) {
|
|
45
|
+
// Per session, the turn whose task began and has not closed.
|
|
46
|
+
const open = new Map();
|
|
47
|
+
const handoffs = new Set();
|
|
48
|
+
const queue = sessionQueue();
|
|
49
|
+
|
|
50
|
+
const close = (sessionId) => {
|
|
51
|
+
const handoff = new Promise((resolve) => {
|
|
52
|
+
queue(sessionId, () => run('stop', { session_id: sessionId }, Math.min(timeoutMs, STOP_TIMEOUT_MS),
|
|
53
|
+
{ detached: true, onSent: resolve })).catch(() => {}).finally(resolve);
|
|
54
|
+
});
|
|
55
|
+
handoffs.add(handoff);
|
|
56
|
+
void handoff.finally(() => handoffs.delete(handoff));
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// prepend: the listeners after this one run first, so the entry comes
|
|
60
|
+
// after every other contributor's messages and sees the final batch.
|
|
61
|
+
ctx.on('agent/pre-step', async (payload, next) => {
|
|
62
|
+
const decision = await next();
|
|
63
|
+
try {
|
|
64
|
+
if (decision?.kind !== 'enter' || payload?.step !== 1 || payload.signal?.aborted) return decision;
|
|
65
|
+
const session = payload.agent?.session;
|
|
66
|
+
const sessionId = session?.id ?? session?.header?.id;
|
|
67
|
+
const prompt = promptOf(decision.messages);
|
|
68
|
+
if (typeof sessionId !== 'string' || !prompt || session?.header?.origin === 'subagent') return decision;
|
|
69
|
+
open.set(sessionId, { turn: payload.turn });
|
|
70
|
+
const answer = await queue(sessionId, () => run('prompt', { session_id: sessionId,
|
|
71
|
+
...(prompt.id ? { message_id: prompt.id } : {}), cwd: session.header?.cwd ?? process.cwd(),
|
|
72
|
+
prompt: prompt.text }, timeoutMs)).catch(() => undefined);
|
|
73
|
+
if (payload.signal?.aborted) return decision;
|
|
74
|
+
return { ...decision, messages: [...decision.messages, contextMessage(entryText(answer))] };
|
|
75
|
+
} catch {
|
|
76
|
+
// The step goes out without FULI's entry.
|
|
77
|
+
return decision;
|
|
78
|
+
}
|
|
79
|
+
}, { prepend: true });
|
|
80
|
+
|
|
81
|
+
ctx.on('session/event', (session, event) => {
|
|
82
|
+
try {
|
|
83
|
+
if (event?.type !== 'turn/end') return;
|
|
84
|
+
const sessionId = session?.id ?? session?.header?.id;
|
|
85
|
+
const turn = open.get(sessionId);
|
|
86
|
+
if (!turn || turn.turn !== event.data?.turn) return;
|
|
87
|
+
open.delete(sessionId);
|
|
88
|
+
if (event.data?.reason?.kind === 'completed') close(sessionId);
|
|
89
|
+
} catch {
|
|
90
|
+
// The next entry reports a turn left open.
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
ctx.effect(() => () => bounded(Promise.all([...handoffs]), DISPOSE_HANDOFF_MS), 'fuli.handoffs()');
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// The person's words that opened the turn: the text of its user-sourced
|
|
100
|
+
// messages, and the first one's id.
|
|
101
|
+
function promptOf(messages) {
|
|
102
|
+
const own = Array.isArray(messages) ? messages.filter((message) => message?.role === 'user' && message.source?.kind === 'user') : [];
|
|
103
|
+
const text = own.flatMap((message) => (Array.isArray(message.content) ? message.content : []))
|
|
104
|
+
.filter((part) => part?.type === 'text' && typeof part.text === 'string').map((part) => part.text).join('\n').trim();
|
|
105
|
+
return text ? { id: typeof own[0].id === 'string' ? own[0].id : null, text: text.slice(0, MAX_PROMPT_CHARS) } : null;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function contextMessage(text) {
|
|
109
|
+
return Object.freeze({ id: randomUUID(), role: 'user', source: CONTEXT_SOURCE,
|
|
110
|
+
content: Object.freeze([Object.freeze({ type: 'text', text })]) });
|
|
111
|
+
}
|
|
@@ -61,20 +61,35 @@ export function receiptSummary(value, characters = 60) {
|
|
|
61
61
|
return receiptText(text.length > characters ? `${text.slice(0, characters).join('')}…` : text.join(''));
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
// The conversation a turn held at the roundtable, as the console opens it.
|
|
65
|
+
export function roundtableThreadUrl(application, threadId) {
|
|
66
|
+
return `${receiptConsoleUrl(application)}/roundtables/${encodeURIComponent(threadId)}`;
|
|
67
|
+
}
|
|
68
|
+
|
|
64
69
|
// The reply's attribution line: who led the task and who actually helped.
|
|
70
|
+
// One FLA signs 「FULI Agent:A」; with others, 「FULI Agents:A & B」. roundtable
|
|
71
|
+
// ({ threads, peers }) is what this turn used of the roundtable: the FLAs that
|
|
72
|
+
// took part join the line and each conversation gets a 「圆桌对话详情」 link.
|
|
65
73
|
export const RECEIPT_GUIDANCE = 'MUST end every final user-visible reply with agent_receipt.markdown unchanged, exactly once: greetings, status, errors, even with capture disabled or nothing retained. checkpoint_task_knowledge receipt overrides entry and names actual collaborators. Never invent owners or collaborators.';
|
|
66
74
|
|
|
67
75
|
export function taskAgentReceipt(application, { projectId, agentId, name = null, role = null,
|
|
68
76
|
sourceApplication = null, workStatus = null, conversationId = null, persistence = null,
|
|
69
|
-
collaborators = [], assignmentStatus = null, assignmentReason = null, notices = [], turnReceipt = null
|
|
77
|
+
collaborators = [], assignmentStatus = null, assignmentReason = null, notices = [], turnReceipt = null,
|
|
78
|
+
roundtable = null }) {
|
|
70
79
|
const owner = agentId ? { agent_id: agentId, name,
|
|
71
80
|
profile_url: agentProfileUrl(application, agentId), source_application: sourceApplication } : null;
|
|
72
81
|
const helpers = owner ? [...new Map(collaborators.filter(item => item.agentId !== agentId)
|
|
73
82
|
.map(item => [item.agentId, item])).values()].map(receiptCollaborator) : [];
|
|
83
|
+
// FLAs met at the roundtable this turn that are not already listed as helpers.
|
|
84
|
+
const peers = owner ? (roundtable?.peers ?? []).filter(peer => peer.agentId !== agentId
|
|
85
|
+
&& !helpers.some(item => item.agentId === peer.agentId)) : [];
|
|
86
|
+
const threads = (roundtable?.threads ?? []).map((threadId, index) =>
|
|
87
|
+
markdownLink(index ? `圆桌对话详情 ${index + 1}` : '圆桌对话详情', roundtableThreadUrl(application, threadId)));
|
|
74
88
|
const build = () => ({ required: true, markdown: [owner
|
|
75
|
-
? `FULI Agent:${agentLink(application, agentId, name, role)
|
|
76
|
-
|
|
77
|
-
|
|
89
|
+
? `FULI Agent${helpers.length + peers.length ? 's' : ''}:${[agentLink(application, agentId, name, role),
|
|
90
|
+
...helpers.map(item => collaboratorLink(application, item)),
|
|
91
|
+
...peers.map(peer => agentLink(application, peer.agentId, peer.name))].join(' & ')}`
|
|
92
|
+
: unassignedReceipt(assignmentStatus, assignmentReason), ...threads, ...notices].join(' · '), owner,
|
|
78
93
|
collaborators: helpers.map(item => ({ agent_id: item.agentId, name: item.name,
|
|
79
94
|
profile_url: agentProfileUrl(application, item.agentId),
|
|
80
95
|
...(item.responsibility ? { responsibility: item.responsibility } : {}),
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { open } from 'node:fs/promises';
|
|
2
|
+
|
|
3
|
+
// A client's own JSONL transcript as FULI reads it for a recent answer: its
|
|
4
|
+
// first record (the client's session header) and the records in the last
|
|
5
|
+
// `bytes` of the file. A cut line is not a record, and a line that is not
|
|
6
|
+
// JSON is skipped.
|
|
7
|
+
const HEADER_BYTES = 64 * 1024;
|
|
8
|
+
|
|
9
|
+
export async function readJsonlTail(path, bytes) {
|
|
10
|
+
const file = await open(path, 'r');
|
|
11
|
+
try {
|
|
12
|
+
const { size } = await file.stat();
|
|
13
|
+
const length = Math.min(size, bytes);
|
|
14
|
+
const text = await read(file, length, size - length);
|
|
15
|
+
const head = await read(file, Math.min(size, HEADER_BYTES), 0);
|
|
16
|
+
const end = head.indexOf('\n');
|
|
17
|
+
const first = end >= 0 || size <= HEADER_BYTES ? parse(end >= 0 ? head.slice(0, end) : head)[0] ?? null : null;
|
|
18
|
+
return { first, records: parse(size > length ? text.slice(text.indexOf('\n') + 1) : text) };
|
|
19
|
+
} finally {
|
|
20
|
+
await file.close();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async function read(file, length, position) {
|
|
25
|
+
const buffer = Buffer.alloc(length);
|
|
26
|
+
await file.read(buffer, 0, length, position);
|
|
27
|
+
return buffer.toString('utf8');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function parse(text) {
|
|
31
|
+
return text.split('\n').flatMap((line) => {
|
|
32
|
+
if (!line.trim()) return [];
|
|
33
|
+
try { return [JSON.parse(line)]; } catch { return []; }
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -1,181 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { consoleRecoveryNotice, recordHookFailure } from '../lifecycle-failure.js';
|
|
4
|
-
import { compactTaskContext } from '../../conversations/task-context-view.js';
|
|
5
|
-
import { preferenceHookOutput } from '../../conversations/preference-lifecycle.js';
|
|
6
|
-
import { sessionFuliCommandResult, sessionFuliEntryRefusal, sessionFuliOffContext } from '../../conversations/session-fuli-entry.js';
|
|
7
|
-
import { stopHookOutcome } from '../../conversations/stop-auto-close.js';
|
|
8
|
-
import { entryBudget, NO_TASK_AT_DEADLINE, partialEntryText, runWithEntryBudget } from '../../conversations/entry-budget.js';
|
|
9
|
-
import { taskSceneInput } from '../../graphiti/task-scene.js';
|
|
10
|
-
import { callAgentTool } from '../../agent-tools.js';
|
|
11
|
-
import { createRuntimeLeaseClient } from '../../adaptive-runtime/lease-client.js';
|
|
12
|
-
import { openFederatedGraphApplication } from '../../graphiti/federated-application.js';
|
|
13
|
-
import { resolveGraphRuntimeOptions } from '../../graphiti/runtime-config.js';
|
|
2
|
+
import { pluginLifecycleOutput, runPluginLifecycleCommand, runPluginLifecycleHook } from '../plugin-lifecycle-hook.js';
|
|
14
3
|
import { isMainModule } from '../../system/main-module.js';
|
|
15
|
-
import { platformPath, wslCallerPath } from '../../system/platform-path.js';
|
|
16
|
-
import { readHookInput } from '../lifecycle-input.js';
|
|
17
4
|
|
|
18
|
-
// The FULI side of the OpenCode V2 plugin (plugin.js)
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
const OPENCODE_EVENTS = Object.freeze(['prompt', 'stop']);
|
|
5
|
+
// The FULI side of the OpenCode V2 plugin (plugin.js). OpenCode's own source
|
|
6
|
+
// application (rec#11 D-64); its MCP entry runs as `opencode` too, so a hook
|
|
7
|
+
// task and the model's MCP calls share one session namespace that no other
|
|
8
|
+
// `other` client shares.
|
|
9
|
+
const OPENCODE = Object.freeze({ id: 'opencode', name: 'OpenCode', sourceApplication: 'opencode' });
|
|
24
10
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const SOURCE_APPLICATION = 'opencode';
|
|
29
|
-
const STOP_TIMEOUT_MS = 5_000;
|
|
30
|
-
// As Codex's entry (codex/lifecycle-hook.js): a cold first entry runs past 5 s.
|
|
31
|
-
const DEFAULT_PROMPT_TIMEOUT_MS = 15_000;
|
|
32
|
-
|
|
33
|
-
const ENTRY_LABEL = 'Fuli task context (OpenCode plugin). Apply effective_preferences. ';
|
|
34
|
-
|
|
35
|
-
// pathApi: the path rules of the host FULI runs on.
|
|
36
|
-
export async function openCodeLifecycleOutput(event, input, invoke, { command: sessionCommand, entryRefusal,
|
|
37
|
-
pathApi = platformPath() } = {}) {
|
|
38
|
-
if (!OPENCODE_EVENTS.includes(event)) throw new TypeError('Unsupported OpenCode lifecycle event');
|
|
39
|
-
const sessionId = input?.session_id;
|
|
40
|
-
if (typeof sessionId !== 'string' || !sessionId.trim() || sessionId.length > 256) {
|
|
41
|
-
throw new TypeError('OpenCode hook requires a host session identifier');
|
|
42
|
-
}
|
|
43
|
-
const source = { sourceApplication: SOURCE_APPLICATION, sourceSessionId: sessionId };
|
|
44
|
-
if (event === 'stop') {
|
|
45
|
-
// The end of a successful execution, as a Stop hook: a hook-delivered
|
|
46
|
-
// task with no checkpoint is closed honestly; nothing forces another turn.
|
|
47
|
-
// OpenCode shows no message after a turn, so a reminder is not returned.
|
|
48
|
-
const check = await invoke('verify_task_checkpoint', { sessionId, ...source });
|
|
49
|
-
await stopHookOutcome(check, invoke, source);
|
|
50
|
-
return {};
|
|
51
|
-
}
|
|
52
|
-
if (typeof input.cwd !== 'string' || !input.cwd.trim() || typeof input.prompt !== 'string') {
|
|
53
|
-
throw new TypeError('OpenCode task entry requires cwd and prompt');
|
|
54
|
-
}
|
|
55
|
-
const projectPath = wslCallerPath(input.cwd, input.wsl_distribution, pathApi);
|
|
56
|
-
// OpenCode's prompt hook cannot hold a prompt back, so the person's FULI
|
|
57
|
-
// command line still reaches the model: it is told the answer to relay.
|
|
58
|
-
const command = await sessionCommand?.({ sessionId, sourceApplication: SOURCE_APPLICATION, prompt: input.prompt,
|
|
59
|
-
projectPath });
|
|
60
|
-
if (command) {
|
|
61
|
-
return { context: `The person's message is a FULI session command; FULI already applied it and answered: `
|
|
62
|
-
+ `${JSON.stringify(`FULI: ${command.message}`)}. Reply with that answer only; no task was started.` };
|
|
63
|
-
}
|
|
64
|
-
const off = await entryRefusal?.();
|
|
65
|
-
if (off) return { context: sessionFuliOffContext(off) };
|
|
66
|
-
const context = await invoke('begin_task_context', { sessionId,
|
|
67
|
-
...(typeof input.message_id === 'string' ? { turnId: input.message_id } : {}),
|
|
68
|
-
projectPath, taskPrompt: input.prompt.slice(0, 8192), ...source, ...taskSceneInput(input.prompt) });
|
|
69
|
-
const entry = compactTaskContext(context);
|
|
70
|
-
const output = await preferenceHookOutput(entry, 'UserPromptSubmit', input, null, SOURCE_APPLICATION,
|
|
71
|
-
ENTRY_LABEL + taskClosingInstruction(entry) + PASS_TASK_TOKEN + TASK_RULES_ON_DEMAND);
|
|
72
|
-
return { context: output.hookSpecificOutput.additionalContext };
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export async function runOpenCodeLifecycleHook(args, dependencies = {}) {
|
|
76
|
-
const event = args[args.indexOf('--event') + 1];
|
|
77
|
-
if (!OPENCODE_EVENTS.includes(event)) throw new TypeError('Missing OpenCode lifecycle event');
|
|
78
|
-
const input = await (dependencies.readInput ?? readHookInput)();
|
|
79
|
-
const { runtimeConfigPath } = (dependencies.resolveRuntimeOptions ?? resolveGraphRuntimeOptions)(
|
|
80
|
-
args, dependencies.env ?? process.env);
|
|
81
|
-
let app;
|
|
82
|
-
let leases;
|
|
83
|
-
let closing;
|
|
84
|
-
const cleanup = () => closing ??= Promise.allSettled([closeQuietly(leases), closeQuietly(app)]);
|
|
85
|
-
dependencies.onCleanup?.(cleanup);
|
|
86
|
-
try {
|
|
87
|
-
app = (dependencies.openApplication ?? openFederatedGraphApplication)({ runtimeConfigPath });
|
|
88
|
-
leases = (dependencies.createLeases ?? createRuntimeLeaseClient)({ runtimeConfigPath });
|
|
89
|
-
const invokeTool = dependencies.callTool ?? callAgentTool;
|
|
90
|
-
return await leases.withGraphLease('opencode-lifecycle', () => openCodeLifecycleOutput(event, input,
|
|
91
|
-
(name, parameters) => invokeTool(app, name, parameters, { signal: dependencies.signal }), {
|
|
92
|
-
command: request => sessionFuliCommandResult(app, request),
|
|
93
|
-
entryRefusal: () => sessionFuliEntryRefusal(app, { sessionId: input.session_id, sourceApplication: SOURCE_APPLICATION })
|
|
94
|
-
}), { signal: dependencies.signal });
|
|
95
|
-
} finally {
|
|
96
|
-
await cleanup();
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// One line, so the plugin adds no more than that when FULI cannot answer.
|
|
101
|
-
function openCodeUnavailableContext(cause) {
|
|
102
|
-
return `Fuli context is unavailable (${cause}). Continue with the user request; FULI memory and preferences were not loaded for this turn.`;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function openCodeHookTimeoutMs(args) {
|
|
106
|
-
const event = args[args.indexOf('--event') + 1];
|
|
107
|
-
const limit = event === 'prompt' ? DEFAULT_PROMPT_TIMEOUT_MS : STOP_TIMEOUT_MS;
|
|
108
|
-
const configured = Number(args[args.indexOf('--timeout-ms') + 1]);
|
|
109
|
-
return args.includes('--timeout-ms') && Number.isSafeInteger(configured) && configured > 0
|
|
110
|
-
? Math.min(configured, limit) : limit;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// At the deadline an entry that already wrote its task delivers its token and
|
|
114
|
-
// what is missing (entry-budget.js); otherwise one line says FULI did not answer.
|
|
115
|
-
function deadlineOutput(event, budget, cause) {
|
|
116
|
-
if (event !== 'prompt') return {};
|
|
117
|
-
return { context: partialEntryText(budget) ?? `${openCodeUnavailableContext(cause)}${NO_TASK_AT_DEADLINE}` };
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// The process entry: always answers one JSON line within its deadline and
|
|
121
|
-
// never prints prompts, paths or exception text.
|
|
122
|
-
export async function runOpenCodeLifecycleCommand(args, dependencies = {}) {
|
|
123
|
-
const event = args[args.indexOf('--event') + 1];
|
|
124
|
-
const timeoutMs = openCodeHookTimeoutMs(args);
|
|
125
|
-
const controller = new AbortController();
|
|
126
|
-
let emitted = false;
|
|
127
|
-
const write = (output) => {
|
|
128
|
-
if (emitted) return;
|
|
129
|
-
emitted = true;
|
|
130
|
-
(dependencies.write ?? (value => process.stdout.write(value)))(`${JSON.stringify(output)}\n`);
|
|
131
|
-
};
|
|
132
|
-
const budget = entryBudget(timeoutMs);
|
|
133
|
-
const startedAt = Date.now();
|
|
134
|
-
let runtimeConfigPath = null;
|
|
135
|
-
let sessionId = null;
|
|
136
|
-
const readInput = dependencies.readInput ?? readHookInput;
|
|
137
|
-
let cleanup = async () => {};
|
|
138
|
-
let deadline;
|
|
139
|
-
const expired = new Promise(resolve => {
|
|
140
|
-
deadline = setTimeout(async () => {
|
|
141
|
-
controller.abort();
|
|
142
|
-
write(deadlineOutput(event, budget, `no answer within ${timeoutMs} ms`));
|
|
143
|
-
let grace;
|
|
144
|
-
await Promise.race([cleanup(), new Promise(done => { grace = setTimeout(done, 250); })]);
|
|
145
|
-
clearTimeout(grace);
|
|
146
|
-
resolve({ timedOut: true });
|
|
147
|
-
}, timeoutMs);
|
|
148
|
-
});
|
|
149
|
-
try {
|
|
150
|
-
const running = runWithEntryBudget(budget, () => runOpenCodeLifecycleHook(args, { ...dependencies,
|
|
151
|
-
readInput: async () => { const input = await readInput(); sessionId = input?.session_id ?? null; return input; },
|
|
152
|
-
// The hook's own resolution, kept so a failure is recorded where its data lives.
|
|
153
|
-
resolveRuntimeOptions: (...resolveArgs) => {
|
|
154
|
-
const options = (dependencies.resolveRuntimeOptions ?? resolveGraphRuntimeOptions)(...resolveArgs);
|
|
155
|
-
runtimeConfigPath = options?.runtimeConfigPath ?? null;
|
|
156
|
-
return options;
|
|
157
|
-
},
|
|
158
|
-
signal: controller.signal, onCleanup: close => { cleanup = close; } }))
|
|
159
|
-
.then(output => { write(output); return { timedOut: false }; },
|
|
160
|
-
(error) => {
|
|
161
|
-
write(event === 'prompt' ? { context: openCodeUnavailableContext(hookFailureCause(error))
|
|
162
|
-
+ consoleRecoveryNotice(runtimeConfigPath) } : {});
|
|
163
|
-
recordHookFailure({ runtimeConfigPath, client: 'opencode', event, error, sessionId, startedAt });
|
|
164
|
-
return { timedOut: false };
|
|
165
|
-
});
|
|
166
|
-
return await Promise.race([running, expired]);
|
|
167
|
-
} finally {
|
|
168
|
-
clearTimeout(deadline);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
async function closeQuietly(resource) {
|
|
173
|
-
try {
|
|
174
|
-
await resource?.close();
|
|
175
|
-
} catch {
|
|
176
|
-
// Cleanup diagnostics may contain local paths. The lifecycle adapter fails open.
|
|
177
|
-
}
|
|
178
|
-
}
|
|
11
|
+
export const openCodeLifecycleOutput = (...args) => pluginLifecycleOutput(OPENCODE, ...args);
|
|
12
|
+
export const runOpenCodeLifecycleHook = (...args) => runPluginLifecycleHook(OPENCODE, ...args);
|
|
13
|
+
export const runOpenCodeLifecycleCommand = (...args) => runPluginLifecycleCommand(OPENCODE, ...args);
|
|
179
14
|
|
|
180
15
|
// The answer is the process's whole job: it exits once the line is flushed,
|
|
181
16
|
// so a detached close never lingers on an open handle.
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { dirname,
|
|
2
|
-
|
|
1
|
+
import { dirname, join } from 'node:path';
|
|
2
|
+
|
|
3
|
+
import { pluginModuleImport } from '../plugin-module-source.js';
|
|
3
4
|
import { OPENCODE_LIFECYCLE_MARKER } from './plugin.js';
|
|
4
5
|
|
|
5
6
|
// The file FULI setup writes at `<OpenCode config>/plugins/fuli/index.js`.
|
|
6
7
|
// OpenCode V2 loads a plugins/<name>/ directory through its index (or server)
|
|
7
8
|
// module and needs a default export with an id and a setup function. The file
|
|
8
|
-
// only binds this installation's paths to the packaged plugin.js
|
|
9
|
-
// plugin
|
|
10
|
-
//
|
|
9
|
+
// only binds this installation's paths to the packaged plugin.js
|
|
10
|
+
// (plugin-module-source.js), so it changes only when its paths or the
|
|
11
|
+
// descriptor pack's hooks do.
|
|
11
12
|
const HEADER = `// FULI managed OpenCode plugin (${OPENCODE_LIFECYCLE_MARKER}): fuli setup rewrites this file and fuli uninstall removes it.`;
|
|
12
13
|
|
|
13
14
|
// `hooks` is the descriptor pack's lifecycleHooks; the hook's own deadline
|
|
@@ -21,33 +22,10 @@ export function openCodePluginSource(context, hooks) {
|
|
|
21
22
|
events: hooks.events.map(({ event }) => event),
|
|
22
23
|
timeoutMs: Math.max(1000, hooks.timeoutSec * 1000 - 2000)
|
|
23
24
|
};
|
|
24
|
-
|
|
25
|
-
return `${HEADER}\n${isAbsolute(plugin) ? packagedImport(plugin) : installedImport(context.nodePath, plugin)}\n`
|
|
25
|
+
return `${HEADER}\n${pluginModuleImport(join(directory, 'plugin.js'), context.nodePath, 'fuliOpenCodePlugin')}\n`
|
|
26
26
|
+ `export default fuliOpenCodePlugin(${JSON.stringify(config, null, 2)});\n`;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
function packagedImport(plugin) {
|
|
30
|
-
return `import { fuliOpenCodePlugin } from ${JSON.stringify(pathToFileURL(plugin).href)};\n`;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Package-relative scripts are an installed Windows copy's: nodePath is the
|
|
34
|
-
// launcher beside its installation.json (src/setup/paths.js, rec#11 D-80). The
|
|
35
|
-
// hook runs through that launcher, and the plugin module is imported from the
|
|
36
|
-
// version installation.json names when OpenCode loads the file, so an update or
|
|
37
|
-
// rollback leaves this file as it is.
|
|
38
|
-
function installedImport(launcher, plugin) {
|
|
39
|
-
const record = join(dirname(launcher), 'installation.json');
|
|
40
|
-
return [
|
|
41
|
-
"import { readFileSync } from 'node:fs';",
|
|
42
|
-
"import { join } from 'node:path';",
|
|
43
|
-
"import { pathToFileURL } from 'node:url';",
|
|
44
|
-
'',
|
|
45
|
-
`const { packageRoot } = JSON.parse(readFileSync(${JSON.stringify(record)}, 'utf8'));`,
|
|
46
|
-
`const { fuliOpenCodePlugin } = await import(pathToFileURL(join(packageRoot, ${JSON.stringify(plugin)})).href);`,
|
|
47
|
-
''
|
|
48
|
-
].join('\n');
|
|
49
|
-
}
|
|
50
|
-
|
|
51
29
|
export function isFuliOpenCodePlugin(text) {
|
|
52
30
|
return typeof text === 'string' && text.startsWith(HEADER);
|
|
53
31
|
}
|