@xopcai/xopc 0.0.393 → 0.0.394
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/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/src/plugin.js +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-1AF2KGju.js → agent-avatar-dicebear-CIpp0ZG6.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DzkKx0Dv.js +1 -0
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-cjJXJj_3.js → agent-plugin-dialog-dWqozfQm.js} +1 -1
- package/dist/gateway/static/root/assets/agents-CXG8SYr5.js +77 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-B_MFhXXU.js → app-management-settings-panel-SmT1HDDg.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-TYGidVnd.js → appearance-settings-Da9jf0ZC.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-DYaxWrTI.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-BrFfEp0u.js → archive-plugin-D6bFXdsA.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-B7OofUPF.js → automations-page-CM3wI2Nr.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BSMdKgxD.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BfAWnYG8.js → binary-plugins-CYKGdQnF.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-_Y-QwZ-3.js → block-editor-Fx38xFF4.js} +40 -40
- package/dist/gateway/static/root/assets/{browser-automation-inputs-DH9QHI9m.js → browser-automation-inputs-CQMc-Gol.js} +1 -1
- package/dist/gateway/static/root/assets/browser-automations-page-C4VhFvyu.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-8WZOkfL7.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-page-dreSJEes.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-9DviVNpG.js +8 -0
- package/dist/gateway/static/root/assets/{capability-header-actions-CFVx3iaZ.js → capability-header-actions-AbVbg7kZ.js} +1 -1
- package/dist/gateway/static/root/assets/channels-DqGCiVmr.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-D3GuiG3N.js → chat-terminal-dock-djkqphez.js} +16 -16
- package/dist/gateway/static/root/assets/{computer-settings-page-CIbHDlp8.js → computer-settings-page-DE9zl7bK.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-CDyCHkpK.js → connector-service-page--gB9vL3C.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-Bcr2NNoX.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-C424c_g9.js → date-picker-D9q-5a8a.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-BVJh9sYc.js → dependency-picker-Ci0dApIr.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-Q52A8vjp.js → desktop-pet-CjaVVJDQ.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CZr1CXxu.js → desktop-pet-settings-C7TFazyr.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-B6S-RpNJ.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-C6cUgrvg.js → directory-picker-path-field-BpymM_E_.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-DyyfC4gA.js → extension-debug-page-CABAv66K.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Dho9o3ZZ.js → extension-page-B3dACpKA.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CdnIGyCH.js → extension-settings-page-B3bwBvgp.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-CzA1bTXZ.js +1 -0
- package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-BNpj_mIM.js → highlighted-body-KQOG7T2V-53FJXO9w.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-KRPp-I4O.js +2 -0
- package/dist/gateway/static/root/assets/{image-generation-api-DwkO2y46.js → image-generation-api-DWRmAkoe.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-BrYvomnU.js → imports-page-B0Y8iy6G.js} +1 -1
- package/dist/gateway/static/root/assets/index-BvAvfZ5R.js +260 -0
- package/dist/gateway/static/root/assets/index-CMRCop32.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BveDYfYk.js → keyboard-shortcuts-settings-CjkACa5H.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-CcIi1BhT.js → local-app-workbench-page-DROP52YA.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-B1a69mlV.js → local-apps-page-BELUF7Pg.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-DBm3g8Mu.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-CcsW4Z-r.js +1 -0
- package/dist/gateway/static/root/assets/{media-plugins-CR1fp6IL.js → media-plugins-UU3qSAhq.js} +1 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-CG664NRI.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-BS9XnQ8a.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-Cfy_WnU-.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-Cn_WK68Y.js → page-context-capture-button-BD7T7uqR.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-DZEh3dXq.js +1 -0
- package/dist/gateway/static/root/assets/{preview-open-alternatives-3NbiWGRG.js → preview-open-alternatives--3aGeYJ5.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-KKE5-V8k.js → product-open-page-B0ZxsnFO.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-BM0oqNxi.js → product-preview-content-CheSHKJq.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-Bm7bVHVo.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-DPA6QL_Z.js +1 -0
- package/dist/gateway/static/root/assets/remote-access-hub-Pxf4EiKh.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-W0X_Fy7b.js → runtime-tools-settings-panel-2BnqCeNt.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-DNM2Zdyr.js → schema-form-KmnpEBtP.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-d0anT7iK.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DfDaPyh5.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-DCSHPFAN.js → settings-form-section-Db5XOKMH.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-B18UbbaJ.js → settings-page-aRM6ax6B.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DCNAcalA.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-BLnS3hoH.js → share-preview-page-DR3Esqa_.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-CvEwnQch.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-CcYGkRPL.js → skill-api-BJBU8YgD.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-PnUZjoPK.js → skill-reload-api-DEQ1bdN9.js} +1 -1
- package/dist/gateway/static/root/assets/skills-page-BXNFSIIy.js +2 -0
- package/dist/gateway/static/root/assets/sliding-indicator-hwz0sx3h.js +1 -0
- package/dist/gateway/static/root/assets/{style-BQqU-1pP.js → style-Df_wL13k.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-C974myUM.js → system-settings-panel-DWnyafB7.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-DyHDW8A5.js +2 -0
- package/dist/gateway/static/root/assets/tracing-settings-page-vvREqbQ3.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-DWyI3uA3.js → tunnel-api-BEzsymVO.js} +1 -1
- package/dist/gateway/static/root/assets/usage-page-ByYOqsHo.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-CY0YuljR.js → use-autosave-Cp4kZ3E-.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-D0qeCXwD.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-BNG4ixJE.js → voice-api-key-field-DH3OdR-w.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-CohIoAre.js → work-discovery-overlay-CICdfBBR.js} +1 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-VIJQCUY5.js +3 -0
- package/dist/gateway/static/root/assets/workflows-page-DDYp2Jbo.js +6 -0
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-C_COnY_B.js → xopc-cloud-account-card-BTMfgVTk.js} +1 -1
- package/dist/gateway/static/root/index.html +3 -2
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +10 -10
- package/dist/src/agent/background-review/run-background-review.js +5 -5
- package/dist/src/agent/coding/run-verification.js +4 -4
- package/dist/src/agent/context/execution-context.js +3 -3
- package/dist/src/agent/context/project-context.js +3 -3
- package/dist/src/agent/embedded/agent-profile-context.js +10 -4
- package/dist/src/agent/embedded/execution-tool-policy.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +2 -2
- package/dist/src/agent/embedded/run-turn.js +1 -1
- package/dist/src/agent/external-tools/cliProvider.js +1 -1
- package/dist/src/agent/external-tools/composio-provider.js +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.js +3 -3
- package/dist/src/agent/prompt/response-language.js +1 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +1 -1
- package/dist/src/agent/prompt/system-prompt-params.js +1 -1
- package/dist/src/agent/sandbox/exec-policy.js +1 -1
- package/dist/src/agent/service/process-direct-streaming.js +1 -1
- package/dist/src/agent/service.js +9 -9
- package/dist/src/agent/session/session-config-service.js +2 -2
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/filesystem-watcher.js +1 -1
- package/dist/src/agent/skills/hub-pull.js +2 -2
- package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +6 -6
- package/dist/src/agent/tools/exec-command.d.ts +2 -0
- package/dist/src/agent/tools/exec-command.js +45 -1
- package/dist/src/agent/tools/factory.js +4 -4
- package/dist/src/agent/tools/personal-attention-tool.js +1 -1
- package/dist/src/agent/tools/personal-request-result-tool.js +1 -1
- package/dist/src/agent/tools/personal-request-tool.js +2 -2
- package/dist/src/agent/tools/personal-task-tool.js +6 -6
- package/dist/src/agent/tools/publish-artifacts.js +1 -1
- package/dist/src/agent/tools/review-workspace.js +1 -1
- package/dist/src/agent/tools/skills-tools.js +1 -1
- package/dist/src/agent/tools/task-collaboration-tool.js +3 -3
- package/dist/src/agent/tools/write.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +4 -4
- package/dist/src/agent-matching/delegation-service.js +1 -1
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/oauth/xopc-cloud.js +2 -2
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/automations/domain/index.js +1 -1
- package/dist/src/automations/draft/automation-draft-service.js +1 -1
- package/dist/src/automations/index.js +2 -2
- package/dist/src/capabilities/store-connector.js +2 -2
- package/dist/src/channels/index.js +1 -1
- package/dist/src/channels/manager.js +1 -1
- package/dist/src/chat-commands/builtins/config.js +1 -1
- package/dist/src/chat-commands/context.js +1 -1
- package/dist/src/cli/commands/channels.js +1 -1
- package/dist/src/cli/commands/connectors.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +2 -2
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/skills.js +1 -1
- package/dist/src/computer/flows.js +1 -1
- package/dist/src/config/agent-model-intents.js +1 -1
- package/dist/src/config/index.js +1 -1
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.d.ts +16 -16
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.js +6 -6
- package/dist/src/connectors/composio-sessions.js +1 -1
- package/dist/src/connectors/composio.js +1 -1
- package/dist/src/connectors/connected-source-ingestion.js +1 -1
- package/dist/src/connectors/connected-source-understanding.js +2 -2
- package/dist/src/connectors/health.js +1 -1
- package/dist/src/extensions/agent-plugins/auth.js +1 -1
- package/dist/src/extensions/agent-plugins/credentials.js +1 -1
- package/dist/src/extensions/agent-plugins/source-http-fetch.js +1 -1
- package/dist/src/extensions/api.js +1 -1
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/extensions/update.js +1 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +3 -3
- package/dist/src/gateway/hono/routes/config-patch/misc.js +4 -4
- package/dist/src/gateway/hono/routes/context-sources.js +2 -2
- package/dist/src/gateway/hono/routes/memory-learning.js +2 -2
- package/dist/src/gateway/hono/routes/models.js +2 -2
- package/dist/src/gateway/hono/routes/projects.js +3 -3
- package/dist/src/gateway/hono/routes/runtime-tools.js +1 -1
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- package/dist/src/gateway/hono/routes/sessions.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/hono/routes/user-model-refresh.js +1 -1
- package/dist/src/gateway/hono/routes/user-model.js +6 -6
- package/dist/src/gateway/hono/routes/voice.js +1 -1
- package/dist/src/gateway/media-access.js +1 -1
- package/dist/src/gateway/service/agent-runner.js +3 -3
- package/dist/src/gateway/service/marketplace-service.js +2 -2
- package/dist/src/gateway/service/run-gateway-agent.js +1 -1
- package/dist/src/gateway/service/session-command-service.js +2 -2
- package/dist/src/gateway/service.js +31 -31
- package/dist/src/gateway/session-context-summary.js +4 -4
- package/dist/src/home-intelligence/generator.js +2 -2
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/imports/compatibility.js +1 -1
- package/dist/src/imports/inventory.js +3 -3
- package/dist/src/imports/productImport.js +2 -2
- package/dist/src/imports/runtime.js +1 -1
- package/dist/src/knowledge/connected-knowledge-pipeline.js +1 -1
- package/dist/src/knowledge-memory/repository.js +1 -1
- package/dist/src/local-apps/service.js +2 -2
- package/dist/src/memory-learning/source-learning.js +2 -2
- package/dist/src/notes/index.js +1 -1
- package/dist/src/notes/service.js +3 -3
- package/dist/src/personal-agent/capability-service.js +2 -2
- package/dist/src/personal-agent/proactivity/routes.js +1 -1
- package/dist/src/personal-agent/proactivity/service.js +5 -5
- package/dist/src/personal-agent/prompt-context.js +7 -7
- package/dist/src/personal-agent/reply-composer.js +7 -7
- package/dist/src/personal-agent/request-delivery.js +2 -2
- package/dist/src/personal-agent/request-service.js +6 -6
- package/dist/src/personal-agent/result-reader.js +1 -1
- package/dist/src/personal-agent/service.js +1 -1
- package/dist/src/personal-agent/task-cancel.js +1 -1
- package/dist/src/platform/index.js +1 -1
- package/dist/src/projects/index.js +1 -1
- package/dist/src/projects/project-agent-suggestion.js +1 -1
- package/dist/src/projects/project-service.js +1 -1
- package/dist/src/projects/project-skill-service.js +2 -2
- package/dist/src/projects/workspace.js +1 -1
- package/dist/src/providers/cloud-thinking.d.ts +3 -0
- package/dist/src/providers/cloud-thinking.js +13 -0
- package/dist/src/providers/model-registry.js +4 -1
- package/dist/src/providers/register-runtime-providers.js +3 -0
- package/dist/src/routing/agent-session-key.js +1 -1
- package/dist/src/session/index.js +1 -1
- package/dist/src/session/init-session-turn.js +1 -1
- package/dist/src/session/resolve-session.js +1 -1
- package/dist/src/session/store.js +2 -2
- package/dist/src/share/hosted-session-share.js +2 -2
- package/dist/src/share/session-share-service.js +1 -1
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tasks/home-query-service.js +1 -1
- package/dist/src/tasks/index.js +3 -3
- package/dist/src/tasks/task-allocation-service.js +5 -5
- package/dist/src/tasks/task-application-service.js +6 -6
- package/dist/src/tasks/task-collaboration-delivery.js +1 -1
- package/dist/src/tasks/task-context-assembler.js +2 -2
- package/dist/src/tasks/task-contract-planner.js +1 -1
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-handoff.js +5 -5
- package/dist/src/tasks/task-main-update-decision-service.js +3 -3
- package/dist/src/tasks/task-model-call.js +1 -1
- package/dist/src/tasks/task-research-result.js +4 -4
- package/dist/src/tasks/task-result-delivery-repository.js +1 -1
- package/dist/src/tasks/task-result-delivery-service.js +2 -2
- package/dist/src/tasks/task-run-coordinator.js +4 -4
- package/dist/src/tasks/task-run-dispatcher.js +1 -1
- package/dist/src/tui/backends/embedded-backend.js +5 -5
- package/dist/src/tui/tui-commands.js +2 -2
- package/dist/src/tui/tui-skills-autocomplete.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +3 -3
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/user-context/access-policy.js +2 -2
- package/dist/src/user-model/bootstrap.js +1 -1
- package/dist/src/user-model/capture/executor.js +1 -1
- package/dist/src/user-model/index.js +2 -2
- package/dist/src/voice/realtime/memory-context.js +5 -5
- package/dist/src/voice/realtime/runtime.js +1 -1
- package/dist/src/work-discovery/incremental-repository.js +1 -1
- package/dist/src/work-discovery/service.js +7 -7
- package/dist/src/workflows/context/workflow-context.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +5 -5
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CPJr7NRR.js +0 -1
- package/dist/gateway/static/root/assets/agents-DW3TlnIg.js +0 -77
- package/dist/gateway/static/root/assets/apps-page-DOkyvOF0.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-DIod-bfm.js +0 -6
- package/dist/gateway/static/root/assets/browser-automations-page-B_SnD9B0.js +0 -3
- package/dist/gateway/static/root/assets/browser-settings-page-BPlqYpMM.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-page-BtzZvMIK.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-WzoG3oBb.js +0 -8
- package/dist/gateway/static/root/assets/channels-BXA55GY2.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-DA2b6cJu.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-D_WWTsze.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-D0KSQRNZ.js +0 -1
- package/dist/gateway/static/root/assets/home-page-CH_A0W29.js +0 -2
- package/dist/gateway/static/root/assets/index-CKdOZoVu.js +0 -260
- package/dist/gateway/static/root/assets/index-Rxjt-jc3.css +0 -1
- package/dist/gateway/static/root/assets/logs-page-Us1jv3C4.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-C9RAM7-s.js +0 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-DQdcaMiu.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-Q4yRx9iZ.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-C9qu16IN.js +0 -8
- package/dist/gateway/static/root/assets/personal-page-DrP6hEcg.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-CPZrwf8n.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-Besfx_07.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CTDghL5L.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-Dxtablvd.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-C7zklouD.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-JoSfluza.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-DcIuPJK3.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-D3JAw62U.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-CiljFekC.js +0 -2
- package/dist/gateway/static/root/assets/tracing-settings-page-DEE75MUn.js +0 -1
- package/dist/gateway/static/root/assets/usage-page-DJYvbxk7.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-eHZJD6Fw.js +0 -2
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-BXI8eyYh.js +0 -3
- package/dist/gateway/static/root/assets/workflows-page-CVti0u-l.js +0 -6
|
@@ -8,17 +8,17 @@ import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
|
8
8
|
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
9
9
|
import { init_session_repository } from "../storage/sqlite/session-repository.js";
|
|
10
10
|
import { getSessionConfig, init_config_repository } from "../storage/sqlite/config-repository.js";
|
|
11
|
-
import {
|
|
12
|
-
import { getProjectForSession } from "../projects/workspace.js";
|
|
11
|
+
import { TaskContextRepository } from "./task-context-repository.js";
|
|
13
12
|
import { resolveMediaReference } from "../media/media-reference.js";
|
|
14
13
|
import { assertPersonalResultDelegateAccess, readPersonalResult, resolvePersonalResultReference } from "../personal-agent/result-reader.js";
|
|
15
|
-
import { fileSpaceId, parseFileResourceId } from "../files/file-service.js";
|
|
16
|
-
import { NotesStore } from "../notes/store.js";
|
|
17
|
-
import { TaskContextRepository } from "./task-context-repository.js";
|
|
18
14
|
import { buildResultAgentContext } from "../agent/source-context/result-context.js";
|
|
19
15
|
import { buildTaskAgentContext } from "../agent/source-context/task-context.js";
|
|
20
16
|
import { parseTurnContextRefs } from "../agent/source-context/types.js";
|
|
21
17
|
import { buildUserAssertionAgentContext } from "../agent/source-context/user-assertion-context.js";
|
|
18
|
+
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
19
|
+
import { getProjectForSession } from "../projects/workspace.js";
|
|
20
|
+
import { fileSpaceId, parseFileResourceId } from "../files/file-service.js";
|
|
21
|
+
import { NotesStore } from "../notes/store.js";
|
|
22
22
|
import { basename, isAbsolute, relative, resolve, sep } from "node:path";
|
|
23
23
|
import { constants } from "node:fs";
|
|
24
24
|
import { createHash } from "node:crypto";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
2
2
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
3
|
-
import { init_providers, resolveModel } from "../providers/index.js";
|
|
4
|
-
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
5
|
-
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
6
3
|
import { getPersonalAgentByConversation } from "../personal-agent/repository.js";
|
|
7
4
|
import { TaskCollaborationRepository } from "./task-collaboration-repository.js";
|
|
5
|
+
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
6
|
+
import { init_providers, resolveModel } from "../providers/index.js";
|
|
7
|
+
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
8
8
|
//#region src/tasks/task-main-update-decision-service.ts
|
|
9
9
|
init_providers();
|
|
10
10
|
init_task_repository();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { getAssistantMessageErrorReason, isTransientProviderErrorMessage } from "../providers/model-response.js";
|
|
3
4
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
4
5
|
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
5
|
-
import { getAssistantMessageErrorReason, isTransientProviderErrorMessage } from "../providers/model-response.js";
|
|
6
6
|
//#region src/tasks/task-model-call.ts
|
|
7
7
|
init_providers();
|
|
8
8
|
init_logger();
|
|
@@ -8,15 +8,15 @@ import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
|
8
8
|
import { init_session_instance_repository, readCurrentTranscriptId } from "../storage/sqlite/session-instance-repository.js";
|
|
9
9
|
import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
10
10
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
11
|
-
import { resolveEffectiveAgentConfigForSession } from "../config/agent-profile.js";
|
|
12
|
-
import { extractAssistantText, stripCodeFences } from "../providers/model-response.js";
|
|
13
11
|
import { readMediaReference } from "../media/media-reference.js";
|
|
12
|
+
import { resolveEffectiveAgentConfigForSession } from "../config/agent-profile.js";
|
|
13
|
+
import { TaskCollaborationRepository } from "./task-collaboration-repository.js";
|
|
14
14
|
import { TaskConversationRepository } from "./task-conversation-repository.js";
|
|
15
|
+
import { extractAssistantText, stripCodeFences } from "../providers/model-response.js";
|
|
15
16
|
import { completeTaskModelCall } from "./task-model-call.js";
|
|
16
|
-
import { TaskCollaborationRepository } from "./task-collaboration-repository.js";
|
|
17
|
-
import { TaskResultDeliveryRepository } from "./task-result-delivery-repository.js";
|
|
18
17
|
import { defineTaskContract } from "./task-contract-definition.js";
|
|
19
18
|
import { observedEvidenceExcerpt, suggestedEvidenceRanges } from "./task-evidence-ranges.js";
|
|
19
|
+
import { TaskResultDeliveryRepository } from "./task-result-delivery-repository.js";
|
|
20
20
|
import { createHash } from "node:crypto";
|
|
21
21
|
import { z } from "zod";
|
|
22
22
|
//#region src/tasks/task-research-result.ts
|
|
@@ -7,8 +7,8 @@ import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
|
7
7
|
import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
8
8
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
9
9
|
import { init_request_repository, personalRequestForTask } from "../personal-agent/request-repository.js";
|
|
10
|
-
import { TaskConversationRepository } from "./task-conversation-repository.js";
|
|
11
10
|
import { TaskCollaborationRepository } from "./task-collaboration-repository.js";
|
|
11
|
+
import { TaskConversationRepository } from "./task-conversation-repository.js";
|
|
12
12
|
import { hasPersonalResultFileLinks, sanitizePersonalResultFileLinks } from "../personal-agent/result-file-links.js";
|
|
13
13
|
import { taskInstructionSequence } from "./task-research-result.js";
|
|
14
14
|
import { randomUUID } from "node:crypto";
|
|
@@ -7,15 +7,15 @@ import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
|
7
7
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
8
8
|
import { init_request_repository, personalRequestForTask } from "../personal-agent/request-repository.js";
|
|
9
9
|
import { appendTranscriptEntry, init_transcript_repository } from "../storage/sqlite/transcript-repository.js";
|
|
10
|
-
import { getPersonalAgentByConversation } from "../personal-agent/repository.js";
|
|
11
10
|
import { emitSessionTranscriptUpdate } from "../session/transcript-events.js";
|
|
12
11
|
import { resolveTaskLocale } from "./task-language.js";
|
|
13
12
|
import { tryParseMediaUri } from "../media/uri.js";
|
|
14
13
|
import { resolveMediaBufferPath } from "../media/store.js";
|
|
14
|
+
import { getPersonalAgentByConversation } from "../personal-agent/repository.js";
|
|
15
15
|
import { warmPersonalResult } from "../personal-agent/result-reader.js";
|
|
16
16
|
import { TaskConversationRepository } from "./task-conversation-repository.js";
|
|
17
|
-
import { TaskResultDeliveryRepository } from "./task-result-delivery-repository.js";
|
|
18
17
|
import { taskInstructionSequence } from "./task-research-result.js";
|
|
18
|
+
import { TaskResultDeliveryRepository } from "./task-result-delivery-repository.js";
|
|
19
19
|
import { recordPersonalPerformance } from "../personal-agent/performance.js";
|
|
20
20
|
import { enqueuePersonalReply } from "../personal-agent/reply-composer.js";
|
|
21
21
|
import { createReadStream } from "node:fs";
|
|
@@ -5,15 +5,15 @@ import { init_request_repository, personalRequestForTask } from "../personal-age
|
|
|
5
5
|
import { loadTranscriptRowsForSession } from "../storage/sqlite/transcript-repository.js";
|
|
6
6
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
7
7
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
8
|
-
import {
|
|
9
|
-
import { ACCEPTANCE_REPAIR_READ_TOOLS, canResumeAfterModelFailure } from "../agent/orchestration/turn-recovery.js";
|
|
8
|
+
import { TaskContextRepository } from "./task-context-repository.js";
|
|
10
9
|
import { resolveTaskLocale } from "./task-language.js";
|
|
11
10
|
import { TaskAllocationRepository } from "./task-allocation-repository.js";
|
|
12
11
|
import { TaskCollaborationRepository } from "./task-collaboration-repository.js";
|
|
13
|
-
import {
|
|
12
|
+
import { isTransientProviderErrorMessage } from "../providers/model-response.js";
|
|
14
13
|
import { currentTaskResearchResult, taskInstructionSequence } from "./task-research-result.js";
|
|
15
|
-
import {
|
|
14
|
+
import { TaskResultDeliveryRepository } from "./task-result-delivery-repository.js";
|
|
16
15
|
import { TaskApplicationService } from "./task-application-service.js";
|
|
16
|
+
import { ACCEPTANCE_REPAIR_READ_TOOLS, canResumeAfterModelFailure } from "../agent/orchestration/turn-recovery.js";
|
|
17
17
|
import { buildResearchRepair, inspectTaskPublications } from "./task-research-repair.js";
|
|
18
18
|
//#region src/tasks/task-run-coordinator.ts
|
|
19
19
|
init_repository();
|
|
@@ -4,9 +4,9 @@ import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
|
4
4
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
5
5
|
import { loadTranscriptRowsForSession } from "../storage/sqlite/transcript-repository.js";
|
|
6
6
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
7
|
-
import { canResumeAfterModelFailure } from "../agent/orchestration/turn-recovery.js";
|
|
8
7
|
import { resolveTaskLocale } from "./task-language.js";
|
|
9
8
|
import { TaskApplicationService } from "./task-application-service.js";
|
|
9
|
+
import { canResumeAfterModelFailure } from "../agent/orchestration/turn-recovery.js";
|
|
10
10
|
import { runInIndependentAgentExecution } from "../agent/independent-execution.js";
|
|
11
11
|
//#region src/tasks/task-run-dispatcher.ts
|
|
12
12
|
init_logger();
|
|
@@ -12,14 +12,14 @@ import { normalizeAgentId } from "../../agent-catalog/id.js";
|
|
|
12
12
|
import { init_agent_scope, listAgentEntries } from "../../agent/agent-scope.js";
|
|
13
13
|
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
14
14
|
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../../routing/agent-session-key.js";
|
|
15
|
-
import { resolveEffectiveAgentProfile } from "../../config/agent-profile.js";
|
|
16
|
-
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
17
|
-
import { init_paths } from "../../config/paths.js";
|
|
18
|
-
import { getWorkspacePath } from "../../config/workspace-path-helpers.js";
|
|
19
|
-
import { effectiveWorkspacePathForSession } from "../../session/session-workspace.js";
|
|
20
15
|
import { ProjectService } from "../../projects/project-service.js";
|
|
16
|
+
import { init_paths } from "../../config/paths.js";
|
|
21
17
|
import { inferSuggestedProjectDefaultAgentId } from "../../projects/project-agent-suggestion.js";
|
|
18
|
+
import { resolveEffectiveAgentProfile } from "../../config/agent-profile.js";
|
|
19
|
+
import { effectiveWorkspacePathForSession } from "../../session/session-workspace.js";
|
|
22
20
|
import "../../projects/index.js";
|
|
21
|
+
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
22
|
+
import { getWorkspacePath } from "../../config/workspace-path-helpers.js";
|
|
23
23
|
import { buildSessionTimeline } from "../../session/transcript-outline.js";
|
|
24
24
|
import { transcriptRowsToClientHistory } from "../../session/client-history.js";
|
|
25
25
|
import { createCreateShareTool, isShareToolAvailable } from "../../agent/tools/create-share-tool.js";
|
|
@@ -3,12 +3,12 @@ import { TaskRepository } from "../tasks/task-repository.js";
|
|
|
3
3
|
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
4
4
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
5
5
|
import { init_agent_session_key, isValidAgentId, normalizeAgentId } from "../routing/agent-session-key.js";
|
|
6
|
-
import { resolveConfigPath } from "../config/paths.js";
|
|
7
|
-
import { init_providers, providerSupportsOAuth } from "../providers/index.js";
|
|
8
6
|
import { ProjectService } from "../projects/project-service.js";
|
|
7
|
+
import { resolveConfigPath } from "../config/paths.js";
|
|
9
8
|
import { isValidProjectAgentId, normalizeProjectAgentId } from "../projects/project-agent.js";
|
|
10
9
|
import { inferSuggestedProjectDefaultAgentId } from "../projects/project-agent-suggestion.js";
|
|
11
10
|
import "../projects/index.js";
|
|
11
|
+
import { init_providers, providerSupportsOAuth } from "../providers/index.js";
|
|
12
12
|
import { createWorkflowCatalog } from "../agent/workflow/catalog.js";
|
|
13
13
|
import "../tasks/index.js";
|
|
14
14
|
import { normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel } from "../agent/transcript/thinking-types.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveStateDir } from "../config/paths-state.js";
|
|
2
2
|
import { init_paths, resolveBundledSkillsDir } from "../config/paths.js";
|
|
3
|
-
import { getWorkspacePath } from "../config/workspace-path-helpers.js";
|
|
4
3
|
import { loadSkills } from "../agent/skills/index.js";
|
|
4
|
+
import { getWorkspacePath } from "../config/workspace-path-helpers.js";
|
|
5
5
|
import { loadConfig } from "../config/loader.js";
|
|
6
6
|
import "../config/index.js";
|
|
7
7
|
//#region src/tui/tui-skills-autocomplete.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { resolveStateDir } from "../config/paths-state.js";
|
|
2
|
-
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
3
2
|
import { init_paths, resolveAgentProfileDir, resolveBundledSkillsDir } from "../config/paths.js";
|
|
3
|
+
import { createSkillConfigManager, isSkillEnabled } from "../agent/skills/config.js";
|
|
4
|
+
import { loadSkills } from "../agent/skills/index.js";
|
|
5
|
+
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
4
6
|
import { getWorkspacePath } from "../config/workspace-path-helpers.js";
|
|
5
7
|
import { resolveBootstrapFilesSync } from "../agent/bootstrap/bootstrap-files.js";
|
|
6
8
|
import { listConnectorInstances } from "../connectors/instances.js";
|
|
7
|
-
import { createSkillConfigManager, isSkillEnabled } from "../agent/skills/config.js";
|
|
8
|
-
import { loadSkills } from "../agent/skills/index.js";
|
|
9
9
|
import { createWorkflowCatalog } from "../agent/workflow/catalog.js";
|
|
10
10
|
import "../config/index.js";
|
|
11
11
|
import { basename } from "node:path";
|
package/dist/src/tui/tui.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { version } from "../../package.js";
|
|
2
2
|
import { resolveStateDir, resolveXopcDatabasePath } from "../config/paths-state.js";
|
|
3
3
|
import { init_agent_session_key, normalizeAgentId } from "../routing/agent-session-key.js";
|
|
4
|
-
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
5
4
|
import { init_paths } from "../config/paths.js";
|
|
5
|
+
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
6
6
|
import { getAllModels, getAllProviders, getApiKey, init_providers, isProviderConfiguredSync } from "../providers/index.js";
|
|
7
7
|
import { ProjectTrustStore, hasTrustRequiringProjectResources } from "../project-trust/trust-store.js";
|
|
8
8
|
import { isTerminalWorkflowRunStatus } from "../workflows/domain/run.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getSessionConfig, init_config_repository } from "../storage/sqlite/config-repository.js";
|
|
2
|
-
import { isOwnerIdentity } from "./identity-bindings.js";
|
|
3
|
-
import { init_config, resolveKnowledgeReadPolicy } from "./config.js";
|
|
4
2
|
import { getConversationRouting } from "../storage/sqlite/conversation-repository.js";
|
|
5
3
|
import { init_session_key } from "../routing/session-key.js";
|
|
4
|
+
import { isOwnerIdentity } from "./identity-bindings.js";
|
|
5
|
+
import { init_config, resolveKnowledgeReadPolicy } from "./config.js";
|
|
6
6
|
//#region src/user-context/access-policy.ts
|
|
7
7
|
init_config();
|
|
8
8
|
init_session_key();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createCollaborationRule, init_collaboration_rule_repository, listCollaborationRules } from "../storage/sqlite/collaboration-rule-repository.js";
|
|
2
|
-
import { createPriorityWindow, createUserGoal, listPriorityWindows, listUserGoals } from "./goals.js";
|
|
3
2
|
import { reconcileAssertion } from "./repository.js";
|
|
4
3
|
import { applyUserProfilePatch } from "./profile.js";
|
|
4
|
+
import { createPriorityWindow, createUserGoal, listPriorityWindows, listUserGoals } from "./goals.js";
|
|
5
5
|
//#region src/user-model/bootstrap.ts
|
|
6
6
|
init_collaboration_rule_repository();
|
|
7
7
|
function statements(values, limit) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createCollaborationRule, init_collaboration_rule_repository, listCollaborationRules } from "../../storage/sqlite/collaboration-rule-repository.js";
|
|
2
2
|
import { createContextEvidence, init_context_evidence_repository } from "../../storage/sqlite/context-evidence-repository.js";
|
|
3
|
-
import { createUserGoal, listUserGoals } from "../goals.js";
|
|
4
3
|
import { deleteUserAssertion, getAssertionSlot, getUserAssertion, linkAssertionEvidence, mergeAssertionObservation, reconcileAssertion, setAssertionStatus } from "../repository.js";
|
|
4
|
+
import { createUserGoal, listUserGoals } from "../goals.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
//#region src/user-model/capture/executor.ts
|
|
7
7
|
init_context_evidence_repository();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PERSONAL_DOMAINS, USER_MODEL_PRINCIPAL_ID, defaultAssertionDomain, defaultAssertionLayer, init_domain, validateCandidate, validateScope } from "./domain.js";
|
|
2
|
-
import { createPriorityWindow, createUserGoal, listPriorityWindows, listUserGoals, setUserGoalStatus, updatePriorityWindow, updateUserGoal } from "./goals.js";
|
|
3
2
|
import { defaultReviewAt, isAssertionValidAt, requiresBoundedValidity, resolveCurrentAssertion } from "./temporal.js";
|
|
4
3
|
import { deleteUserAssertion, getActiveAssertionByPredicate, getActiveAssertionForSlot, getAssertionSlot, getUserAssertion, getUserTimezone, linkAssertionEvidence, listSlotAssertions, listUserAssertionSources, listUserAssertions, mergeAssertionObservation, reconcileAssertion, setAssertionStatus, setUserAssertionScope } from "./repository.js";
|
|
4
|
+
import { applyUserProfilePatch, getUserProfileSnapshot } from "./profile.js";
|
|
5
5
|
import { listActionRuleSuggestions } from "./action-rule-suggestions.js";
|
|
6
6
|
import { calculateExecutionValue } from "./importance.js";
|
|
7
|
+
import { createPriorityWindow, createUserGoal, listPriorityWindows, listUserGoals, setUserGoalStatus, updatePriorityWindow, updateUserGoal } from "./goals.js";
|
|
7
8
|
import { deleteUserModelObservationsForGrant, linkUserAssertions, listUserAssertionEdges, listUserModelObservations, recordUserModelObservation } from "./observation-repository.js";
|
|
8
|
-
import { applyUserProfilePatch, getUserProfileSnapshot } from "./profile.js";
|
|
9
9
|
import { bootstrapUserModel } from "./bootstrap.js";
|
|
10
10
|
import { canUseAssertion, isWorkingAssumption } from "./usage-policy.js";
|
|
11
11
|
//#region src/user-model/index.ts
|
|
@@ -3,17 +3,17 @@ import { init_logger } from "../../utils/logger.js";
|
|
|
3
3
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
4
4
|
import { init_session_repository } from "../../storage/sqlite/session-repository.js";
|
|
5
5
|
import { getSessionConfig, init_config_repository } from "../../storage/sqlite/config-repository.js";
|
|
6
|
-
import {
|
|
7
|
-
import { getKnowledgeItem } from "../../knowledge-memory/repository.js";
|
|
8
|
-
import { init_config, resolveKnowledgeReadPolicy } from "../../user-context/config.js";
|
|
6
|
+
import { getUserAssertion } from "../../user-model/repository.js";
|
|
9
7
|
import { getConversationRouting } from "../../storage/sqlite/conversation-repository.js";
|
|
10
8
|
import { getConversation } from "../../routing/agent-session-key.js";
|
|
11
9
|
import { init_session_key } from "../../routing/session-key.js";
|
|
10
|
+
import "../../user-model/index.js";
|
|
11
|
+
import { init_config, resolveKnowledgeReadPolicy } from "../../user-context/config.js";
|
|
12
|
+
import { canUseKnowledge } from "../../knowledge-memory/usage-policy.js";
|
|
13
|
+
import { getKnowledgeItem } from "../../knowledge-memory/repository.js";
|
|
12
14
|
import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
|
|
13
15
|
import "../../knowledge-memory/index.js";
|
|
14
16
|
import { stripRuntimeContextFromUserMessage } from "../../session/user-message-display.js";
|
|
15
|
-
import { getUserAssertion } from "../../user-model/repository.js";
|
|
16
|
-
import "../../user-model/index.js";
|
|
17
17
|
import { buildExecutionContext } from "../../agent/context/execution-context.js";
|
|
18
18
|
//#region src/voice/realtime/memory-context.ts
|
|
19
19
|
init_config();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { init_changes, onUserContextChange } from "../../user-context/changes.js";
|
|
4
|
+
import { getPersonalAgentByConversation } from "../../personal-agent/repository.js";
|
|
4
5
|
import { init_model_usage, withModelUsageOrigin } from "../../providers/model-usage.js";
|
|
5
6
|
import { decodeVoiceUplinkAudioFrame, encodeVoiceAudioFrame } from "../../../packages/realtime-protocol/src/voice-audio.js";
|
|
6
7
|
import { VOICE_REALTIME_HEARTBEAT_INTERVAL_MS, VOICE_REALTIME_MAX_BINARY_FRAME_BYTES, VOICE_REALTIME_START_TIMEOUT_MS, VOICE_REALTIME_WS_PATH, init_voice, parseVoiceClientJsonFrame, parseVoiceClientMessage } from "../../../packages/realtime-protocol/src/voice.js";
|
|
7
8
|
import { getModelCatalogStore, init_model_catalog_store } from "../../providers/model-catalog-store.js";
|
|
8
|
-
import { getPersonalAgentByConversation } from "../../personal-agent/repository.js";
|
|
9
9
|
import { getMediaUnderstandingProvider } from "../../media-understanding/registry.js";
|
|
10
10
|
import { resolveSTTProviderChain } from "../stt/factory.js";
|
|
11
11
|
import { mergeSttConfigFromAppConfig } from "../stt/config.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createUnderstandingSourceRun, listUnderstandingSourceGrants, listUnderstandingSourceRuns, updateUnderstandingSourceRun } from "../user-context/sources/repository.js";
|
|
2
1
|
import { getWorkDiscoveryRun } from "./repository.js";
|
|
2
|
+
import { createUnderstandingSourceRun, listUnderstandingSourceGrants, listUnderstandingSourceRuns, updateUnderstandingSourceRun } from "../user-context/sources/repository.js";
|
|
3
3
|
import { workDiscoveryFingerprintsEqual } from "./incremental.js";
|
|
4
4
|
//#region src/work-discovery/incremental-repository.ts
|
|
5
5
|
function refreshFromRun(run) {
|
|
@@ -5,19 +5,19 @@ import { createContextEvidence, init_context_evidence_repository } from "../stor
|
|
|
5
5
|
import { ensureSessionRecord, patchSessionMetadata } from "../storage/sqlite/session-repository.js";
|
|
6
6
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
7
7
|
import { ActivityService } from "../activity/service.js";
|
|
8
|
-
import {
|
|
9
|
-
import { writeKnowledgeItem } from "../knowledge-memory/repository.js";
|
|
8
|
+
import { linkAssertionEvidence, reconcileAssertion } from "../user-model/repository.js";
|
|
10
9
|
import { init_session_key, resolveConversationId } from "../routing/session-key.js";
|
|
11
|
-
import "../
|
|
10
|
+
import { createPriorityWindow, createUserGoal } from "../user-model/goals.js";
|
|
11
|
+
import "../user-model/index.js";
|
|
12
|
+
import { createWorkDiscoveryRun, getProjectUnderstandingRun, getWorkDiscoveryOnboardingState, getWorkDiscoveryRun, getWorkDiscoveryRunByIdempotencyKey, listPendingProjectUnderstandingRuns, setWorkDiscoveryFeedback, setWorkDiscoveryOnboardingState, updateWorkDiscoveryRun } from "./repository.js";
|
|
12
13
|
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
13
14
|
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
14
15
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
15
16
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
16
17
|
import { isLocalModelBaseUrl } from "../providers/model-call.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import "../
|
|
20
|
-
import { createWorkDiscoveryRun, getProjectUnderstandingRun, getWorkDiscoveryOnboardingState, getWorkDiscoveryRun, getWorkDiscoveryRunByIdempotencyKey, listPendingProjectUnderstandingRuns, setWorkDiscoveryFeedback, setWorkDiscoveryOnboardingState, updateWorkDiscoveryRun } from "./repository.js";
|
|
18
|
+
import { createUnderstandingSourceRun, getUnderstandingSourceGrant, getUnderstandingSourceRun, updateUnderstandingSourceGrantCheckpoint, updateUnderstandingSourceGrantPolicies, updateUnderstandingSourceRun, upsertUnderstandingSourceGrant } from "../user-context/sources/repository.js";
|
|
19
|
+
import { writeKnowledgeItem } from "../knowledge-memory/repository.js";
|
|
20
|
+
import "../knowledge-memory/index.js";
|
|
21
21
|
import { allowsRemoteSourceProcessing } from "../user-context/sources/processing-policy.js";
|
|
22
22
|
import { analyzeUnderstandingSources, analyzeWorkContext, workDiscoveryResultMarkdown } from "./analyzer.js";
|
|
23
23
|
import { clusterActivityTopics } from "../user-context/sources/activity-clustering.js";
|
|
@@ -2,8 +2,8 @@ import { TaskRepository, init_task_repository } from "../../tasks/task-repositor
|
|
|
2
2
|
import { ObjectLinkService } from "../../activity/service.js";
|
|
3
3
|
import "../../activity/index.js";
|
|
4
4
|
import { ProjectService } from "../../projects/project-service.js";
|
|
5
|
-
import { buildNoteAgentContextArtifact } from "../../notes/agent-context.js";
|
|
6
5
|
import { NotesStore } from "../../notes/store.js";
|
|
6
|
+
import { buildNoteAgentContextArtifact } from "../../notes/agent-context.js";
|
|
7
7
|
import { NotesService } from "../../notes/service.js";
|
|
8
8
|
import "../../notes/index.js";
|
|
9
9
|
import { WorkflowContextSnapshotRepository } from "./workflow-context-snapshot-repository.js";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { TaskRepository, init_task_repository } from "../../tasks/task-repository.js";
|
|
2
2
|
import { TaskRunRepository, init_task_run_repository } from "../../tasks/task-run-repository.js";
|
|
3
|
+
import { TaskContextRepository } from "../../tasks/task-context-repository.js";
|
|
3
4
|
import { init_conversation_repository, resolveRoutedConversation } from "../../storage/sqlite/conversation-repository.js";
|
|
5
|
+
import { automationEventPublisher, getAutomationEventForRun } from "../../automations/events/event-repository.js";
|
|
4
6
|
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
5
7
|
import { extractProfileAgentId, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
6
|
-
import { resolveModelSelector } from "../../config/agent-model-intents.js";
|
|
7
|
-
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
8
8
|
import { getProjectWorkspacePathForSession } from "../../projects/workspace.js";
|
|
9
9
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
10
|
-
import {
|
|
10
|
+
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
11
|
+
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
12
|
+
import { resolveModelSelector } from "../../config/agent-model-intents.js";
|
|
11
13
|
import { isTerminalWorkflowRunStatus } from "../domain/run.js";
|
|
12
14
|
import { validateWorkflowJsonSchema } from "../domain/schema-validation.js";
|
|
13
15
|
import "../domain/index.js";
|
|
14
|
-
import { TaskContextRepository } from "../../tasks/task-context-repository.js";
|
|
15
|
-
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
16
16
|
import { DelegateSubagentRunner } from "../../agent/workflow/subagent-runner.js";
|
|
17
17
|
import { preflightWorkflowConnectors } from "../../connectors/workflow-preflight.js";
|
|
18
18
|
import { CatalogWorkflowDefinitionRegistry } from "../registry/catalog-workflow-definition-registry.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xopcai/xopc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.394",
|
|
4
4
|
"description": "Local-first personal AI with Ada, task delegation, files, projects, workflows, and automations. Use cloud or local models.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -170,10 +170,10 @@
|
|
|
170
170
|
"xlsx": "file:web/vendor/xlsx-0.20.3.tgz",
|
|
171
171
|
"@xopcai/browser-control-contract": "0.1.0",
|
|
172
172
|
"@xopcai/computer-control-contract": "0.1.0",
|
|
173
|
-
"@xopcai/endpoint-tools-protocol": "0.0.0",
|
|
174
173
|
"@xopcai/endpoint-tools-client": "0.0.0",
|
|
175
|
-
"@xopcai/
|
|
174
|
+
"@xopcai/endpoint-tools-protocol": "0.0.0",
|
|
176
175
|
"@xopcai/gateway-contract": "0.0.0",
|
|
176
|
+
"@xopcai/image-providers": "0.1.0",
|
|
177
177
|
"@xopcai/realtime-client": "0.0.0",
|
|
178
178
|
"@xopcai/realtime-protocol": "0.0.0"
|
|
179
179
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{g as i}from"./chunk-KS7C4IRE-B2HK1psj.js";import{t as a}from"./circle-check-C23XjkUj.js";import{t as o}from"./cn-0WouolD0.js";import{c as s,n as c}from"./locale-store-CE7L6MlS.js";import{n as l,r as u}from"./cloud-credits-BMYMiiNn.js";import{i as d}from"./vendor-swr-BIWyz7Rc.js";import{Fn as f,G as ee,Gl as te,Hc as ne,Ic as p,In as re,Jl as m,Vn as h,Yu as g,cs as _,eu as ie,lu as v,na as ae,rs as y,v as oe,xd as b}from"./index-CKdOZoVu.js";import{t as se}from"./number-input-DDeqHK-G.js";import{n as ce,r as x}from"./settings-page-layout-Dx5S-Msc.js";import{n as le,t as S}from"./use-autosave-CY0YuljR.js";var ue=n(),C=e(t(),1),w=r(),T=`w-full rounded-lg border border-edge bg-surface-panel px-3 py-2 text-sm text-fg outline-none focus:border-accent focus:ring-2 focus:ring-accent/15`;function E(e){let t=Number.parseInt(e,10);return Number.isFinite(t)&&t>0?t:void 0}function de({draft:e,setDraft:t,zh:n}){let[r,i]=(0,C.useState)(()=>e.runtime.cloudCreditLimitPerRunMicro?l(e.runtime.cloudCreditLimitPerRunMicro):``),[a,o]=(0,C.useState)(!1);return(0,w.jsxs)(`label`,{className:`block text-xs font-medium text-fg-muted`,children:[n?`每次运行的 Cloud 消费上限(Credits)`:`Cloud spend limit per run (Credits)`,(0,w.jsx)(`input`,{type:`text`,inputMode:`decimal`,value:r,"aria-invalid":a,placeholder:n?`不设置额外上限`:`No additional limit`,className:`${T} mt-2`,onChange:n=>{let r=n.target.value;i(r);try{let n=r===``?void 0:u(r);if(n===`0`||n&&n.length>15)throw Error(`Invalid limit`);o(!1),t({...e,runtime:{...e.runtime,cloudCreditLimitPerRunMicro:n}})}catch{o(!0)}},onBlur:()=>{a&&i(e.runtime.cloudCreditLimitPerRunMicro?l(e.runtime.cloudCreditLimitPerRunMicro):``),o(!1)}}),(0,w.jsx)(`span`,{className:`mt-2 block font-normal ${a?`text-danger`:`text-fg-subtle`}`,children:a?n?`请输入大于零、最多四位小数的 Credits。无效输入不会保存。`:`Enter positive Credits with up to four decimals. Invalid input is not saved.`:n?`模型、图片和文件语音调用共享上限;不支持实时语音或 Cloud 电脑控制,不包含运行前后的后台调用。达到上限后停止,调整后需手动继续。`:`Shared by model, image and file audio calls during a run. Does not support realtime voice or Cloud computer use; excludes background calls outside the run. Stops at the limit; continue manually after adjusting it.`})]})}function D(e){let t=(0,ue.c)(186),{draft:n,setDraft:r,zh:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={revalidateOnFocus:!1},t[0]=a):a=t[0];let s=d(`agent-defaults-workflows`,oe,a),c;t[1]===s.data?c=t[2]:(c=s.data??[],t[1]=s.data,t[2]=c);let l;t[3]===c?l=t[4]:(l=c.map(fe),t[3]=c,t[4]=l);let u=l,f=n.workflows.allowed===void 0,te;t[5]!==n||t[6]!==r?(te=(e,t)=>{let i=n.workflows.allowed??[],a=t?[...new Set([...i,e])]:i.filter(t=>t!==e);r({...n,workflows:{...n.workflows,allowed:a}})},t[5]=n,t[6]=r,t[7]=te):te=t[7];let p=te,re=i?`费用控制`:`Spending control`,m;t[8]===re?m=t[9]:(m=(0,w.jsx)(`h2`,{className:`mb-4 text-base font-semibold text-fg`,children:re}),t[8]=re,t[9]=m);let h;t[10]!==n||t[11]!==r||t[12]!==i?(h=(0,w.jsx)(de,{draft:n,setDraft:r,zh:i}),t[10]=n,t[11]=r,t[12]=i,t[13]=h):h=t[13];let g;t[14]!==m||t[15]!==h?(g=(0,w.jsxs)(`section`,{className:`rounded-xl bg-surface-hover/20 p-5`,children:[m,h]}),t[14]=m,t[15]=h,t[16]=g):g=t[16];let ie=i?`执行与缓存策略`:`Execution and cache policy`,v=i?`轮数:${n.runtime.maxTurns??`默认`} · 超时:${n.runtime.timeoutMs??`默认`} · 缓存:${n.runtime.promptCache?.mode??`默认`} · Codemode:${n.runtime.codemode?.enabled?`开启`:`关闭`}`:`Turns: ${n.runtime.maxTurns??`default`} · Timeout: ${n.runtime.timeoutMs??`default`} · Cache: ${n.runtime.promptCache?.mode??`default`} · Codemode: ${n.runtime.codemode?.enabled?`on`:`off`}`,ae=n.runtime.codemode?.enabled??!1,y;t[17]!==n||t[18]!==r?(y=e=>r({...n,runtime:{...n.runtime,codemode:{...n.runtime.codemode,enabled:e.target.checked}}}),t[17]=n,t[18]=r,t[19]=y):y=t[19];let b;t[20]!==ae||t[21]!==y?(b=(0,w.jsx)(`input`,{type:`checkbox`,checked:ae,onChange:y,className:`mt-1 size-4 accent-[var(--color-accent)]`}),t[20]=ae,t[21]=y,t[22]=b):b=t[22];let ce=i?`Codemode 读取试点`:`Codemode read pilot`,x;t[23]===ce?x=t[24]:(x=(0,w.jsx)(`span`,{className:`block text-base font-semibold text-fg`,children:ce}),t[23]=ce,t[24]=x);let le=i?`允许智能体用脚本组合已授权的读取工具。默认关闭,保留普通工具调用。`:`Let agents combine authorized reads in scripts. Off by default; ordinary tool calls stay available.`,S;t[25]===le?S=t[26]:(S=(0,w.jsx)(`span`,{className:`mt-1 block text-sm text-fg-muted`,children:le}),t[25]=le,t[26]=S);let C;t[27]!==x||t[28]!==S?(C=(0,w.jsxs)(`span`,{children:[x,S]}),t[27]=x,t[28]=S,t[29]=C):C=t[29];let D;t[30]!==b||t[31]!==C?(D=(0,w.jsx)(`section`,{className:`rounded-xl bg-surface-hover/20 p-5`,children:(0,w.jsxs)(`label`,{className:`flex cursor-pointer items-start gap-3`,children:[b,C]})}),t[30]=b,t[31]=C,t[32]=D):D=t[32];let O=i?`执行限制`:`Execution limits`,k;t[33]===O?k=t[34]:(k=(0,w.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:O}),t[33]=O,t[34]=k);let A=i?`为所有智能体设置安全上限;留空时使用系统默认值。`:`Set safe upper bounds for every agent. Empty fields use system defaults.`,j;t[35]===A?j=t[36]:(j=(0,w.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:A}),t[35]=A,t[36]=j);let pe=i?`每次运行最多轮数`:`Maximum turns per run`,me=n.runtime.maxTurns??``,he=i?`系统默认`:`System default`,M;t[37]!==n||t[38]!==r?(M=e=>r({...n,runtime:{...n.runtime,maxTurns:E(e.target.value)}}),t[37]=n,t[38]=r,t[39]=M):M=t[39];let N;t[40]!==me||t[41]!==he||t[42]!==M?(N=(0,w.jsx)(se,{allowEmpty:!0,type:`number`,min:1,value:me,placeholder:he,onChange:M,className:`${T} mt-2`}),t[40]=me,t[41]=he,t[42]=M,t[43]=N):N=t[43];let P;t[44]!==pe||t[45]!==N?(P=(0,w.jsxs)(`label`,{className:`block text-xs font-medium text-fg-muted`,children:[pe,N]}),t[44]=pe,t[45]=N,t[46]=P):P=t[46];let ge=i?`单轮超时(毫秒)`:`Turn timeout (ms)`,_e=n.runtime.timeoutMs??``,F=i?`系统默认`:`System default`,I;t[47]!==n||t[48]!==r?(I=e=>r({...n,runtime:{...n.runtime,timeoutMs:E(e.target.value)}}),t[47]=n,t[48]=r,t[49]=I):I=t[49];let L;t[50]!==_e||t[51]!==F||t[52]!==I?(L=(0,w.jsx)(se,{allowEmpty:!0,type:`number`,min:1,value:_e,placeholder:F,onChange:I,className:`${T} mt-2`}),t[50]=_e,t[51]=F,t[52]=I,t[53]=L):L=t[53];let R;t[54]!==ge||t[55]!==L?(R=(0,w.jsxs)(`label`,{className:`block text-xs font-medium text-fg-muted`,children:[ge,L]}),t[54]=ge,t[55]=L,t[56]=R):R=t[56];let z=i?`每轮最多工具失败次数`:`Maximum tool failures per turn`,B=n.runtime.maxToolFailuresPerTurn??``,V=i?`系统默认`:`System default`,H;t[57]!==n||t[58]!==r?(H=e=>r({...n,runtime:{...n.runtime,maxToolFailuresPerTurn:E(e.target.value)}}),t[57]=n,t[58]=r,t[59]=H):H=t[59];let U;t[60]!==B||t[61]!==V||t[62]!==H?(U=(0,w.jsx)(se,{allowEmpty:!0,type:`number`,min:1,value:B,placeholder:V,onChange:H,className:`${T} mt-2`}),t[60]=B,t[61]=V,t[62]=H,t[63]=U):U=t[63];let W;t[64]!==z||t[65]!==U?(W=(0,w.jsxs)(`label`,{className:`block text-xs font-medium text-fg-muted`,children:[z,U]}),t[64]=z,t[65]=U,t[66]=W):W=t[66];let G;t[67]!==P||t[68]!==R||t[69]!==W?(G=(0,w.jsxs)(`div`,{className:`mt-5 grid gap-4 md:grid-cols-3`,children:[P,R,W]}),t[67]=P,t[68]=R,t[69]=W,t[70]=G):G=t[70];let K;t[71]!==k||t[72]!==j||t[73]!==G?(K=(0,w.jsxs)(`section`,{className:`rounded-xl bg-surface-hover/20 p-5`,children:[k,j,G]}),t[71]=k,t[72]=j,t[73]=G,t[74]=K):K=t[74];let q=i?`提示词缓存`:`Prompt cache`,J;t[75]===q?J=t[76]:(J=(0,w.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:q}),t[75]=q,t[76]=J);let ve=i?`复用稳定的上下文以降低响应延迟和模型费用。`:`Reuse stable context to reduce latency and model cost.`,Y;t[77]===ve?Y=t[78]:(Y=(0,w.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:ve}),t[77]=ve,t[78]=Y);let X=i?`缓存模式`:`Cache mode`,Z;t[79]===X?Z=t[80]:(Z=(0,w.jsx)(`span`,{children:X}),t[79]=X,t[80]=Z);let Q;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(Q=[`auto`,`off`],t[81]=Q):Q=t[81];let $;t[82]!==n||t[83]!==r||t[84]!==i?($=(0,w.jsx)(`div`,{className:`mt-1.5 flex rounded-lg bg-surface-panel p-1`,children:Q.map(e=>(0,w.jsx)(ne,{variant:n.runtime.promptCache?.mode===e?`secondary`:`ghost`,className:`flex-1 py-1.5 text-xs`,onClick:()=>r({...n,runtime:{...n.runtime,promptCache:{mode:e,lifetime:n.runtime.promptCache?.lifetime??`short`}}}),children:e===`auto`?i?`自动`:`Automatic`:i?`关闭`:`Off`},e))}),t[82]=n,t[83]=r,t[84]=i,t[85]=$):$=t[85];let ye;t[86]!==Z||t[87]!==$?(ye=(0,w.jsxs)(`div`,{className:`text-xs font-medium text-fg-muted`,children:[Z,$]}),t[86]=Z,t[87]=$,t[88]=ye):ye=t[88];let be;t[89]!==n||t[90]!==r||t[91]!==i?(be=n.runtime.promptCache?.mode===`auto`?(0,w.jsxs)(`div`,{className:`text-xs font-medium text-fg-muted`,children:[(0,w.jsx)(`span`,{children:i?`缓存周期`:`Cache lifetime`}),(0,w.jsx)(`div`,{className:`mt-1.5 flex rounded-lg bg-surface-panel p-1`,children:[`short`,`long`].map(e=>(0,w.jsx)(ne,{variant:n.runtime.promptCache?.lifetime===e?`secondary`:`ghost`,className:`flex-1 py-1.5 text-xs`,onClick:()=>r({...n,runtime:{...n.runtime,promptCache:{mode:`auto`,lifetime:e}}}),children:e===`short`?i?`短期`:`Short`:i?`长期`:`Long`},e))})]}):null,t[89]=n,t[90]=r,t[91]=i,t[92]=be):be=t[92];let xe;t[93]!==ye||t[94]!==be?(xe=(0,w.jsxs)(`div`,{className:`mt-5 grid gap-4 sm:grid-cols-2`,children:[ye,be]}),t[93]=ye,t[94]=be,t[95]=xe):xe=t[95];let Se;t[96]!==J||t[97]!==Y||t[98]!==xe?(Se=(0,w.jsxs)(`section`,{className:`rounded-xl bg-surface-hover/20 p-5`,children:[J,Y,xe]}),t[96]=J,t[97]=Y,t[98]=xe,t[99]=Se):Se=t[99];let Ce;t[100]!==v||t[101]!==D||t[102]!==K||t[103]!==Se||t[104]!==ie?(Ce=(0,w.jsxs)(ee,{title:ie,summary:v,children:[D,K,Se]}),t[100]=v,t[101]=D,t[102]=K,t[103]=Se,t[104]=ie,t[105]=Ce):Ce=t[105];let we=i?`工作流`:`Workflows`,Te;t[106]===we?Te=t[107]:(Te=(0,w.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:we}),t[106]=we,t[107]=Te);let Ee=i?`设置默认工作流,并决定智能体可以调用哪些工作流。`:`Set a default workflow and control which workflows agents may invoke.`,De;t[108]===Ee?De=t[109]:(De=(0,w.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:Ee}),t[108]=Ee,t[109]=De);let Oe=i?`默认工作流`:`Default workflow`,ke=n.workflows.default||(i?`未自动绑定工作流`:`No workflow bound automatically`),Ae=i?`默认工作流`:`Default workflow`,je;t[110]===Ae?je=t[111]:(je=(0,w.jsx)(`label`,{className:`block text-xs font-medium text-fg-muted`,children:Ae}),t[110]=Ae,t[111]=je);let Me=n.workflows.default??``,Ne=s.isLoading?i?`正在加载…`:`Loading…`:i?`不设置默认工作流`:`No default workflow`,Pe=i?`不设置默认工作流`:`No default workflow`,Fe=i?`默认工作流`:`Default workflow`,Ie;t[112]!==n||t[113]!==r?(Ie=e=>r({...n,workflows:{...n.workflows,default:e||void 0}}),t[112]=n,t[113]=r,t[114]=Ie):Ie=t[114];let Le;t[115]!==Me||t[116]!==Ne||t[117]!==Pe||t[118]!==Fe||t[119]!==Ie||t[120]!==u||t[121]!==s.isLoading?(Le=(0,w.jsx)(_,{value:Me,options:u,placeholder:Ne,emptyLabel:Pe,disabled:s.isLoading,ariaLabel:Fe,onChange:Ie,triggerClassName:`mt-2`}),t[115]=Me,t[116]=Ne,t[117]=Pe,t[118]=Fe,t[119]=Ie,t[120]=u,t[121]=s.isLoading,t[122]=Le):Le=t[122];let Re;t[123]!==je||t[124]!==Le?(Re=(0,w.jsxs)(`div`,{className:`mt-5 max-w-xl`,children:[je,Le]}),t[123]=je,t[124]=Le,t[125]=Re):Re=t[125];let ze;t[126]!==Oe||t[127]!==ke||t[128]!==Re?(ze=(0,w.jsx)(ee,{title:Oe,summary:ke,children:Re}),t[126]=Oe,t[127]=ke,t[128]=Re,t[129]=ze):ze=t[129];let Be;t[130]===s.error?Be=t[131]:(Be=s.error?(0,w.jsx)(`p`,{className:`mt-3 text-sm text-red-600`,children:s.error instanceof Error?s.error.message:String(s.error)}):null,t[130]=s.error,t[131]=Be);let Ve=i?`允许调用的工作流`:`Allowed workflows`,He;t[132]===Ve?He=t[133]:(He=(0,w.jsx)(`h3`,{className:`text-sm font-medium text-fg`,children:Ve}),t[132]=Ve,t[133]=He);let Ue;t[134]!==n||t[135]!==r?(Ue=()=>r({...n,workflows:{...n.workflows,allowed:void 0}}),t[134]=n,t[135]=r,t[136]=Ue):Ue=t[136];let We=f?`bg-accent-soft shadow-surface`:`hover:bg-surface-hover`,Ge;t[137]===We?Ge=t[138]:(Ge=o(`rounded-xl bg-surface-base/55 p-4 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,We),t[137]=We,t[138]=Ge);let Ke=i?`允许全部工作流`:`Allow every workflow`,qe;t[139]===Ke?qe=t[140]:(qe=(0,w.jsx)(`span`,{className:`block text-sm font-medium text-fg`,children:Ke}),t[139]=Ke,t[140]=qe);let Je=i?`新增工作流也会自动可用。`:`New workflows become available automatically.`,Ye;t[141]===Je?Ye=t[142]:(Ye=(0,w.jsx)(`span`,{className:`mt-1 block text-xs text-fg-muted`,children:Je}),t[141]=Je,t[142]=Ye);let Xe;t[143]!==Ue||t[144]!==Ge||t[145]!==qe||t[146]!==Ye?(Xe=(0,w.jsxs)(`button`,{type:`button`,onClick:Ue,className:Ge,children:[qe,Ye]}),t[143]=Ue,t[144]=Ge,t[145]=qe,t[146]=Ye,t[147]=Xe):Xe=t[147];let Ze;t[148]!==n||t[149]!==r?(Ze=()=>r({...n,workflows:{...n.workflows,allowed:[]}}),t[148]=n,t[149]=r,t[150]=Ze):Ze=t[150];let Qe=f?`hover:bg-surface-hover`:`bg-accent-soft shadow-surface`,$e;t[151]===Qe?$e=t[152]:($e=o(`rounded-xl bg-surface-base/55 p-4 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,Qe),t[151]=Qe,t[152]=$e);let et=i?`只允许选中的工作流`:`Allow selected workflows only`,tt;t[153]===et?tt=t[154]:(tt=(0,w.jsx)(`span`,{className:`block text-sm font-medium text-fg`,children:et}),t[153]=et,t[154]=tt);let nt=i?`未选中的工作流不能被调用。`:`Unselected workflows cannot be invoked.`,rt;t[155]===nt?rt=t[156]:(rt=(0,w.jsx)(`span`,{className:`mt-1 block text-xs text-fg-muted`,children:nt}),t[155]=nt,t[156]=rt);let it;t[157]!==Ze||t[158]!==$e||t[159]!==tt||t[160]!==rt?(it=(0,w.jsxs)(`button`,{type:`button`,onClick:Ze,className:$e,children:[tt,rt]}),t[157]=Ze,t[158]=$e,t[159]=tt,t[160]=rt,t[161]=it):it=t[161];let at;t[162]!==Xe||t[163]!==it?(at=(0,w.jsxs)(`div`,{className:`mt-3 grid gap-3 sm:grid-cols-2`,children:[Xe,it]}),t[162]=Xe,t[163]=it,t[164]=at):at=t[164];let ot;t[165]!==f||t[166]!==n.workflows.allowed||t[167]!==p||t[168]!==s.data||t[169]!==s.isLoading||t[170]!==i?(ot=f?null:(0,w.jsxs)(`div`,{className:`mt-3 flex flex-col gap-1 rounded-xl bg-surface-base/45 p-1 [&>label]:rounded-lg [&>label]:bg-surface-panel/55`,children:[(s.data??[]).map(e=>(0,w.jsxs)(`label`,{className:`flex cursor-pointer items-start gap-3 px-4 py-3 hover:bg-surface-hover/60`,children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:n.workflows.allowed?.includes(e.id)??!1,onChange:t=>p(e.id,t.target.checked),className:`mt-0.5 size-4 accent-[var(--color-accent)]`}),(0,w.jsxs)(`span`,{children:[(0,w.jsx)(`span`,{className:`block text-sm font-medium text-fg`,children:e.title||e.name}),e.description?(0,w.jsx)(`span`,{className:`mt-1 block text-xs text-fg-muted`,children:e.description}):null]})]},e.id)),(s.data??[]).length===0&&!s.isLoading?(0,w.jsx)(`p`,{className:`px-4 py-8 text-center text-sm text-fg-muted`,children:i?`还没有工作流。`:`No workflows yet.`}):null]}),t[165]=f,t[166]=n.workflows.allowed,t[167]=p,t[168]=s.data,t[169]=s.isLoading,t[170]=i,t[171]=ot):ot=t[171];let st;t[172]!==He||t[173]!==at||t[174]!==ot?(st=(0,w.jsxs)(`div`,{className:`mt-6 rounded-xl bg-surface-base/45 p-4`,children:[He,at,ot]}),t[172]=He,t[173]=at,t[174]=ot,t[175]=st):st=t[175];let ct;t[176]!==Te||t[177]!==De||t[178]!==ze||t[179]!==Be||t[180]!==st?(ct=(0,w.jsxs)(`section`,{className:`rounded-xl bg-surface-hover/20 p-5`,children:[Te,De,ze,Be,st]}),t[176]=Te,t[177]=De,t[178]=ze,t[179]=Be,t[180]=st,t[181]=ct):ct=t[181];let lt;return t[182]!==Ce||t[183]!==g||t[184]!==ct?(lt=(0,w.jsxs)(`div`,{className:`space-y-5`,children:[g,Ce,ct]}),t[182]=Ce,t[183]=g,t[184]=ct,t[185]=lt):lt=t[185],lt}function fe(e){return{value:e.id,label:e.title||e.name}}function O(e){return[...new Set(e)].sort()}var k=[{id:`core`,names:[`doc-coauthoring`,`define-task`,`find-skills`,`summarize`],en:`Core`,zh:`核心`},{id:`office`,names:[`doc-coauthoring`,`define-task`,`find-skills`,`summarize`,`docx`,`pdf`,`pptx`,`xlsx`],en:`Office`,zh:`办公成果`},{id:`local-app`,names:[`doc-coauthoring`,`define-task`,`find-skills`,`summarize`,`build-xopc-local-app`,`frontend-design`,`theme-factory`],en:`Local App`,zh:`本地应用`},{id:`developer`,names:[`doc-coauthoring`,`define-task`,`find-skills`,`summarize`,`diagnose`,`github`,`tdd`,`webapp-testing`],en:`Developer`,zh:`开发者`},{id:`desktop-pet`,names:[`doc-coauthoring`,`define-task`,`find-skills`,`summarize`,`hatch-pet`],en:`Desktop Pet`,zh:`桌面宠物`}];function A(e){let t=(0,ue.c)(115),{draft:n,setDraft:r,zh:i}=e,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s={revalidateOnFocus:!1},t[0]=s):s=t[0];let{data:c,error:l,isLoading:u}=d(`agent-defaults-skills-catalog`,ae,s),[f,ee]=(0,C.useState)(``),te=n.skills.mode===`selected`?n.skills.include:n.skills.exclude;c?.catalog;let ne;if(t[1]!==te||t[2]!==c?.catalog||t[3]!==f){let e=[...c?.catalog??[]],n=new Set(e.map(M));for(let t of te)n.has(t)||e.push({name:t,description:``,enabled:!0});let r=f.trim().toLowerCase();ne=e.filter(e=>!r||`${e.name} ${e.description}`.toLowerCase().includes(r)).sort(he),t[1]=te,t[2]=c?.catalog,t[3]=f,t[4]=ne}else ne=t[4];let p=ne,re;t[5]!==n.skills.exclude||t[6]!==n.skills.include||t[7]!==n.skills.mode?(re=e=>n.skills.mode===`selected`?n.skills.include.includes(e):!n.skills.exclude.includes(e),t[5]=n.skills.exclude,t[6]=n.skills.include,t[7]=n.skills.mode,t[8]=re):re=t[8];let m=re,h;t[9]!==n||t[10]!==r?(h=e=>{if(n.skills.mode===`selected`){let t=n.skills.include.includes(e)?n.skills.include.filter(t=>t!==e):O([...n.skills.include,e]);r({...n,skills:{mode:`selected`,include:t}});return}let t=n.skills.exclude.includes(e)?n.skills.exclude.filter(t=>t!==e):O([...n.skills.exclude,e]);r({...n,skills:{mode:`all-enabled`,exclude:t}})},t[9]=n,t[10]=r,t[11]=h):h=t[11];let _=h,v;t[12]===c?.catalog?v=t[13]:(v=c?.catalog??[],t[12]=c?.catalog,t[13]=v);let y;if(t[14]!==m||t[15]!==v){let e;t[17]===m?e=t[18]:(e=e=>e.enabled&&m(e.name),t[17]=m,t[18]=e),y=v.filter(e),t[14]=m,t[15]=v,t[16]=y}else y=t[16];let oe=y.length,b;t[19]!==c?.catalog||t[20]!==n||t[21]!==r?(b=e=>{let t=new Set((c?.catalog??[]).filter(me).map(pe));r({...n,skills:{mode:`selected`,include:O(e.filter(e=>t.has(e)))}})},t[19]=c?.catalog,t[20]=n,t[21]=r,t[22]=b):b=t[22];let se=b,ce=i?`技能策略`:`Skill policy`,x;t[23]===ce?x=t[24]:(x=(0,w.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:ce}),t[23]=ce,t[24]=x);let le=i?`决定所有智能体默认可以使用哪些技能。`:`Choose which skills every agent can discover and use by default.`,S;t[25]===le?S=t[26]:(S=(0,w.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:le}),t[25]=le,t[26]=S);let T;t[27]!==n||t[28]!==r?(T=()=>r({...n,skills:{mode:`all-enabled`,exclude:[]}}),t[27]=n,t[28]=r,t[29]=T):T=t[29];let E=n.skills.mode===`all-enabled`?`bg-accent-soft shadow-surface`:`hover:bg-surface-hover`,de;t[30]===E?de=t[31]:(de=o(`flex items-start gap-3 rounded-xl bg-surface-base/55 p-4 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,E),t[30]=E,t[31]=de);let D;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,w.jsx)(a,{className:`mt-0.5 size-5 shrink-0 text-accent`}),t[32]=D):D=t[32];let fe=i?`使用所有已启用技能`:`Use every enabled skill`,A;t[33]===fe?A=t[34]:(A=(0,w.jsx)(`span`,{className:`block text-sm font-medium text-fg`,children:fe}),t[33]=fe,t[34]=A);let N=i?`适合需要完整目录的高级智能体;新增技能会自动加入。`:`For advanced agents that need the full catalog; newly enabled skills are added automatically.`,P;t[35]===N?P=t[36]:(P=(0,w.jsx)(`span`,{className:`mt-1 block text-xs leading-5 text-fg-muted`,children:N}),t[35]=N,t[36]=P);let ge;t[37]!==A||t[38]!==P?(ge=(0,w.jsxs)(`span`,{children:[A,P]}),t[37]=A,t[38]=P,t[39]=ge):ge=t[39];let _e;t[40]!==T||t[41]!==de||t[42]!==ge?(_e=(0,w.jsxs)(`button`,{type:`button`,onClick:T,className:de,children:[D,ge]}),t[40]=T,t[41]=de,t[42]=ge,t[43]=_e):_e=t[43];let F;t[44]!==n||t[45]!==r?(F=()=>r({...n,skills:{mode:`selected`,include:[]}}),t[44]=n,t[45]=r,t[46]=F):F=t[46];let I=n.skills.mode===`selected`?`bg-accent-soft shadow-surface`:`hover:bg-surface-hover`,L;t[47]===I?L=t[48]:(L=o(`flex items-start gap-3 rounded-xl bg-surface-base/55 p-4 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,I),t[47]=I,t[48]=L);let R;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,w.jsx)(g,{className:`mt-0.5 size-5 shrink-0 text-accent`}),t[49]=R):R=t[49];let z=i?`只使用选中的技能`:`Use selected skills only`,B;t[50]===z?B=t[51]:(B=(0,w.jsx)(`span`,{className:`block text-sm font-medium text-fg`,children:z}),t[50]=z,t[51]=B);let V=i?`适合严格受控的环境;新增技能不会自动加入。`:`For tightly controlled environments; new skills are not added automatically.`,H;t[52]===V?H=t[53]:(H=(0,w.jsx)(`span`,{className:`mt-1 block text-xs leading-5 text-fg-muted`,children:V}),t[52]=V,t[53]=H);let U;t[54]!==B||t[55]!==H?(U=(0,w.jsxs)(`span`,{children:[B,H]}),t[54]=B,t[55]=H,t[56]=U):U=t[56];let W;t[57]!==F||t[58]!==L||t[59]!==U?(W=(0,w.jsxs)(`button`,{type:`button`,onClick:F,className:L,children:[R,U]}),t[57]=F,t[58]=L,t[59]=U,t[60]=W):W=t[60];let G;t[61]!==_e||t[62]!==W?(G=(0,w.jsxs)(`div`,{className:`mt-5 grid gap-3 sm:grid-cols-2`,children:[_e,W]}),t[61]=_e,t[62]=W,t[63]=G):G=t[63];let K=i?`能力组合(会替换当前选择)`:`Capability packs (replaces the current selection)`,q;t[64]===K?q=t[65]:(q=(0,w.jsx)(`p`,{className:`text-xs font-medium text-fg-muted`,children:K}),t[64]=K,t[65]=q);let J;t[66]!==se||t[67]!==c||t[68]!==i?(J=k.map(e=>(0,w.jsx)(`button`,{type:`button`,onClick:()=>se(e.names),disabled:!c,className:`rounded-lg border border-edge bg-surface-panel px-3 py-1.5 text-xs font-medium text-fg transition-colors hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-50`,children:i?e.zh:e.en},e.id)),t[66]=se,t[67]=c,t[68]=i,t[69]=J):J=t[69];let ve;t[70]===J?ve=t[71]:(ve=(0,w.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:J}),t[70]=J,t[71]=ve);let Y;t[72]!==q||t[73]!==ve?(Y=(0,w.jsxs)(`div`,{className:`mt-4`,children:[q,ve]}),t[72]=q,t[73]=ve,t[74]=Y):Y=t[74];let X;t[75]!==S||t[76]!==G||t[77]!==Y||t[78]!==x?(X=(0,w.jsxs)(`section`,{className:`rounded-xl bg-surface-hover/20 p-5`,children:[x,S,G,Y]}),t[75]=S,t[76]=G,t[77]=Y,t[78]=x,t[79]=X):X=t[79];let Z=n.skills.mode===`selected`?i?`选择可用技能`:`Select available skills`:i?`管理例外`:`Manage exceptions`,Q;t[80]===Z?Q=t[81]:(Q=(0,w.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:Z}),t[80]=Z,t[81]=Q);let $=i?`当前默认可用 ${oe} 个技能。`:`${oe} skills are available by default.`,ye;t[82]===$?ye=t[83]:(ye=(0,w.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:$}),t[82]=$,t[83]=ye);let be;t[84]!==Q||t[85]!==ye?(be=(0,w.jsxs)(`div`,{children:[Q,ye]}),t[84]=Q,t[85]=ye,t[86]=be):be=t[86];let xe=i?`搜索技能`:`Search skills`,Se;t[87]===xe?Se=t[88]:(Se=(0,w.jsx)(`span`,{className:`sr-only`,children:xe}),t[87]=xe,t[88]=Se);let Ce;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=(0,w.jsx)(ie,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-subtle`}),t[89]=Ce):Ce=t[89];let we;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(we=e=>ee(e.target.value),t[90]=we):we=t[90];let Te=i?`搜索技能`:`Search skills`,Ee;t[91]!==f||t[92]!==Te?(Ee=(0,w.jsx)(`input`,{type:`search`,value:f,onChange:we,placeholder:Te,className:`w-full rounded-lg border border-edge bg-surface-panel py-2 pl-9 pr-3 text-sm text-fg outline-none focus:border-accent`}),t[91]=f,t[92]=Te,t[93]=Ee):Ee=t[93];let De;t[94]!==Se||t[95]!==Ee?(De=(0,w.jsxs)(`label`,{className:`relative block w-full sm:w-72`,children:[Se,Ce,Ee]}),t[94]=Se,t[95]=Ee,t[96]=De):De=t[96];let Oe;t[97]!==be||t[98]!==De?(Oe=(0,w.jsxs)(`div`,{className:`flex flex-wrap items-end justify-between gap-3`,children:[be,De]}),t[97]=be,t[98]=De,t[99]=Oe):Oe=t[99];let ke;t[100]===l?ke=t[101]:(ke=l?(0,w.jsx)(`p`,{className:`mt-4 rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-600`,children:l instanceof Error?l.message:String(l)}):null,t[100]=l,t[101]=ke);let Ae;t[102]!==m||t[103]!==u||t[104]!==p||t[105]!==_||t[106]!==i?(Ae=u?(0,w.jsx)(`div`,{className:`mt-4 space-y-2`,children:[0,1,2,3].map(j)}):(0,w.jsxs)(`div`,{className:`mt-4 flex max-h-[32rem] flex-col gap-1 overflow-y-auto rounded-xl bg-surface-base/45 p-1 [&>label]:rounded-lg [&>label]:bg-surface-panel/55`,children:[p.map(e=>{let t=m(e.name);return(0,w.jsxs)(`label`,{className:o(`flex cursor-pointer items-start gap-3 px-4 py-3 hover:bg-surface-hover/60`,!e.enabled&&`cursor-not-allowed opacity-55`),children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:t,disabled:!e.enabled,onChange:()=>_(e.name),className:`mt-0.5 size-4 rounded border-edge accent-[var(--color-accent)]`}),(0,w.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,w.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,w.jsx)(`span`,{className:`text-sm font-medium text-fg`,children:e.name}),e.enabled?null:(0,w.jsx)(`span`,{className:`rounded-full bg-surface-hover px-2 py-0.5 text-[10px] text-fg-muted`,children:i?`全局未启用`:`Disabled globally`})]}),e.description?(0,w.jsx)(`span`,{className:`mt-1 block line-clamp-2 text-xs leading-5 text-fg-muted`,children:e.description}):null]})]},e.name)}),p.length===0?(0,w.jsx)(`p`,{className:`px-4 py-8 text-center text-sm text-fg-muted`,children:i?`没有匹配的技能。`:`No matching skills.`}):null]}),t[102]=m,t[103]=u,t[104]=p,t[105]=_,t[106]=i,t[107]=Ae):Ae=t[107];let je;t[108]!==Oe||t[109]!==ke||t[110]!==Ae?(je=(0,w.jsxs)(`section`,{className:`rounded-xl bg-surface-hover/20 p-5`,children:[Oe,ke,Ae]}),t[108]=Oe,t[109]=ke,t[110]=Ae,t[111]=je):je=t[111];let Me;return t[112]!==X||t[113]!==je?(Me=(0,w.jsxs)(`div`,{className:`space-y-5`,children:[X,je]}),t[112]=X,t[113]=je,t[114]=Me):Me=t[114],Me}function j(e){return(0,w.jsx)(p,{className:`h-14 rounded-xl`},e)}function pe(e){return e.name}function me(e){return e.enabled}function he(e,t){return e.name.localeCompare(t.name)}function M(e){return e.name}function N(e){let t=Number.parseInt(e,10);return Number.isFinite(t)&&t>0?t:void 0}function P(e){let t=(0,ue.c)(98),{draft:n,setDraft:r,builtinTools:i,zh:a}=e,s=h(),[c,l]=(0,C.useState)(``),[u,d]=(0,C.useState)(`all`),[f,p]=(0,C.useState)(),re;t[0]===i?re=t[1]:(re=new Map(i.map(F)),t[0]=i,t[1]=re);let m=re,g;t[2]!==i||t[3]!==n.tools?(g=[...new Set([...i.map(_e),...Object.keys(n.tools)])].filter(ge).sort(),t[2]=i,t[3]=n.tools,t[4]=g):g=t[4];let _=g,v;if(t[5]!==_||t[6]!==n.tools){let e;t[8]===n.tools?e=t[9]:(e=e=>(n.tools[e]?.mode??`allow`)===`allow`,t[8]=n.tools,t[9]=e),v=_.filter(e),t[5]=_,t[6]=n.tools,t[7]=v}else v=t[7];let ae=v.length,y;if(t[10]!==_||t[11]!==n.tools){let e;t[13]===n.tools?e=t[14]:(e=e=>n.tools[e]?.mode===`ask`,t[13]=n.tools,t[14]=e),y=_.filter(e),t[10]=_,t[11]=n.tools,t[12]=y}else y=t[12];let oe=y.length,b;if(t[15]!==_||t[16]!==n.tools){let e;t[18]===n.tools?e=t[19]:(e=e=>n.tools[e]?.mode===`deny`,t[18]=n.tools,t[19]=e),b=_.filter(e),t[15]=_,t[16]=n.tools,t[17]=b}else b=t[17];let ce;t[20]!==v.length||t[21]!==y.length||t[22]!==b.length?(ce={allow:ae,ask:oe,deny:b.length},t[20]=v.length,t[21]=y.length,t[22]=b.length,t[23]=ce):ce=t[23];let x=ce,le;if(t[24]!==_||t[25]!==m||t[26]!==n.tools||t[27]!==u||t[28]!==c){let e=c.trim().toLowerCase();le=_.filter(t=>{let r=n.tools[t]?.mode??`allow`,i=m.get(t),a=`${t} ${i?.en??``} ${i?.zh??``}`.toLowerCase();return(!e||a.includes(e))&&(u===`all`||r===u)}),t[24]=_,t[25]=m,t[26]=n.tools,t[27]=u,t[28]=c,t[29]=le}else le=t[29];let S=le,T;t[30]!==n||t[31]!==r?(T=(e,t)=>{let i=n.tools[e]??{mode:`allow`};r({...n,tools:{...n.tools,[e]:{...i,...t}}})},t[30]=n,t[31]=r,t[32]=T):T=t[32];let E=T,de=a?`全部 ${_.length}`:`All ${_.length}`,D;t[33]===de?D=t[34]:(D={id:`all`,label:de},t[33]=de,t[34]=D);let fe=a?`允许 ${x.allow}`:`Allow ${x.allow}`,O;t[35]===fe?O=t[36]:(O={id:`allow`,label:fe},t[35]=fe,t[36]=O);let k=a?`询问 ${x.ask}`:`Ask ${x.ask}`,A;t[37]===k?A=t[38]:(A={id:`ask`,label:k},t[37]=k,t[38]=A);let j=a?`禁用 ${x.deny}`:`Deny ${x.deny}`,pe;t[39]===j?pe=t[40]:(pe={id:`deny`,label:j},t[39]=j,t[40]=pe);let me;t[41]!==D||t[42]!==O||t[43]!==A||t[44]!==pe?(me=[D,O,A,pe],t[41]=D,t[42]=O,t[43]=A,t[44]=pe,t[45]=me):me=t[45];let he=me,M=a?`默认工具权限`:`Default tool permissions`,P;t[46]===M?P=t[47]:(P=(0,w.jsx)(`h2`,{className:`text-base font-semibold text-fg`,children:M}),t[46]=M,t[47]=P);let I=a?`允许:直接执行;询问:执行前确认;禁用:智能体无法使用。`:`Allow runs directly, Ask requires confirmation, and Deny makes the tool unavailable.`,L;t[48]===I?L=t[49]:(L=(0,w.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:I}),t[48]=I,t[49]=L);let R;t[50]!==P||t[51]!==L?(R=(0,w.jsxs)(`div`,{children:[P,L]}),t[50]=P,t[51]=L,t[52]=R):R=t[52];let z;t[53]!==u||t[54]!==he?(z=(0,w.jsx)(`div`,{className:`flex flex-wrap gap-1 rounded-xl bg-surface-panel p-1`,children:he.map(e=>(0,w.jsx)(`button`,{type:`button`,onClick:()=>d(e.id),className:o(`rounded-lg px-3 py-1.5 text-xs font-medium`,u===e.id?`bg-surface-base text-fg shadow-surface`:`text-fg-muted hover:text-fg`),children:e.label},e.id))}),t[53]=u,t[54]=he,t[55]=z):z=t[55];let B=a?`搜索工具`:`Search tools`,V;t[56]===B?V=t[57]:(V=(0,w.jsx)(`span`,{className:`sr-only`,children:B}),t[56]=B,t[57]=V);let H;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,w.jsx)(ie,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-subtle`}),t[58]=H):H=t[58];let U;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(U=e=>l(e.target.value),t[59]=U):U=t[59];let W=a?`搜索工具`:`Search tools`,G;t[60]!==c||t[61]!==W?(G=(0,w.jsx)(`input`,{type:`search`,value:c,onChange:U,placeholder:W,className:`w-full rounded-lg border border-edge bg-surface-panel py-2 pl-9 pr-3 text-sm text-fg outline-none focus:border-accent`}),t[60]=c,t[61]=W,t[62]=G):G=t[62];let K;t[63]!==V||t[64]!==G?(K=(0,w.jsxs)(`label`,{className:`relative block w-full sm:w-72`,children:[V,H,G]}),t[63]=V,t[64]=G,t[65]=K):K=t[65];let q;t[66]!==z||t[67]!==K?(q=(0,w.jsxs)(`div`,{className:`mt-5 flex flex-wrap items-center justify-between gap-3`,children:[z,K]}),t[66]=z,t[67]=K,t[68]=q):q=t[68];let J=a?`工具调用限制`:`Tool call limits`,ve=a?`每个工具的调用次数和超时限制继续生效;授权可在下方直接修改。`:`Call and timeout limits remain active; edit permissions below.`,Y;t[69]!==J||t[70]!==ve?(Y=(0,w.jsx)(ee,{title:J,summary:ve,children:null}),t[69]=J,t[70]=ve,t[71]=Y):Y=t[71];let X;if(t[72]!==m||t[73]!==n.tools||t[74]!==f||t[75]!==s||t[76]!==E||t[77]!==S||t[78]!==a){let e;t[80]!==m||t[81]!==n.tools||t[82]!==f||t[83]!==s||t[84]!==E||t[85]!==a?(e=e=>{let t=n.tools[e]??{mode:`allow`},r=m.get(e),i=f===e;return(0,w.jsxs)(`div`,{className:`px-4 py-3`,children:[(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,w.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,w.jsx)(`code`,{className:`text-xs font-medium text-fg`,children:e}),r?(0,w.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:a?r.zh:r.en}):null]}),(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsx)(`div`,{className:`flex rounded-lg bg-surface-base p-1`,children:[`allow`,`ask`,`deny`].map(n=>(0,w.jsx)(`button`,{type:`button`,onClick:()=>E(e,{mode:n}),className:o(`rounded-md px-2.5 py-1 text-xs font-medium capitalize`,t.mode===n?`bg-accent text-on-accent`:`text-fg-muted hover:text-fg`),children:n===`allow`?a?`允许`:`Allow`:n===`ask`?a?`询问`:`Ask`:a?`禁用`:`Deny`},n))}),s?(0,w.jsx)(ne,{variant:`ghost`,className:`px-2 py-1`,"aria-label":a?`${e} 调用限制`:`${e} call limits`,onClick:()=>p(i?void 0:e),children:(0,w.jsx)(te,{className:`size-4`})}):null]})]}),i&&s?(0,w.jsxs)(`div`,{className:`mt-3 grid gap-3 rounded-lg bg-surface-base p-3 sm:grid-cols-2`,children:[(0,w.jsxs)(`label`,{className:`block text-xs font-medium text-fg-muted`,children:[a?`每轮最多调用次数`:`Maximum calls per turn`,(0,w.jsx)(se,{allowEmpty:!0,type:`number`,min:1,value:t.maxCallsPerTurn??``,placeholder:a?`不限制`:`Unlimited`,onChange:t=>E(e,{maxCallsPerTurn:N(t.target.value)}),className:`mt-2 w-full rounded-lg border border-edge bg-surface-panel px-3 py-2 text-sm text-fg outline-none focus:border-accent`})]}),(0,w.jsxs)(`label`,{className:`block text-xs font-medium text-fg-muted`,children:[a?`单次超时(毫秒)`:`Call timeout (ms)`,(0,w.jsx)(se,{allowEmpty:!0,type:`number`,min:1,value:t.timeoutMs??``,placeholder:a?`使用系统默认值`:`Use system default`,onChange:t=>E(e,{timeoutMs:N(t.target.value)}),className:`mt-2 w-full rounded-lg border border-edge bg-surface-panel px-3 py-2 text-sm text-fg outline-none focus:border-accent`})]})]}):null]},e)},t[80]=m,t[81]=n.tools,t[82]=f,t[83]=s,t[84]=E,t[85]=a,t[86]=e):e=t[86],X=S.map(e),t[72]=m,t[73]=n.tools,t[74]=f,t[75]=s,t[76]=E,t[77]=S,t[78]=a,t[79]=X}else X=t[79];let Z;t[87]!==S.length||t[88]!==a?(Z=S.length===0?(0,w.jsx)(`p`,{className:`px-4 py-10 text-center text-sm text-fg-muted`,children:a?`没有匹配的工具。`:`No matching tools.`}):null,t[87]=S.length,t[88]=a,t[89]=Z):Z=t[89];let Q;t[90]!==X||t[91]!==Z?(Q=(0,w.jsxs)(`div`,{className:`mt-4 flex max-h-[38rem] flex-col gap-1 overflow-y-auto rounded-xl bg-surface-base/45 p-1 [&>*]:rounded-lg [&>*]:bg-surface-panel/55`,children:[X,Z]}),t[90]=X,t[91]=Z,t[92]=Q):Q=t[92];let $;return t[93]!==R||t[94]!==q||t[95]!==Y||t[96]!==Q?($=(0,w.jsxs)(`section`,{className:`rounded-xl bg-surface-hover/20 p-5`,children:[R,q,Y,Q]}),t[93]=R,t[94]=q,t[95]=Y,t[96]=Q,t[97]=$):$=t[97],$}function ge(e){return e!==`computer_use`||y()}function _e(e){return e.id}function F(e){return[e.id,e.description]}function I(){let e=(0,ue.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,w.jsxs)(x,{gap:`gap-5`,children:[(0,w.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,w.jsxs)(`div`,{className:`space-y-2`,children:[(0,w.jsx)(p,{className:`h-7 w-56`}),(0,w.jsx)(p,{className:`h-4 w-96 max-w-full`})]}),(0,w.jsx)(p,{className:`h-9 w-28`})]}),(0,w.jsx)(p,{className:`h-20 rounded-2xl`}),(0,w.jsx)(p,{className:`h-12 rounded-xl`}),(0,w.jsx)(p,{className:`h-72 rounded-2xl`})]}),e[0]=t):t=e[0],t}function L(e){let t=(0,ue.c)(65),{initial:n,builtinTools:r,zh:a}=e,[s,c]=i(),l;t[0]===s?l=t[1]:(l=s.get(`panel`),t[0]=s,t[1]=l);let u=l,d=u===`skills`||u===`tools`||u===`runtime`?u:`skills`,ee;t[2]!==s||t[3]!==c?(ee=e=>{let t=new URLSearchParams(s);t.set(`panel`,e),c(t,{replace:!0})},t[2]=s,t[3]=c,t[4]=ee):ee=t[4];let te=ee,p;t[5]===n?p=t[6]:(p=()=>structuredClone(n),t[5]=n,t[6]=p);let[h,g]=(0,C.useState)(p),_;t[7]===n?_=t[8]:(_=()=>structuredClone(n),t[7]=n,t[8]=_);let[ie,ae]=(0,C.useState)(_),y;t[9]===h?y=t[10]:(y=JSON.stringify(h),t[9]=h,t[10]=y);let oe;t[11]===ie?oe=t[12]:(oe=JSON.stringify(ie),t[11]=ie,t[12]=oe);let se=y!==oe,T=a?`技能`:`Skills`,E;t[13]===T?E=t[14]:(E={id:`skills`,label:T,icon:v},t[13]=T,t[14]=E);let de=a?`工具`:`Tools`,fe;t[15]===de?fe=t[16]:(fe={id:`tools`,label:de,icon:m},t[15]=de,t[16]=fe);let O=a?`运行`:`Runtime`,k;t[17]===O?k=t[18]:(k={id:`runtime`,label:O,icon:b},t[17]=O,t[18]=k);let j;t[19]!==fe||t[20]!==k||t[21]!==E?(j=[E,fe,k],t[19]=fe,t[20]=k,t[21]=E,t[22]=j):j=t[22];let pe=j,me;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(me=async e=>{let t=structuredClone(e),n=await f(),r=await re({...t,models:n.defaults.models},{scope:`agent`}),i=structuredClone(r.defaults);g(e=>JSON.stringify(e)===JSON.stringify(t)?i:e),ae(structuredClone(i))},t[23]=me):me=t[23];let he=me,M;t[24]!==se||t[25]!==h?(M={value:h,dirty:se,onSave:he,delayMs:0},t[24]=se,t[25]=h,t[26]=M):M=t[26];let N=S(M),ge=N.onBlurCapture,_e=a?`智能体设置`:`Agent settings`,F;t[27]!==N.error||t[28]!==N.status?(F=(0,w.jsx)(le,{status:N.status,error:N.error}),t[27]=N.error,t[28]=N.status,t[29]=F):F=t[29];let I;t[30]!==_e||t[31]!==F?(I=(0,w.jsx)(ce,{title:_e,actions:F}),t[30]=_e,t[31]=F,t[32]=I):I=t[32];let L;t[33]!==N.error||t[34]!==N.retry||t[35]!==a?(L=N.error?(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 rounded-xl bg-red-500/10 px-3 py-2 text-sm text-red-600`,children:[(0,w.jsx)(`span`,{children:N.error}),(0,w.jsx)(ne,{type:`button`,variant:`ghost`,className:`h-8 text-red-600`,onClick:N.retry,children:a?`重试`:`Retry`})]}):null,t[33]=N.error,t[34]=N.retry,t[35]=a,t[36]=L):L=t[36];let R=a?`默认配置分区`:`Default configuration sections`,z;t[37]!==d||t[38]!==te||t[39]!==pe?(z=pe.map(e=>{let{id:t,label:n,icon:r}=e;return(0,w.jsxs)(`button`,{type:`button`,"aria-pressed":d===t,onClick:()=>te(t),className:o(`flex min-w-0 items-center justify-center gap-2 rounded-lg px-3 py-2.5 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,d===t?`bg-surface-base text-fg shadow-surface`:`text-fg-muted hover:bg-surface-hover hover:text-fg`),children:[(0,w.jsx)(r,{className:o(`size-4 shrink-0`,d===t?`text-accent`:`text-fg-subtle`)}),(0,w.jsx)(`span`,{className:`text-sm font-medium`,children:n})]},t)}),t[37]=d,t[38]=te,t[39]=pe,t[40]=z):z=t[40];let B;t[41]!==R||t[42]!==z?(B=(0,w.jsx)(`nav`,{className:`grid grid-cols-3 gap-1 rounded-xl bg-surface-hover/20 p-1`,"aria-label":R,children:z}),t[41]=R,t[42]=z,t[43]=B):B=t[43];let V;t[44]!==d||t[45]!==h||t[46]!==a?(V=d===`skills`?(0,w.jsx)(A,{draft:h,setDraft:g,zh:a}):null,t[44]=d,t[45]=h,t[46]=a,t[47]=V):V=t[47];let H;t[48]!==d||t[49]!==r||t[50]!==h||t[51]!==a?(H=d===`tools`?(0,w.jsx)(P,{draft:h,setDraft:g,builtinTools:r,zh:a}):null,t[48]=d,t[49]=r,t[50]=h,t[51]=a,t[52]=H):H=t[52];let U;t[53]!==d||t[54]!==h||t[55]!==a?(U=d===`runtime`?(0,w.jsx)(D,{draft:h,setDraft:g,zh:a}):null,t[53]=d,t[54]=h,t[55]=a,t[56]=U):U=t[56];let W;return t[57]!==N.onBlurCapture||t[58]!==I||t[59]!==L||t[60]!==B||t[61]!==V||t[62]!==H||t[63]!==U?(W=(0,w.jsxs)(x,{gap:`gap-5`,onBlurCapture:ge,children:[I,L,B,V,H,U]}),t[57]=N.onBlurCapture,t[58]=I,t[59]=L,t[60]=B,t[61]=V,t[62]=H,t[63]=U,t[64]=W):W=t[64],W}function R(){let e=(0,ue.c)(17),t=s(B),n=c(z)===`zh`,{data:r,error:i,isLoading:a,mutate:o}=d(t?`settings-agent-defaults`:null,f);if(!t){let t=n?`需要本机服务令牌。`:`Local service token required.`,r;return e[0]===t?r=e[1]:(r=(0,w.jsx)(x,{children:(0,w.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t})}),e[0]=t,e[1]=r),r}if(i&&!r){let t=String(i),r;e[2]===t?r=e[3]:(r=(0,w.jsx)(`p`,{className:`rounded-xl bg-red-500/10 px-3 py-2 text-sm text-red-600`,children:t}),e[2]=t,e[3]=r);let a;e[4]===o?a=e[5]:(a=()=>void o(),e[4]=o,e[5]=a);let s=n?`重试`:`Retry`,c;e[6]!==a||e[7]!==s?(c=(0,w.jsx)(ne,{onClick:a,children:s}),e[6]=a,e[7]=s,e[8]=c):c=e[8];let l;return e[9]!==r||e[10]!==c?(l=(0,w.jsxs)(x,{children:[r,c]}),e[9]=r,e[10]=c,e[11]=l):l=e[11],l}if(a||!r){let t;return e[12]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,w.jsx)(I,{}),e[12]=t):t=e[12],t}let l;return e[13]!==r.builtinTools||e[14]!==r.defaults||e[15]!==n?(l=(0,w.jsx)(L,{initial:r.defaults,builtinTools:r.builtinTools,zh:n}),e[13]=r.builtinTools,e[14]=r.defaults,e[15]=n,e[16]=l):l=e[16],l}function z(e){return e.language}function B(e){return e.conversationId}export{R as AgentDefaultsSettingsPanel};
|