@xopcai/xopc 0.0.239 → 0.0.241
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-DLfkwJzZ.js → activity-store-CLnbVm9G.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-C1rtpjd7.js → agent-avatar-dicebear-DuBewmbW.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DbdgX6AA.js +1 -0
- package/dist/gateway/static/root/assets/agents-BX3uRVm4.js +1 -0
- package/dist/gateway/static/root/assets/{api-IUm57Zse.js → api-DjBZe303.js} +1 -1
- package/dist/gateway/static/root/assets/app-chrome-BeB4KgOf.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CRDnRN4G.js → app-management-settings-panel-D8evZyFQ.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BCYZIKqQ.js → appearance-settings-B-iul0RG.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-CoZd_cZu.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-Bha1jUhj.js → archive-plugin-BOx0EJZs.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-Bgfh7Ag2.js → attachment-load-Cfk1lwBo.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BdH131M0.js → automations-page-BTSGvaeS.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-C8RRKT-a.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BwXg9na-.js → binary-plugins-ChZyZK45.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-BngtUSNv.js → block-editor-DCH9b2Ht.js} +46 -46
- package/dist/gateway/static/root/assets/browser-settings-page-D1GPwIfx.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-CHHw7Ula.js → browser-workflow-inputs-jvfcgFG-.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-Ael9sxrp.js → browser-workflows-page-DrHW7XNi.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CrXB1Q-l.js +7 -0
- package/dist/gateway/static/root/assets/channels-settings-DWMSYaNZ.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-CwUSKmeY.js → channels-status-swr-CC9MFway.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-DI0lYVKk.js → chat-terminal-dock-DeeZrVbV.js} +2 -2
- package/dist/gateway/static/root/assets/connectors-page-DXTl1fNB.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-CLuvPZ3b.js → cron-expression-CiqQOeQ3.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-D4QS8Zzn.js → date-picker-CGAMGPfU.js} +1 -1
- package/dist/gateway/static/root/assets/dependency-picker-CxWeUTsc.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-C6KqTQas.js → desktop-pet-C3QmYO75.js} +1 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-CAADkWYy.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-DpeeYAjX.js → extension-debug-page-FQXjDJ8P.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Cescx_be.js → extension-page-BJE1D5Ji.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-C_ubW61U.js → extension-settings-page-5Ik2tNry.js} +1 -1
- package/dist/gateway/static/root/assets/folder-open-CyzJ19I9.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-api-BM79X1jC.js → gateway-config-api-cTj71t2a.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-DfMY-MLf.js → gateway-config-swr-Bxe_R-JH.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-GV5KAj-l.js → gateway-settings-KXBUjNcx.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-S6aB0hVI.js → gateway-startup-retry-DJG-I0wW.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-CZ1KeXXU.js → heartbeat-settings-C8cVzIcs.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-NdWtBda5.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-DOX5uq-R.js → image-generation-api-Dc_ojQuj.js} +1 -1
- package/dist/gateway/static/root/assets/index-7i2P3312.js +70 -0
- package/dist/gateway/static/root/assets/index-DTo3IcbW.css +2 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-Tn7xSeVT.js → keyboard-shortcuts-settings-pOKl7blR.js} +1 -1
- package/dist/gateway/static/root/assets/link-2-D_ZKYUW7.js +1 -0
- package/dist/gateway/static/root/assets/local-app-workbench-page-C_j_od5f.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-Co5_qKEQ.js → local-apps-page-Bi6wwKgm.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-XDFAPNNu.js → locale-store-C5wr3_pc.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-D6PDZEVP.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-DE0o5c7Y.js → management-settings-DGlVizWi.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-CADkGbQi.js → markdown-split-CXP5zBx_.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-v-O3cOpk.js → markdown-view-D6LxlDxr.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-mHodPaFz.js → media-plugins-BsENGLr2.js} +1 -1
- package/dist/gateway/static/root/assets/message-square-plus-XP0tGdlV.js +1 -0
- package/dist/gateway/static/root/assets/messages-_tYhRAHD.js +3 -0
- package/dist/gateway/static/root/assets/minimize-2-DtOGrlpo.js +1 -0
- package/dist/gateway/static/root/assets/{mobile-pairing-wizard-43FyMswX.js → mobile-pairing-wizard-DcEz7qcX.js} +1 -1
- package/dist/gateway/static/root/assets/models-hub-cache-Y7GUjxHx.js +1 -0
- package/dist/gateway/static/root/assets/{notes-page-BMUyJStB.js → notes-page-D2EqpDyo.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-Bu0a83Oj.js +4 -0
- package/dist/gateway/static/root/assets/{oauth-api-B_pcOUfT.js → oauth-api-C5NVcsKE.js} +1 -1
- package/dist/gateway/static/root/assets/pencil-DmIY3Oa-.js +1 -0
- package/dist/gateway/static/root/assets/popover-select-DrILF6mR.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-B8cjLdm4.js → product-open-page-DMhf1rdz.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-DDHi0Y4Q.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-CVMFKpmu.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-DeVvBsl4.js → registry-api-FXdFaoWM.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-B74aErBY.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-ClCEmwPY.js → runtime-tools-settings-panel-Bv-akndY.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-0vcUqeqa.js → schema-form-BUzdHWx6.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-D2wmGNZE.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-CYCCUMEt.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-BkdLf_sS.js → settings-form-section-DjWzRk4z.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-QBTaBpBn.js → settings-page-C0OBLqpu.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-bQcSMkVr.js → setup-status-panel-NpLQkFCh.js} +1 -1
- package/dist/gateway/static/root/assets/share-preview-page-BtbPYaYC.js +2 -0
- package/dist/gateway/static/root/assets/shares-settings-rf8f1OGq.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-BkvclZ_o.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-BNcnmaTg.js → skills-page-CYk8pN97.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-BWWcFShl.js → skills-page.utils-DGjnz-NG.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-BsH7b3B4.js → system-settings-panel-DmCRSvtd.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-6a2RdDl2.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-5-XHH7F0.js → theme-store-DUko1ZnE.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-D5-Hggt3.js → tunnel-api-Chfiba_x.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-Dp1ycDa8.js → use-autosave-W_P8Kiv4.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-SeOHP6XO.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-DhrQXH3c.js → voice-api-key-field-BZD0j1jc.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-Bk_bVeGX.js → voice-config-api-BO6A8V3Z.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-B7zKAPrb.js → work-discovery-overlay-BfwEoOGL.js} +1 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-X7Z5_lRX.js +3 -0
- package/dist/gateway/static/root/assets/workflows-page-BklMzkg8.js +5 -0
- package/dist/gateway/static/root/index.html +19 -14
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +4 -4
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -1
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/ipc/inbox.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
- package/dist/src/agent/service.js +2 -2
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +3 -3
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/config/index.js +4 -4
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/extensions/update.js +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/heartbeat/service.js +1 -1
- package/dist/src/gateway/hono/app.js +2 -2
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/execution-environments.js +22 -0
- package/dist/src/gateway/hono/routes/media.js +5 -14
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/sessions.js +4 -0
- package/dist/src/gateway/hono/routes/shares.js +39 -8
- package/dist/src/gateway/hono/routes/voice.js +1 -1
- package/dist/src/gateway/media-access.d.ts +6 -0
- package/dist/src/gateway/media-access.js +19 -0
- package/dist/src/gateway/security/csp.d.ts +2 -0
- package/dist/src/gateway/security/csp.js +17 -1
- package/dist/src/gateway/service/config-coordinator.js +2 -2
- package/dist/src/gateway/service.js +3 -3
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/infra/update-restart.js +1 -1
- package/dist/src/infra/update-runner.js +1 -1
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/share/hosted-session-share.js +1 -1
- package/dist/src/share/share-store.js +3 -2
- package/dist/src/share/share-types.d.ts +2 -0
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-oW6wFuP9.js +0 -1
- package/dist/gateway/static/root/assets/agents-V-nDPOk2.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-dcvQDCvy.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-BtwzQZAR.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-kfNOKQ2x.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DOymgkUM.js +0 -7
- package/dist/gateway/static/root/assets/channels-settings-YscUvFub.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-BtzCRQGz.js +0 -2
- package/dist/gateway/static/root/assets/dependency-picker-DZn-RhEm.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-Bov3XuPO.js +0 -1
- package/dist/gateway/static/root/assets/home-page-YdVal_8I.js +0 -1
- package/dist/gateway/static/root/assets/index-7GLgmvAm.css +0 -2
- package/dist/gateway/static/root/assets/index-DKP23eMn.js +0 -70
- package/dist/gateway/static/root/assets/local-app-workbench-page-DCt7cbvK.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-ChfSQQSV.js +0 -2
- package/dist/gateway/static/root/assets/messages-B1HDp_j8.js +0 -3
- package/dist/gateway/static/root/assets/models-hub-cache-Bngs8o1m.js +0 -1
- package/dist/gateway/static/root/assets/notes-api-BMhFpRmW.js +0 -1
- package/dist/gateway/static/root/assets/notes-workbench-DjHIQneE.js +0 -4
- package/dist/gateway/static/root/assets/popover-select-DBrVS3tZ.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-CXD2pVgQ.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-cqKqkTwG.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-UEinEd7d.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-Cc6ve-qc.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-_J5FSEYX.js +0 -1
- package/dist/gateway/static/root/assets/share-preview-page-D_OuXnah.js +0 -2
- package/dist/gateway/static/root/assets/shares-settings-DJfcpok3.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-Bbqp5HaH.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-CcAhyw2Z.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-Dd_oMNie.js +0 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-Cek9K48F.js +0 -3
- package/dist/gateway/static/root/assets/workflows-page-T2q2Mx6H.js +0 -5
|
@@ -5,16 +5,16 @@ import { getSessionMetadata } from "../storage/sqlite/session-repository.js";
|
|
|
5
5
|
import { getSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
6
6
|
import "../storage/sqlite/index.js";
|
|
7
7
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
8
|
-
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
9
8
|
import { expandWorkspacePathString, init_workspace_path } from "../config/workspace-path.js";
|
|
10
9
|
import { init_agent_scope, resolveAgentProfileDir } from "./agent-scope.js";
|
|
11
|
-
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
12
|
-
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
13
10
|
import { init_paths, resolveBundledSkillsDir } from "../config/paths.js";
|
|
14
|
-
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../auth/sync-provider-auth.js";
|
|
15
11
|
import { CredentialResolver, init_credentials } from "../auth/credentials.js";
|
|
12
|
+
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
13
|
+
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../auth/sync-provider-auth.js";
|
|
16
14
|
import { getApiKeySync, getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
17
15
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
16
|
+
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
17
|
+
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
18
18
|
import { extractTextContent } from "./context/workspace.js";
|
|
19
19
|
import { buildExecutionScopeContextForPrompt } from "./context/execution-scope.js";
|
|
20
20
|
import { clearBootstrapSnapshot } from "./bootstrap/bootstrap-cache.js";
|
|
@@ -4,10 +4,10 @@ import { finishContextExtractionRun } from "../../storage/sqlite/context-extract
|
|
|
4
4
|
import { getTurnPersonalization } from "../../storage/sqlite/user-context-repository.js";
|
|
5
5
|
import { loadCompactionSourceSnapshot } from "../../storage/sqlite/transcript-repository.js";
|
|
6
6
|
import "../../storage/sqlite/index.js";
|
|
7
|
-
import { extractProfileAgentId } from "../../config/agent-profile.js";
|
|
8
7
|
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../../auth/sync-provider-auth.js";
|
|
9
8
|
import { getApiKeySync, init_providers, resolveModel } from "../../providers/index.js";
|
|
10
9
|
import { createExtensionAwareStreamFn } from "../../providers/extension-stream-bridge.js";
|
|
10
|
+
import { extractProfileAgentId } from "../../config/agent-profile.js";
|
|
11
11
|
import { extractTextContent } from "../context/workspace.js";
|
|
12
12
|
import { readAgentMessageContent } from "../memory/agent-message-access.js";
|
|
13
13
|
import { resolveAgentTurnTimeoutMs, runAgentTurnWithTimeout } from "../orchestration/run-agent-turn-with-timeout.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { init_paths, resolveModelsJsonPath } from "../../config/paths.js";
|
|
2
|
-
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../../auth/sync-provider-auth.js";
|
|
3
2
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
3
|
+
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../../auth/sync-provider-auth.js";
|
|
4
4
|
import { XopcModelCredentialStore, init_model_credential_store } from "../../auth/model-credential-store.js";
|
|
5
5
|
import { init_register_bundled_oauth_flows, registerBundledOAuthFlows } from "../../providers/register-bundled-oauth-flows.js";
|
|
6
6
|
import { init_register_runtime_providers, registerRuntimeProviders } from "../../providers/register-runtime-providers.js";
|
|
@@ -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 { parseTurnOutcome } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
4
|
-
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
5
4
|
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
5
|
+
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
6
6
|
import { resolveAgentTurnTimeoutMs } from "../orchestration/run-agent-turn-with-timeout.js";
|
|
7
7
|
import { resolvePromptCachePolicy } from "../../providers/prompt-cache-plan.js";
|
|
8
8
|
import { evaluateContextBudget } from "../memory/context-budget.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "../../config/schema.js";
|
|
2
2
|
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
3
|
-
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
4
3
|
import { getDefaultModelSync, getModelsByProvider, init_providers, isProviderConfiguredSync, resolveModel } from "../../providers/index.js";
|
|
4
|
+
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
5
5
|
import { resolveAgentModelFallbackValues, resolveAgentModelPrimaryValue } from "../../config/model-input.js";
|
|
6
6
|
import { buildCapabilityPlansForConfig } from "../../capabilities/readiness/from-config.js";
|
|
7
7
|
import "../../capabilities/readiness/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { init_paths, resolveAgentDir } from "../../config/paths.js";
|
|
4
3
|
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
4
|
+
import { init_paths, resolveAgentDir } from "../../config/paths.js";
|
|
5
5
|
import { join } from "path";
|
|
6
6
|
import { existsSync, watch } from "fs";
|
|
7
7
|
import { mkdir, readFile, readdir, rename } from "fs/promises";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveMcpOAuthPath } from "../../../config/paths.js";
|
|
2
1
|
import { init_write_file_atomic, writeTextAtomic } from "../../../infra/write-file-atomic.js";
|
|
2
|
+
import { init_paths, resolveMcpOAuthPath } from "../../../config/paths.js";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { readFile, rm } from "node:fs/promises";
|
|
5
5
|
//#region src/agent/mcp/oauth/mcp-oauth-store.ts
|
|
@@ -3,10 +3,10 @@ import { init_logger } from "../utils/logger.js";
|
|
|
3
3
|
import { getUserProfile } from "../storage/sqlite/user-context-repository.js";
|
|
4
4
|
import { parseNoteAttachmentTarget } from "../notes/attachment-ref.js";
|
|
5
5
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
6
|
-
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
7
6
|
import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
8
|
-
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
9
7
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
8
|
+
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
9
|
+
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
10
10
|
import { extractTextContent } from "./context/workspace.js";
|
|
11
11
|
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
12
12
|
import { getProjectForSession } from "../projects/workspace.js";
|
|
@@ -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_workspace_defaults, resolveDefaultAgentWorkspaceDir } from "../../config/workspace-defaults.js";
|
|
4
|
-
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
5
4
|
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
5
|
+
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
6
6
|
import { getExecutionEnvironmentForSession } from "../../execution-environments/subject.js";
|
|
7
7
|
import { effectiveWorkspacePathForSession, projectWorkspacePath } from "../../session/session-workspace.js";
|
|
8
8
|
import { getProjectForSession } from "../../projects/workspace.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveSkillsLockPath } from "../../config/paths.js";
|
|
2
1
|
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
|
+
import { init_paths, resolveSkillsLockPath } from "../../config/paths.js";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
//#region src/agent/skills/hub-lock.ts
|
|
5
5
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
+
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
3
4
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
4
|
-
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
5
5
|
import { getApiKey, init_providers, resolveModel } from "../../providers/index.js";
|
|
6
|
+
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
7
|
+
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
6
8
|
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
7
9
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
8
10
|
import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
|
9
|
-
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
10
11
|
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
11
|
-
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
12
12
|
//#region src/agent/tasks/task-judge-service.ts
|
|
13
13
|
init_schema();
|
|
14
14
|
init_providers();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
3
4
|
import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
4
5
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
5
6
|
import { isLocalModelBaseUrl, resolveModelCallApiKey, resolveModelCallOptions } from "../providers/model-call.js";
|
|
6
|
-
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
7
7
|
//#region src/ai-assist/text-assist.ts
|
|
8
8
|
init_providers();
|
|
9
9
|
init_logger();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
|
-
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
5
4
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
6
|
-
import {
|
|
5
|
+
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
7
6
|
import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.js";
|
|
7
|
+
import { getOAuthProviderDefinition, init_registry } from "./oauth/registry.js";
|
|
8
8
|
import { init_oauth_provider_lock, withOAuthProviderLock } from "./oauth-provider-lock.js";
|
|
9
9
|
import { dirname, join } from "path";
|
|
10
10
|
import { mkdir, readFile, readdir, rm } from "fs/promises";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
2
1
|
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
|
+
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { chmodSync, existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
5
5
|
//#region src/auth/profiles/store.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
3
2
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
|
|
4
|
-
import { init_loader, loadConfig } from "../config/loader.js";
|
|
5
3
|
import { init_registry, isOAuthOnlyProvider } from "./oauth/registry.js";
|
|
4
|
+
import { init_loader, loadConfig } from "../config/loader.js";
|
|
5
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
7
|
//#region src/auth/sync-provider-auth.ts
|
|
8
8
|
/**
|
|
@@ -2,8 +2,8 @@ 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 { assertCacheDir, init_cache_dir_policy } from "../cache-dir-policy.js";
|
|
5
|
-
import { init_paths, resolveBinDir } from "../../config/paths.js";
|
|
6
5
|
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
6
|
+
import { init_paths, resolveBinDir } from "../../config/paths.js";
|
|
7
7
|
import { shouldRunExtensionBridgeServer } from "../backend-from-config.js";
|
|
8
8
|
import { resolvePackageRoot } from "../../infra/update-check.js";
|
|
9
9
|
import { dirname, join } from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getAgentDefaultModelRef, init_schema, parseModelRef } from "../../../../config/schema.js";
|
|
2
|
-
import { init_loader, loadConfig } from "../../../../config/loader.js";
|
|
3
2
|
import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "../../../../providers/env-keys.js";
|
|
3
|
+
import { init_loader, loadConfig } from "../../../../config/loader.js";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
//#region src/cli/commands/doctor/checks/provider-auth.ts
|
|
6
6
|
init_loader();
|
|
@@ -3,9 +3,9 @@ import { init_loader, loadConfig } from "../../config/loader.js";
|
|
|
3
3
|
import { downloadExtensionStoreZipBuffer, resolveExtensionZipDownloadUrl, resolveExtensionsStoreBaseUrl, verifyStoreArtifactSha256 } from "../../agent/skills/marketplace/adapters/store/store-api-client.js";
|
|
4
4
|
import { getContextWithOpts } from "../context.js";
|
|
5
5
|
import { getExtensionLockfileManager } from "../../extensions/lockfile.js";
|
|
6
|
-
import { fetchRegistry, findExtension, getExtensionMarketplaceStoreBaseUrl, listExtensions, searchExtensions } from "../../extensions/marketplace.js";
|
|
7
6
|
import { installFromLocal, installFromNpm, peekExtensionManifestFromStoreZip } from "../../extensions/install.js";
|
|
8
7
|
import { commitStagedExtensionInstall, finalizeStagedExtensionInstall, rollbackStagedExtensionInstall, stageExtensionStoreZip } from "../../extensions/install-transaction.js";
|
|
8
|
+
import { fetchRegistry, findExtension, getExtensionMarketplaceStoreBaseUrl, listExtensions, searchExtensions } from "../../extensions/marketplace.js";
|
|
9
9
|
import { colors } from "../utils/colors.js";
|
|
10
10
|
import { validateExtensionPackageDirectory } from "./extension-pack.js";
|
|
11
11
|
import { join, resolve } from "node:path";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_paths, resolveConfigPath } from "../../../config/paths.js";
|
|
2
2
|
import { loadConfig } from "../../../config/loader.js";
|
|
3
3
|
import "../../../config/index.js";
|
|
4
|
-
import { resolveGatewayService } from "../../../daemon/service.js";
|
|
5
4
|
import { isRestartEnabled } from "../../../config/commands.flags.js";
|
|
5
|
+
import { resolveGatewayService } from "../../../daemon/service.js";
|
|
6
6
|
import { authorizeGatewaySigusr1Restart, writeGatewayRestartIntentSync } from "../../../infra/restart.js";
|
|
7
7
|
import { findVerifiedGatewayListenerPidsOnPortSync, formatGatewayPidList, signalVerifiedGatewayPidSync } from "../../../infra/gateway-processes.js";
|
|
8
8
|
import { runServiceRestart, runServiceStop } from "./lifecycle-core.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
2
|
-
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
3
2
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
3
|
+
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
4
4
|
import { getAllModels, getAvailableModels, getConfiguredProviders, getProviderAuthState, getProviderDisplayName, init_providers, isProviderConfigured, providerSupportsApiKey, providerSupportsOAuth, resolveModel } from "../../providers/index.js";
|
|
5
5
|
import { formatExamples, register } from "../registry.js";
|
|
6
6
|
import { getContextWithOpts } from "../context.js";
|
package/dist/src/config/index.js
CHANGED
|
@@ -2,15 +2,15 @@ import { ENV_VARS, XOPC_DB_FILENAME, resolveHomeDir, resolveStateDir, resolveXop
|
|
|
2
2
|
import { TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema } from "../../extensions/telegram/src/config-schema.js";
|
|
3
3
|
import { WeixinAccountConfigSchema, WeixinConfigSchema } from "../../extensions/weixin/src/config-schema.js";
|
|
4
4
|
import { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpOAuthConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, RuntimeToolsConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "./schema.js";
|
|
5
|
-
import {
|
|
5
|
+
import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
|
|
6
6
|
import { expandWorkspacePathString, init_workspace_path, normalizeWorkspaceDir, resolveWorkspaceRoot } from "./workspace-path.js";
|
|
7
7
|
import { resolveDefaultAgentWorkspaceDir } from "./workspace-defaults.js";
|
|
8
8
|
import { resolveAgentDir as resolveAgentDir$1, resolveAgentHomeDir as resolveAgentHomeDir$1, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
9
|
-
import { extractProfileAgentId, resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
|
|
10
9
|
import { FILENAMES, WORKSPACE_FILES, existsSync, hasBundledExtensionManifest, init_paths, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentHomeDir, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveCredentialsDir, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveMcpOAuthPath, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath } from "./paths.js";
|
|
11
|
-
import { init_loader, loadConfig, saveConfig } from "./loader.js";
|
|
12
|
-
import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
|
|
13
10
|
import { CustomModelSchema, ImageGenerationCapabilitiesSchema, ImageGenerationModelSchema, ImageGenerationProviderSchema, ModelOverrideSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProviderConfigSchema, VercelGatewayRoutingSchema, getDefaultModelValues, init_models_json, loadModelsJson, modelsJsonExists, saveModelsJson, validateModelsConfig } from "./models-json.js";
|
|
11
|
+
import { init_loader, loadConfig, saveConfig } from "./loader.js";
|
|
12
|
+
import { applyConfigOverrides, getConfigOverrides, resetConfigOverrides, setConfigOverride, unsetConfigOverride } from "./runtime-overrides.js";
|
|
13
|
+
import { extractProfileAgentId, resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
|
|
14
14
|
import { canonicalizeConfiguredMcpServer, isKnownCliMcpTypeAlias, normalizeConfiguredMcpServers, resolveXopcMcpTransportAlias } from "./mcp-config-normalize.js";
|
|
15
15
|
import { formatThinkingLevels, listThinkingLevels, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, thinkLevelToNumber } from "../agent/transcript/thinking-types.js";
|
|
16
16
|
import { getWorkspacePath } from "./workspace-path-helpers.js";
|
|
@@ -2,8 +2,8 @@ import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
4
|
import { ConfigSchema, init_schema } from "./schema.js";
|
|
5
|
-
import { init_paths, resolveConfigPath } from "./paths.js";
|
|
6
5
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
6
|
+
import { init_paths, resolveConfigPath } from "./paths.js";
|
|
7
7
|
import { assertChannelPluginConfigs, init_validate_channel_configs } from "./validate-channel-configs.js";
|
|
8
8
|
import { dirname } from "path";
|
|
9
9
|
import { existsSync, mkdirSync, promises, readFileSync } from "fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
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";
|
|
3
|
+
import { init_paths, resolveModelsJsonPath } from "./paths.js";
|
|
4
4
|
import { existsSync, readFileSync } from "fs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/config/models-json.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { init_paths, resolveExtensionsDir, resolveExtensionsLockPath } from "../config/paths.js";
|
|
4
3
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
4
|
+
import { init_paths, resolveExtensionsDir, resolveExtensionsLockPath } from "../config/paths.js";
|
|
5
5
|
import { dirname, join } from "path";
|
|
6
6
|
import { existsSync } from "fs";
|
|
7
7
|
import { mkdir, readFile } from "fs/promises";
|
|
@@ -4,8 +4,8 @@ import { init_paths, resolveBundledExtensionsDir, resolveExtensionsDir } from ".
|
|
|
4
4
|
import { init_loader, loadConfig } from "../config/loader.js";
|
|
5
5
|
import { downloadExtensionStoreZipBuffer, resolveExtensionZipDownloadUrl, resolveExtensionsStoreBaseUrl, verifyStoreArtifactSha256 } from "../agent/skills/marketplace/adapters/store/store-api-client.js";
|
|
6
6
|
import { getExtensionLockfileManager } from "./lockfile.js";
|
|
7
|
-
import { findExtension } from "./marketplace.js";
|
|
8
7
|
import { installExtensionFromStoreZip, installFromNpm } from "./install.js";
|
|
8
|
+
import { findExtension } from "./marketplace.js";
|
|
9
9
|
import { join } from "node:path";
|
|
10
10
|
import { existsSync, readFileSync, readdirSync, rmSync } from "node:fs";
|
|
11
11
|
import semver from "semver";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { 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, REQUIRED_AGENT_PROFILE_MARKDOWN_FILE_SET } from "../agent/context/workspace.js";
|
|
5
5
|
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
6
6
|
import { seedAgentProfileMarkdownFiles } from "../agent/context/workspace-seed.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
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
7
|
import { basename, isAbsolute, resolve } from "node:path";
|
|
@@ -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 { shouldSilence, stripHeartbeatToken } from "../../heartbeat/tokens.js";
|
|
4
|
-
import { appendCronEventLines } from "../../heartbeat/event-prompt.js";
|
|
5
4
|
import { isWithinActiveHours } from "../../heartbeat/active-hours.js";
|
|
6
5
|
import { isHeartbeatContentEmpty } from "../../heartbeat/content-check.js";
|
|
6
|
+
import { appendCronEventLines } from "../../heartbeat/event-prompt.js";
|
|
7
7
|
import { createHeartbeatWake } from "../../heartbeat/wake.js";
|
|
8
8
|
import { resolveHeartbeatMdPath } from "../workspace-heartbeat-path.js";
|
|
9
9
|
import { readFile } from "fs/promises";
|
|
@@ -113,10 +113,10 @@ function createHonoApp(config) {
|
|
|
113
113
|
if (isExtensionGatewayUiAssetPath(c.req.path) || c.req.path === "/api/preview/html" && (c.req.method === "GET" || c.req.method === "HEAD")) return;
|
|
114
114
|
c.header("X-Frame-Options", "DENY");
|
|
115
115
|
c.header("X-Content-Type-Options", "nosniff");
|
|
116
|
-
c.header("Referrer-Policy", "strict-origin-when-cross-origin");
|
|
116
|
+
if (!c.res.headers.has("Referrer-Policy")) c.header("Referrer-Policy", "strict-origin-when-cross-origin");
|
|
117
117
|
c.header("X-XSS-Protection", "1; mode=block");
|
|
118
118
|
c.header("Permissions-Policy", "camera=(), microphone=(self), geolocation=()");
|
|
119
|
-
c.header("Content-Security-Policy", gatewayConsoleCsp);
|
|
119
|
+
if (!c.res.headers.has("Content-Security-Policy")) c.header("Content-Security-Policy", gatewayConsoleCsp);
|
|
120
120
|
}));
|
|
121
121
|
const allowHostHeaderOriginFallback = service.currentConfig.gateway?.dangerouslyAllowHostHeaderOriginFallback === true;
|
|
122
122
|
app.use("/api/*", createMiddleware(async (c, next) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ContextCompactionPolicySchema, UserContextDreamingSchema, UserContextPrivacySchema, init_config } from "../../../user-context/config.js";
|
|
2
2
|
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveDefaultAgentId } from "../../../agent/agent-scope.js";
|
|
3
3
|
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
4
|
-
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, getChannelSetupStatus, init_channel_catalog_service } from "../../../channels/catalog/channel-catalog-service.js";
|
|
5
4
|
import { init_models_json, loadModelsJson } from "../../../config/models-json.js";
|
|
6
5
|
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
6
|
+
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, getChannelSetupStatus, init_channel_catalog_service } from "../../../channels/catalog/channel-catalog-service.js";
|
|
7
7
|
import { getProviderRegistry, init_plugin_registry } from "../../../providers/plugin-registry.js";
|
|
8
8
|
import { getAllProviders, init_providers, isProviderConfigured } from "../../../providers/index.js";
|
|
9
9
|
import { normalizeConfiguredMcpServers } from "../../../config/mcp-config-normalize.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getAllModels, getAvailableModels, init_providers } from "../../../providers/index.js";
|
|
2
2
|
import { ActivationPlanner } from "../../../extensions/activation-planner.js";
|
|
3
3
|
import { mergeActivationContext } from "../../../extensions/activation-context.js";
|
|
4
|
-
import { buildWhenContextSnapshot } from "../../../extensions/when-context.js";
|
|
5
4
|
import { fetchRegistry, listExtensions, searchExtensions } from "../../../extensions/marketplace.js";
|
|
5
|
+
import { buildWhenContextSnapshot } from "../../../extensions/when-context.js";
|
|
6
6
|
import { createOAuthAsyncHandler } from "../oauth-async.js";
|
|
7
7
|
import { createOAuthHandler } from "../oauth.js";
|
|
8
8
|
import { extensionAssetMimeType } from "../lib/extension-assets.js";
|
|
@@ -15,6 +15,7 @@ import { listUnderstandingSourceGrants, revokeUnderstandingSourceGrant } from ".
|
|
|
15
15
|
import { recordConnectorHealthUsage } from "../../../connectors/usage.js";
|
|
16
16
|
import { getConnectorInstance, getInstalledConnectorDefinition, listConnectorInstances } from "../../../connectors/instances.js";
|
|
17
17
|
import { installConnector, installConnectorDefinition, uninstallConnector, updateConnectorConfig } from "../../../connectors/install.js";
|
|
18
|
+
import { ConfigPersistenceError, persistConfigMutation } from "../../../config/config-mutation.js";
|
|
18
19
|
import { getMcpOAuthManager } from "../../../agent/mcp/oauth/mcp-oauth-manager.js";
|
|
19
20
|
import { startConnectorAuthorization } from "../../../connectors/auth-provider-registry.js";
|
|
20
21
|
import { composioLogoResponse } from "../../../connectors/composio-logo.js";
|
|
@@ -24,7 +25,6 @@ import { ingestLocalFolderSource } from "../../../connectors/connected-source-in
|
|
|
24
25
|
import { previewConnectorDefinition, testConnectorInstance } from "../../../connectors/health.js";
|
|
25
26
|
import { setConnectorEnabled } from "../../../connectors/lifecycle.js";
|
|
26
27
|
import { projectComposioConnectionStatus } from "../../../connectors/runtime-status.js";
|
|
27
|
-
import { ConfigPersistenceError, persistConfigMutation } from "../../../config/config-mutation.js";
|
|
28
28
|
import { applySourceRevocationChoices, sourceRevocationImpact } from "./understanding-sources.js";
|
|
29
29
|
//#region src/gateway/hono/routes/connectors.ts
|
|
30
30
|
init_agent_scope();
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ExecutionEnvironmentStore } from "../../../execution-environments/store.js";
|
|
2
|
+
import { inspectGitRepository } from "../../../execution-environments/git.js";
|
|
2
3
|
import { LocalWorktreeManager } from "../../../execution-environments/local-worktree-manager.js";
|
|
3
4
|
import { SessionEnvironmentService } from "../../../execution-environments/session-environment-service.js";
|
|
5
|
+
import { stat } from "node:fs/promises";
|
|
4
6
|
//#region src/gateway/hono/routes/execution-environments.ts
|
|
5
7
|
function executionMode(value) {
|
|
6
8
|
return value === "local_checkout" || value === "managed_worktree" ? value : void 0;
|
|
@@ -18,6 +20,26 @@ function registerExecutionEnvironmentRoutes(authenticated, deps) {
|
|
|
18
20
|
store,
|
|
19
21
|
worktrees
|
|
20
22
|
});
|
|
23
|
+
authenticated.get("/api/projects/:projectId/environment-options", async (c) => {
|
|
24
|
+
c.header("Cache-Control", "no-store");
|
|
25
|
+
const project = deps.service.projects.get(c.req.param("projectId"));
|
|
26
|
+
if (!project) return c.json({
|
|
27
|
+
ok: false,
|
|
28
|
+
error: "Project not found"
|
|
29
|
+
}, 404);
|
|
30
|
+
const root = project.workspaceRoot?.trim();
|
|
31
|
+
const options = { localAvailable: Boolean(root && await stat(root).then((entry) => entry.isDirectory()).catch(() => false)) };
|
|
32
|
+
if (!options.localAvailable) options.worktreeUnavailableReason = "workspace_unavailable";
|
|
33
|
+
else try {
|
|
34
|
+
if ((await inspectGitRepository(root)).dirty) options.worktreeUnavailableReason = "uncommitted_changes";
|
|
35
|
+
} catch {
|
|
36
|
+
options.worktreeUnavailableReason = "git_commit_required";
|
|
37
|
+
}
|
|
38
|
+
return c.json({
|
|
39
|
+
ok: true,
|
|
40
|
+
options
|
|
41
|
+
});
|
|
42
|
+
});
|
|
21
43
|
authenticated.get("/api/projects/:projectId/environments", (c) => {
|
|
22
44
|
const projectId = c.req.param("projectId");
|
|
23
45
|
if (!deps.service.projects.get(projectId)) return c.json({
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { TaskRepository } from "../../../tasks/task-repository.js";
|
|
2
|
-
import { parseMediaUri } from "../../../media/uri.js";
|
|
3
1
|
import { mimeTypeFromMediaPath, saveMediaBuffer } from "../../../media/store.js";
|
|
4
2
|
import { readMediaReference } from "../../../media/media-reference.js";
|
|
5
|
-
import { TaskContextRepository } from "../../../tasks/task-context-repository.js";
|
|
6
|
-
import { pendingTranscriptReferencesMediaUri } from "../../../agent/inbound/attachment-pipeline.js";
|
|
7
3
|
import { MAX_WEBCHAT_ATTACHMENT_FILE_BYTES } from "../../chat-limits.js";
|
|
8
|
-
import { messagesReferenceMediaUri } from "../../../media/session-references.js";
|
|
9
4
|
import { createGatewayRouteLogger } from "../lib/route-logger.js";
|
|
5
|
+
import { resolveScopedMediaReference } from "../../media-access.js";
|
|
10
6
|
//#region src/gateway/hono/routes/media.ts
|
|
11
7
|
const log = createGatewayRouteLogger("Media");
|
|
12
8
|
function parseByteRange(header, size) {
|
|
@@ -30,7 +26,6 @@ function parseByteRange(header, size) {
|
|
|
30
26
|
};
|
|
31
27
|
}
|
|
32
28
|
function registerMediaRoutes(authenticated, deps) {
|
|
33
|
-
const tasks = new TaskRepository();
|
|
34
29
|
authenticated.post("/api/media", deps.strictRateLimitMiddleware, async (c) => {
|
|
35
30
|
const file = (await c.req.formData().catch(() => null))?.get("file");
|
|
36
31
|
if (!(file instanceof Blob)) return c.json({
|
|
@@ -75,14 +70,10 @@ function registerMediaRoutes(authenticated, deps) {
|
|
|
75
70
|
error: { message: "Missing media scope" }
|
|
76
71
|
}, 400);
|
|
77
72
|
try {
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
ok: false,
|
|
83
|
-
error: { message: "Not found" }
|
|
84
|
-
}, 404);
|
|
85
|
-
const { buffer, path } = await readMediaReference(parsed.uri);
|
|
73
|
+
const { buffer, path } = await readMediaReference((await resolveScopedMediaReference(deps.service, uriRaw.trim(), {
|
|
74
|
+
sessionKey,
|
|
75
|
+
taskId
|
|
76
|
+
})).uri);
|
|
86
77
|
const contentType = mimeTypeFromMediaPath(path);
|
|
87
78
|
const range = parseByteRange(c.req.header("Range"), buffer.byteLength);
|
|
88
79
|
const commonHeaders = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
2
1
|
import { init_resolve_config_value, testApiKeyResolution } from "../../../config/resolve-config-value.js";
|
|
2
|
+
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
3
3
|
import { init_models_json, loadModelsJson, saveModelsJson, validateModelsConfig } from "../../../config/models-json.js";
|
|
4
4
|
import { getModelCatalogStore, init_model_catalog_store } from "../../../providers/model-catalog-store.js";
|
|
5
5
|
import { getModelRegistry } from "../../../providers/model-registry.js";
|
|
@@ -157,6 +157,10 @@ function registerSessionsRoutes(authenticated, deps) {
|
|
|
157
157
|
ok: false,
|
|
158
158
|
error: "Invalid execution mode"
|
|
159
159
|
}, 400);
|
|
160
|
+
if (requestedExecutionMode && !project) return c.json({
|
|
161
|
+
ok: false,
|
|
162
|
+
error: "An execution mode requires a project"
|
|
163
|
+
}, 400);
|
|
160
164
|
const agentId = resolveProjectAgentId({
|
|
161
165
|
config: routingCfg,
|
|
162
166
|
projects: service.projects,
|
|
@@ -14,12 +14,15 @@ import { deleteThumbnail, placeholderSvg, readThumbnail, scheduleThumbnail, thum
|
|
|
14
14
|
import { extractToken } from "../../auth.js";
|
|
15
15
|
import { getGatewayFileSpaceService } from "../../file-space-service.js";
|
|
16
16
|
import { getClientIpFromHeaders } from "../../security/loopback.js";
|
|
17
|
+
import { SHARED_HTML_CSP } from "../../security/csp.js";
|
|
17
18
|
import { renderFolderLandingPage, renderShareExpiredPage, renderShareLandingPage, renderSnapshotShareLandingPage } from "../../../share/share-landing.js";
|
|
19
|
+
import { resolveScopedMediaReference } from "../../media-access.js";
|
|
18
20
|
import { SessionShareService, SessionShareSnapshotConflictError } from "../../../share/session-share-service.js";
|
|
19
21
|
import { HostedSessionShareBuilder, HostedSessionSharePublisher, HostedShareAuthorizationError, HostedShareBindingStore } from "../../../share/hosted-session-share.js";
|
|
20
22
|
import { NoteShareService } from "../../../share/note-share-service.js";
|
|
21
23
|
import { consumeSharePublicLimit } from "../../../share/share-rate-limit.js";
|
|
22
24
|
import { createZipStream, planDirectoryFiles } from "../../../share/share-zip.js";
|
|
25
|
+
import { basename, dirname } from "node:path";
|
|
23
26
|
import { createReadStream } from "node:fs";
|
|
24
27
|
import { createHash } from "node:crypto";
|
|
25
28
|
import { stat } from "node:fs/promises";
|
|
@@ -818,18 +821,43 @@ function registerShareRoutes(authenticated, deps) {
|
|
|
818
821
|
error: { message: "Invalid JSON" }
|
|
819
822
|
}, 400);
|
|
820
823
|
}
|
|
821
|
-
|
|
822
|
-
|
|
824
|
+
let path = typeof body.path === "string" ? body.path.trim() : "";
|
|
825
|
+
const fileId = typeof body.fileId === "string" ? body.fileId.trim() : "";
|
|
826
|
+
const uri = typeof body.uri === "string" ? body.uri.trim() : "";
|
|
827
|
+
if ([
|
|
828
|
+
path,
|
|
829
|
+
fileId,
|
|
830
|
+
uri
|
|
831
|
+
].filter(Boolean).length !== 1) return c.json({
|
|
823
832
|
ok: false,
|
|
824
|
-
error: { message: "
|
|
833
|
+
error: { message: "Provide exactly one of path, fileId or uri" }
|
|
825
834
|
}, 400);
|
|
826
835
|
const sessionKey = typeof body.sessionKey === "string" ? body.sessionKey.trim() : void 0;
|
|
827
836
|
const agentId = typeof body.agentId === "string" ? body.agentId.trim() : void 0;
|
|
828
|
-
const
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
837
|
+
const taskId = typeof body.taskId === "string" ? body.taskId.trim() : void 0;
|
|
838
|
+
const fileName = typeof body.fileName === "string" ? basename(body.fileName.trim().replace(/\\/g, "/")) : void 0;
|
|
839
|
+
let workspaceRoot;
|
|
840
|
+
try {
|
|
841
|
+
if (fileId) {
|
|
842
|
+
const target = await getGatewayFileSpaceService(service).resource(fileId);
|
|
843
|
+
workspaceRoot = target.space.root;
|
|
844
|
+
path = target.resource.relativePath || ".";
|
|
845
|
+
} else if (uri) {
|
|
846
|
+
const media = await resolveScopedMediaReference(service, uri, {
|
|
847
|
+
sessionKey,
|
|
848
|
+
taskId
|
|
849
|
+
});
|
|
850
|
+
workspaceRoot = dirname(media.path);
|
|
851
|
+
path = basename(media.path);
|
|
852
|
+
} else workspaceRoot = await resolveWorkspaceRootForShare(service, sessionKey, agentId);
|
|
853
|
+
if (!workspaceRoot) throw new Error("Workspace not configured");
|
|
854
|
+
} catch (err) {
|
|
855
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
856
|
+
return c.json({
|
|
857
|
+
ok: false,
|
|
858
|
+
error: { message }
|
|
859
|
+
}, err instanceof FileServiceError ? err.status : 400);
|
|
860
|
+
}
|
|
833
861
|
const ttlMs = typeof body.ttlMs === "number" ? body.ttlMs : void 0;
|
|
834
862
|
const maxViews = body.maxViews === null ? null : typeof body.maxViews === "number" ? body.maxViews : void 0;
|
|
835
863
|
const description = typeof body.description === "string" ? body.description.trim() || void 0 : void 0;
|
|
@@ -843,6 +871,7 @@ function registerShareRoutes(authenticated, deps) {
|
|
|
843
871
|
store.updateConfig(resolveShareConfig(service));
|
|
844
872
|
const record = await store.create({
|
|
845
873
|
path,
|
|
874
|
+
fileName,
|
|
846
875
|
ttlMs,
|
|
847
876
|
maxViews,
|
|
848
877
|
description,
|
|
@@ -1329,6 +1358,7 @@ async function handleDirectoryFile(c, store, service, record, relPath, clientIp,
|
|
|
1329
1358
|
status: 200,
|
|
1330
1359
|
headers: {
|
|
1331
1360
|
"Content-Type": shareResponseContentType(mime),
|
|
1361
|
+
...useInline && mime === "text/html" ? { "Content-Security-Policy": SHARED_HTML_CSP } : {},
|
|
1332
1362
|
"Content-Disposition": disposition,
|
|
1333
1363
|
"Content-Length": String(fileStat.size),
|
|
1334
1364
|
"Cache-Control": "private, no-store",
|
|
@@ -1494,6 +1524,7 @@ async function handleFileDownload(c, store, record, clientIp, inline = false) {
|
|
|
1494
1524
|
status: 200,
|
|
1495
1525
|
headers: {
|
|
1496
1526
|
"Content-Type": shareResponseContentType(record.mimeType),
|
|
1527
|
+
...inline && record.mimeType === "text/html" ? { "Content-Security-Policy": SHARED_HTML_CSP } : {},
|
|
1497
1528
|
"Content-Disposition": disposition,
|
|
1498
1529
|
"Content-Length": String(fileStat.size),
|
|
1499
1530
|
"Cache-Control": "private, no-store",
|
|
@@ -14,8 +14,8 @@ import "../../../voice/stt/index.js";
|
|
|
14
14
|
import { listSttProvidersForApi } from "../../../voice/stt/list-providers.js";
|
|
15
15
|
import "../../../voice/tts/index.js";
|
|
16
16
|
import { createGatewayRouteLogger } from "../lib/route-logger.js";
|
|
17
|
-
import { listLocalVoiceModelStatuses, removeLocalVoiceModel, startLocalVoiceModelInstall } from "../../../voice/local/model-manager.js";
|
|
18
17
|
import { listTtsProvidersForApi } from "../../../voice/tts/list-providers.js";
|
|
18
|
+
import { listLocalVoiceModelStatuses, removeLocalVoiceModel, startLocalVoiceModelInstall } from "../../../voice/local/model-manager.js";
|
|
19
19
|
//#region src/gateway/hono/routes/voice.ts
|
|
20
20
|
init_providers();
|
|
21
21
|
const log = createGatewayRouteLogger("Voice");
|