fuli-context 0.22.1 → 0.23.0-beta.2
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-CRIF2M8n.js +1 -0
- package/dist/web/assets/AgentHand-Dp9TFS4q.js +1 -0
- package/dist/web/assets/AgentMentionCopy-BXOrsEWh.css +1 -0
- package/dist/web/assets/AgentMentionCopy-C7N92Shm.js +1 -0
- package/dist/web/assets/AgentName-CbsQ9vDy.js +1 -0
- package/dist/web/assets/{AgentProfilePage-MkP7Lgo6.css → AgentProfilePage-B_V-Dm8v.css} +1 -1
- package/dist/web/assets/AgentProfilePage-DOpq0b3j.js +2 -0
- package/dist/web/assets/AgentServicesPage-Dr9WU0f9.js +1 -0
- package/dist/web/assets/AgentWorkbench-CMoeT-BY.css +1 -0
- package/dist/web/assets/AgentWorkbench-DTWZFf1A.js +2 -0
- package/dist/web/assets/AgentsDirectoryPage-CxDOdNxT.js +1 -0
- package/dist/web/assets/{AgentsDirectoryPage-Cq1z926q.css → AgentsDirectoryPage-DjEfG9dC.css} +1 -1
- package/dist/web/assets/BackLink-ByRr21Sw.js +1 -0
- package/dist/web/assets/BoardMoveMenu-Bd1T62eA.js +1 -0
- package/dist/web/assets/CaptureChangePage-DyuSSSDE.js +1 -0
- package/dist/web/assets/Card-BD5ohuk8.js +1 -0
- package/dist/web/assets/CardHeader-DTVqXpsf.js +1 -0
- package/dist/web/assets/CardTitle-C5REIVlp.js +1 -0
- package/dist/web/assets/ConnectionsPage-CKruAjBF.js +1 -0
- package/dist/web/assets/CreateProjectDialog-D6JS3RtH.js +2 -0
- package/dist/web/assets/DataFormatPage-DNaogYjf.js +2 -0
- package/dist/web/assets/DialogFooter-C5AIwQ5R.js +1 -0
- package/dist/web/assets/EmployeeScopeDialog-Lmfos9SA.js +1 -0
- package/dist/web/assets/EmployeeTaskBoard-U3KmfQG3.js +3 -0
- package/dist/web/assets/EmployeeWorkbenchPage-O9DEMzLT.js +3 -0
- package/dist/web/assets/FieldDescription-_fuW5MBO.js +1 -0
- package/dist/web/assets/GrowthLoading--m-lSUeo.js +1 -0
- package/dist/web/assets/InboxPage-DmJfYzaK.js +4 -0
- package/dist/web/assets/Input-DqjML-Qy.js +1 -0
- package/dist/web/assets/KnowledgeHardDeleteSection-AFg1ybWc.js +1 -0
- package/dist/web/assets/KnowledgeItemEditPage-B29px-r0.js +1 -0
- package/dist/web/assets/KnowledgeItemSummaryCard-BhHet9HU.js +1 -0
- package/dist/web/assets/KnowledgeOrganizerPage-BfD42JmC.js +1 -0
- package/dist/web/assets/KnowledgePage-nbTejsvV.js +1 -0
- package/dist/web/assets/KnowledgePeek-ByakOiOO.js +2 -0
- package/dist/web/assets/{KnowledgePeek-DdxwAWYs.css → KnowledgePeek-CK2RKeRx.css} +1 -1
- package/dist/web/assets/KnowledgeTurnReceiptPage-B1fMTy2W.js +1 -0
- package/dist/web/assets/KnowledgeWorkspace-DCzwenHE.js +4 -0
- package/dist/web/assets/{KnowledgeWorkspace-CA8oxVht.css → KnowledgeWorkspace-j8xlGwtg.css} +1 -1
- package/dist/web/assets/Label-CufKLEgT.js +1 -0
- package/dist/web/assets/ModelSettingsPage-jQKn4MsB.js +1 -0
- package/dist/web/assets/NotFoundPage-B4KkZO2q.js +1 -0
- package/dist/web/assets/OccupationsPage-5Ja81Cfg.js +1 -0
- package/dist/web/assets/OverviewPage-C-K4KDNM.js +2 -0
- package/dist/web/assets/PersonalProfilePage-BVZ3WHmf.js +1 -0
- package/dist/web/assets/PersonalProjectsPage-C1J8Poj8.js +1 -0
- package/dist/web/assets/PopperContent-C-KMpRbF.js +1 -0
- package/dist/web/assets/Presence-B4aVQMT8.js +3 -0
- package/dist/web/assets/ProjectAgentDetailPage-B6bTOIhe.js +8 -0
- package/dist/web/assets/ProjectAgentDialog-CWuqScFD.js +5 -0
- package/dist/web/assets/ProjectAgentFirstTask-C7qzXCQ6.js +1 -0
- package/dist/web/assets/ProjectAgentsPage-BNtWbct5.js +1 -0
- package/dist/web/assets/ProjectAgentsPage-Bym-IM4-.css +1 -0
- package/dist/web/assets/ProjectJudgmentPolicy-L_plkldY.js +1 -0
- package/dist/web/assets/ProjectScopePicker-BXy07CHg.js +1 -0
- package/dist/web/assets/PublicProjectsPage-Cftk4zLX.js +1 -0
- package/dist/web/assets/RadioGroupItem-DoOqLMbZ.js +1 -0
- package/dist/web/assets/RoundtablesPage-RCtrPHxs.js +1 -0
- package/dist/web/assets/RovingFocusGroup-BeCLKMQA.js +1 -0
- package/dist/web/assets/RovingFocusItem-BN-h70s_.js +1 -0
- package/dist/web/assets/SessionMigrationPage-Dcjylswy.js +1 -0
- package/dist/web/assets/SessionRecordsPage-jrFse2a1.js +1 -0
- package/dist/web/assets/SettingsPage-BkHm8GV4.js +1 -0
- package/dist/web/assets/{SettingsPage-DpVeP2OZ.css → SettingsPage-BxAXf6EF.css} +1 -1
- package/dist/web/assets/SharedJefaReportPage-_KXsTVGF.js +1 -0
- package/dist/web/assets/Switch-BPAVVtqu.js +1 -0
- package/dist/web/assets/TableHeader-P9d7xF7t.js +1 -0
- package/dist/web/assets/TabsContent-Casnps6y.js +1 -0
- package/dist/web/assets/TabsTrigger-AQwqcZRn.js +1 -0
- package/dist/web/assets/TagVocabularyPage-CsDJkbU3.js +1 -0
- package/dist/web/assets/TaskBlockerClear-wqHV47Vx.js +1 -0
- package/dist/web/assets/TaskBlockerNotice-DJytDDst.js +1 -0
- package/dist/web/assets/TaskExecutionPlan-8dwc8_Jf.css +1 -0
- package/dist/web/assets/TaskExecutionPlan-BPnu-yfT.js +2 -0
- package/dist/web/assets/TaskReason-C5g8DpOy.js +1 -0
- package/dist/web/assets/Teleport-BV0XYmdS.js +1 -0
- package/dist/web/assets/TextField-C69MdaFy.js +1 -0
- package/dist/web/assets/Textarea-D1Kzx_7L.js +1 -0
- package/dist/web/assets/UiChip-BqOpp18Q.js +1 -0
- package/dist/web/assets/UiDialog-BAWkdfF-.js +1 -0
- package/dist/web/assets/UiDisclosure-mGmGItAv.js +1 -0
- package/dist/web/assets/UiIcon-BUYpKd4D.js +1 -0
- package/dist/web/assets/UiIconButton-CeiP7Vmj.js +1 -0
- package/dist/web/assets/UiNotice-BlznzX5i.js +1 -0
- package/dist/web/assets/UiSegmented-DlgYMxnc.js +1 -0
- package/dist/web/assets/UiSelect-BWViyott.js +1 -0
- package/dist/web/assets/UiWeight-DZwt7cIP.js +1 -0
- package/dist/web/assets/UnassignedConversationsPanel-DV2CpIdb.js +1 -0
- package/dist/web/assets/VirtualDirectoryList-D-3X_X7D.js +1 -0
- package/dist/web/assets/VisuallyHiddenInput-BjPsr2D4.js +1 -0
- package/dist/web/assets/Workbench3D-CVlnk7bc.js +2 -0
- package/dist/web/assets/_plugin-vue_export-helper-lED7mxHY.js +9 -0
- package/dist/web/assets/accordion-GR6gjqFY.js +1 -0
- package/dist/web/assets/agent-pins-D2cylMl0.js +1 -0
- package/dist/web/assets/{agent-profile.css_vue_type_style_index_0_src_true_lang-Cmz1y1IL.js → agent-profile.css_vue_type_style_index_0_src_true_lang-w5YilVWS.js} +1 -1
- package/dist/web/assets/{agent-roster-records-DVgD9i6q.js → agent-roster-records-DgWGHLHW.js} +1 -1
- package/dist/web/assets/agent-task-board-DCS97QK2.js +1 -0
- package/dist/web/assets/{agent-work-summary-CUMg6XKp.js → agent-work-summary-QPOQuybY.js} +1 -1
- package/dist/web/assets/{attach-closest-edge-BqQXNoAj.js → attach-closest-edge-B5hSH5Q1.js} +1 -1
- package/dist/web/assets/{attention-store-C0D-sZNV.js → attention-store-DKza0N1e.js} +1 -1
- package/dist/web/assets/badge-CG2m9xwC.js +1 -0
- package/dist/web/assets/button-CZBMEiSm.js +1 -0
- package/dist/web/assets/checkbox-3VSDPUJw.js +1 -0
- package/dist/web/assets/{client-BgxDxCVo.js → client-Dwnwq6uu.js} +1 -1
- package/dist/web/assets/{client-links-store-BoDDNO2M.js → client-links-store-DG6AhNPP.js} +1 -1
- package/dist/web/assets/console-ny5TvCWK.js +1 -0
- package/dist/web/assets/conversation-launcher-settings-Ds-piWNR.js +1 -0
- package/dist/web/assets/{design-lab-B-njEjVo.js → design-lab-DrVlcS2x.js} +1 -1
- package/dist/web/assets/dialog-C3x9ziBB.js +1 -0
- package/dist/web/assets/dist-CB11Zet2.js +1 -0
- package/dist/web/assets/dropdown-menu-Cdtg4lAd.js +1 -0
- package/dist/web/assets/field-DMSD3CwL.js +1 -0
- package/dist/web/assets/{identity-IcZw_zYG.js → identity-DI_OdSEg.js} +1 -1
- package/dist/web/assets/index-B5zVxSJb.css +1 -0
- package/dist/web/assets/index-S0AnueS1.js +2 -0
- package/dist/web/assets/is-equal-8VOV02sH.js +1 -0
- package/dist/web/assets/{judgment-api-ldtIv-Jc.js → judgment-api-CwnpLQOf.js} +1 -1
- package/dist/web/assets/label-table-vGnKmYm3.js +1 -0
- package/dist/web/assets/{model-DvzuuyNk.js → model-BOXKOC62.js} +1 -1
- package/dist/web/assets/{model-mDDN02UJ.js → model-BlAV3okF.js} +1 -1
- package/dist/web/assets/{model-D2VmKHYm.js → model-C7hgak_o.js} +1 -1
- package/dist/web/assets/{model-2gNC7xGH.js → model-CmYu_CSs.js} +1 -1
- package/dist/web/assets/{model-DL29Qg9K.js → model-DSSYQ-i_.js} +1 -1
- package/dist/web/assets/{model-DvwLThbs.js → model-kV1gs-y2.js} +1 -1
- package/dist/web/assets/{motion-preference-BquW2Vpx.js → motion-preference-fHFXX4cl.js} +1 -1
- package/dist/web/assets/{occupation-catalog-CwMNzUWJ.js → occupation-catalog-DOk8egq8.js} +1 -1
- package/dist/web/assets/{orchestration-filters-DhxYUaNx.js → orchestration-filters-BqUPBFf1.js} +1 -1
- package/dist/web/assets/page-title-D1CadCvf.js +1 -0
- package/dist/web/assets/profile-model-DGbpJdVC.js +1 -0
- package/dist/web/assets/{project-board-layout-LQu5EwBM.js → project-board-layout-Dtyrl2is.js} +1 -1
- package/dist/web/assets/project-board-settings-CNVNKEfm.js +1 -0
- package/dist/web/assets/{project-capture-DHvCDGGz.js → project-capture-BpaGUI-m.js} +1 -1
- package/dist/web/assets/{project-origin-DDVfUP1_.js → project-origin-DJ4d13mb.js} +1 -1
- package/dist/web/assets/project-team-api-yJVsib_j.js +1 -0
- package/dist/web/assets/{quick-edit-api-DPb69BlT.js → quick-edit-api-CBMbWX0d.js} +1 -1
- package/dist/web/assets/rolldown-runtime-4tVxZq34.js +1 -0
- package/dist/web/assets/runtime-dom.esm-bundler-ClO7ICIC.js +2 -0
- package/dist/web/assets/select-CCN-VOqx.js +1 -0
- package/dist/web/assets/shared-report-BRgNEV5m.js +1 -0
- package/dist/web/assets/source-adapters-8UHmhZTa.js +1 -0
- package/dist/web/assets/task-labels-pCGKthln.js +1 -0
- package/dist/web/assets/ui-Bfbk4_Xk.js +1 -0
- package/dist/web/assets/{useAgentRecords-D3upwp_U.js → useAgentRecords-DZPebmJ_.js} +1 -1
- package/dist/web/assets/useApi-CROJJdhE-CpF4ddpD.js +1 -0
- package/dist/web/assets/useDirection-DXu4lssv.js +1 -0
- package/dist/web/assets/useFocusReturn-DVcg2RDp.js +1 -0
- package/dist/web/assets/useForwardExpose-CNq5826B.js +1 -0
- package/dist/web/assets/useKnowledgeItemPeek-CxwXNZqm.js +1 -0
- package/dist/web/assets/useMinimumLoadingDisplay-SSJELjga.js +1 -0
- package/dist/web/assets/usePrimitiveElement-WBpNZTN_.js +1 -0
- package/dist/web/assets/useRoutePeek-U71ADWt0.js +1 -0
- package/dist/web/assets/{useTypeahead-C4mRUlUC.js → useTypeahead-CJkAiAa9.js} +1 -1
- package/dist/web/assets/utils-CfVEk15i.js +1 -0
- package/dist/web/assets/vue-router-BFTYTsOL.js +1 -0
- package/dist/web/index.html +46 -41
- package/docs/agent-conversations-and-collaboration.md +23 -9
- package/docs/agent-interface-architecture.md +25 -0
- package/docs/client-connections.md +47 -0
- package/docs/client-links.md +4 -0
- package/docs/employee-agents.md +1 -1
- package/graph-provider/fuli_graph/agent_conversation_models.py +2 -1
- package/graph-provider/fuli_graph/conversation_context.py +40 -90
- package/graph-provider/fuli_graph/store_agent_conversations.py +26 -15
- package/graph-provider/pyproject.toml +1 -1
- package/native/win32/fuli-win-helper.exe +0 -0
- package/npm-shrinkwrap.json +31 -31
- package/package.json +3 -3
- package/skills/capturing-session-knowledge/SKILL.md +7 -0
- package/skills/capturing-session-knowledge/references/coordination.md +4 -0
- package/skills/capturing-session-knowledge/references/retrieval.md +7 -0
- package/skills/operating-fuli/SKILL.md +3 -2
- package/skills/operating-fuli/references/workflow-recipes.md +4 -1
- package/src/agent-apps/host-tools/catalog.js +4 -0
- package/src/agent-kits/client-installer.js +29 -0
- package/src/agent-kits/derived-file.js +15 -0
- package/src/agent-kits/executable-download.js +53 -0
- package/src/agent-kits/executables.js +87 -0
- package/src/agent-kits/fuli-installer-manifest.json +125 -0
- package/src/agent-kits/installer-manifest.js +36 -0
- package/src/agent-kits/installer-shadow.js +82 -0
- package/src/agent-kits/launcher-host-config.js +56 -0
- package/src/agent-kits/pins.js +49 -0
- package/src/agent-kits/ports.js +13 -0
- package/src/agent-kits/session-clients.js +57 -0
- package/src/agent-kits/session-launcher.js +55 -0
- package/src/agent-kits/session-offers.js +67 -0
- package/src/agent-kits/vendor/agent-installer/LICENSE +21 -0
- package/src/agent-kits/vendor/agent-installer/README.md +9 -0
- package/src/agent-kits/vendor/agent-installer/index.d.ts +129 -0
- package/src/agent-kits/vendor/agent-installer/index.mjs +188 -0
- package/src/agent-kits/vendor/agent-session-launcher/LICENSE +21 -0
- package/src/agent-kits/vendor/agent-session-launcher/README.md +9 -0
- package/src/agent-kits/vendor/agent-session-launcher/index.d.ts +101 -0
- package/src/agent-kits/vendor/agent-session-launcher/index.mjs +159 -0
- package/src/agent-tools/agent-conversation-definitions.js +1 -1
- package/src/agent-tools/agent-workflow-definitions.js +49 -0
- package/src/agent-tools/graph-definitions.js +2 -0
- package/src/agent-tools/graph-handlers.js +2 -0
- package/src/agent-tools/interface-catalog.js +4 -1
- package/src/agent-tools/knowledge-definitions.js +7 -0
- package/src/agent-workflows/agent-tools.js +59 -0
- package/src/agent-workflows/port.js +179 -0
- package/src/agent-workflows/store.js +156 -0
- package/src/agents/claude-code/conversation-transcript.js +8 -0
- package/src/agents/claude-code/lifecycle-hook.js +9 -0
- package/src/agents/claude-code/session-client.js +29 -0
- package/src/agents/codex/conversation-transcript.js +6 -0
- package/src/agents/identity-receipt.js +1 -0
- package/src/data-format/local-stores.js +7 -1
- package/src/desktop/windows-desktop-client.js +120 -0
- package/src/desktop/windows-rollback-command.js +6 -2
- package/src/desktop/windows-rollback.js +7 -1
- package/src/desktop/windows-tray-update.js +19 -31
- package/src/desktop/windows-uninstall-command.js +2 -1
- package/src/desktop/windows-uninstall.js +10 -4
- package/src/desktop/windows-update-command.js +7 -2
- package/src/desktop/windows-update-lock.js +9 -7
- package/src/desktop/windows-update.js +7 -1
- package/src/employees/recruitment.js +12 -3
- package/src/graphiti/agent-conversations.js +1 -1
- package/src/graphiti/current-project-knowledge-search.js +3 -2
- package/src/graphiti/federated-search.js +4 -2
- package/src/graphiti/fla-mention.js +25 -8
- package/src/graphiti/fla-picker.js +25 -4
- package/src/graphiti/knowledge-result-budget.js +63 -9
- package/src/graphiti/local-runtimes.js +4 -0
- package/src/graphiti/project-agent-task-entry.js +8 -3
- package/src/graphiti/task-entry-named-fla.js +41 -19
- package/src/http/agent-workflows-api-router.js +36 -0
- package/src/http/api-router.js +9 -0
- package/src/http/doctor-api-router.js +31 -0
- package/src/http/session-launch-api-router.js +36 -0
- package/src/mcp/process-registry.js +12 -6
- package/src/mcp/session-id.js +1 -0
- package/src/mcp/tool-annotations.js +2 -0
- package/src/native-runtime/neo4j-install.js +6 -23
- package/src/native-runtime/resumable-download.js +24 -0
- package/src/native-runtime/windows-assets.js +30 -13
- package/src/native-runtime/windows-processes.js +5 -2
- package/src/presence/windows-helper-pin.js +1 -1
- package/src/server.js +2 -1
- package/src/setup/paths.js +3 -0
- package/src/system/console-update.js +10 -2
- package/src/system/detached-job.js +8 -0
- package/src/system/doctor-repair.js +61 -0
- package/src/system/doctor.js +119 -0
- package/src/system/package-version-checker.js +8 -1
- package/src/system/system-service.js +52 -13
- package/src/text/token-estimate.js +11 -0
- package/dist/web/assets/AboutPage-45tAvgRN.js +0 -1
- package/dist/web/assets/AgentHand-CQbDVBYv.js +0 -1
- package/dist/web/assets/AgentMentionCopy-BHFp527T.js +0 -1
- package/dist/web/assets/AgentMentionCopy-BIWsPf22.css +0 -1
- package/dist/web/assets/AgentName-ChhbnrG9.js +0 -1
- package/dist/web/assets/AgentProfilePage-ZzEtdSKe.js +0 -1
- package/dist/web/assets/AgentServicesPage-B92EXg56.js +0 -1
- package/dist/web/assets/AgentsDirectoryPage-B841hRHZ.js +0 -1
- package/dist/web/assets/BackLink-C0mcoSn4.js +0 -1
- package/dist/web/assets/BoardMoveMenu-CX8jKv0V.js +0 -1
- package/dist/web/assets/CaptureChangePage-B9wtEGy3.js +0 -1
- package/dist/web/assets/Card-BOk3WbC1.js +0 -1
- package/dist/web/assets/CardHeader-79hIs3Wc.js +0 -1
- package/dist/web/assets/CardTitle-CMWcRH62.js +0 -1
- package/dist/web/assets/ConnectionsPage-CCSZ-v6k.js +0 -1
- package/dist/web/assets/CreateProjectDialog-vDAHEZ6t.js +0 -2
- package/dist/web/assets/DataFormatPage-oRc6mBRh.js +0 -2
- package/dist/web/assets/DialogFooter-mK0XBX_L.js +0 -1
- package/dist/web/assets/EmployeeScopeDialog-Bp0zLRG5.js +0 -1
- package/dist/web/assets/EmployeeWorkbenchPage-D34173ED.js +0 -3
- package/dist/web/assets/FieldDescription-C33NBGIe.js +0 -1
- package/dist/web/assets/GrowthLoading-CTsRhLfj.js +0 -1
- package/dist/web/assets/InboxPage-CekhZG9R.js +0 -4
- package/dist/web/assets/Input-jNvD1lEt.js +0 -1
- package/dist/web/assets/KnowledgeHardDeleteSection-OgNe3xoA.js +0 -1
- package/dist/web/assets/KnowledgeItemEditPage-CxUFvj7Q.js +0 -1
- package/dist/web/assets/KnowledgeItemSummaryCard-CkD55bXQ.js +0 -1
- package/dist/web/assets/KnowledgeOrganizerPage-DTfhmq7x.js +0 -1
- package/dist/web/assets/KnowledgePage-D_XPxm7U.js +0 -1
- package/dist/web/assets/KnowledgePeek-fE8eZ9yB.js +0 -1
- package/dist/web/assets/KnowledgeTurnReceiptPage-CNoJA8j_.js +0 -1
- package/dist/web/assets/KnowledgeWorkspace-CizF6YnE.js +0 -4
- package/dist/web/assets/Label-BuJcMh9m.js +0 -1
- package/dist/web/assets/ModelSettingsPage-adiuhTSX.js +0 -1
- package/dist/web/assets/NotFoundPage-JAy5KIL8.js +0 -1
- package/dist/web/assets/OccupationsPage-DG0uQx85.js +0 -1
- package/dist/web/assets/OverviewPage-DwCiWNdy.js +0 -2
- package/dist/web/assets/PersonalProfilePage-Cb-AKL4K.js +0 -1
- package/dist/web/assets/PersonalProjectsPage-BT7ebQUu.js +0 -1
- package/dist/web/assets/PopperContent-Dtpk5py4.js +0 -1
- package/dist/web/assets/Presence-9_BFOmAz.js +0 -3
- package/dist/web/assets/ProjectAgentDetailPage-WmxfcCCM.js +0 -8
- package/dist/web/assets/ProjectAgentDialog-BgdFB7il.js +0 -5
- package/dist/web/assets/ProjectAgentFirstTask-BfX-v_g5.js +0 -1
- package/dist/web/assets/ProjectAgentsPage-DAlfUVqM.js +0 -1
- package/dist/web/assets/ProjectAgentsPage-DvJh40Xl.css +0 -1
- package/dist/web/assets/ProjectJudgmentPolicy-DGFTRTvW.js +0 -1
- package/dist/web/assets/ProjectScopePicker-wlhLR465.js +0 -1
- package/dist/web/assets/PublicProjectsPage-LTXsYNme.js +0 -1
- package/dist/web/assets/RadioGroupItem-CUyRbWCt.js +0 -1
- package/dist/web/assets/RoundtablesPage-slbD8isz.js +0 -1
- package/dist/web/assets/RovingFocusGroup-DJ9gp0xI.js +0 -1
- package/dist/web/assets/RovingFocusItem-BGt9xXis.js +0 -1
- package/dist/web/assets/SessionMigrationPage-HxM5zSjY.js +0 -1
- package/dist/web/assets/SessionRecordsPage-CbZ4xiIb.js +0 -1
- package/dist/web/assets/SettingsPage-BSXZinjo.js +0 -1
- package/dist/web/assets/SharedJefaReportPage-4MylH5Ao.js +0 -1
- package/dist/web/assets/TableHeader-aFcD9wsQ.js +0 -1
- package/dist/web/assets/TabsContent-ZCMehxYx.js +0 -1
- package/dist/web/assets/TabsTrigger-BTZQbe9n.js +0 -1
- package/dist/web/assets/TagVocabularyPage-CCm1HBg3.js +0 -1
- package/dist/web/assets/TaskBlockerClear-Dg1T2rcU.js +0 -1
- package/dist/web/assets/TaskBlockerNotice-DVYIiv3y.js +0 -1
- package/dist/web/assets/TaskExecutionPlan-B411P1VJ.js +0 -2
- package/dist/web/assets/TaskExecutionPlan-uimNYWdr.css +0 -1
- package/dist/web/assets/TaskReason-CVnoUuFe.js +0 -1
- package/dist/web/assets/Teleport-Co_blCnp.js +0 -1
- package/dist/web/assets/TextField-BqL6E9zF.js +0 -1
- package/dist/web/assets/Textarea-DIra6o5H.js +0 -1
- package/dist/web/assets/UiChip-FMcrDGe6.js +0 -1
- package/dist/web/assets/UiDialog-CvESkb45.js +0 -1
- package/dist/web/assets/UiDisclosure-D3xZRwVK.js +0 -1
- package/dist/web/assets/UiIcon-CSLaDsID.js +0 -1
- package/dist/web/assets/UiIconButton-C1o6HJ39.js +0 -1
- package/dist/web/assets/UiNotice-CR_4j5lF.js +0 -1
- package/dist/web/assets/UiSegmented-Iu9IH18R.js +0 -1
- package/dist/web/assets/UiSelect-Cs53P6h-.js +0 -1
- package/dist/web/assets/UiToggle-B2sPCVZe.css +0 -1
- package/dist/web/assets/UiToggle-CSb7ErVS.js +0 -1
- package/dist/web/assets/UiWeight-BsbP9h9p.js +0 -1
- package/dist/web/assets/UnassignedConversationsPanel-D2Y2Vs-z.js +0 -1
- package/dist/web/assets/VirtualDirectoryList-DLhTuyoY.js +0 -1
- package/dist/web/assets/VisuallyHiddenInput-DoZPyFZU.js +0 -1
- package/dist/web/assets/Workbench3D-BBEJ0vTb.js +0 -2
- package/dist/web/assets/_plugin-vue_export-helper-DKHjpKWY.js +0 -10
- package/dist/web/assets/accordion-DX4SO0oU.js +0 -1
- package/dist/web/assets/agent-pins-Djo8-s9j.js +0 -1
- package/dist/web/assets/badge-CBT_nrTA.js +0 -1
- package/dist/web/assets/button-BXkZ6rdB.js +0 -1
- package/dist/web/assets/checkbox-BPKmRFwj.js +0 -1
- package/dist/web/assets/console-KIWUM9xy.js +0 -1
- package/dist/web/assets/conversation-launcher-settings-Dfhkli80.js +0 -1
- package/dist/web/assets/dialog-BSKT8LUI.js +0 -1
- package/dist/web/assets/dist-KV3E0kAK.js +0 -1
- package/dist/web/assets/dropdown-menu-BMeAsFQe.js +0 -1
- package/dist/web/assets/field-D_zmve89.js +0 -1
- package/dist/web/assets/index-CyoKfCXy.js +0 -2
- package/dist/web/assets/index-DuLqKIn8.css +0 -1
- package/dist/web/assets/label-table-BAIaH-tx.js +0 -1
- package/dist/web/assets/page-title-B2inyRB1.js +0 -1
- package/dist/web/assets/profile-model-C7xYkCgE.js +0 -1
- package/dist/web/assets/project-team-api-DNSZitOp.js +0 -1
- package/dist/web/assets/select-ByHJaNRv.js +0 -1
- package/dist/web/assets/shared-report-ClDt0UMJ.js +0 -3
- package/dist/web/assets/task-labels-De_F8I3O.js +0 -1
- package/dist/web/assets/ui-CMR2UkVp.js +0 -1
- package/dist/web/assets/useApi-CROJJdhE-lwt7Bu-G.js +0 -1
- package/dist/web/assets/useDirection-DhUUV4Jm.js +0 -1
- package/dist/web/assets/useFocusReturn-ChxuGVqv.js +0 -1
- package/dist/web/assets/useForwardExpose-BRdp7olV.js +0 -1
- package/dist/web/assets/useKnowledgeItemPeek-CRNR9LmU.js +0 -1
- package/dist/web/assets/useMinimumLoadingDisplay-DejHIUi_.js +0 -1
- package/dist/web/assets/useRoutePeek-B5Ukp8vX.js +0 -1
- package/dist/web/assets/utils-BH3OkU12.js +0 -1
- package/dist/web/assets/vue-router-B6l0ZzTV.js +0 -1
- /package/dist/web/assets/{shared-report-CjLAmGZI.css → EmployeeTaskBoard-CjLAmGZI.css} +0 -0
|
@@ -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 = '3aace97bd37a9b2bec3e728dfb39716b2f764bca5a0f48d40fdc4262fe5c5a21';
|
package/src/server.js
CHANGED
|
@@ -191,7 +191,8 @@ export async function createServer(options = {}) {
|
|
|
191
191
|
runtimeConfigPath: localOptions.runtimeConfigPath,
|
|
192
192
|
activePort: port,
|
|
193
193
|
activeLan: lanEnabled,
|
|
194
|
-
executorAdapters: options.executorAdapters
|
|
194
|
+
executorAdapters: options.executorAdapters,
|
|
195
|
+
previewDataFormats: dataFormatMigrations ? () => dataFormatMigrations.preview() : null
|
|
195
196
|
})
|
|
196
197
|
: null);
|
|
197
198
|
if (options.workerRuntimeBindings !== undefined) {
|
package/src/setup/paths.js
CHANGED
|
@@ -44,6 +44,9 @@ export function resolveSetupPaths({
|
|
|
44
44
|
standingAssignmentsPath: join(resolvedDataDir, 'standing-assignments.sqlite'),
|
|
45
45
|
modelEvaluationsPath: join(resolvedDataDir, 'model-evaluations.json'),
|
|
46
46
|
clientLinksPath: join(resolvedDataDir, 'client-links.json'),
|
|
47
|
+
// Derived from FULI's settings and descriptor packs for the shared client components (src/agent-kits/).
|
|
48
|
+
launcherHostConfigPath: join(resolvedDataDir, 'agent-kits', 'launcher.json'),
|
|
49
|
+
installerManifestPath: join(resolvedDataDir, 'agent-kits', 'fuli-installer.json'),
|
|
47
50
|
nativeRuntimeDir,
|
|
48
51
|
nativeRuntimeManifestPath: join(nativeRuntimeDir, 'manifest.json'),
|
|
49
52
|
nativeProcessStatePath: join(nativeRuntimeDir, 'processes.json'),
|
|
@@ -32,11 +32,16 @@ export function consoleUpdate(dataDir, { packageRoot = PACKAGE_ROOT, platform =
|
|
|
32
32
|
const current = job.read();
|
|
33
33
|
return current && { id: current.id, status: current.status, kind: current.kind ?? 'npm', fromVersion: current.fromVersion,
|
|
34
34
|
targetVersion: current.targetVersion ?? null, version: current.version ?? null, step: current.step ?? null,
|
|
35
|
-
started: current.started ?? null, error: current.error ?? null, blockers: current.blockers ?? null
|
|
35
|
+
started: current.started ?? null, error: current.error ?? null, blockers: current.blockers ?? null,
|
|
36
|
+
clients: current.clients ?? null };
|
|
36
37
|
}
|
|
37
38
|
return {
|
|
38
39
|
kind,
|
|
39
40
|
status,
|
|
41
|
+
// The doctor's repair reconnected the clients an update left unconnected.
|
|
42
|
+
recordClientsReconnected(id) {
|
|
43
|
+
return job.amend(id, { clients: 'reconnected' });
|
|
44
|
+
},
|
|
40
45
|
// version: the newer version found; a tray installation downloads exactly that one.
|
|
41
46
|
// stopProcesses: "PID:created" of processes the last failed update named, which the person chose to stop.
|
|
42
47
|
start({ version = null, stopProcesses = [] } = {}) {
|
|
@@ -69,7 +74,10 @@ export async function runConsoleUpdate(paths, id, { update = runUpdateCommand, u
|
|
|
69
74
|
? await updateTray({ installation: installation(PACKAGE_ROOT), version: job.targetVersion, stopPids: job.stopPids,
|
|
70
75
|
progress: step => record({ step }) })
|
|
71
76
|
: await update(['--yes', ...dataDirArgs], { env, write: () => {} });
|
|
72
|
-
|
|
77
|
+
// clients: a tray update reports whether it reconnected the connected
|
|
78
|
+
// clients; an npm update fails instead when its setup does not finish.
|
|
79
|
+
record({ status: result.status === 'updated' ? 'updated' : 'unchanged', version: result.version ?? null,
|
|
80
|
+
...(result.clients ? { clients: result.clients } : {}) });
|
|
73
81
|
} catch (error) {
|
|
74
82
|
record({ status: 'failed', error: String(error?.message ?? error).split('\n')[0],
|
|
75
83
|
...(error?.blockers ? { blockers: error.blockers } : {}) });
|
|
@@ -41,6 +41,14 @@ export function detachedJob(path, { worker, running, spawnWorker = spawn, now =
|
|
|
41
41
|
}
|
|
42
42
|
} catch { fail(); }
|
|
43
43
|
return read();
|
|
44
|
+
},
|
|
45
|
+
// Adds fields to the job with this ID once its worker is done; false when
|
|
46
|
+
// the journal now holds another job.
|
|
47
|
+
amend(id, fields) {
|
|
48
|
+
const job = readJsonFile(path, null);
|
|
49
|
+
if (job?.id !== id || running.has(job.status)) return false;
|
|
50
|
+
writeJsonFileAtomic(path, { ...job, ...fields });
|
|
51
|
+
return true;
|
|
44
52
|
}
|
|
45
53
|
};
|
|
46
54
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { reconnectableClients } from './doctor.js';
|
|
2
|
+
|
|
3
|
+
// The doctor's 「自动修复」 (POST /api/system/doctor/repair): only the items the
|
|
4
|
+
// doctor marks fix 'auto'. A client is reconnected through the console's own
|
|
5
|
+
// client installer, which backs up its configuration first. It never confirms
|
|
6
|
+
// a data format migration, never connects a client that was not connected
|
|
7
|
+
// before, and never restarts a client's sessions.
|
|
8
|
+
//
|
|
9
|
+
// Returns { results: [{ id, outcome: 'fixed' | 'failed' | 'skipped', error? }], doctor }
|
|
10
|
+
// with the doctor read again after the repair.
|
|
11
|
+
|
|
12
|
+
const NOT_RECONNECTED = 'The client could not be reconnected; connect it again in Settings → Clients.';
|
|
13
|
+
|
|
14
|
+
// check: the doctor's read (doctor.js). connectClient: the client installer
|
|
15
|
+
// (client-connection-install.js). recordClientsReconnected: marks the console
|
|
16
|
+
// update journal's clients reconnected (console-update.js).
|
|
17
|
+
export function createDoctorRepair({ check, connectClient, observeClients, recordClientsReconnected }) {
|
|
18
|
+
let running = false;
|
|
19
|
+
return async () => {
|
|
20
|
+
if (running) throw new TypeError('A repair is already running. Please wait.');
|
|
21
|
+
running = true;
|
|
22
|
+
try {
|
|
23
|
+
const before = await check();
|
|
24
|
+
// One reconnection per client, however many items name it.
|
|
25
|
+
const reconnections = new Map();
|
|
26
|
+
const reconnect = (clientId) => {
|
|
27
|
+
if (!reconnections.has(clientId)) reconnections.set(clientId, reconnectClient(connectClient, clientId));
|
|
28
|
+
return reconnections.get(clientId);
|
|
29
|
+
};
|
|
30
|
+
const results = [];
|
|
31
|
+
for (const item of before.items.filter(({ fix }) => fix === 'auto')) {
|
|
32
|
+
if (item.kind === 'client_outdated') results.push({ id: item.id, ...await reconnect(item.data.clientId) });
|
|
33
|
+
else if (item.kind === 'update_left_work') {
|
|
34
|
+
results.push({ id: item.id, ...await finishUpdateReconnection(item, { reconnect, observeClients, recordClientsReconnected }) });
|
|
35
|
+
} else results.push({ id: item.id, outcome: 'skipped' });
|
|
36
|
+
}
|
|
37
|
+
return { results, doctor: await check() };
|
|
38
|
+
} finally { running = false; }
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// What the update's own `setup --connected-only` would have done: reconnect
|
|
43
|
+
// every client whose FULI integration is still present.
|
|
44
|
+
async function finishUpdateReconnection(item, { reconnect, observeClients, recordClientsReconnected }) {
|
|
45
|
+
const outcomes = [];
|
|
46
|
+
for (const client of reconnectableClients((await observeClients()).clients)) outcomes.push(await reconnect(client.id));
|
|
47
|
+
const failed = outcomes.find(({ outcome }) => outcome === 'failed');
|
|
48
|
+
if (failed) return failed;
|
|
49
|
+
recordClientsReconnected(item.data.updateId);
|
|
50
|
+
return { outcome: 'fixed' };
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async function reconnectClient(connectClient, clientId) {
|
|
54
|
+
try {
|
|
55
|
+
const result = await connectClient({ clientId });
|
|
56
|
+
return result.status === 'connected' ? { outcome: 'fixed' } : { outcome: 'failed', error: NOT_RECONNECTED };
|
|
57
|
+
} catch (error) {
|
|
58
|
+
// The installer's own refusals name no path; anything else may, so it is not relayed.
|
|
59
|
+
return { outcome: 'failed', error: error instanceof TypeError ? error.message : NOT_RECONNECTED };
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { FULI_VERSION } from '../package-metadata.js';
|
|
2
|
+
|
|
3
|
+
// FULI's 体检 (doctor): whether this installation works and what needs fixing,
|
|
4
|
+
// read from what the console already observes. It only reads; the repair
|
|
5
|
+
// (doctor-repair.js) acts on the items marked fix 'auto'. The console's banner
|
|
6
|
+
// and the desktop client read the same answer (GET /api/system/doctor):
|
|
7
|
+
//
|
|
8
|
+
// { checkedAt, version, overall, items: [{ id, kind, severity, fix, data }], unchecked, internal? }
|
|
9
|
+
//
|
|
10
|
+
// overall: 'degraded' when any item is blocking, else 'needs_person' when any
|
|
11
|
+
// is a warning, else 'ok'; info items never change it. unchecked names the
|
|
12
|
+
// sources that could not be read this time, so a missing item is never read
|
|
13
|
+
// as a healthy one. internal carries developer-facing comparisons that never
|
|
14
|
+
// change the items or overall (the client installer's shadow status, rec#11
|
|
15
|
+
// D-79); the console and desktop client do not show it.
|
|
16
|
+
|
|
17
|
+
// A client with FULI's integration left behind in an older or partial form.
|
|
18
|
+
const OUTDATED_CLIENT = new Set(['changed', 'skills_left']);
|
|
19
|
+
// Clients whose FULI integration a reconnection refreshes: `fuli setup --connected-only`.
|
|
20
|
+
const PRESENT_CLIENT = new Set(['connected', 'changed', 'skills_left']);
|
|
21
|
+
const SEVERITY_ORDER = Object.freeze({ blocking: 0, warning: 1, info: 2 });
|
|
22
|
+
|
|
23
|
+
// The clients a repair may reconnect: once connected, FULI's integration still
|
|
24
|
+
// present, and installable without the person (detected, not manual-only).
|
|
25
|
+
export function reconnectableClients(clients) {
|
|
26
|
+
return clients.filter((client) => PRESENT_CLIENT.has(client.status) && client.previouslyConnected && canInstall(client));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const canInstall = (client) => client.detected && !client.manualOnly;
|
|
30
|
+
|
|
31
|
+
// observeClients: the client connection observation (client-connection-status.js).
|
|
32
|
+
// previewDataFormats: the data format plan (migration-plan.js), or null without a local installation.
|
|
33
|
+
// liveProcesses: live MCP server records (process-registry.js).
|
|
34
|
+
// latestVersion: the version checker's last answer without waiting, or null.
|
|
35
|
+
// lastUpdate: the console update journal's status (console-update.js), or null.
|
|
36
|
+
// internalDetails: returns the report's internal section without waiting, or null.
|
|
37
|
+
export function createDoctor({ observeClients, previewDataFormats = null, liveProcesses, latestVersion, lastUpdate,
|
|
38
|
+
internalDetails = null, version = FULI_VERSION, now = () => new Date() }) {
|
|
39
|
+
async function check() {
|
|
40
|
+
const unchecked = [];
|
|
41
|
+
const read = async (source, readSource) => {
|
|
42
|
+
try { return await readSource(); } catch { unchecked.push(source); return null; }
|
|
43
|
+
};
|
|
44
|
+
const clients = await read('clients', observeClients);
|
|
45
|
+
const formats = previewDataFormats ? await read('data_format', previewDataFormats) : null;
|
|
46
|
+
const processes = await read('sessions', liveProcesses);
|
|
47
|
+
const latest = await read('update', latestVersion);
|
|
48
|
+
const update = await read('update', lastUpdate);
|
|
49
|
+
const items = [
|
|
50
|
+
...clientItems(clients?.clients ?? []),
|
|
51
|
+
...dataFormatItems(formats),
|
|
52
|
+
...sessionItems(processes ?? [], version),
|
|
53
|
+
...updateItems(latest, update, version)
|
|
54
|
+
].sort((left, right) => SEVERITY_ORDER[left.severity] - SEVERITY_ORDER[right.severity]);
|
|
55
|
+
return { checkedAt: now().toISOString(), version, overall: overallOf(items), items, unchecked: [...new Set(unchecked)],
|
|
56
|
+
...(internalDetails ? { internal: internalDetails() } : {}) };
|
|
57
|
+
}
|
|
58
|
+
return { check };
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function overallOf(items) {
|
|
62
|
+
if (items.some((item) => item.severity === 'blocking')) return 'degraded';
|
|
63
|
+
if (items.some((item) => item.severity === 'warning')) return 'needs_person';
|
|
64
|
+
return 'ok';
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const item = (id, kind, severity, fix, data) => ({ id, kind, severity, fix, data });
|
|
68
|
+
|
|
69
|
+
// A client the person connected before whose integration changed or lost its
|
|
70
|
+
// MCP entry. A client FULI cannot install by itself is the person's to reconnect.
|
|
71
|
+
function clientItems(clients) {
|
|
72
|
+
return clients.filter((client) => OUTDATED_CLIENT.has(client.status) && client.previouslyConnected)
|
|
73
|
+
.map((client) => item(`client_outdated:${client.id}`, 'client_outdated', 'warning', canInstall(client) ? 'auto' : 'person',
|
|
74
|
+
{ clientId: client.id, label: client.label, status: client.status }));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Steps that wait for the person's confirmation, and stores FULI cannot use
|
|
78
|
+
// as they are. A graph whose provider does not answer is not a format
|
|
79
|
+
// finding: the plan says 'unavailable' and is left out.
|
|
80
|
+
function dataFormatItems(formats) {
|
|
81
|
+
if (!formats) return [];
|
|
82
|
+
const waiting = formats.stores.map((plan) => item(`data_format_waiting:${plan.label}`, 'data_format_waiting', 'blocking', 'person',
|
|
83
|
+
{ store: plan.store, label: plan.label, steps: [plan.step.id] }));
|
|
84
|
+
const blocked = formats.blocked.filter((plan) => plan.action === 'blocked')
|
|
85
|
+
.map((plan) => item(`data_format_blocked:${plan.label}`, 'data_format_blocked', 'blocking', 'person',
|
|
86
|
+
{ store: plan.store, label: plan.label, steps: plan.steps, reason: plan.reason }));
|
|
87
|
+
return [...waiting, ...blocked];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Open client sessions whose MCP server still runs another FULI version; only
|
|
91
|
+
// restarting those sessions loads the installed one.
|
|
92
|
+
function sessionItems(processes, version) {
|
|
93
|
+
const groups = new Map();
|
|
94
|
+
for (const record of processes.filter((candidate) => candidate.version !== version)) {
|
|
95
|
+
const client = record.sourceApplication ?? 'other';
|
|
96
|
+
const key = `${client}:${record.version}`;
|
|
97
|
+
const group = groups.get(key) ?? { client, count: 0, runningVersion: record.version };
|
|
98
|
+
group.count += 1;
|
|
99
|
+
groups.set(key, group);
|
|
100
|
+
}
|
|
101
|
+
return [...groups].map(([key, group]) => item(`sessions_outdated:${key}`, 'sessions_outdated', 'warning', 'person', group));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function updateItems(latest, update, version) {
|
|
105
|
+
const items = [];
|
|
106
|
+
if (latest?.status === 'ready' && latest.updateAvailable) {
|
|
107
|
+
items.push(item('update_available', 'update_available', 'info', 'person', { latest: latest.latestVersion }));
|
|
108
|
+
}
|
|
109
|
+
// The last console update installed this version but did not reconnect the
|
|
110
|
+
// clients, or it failed and this is still the version it started from.
|
|
111
|
+
if (update?.status === 'updated' && update.clients === 'not_reconnected' && update.version === version) {
|
|
112
|
+
items.push(item('update_left_work', 'update_left_work', 'warning', 'auto',
|
|
113
|
+
{ updateId: update.id, status: 'updated', clients: 'not_reconnected', version: update.version }));
|
|
114
|
+
} else if (update?.status === 'failed' && update.fromVersion === version) {
|
|
115
|
+
items.push(item('update_left_work', 'update_left_work', 'warning', 'person',
|
|
116
|
+
{ updateId: update.id, status: 'failed', targetVersion: update.targetVersion, error: update.error }));
|
|
117
|
+
}
|
|
118
|
+
return items;
|
|
119
|
+
}
|
|
@@ -68,5 +68,12 @@ export function createPackageVersionChecker({
|
|
|
68
68
|
return inFlight;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
// The last answer without waiting on the network (null before the first
|
|
72
|
+
// one); an expired answer starts a check in the background.
|
|
73
|
+
function peek() {
|
|
74
|
+
if (!cached || now() >= expiresAt) void check();
|
|
75
|
+
return cached;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return { check, peek };
|
|
72
79
|
}
|
|
@@ -18,6 +18,14 @@ import { createClientConnectionObserver } from './client-connection-status.js';
|
|
|
18
18
|
import { createClientInstaller } from './client-connection-install.js';
|
|
19
19
|
import { createSettingsApplier } from './settings-apply.js';
|
|
20
20
|
import { consoleUpdate } from './console-update.js';
|
|
21
|
+
import { createDoctor } from './doctor.js';
|
|
22
|
+
import { createDoctorRepair } from './doctor-repair.js';
|
|
23
|
+
import { liveMcpProcesses } from '../mcp/process-registry.js';
|
|
24
|
+
import { inspectAgentInstallations } from '../setup/agent-installation-status.js';
|
|
25
|
+
import { agentKitPorts } from '../agent-kits/ports.js';
|
|
26
|
+
import { sessionClientRecords } from '../agent-kits/session-clients.js';
|
|
27
|
+
import { createSessionOffers } from '../agent-kits/session-offers.js';
|
|
28
|
+
import { createInstallerShadow, runInstallerShadow } from '../agent-kits/installer-shadow.js';
|
|
21
29
|
|
|
22
30
|
export function createSystemService({
|
|
23
31
|
paths,
|
|
@@ -31,24 +39,16 @@ export function createSystemService({
|
|
|
31
39
|
settingsApplier = createSettingsApplier({ paths, writeSettings }),
|
|
32
40
|
clientObserver = createClientConnectionObserver({
|
|
33
41
|
discover: discoverAgents,
|
|
34
|
-
|
|
35
|
-
context: {
|
|
36
|
-
dataDir: paths.dataDir,
|
|
37
|
-
nodePath: process.execPath,
|
|
38
|
-
mcpServerPath: paths.mcpServerPath,
|
|
39
|
-
runtimeConfigPath,
|
|
40
|
-
sessionSkillPath: paths.sessionSkillPath,
|
|
41
|
-
projectSkillPath: paths.projectSkillPath,
|
|
42
|
-
reviewSkillPath: paths.reviewSkillPath,
|
|
43
|
-
operationSkillPath: paths.operationSkillPath,
|
|
44
|
-
sessionCommandSkillPath: paths.sessionCommandSkillPath
|
|
45
|
-
},
|
|
42
|
+
context: expectedIntegration(paths, runtimeConfigPath),
|
|
46
43
|
historyPath: join(paths.dataDir, 'client-connection-observations.json')
|
|
47
44
|
}),
|
|
45
|
+
agentKits = agentKitPorts(paths),
|
|
48
46
|
clientInstaller = createClientInstaller({ paths, runtimeConfigPath }),
|
|
49
47
|
executorAdapters = new Map(),
|
|
50
48
|
versionChecker = createPackageVersionChecker(),
|
|
51
49
|
update = consoleUpdate(paths.dataDir),
|
|
50
|
+
// The data format plan (migration-plan.js) the doctor reads; null without a local installation.
|
|
51
|
+
previewDataFormats = null,
|
|
52
52
|
runtimeBroker = createAdaptiveRuntimeBroker({
|
|
53
53
|
paths,
|
|
54
54
|
settings: readAdaptiveRuntimeSettings(paths.adaptiveRuntimeSettingsPath),
|
|
@@ -74,9 +74,17 @@ export function createSystemService({
|
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
const configuredSettings = () => readSettings(paths.runtimeSettingsPath, { fallback: activeSettings() });
|
|
78
|
+
const sessionOffers = createSessionOffers({ launcher: agentKits.sessionLauncher, configPath: paths.launcherHostConfigPath,
|
|
79
|
+
readLaunchers: () => configuredSettings().conversationLaunchers, records: sessionClientRecords(paths.dataDir) });
|
|
80
|
+
// The launcher's host configuration follows the settings whenever they are
|
|
81
|
+
// read or written; a failure to write it only leaves the launcher on the last one.
|
|
82
|
+
const syncLauncherConfig = () => { try { sessionOffers.syncHostConfig(); } catch { /* next read retries */ } };
|
|
83
|
+
|
|
77
84
|
function getSettings() {
|
|
78
85
|
const active = activeSettings();
|
|
79
86
|
const configured = readSettings(paths.runtimeSettingsPath, { fallback: active });
|
|
87
|
+
syncLauncherConfig();
|
|
80
88
|
return { ...settingsResult(configured, active), apply: settingsApplier.status() };
|
|
81
89
|
}
|
|
82
90
|
|
|
@@ -94,10 +102,20 @@ export function createSystemService({
|
|
|
94
102
|
});
|
|
95
103
|
} else {
|
|
96
104
|
writeSettings(paths.runtimeSettingsPath, configured);
|
|
105
|
+
syncLauncherConfig();
|
|
97
106
|
}
|
|
98
107
|
return result;
|
|
99
108
|
}
|
|
100
109
|
|
|
110
|
+
const observeClients = () => clientObserver.observe();
|
|
111
|
+
// agent-installer's status beside FULI's own inspection, never shown to the person (rec#11 D-79).
|
|
112
|
+
const installerShadow = createInstallerShadow({ run: () => runInstallerShadow({ installer: agentKits.clientInstaller,
|
|
113
|
+
manifestPath: paths.installerManifestPath, context: expectedIntegration(paths, runtimeConfigPath),
|
|
114
|
+
discover: discoverAgents, inspect: inspectAgentInstallations }) });
|
|
115
|
+
const doctor = createDoctor({ observeClients, previewDataFormats,
|
|
116
|
+
liveProcesses: () => liveMcpProcesses(runtimeConfigPath), latestVersion: () => versionChecker.peek(),
|
|
117
|
+
lastUpdate: () => update.status(), internalDetails: () => ({ installerShadow: installerShadow.latest() }) });
|
|
118
|
+
|
|
101
119
|
return {
|
|
102
120
|
getSettings,
|
|
103
121
|
updateSettings,
|
|
@@ -106,7 +124,9 @@ export function createSystemService({
|
|
|
106
124
|
clientConnection: () => Object.fromEntries(['standard', 'vscode', 'server'].map((format) => [
|
|
107
125
|
format, clientConnectionConfig({ mcpServerPath: paths.mcpServerPath, runtimeConfigPath }, format)
|
|
108
126
|
])),
|
|
109
|
-
clientConnectionStatus:
|
|
127
|
+
clientConnectionStatus: observeClients,
|
|
128
|
+
// Whether the console offers to open recorded sessions (session-offers.js).
|
|
129
|
+
sessionLaunchOffers: (sessions) => sessionOffers.offers(sessions),
|
|
110
130
|
connectClient: clientInstaller,
|
|
111
131
|
resources: () => resourceMonitor.sample(),
|
|
112
132
|
// updateKind: how the console's one-click update installs it (console-update.js).
|
|
@@ -116,6 +136,10 @@ export function createSystemService({
|
|
|
116
136
|
const version = await versionChecker.check();
|
|
117
137
|
return update.start({ version: version.updateAvailable ? version.latestVersion : null, stopProcesses });
|
|
118
138
|
},
|
|
139
|
+
// FULI's 体检 and its repair of what needs no person (doctor.js, doctor-repair.js).
|
|
140
|
+
doctor: () => doctor.check(),
|
|
141
|
+
repairDoctor: createDoctorRepair({ check: doctor.check, connectClient: clientInstaller, observeClients,
|
|
142
|
+
recordClientsReconnected: (id) => update.recordClientsReconnected(id) }),
|
|
119
143
|
runtimeStatus: () => runtimeBroker.status(),
|
|
120
144
|
acquireRuntimeLease: (input) => runtimeBroker.acquire(input),
|
|
121
145
|
refreshRuntimeLease: (leaseId) => runtimeBroker.refresh(leaseId),
|
|
@@ -132,6 +156,21 @@ export function createSystemService({
|
|
|
132
156
|
};
|
|
133
157
|
}
|
|
134
158
|
|
|
159
|
+
// The same expected integration that `fuli setup` installs.
|
|
160
|
+
function expectedIntegration(paths, runtimeConfigPath) {
|
|
161
|
+
return {
|
|
162
|
+
dataDir: paths.dataDir,
|
|
163
|
+
nodePath: process.execPath,
|
|
164
|
+
mcpServerPath: paths.mcpServerPath,
|
|
165
|
+
runtimeConfigPath,
|
|
166
|
+
sessionSkillPath: paths.sessionSkillPath,
|
|
167
|
+
projectSkillPath: paths.projectSkillPath,
|
|
168
|
+
reviewSkillPath: paths.reviewSkillPath,
|
|
169
|
+
operationSkillPath: paths.operationSkillPath,
|
|
170
|
+
sessionCommandSkillPath: paths.sessionCommandSkillPath
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
|
|
135
174
|
export function settingsFromActiveRuntime({
|
|
136
175
|
state,
|
|
137
176
|
graphConfig,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// A rough model-token count for a text an Agent may choose to read: about four
|
|
2
|
+
// ASCII characters per token, one token per other code point (CJK, emoji).
|
|
3
|
+
// Only a reading-cost hint; never a budget that decides what is delivered.
|
|
4
|
+
export function approxTokens(text) {
|
|
5
|
+
let ascii = 0, other = 0;
|
|
6
|
+
for (const point of text) {
|
|
7
|
+
if (point.codePointAt(0) < 128) ascii++;
|
|
8
|
+
else other++;
|
|
9
|
+
}
|
|
10
|
+
return Math.ceil(ascii / 4) + other;
|
|
11
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e,C as t,D as n,Dt as r,J as i,M as a,Mt as o,X as s,b as c,gt as l,k as u,kt as d,s as f,t as p,w as m}from"./_plugin-vue_export-helper-DKHjpKWY.js";import{t as h}from"./fuli-logo-Bu9WBuQe.js";var g={class:`about-section-heading`},ee=[`id`],_=p(a({__name:`AboutSectionHeading`,props:{titleId:{},title:{},description:{}},setup(e){return(t,r)=>(i(),n(`header`,g,[m(`h2`,{id:e.titleId},o(e.title),9,ee),m(`p`,null,o(e.description),1)]))}}),[[`__scopeId`,`data-v-99ca5811`]]),v=[`aria-label`],y={class:`label-dimension-strip`},b=[`data-dimension`],x={class:`label-guide-sheet`},S={class:`label-guide-section profile-guide`},C={class:`label-definition-list`},w=[`data-kind`],T={class:`label-guide-section quadrant-guide`},E={class:`quadrant-explainer`},D={class:`quadrant-y-axis`,"aria-hidden":`true`},O=[`aria-label`],k=[`data-quadrant`],A={class:`quadrant-x-axis`,"aria-hidden":`true`},j={class:`quadrant-notes`},M={class:`label-guide-section confirmation-guide`},N={class:`status-table-wrap`},P={class:`status-definition-table`},F={scope:`col`},I={scope:`col`},L={scope:`col`},R={scope:`row`},z=[`data-status`],B=[`data-label`],V=[`data-label`],H={class:`status-boundaries`},U={class:`label-example`},W={class:`label-example-tags`,"aria-hidden":`true`},te={class:`label-token profile-token`,"data-kind":`taste`},G={class:`label-token origin-token`},K={class:`label-token status-token`,"data-status":`confirmed`},q={class:`label-all-note`},J=p(a({__name:`LabelGuide`,setup(e){let a=t(()=>[{key:`profile`,title:f(`about.dimensions.profile.title`),question:f(`about.dimensions.profile.question`),timing:f(`about.dimensions.profile.timing`)},{key:`origin`,title:f(`about.dimensions.origin.title`),question:f(`about.dimensions.origin.question`),timing:f(`about.dimensions.origin.timing`)},{key:`confirmation`,title:f(`about.dimensions.confirmation.title`),question:f(`about.dimensions.confirmation.question`),timing:f(`about.dimensions.confirmation.timing`)}]),l=t(()=>[{key:`taste`,label:f(`about.profiles.taste.label`),short:f(`about.profiles.taste.short`),description:f(`about.profiles.taste.description`)},{key:`personality`,label:f(`about.profiles.personality.label`),short:f(`about.profiles.personality.short`),description:f(`about.profiles.personality.description`)},{key:`judgment`,label:f(`about.profiles.judgment.label`),short:f(`about.profiles.judgment.short`),description:f(`about.profiles.judgment.description`)}]),d=t(()=>[{key:`known-unknown`,label:f(`about.quadrants.knownUnknown.label`),coordinate:f(`about.quadrants.knownUnknown.coordinate`),description:f(`about.quadrants.knownUnknown.description`)},{key:`known-known`,label:f(`about.quadrants.knownKnown.label`),coordinate:f(`about.quadrants.knownKnown.coordinate`),description:f(`about.quadrants.knownKnown.description`)},{key:`unknown-unknown`,label:f(`about.quadrants.unknownUnknown.label`),coordinate:f(`about.quadrants.unknownUnknown.coordinate`),description:f(`about.quadrants.unknownUnknown.description`)},{key:`unknown-known`,label:f(`about.quadrants.unknownKnown.label`),coordinate:f(`about.quadrants.unknownKnown.coordinate`),description:f(`about.quadrants.unknownKnown.description`)}]),p=t(()=>[{key:`pending`,label:f(`about.statuses.pending.label`),description:f(`about.statuses.pending.description`),rule:f(`about.statuses.pending.rule`)},{key:`agent-confirmed`,label:f(`about.statuses.agentConfirmed.label`),description:f(`about.statuses.agentConfirmed.description`),rule:f(`about.statuses.agentConfirmed.rule`)},{key:`confirmed`,label:f(`about.statuses.confirmed.label`),description:f(`about.statuses.confirmed.description`),rule:f(`about.statuses.confirmed.rule`)}]);return(e,t)=>(i(),n(`section`,{class:`label-guide`,"aria-label":r(f)(`about.labelsAria`)},[m(`div`,y,[(i(!0),n(c,null,s(a.value,e=>(i(),n(`article`,{key:e.key,"data-dimension":e.key},[t[0]||=m(`i`,{"aria-hidden":`true`},null,-1),m(`dl`,null,[m(`dt`,null,o(e.title),1),m(`dd`,null,[u(o(e.question)+` `,1),m(`small`,null,o(e.timing),1)])])],8,b))),128))]),m(`div`,x,[m(`section`,S,[m(`header`,null,[m(`span`,null,o(r(f)(`about.sections.profile.index`)),1),m(`div`,null,[m(`h3`,null,o(r(f)(`about.sections.profile.title`)),1),m(`p`,null,o(r(f)(`about.sections.profile.meta`)),1)])]),m(`dl`,C,[(i(!0),n(c,null,s(l.value,e=>(i(),n(`div`,{key:e.key,class:`label-definition-row`},[m(`dt`,null,[m(`span`,{class:`label-token profile-token`,"data-kind":e.key},o(e.label),9,w)]),m(`dd`,null,[m(`strong`,null,o(e.short),1),m(`p`,null,o(e.description),1)])]))),128))])]),m(`section`,T,[m(`header`,null,[m(`span`,null,o(r(f)(`about.sections.origin.index`)),1),m(`div`,null,[m(`h3`,null,o(r(f)(`about.sections.origin.title`)),1),m(`p`,null,o(r(f)(`about.sections.origin.meta`)),1)])]),m(`div`,E,[m(`div`,D,[m(`span`,null,o(r(f)(`about.quadrants.aware`)),1),m(`strong`,null,o(r(f)(`about.quadrants.awareness`)),1),m(`span`,null,o(r(f)(`about.quadrants.unaware`)),1)]),m(`div`,{class:`quadrant-grid`,role:`group`,"aria-label":r(f)(`about.sections.origin.title`)},[(i(!0),n(c,null,s(d.value,e=>(i(),n(`article`,{key:e.key,"data-quadrant":e.key},[m(`span`,null,o(e.coordinate),1),m(`strong`,null,o(e.label),1),m(`p`,null,o(e.description),1)],8,k))),128))],8,O),m(`div`,A,[m(`span`,null,o(r(f)(`about.quadrants.unmastered`)),1),m(`strong`,null,o(r(f)(`about.quadrants.mastery`)),1),m(`span`,null,o(r(f)(`about.quadrants.mastered`)),1)]),m(`div`,j,[m(`p`,null,o(r(f)(`about.quadrants.immutable`)),1),m(`p`,null,o(r(f)(`about.quadrants.unclassified`)),1)])])]),m(`section`,M,[m(`header`,null,[m(`span`,null,o(r(f)(`about.sections.confirmation.index`)),1),m(`div`,null,[m(`h3`,null,o(r(f)(`about.sections.confirmation.title`)),1),m(`p`,null,o(r(f)(`about.sections.confirmation.meta`)),1)])]),m(`div`,N,[m(`table`,P,[m(`thead`,null,[m(`tr`,null,[m(`th`,F,o(r(f)(`about.sections.confirmation.title`)),1),m(`th`,I,o(r(f)(`about.statuses.descriptionHeader`)),1),m(`th`,L,o(r(f)(`about.statuses.entryCondition`)),1)])]),m(`tbody`,null,[(i(!0),n(c,null,s(p.value,e=>(i(),n(`tr`,{key:e.key,class:`status-definition-row`},[m(`th`,R,[m(`span`,{class:`label-token status-token`,"data-status":e.key},o(e.label),9,z)]),m(`td`,{"data-label":r(f)(`about.statuses.descriptionHeader`)},o(e.description),9,B),m(`td`,{"data-label":r(f)(`about.statuses.entryCondition`)},[m(`strong`,null,o(e.rule),1)],8,V)]))),128))])]),m(`div`,H,[m(`p`,null,o(r(f)(`about.statuses.usageBoundary`)),1),m(`p`,null,o(r(f)(`about.statuses.resetBoundary`)),1)])])]),m(`section`,U,[m(`div`,null,[m(`span`,null,o(r(f)(`about.example.title`)),1),m(`strong`,null,o(r(f)(`about.example.item`)),1)]),m(`div`,W,[m(`span`,te,o(r(f)(`about.example.profile`)),1),m(`span`,G,o(r(f)(`about.example.origin`)),1),m(`span`,K,o(r(f)(`about.example.status`)),1)]),m(`p`,null,o(r(f)(`about.example.description`)),1)]),m(`p`,q,o(r(f)(`about.allFilter`)),1)])],8,v))}}),[[`__scopeId`,`data-v-e657da2b`]]),Y={class:`open-source-credits`,"aria-labelledby":`credits-title`},X={class:`credit-grid`},Z=[`href`,`data-credit`],Q=[`src`,`onError`],ne={key:1,"aria-hidden":`true`},re={class:`credit-copy`},ie=[`title`],ae={class:`credit-source-note`},oe={class:`fuli-finale`},se={class:`finale-logo-plate`},ce=[`src`],le={class:`finale-brand`},ue={class:`finale-site-link`,"data-testid":`about-website-link`,href:`https://xn--8ovp9s.xn--m8txu.com/fuli/`,target:`_blank`,rel:`noreferrer`},de=p(a({__name:`OpenSourceCredits`,setup(a){let u=l(new Set),p=t(()=>[{name:`Vue.js`,role:f(`about.credits.roles.vue`),url:`https://vuejs.org/`,logo:`https://raw.githubusercontent.com/vuejs/docs/main/src/public/logo.svg`},{name:`Vite`,role:f(`about.credits.roles.vite`),url:`https://vite.dev/`,logo:`https://raw.githubusercontent.com/vitejs/vite/main/docs/public/logo-without-border.svg`},{name:`Pinia`,role:f(`about.credits.roles.pinia`),url:`https://pinia.vuejs.org/`,logo:`https://raw.githubusercontent.com/vuejs/pinia/v4/packages/docs/public/logo.svg`},{name:`D3.js`,role:f(`about.credits.roles.d3`),url:`https://d3js.org/`,logo:`https://raw.githubusercontent.com/d3/d3-logo/master/d3.svg`},{name:`Vitest`,role:f(`about.credits.roles.vitest`),url:`https://vitest.dev/`,logo:`https://raw.githubusercontent.com/vitest-dev/vitest/main/docs/public/logo-without-border.svg`},{name:`Hono`,role:f(`about.credits.roles.hono`),url:`https://hono.dev/`,logo:`https://raw.githubusercontent.com/honojs/website/main/public/images/logo.svg`},{name:`Neo4j`,role:f(`about.credits.roles.neo4j`),url:`https://neo4j.com/`,logo:`https://avatars.githubusercontent.com/u/201120?v=4`},{name:`Zod`,role:f(`about.credits.roles.zod`),url:`https://zod.dev/`,logo:`https://raw.githubusercontent.com/colinhacks/zod/main/packages/docs/public/logo/logo_square.png`},{name:`FastAPI`,role:f(`about.credits.roles.fastapi`),url:`https://fastapi.tiangolo.com/`,logo:`https://raw.githubusercontent.com/fastapi/fastapi/master/docs/en/docs/img/favicon.png`},{name:`Graphiti`,role:f(`about.credits.roles.graphiti`),url:`https://github.com/getzep/graphiti`,logo:`https://avatars.githubusercontent.com/u/132832125?s=128&v=4`},{name:`MCP`,role:f(`about.credits.roles.mcp`),url:`https://modelcontextprotocol.io/`,logo:`https://raw.githubusercontent.com/modelcontextprotocol/docs/main/favicon.svg`}]);return(t,a)=>(i(),n(`section`,Y,[e(_,{"title-id":`credits-title`,title:r(f)(`about.credits.title`),description:r(f)(`about.credits.description`)},null,8,[`title`,`description`]),m(`ul`,X,[(i(!0),n(c,null,s(p.value,e=>(i(),n(`li`,{key:e.name},[m(`a`,{class:`credit-card`,href:e.url,target:`_blank`,rel:`noreferrer`,"data-credit":e.name},[m(`span`,{class:d([`credit-mark`,{"is-fallback":u.has(e.name)}])},[u.has(e.name)?(i(),n(`span`,ne,o(e.name.charAt(0)),1)):(i(),n(`img`,{key:0,src:e.logo,alt:``,loading:`lazy`,referrerpolicy:`no-referrer`,onError:t=>u.add(e.name)},null,40,Q))],2),m(`span`,re,[m(`strong`,{title:e.name},o(e.name),9,ie),m(`small`,null,o(e.role),1)]),a[0]||=m(`span`,{class:`credit-arrow`,"aria-hidden":`true`},`↗`,-1)],8,Z)]))),128))]),m(`p`,ae,o(r(f)(`about.credits.sourceNote`)),1),m(`footer`,oe,[m(`span`,se,[m(`img`,{src:r(h),alt:``,"aria-hidden":`true`},null,8,ce)]),m(`div`,le,[m(`strong`,null,o(r(f)(`common.brand`)),1),a[1]||=m(`span`,null,`Context Graph`,-1)]),m(`p`,null,o(r(f)(`about.credits.finale`)),1),m(`a`,ue,o(r(f)(`about.credits.website`)),1)])]))}}),[[`__scopeId`,`data-v-c9330c37`]]),fe={class:`product-principles`,"aria-labelledby":`principles-title`},pe={class:`principle-sequence`},me={class:`principle-boundaries`},he=[`data-boundary`],ge=p(a({__name:`ProductPrinciples`,setup(a){let l=t(()=>[{key:`capture`,index:f(`about.philosophy.capture.index`),title:f(`about.philosophy.capture.title`),description:f(`about.philosophy.capture.description`)},{key:`project`,index:f(`about.philosophy.project.index`),title:f(`about.philosophy.project.title`),description:f(`about.philosophy.project.description`)},{key:`review`,index:f(`about.philosophy.review.index`),title:f(`about.philosophy.review.title`),description:f(`about.philosophy.review.description`)},{key:`reuse`,index:f(`about.philosophy.reuse.index`),title:f(`about.philosophy.reuse.title`),description:f(`about.philosophy.reuse.description`)}]),u=t(()=>[{key:`local`,title:f(`about.philosophy.local.title`),description:f(`about.philosophy.local.description`)},{key:`authority`,title:f(`about.philosophy.authority.title`),description:f(`about.philosophy.authority.description`)},{key:`scope`,title:f(`about.philosophy.scope.title`),description:f(`about.philosophy.scope.description`)}]);return(t,a)=>(i(),n(`section`,fe,[e(_,{"title-id":`principles-title`,title:r(f)(`about.philosophy.sectionTitle`),description:r(f)(`about.philosophy.support`)},null,8,[`title`,`description`]),m(`div`,pe,[(i(!0),n(c,null,s(l.value,e=>(i(),n(`article`,{key:e.key},[m(`span`,null,o(e.index),1),m(`div`,null,[m(`h3`,null,o(e.title),1),m(`p`,null,o(e.description),1)])]))),128))]),m(`div`,me,[m(`h3`,null,o(r(f)(`about.philosophy.boundariesTitle`)),1),m(`div`,null,[(i(!0),n(c,null,s(u.value,e=>(i(),n(`article`,{key:e.key},[m(`i`,{"data-boundary":e.key,"aria-hidden":`true`},null,8,he),m(`h4`,null,o(e.title),1),m(`p`,null,o(e.description),1)]))),128))])])]))}}),[[`__scopeId`,`data-v-caaf4c60`]]),_e=[`aria-label`],ve={class:`about-content`},ye={class:`about-opening`},be={class:`about-brand-lockup`},$={class:`about-logo-plate`},xe=[`src`],Se={class:`about-brand-name`},Ce={class:`about-opening-claim`},we={class:`about-opening-copy`},Te={class:`about-labels-section`,"aria-labelledby":`about-labels-title`},Ee=p(a({__name:`AboutPage`,setup(t){return(t,a)=>(i(),n(`section`,{class:`view about-view`,"aria-label":r(f)(`about.aria`)},[m(`div`,ve,[m(`header`,ye,[m(`div`,be,[m(`span`,$,[m(`img`,{"data-testid":`about-opening-logo`,src:r(h),alt:``,"aria-hidden":`true`},null,8,xe)]),m(`span`,Se,o(r(f)(`common.brand`)),1)]),m(`p`,Ce,o(r(f)(`about.philosophy.title`)),1),m(`p`,we,o(r(f)(`about.philosophy.intro`)),1)]),e(ge),m(`section`,Te,[e(_,{"title-id":`about-labels-title`,title:r(f)(`about.labelsIntro.title`),description:r(f)(`about.labelsIntro.description`)},null,8,[`title`,`description`]),e(J)]),e(de)])],8,_e))}}),[[`__scopeId`,`data-v-473e14a6`]]);export{Ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,C as t,D as n,Dt as r,E as i,J as a,M as o,Mt as s,T as c,ot as l,s as u,t as d,w as f}from"./_plugin-vue_export-helper-DKHjpKWY.js";import{h as p}from"./useApi-CROJJdhE-lwt7Bu-G.js";import{n as m,r as h}from"./attention-store-C0D-sZNV.js";var g={key:0,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.7`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},_={"aria-hidden":`true`},v=d(o({__name:`AgentHand`,props:{agentId:{},passive:{type:Boolean},countOnly:{type:Boolean}},setup(o){let d=o,v=h(),y=p(),b=t(()=>d.agentId?v.counts[d.agentId]??0:v.total);function x(e){d.passive||(e.preventDefault(),e.stopPropagation(),y?y.push(m(d.agentId)):v.show(d.agentId))}return(t,d)=>b.value?(a(),c(e(o.passive?`span`:`button`),{key:0,type:o.passive?void 0:`button`,class:`agent-hand`,"aria-label":r(u)(`attention.count`,{count:b.value}),title:r(u)(`attention.count`,{count:b.value}),onClick:x},{default:l(()=>[o.countOnly?i(``,!0):(a(),n(`svg`,g,[...d[0]||=[f(`path`,{d:`M8 13V5a1.5 1.5 0 0 1 3 0v6-8a1.5 1.5 0 0 1 3 0v8-6a1.5 1.5 0 0 1 3 0v7-3a1.5 1.5 0 0 1 3 0v6c0 4-2 7-6 7h-1c-3 0-4-1-6-4l-3-4a1.6 1.6 0 0 1 2.5-2z`},null,-1)]])),f(`span`,_,s(b.value),1)]),_:1},8,[`type`,`aria-label`,`title`])):i(``,!0)}}),[[`__scopeId`,`data-v-02a2e629`]]);export{v as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e,At as t,B as n,C as r,D as i,Dt as a,E as o,G as s,J as c,K as l,M as u,Mt as d,P as f,T as p,U as m,V as h,X as g,Z as _,b as v,it as y,k as b,kt as x,ot as S,s as C,t as ee,v as te,vt as w,w as T,wt as ne}from"./_plugin-vue_export-helper-DKHjpKWY.js";import{n as E,r as D,t as O}from"./button-BXkZ6rdB.js";import{c as re,i as k,r as A,t as ie}from"./Presence-9_BFOmAz.js";import{c as j,l as M,p as N,t as P,u as F}from"./dist-KV3E0kAK.js";import{a as I,c as L,t as R}from"./useForwardExpose-BRdp7olV.js";import{n as z,t as B}from"./Teleport-Co_blCnp.js";import{i as V,n as H,r as U}from"./PopperContent-Dtpk5py4.js";import{l as W}from"./client-BgxDxCVo.js";import{t as G}from"./UiIcon-CSLaDsID.js";import{c as K,d as q,l as J}from"./profile-model-C7xYkCgE.js";import{n as Y,r as ae}from"./occupation-catalog-CwMNzUWJ.js";import{t as oe}from"./label-table-BAIaH-tx.js";function se(e,t){let n=M(!1,300);N(()=>{n.value=!1});let r=w(null),i=P();function a(){r.value=null,n.value=!1}function o(e,t){if(!t)return;let i=e.currentTarget,a={x:e.clientX,y:e.clientY},o=le(a,ce(a,i.getBoundingClientRect()),1),s=ue(t.getBoundingClientRect()),c=fe([...o,...s]);r.value=c,n.value=!0}return y(n=>{if(e.value&&t.value){let r=e.value,i=t.value,a=e=>o(e,i),s=e=>o(e,r);r.addEventListener(`pointerleave`,a),i.addEventListener(`pointerleave`,s),n(()=>{r.removeEventListener(`pointerleave`,a),i.removeEventListener(`pointerleave`,s)})}}),y(n=>{if(r.value){let o=n=>{if(!r.value||!(n.target instanceof Element))return;let o=n.target,s={x:n.clientX,y:n.clientY},c=e.value?.contains(o)||t.value?.contains(o),l=!de(s,r.value),u=!!o.closest(`[data-grace-area-trigger]`);c?a():(l||u)&&(a(),i.trigger())},s=e.value?.ownerDocument;s?.addEventListener(`pointermove`,o),n(()=>s?.removeEventListener(`pointermove`,o))}}),{isPointerInTransit:n,onPointerExit:i.on}}function ce(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function le(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function ue(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function de(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,s=t[e].y,c=t[a].x,l=t[a].y;s>r!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function fe(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),pe(t)}function pe(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t.at(-1),n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n.at(-1),t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var[X,me]=re(`HoverCardRoot`),he=u({__name:`HoverCardRoot`,props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},openDelay:{type:Number,required:!1,default:700},closeDelay:{type:Number,required:!1,default:300},enableTouch:{type:Boolean,required:!1,default:!1}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,{openDelay:i,closeDelay:o,enableTouch:s}=ne(n);R();let l=L(n,`open`,r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),u=w(0),d=w(0),f=w(!1),m=w(!1),h=w(!1),g=w();function v(){clearTimeout(d.value),u.value=window.setTimeout(()=>l.value=!0,i.value)}function y(){clearTimeout(u.value),!f.value&&!m.value&&(d.value=window.setTimeout(()=>l.value=!1,o.value))}function b(){clearTimeout(u.value),l.value=!1}return me({open:l,onOpenChange(e){l.value=e},onOpen:v,onClose:y,onDismiss:b,hasSelectionRef:f,isPointerDownOnContentRef:m,isPointerInTransitRef:h,triggerElement:g,enableTouch:s}),(e,t)=>(c(),p(a(V),null,{default:S(()=>[_(e.$slots,`default`,{open:a(l)})]),_:3}))}});function Z(e){return t=>t.pointerType===`touch`?void 0:e()}function ge(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var _e=u({__name:`HoverCardContentImpl`,props:{memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`],setup(t,{emit:r}){let i=t,o=r,u=k(i),{forwardRef:d,currentElement:f}=R(),m=X(),{isPointerInTransit:g,onPointerExit:v}=se(m.triggerElement,f);F(m.isPointerInTransitRef,g,{direction:`rtl`}),v(()=>{m.onClose()});let b=w(!1),x;y(e=>{if(b.value){let t=document.body;x=t.style.userSelect||t.style.webkitUserSelect,t.style.userSelect=`none`,t.style.webkitUserSelect=`none`,e(()=>{t.style.userSelect=x,t.style.webkitUserSelect=x})}});function C(){b.value=!1,m.isPointerDownOnContentRef.value=!1,h(()=>{document.getSelection()?.toString()!==``&&(m.hasSelectionRef.value=!0)})}return s(()=>{f.value&&(document.addEventListener(`pointerup`,C),ge(f.value).forEach(e=>e.setAttribute(`tabindex`,`-1`))),I(window,`scroll`,e=>{e.target?.contains(m.triggerElement.value)&&m.onDismiss()},{capture:!0})}),l(()=>{document.removeEventListener(`pointerup`,C),m.hasSelectionRef.value=!1,m.isPointerDownOnContentRef.value=!1}),(t,r)=>(c(),p(a(z),{"as-child":``,"disable-outside-pointer-events":!1,onEscapeKeyDown:r[1]||=e=>o(`escapeKeyDown`,e),onPointerDownOutside:r[2]||=e=>o(`pointerDownOutside`,e),onFocusOutside:r[3]||=te(e=>o(`focusOutside`,e),[`prevent`]),onDismiss:a(m).onDismiss},{default:S(()=>[e(a(H),n({...a(u),...t.$attrs},{ref:a(d),"data-state":a(m).open.value?`open`:`closed`,style:{userSelect:b.value?`text`:void 0,WebkitUserSelect:b.value?`text`:void 0,"--reka-hover-card-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-hover-card-content-available-width":`var(--reka-popper-available-width)`,"--reka-hover-card-content-available-height":`var(--reka-popper-available-height)`,"--reka-hover-card-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-hover-card-trigger-height":`var(--reka-popper-anchor-height)`},onPointerdown:r[0]||=e=>{e.currentTarget.contains(e.target)&&(b.value=!0),a(m).hasSelectionRef.value=!1,a(m).isPointerDownOnContentRef.value=!0}}),{default:S(()=>[_(t.$slots,`default`)]),_:3},16,[`data-state`,`style`])]),_:3},8,[`onDismiss`]))}}),ve=u({__name:`HoverCardContent`,props:{forceMount:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`],setup(t,{emit:r}){let i=A(t,r),{forwardRef:o}=R(),s=X();return(r,l)=>(c(),p(a(ie),{present:t.forceMount||a(s).open.value},{default:S(()=>[e(_e,n(a(i),{ref:a(o),onPointerenter:l[0]||=e=>a(Z)(a(s).onOpen)(e)}),{default:S(()=>[_(r.$slots,`default`)]),_:3},16)]),_:3},8,[`present`]))}}),ye=u({__name:`HoverCardPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let n=e;return(e,r)=>(c(),p(a(B),t(f(n)),{default:S(()=>[_(e.$slots,`default`)]),_:3},16))}}),be=u({__name:`HoverCardTrigger`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`a`}},setup(t){let{forwardRef:n,currentElement:r}=R(),i=X();i.triggerElement=r;function o(){setTimeout(()=>{!i.isPointerInTransitRef.value&&!i.open.value&&i.onClose()},0)}function s(e){i.enableTouch.value&&e.pointerType===`touch`&&(i.open.value?i.onDismiss():i.onOpenChange(!0))}return(r,l)=>(c(),p(a(U),{"as-child":``,reference:t.reference},{default:S(()=>[e(a(D),{ref:a(n),"as-child":t.asChild,as:t.as,"data-state":a(i).open.value?`open`:`closed`,"data-grace-area-trigger":``,onPointerenter:l[0]||=e=>a(Z)(a(i).onOpen)(e),onPointerleave:l[1]||=e=>a(Z)(o)(e),onPointerup:s,onFocus:l[2]||=e=>a(i).onOpen(),onBlur:l[3]||=e=>a(i).onClose()},{default:S(()=>[_(r.$slots,`default`)]),_:3},8,[`as-child`,`as`,`data-state`])]),_:3},8,[`reference`]))}});function Q(e){let t=Y(e);return t?ae(t):oe(`occupations.builtinNames`,e)??C(`occupations.customName`)}function xe(e){return e?[...e.role?[e.role]:[],...e.tags.filter(t=>t!==e.role)].map(Q):[]}function Se(e,t,n){return W(`/api/project-agents/${encodeURIComponent(t)}/occupation`,{personalSpaceId:e,role:n.role,tags:n.tags})}var Ce=u({__name:`HoverCard`,props:{defaultOpen:{type:Boolean},open:{type:Boolean},openDelay:{},closeDelay:{},enableTouch:{type:Boolean}},emits:[`update:open`],setup(e,{emit:r}){let i=A(e,r);return(e,r)=>(c(),p(a(he),n({"data-slot":`hover-card`},a(i)),{default:S(n=>[_(e.$slots,`default`,t(f(n)))]),_:3},16))}}),we=u({inheritAttrs:!1,__name:`HoverCardContent`,props:{forceMount:{type:Boolean},memoDependencies:{},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},dir:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){let r=t,i=j(r,`class`),o=k(i);return(t,i)=>(c(),p(a(ye),null,{default:S(()=>[e(a(ve),n({"data-slot":`hover-card-content`},{...t.$attrs,...a(o)},{class:a(E)(`z-(--z-dialog) w-64 origin-(--reka-hover-card-content-transform-origin) rounded-lg border bg-popover p-4 text-popover-foreground shadow-(--shadow-popover) outline-none data-[state=open]:animate-popover-in`,r.class)}),{default:S(()=>[_(t.$slots,`default`)]),_:3},16,[`class`])]),_:3}))}}),Te=u({__name:`HoverCardTrigger`,props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){let t=e;return(e,r)=>(c(),p(a(be),n({"data-slot":`hover-card-trigger`},t),{default:S(()=>[_(e.$slots,`default`)]),_:3},16))}}),Ee={class:`agent-mention`},De={class:`agent-mention-title`},$={class:`agent-mention-list`},Oe={class:`agent-mention-text`},ke={key:0,class:`agent-mention-rest`,"aria-hidden":`true`},Ae={class:`agent-mention-state`},je={key:0},Me={class:`agent-mention-hint`},Ne={class:`sr-only`,role:`status`,"aria-live":`polite`},Pe=1800,Fe=250,Ie=200,Le=ee(u({__name:`AgentMentionCopy`,props:{name:{},partner:{default:null},size:{default:`sm`}},setup(t){let n=t,s=w(null),l=w(!1),u,f=r(()=>J(n.name)),p=r(()=>q(n.name,n.partner,(e,t)=>C(`agentProfiles.mention.${e}`,t))),h=r(()=>l.value?C(`agentProfiles.mention.copyFailed`):s.value?C(`agentProfiles.mention.copied`):``);async function _(e,t){clearTimeout(u);try{let n=globalThis.navigator?.clipboard;if(!n?.writeText)throw Error(`Clipboard unavailable`);await n.writeText(K(t)),s.value=e,l.value=!1}catch{s.value=null,l.value=!0}u=setTimeout(()=>{s.value=null,l.value=!1},Pe)}return m(()=>clearTimeout(u)),(n,r)=>(c(),i(`span`,Ee,[e(a(Ce),{"open-delay":Fe,"close-delay":Ie},{default:S(()=>[e(a(Te),{"as-child":``},{default:S(()=>[e(a(O),{variant:`outline`,size:t.size,class:x([`agent-mention-copy`,{"is-copied":s.value===`mention`}]),"data-agent-mention-copy":``,"aria-label":a(C)(`agentProfiles.mention.copyAgent`,{mention:f.value}),onClick:r[0]||=e=>_(`mention`,f.value)},{default:S(()=>[e(G,{name:s.value===`mention`?`check`:`copy`,size:14},null,8,[`name`]),b(` `+d(s.value===`mention`?a(C)(`agentProfiles.mention.copied`):a(C)(`agentProfiles.mention.copy`)),1)]),_:1},8,[`size`,`class`,`aria-label`])]),_:1}),e(a(we),{align:`end`,class:`agent-mention-card p-3`,style:{width:`min(340px, calc(100vw - 32px))`},"data-agent-mention-card":``},{default:S(()=>[T(`p`,De,d(a(C)(`agentProfiles.mention.title`,{name:t.name})),1),T(`ul`,$,[(c(!0),i(v,null,g(p.value,t=>(c(),i(`li`,{key:t.key},[e(a(O),{variant:`ghost`,class:x([`agent-mention-phrasing`,{"is-copied":s.value===t.key}]),"data-mention-phrasing":t.key,"aria-label":a(C)(`agentProfiles.mention.copyPhrasing`,{text:t.text}),onClick:e=>_(t.key,t.text)},{default:S(()=>[T(`span`,Oe,[b(d(t.text),1),t.open?(c(),i(`span`,ke,` …`)):o(``,!0)]),T(`span`,Ae,[s.value===t.key?(c(),i(`span`,je,d(a(C)(`agentProfiles.mention.copied`)),1)):o(``,!0),e(G,{name:s.value===t.key?`check`:`copy`,size:14},null,8,[`name`])])]),_:2},1032,[`class`,`data-mention-phrasing`,`aria-label`,`onClick`])]))),128))]),T(`p`,Me,d(a(C)(`agentProfiles.mention.hint`)),1)]),_:1})]),_:1}),T(`span`,Ne,d(h.value),1)]))}}),[[`__scopeId`,`data-v-8c6eb4b4`]]);export{Se as i,Q as n,xe as r,Le as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.agent-mention[data-v-8c6eb4b4]{flex:none;display:inline-flex}.agent-mention-copy.is-copied[data-v-8c6eb4b4],.agent-mention-phrasing.is-copied .agent-mention-state[data-v-8c6eb4b4]{color:var(--color-success)}.agent-mention-title[data-v-8c6eb4b4]{color:var(--color-ink);font-size:13px;font-weight:var(--weight-strong);overflow-wrap:anywhere;margin:0 0 8px;line-height:1.5}.agent-mention-list[data-v-8c6eb4b4]{gap:6px;margin:0;padding:0;list-style:none;display:grid}.agent-mention-phrasing[data-v-8c6eb4b4]{border:1px solid var(--color-border);border-radius:var(--radius-control);background:var(--color-surface-subtle);width:100%;height:auto;color:var(--color-ink);text-align:left;white-space:normal;justify-content:space-between;gap:10px;padding:8px 10px}.agent-mention-phrasing[data-v-8c6eb4b4]:hover:not(:disabled){border-color:var(--color-border-strong);background:var(--color-surface-hover)}.agent-mention-text[data-v-8c6eb4b4]{min-width:0;font-family:var(--font-mono);overflow-wrap:anywhere;font-size:12px;font-weight:500;line-height:1.55}.agent-mention-rest[data-v-8c6eb4b4]{color:var(--color-faint)}.agent-mention-state[data-v-8c6eb4b4]{color:var(--color-muted);font-size:12px;font-weight:var(--weight-medium);flex:none;align-items:center;gap:4px;display:inline-flex}.agent-mention-hint[data-v-8c6eb4b4]{color:var(--color-muted);margin:8px 0 0;font-size:12px;line-height:1.5}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Dt as e,J as t,M as n,Mt as r,T as i,k as a,ot as o,t as s}from"./_plugin-vue_export-helper-DKHjpKWY.js";import{t as c}from"./vue-router-B6l0ZzTV.js";import{n as l}from"./profile-model-C7xYkCgE.js";var u=s(n({__name:`AgentName`,props:{spaceId:{},agentId:{},name:{}},setup(n){return(s,u)=>(t(),i(e(c),{class:`agent-name-link`,to:e(l)(n.spaceId,n.agentId)},{default:o(()=>[a(r(n.name),1)]),_:1},8,[`to`]))}}),[[`__scopeId`,`data-v-4c868995`]]);export{u as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e,C as t,D as n,Dt as r,E as i,G as a,J as o,M as s,Mt as c,T as l,X as u,b as d,h as f,jt as p,k as m,kt as h,ot as g,rt as _,s as v,st as y,t as b,v as x,vt as S,w as C}from"./_plugin-vue_export-helper-DKHjpKWY.js";import{t as w}from"./console-KIWUM9xy.js";import{h as T,m as E}from"./useApi-CROJJdhE-lwt7Bu-G.js";import{t as D}from"./vue-router-B6l0ZzTV.js";import{t as O}from"./button-BXkZ6rdB.js";import{i as k,n as A,r as j,t as M}from"./AgentMentionCopy-BHFp527T.js";import{n as N,r as ee,t as P}from"./TabsTrigger-BTZQbe9n.js";import{t as F}from"./TabsContent-ZCMehxYx.js";import{t as I}from"./GrowthLoading-CTsRhLfj.js";import{a as te,l as L}from"./client-BgxDxCVo.js";import{r as R}from"./ui-CMR2UkVp.js";import{t as z}from"./UiSelect-Cs53P6h-.js";import{t as ne}from"./agent-avatar-CBfHZX_0.js";import{t as re}from"./agent-identity-color-RqpT7gtx.js";import{i as ie,o as ae,r as oe,s as se,t as B,u as ce}from"./profile-model-C7xYkCgE.js";import{a as le,h as ue,l as de,n as fe}from"./task-evidence-B2smSxDg.js";import{n as pe}from"./useAgentRecords-D3upwp_U.js";import{n as me}from"./paths-CDREouhi.js";import{n as he}from"./page-title-B2inyRB1.js";import{t as V}from"./Card-BOk3WbC1.js";import{t as ge}from"./badge-CBT_nrTA.js";import{t as _e}from"./BackLink-C0mcoSn4.js";import{t as ve}from"./UiDisclosure-D3xZRwVK.js";import{t as ye}from"./AgentName-ChhbnrG9.js";import{i as be,n as xe,t as H}from"./occupation-catalog-CwMNzUWJ.js";import{n as Se,t as Ce}from"./TaskExecutionPlan-B411P1VJ.js";import{y as we}from"./task-labels-De_F8I3O.js";import{a as Te,i as Ee,n as De}from"./agent-work-summary-CUMg6XKp.js";import{c as Oe,o as ke}from"./agent-profile.css_vue_type_style_index_0_src_true_lang-Cmz1y1IL.js";import{t as Ae}from"./project-team-api-DNSZitOp.js";import{t as je}from"./orchestration-filters-DhxYUaNx.js";var U=[`title`],Me=b(s({__name:`ActivityOriginBadge`,props:{origin:{}},setup(e){return(t,a)=>e.origin?.kind===`ai_internal`?(o(),n(`span`,{key:0,class:`ui-badge activity-origin-badge`,"data-activity-origin":``,title:r(v)(`agentProfiles.activityOrigin.sources.${e.origin.source}`)},c(r(v)(`agentProfiles.activityOrigin.label`,{purpose:r(v)(`agentProfiles.activityOrigin.purposes.${e.origin.purpose}`)})),9,U)):i(``,!0)}}),[[`__scopeId`,`data-v-8e8c076b`]]),W={key:1,class:`agent-locked-platforms`},G={key:2,class:`agent-platform-field`},K=[`disabled`,`placeholder`],q=[`onUpdate:modelValue`,`disabled`],J={key:3,role:`alert`},Ne={key:4,role:`status`},Pe=s({__name:`AgentProfileSettings`,props:{agent:{}},emits:[`saved`],setup(a,{emit:s}){let p=a,h=s,b=S([]),w=S(!1),T=S(!1),E=S(``),D=S(!1),k=``,A=S(``),j=S(``),M=S({judgment:``,taste:``,personality:``}),N=t(()=>p.agent.profile.executorPolicy?.mode===`locked`),ee=t(()=>{let e=p.agent.profile.executorPolicy;return(e?.lockedExecutorIds?.length?e.lockedExecutorIds:(e?.allowList??[]).map(e=>e.executorId)).map(e=>b.value.find(t=>t.executorId===e)?.displayName||e)}),P=t(()=>b.value.filter(e=>e.registrationStatus===`registered`&&e.permissionStatus===`authorized`&&e.preflightStatus===`passed`&&e.workspacePermission&&e.healthStatus!==`unhealthy`&&(!e.healthRequired||e.healthStatus===`healthy`))),F=t(()=>[{value:``,label:v(`agentProfiles.automatic`)},...A.value&&!P.value.some(e=>e.executorId===A.value)?[{value:A.value,label:v(`agentProfiles.platformUnavailable`),disabled:!0}]:[],...P.value.map(e=>({value:e.executorId,label:e.displayName||e.executorId}))]),R=0;_(()=>`${p.agent.personalSpaceId}/${p.agent.agentId}`,async()=>{let e=p.agent,t=++R;j.value=e.profile.expectations??``,M.value={judgment:``,taste:``,personality:``,...e.profile.character},A.value=e.profile.executorPolicy?.preferredExecutorIds?.[0]??``,k=A.value,E.value=``,D.value=!1,T.value=!1,w.value=!0,b.value=[];try{let n=await te(`/api/executors?${new URLSearchParams({personalSpaceId:e.personalSpaceId})}`);t===R&&(b.value=Array.isArray(n)?n:n.executors)}catch{t===R&&(E.value=v(`agentProfiles.platformUnavailable`))}finally{t===R&&(w.value=!1)}},{immediate:!0});async function ne(){if(T.value)return;let e=R,t=p.agent;T.value=!0,E.value=``,D.value=!1;let n=t.profile.executorPolicy;try{let r=await L(`/api/project-agents`,{personalSpaceId:t.personalSpaceId,personalProjectId:t.personalProjectId??null,agentId:t.agentId,profile:{...t.profile,character:{...M.value},expectations:j.value,executorPolicy:N.value||A.value===k?n:{...n,mode:`flexible`,preferredExecutorIds:A.value?[A.value]:[]}}});e===R&&(k=A.value,h(`saved`,r),D.value=!0)}catch(t){e===R&&(E.value=t instanceof Error?t.message:v(`agentProfiles.saveError`))}finally{e===R&&(T.value=!1)}}return(t,a)=>(o(),n(`form`,{class:`agent-simple-settings`,onSubmit:x(ne,[`prevent`])},[C(`h3`,null,c(r(v)(`agentProfiles.settings`)),1),w.value?(o(),l(I,{key:0,variant:`compact`,label:r(v)(`agentProfiles.settingsLoading`)},null,8,[`label`])):N.value?(o(),n(`div`,W,[C(`h4`,null,c(r(v)(`agentProfiles.platform`)),1),C(`p`,null,c(ee.value.join(` · `)||r(v)(`agentProfiles.platformUnavailable`)),1),C(`small`,null,c(r(v)(`agentProfiles.locked`)),1)])):(o(),n(`div`,G,[e(z,{modelValue:A.value,"onUpdate:modelValue":a[0]||=e=>A.value=e,field:``,label:r(v)(`agentProfiles.platform`),options:F.value,disabled:N.value||T.value},null,8,[`modelValue`,`label`,`options`,`disabled`]),C(`small`,null,c(r(v)(N.value?`agentProfiles.locked`:`agentProfiles.platformHint`)),1)])),C(`label`,null,[m(c(r(v)(`agentProfiles.expectations`)),1),y(C(`textarea`,{"onUpdate:modelValue":a[1]||=e=>j.value=e,rows:`3`,maxlength:`4096`,disabled:T.value,placeholder:r(v)(`agentProfiles.expectationsPlaceholder`)},null,8,K),[[f,j.value]])]),C(`details`,null,[C(`summary`,null,c(r(v)(`agentProfiles.editCharacter`)),1),(o(),n(d,null,u([`judgment`,`taste`,`personality`],e=>C(`label`,{key:e},[m(c(r(v)(`agentProfiles.${e}`)),1),y(C(`textarea`,{"onUpdate:modelValue":t=>M.value[e]=t,rows:`2`,maxlength:`2048`,disabled:T.value},null,8,q),[[f,M.value[e]]])])),64))]),E.value?(o(),n(`p`,J,c(E.value),1)):i(``,!0),D.value?(o(),n(`p`,Ne,c(r(v)(`agentProfiles.saved`)),1)):i(``,!0),e(r(O),{size:`sm`,disabled:w.value,loading:T.value,"loading-label":r(v)(`agentProfiles.saving`),type:`submit`},{default:g(()=>[m(c(r(v)(`agentProfiles.save`)),1)]),_:1},8,[`disabled`,`loading`,`loading-label`])],32))}}),Fe={key:0,class:`agent-occupation-editor`,"data-occupation-locked":``},Ie={class:`ui-meta`},Y={class:`ui-meta`},Le=[`disabled`],Re={class:`ui-meta`},ze={key:0,class:`agent-occupation-main`},X={key:0,role:`alert`},Be={key:1,role:`status`},Ve=b(s({__name:`AgentOccupationEditor`,props:{agent:{}},emits:[`saved`],setup(a,{emit:s}){let f=a,p=s,h=S(``),y=S([]),b=S(!1),w=S(``),T=S(!1);_(()=>f.agent.occupation,e=>{h.value=e?.role??``,y.value=(e?.tags??[]).filter(t=>t!==e?.role)},{immediate:!0}),_(h,e=>{e&&(y.value=y.value.filter(t=>t!==e))});let E=be(t(()=>f.agent.personalSpaceId)),D=t(()=>{let e=E.active.value.map(e=>e.key),t=[f.agent.occupation?.role,...f.agent.occupation?.tags??[]].filter(e=>!!e);return[...new Set([...e,...t])]}),M=e=>{let t=xe(e);return t?H(t):void 0},N=t(()=>[{value:``,label:v(`agentRedesign.occupation.none`)},...D.value.map(e=>({value:e,label:A(e)}))]);function ee(e){T.value=!1,y.value=y.value.includes(e)?y.value.filter(t=>t!==e):[...y.value,e]}async function P(){b.value=!0,w.value=``,T.value=!1;try{let e=await k(f.agent.personalSpaceId,f.agent.agentId,{role:h.value||null,tags:y.value});p(`saved`,e),T.value=!0}catch(e){w.value=e instanceof Error?e.message:v(`agentRedesign.occupation.saveError`)}finally{b.value=!1}}return(t,s)=>a.agent.occupationLocked?(o(),n(`section`,Fe,[C(`h3`,null,c(r(v)(`agentRedesign.occupation.title`)),1),C(`p`,Ie,c(r(v)(`agentRedesign.occupation.locked`,{occupation:r(j)(a.agent.occupation).join(` · `)||r(v)(`agentRedesign.occupation.none`)})),1)])):(o(),n(`form`,{key:1,class:`agent-occupation-editor`,"data-occupation-editor":``,onSubmit:x(P,[`prevent`])},[C(`h3`,null,c(r(v)(`agentRedesign.occupation.title`)),1),C(`p`,Y,c(r(v)(`agentRedesign.occupation.note`)),1),e(z,{modelValue:h.value,"onUpdate:modelValue":[s[0]||=e=>h.value=e,s[1]||=e=>T.value=!1],field:``,label:r(v)(`agentRedesign.occupation.role`),options:N.value,disabled:b.value},null,8,[`modelValue`,`label`,`options`,`disabled`]),C(`fieldset`,{class:`agent-occupation-tags`,disabled:b.value},[C(`legend`,null,[m(c(r(v)(`agentRedesign.occupation.tags`))+` `,1),C(`small`,Re,c(r(v)(`agentRedesign.occupation.tagsHint`)),1)]),r(E).loading.value&&!r(E).active.value.length?(o(),l(I,{key:0,variant:`inline`,label:r(v)(`occupations.loading`)},null,8,[`label`])):i(``,!0),(o(!0),n(d,null,u(D.value,e=>(o(),l(r(O),{size:`sm`,variant:`ghost`,key:e,"data-occupation-tag":e,"aria-pressed":y.value.includes(e),disabled:e===h.value||!y.value.includes(e)&&y.value.length>=r(5),title:e===h.value?r(v)(`agentRedesign.occupation.isMainRole`):M(e),onClick:t=>ee(e)},{default:g(()=>[m(c(r(A)(e)),1),e===h.value?(o(),n(`small`,ze,` · `+c(r(v)(`agentRedesign.occupation.mainRoleShort`)),1)):i(``,!0)]),_:2},1032,[`data-occupation-tag`,`aria-pressed`,`disabled`,`title`,`onClick`]))),128))],8,Le),w.value?(o(),n(`p`,X,c(w.value),1)):i(``,!0),T.value?(o(),n(`p`,Be,c(r(v)(`agentRedesign.occupation.saved`)),1)):i(``,!0),e(r(O),{size:`sm`,type:`submit`,loading:b.value,"loading-label":r(v)(`agentRedesign.occupation.saving`)},{default:g(()=>[m(c(r(v)(`agentRedesign.occupation.save`)),1)]),_:1},8,[`loading`,`loading-label`])],32))}}),[[`__scopeId`,`data-v-689e0565`]]),He=[`aria-expanded`,`data-occupation`],Ue={class:`occupation-chip-detail`,"data-occupation-detail":``},We={key:0},Ge=b(s({__name:`OccupationChip`,props:{occupationKey:{},main:{type:Boolean}},setup(a){let s=a,l=S(null),u=t(()=>xe(s.occupationKey)),f=t(()=>A(s.occupationKey));function p(e){l.value=e.currentTarget.getBoundingClientRect()}return(t,s)=>(o(),n(d,null,[C(`button`,{type:`button`,class:h([`occupation-chip`,{"is-main":a.main}]),"aria-expanded":!!l.value,"data-occupation":a.occupationKey,onClick:p},c(f.value),11,He),e(r(R),{open:!!l.value,anchor:l.value,label:f.value,onClose:s[1]||=e=>l.value=null},{default:g(()=>[C(`div`,Ue,[C(`strong`,null,c(f.value),1),C(`p`,null,c(u.value?r(H)(u.value):r(v)(`occupations.noDescription`)),1),u.value?(o(),n(`small`,We,c(r(v)(`occupations.agentCount`,{count:u.value.agent_count})),1)):i(``,!0),e(r(D),{to:`/project-agents/occupations`,onClick:s[0]||=e=>l.value=null},{default:g(()=>[m(c(r(v)(`occupations.manage`)),1)]),_:1})])]),_:1},8,[`open`,`anchor`,`label`])],64))}}),[[`__scopeId`,`data-v-6314de26`]]),Z=[`aria-label`],Ke={class:`agent-rename-copy`},qe={key:0,class:`agent-rename-error`,role:`alert`},Q={class:`agent-rename-actions`},Je=b(s({__name:`AgentRenameHint`,props:{agent:{}},emits:[`saved`],setup(a,{emit:s}){let l=a,u=s,d=S(!1),f=S(!1),p=S(``),h=t(()=>l.agent.nameSuggestion??``);_(()=>l.agent.agentId,()=>{d.value=!1,p.value=``});async function y(){if(f.value||!h.value)return;let e=l.agent;f.value=!0,p.value=``;try{u(`saved`,await L(`/api/project-agents`,{personalSpaceId:e.personalSpaceId,personalProjectId:null,agentId:e.agentId,profile:{...e.profile,displayName:h.value}}))}catch(e){p.value=v(`agentProfiles.rename.failed`,{reason:e instanceof Error?e.message:v(`agentProfiles.saveError`)})}finally{f.value=!1}}return(t,s)=>h.value&&!d.value?(o(),n(`section`,{key:0,class:`agent-rename-hint`,"data-agent-rename-hint":``,"aria-label":r(v)(`agentProfiles.rename.title`)},[C(`div`,Ke,[C(`h3`,null,c(r(v)(`agentProfiles.rename.title`)),1),C(`p`,null,c(r(v)(`agentProfiles.rename.body`,{name:r(B)(a.agent)})),1),p.value?(o(),n(`p`,qe,c(p.value),1)):i(``,!0)]),C(`div`,Q,[e(r(O),{size:`sm`,"data-agent-rename-apply":``,loading:f.value,"loading-label":r(v)(`agentProfiles.rename.saving`,{name:h.value}),onClick:y},{default:g(()=>[m(c(r(v)(`agentProfiles.rename.apply`,{name:h.value})),1)]),_:1},8,[`loading`,`loading-label`]),e(r(O),{variant:`ghost`,size:`sm`,"data-agent-rename-keep":``,disabled:f.value,onClick:s[0]||=e=>d.value=!0},{default:g(()=>[m(c(r(v)(`agentProfiles.rename.keep`)),1)]),_:1},8,[`disabled`])])],8,Z)):i(``,!0)}}),[[`__scopeId`,`data-v-249436b8`]]),Ye=[`aria-label`],Xe={class:`@container mx-auto grid w-full max-w-(--layout-max) gap-4`},Ze={key:1,class:`ui-card ui-empty agent-profile-empty`,role:`alert`},Qe={key:2,class:`ui-card ui-empty agent-profile-empty`},$e=[`src`],et={class:`agent-resume-intro grid min-w-0 flex-[1_1_360px] gap-2`},tt={class:`agent-resume-name-row flex-wrap justify-start gap-2`},nt={key:0,class:`ui-badge fla-employee-number`},rt={class:`agent-resume-occupation`,"data-profile-occupation":``},it={key:1,class:`ui-meta`},at={class:`agent-resume-summary`},ot={class:`agent-resume-meta`},st={class:`agent-profile-actions`},ct={key:1,class:`agent-profile-refresh-status`,role:`status`},lt={key:1,class:`agent-profile-partial`,role:`status`},ut={class:`agent-profile-primary-grid`},dt={class:`agent-section-heading`},ft={id:`agent-current-work-heading`},pt={key:0},mt={key:0,class:`agent-current-work-list`},ht={key:1,class:`agent-muted`},gt={key:2,class:`agent-muted`},_t={class:`agent-section-heading`},vt={id:`agent-projects-heading`},yt={class:`agent-resume-list agent-current-project-list`},bt={key:0,class:`agent-project-responsibility`},xt={class:`agent-resume-list`},St={key:0,class:`agent-project-responsibility`},Ct={key:1,class:`agent-muted`},wt={class:`agent-profile-history-grid`},Tt={id:`agent-history-projects-heading`},Et={key:0,class:`ui-disclosure`,open:``},Dt={class:`agent-resume-list`},Ot={key:1,class:`agent-muted`},kt={id:`agent-history-recent-heading`},At={class:`agent-work-timeline`},jt={key:0,"data-profile-departure":``},Mt={class:`agent-section-heading`},Nt={key:0},Pt={key:1},Ft={key:0},It={key:0,class:`agent-muted`},Lt={class:`agent-character`},Rt={key:0,class:`agent-expectation`},zt={class:`agent-strengths`},Bt={class:`agent-inline-skills`},Vt={key:0},Ht={class:`agent-profile-history-grid`},Ut={class:`agent-section-heading`},Wt={id:`agent-organization-heading`},Gt={key:0,role:`status`},Kt={key:0,class:`agent-org-lead-unavailable`,role:`status`},qt={key:1,class:`agent-org-lead`},Jt={key:2,class:`agent-org-reporting`},Yt={key:3,class:`agent-org-members`},Xt={key:2,class:`agent-muted`},Zt={key:0,class:`agent-muted`},Qt={id:`agent-worked-with-heading`},$t={class:`agent-collaborators`},en={key:0,class:`agent-muted`},tn={class:`agent-muted`},nn={class:`agent-profile-management-links`},$=b(s({__name:`AgentProfilePage`,setup(s){let f=E(),y=T(),b=w(),x=t(()=>b.activePersonalSpace?.id??``),k=t(()=>f.params.spaceId===x.value?String(f.params.agentId??``):``),A=pe(x,t(()=>k.value?[k.value]:[])),{loading:j,error:L}=A,R=()=>A.load({force:!0}),z=t(()=>k.value?A.records.value[k.value]:void 0),xe=t(()=>(b.state?.personalProjects??[]).filter(e=>e.personal_space_id===x.value)),H=e=>xe.value.find(t=>t.project_id===e)?.profile.name||e,U=S([]),W=S(void 0),G=S([]),K=S(!1),q=S(!1),J=S(!1),Ne=t(()=>{let e=[{id:`overview`,label:v(`agentProfiles.overviewTab`)},{id:`history`,label:v(`agentProfiles.experience`)},{id:`style`,label:v(`agentProfiles.about`)},{id:`collaborators`,label:v(`agentProfiles.collaborators`)},{id:`management`,label:v(`agentProfiles.advanced`)}];return z.value?.memoryScope===`reviewed_agent`&&e.splice(4,0,{id:`conversations`,label:v(`projectAgents.conversations.title`)}),e}),Fe=t({get:()=>{let e=f.query.tab;return Ne.value.find(t=>t.id===e)?.id??`overview`},set:e=>{let{tab:t,...n}=f.query;y.replace({query:e===`overview`?n:{...n,tab:e}})}});he(()=>z.value?B(z.value):``);let Ie=/^\/project-agents(\?|$)/,Y=t(()=>z.value?ie(z.value.agentId,U.value):[]),Le=pe(x,t(()=>Y.value.map(e=>e.agentId))),Re=t(()=>z.value?ae(z.value,Y.value.flatMap(e=>Le.records.value[e.agentId]??[])):null),ze=e=>{let t=Le.records.value[e];return t?B(t):e},X=t(()=>z.value?se({...z.value,assignments:W.value??z.value.assignments}):[]),Be=t(()=>xe.value.filter(e=>X.value.includes(e.project_id)).map(e=>({id:e.project_id,name:e.profile.name}))),He=t(()=>X.value.slice(0,4)),Ue=t(()=>X.value.slice(4)),We=t(()=>(W.value??[]).filter(e=>e.status!==`active`)),Z=t(()=>U.value.filter(e=>Te.has(e.status)).slice(0,6)),Ke=t(()=>{let e=z.value?.occupation;return e?[...new Set([...e.role?[e.role]:[],...e.tags])]:[]});be(t(()=>z.value?.personalSpaceId??``));let qe=t(()=>ke.value.find(e=>e.agentId===z.value?.agentId)),Q=e=>e&&!Number.isNaN(Date.parse(e))?new Date(e).toLocaleDateString():v(`agentProfiles.timeUnknown`),$=e=>{let t=W.value?.find(t=>t.personalProjectId===e&&t.status===`active`)?.responsibility?.trim(),n=z.value?.profile.responsibility.trim();return t&&t!==n?t:``},rn=t(()=>{let e=`agentRedesign.projects.more`,t=v(e,{count:X.value.length});return t===e?`All projects (${X.value.length})`:t}),an=0;_(()=>z.value?`${z.value.personalSpaceId}/${z.value.agentId}`:``,async()=>{let e=z.value,t=++an;if(U.value=[],W.value=void 0,G.value=[],q.value=!1,K.value=!1,J.value=!1,!e)return;Oe(e.personalSpaceId),K.value=!0,W.value=e.assignments;let n=new URLSearchParams({personalSpaceId:e.personalSpaceId,agentId:e.agentId}),r=new URLSearchParams({personalSpaceId:e.personalSpaceId,agentId:e.agentId}),i=await Promise.allSettled([te(`/api/project-agent-tasks?${n}&limit=200`),te(`/api/project-agent-assignments?${r}`)]);if(t!==an)return;let[a,o]=i;if(a.status===`fulfilled`){let t=a.value,n=ue(t);q.value=!De(t),U.value=fe(Array.isArray(t)?t:n.tasks??n.items).map(de).filter(t=>!(!t||t.personalSpaceId&&t.personalSpaceId!==e.personalSpaceId||!Ee(t,e.agentId))).sort((e,t)=>(t.updatedAt??t.createdAt??``).localeCompare(e.updatedAt??e.createdAt??``))}else q.value=!0;if(o.status===`fulfilled`){let t=o.value,n=ue(t);W.value=fe(Array.isArray(t)?t:n.assignments??n.items).map(t=>le(t,e)).filter(t=>!!(t&&t.agentId===e.agentId&&t.personalSpaceId===e.personalSpaceId))}else q.value=!0;let s=se({...e,assignments:W.value??e.assignments}),c=await Promise.all(s.map(async t=>{try{return{projectId:t,view:await Ae(e.personalSpaceId,t),error:!1}}catch{return{projectId:t,view:null,error:!0}}}));t===an&&(G.value=c,K.value=!1)},{immediate:!0});function on(e){z.value&&A.put(k.value,{...z.value,...e})}return a(()=>{b.runtimeStatus===`idle`&&b.refresh()}),(t,a)=>(o(),n(`section`,{class:`view agent-profile-page`,"aria-label":z.value?r(B)(z.value):r(v)(`agentProfiles.profile`)},[C(`div`,Xe,[e(_e,{class:`agent-profile-back`,to:`/project-agents`,from:Ie},{default:g(()=>[m(c(r(v)(`agentProfiles.back`)),1)]),_:1}),(r(j)||r(b).runtimeStatus===`loading`)&&!z.value?(o(),l(I,{key:0,label:r(v)(`agentProfiles.loading`)},null,8,[`label`])):(r(L)||r(b).runtimeStatus===`error`)&&!z.value?(o(),n(`div`,Ze,[C(`p`,null,c(r(L)||r(v)(`agentProfiles.loadError`)),1),e(r(O),{size:`sm`,variant:`outline`,onClick:a[0]||=e=>r(b).state?R():r(b).refresh()},{default:g(()=>[m(c(r(v)(`agentProfiles.retry`)),1)]),_:1})])):z.value?(o(),n(d,{key:3},[e(r(V),{as:`header`,class:`agent-resume-header`},{default:g(()=>[C(`span`,{class:`agent-portrait agent-identity`,style:p(r(re)(z.value.agentId)),"aria-hidden":`true`},[C(`img`,{src:r(ne)(z.value.agentId),alt:``},null,8,$e)],4),C(`div`,et,[C(`div`,tt,[z.value.employeeNumber?(o(),n(`span`,nt,`FLA `+c(z.value.employeeNumber),1)):i(``,!0),C(`span`,{class:h([`ui-badge agent-profile-membership`,`is-${z.value.profile.status}`])},c(r(v)(`projectAgents.status.${z.value.profile.status}`)),3)]),C(`p`,rt,[Ke.value.length?(o(!0),n(d,{key:0},u(Ke.value,(e,t)=>(o(),l(Ge,{key:e,"occupation-key":e,main:t===0&&!!z.value.occupation?.role},null,8,[`occupation-key`,`main`]))),128)):(o(),n(`span`,it,c(r(v)(`agentRedesign.occupation.notSet`)),1))]),C(`p`,at,c(r(oe)(z.value)),1),C(`div`,ot,[C(`span`,null,c(r(v)(z.value.recruitedAt?`agentProfiles.joined`:`agentProfiles.created`))+` · `+c(Q(z.value.recruitedAt||z.value.createdAt)),1)])]),C(`div`,st,[r(ce)(z.value)?(o(),l(M,{key:0,size:`default`,name:r(B)(z.value),partner:Re.value},null,8,[`name`,`partner`])):i(``,!0),qe.value?(o(),l(r(O),{key:1,"as-child":``,variant:`outline`},{default:g(()=>[e(r(D),{to:`/employees/${encodeURIComponent(qe.value.id)}`},{default:g(()=>[m(c(r(v)(`agentProfiles.workbench`)),1)]),_:1},8,[`to`])]),_:1})):i(``,!0),e(r(O),{variant:`outline`,"aria-expanded":J.value,onClick:a[1]||=e=>J.value=!J.value},{default:g(()=>[m(c(r(v)(`agentProfiles.settings`)),1)]),_:1},8,[`aria-expanded`])])]),_:1}),e(Je,{agent:z.value,onSaved:on},null,8,[`agent`]),r(j)||r(b).runtimeStatus===`loading`?(o(),l(I,{key:0,variant:`compact`,label:r(v)(`agentProfiles.loading`)},null,8,[`label`])):i(``,!0),r(L)?(o(),n(`p`,ct,c(r(L)),1)):i(``,!0),J.value?(o(),l(Pe,{key:z.value.agentId,agent:z.value,onSaved:on},null,8,[`agent`])):i(``,!0),J.value&&z.value.profile.status!==`archived`?(o(),l(Ve,{key:`occupation-${z.value.agentId}`,agent:z.value,onSaved:on},null,8,[`agent`])):i(``,!0),e(r(ee),{modelValue:Fe.value,"onUpdate:modelValue":a[2]||=e=>Fe.value=e,"unmount-on-hide":!1,class:`agent-profile-tabs mt-2 min-w-0`},{default:g(()=>[e(r(N),{"aria-label":r(B)(z.value)},{default:g(()=>[(o(!0),n(d,null,u(Ne.value,e=>(o(),l(r(P),{key:e.id,value:e.id,"data-profile-tab":e.id},{default:g(()=>[m(c(e.label),1)]),_:2},1032,[`value`,`data-profile-tab`]))),128))]),_:1},8,[`aria-label`]),K.value?(o(),l(I,{key:0,variant:`compact`,label:r(v)(`agentProfiles.detailLoading`)},null,8,[`label`])):i(``,!0),q.value?(o(),n(`p`,lt,c(r(v)(`agentProfiles.partial`)),1)):i(``,!0),e(r(F),{value:`overview`,class:`agent-profile-panel`,"data-profile-panel":`overview`},{default:g(()=>[C(`div`,ut,[e(r(V),{as:`section`,class:`agent-resume-section agent-current-work-section`,"aria-labelledby":`agent-current-work-heading`},{default:g(()=>[C(`div`,dt,[C(`h2`,ft,c(r(v)(`agentProfiles.working`)),1),Z.value.length?(o(),n(`span`,pt,c(Z.value.length),1)):i(``,!0)]),Z.value.length?(o(),n(`ul`,mt,[(o(!0),n(d,null,u(Z.value,t=>(o(),n(`li`,{key:t.taskId},[e(r(D),{to:{path:r(je)(z.value.personalSpaceId,z.value.agentId),query:{task:t.taskId}}},{default:g(()=>[m(c(t.title),1)]),_:2},1032,[`to`]),e(r(ge),{variant:r(we)(t.status)},{default:g(()=>[m(c(r(v)(`projectAgents.taskStatus.${t.status}`)),1)]),_:2},1032,[`variant`]),e(Me,{origin:t.activityOrigin},null,8,[`origin`]),e(Ce,{task:t,"personal-space-id":x.value,active:Fe.value===`overview`},null,8,[`task`,`personal-space-id`,`active`])]))),128))])):!K.value&&!q.value?(o(),n(`p`,ht,c(r(v)(`agentProfiles.idle`)),1)):K.value?i(``,!0):(o(),n(`p`,gt,c(r(v)(`agentProfiles.partial`)),1))]),_:1}),e(r(V),{as:`section`,class:`agent-resume-section agent-projects-section`,"aria-labelledby":`agent-projects-heading`},{default:g(()=>[C(`div`,_t,[C(`h2`,vt,c(r(v)(`agentProfiles.projects`)),1),C(`span`,null,c(X.value.length),1)]),C(`ul`,yt,[(o(!0),n(d,null,u(He.value,t=>(o(),n(`li`,{key:t,class:`agent-project-item`},[C(`h3`,null,[e(r(D),{class:`agent-project-link`,to:r(me)(x.value,`overview`,t)},{default:g(()=>[m(c(H(t)),1)]),_:2},1032,[`to`])]),$(t)?(o(),n(`p`,bt,c($(t)),1)):i(``,!0)]))),128))]),Ue.value.length?(o(),l(ve,{key:0,class:`agent-project-overflow`,title:rn.value},{default:g(()=>[C(`ul`,xt,[(o(!0),n(d,null,u(Ue.value,t=>(o(),n(`li`,{key:t,class:`agent-project-item`},[C(`h3`,null,[e(r(D),{class:`agent-project-link`,to:r(me)(x.value,`overview`,t)},{default:g(()=>[m(c(H(t)),1)]),_:2},1032,[`to`])]),$(t)?(o(),n(`p`,St,c($(t)),1)):i(``,!0)]))),128))])]),_:1},8,[`title`])):i(``,!0),!K.value&&!X.value.length?(o(),n(`p`,Ct,c(r(v)(`agentProfiles.noProject`)),1)):i(``,!0)]),_:1})])]),_:1}),e(r(F),{value:`history`,class:`agent-profile-panel`,"data-profile-panel":`history`},{default:g(()=>[C(`div`,wt,[e(r(V),{as:`section`,class:`agent-resume-section`,"aria-labelledby":`agent-history-projects-heading`},{default:g(()=>[C(`h2`,Tt,c(r(v)(`agentProfiles.projects`)),1),We.value.length?(o(),n(`details`,Et,[C(`summary`,null,c(r(v)(`agentProfiles.projectHistory`)),1),C(`ul`,Dt,[(o(!0),n(d,null,u(We.value,t=>(o(),n(`li`,{key:t.assignmentId},[C(`h3`,null,[e(r(D),{class:`agent-project-link`,to:r(me)(x.value,`overview`,t.personalProjectId)},{default:g(()=>[m(c(H(t.personalProjectId)),1)]),_:2},1032,[`to`])]),C(`p`,null,c(t.responsibility),1),C(`small`,null,c(Q(t.assignedAt))+` – `+c(Q(t.endedAt)),1)]))),128))])])):K.value?i(``,!0):(o(),n(`p`,Ot,c(r(v)(`agentProfiles.noProject`)),1))]),_:1}),e(r(V),{as:`section`,class:`agent-resume-section`,"aria-labelledby":`agent-history-recent-heading`},{default:g(()=>[C(`h2`,kt,c(r(v)(`agentProfiles.recent`)),1),C(`ol`,At,[z.value.archiveReason?(o(),n(`li`,jt,[C(`h3`,null,c(r(v)(`agentProfiles.departure`)),1),C(`p`,null,c(z.value.archiveReason),1),C(`small`,null,c(Q(z.value.archivedAt)),1)])):i(``,!0),(o(!0),n(d,null,u(U.value.slice(0,12),t=>(o(),n(`li`,{key:t.taskId},[C(`div`,Mt,[e(r(D),{to:{path:r(je)(z.value.personalSpaceId,z.value.agentId),query:{task:t.taskId}}},{default:g(()=>[m(c(t.title),1)]),_:2},1032,[`to`]),C(`span`,null,c(r(v)(`projectAgents.taskStatus.${t.status}`)),1),e(Me,{origin:t.activityOrigin},null,8,[`origin`])]),t.resultSummary?(o(),n(`p`,Nt,c(t.resultSummary),1)):i(``,!0),C(`small`,null,c(Q(t.completedAt||t.updatedAt||t.createdAt)),1)]))),128)),z.value.recruitedAt||z.value.recruitmentReason?(o(),n(`li`,Pt,[C(`h3`,null,c(r(v)(`agentProfiles.recruitment`)),1),z.value.recruitmentReason?(o(),n(`p`,Ft,c(z.value.recruitmentReason),1)):i(``,!0),C(`small`,null,c(Q(z.value.recruitedAt)),1)])):i(``,!0)]),!K.value&&!U.value.length&&!z.value.archiveReason&&!z.value.recruitmentReason&&!z.value.recruitedAt?(o(),n(`p`,It,c(r(v)(`agentProfiles.noExperience`)),1)):i(``,!0)]),_:1})])]),_:1}),e(r(F),{value:`style`,class:`agent-profile-panel`,"data-profile-panel":`style`},{default:g(()=>[e(r(V),{as:`section`,class:`agent-resume-section`,"aria-label":r(v)(`agentProfiles.about`)},{default:g(()=>[C(`div`,Lt,[(o(),n(d,null,u([`judgment`,`taste`,`personality`],e=>C(`div`,{key:e},[C(`h3`,null,c(r(v)(`agentProfiles.${e}`)),1),C(`p`,{class:h({"agent-muted":!z.value.profile.character?.[e]})},c(z.value.profile.character?.[e]||r(v)(`agentProfiles.characterEmpty`)),3)])),64))]),z.value.profile.expectations?(o(),n(`p`,Rt,[C(`strong`,null,c(r(v)(`agentProfiles.expectations`)),1),m(` `+c(z.value.profile.expectations),1)])):i(``,!0),C(`div`,zt,[C(`h3`,null,c(r(v)(`agentProfiles.strengths`)),1),C(`div`,Bt,[(o(!0),n(d,null,u(z.value.profile.capabilities,e=>(o(),n(`span`,{key:e},c(e),1))),128)),z.value.profile.capabilities.length?i(``,!0):(o(),n(`span`,Vt,c(r(v)(`agentProfiles.noSkills`)),1))])])]),_:1},8,[`aria-label`])]),_:1}),e(r(F),{value:`collaborators`,class:`agent-profile-panel`,"data-profile-panel":`collaborators`},{default:g(()=>[C(`div`,Ht,[e(r(V),{as:`section`,class:`agent-resume-section`,"aria-labelledby":`agent-organization-heading`},{default:g(()=>[C(`div`,Ut,[C(`h2`,Wt,c(r(v)(`agentProfiles.organization`)),1)]),(o(!0),n(d,null,u(G.value,t=>(o(),n(`div`,{key:t.projectId,class:`agent-organization`},[C(`h3`,null,c(H(t.projectId)),1),t.error?(o(),n(`p`,Gt,c(r(v)(`agentProfiles.teamUnavailable`)),1)):t.view&&(t.view.lead||t.view.unavailableLead||t.view.members.length)?(o(),n(d,{key:1},[t.view.unavailableLead?(o(),n(`p`,Kt,c(t.view.unavailableLead.name?r(v)(`agentProfiles.leadUnavailable`,{name:t.view.unavailableLead.name}):r(v)(`agentProfiles.leadUnavailableUnnamed`)),1)):i(``,!0),t.view.lead?(o(),n(`div`,qt,[C(`span`,null,c(r(v)(`agentProfiles.lead`)),1),e(ye,{"space-id":x.value,"agent-id":t.view.lead.agentId,name:t.view.lead.name},null,8,[`space-id`,`agent-id`,`name`])])):i(``,!0),t.view.lead?(o(),n(`p`,Jt,c(r(v)(`agentProfiles.reporting`)),1)):i(``,!0),t.view.members.length?(o(),n(`div`,Yt,[C(`span`,null,c(r(v)(`agentProfiles.teammates`)),1),C(`ul`,null,[(o(!0),n(d,null,u(t.view.members,t=>(o(),n(`li`,{key:t.agentId},[e(ye,{"space-id":x.value,"agent-id":t.agentId,name:t.name},null,8,[`space-id`,`agent-id`,`name`])]))),128))])])):i(``,!0)],64)):(o(),n(`p`,Xt,c(r(v)(`agentProfiles.teamUnset`)),1))]))),128)),!K.value&&!G.value.length?(o(),n(`p`,Zt,c(r(v)(`agentProfiles.noProject`)),1)):i(``,!0)]),_:1}),e(r(V),{as:`section`,class:`agent-resume-section`,"aria-labelledby":`agent-worked-with-heading`},{default:g(()=>[C(`h2`,Qt,c(r(v)(`agentProfiles.workedWith`)),1),C(`ul`,$t,[(o(!0),n(d,null,u(Y.value,t=>(o(),n(`li`,{key:t.agentId},[e(ye,{"space-id":x.value,"agent-id":t.agentId,name:ze(t.agentId)},null,8,[`space-id`,`agent-id`,`name`]),C(`span`,null,c(r(v)(`agentProfiles.sharedTasks`,{count:t.count})),1)]))),128))]),!K.value&&!Y.value.length?(o(),n(`p`,en,c(r(v)(`agentProfiles.noCollaborators`)),1)):i(``,!0)]),_:1})])]),_:1}),z.value.memoryScope===`reviewed_agent`?(o(),l(r(F),{key:2,value:`conversations`,class:`agent-profile-panel`,"data-profile-panel":`conversations`},{default:g(()=>[e(r(V),{as:`section`,class:`agent-resume-section`},{default:g(()=>[(o(),l(Se,{key:z.value.agentId,"personal-space-id":x.value,"agent-id":z.value.agentId,projects:Be.value},null,8,[`personal-space-id`,`agent-id`,`projects`]))]),_:1})]),_:1})):i(``,!0),e(r(F),{value:`management`,class:`agent-profile-panel`,"data-profile-panel":`management`},{default:g(()=>[e(r(V),{as:`section`,class:`agent-resume-section agent-management-card`,"aria-label":r(v)(`agentProfiles.advanced`)},{default:g(()=>[C(`p`,tn,c(r(v)(`agentProfiles.locked`)),1),C(`div`,nn,[e(r(O),{"as-child":``,variant:`outline`},{default:g(()=>[e(r(D),{"data-open-management":``,to:r(je)(z.value.personalSpaceId,z.value.agentId)},{default:g(()=>[m(c(r(v)(`agentProfiles.openManagement`)),1)]),_:1},8,[`to`])]),_:1})])]),_:1},8,[`aria-label`])]),_:1})]),_:1},8,[`modelValue`])],64)):(o(),n(`p`,Qe,c(r(v)(`agentProfiles.unavailable`)),1))])],8,Ye))}}),[[`__scopeId`,`data-v-6a8a2f62`]]);export{$ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e,B as t,C as n,D as r,Dt as i,E as a,G as o,J as s,M as c,Mt as l,T as u,X as ee,Z as d,b as f,k as p,ot as m,r as te,rt as ne,s as h,t as g,vt as _,w as v}from"./_plugin-vue_export-helper-DKHjpKWY.js";import{t as re}from"./console-KIWUM9xy.js";import{h as ie,m as ae}from"./useApi-CROJJdhE-lwt7Bu-G.js";import{n as y,t as b}from"./button-BXkZ6rdB.js";import{c as oe}from"./dist-KV3E0kAK.js";import{a as se,i as ce,n as le,r as ue,t as de}from"./dropdown-menu-BMeAsFQe.js";import{t as x}from"./GrowthLoading-CTsRhLfj.js";import{a as fe,c as S,i as C,r as w}from"./client-BgxDxCVo.js";import{t as pe}from"./UiIcon-CSLaDsID.js";import"./ui-CMR2UkVp.js";import{t as T}from"./UiDialog-CvESkb45.js";import{t as E}from"./UiSelect-Cs53P6h-.js";import{t as me}from"./task-evidence-B2smSxDg.js";import{t as he}from"./badge-CBT_nrTA.js";import{m as ge,s as D}from"./task-labels-De_F8I3O.js";import{p as _e}from"./agent-roster-records-DVgD9i6q.js";import{a as ve,i as O,n as k,o as ye,r as A,t as be}from"./TableHeader-aFcD9wsQ.js";var j={class:`flex items-center justify-center py-10`},xe=c({__name:`TableEmpty`,props:{class:{type:[Boolean,null,String,Object,Array]},colspan:{default:1}},setup(n){let r=n,a=oe(r,`class`);return(n,o)=>(s(),u(A,{class:`hover:bg-transparent`},{default:m(()=>[e(O,t({class:i(y)(`p-4 align-middle text-sm text-muted-foreground`,r.class)},i(a)),{default:m(()=>[v(`div`,j,[d(n.$slots,`default`)])]),_:3},16,[`class`])]),_:3}))}});function Se(e){return{running:`success`,stopped:`secondary`,unknown:`warning`}[e]}function M(e){return e.detail?Object.entries(e.detail).filter(([e,t])=>e!==`text`&&t!=null&&!(Array.isArray(t)&&!t.length)).map(([e,t])=>`${e}: ${Array.isArray(t)?t.join(`, `):typeof t==`object`?JSON.stringify(t):String(t)}`).join(` · `):``}function N(e){let t=e.detail?.text;return typeof t==`string`&&t?t:null}var P={key:1,role:`alert`,class:`inline-error m-0`},F={key:2,class:`grid gap-4`,"data-service-log":``},I={key:0,class:`grid gap-1`},L={class:`m-0 text-xs font-semibold text-muted-foreground`},R={class:`service-log-output bg-muted`,"data-service-live-output":``},z={key:1,class:`m-0 text-sm text-muted-foreground`},B={key:2,class:`m-0 grid list-none gap-3 p-0`},V=[`data-service-log-entry`],Ce={class:`flex flex-wrap items-baseline gap-x-2 text-sm`},we={class:`font-semibold`},Te={class:`text-muted-foreground`},Ee={class:`ml-auto text-xs tabular-nums text-muted-foreground`},De={key:0,class:`m-0 text-xs text-muted-foreground [overflow-wrap:anywhere]`},Oe={class:`text-xs text-muted-foreground`},ke={class:`service-log-output bg-muted`},Ae=g(c({__name:`ServiceLog`,props:{log:{},loading:{type:Boolean},error:{},name:{}},setup(e){return(t,n)=>e.loading&&!e.log?(s(),u(x,{key:0,variant:`compact`,label:i(h)(`agentServices.log.loading`,{name:e.name})},null,8,[`label`])):e.error?(s(),r(`p`,P,l(e.error),1)):e.log?(s(),r(`div`,F,[e.log.liveOutput?(s(),r(`section`,I,[v(`h3`,L,l(i(h)(`agentServices.log.liveOutput`)),1),v(`pre`,R,l(e.log.liveOutput),1)])):a(``,!0),e.log.entries.length?(s(),r(`ol`,B,[(s(!0),r(f,null,ee(e.log.entries,e=>(s(),r(`li`,{key:e.id,class:`grid gap-1`,"data-service-log-entry":e.action},[v(`div`,Ce,[v(`span`,we,l(i(h)(`agentServices.log.action.${e.action}`)),1),v(`span`,Te,l(i(h)(`agentServices.log.actor.${e.actor}`)),1),v(`span`,Ee,l(i(D)(e.at)),1)]),i(M)(e)?(s(),r(`p`,De,l(i(M)(e)),1)):a(``,!0),i(N)(e)?(s(),r(f,{key:1},[v(`span`,Oe,l(i(h)(`agentServices.log.output`)),1),v(`pre`,ke,l(i(N)(e)),1)],64)):a(``,!0)],8,V))),128))])):(s(),r(`p`,z,l(i(h)(`agentServices.log.empty`)),1))])):a(``,!0)}}),[[`__scopeId`,`data-v-7b087626`]]),H=e=>`/api/agent-services/${encodeURIComponent(e)}`,je=()=>fe(`/api/agent-services`),Me=e=>fe(`${H(e)}/log`),Ne=e=>S(`${H(e.serviceId)}/stop`,{pid:e.pid}),Pe=e=>C(H(e)),Fe=e=>C(`${H(e)}/log`),Ie=[`all`,`workbench`,`agent_service`],Le=[`all`,`running`,`stopped`,`unknown`],U=[`q`,`agent`,`project`,`kind`,`state`];function W(e){return(Array.isArray(e)?e:[e]).find(e=>typeof e==`string`&&e!==``)??``}function G(e,t){return e.includes(t)?t:e[0]}function Re(e){return{search:W(e.q),agent:W(e.agent)||`all`,project:W(e.project)||`all`,kind:G(Ie,W(e.kind)),state:G(Le,W(e.state))}}function ze(e,t){let n=Object.fromEntries(Object.entries(e).filter(([e])=>!U.includes(e)));t.search.trim()&&(n.q=t.search.trim());for(let e of[`agent`,`project`,`kind`,`state`])t[e]!==`all`&&(n[e]=t[e]);return n}function Be(e,t,n,r){let i=t.search.trim().toLocaleLowerCase(r),a=e.filter(e=>(t.agent===`all`||e.agentId===t.agent)&&(t.project===`all`||e.projectId===t.project)&&(t.kind===`all`||e.kind===t.kind)&&(t.state===`all`||e.live.state===t.state)&&(!i||[e.purpose,e.address,e.command,e.commandLine,String(e.pid??``),n.agent(e.agentId),n.project(e.projectId)].some(e=>e?.toLocaleLowerCase(r).includes(i)))),o=e=>e.live.state===`running`?0:1;return[...a].sort((e,t)=>o(e)-o(t)||Date.parse(t.startedAt)-Date.parse(e.startedAt))}function Ve(e){let t=e=>[...new Set(e.filter(e=>!!e))];return{agents:t(e.map(e=>e.agentId)),projects:t(e.map(e=>e.projectId))}}var He={class:`view agent-services-view`},Ue={class:`mx-auto flex w-full max-w-(--layout-max) flex-col gap-3`},We={class:`page-lede m-0 text-sm text-muted-foreground`},Ge={class:`flex flex-wrap items-center gap-2`},Ke={class:`agent-services-search`},qe={class:`ui-sr-only`},Je=[`value`,`placeholder`],Ye={class:`ml-auto flex items-center gap-2`},Xe={key:0,role:`status`,class:`m-0 text-sm`},Ze={key:1,role:`alert`,class:`inline-error m-0`},Qe={class:`flex flex-col`},$e={key:1,class:`ui-empty rounded-lg border bg-card text-destructive`,role:`alert`},et={class:`m-0`},tt={key:2,class:`ui-empty rounded-lg border bg-card`,"data-service-empty":``},nt={class:`m-0`},rt={class:`sr-only`},it=[`title`],at={class:`block text-xs text-muted-foreground`},ot=[`href`],st={key:1},ct={key:2,class:`text-muted-foreground`},lt={class:`block font-medium`},ut={class:`block text-xs text-muted-foreground`},dt=[`title`],ft={key:0,class:`block text-xs text-muted-foreground`},pt={key:2,class:`block text-xs tabular-nums text-muted-foreground`},mt=[`title`],ht={class:`m-0 font-semibold`},gt={key:0,class:`m-0`},_t={key:1,class:`m-0`},vt={class:`m-0`},yt={class:`agent-services-identity`,"data-service-stop-identity":``},bt={class:`tabular-nums`},xt={class:`m-0 font-semibold`},St={class:`m-0`},K=g(c({__name:`AgentServicesPage`,setup(t){let c=re(),d=ae(),g=ie(),y=n(()=>c.activePersonalSpace?.id??``),oe=n(()=>c.state?.personalProjects??[]),S=_(new Map);async function C(){if(y.value)try{let e=me(await fe(`/api/project-agents?${new URLSearchParams({personalSpaceId:y.value})}`)).map(e=>_e(e,y.value));S.value=new Map(e.map(e=>[e.agentId,e.profile.displayName??e.profile.name]))}catch{S.value=new Map}}let j={agent:e=>e?S.value.get(e)??e:h(`agentServices.unknownAgent`),project:e=>e?oe.value.find(t=>t.project_id===e)?.profile.name??e:h(`agentServices.noProject`)},M=e=>e.client===`fuli`?h(`agentServices.fuli`):ge(e.client),N=_([]),P=_(!1),F=_(!1),I=_(``),L=0;async function R(){let e=++L;P.value=!0,I.value=``;try{let t=await je();if(e!==L)return;N.value=t.services,F.value=!0}catch(t){e===L&&(I.value=w(t,h(`agentServices.loadFailed`)))}finally{e===L&&(P.value=!1)}}o(()=>{c.state||c.refresh(),R(),C()}),ne(y,()=>{C()});let z=n(()=>Re(d.query));function B(e){g.replace({query:ze(d.query,{...z.value,...e})})}let V=n(()=>Be(N.value,z.value,j,te())),Ce=n(()=>Ve(N.value)),we=n(()=>[{value:`all`,label:h(`agentServices.filter.allAgents`)},...Ce.value.agents.map(e=>({value:e,label:j.agent(e)}))]),Te=n(()=>[{value:`all`,label:h(`agentServices.filter.allProjects`)},...Ce.value.projects.map(e=>({value:e,label:j.project(e)}))]),Ee=n(()=>Ie.map(e=>({value:e,label:h(e===`all`?`agentServices.filter.allKinds`:`agentServices.kind.${e}`)}))),De=n(()=>Le.map(e=>({value:e,label:h(e===`all`?`agentServices.filter.allStates`:`agentServices.state.${e}`)}))),Oe=e=>[e.live.process&&h(`agentServices.process.${e.live.process}`),e.address&&h(`agentServices.port.${e.live.port}`)].filter(Boolean).join(` · `),ke=e=>e?h(`agentServices.sessionShort`,{id:e.slice(0,8)}):``,H=_(null),U=_(null),W=_(!1),G=_(``),K=_(!1),q=_(!1);async function Ct(e){H.value=e,U.value=null,q.value=!1,await wt()}async function wt(){let e=H.value;if(e){W.value=!0,G.value=``;try{let t=await Me(e.serviceId);H.value===e&&(U.value=t)}catch(t){H.value===e&&(G.value=w(t,h(`agentServices.log.loadFailed`)))}finally{W.value=!1}}}async function Tt(){if(H.value){K.value=!0;try{await Fe(H.value.serviceId),q.value=!1,await wt()}catch(e){G.value=w(e)}finally{K.value=!1}}}let J=_(null),Y=_(!1),X=_(``),Et=_(``);function Dt(e){J.value=e,X.value=``}async function Ot(){let e=J.value;if(e){Y.value=!0,X.value=``;try{let t=await Ne(e);Et.value=t.status===`still_running`?h(`agentServices.stop.stillRunning`):t.status===`already_stopped`?h(`agentServices.stop.alreadyStopped`):``,J.value=null,await R()}catch(e){X.value=w(e)}finally{Y.value=!1}}}let Z=_(null),Q=_(!1),$=_(``);async function kt(){let e=Z.value;if(e){Q.value=!0,$.value=``;try{await Pe(e.serviceId),Z.value=null,N.value=N.value.filter(t=>t.serviceId!==e.serviceId)}catch(e){$.value=w(e)}finally{Q.value=!1}}}return(t,n)=>(s(),r(`section`,He,[v(`div`,Ue,[v(`p`,We,l(i(h)(`agentServices.lede`)),1),v(`div`,Ge,[v(`label`,Ke,[v(`span`,qe,l(i(h)(`agentServices.search`)),1),v(`input`,{type:`search`,maxlength:`120`,value:z.value.search,placeholder:i(h)(`agentServices.search`),"data-service-search":``,onInput:n[0]||=e=>B({search:e.target.value})},null,40,Je)]),e(i(E),{class:`agent-services-select`,"model-value":z.value.agent,options:we.value,label:i(h)(`agentServices.filter.agent`),"data-service-agent-filter":``,"onUpdate:modelValue":n[1]||=e=>B({agent:String(e)})},null,8,[`model-value`,`options`,`label`]),e(i(E),{class:`agent-services-select`,"model-value":z.value.project,options:Te.value,label:i(h)(`agentServices.filter.project`),"data-service-project-filter":``,"onUpdate:modelValue":n[2]||=e=>B({project:String(e)})},null,8,[`model-value`,`options`,`label`]),e(i(E),{class:`agent-services-select`,"model-value":z.value.kind,options:Ee.value,label:i(h)(`agentServices.filter.kind`),"data-service-kind-filter":``,"onUpdate:modelValue":n[3]||=e=>B({kind:e})},null,8,[`model-value`,`options`,`label`]),e(i(E),{class:`agent-services-select`,"model-value":z.value.state,options:De.value,label:i(h)(`agentServices.filter.state`),"data-service-state-filter":``,"onUpdate:modelValue":n[4]||=e=>B({state:e})},null,8,[`model-value`,`options`,`label`]),v(`div`,Ye,[P.value&&N.value.length?(s(),u(x,{key:0,variant:`inline`,label:i(h)(`agentServices.loading`)},null,8,[`label`])):a(``,!0),e(i(b),{variant:`ghost`,size:`sm`,disabled:P.value,"data-service-refresh":``,onClick:R},{default:m(()=>[p(l(i(h)(`agentServices.refresh`)),1)]),_:1},8,[`disabled`])])]),Et.value?(s(),r(`p`,Xe,l(Et.value),1)):a(``,!0),I.value&&N.value.length?(s(),r(`p`,Ze,[p(l(I.value)+` `,1),e(i(b),{size:`sm`,variant:`ghost`,onClick:R},{default:m(()=>[p(l(i(h)(`agentServices.retry`)),1)]),_:1})])):a(``,!0),v(`div`,Qe,[P.value&&!N.value.length?(s(),u(x,{key:0,variant:`compact`,label:i(h)(`agentServices.loading`)},null,8,[`label`])):I.value&&!N.value.length?(s(),r(`div`,$e,[v(`p`,et,l(I.value),1),e(i(b),{class:`mt-3`,size:`sm`,variant:`outline`,onClick:R},{default:m(()=>[p(l(i(h)(`agentServices.retry`)),1)]),_:1})])):F.value&&!N.value.length?(s(),r(`div`,tt,[v(`p`,nt,l(i(h)(`agentServices.empty`)),1)])):N.value.length?(s(),u(i(ye),{key:3,class:`min-w-[880px]`,"container-class":`rounded-lg border bg-card`},{default:m(()=>[e(i(be),{class:`bg-card shadow-[0_1px_0_var(--border)] [&_tr]:border-b-0`},{default:m(()=>[e(i(A),{class:`hover:bg-transparent`},{default:m(()=>[e(i(k),{class:`min-w-[220px] pl-4`},{default:m(()=>[p(l(i(h)(`agentServices.columns.purpose`)),1)]),_:1}),e(i(k),null,{default:m(()=>[p(l(i(h)(`agentServices.columns.address`)),1)]),_:1}),e(i(k),null,{default:m(()=>[p(l(i(h)(`agentServices.columns.owner`)),1)]),_:1}),e(i(k),null,{default:m(()=>[p(l(i(h)(`agentServices.columns.started`)),1)]),_:1}),e(i(k),null,{default:m(()=>[p(l(i(h)(`agentServices.columns.state`)),1)]),_:1}),e(i(k),null,{default:m(()=>[p(l(i(h)(`agentServices.columns.command`)),1)]),_:1}),e(i(k),{class:`w-12 pr-4 text-right`},{default:m(()=>[v(`span`,rt,l(i(h)(`agentServices.columns.actions`)),1)]),_:1})]),_:1})]),_:1}),e(i(ve),null,{default:m(()=>[(s(!0),r(f,null,ee(V.value,t=>(s(),u(i(A),{key:t.serviceId,"data-service-row":t.serviceId},{default:m(()=>[e(i(O),{class:`pl-4`},{default:m(()=>[v(`span`,{class:`line-clamp-2 font-semibold [overflow-wrap:anywhere]`,title:t.purpose},l(t.purpose),9,it),v(`span`,at,l(i(h)(`agentServices.kind.${t.kind}`)),1)]),_:2},1024),e(i(O),{class:`max-w-[220px] [overflow-wrap:anywhere]`},{default:m(()=>[t.address&&/^https?:\/\//i.test(t.address)?(s(),r(`a`,{key:0,href:t.address,target:`_blank`,rel:`noreferrer`},l(t.address),9,ot)):t.address?(s(),r(`span`,st,l(t.address),1)):(s(),r(`span`,ct,l(i(h)(`agentServices.noAddress`)),1))]),_:2},1024),e(i(O),{class:`max-w-[240px]`},{default:m(()=>[v(`span`,lt,l(j.agent(t.agentId)),1),v(`span`,ut,l(j.project(t.projectId)),1),v(`span`,{class:`block text-xs text-muted-foreground`,title:t.sessionId??void 0},[p(l(M(t)),1),t.sessionId?(s(),r(f,{key:0},[p(` · `+l(ke(t.sessionId)),1)],64)):a(``,!0)],8,dt)]),_:2},1024),e(i(O),{class:`whitespace-nowrap tabular-nums`},{default:m(()=>[p(l(i(D)(t.startedAt))+` `,1),t.stoppedAt?(s(),r(`span`,ft,l(i(h)(`agentServices.stoppedAt`,{time:i(D)(t.stoppedAt)})),1)):a(``,!0)]),_:2},1024),e(i(O),{class:`whitespace-nowrap`},{default:m(()=>[Y.value&&J.value?.serviceId===t.serviceId?(s(),u(x,{key:0,variant:`inline`,label:i(h)(`agentServices.stop.stopping`,{name:t.purpose})},null,8,[`label`])):(s(),u(i(he),{key:1,variant:i(Se)(t.live.state),title:Oe(t)||void 0,"data-service-state":``},{default:m(()=>[p(l(i(h)(`agentServices.state.${t.live.state}`)),1)]),_:2},1032,[`variant`,`title`])),t.pid?(s(),r(`span`,pt,l(i(h)(`agentServices.pid`,{pid:t.pid})),1)):a(``,!0)]),_:2},1024),e(i(O),{class:`max-w-[260px]`},{default:m(()=>[v(`code`,{class:`line-clamp-2 text-xs [overflow-wrap:anywhere]`,title:t.commandLine??t.command??void 0},l(t.command??t.commandLine),9,mt)]),_:2},1024),e(i(O),{class:`pr-4 text-right`},{default:m(()=>[e(i(se),null,{default:m(()=>[e(i(de),{"as-child":``},{default:m(()=>[e(i(b),{variant:`ghost`,size:`icon-sm`,"aria-label":i(h)(`agentServices.rowActions`,{name:t.purpose}),"data-service-actions":``},{default:m(()=>[e(i(pe),{name:`more`,size:16})]),_:1},8,[`aria-label`])]),_:2},1024),e(i(ce),{align:`end`},{default:m(()=>[e(i(ue),{"data-service-log-open":``,onSelect:e=>Ct(t)},{default:m(()=>[p(l(i(h)(`agentServices.actions.log`)),1)]),_:1},8,[`onSelect`]),t.live.state===`stopped`?a(``,!0):(s(),u(i(ue),{key:0,"data-service-stop":``,onSelect:e=>Dt(t)},{default:m(()=>[p(l(i(h)(`agentServices.actions.stop`)),1)]),_:1},8,[`onSelect`])),e(i(le)),e(i(ue),{"data-service-delete":``,onSelect:e=>{Z.value=t,$.value=``}},{default:m(()=>[p(l(i(h)(`agentServices.actions.delete`)),1)]),_:1},8,[`onSelect`])]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1032,[`data-service-row`]))),128)),V.value.length?a(``,!0):(s(),u(i(xe),{key:0,colspan:7},{default:m(()=>[p(l(i(h)(`agentServices.noMatch`)),1)]),_:1}))]),_:1})]),_:1})):a(``,!0)])]),e(i(T),{open:!!H.value,size:`lg`,title:i(h)(`agentServices.log.title`,{name:H.value?.purpose??``}),busy:K.value,onClose:n[7]||=e=>H.value=null},{footer:m(()=>[K.value?(s(),u(x,{key:0,variant:`inline`,label:i(h)(`agentServices.log.clearing`,{name:H.value?.purpose??``})},null,8,[`label`])):q.value?(s(),u(i(b),{key:1,variant:`destructive`,"data-service-log-clear-confirm":``,onClick:Tt},{default:m(()=>[p(l(i(h)(`agentServices.log.clearConfirm`)),1)]),_:1})):(s(),u(i(b),{key:2,variant:`outline`,disabled:!U.value?.entries.length,"data-service-log-clear":``,onClick:n[5]||=e=>q.value=!0},{default:m(()=>[p(l(i(h)(`agentServices.log.clear`)),1)]),_:1},8,[`disabled`])),e(i(b),{variant:`ghost`,disabled:K.value,onClick:n[6]||=e=>H.value=null},{default:m(()=>[p(l(i(h)(`agentServices.log.close`)),1)]),_:1},8,[`disabled`])]),default:m(()=>[e(Ae,{log:U.value,loading:W.value,error:G.value,name:H.value?.purpose??``},null,8,[`log`,`loading`,`error`,`name`])]),_:1},8,[`open`,`title`,`busy`]),e(i(T),{open:!!J.value,size:`md`,title:i(h)(`agentServices.stop.title`),busy:Y.value,error:X.value,onClose:n[9]||=e=>J.value=null},{footer:m(()=>[e(i(b),{variant:`ghost`,disabled:Y.value,onClick:n[8]||=e=>J.value=null},{default:m(()=>[p(l(i(h)(`agentServices.cancel`)),1)]),_:1},8,[`disabled`]),J.value&&(J.value.kind===`workbench`||J.value.pid)?(s(),u(i(b),{key:0,variant:`destructive`,loading:Y.value,"loading-label":i(h)(`agentServices.stop.stopping`,{name:J.value.purpose}),"data-service-stop-confirm":``,onClick:Ot},{default:m(()=>[p(l(J.value.kind===`workbench`?i(h)(`agentServices.stop.confirmWorkbench`):i(h)(`agentServices.stop.confirm`)),1)]),_:1},8,[`loading`,`loading-label`])):a(``,!0)]),default:m(()=>[J.value?(s(),r(f,{key:0},[v(`p`,ht,l(J.value.purpose),1),J.value.kind===`workbench`?(s(),r(`p`,gt,l(i(h)(`agentServices.stop.workbench`)),1)):J.value.pid?(s(),r(f,{key:2},[v(`p`,vt,l(i(h)(`agentServices.stop.body`)),1),v(`dl`,yt,[v(`dt`,null,l(i(h)(`agentServices.stop.pidLabel`)),1),v(`dd`,bt,l(J.value.pid),1),v(`dt`,null,l(i(h)(`agentServices.stop.executableLabel`)),1),v(`dd`,null,[v(`code`,null,l(J.value.executable),1)]),v(`dt`,null,l(i(h)(`agentServices.stop.commandLabel`)),1),v(`dd`,null,[v(`code`,null,l(J.value.commandLine),1)])])],64)):(s(),r(`p`,_t,l(i(h)(`agentServices.stop.noPid`)),1))],64)):a(``,!0)]),_:1},8,[`open`,`title`,`busy`,`error`]),e(i(T),{open:!!Z.value,size:`sm`,title:i(h)(`agentServices.delete.title`),busy:Q.value,error:$.value,onClose:n[11]||=e=>Z.value=null},{footer:m(()=>[e(i(b),{variant:`ghost`,disabled:Q.value,onClick:n[10]||=e=>Z.value=null},{default:m(()=>[p(l(i(h)(`agentServices.cancel`)),1)]),_:1},8,[`disabled`]),e(i(b),{variant:`destructive`,loading:Q.value,"loading-label":i(h)(`agentServices.delete.deleting`,{name:Z.value?.purpose??``}),"data-service-delete-confirm":``,onClick:kt},{default:m(()=>[p(l(i(h)(`agentServices.delete.confirm`)),1)]),_:1},8,[`loading`,`loading-label`])]),default:m(()=>[v(`p`,xt,l(Z.value?.purpose),1),v(`p`,St,l(i(h)(`agentServices.delete.body`)),1)]),_:1},8,[`open`,`title`,`busy`,`error`])]))}}),[[`__scopeId`,`data-v-075901d5`]]);export{K as default};
|