fuli-context 0.22.0-beta.2 → 0.22.0-beta.4
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 +5 -1
- package/README.zh-CN.md +4 -1
- package/dist/web/assets/{AboutPage-BsYF7_sz.js → AboutPage-C2Ak6Jii.js} +1 -1
- package/dist/web/assets/{AgentHand-C5aUnyp3.js → AgentHand-Cxou5bPl.js} +1 -1
- package/dist/web/assets/AgentMentionCopy-BIWsPf22.css +1 -0
- package/dist/web/assets/AgentMentionCopy-CibgcJTC.js +1 -0
- package/dist/web/assets/{AgentName-DcR-yXAg.js → AgentName-CrIgUC1K.js} +1 -1
- package/dist/web/assets/{AgentProfilePage-Cu7q_7eQ.js → AgentProfilePage-ffwdNhMX.js} +1 -1
- package/dist/web/assets/AgentServicesPage-CB6IUOrP.css +1 -0
- package/dist/web/assets/{AgentServicesPage-KuM8Gh2-.js → AgentServicesPage-D1_fa1SC.js} +1 -1
- package/dist/web/assets/{AgentsDirectoryPage-ColciWpR.css → AgentsDirectoryPage-Cq1z926q.css} +1 -1
- package/dist/web/assets/AgentsDirectoryPage-SgbPuztQ.js +1 -0
- package/dist/web/assets/{BackLink-plP8tjp9.js → BackLink-BrzA4htj.js} +1 -1
- package/dist/web/assets/BoardMoveMenu-DgPJT8s1.js +1 -0
- package/dist/web/assets/{CaptureChangePage-BV0LJpm1.js → CaptureChangePage-bCYtY611.js} +1 -1
- package/dist/web/assets/{Card-B9fEjzdx.js → Card-Zhpf1co5.js} +1 -1
- package/dist/web/assets/{CardHeader-iTzyVlAg.js → CardHeader-C9JtHZXs.js} +1 -1
- package/dist/web/assets/{CardTitle-Dq4vYfDe.js → CardTitle-B8HEul5N.js} +1 -1
- package/dist/web/assets/{ConnectionsPage-CMVrntwM.js → ConnectionsPage-CSWl_R-1.js} +1 -1
- package/dist/web/assets/{CreateProjectDialog-dGfGAGgo.js → CreateProjectDialog-CApQ6Yzi.js} +1 -1
- package/dist/web/assets/DataFormatPage-DmCKskrj.css +1 -0
- package/dist/web/assets/DataFormatPage-Mrr5EvW-.js +2 -0
- package/dist/web/assets/{DialogFooter-BwqCbMpI.js → DialogFooter-CRWvDbVh.js} +1 -1
- package/dist/web/assets/EmployeeScopeDialog-Brpg45xh.js +1 -0
- package/dist/web/assets/EmployeeScopeDialog-CBexPEM7.css +1 -0
- package/dist/web/assets/EmployeeWorkbenchPage-7cyTmiY7.js +3 -0
- package/dist/web/assets/{EmployeeWorkbenchPage-CmNwqk91.css → EmployeeWorkbenchPage-BFVC_klR.css} +1 -1
- package/dist/web/assets/FieldDescription-C1ZURDEJ.js +1 -0
- package/dist/web/assets/{GrowthLoading-CL1dGObg.js → GrowthLoading-DnSjbwAi.js} +1 -1
- package/dist/web/assets/{InboxPage-DrgE7gQu.js → InboxPage-mwimM5mD.js} +1 -1
- package/dist/web/assets/Input-B45GFhbM.js +1 -0
- package/dist/web/assets/KnowledgeHardDeleteSection-BaJhsOxD.js +1 -0
- package/dist/web/assets/KnowledgeItemEditPage-BpnyOFSx.js +1 -0
- package/dist/web/assets/{KnowledgeItemSummaryCard-Bd0Ml6Ia.js → KnowledgeItemSummaryCard-0N1WaM7k.js} +1 -1
- package/dist/web/assets/KnowledgeOrganizerPage-CCBudWpM.js +1 -0
- package/dist/web/assets/KnowledgeOrganizerPage-D2VWOi81.css +1 -0
- package/dist/web/assets/KnowledgePage-DXibFNna.js +1 -0
- package/dist/web/assets/KnowledgePeek-B9r1G3ix.js +1 -0
- package/dist/web/assets/{KnowledgeTurnReceiptPage-DTZckYql.js → KnowledgeTurnReceiptPage-D4c47u_s.js} +1 -1
- package/dist/web/assets/KnowledgeWorkspace-CA8oxVht.css +1 -0
- package/dist/web/assets/KnowledgeWorkspace-CJmm-Xs7.js +4 -0
- package/dist/web/assets/Label-CBRsKlFL.js +1 -0
- package/dist/web/assets/ModelSettingsPage-CeEp6z6R.js +1 -0
- package/dist/web/assets/{ModelSettingsPage-Ce3DK7EY.css → ModelSettingsPage-Yx5VBioo.css} +1 -1
- package/dist/web/assets/{NotFoundPage--X4xZoMR.js → NotFoundPage-CWfYMNhr.js} +1 -1
- package/dist/web/assets/{OccupationsPage-DKuRfjeQ.js → OccupationsPage-BEbQ19dD.js} +1 -1
- package/dist/web/assets/OverviewPage-BIDy1btk.css +1 -0
- package/dist/web/assets/OverviewPage-Dg3wnb1d.js +2 -0
- package/dist/web/assets/PersonalProfilePage-1N8EhCW6.css +1 -0
- package/dist/web/assets/{PersonalProfilePage-DgveAPjq.js → PersonalProfilePage-CLD5CnhQ.js} +1 -1
- package/dist/web/assets/{PersonalProjectsPage-DJ1VBf1r.js → PersonalProjectsPage-Dcbgmfi_.js} +1 -1
- package/dist/web/assets/PopperContent-CESNmYJq.js +1 -0
- package/dist/web/assets/Presence-DXkWbJEH.js +3 -0
- package/dist/web/assets/ProjectAgentDetailPage-DA90j4yU.css +1 -0
- package/dist/web/assets/ProjectAgentDetailPage-io2UP0of.js +8 -0
- package/dist/web/assets/{ProjectAgentDialog-3Abm-9sL.js → ProjectAgentDialog-DlzKuGB1.js} +1 -1
- package/dist/web/assets/ProjectAgentFirstTask-Dy06Eyzw.js +1 -0
- package/dist/web/assets/{ProjectAgentsPage-Cj0PTJAE.js → ProjectAgentsPage-CbUffuyy.js} +1 -1
- package/dist/web/assets/{ProjectJudgmentPolicy-9BP_2AkI.js → ProjectJudgmentPolicy-BFx527E9.js} +1 -1
- package/dist/web/assets/{ProjectScopePicker-CyZZQW4d.js → ProjectScopePicker-Cqk9DQKF.js} +1 -1
- package/dist/web/assets/{PublicProjectsPage-Te3uZA-M.js → PublicProjectsPage-W3CZmgxE.js} +1 -1
- package/dist/web/assets/RadioGroupItem-4VcuuIZK.js +1 -0
- package/dist/web/assets/RoundtablesPage-BvfBQcJ7.js +1 -0
- package/dist/web/assets/RoundtablesPage-EReKCqSf.css +1 -0
- package/dist/web/assets/RovingFocusGroup-DyLR4_0m.js +1 -0
- package/dist/web/assets/RovingFocusItem-CkXsXOwz.js +1 -0
- package/dist/web/assets/SessionMigrationPage-elCVaNnK.js +1 -0
- package/dist/web/assets/{SessionRecordsPage-DthAYkM5.js → SessionRecordsPage-CgTk9zqc.js} +1 -1
- package/dist/web/assets/SettingsPage-9AMTjLAu.js +1 -0
- package/dist/web/assets/{SettingsPage-DQMUQGfr.css → SettingsPage-DpVeP2OZ.css} +1 -1
- package/dist/web/assets/SharedJefaReportPage-CViBxD_v.js +1 -0
- package/dist/web/assets/SharedJefaReportPage-ROvh2rjx.css +1 -0
- package/dist/web/assets/{TableHeader-D7hfNBTs.js → TableHeader-B6al55kg.js} +1 -1
- package/dist/web/assets/TabsContent-C6fnXu6I.js +1 -0
- package/dist/web/assets/TabsTrigger-CIQwVltR.js +1 -0
- package/dist/web/assets/TagVocabularyPage-D88AyXKA.js +1 -0
- package/dist/web/assets/TaskBlockerClear-B_xAPoLz.js +1 -0
- package/dist/web/assets/TaskBlockerClear-CjSNfpyP.css +1 -0
- package/dist/web/assets/TaskBlockerNotice-B3PHEmtC.js +1 -0
- package/dist/web/assets/TaskBlockerNotice-CZkho0TF.css +1 -0
- package/dist/web/assets/{TaskExecutionPlan-BeP4gm5O.js → TaskExecutionPlan-CVcrXGM8.js} +1 -1
- package/dist/web/assets/TaskReason-LleXL19i.css +1 -0
- package/dist/web/assets/TaskReason-TdaOCf7S.js +1 -0
- package/dist/web/assets/Teleport-DQmFiMAU.js +1 -0
- package/dist/web/assets/{TextField-CKNwSQVb.js → TextField-BdQdL1Lx.js} +1 -1
- package/dist/web/assets/Textarea-CnjoFPB6.js +1 -0
- package/dist/web/assets/UiChip-CILP7dOO.js +1 -0
- package/dist/web/assets/UiChip-DulygSq8.css +1 -0
- package/dist/web/assets/{UiDialog-BAd1JUvO.js → UiDialog-BIxwydDu.js} +1 -1
- package/dist/web/assets/{UiDisclosure-DVZdIuCs.js → UiDisclosure-SMhU3tcV.js} +1 -1
- package/dist/web/assets/UiIcon-BPTz4pnL.js +1 -0
- package/dist/web/assets/{UiIconButton-W1WfC7dt.js → UiIconButton-jmIfQNdm.js} +1 -1
- package/dist/web/assets/UiNotice-DsJRHRTA.js +1 -0
- package/dist/web/assets/UiNotice-ZCBdABdM.css +1 -0
- package/dist/web/assets/{UiSegmented-Csh7hHda.js → UiSegmented-D-dME5Lr.js} +1 -1
- package/dist/web/assets/{UiSelect-Db8o-PRU.js → UiSelect-B7p9uzs4.js} +1 -1
- package/dist/web/assets/UiSelect-fhrGABzy.css +1 -0
- package/dist/web/assets/{UiToggle-DMuBZLY-.js → UiToggle-Bkg9nRN4.js} +1 -1
- package/dist/web/assets/{UiWeight-CfhzKts0.js → UiWeight-B_8vlc3_.js} +1 -1
- package/dist/web/assets/UiWeight-qaDd9Wax.css +1 -0
- package/dist/web/assets/{UnassignedConversationsPanel-DWUCNfR_.js → UnassignedConversationsPanel-BGrKUSEX.js} +1 -1
- package/dist/web/assets/VirtualDirectoryList-1vLi41SD.css +1 -0
- package/dist/web/assets/VirtualDirectoryList-B_L9kwcm.js +1 -0
- package/dist/web/assets/VisuallyHiddenInput-BHE2kO_O.js +1 -0
- package/dist/web/assets/{Workbench3D-DZZDfj10.js → Workbench3D-Doh6x9Ot.js} +1 -1
- package/dist/web/assets/_plugin-vue_export-helper-Be38Jawd.js +10 -0
- package/dist/web/assets/accordion-B2ZGR46D.js +1 -0
- package/dist/web/assets/{agent-pins-O8E8apGs.js → agent-pins-CJDVKD1Y.js} +1 -1
- package/dist/web/assets/agent-profile-D4aymIbD.css +1 -0
- package/dist/web/assets/agent-profile.css_vue_type_style_index_0_src_true_lang-W7mMZ3bu.js +1 -0
- package/dist/web/assets/{agent-roster-records-D13CvTqR.js → agent-roster-records-DGNNHsa3.js} +1 -1
- package/dist/web/assets/{agent-work-summary-BM2HS3g8.js → agent-work-summary-CbZjWLGE.js} +1 -1
- package/dist/web/assets/{attach-closest-edge-u1fTT6hT.js → attach-closest-edge-B0bgWmui.js} +1 -1
- package/dist/web/assets/{attention-store-Dexy6ybk.js → attention-store-BklrG2I7.js} +1 -1
- package/dist/web/assets/{badge-DvKUKtfP.js → badge-G1xmTvLV.js} +1 -1
- package/dist/web/assets/{button-C1iW0ZW7.js → button-Xb0cKhdr.js} +1 -1
- package/dist/web/assets/checkbox-CZg0Iow1.js +1 -0
- package/dist/web/assets/{client-CrxcG5dV.js → client-CJGUYN1M.js} +1 -1
- package/dist/web/assets/{client-links-store-CrSwWuAU.js → client-links-store-HoGAJb4t.js} +1 -1
- package/dist/web/assets/{console-DQ5fV3T8.js → console-Cnye1IOw.js} +1 -1
- package/dist/web/assets/{conversation-launcher-settings-Bd222WX0.js → conversation-launcher-settings-BmsEEQjr.js} +1 -1
- package/dist/web/assets/{design-lab-B9QfdWfU.js → design-lab-B9JU_TOQ.js} +1 -1
- package/dist/web/assets/dialog-CWJVMpu3.js +1 -0
- package/dist/web/assets/{dist-Cox3qxin.js → dist-lEETOIok.js} +1 -1
- package/dist/web/assets/dropdown-menu-DVE0b7Uc.js +1 -0
- package/dist/web/assets/field-ZZ-C7-wp.js +1 -0
- package/dist/web/assets/{identity-GQWezGWB.js → identity-wHyBLirA.js} +1 -1
- package/dist/web/assets/index-BWziNfHB.js +2 -0
- package/dist/web/assets/index-DuLqKIn8.css +1 -0
- package/dist/web/assets/{judgment-api-BzpDqFDw.js → judgment-api-BwOm0hL8.js} +1 -1
- package/dist/web/assets/label-table-DA5V7oXM.js +1 -0
- package/dist/web/assets/model-BnIF0iqb.js +1 -0
- package/dist/web/assets/{model-T6Jor9oL.js → model-BndkODhT.js} +1 -1
- package/dist/web/assets/{model-BeQStl_a.js → model-DdrMcS8b.js} +1 -1
- package/dist/web/assets/{model-0znFleoY.js → model-DqILignz.js} +1 -1
- package/dist/web/assets/{model-CYXGfox9.js → model-YwLQNm5s.js} +1 -1
- package/dist/web/assets/{model-LTc6Nj3z.js → model-cgiHaWsF.js} +1 -1
- package/dist/web/assets/{motion-preference-CHiRbvgR.js → motion-preference-D7rorL9a.js} +1 -1
- package/dist/web/assets/{occupation-catalog-Caq13-kY.js → occupation-catalog-BG1VjWtG.js} +1 -1
- package/dist/web/assets/{orchestration-filters-DSnybvV3.js → orchestration-filters-BKS3yBja.js} +1 -1
- package/dist/web/assets/{page-title-BflOskhA.js → page-title-BiSHyu6N.js} +1 -1
- package/dist/web/assets/{profile-model-CVx0a_P4.js → profile-model-i36bqqb2.js} +1 -1
- package/dist/web/assets/{project-board-layout-DmQActFu.js → project-board-layout-DPItL60Q.js} +1 -1
- package/dist/web/assets/{project-capture-H4qMdM1l.js → project-capture-CFeMGS5O.js} +1 -1
- package/dist/web/assets/{project-origin-DMR9fKUE.js → project-origin-wTTsd0pp.js} +1 -1
- package/dist/web/assets/project-team-api-BrC4ewpy.js +1 -0
- package/dist/web/assets/{quick-edit-api-CCaH3tbK.js → quick-edit-api-BbKWyjWy.js} +1 -1
- package/dist/web/assets/select-DrMXPnfK.js +1 -0
- package/dist/web/assets/shared-report-D6AgVQoO.js +3 -0
- package/dist/web/assets/{task-evidence-M32pNYH0.js → task-evidence-B2smSxDg.js} +1 -1
- package/dist/web/assets/task-labels-CIzXKt-p.js +1 -0
- package/dist/web/assets/ui-CwdCReAf.css +1 -0
- package/dist/web/assets/ui-D936HGK2.js +1 -0
- package/dist/web/assets/{useAgentRecords-3-zWyxUu.js → useAgentRecords-V5t2SdoJ.js} +1 -1
- package/dist/web/assets/{useApi-CROJJdhE-Cm-N4N7-.js → useApi-CROJJdhE-BUho7jmG.js} +1 -1
- package/dist/web/assets/useDirection-C0EDWveN.js +1 -0
- package/dist/web/assets/{useFocusReturn-Dq-yqBLj.js → useFocusReturn-DaWUYyV8.js} +1 -1
- package/dist/web/assets/useForwardExpose-BW43swEH.js +1 -0
- package/dist/web/assets/{useKnowledgeItemPeek-BWbdLqAL.js → useKnowledgeItemPeek-BJBUG0nY.js} +1 -1
- package/dist/web/assets/{useMinimumLoadingDisplay-BEUl4UAV.js → useMinimumLoadingDisplay-DT1pktOl.js} +1 -1
- package/dist/web/assets/{useRoutePeek-C_9DVOKT.js → useRoutePeek-dXJW_jIl.js} +1 -1
- package/dist/web/assets/{useTypeahead-CP74zC2e.js → useTypeahead-BVDZWCri.js} +1 -1
- package/dist/web/assets/utils-BTTEEOG-.js +1 -0
- package/dist/web/assets/{vue-router-rg-hudCL.js → vue-router-DMMH71_5.js} +1 -1
- package/dist/web/index.html +46 -41
- package/docs/agent-interface-architecture.md +14 -4
- package/graph-provider/fuli_graph/app.py +1 -1
- package/graph-provider/fuli_graph/graph_field_contract.py +1 -1
- package/graph-provider/fuli_graph/graph_format_migrations.py +10 -1
- package/graph-provider/fuli_graph/project_agent_names.py +29 -5
- package/graph-provider/fuli_graph/project_agent_routes.py +16 -0
- package/graph-provider/fuli_graph/project_agent_task_models.py +14 -3
- package/graph-provider/fuli_graph/runtime.py +7 -0
- package/graph-provider/fuli_graph/store_project_agent_naming.py +33 -6
- package/graph-provider/fuli_graph/store_project_agent_task_blockers.py +42 -7
- package/graph-provider/fuli_graph/store_project_agent_task_reads.py +2 -1
- package/graph-provider/fuli_graph/store_project_agent_tasks.py +3 -0
- package/graph-provider/fuli_graph/store_project_agents.py +1 -1
- package/graph-provider/fuli_graph/task_blocker.py +11 -0
- package/graph-provider/pyproject.toml +1 -1
- package/native/win32/fuli-win-helper.exe +0 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/skills/capturing-session-knowledge/references/coordination.md +6 -2
- package/skills/operating-fuli/references/workflow-recipes.md +2 -1
- package/src/agent-apps/host-tools/catalog.js +1 -0
- package/src/agent-naming/naming-style.js +30 -0
- package/src/agent-tools/graph-handlers.js +7 -0
- package/src/agent-tools/interface-catalog.js +2 -0
- package/src/agent-tools/project-agent-definitions.js +4 -1
- package/src/agent-tools/project-agent-tool-definitions.js +6 -0
- package/src/cli/native-runtime-command.js +1 -0
- package/src/desktop/windows-controller.js +39 -6
- package/src/desktop/windows-installation-switch.js +16 -6
- package/src/desktop/windows-update-command.js +2 -0
- package/src/desktop/windows-update-runtime.js +28 -3
- package/src/desktop/windows-update.js +9 -9
- package/src/graphiti/federated-application.js +1 -0
- package/src/graphiti/project-agent-mapping.js +1 -0
- package/src/http/api-router.js +3 -0
- package/src/http/task-blocker-api-router.js +35 -0
- package/src/local-runtime/child-process-log.js +34 -0
- package/src/mcp/tool-annotations.js +1 -0
- package/src/native-runtime/neo4j-asset-state.js +4 -3
- package/src/native-runtime/neo4j-lifecycle.js +43 -18
- package/src/native-runtime/neo4j-version-policy.js +28 -0
- package/src/native-runtime/runtime.js +14 -12
- package/src/native-runtime/windows-processes.js +3 -3
- package/src/presence/windows-helper-pin.js +1 -1
- package/src/server.js +7 -0
- package/src/setup/graph-runtime.js +9 -7
- package/src/setup/paths.js +7 -1
- package/src/setup/setup.js +11 -1
- package/src/system/console-port-switch.js +42 -0
- package/src/system/reserved-ports.js +111 -0
- package/src/system/runtime-settings.js +6 -2
- package/src/system/settings-apply.js +6 -6
- package/src/system/settings-guide.js +7 -0
- package/src/system/system-service.js +2 -1
- package/src/task-blockers/console-port.js +20 -0
- package/dist/web/assets/AgentMentionCopy-CTVGHbLe.js +0 -1
- package/dist/web/assets/AgentMentionCopy-Dv5izHzv.css +0 -1
- package/dist/web/assets/AgentServicesPage-KPgp3aqp.css +0 -1
- package/dist/web/assets/AgentsDirectoryPage-9YEOf4nL.js +0 -1
- package/dist/web/assets/BoardMoveMenu-DC6_givs.js +0 -1
- package/dist/web/assets/DataFormatPage-BwjmmNgj.css +0 -1
- package/dist/web/assets/DataFormatPage-DuEma4K0.js +0 -2
- package/dist/web/assets/EmployeeScopeDialog-BoVOcccy.js +0 -1
- package/dist/web/assets/EmployeeScopeDialog-DkqAe9sJ.css +0 -1
- package/dist/web/assets/EmployeeWorkbenchPage-_h6-ZFHV.js +0 -3
- package/dist/web/assets/Input-14C6kRsv.js +0 -1
- package/dist/web/assets/KnowledgeHardDeleteSection-DYD4BeL_.js +0 -1
- package/dist/web/assets/KnowledgeItemEditPage-Cja2_OMd.js +0 -1
- package/dist/web/assets/KnowledgeOrganizerPage-BIOaMzgQ.css +0 -1
- package/dist/web/assets/KnowledgeOrganizerPage-MT3tMGVx.js +0 -1
- package/dist/web/assets/KnowledgePage-bWItlXy5.js +0 -1
- package/dist/web/assets/KnowledgePeek-Cj9AiG_J.js +0 -1
- package/dist/web/assets/KnowledgeWorkspace-BOrKazVl.js +0 -4
- package/dist/web/assets/KnowledgeWorkspace-bhlGz1Mr.css +0 -1
- package/dist/web/assets/Label-WCfl_UpK.js +0 -1
- package/dist/web/assets/ModelSettingsPage-CQZdCaiX.js +0 -1
- package/dist/web/assets/OverviewPage-B2sbgaT-.js +0 -2
- package/dist/web/assets/OverviewPage-C2ao6sX6.css +0 -1
- package/dist/web/assets/PersonalProfilePage-KJvkIuAm.css +0 -1
- package/dist/web/assets/PopperContent-DgnpW6vB.js +0 -1
- package/dist/web/assets/Presence-Bn4pKveC.js +0 -3
- package/dist/web/assets/ProjectAgentDetailPage-BSBpu2sZ.css +0 -1
- package/dist/web/assets/ProjectAgentDetailPage-CH57mPoo.js +0 -8
- package/dist/web/assets/ProjectAgentFirstTask-CLQFOwXi.js +0 -1
- package/dist/web/assets/RadioGroupItem-CZvh557X.js +0 -1
- package/dist/web/assets/RoundtablesPage-CxjA1cGF.css +0 -1
- package/dist/web/assets/RoundtablesPage-D0LICyzx.js +0 -1
- package/dist/web/assets/RovingFocusGroup-CKuSV66n.js +0 -1
- package/dist/web/assets/RovingFocusItem-D6DzRzcZ.js +0 -1
- package/dist/web/assets/SessionMigrationPage-CEP1Mr9n.js +0 -1
- package/dist/web/assets/SettingsPage-BtJ3O9ZH.js +0 -1
- package/dist/web/assets/SharedJefaReportPage-2VMoiCJj.js +0 -1
- package/dist/web/assets/SharedJefaReportPage-CcD-06mK.css +0 -1
- package/dist/web/assets/TabsContent-vZY5Gjt-.js +0 -1
- package/dist/web/assets/TabsTrigger-Dhi51wTn.js +0 -1
- package/dist/web/assets/TagVocabularyPage-CLe5HBs6.js +0 -1
- package/dist/web/assets/TaskBlockerNotice-CIVFwBgZ.css +0 -1
- package/dist/web/assets/TaskBlockerNotice-DgJBUFNl.js +0 -1
- package/dist/web/assets/Teleport-ByKM5w1b.js +0 -1
- package/dist/web/assets/Textarea-Ca7nOquD.js +0 -1
- package/dist/web/assets/UiIcon-DOwSNz_e.js +0 -1
- package/dist/web/assets/UiSelect-CiSPw-7k.css +0 -1
- package/dist/web/assets/UiWeight-aUNtanHz.css +0 -1
- package/dist/web/assets/VirtualDirectoryList-BpYcDx5H.js +0 -1
- package/dist/web/assets/VirtualDirectoryList-pgDELOEf.css +0 -1
- package/dist/web/assets/VisuallyHiddenInput-BEz-QHu_.js +0 -1
- package/dist/web/assets/_plugin-vue_export-helper-C98j5XpL.js +0 -10
- package/dist/web/assets/accordion-BqNFYBeR.js +0 -1
- package/dist/web/assets/agent-profile-DSeJwkEw.css +0 -1
- package/dist/web/assets/agent-profile.css_vue_type_style_index_0_src_true_lang-cZYEJ_8z.js +0 -1
- package/dist/web/assets/checkbox-BIMU57_g.js +0 -1
- package/dist/web/assets/dialog-DFkjUY8h.js +0 -1
- package/dist/web/assets/dropdown-menu-BF3zRtMG.js +0 -1
- package/dist/web/assets/field-CG5pHJks.js +0 -1
- package/dist/web/assets/index-Di5_eD7U.js +0 -2
- package/dist/web/assets/index-Dktlia0_.css +0 -1
- package/dist/web/assets/model-DRuw3_ym.js +0 -1
- package/dist/web/assets/project-team-api-CBnMg8k5.js +0 -1
- package/dist/web/assets/select-C369n9Ru.js +0 -1
- package/dist/web/assets/shared-report-DO2Khr8D.js +0 -3
- package/dist/web/assets/task-labels-BRZad3HE.js +0 -1
- package/dist/web/assets/ui-CRfyX0ED.css +0 -1
- package/dist/web/assets/ui-DieLnn9C.js +0 -1
- package/dist/web/assets/useDirection-BGtNSPCf.js +0 -1
- package/dist/web/assets/utils-DDDNAHy1.js +0 -1
|
@@ -2,7 +2,8 @@ import { randomUUID } from 'node:crypto';
|
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
3
|
import { mkdir, readFile, rm } from 'node:fs/promises';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
|
-
import {
|
|
5
|
+
import { exportGraphData } from '../backup/graph-backup.js';
|
|
6
|
+
import { createGraphBackupAdapter, managedGraphInstances } from '../backup/runtime-adapters.js';
|
|
6
7
|
import { localRuntimeControl } from '../cli/local-runtime-control.js';
|
|
7
8
|
import { isProcessAlive } from '../local-runtime/processes.js';
|
|
8
9
|
import { readJsonFile, writeJsonFileAtomic, writeTextFileAtomic } from '../storage/json-file.js';
|
|
@@ -11,6 +12,7 @@ import { assertManagedNeo4jHome, neo4jAssetFingerprint, acquireNeo4jLifecycleLoc
|
|
|
11
12
|
import { assertMacNativePortFree } from './macos-ports.js';
|
|
12
13
|
import { installNativeNeo4j } from './neo4j-install.js';
|
|
13
14
|
import { readNeo4jStoreFormats } from './neo4j-store-formats.js';
|
|
15
|
+
import { neo4jPatchUpgrade, neo4jUpgradeBackupPath } from './neo4j-version-policy.js';
|
|
14
16
|
import { createNativeGraphServices, requireReusableNativeRuntime, NATIVE_NEO4J_VERSION, NATIVE_NEO4J_URL, NATIVE_NEO4J_SHA256 } from './runtime.js';
|
|
15
17
|
|
|
16
18
|
export async function planNativeNeo4j({ paths, action }) {
|
|
@@ -19,17 +21,19 @@ export async function planNativeNeo4j({ paths, action }) {
|
|
|
19
21
|
const bytes = await readFile(paths.nativeRuntimeManifestPath);
|
|
20
22
|
const current = JSON.parse(bytes);
|
|
21
23
|
if (current.status !== 'ready' || current.mode !== 'native') throw new Error('Initialize the native runtime with fuli setup --runtime-mode native first.');
|
|
22
|
-
|
|
24
|
+
// Only an update moves to the pinned version; an older patch is upgraded after a graph backup.
|
|
25
|
+
const upgrade = neo4jPatchUpgrade(current.neo4jVersion, NATIVE_NEO4J_VERSION) && action === 'update';
|
|
23
26
|
await assertManagedNeo4jHome(paths, current.neo4jHome, current.neo4jVersion);
|
|
24
27
|
const fingerprint = await neo4jAssetFingerprint(current.neo4jHome);
|
|
25
28
|
if (current.neo4jAssetFingerprint && current.neo4jAssetFingerprint !== fingerprint) throw new Error('Current Neo4j asset integrity changed.');
|
|
26
29
|
if (action === 'rollback') {
|
|
27
30
|
const previous = current.previousNeo4jAsset;
|
|
28
|
-
|
|
31
|
+
// Going back to an older patch is refused and names the pre-upgrade backup.
|
|
32
|
+
if (!previous || neo4jPatchUpgrade(current.neo4jVersion, previous.version, { backup: previous.graphBackup })) throw new Error('No retained same-version Neo4j assets are available for rollback.');
|
|
29
33
|
await assertManagedNeo4jHome(paths, previous.home, previous.version);
|
|
30
34
|
if (await neo4jAssetFingerprint(previous.home) !== previous.fingerprint) throw new Error('Retained Neo4j asset integrity changed.');
|
|
31
35
|
}
|
|
32
|
-
return { action, neo4jVersion: current.neo4jVersion, currentHome: current.neo4jHome,
|
|
36
|
+
return { action, neo4jVersion: upgrade ? NATIVE_NEO4J_VERSION : current.neo4jVersion, upgrade, currentHome: current.neo4jHome,
|
|
33
37
|
previousHome: current.previousNeo4jAsset?.home ?? null, data: 'preserved', bytes, current, fingerprint };
|
|
34
38
|
}
|
|
35
39
|
|
|
@@ -42,6 +46,13 @@ export async function manageNativeNeo4j({ paths, action, env = process.env }, de
|
|
|
42
46
|
const service = descriptor => (dependencies.services ?? ((selected, options) => createNativeGraphServices({ paths, runtimeDescriptor: selected, ...options })))(descriptor, { env: operationEnv });
|
|
43
47
|
const stopped = dependencies.assertStopped ?? (state => assertStopped(paths, state));
|
|
44
48
|
const formats = dependencies.storeFormats ?? (descriptor => readNeo4jStoreFormats(paths, descriptor));
|
|
49
|
+
// `fuli graph export`'s mechanism, run with the stopped installed Neo4j inside
|
|
50
|
+
// this operation. The switch decides what starts afterwards, never the export.
|
|
51
|
+
const backup = dependencies.backupGraph ?? (async outputDir => {
|
|
52
|
+
const adapter = await createGraphBackupAdapter({ mode: 'native', paths,
|
|
53
|
+
createNativeServices: options => createNativeGraphServices({ ...options, env: operationEnv }) });
|
|
54
|
+
await exportGraphData({ outputDir, sourceMode: 'native', instances: adapter.instances, adapter: { ...adapter, start: async () => {} } });
|
|
55
|
+
});
|
|
45
56
|
let candidateRoot;
|
|
46
57
|
try {
|
|
47
58
|
const plan = await planNativeNeo4j({ paths, action });
|
|
@@ -61,7 +72,7 @@ export async function manageNativeNeo4j({ paths, action, env = process.env }, de
|
|
|
61
72
|
await (dependencies.install ?? installNativeNeo4j)({ paths: { ...paths, nativeRuntimeDir: candidateRoot }, home,
|
|
62
73
|
url: NATIVE_NEO4J_URL, sha256: NATIVE_NEO4J_SHA256 });
|
|
63
74
|
await assertManagedNeo4jHome(paths, home, NATIVE_NEO4J_VERSION);
|
|
64
|
-
target = { ...current, neo4jHome: home, neo4jAssetFingerprint: await neo4jAssetFingerprint(home) };
|
|
75
|
+
target = { ...current, neo4jVersion: NATIVE_NEO4J_VERSION, neo4jHome: home, neo4jAssetFingerprint: await neo4jAssetFingerprint(home) };
|
|
65
76
|
} else if (action === 'rollback') {
|
|
66
77
|
target = { ...current, neo4jHome: current.previousNeo4jAsset.home,
|
|
67
78
|
neo4jAssetFingerprint: current.previousNeo4jAsset.fingerprint };
|
|
@@ -70,9 +81,15 @@ export async function manageNativeNeo4j({ paths, action, env = process.env }, de
|
|
|
70
81
|
const stopResult = await runtime.stop({ env: operationEnv });
|
|
71
82
|
if (stopResult?.status !== 'stopped') throw new Error('Could not confirm the old runtime stopped; no assets were switched.');
|
|
72
83
|
await stopped(oldState);
|
|
73
|
-
let before;
|
|
74
|
-
try {
|
|
75
|
-
|
|
84
|
+
let before, graphBackup = null;
|
|
85
|
+
try {
|
|
86
|
+
before = await formats(current);
|
|
87
|
+
if (plan.upgrade) {
|
|
88
|
+
graphBackup = neo4jUpgradeBackupPath(paths.graphBackupDir, NATIVE_NEO4J_VERSION);
|
|
89
|
+
try { await backup(graphBackup); }
|
|
90
|
+
catch (error) { throw new Error('The graph backup before the Neo4j upgrade failed; no assets were switched.', { cause: error }); }
|
|
91
|
+
}
|
|
92
|
+
} catch (error) {
|
|
76
93
|
await lock.assertHeld(); await unchanged(paths.nativeRuntimeManifestPath, plan.bytes);
|
|
77
94
|
if (wasRunning) await runtime.start({ env: operationEnv });
|
|
78
95
|
else if (wasDatabaseRunning) await service(current).start({ providers: wasProviderRunning });
|
|
@@ -86,10 +103,14 @@ export async function manageNativeNeo4j({ paths, action, env = process.env }, de
|
|
|
86
103
|
await lock.assertHeld(); await unchanged(paths.nativeRuntimeManifestPath, plan.bytes);
|
|
87
104
|
if (await neo4jAssetFingerprint(current.neo4jHome) !== plan.fingerprint) throw new Error('Current Neo4j assets changed while stopping.');
|
|
88
105
|
if (action === 'uninstall') {
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
106
|
+
// After a patch upgrade the retained assets are of the older patch.
|
|
107
|
+
const assets = [{ home: current.neo4jHome, version: current.neo4jVersion }, current.previousNeo4jAsset].filter(Boolean);
|
|
108
|
+
const versions = [...new Set(assets.map(({ version }) => version))];
|
|
109
|
+
const defaultHomes = await Promise.all(versions.map(version =>
|
|
110
|
+
assertManagedNeo4jHome(paths, join(paths.nativeRuntimeDir, `neo4j-community-${version}`), version)));
|
|
111
|
+
const containers = new Set([...defaultHomes, ...await managedNeo4jContainers(paths, versions),
|
|
112
|
+
...assets.map(({ home }) => assetContainer(paths, home))]);
|
|
113
|
+
for (const { home, version } of assets) await assertManagedNeo4jHome(paths, home, version);
|
|
93
114
|
writeJsonFileAtomic(journal, { action, phase: 'removing-assets', previous: current });
|
|
94
115
|
writeJsonFileAtomic(paths.nativeRuntimeManifestPath, { ...current, status: 'uninstalled' });
|
|
95
116
|
const uninstalled = await readFile(paths.nativeRuntimeManifestPath);
|
|
@@ -98,7 +119,9 @@ export async function manageNativeNeo4j({ paths, action, env = process.env }, de
|
|
|
98
119
|
return { status: 'uninstalled', data: 'preserved' };
|
|
99
120
|
}
|
|
100
121
|
target.previousNeo4jAsset = { home: current.neo4jHome, version: current.neo4jVersion,
|
|
101
|
-
fingerprint: plan.fingerprint, storeFormats: before };
|
|
122
|
+
fingerprint: plan.fingerprint, storeFormats: before, ...(graphBackup ? { graphBackup } : {}) };
|
|
123
|
+
// After the newer Neo4j opened the store, the older one might not open it again.
|
|
124
|
+
const kept = graphBackup ? ` The graph backup taken before the upgrade is kept at ${graphBackup}.` : '';
|
|
102
125
|
const nextBytes = Buffer.from(`${JSON.stringify(target, null, 2)}\n`);
|
|
103
126
|
const targetServices = service(target);
|
|
104
127
|
writeJsonFileAtomic(journal, { action, phase: 'switching', previous: current, next: target, storeFormats: before });
|
|
@@ -123,16 +146,18 @@ export async function manageNativeNeo4j({ paths, action, env = process.env }, de
|
|
|
123
146
|
if (consoleStartAttempted && (await runtime.stop({ env: operationEnv }))?.status !== 'stopped') throw new Error('Candidate console could not be stopped.');
|
|
124
147
|
await targetServices.stopDatabases(); await stopped();
|
|
125
148
|
if (JSON.stringify(await formats(target)) !== JSON.stringify(before)) throw new Error('Neo4j storage format changed; unsafe rollback blocked.');
|
|
126
|
-
} catch (recoveryError) { throw new AggregateError([error, recoveryError], 'Neo4j rollback needs attention. The candidate was not replaced and recovery evidence was kept.'); }
|
|
127
|
-
if (await neo4jAssetFingerprint(current.neo4jHome) !== plan.fingerprint) throw new Error('Previous assets changed; recovery needs attention.');
|
|
149
|
+
} catch (recoveryError) { throw new AggregateError([error, recoveryError], 'Neo4j rollback needs attention. The candidate was not replaced and recovery evidence was kept.' + kept); }
|
|
150
|
+
if (await neo4jAssetFingerprint(current.neo4jHome) !== plan.fingerprint) throw new Error('Previous assets changed; recovery needs attention.' + kept);
|
|
128
151
|
if (switched) writeTextFileAtomic(paths.nativeRuntimeManifestPath, plan.bytes);
|
|
129
152
|
const old = service(current);
|
|
130
|
-
|
|
131
|
-
|
|
153
|
+
try {
|
|
154
|
+
await old.start({ providers: wasProviderRunning });
|
|
155
|
+
for (const instance of managedGraphInstances(paths)) await old.checkDatabaseHealth(instance);
|
|
156
|
+
} catch (restartError) { throw new AggregateError([error, restartError], 'Neo4j switch failed and the previous Neo4j did not start again; recovery evidence was kept.' + kept); }
|
|
132
157
|
if (wasRunning) await runtime.start({ env: operationEnv });
|
|
133
158
|
else if (!wasDatabaseRunning) await old.stopDatabases();
|
|
134
159
|
await rm(journal);
|
|
135
|
-
throw new Error('Neo4j switch failed; the previous assets were restored. Data was preserved.', { cause: error });
|
|
160
|
+
throw new Error('Neo4j switch failed; the previous assets were restored. Data was preserved.' + kept, { cause: error });
|
|
136
161
|
}
|
|
137
162
|
} finally { await lock.release(); }
|
|
138
163
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Which Neo4j version changes FULI makes without a separate data migration: an
|
|
2
|
+
// upward patch within one major.minor (5.26.0 → 5.26.28). Neo4j may raise a
|
|
3
|
+
// store's kernel version when it first opens it, so a change never goes down a
|
|
4
|
+
// patch: the older Neo4j might not open what the newer one left.
|
|
5
|
+
|
|
6
|
+
import { join } from 'node:path';
|
|
7
|
+
|
|
8
|
+
const VERSION = /^(\d+)\.(\d+)\.(\d+)$/;
|
|
9
|
+
|
|
10
|
+
// Where the graph backup before switching to Neo4j `version` goes. `fuli graph
|
|
11
|
+
// export` creates it with the installed Neo4j, before the newer one opens the store.
|
|
12
|
+
export function neo4jUpgradeBackupPath(graphBackupDir, version, now = new Date()) {
|
|
13
|
+
return join(graphBackupDir, `before-neo4j-${version}-${now.toISOString().replace(/[:.]/g, '-')}`);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// True when bundled is a newer patch of installed, false when they are equal.
|
|
17
|
+
// backup: where the graph backup from before the last upgrade is kept, named
|
|
18
|
+
// when a downgrade is refused.
|
|
19
|
+
export function neo4jPatchUpgrade(installed, bundled, { backup = null } = {}) {
|
|
20
|
+
if (installed === bundled) return false;
|
|
21
|
+
const [from, to] = [installed, bundled].map(version => VERSION.exec(version ?? '')?.slice(1).map(Number));
|
|
22
|
+
if (!from || !to || from[0] !== to[0] || from[1] !== to[1]) {
|
|
23
|
+
throw new Error(`Neo4j version ${installed} → ${bundled} changes the major or minor version; that needs a separate data migration. Nothing was changed.`);
|
|
24
|
+
}
|
|
25
|
+
if (to[2] > from[2]) return true;
|
|
26
|
+
throw new Error(`Neo4j version ${installed} → ${bundled} is a downgrade: ${installed} may have upgraded the graph store, and ${bundled} might not open it. Nothing was changed.`
|
|
27
|
+
+ (backup ? ` The graph backup taken before the upgrade is kept at ${backup}; restoring it discards graph changes made since then.` : ''));
|
|
28
|
+
}
|
|
@@ -6,8 +6,6 @@ import {
|
|
|
6
6
|
chmodSync,
|
|
7
7
|
closeSync,
|
|
8
8
|
existsSync,
|
|
9
|
-
mkdirSync,
|
|
10
|
-
openSync,
|
|
11
9
|
readFileSync,
|
|
12
10
|
unlinkSync
|
|
13
11
|
} from 'node:fs';
|
|
@@ -24,6 +22,7 @@ import { assertManagedNeo4jHome, withNativeAssetOperation } from './neo4j-asset-
|
|
|
24
22
|
import { assertMacNativePortFree, assertMacNativePortOwner } from './macos-ports.js';
|
|
25
23
|
import { resolveNativeJavaHome } from './java-runtime.js';
|
|
26
24
|
import { installNativeNeo4j } from './neo4j-install.js';
|
|
25
|
+
import { neo4jPatchUpgrade } from './neo4j-version-policy.js';
|
|
27
26
|
import { FULI_VERSION } from '../package-metadata.js';
|
|
28
27
|
import { compareSemanticVersions } from '../semantic-version.js';
|
|
29
28
|
import { readWindowsNativeBundle, resolveWindowsNativeBundle } from './windows-assets.js';
|
|
@@ -39,6 +38,7 @@ import {
|
|
|
39
38
|
readRuntimeSettings
|
|
40
39
|
} from '../system/runtime-settings.js';
|
|
41
40
|
import { nonEmptyText } from '../validation/values.js';
|
|
41
|
+
import { openChildProcessLog } from '../local-runtime/child-process-log.js';
|
|
42
42
|
import { isProcessAlive } from '../local-runtime/processes.js';
|
|
43
43
|
import { parseProviderEnv } from '../setup/provider-env.js';
|
|
44
44
|
|
|
@@ -452,9 +452,15 @@ async function ensureNativeRuntimeUnlocked(input, dependencies = {}) {
|
|
|
452
452
|
throw new Error('Native Graph Provider source fingerprint is invalid.');
|
|
453
453
|
}
|
|
454
454
|
const saved = deps.readManifest(input.paths.nativeRuntimeManifestPath);
|
|
455
|
+
// An older patch stays selected: only `fuli graph runtime update` upgrades it,
|
|
456
|
+
// after a graph backup. A newer or other-minor version is refused here.
|
|
457
|
+
const upgradePending = saved?.neo4jVersion ? neo4jPatchUpgrade(saved.neo4jVersion, NATIVE_NEO4J_VERSION) : false;
|
|
458
|
+
const neo4jVersion = upgradePending ? saved.neo4jVersion : NATIVE_NEO4J_VERSION;
|
|
459
|
+
const pendingUpgrade = () => new Error(`Native Neo4j version ${neo4jVersion} last opened this graph; this Fuli bundles ${NATIVE_NEO4J_VERSION}. Upgrade it with \`fuli graph runtime update\`, which backs up the graph first and needs the ${neo4jVersion} assets still installed.`);
|
|
460
|
+
if (upgradePending && (saved.status !== 'ready' || !saved.neo4jHome)) throw pendingUpgrade();
|
|
455
461
|
let neo4jHome = input.paths.nativeNeo4jHome;
|
|
456
|
-
if (saved?.status === 'ready' && saved.neo4jHome && saved.neo4jVersion ===
|
|
457
|
-
neo4jHome = await assertManagedNeo4jHome(input.paths, saved.neo4jHome,
|
|
462
|
+
if (saved?.status === 'ready' && saved.neo4jHome && saved.neo4jVersion === neo4jVersion) {
|
|
463
|
+
neo4jHome = await assertManagedNeo4jHome(input.paths, saved.neo4jHome, neo4jVersion);
|
|
458
464
|
}
|
|
459
465
|
const expected = {
|
|
460
466
|
...(saved?.previousNeo4jAsset ? { previousNeo4jAsset: saved.previousNeo4jAsset } : {}),
|
|
@@ -462,7 +468,7 @@ async function ensureNativeRuntimeUnlocked(input, dependencies = {}) {
|
|
|
462
468
|
version: MANIFEST_VERSION,
|
|
463
469
|
status: 'ready',
|
|
464
470
|
mode: 'native',
|
|
465
|
-
neo4jVersion
|
|
471
|
+
neo4jVersion,
|
|
466
472
|
providerVersion: `${FULI_VERSION}+native.${PROVIDER_RUNTIME_REVISION}`,
|
|
467
473
|
providerFingerprint,
|
|
468
474
|
javaHome,
|
|
@@ -470,14 +476,12 @@ async function ensureNativeRuntimeUnlocked(input, dependencies = {}) {
|
|
|
470
476
|
neo4jHome,
|
|
471
477
|
providerPython
|
|
472
478
|
};
|
|
473
|
-
if (saved?.neo4jVersion && saved.neo4jVersion !== NATIVE_NEO4J_VERSION) {
|
|
474
|
-
throw new Error('Native Neo4j version changes require an explicit data migration plan. Refusing implicit upgrade or downgrade.');
|
|
475
|
-
}
|
|
476
479
|
assertProviderUpgrade(saved?.providerVersion, expected.providerVersion, input.allowProviderDowngrade);
|
|
477
480
|
if (manifestReady(saved, expected, input.paths, deps.pathExists)) return saved;
|
|
478
481
|
|
|
479
482
|
deps.onProgress(input, `Installing native Neo4j ${NATIVE_NEO4J_VERSION}…`);
|
|
480
483
|
if (!neo4jReady(input.paths, deps.pathExists, neo4jHome)) {
|
|
484
|
+
if (upgradePending) throw pendingUpgrade();
|
|
481
485
|
await deps.installNeo4j({
|
|
482
486
|
paths: input.paths,
|
|
483
487
|
home: neo4jHome,
|
|
@@ -751,8 +755,7 @@ function spawnNativeDatabase(spec) {
|
|
|
751
755
|
}
|
|
752
756
|
unlinkSync(spec.pidPath);
|
|
753
757
|
}
|
|
754
|
-
|
|
755
|
-
const log = openSync(spec.logPath, 'a');
|
|
758
|
+
const log = openChildProcessLog(spec.logPath);
|
|
756
759
|
try {
|
|
757
760
|
const child = spawn(spec.command, spec.args, {
|
|
758
761
|
detached: true,
|
|
@@ -768,8 +771,7 @@ function spawnNativeDatabase(spec) {
|
|
|
768
771
|
}
|
|
769
772
|
|
|
770
773
|
function spawnNativeProvider(spec) {
|
|
771
|
-
|
|
772
|
-
const log = openSync(spec.logPath, 'a');
|
|
774
|
+
const log = openChildProcessLog(spec.logPath);
|
|
773
775
|
try {
|
|
774
776
|
const child = spawn(spec.python, [
|
|
775
777
|
'-m', 'uvicorn', 'fuli_graph.app:app',
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import { createHash } from 'node:crypto';
|
|
3
3
|
import { once } from 'node:events';
|
|
4
|
-
import { closeSync,
|
|
4
|
+
import { closeSync, readFileSync } from 'node:fs';
|
|
5
5
|
import { createConnection } from 'node:net';
|
|
6
6
|
import { basename, dirname, join, normalize, win32 } from 'node:path';
|
|
7
7
|
import { setTimeout as delay } from 'node:timers/promises';
|
|
8
8
|
|
|
9
|
+
import { openChildProcessLog } from '../local-runtime/child-process-log.js';
|
|
9
10
|
import { execute, OWNED_PROCESS_TYPE, powershell } from '../local-runtime/windows-process-handle.js';
|
|
10
11
|
|
|
11
12
|
const samePath = (left, right) => typeof left === 'string' && typeof right === 'string'
|
|
@@ -148,8 +149,7 @@ export async function stopWindowsNativeProcess(pid, entry, { timeoutMs } = {}) {
|
|
|
148
149
|
}
|
|
149
150
|
|
|
150
151
|
async function spawnOwned(command, args, environment, logPath, { provider = false } = {}) {
|
|
151
|
-
|
|
152
|
-
const log = openSync(logPath, 'a');
|
|
152
|
+
const log = openChildProcessLog(logPath);
|
|
153
153
|
let child;
|
|
154
154
|
try {
|
|
155
155
|
child = spawn(command, args, { detached: true, windowsHide: true,
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
// and writes its digest here before publishing (scripts/pin-win-helper.js); a
|
|
4
4
|
// source checkout has no helper and no pin, so Windows Hello is unavailable there.
|
|
5
5
|
// The helper is not Authenticode-signed: this digest is its only integrity check.
|
|
6
|
-
export const WIN_HELPER_SHA256 = '
|
|
6
|
+
export const WIN_HELPER_SHA256 = '96b0367a0d1e1e1c6300f792e574057f13f1697239d030744404fb6d8b261229';
|
package/src/server.js
CHANGED
|
@@ -34,6 +34,7 @@ import { knowledgeHardDelete as createKnowledgeHardDelete } from './knowledge-ha
|
|
|
34
34
|
import { createKnowledgeRecoveryCheck } from './knowledge-hard-delete/recovery-check.js';
|
|
35
35
|
import { knowledgeScopeConsole as createKnowledgeScopeConsole } from './knowledge-scope/console-port.js';
|
|
36
36
|
import { projectHierarchyConsole as createProjectHierarchyConsole } from './project-hierarchy/console-port.js';
|
|
37
|
+
import { taskBlockerConsole as createTaskBlockerConsole } from './task-blockers/console-port.js';
|
|
37
38
|
import { knowledgeOwnerReads as createKnowledgeOwnerReads } from './knowledge-owner-reads/console-port.js';
|
|
38
39
|
import { reviewUndoConsole } from './judgment/review-undo.js';
|
|
39
40
|
import { knowledgeTagsConsole as createKnowledgeTagsConsole } from './knowledge-tags/console-port.js';
|
|
@@ -109,6 +110,9 @@ export async function createServer(options = {}) {
|
|
|
109
110
|
// A person's move of a project in their hierarchy (调整层级), console only.
|
|
110
111
|
const projectHierarchy = options.projectHierarchy ?? (localOptions.runtimeConfigPath
|
|
111
112
|
? createProjectHierarchyConsole(dirname(localOptions.runtimeConfigPath)) : null);
|
|
113
|
+
// A person's 「标记为已解除」 of a blocked task, console only.
|
|
114
|
+
const taskBlockers = options.taskBlockers ?? (localOptions.runtimeConfigPath
|
|
115
|
+
? createTaskBlockerConsole(dirname(localOptions.runtimeConfigPath)) : null);
|
|
112
116
|
// The person's full knowledge reads, every FLA's included (console only).
|
|
113
117
|
const knowledgeOwnerReads = options.knowledgeOwnerReads ?? (localOptions.runtimeConfigPath
|
|
114
118
|
? createKnowledgeOwnerReads(dirname(localOptions.runtimeConfigPath)) : null);
|
|
@@ -225,6 +229,7 @@ export async function createServer(options = {}) {
|
|
|
225
229
|
knowledgeHardDelete,
|
|
226
230
|
knowledgeScope,
|
|
227
231
|
projectHierarchy,
|
|
232
|
+
taskBlockers,
|
|
228
233
|
knowledgeOwnerReads,
|
|
229
234
|
knowledgeTags,
|
|
230
235
|
modelRoleSettings,
|
|
@@ -324,6 +329,7 @@ async function handleRequest({
|
|
|
324
329
|
knowledgeHardDelete,
|
|
325
330
|
knowledgeScope,
|
|
326
331
|
projectHierarchy,
|
|
332
|
+
taskBlockers,
|
|
327
333
|
knowledgeOwnerReads,
|
|
328
334
|
knowledgeTags,
|
|
329
335
|
modelRoleSettings,
|
|
@@ -360,6 +366,7 @@ async function handleRequest({
|
|
|
360
366
|
knowledgeHardDelete,
|
|
361
367
|
knowledgeScope,
|
|
362
368
|
projectHierarchy,
|
|
369
|
+
taskBlockers,
|
|
363
370
|
knowledgeOwnerReads,
|
|
364
371
|
knowledgeTags,
|
|
365
372
|
modelRoleSettings,
|
|
@@ -5,13 +5,12 @@ import {
|
|
|
5
5
|
closeSync,
|
|
6
6
|
existsSync,
|
|
7
7
|
mkdirSync,
|
|
8
|
-
openSync,
|
|
9
8
|
readFileSync,
|
|
10
9
|
writeFileSync
|
|
11
10
|
} from 'node:fs';
|
|
12
|
-
import { dirname } from 'node:path';
|
|
13
11
|
import { setTimeout as delay } from 'node:timers/promises';
|
|
14
12
|
|
|
13
|
+
import { openChildProcessLog } from '../local-runtime/child-process-log.js';
|
|
15
14
|
import {
|
|
16
15
|
ensureContainerRuntime,
|
|
17
16
|
runDockerCompose
|
|
@@ -51,6 +50,7 @@ import {
|
|
|
51
50
|
writeAdaptiveRuntimeState
|
|
52
51
|
} from '../adaptive-runtime/state.js';
|
|
53
52
|
import { nonEmptyText } from '../validation/values.js';
|
|
53
|
+
import { reservedPortProblem } from '../system/reserved-ports.js';
|
|
54
54
|
|
|
55
55
|
export {
|
|
56
56
|
dockerInfoIndicatesDaemon,
|
|
@@ -234,7 +234,8 @@ export async function ensureGraphRuntime(input, dependencies = {}) {
|
|
|
234
234
|
throw new Error(consoleStartFailure(consoleStart, {
|
|
235
235
|
url,
|
|
236
236
|
providerUrls: input.personalOnly ? [urls.personal] : [urls.personal, urls.workspace],
|
|
237
|
-
logPath: input.paths.logPath
|
|
237
|
+
logPath: input.paths.logPath,
|
|
238
|
+
portProblem: await deps.consolePortProblem(runtimeSettings.ports.console, lan ? '0.0.0.0' : '127.0.0.1')
|
|
238
239
|
}));
|
|
239
240
|
}
|
|
240
241
|
const state = {
|
|
@@ -501,11 +502,12 @@ function waitForWeb(url, pid, deps) {
|
|
|
501
502
|
|
|
502
503
|
// By now Neo4j and the Provider run and the graph is set up; only the console
|
|
503
504
|
// failed. Say so, so a person neither assumes nothing started nor loses track of it.
|
|
504
|
-
|
|
505
|
+
// A port Windows reserves is named first: retrying on the same port cannot help.
|
|
506
|
+
function consoleStartFailure(outcome, { url, providerUrls, logPath, portProblem }) {
|
|
505
507
|
const problem = outcome === 'timed_out'
|
|
506
508
|
? `The Fuli console did not answer at ${url} within ${CONSOLE_READY_TIMEOUT_MS / 1000} s, so it was stopped.`
|
|
507
509
|
: 'The Fuli console exited while starting.';
|
|
508
|
-
return `${problem} Neo4j and the graph Provider are already running (${providerUrls.join(', ')}) ` +
|
|
510
|
+
return `${portProblem ? `${portProblem} ` : ''}${problem} Neo4j and the graph Provider are already running (${providerUrls.join(', ')}) ` +
|
|
509
511
|
`and your data is kept. The console's output is in ${logPath}. ` +
|
|
510
512
|
'Run the same command again to retry, or run `fuli stop` to stop the graph services.';
|
|
511
513
|
}
|
|
@@ -542,8 +544,7 @@ export async function stopGraphProviders(paths, envPath, options = {}) {
|
|
|
542
544
|
}
|
|
543
545
|
|
|
544
546
|
function spawnWebRuntime(input) {
|
|
545
|
-
|
|
546
|
-
const log = openSync(input.paths.logPath, 'a');
|
|
547
|
+
const log = openChildProcessLog(input.paths.logPath);
|
|
547
548
|
try {
|
|
548
549
|
const args = [
|
|
549
550
|
input.paths.serverPath,
|
|
@@ -595,6 +596,7 @@ function graphDependencies(overrides) {
|
|
|
595
596
|
isProcessAlive,
|
|
596
597
|
stopProcess,
|
|
597
598
|
webHealth: checkLocalConsoleHealth,
|
|
599
|
+
consolePortProblem: (port, host) => reservedPortProblem(port, { host }),
|
|
598
600
|
consoleVersion: readLocalConsoleVersion,
|
|
599
601
|
discoverLanAddresses,
|
|
600
602
|
createLanAccessToken: secret,
|
package/src/setup/paths.js
CHANGED
|
@@ -33,6 +33,7 @@ export function resolveSetupPaths({
|
|
|
33
33
|
adaptiveRuntimeSettingsPath: join(resolvedDataDir, 'adaptive-runtime-settings.json'),
|
|
34
34
|
adaptiveRuntimeStatePath: join(resolvedDataDir, 'adaptive-runtime-state.json'),
|
|
35
35
|
runtimeSettingsPath: join(resolvedDataDir, 'runtime-settings.json'),
|
|
36
|
+
runtimeSettingsBackupDir: join(resolvedDataDir, 'backups', 'settings'),
|
|
36
37
|
modelBackendConfigPath: join(resolvedDataDir, 'model-backends.json'),
|
|
37
38
|
modelSecretStorePath: join(resolvedDataDir, 'model-secrets.json'),
|
|
38
39
|
modelUsageLedgerPath: join(resolvedDataDir, 'model-usage.sqlite'),
|
|
@@ -69,7 +70,7 @@ export function resolveSetupPaths({
|
|
|
69
70
|
),
|
|
70
71
|
backupDir: join(resolvedDataDir, 'backups', 'agents'),
|
|
71
72
|
agentDirectoryRoot: join(resolvedDataDir, 'agents'),
|
|
72
|
-
graphBackupDir:
|
|
73
|
+
graphBackupDir: graphBackupDirectory(resolvedDataDir),
|
|
73
74
|
logPath: join(resolvedDataDir, 'logs', 'runtime.log'),
|
|
74
75
|
serverPath: join(root, 'src', 'server.js'),
|
|
75
76
|
mcpServerPath: join(root, 'src', 'mcp-server.js'),
|
|
@@ -83,6 +84,11 @@ export function resolveSetupPaths({
|
|
|
83
84
|
};
|
|
84
85
|
}
|
|
85
86
|
|
|
87
|
+
// Where `fuli graph export` backups of a data directory are kept.
|
|
88
|
+
export function graphBackupDirectory(dataDir) {
|
|
89
|
+
return join(dataDir, 'backups', 'graph');
|
|
90
|
+
}
|
|
91
|
+
|
|
86
92
|
function defaultDataDir({ platform, env, homeDir }) {
|
|
87
93
|
if (platform === 'win32') {
|
|
88
94
|
return join(nonEmpty(env.LOCALAPPDATA) ?? join(homeDir, 'AppData', 'Local'), 'Fuli');
|
package/src/setup/setup.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { installAgent } from './install-agent.js';
|
|
2
2
|
import { backupAgentConfig } from './config-backup.js';
|
|
3
|
+
import { existsSync } from 'node:fs';
|
|
3
4
|
import { totalmem } from 'node:os';
|
|
4
5
|
import { inspectAgentInstallations } from './agent-installation-status.js';
|
|
5
6
|
import { connectAgent, discoverAgents } from './agents.js';
|
|
@@ -13,6 +14,7 @@ import {
|
|
|
13
14
|
readRuntimeSettings,
|
|
14
15
|
runtimeSettingsWithOverrides
|
|
15
16
|
} from '../system/runtime-settings.js';
|
|
17
|
+
import { readReservedPortRanges, withoutReservedPorts } from '../system/reserved-ports.js';
|
|
16
18
|
import {
|
|
17
19
|
DEFAULT_ADAPTIVE_RUNTIME_SETTINGS,
|
|
18
20
|
adaptiveRuntimeSettingsWithOverrides,
|
|
@@ -26,6 +28,8 @@ export function planLocalSetup(options, {
|
|
|
26
28
|
inspectInstallations = inspectAgentInstallations,
|
|
27
29
|
readSettings = readRuntimeSettings,
|
|
28
30
|
readAdaptiveSettings = readAdaptiveRuntimeSettings,
|
|
31
|
+
settingsExist = existsSync,
|
|
32
|
+
readReservedRanges = readReservedPortRanges,
|
|
29
33
|
platform = process.platform,
|
|
30
34
|
hostTotalMemory = totalmem,
|
|
31
35
|
nodePath = process.execPath
|
|
@@ -34,10 +38,16 @@ export function planLocalSetup(options, {
|
|
|
34
38
|
const savedRuntimeSettings = paths.runtimeSettingsPath
|
|
35
39
|
? readSettings(paths.runtimeSettingsPath)
|
|
36
40
|
: DEFAULT_RUNTIME_SETTINGS;
|
|
37
|
-
const
|
|
41
|
+
const requestedSettings = runtimeSettingsWithOverrides(savedRuntimeSettings, {
|
|
38
42
|
consolePort: options.port,
|
|
39
43
|
graphRuntimeMode: options.runtimeMode
|
|
40
44
|
});
|
|
45
|
+
// A first setup on Windows keeps clear of the port ranges the system reserves
|
|
46
|
+
// now; saved settings and a port the person chose are kept as they are.
|
|
47
|
+
const firstSetup = !(paths.runtimeSettingsPath && settingsExist(paths.runtimeSettingsPath));
|
|
48
|
+
const runtimeSettings = firstSetup && options.port === null
|
|
49
|
+
? { ...requestedSettings, ports: withoutReservedPorts(requestedSettings.ports, readReservedRanges({ platform })) }
|
|
50
|
+
: requestedSettings;
|
|
41
51
|
const savedAdaptiveRuntimeSettings = paths.adaptiveRuntimeSettingsPath
|
|
42
52
|
? readAdaptiveSettings(paths.adaptiveRuntimeSettingsPath)
|
|
43
53
|
: DEFAULT_ADAPTIVE_RUNTIME_SETTINGS;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { chmodSync, copyFileSync, existsSync, mkdirSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
firstOpenPortNear,
|
|
6
|
+
portRefusal,
|
|
7
|
+
readReservedPortRanges,
|
|
8
|
+
withoutReservedPorts
|
|
9
|
+
} from './reserved-ports.js';
|
|
10
|
+
import { DEFAULT_RUNTIME_SETTINGS, readRuntimeSettings, writeRuntimeSettings } from './runtime-settings.js';
|
|
11
|
+
|
|
12
|
+
// Moves the console to a port near the default that Windows does not reserve
|
|
13
|
+
// and nothing listens on, and any other FULI port out of a reserved range.
|
|
14
|
+
// The previous settings file is copied first; the caller restarts FULI.
|
|
15
|
+
export async function switchConsolePort(paths, {
|
|
16
|
+
platform = process.platform,
|
|
17
|
+
readRanges = readReservedPortRanges,
|
|
18
|
+
probe = portRefusal,
|
|
19
|
+
now = () => new Date()
|
|
20
|
+
} = {}) {
|
|
21
|
+
const current = readRuntimeSettings(paths.runtimeSettingsPath);
|
|
22
|
+
const ranges = readRanges({ platform });
|
|
23
|
+
const ports = withoutReservedPorts(current.ports, ranges);
|
|
24
|
+
const taken = new Set([current.ports.console,
|
|
25
|
+
...Object.entries(ports).filter(([key]) => key !== 'console').map(([, port]) => port)]);
|
|
26
|
+
ports.console = await firstOpenPortNear(DEFAULT_RUNTIME_SETTINGS.ports.console, {
|
|
27
|
+
ranges, taken, probe, host: current.lanAccess ? '0.0.0.0' : '127.0.0.1'
|
|
28
|
+
});
|
|
29
|
+
const backupPath = backupRuntimeSettings(paths, now());
|
|
30
|
+
writeRuntimeSettings(paths.runtimeSettingsPath, { ...current, ports });
|
|
31
|
+
return { previousPort: current.ports.console, port: ports.console, backupPath };
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function backupRuntimeSettings(paths, at) {
|
|
35
|
+
if (!existsSync(paths.runtimeSettingsPath)) return null;
|
|
36
|
+
mkdirSync(paths.runtimeSettingsBackupDir, { recursive: true, mode: 0o700 });
|
|
37
|
+
const stamp = at.toISOString().replaceAll(':', '-').replaceAll('.', '-');
|
|
38
|
+
const backupPath = join(paths.runtimeSettingsBackupDir, `runtime-settings-${stamp}.json`);
|
|
39
|
+
copyFileSync(paths.runtimeSettingsPath, backupPath);
|
|
40
|
+
chmodSync(backupPath, 0o600);
|
|
41
|
+
return backupPath;
|
|
42
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
import { createServer } from 'node:net';
|
|
3
|
+
|
|
4
|
+
import { isFetchBlockedPort } from '../server/blocked-ports.js';
|
|
5
|
+
import { PORT_KEYS } from './runtime-settings.js';
|
|
6
|
+
|
|
7
|
+
// Hyper-V, WSL and winnat reserve TCP port ranges on Windows, and the ranges
|
|
8
|
+
// change between boots. Listening inside one fails with EACCES. FULI only
|
|
9
|
+
// reads them with this `show` command; it never adds or deletes a range.
|
|
10
|
+
const NETSH_ARGS = Object.freeze(['interface', 'ipv4', 'show', 'excludedportrange', 'protocol=tcp']);
|
|
11
|
+
const NETSH_TIMEOUT_MS = 5_000;
|
|
12
|
+
const LOWEST_CHOSEN_PORT = 1024;
|
|
13
|
+
const HIGHEST_PORT = 65_535;
|
|
14
|
+
// How far from the preferred port a replacement is looked for, each way.
|
|
15
|
+
const SEARCH_SPAN = 2_000;
|
|
16
|
+
|
|
17
|
+
export function readReservedPortRanges({ platform = process.platform, runNetsh = netshExcludedRanges } = {}) {
|
|
18
|
+
if (platform !== 'win32') return [];
|
|
19
|
+
let output;
|
|
20
|
+
try { output = runNetsh(); } catch { return []; }
|
|
21
|
+
return parseExcludedPortRanges(output);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// The table's headers are localized; its rows are two port numbers, with a
|
|
25
|
+
// trailing * for ranges an administrator added.
|
|
26
|
+
function parseExcludedPortRanges(output) {
|
|
27
|
+
const ranges = [];
|
|
28
|
+
for (const line of String(output).split(/\r?\n/)) {
|
|
29
|
+
const row = /^\s*(\d{1,5})\s+(\d{1,5})\s*\*?\s*$/.exec(line);
|
|
30
|
+
if (!row) continue;
|
|
31
|
+
const start = Number(row[1]);
|
|
32
|
+
const end = Number(row[2]);
|
|
33
|
+
if (start >= 1 && start <= end && end <= HIGHEST_PORT) ranges.push({ start, end });
|
|
34
|
+
}
|
|
35
|
+
return ranges;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function netshExcludedRanges() {
|
|
39
|
+
return execFileSync('netsh', NETSH_ARGS, { encoding: 'utf8', windowsHide: true, timeout: NETSH_TIMEOUT_MS });
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function reservedRange(port, ranges) {
|
|
43
|
+
return ranges.find(({ start, end }) => port >= start && port <= end) ?? null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Ports nearest to `preferred` first, skipping reserved, taken and
|
|
47
|
+
// browser-blocked ports.
|
|
48
|
+
function* portsNear(preferred, { ranges, taken }) {
|
|
49
|
+
for (let offset = 0; offset <= SEARCH_SPAN; offset += 1) {
|
|
50
|
+
for (const port of offset === 0 ? [preferred] : [preferred + offset, preferred - offset]) {
|
|
51
|
+
if (port < LOWEST_CHOSEN_PORT || port > HIGHEST_PORT) continue;
|
|
52
|
+
if (taken.has(port) || reservedRange(port, ranges) || isFetchBlockedPort(port)) continue;
|
|
53
|
+
yield port;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function noPortFound(preferred) {
|
|
59
|
+
return new Error(`在 ${preferred} 附近找不到可用端口。 / No usable port was found near ${preferred}.`);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Moves every FULI port that falls in a reserved range to the nearest free
|
|
63
|
+
// one; the others keep their value.
|
|
64
|
+
export function withoutReservedPorts(ports, ranges) {
|
|
65
|
+
const result = { ...ports };
|
|
66
|
+
for (const key of PORT_KEYS) {
|
|
67
|
+
if (!reservedRange(result[key], ranges)) continue;
|
|
68
|
+
const replacement = portsNear(result[key], { ranges, taken: new Set(Object.values(result)) }).next();
|
|
69
|
+
if (replacement.done) throw noPortFound(result[key]);
|
|
70
|
+
result[key] = replacement.value;
|
|
71
|
+
}
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// The nearest port to `preferred` that is not reserved, not taken and that
|
|
76
|
+
// `probe` can listen on right now.
|
|
77
|
+
export async function firstOpenPortNear(preferred, { ranges, taken, host, probe = portRefusal }) {
|
|
78
|
+
for (const port of portsNear(preferred, { ranges, taken })) {
|
|
79
|
+
if (await probe(port, host) === null) return port;
|
|
80
|
+
}
|
|
81
|
+
throw noPortFound(preferred);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// null when the port can be listened on, otherwise the listen error code.
|
|
85
|
+
export function portRefusal(port, host = '127.0.0.1') {
|
|
86
|
+
return new Promise((resolve) => {
|
|
87
|
+
const server = createServer();
|
|
88
|
+
server.once('error', (error) => resolve(error.code ?? 'unavailable'));
|
|
89
|
+
server.listen(port, host, () => server.close(() => resolve(null)));
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Why Windows will not let FULI listen on `port`, in Chinese and English, or
|
|
94
|
+
// null when the cause is not a Windows reservation. Other systems: always null.
|
|
95
|
+
export async function reservedPortProblem(port, {
|
|
96
|
+
host = '127.0.0.1',
|
|
97
|
+
platform = process.platform,
|
|
98
|
+
readRanges = readReservedPortRanges,
|
|
99
|
+
probe = portRefusal
|
|
100
|
+
} = {}) {
|
|
101
|
+
if (platform !== 'win32') return null;
|
|
102
|
+
const range = reservedRange(port, readRanges({ platform }));
|
|
103
|
+
if (range) {
|
|
104
|
+
return `端口 ${port} 被 Windows 保留(${range.start}–${range.end}),换一个端口即可。` +
|
|
105
|
+
` / Port ${port} is reserved by Windows (${range.start}–${range.end}); use another port.`;
|
|
106
|
+
}
|
|
107
|
+
return await probe(port, host) === 'EACCES'
|
|
108
|
+
? `Windows 拒绝 FULI 使用端口 ${port}(通常是系统保留),换一个端口即可。` +
|
|
109
|
+
` / Windows refused port ${port} (usually a system reservation); use another port.`
|
|
110
|
+
: null;
|
|
111
|
+
}
|