@xopcai/xopc 0.0.87 → 0.0.88
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/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/feishu/src/workflow-progress.js +1 -1
- package/dist/extensions/telegram/src/plugin.js +1 -1
- package/dist/extensions/telegram/src/routing-integration.js +2 -2
- package/dist/extensions/telegram/src/workflow-progress.js +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/api/api.js +2 -2
- package/dist/extensions/weixin/src/auth/accounts.js +1 -1
- package/dist/extensions/weixin/src/cdn/upload.js +1 -1
- package/dist/extensions/weixin/src/media/data-url.js +1 -1
- package/dist/extensions/weixin/src/messaging/debug-mode.js +1 -1
- package/dist/extensions/weixin/src/messaging/inbound.js +1 -1
- package/dist/extensions/weixin/src/messaging/process-message.js +1 -1
- package/dist/extensions/weixin/src/plugin.js +1 -1
- package/dist/extensions/weixin/src/storage/sync-buf.js +1 -1
- package/dist/extensions/weixin/src/workflow-progress.js +1 -1
- package/dist/gateway/static/root/assets/agents-CRxETUZx.js +222 -0
- package/dist/gateway/static/root/assets/{apps-page-Dg8R-Szf.js → apps-page-wKWf3l57.js} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-DDbqVNkx.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-BSHqqCF1.js → channels-status-swr-DIsl75Y3.js} +1 -1
- package/dist/gateway/static/root/assets/copy-SxMW6Xpc.js +1 -0
- package/dist/gateway/static/root/assets/{cron-api-0h_QT8U3.js → cron-api-N9hvuRrn.js} +1 -1
- package/dist/gateway/static/root/assets/{cron-page-BkfKFfFk.js → cron-page-tlNGNxhP.js} +1 -1
- package/dist/gateway/static/root/assets/{dist-Cmjp2APP.js → dist-CJwfHYvT.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-CFa9z_1N.js → extension-debug-page-BVJohZoZ.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BI8eaTPq.js → extension-page-BT2tmElC.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-BSS47c2j.js +1 -0
- package/dist/gateway/static/root/assets/{fetch-DRqwef_Q.js → fetch-BaFNUtkE.js} +1 -1
- package/dist/gateway/static/root/assets/{field-primitives-BiNHBo2Y.js → field-primitives-QwYEq6Hz.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-config-api-ZRb8qhuz.js → heartbeat-config-api-BVSidEDJ.js} +1 -1
- package/dist/gateway/static/root/assets/index-CqZzHNEg.css +1 -0
- package/dist/gateway/static/root/assets/{index-Cu7bKuUi.js → index-qNrVJp-y.js} +97 -97
- package/dist/gateway/static/root/assets/{logs-page-BFZ8GgCv.js → logs-page-DDonPVLn.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-DKt-Wmib.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-DiqqVs6m.js → settings-form-section-B8N3A3Zo.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-DcJjvvw4.js +3 -0
- package/dist/gateway/static/root/assets/{share-preview-page-n1Gprylk.js → share-preview-page-Q7KqkO-u.js} +1 -1
- package/dist/gateway/static/root/assets/skills-page-DuJ4BTO3.js +2 -0
- package/dist/gateway/static/root/assets/{theme-store-CZOh1nT3.js → theme-store-BbRc5ugR.js} +1 -1
- package/dist/gateway/static/root/assets/url-D6jvVYIA.js +7 -0
- package/dist/gateway/static/root/assets/{utils-CkWBfxs4.js → utils-CxDGduqK.js} +1 -1
- package/dist/gateway/static/root/assets/voice-api-key-field-CTyHz7L_.js +1 -0
- package/dist/gateway/static/root/assets/workflows-page-GacJ41Fv.js +27 -0
- package/dist/gateway/static/root/index.html +6 -5
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +7 -7
- package/dist/src/agent/agent-scope.js +1 -1
- package/dist/src/agent/bootstrap/load-bootstrap-files.js +1 -1
- package/dist/src/agent/child-agent-factory.d.ts +15 -0
- package/dist/src/agent/child-agent-factory.js +35 -2
- package/dist/src/agent/child-agent-factory.js.map +1 -1
- package/dist/src/agent/client-error-format.d.ts +20 -0
- package/dist/src/agent/client-error-format.js +97 -0
- package/dist/src/agent/client-error-format.js.map +1 -0
- package/dist/src/agent/context/workspace-seed.js +2 -2
- package/dist/src/agent/embedded/run-turn.js +23 -4
- package/dist/src/agent/embedded/run-turn.js.map +1 -1
- package/dist/src/agent/goals/goal-locale.d.ts +1 -1
- package/dist/src/agent/goals/goal-run-store.js +4 -4
- package/dist/src/agent/goals/persistent-goal-service.js +1 -1
- package/dist/src/agent/goals/post-turn.js +2 -2
- package/dist/src/agent/image/load-image-media.js +2 -2
- package/dist/src/agent/inbound/turn-dispatcher.js +1 -1
- package/dist/src/agent/inbound/turn-dispatcher.js.map +1 -1
- package/dist/src/agent/ipc/bus.js +1 -1
- package/dist/src/agent/ipc/inbox.js +2 -2
- package/dist/src/agent/ipc/socket.js +1 -1
- package/dist/src/agent/mcp/bundle-mcp-materialize.js +1 -1
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +1 -1
- package/dist/src/agent/mcp/mcp-transport-config.js +1 -1
- package/dist/src/agent/mcp/mcp-transport.js +1 -1
- package/dist/src/agent/memory/builtin-memory-store.js +1 -1
- package/dist/src/agent/memory/dreaming/deep-promotion.js +1 -1
- package/dist/src/agent/memory/dreaming/events.js +1 -1
- package/dist/src/agent/memory/dreaming/last-run.js +1 -1
- package/dist/src/agent/memory/dreaming/light-sweep.js +1 -1
- package/dist/src/agent/memory/dreaming/preview.js +1 -1
- package/dist/src/agent/memory/dreaming/rem-patterns.js +1 -1
- package/dist/src/agent/memory/dreaming/short-term-store.js +1 -1
- package/dist/src/agent/memory/dreaming/utils.js +1 -1
- package/dist/src/agent/memory/plugin-discovery.js +1 -1
- package/dist/src/agent/models/manager.js +1 -1
- package/dist/src/agent/orchestration/llm-turn-retry.d.ts +2 -0
- package/dist/src/agent/orchestration/llm-turn-retry.js +9 -1
- package/dist/src/agent/orchestration/llm-turn-retry.js.map +1 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +2 -2
- package/dist/src/agent/reply/post-compaction-context.js +1 -1
- package/dist/src/agent/reply/workspace-boundary-read.js +1 -1
- package/dist/src/agent/sandbox/path-policy.js +2 -2
- package/dist/src/agent/service/build-direct-message-content.js +1 -1
- package/dist/src/agent/service/process-direct-streaming.js +19 -3
- package/dist/src/agent/service/process-direct-streaming.js.map +1 -1
- package/dist/src/agent/service/webchat-tts.d.ts +1 -2
- package/dist/src/agent/service/webchat-tts.js +1 -1
- package/dist/src/agent/service/webchat-tts.js.map +1 -1
- package/dist/src/agent/service.js +4 -4
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/config.js +1 -1
- package/dist/src/agent/skills/hub-hash.js +2 -2
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/skills/hub-pull.js +2 -2
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/managed-store.js +1 -1
- package/dist/src/agent/skills/scanner.js +1 -1
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/skills/skill-manager.js +1 -1
- package/dist/src/agent/tools/dreaming-tool.js +1 -1
- package/dist/src/agent/tools/factory.js +1 -1
- package/dist/src/agent/tools/image-generate-tool.js +1 -1
- package/dist/src/agent/tools/send-media.js +1 -1
- package/dist/src/agent/tools/skill-manage-tool.js +1 -1
- package/dist/src/agent/tools/workflow-tool.js +64 -16
- package/dist/src/agent/tools/workflow-tool.js.map +1 -1
- package/dist/src/agent/tools/write.js +1 -1
- package/dist/src/agent/workflow/agent-progress.d.ts +5 -0
- package/dist/src/agent/workflow/agent-progress.js +65 -0
- package/dist/src/agent/workflow/agent-progress.js.map +1 -0
- package/dist/src/agent/workflow/builtins/audit-repo.d.ts +1 -1
- package/dist/src/agent/workflow/builtins/audit-repo.js +14 -0
- package/dist/src/agent/workflow/builtins/audit-repo.js.map +1 -1
- package/dist/src/agent/workflow/builtins/debug-incident.d.ts +1 -1
- package/dist/src/agent/workflow/builtins/debug-incident.js +14 -0
- package/dist/src/agent/workflow/builtins/debug-incident.js.map +1 -1
- package/dist/src/agent/workflow/builtins/implementation-plan.d.ts +12 -0
- package/dist/src/agent/workflow/builtins/implementation-plan.js +175 -0
- package/dist/src/agent/workflow/builtins/implementation-plan.js.map +1 -0
- package/dist/src/agent/workflow/builtins/index.d.ts +3 -1
- package/dist/src/agent/workflow/builtins/index.js +11 -1
- package/dist/src/agent/workflow/builtins/index.js.map +1 -1
- package/dist/src/agent/workflow/builtins/multi-perspective-review.d.ts +1 -1
- package/dist/src/agent/workflow/builtins/multi-perspective-review.js +14 -0
- package/dist/src/agent/workflow/builtins/multi-perspective-review.js.map +1 -1
- package/dist/src/agent/workflow/builtins/pr-review.d.ts +1 -1
- package/dist/src/agent/workflow/builtins/pr-review.js +14 -0
- package/dist/src/agent/workflow/builtins/pr-review.js.map +1 -1
- package/dist/src/agent/workflow/builtins/release-check.d.ts +11 -0
- package/dist/src/agent/workflow/builtins/release-check.js +165 -0
- package/dist/src/agent/workflow/builtins/release-check.js.map +1 -0
- package/dist/src/agent/workflow/builtins/research.d.ts +1 -1
- package/dist/src/agent/workflow/builtins/research.js +14 -0
- package/dist/src/agent/workflow/builtins/research.js.map +1 -1
- package/dist/src/agent/workflow/catalog.js +1 -1
- package/dist/src/agent/workflow/index.d.ts +2 -1
- package/dist/src/agent/workflow/index.js +3 -2
- package/dist/src/agent/workflow/meta-locale.d.ts +12 -0
- package/dist/src/agent/workflow/meta-locale.js +62 -0
- package/dist/src/agent/workflow/meta-locale.js.map +1 -0
- package/dist/src/agent/workflow/parser.js +3 -0
- package/dist/src/agent/workflow/parser.js.map +1 -1
- package/dist/src/agent/workflow/runtime.d.ts +2 -2
- package/dist/src/agent/workflow/runtime.js +21 -14
- package/dist/src/agent/workflow/runtime.js.map +1 -1
- package/dist/src/agent/workflow/snapshot.js +2 -12
- package/dist/src/agent/workflow/snapshot.js.map +1 -1
- package/dist/src/agent/workflow/step-labels.d.ts +8 -0
- package/dist/src/agent/workflow/step-labels.js +48 -0
- package/dist/src/agent/workflow/step-labels.js.map +1 -0
- package/dist/src/agent/workflow/subagent-runner.js +46 -1
- package/dist/src/agent/workflow/subagent-runner.js.map +1 -1
- package/dist/src/agent/workflow/types.d.ts +74 -1
- package/dist/src/auth/credentials.d.ts +5 -0
- package/dist/src/auth/credentials.js +12 -3
- package/dist/src/auth/credentials.js.map +1 -1
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/browser/cache-dir-policy.js +1 -1
- package/dist/src/browser/cdp-local-launcher.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +3 -3
- package/dist/src/browser/providers/cloakbrowser.js +4 -4
- package/dist/src/browser/providers/playwright-doctor.js +1 -1
- package/dist/src/browser/stealth.js +1 -1
- package/dist/src/channels/attachments/inbound-persist.js +1 -1
- package/dist/src/channels/attachments/outbound-tts-persist.js +1 -1
- package/dist/src/channels/outbound/persist-store.js +1 -1
- package/dist/src/channels/pairing/allow-from-file.js +1 -1
- package/dist/src/channels/pairing/pairing-store.js +2 -2
- package/dist/src/chat-commands/builtins/config.js +2 -2
- package/dist/src/chat-commands/context.js +1 -1
- package/dist/src/cli/commands/config.js +1 -1
- package/dist/src/cli/commands/doctor/checks/config-health.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/doctor/checks/session-integrity.js +1 -1
- package/dist/src/cli/commands/doctor/checks/state-integrity.js +1 -1
- package/dist/src/cli/commands/doctor/checks/workspace-status.js +1 -1
- package/dist/src/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/extension-pack.js +1 -1
- package/dist/src/cli/commands/gateway/logs.js +1 -1
- package/dist/src/cli/commands/image.js +1 -1
- package/dist/src/cli/commands/init.js +4 -4
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +2 -2
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/config/agent-typed-models.d.ts +18 -0
- package/dist/src/config/agent-typed-models.js +53 -0
- package/dist/src/config/agent-typed-models.js.map +1 -0
- package/dist/src/config/gateway-bind.js +1 -1
- package/dist/src/config/index.js +6 -6
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.js +2 -2
- package/dist/src/config/paths-state.js +1 -1
- package/dist/src/config/profile.js +2 -2
- package/dist/src/config/schema.d.ts +52 -0
- package/dist/src/config/schema.js +39 -3
- package/dist/src/config/schema.js.map +1 -1
- package/dist/src/config/voice.d.ts +3 -28
- package/dist/src/config/voice.js +27 -261
- package/dist/src/config/voice.js.map +1 -1
- package/dist/src/config/workspace-path.js +1 -1
- package/dist/src/cron/executor.js +2 -2
- package/dist/src/cron/persistence.js +1 -1
- package/dist/src/cron/run-log-store.js +1 -1
- package/dist/src/daemon/constants.js +1 -1
- package/dist/src/daemon/install-plan.js +2 -2
- package/dist/src/daemon/launchd.js +2 -2
- package/dist/src/daemon/schtasks.js +2 -2
- package/dist/src/daemon/systemd.js +2 -2
- package/dist/src/extensions/bundle-mcp.js +1 -1
- package/dist/src/extensions/discover-extensions.js +1 -1
- package/dist/src/extensions/health.js +1 -1
- package/dist/src/extensions/loader.js +1 -1
- package/dist/src/extensions/lockfile.js +2 -2
- package/dist/src/gateway/agents-admin.d.ts +9 -0
- package/dist/src/gateway/agents-admin.js +18 -2
- package/dist/src/gateway/agents-admin.js.map +1 -1
- package/dist/src/gateway/config-tools-web.js +3 -2
- package/dist/src/gateway/config-tools-web.js.map +1 -1
- package/dist/src/gateway/file-path-classifier.js +2 -2
- package/dist/src/gateway/hono/lib/agent-model.d.ts +7 -0
- package/dist/src/gateway/hono/lib/agent-model.js +36 -1
- package/dist/src/gateway/hono/lib/agent-model.js.map +1 -1
- package/dist/src/gateway/hono/lib/config-payload.js +28 -5
- package/dist/src/gateway/hono/lib/config-payload.js.map +1 -1
- package/dist/src/gateway/hono/lib/extension-store.js +2 -2
- package/dist/src/gateway/hono/lib/mask-secret-length.d.ts +6 -0
- package/dist/src/gateway/hono/lib/mask-secret-length.js +16 -0
- package/dist/src/gateway/hono/lib/mask-secret-length.js.map +1 -0
- package/dist/src/gateway/hono/lib/safe-providers-config.d.ts +1 -1
- package/dist/src/gateway/hono/lib/safe-providers-config.js +2 -1
- package/dist/src/gateway/hono/lib/safe-providers-config.js.map +1 -1
- package/dist/src/gateway/hono/lib/safe-voice-config.js +2 -1
- package/dist/src/gateway/hono/lib/safe-voice-config.js.map +1 -1
- package/dist/src/gateway/hono/lib/static-ui.js +2 -2
- package/dist/src/gateway/hono/oauth.js +1 -1
- package/dist/src/gateway/hono/routes/agents.js +2 -2
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/agents.js +8 -2
- package/dist/src/gateway/hono/routes/config-patch/agents.js.map +1 -1
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +3 -2
- package/dist/src/gateway/hono/routes/config-patch/gateway.js.map +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +8 -3
- package/dist/src/gateway/hono/routes/config-patch/misc.js.map +1 -1
- package/dist/src/gateway/hono/routes/config.js +59 -0
- package/dist/src/gateway/hono/routes/config.js.map +1 -1
- package/dist/src/gateway/hono/routes/dreaming.js +1 -1
- package/dist/src/gateway/hono/routes/host-fs.js +2 -2
- package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/lazy-bundles.js.map +1 -1
- package/dist/src/gateway/hono/routes/models.js +75 -12
- package/dist/src/gateway/hono/routes/models.js.map +1 -1
- package/dist/src/gateway/hono/routes/shares.js +1 -1
- package/dist/src/gateway/hono/routes/voice.js +75 -0
- package/dist/src/gateway/hono/routes/voice.js.map +1 -1
- package/dist/src/gateway/hono/routes/workflows.d.ts +3 -0
- package/dist/src/gateway/hono/routes/workflows.js +347 -0
- package/dist/src/gateway/hono/routes/workflows.js.map +1 -0
- package/dist/src/gateway/hono/routes/workspace.js +4 -4
- package/dist/src/gateway/lock.js +3 -3
- package/dist/src/gateway/ports.js +1 -1
- package/dist/src/gateway/service/agent-runner.js +2 -2
- package/dist/src/gateway/service/marketplace-service.js +2 -2
- package/dist/src/gateway/service/run-gateway-agent.js +2 -20
- package/dist/src/gateway/service/run-gateway-agent.js.map +1 -1
- package/dist/src/gateway/service.d.ts +3 -0
- package/dist/src/gateway/service.js +7 -1
- package/dist/src/gateway/service.js.map +1 -1
- package/dist/src/gateway/workspace-fs-file-list.js +1 -1
- package/dist/src/infra/restart.js +2 -2
- package/dist/src/infra/update-check.js +1 -1
- package/dist/src/infra/update-global.js +1 -1
- package/dist/src/infra/update-lock.js +3 -3
- package/dist/src/infra/update-runner.js +1 -1
- package/dist/src/infra/update-startup.js +2 -2
- package/dist/src/infra/write-file-atomic.js +2 -2
- package/dist/src/mcp/channel-bridge.js +1 -1
- package/dist/src/providers/auth-runtime/auth-profile-store.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/session/config-store.js +2 -2
- package/dist/src/session/init-session-turn.js +2 -2
- package/dist/src/session/parity/jsonl-transcript-io.js +2 -2
- package/dist/src/session/parity/sessions-json-file.js +1 -1
- package/dist/src/session/parity/transcript-file-lock.js +2 -2
- package/dist/src/session/parity/transcript-paths.js +1 -1
- package/dist/src/session/resolve-session.js +4 -4
- package/dist/src/session/search-index-cache.js +1 -1
- package/dist/src/session/search-index.js +1 -1
- package/dist/src/session/session-title.js +2 -2
- package/dist/src/session/store.js +5 -5
- package/dist/src/share/share-auto.js +2 -2
- package/dist/src/share/share-store.js +3 -3
- package/dist/src/share/share-thumbnail.js +2 -2
- package/dist/src/share/share-zip.js +1 -1
- package/dist/src/share/site-share-store.js +3 -3
- package/dist/src/share/site-static-serve.js +1 -1
- package/dist/src/tui/clipboard-image.js +3 -3
- package/dist/src/tui/theme-manager.js +1 -1
- package/dist/src/tui/tui-agent-events.js +2 -1
- package/dist/src/tui/tui-agent-events.js.map +1 -1
- package/dist/src/tui/tui-keybindings-file.js +1 -1
- package/dist/src/tui/tui-scoped-models.js +2 -2
- package/dist/src/tui/tui-settings.js +1 -1
- package/dist/src/tui/tui.js +3 -3
- package/dist/src/tunnel/frpc-binary.js +3 -3
- package/dist/src/tunnel/frpc-config.js +1 -1
- package/dist/src/tunnel/frpc-extract.js +1 -1
- package/dist/src/tunnel/tunnel-state.js +1 -1
- package/dist/src/utils/logger/audit.js +1 -1
- package/dist/src/utils/logger/log-store.js +1 -1
- package/dist/src/utils/logger/rotation.js +1 -1
- package/dist/src/voice/metadata/builtin.d.ts +2 -0
- package/dist/src/voice/metadata/builtin.js +420 -0
- package/dist/src/voice/metadata/builtin.js.map +1 -0
- package/dist/src/voice/metadata/index.d.ts +4 -0
- package/dist/src/voice/metadata/index.js +3 -0
- package/dist/src/voice/metadata/registry.d.ts +5 -0
- package/dist/src/voice/metadata/registry.js +34 -0
- package/dist/src/voice/metadata/registry.js.map +1 -0
- package/dist/src/voice/metadata/types.d.ts +41 -0
- package/dist/src/voice/metadata/types.js +1 -0
- package/dist/src/voice/stt/list-providers.d.ts +3 -3
- package/dist/src/voice/stt/list-providers.js +41 -6
- package/dist/src/voice/stt/list-providers.js.map +1 -1
- package/dist/src/voice/tts/audio.js +1 -1
- package/dist/src/voice/tts/list-providers.d.ts +3 -3
- package/dist/src/voice/tts/list-providers.js +41 -6
- package/dist/src/voice/tts/list-providers.js.map +1 -1
- package/dist/src/voice/tts/providers/edge-speech.js +2 -2
- package/dist/src/workflows/domain/command.d.ts +18 -0
- package/dist/src/workflows/domain/command.js +1 -0
- package/dist/src/workflows/domain/definition.d.ts +62 -0
- package/dist/src/workflows/domain/definition.js +1 -0
- package/dist/src/workflows/domain/event.d.ts +67 -0
- package/dist/src/workflows/domain/event.js +1 -0
- package/dist/src/workflows/domain/index.d.ts +5 -0
- package/dist/src/workflows/domain/index.js +2 -0
- package/dist/src/workflows/domain/result.d.ts +65 -0
- package/dist/src/workflows/domain/result.js +1 -0
- package/dist/src/workflows/domain/run.d.ts +120 -0
- package/dist/src/workflows/domain/run.js +14 -0
- package/dist/src/workflows/domain/run.js.map +1 -0
- package/dist/src/workflows/engine/index.d.ts +2 -0
- package/dist/src/workflows/engine/index.js +3 -0
- package/dist/src/workflows/engine/projector.d.ts +3 -0
- package/dist/src/workflows/engine/projector.js +205 -0
- package/dist/src/workflows/engine/projector.js.map +1 -0
- package/dist/src/workflows/engine/workflow-engine.d.ts +31 -0
- package/dist/src/workflows/engine/workflow-engine.js +188 -0
- package/dist/src/workflows/engine/workflow-engine.js.map +1 -0
- package/dist/src/workflows/index.d.ts +6 -0
- package/dist/src/workflows/index.js +11 -0
- package/dist/src/workflows/runtime/index.d.ts +1 -0
- package/dist/src/workflows/runtime/index.js +4 -0
- package/dist/src/workflows/runtime/script-runtime.d.ts +3 -0
- package/dist/src/workflows/runtime/script-runtime.js +3 -0
- package/dist/src/workflows/store/event-store.d.ts +17 -0
- package/dist/src/workflows/store/event-store.js +83 -0
- package/dist/src/workflows/store/event-store.js.map +1 -0
- package/dist/src/workflows/store/paths.d.ts +7 -0
- package/dist/src/workflows/store/paths.js +26 -0
- package/dist/src/workflows/store/paths.js.map +1 -0
- package/dist/src/workflows/store/run-store.d.ts +13 -0
- package/dist/src/workflows/store/run-store.js +68 -0
- package/dist/src/workflows/store/run-store.js.map +1 -0
- package/package.json +5 -5
- package/dist/gateway/static/root/assets/agents-BEAbXpuP.js +0 -222
- package/dist/gateway/static/root/assets/channels-settings-yohw9YSu.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-x4BB7q1X.js +0 -1
- package/dist/gateway/static/root/assets/index-a5gWIdZQ.css +0 -1
- package/dist/gateway/static/root/assets/sessions-page-CD7AfB-2.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-BBOjEQW3.js +0 -3
- package/dist/gateway/static/root/assets/skills-page-CcN_gj--.js +0 -2
- package/dist/gateway/static/root/assets/url-Dd8Q7kZZ.js +0 -3
- package/dist/gateway/static/root/assets/voice-api-key-field-O6awz9hi.js +0 -1
package/dist/src/config/voice.js
CHANGED
|
@@ -1,270 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../voice/
|
|
1
|
+
import { listVoiceProviderMetadata } from "../voice/metadata/registry.js";
|
|
2
|
+
import "../voice/metadata/index.js";
|
|
3
3
|
//#region src/config/voice.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
id: "paraformer-v2",
|
|
13
|
-
name: "Paraformer v2 (Recommended)"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
id: "paraformer-v1",
|
|
17
|
-
name: "Paraformer v1"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
id: "paraformer-8k-v1",
|
|
21
|
-
name: "Paraformer 8k v1 (Phone)"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
id: "paraformer-mtl-v1",
|
|
25
|
-
name: "Paraformer MTL v1 (Multilingual)"
|
|
26
|
-
}
|
|
27
|
-
];
|
|
28
|
-
const DEFAULT_STT_OPENAI = [{
|
|
29
|
-
id: "whisper-1",
|
|
30
|
-
name: "Whisper-1"
|
|
31
|
-
}];
|
|
32
|
-
const DEFAULT_TTS_OPENAI = OPENAI_TTS_MODELS.map((id) => ({
|
|
33
|
-
id,
|
|
34
|
-
name: id === "tts-1" ? "TTS-1 (Fast)" : id === "tts-1-hd" ? "TTS-1 HD (High Quality)" : id === "gpt-4o-mini-tts" ? "GPT-4o Mini TTS (Latest)" : id
|
|
35
|
-
}));
|
|
36
|
-
const DEFAULT_TTS_ALIBABA = [
|
|
37
|
-
{
|
|
38
|
-
id: "qwen-tts",
|
|
39
|
-
name: "Qwen TTS (Recommended)"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
id: "qwen-tts-realtime",
|
|
43
|
-
name: "Qwen TTS Realtime"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
id: "qwen3-tts-flash",
|
|
47
|
-
name: "Qwen3 TTS Flash"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
id: "qwen3-tts-instruct-flash",
|
|
51
|
-
name: "Qwen3 TTS Instruct Flash"
|
|
52
|
-
}
|
|
53
|
-
];
|
|
54
|
-
const DEFAULT_TTS_EDGE = [{
|
|
55
|
-
id: "edge-default",
|
|
56
|
-
name: "Edge TTS (Free)"
|
|
57
|
-
}];
|
|
58
|
-
const DEFAULT_TTS_MINIMAX = [
|
|
59
|
-
{
|
|
60
|
-
id: "speech-2.8-hd",
|
|
61
|
-
name: "Speech 2.8 HD (Recommended)"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
id: "speech-2.8-turbo",
|
|
65
|
-
name: "Speech 2.8 Turbo (Fast)"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
id: "speech-2.6-hd",
|
|
69
|
-
name: "Speech 2.6 HD"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
id: "speech-2.6-turbo",
|
|
73
|
-
name: "Speech 2.6 Turbo"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
id: "speech-02-hd",
|
|
77
|
-
name: "Speech 02 HD"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
id: "speech-02-turbo",
|
|
81
|
-
name: "Speech 02 Turbo"
|
|
82
|
-
}
|
|
83
|
-
];
|
|
84
|
-
const DEFAULT_TTS_VOICES_ALIBABA = [
|
|
85
|
-
{
|
|
86
|
-
id: "Cherry",
|
|
87
|
-
name: "Cherry"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
id: "longxiaochun",
|
|
91
|
-
name: "Long Xiao Chun (龙小春)"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
id: "longcheng",
|
|
95
|
-
name: "Long Cheng (龙呈)"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: "xiaogang",
|
|
99
|
-
name: "Xiao Gang (小刚)"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
id: "xiaoxian",
|
|
103
|
-
name: "Xiao Xian (小娴)"
|
|
104
|
-
}
|
|
105
|
-
];
|
|
106
|
-
const DEFAULT_TTS_VOICES_OPENAI = OPENAI_TTS_VOICES.map((id) => ({
|
|
107
|
-
id,
|
|
108
|
-
name: id.charAt(0).toUpperCase() + id.slice(1)
|
|
109
|
-
}));
|
|
110
|
-
const DEFAULT_TTS_VOICES_MINIMAX = [
|
|
111
|
-
{
|
|
112
|
-
id: "male-qn-qingse",
|
|
113
|
-
name: "Male Qingse (青涩男声)"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
id: "male-qn-jingying",
|
|
117
|
-
name: "Male Jingying (精英男声)"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
id: "male-qn-badao",
|
|
121
|
-
name: "Male Badao (霸道男声)"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
id: "male-qn-daxuesheng",
|
|
125
|
-
name: "Male Daxuesheng (大学生男声)"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
id: "female-shaonv",
|
|
129
|
-
name: "Female Shaonv (少女音)"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
id: "female-yujie",
|
|
133
|
-
name: "Female Yujie (御姐音)"
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
id: "female-chengshu",
|
|
137
|
-
name: "Female Chengshu (成熟女声)"
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
id: "female-tianmei",
|
|
141
|
-
name: "Female Tianmei (甜美女声)"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
id: "audiobook_male_1",
|
|
145
|
-
name: "Audiobook Male 1"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
id: "audiobook_male_2",
|
|
149
|
-
name: "Audiobook Male 2"
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
id: "audiobook_female_1",
|
|
153
|
-
name: "Audiobook Female 1"
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
id: "audiobook_female_2",
|
|
157
|
-
name: "Audiobook Female 2"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
id: "presenter_male",
|
|
161
|
-
name: "Presenter Male"
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
id: "presenter_female",
|
|
165
|
-
name: "Presenter Female"
|
|
166
|
-
}
|
|
167
|
-
];
|
|
168
|
-
const DEFAULT_TTS_VOICES_EDGE = [
|
|
169
|
-
{
|
|
170
|
-
id: "en-US-MichelleNeural",
|
|
171
|
-
name: "Michelle (US English, Female)"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
id: "en-US-JennyNeural",
|
|
175
|
-
name: "Jenny (US English, Female)"
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
id: "en-US-GuyNeural",
|
|
179
|
-
name: "Guy (US English, Male)"
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
id: "en-GB-SoniaNeural",
|
|
183
|
-
name: "Sonia (UK English, Female)"
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
id: "en-GB-RyanNeural",
|
|
187
|
-
name: "Ryan (UK English, Male)"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
id: "zh-CN-XiaoxiaoNeural",
|
|
191
|
-
name: "晓晓 (中文, 女声)"
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
id: "zh-CN-YunyangNeural",
|
|
195
|
-
name: "云扬 (中文, 男声)"
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
id: "zh-CN-XiaoyiNeural",
|
|
199
|
-
name: "晓伊 (中文, 女声)"
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
id: "ja-JP-NanamiNeural",
|
|
203
|
-
name: "七海 (日本語, 女性)"
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
id: "de-DE-KatjaNeural",
|
|
207
|
-
name: "Katja (Deutsch, Weiblich)"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
id: "fr-FR-DeniseNeural",
|
|
211
|
-
name: "Denise (Français, Féminin)"
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
id: "es-ES-ElviraNeural",
|
|
215
|
-
name: "Elvira (Español, Femenino)"
|
|
216
|
-
}
|
|
217
|
-
];
|
|
4
|
+
function toVoiceModels(values) {
|
|
5
|
+
return (values ?? []).map((value) => ({
|
|
6
|
+
id: value.id,
|
|
7
|
+
name: value.name,
|
|
8
|
+
...value.description ? { description: value.description } : {}
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
218
11
|
function getVoiceModelsConfig() {
|
|
219
|
-
|
|
220
|
-
stt: {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
},
|
|
224
|
-
tts: {
|
|
225
|
-
alibaba: DEFAULT_TTS_ALIBABA,
|
|
226
|
-
openai: DEFAULT_TTS_OPENAI,
|
|
227
|
-
edge: DEFAULT_TTS_EDGE,
|
|
228
|
-
minimax: DEFAULT_TTS_MINIMAX
|
|
229
|
-
},
|
|
230
|
-
ttsVoices: {
|
|
231
|
-
alibaba: DEFAULT_TTS_VOICES_ALIBABA,
|
|
232
|
-
openai: DEFAULT_TTS_VOICES_OPENAI,
|
|
233
|
-
edge: DEFAULT_TTS_VOICES_EDGE,
|
|
234
|
-
minimax: DEFAULT_TTS_VOICES_MINIMAX
|
|
235
|
-
}
|
|
12
|
+
const config = {
|
|
13
|
+
stt: {},
|
|
14
|
+
tts: {},
|
|
15
|
+
ttsVoices: {}
|
|
236
16
|
};
|
|
17
|
+
for (const metadata of listVoiceProviderMetadata()) {
|
|
18
|
+
if (metadata.capability === "stt") {
|
|
19
|
+
config.stt[metadata.id] = toVoiceModels(metadata.models);
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
config.tts[metadata.id] = toVoiceModels(metadata.models);
|
|
23
|
+
config.ttsVoices[metadata.id] = toVoiceModels(metadata.voices);
|
|
24
|
+
}
|
|
25
|
+
return config;
|
|
237
26
|
}
|
|
238
|
-
/**
|
|
239
|
-
* Get available TTS providers for UI
|
|
240
|
-
*/
|
|
241
27
|
function getTTSProviders() {
|
|
242
|
-
return
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
id: "alibaba",
|
|
250
|
-
name: "Alibaba",
|
|
251
|
-
description: "Qwen TTS, good for Chinese"
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
id: "minimax",
|
|
255
|
-
name: "MiniMax",
|
|
256
|
-
description: "High quality, 40+ languages"
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
id: "edge",
|
|
260
|
-
name: "Microsoft Edge",
|
|
261
|
-
description: "Free, 100+ voices, multi-language"
|
|
262
|
-
}
|
|
263
|
-
];
|
|
28
|
+
return listVoiceProviderMetadata("tts").map((metadata) => ({
|
|
29
|
+
id: metadata.id,
|
|
30
|
+
name: metadata.displayName,
|
|
31
|
+
...metadata.description ? { description: metadata.description } : {}
|
|
32
|
+
}));
|
|
264
33
|
}
|
|
265
|
-
/**
|
|
266
|
-
* Get TTS trigger modes for UI
|
|
267
|
-
*/
|
|
268
34
|
function getTTSTriggerModes() {
|
|
269
35
|
return [
|
|
270
36
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voice.js","names":[],"sources":["../../../src/config/voice.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"voice.js","names":[],"sources":["../../../src/config/voice.ts"],"sourcesContent":["import { listVoiceProviderMetadata } from '../voice/metadata/index.js';\n\nexport interface VoiceModel {\n id: string;\n name: string;\n description?: string;\n}\n\nexport interface VoiceModelsConfig {\n stt: Record<string, VoiceModel[]>;\n tts: Record<string, VoiceModel[]>;\n ttsVoices: Record<string, VoiceModel[]>;\n}\n\nfunction toVoiceModels(values: VoiceModel[] | undefined): VoiceModel[] {\n return (values ?? []).map((value) => ({\n id: value.id,\n name: value.name,\n ...(value.description ? { description: value.description } : {}),\n }));\n}\n\nexport function getVoiceModelsConfig(): VoiceModelsConfig {\n const config: VoiceModelsConfig = { stt: {}, tts: {}, ttsVoices: {} };\n for (const metadata of listVoiceProviderMetadata()) {\n if (metadata.capability === 'stt') {\n config.stt[metadata.id] = toVoiceModels(metadata.models);\n continue;\n }\n config.tts[metadata.id] = toVoiceModels(metadata.models);\n config.ttsVoices[metadata.id] = toVoiceModels(metadata.voices);\n }\n return config;\n}\n\nexport function getTTSProviders(): Array<{ id: string; name: string; description?: string }> {\n return listVoiceProviderMetadata('tts').map((metadata) => ({\n id: metadata.id,\n name: metadata.displayName,\n ...(metadata.description ? { description: metadata.description } : {}),\n }));\n}\n\nexport function getTTSTriggerModes(): Array<{ id: string; name: string; description: string }> {\n return [\n { id: 'off', name: 'Disabled', description: 'TTS is completely disabled' },\n { id: 'always', name: 'Always', description: 'Apply TTS to all messages' },\n { id: 'inbound', name: 'Inbound Audio', description: 'Only when user sends voice message' },\n { id: 'tagged', name: 'Tagged', description: 'Only when [[tts]] directive is used' },\n ];\n}\n"],"mappings":";;;AAcA,SAAS,cAAc,QAAgD;AACrE,SAAQ,UAAU,EAAE,EAAE,KAAK,WAAW;EACpC,IAAI,MAAM;EACV,MAAM,MAAM;EACZ,GAAI,MAAM,cAAc,EAAE,aAAa,MAAM,aAAa,GAAG,EAAE;EAChE,EAAE;;AAGL,SAAgB,uBAA0C;CACxD,MAAM,SAA4B;EAAE,KAAK,EAAE;EAAE,KAAK,EAAE;EAAE,WAAW,EAAE;EAAE;AACrE,MAAK,MAAM,YAAY,2BAA2B,EAAE;AAClD,MAAI,SAAS,eAAe,OAAO;AACjC,UAAO,IAAI,SAAS,MAAM,cAAc,SAAS,OAAO;AACxD;;AAEF,SAAO,IAAI,SAAS,MAAM,cAAc,SAAS,OAAO;AACxD,SAAO,UAAU,SAAS,MAAM,cAAc,SAAS,OAAO;;AAEhE,QAAO;;AAGT,SAAgB,kBAA6E;AAC3F,QAAO,0BAA0B,MAAM,CAAC,KAAK,cAAc;EACzD,IAAI,SAAS;EACb,MAAM,SAAS;EACf,GAAI,SAAS,cAAc,EAAE,aAAa,SAAS,aAAa,GAAG,EAAE;EACtE,EAAE;;AAGL,SAAgB,qBAA+E;AAC7F,QAAO;EACL;GAAE,IAAI;GAAO,MAAM;GAAY,aAAa;GAA8B;EAC1E;GAAE,IAAI;GAAU,MAAM;GAAU,aAAa;GAA6B;EAC1E;GAAE,IAAI;GAAW,MAAM;GAAiB,aAAa;GAAsC;EAC3F;GAAE,IAAI;GAAU,MAAM;GAAU,aAAa;GAAuC;EACrF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { homedir } from "node:os";
|
|
3
2
|
import { parse, resolve } from "node:path";
|
|
3
|
+
import { homedir } from "node:os";
|
|
4
4
|
//#region src/config/workspace-path.ts
|
|
5
5
|
/** Expand leading `~` to the user home directory. */
|
|
6
6
|
function expandWorkspacePathString(raw) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { init_agent_scope, normalizeAgentId } from "../agent/agent-scope.js";
|
|
2
|
-
import { buildSessionKey, init_session_key } from "../routing/session-key.js";
|
|
3
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
4
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { init_agent_scope, normalizeAgentId } from "../agent/agent-scope.js";
|
|
4
|
+
import { buildSessionKey, init_session_key } from "../routing/session-key.js";
|
|
5
5
|
import { bundledChannelPlugins } from "../generated/bundled-channel-plugins.js";
|
|
6
6
|
import { shouldSilence, stripHeartbeatToken } from "../heartbeat/tokens.js";
|
|
7
7
|
import { getChannelPlugin, listChannelPlugins, syncChannelPluginsFromManager } from "../channels/plugins/registry.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
1
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
3
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
4
4
|
import { JobDataSchema } from "./validation.js";
|
|
5
5
|
import { access, readFile } from "fs/promises";
|
|
6
6
|
//#region src/cron/persistence.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { init_paths, resolveCronRunsDir } from "../config/paths.js";
|
|
4
|
-
import { join } from "path";
|
|
5
4
|
import { appendFile, mkdir, readFile, readdir, unlink, writeFile } from "fs/promises";
|
|
5
|
+
import { join } from "path";
|
|
6
6
|
//#region src/cron/run-log-store.ts
|
|
7
7
|
init_paths();
|
|
8
8
|
init_logger();
|
|
@@ -2,9 +2,9 @@ import { PACKAGE_VERSION, init_package_version } from "../package-version.js";
|
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
4
|
import { SERVICE_VERSION_ENV_KEY, formatGatewayServiceDescription } from "./constants.js";
|
|
5
|
-
import { homedir } from "node:os";
|
|
6
|
-
import path from "node:path";
|
|
7
5
|
import { existsSync } from "node:fs";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import { homedir } from "node:os";
|
|
8
8
|
//#region src/daemon/install-plan.ts
|
|
9
9
|
/**
|
|
10
10
|
* Install Plan Builder - Build gateway installation configuration
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { resolveGatewayLaunchAgentLabel, resolveLaunchAgentPlistPath as resolveLaunchAgentPlistPath$1 } from "./constants.js";
|
|
4
|
-
import os from "node:os";
|
|
5
|
-
import path from "node:path";
|
|
6
4
|
import { existsSync } from "node:fs";
|
|
7
5
|
import { mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import os from "node:os";
|
|
8
8
|
import { spawn, spawnSync } from "node:child_process";
|
|
9
9
|
//#region src/daemon/launchd.ts
|
|
10
10
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { resolveGatewayWindowsTaskName } from "./constants.js";
|
|
4
|
-
import os from "node:os";
|
|
5
|
-
import path from "node:path";
|
|
6
4
|
import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import os from "node:os";
|
|
7
7
|
import { spawn, spawnSync } from "node:child_process";
|
|
8
8
|
//#region src/daemon/schtasks.ts
|
|
9
9
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { resolveGatewaySystemdServiceName, resolveSystemdUnitPath } from "./constants.js";
|
|
4
|
-
import os from "node:os";
|
|
5
|
-
import path from "node:path";
|
|
6
4
|
import { existsSync } from "node:fs";
|
|
7
5
|
import { access, constants as constants$1, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import os from "node:os";
|
|
8
8
|
import { spawn, spawnSync } from "node:child_process";
|
|
9
9
|
//#region src/daemon/systemd.ts
|
|
10
10
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_paths, resolveBundledExtensionsDir, resolveExtensionsDir } from "../config/paths.js";
|
|
2
2
|
import { isRecord } from "../utils/is-record.js";
|
|
3
3
|
import { normalizeConfiguredMcpServers } from "../config/mcp-config-normalize.js";
|
|
4
|
-
import { join } from "node:path";
|
|
5
4
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
5
|
+
import { join } from "node:path";
|
|
6
6
|
//#region src/extensions/bundle-mcp.ts
|
|
7
7
|
init_paths();
|
|
8
8
|
function extractMcpServerMap(raw) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { init_agent_scope, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
2
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
4
4
|
import { init_paths, resolveBundledExtensionsDir, resolveExtensionsDir, resolveWorkspaceExtensionsDir } from "../config/paths.js";
|
|
5
5
|
import { init_loader, loadConfig } from "../config/loader.js";
|
|
6
6
|
import { normalizeExtensionManifest } from "./normalize-manifest.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_paths, resolveExtensionsDir } from "../config/paths.js";
|
|
2
2
|
import { getExtensionLockfileManager } from "./lockfile.js";
|
|
3
|
+
import { readFile, readdir } from "fs/promises";
|
|
3
4
|
import { join } from "path";
|
|
4
5
|
import { existsSync } from "fs";
|
|
5
|
-
import { readFile, readdir } from "fs/promises";
|
|
6
6
|
//#region src/extensions/health.ts
|
|
7
7
|
init_paths();
|
|
8
8
|
var ExtensionHealthChecker = class {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PACKAGE_VERSION, init_package_version } from "../package-version.js";
|
|
2
|
-
import { init_agent_scope, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
3
2
|
import { createLogger, createServiceLogger } from "../utils/logger/index.js";
|
|
4
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
|
+
import { init_agent_scope, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
5
5
|
import { init_paths, resolveBundledExtensionsDir, resolveExtensionSdkPath, resolveExtensionsDir, resolveWorkspaceExtensionsDir } from "../config/paths.js";
|
|
6
6
|
import { init_loader, loadConfig } from "../config/loader.js";
|
|
7
7
|
import { getProviderRegistry, init_plugin_registry } from "../providers/plugin-registry.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
1
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
3
|
import { init_logger } from "../utils/logger.js";
|
|
3
4
|
import { init_paths, resolveExtensionsDir, resolveExtensionsLockPath } from "../config/paths.js";
|
|
4
|
-
import {
|
|
5
|
+
import { mkdir, readFile } from "fs/promises";
|
|
5
6
|
import { dirname, join } from "path";
|
|
6
7
|
import { existsSync } from "fs";
|
|
7
|
-
import { mkdir, readFile } from "fs/promises";
|
|
8
8
|
import { createHash } from "crypto";
|
|
9
9
|
//#region src/extensions/lockfile.ts
|
|
10
10
|
init_write_file_atomic();
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
* Gateway REST helpers for multi-agent management.
|
|
3
3
|
*/
|
|
4
4
|
import type { Config } from '../config/schema.js';
|
|
5
|
+
import type { AgentTypedModel } from '../config/schema.js';
|
|
6
|
+
export type GatewayAgentTypedModelsInfo = {
|
|
7
|
+
defaults: AgentTypedModel[];
|
|
8
|
+
entry?: AgentTypedModel[];
|
|
9
|
+
effective: AgentTypedModel[];
|
|
10
|
+
};
|
|
5
11
|
export type GatewayAgentRow = {
|
|
6
12
|
id: string;
|
|
7
13
|
name?: string;
|
|
@@ -15,6 +21,7 @@ export type GatewayAgentRow = {
|
|
|
15
21
|
primary?: string;
|
|
16
22
|
fallbacks?: string[];
|
|
17
23
|
};
|
|
24
|
+
typedModels: GatewayAgentTypedModelsInfo;
|
|
18
25
|
isDefault: boolean;
|
|
19
26
|
skills: {
|
|
20
27
|
defaults: string[];
|
|
@@ -85,6 +92,8 @@ export type UpdateAgentBody = {
|
|
|
85
92
|
skills?: string[] | null;
|
|
86
93
|
/** Replace `agents.list[].tools.disable`; `null` clears entry-level disables. */
|
|
87
94
|
toolsDisable?: string[] | null;
|
|
95
|
+
/** Replace `agents.list[].models`; `null` removes entry overrides (inherit defaults). */
|
|
96
|
+
models?: AgentTypedModel[] | null;
|
|
88
97
|
};
|
|
89
98
|
export declare function prepareUpdateAgent(cfg: Config, agentIdRaw: string, body: UpdateAgentBody): AgentAdminResult<{
|
|
90
99
|
nextConfig: Config;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { DEFAULT_AGENT_ID, init_agent_scope, listAgentEntries, normalizeAgentId, resolveAgentDir, resolveAgentProfileDir, resolveAgentWorkspaceDir, resolveDefaultAgentId, resolveUserPath, validateAgentIdForNewAgent } from "../agent/agent-scope.js";
|
|
2
|
-
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
3
2
|
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
3
|
+
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
4
4
|
import { AGENT_PROFILE_MARKDOWN_SYSTEM_FILES } from "../agent/context/workspace.js";
|
|
5
5
|
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
6
|
+
import { resolveEffectiveTypedModels } from "../config/agent-typed-models.js";
|
|
6
7
|
import { applyAgentConfig, findAgentEntryIndex, pruneAgentConfig, removeAgentDirsFromDisk } from "../commands/agents.config.js";
|
|
7
8
|
import { GATEWAY_BUILTIN_TOOL_IDS } from "./agent-builtin-tools.js";
|
|
8
9
|
import { seedAgentProfileMarkdownFiles } from "../agent/context/workspace-seed.js";
|
|
9
|
-
import {
|
|
10
|
+
import { normalizePatchTypedModels } from "./hono/lib/agent-model.js";
|
|
10
11
|
import { mkdir, readFile, realpath, stat, unlink, writeFile } from "node:fs/promises";
|
|
12
|
+
import { join, resolve } from "node:path";
|
|
11
13
|
//#region src/gateway/agents-admin.ts
|
|
12
14
|
/**
|
|
13
15
|
* Gateway REST helpers for multi-agent management.
|
|
@@ -39,6 +41,7 @@ async function listGatewayAgents(cfg) {
|
|
|
39
41
|
const agents = [];
|
|
40
42
|
const defaultsSkills = cfg.agents?.defaults?.skills;
|
|
41
43
|
const defaultsDisable = cfg.agents?.defaults?.tools?.disable ?? [];
|
|
44
|
+
const defaultsTypedModels = cfg.agents?.defaults?.models ?? [];
|
|
42
45
|
for (const id of collectAgentIdsForList(cfg)) {
|
|
43
46
|
const profile = resolveEffectiveAgentProfile(cfg, id);
|
|
44
47
|
const entry = listAgentEntries(cfg).find((e) => normalizeAgentId(e.id) === id);
|
|
@@ -48,6 +51,8 @@ async function listGatewayAgents(cfg) {
|
|
|
48
51
|
} : void 0;
|
|
49
52
|
const entrySkills = entry?.skills;
|
|
50
53
|
const entryDisable = entry?.tools?.disable ?? [];
|
|
54
|
+
const entryTypedModels = entry?.models;
|
|
55
|
+
const effectiveTypedModels = [...resolveEffectiveTypedModels(cfg, id).values()];
|
|
51
56
|
let avatar;
|
|
52
57
|
try {
|
|
53
58
|
avatar = extractAvatarFromIdentityMarkdown(await readFile(join(resolveAgentProfileDir(cfg, id), WORKSPACE_FILES.IDENTITY), "utf-8"));
|
|
@@ -60,6 +65,11 @@ async function listGatewayAgents(cfg) {
|
|
|
60
65
|
workspace: profile.resolvedWorkspacePath,
|
|
61
66
|
profileDir: resolveAgentProfileDir(cfg, id),
|
|
62
67
|
...model ? { model } : {},
|
|
68
|
+
typedModels: {
|
|
69
|
+
defaults: [...defaultsTypedModels],
|
|
70
|
+
...entryTypedModels !== void 0 ? { entry: [...entryTypedModels] } : {},
|
|
71
|
+
effective: effectiveTypedModels
|
|
72
|
+
},
|
|
63
73
|
isDefault: id === defaultId,
|
|
64
74
|
skills: {
|
|
65
75
|
defaults: defaultsSkills ? [...defaultsSkills] : [],
|
|
@@ -268,6 +278,12 @@ function prepareUpdateAgent(cfg, agentIdRaw, body) {
|
|
|
268
278
|
disable: next
|
|
269
279
|
};
|
|
270
280
|
}
|
|
281
|
+
if (body.models !== void 0) if (body.models === null) delete entry.models;
|
|
282
|
+
else {
|
|
283
|
+
const normalized = normalizePatchTypedModels(body.models);
|
|
284
|
+
if (normalized === null || normalized === void 0) delete entry.models;
|
|
285
|
+
else entry.models = normalized;
|
|
286
|
+
}
|
|
271
287
|
list[idx] = entry;
|
|
272
288
|
let next = {
|
|
273
289
|
...cfg,
|