fuli-context 0.23.0-beta.8 → 0.23.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/dist/web/assets/{AboutPage-BHbNacTY.js → AboutPage-S8QFfzpA.js} +1 -1
- package/dist/web/assets/AboutSectionHeading-B5CzH4Zs.js +1 -0
- package/dist/web/assets/AboutSectionHeading-DjXpIV27.css +1 -0
- package/dist/web/assets/AgentAppsPage-BYXraPFM.js +1 -0
- package/dist/web/assets/{AgentHand-BGzGOjzl.js → AgentHand-BGGdVdd9.js} +1 -1
- package/dist/web/assets/AgentManagement-Bza8k5ra.js +7 -0
- package/dist/web/assets/AgentManagement-CeF4mjtg.css +1 -0
- package/dist/web/assets/AgentMentionCopy-C72hY2QL.js +1 -0
- package/dist/web/assets/{AgentName-C5HzUHaA.js → AgentName-CUjBNQ8j.js} +1 -1
- package/dist/web/assets/AgentProfilePage-D5QUzw5N.css +1 -0
- package/dist/web/assets/AgentProfilePage-kp7-gRRx.js +5 -0
- package/dist/web/assets/AgentServicesPage-IsGaz7FY.js +1 -0
- package/dist/web/assets/{AppViewerPage-N5C_6WLz.css → AppViewerPage-CJ0Zy6LA.css} +1 -1
- package/dist/web/assets/AppViewerPage-CcOlwxck.js +1 -0
- package/dist/web/assets/{BackToTop-SL4ai3_g.js → BackToTop-C3KYEoCW.js} +1 -1
- package/dist/web/assets/BoardCardFieldsMenu-BlBWT1j7.js +1 -0
- package/dist/web/assets/BoardMoveMenu-Bc7xC1Uh.js +1 -0
- package/dist/web/assets/Breadcrumb-BbwBNrG2.css +1 -0
- package/dist/web/assets/Breadcrumb-C_xMiD-Z.js +1 -0
- package/dist/web/assets/CaptureChangePage-Bekp1aWg.js +1 -0
- package/dist/web/assets/ConnectionsPage-BpvecWXD.js +1 -0
- package/dist/web/assets/{CopyFixPrompt-CCrPxN5x.js → CopyFixPrompt-Bp-UX4Hq.js} +1 -1
- package/dist/web/assets/DataFormatPage-dsy8d3oA.js +2 -0
- package/dist/web/assets/DataFormatPage-sSnjjUY4.css +1 -0
- package/dist/web/assets/DebugTurnPage-HdFAyc2D.css +1 -0
- package/dist/web/assets/DebugTurnPage-cIJV7xDW.js +1 -0
- package/dist/web/assets/DebugTurnsPage-B6Te_Alp.js +1 -0
- package/dist/web/assets/DebugTurnsPage-BFuOzyWR.css +1 -0
- package/dist/web/assets/{DialogTitle-CTKjDGQc.js → DialogTitle-Lj5s6nwG.js} +1 -1
- package/dist/web/assets/EmployeeRedirectPage-DnvwJeCN.js +1 -0
- package/dist/web/assets/EmployeeScopeDialog-CXNZ62Ab.js +1 -0
- package/dist/web/assets/EmployeeWorkbench-BhReI8l6.css +1 -0
- package/dist/web/assets/EmployeeWorkbench-DALIO-cM.js +4 -0
- package/dist/web/assets/FieldRoot-DRnAC66O.js +1 -0
- package/dist/web/assets/FlaGrowth-7wlv31Tl.js +1 -0
- package/dist/web/assets/FlaGrowth-BzXY8pcx.css +1 -0
- package/dist/web/assets/FlaTaskSheets-CNdaBy1P.js +1 -0
- package/dist/web/assets/FlasPage-BCs1Ffpf.js +1 -0
- package/dist/web/assets/{FlasPage-Cb6Q5lge.css → FlasPage-SLQDMv47.css} +1 -1
- package/dist/web/assets/{button-CaCh3Iim.css → GrowthLoading-CigPij0N.css} +1 -1
- package/dist/web/assets/GrowthLoading-Cr8xZwwO.js +1 -0
- package/dist/web/assets/HowtoPage-Cv1YQy1s.js +1 -0
- package/dist/web/assets/{HowtoPage-BRV2W1Go.css → HowtoPage-t12tDDpS.css} +1 -1
- package/dist/web/assets/{InboxPage-DSOmt6VL.js → InboxPage-CgJnymOY.js} +2 -2
- package/dist/web/assets/KnowledgeDeleteButton-FEyEvhlR.js +1 -0
- package/dist/web/assets/KnowledgeHardDeleteSection-CVwTeMEJ.js +1 -0
- package/dist/web/assets/KnowledgeItemEditPage-rwpM8cF1.js +1 -0
- package/dist/web/assets/{KnowledgeItemSummaryCard-D1h0e1Hn.js → KnowledgeItemSummaryCard-49EADY_Z.js} +1 -1
- package/dist/web/assets/KnowledgeOrganizerPage-7IdnjM3L.js +1 -0
- package/dist/web/assets/KnowledgePage-gxqOIZxf.js +1 -0
- package/dist/web/assets/KnowledgePeek-Bm5jRVA9.css +1 -0
- package/dist/web/assets/KnowledgePeek-CQyCxHFj.js +1 -0
- package/dist/web/assets/KnowledgeTurnReceiptPage-BOz7IpaK.js +1 -0
- package/dist/web/assets/KnowledgeWorkspace-A7zVb26p.js +4 -0
- package/dist/web/assets/KnowledgeWorkspace-DCoVFyf0.css +1 -0
- package/dist/web/assets/{MeAvatar-DHJA3h2E.js → MeAvatar-CYVcRiuW.js} +1 -1
- package/dist/web/assets/{MeLink-CU7zuYgD.js → MeLink-BdqkzhT6.js} +1 -1
- package/dist/web/assets/{MenuSeparator-DV3U0Y8_.js → MenuSeparator-quqkZZXY.js} +1 -1
- package/dist/web/assets/ModelSettingsPage-B8jC_uew.js +3 -0
- package/dist/web/assets/ModelSettingsPage-DhCn_SF6.css +1 -0
- package/dist/web/assets/{NotFoundPage-BMWxdf6r.js → NotFoundPage-Dmn32VWo.js} +1 -1
- package/dist/web/assets/OccupationsPage-BVREfX_R.js +1 -0
- package/dist/web/assets/OverviewPage-CHyEbdP4.js +1 -0
- package/dist/web/assets/OverviewPage-xdF5g6bZ.css +1 -0
- package/dist/web/assets/{PageColumns-D7jIeVv6.js → PageColumns-DpfaPeu7.js} +1 -1
- package/dist/web/assets/PageOutline-BKBQ1T4d.js +1 -0
- package/dist/web/assets/PageOutline-BqVgnlos.css +1 -0
- package/dist/web/assets/PersonalProfilePage-Cxp2gn6J.js +1 -0
- package/dist/web/assets/PersonalProjectsPage-821imOxR.js +1 -0
- package/dist/web/assets/{PinIcon-DzYhXU_p.js → PinIcon-B7dvh7ld.js} +1 -1
- package/dist/web/assets/{PopperContent-BnejG-fO.js → PopperContent-DNqbLkNa.js} +1 -1
- package/dist/web/assets/{Presence-o9BoSyBV.js → Presence-D3HKb5Hb.js} +1 -1
- package/dist/web/assets/ProfileAuthorChip-7HSHODdR.js +1 -0
- package/dist/web/assets/ProfileAuthorChip-C_0hzDoP.css +1 -0
- package/dist/web/assets/ProjectAgentsPage-DBsXS6Xa.js +5 -0
- package/dist/web/assets/{ProjectAgentsPage-Dt37ogX1.css → ProjectAgentsPage-RpfiV2Fm.css} +1 -1
- package/dist/web/assets/ProjectJudgmentPolicy-GA33aSRi.js +2 -0
- package/dist/web/assets/PublicProjectsPage-PJlBI8IE.js +1 -0
- package/dist/web/assets/{RoundtablesPage-C6vo4kl6.css → RoundtablesPage-DK9A9J-y.css} +1 -1
- package/dist/web/assets/{RoundtablesPage-B2mqkwwR.js → RoundtablesPage-DT5DUXsa.js} +2 -2
- package/dist/web/assets/{RovingFocusGroup-CKxT5j44.js → RovingFocusGroup-BB0d3k17.js} +1 -1
- package/dist/web/assets/{RovingFocusItem-Cr-XrVve.js → RovingFocusItem-CFd7tXzD.js} +1 -1
- package/dist/web/assets/SessionMigrationPage-BZ1lEDQr.js +1 -0
- package/dist/web/assets/SessionRecordsPage-BMAAtIAt.js +1 -0
- package/dist/web/assets/SettingsPage-BYNEk6BM.js +1 -0
- package/dist/web/assets/SettingsPage-Uj1IpZpS.css +1 -0
- package/dist/web/assets/SharedJefaReportPage-g35o6jUb.js +1 -0
- package/dist/web/assets/TagVocabularyPage-COubNJXz.js +1 -0
- package/dist/web/assets/{TaskBlockerClear-38qdj0bl.js → TaskBlockerClear-B5MpHdlh.js} +1 -1
- package/dist/web/assets/{TaskBlockerNotice--X8TtCGj.js → TaskBlockerNotice-CIN0HRiE.js} +1 -1
- package/dist/web/assets/{TaskReason-COiuiZVd.js → TaskReason-LQ0CFiKu.js} +1 -1
- package/dist/web/assets/{TeamCard-Bl4riuQt.css → TeamCard-CsmWDw2Q.css} +1 -1
- package/dist/web/assets/TeamCard-D-kLa5rT.js +1 -0
- package/dist/web/assets/TeamCardsWidget-DGX9k0S6.js +1 -0
- package/dist/web/assets/{TeamIsland-D8ycFpkZ.js → TeamIsland-BIo-l49b.js} +2 -2
- package/dist/web/assets/{Teleport-BAIkXp2z.js → Teleport-C1upABpY.js} +1 -1
- package/dist/web/assets/{TextField-BFGv0VA5.js → TextField-ZnmRqG0h.js} +1 -1
- package/dist/web/assets/{UiChip-h_SUumBM.js → UiChip-CizeOu1Q.js} +1 -1
- package/dist/web/assets/UiDialog-CGTzxn3-.js +1 -0
- package/dist/web/assets/{UiDisclosure-BO5EAYyS.js → UiDisclosure-ueMA4jl0.js} +1 -1
- package/dist/web/assets/UiIcon-sD1hUsOF.js +1 -0
- package/dist/web/assets/{UiIconButton-C0WP-F-p.js → UiIconButton-CCo4NPYv.js} +1 -1
- package/dist/web/assets/{UiNotice-NCEwjNQR.js → UiNotice-DGPFbVo7.js} +1 -1
- package/dist/web/assets/{UiSegmented-B49yYjJ3.js → UiSegmented-BZ-jqnPE.js} +1 -1
- package/dist/web/assets/{UiWeight-DRIwuLUX.js → UiWeight-BRO3oVMZ.js} +1 -1
- package/dist/web/assets/{VirtualDirectoryList-Dieq64pn.js → VirtualDirectoryList-BkV3gj5E.js} +1 -1
- package/dist/web/assets/{VisuallyHidden-DIWFV5lV.js → VisuallyHidden-B8wfJ_mU.js} +1 -1
- package/dist/web/assets/{VisuallyHiddenInput-WxcAZDj2.js → VisuallyHiddenInput-Bdcr9CwC.js} +1 -1
- package/dist/web/assets/WidgetSlot-DFojQaSo.js +2 -0
- package/dist/web/assets/_plugin-vue_export-helper-B9AJmZbc.js +9 -0
- package/dist/web/assets/{agent-apps-CXhZLNMa.js → agent-apps-CKGFfySp.js} +1 -1
- package/dist/web/assets/{agent-avatar-xTnj6P4n.js → agent-avatar-V6M_DF3r.js} +1 -1
- package/dist/web/assets/agent-occupation-PZ2YAIM8.js +1 -0
- package/dist/web/assets/{agent-pins-CMBM9w6b.js → agent-pins-8KX0ynzy.js} +1 -1
- package/dist/web/assets/agent-profile-Clb-gYu-.css +1 -0
- package/dist/web/assets/{agent-roster-records-pCYzR1as.js → agent-roster-records-PfAgndHp.js} +1 -1
- package/dist/web/assets/{agent-workflows-IeF737kp.js → agent-workflows-DQlqVOoA.js} +1 -1
- package/dist/web/assets/{attach-closest-edge-B34lttZK.js → attach-closest-edge-D2qlayPy.js} +1 -1
- package/dist/web/assets/{attention-store-BTKBC8TZ.js → attention-store-BnZ8l3kk.js} +1 -1
- package/dist/web/assets/{badge-Bnc2nVhV.js → badge-DX_xrLV6.js} +1 -1
- package/dist/web/assets/button-CEkPBC1E.js +1 -0
- package/dist/web/assets/button-CoXXgtY5.css +1 -0
- package/dist/web/assets/{card-B2JIXyum.js → card-DNQ0_6vT.js} +1 -1
- package/dist/web/assets/{catalog-C8eUDXUx.js → catalog-KnpBkv5t.js} +1 -1
- package/dist/web/assets/{checkbox-Blw3CguI.js → checkbox-DPyLHneg.js} +1 -1
- package/dist/web/assets/{client-AaxCWoEF.js → client-CSQcWFRh.js} +2 -2
- package/dist/web/assets/client-connection-model-vO2cap6a.js +1 -0
- package/dist/web/assets/{client-links-store-CmP5Qsfa.js → client-links-store-DMqe0MbK.js} +1 -1
- package/dist/web/assets/combobox-zUq9bkyM.js +1 -0
- package/dist/web/assets/{console-DtxpKdVW.js → console-DaoAO-EO.js} +1 -1
- package/dist/web/assets/{context-menu-DSGaOBX2.js → context-menu-CcGDnF_k.js} +1 -1
- package/dist/web/assets/{conversation-launcher-settings-DAL9Kf4y.js → conversation-launcher-settings-CXFE-q_A.js} +1 -1
- package/dist/web/assets/{dialog-CwFuZvhM.js → dialog-CxhKMo0D.js} +1 -1
- package/dist/web/assets/dist-B9GqMC5C.js +1 -0
- package/dist/web/assets/dist-DIJqkL4O.js +1 -0
- package/dist/web/assets/dropdown-menu-CXmMnCBh.js +1 -0
- package/dist/web/assets/field-LNsBZqam.js +1 -0
- package/dist/web/assets/{format-bytes-N7zRFzUD.js → format-bytes-Bqefdt37.js} +1 -1
- package/dist/web/assets/{identity-BUFzZs1s.js → identity-DRfhWjty.js} +1 -1
- package/dist/web/assets/index-B4AMPpl_.css +1 -0
- package/dist/web/assets/index-BYIOAXnn.js +2 -0
- package/dist/web/assets/{input-Db1wVnd4.js → input-UoZ-0Xne.js} +1 -1
- package/dist/web/assets/{label--RjFNYxb.js → label-DpjbTOxt.js} +1 -1
- package/dist/web/assets/label-table-BnWNYfyk.js +1 -0
- package/dist/web/assets/{model-crzN3PVX.js → model-13BQndfF.js} +1 -1
- package/dist/web/assets/{model-KuA63FiT.js → model-B5g0CFcM.js} +1 -1
- package/dist/web/assets/model-BYKHVgJr.js +1 -0
- package/dist/web/assets/{model-B5f68kqL.js → model-CDevUwUw.js} +1 -1
- package/dist/web/assets/model-CpuIG8Du.js +4 -0
- package/dist/web/assets/{model-B5dQs6Zt.js → model-P5fSGsiJ.js} +1 -1
- package/dist/web/assets/{model-DOf6QDiY.js → model-pJ6k3zYD.js} +1 -1
- package/dist/web/assets/{motion-CeLn8y1x.js → motion-C-ZimCUS.js} +1 -1
- package/dist/web/assets/{motion-wEp9RlID.js → motion-QY5FKKko.js} +1 -1
- package/dist/web/assets/{motion-preference-DfUreaML.js → motion-preference-BQiiwhab.js} +1 -1
- package/dist/web/assets/{occupation-catalog-Crs_Zc8R.js → occupation-catalog-uDDhZwKK.js} +1 -1
- package/dist/web/assets/{option-DCSIgajR.js → option-CcHPBOo6.js} +1 -1
- package/dist/web/assets/{orchestration-filters-Cu9KEzWE.js → orchestration-filters-DmF4Qs8E.js} +1 -1
- package/dist/web/assets/{page-title-Bvm24KbY.js → page-title-NXphgeQI.js} +1 -1
- package/dist/web/assets/{person-profile-Cf0Sytyw.js → person-profile-DXXfpvta.js} +1 -1
- package/dist/web/assets/popover-xSRzcSmY.js +1 -0
- package/dist/web/assets/popup-host-Bmvrf-2t.js +1 -0
- package/dist/web/assets/{profile-model-DkDH6Qth.js → profile-model-6gTmScHC.js} +1 -1
- package/dist/web/assets/{project-board-layout-OeuzohUI.js → project-board-layout-DBQeP_QP.js} +1 -1
- package/dist/web/assets/{project-capture-BQAqeAJf.js → project-capture-BhYsDWwJ.js} +1 -1
- package/dist/web/assets/{project-origin-CENDtRuK.js → project-origin-D8jy8EF_.js} +1 -1
- package/dist/web/assets/{quick-edit-api-Qndjqk1h.js → quick-edit-api-WLh_88w6.js} +1 -1
- package/dist/web/assets/{radio-group-pfWejLFt.js → radio-group-B4r78nDh.js} +1 -1
- package/dist/web/assets/{role-names-aIXV-sMx.js → role-names-PECaMfQo.js} +1 -1
- package/dist/web/assets/{roundtable-live-D7Asm_GB.js → roundtable-live-DFeDF56c.js} +1 -1
- package/dist/web/assets/{runtime-dom.esm-bundler-BS2lpl87.js → runtime-dom.esm-bundler-f39i44Mt.js} +1 -1
- package/dist/web/assets/save-file-rPduHi2f.js +1 -0
- package/dist/web/assets/select-_JO3Mxdp.js +1 -0
- package/dist/web/assets/{session-launch-offers-kLW-dRsW.js → session-launch-offers-X9b0DwF1.js} +1 -1
- package/dist/web/assets/settings-restart-BnwcTv3i.js +1 -0
- package/dist/web/assets/shared-report-BxNVLalR.js +3 -0
- package/dist/web/assets/shared-report-mYIyRY9C.css +1 -0
- package/dist/web/assets/{source-adapters-CUxqZHz7.js → source-adapters-aupsL146.js} +1 -1
- package/dist/web/assets/{switch-Cdz4-JcE.js → switch-B3Y3oE_n.js} +1 -1
- package/dist/web/assets/{tabs-C3w1-eMu.js → tabs-BlcZiEMY.js} +1 -1
- package/dist/web/assets/{task-board-model-DSr4P56O.js → task-board-model-CmMKsWdY.js} +1 -1
- package/dist/web/assets/task-card-fields-DAx6zMLz.js +1 -0
- package/dist/web/assets/task-labels-BdDFvSAy.js +1 -0
- package/dist/web/assets/{task-reason-BywD_kfi.js → task-reason-7WnPreht.js} +1 -1
- package/dist/web/assets/{team-sheets-D8Y--CP4.js → team-sheets-Cr0ZTPw3.js} +1 -1
- package/dist/web/assets/{textarea-C228nxbD.js → textarea-CRzFqL9a.js} +1 -1
- package/dist/web/assets/{ui-BM8jZcP6.js → ui-BopQuQfc.js} +1 -1
- package/dist/web/assets/{useAgentRecords-D7x4xQ9O.js → useAgentRecords-CMtpd3Fj.js} +1 -1
- package/dist/web/assets/{useAgentWorkSummary-pc1i6nr0.js → useAgentWorkSummary-BQbhaHov.js} +1 -1
- package/dist/web/assets/{useApi-CROJJdhE-DZtkWJZv.js → useApi-CROJJdhE-CRCgNOqq.js} +1 -1
- package/dist/web/assets/{useClipboardCopy-sTthF_MD.js → useClipboardCopy-DkqKK3wY.js} +1 -1
- package/dist/web/assets/{useFocusReturn-BoyUh5y3.js → useFocusReturn-BZpVmQnM.js} +1 -1
- package/dist/web/assets/{useForwardExpose-CqXuqZvd.js → useForwardExpose-Di-MnbTz.js} +1 -1
- package/dist/web/assets/{useForwardPropsEmits-0F_e7unJ.js → useForwardPropsEmits-L9XcB5DG.js} +1 -1
- package/dist/web/assets/useForwardScopeId-CUQFIAIj.js +1 -0
- package/dist/web/assets/useKnowledgeItemPeek-PmQJixw5.js +1 -0
- package/dist/web/assets/{useMinimumLoadingDisplay-CzfqbQPs.js → useMinimumLoadingDisplay-CWPiOaDl.js} +1 -1
- package/dist/web/assets/useProjectAgentRoster-CWVpSsQ3.js +1 -0
- package/dist/web/assets/{useRoutePeek-BDgll9Fy.js → useRoutePeek-DxLVksbJ.js} +1 -1
- package/dist/web/assets/useTeamPeople-CDISP0PM.js +1 -0
- package/dist/web/assets/{useTeamWork-BSFi27vj.js → useTeamWork-BTZd_wKs.js} +1 -1
- package/dist/web/assets/{useTypeahead-D_g4j3Xp.js → useTypeahead-pEZNpBls.js} +1 -1
- package/dist/web/assets/{utils-C6vsxGrE.js → utils-B4pBTmyh.js} +1 -1
- package/dist/web/assets/utils-BsxOjD1Q.js +1 -0
- package/dist/web/assets/version-db3QWWjt.js +1 -0
- package/dist/web/assets/{vue-router-BPhQ0Qow.js → vue-router-B79HWW1l.js} +1 -1
- package/dist/web/assets/website-YgovUEcN.js +1 -0
- package/dist/web/index.html +71 -66
- package/docs/agent-interface-architecture.md +13 -4
- package/docs/client-connections.md +3 -2
- package/docs/employee-agents.md +11 -9
- package/docs/judgment-and-autonomy.md +4 -4
- package/graph-provider/fuli_graph/app.py +4 -0
- package/graph-provider/fuli_graph/collaboration_context.py +3 -7
- package/graph-provider/fuli_graph/graph_field_contract.py +10 -2
- package/graph-provider/fuli_graph/graph_format_builtin_occupations.py +33 -1
- package/graph-provider/fuli_graph/graph_format_migrations.py +18 -0
- package/graph-provider/fuli_graph/graph_query.py +3 -12
- package/graph-provider/fuli_graph/knowledge_index_scan.py +120 -0
- package/graph-provider/fuli_graph/knowledge_outdated.py +9 -1
- 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_search.py +220 -39
- 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 +14 -7
- package/graph-provider/fuli_graph/models.py +4 -0
- package/graph-provider/fuli_graph/occupation_catalog.py +6 -3
- package/graph-provider/fuli_graph/personal_global_preferences.py +3 -7
- package/graph-provider/fuli_graph/preference_versions.py +110 -0
- package/graph-provider/fuli_graph/project_agent_models.py +3 -0
- package/graph-provider/fuli_graph/project_agent_recruitment_occupation.py +1 -1
- package/graph-provider/fuli_graph/provider_values.py +7 -0
- package/graph-provider/fuli_graph/search_projection.py +2 -6
- package/graph-provider/fuli_graph/store_knowledge.py +10 -1
- package/graph-provider/fuli_graph/task_context_routes.py +1 -1
- package/graph-provider/pyproject.toml +1 -1
- package/native/win32/fuli-win-helper.exe +0 -0
- package/npm-shrinkwrap.json +3 -4
- package/package.json +2 -1
- package/skills/capturing-session-knowledge/SKILL.md +14 -7
- package/skills/capturing-session-knowledge/references/capture.md +12 -2
- package/skills/capturing-session-knowledge/references/retrieval.md +13 -4
- package/skills/grilling-project/SKILL.md +2 -0
- package/skills/operating-fuli/SKILL.md +36 -8
- package/skills/operating-fuli/references/workflow-recipes.md +10 -9
- package/src/agent-apps/host-tools/catalog.js +3 -0
- package/src/agent-delegation/agent-tool.js +12 -2
- package/src/agent-delegation/delegation-header.js +32 -8
- package/src/agent-delegation/entry-prompts.js +54 -0
- package/src/agent-delegation/operation-log.js +17 -7
- package/src/agent-delegation/person-words.js +38 -0
- package/src/agent-delegation/port.js +6 -4
- package/src/agent-delegation/refusals.js +14 -0
- package/src/agent-kits/client-detection.js +7 -0
- package/src/agent-kits/client-installer.js +13 -0
- package/src/agent-tools/delegation-definitions.js +5 -3
- package/src/agent-tools/diagnostic-definitions.js +23 -0
- package/src/agent-tools/graph-definitions.js +4 -0
- package/src/agent-tools/graph-handlers.js +6 -1
- package/src/agent-tools/interface-catalog.js +47 -17
- package/src/agent-tools/model-backend-definitions.js +1 -1
- package/src/agent-tools/old-data-definitions.js +16 -0
- package/src/agent-tools/task-entry-definitions.js +1 -1
- package/src/agent-tools/work-surface-definitions.js +1 -1
- package/src/agents/claude-code/lifecycle-hook.js +19 -5
- package/src/agents/claude-code/transcript-format-probe.js +31 -0
- package/src/agents/codex/lifecycle-hook.js +27 -7
- package/src/agents/codex/transcript-format-probe.js +29 -0
- package/src/agents/cursor/lifecycle-hook.js +4 -1
- package/src/agents/lifecycle-failure.js +27 -0
- package/src/agents/lifecycle-message.js +10 -0
- package/src/agents/opencode/lifecycle-hook.js +18 -2
- package/src/agents/transcript-format-registry.js +34 -0
- package/src/agents/transcript-format-scan.js +71 -0
- package/src/cli/command-registry.js +3 -0
- package/src/cli/diagnostics-command.js +59 -0
- package/src/cli/setup-command.js +3 -0
- package/src/cli.js +5 -0
- package/src/conversations/entry-budget.js +1 -1
- package/src/conversations/entry-detail-readers.js +22 -0
- package/src/conversations/entry-inline-budget.js +24 -12
- package/src/conversations/entry-skeleton.js +27 -9
- package/src/conversations/preference-lifecycle.js +2 -1
- package/src/conversations/preference-session.js +5 -2
- package/src/conversations/preference-snapshot.js +4 -1
- package/src/conversations/preference-view.js +5 -1
- package/src/conversations/reply-citations.js +21 -0
- package/src/conversations/stop-auto-close.js +21 -9
- package/src/conversations/task-context-view.js +31 -0
- package/src/data-format/backup-retention.js +8 -0
- package/src/data-format/local-stores.js +24 -2
- package/src/debug-turns/fuli-surface.js +23 -0
- package/src/debug-turns/model-capture.js +84 -0
- package/src/debug-turns/model-request.js +97 -0
- package/src/debug-turns/record.js +178 -0
- package/src/debug-turns/recorder.js +53 -0
- package/src/debug-turns/store.js +91 -0
- package/src/debug-turns/transcript-reader.js +64 -0
- package/src/debug-turns/trigger.js +25 -0
- package/src/diagnostics/agent-tool.js +14 -0
- package/src/diagnostics/event-log.js +133 -0
- package/src/diagnostics/failure-records.js +43 -0
- package/src/diagnostics/query.js +114 -0
- package/src/diagnostics/safe-event.js +83 -0
- package/src/dreaming/run.js +310 -0
- package/src/dreaming/scheduler.js +58 -0
- package/src/employees/builtin/jefa/board-store.js +78 -19
- package/src/employees/builtin/jefa/http.js +8 -5
- package/src/employees/builtin/jefa/project-board.js +2 -0
- package/src/employees/builtin/jefa/tools.js +7 -6
- package/src/employees/recruitment.js +20 -2
- package/src/employees/service.js +11 -1
- package/src/graphiti/agent-growth.js +64 -0
- package/src/graphiti/collaboration-preference-projection.js +7 -0
- package/src/graphiti/collaboration-preference-workflow.js +3 -3
- package/src/graphiti/current-project-knowledge-search.js +24 -1
- package/src/graphiti/federated-application.js +19 -1
- package/src/graphiti/federated-search.js +8 -1
- package/src/graphiti/local-runtimes.js +13 -0
- package/src/graphiti/personal-projects.js +11 -0
- package/src/graphiti/project-agent-mapping.js +1 -0
- package/src/graphiti/project-agent-task-sheets.js +6 -2
- package/src/graphiti/project-agent-workflows.js +22 -4
- package/src/graphiti/project-profile-authors.js +14 -7
- package/src/graphiti/provider-client.js +36 -0
- package/src/graphiti/session-knowledge-migration.js +103 -3
- package/src/graphiti/session-migration-notices.js +65 -0
- package/src/graphiti/session-records.js +22 -4
- package/src/graphiti/task-context-entry.js +5 -1
- package/src/graphiti/task-entry-preferences.js +31 -2
- package/src/graphiti/task-entry-read-only.js +28 -0
- package/src/graphiti/task-knowledge-checkpoint.js +2 -0
- package/src/graphiti/task-knowledge-recall.js +96 -19
- package/src/graphiti/task-remember.js +7 -2
- package/src/graphiti/task-update-request.js +13 -0
- package/src/graphiti/temporary-project-scope.js +7 -1
- package/src/graphiti/turn-receipt-delivery.js +5 -3
- package/src/http/agent-delegation-gate.js +5 -4
- package/src/http/agent-growth-api-router.js +17 -0
- package/src/http/api-router.js +18 -2
- package/src/http/capture-onboarding-api-router.js +3 -2
- package/src/http/debug-turns-api-router.js +70 -0
- package/src/http/diagnostic-events-api-router.js +27 -0
- package/src/http/dreaming-api-router.js +32 -0
- package/src/http/graph-api-router.js +35 -1
- package/src/http/knowledge-item-api-router.js +19 -2
- package/src/http/knowledge-scope-api-router.js +3 -2
- package/src/http/old-data-api-router.js +47 -0
- package/src/http/person-profile-api-router.js +3 -2
- package/src/http/retrieval-terms-api-router.js +37 -0
- package/src/http/semantic-api-router.js +26 -0
- package/src/judgment/agent-view.js +1 -1
- package/src/judgment/backend.js +30 -0
- package/src/judgment/http.js +2 -1
- package/src/judgment/review-prompt.js +2 -0
- package/src/judgment/routing.js +10 -2
- package/src/judgment/service.js +8 -2
- package/src/judgment/store.js +17 -7
- package/src/local-runtime/lifecycle.js +3 -0
- package/src/local-runtime/windows-process-handle.js +9 -3
- package/src/mcp/create-mcp-server.js +42 -25
- package/src/mcp/process-registry.js +45 -3
- package/src/mcp/runtime.js +2 -1
- package/src/mcp/stdio-relay.js +4 -1
- package/src/mcp/tool-annotations.js +2 -0
- package/src/model-backends/adapters/anthropic-messages.js +1 -1
- package/src/model-backends/adapters/exchange.js +2 -2
- package/src/model-backends/adapters/openai-chat.js +1 -1
- 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 +14 -8
- package/src/model-backends/config.js +49 -15
- package/src/model-backends/decision-contract.js +2 -1
- package/src/model-backends/http.js +19 -1
- package/src/model-backends/model-fetch.js +37 -0
- package/src/model-backends/port.js +165 -67
- package/src/model-backends/prompt.js +4 -3
- package/src/model-backends/request.js +42 -3
- package/src/native-runtime/runtime.js +28 -4
- package/src/old-data/agent-tools.js +17 -0
- package/src/old-data/backup-reader.js +78 -0
- package/src/old-data/console-actions.js +53 -0
- package/src/old-data/guarded-stores.js +18 -0
- package/src/old-data/inventory.js +142 -0
- package/src/old-data/port.js +53 -0
- package/src/person-profile/port.js +2 -1
- package/src/presence/windows-helper-pin.js +1 -1
- package/src/project-change-log/port.js +65 -0
- package/src/project-change-log/store.js +60 -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/security/sensitive-content.js +11 -0
- package/src/semantic/scheduler.js +50 -0
- package/src/semantic/semantic-index.js +94 -0
- package/src/server.js +20 -1
- package/src/setup/paths.js +1 -1
- package/src/setup/setup.js +7 -0
- package/src/system/client-connection-status.js +6 -4
- package/src/system/doctor-repair.js +16 -4
- package/src/system/doctor.js +75 -3
- package/src/system/log-paths.js +11 -0
- package/src/system/log-retention.js +2 -8
- package/src/system/mcp-process-scan.js +55 -0
- package/src/system/resource-monitor.js +18 -2
- package/src/system/system-service.js +39 -7
- package/src/system/windows-data-acl.js +109 -0
- package/src/work-surfaces/port.js +17 -11
- package/src/work-surfaces/sources.js +4 -3
- package/dist/web/assets/AboutSectionHeading-BOXKE5Le.js +0 -1
- package/dist/web/assets/AboutSectionHeading-CiD3M3eG.css +0 -1
- package/dist/web/assets/AgentAppsPage-DS2X485q.js +0 -1
- package/dist/web/assets/AgentConversations-D7QJVFIo.js +0 -2
- package/dist/web/assets/AgentConversations-oZFXZE1X.css +0 -1
- package/dist/web/assets/AgentMentionCopy-O6pAjjYE.js +0 -1
- package/dist/web/assets/AgentProfilePage-CKCTcTzc.js +0 -2
- package/dist/web/assets/AgentProfilePage-D1ha8O3z.css +0 -1
- package/dist/web/assets/AgentServicesPage-C3npKkHp.js +0 -1
- package/dist/web/assets/AgentWorkbench-CJ4TYQA1.css +0 -1
- package/dist/web/assets/AgentWorkbench-D9HGRW-n.js +0 -2
- package/dist/web/assets/AppViewerPage-Al4TzYJF.js +0 -1
- package/dist/web/assets/BoardMoveMenu-ncWgEitd.js +0 -1
- package/dist/web/assets/Breadcrumb-QzjzIJdS.js +0 -1
- package/dist/web/assets/Breadcrumb-bsc0JKtG.css +0 -1
- package/dist/web/assets/CaptureChangePage-BQdqH2qC.js +0 -1
- package/dist/web/assets/ConnectionsPage-Be8jIb93.js +0 -1
- package/dist/web/assets/DataFormatPage-0Ne27K6I.css +0 -1
- package/dist/web/assets/DataFormatPage-C92rwzHa.js +0 -2
- package/dist/web/assets/EmployeeScopeDialog-DdR2DzcW.js +0 -1
- package/dist/web/assets/EmployeeTaskBoard-Bo8JT36K.js +0 -3
- package/dist/web/assets/EmployeeTaskBoard-Dljjy_L7.css +0 -1
- package/dist/web/assets/EmployeeWorkbenchPage-B249Mgle.js +0 -3
- package/dist/web/assets/EmployeeWorkbenchPage-BBjZJ6Od.css +0 -1
- package/dist/web/assets/FieldRoot-YdKVCBhW.js +0 -1
- package/dist/web/assets/FlaTaskSheets-Cm5SLq7J.js +0 -1
- package/dist/web/assets/FlasPage-C57gTN5X.js +0 -1
- package/dist/web/assets/HowtoPage-CDJScY6b.js +0 -1
- package/dist/web/assets/KnowledgeDeleteButton-5EtCPPl4.js +0 -1
- package/dist/web/assets/KnowledgeHardDeleteSection-r0lZ7ijb.js +0 -1
- package/dist/web/assets/KnowledgeItemEditPage-BStIRllM.js +0 -1
- package/dist/web/assets/KnowledgeOrganizerPage-BByk8hbw.js +0 -1
- package/dist/web/assets/KnowledgePage-DuWS3bRP.js +0 -1
- package/dist/web/assets/KnowledgePeek-BycBJ2xR.js +0 -1
- package/dist/web/assets/KnowledgePeek-EvumfJER.css +0 -1
- package/dist/web/assets/KnowledgeTurnReceiptPage-DTcDN-pG.js +0 -1
- package/dist/web/assets/KnowledgeWorkspace-CJo-6xdn.js +0 -4
- package/dist/web/assets/KnowledgeWorkspace-DPBq-At0.css +0 -1
- package/dist/web/assets/ModelSettingsPage-C1ghraAh.js +0 -1
- package/dist/web/assets/ModelSettingsPage-ConWy_ec.css +0 -1
- package/dist/web/assets/OccupationsPage-BY1jej7i.js +0 -1
- package/dist/web/assets/OverviewPage-C7YJf-Cq.css +0 -1
- package/dist/web/assets/OverviewPage-Dl-H0EBe.js +0 -1
- package/dist/web/assets/PersonalProfilePage-BcaVzKM6.js +0 -1
- package/dist/web/assets/PersonalProjectsPage-CO4ZYVAI.js +0 -1
- package/dist/web/assets/ProjectAgentDetailPage-Bgh78Mr5.js +0 -8
- package/dist/web/assets/ProjectAgentDetailPage-h7hr9iee.css +0 -1
- package/dist/web/assets/ProjectAgentDialog--T6mU-FW.css +0 -1
- package/dist/web/assets/ProjectAgentDialog-DzTor5ky.js +0 -5
- package/dist/web/assets/ProjectAgentsPage-CzN183pa.js +0 -1
- package/dist/web/assets/ProjectJudgmentPolicy-BMlEBJM3.js +0 -2
- package/dist/web/assets/PublicProjectsPage-DAHT31B8.js +0 -1
- package/dist/web/assets/SessionMigrationPage-IW07XhmD.js +0 -1
- package/dist/web/assets/SessionRecordsPage-Du76tewc.js +0 -1
- package/dist/web/assets/SettingsPage-CJNXe313.js +0 -1
- package/dist/web/assets/SettingsPage-D3AYCNTC.css +0 -1
- package/dist/web/assets/SharedJefaReportPage-dzHSSGhu.js +0 -1
- package/dist/web/assets/TagVocabularyPage-C_oV6GFs.js +0 -1
- package/dist/web/assets/TeamCard-CdO0RiNB.js +0 -1
- package/dist/web/assets/TeamCardsWidget-Cg_kJmb-.js +0 -1
- package/dist/web/assets/UiDialog-CUgrU6SQ.js +0 -1
- package/dist/web/assets/UiIcon-DPv0eZIU.js +0 -1
- package/dist/web/assets/WidgetSlot-BSU_-l_4.js +0 -2
- package/dist/web/assets/_plugin-vue_export-helper-DQENg-QE.js +0 -9
- package/dist/web/assets/agent-occupation-BvOgDW-q.js +0 -1
- package/dist/web/assets/agent-profile-BBqkfac0.css +0 -1
- package/dist/web/assets/agent-task-board-Cf9il_1i.js +0 -1
- package/dist/web/assets/button-N4FjuQuJ.js +0 -1
- package/dist/web/assets/client-connection-model-C3gpYYl7.js +0 -1
- package/dist/web/assets/combobox-DHwWXUpj.js +0 -1
- package/dist/web/assets/desktop-client-DnfjyLBX.js +0 -1
- package/dist/web/assets/dist-BInsvNsv.js +0 -1
- package/dist/web/assets/dist-Dc8jFf8M.js +0 -1
- package/dist/web/assets/field-BQLn7Hfw.js +0 -1
- package/dist/web/assets/index-CXPYDcyq.js +0 -2
- package/dist/web/assets/index-x95VDmzK.css +0 -1
- package/dist/web/assets/judgment-api-CK9yqrpU.js +0 -1
- package/dist/web/assets/label-table-KdyaCTvK.js +0 -1
- package/dist/web/assets/model-D4kKYvpj.js +0 -1
- package/dist/web/assets/popover-D4YFkL_5.js +0 -1
- package/dist/web/assets/project-board-settings-DPP6xKLz.js +0 -1
- package/dist/web/assets/project-team-api-7ybLH-uJ.js +0 -1
- package/dist/web/assets/save-file-CRxAsski.js +0 -1
- package/dist/web/assets/select-CUy1AIwE.js +0 -1
- package/dist/web/assets/settings-restart-JYH81qB-.js +0 -1
- package/dist/web/assets/shared-report-8p3nBKr-.js +0 -1
- package/dist/web/assets/source-coverage-4PsHC9TK.js +0 -1
- package/dist/web/assets/task-labels-CXBG2chm.js +0 -1
- package/dist/web/assets/useForwardScopeId-DVUFcuwO.js +0 -1
- package/dist/web/assets/useKnowledgeItemPeek-KZveY8Wz.js +0 -1
- package/dist/web/assets/useTeamPeople-Dna3Yrm3.js +0 -1
- package/dist/web/assets/utils-BX1QI2N6.js +0 -1
- package/dist/web/assets/version-CBPeq5nI.js +0 -1
|
@@ -2,7 +2,8 @@ import { reconnectableClients } from './doctor.js';
|
|
|
2
2
|
|
|
3
3
|
// The doctor's 「自动修复」 (POST /api/system/doctor/repair): only the items the
|
|
4
4
|
// doctor marks fix 'auto'. A client is reconnected through the console's own
|
|
5
|
-
// client installer, which backs up its configuration first.
|
|
5
|
+
// client installer, which backs up its configuration first. A data directory
|
|
6
|
+
// other accounts can open is limited to the person and SYSTEM. It never confirms
|
|
6
7
|
// a data format migration, never connects a client that was not connected
|
|
7
8
|
// before, and never restarts a client's sessions.
|
|
8
9
|
//
|
|
@@ -10,11 +11,13 @@ import { reconnectableClients } from './doctor.js';
|
|
|
10
11
|
// with the doctor read again after the repair.
|
|
11
12
|
|
|
12
13
|
const NOT_RECONNECTED = 'The client could not be reconnected; connect it again in Settings → Clients.';
|
|
14
|
+
const NOT_RESTRICTED = 'Access to the data directory could not be limited to your account and SYSTEM.';
|
|
13
15
|
|
|
14
16
|
// check: the doctor's read (doctor.js). connectClient: the client installer
|
|
15
17
|
// (client-connection-install.js). recordClientsReconnected: marks the console
|
|
16
|
-
// update journal's clients reconnected (console-update.js).
|
|
17
|
-
|
|
18
|
+
// update journal's clients reconnected (console-update.js). restrictDataDir:
|
|
19
|
+
// limits the data directory to its owner and SYSTEM (windows-data-acl.js).
|
|
20
|
+
export function createDoctorRepair({ check, connectClient, observeClients, recordClientsReconnected, restrictDataDir }) {
|
|
18
21
|
let running = false;
|
|
19
22
|
return async () => {
|
|
20
23
|
if (running) throw new TypeError('A repair is already running. Please wait.');
|
|
@@ -32,7 +35,8 @@ export function createDoctorRepair({ check, connectClient, observeClients, recor
|
|
|
32
35
|
if (item.kind === 'client_outdated') results.push({ id: item.id, ...await reconnect(item.data.clientId) });
|
|
33
36
|
else if (item.kind === 'update_left_work') {
|
|
34
37
|
results.push({ id: item.id, ...await finishUpdateReconnection(item, { reconnect, observeClients, recordClientsReconnected }) });
|
|
35
|
-
} else results.push({ id: item.id,
|
|
38
|
+
} else if (item.kind === 'data_dir_shared') results.push({ id: item.id, ...await restrictDataDirectory(restrictDataDir) });
|
|
39
|
+
else results.push({ id: item.id, outcome: 'skipped' });
|
|
36
40
|
}
|
|
37
41
|
return { results, doctor: await check() };
|
|
38
42
|
} finally { running = false; }
|
|
@@ -50,6 +54,14 @@ async function finishUpdateReconnection(item, { reconnect, observeClients, recor
|
|
|
50
54
|
return { outcome: 'fixed' };
|
|
51
55
|
}
|
|
52
56
|
|
|
57
|
+
// icacls' own text names the path and is localized, so it is not relayed.
|
|
58
|
+
async function restrictDataDirectory(restrictDataDir) {
|
|
59
|
+
try {
|
|
60
|
+
await restrictDataDir();
|
|
61
|
+
return { outcome: 'fixed' };
|
|
62
|
+
} catch { return { outcome: 'failed', error: NOT_RESTRICTED }; }
|
|
63
|
+
}
|
|
64
|
+
|
|
53
65
|
async function reconnectClient(connectClient, clientId) {
|
|
54
66
|
try {
|
|
55
67
|
const result = await connectClient({ clientId });
|
package/src/system/doctor.js
CHANGED
|
@@ -24,6 +24,9 @@ const SEVERITY_ORDER = Object.freeze({ blocking: 0, warning: 1, info: 2 });
|
|
|
24
24
|
const GRAPH_SLEEPING = new Set(['provider-sleeping', 'sleeping']);
|
|
25
25
|
// The sessions one outdated item names: what the console's offers request takes at once.
|
|
26
26
|
const MAX_OUTDATED_SESSIONS = 20;
|
|
27
|
+
// Too few transcript lines say nothing about a format; under half read means it changed.
|
|
28
|
+
const MIN_FORMAT_LINES = 5;
|
|
29
|
+
const MIN_RECOGNIZED_SHARE = 0.5;
|
|
27
30
|
|
|
28
31
|
// The clients a repair may reconnect: once connected, FULI's integration still
|
|
29
32
|
// present, and installable without the person (detected, not manual-only).
|
|
@@ -38,6 +41,8 @@ const canInstall = (client) => client.detected && !client.manualOnly;
|
|
|
38
41
|
// formatOperations: the data directory's format operations log (operations-log.js).
|
|
39
42
|
// graphStage: the adaptive runtime's stage (runtime-broker.js), or null.
|
|
40
43
|
// liveProcesses: live MCP server records (process-registry.js).
|
|
44
|
+
// awaitingRestart: the open sessions that started before their client's last
|
|
45
|
+
// change (process-registry.js).
|
|
41
46
|
// latestVersion: the version checker's last answer without waiting, or null.
|
|
42
47
|
// lastUpdate: the console update journal's status (console-update.js), or null.
|
|
43
48
|
// hookTrust: whether each client's host trusts FULI's lifecycle hooks, read by
|
|
@@ -45,13 +50,26 @@ const canInstall = (client) => client.detected && !client.manualOnly;
|
|
|
45
50
|
// async function returning { [clientId]: { readable: true, untrusted: [eventName...] }
|
|
46
51
|
// | { readable: false, reason } }. A readable client with untrusted hooks is a
|
|
47
52
|
// warning; an unreadable one stays in unchecked, never guessed healthy.
|
|
53
|
+
// transcriptFormat: how much of each client's newest private transcript FULI's
|
|
54
|
+
// parser still reads, by that client's own probe
|
|
55
|
+
// (src/agents/transcript-format-registry.js): an async function returning
|
|
56
|
+
// { [clientId]: { readable: true, recognized, total } | { readable: false, reason } }.
|
|
57
|
+
// A connected client whose parser reads under half of at least five lines
|
|
58
|
+
// changed its format; an unreadable one stays in unchecked.
|
|
48
59
|
// portMoves: the ports the running console's start moved by itself
|
|
49
60
|
// ({ movedAt, moves }, blocked-port-recovery.js), or null.
|
|
50
61
|
// graphRuntime: { mode, migration } — the active graph runtime mode and the
|
|
51
62
|
// last one-click migration (graph-migration.js), or null.
|
|
63
|
+
// dataDirShared: the principals besides the person and SYSTEM that the data
|
|
64
|
+
// directory's ACL lets in (windows-data-acl.js); none outside Windows.
|
|
65
|
+
// runningServers: this installation's MCP servers the OS shows running
|
|
66
|
+
// ([{ pid, parentPid, startedAt }], mcp-process-scan.js), or null when the
|
|
67
|
+
// list could not be read.
|
|
52
68
|
export function createDoctor({ observeClients, previewDataFormats = null, formatOperations = () => [],
|
|
53
|
-
graphStage = () => null, liveProcesses, latestVersion, lastUpdate, hookTrust = async () => ({}),
|
|
54
|
-
|
|
69
|
+
graphStage = () => null, liveProcesses, awaitingRestart = () => [], latestVersion, lastUpdate, hookTrust = async () => ({}),
|
|
70
|
+
transcriptFormat = async () => ({}),
|
|
71
|
+
portMoves = () => null, graphRuntime = () => null, dataDirShared = async () => [], runningServers = () => [],
|
|
72
|
+
version = FULI_VERSION, now = () => new Date() }) {
|
|
55
73
|
// The personal graph's last answer while its provider answered: the step it
|
|
56
74
|
// waited on, or null, and when that was seen.
|
|
57
75
|
let lastGraph = null;
|
|
@@ -90,20 +108,40 @@ export function createDoctor({ observeClients, previewDataFormats = null, format
|
|
|
90
108
|
untrustedHooks.push(hookTrustUntrustedItem(client, result.untrusted));
|
|
91
109
|
}
|
|
92
110
|
}
|
|
111
|
+
const formatsRead = await read('transcript_format', transcriptFormat) ?? {};
|
|
112
|
+
const changedFormats = [];
|
|
113
|
+
for (const client of (clients?.clients ?? []).filter((candidate) => candidate.status === 'connected')) {
|
|
114
|
+
const result = formatsRead[client.id];
|
|
115
|
+
if (!result) continue;
|
|
116
|
+
if (result.readable !== true) notChecked(`transcript_format:${client.id}`, result.reason);
|
|
117
|
+
else if (result.total >= MIN_FORMAT_LINES && result.recognized / result.total < MIN_RECOGNIZED_SHARE) {
|
|
118
|
+
changedFormats.push(item(`client_format_changed:${client.id}`, 'client_format_changed', 'warning', 'person',
|
|
119
|
+
{ clientId: client.id, label: client.label, recognized: result.recognized, total: result.total }));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
93
122
|
const processes = await read('sessions', liveProcesses);
|
|
123
|
+
const running = await read('sessions', runningServers);
|
|
124
|
+
// A list that could not be read says nothing about unrecorded servers.
|
|
125
|
+
if (running === null) notChecked('sessions', 'process_list_unavailable');
|
|
126
|
+
const waiting = await read('sessions', awaitingRestart);
|
|
94
127
|
const latest = await read('update', latestVersion);
|
|
95
128
|
const update = await read('update', lastUpdate);
|
|
96
129
|
const moved = await read('runtime', portMoves);
|
|
97
130
|
const runtime = await read('runtime', graphRuntime);
|
|
131
|
+
const shared = await read('data_dir', dataDirShared);
|
|
98
132
|
const items = [
|
|
99
133
|
...graphRuntimeItems(runtime),
|
|
100
134
|
...clientItems(clients?.clients ?? []),
|
|
101
135
|
...untrustedHooks,
|
|
136
|
+
...changedFormats,
|
|
102
137
|
...dataFormatItems(formats),
|
|
103
138
|
...rememberedGraph,
|
|
104
139
|
...sessionItems(processes ?? [], version),
|
|
140
|
+
...unrecordedItems(processes && running ? unrecordedServers(running, processes) : []),
|
|
141
|
+
...restartItems(waiting ?? []),
|
|
105
142
|
...updateItems(latest, update, version),
|
|
106
|
-
...portItems(moved)
|
|
143
|
+
...portItems(moved),
|
|
144
|
+
...dataDirItems(shared)
|
|
107
145
|
].sort((left, right) => SEVERITY_ORDER[left.severity] - SEVERITY_ORDER[right.severity]);
|
|
108
146
|
return { checkedAt, version, overall: overallOf(items), items, unchecked: [...new Set(unchecked)], uncheckedReasons };
|
|
109
147
|
}
|
|
@@ -212,6 +250,32 @@ function sessionItems(processes, version) {
|
|
|
212
250
|
{ ...group, ...(since ? { since } : {}), sessions: [...sessions.values()].slice(0, MAX_OUTDATED_SESSIONS) }));
|
|
213
251
|
}
|
|
214
252
|
|
|
253
|
+
// Running servers a FULI older than process-registry.js started: they write no
|
|
254
|
+
// record, so neither their client nor their version is known. A process that
|
|
255
|
+
// is the parent of another listed one is not a session's server of its own:
|
|
256
|
+
// a relay (stdio-relay.js) or FuliNode.exe runs the same command line as the
|
|
257
|
+
// server under it, and that server is recorded or counted itself.
|
|
258
|
+
function unrecordedServers(running, records) {
|
|
259
|
+
const recorded = new Set(records.map(({ pid }) => pid));
|
|
260
|
+
const parents = new Set(running.map(({ parentPid }) => parentPid));
|
|
261
|
+
return running.filter(({ pid }) => !recorded.has(pid) && !parents.has(pid));
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
function unrecordedItems(servers) {
|
|
265
|
+
if (!servers.length) return [];
|
|
266
|
+
const since = servers.map(({ startedAt }) => startedAt).filter((startedAt) => typeof startedAt === 'string').sort()[0];
|
|
267
|
+
return [item('sessions_outdated:other:unknown', 'sessions_outdated', 'warning', 'person',
|
|
268
|
+
{ client: 'other', count: servers.length, runningVersion: null, ...(since ? { since } : {}), sessions: [] })];
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// Open sessions that started before FULI changed their client's Skills or hooks:
|
|
272
|
+
// only a restart loads them, and starting one clears this by itself.
|
|
273
|
+
function restartItems(waiting) {
|
|
274
|
+
return waiting.map(({ sourceApplication, count, changedAt, sessions }) => item(`client_restart:${sourceApplication}`, 'client_restart', 'warning', 'person',
|
|
275
|
+
{ client: sourceApplication, count, since: changedAt,
|
|
276
|
+
sessions: sessions.slice(0, MAX_OUTDATED_SESSIONS).map(sessionId => ({ sourceApplication, sessionId })) }));
|
|
277
|
+
}
|
|
278
|
+
|
|
215
279
|
// Ports this console's start moved because Windows reserved them or another
|
|
216
280
|
// program held them. Nothing is left to do; the id names the start, so a
|
|
217
281
|
// client says it once per move.
|
|
@@ -220,6 +284,14 @@ function portItems(moved) {
|
|
|
220
284
|
return [item(`ports_moved:${moved.movedAt}`, 'ports_moved', 'info', 'person', moved)];
|
|
221
285
|
}
|
|
222
286
|
|
|
287
|
+
// On Windows the data directory, with the human-review token and every
|
|
288
|
+
// store, is open to other accounts or sandboxes (rec#53). The repair limits
|
|
289
|
+
// it to the person and SYSTEM; principals are SIDs or SDDL aliases.
|
|
290
|
+
function dataDirItems(shared) {
|
|
291
|
+
if (!shared?.length) return [];
|
|
292
|
+
return [item('data_dir_shared', 'data_dir_shared', 'warning', 'auto', { principals: shared })];
|
|
293
|
+
}
|
|
294
|
+
|
|
223
295
|
function updateItems(latest, update, version) {
|
|
224
296
|
const items = [];
|
|
225
297
|
if (latest?.status === 'ready' && latest.updateAvailable) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { nativeInstanceLogPaths } from '../setup/paths.js';
|
|
2
|
+
|
|
3
|
+
// Its own module so readers of the log files (the old-data list an Agent may
|
|
4
|
+
// read) do not load the console's log retention timer and cleanup.
|
|
5
|
+
/** Where FULI writes its logs: the console's, and each native graph instance's provider and Neo4j console. */
|
|
6
|
+
export function fuliLogPaths(paths) {
|
|
7
|
+
return [paths.logPath, ...[paths.nativePersonalDir, paths.nativeWorkspaceDir].filter(Boolean).flatMap((instanceDir) => {
|
|
8
|
+
const logs = nativeInstanceLogPaths(instanceDir);
|
|
9
|
+
return [logs.provider, logs.database];
|
|
10
|
+
})].filter(Boolean);
|
|
11
|
+
}
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import { boundChildProcessLog, childLogArchives, removeChildLogArchives } from '../local-runtime/child-process-log.js';
|
|
2
|
-
import {
|
|
2
|
+
import { fuliLogPaths } from './log-paths.js';
|
|
3
3
|
|
|
4
4
|
// The children write their logs while they run, so the console checks every
|
|
5
5
|
// few minutes that none has grown past its limit (child-process-log.js, REC #67).
|
|
6
6
|
const CHECK_INTERVAL_MS = 5 * 60 * 1000;
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
export function fuliLogPaths(paths) {
|
|
10
|
-
return [paths.logPath, ...[paths.nativePersonalDir, paths.nativeWorkspaceDir].filter(Boolean).flatMap((instanceDir) => {
|
|
11
|
-
const logs = nativeInstanceLogPaths(instanceDir);
|
|
12
|
-
return [logs.provider, logs.database];
|
|
13
|
-
})].filter(Boolean);
|
|
14
|
-
}
|
|
8
|
+
export { fuliLogPaths } from './log-paths.js';
|
|
15
9
|
|
|
16
10
|
// paths: resolveSetupPaths(). The kept copies are removed only when the person
|
|
17
11
|
// asks (「清理旧日志」); rotation alone drops only the oldest one.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { execute, parsePowershellJson, powershellArguments } from '../local-runtime/windows-process-handle.js';
|
|
2
|
+
|
|
3
|
+
// The FULI stdio MCP servers of this installation that the OS shows running,
|
|
4
|
+
// recorded or not: a server started by a FULI older than process-registry.js
|
|
5
|
+
// writes no record, so only the process list can name it. A server is a
|
|
6
|
+
// process whose command line runs mcp-server.js with this installation's
|
|
7
|
+
// --runtime-config; worker (--worker) and one-shot (--call) runs are not
|
|
8
|
+
// sessions. Answers [{ pid, parentPid, startedAt }], or null when the list
|
|
9
|
+
// could not be read in time. A session can show more than one: the stdio
|
|
10
|
+
// relay (stdio-relay.js) and, on an installed Windows copy, FuliNode.exe run
|
|
11
|
+
// the same arguments as their server child.
|
|
12
|
+
const SCAN_TIMEOUT_MS = 5000;
|
|
13
|
+
const SERVER_SCRIPT = 'mcp-server.js';
|
|
14
|
+
const NOT_SESSIONS = ['--worker', '--call'];
|
|
15
|
+
|
|
16
|
+
const WINDOWS_SCRIPT = `$found = @(Get-CimInstance Win32_Process -Filter "CommandLine LIKE '%${SERVER_SCRIPT}%'" | ForEach-Object {
|
|
17
|
+
[pscustomobject]@{ pid = [int]$_.ProcessId; parentPid = [int]$_.ParentProcessId; commandLine = $_.CommandLine;
|
|
18
|
+
startedAt = $(if ($_.CreationDate) { $_.CreationDate.ToUniversalTime().ToString('o') } else { $null }) } })
|
|
19
|
+
ConvertTo-Json -Compress -Depth 3 -InputObject $found`;
|
|
20
|
+
|
|
21
|
+
// run(command, args, options) → { stdout }: execute() in production, a fake in tests.
|
|
22
|
+
export async function runningMcpServers(runtimeConfigPath, { platform = process.platform, run = execute } = {}) {
|
|
23
|
+
try {
|
|
24
|
+
const rows = platform === 'win32' ? await windowsRows(run) : await psRows(run);
|
|
25
|
+
const wanted = platform === 'win32' ? runtimeConfigPath.toLowerCase() : runtimeConfigPath;
|
|
26
|
+
return rows.filter(({ commandLine }) => {
|
|
27
|
+
const command = platform === 'win32' ? commandLine.toLowerCase() : commandLine;
|
|
28
|
+
return command.includes(SERVER_SCRIPT) && command.includes('--runtime-config') && command.includes(wanted)
|
|
29
|
+
&& !NOT_SESSIONS.some((flag) => command.includes(flag));
|
|
30
|
+
}).map(({ pid, parentPid, startedAt }) => ({ pid, parentPid, startedAt }));
|
|
31
|
+
} catch {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
async function windowsRows(run) {
|
|
37
|
+
const { stdout } = await run('powershell.exe', powershellArguments(WINDOWS_SCRIPT), { timeout: SCAN_TIMEOUT_MS });
|
|
38
|
+
const rows = parsePowershellJson(stdout);
|
|
39
|
+
return (Array.isArray(rows) ? rows : rows ? [rows] : []).filter((row) => typeof row.commandLine === 'string')
|
|
40
|
+
.map((row) => ({ pid: row.pid, parentPid: row.parentPid, commandLine: row.commandLine,
|
|
41
|
+
startedAt: typeof row.startedAt === 'string' ? new Date(row.startedAt).toISOString() : null }));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// lstart is read with TZ=UTC and LC_ALL=C, five fields: Tue Oct 27 10:15:30 2026.
|
|
45
|
+
async function psRows(run) {
|
|
46
|
+
const { stdout } = await run('ps', ['-A', '-ww', '-o', 'pid=,ppid=,lstart=,command='],
|
|
47
|
+
{ timeout: SCAN_TIMEOUT_MS, env: { ...process.env, TZ: 'UTC', LC_ALL: 'C' } });
|
|
48
|
+
return stdout.split('\n').flatMap((line) => {
|
|
49
|
+
const match = /^\s*(\d+)\s+(\d+)\s+(\S+\s+\S+\s+\S+\s+\S+\s+\S+)\s+(.*)$/.exec(line);
|
|
50
|
+
if (!match) return [];
|
|
51
|
+
const started = new Date(`${match[3]} UTC`);
|
|
52
|
+
return [{ pid: Number(match[1]), parentPid: Number(match[2]), commandLine: match[4],
|
|
53
|
+
startedAt: Number.isNaN(started.getTime()) ? null : started.toISOString() }];
|
|
54
|
+
});
|
|
55
|
+
}
|
|
@@ -415,8 +415,7 @@ export async function allocatedDirectorySize(root) {
|
|
|
415
415
|
continue;
|
|
416
416
|
}
|
|
417
417
|
try {
|
|
418
|
-
|
|
419
|
-
total += Number.isFinite(stats.blocks) ? stats.blocks * 512 : stats.size;
|
|
418
|
+
total += allocatedBytes(await lstat(path));
|
|
420
419
|
} catch {
|
|
421
420
|
// Files may be replaced while the snapshot is being collected.
|
|
422
421
|
}
|
|
@@ -424,6 +423,23 @@ export async function allocatedDirectorySize(root) {
|
|
|
424
423
|
return total;
|
|
425
424
|
}
|
|
426
425
|
|
|
426
|
+
// The disk a file or a whole directory takes, measured as the data directory
|
|
427
|
+
// is; 0 for a link or a path that is gone.
|
|
428
|
+
export async function allocatedPathSize(path) {
|
|
429
|
+
let stats;
|
|
430
|
+
try {
|
|
431
|
+
stats = await lstat(path);
|
|
432
|
+
} catch {
|
|
433
|
+
return 0;
|
|
434
|
+
}
|
|
435
|
+
if (stats.isSymbolicLink()) return 0;
|
|
436
|
+
return stats.isDirectory() ? allocatedDirectorySize(path) : allocatedBytes(stats);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
function allocatedBytes(stats) {
|
|
440
|
+
return Number.isFinite(stats.blocks) ? stats.blocks * 512 : stats.size;
|
|
441
|
+
}
|
|
442
|
+
|
|
427
443
|
async function hostFilesystemStats(path) {
|
|
428
444
|
try {
|
|
429
445
|
const stats = await statfs(path, { bigint: true });
|
|
@@ -22,14 +22,21 @@ import { createDoctorRepair } from './doctor-repair.js';
|
|
|
22
22
|
import { createDiagnosticsBundle } from './diagnostics-bundle.js';
|
|
23
23
|
import { readGraphMigration, startGraphMigration } from './graph-migration.js';
|
|
24
24
|
import { createLogRetention } from './log-retention.js';
|
|
25
|
-
import { liveMcpProcesses } from '../mcp/process-registry.js';
|
|
25
|
+
import { liveMcpProcesses, sessionsAwaitingRestart } from '../mcp/process-registry.js';
|
|
26
26
|
import { agentKitPorts } from '../agent-kits/ports.js';
|
|
27
27
|
import { sessionClientRecords } from '../agent-kits/session-clients.js';
|
|
28
28
|
import { createSessionOffers } from '../agent-kits/session-offers.js';
|
|
29
29
|
import { customClientStore } from '../agent-kits/custom-clients.js';
|
|
30
30
|
import { createCustomClients } from './custom-client-connection.js';
|
|
31
31
|
import { CODEX_HOOK_TRUST_CLIENT, createCodexHookTrust } from '../agents/codex/hook-trust.js';
|
|
32
|
+
import { createTranscriptFormatProbe } from '../agents/transcript-format-registry.js';
|
|
32
33
|
import { readFormatOperations } from '../data-format/operations-log.js';
|
|
34
|
+
import { createModelCapture } from '../debug-turns/model-capture.js';
|
|
35
|
+
import { windowsDataAcl } from './windows-data-acl.js';
|
|
36
|
+
import { debugTurnStore } from '../debug-turns/store.js';
|
|
37
|
+
import { runningMcpServers } from './mcp-process-scan.js';
|
|
38
|
+
|
|
39
|
+
const MCP_SCAN_CACHE_MS = 5 * 60_000;
|
|
33
40
|
|
|
34
41
|
export function createSystemService({
|
|
35
42
|
paths,
|
|
@@ -46,7 +53,8 @@ export function createSystemService({
|
|
|
46
53
|
clientObserver = createClientConnectionObserver({
|
|
47
54
|
installer: agentKits.clientInstaller,
|
|
48
55
|
customClients,
|
|
49
|
-
historyPath: join(paths.dataDir, 'client-connection-observations.json')
|
|
56
|
+
historyPath: join(paths.dataDir, 'client-connection-observations.json'),
|
|
57
|
+
awaitingRestart: () => sessionsAwaitingRestart(runtimeConfigPath)
|
|
50
58
|
}),
|
|
51
59
|
clientInstaller = createClientInstaller({ installer: agentKits.clientInstaller }),
|
|
52
60
|
executorAdapters = new Map(),
|
|
@@ -56,6 +64,13 @@ export function createSystemService({
|
|
|
56
64
|
previewDataFormats = null,
|
|
57
65
|
// Reads Codex's hook trust from its app-server (src/agents/codex/hook-trust.js).
|
|
58
66
|
codexHookTrust = createCodexHookTrust(),
|
|
67
|
+
// How much of each client's newest transcript FULI still reads (src/agents/transcript-format-registry.js).
|
|
68
|
+
transcriptFormat = createTranscriptFormatProbe(),
|
|
69
|
+
// Who can open the data directory on Windows (windows-data-acl.js).
|
|
70
|
+
dataDirAcl = windowsDataAcl(),
|
|
71
|
+
// This installation's MCP servers the OS shows running (mcp-process-scan.js).
|
|
72
|
+
scanMcpServers = runningMcpServers,
|
|
73
|
+
now = Date.now,
|
|
59
74
|
runtimeBroker = createAdaptiveRuntimeBroker({
|
|
60
75
|
paths,
|
|
61
76
|
settings: readAdaptiveRuntimeSettings(paths.adaptiveRuntimeSettingsPath),
|
|
@@ -122,11 +137,20 @@ export function createSystemService({
|
|
|
122
137
|
}
|
|
123
138
|
|
|
124
139
|
const observeClients = () => clientObserver.observe();
|
|
125
|
-
|
|
140
|
+
// The client polls the doctor; the OS process list is read at most once per window.
|
|
141
|
+
let serverScan = null;
|
|
142
|
+
const runningServers = () => {
|
|
143
|
+
if (!serverScan || now() - serverScan.at >= MCP_SCAN_CACHE_MS) {
|
|
144
|
+
serverScan = { at: now(), answer: scanMcpServers(runtimeConfigPath) };
|
|
145
|
+
}
|
|
146
|
+
return serverScan.answer;
|
|
147
|
+
};
|
|
148
|
+
const doctor = createDoctor({ observeClients, previewDataFormats, runningServers,
|
|
126
149
|
formatOperations: () => readFormatOperations(paths.dataDir), graphStage: () => runtimeBroker.status().stage,
|
|
127
|
-
hookTrust: async () => ({ [CODEX_HOOK_TRUST_CLIENT]: await codexHookTrust() }),
|
|
128
|
-
liveProcesses: () => liveMcpProcesses(runtimeConfigPath), latestVersion: () => versionChecker.peek(),
|
|
150
|
+
hookTrust: async () => ({ [CODEX_HOOK_TRUST_CLIENT]: await codexHookTrust() }), transcriptFormat,
|
|
151
|
+
liveProcesses: () => liveMcpProcesses(runtimeConfigPath), awaitingRestart: () => sessionsAwaitingRestart(runtimeConfigPath), latestVersion: () => versionChecker.peek(),
|
|
129
152
|
lastUpdate: () => update.status(),
|
|
153
|
+
dataDirShared: () => dataDirAcl.sharedWith(paths.dataDir),
|
|
130
154
|
// Only a graph that was set up has a mode; a fresh data directory has nothing to move.
|
|
131
155
|
graphRuntime: () => readJson(paths.graphRuntimeStatePath, null)
|
|
132
156
|
? { mode: activeSettings().graphRuntimeMode, migration: readGraphMigration(paths) } : null,
|
|
@@ -141,6 +165,8 @@ export function createSystemService({
|
|
|
141
165
|
settings: () => ({ configured: configuredSettings(), active: activeSettings() }) });
|
|
142
166
|
const logRetention = createLogRetention({ paths });
|
|
143
167
|
|
|
168
|
+
const turnRecords = debugTurnStore(paths.dataDir);
|
|
169
|
+
const modelCapture = createModelCapture({ store: turnRecords });
|
|
144
170
|
return {
|
|
145
171
|
getSettings,
|
|
146
172
|
updateSettings,
|
|
@@ -174,8 +200,12 @@ export function createSystemService({
|
|
|
174
200
|
// The kept copies of FULI's logs and the person's 「清理旧日志」 (log-retention.js).
|
|
175
201
|
logArchives: () => logRetention.archives(),
|
|
176
202
|
clearLogArchives: () => logRetention.clearArchives(),
|
|
203
|
+
// The #fulidebug turn records the person reads in Settings › 系统 (debug-turns/store.js).
|
|
204
|
+
debugTurns: turnRecords,
|
|
205
|
+
modelCapture,
|
|
177
206
|
repairDoctor: createDoctorRepair({ check: doctor.check, connectClient: clientInstaller, observeClients,
|
|
178
|
-
recordClientsReconnected: (id) => update.recordClientsReconnected(id)
|
|
207
|
+
recordClientsReconnected: (id) => update.recordClientsReconnected(id),
|
|
208
|
+
restrictDataDir: () => dataDirAcl.restrictToOwner(paths.dataDir) }),
|
|
179
209
|
runtimeStatus: () => runtimeBroker.status(),
|
|
180
210
|
acquireRuntimeLease: (input) => runtimeBroker.acquire(input),
|
|
181
211
|
refreshRuntimeLease: (leaseId) => runtimeBroker.refresh(leaseId),
|
|
@@ -190,6 +220,7 @@ export function createSystemService({
|
|
|
190
220
|
),
|
|
191
221
|
close: () => {
|
|
192
222
|
logRetention.close();
|
|
223
|
+
void modelCapture.close();
|
|
193
224
|
return runtimeBroker.close();
|
|
194
225
|
}
|
|
195
226
|
};
|
|
@@ -240,7 +271,8 @@ function settingsResult(configured, active) {
|
|
|
240
271
|
conversationLaunchers: active.conversationLaunchers,
|
|
241
272
|
notifications: active.notifications,
|
|
242
273
|
agentNamingStyle: active.agentNamingStyle,
|
|
243
|
-
topicPromotion: active.topicPromotion
|
|
274
|
+
topicPromotion: active.topicPromotion,
|
|
275
|
+
updateChannel: active.updateChannel
|
|
244
276
|
},
|
|
245
277
|
active
|
|
246
278
|
)
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { mkdirSync } from 'node:fs';
|
|
2
|
+
import { mkdtemp, readFile, rm } from 'node:fs/promises';
|
|
3
|
+
import { tmpdir } from 'node:os';
|
|
4
|
+
import { join, win32, resolve } from 'node:path';
|
|
5
|
+
|
|
6
|
+
import { execute } from '../local-runtime/windows-process-handle.js';
|
|
7
|
+
import { defaultDataDir } from '../setup/paths.js';
|
|
8
|
+
|
|
9
|
+
// Who can open FULI's data directory on Windows (rec#53 D-65). The default
|
|
10
|
+
// %LOCALAPPDATA%\Fuli inherits AppData\Local's ACL, which can let sandboxes
|
|
11
|
+
// (CodexSandboxUsers, AppContainer capabilities) and other accounts read the
|
|
12
|
+
// human-review token and every store. macOS and Linux keep 0700/0600 instead,
|
|
13
|
+
// so outside Windows this reports nothing and changes nothing.
|
|
14
|
+
//
|
|
15
|
+
// The ACL is read as SDDL (`icacls /save`), never from icacls' printed names:
|
|
16
|
+
// those are localized ("NT AUTHORITY\SYSTEM" is "NT-AUTORITÄT\SYSTEM" in
|
|
17
|
+
// German) and in the console's OEM code page, while SDDL names every
|
|
18
|
+
// principal by SID or a fixed alias and needs no PowerShell start per read.
|
|
19
|
+
// Every allow ACE counts, inherited or explicit, inherit-only included: it
|
|
20
|
+
// opens what the directory holds. The tools run from System32 so a PATH entry
|
|
21
|
+
// (Git's coreutils `whoami`) never answers instead.
|
|
22
|
+
|
|
23
|
+
const SYSTEM_SID = 'S-1-5-18';
|
|
24
|
+
// SDDL names SYSTEM by its alias; other aliases (BA, BU, WD…) stay as written.
|
|
25
|
+
const SID_ALIASES = Object.freeze({ SY: SYSTEM_SID });
|
|
26
|
+
// Access-allowed ACE types: plain, object, callback and callback object.
|
|
27
|
+
const ALLOW_TYPES = new Set(['A', 'OA', 'XA', 'ZA']);
|
|
28
|
+
// A large store resets file by file; icacls is given time to walk it.
|
|
29
|
+
const RESTRICT_TIMEOUT_MS = 10 * 60_000;
|
|
30
|
+
const FULL_CONTROL_INHERITED = '(OI)(CI)F';
|
|
31
|
+
|
|
32
|
+
export function windowsDataAcl({ platform = process.platform, run = execute,
|
|
33
|
+
systemRoot = process.env.SystemRoot ?? 'C:\\Windows', tempRoot = tmpdir() } = {}) {
|
|
34
|
+
if (platform !== 'win32') return { sharedWith: async () => [], restrictToOwner: async () => {} };
|
|
35
|
+
const tool = (name) => win32.join(systemRoot, 'System32', name);
|
|
36
|
+
|
|
37
|
+
async function currentUserSid() {
|
|
38
|
+
const { stdout } = await run(tool('whoami.exe'), ['/user', '/fo', 'csv', '/nh']);
|
|
39
|
+
const sid = stdout.trim().match(/"(S-1-[\d-]+)"$/)?.[1];
|
|
40
|
+
if (!sid) throw new Error('whoami did not name the current user\'s SID.');
|
|
41
|
+
return sid;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async function daclOf(directory) {
|
|
45
|
+
const scratch = await mkdtemp(join(tempRoot, 'fuli-acl-'));
|
|
46
|
+
try {
|
|
47
|
+
const saved = join(scratch, 'acl');
|
|
48
|
+
await run(tool('icacls.exe'), [directory, '/save', saved]);
|
|
49
|
+
return allowedPrincipals((await readFile(saved)).toString('utf16le'));
|
|
50
|
+
} finally { await rm(scratch, { recursive: true, force: true }); }
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// The principals other than the current user and SYSTEM the ACL lets in.
|
|
54
|
+
// SDDL writes the machine's built-in Administrator account (RID 500) as LA,
|
|
55
|
+
// so when that is who runs FULI, LA is the current user too.
|
|
56
|
+
async function sharedWith(directory) {
|
|
57
|
+
const [user, principals] = await Promise.all([currentUserSid(), daclOf(directory)]);
|
|
58
|
+
const self = new Set([user, SYSTEM_SID, ...(user.endsWith('-500') ? ['LA'] : [])]);
|
|
59
|
+
return [...new Set(principals.filter((sid) => !self.has(sid)))];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// First every entry under the directory goes back to plain inheritance (no
|
|
63
|
+
// explicit grant survives), then the directory stops inheriting and grants
|
|
64
|
+
// full control to the current user and SYSTEM only, which its files and
|
|
65
|
+
// folders inherit. A file the reset could not reach (/C goes on) is still
|
|
66
|
+
// reported after the directory itself is protected.
|
|
67
|
+
async function restrictToOwner(directory) {
|
|
68
|
+
const user = await currentUserSid();
|
|
69
|
+
const icacls = tool('icacls.exe');
|
|
70
|
+
const resetFailure = await run(icacls, [directory, '/reset', '/T', '/C', '/Q'], { timeout: RESTRICT_TIMEOUT_MS })
|
|
71
|
+
.then(() => null, (error) => error);
|
|
72
|
+
await run(icacls, [directory, '/inheritance:r', '/grant:r', `*${user}:${FULL_CONTROL_INHERITED}`,
|
|
73
|
+
`*${SYSTEM_SID}:${FULL_CONTROL_INHERITED}`, '/C', '/Q'], { timeout: RESTRICT_TIMEOUT_MS });
|
|
74
|
+
if (resetFailure) throw resetFailure;
|
|
75
|
+
// The SIDs (never names or paths) say who is left, so a report can be acted on.
|
|
76
|
+
const left = await sharedWith(directory);
|
|
77
|
+
if (left.length) throw new Error(`Other accounts can still open the data directory: ${left.join(', ')}.`);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return { sharedWith, restrictToOwner };
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// `fuli setup`'s step: the data directory exists, and on Windows only its
|
|
84
|
+
// owner and SYSTEM can open it. An installation from before this is limited
|
|
85
|
+
// here too, since every update and the desktop client's first start run setup.
|
|
86
|
+
// Only FULI's own default folder is changed unasked: a folder the person chose
|
|
87
|
+
// may be shared on purpose, so the doctor reports it and 「自动修复」 is their click.
|
|
88
|
+
// Returns false when the ACL could not be read or limited; setup goes on.
|
|
89
|
+
export async function keepDataDirectoryPrivate(dataDir, acl = windowsDataAcl(), ownFolder = defaultDataDir()) {
|
|
90
|
+
mkdirSync(dataDir, { recursive: true, mode: 0o700 });
|
|
91
|
+
if (resolve(dataDir).toLowerCase() !== resolve(ownFolder).toLowerCase()) return true;
|
|
92
|
+
try {
|
|
93
|
+
if ((await acl.sharedWith(dataDir)).length) await acl.restrictToOwner(dataDir);
|
|
94
|
+
return true;
|
|
95
|
+
} catch { return false; }
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// The SIDs (or SDDL aliases) of the allow ACEs in an `icacls /save` record:
|
|
99
|
+
// its name line, then the SDDL. A null DACL lets everyone in. The rest of the
|
|
100
|
+
// line is scanned whole: a conditional ACE nests parentheses, and an SACL
|
|
101
|
+
// that follows holds no allow ACE.
|
|
102
|
+
function allowedPrincipals(saved) {
|
|
103
|
+
const dacl = saved.replace(/^\uFEFF/, '').split(/\r?\n/)[1]?.match(/D:([A-Z_]*)(.*)/);
|
|
104
|
+
if (!dacl) throw new Error('icacls did not save a DACL.');
|
|
105
|
+
if (dacl[1].includes('NO_ACCESS_CONTROL')) return ['WD'];
|
|
106
|
+
return [...dacl[2].matchAll(/\(([A-Z]+);[^;]*;[^;]*;[^;]*;[^;]*;([^;)]+)/g)]
|
|
107
|
+
.filter(([, type]) => ALLOW_TYPES.has(type))
|
|
108
|
+
.map(([, , sid]) => SID_ALIASES[sid] ?? sid);
|
|
109
|
+
}
|
|
@@ -31,37 +31,43 @@ export function createWorkSurfaces({ path = ':memory:', sources, names, now = ()
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
// Every kind's rows with their owners' names. A kind whose owner cannot be
|
|
34
|
-
// read is reported in unavailable instead of failing the whole table.
|
|
35
|
-
|
|
34
|
+
// read is reported in unavailable instead of failing the whole table. A kind
|
|
35
|
+
// may answer { rows, truncated } when its owner stopped at a limit.
|
|
36
|
+
async function gather(personalSpaceId, filter = {}) {
|
|
36
37
|
const [named, ...listed] = await Promise.allSettled([names(personalSpaceId),
|
|
37
|
-
...kinds.map((kind) => sources[kind].list(personalSpaceId))]);
|
|
38
|
+
...kinds.map((kind) => sources[kind].list(personalSpaceId, filter))]);
|
|
38
39
|
const unavailable = [];
|
|
40
|
+
const truncated = [];
|
|
39
41
|
const lookup = named.status === 'fulfilled' ? named.value : { agents: new Map(), projects: new Map() };
|
|
40
42
|
if (named.status === 'rejected') unavailable.push(unavailableEntry('names', named.reason));
|
|
41
43
|
const rows = listed.flatMap((result, index) => {
|
|
42
|
-
if (result.status === '
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
if (result.status === 'rejected') {
|
|
45
|
+
unavailable.push(unavailableEntry(kinds[index], result.reason));
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
if (Array.isArray(result.value)) return result.value;
|
|
49
|
+
if (result.value.truncated) truncated.push(kinds[index]);
|
|
50
|
+
return result.value.rows;
|
|
45
51
|
}).map((row) => {
|
|
46
52
|
const agent = lookup.agents.get(row.agentId);
|
|
47
53
|
const personalProjectId = row.personalProjectId ?? agent?.personalProjectId ?? null;
|
|
48
54
|
return { ...row, agentName: agent?.name ?? null, personalProjectId,
|
|
49
55
|
projectName: lookup.projects.get(personalProjectId) ?? null };
|
|
50
56
|
});
|
|
51
|
-
return { rows, unavailable };
|
|
57
|
+
return { rows, unavailable, truncated };
|
|
52
58
|
}
|
|
53
59
|
|
|
54
60
|
async function list({ personalSpaceId, filter: input }) {
|
|
55
61
|
const filter = filterOf(input, kinds);
|
|
56
|
-
const { rows, unavailable } = await gather(personalSpaceId);
|
|
57
|
-
return { items: rows.filter((row) => matches(row, filter)).map(publicRow), unavailable,
|
|
58
|
-
partial: unavailable.length > 0, checkedAt: at() };
|
|
62
|
+
const { rows, unavailable, truncated } = await gather(personalSpaceId, filter);
|
|
63
|
+
return { items: rows.filter((row) => matches(row, filter)).map(publicRow), unavailable, truncated,
|
|
64
|
+
partial: unavailable.length > 0 || truncated.length > 0, checkedAt: at() };
|
|
59
65
|
}
|
|
60
66
|
|
|
61
67
|
function pause({ personalSpaceId, filter: input, actor }) {
|
|
62
68
|
const filter = filterOf(input, kinds);
|
|
63
69
|
return serial(async () => {
|
|
64
|
-
const { rows, unavailable } = await gather(personalSpaceId);
|
|
70
|
+
const { rows, unavailable } = await gather(personalSpaceId, filter);
|
|
65
71
|
const matched = rows.filter((row) => matches(row, filter));
|
|
66
72
|
const covered = matched.filter((row) => row.pausable);
|
|
67
73
|
const skipped = matched.length - covered.length;
|
|
@@ -72,13 +72,14 @@ export function workSurfaceSources(app) {
|
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
workbench: {
|
|
75
|
-
async list(personalSpaceId) {
|
|
76
|
-
const { workbenches } = await listSpaceWorkbenches(app, { personalSpaceId });
|
|
77
|
-
|
|
75
|
+
async list(personalSpaceId, { agentId, personalProjectId } = {}) {
|
|
76
|
+
const { workbenches, partial } = await listSpaceWorkbenches(app, { personalSpaceId, agentId, personalProjectId });
|
|
77
|
+
const rows = workbenches.flatMap((sheet) => sheet.shares.map((share) => ({ kind: 'workbench',
|
|
78
78
|
id: `${sheet.taskId}${WORKBENCH_SEPARATOR}${share.agentId}`, name: shortName(sheet.title),
|
|
79
79
|
agentId: share.agentId, personalProjectId: sheet.personalProjectId, state: share.status, on: null,
|
|
80
80
|
pausable: false, changedAt: sheet.updatedAt,
|
|
81
81
|
detail: { taskId: sheet.taskId, role: share.role, taskStatus: sheet.status, progress: share.progress } })));
|
|
82
|
+
return { rows, truncated: partial };
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Et as e,M as t,V as n,k as r,pr as i,t as a}from"./_plugin-vue_export-helper-DQENg-QE.js";var o={class:`about-section-heading`},s=[`id`],c=a(n({__name:`AboutSectionHeading`,props:{titleId:{},title:{},description:{}},setup(n){return(a,c)=>(e(),t(`header`,o,[r(`h2`,{id:n.titleId},i(n.title),9,s),r(`p`,null,i(n.description),1)]))}}),[[`__scopeId`,`data-v-99ca5811`]]);export{c as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.about-section-heading[data-v-99ca5811]{border-bottom:1px solid var(--color-border);padding-bottom:24px}.about-section-heading h2[data-v-99ca5811]{color:var(--color-ink);letter-spacing:-.02em;margin:0;font-size:clamp(20px,2.6vw,26px);font-weight:650;line-height:1.25}.about-section-heading p[data-v-99ca5811]{max-width:680px;color:var(--color-muted);margin-top:8px;font-size:14px;line-height:1.65}
|