@xopcai/xopc 0.0.101 → 0.0.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/feishu/src/transport/webhook/monitor.js +2 -2
- package/dist/extensions/feishu/src/transport/webhook/monitor.js.map +1 -1
- package/dist/extensions/feishu/src/workflow-progress.js +1 -1
- package/dist/extensions/telegram/src/adapters/streaming-adapter.js +1 -1
- package/dist/extensions/telegram/src/inbound-processor.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/send-options.js +8 -5
- package/dist/extensions/telegram/src/send-options.js.map +1 -1
- package/dist/extensions/telegram/src/update-offset-store.js +1 -1
- 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-u8cmUfGQ.js → agents-BwXkia_W.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-DF8m9cUE.js → apps-page-C5RmwmTT.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-settings-BM3doRvi.js → channels-settings-tlOTdaXw.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-status-swr-ah4zWEIP.js → channels-status-swr-D4XjqwqC.js} +1 -1
- package/dist/gateway/static/root/assets/{cron-api-DgMuL_2b.js → cron-api-DcmfGuj0.js} +1 -1
- package/dist/gateway/static/root/assets/{cron-page-COfUPKfq.js → cron-page-CijJ4G6F.js} +1 -1
- package/dist/gateway/static/root/assets/{dist-Dzy3Q0ZH.js → dist-CWm8hTXZ.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-kyxxefKh.js → extension-debug-page-BzYgTkS9.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BVbCBHoI.js → extension-page-BmTZH6gL.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-t1lb2A7v.js → extension-settings-page-CyJk_G64.js} +1 -1
- package/dist/gateway/static/root/assets/{fetch-drJUxxKP.js → fetch-CMoWY2Si.js} +1 -1
- package/dist/gateway/static/root/assets/{field-primitives-6Vo1Yga4.js → field-primitives-C4GpxsDo.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-config-api-BF3psu4O.js → heartbeat-config-api-CLD0Gpi3.js} +1 -1
- package/dist/gateway/static/root/assets/index-0HmunJW9.js +4845 -0
- package/dist/gateway/static/root/assets/index-Bk75Phrd.css +1 -0
- package/dist/gateway/static/root/assets/{logs-page-BTVPXcHV.js → logs-page-BjdQjHwk.js} +1 -1
- package/dist/gateway/static/root/assets/{note-detail-page-DqSAg_5Z.js → note-detail-page-8Er4197b.js} +2 -2
- package/dist/gateway/static/root/assets/{note-time-FSOjchic.js → note-time-CF3vf1jm.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-DkRX7BE2.js → notes-page-BBnTh0uI.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-Khdw35Zk.js → sessions-page-B0riYK7j.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-advanced-gate-DspC8oEm.js → settings-advanced-gate-DiP_WHu_.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-form-section-DuxvUuur.js → settings-form-section-C7qA7y0J.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-DN8JBZ8F.js → settings-page-1ZPhcCZ9.js} +2 -2
- package/dist/gateway/static/root/assets/share-preview-page-Tvr5Mtq5.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page-ByYT0fXZ.js → skills-page-BQ1hllKD.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-B6KXPHgK.js → theme-store-HTvJlFLL.js} +1 -1
- package/dist/gateway/static/root/assets/url-F3_D_6zZ.js +3 -0
- package/dist/gateway/static/root/assets/{utils-DK_1H47k.js → utils-CPr3FBh2.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-BYN2EIMs.js → voice-api-key-field-BkbDl6dH.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-page.utils-Bi19YNTr.js → workflow-page.utils-CeBkAjP7.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-DP57FEKW.js → workflows-page-D059ysoF.js} +1 -1
- package/dist/gateway/static/root/index.html +5 -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/context/workspace-seed.js +2 -2
- package/dist/src/agent/context/workspace-state.js +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/attachment-pipeline.js +2 -2
- package/dist/src/agent/inbound/attachment-pipeline.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/memory-flush.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/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.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 +2 -3
- package/dist/src/agent/tools/send-media.js.map +1 -1
- package/dist/src/agent/tools/skill-manage-tool.js +1 -1
- package/dist/src/agent/tools/workflow-tool.js +1 -1
- package/dist/src/agent/tools/write.js +1 -1
- package/dist/src/agent/workflow/catalog.js +1 -1
- package/dist/src/auth/credentials.d.ts +7 -0
- package/dist/src/auth/credentials.js +37 -4
- package/dist/src/auth/credentials.js.map +1 -1
- package/dist/src/auth/index.d.ts +1 -1
- package/dist/src/auth/index.js.map +1 -1
- package/dist/src/auth/oauth/github-copilot.d.ts +1 -1
- package/dist/src/auth/oauth/google-antigravity.d.ts +1 -3
- package/dist/src/auth/oauth/google-antigravity.js +1 -1
- package/dist/src/auth/oauth/google-gemini-cli.d.ts +1 -3
- package/dist/src/auth/oauth/google-gemini-cli.js +1 -1
- package/dist/src/auth/oauth/{vendor-pi-google → google-oauth}/google-antigravity.js +3 -5
- package/dist/src/auth/oauth/google-oauth/google-antigravity.js.map +1 -0
- package/dist/src/auth/oauth/{vendor-pi-google → google-oauth}/google-gemini-cli.js +4 -5
- package/dist/src/auth/oauth/google-oauth/google-gemini-cli.js.map +1 -0
- package/dist/src/auth/oauth/{vendor-pi-google → google-oauth}/oauth-page.js +12 -4
- package/dist/src/auth/oauth/google-oauth/oauth-page.js.map +1 -0
- package/dist/src/auth/oauth/{vendor-pi-google → google-oauth}/pkce.d.ts +1 -1
- package/dist/src/auth/oauth/{vendor-pi-google → google-oauth}/pkce.js +2 -2
- package/dist/src/auth/oauth/google-oauth/pkce.js.map +1 -0
- package/dist/src/auth/oauth/index.js +2 -2
- package/dist/src/auth/oauth/kimi-coding.d.ts +1 -1
- package/dist/src/auth/oauth/kimi-coding.js +1 -1
- package/dist/src/auth/oauth/kimi-coding.js.map +1 -1
- package/dist/src/auth/oauth/minimax-cn.js +1 -1
- package/dist/src/auth/oauth/minimax-cn.js.map +1 -1
- package/dist/src/auth/oauth/minimax.js +1 -1
- package/dist/src/auth/oauth/minimax.js.map +1 -1
- package/dist/src/auth/oauth/openai-codex.d.ts +7 -2
- package/dist/src/auth/oauth/openai-codex.js +318 -1
- package/dist/src/auth/oauth/openai-codex.js.map +1 -0
- package/dist/src/auth/profiles/store.js +4 -3
- package/dist/src/auth/profiles/store.js.map +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/attachment-classifiers.d.ts +1 -0
- package/dist/src/channels/attachments/attachment-classifiers.js +13 -2
- package/dist/src/channels/attachments/attachment-classifiers.js.map +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/agent-edit.js +2 -2
- package/dist/src/chat-commands/builtins/config.js +2 -2
- package/dist/src/chat-commands/builtins/model.js +2 -2
- package/dist/src/chat-commands/builtins/model.js.map +1 -1
- package/dist/src/chat-commands/context.js +1 -1
- package/dist/src/cli/command-manifest.js +1 -1
- package/dist/src/cli/command-manifest.js.map +1 -1
- package/dist/src/cli/commands/auth.js +39 -51
- package/dist/src/cli/commands/auth.js.map +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/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.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 +3 -3
- package/dist/src/cli/commands/models.js +189 -54
- package/dist/src/cli/commands/models.js.map +1 -1
- package/dist/src/cli/commands/onboard/model.d.ts +1 -4
- package/dist/src/cli/commands/onboard/model.js +253 -183
- package/dist/src/cli/commands/onboard/model.js.map +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +2 -2
- package/dist/src/cli/utils/oauth-login.d.ts +17 -0
- package/dist/src/cli/utils/oauth-login.js +93 -0
- package/dist/src/cli/utils/oauth-login.js.map +1 -0
- package/dist/src/cli/utils/oauth-providers.js +2 -2
- package/dist/src/commands/agents.config.js +1 -1
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/config/gateway-bind.js +1 -1
- package/dist/src/config/index.js +5 -5
- 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/workspace-path.js +1 -1
- package/dist/src/cron/executor.js +2 -2
- package/dist/src/cron/persistence.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/extensions/update.js +1 -1
- package/dist/src/gateway/agents-admin.js +3 -3
- package/dist/src/gateway/file-path-classifier.js +2 -2
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/lib/extension-store.js +2 -2
- package/dist/src/gateway/hono/lib/static-ui.js +2 -2
- package/dist/src/gateway/hono/oauth-async.js +3 -3
- package/dist/src/gateway/hono/oauth.js +3 -3
- package/dist/src/gateway/hono/routes/agents.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +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/models.js +26 -6
- package/dist/src/gateway/hono/routes/models.js.map +1 -1
- package/dist/src/gateway/hono/routes/notes.js +9 -22
- package/dist/src/gateway/hono/routes/notes.js.map +1 -1
- package/dist/src/gateway/hono/routes/shares.js +1 -1
- package/dist/src/gateway/hono/routes/workspace.js +2 -2
- 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.js +1 -1
- package/dist/src/gateway/workspace-fs-file-list.js +1 -1
- package/dist/src/infra/brew.js +1 -1
- package/dist/src/infra/package-json.js +1 -1
- package/dist/src/infra/package-update-steps.js +1 -1
- package/dist/src/infra/path-env.js +2 -2
- package/dist/src/infra/restart.js +2 -2
- package/dist/src/infra/stable-node-path.js +1 -1
- 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/media/store.js +4 -1
- package/dist/src/media/store.js.map +1 -1
- package/dist/src/notes/note-attachment-sync.d.ts +2 -3
- package/dist/src/notes/note-attachment-sync.js +2 -27
- package/dist/src/notes/note-attachment-sync.js.map +1 -1
- package/dist/src/notes/note-index-meta.d.ts +6 -2
- package/dist/src/notes/note-index-meta.js +11 -16
- package/dist/src/notes/note-index-meta.js.map +1 -1
- package/dist/src/notes/note-markdown.d.ts +61 -0
- package/dist/src/notes/note-markdown.js +177 -0
- package/dist/src/notes/note-markdown.js.map +1 -0
- package/dist/src/notes/service.d.ts +9 -7
- package/dist/src/notes/service.js +163 -312
- package/dist/src/notes/service.js.map +1 -1
- package/dist/src/notes/store.js +4 -5
- package/dist/src/notes/store.js.map +1 -1
- package/dist/src/notes/types.d.ts +29 -58
- package/dist/src/providers/auth-runtime/auth-profile-store.js +1 -1
- package/dist/src/providers/index.d.ts +3 -3
- package/dist/src/providers/index.js +25 -17
- package/dist/src/providers/index.js.map +1 -1
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/presentation.d.ts +34 -0
- package/dist/src/providers/presentation.js +162 -0
- package/dist/src/providers/presentation.js.map +1 -0
- package/dist/src/session/init-session-turn.js +2 -2
- package/dist/src/session/resolve-session.js +3 -3
- package/dist/src/session/session-title.js +2 -2
- package/dist/src/session/store.js +2 -2
- 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/storage/sqlite/connection.js +2 -2
- package/dist/src/storage/sqlite/memory-index-repository.js +2 -2
- package/dist/src/storage/sqlite/migrations/003_add_note_markdown_meta.sql +4 -0
- package/dist/src/storage/sqlite/migrations/discover.js +1 -1
- package/dist/src/storage/sqlite/migrations/runner.d.ts +2 -2
- package/dist/src/storage/sqlite/migrations/runner.js +5 -5
- package/dist/src/storage/sqlite/migrations/runner.js.map +1 -1
- package/dist/src/storage/sqlite/migrations/runner.ts +2 -2
- package/dist/src/storage/sqlite/notes-repository.js +18 -6
- package/dist/src/storage/sqlite/notes-repository.js.map +1 -1
- package/dist/src/storage/sqlite/schema.js +4 -4
- package/dist/src/storage/sqlite/schema.sql +5 -1
- package/dist/src/tui/clipboard-image.js +3 -3
- package/dist/src/tui/theme-manager.js +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/tts/audio.js +1 -1
- package/dist/src/voice/tts/providers/edge-speech.js +2 -2
- package/dist/src/workflows/store/event-store.js +1 -1
- package/dist/src/workflows/store/run-store.js +1 -1
- package/package.json +1 -1
- package/dist/gateway/static/root/assets/index-DjNDHzwG.css +0 -1
- package/dist/gateway/static/root/assets/index-WAyKAilR.js +0 -4840
- package/dist/gateway/static/root/assets/share-preview-page-UNAcbiMb.js +0 -2
- package/dist/gateway/static/root/assets/url-q28QhI7l.js +0 -3
- package/dist/src/auth/oauth/vendor-pi-google/google-antigravity.js.map +0 -1
- package/dist/src/auth/oauth/vendor-pi-google/google-gemini-cli.js.map +0 -1
- package/dist/src/auth/oauth/vendor-pi-google/oauth-page.js.map +0 -1
- package/dist/src/auth/oauth/vendor-pi-google/pkce.js.map +0 -1
- /package/dist/src/auth/oauth/{vendor-pi-google → google-oauth}/google-antigravity.d.ts +0 -0
- /package/dist/src/auth/oauth/{vendor-pi-google → google-oauth}/google-gemini-cli.d.ts +0 -0
- /package/dist/src/auth/oauth/{vendor-pi-google → google-oauth}/oauth-page.d.ts +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { createLogger } from "../../utils/logger/index.js";
|
|
2
|
+
import { init_logger } from "../../utils/logger.js";
|
|
3
|
+
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
4
|
+
import { getOAuthProvider } from "./oauth-providers.js";
|
|
5
|
+
import { input, select } from "@inquirer/prompts";
|
|
6
|
+
//#region src/cli/utils/oauth-login.ts
|
|
7
|
+
init_credentials();
|
|
8
|
+
init_logger();
|
|
9
|
+
const log = createLogger("OAuthLogin");
|
|
10
|
+
async function openBrowser(url) {
|
|
11
|
+
const { spawn } = await import("node:child_process");
|
|
12
|
+
const platform = process.platform;
|
|
13
|
+
const command = platform === "darwin" ? "open" : platform === "win32" ? "cmd" : "xdg-open";
|
|
14
|
+
const child = spawn(command, platform === "win32" ? [
|
|
15
|
+
"/c",
|
|
16
|
+
"start",
|
|
17
|
+
"",
|
|
18
|
+
url
|
|
19
|
+
] : [url], {
|
|
20
|
+
stdio: "ignore",
|
|
21
|
+
detached: true
|
|
22
|
+
});
|
|
23
|
+
child.on("error", (err) => {
|
|
24
|
+
log.debug({
|
|
25
|
+
err,
|
|
26
|
+
command
|
|
27
|
+
}, "Browser open command failed");
|
|
28
|
+
});
|
|
29
|
+
child.unref();
|
|
30
|
+
}
|
|
31
|
+
function buildCliOAuthCallbacks(params) {
|
|
32
|
+
let manualPromptPromise;
|
|
33
|
+
const promptForManualCode = () => manualPromptPromise ??= input({
|
|
34
|
+
message: "Paste the authorization code (or full redirect URL):",
|
|
35
|
+
validate: (value) => value.trim().length > 0 || "Required"
|
|
36
|
+
});
|
|
37
|
+
return {
|
|
38
|
+
onAuth: (info) => {
|
|
39
|
+
console.log("\n" + params.config.urlPrompt);
|
|
40
|
+
console.log(info.url);
|
|
41
|
+
if (info.instructions) console.log("\n" + info.instructions);
|
|
42
|
+
if (params.provider.usesCallbackServer) console.log("\nWaiting for localhost callback. If it does not complete, paste the final redirect URL below.");
|
|
43
|
+
openBrowser(info.url);
|
|
44
|
+
console.log("");
|
|
45
|
+
},
|
|
46
|
+
onDeviceCode: (info) => {
|
|
47
|
+
console.log(`\nOpen ${info.verificationUri} and enter code ${info.userCode}\n`);
|
|
48
|
+
openBrowser(info.verificationUri);
|
|
49
|
+
},
|
|
50
|
+
onPrompt: async (prompt) => input({
|
|
51
|
+
message: prompt.message,
|
|
52
|
+
validate: prompt.allowEmpty ? void 0 : (value) => value.trim().length > 0 || "Required"
|
|
53
|
+
}),
|
|
54
|
+
onManualCodeInput: params.provider.usesCallbackServer && params.provider.id !== "openai-codex" ? promptForManualCode : void 0,
|
|
55
|
+
onProgress: (message) => {
|
|
56
|
+
params.onProgress?.(message);
|
|
57
|
+
},
|
|
58
|
+
onSelect: async (prompt) => {
|
|
59
|
+
return select({
|
|
60
|
+
message: prompt.message,
|
|
61
|
+
choices: prompt.options.map((option) => ({
|
|
62
|
+
value: option.id,
|
|
63
|
+
name: option.label
|
|
64
|
+
}))
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
async function runCliOAuthLogin(options) {
|
|
70
|
+
const config = getOAuthProvider(options.provider);
|
|
71
|
+
if (!config) throw new Error(`OAuth not supported for provider: ${options.provider}`);
|
|
72
|
+
const credentials = await config.provider.login(buildCliOAuthCallbacks({
|
|
73
|
+
config,
|
|
74
|
+
provider: config.provider,
|
|
75
|
+
onProgress: options.onProgress
|
|
76
|
+
}));
|
|
77
|
+
await new CredentialResolver().saveOAuthToken(options.provider, {
|
|
78
|
+
access: config.provider.getApiKey(credentials),
|
|
79
|
+
refresh: credentials.refresh,
|
|
80
|
+
expiresAt: credentials.expires,
|
|
81
|
+
scope: Array.isArray(credentials.scope) ? credentials.scope.filter((value) => typeof value === "string") : void 0,
|
|
82
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
83
|
+
});
|
|
84
|
+
return {
|
|
85
|
+
provider: options.provider,
|
|
86
|
+
credentials,
|
|
87
|
+
expires: credentials.expires
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
export { buildCliOAuthCallbacks, runCliOAuthLogin };
|
|
92
|
+
|
|
93
|
+
//# sourceMappingURL=oauth-login.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-login.js","names":[],"sources":["../../../../src/cli/utils/oauth-login.ts"],"sourcesContent":["import { input, select } from '@inquirer/prompts';\n\nimport type { OAuthCredentials, OAuthLoginCallbacks, OAuthProviderInterface } from '../../auth/index.js';\nimport { CredentialResolver } from '../../auth/credentials.js';\nimport { createLogger } from '../../utils/logger.js';\n\nimport { getOAuthProvider, type OAuthProviderConfig } from './oauth-providers.js';\n\nconst log = createLogger('OAuthLogin');\n\nexport interface RunCliOAuthLoginOptions {\n provider: string;\n onProgress?: (message: string) => void;\n}\n\nexport interface RunCliOAuthLoginResult {\n provider: string;\n credentials: OAuthCredentials;\n expires?: number;\n}\n\nasync function openBrowser(url: string): Promise<void> {\n const { spawn } = await import('node:child_process');\n const platform = process.platform;\n const command = platform === 'darwin' ? 'open' : platform === 'win32' ? 'cmd' : 'xdg-open';\n const args = platform === 'win32' ? ['/c', 'start', '', url] : [url];\n const child = spawn(command, args, { stdio: 'ignore', detached: true });\n child.on('error', (err) => {\n log.debug({ err, command }, 'Browser open command failed');\n });\n child.unref();\n}\n\nexport function buildCliOAuthCallbacks(params: {\n config: OAuthProviderConfig;\n provider: OAuthProviderInterface;\n onProgress?: (message: string) => void;\n}): OAuthLoginCallbacks {\n let manualPromptPromise: Promise<string> | undefined;\n const promptForManualCode = () =>\n (manualPromptPromise ??= input({\n message: 'Paste the authorization code (or full redirect URL):',\n validate: (value: string) => value.trim().length > 0 || 'Required',\n }));\n\n return {\n onAuth: (info) => {\n console.log('\\n' + params.config.urlPrompt);\n console.log(info.url);\n if (info.instructions) {\n console.log('\\n' + info.instructions);\n }\n if (params.provider.usesCallbackServer) {\n console.log('\\nWaiting for localhost callback. If it does not complete, paste the final redirect URL below.');\n }\n void openBrowser(info.url);\n console.log('');\n },\n onDeviceCode: (info) => {\n console.log(`\\nOpen ${info.verificationUri} and enter code ${info.userCode}\\n`);\n void openBrowser(info.verificationUri);\n },\n onPrompt: async (prompt) =>\n input({\n message: prompt.message,\n validate: prompt.allowEmpty ? undefined : (value: string) => value.trim().length > 0 || 'Required',\n }),\n onManualCodeInput: params.provider.usesCallbackServer && params.provider.id !== 'openai-codex' ? promptForManualCode : undefined,\n onProgress: (message) => {\n params.onProgress?.(message);\n },\n onSelect: async (prompt) => {\n return select({\n message: prompt.message,\n choices: prompt.options.map((option) => ({ value: option.id, name: option.label })),\n });\n },\n };\n}\n\nexport async function runCliOAuthLogin(options: RunCliOAuthLoginOptions): Promise<RunCliOAuthLoginResult> {\n const config = getOAuthProvider(options.provider);\n if (!config) {\n throw new Error(`OAuth not supported for provider: ${options.provider}`);\n }\n\n const credentials = await config.provider.login(\n buildCliOAuthCallbacks({ config, provider: config.provider, onProgress: options.onProgress }),\n );\n\n const resolver = new CredentialResolver();\n await resolver.saveOAuthToken(options.provider, {\n access: config.provider.getApiKey(credentials),\n refresh: credentials.refresh,\n expiresAt: credentials.expires,\n scope: Array.isArray(credentials.scope) ? credentials.scope.filter((value): value is string => typeof value === 'string') : undefined,\n createdAt: new Date().toISOString(),\n });\n\n return { provider: options.provider, credentials, expires: credentials.expires };\n}\n"],"mappings":";;;;;;kBAG+D;aACV;AAIrD,MAAM,MAAM,aAAa,aAAa;AAatC,eAAe,YAAY,KAA4B;CACrD,MAAM,EAAE,UAAU,MAAM,OAAO;CAC/B,MAAM,WAAW,QAAQ;CACzB,MAAM,UAAU,aAAa,WAAW,SAAS,aAAa,UAAU,QAAQ;CAEhF,MAAM,QAAQ,MAAM,SADP,aAAa,UAAU;EAAC;EAAM;EAAS;EAAI;EAAI,GAAG,CAAC,IAAI,EACjC;EAAE,OAAO;EAAU,UAAU;EAAM,CAAC;AACvE,OAAM,GAAG,UAAU,QAAQ;AACzB,MAAI,MAAM;GAAE;GAAK;GAAS,EAAE,8BAA8B;GAC1D;AACF,OAAM,OAAO;;AAGf,SAAgB,uBAAuB,QAIf;CACtB,IAAI;CACJ,MAAM,4BACH,wBAAwB,MAAM;EAC7B,SAAS;EACT,WAAW,UAAkB,MAAM,MAAM,CAAC,SAAS,KAAK;EACzD,CAAC;AAEJ,QAAO;EACL,SAAS,SAAS;AAChB,WAAQ,IAAI,OAAO,OAAO,OAAO,UAAU;AAC3C,WAAQ,IAAI,KAAK,IAAI;AACrB,OAAI,KAAK,aACP,SAAQ,IAAI,OAAO,KAAK,aAAa;AAEvC,OAAI,OAAO,SAAS,mBAClB,SAAQ,IAAI,iGAAiG;AAE1G,eAAY,KAAK,IAAI;AAC1B,WAAQ,IAAI,GAAG;;EAEjB,eAAe,SAAS;AACtB,WAAQ,IAAI,UAAU,KAAK,gBAAgB,kBAAkB,KAAK,SAAS,IAAI;AAC1E,eAAY,KAAK,gBAAgB;;EAExC,UAAU,OAAO,WACf,MAAM;GACJ,SAAS,OAAO;GAChB,UAAU,OAAO,aAAa,KAAA,KAAa,UAAkB,MAAM,MAAM,CAAC,SAAS,KAAK;GACzF,CAAC;EACJ,mBAAmB,OAAO,SAAS,sBAAsB,OAAO,SAAS,OAAO,iBAAiB,sBAAsB,KAAA;EACvH,aAAa,YAAY;AACvB,UAAO,aAAa,QAAQ;;EAE9B,UAAU,OAAO,WAAW;AAC1B,UAAO,OAAO;IACZ,SAAS,OAAO;IAChB,SAAS,OAAO,QAAQ,KAAK,YAAY;KAAE,OAAO,OAAO;KAAI,MAAM,OAAO;KAAO,EAAE;IACpF,CAAC;;EAEL;;AAGH,eAAsB,iBAAiB,SAAmE;CACxG,MAAM,SAAS,iBAAiB,QAAQ,SAAS;AACjD,KAAI,CAAC,OACH,OAAM,IAAI,MAAM,qCAAqC,QAAQ,WAAW;CAG1E,MAAM,cAAc,MAAM,OAAO,SAAS,MACxC,uBAAuB;EAAE;EAAQ,UAAU,OAAO;EAAU,YAAY,QAAQ;EAAY,CAAC,CAC9F;AAGD,OAAM,IADe,oBACP,CAAC,eAAe,QAAQ,UAAU;EAC9C,QAAQ,OAAO,SAAS,UAAU,YAAY;EAC9C,SAAS,YAAY;EACrB,WAAW,YAAY;EACvB,OAAO,MAAM,QAAQ,YAAY,MAAM,GAAG,YAAY,MAAM,QAAQ,UAA2B,OAAO,UAAU,SAAS,GAAG,KAAA;EAC5H,4BAAW,IAAI,MAAM,EAAC,aAAa;EACpC,CAAC;AAEF,QAAO;EAAE,UAAU,QAAQ;EAAU;EAAa,SAAS,YAAY;EAAS"}
|
|
@@ -3,8 +3,8 @@ import { minimaxOAuthProvider } from "../../auth/oauth/minimax.js";
|
|
|
3
3
|
import { minimaxCnOAuthProvider } from "../../auth/oauth/minimax-cn.js";
|
|
4
4
|
import { kimiCodingOAuthProvider } from "../../auth/oauth/kimi-coding.js";
|
|
5
5
|
import { githubCopilotOAuthProvider } from "../../auth/oauth/github-copilot.js";
|
|
6
|
-
import { geminiCliOAuthProvider } from "../../auth/oauth/
|
|
7
|
-
import { antigravityOAuthProvider } from "../../auth/oauth/
|
|
6
|
+
import { geminiCliOAuthProvider } from "../../auth/oauth/google-oauth/google-gemini-cli.js";
|
|
7
|
+
import { antigravityOAuthProvider } from "../../auth/oauth/google-oauth/google-antigravity.js";
|
|
8
8
|
import { openaiCodexOAuthProvider } from "../../auth/oauth/openai-codex.js";
|
|
9
9
|
import "../../auth/oauth/index.js";
|
|
10
10
|
//#region src/cli/utils/oauth-providers.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_localized_text, normalizeLocalizedText } from "../config/localized-text.js";
|
|
2
1
|
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveAgentHomeDir, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
2
|
+
import { init_localized_text, normalizeLocalizedText } from "../config/localized-text.js";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import { rm } from "node:fs/promises";
|
|
5
5
|
//#region src/commands/agents.config.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getAgentDefaultModelRef, init_schema } from "./schema.js";
|
|
2
1
|
import { init_agent_scope, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
2
|
+
import { getAgentDefaultModelRef, init_schema } from "./schema.js";
|
|
3
3
|
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
4
4
|
import { agentExists, getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
5
5
|
//#region src/config/agent-profile.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getTailnetIPv4Sync } from "../infra/tailscale.js";
|
|
2
2
|
import { isLoopbackHost } from "../gateway/host.js";
|
|
3
|
-
import net from "node:net";
|
|
4
3
|
import { existsSync } from "node:fs";
|
|
4
|
+
import net from "node:net";
|
|
5
5
|
//#region src/config/gateway-bind.ts
|
|
6
6
|
function resolveGatewayBindMode(cfg, bindOverride) {
|
|
7
7
|
if (bindOverride) return bindOverride;
|
package/dist/src/config/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema } from "../../extensions/telegram/src/config-schema.js";
|
|
2
|
-
import { WeixinAccountConfigSchema, WeixinConfigSchema } from "../../extensions/weixin/src/config-schema.js";
|
|
3
|
-
import { AgentConfigSchema, AgentDefaultsSchema, AgentImageGenerationModelSchema, AgentModelRefSchema, AgentTypedModelSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, CronConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GoalsConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultModelRef, init_schema, parseModelRef } from "./schema.js";
|
|
4
|
-
import { applyConfigOverrides, getConfigOverrides, resetConfigOverrides, setConfigOverride, unsetConfigOverride } from "./runtime-overrides.js";
|
|
5
1
|
import { ENV_VARS, XOPC_DB_FILENAME, resolveHomeDir, resolveStateDir, resolveXopcDatabasePath } from "./paths-state.js";
|
|
6
2
|
import { expandWorkspacePathString, init_workspace_path, normalizeWorkspaceDir, resolveWorkspaceRoot } from "./workspace-path.js";
|
|
7
3
|
import { resolveDefaultAgentWorkspaceDir } from "./workspace-defaults.js";
|
|
8
4
|
import { resolveAgentDir as resolveAgentDir$1, resolveAgentHomeDir as resolveAgentHomeDir$1, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
9
|
-
import { extractProfileAgentId, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
|
|
10
5
|
import { FILENAMES, WORKSPACE_FILES, existsSync, init_paths, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentHomeDir, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveCredentialsDir, resolveCronDir, resolveCronJobsPath, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath } from "./paths.js";
|
|
6
|
+
import { TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema } from "../../extensions/telegram/src/config-schema.js";
|
|
7
|
+
import { WeixinAccountConfigSchema, WeixinConfigSchema } from "../../extensions/weixin/src/config-schema.js";
|
|
8
|
+
import { AgentConfigSchema, AgentDefaultsSchema, AgentImageGenerationModelSchema, AgentModelRefSchema, AgentTypedModelSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, CronConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GoalsConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultModelRef, init_schema, parseModelRef } from "./schema.js";
|
|
11
9
|
import { init_loader, loadConfig, registerChannelConfigValidator, saveConfig } from "./loader.js";
|
|
10
|
+
import { applyConfigOverrides, getConfigOverrides, resetConfigOverrides, setConfigOverride, unsetConfigOverride } from "./runtime-overrides.js";
|
|
11
|
+
import { extractProfileAgentId, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
|
|
12
12
|
import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
|
|
13
13
|
import { CustomModelSchema, ModelOverrideSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProviderConfigSchema, VercelGatewayRoutingSchema, getDefaultModelValues, init_models_json, loadModelsJson, modelsJsonExists, saveModelsJson, validateModelsConfig } from "./models-json.js";
|
|
14
14
|
import { canonicalizeConfiguredMcpServer, isKnownCliMcpTypeAlias, normalizeConfiguredMcpServers, resolveXopcMcpTransportAlias } from "./mcp-config-normalize.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import {
|
|
2
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
3
3
|
import { createLogger } from "../utils/logger/index.js";
|
|
4
4
|
import { init_logger } from "../utils/logger.js";
|
|
5
5
|
import { init_paths, resolveConfigPath } from "./paths.js";
|
|
6
|
-
import {
|
|
6
|
+
import { ConfigSchema, init_schema } from "./schema.js";
|
|
7
7
|
import { dirname } from "path";
|
|
8
8
|
import { existsSync, mkdirSync, promises, readFileSync } from "fs";
|
|
9
9
|
import { config } from "dotenv";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { init_paths, resolveModelsJsonPath } from "./paths.js";
|
|
3
2
|
import { init_write_file_atomic, writeTextAtomicSync } from "../infra/write-file-atomic.js";
|
|
4
|
-
import {
|
|
3
|
+
import { init_paths, resolveModelsJsonPath } from "./paths.js";
|
|
5
4
|
import { existsSync, readFileSync } from "fs";
|
|
5
|
+
import { z } from "zod";
|
|
6
6
|
//#region src/config/models-json.ts
|
|
7
7
|
/**
|
|
8
8
|
* Models.json configuration types and schema
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { homedir } from "node:os";
|
|
3
2
|
import { join } from "node:path";
|
|
3
|
+
import { homedir } from "node:os";
|
|
4
4
|
//#region src/config/paths-state.ts
|
|
5
5
|
function resolveHomeDir(env = process.env) {
|
|
6
6
|
return env[ENV_VARS.HOME] || homedir();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ENV_VARS, init_paths_state, resolveHomeDir } from "./paths-state.js";
|
|
2
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { ENV_VARS, init_paths_state, resolveHomeDir } from "./paths-state.js";
|
|
4
|
+
import { mkdir, readdir, rm, stat } from "fs/promises";
|
|
4
5
|
import { join } from "path";
|
|
5
6
|
import { existsSync } from "fs";
|
|
6
|
-
import { mkdir, readdir, rm, stat } from "fs/promises";
|
|
7
7
|
//#region src/config/profile.ts
|
|
8
8
|
init_logger();
|
|
9
9
|
init_paths_state();
|
|
@@ -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 { shouldSilence, stripHeartbeatToken } from "../heartbeat/tokens.js";
|
|
6
6
|
import { getChannelPlugin, listChannelPlugins, syncChannelPluginsFromManager } from "../channels/plugins/registry.js";
|
|
7
7
|
import { getCronPayloadText } from "./job-content.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
|
|
@@ -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();
|
|
@@ -6,8 +6,8 @@ import { getExtensionLockfileManager } from "./lockfile.js";
|
|
|
6
6
|
import { installExtensionFromStoreZip, installFromNpm } from "./install.js";
|
|
7
7
|
import { findExtension } from "./marketplace.js";
|
|
8
8
|
import { downloadExtensionStoreZipBuffer, resolveExtensionZipDownloadUrl, resolveExtensionsStoreBaseUrl } from "../agent/skills/marketplace/adapters/store/store-api-client.js";
|
|
9
|
-
import { join } from "node:path";
|
|
10
9
|
import { existsSync, readFileSync, readdirSync, rmSync } from "node:fs";
|
|
10
|
+
import { join } from "node:path";
|
|
11
11
|
import semver from "semver";
|
|
12
12
|
//#region src/extensions/update.ts
|
|
13
13
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { init_localized_text, normalizeLocalizedText, resolveLocalizedText } from "../config/localized-text.js";
|
|
2
1
|
import { DEFAULT_AGENT_ID, init_agent_scope, listAgentEntries, normalizeAgentId, resolveAgentDir, resolveAgentProfileDir, resolveAgentWorkspaceDir, resolveDefaultAgentId, resolveUserPath, validateAgentIdForNewAgent } from "../agent/agent-scope.js";
|
|
3
|
-
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
4
2
|
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
3
|
+
import { init_localized_text, normalizeLocalizedText, resolveLocalizedText } from "../config/localized-text.js";
|
|
4
|
+
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
5
5
|
import { AGENT_PROFILE_MARKDOWN_SYSTEM_FILES } from "../agent/context/workspace.js";
|
|
6
6
|
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
7
7
|
import { applyAgentConfig, findAgentEntryIndex, pruneAgentConfig, removeAgentDirsFromDisk } from "../commands/agents.config.js";
|
|
8
8
|
import { GATEWAY_BUILTIN_TOOL_IDS } from "./agent-builtin-tools.js";
|
|
9
9
|
import { seedAgentProfileMarkdownFiles } from "../agent/context/workspace-seed.js";
|
|
10
|
-
import { join, resolve } from "node:path";
|
|
11
10
|
import { cp, mkdir, readFile, readdir, realpath, stat, unlink, writeFile } from "node:fs/promises";
|
|
11
|
+
import { join, resolve } from "node:path";
|
|
12
12
|
//#region src/gateway/agents-admin.ts
|
|
13
13
|
/**
|
|
14
14
|
* Gateway REST helpers for multi-agent management.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { init_paths_state, resolveStateDir } from "../config/paths-state.js";
|
|
2
2
|
import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.js";
|
|
3
|
-
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
4
3
|
import { init_paths, resolveConfigPath, resolveSkillsDir } from "../config/paths.js";
|
|
4
|
+
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
5
5
|
import { isBareProfileMarkdownFileName, resolveProfileMarkdownPathIfBareName } from "../agent/tools/tool-paths.js";
|
|
6
6
|
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
7
|
-
import { basename, isAbsolute, resolve } from "node:path";
|
|
8
7
|
import { stat } from "node:fs/promises";
|
|
8
|
+
import { basename, isAbsolute, resolve } from "node:path";
|
|
9
9
|
//#region src/gateway/file-path-classifier.ts
|
|
10
10
|
init_agent_scope();
|
|
11
11
|
init_paths();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveDefaultAgentId } from "../../../agent/agent-scope.js";
|
|
2
2
|
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
3
|
-
import { init_models_json, loadModelsJson } from "../../../config/models-json.js";
|
|
4
3
|
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
4
|
+
import { init_models_json, loadModelsJson } from "../../../config/models-json.js";
|
|
5
5
|
import { getProviderRegistry, init_plugin_registry } from "../../../providers/plugin-registry.js";
|
|
6
6
|
import { getAllProviders, init_providers, isProviderConfigured } from "../../../providers/index.js";
|
|
7
7
|
import { resolveShareConfig } from "../../../share/share-config.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { init_write_file_atomic, writeTextAtomic } from "../../../infra/write-file-atomic.js";
|
|
2
|
-
import { homedir } from "node:os";
|
|
3
|
-
import { join } from "node:path";
|
|
4
2
|
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { homedir } from "node:os";
|
|
5
5
|
//#region src/gateway/hono/lib/extension-store.ts
|
|
6
6
|
init_write_file_atomic();
|
|
7
7
|
/** Extension UI: write-through JSON KV per namespace under ~/.xopc/extensions/{namespace}/storage.json */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { dirname, resolve } from "node:path";
|
|
2
|
-
import { readFileSync } from "node:fs";
|
|
3
1
|
import { createHash } from "node:crypto";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { dirname, resolve } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
//#region src/gateway/hono/lib/static-ui.ts
|
|
6
6
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
4
|
+
import { anthropicOAuthProvider } from "../../auth/oauth/anthropic.js";
|
|
4
5
|
import { isLoopbackHost } from "../host.js";
|
|
5
6
|
import { resolveReverseProxyPublicUrl } from "../public-url.js";
|
|
6
|
-
import { anthropicOAuthProvider } from "../../auth/oauth/anthropic.js";
|
|
7
7
|
import { minimaxOAuthProvider } from "../../auth/oauth/minimax.js";
|
|
8
8
|
import { minimaxCnOAuthProvider } from "../../auth/oauth/minimax-cn.js";
|
|
9
9
|
import { kimiCodingOAuthProvider } from "../../auth/oauth/kimi-coding.js";
|
|
10
10
|
import { githubCopilotOAuthProvider } from "../../auth/oauth/github-copilot.js";
|
|
11
|
-
import { geminiCliOAuthProvider } from "../../auth/oauth/
|
|
12
|
-
import { antigravityOAuthProvider } from "../../auth/oauth/
|
|
11
|
+
import { geminiCliOAuthProvider } from "../../auth/oauth/google-oauth/google-gemini-cli.js";
|
|
12
|
+
import { antigravityOAuthProvider } from "../../auth/oauth/google-oauth/google-antigravity.js";
|
|
13
13
|
import { openaiCodexOAuthProvider } from "../../auth/oauth/openai-codex.js";
|
|
14
14
|
import "../../auth/oauth/index.js";
|
|
15
15
|
import { Hono } from "hono";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
2
|
-
import { getProviderAuthState, init_providers, isProviderConfigured } from "../../providers/index.js";
|
|
3
2
|
import { anthropicOAuthProvider } from "../../auth/oauth/anthropic.js";
|
|
3
|
+
import { getProviderAuthState, init_providers, isProviderConfigured } from "../../providers/index.js";
|
|
4
4
|
import { minimaxOAuthProvider } from "../../auth/oauth/minimax.js";
|
|
5
5
|
import { minimaxCnOAuthProvider } from "../../auth/oauth/minimax-cn.js";
|
|
6
6
|
import { kimiCodingOAuthProvider } from "../../auth/oauth/kimi-coding.js";
|
|
7
7
|
import { githubCopilotOAuthProvider } from "../../auth/oauth/github-copilot.js";
|
|
8
|
-
import { geminiCliOAuthProvider } from "../../auth/oauth/
|
|
9
|
-
import { antigravityOAuthProvider } from "../../auth/oauth/
|
|
8
|
+
import { geminiCliOAuthProvider } from "../../auth/oauth/google-oauth/google-gemini-cli.js";
|
|
9
|
+
import { antigravityOAuthProvider } from "../../auth/oauth/google-oauth/google-antigravity.js";
|
|
10
10
|
import { openaiCodexOAuthProvider } from "../../auth/oauth/openai-codex.js";
|
|
11
11
|
import "../../auth/oauth/index.js";
|
|
12
12
|
import { Hono } from "hono";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { init_agent_scope, normalizeAgentId } from "../../../agent/agent-scope.js";
|
|
1
2
|
import { init_localized_text, normalizeLocalizedText } from "../../../config/localized-text.js";
|
|
2
3
|
import { init_schema, parseModelRef } from "../../../config/schema.js";
|
|
3
|
-
import { init_agent_scope, normalizeAgentId } from "../../../agent/agent-scope.js";
|
|
4
4
|
import { init_providers, isProviderConfigured, resolveModel } from "../../../providers/index.js";
|
|
5
5
|
import { getVoiceModelsConfig } from "../../../config/voice.js";
|
|
6
6
|
import { deleteAgentAvatarFile, finalizeCreateAgentDirs, listAgentProfileFiles, listGatewayAgents, prepareCreateAgent, prepareCreateAgentsBatch, prepareDeleteAgent, prepareUpdateAgent, readAgentAvatarFile, readAgentProfileFile, runAfterDeletePurge, writeAgentAvatarFromBase64, writeAgentProfileFile } from "../../agents-admin.js";
|
|
@@ -7,8 +7,8 @@ import { createOAuthHandler } from "../oauth.js";
|
|
|
7
7
|
import { createOAuthAsyncHandler } from "../oauth-async.js";
|
|
8
8
|
import { extensionAssetMimeType } from "../lib/extension-assets.js";
|
|
9
9
|
import { loadExtensionStore, saveExtensionStore } from "../lib/extension-store.js";
|
|
10
|
-
import { relative, resolve } from "node:path";
|
|
11
10
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
11
|
+
import { relative, resolve } from "node:path";
|
|
12
12
|
//#region src/gateway/hono/routes/auth-registry-extensions.ts
|
|
13
13
|
init_providers();
|
|
14
14
|
const EXTENSION_ASSET_CSP = "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; connect-src 'none'; frame-ancestors 'self'; frame-src 'none'; base-uri 'none'; object-src 'none'; form-action 'none'";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BindingsConfigSchema, McpConfigSchema, init_schema } from "../../../../config/schema.js";
|
|
2
1
|
import { CredentialResolver, init_credentials } from "../../../../auth/credentials.js";
|
|
2
|
+
import { BindingsConfigSchema, McpConfigSchema, init_schema } from "../../../../config/schema.js";
|
|
3
3
|
import { canonicalizeConfiguredMcpServer } from "../../../../config/mcp-config-normalize.js";
|
|
4
4
|
import { mergeCronConfigPatch, mergeGatewaySkillsMarketplacePatch, mergeGoalsConfigPatch, mergeSessionConfigPatch, mergeUpdateConfigPatch } from "../../../../config/web-patch.js";
|
|
5
5
|
import { assertGatewayAuthConfigured, resolveGatewayAuth } from "../../../auth.js";
|
|
@@ -5,8 +5,8 @@ import { getWorkspacePath } from "../../../config/workspace-path-helpers.js";
|
|
|
5
5
|
import { parseDreamingLastRunFile } from "../../../agent/memory/dreaming/last-run.js";
|
|
6
6
|
import { readDreamingEvents } from "../../../agent/memory/dreaming/events.js";
|
|
7
7
|
import { previewDreamingDeepPromotion } from "../../../agent/memory/dreaming/preview.js";
|
|
8
|
-
import path from "node:path";
|
|
9
8
|
import fs from "node:fs/promises";
|
|
9
|
+
import path from "node:path";
|
|
10
10
|
//#region src/gateway/hono/routes/dreaming.ts
|
|
11
11
|
function isRecord(v) {
|
|
12
12
|
return v !== null && typeof v === "object" && !Array.isArray(v);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createGatewayRouteLogger } from "../lib/route-logger.js";
|
|
2
|
-
import * as os$1 from "node:os";
|
|
3
|
-
import * as path$1 from "node:path";
|
|
4
2
|
import { readdir, realpath, stat } from "node:fs/promises";
|
|
3
|
+
import * as path$1 from "node:path";
|
|
4
|
+
import * as os$1 from "node:os";
|
|
5
5
|
//#region src/gateway/hono/routes/host-fs.ts
|
|
6
6
|
const log = createGatewayRouteLogger("HostFs");
|
|
7
7
|
function jsonError(status, message) {
|