fuli-context 0.23.0-beta.9 → 0.25.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 +169 -979
- package/README.zh-CN.md +157 -830
- package/dist/web/assets/{AboutPage-Co0jsR1c.js → AboutPage-Dx07_Z8u.js} +1 -1
- package/dist/web/assets/AboutSectionHeading-BdhpM609.js +1 -0
- package/dist/web/assets/AboutSectionHeading-DjXpIV27.css +1 -0
- package/dist/web/assets/AgentAppsPage-5VW0uCTz.js +1 -0
- package/dist/web/assets/{AgentAppsPage-BuJWNNdL.css → AgentAppsPage-BCxrjrsE.css} +1 -1
- package/dist/web/assets/AgentAvatar-DbsG1_BY.css +1 -0
- package/dist/web/assets/AgentAvatar-DlAQP7gm.js +1 -0
- package/dist/web/assets/{AgentHand-CTKH7yFY.js → AgentHand-FPFg9-Y1.js} +1 -1
- package/dist/web/assets/AgentManagement-CLFw9oV9.css +1 -0
- package/dist/web/assets/AgentManagement-UTe4I3WA.js +7 -0
- package/dist/web/assets/AgentMentionCopy-B9eIIr3L.css +1 -0
- package/dist/web/assets/AgentMentionCopy-C5ExlutT.js +1 -0
- package/dist/web/assets/{AgentName-DNxVHPb0.js → AgentName-C8mYbtKs.js} +1 -1
- package/dist/web/assets/AgentProfilePage-BLeyT3By.js +5 -0
- package/dist/web/assets/{AgentProfilePage-D5QUzw5N.css → AgentProfilePage-DumsVHP1.css} +1 -1
- package/dist/web/assets/AgentServicesPage-B2mDUgYZ.css +1 -0
- package/dist/web/assets/AgentServicesPage-BXi152Xc.js +1 -0
- package/dist/web/assets/{AppViewerPage-BMnN0lgj.js → AppViewerPage-BR8ttEGa.js} +1 -1
- package/dist/web/assets/{BackToTop-BfdZE6xK.js → BackToTop-5_AQRMZl.js} +1 -1
- package/dist/web/assets/{BoardCardFieldsMenu-xjUzesvU.js → BoardCardFieldsMenu-Bb_Z9a4Q.js} +1 -1
- package/dist/web/assets/{BoardMoveMenu-CCvochC4.js → BoardMoveMenu-B-f8O6cC.js} +1 -1
- package/dist/web/assets/{Breadcrumb-ys780J7e.js → Breadcrumb-DtM5lZy5.js} +1 -1
- package/dist/web/assets/{CaptureChangePage-BY7KKPuU.js → CaptureChangePage-BzwcfacI.js} +1 -1
- package/dist/web/assets/ConnectionsPage-C_vgqwF2.js +1 -0
- package/dist/web/assets/ConnectionsPage-DS2PEG6K.css +1 -0
- package/dist/web/assets/{CopyFixPrompt-ERDPz6w7.js → CopyFixPrompt-CErC3Paj.js} +1 -1
- package/dist/web/assets/DataFormatPage-Ccy_e9rf.css +1 -0
- package/dist/web/assets/DataFormatPage-DwL4Ofc9.js +2 -0
- package/dist/web/assets/DebugTurnPage-UpK_3ZWY.js +1 -0
- package/dist/web/assets/DebugTurnsPage-C0aZg5-3.js +1 -0
- package/dist/web/assets/{DialogTitle-C86eI8Q_.js → DialogTitle-BQXOe8EK.js} +1 -1
- package/dist/web/assets/{EmployeeRedirectPage-B5Sh-mOu.js → EmployeeRedirectPage-BjWpXDSM.js} +1 -1
- package/dist/web/assets/EmployeeScopeDialog-Bt3ZlDyZ.js +1 -0
- package/dist/web/assets/EmployeeScopeDialog-U_-eNH0Z.css +1 -0
- package/dist/web/assets/{EmployeeWorkbench-BhReI8l6.css → EmployeeWorkbench-Bp9pUkfS.css} +1 -1
- package/dist/web/assets/EmployeeWorkbench-GtJIUD5G.js +4 -0
- package/dist/web/assets/FieldRoot-DRf4wM5x.js +1 -0
- package/dist/web/assets/FlaGrowth-DgVLB8hp.css +1 -0
- package/dist/web/assets/FlaGrowth-OQtTLTng.js +1 -0
- package/dist/web/assets/FlaOccupationKit-BvrKsosv.css +1 -0
- package/dist/web/assets/FlaOccupationKit-C-x4VrKk.js +1 -0
- package/dist/web/assets/{FlaTaskSheets-IQ1HsEu5.js → FlaTaskSheets-CoaF5CbQ.js} +1 -1
- package/dist/web/assets/FlasPage-CgIVOGFM.js +1 -0
- package/dist/web/assets/FlasPage-H99IZ9M6.css +1 -0
- package/dist/web/assets/{GrowthLoading-BMf6Z2MU.js → GrowthLoading-VuVo2vLf.js} +1 -1
- package/dist/web/assets/HowtoPage-CZ3mOdLc.js +1 -0
- package/dist/web/assets/{HowtoPage-BRV2W1Go.css → HowtoPage-CrvMmT6K.css} +1 -1
- package/dist/web/assets/InboxPage-1ue8vA7H.css +1 -0
- package/dist/web/assets/InboxPage-zNUnnYeJ.js +6 -0
- package/dist/web/assets/{KnowledgeDeleteButton-Bo7gXmnS.js → KnowledgeDeleteButton-BlUnSG3b.js} +1 -1
- package/dist/web/assets/{KnowledgeHardDeleteSection-amJaLmkS.js → KnowledgeHardDeleteSection-CznXBtHY.js} +1 -1
- package/dist/web/assets/KnowledgeItemEditPage-DGRNkAYd.js +1 -0
- package/dist/web/assets/{KnowledgeItemSummaryCard-CjcKr6Xr.js → KnowledgeItemSummaryCard-Co5JKBHl.js} +1 -1
- package/dist/web/assets/KnowledgeOrganizerPage-BWvF1GEu.js +1 -0
- package/dist/web/assets/KnowledgeOrganizerPage-CJaFkfS7.css +1 -0
- package/dist/web/assets/KnowledgePage--Z4_kAhq.js +1 -0
- package/dist/web/assets/KnowledgePeek-BgzQA9SI.js +1 -0
- package/dist/web/assets/{KnowledgePeek-Bm5jRVA9.css → KnowledgePeek-CwZVuSkf.css} +1 -1
- package/dist/web/assets/{KnowledgeTurnReceiptPage-CbRSAOkW.js → KnowledgeTurnReceiptPage-Csyjimeg.js} +1 -1
- package/dist/web/assets/KnowledgeWorkspace-0yOpWtEB.js +4 -0
- package/dist/web/assets/{KnowledgeWorkspace-DCoVFyf0.css → KnowledgeWorkspace-BgWo6lBj.css} +1 -1
- package/dist/web/assets/{MeAvatar-Ca5kjZR7.js → MeAvatar-aY_q8cKs.js} +1 -1
- package/dist/web/assets/{MeLink-CMsMg8E_.js → MeLink-B0pNwVLa.js} +1 -1
- package/dist/web/assets/MenuSeparator-BR-uLovR.js +1 -0
- package/dist/web/assets/ModelSettingsPage-B9PS1Kay.css +1 -0
- package/dist/web/assets/ModelSettingsPage-BL6MsF7C.js +1 -0
- package/dist/web/assets/{NotFoundPage-j5qbgkxY.js → NotFoundPage-Cr1MaPuk.js} +1 -1
- package/dist/web/assets/NoticeRow-BXZWn4EZ.js +1 -0
- package/dist/web/assets/NoticeRow-ktVO_9Es.css +1 -0
- package/dist/web/assets/OccupationsPage-CkVqZ2pz.js +1 -0
- package/dist/web/assets/OccupationsPage-Dup7WzNh.css +1 -0
- package/dist/web/assets/OverviewPage-DFW3Ua0Z.js +1 -0
- package/dist/web/assets/OverviewPage-Dr4jrXW4.css +1 -0
- package/dist/web/assets/{PageColumns-C93sMwwH.js → PageColumns-DvehZlYm.js} +1 -1
- package/dist/web/assets/PageOutline-CFGtHmOK.js +1 -0
- package/dist/web/assets/PageOutline-DG5ZYtA8.css +1 -0
- package/dist/web/assets/{PersonalProfilePage-DdBfHnqq.css → PersonalProfilePage-DnjNX2xK.css} +1 -1
- package/dist/web/assets/PersonalProfilePage-TxsNr44t.js +1 -0
- package/dist/web/assets/PersonalProjectsPage-AhgP6CL8.js +1 -0
- package/dist/web/assets/{PinIcon-Dp4Ubaw6.js → PinIcon-BTQsnxRY.js} +1 -1
- package/dist/web/assets/PopperContent-DtMksk76.js +1 -0
- package/dist/web/assets/{Presence-D-jzaDBV.js → Presence-B0zMpCF4.js} +1 -1
- package/dist/web/assets/ProfileAuthorChip-BqT9Vv65.js +1 -0
- package/dist/web/assets/ProfileAuthorChip-CAWNGoW3.css +1 -0
- package/dist/web/assets/{ProjectAgentsPage-RpfiV2Fm.css → ProjectAgentsPage-CjeXFzHr.css} +1 -1
- package/dist/web/assets/ProjectAgentsPage-O-cMavcz.js +5 -0
- package/dist/web/assets/{ProjectJudgmentPolicy-DR8Rk_1K.js → ProjectJudgmentPolicy-CyHAu0nm.js} +2 -2
- package/dist/web/assets/{PublicProjectsPage-QwAtKnu1.js → PublicProjectsPage-Ck1QSR0R.js} +1 -1
- package/dist/web/assets/RecentNotices-vJobVOcm.js +1 -0
- package/dist/web/assets/{RoundtablesPage-DLZdviOP.js → RoundtablesPage-C3dYekQ5.js} +6 -6
- package/dist/web/assets/{RoundtablesPage-DK9A9J-y.css → RoundtablesPage-DL-IOngN.css} +1 -1
- package/dist/web/assets/RovingFocusGroup-CUqyjFSs.js +1 -0
- package/dist/web/assets/{RovingFocusItem-HhNodnJn.js → RovingFocusItem-CyyuWXjE.js} +1 -1
- package/dist/web/assets/{SessionMigrationPage-_W2BnsjS.js → SessionMigrationPage-DukDM0TP.js} +1 -1
- package/dist/web/assets/SessionRecordsPage-DZ5ZBiuS.js +1 -0
- package/dist/web/assets/SettingsPage-BVIU7iFS.js +1 -0
- package/dist/web/assets/SettingsPage-Cj3pEWcd.css +1 -0
- package/dist/web/assets/SharedJefaReportPage-DUY03VLS.js +1 -0
- package/dist/web/assets/TagVocabularyPage-BKLFJiSu.js +1 -0
- package/dist/web/assets/TaskBlockerClear-BBmPbomO.css +1 -0
- package/dist/web/assets/TaskBlockerClear-BxOiiuK8.js +1 -0
- package/dist/web/assets/TaskBlockerNotice-iUiD3BuZ.js +1 -0
- package/dist/web/assets/{TaskReason-BgF2K1hA.js → TaskReason-D5j7L8tl.js} +1 -1
- package/dist/web/assets/TeamCard-CDunbIrP.js +1 -0
- package/dist/web/assets/TeamCard-CihQsZZ1.css +1 -0
- package/dist/web/assets/{TeamCardsWidget-CZTQVqyh.js → TeamCardsWidget-CUW-fPn7.js} +1 -1
- package/dist/web/assets/TeamIsland-CmpDmIX2.js +9 -0
- package/dist/web/assets/{TeamIsland-BBQbpozz.css → TeamIsland-DvtcsAsb.css} +1 -1
- package/dist/web/assets/{Teleport-Dg_IoSZh.js → Teleport-Dzdr8umQ.js} +1 -1
- package/dist/web/assets/{TextField-Y8DAIUw6.js → TextField-BPhEpEv9.js} +1 -1
- package/dist/web/assets/TonborgDelegationSwitch-C1nkJqkJ.js +1 -0
- package/dist/web/assets/TonborgDelegationSwitch-DeqERWoo.css +1 -0
- package/dist/web/assets/{UiChip-vvwIQTGB.js → UiChip-BEQ067LV.js} +1 -1
- package/dist/web/assets/UiDialog-JjqzOA0z.js +1 -0
- package/dist/web/assets/{UiDisclosure-Bp0vA9km.js → UiDisclosure-L6GEJHSw.js} +1 -1
- package/dist/web/assets/UiIcon-vgD4v8q8.js +1 -0
- package/dist/web/assets/UiIconButton-BzyMc14P.js +1 -0
- package/dist/web/assets/{UiSegmented-DX8WXXVn.js → UiSegmented-CIIm3KoV.js} +1 -1
- package/dist/web/assets/{UiWeight-Ci6wZg1W.js → UiWeight-D-2iZ_Kc.js} +1 -1
- package/dist/web/assets/VirtualDirectoryList-BJecsQct.css +1 -0
- package/dist/web/assets/VirtualDirectoryList-BV8KsA-Z.js +1 -0
- package/dist/web/assets/{VisuallyHidden-BLRDANy_.js → VisuallyHidden-BxKxuXRF.js} +1 -1
- package/dist/web/assets/VisuallyHiddenInput-DD4vhlqT.js +1 -0
- package/dist/web/assets/WidgetSlot-Dw5nWlb7.js +2 -0
- package/dist/web/assets/WorkbenchListHead-B0TjHsTO.js +1 -0
- package/dist/web/assets/WorkbenchListPage-BX6Z9gkB.css +1 -0
- package/dist/web/assets/WorkbenchListPage-D0xX-YNl.js +1 -0
- package/dist/web/assets/_plugin-vue_export-helper-B4pFJCwG.js +9 -0
- package/dist/web/assets/agent-apps-B1Je-mpY.js +1 -0
- package/dist/web/assets/agent-occupation-CjfQqSzd.js +1 -0
- package/dist/web/assets/{agent-pins-CoyKIkO2.js → agent-pins-DxHlJ96z.js} +1 -1
- package/dist/web/assets/agent-profile-BNPLhDog.css +1 -0
- package/dist/web/assets/{agent-roster-records-PfAgndHp.js → agent-roster-records-Bi5HWDif.js} +1 -1
- package/dist/web/assets/agent-work-summary-o_9-QWBL.js +1 -0
- package/dist/web/assets/{agent-workflows-CRdfc5xN.js → agent-workflows-DgdbJqpg.js} +1 -1
- package/dist/web/assets/{attach-closest-edge-BIyU46Kh.js → attach-closest-edge-DUc_VUVO.js} +1 -1
- package/dist/web/assets/{attention-store-BrThOc88.js → attention-store-Bod20yM3.js} +1 -1
- package/dist/web/assets/{badge-mwWygmG4.js → badge-tMy2Qr94.js} +1 -1
- package/dist/web/assets/{button-byjQ5eLH.js → button-DnKFsImW.js} +1 -1
- package/dist/web/assets/{card-Bo5Wyknz.js → card-Ccu7HCNb.js} +1 -1
- package/dist/web/assets/{catalog-CgoPKxd_.js → catalog-CJUV8OJ6.js} +1 -1
- package/dist/web/assets/checkbox-D1R6kTUB.js +1 -0
- package/dist/web/assets/{client-DmgW-kvA.js → client-D-G2i5VU.js} +2 -2
- package/dist/web/assets/client-links-store-UgmraFBZ.js +1 -0
- package/dist/web/assets/combobox-C7QLYGzs.js +1 -0
- package/dist/web/assets/console-DgRc8Itw.js +1 -0
- package/dist/web/assets/{conversation-launcher-settings-DVd61o9s.js → conversation-launcher-settings-CZAfuu8B.js} +1 -1
- package/dist/web/assets/copy-mention-C0EJhDPy.js +1 -0
- package/dist/web/assets/{dialog-CHAmruFj.js → dialog-Bbq93W68.js} +1 -1
- package/dist/web/assets/{dist-Bz5tCO-_.js → dist-Dd8yFhv6.js} +1 -1
- package/dist/web/assets/{dist-B9snV3GY.js → dist-PpsW5ZE3.js} +1 -1
- package/dist/web/assets/dropdown-menu-1fGUL0V3.js +1 -0
- package/dist/web/assets/{field-ZZb3Sy9Y.js → field-DjVv_wIS.js} +1 -1
- package/dist/web/assets/{format-bytes-DiEwa-ch.js → format-bytes-BKq_E0Hs.js} +1 -1
- package/dist/web/assets/hover-card-BO-929hq.js +1 -0
- package/dist/web/assets/{identity-4i_OR9WP.js → identity-DIG-uOiU.js} +1 -1
- package/dist/web/assets/index-C7IVLf_v.js +24 -0
- package/dist/web/assets/index-DF0TcfPY.css +1 -0
- package/dist/web/assets/{input-BP9Wn4Yk.js → input-DmwRmYO2.js} +1 -1
- package/dist/web/assets/is-equal-8VOV02sH.js +1 -0
- package/dist/web/assets/{label-xRSp2rqO.js → label-BvwPUTS4.js} +1 -1
- package/dist/web/assets/label-table-CDzYRZpc.js +1 -0
- package/dist/web/assets/{model-DRrCt6Xz.js → model-0TZRbkN2.js} +1 -1
- package/dist/web/assets/model-BF_ZMPLi.js +1 -0
- package/dist/web/assets/model-BjUERpoQ.js +3 -0
- package/dist/web/assets/model-CaR7VPg7.js +1 -0
- package/dist/web/assets/{model-6a2cm5q3.js → model-Dfe81jZT.js} +1 -1
- package/dist/web/assets/{model-DiJvQFH-.js → model-DpkZUZUL.js} +1 -1
- package/dist/web/assets/{model-CidDnNzT.js → model-Tmn6HvL-.js} +1 -1
- package/dist/web/assets/{model-P1cRTtx9.js → model-y7OUvtKz.js} +1 -1
- package/dist/web/assets/motion-C1fZrqmI.js +1 -0
- package/dist/web/assets/{motion-eJ8Y9ulR.js → motion-mAmbRj_M.js} +1 -1
- package/dist/web/assets/{motion-preference-CC0XwuGQ.js → motion-preference-Dz9S1bZa.js} +1 -1
- package/dist/web/assets/npm-copies-BLRc0FXW.js +1 -0
- package/dist/web/assets/{client-connection-model-DVwA-GIu.css → npm-copies-GRyMAduA.css} +1 -1
- package/dist/web/assets/occupation-catalog-_SnxxRbK.js +1 -0
- package/dist/web/assets/occupation-kits-DFC6Auuc.js +1 -0
- package/dist/web/assets/{option-CdihAKf9.js → option-DC8frdbr.js} +1 -1
- package/dist/web/assets/{orchestration-filters-DmF4Qs8E.js → orchestration-filters-UeiAHJqn.js} +1 -1
- package/dist/web/assets/overview-data-Cq1gefY5.js +1 -0
- package/dist/web/assets/page-refresh-DdRJaxMv.js +1 -0
- package/dist/web/assets/{page-title-CPUoKkyh.js → page-title-Cm9u_qw1.js} +1 -1
- package/dist/web/assets/person-profile-BH2AzOfw.js +1 -0
- package/dist/web/assets/popover-DW__YCSE.js +1 -0
- package/dist/web/assets/popup-host-ctKYu9Ze.js +1 -0
- package/dist/web/assets/profile-model-DtISOJ-X.js +1 -0
- package/dist/web/assets/{project-board-layout-BPk55Azx.js → project-board-layout-CTM8kAgq.js} +1 -1
- package/dist/web/assets/{project-capture-zRbPkI54.js → project-capture-B3pNhpFF.js} +1 -1
- package/dist/web/assets/{project-origin-BNl8Mqof.js → project-origin-BO8Ngccf.js} +1 -1
- package/dist/web/assets/quick-edit-api-B169r5Qb.js +1 -0
- package/dist/web/assets/radio-group-DqA46cXQ.js +1 -0
- package/dist/web/assets/review-api-CJaNgPMA.js +1 -0
- package/dist/web/assets/review-list-BbV-Mle7.js +1 -0
- package/dist/web/assets/review-store-DSQpb5P8.js +1 -0
- package/dist/web/assets/{role-names-BDswxugG.js → role-names-By0xdfTn.js} +1 -1
- package/dist/web/assets/roundtable-live-u9qUU6aA.js +1 -0
- package/dist/web/assets/{runtime-dom.esm-bundler-CjD1s0uc.js → runtime-dom.esm-bundler-DhFy4Djs.js} +1 -1
- package/dist/web/assets/save-file-oGyIokMI.js +1 -0
- package/dist/web/assets/select-TqPBladU.js +1 -0
- package/dist/web/assets/{session-launch-offers-2SxrTwBr.js → session-launch-offers-CtQeY4Qk.js} +1 -1
- package/dist/web/assets/{settings-restart-fHB-lEm8.js → settings-autosave-C7vW3_SP.js} +1 -1
- package/dist/web/assets/settings-restart-p12HUUve.js +1 -0
- package/dist/web/assets/shared-report-DQBSigHB.js +3 -0
- package/dist/web/assets/{source-adapters-TLaUKVEM.js → source-adapters-DPJzumzC.js} +1 -1
- package/dist/web/assets/{switch-Cq1rT1Ti.js → switch-D7w_0h3m.js} +1 -1
- package/dist/web/assets/tabs-DR8k0PN9.js +1 -0
- package/dist/web/assets/{task-card-fields-BkwTMtq6.js → task-card-fields-X1ZYCm_j.js} +1 -1
- package/dist/web/assets/{task-labels-CVomryt6.js → task-labels-LuXoQhF9.js} +1 -1
- package/dist/web/assets/{task-reason-BenU3Ly4.js → task-reason-ChpbGtyx.js} +1 -1
- package/dist/web/assets/{team-sheets-BIFVatFG.js → team-sheets-DYCQqa8I.js} +1 -1
- package/dist/web/assets/{textarea-CEokSlpT.js → textarea-D53VYanK.js} +1 -1
- package/dist/web/assets/ui-D4nAhcmu.css +1 -0
- package/dist/web/assets/ui-DmNbL8MW.js +1 -0
- package/dist/web/assets/{useAgentRecords-B0ODDGeO.js → useAgentRecords-Hy9nqMs7.js} +1 -1
- package/dist/web/assets/useAgentWorkSummary-mloD4p12.js +1 -0
- package/dist/web/assets/{useApi-CROJJdhE-CbQwoO_u.js → useApi-CROJJdhE-DnUGUb8O.js} +1 -1
- package/dist/web/assets/{useClipboardCopy-Dd9bf8dt.js → useClipboardCopy-BTuQMeWI.js} +1 -1
- package/dist/web/assets/{useFocusReturn-DFHFciMS.js → useFocusReturn-4hUmSzj9.js} +1 -1
- package/dist/web/assets/{useForwardExpose-D3bCxDJx.js → useForwardExpose-BDmW7q7u.js} +1 -1
- package/dist/web/assets/{useForwardPropsEmits-CshHUE63.js → useForwardPropsEmits-BzT2luD4.js} +1 -1
- package/dist/web/assets/useForwardScopeId-DZCnSswO.js +1 -0
- package/dist/web/assets/useKnowledgeConfirm-L8wnJCuX.js +1 -0
- package/dist/web/assets/useKnowledgeItemPeek-C_huXt6E.js +1 -0
- package/dist/web/assets/{useMinimumLoadingDisplay-Br2MBA-0.js → useMinimumLoadingDisplay-Dkl8NQru.js} +1 -1
- package/dist/web/assets/usePageTools-CbDOdIrg.js +1 -0
- package/dist/web/assets/usePrimitiveElement-tPQM7XJs.js +1 -0
- package/dist/web/assets/{useProjectAgentRoster-BLHF34Hj.js → useProjectAgentRoster-BBmRvcgr.js} +1 -1
- package/dist/web/assets/{useRoutePeek-KvY9hOQI.js → useRoutePeek-CRbCDqsm.js} +1 -1
- package/dist/web/assets/useTeamPeople-D_5cxxf1.js +1 -0
- package/dist/web/assets/{useTeamWork-wKGBRcNv.js → useTeamWork-CXEQwF4n.js} +1 -1
- package/dist/web/assets/{useTypeahead-C50w2tTI.js → useTypeahead-CVYuxPOD.js} +1 -1
- package/dist/web/assets/{utils-CArDYAhe.js → utils-BnrWDlfm.js} +1 -1
- package/dist/web/assets/utils-BsGjKHV8.js +1 -0
- package/dist/web/assets/verification-DbCo_dnY.js +1 -0
- package/dist/web/assets/version-1lwoVj6f.js +1 -0
- package/dist/web/assets/{vue-router-BzQKabzW.js → vue-router-D4_ms6om.js} +1 -1
- package/dist/web/assets/website-YgovUEcN.js +1 -0
- package/dist/web/assets/workbench-card-Dt0820yW.css +1 -0
- package/dist/web/index.html +90 -73
- package/docs/agent-conversations-and-collaboration.md +55 -58
- package/docs/agent-interface-architecture.md +7 -2
- package/docs/agent-roundtable.md +7 -7
- package/docs/client-connections.md +88 -10
- package/docs/client-links.md +16 -1
- package/docs/employee-agents.md +2 -2
- package/docs/judgment-and-autonomy.md +4 -2
- package/docs/public-personal-architecture.md +1 -1
- package/graph-provider/fuli_graph/app.py +6 -0
- package/graph-provider/fuli_graph/graph_field_contract.py +16 -5
- package/graph-provider/fuli_graph/graph_format_migrations.py +16 -0
- package/graph-provider/fuli_graph/graph_models.py +11 -62
- package/graph-provider/fuli_graph/graph_query.py +46 -105
- package/graph-provider/fuli_graph/knowledge_batch_confirmation.py +7 -5
- package/graph-provider/fuli_graph/knowledge_duplicate_models.py +24 -0
- package/graph-provider/fuli_graph/knowledge_duplicate_rules.py +157 -0
- package/graph-provider/fuli_graph/knowledge_duplicates.py +357 -0
- package/graph-provider/fuli_graph/knowledge_index_scan.py +120 -0
- package/graph-provider/fuli_graph/knowledge_item_routes.py +3 -1
- package/graph-provider/fuli_graph/knowledge_item_view.py +45 -2
- package/graph-provider/fuli_graph/knowledge_item_view_models.py +21 -0
- package/graph-provider/fuli_graph/knowledge_management.py +6 -1
- package/graph-provider/fuli_graph/knowledge_outdated.py +15 -5
- package/graph-provider/fuli_graph/knowledge_retrieval_models.py +95 -0
- package/graph-provider/fuli_graph/knowledge_retrieval_terms.py +116 -0
- package/graph-provider/fuli_graph/knowledge_review.py +65 -2
- package/graph-provider/fuli_graph/knowledge_review_models.py +5 -0
- package/graph-provider/fuli_graph/knowledge_search.py +191 -62
- package/graph-provider/fuli_graph/knowledge_semantic.py +87 -0
- package/graph-provider/fuli_graph/knowledge_semantic_index.py +98 -0
- package/graph-provider/fuli_graph/knowledge_semantic_models.py +72 -0
- package/graph-provider/fuli_graph/knowledge_semantic_query.py +19 -0
- package/graph-provider/fuli_graph/knowledge_versions.py +12 -1
- package/graph-provider/fuli_graph/models.py +13 -2
- package/graph-provider/fuli_graph/preference_versions.py +28 -7
- package/graph-provider/fuli_graph/project_agent_routes.py +60 -2
- package/graph-provider/fuli_graph/project_agent_task_models.py +63 -5
- package/graph-provider/fuli_graph/store.py +2 -0
- package/graph-provider/fuli_graph/store_project_agent_task_activity.py +12 -3
- package/graph-provider/fuli_graph/store_project_agent_task_blockers.py +110 -23
- package/graph-provider/fuli_graph/store_project_agent_task_pages.py +186 -0
- package/graph-provider/fuli_graph/store_project_agent_task_reads.py +6 -4
- package/graph-provider/fuli_graph/store_project_agent_task_recruitment.py +0 -7
- package/graph-provider/fuli_graph/store_project_agent_tasks.py +4 -3
- package/graph-provider/fuli_graph/store_task_contexts.py +14 -4
- package/graph-provider/fuli_graph/task_blocker.py +38 -6
- package/graph-provider/fuli_graph/task_context_routes.py +1 -1
- package/graph-provider/fuli_graph/tonborg_confirmation.py +48 -0
- package/graph-provider/pyproject.toml +1 -1
- package/native/win32/fuli-win-helper.exe +0 -0
- package/npm-shrinkwrap.json +16 -50
- package/package.json +2 -2
- package/packages/roundtable/src/peer/node-store.js +2 -6
- package/packages/roundtable/src/roundtable/chat-service.js +2 -1
- package/packages/roundtable/src/roundtable/chat.js +11 -1
- package/packages/roundtable/src/roundtable/delivery-state.js +43 -0
- package/packages/roundtable/src/roundtable/fla-address.js +6 -0
- package/packages/roundtable/src/roundtable/group-discussion-store.js +2 -2
- package/packages/roundtable/src/roundtable/group-discussion.js +15 -15
- package/packages/roundtable/src/roundtable/person-conversation.js +2 -1
- package/packages/roundtable/src/roundtable/service.js +38 -9
- package/packages/roundtable/src/roundtable/store.js +8 -5
- package/packages/roundtable/src/storage/database-format.js +21 -16
- package/registry/client-links.json +66 -4
- package/registry/occupation-plugins.json +593 -0
- package/skills/capturing-session-knowledge/SKILL.md +24 -7
- package/skills/capturing-session-knowledge/references/capture.md +22 -6
- package/skills/capturing-session-knowledge/references/coordination.md +16 -6
- package/skills/capturing-session-knowledge/references/retrieval.md +25 -6
- package/skills/flreview/SKILL.md +1 -1
- package/skills/operating-fuli/SKILL.md +42 -11
- package/skills/operating-fuli/references/workflow-recipes.md +9 -5
- package/src/acceptance-checks/port.js +37 -0
- package/src/adaptive-runtime/settings.js +1 -1
- package/src/adaptive-runtime/state.js +3 -3
- package/src/agent-apps/host-tools/catalog.js +7 -0
- package/src/agent-apps/store.js +2 -10
- package/src/agent-delegation/person-words.js +15 -1
- package/src/agent-kits/cli-presence.js +78 -0
- package/src/agent-kits/client-detection.js +7 -0
- package/src/agent-kits/client-installer.js +20 -3
- package/src/agent-kits/installer-manifest.js +11 -6
- package/src/agent-kits/legacy-hook-cleanup.js +4 -3
- package/src/agent-kits/new-sessions.js +82 -0
- package/src/agent-kits/opencode-plugin-gate.js +3 -1
- package/src/agent-kits/pins.js +12 -12
- package/src/agent-kits/ports.js +5 -2
- package/src/agent-kits/session-launcher.js +11 -4
- package/src/agent-kits/vendor/agent-installer/README.md +1 -1
- package/src/agent-kits/vendor/agent-installer/index.d.ts +1 -1
- package/src/agent-kits/vendor/agent-session-launcher/README.md +1 -1
- package/src/agent-kits/vendor/agent-session-launcher/index.d.ts +30 -1
- package/src/agent-kits/vendor/agent-session-launcher/index.mjs +8 -0
- package/src/agent-roundtable/tools.js +3 -3
- package/src/agent-services/store.js +2 -4
- package/src/agent-tools/agent-workflow-definitions.js +7 -3
- package/src/agent-tools/checkpoint-definitions.js +5 -4
- package/src/agent-tools/fla-lesson-definitions.js +24 -0
- package/src/agent-tools/graph-definitions.js +8 -0
- package/src/agent-tools/graph-handlers.js +10 -1
- package/src/agent-tools/interface-catalog.js +38 -7
- package/src/agent-tools/model-backend-definitions.js +1 -1
- package/src/agent-tools/occupation-kit-definitions.js +20 -0
- package/src/agent-tools/project-agent-definitions.js +19 -40
- package/src/agent-tools/project-agent-tool-definitions.js +5 -1
- package/src/agent-tools/reply-echo-definitions.js +18 -0
- package/src/agent-tools/tonborg-question-definitions.js +26 -0
- package/src/agent-workflows/agent-tools.js +69 -3
- package/src/agent-workflows/port.js +32 -4
- package/src/agent-workflows/store.js +16 -9
- package/src/agents/choice-answers.js +19 -0
- package/src/agents/claude-code/choice-answers.js +49 -0
- package/src/agents/claude-code/fla-menu-command.js +14 -0
- package/src/agents/claude-code/lifecycle-hook.js +16 -9
- package/src/agents/claude-code/transcript-format-probe.js +31 -0
- package/src/agents/claude-code/turn-records.js +38 -0
- package/src/agents/codex/fla-prompts.js +98 -0
- package/src/agents/codex/lifecycle-hook.js +9 -8
- package/src/agents/codex/transcript-format-probe.js +29 -0
- package/src/agents/cursor/lifecycle-hook.js +3 -2
- package/src/agents/identity-receipt.js +9 -7
- package/src/agents/lifecycle-failure.js +9 -0
- package/src/agents/lifecycle-message.js +4 -5
- package/src/agents/opencode/lifecycle-hook.js +12 -7
- package/src/agents/opencode/plugin.js +7 -2
- package/src/agents/token-usage-resolver.js +1 -1
- package/src/agents/transcript-format-registry.js +34 -0
- package/src/agents/transcript-format-scan.js +71 -0
- package/src/agents/turn-receipt.js +5 -4
- package/src/cli/command-registry.js +1 -1
- package/src/cli/local-runtime-command.js +5 -2
- package/src/cli/local-runtime-options.js +7 -3
- package/src/cli/models-command.js +15 -11
- package/src/cli/update-command.js +2 -2
- package/src/cli/update-installation.js +23 -6
- package/src/cli/workspace-connection-command.js +2 -2
- package/src/client-links/registry.js +6 -112
- package/src/conversations/entry-skeleton.js +113 -55
- package/src/conversations/human-interaction.js +1 -1
- package/src/conversations/person-words.js +29 -0
- package/src/conversations/preference-lifecycle.js +2 -1
- package/src/conversations/preference-session.js +17 -14
- package/src/conversations/reply-citations.js +21 -0
- package/src/conversations/stop-auto-close.js +42 -9
- package/src/conversations/task-context-view.js +113 -27
- package/src/conversations/turn-findings.js +105 -0
- package/src/data-format/format-notices.js +2 -1
- package/src/data-format/local-stores.js +22 -1
- package/src/debug-turns/model-capture.js +1 -1
- package/src/debug-turns/record.js +1 -1
- package/src/desktop/cli-path.js +253 -0
- package/src/desktop/desktop-app-package.js +31 -0
- package/src/desktop/{fuli-links.js → desktop-client-links.js} +20 -16
- package/src/desktop/desktop-controller.js +35 -3
- package/src/desktop/npm-adoption-store.js +7 -0
- package/src/desktop/npm-adoption.js +119 -0
- package/src/desktop/npm-copies.js +73 -0
- package/src/desktop/npm-copy-control.js +56 -0
- package/src/desktop/npm-copy-data.js +51 -0
- package/src/desktop/npm-copy-uninstall.js +67 -0
- package/src/desktop/windows-controller.js +13 -1
- package/src/desktop/windows-installation-switch.js +1 -1
- package/src/desktop/windows-node-launcher.js +11 -0
- package/src/desktop/windows-uninstall.js +3 -0
- package/src/dreaming/astro-calls.js +47 -0
- package/src/dreaming/projects.js +39 -0
- package/src/dreaming/run.js +312 -0
- package/src/dreaming/scheduler.js +58 -0
- package/src/employees/builtin/jefa/board-store.js +2 -10
- package/src/employees/builtin/jefa/tools.js +1 -1
- package/src/employees/management-policy.js +1 -1
- package/src/employees/manifest.js +1 -1
- package/src/employees/service.js +11 -1
- package/src/external-knowledge/document-mapping.js +1 -1
- package/src/external-knowledge/index.js +0 -4
- package/src/fla-growth/lessons.js +40 -0
- package/src/fla-growth/task-verification.js +25 -0
- package/src/fla-growth/tool-suggestions.js +107 -0
- package/src/fla-growth/verification.js +30 -0
- package/src/graphiti/agent-access-policy.js +1 -1
- package/src/graphiti/agent-conversations.js +2 -2
- package/src/graphiti/agent-growth.js +32 -4
- package/src/graphiti/capture-change-confirmation.js +4 -1
- package/src/graphiti/capture-notice.js +2 -1
- package/src/graphiti/capture-onboarding.js +1 -1
- package/src/graphiti/collaboration-preference-projection.js +1 -1
- package/src/graphiti/conversation-triage.js +1 -1
- package/src/graphiti/current-project-knowledge-search.js +24 -1
- package/src/graphiti/execution-mode.js +1 -1
- package/src/graphiti/federated-application.js +16 -8
- package/src/graphiti/federated-search.js +8 -1
- package/src/graphiti/fla-mention.js +105 -96
- package/src/graphiti/fla-menu-reader.js +25 -0
- package/src/graphiti/fla-menu.js +108 -0
- package/src/graphiti/fla-picker.js +21 -16
- package/src/graphiti/fuli-markup.js +60 -0
- package/src/graphiti/group-member-context.js +1 -1
- package/src/graphiti/human-review-channel.js +16 -2
- package/src/graphiti/knowledge-result-budget.js +2 -2
- package/src/graphiti/knowledge-review.js +2 -1
- package/src/graphiti/local-runtimes.js +11 -0
- package/src/graphiti/preference-task-scope.js +1 -1
- package/src/graphiti/project-agent-control-plane.js +6 -0
- package/src/graphiti/project-agent-mapping.js +23 -10
- package/src/graphiti/project-agent-mention.js +10 -28
- package/src/graphiti/project-agent-task-entry.js +1 -1
- package/src/graphiti/project-agent-task-sheets.js +1 -1
- package/src/graphiti/project-agent-workflows.js +20 -5
- package/src/graphiti/project-knowledge-presence.js +27 -0
- package/src/graphiti/project-path-context.js +2 -2
- package/src/graphiti/provider-client.js +60 -0
- package/src/graphiti/recall-policy.js +1 -1
- package/src/graphiti/reply-echo-agent-tool.js +36 -0
- package/src/graphiti/reply-echo-group.js +85 -0
- package/src/graphiti/reply-echo.js +87 -0
- package/src/graphiti/session-knowledge-migration.js +2 -1
- package/src/graphiti/session-prompt-sentences.js +52 -0
- package/src/graphiti/session-records.js +3 -2
- package/src/graphiti/source-marker.js +14 -0
- package/src/graphiti/task-blocker-progress.js +24 -1
- package/src/graphiti/task-context-entry.js +11 -0
- package/src/graphiti/task-entry-group-discussion.js +31 -31
- package/src/graphiti/task-entry-named-fla.js +40 -70
- package/src/graphiti/task-entry-preferences.js +16 -3
- package/src/graphiti/task-entry-project-scope.js +4 -4
- package/src/graphiti/task-entry-read-only.js +28 -0
- package/src/graphiti/task-entry-standing-owner.js +3 -3
- package/src/graphiti/task-experiences.js +21 -3
- package/src/graphiti/task-knowledge-checkpoint.js +4 -1
- package/src/graphiti/task-knowledge-recall.js +157 -28
- package/src/graphiti/task-prompt-statement.js +49 -0
- package/src/graphiti/task-remember.js +23 -9
- package/src/graphiti/task-stated-rules.js +75 -0
- package/src/graphiti/temporary-project-scope.js +1 -1
- package/src/graphiti/topic-proposals.js +6 -5
- package/src/graphiti/user-taste-skill.js +1 -1
- package/src/graphiti/workflow-candidate-mapping.js +1 -1
- package/src/http/agent-delegation-gate.js +9 -0
- package/src/http/api-router.js +27 -1
- package/src/http/cli-path-api-router.js +35 -0
- package/src/http/desktop-client-api-router.js +18 -0
- package/src/http/dreaming-api-router.js +35 -0
- package/src/http/graph-api-router.js +17 -0
- package/src/http/knowledge-item-api-router.js +7 -0
- package/src/http/notices-api-router.js +37 -0
- package/src/http/npm-copies-api-router.js +36 -0
- package/src/http/occupation-plugins-api-router.js +43 -0
- package/src/http/reply-echo-api-router.js +53 -0
- package/src/http/response.js +1 -1
- package/src/http/retrieval-terms-api-router.js +37 -0
- package/src/http/retrospectives-api-router.js +18 -0
- package/src/http/semantic-api-router.js +26 -0
- package/src/http/session-launch-api-router.js +34 -1
- package/src/http/static-handler.js +1 -1
- package/src/http/task-blocker-api-router.js +17 -5
- package/src/http/task-verification-api-router.js +16 -0
- package/src/http/whats-new-api-router.js +34 -0
- package/src/judgment/acceptance.js +10 -3
- package/src/judgment/agent-view.js +21 -4
- package/src/judgment/conversation.js +86 -2
- package/src/judgment/delegated-reviews.js +23 -0
- package/src/judgment/engine.js +49 -16
- package/src/judgment/explain-method.js +11 -0
- package/src/judgment/http.js +17 -2
- package/src/judgment/question-options.js +97 -0
- package/src/judgment/question-tools.js +235 -0
- package/src/judgment/review-delegation.js +89 -0
- package/src/judgment/review-prompt.js +44 -3
- package/src/judgment/review-verdicts.js +13 -4
- package/src/judgment/runtime.js +3 -1
- package/src/judgment/service.js +25 -5
- package/src/judgment/store.js +44 -8
- package/src/judgment/verdict-schema.js +6 -0
- package/src/judgment/visible-items.js +15 -4
- package/src/knowledge-duplicates/scheduler.js +28 -0
- package/src/knowledge-hard-delete/forget-references.js +5 -2
- package/src/knowledge-impressions/store.js +17 -5
- package/src/local-runtime/console-autostart-record.js +95 -0
- package/src/local-runtime/console-autostart.js +143 -0
- package/src/local-runtime/console-health.js +26 -0
- package/src/local-runtime/installed-console-launcher.js +73 -0
- package/src/local-runtime/lifecycle.js +88 -21
- package/src/local-runtime/processes.js +15 -2
- package/src/local-runtime/unresponsive-console.js +77 -0
- package/src/local-runtime/windows-process-handle.js +9 -3
- package/src/mcp/create-mcp-server.js +4 -0
- package/src/mcp/fla-menu-prompts.js +60 -0
- package/src/mcp/process-registry.js +45 -3
- package/src/mcp/runtime.js +13 -4
- package/src/mcp/session-id.js +3 -2
- package/src/mcp/stdio-relay.js +4 -1
- package/src/mcp/tool-annotations.js +5 -2
- package/src/mcp/tool-profiles.js +1 -1
- package/src/mcp/tool-result.js +3 -1
- package/src/model-backends/adapters/anthropic-messages.js +3 -3
- package/src/model-backends/adapters/exchange.js +2 -2
- package/src/model-backends/adapters/ollama-local-build.js +1 -1
- package/src/model-backends/adapters/openai-chat.js +3 -3
- package/src/model-backends/adapters/openai-embeddings.js +60 -0
- package/src/model-backends/adapters/registry.js +3 -1
- package/src/model-backends/adapters/typesafe-systemone.js +1 -1
- package/src/model-backends/budget.js +23 -8
- package/src/model-backends/config.js +50 -16
- package/src/model-backends/decision-contract.js +2 -1
- package/src/model-backends/endpoint-models.js +80 -0
- package/src/model-backends/http.js +22 -2
- package/src/model-backends/keys-http.js +5 -4
- package/src/model-backends/model-fetch.js +37 -0
- package/src/model-backends/models-http.js +54 -0
- package/src/model-backends/port.js +194 -69
- package/src/model-backends/prompt.js +15 -4
- package/src/model-backends/request.js +42 -3
- package/src/model-backends/role-settings.js +27 -2
- package/src/model-backends/role-trust.js +3 -15
- package/src/model-backends/role-work-store.js +2 -12
- package/src/model-backends/runtime.js +11 -2
- package/src/model-backends/secret-store.js +61 -12
- package/src/model-backends/suggestion-log.js +6 -15
- package/src/model-backends/usage-ledger.js +28 -18
- package/src/notices/recent-notices.js +175 -0
- package/src/notifications/needs-person.js +1 -1
- package/src/occupation-plugins/agent-tools.js +59 -0
- package/src/occupation-plugins/choice-store.js +65 -0
- package/src/occupation-plugins/manifest.js +165 -0
- package/src/occupation-plugins/port.js +104 -0
- package/src/occupation-plugins/recruitment.js +38 -0
- package/src/presence/windows-helper-pin.js +1 -1
- package/src/registry/updatable-manifest.js +127 -0
- package/src/retrieval-terms/fill.js +102 -0
- package/src/retrieval-terms/runner.js +50 -0
- package/src/retrieval-terms/terms-model.js +99 -0
- package/src/retrospectives/run.js +113 -0
- package/src/retrospectives/runs.js +18 -0
- package/src/retrospectives/scheduler.js +58 -0
- package/src/semantic/scheduler.js +50 -0
- package/src/semantic/semantic-index.js +94 -0
- package/src/server/application-lifecycle.js +1 -1
- package/src/server/signal-shutdown.js +31 -0
- package/src/server.js +41 -18
- package/src/setup/first-run-capture.js +6 -2
- package/src/setup/graph-runtime.js +46 -38
- package/src/setup/neo4j-memory-profile.js +1 -1
- package/src/setup/paths.js +2 -0
- package/src/standing-assignments/store.js +2 -4
- package/src/system/client-connection-status.js +8 -4
- package/src/system/doctor.js +80 -4
- package/src/system/graph-migration.js +1 -1
- package/src/system/mcp-process-scan.js +55 -0
- package/src/system/platform-path.js +21 -9
- package/src/system/runtime-settings.js +19 -7
- package/src/system/settings-guide.js +7 -0
- package/src/system/system-service.js +64 -7
- package/src/task-blockers/console-port.js +12 -6
- package/src/text/markdown-link.js +12 -0
- package/src/text/single-line.js +6 -0
- package/src/text/utf8-preview.js +7 -6
- package/src/whats-new/lines/0.25.0.json +17 -0
- package/src/whats-new/release-lines.js +66 -0
- package/src/whats-new/whats-new.js +70 -0
- package/src/work-surfaces/store.js +2 -4
- package/dist/web/assets/AboutSectionHeading-CiD3M3eG.css +0 -1
- package/dist/web/assets/AboutSectionHeading-w5P9g9WB.js +0 -1
- package/dist/web/assets/AgentAppsPage-DY_TV5EE.js +0 -1
- package/dist/web/assets/AgentManagement-CeF4mjtg.css +0 -1
- package/dist/web/assets/AgentManagement-VWpTW_38.js +0 -7
- package/dist/web/assets/AgentMentionCopy-CNKrzZvE.css +0 -1
- package/dist/web/assets/AgentMentionCopy-DI23ym95.js +0 -1
- package/dist/web/assets/AgentProfilePage-DrqWGjqt.js +0 -5
- package/dist/web/assets/AgentServicesPage-ARIWfmuh.css +0 -1
- package/dist/web/assets/AgentServicesPage-DEz1dnct.js +0 -1
- package/dist/web/assets/ConnectionsPage-Cj-T0BH2.js +0 -1
- package/dist/web/assets/ConnectionsPage-Cwt-knQQ.css +0 -1
- package/dist/web/assets/DataFormatPage-0Ne27K6I.css +0 -1
- package/dist/web/assets/DataFormatPage-D39VmkWL.js +0 -2
- package/dist/web/assets/DebugTurnPage-C6xOOTYf.js +0 -1
- package/dist/web/assets/DebugTurnsPage-uclemAXU.js +0 -1
- package/dist/web/assets/EmployeeScopeDialog-DbEgouOr.js +0 -1
- package/dist/web/assets/EmployeeScopeDialog-Do5PHQh7.css +0 -1
- package/dist/web/assets/EmployeeWorkbench-Cd0Yrv4Z.js +0 -4
- package/dist/web/assets/FieldRoot-BZby7Lhw.js +0 -1
- package/dist/web/assets/FlaGrowth-BS5MVg54.js +0 -1
- package/dist/web/assets/FlaGrowth-BzXY8pcx.css +0 -1
- package/dist/web/assets/FlasPage-DsAcdiFS.js +0 -1
- package/dist/web/assets/FlasPage-SLQDMv47.css +0 -1
- package/dist/web/assets/HowtoPage-CKJAtKbM.js +0 -1
- package/dist/web/assets/InboxPage-Bkx6nIhb.css +0 -1
- package/dist/web/assets/InboxPage-DPV8n8FW.js +0 -4
- package/dist/web/assets/KnowledgeItemEditPage-n0jtTdHB.js +0 -1
- package/dist/web/assets/KnowledgeOrganizerPage-CNm2jvJZ.css +0 -1
- package/dist/web/assets/KnowledgeOrganizerPage-CzXXBL9z.js +0 -1
- package/dist/web/assets/KnowledgePage-CZ9oDt3D.js +0 -1
- package/dist/web/assets/KnowledgePeek-J6gHDda8.js +0 -1
- package/dist/web/assets/KnowledgeWorkspace-6C9dPHLk.js +0 -4
- package/dist/web/assets/MenuSeparator-BlL75cLC.js +0 -1
- package/dist/web/assets/ModelSettingsPage-BwUnvtP6.js +0 -1
- package/dist/web/assets/ModelSettingsPage-ConWy_ec.css +0 -1
- package/dist/web/assets/OccupationsPage-DLIkdMDv.js +0 -1
- package/dist/web/assets/OccupationsPage-Di7B-bPl.css +0 -1
- package/dist/web/assets/OverviewPage-BeExbgPK.js +0 -1
- package/dist/web/assets/OverviewPage-xdF5g6bZ.css +0 -1
- package/dist/web/assets/PageOutline-BqVgnlos.css +0 -1
- package/dist/web/assets/PageOutline-Dtu7R8Wo.js +0 -1
- package/dist/web/assets/PersonalProfilePage-CIeXNXqv.js +0 -1
- package/dist/web/assets/PersonalProjectsPage-DM70jshg.js +0 -1
- package/dist/web/assets/PopperContent-D6WQ0NV4.js +0 -1
- package/dist/web/assets/ProfileAuthorChip-C_0hzDoP.css +0 -1
- package/dist/web/assets/ProfileAuthorChip-CpLzynWF.js +0 -1
- package/dist/web/assets/ProjectAgentsPage-v-Wtq-2-.js +0 -5
- package/dist/web/assets/RovingFocusGroup-CmwaBpdi.js +0 -1
- package/dist/web/assets/SessionRecordsPage-CedaErNM.js +0 -1
- package/dist/web/assets/SettingsPage-D85vqpZb.css +0 -1
- package/dist/web/assets/SettingsPage-aRxdnfBu.js +0 -1
- package/dist/web/assets/SharedJefaReportPage-BkmmPYH1.js +0 -1
- package/dist/web/assets/TagVocabularyPage-Bcd5fvzW.js +0 -1
- package/dist/web/assets/TaskBlockerClear-Bln3zxga.js +0 -1
- package/dist/web/assets/TaskBlockerClear-CjSNfpyP.css +0 -1
- package/dist/web/assets/TaskBlockerNotice-Db1uAtT2.js +0 -1
- package/dist/web/assets/TeamCard-B4J2jkm5.js +0 -1
- package/dist/web/assets/TeamCard-CsmWDw2Q.css +0 -1
- package/dist/web/assets/TeamIsland-DXIQQ3bx.js +0 -9
- package/dist/web/assets/UiDialog-Cbb3AvXb.js +0 -1
- package/dist/web/assets/UiIcon-o5x6Sf-c.js +0 -1
- package/dist/web/assets/UiIconButton-EZ8ktpFH.js +0 -1
- package/dist/web/assets/UiNotice-DYZn5s6m.js +0 -1
- package/dist/web/assets/VirtualDirectoryList-1vLi41SD.css +0 -1
- package/dist/web/assets/VirtualDirectoryList-XB8MT97E.js +0 -1
- package/dist/web/assets/VisuallyHiddenInput-D-GgOU3T.js +0 -1
- package/dist/web/assets/WidgetSlot-URHq8Let.js +0 -2
- package/dist/web/assets/_plugin-vue_export-helper-PxAQThRD.js +0 -9
- package/dist/web/assets/agent-apps-CQf2Eba8.js +0 -1
- package/dist/web/assets/agent-avatar-lPJyVS9O.js +0 -1
- package/dist/web/assets/agent-occupation-DM6nIHrD.js +0 -1
- package/dist/web/assets/agent-profile-Clb-gYu-.css +0 -1
- package/dist/web/assets/agent-work-summary-bzTwEUaA.js +0 -1
- package/dist/web/assets/checkbox-BB8_0W6A.js +0 -1
- package/dist/web/assets/client-connection-model-CrDtN1yF.js +0 -1
- package/dist/web/assets/client-links-store-B7VjTEfO.js +0 -1
- package/dist/web/assets/combobox-BOXLFvvr.js +0 -1
- package/dist/web/assets/console-BB2sTsSs.js +0 -1
- package/dist/web/assets/context-menu-DW29av0t.js +0 -1
- package/dist/web/assets/dropdown-menu-C0AuLdFm.js +0 -1
- package/dist/web/assets/fla-mention-D_Qb7VeY.js +0 -1
- package/dist/web/assets/index-CSV9nk7P.js +0 -2
- package/dist/web/assets/index-DFt6UfTv.css +0 -1
- package/dist/web/assets/label-table-BUAeArKh.js +0 -1
- package/dist/web/assets/model-4BHOc7rR.js +0 -1
- package/dist/web/assets/model-CxmTkWuw.js +0 -1
- package/dist/web/assets/motion-TN6JdrrU.js +0 -1
- package/dist/web/assets/occupation-catalog-C3Hj8p4a.js +0 -1
- package/dist/web/assets/person-profile-Cmkd1uXt.js +0 -1
- package/dist/web/assets/popover-DyX7FE_t.js +0 -1
- package/dist/web/assets/profile-model-CmC9A3we.js +0 -1
- package/dist/web/assets/quick-edit-api-D6Xgntqh.js +0 -1
- package/dist/web/assets/radio-group-AkUGYCQ8.js +0 -1
- package/dist/web/assets/roundtable-live-C1wc_F30.js +0 -1
- package/dist/web/assets/save-file-rPduHi2f.js +0 -1
- package/dist/web/assets/select-CuhUd9VL.js +0 -1
- package/dist/web/assets/shared-report-BKhY4rtE.js +0 -3
- package/dist/web/assets/tabs-B8ccOT5z.js +0 -1
- package/dist/web/assets/ui-CoUaCzmO.css +0 -1
- package/dist/web/assets/ui-Pf0_u3Mo.js +0 -1
- package/dist/web/assets/useAgentWorkSummary-CNoUxwOW.js +0 -1
- package/dist/web/assets/useForwardScopeId-Bzm9IM9h.js +0 -1
- package/dist/web/assets/useKnowledgeItemPeek-24H5cZzL.js +0 -1
- package/dist/web/assets/useTeamPeople-IATXewrX.js +0 -1
- package/dist/web/assets/utils-_mWlJRpS.js +0 -1
- package/dist/web/assets/version-Cw272WBv.js +0 -1
- package/src/workspace-protocol/array-validation.js +0 -19
- package/src/workspace-protocol/base64url-contract.js +0 -27
- package/src/workspace-protocol/constants.js +0 -37
- package/src/workspace-protocol/error-contract.js +0 -24
- package/src/workspace-protocol/fact-contract.js +0 -110
- package/src/workspace-protocol/governance-contract.js +0 -47
- package/src/workspace-protocol/index.js +0 -53
- package/src/workspace-protocol/json-budget.js +0 -19
- package/src/workspace-protocol/manifest-contract.js +0 -186
- package/src/workspace-protocol/publication-contract.js +0 -212
- package/src/workspace-protocol/query-contract.js +0 -149
- package/src/workspace-protocol/scalar-contract.js +0 -192
- package/src/workspace-protocol/sync-contract.js +0 -184
- package/src/workspace-protocol/text-contract.js +0 -39
- package/src/workspace-protocol/validation.js +0 -66
- /package/dist/web/assets/{UiNotice-ZCBdABdM.css → UiIconButton-ZCBdABdM.css} +0 -0
- /package/dist/web/assets/{settings-restart-BU_GGtbG.css → settings-autosave-BU_GGtbG.css} +0 -0
|
@@ -4,6 +4,7 @@ import { diagnosticEventLog } from '../diagnostics/event-log.js';
|
|
|
4
4
|
import { errorCode } from '../diagnostics/safe-event.js';
|
|
5
5
|
import { resolveGraphRuntimeOptions } from '../graphiti/runtime-config.js';
|
|
6
6
|
import { hookFailureCause } from './lifecycle-message.js';
|
|
7
|
+
import { consoleAutostartNotice } from '../local-runtime/console-autostart-record.js';
|
|
7
8
|
|
|
8
9
|
// A lifecycle hook that failed records it in the data directory's diagnostics
|
|
9
10
|
// log (rec#73), with the same cause its client was shown and the session as
|
|
@@ -20,6 +21,14 @@ export function recordHookFailure({ runtimeConfigPath, client, event, error, ses
|
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
// Why client sessions no longer start FULI by themselves (rec#94), appended
|
|
25
|
+
// to every Agent's "FULI unavailable" text; '' when they still do.
|
|
26
|
+
export function consoleRecoveryNotice(runtimeConfigPath) {
|
|
27
|
+
if (typeof runtimeConfigPath !== 'string' || !runtimeConfigPath) return '';
|
|
28
|
+
const notice = consoleAutostartNotice(dirname(runtimeConfigPath));
|
|
29
|
+
return notice ? ` ${notice}` : '';
|
|
30
|
+
}
|
|
31
|
+
|
|
23
32
|
// The runtime configuration a hook process was started with, as the hook
|
|
24
33
|
// itself resolves it; null when even that cannot be resolved.
|
|
25
34
|
export function runtimeConfigPathOf(args, env = process.env) {
|
|
@@ -13,7 +13,8 @@ export function hookFailureCause(error) {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export const PASS_TASK_TOKEN = 'Pass taskContextToken to every FULI call. ';
|
|
16
|
-
|
|
16
|
+
// rec#88: every request re-reads the label, so it says each thing once and briefly.
|
|
17
|
+
export const TASK_RULES_ON_DEMAND = 'Rules are referenced by version: read a fuli://rules/task-entry section only when you must act on it, never for an ordinary task.';
|
|
17
18
|
|
|
18
19
|
// How a hook-delivered task ends, in the entry's own label (rec#47 F1). The
|
|
19
20
|
// entry only references the checkpoint and receipt rules, so the label says
|
|
@@ -27,16 +28,14 @@ export function taskClosingInstruction(entry) {
|
|
|
27
28
|
if (typeof entry?.taskContextToken !== 'string') return '';
|
|
28
29
|
const call = 'checkpoint_task_knowledge with this taskContextToken';
|
|
29
30
|
const checkpoint = entry.checkpoint_required === true ? `Before your final reply, call ${call}. `
|
|
30
|
-
: entry.checkpoint_guidance ? `The Stop hook closes this task
|
|
31
|
-
+ '(knowledge, experience, memory changes, collaborators, a meaningful workLog). ' : '';
|
|
31
|
+
: entry.checkpoint_guidance ? `The Stop hook closes this task; call ${call} only to record something worth keeping. ` : '';
|
|
32
32
|
return checkpoint + taskReceiptInstruction(entry);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// The receipt sentence alone: a blocked frame keeps it too (preference-lifecycle.js).
|
|
36
36
|
export function taskReceiptInstruction(entry) {
|
|
37
37
|
return entry?.agent_receipt?.required === true && typeof entry.agent_receipt.markdown === 'string'
|
|
38
|
-
? 'End your final reply with agent_receipt.markdown, unchanged
|
|
39
|
-
+ '(a receipt returned by checkpoint_task_knowledge replaces it). ' : '';
|
|
38
|
+
? 'End your final reply with agent_receipt.markdown, unchanged, once (a checkpoint receipt replaces it). ' : '';
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
const DEFAULT_MAX_BYTES = 8_000;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { hookFailureCause, PASS_TASK_TOKEN, TASK_RULES_ON_DEMAND, taskClosingInstruction } from '../lifecycle-message.js';
|
|
3
|
-
import { recordHookFailure } from '../lifecycle-failure.js';
|
|
3
|
+
import { consoleRecoveryNotice, recordHookFailure } from '../lifecycle-failure.js';
|
|
4
4
|
import { compactTaskContext } from '../../conversations/task-context-view.js';
|
|
5
5
|
import { preferenceHookOutput } from '../../conversations/preference-lifecycle.js';
|
|
6
6
|
import { sessionFuliCommandResult, sessionFuliEntryRefusal, sessionFuliOffContext } from '../../conversations/session-fuli-entry.js';
|
|
@@ -12,6 +12,7 @@ import { createRuntimeLeaseClient } from '../../adaptive-runtime/lease-client.js
|
|
|
12
12
|
import { openFederatedGraphApplication } from '../../graphiti/federated-application.js';
|
|
13
13
|
import { resolveGraphRuntimeOptions } from '../../graphiti/runtime-config.js';
|
|
14
14
|
import { isMainModule } from '../../system/main-module.js';
|
|
15
|
+
import { platformPath, wslCallerPath } from '../../system/platform-path.js';
|
|
15
16
|
import { readHookInput } from '../lifecycle-input.js';
|
|
16
17
|
|
|
17
18
|
// The FULI side of the OpenCode V2 plugin (plugin.js): OpenCode runs plugins
|
|
@@ -31,7 +32,9 @@ const DEFAULT_PROMPT_TIMEOUT_MS = 15_000;
|
|
|
31
32
|
|
|
32
33
|
const ENTRY_LABEL = 'Fuli task context (OpenCode plugin). Apply effective_preferences. ';
|
|
33
34
|
|
|
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() } = {}) {
|
|
35
38
|
if (!OPENCODE_EVENTS.includes(event)) throw new TypeError('Unsupported OpenCode lifecycle event');
|
|
36
39
|
const sessionId = input?.session_id;
|
|
37
40
|
if (typeof sessionId !== 'string' || !sessionId.trim() || sessionId.length > 256) {
|
|
@@ -49,19 +52,20 @@ export async function openCodeLifecycleOutput(event, input, invoke, session = {}
|
|
|
49
52
|
if (typeof input.cwd !== 'string' || !input.cwd.trim() || typeof input.prompt !== 'string') {
|
|
50
53
|
throw new TypeError('OpenCode task entry requires cwd and prompt');
|
|
51
54
|
}
|
|
55
|
+
const projectPath = wslCallerPath(input.cwd, input.wsl_distribution, pathApi);
|
|
52
56
|
// OpenCode's prompt hook cannot hold a prompt back, so the person's FULI
|
|
53
57
|
// command line still reaches the model: it is told the answer to relay.
|
|
54
|
-
const command = await
|
|
55
|
-
projectPath
|
|
58
|
+
const command = await sessionCommand?.({ sessionId, sourceApplication: SOURCE_APPLICATION, prompt: input.prompt,
|
|
59
|
+
projectPath });
|
|
56
60
|
if (command) {
|
|
57
61
|
return { context: `The person's message is a FULI session command; FULI already applied it and answered: `
|
|
58
62
|
+ `${JSON.stringify(`FULI: ${command.message}`)}. Reply with that answer only; no task was started.` };
|
|
59
63
|
}
|
|
60
|
-
const off = await
|
|
64
|
+
const off = await entryRefusal?.();
|
|
61
65
|
if (off) return { context: sessionFuliOffContext(off) };
|
|
62
66
|
const context = await invoke('begin_task_context', { sessionId,
|
|
63
67
|
...(typeof input.message_id === 'string' ? { turnId: input.message_id } : {}),
|
|
64
|
-
projectPath
|
|
68
|
+
projectPath, taskPrompt: input.prompt.slice(0, 8192), ...source, ...taskSceneInput(input.prompt) });
|
|
65
69
|
const entry = compactTaskContext(context);
|
|
66
70
|
const output = await preferenceHookOutput(entry, 'UserPromptSubmit', input, null, SOURCE_APPLICATION,
|
|
67
71
|
ENTRY_LABEL + taskClosingInstruction(entry) + PASS_TASK_TOKEN + TASK_RULES_ON_DEMAND);
|
|
@@ -154,7 +158,8 @@ export async function runOpenCodeLifecycleCommand(args, dependencies = {}) {
|
|
|
154
158
|
signal: controller.signal, onCleanup: close => { cleanup = close; } }))
|
|
155
159
|
.then(output => { write(output); return { timedOut: false }; },
|
|
156
160
|
(error) => {
|
|
157
|
-
write(event === 'prompt' ? { context: openCodeUnavailableContext(hookFailureCause(error))
|
|
161
|
+
write(event === 'prompt' ? { context: openCodeUnavailableContext(hookFailureCause(error))
|
|
162
|
+
+ consoleRecoveryNotice(runtimeConfigPath) } : {});
|
|
158
163
|
recordHookFailure({ runtimeConfigPath, client: 'opencode', event, error, sessionId, startedAt });
|
|
159
164
|
return { timedOut: false };
|
|
160
165
|
});
|
|
@@ -57,8 +57,13 @@ const DELIVERED_EVENT = 'session.inbox.delivered';
|
|
|
57
57
|
const CANCELLED_EVENT = 'session.inbox.cancelled';
|
|
58
58
|
|
|
59
59
|
export function fuliOpenCodePlugin({ nodePath, hookPath, runtimeConfigPath, events, timeoutMs },
|
|
60
|
-
{ runHook = spawnHook, now = Date.now } = {}) {
|
|
60
|
+
{ runHook = spawnHook, now = Date.now, env = process.env } = {}) {
|
|
61
61
|
const wanted = new Set(events);
|
|
62
|
+
// OpenCode inside WSL reports paths of its distribution's own file system;
|
|
63
|
+
// a Windows FULI opens them through that distribution's share
|
|
64
|
+
// (wslCallerPath), and its Node does not inherit WSL_DISTRO_NAME.
|
|
65
|
+
const distribution = typeof env.WSL_DISTRO_NAME === 'string' && env.WSL_DISTRO_NAME
|
|
66
|
+
? { wsl_distribution: env.WSL_DISTRO_NAME } : {};
|
|
62
67
|
const run = (event, input, limitMs, extra = {}) => runHook({ command: nodePath, input, killAfterMs: limitMs + KILL_GRACE_MS,
|
|
63
68
|
args: [hookPath, OPENCODE_LIFECYCLE_MARKER, '--runtime-config', runtimeConfigPath, '--event', event,
|
|
64
69
|
'--timeout-ms', String(limitMs)], ...extra });
|
|
@@ -84,7 +89,7 @@ export function fuliOpenCodePlugin({ nodePath, hookPath, runtimeConfigPath, even
|
|
|
84
89
|
// its deadline counts from when its own hook starts.
|
|
85
90
|
const begin = (sessionID, turn) => {
|
|
86
91
|
turn.entry = queue(sessionID, () => run('prompt', { session_id: sessionID, message_id: turn.messageID,
|
|
87
|
-
cwd: turn.cwd, prompt: turn.text }, timeoutMs))
|
|
92
|
+
cwd: turn.cwd, prompt: turn.text, ...distribution }, timeoutMs))
|
|
88
93
|
.then((answer) => typeof answer?.context === 'string' && answer.context.trim()
|
|
89
94
|
? answer.context : unavailableNotice(answer?.cause), () => unavailableNotice());
|
|
90
95
|
return turn.entry;
|
|
@@ -10,7 +10,7 @@ const DEFAULT_RESOLVER = createAgentTokenUsageResolver();
|
|
|
10
10
|
* replaced with the reporting host session. A reporting host session is used
|
|
11
11
|
* only when no worker runtime was supplied, which covers direct host activity.
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
function resolveAgentSession(input = {}) {
|
|
14
14
|
const workerRuntime = input.workerRuntime ?? input.worker_runtime;
|
|
15
15
|
if (workerRuntime !== undefined && workerRuntime !== null) {
|
|
16
16
|
if (!workerRuntime || typeof workerRuntime !== 'object' || Array.isArray(workerRuntime)) {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { claudeTranscriptFormat } from './claude-code/transcript-format-probe.js';
|
|
2
|
+
import { codexTranscriptFormat } from './codex/transcript-format-probe.js';
|
|
3
|
+
import { newestTranscript } from './transcript-format-scan.js';
|
|
4
|
+
|
|
5
|
+
// The doctor's port to each Agent's transcript format probe: whether FULI's
|
|
6
|
+
// parser still reads the private transcript format of each client it captures.
|
|
7
|
+
// Answers { [clientId]: { readable: true, recognized, total } | { readable: false, reason } }.
|
|
8
|
+
// Only a transcript changed within the last week counts; a client without one
|
|
9
|
+
// answers no_transcript. The console polls the doctor, so an answer is kept
|
|
10
|
+
// for ten minutes.
|
|
11
|
+
const TRANSCRIPT_FORMATS = Object.freeze([claudeTranscriptFormat, codexTranscriptFormat]);
|
|
12
|
+
const RECENT_MS = 7 * 24 * 60 * 60 * 1000;
|
|
13
|
+
const PROBE_CACHE_MS = 10 * 60 * 1000;
|
|
14
|
+
|
|
15
|
+
export function createTranscriptFormatProbe({ formats = TRANSCRIPT_FORMATS, env = process.env,
|
|
16
|
+
cacheMs = PROBE_CACHE_MS, now = () => Date.now() } = {}) {
|
|
17
|
+
let cached = null;
|
|
18
|
+
return async function read() {
|
|
19
|
+
if (cached && now() - cached.at < cacheMs) return cached.result;
|
|
20
|
+
const result = Object.fromEntries(await Promise.all(formats.map(async (format) =>
|
|
21
|
+
[format.clientId, await probeFormat(format, env, now())])));
|
|
22
|
+
cached = { at: now(), result };
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async function probeFormat(format, env, at) {
|
|
28
|
+
try {
|
|
29
|
+
const path = await newestTranscript(format.root(env), { depth: format.depth, since: at - RECENT_MS });
|
|
30
|
+
return path ? await format.probe(path) : { readable: false, reason: 'no_transcript' };
|
|
31
|
+
} catch {
|
|
32
|
+
return { readable: false, reason: 'transcript_unreadable' };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { constants } from 'node:fs';
|
|
2
|
+
import { lstat, opendir } from 'node:fs/promises';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
|
|
5
|
+
import { openWithoutFollowing } from '../system/open-without-following.js';
|
|
6
|
+
|
|
7
|
+
// The file reading behind each Agent's transcript format probe
|
|
8
|
+
// (src/agents/<agent>/transcript-format-probe.js): find a client's newest
|
|
9
|
+
// transcript, and count how many records of its tail the Agent's own parser
|
|
10
|
+
// reads. Only counts leave this module: no text, path or session ID.
|
|
11
|
+
const TAIL_BYTES = 256 * 1024;
|
|
12
|
+
const MAX_SCAN_ENTRIES = 10_000;
|
|
13
|
+
// This many lines with no turn at all: the turns themselves were renamed.
|
|
14
|
+
const NO_TURNS_LINES = 20;
|
|
15
|
+
|
|
16
|
+
// The newest .jsonl file under root, at most depth directories down, changed
|
|
17
|
+
// at or after since (ms); null when there is none. Symbolic links are not followed.
|
|
18
|
+
export async function newestTranscript(root, { depth, since }) {
|
|
19
|
+
const scan = { entries: 0, newest: null };
|
|
20
|
+
await visit(root, depth, since, scan);
|
|
21
|
+
return scan.newest?.path ?? null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async function visit(directory, depth, since, scan) {
|
|
25
|
+
let entries;
|
|
26
|
+
try { entries = await opendir(directory); } catch { return; }
|
|
27
|
+
for await (const entry of entries) {
|
|
28
|
+
if (++scan.entries > MAX_SCAN_ENTRIES) break;
|
|
29
|
+
const path = join(directory, entry.name);
|
|
30
|
+
if (entry.isDirectory()) {
|
|
31
|
+
if (depth > 0) await visit(path, depth - 1, since, scan);
|
|
32
|
+
} else if (entry.isFile() && entry.name.endsWith('.jsonl')) {
|
|
33
|
+
const changedAt = await lstat(path).then((stat) => stat.mtimeMs, () => -Infinity);
|
|
34
|
+
if (changedAt >= since && changedAt > (scan.newest?.changedAt ?? -Infinity)) scan.newest = { path, changedAt };
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// recognize(record) answers true when the parser reads the record, false when
|
|
40
|
+
// it should and cannot, and null for a record the parser leaves out by design.
|
|
41
|
+
// A line that is not JSON counts as one the parser cannot read. The first line
|
|
42
|
+
// of a cut tail and a record the client is still writing are not counted.
|
|
43
|
+
export async function countTranscriptTail(path, recognize) {
|
|
44
|
+
const file = await openWithoutFollowing(path, constants.O_RDONLY);
|
|
45
|
+
try {
|
|
46
|
+
const { size } = await file.stat();
|
|
47
|
+
const start = Math.max(0, size - TAIL_BYTES);
|
|
48
|
+
const tail = Buffer.alloc(size - start);
|
|
49
|
+
const { bytesRead } = await file.read(tail, 0, tail.length, start);
|
|
50
|
+
const lines = tail.subarray(0, bytesRead).toString('utf8').split('\n');
|
|
51
|
+
lines.pop();
|
|
52
|
+
if (start > 0) lines.shift();
|
|
53
|
+
let recognized = 0;
|
|
54
|
+
let total = 0;
|
|
55
|
+
const records = lines.filter((candidate) => candidate.trim());
|
|
56
|
+
for (const line of records) {
|
|
57
|
+
const verdict = recognizeLine(line, recognize);
|
|
58
|
+
if (verdict === null) continue;
|
|
59
|
+
total += 1;
|
|
60
|
+
if (verdict) recognized += 1;
|
|
61
|
+
}
|
|
62
|
+
return { readable: true, recognized, total: total || (records.length >= NO_TURNS_LINES ? records.length : 0) };
|
|
63
|
+
} finally {
|
|
64
|
+
await file.close();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function recognizeLine(line, recognize) {
|
|
69
|
+
// A parser that throws on a record cannot read it: that is the finding.
|
|
70
|
+
try { return recognize(JSON.parse(line)); } catch { return false; }
|
|
71
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { receiptConsoleUrl, receiptSummary, receiptText, sessionRecordsUrl } from './identity-receipt.js';
|
|
2
2
|
import { providerReaderFields } from '../graphiti/knowledge-reader.js';
|
|
3
|
+
import { markdownLink } from '../text/markdown-link.js';
|
|
3
4
|
|
|
4
5
|
// The per-turn receipt (rec#20): after a turn's checkpoint saved knowledge, the
|
|
5
6
|
// reply tail lists every item that turn actually created or replaced, read back
|
|
@@ -103,27 +104,27 @@ function boundedReceipt(application, heading, lines, episodeIds, session) {
|
|
|
103
104
|
const listUrl = episodeIds.length ? turnReceiptListUrl(application, episodeIds) : null;
|
|
104
105
|
return {
|
|
105
106
|
lines: [`FULI ${heading} ${lines.length} 条${sessionLink(application, session)}:`, ...shown,
|
|
106
|
-
...(omitted ? [`另 ${omitted} 条未列出:${listUrl ?
|
|
107
|
+
...(omitted ? [`另 ${omitted} 条未列出:${listUrl ? markdownLink('查看全部', listUrl) : '见控制台知识页'}`] : [])],
|
|
107
108
|
summary: { status: 'saved', total: lines.length, shown: shown.length, ...(listUrl ? { list_url: listUrl } : {}) }
|
|
108
109
|
};
|
|
109
110
|
}
|
|
110
111
|
|
|
111
112
|
function sessionLink(application, session) {
|
|
112
|
-
return session?.sessionId ?
|
|
113
|
+
return session?.sessionId ? `(${markdownLink('本会话已记录', sessionRecordsUrl(application, session))})` : '';
|
|
113
114
|
}
|
|
114
115
|
|
|
115
116
|
function entryLine(application, entry) {
|
|
116
117
|
return `- ${entry.change === 'updated' ? '更新' : '新增'} ${CATEGORY[entry.category] ?? '知识'}「${receiptSummary(entry.content || entry.title)}」`
|
|
117
118
|
+ `|${scopeLabel(entry.scope)}|${weightLabel(entry.weight)}|${tagLabel(entry.tags)}`
|
|
118
119
|
+ `|${SOURCE[entry.content_source] ?? '来源未记录'}·${CONFIRMATION[entry.confirmation_status] ?? '待确认'}`
|
|
119
|
-
+
|
|
120
|
+
+ `|${markdownLink('修改', knowledgeItemEditUrl(application, entry.item_kind, entry.item_id))}`;
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
// FLA working notes carry no per-item weight and are never rules to apply.
|
|
123
124
|
function memoryLine(application, memory, agentName) {
|
|
124
125
|
const url = `${receiptConsoleUrl(application)}/agents/${encodeURIComponent(application.config.personal.spaceId)}/${encodeURIComponent(memory.agentId)}`;
|
|
125
126
|
return `- ${memory.revision > 1 ? '更新' : '新增'} FLA笔记「${receiptSummary(memory.memory.summary)}」`
|
|
126
|
-
+ `|FLA ${receiptText(agentName || memory.agentId)}|暂无权重|无标签|Agent
|
|
127
|
+
+ `|FLA ${receiptText(agentName || memory.agentId)}|暂无权重|无标签|Agent笔记·不作为规则|${markdownLink('查看', url)}`;
|
|
127
128
|
}
|
|
128
129
|
|
|
129
130
|
function scopeLabel(scope) {
|
|
@@ -29,7 +29,7 @@ Install and Agent connection:
|
|
|
29
29
|
employee install BUILT_PACKAGE_DIRECTORY [--replace] [--runtime-config FILE]
|
|
30
30
|
app list [--agent AGENT_ID] | show APP_ID | approve APP_ID VERSION | disable APP_ID | rollback APP_ID VERSION (Agent apps; approve and rollback ask in this terminal, then Windows Hello)
|
|
31
31
|
app delete APP_ID [--data [--output DIR]] | export APP_ID --output DIR (delete code first, data second) [--runtime-config FILE]
|
|
32
|
-
models set-key SECRET_REF [--data-dir DIR] (built-in Agent model API key; hidden entry or stdin, never echoed)
|
|
32
|
+
models set-key SECRET_REF --endpoint URL [--data-dir DIR] (built-in Agent model API key for that endpoint only; hidden entry or stdin, never echoed)
|
|
33
33
|
models check assistant|bole|jefa|tonborg [--data-dir DIR] (synthetic connection check of one role's model backend)
|
|
34
34
|
session start|stop|restart|status [--client claude_code|codex] [--json] (FULI for the client session this runs in, e.g. "!fuli session stop" in Claude Code or Codex)
|
|
35
35
|
session default on|off|status [--json] (whether new sessions start with FULI on; open sessions keep theirs)
|
|
@@ -73,7 +73,7 @@ export async function runLocalRuntimeCommand(command, args, dependencies = {}) {
|
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
function formatLocalRuntimeResult(command, result, copy = String) {
|
|
77
77
|
if (command === 'start') {
|
|
78
78
|
const title = result.status === 'running'
|
|
79
79
|
? 'Fuli local services are already running.'
|
|
@@ -102,7 +102,10 @@ export function formatLocalRuntimeResult(command, result, copy = String) {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
function formatStartedRuntime(title, result, copy) {
|
|
105
|
-
const lines = [title, ...(result.portMoves ?? []).map(portMoveSentence),
|
|
105
|
+
const lines = [title, ...(result.portMoves ?? []).map(portMoveSentence),
|
|
106
|
+
...(Number.isInteger(result.replacedConsole)
|
|
107
|
+
? [`The previous console (process ${result.replacedConsole}) had stopped answering; it was ended and replaced.`] : []),
|
|
108
|
+
`Management UI: ${copy(result.url)}`];
|
|
106
109
|
const agentSetupNotice = formatAgentSetupNotice(result.agentSetupCheck);
|
|
107
110
|
if (agentSetupNotice) lines.push(agentSetupNotice);
|
|
108
111
|
if (result.lan === true) {
|
|
@@ -8,12 +8,15 @@ const BOOLEAN_OPTIONS = Object.freeze({
|
|
|
8
8
|
'--open': 'open',
|
|
9
9
|
'--rebuild': 'rebuild',
|
|
10
10
|
'--json': 'json',
|
|
11
|
-
'--allow-provider-downgrade': 'allowProviderDowngrade'
|
|
11
|
+
'--allow-provider-downgrade': 'allowProviderDowngrade',
|
|
12
|
+
// Started by a client session's MCP process, not by the person (console-autostart.js).
|
|
13
|
+
'--automatic': 'automatic'
|
|
12
14
|
});
|
|
13
15
|
|
|
14
16
|
const ALLOWED_BY_COMMAND = Object.freeze({
|
|
15
17
|
start: new Set([
|
|
16
|
-
'--data-dir', '--personal-space', '--port', '--open', '--rebuild', '--lan', '--no-lan', '--allow-provider-downgrade'
|
|
18
|
+
'--data-dir', '--personal-space', '--port', '--open', '--rebuild', '--lan', '--no-lan', '--allow-provider-downgrade',
|
|
19
|
+
'--automatic'
|
|
17
20
|
]),
|
|
18
21
|
stop: new Set(['--data-dir']),
|
|
19
22
|
restart: new Set([
|
|
@@ -34,7 +37,8 @@ export function parseLocalRuntimeOptions(command, args = []) {
|
|
|
34
37
|
rebuild: false,
|
|
35
38
|
lan: null,
|
|
36
39
|
json: false,
|
|
37
|
-
allowProviderDowngrade: false
|
|
40
|
+
allowProviderDowngrade: false,
|
|
41
|
+
automatic: false
|
|
38
42
|
};
|
|
39
43
|
const seen = new Set();
|
|
40
44
|
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { MODEL_BACKEND_ROLES } from '../model-backends/config.js';
|
|
2
2
|
import { openModelBackendRuntime } from '../model-backends/runtime.js';
|
|
3
|
-
import { createModelSecretStore, secretReference } from '../model-backends/secret-store.js';
|
|
3
|
+
import { createModelSecretStore, keyOrigin, secretReference } from '../model-backends/secret-store.js';
|
|
4
4
|
import { resolveSetupPaths } from '../setup/paths.js';
|
|
5
5
|
import { readHiddenLine, writeLine } from './terminal-io.js';
|
|
6
6
|
|
|
7
7
|
// fuli models: local key entry and a synthetic connection check for the
|
|
8
8
|
// optional model backends of the built-in Agents. Keys are read without echo
|
|
9
|
-
// and never printed; configuration stays in model-backends.json.
|
|
9
|
+
// and never printed; configuration stays in model-backends.json. A key is
|
|
10
|
+
// tied to the endpoint origin it is for (--endpoint) and is sent nowhere else.
|
|
10
11
|
|
|
11
|
-
const USAGE = 'Usage: fuli models set-key <secretRef> [--data-dir DIR] | fuli models check <role> [--data-dir DIR]';
|
|
12
|
+
const USAGE = 'Usage: fuli models set-key <secretRef> --endpoint URL [--data-dir DIR] | fuli models check <role> [--data-dir DIR]';
|
|
12
13
|
|
|
13
14
|
export async function runModelsCommand(args, {
|
|
14
15
|
env = process.env,
|
|
@@ -17,12 +18,12 @@ export async function runModelsCommand(args, {
|
|
|
17
18
|
openPort = openModelBackendRuntime,
|
|
18
19
|
write = writeLine
|
|
19
20
|
} = {}) {
|
|
20
|
-
const { action, subject, dataDir } = parseModelsArguments(args);
|
|
21
|
+
const { action, subject, dataDir, endpoint } = parseModelsArguments(args);
|
|
21
22
|
const paths = resolveSetupPaths({ dataDir, env });
|
|
22
23
|
if (action === 'set-key') {
|
|
23
24
|
const secret = await readSecret({ prompt: `API key for ${subject} (input hidden): ` });
|
|
24
|
-
await openSecretStore(paths.modelSecretStorePath).set(subject, secret);
|
|
25
|
-
write(`Saved the key for ${subject} on this computer
|
|
25
|
+
await openSecretStore(paths.modelSecretStorePath).set(subject, secret, endpoint);
|
|
26
|
+
write(`Saved the key for ${subject}, for ${keyOrigin(endpoint)} only, on this computer (${process.platform === 'win32'
|
|
26
27
|
? 'encrypted for the current Windows user' : 'readable by the current user only'}).`);
|
|
27
28
|
return { exitCode: 0 };
|
|
28
29
|
}
|
|
@@ -43,13 +44,16 @@ function parseModelsArguments(args) {
|
|
|
43
44
|
if (action === 'check' && !MODEL_BACKEND_ROLES.includes(subject)) {
|
|
44
45
|
throw new TypeError(`Unknown role: ${subject}. Use one of ${MODEL_BACKEND_ROLES.join(', ')}`);
|
|
45
46
|
}
|
|
46
|
-
|
|
47
|
+
const values = { '--data-dir': null, ...(action === 'set-key' ? { '--endpoint': null } : {}) };
|
|
47
48
|
for (let index = 0; index < options.length; index += 1) {
|
|
48
|
-
|
|
49
|
+
const option = options[index];
|
|
50
|
+
if (!Object.hasOwn(values, option) || values[option] !== null) throw new TypeError(USAGE);
|
|
49
51
|
const value = options[index + 1];
|
|
50
|
-
if (!value || value.startsWith('--')) throw new TypeError(
|
|
51
|
-
|
|
52
|
+
if (!value || value.startsWith('--')) throw new TypeError(`Missing value for ${option}`);
|
|
53
|
+
values[option] = value;
|
|
52
54
|
index += 1;
|
|
53
55
|
}
|
|
54
|
-
|
|
56
|
+
if (action === 'set-key' && values['--endpoint'] === null) throw new TypeError(`--endpoint is required: the key is sent only there. ${USAGE}`);
|
|
57
|
+
if (action === 'set-key') keyOrigin(values['--endpoint'], '--endpoint');
|
|
58
|
+
return { action, subject, dataDir: values['--data-dir'], endpoint: values['--endpoint'] ?? null };
|
|
55
59
|
}
|
|
@@ -170,7 +170,7 @@ export async function runUpdateCommand(args = [], dependencies = {}) {
|
|
|
170
170
|
return result;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
|
|
173
|
+
function formatUpdatePreview(options) {
|
|
174
174
|
return [
|
|
175
175
|
'Ready to update Fuli',
|
|
176
176
|
`npm package: ${FULI_PACKAGE_NAME}@${options.beta ? "beta channel (latest or beta, whichever is newer)" : "latest"}`,
|
|
@@ -190,7 +190,7 @@ export function formatUpdatePreview(options) {
|
|
|
190
190
|
].join('\n');
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
function formatUpdateResult(result) {
|
|
194
194
|
if (result.status === 'ahead') {
|
|
195
195
|
return [
|
|
196
196
|
`The current CLI version ${result.version} is newer than npm latest ${result.latestVersion}. `,
|
|
@@ -25,6 +25,9 @@ export function inspectUpdateInstallation({ env = process.env, platform = proces
|
|
|
25
25
|
let target = launcher;
|
|
26
26
|
try {
|
|
27
27
|
target = realpathSync(launcher);
|
|
28
|
+
// npm on Windows writes a fl.cmd wrapper beside <prefix>\node_modules, not a link.
|
|
29
|
+
const npmCli = path.join(directory, 'node_modules', FULI_PACKAGE_NAME, 'src', 'cli.js');
|
|
30
|
+
if (platform === 'win32' && /\.cmd$/i.test(name) && existsSync(npmCli)) target = realpathSync(npmCli);
|
|
28
31
|
// Read only the manifest for a recognized Fuli entry point; never execute PATH candidates.
|
|
29
32
|
if (path.basename(target) === 'cli.js' && path.basename(path.dirname(target)) === 'src') {
|
|
30
33
|
const manifest = JSON.parse(readFileSync(path.join(path.dirname(target), '..', 'package.json'), 'utf8'));
|
|
@@ -54,12 +57,7 @@ export function formatShadowedLaunchers(installation, { target = installation.cl
|
|
|
54
57
|
if (first?.version && first.target !== realTarget) shadowing.push({ command, ...first });
|
|
55
58
|
}
|
|
56
59
|
if (!shadowing.length) return null;
|
|
57
|
-
|
|
58
|
-
const nodeModules = path.dirname(path.dirname(path.dirname(shadowing[0].target)));
|
|
59
|
-
const lib = path.dirname(nodeModules);
|
|
60
|
-
const fix = path.basename(nodeModules) === 'node_modules' && path.basename(lib) === 'lib'
|
|
61
|
-
? `npm uninstall --global ${FULI_PACKAGE_NAME} --prefix ${quoteShellArgument(path.dirname(lib), platform)}`
|
|
62
|
-
: 'remove that installation';
|
|
60
|
+
const fix = npmUninstallCommand(path.dirname(path.dirname(shadowing[0].target)), platform) ?? 'remove that installation';
|
|
63
61
|
return [
|
|
64
62
|
...shadowing.map(({ command, path: launcher, version, target: other }) =>
|
|
65
63
|
`Warning: \`${command}\` on PATH is another Fuli installation: ${launcher} -> ${version} (${other}).`),
|
|
@@ -68,6 +66,25 @@ export function formatShadowedLaunchers(installation, { target = installation.cl
|
|
|
68
66
|
].join('\n');
|
|
69
67
|
}
|
|
70
68
|
|
|
69
|
+
// The one command that removes an npm global installation of FULI, or null
|
|
70
|
+
// for a folder that is not one. npm keeps a global package at
|
|
71
|
+
// <prefix>/lib/node_modules/<name> (macOS, Linux, a Unix-style prefix on
|
|
72
|
+
// Windows) or <prefix>\node_modules\<name> (Windows).
|
|
73
|
+
export function npmUninstallCommand(packageRoot, platform = process.platform) {
|
|
74
|
+
const prefix = npmGlobalPrefix(packageRoot, platform);
|
|
75
|
+
return prefix ? `npm uninstall --global ${FULI_PACKAGE_NAME} --prefix ${quoteShellArgument(prefix, platform)}` : null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// The npm prefix a global FULI package was installed under, or null.
|
|
79
|
+
export function npmGlobalPrefix(packageRoot, platform = process.platform) {
|
|
80
|
+
const path = platformPath(platform);
|
|
81
|
+
const nodeModules = path.dirname(packageRoot);
|
|
82
|
+
if (path.basename(packageRoot) !== FULI_PACKAGE_NAME || path.basename(nodeModules) !== 'node_modules') return null;
|
|
83
|
+
const parent = path.dirname(nodeModules);
|
|
84
|
+
if (path.basename(parent) === 'lib') return path.dirname(parent);
|
|
85
|
+
return platform === 'win32' ? parent : null;
|
|
86
|
+
}
|
|
87
|
+
|
|
71
88
|
// A shell skips a launcher it cannot execute, so only runnable ones can shadow another.
|
|
72
89
|
// Directories carry the execute bit too, so the (followed) target must be a file.
|
|
73
90
|
function isExecutable(launcher, platform) {
|
|
@@ -98,7 +98,7 @@ export async function runWorkspaceConnectionCommand(args, dependencies = {}) {
|
|
|
98
98
|
return { status: 'configured', providerUrl, restartRequired: true };
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
function parseWorkspaceConnectionOptions(args) {
|
|
102
102
|
if (!Array.isArray(args)) throw new WorkspaceConnectionError('Command arguments are invalid.');
|
|
103
103
|
if (args.some((argument) => HELP_FLAGS.has(argument))) {
|
|
104
104
|
if (args.length !== 1) {
|
|
@@ -137,7 +137,7 @@ export function parseWorkspaceConnectionOptions(args) {
|
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
function workspaceConnectionHelp() {
|
|
141
141
|
return [
|
|
142
142
|
'Usage: fuli connect-workspace --url URL --token-file FILE [--data-dir DIR]',
|
|
143
143
|
'',
|
|
@@ -1,128 +1,22 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { readJsonFile } from '../storage/json-file.js';
|
|
6
|
-
import { jsonFormat, writeVersionedJsonFileAtomic } from '../storage/json-format.js';
|
|
3
|
+
import { jsonFormat } from '../storage/json-format.js';
|
|
4
|
+
import { createUpdatableManifest } from '../registry/updatable-manifest.js';
|
|
7
5
|
import { diffClientLinks, parseClientLinksManifest } from './manifest.js';
|
|
8
6
|
|
|
9
|
-
// The manifest FULI ships, and the public copy it may update to.
|
|
10
|
-
// data file is updated, never FULI itself.
|
|
7
|
+
// The manifest FULI ships, and the public copy it may update to.
|
|
11
8
|
const CLIENT_LINKS_REMOTE_URL = 'https://raw.githubusercontent.com/JevonsCode/fuli/main/registry/client-links.json';
|
|
12
9
|
const BUNDLED_MANIFEST = new URL('../../registry/client-links.json', import.meta.url);
|
|
13
10
|
// The person's applied copy, whether updates apply by themselves, and what changed.
|
|
14
11
|
export const CLIENT_LINKS_STATE_FORMAT = jsonFormat({ store: 'client-links', versions: [1] });
|
|
15
|
-
const STATE_VERSION = 1;
|
|
16
|
-
const MAX_MANIFEST_BYTES = 256 * 1024;
|
|
17
|
-
const FETCH_TIMEOUT_MS = 10_000;
|
|
18
|
-
const AUTO_UPDATE_EVERY_MS = 24 * 60 * 60 * 1000;
|
|
19
|
-
// Checked hourly so a computer that slept still updates about once a day.
|
|
20
|
-
const AUTO_UPDATE_TICK_MS = 60 * 60 * 1000;
|
|
21
|
-
const MAX_HISTORY = 20;
|
|
22
12
|
|
|
23
13
|
const readBundledManifest = () => JSON.parse(readFileSync(BUNDLED_MANIFEST, 'utf8'));
|
|
24
14
|
|
|
15
|
+
// Daily updates run only when the person turned them on.
|
|
25
16
|
export function createClientLinksRegistry({
|
|
26
17
|
statePath, remoteUrl = CLIENT_LINKS_REMOTE_URL, fetchImpl = globalThis.fetch,
|
|
27
18
|
now = () => new Date(), readBundled = readBundledManifest
|
|
28
19
|
}) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
let pending = null;
|
|
32
|
-
|
|
33
|
-
function readState() {
|
|
34
|
-
const stored = readJsonFile(statePath, null);
|
|
35
|
-
return {
|
|
36
|
-
version: STATE_VERSION,
|
|
37
|
-
manifest: stored?.manifest ?? null,
|
|
38
|
-
autoUpdate: stored?.autoUpdate === true,
|
|
39
|
-
lastCheckedAt: stored?.lastCheckedAt ?? null,
|
|
40
|
-
history: Array.isArray(stored?.history) ? stored.history : []
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const writeState = state => writeVersionedJsonFileAtomic(statePath, state, CLIENT_LINKS_STATE_FORMAT);
|
|
45
|
-
|
|
46
|
-
// An applied copy older than the bundled one (FULI was upgraded) or no longer
|
|
47
|
-
// valid gives way to the bundled copy.
|
|
48
|
-
function active(state = readState()) {
|
|
49
|
-
let applied = null;
|
|
50
|
-
try { applied = state.manifest ? parseClientLinksManifest(state.manifest) : null; } catch { applied = null; }
|
|
51
|
-
return applied && applied.manifestVersion > bundled.manifestVersion
|
|
52
|
-
? { manifest: applied, source: 'updated' } : { manifest: bundled, source: 'bundled' };
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function current() {
|
|
56
|
-
const state = readState();
|
|
57
|
-
return { ...active(state), remoteUrl, autoUpdate: state.autoUpdate, lastCheckedAt: state.lastCheckedAt,
|
|
58
|
-
history: state.history };
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
async function fetchRemote() {
|
|
62
|
-
const response = await fetchImpl(remoteUrl, { redirect: 'error', signal: AbortSignal.timeout(FETCH_TIMEOUT_MS),
|
|
63
|
-
headers: { accept: 'application/json' } });
|
|
64
|
-
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
|
65
|
-
const body = await response.text();
|
|
66
|
-
if (Buffer.byteLength(body) > MAX_MANIFEST_BYTES) throw new Error('the manifest is too large');
|
|
67
|
-
return body;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
async function check() {
|
|
71
|
-
const state = readState();
|
|
72
|
-
const checkedAt = now().toISOString();
|
|
73
|
-
writeState({ ...state, lastCheckedAt: checkedAt });
|
|
74
|
-
pending = null;
|
|
75
|
-
let body;
|
|
76
|
-
try { body = await fetchRemote(); } catch (error) {
|
|
77
|
-
return { status: 'unavailable', checkedAt, reason: error?.message ?? String(error) };
|
|
78
|
-
}
|
|
79
|
-
let remote;
|
|
80
|
-
try { remote = parseClientLinksManifest(JSON.parse(body)); } catch (error) {
|
|
81
|
-
// Anything invalid is refused whole; the current copy stays in use.
|
|
82
|
-
return { status: 'invalid', checkedAt, reason: error instanceof SyntaxError ? 'not JSON' : error.message };
|
|
83
|
-
}
|
|
84
|
-
const { manifest } = active(state);
|
|
85
|
-
if (remote.manifestVersion <= manifest.manifestVersion) {
|
|
86
|
-
return { status: 'up_to_date', checkedAt, manifestVersion: manifest.manifestVersion };
|
|
87
|
-
}
|
|
88
|
-
pending = { digest: contentHash(remote), manifest: remote };
|
|
89
|
-
return { status: 'update_available', checkedAt, digest: pending.digest, updatedAt: remote.updatedAt,
|
|
90
|
-
diff: diffClientLinks(manifest, remote) };
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function apply(digest, { automatic = false } = {}) {
|
|
94
|
-
if (!pending || pending.digest !== digest) {
|
|
95
|
-
throw new ApplicationError('client_links_changed', 'The update you saw is no longer the one available; check for updates again.',
|
|
96
|
-
{ status: 409 });
|
|
97
|
-
}
|
|
98
|
-
const state = readState();
|
|
99
|
-
const change = { appliedAt: now().toISOString(), automatic, ...diffClientLinks(active(state).manifest, pending.manifest) };
|
|
100
|
-
writeState({ ...state, manifest: pending.manifest, history: [change, ...state.history].slice(0, MAX_HISTORY) });
|
|
101
|
-
pending = null;
|
|
102
|
-
return current();
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function setAutoUpdate(enabled) {
|
|
106
|
-
if (typeof enabled !== 'boolean') throw new TypeError('autoUpdate must be true or false');
|
|
107
|
-
writeState({ ...readState(), autoUpdate: enabled });
|
|
108
|
-
return current();
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// Once a day when the person turned it on: check, and apply what is valid.
|
|
112
|
-
async function autoUpdate() {
|
|
113
|
-
const state = readState();
|
|
114
|
-
if (!state.autoUpdate || (state.lastCheckedAt && now() - new Date(state.lastCheckedAt) < AUTO_UPDATE_EVERY_MS)) return null;
|
|
115
|
-
const result = await check();
|
|
116
|
-
return result.status === 'update_available' ? apply(result.digest, { automatic: true }) : null;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function startAutoUpdate({ onError = () => {} } = {}) {
|
|
120
|
-
const run = () => autoUpdate().catch(onError);
|
|
121
|
-
run();
|
|
122
|
-
const timer = setInterval(run, AUTO_UPDATE_TICK_MS);
|
|
123
|
-
timer.unref?.();
|
|
124
|
-
return () => clearInterval(timer);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
return { current, check, apply, setAutoUpdate, autoUpdate, startAutoUpdate };
|
|
20
|
+
return createUpdatableManifest({ statePath, format: CLIENT_LINKS_STATE_FORMAT, remoteUrl, readBundled,
|
|
21
|
+
parse: parseClientLinksManifest, diff: diffClientLinks, changedCode: 'client_links_changed', fetchImpl, now });
|
|
128
22
|
}
|