@xopcai/xopc 0.0.238 → 0.0.240
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/{agent-avatar-dicebear-BCZ6T3y8.js → agent-avatar-dicebear-DNqb8LGQ.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CDZBY8QF.js +1 -0
- package/dist/gateway/static/root/assets/agents-BpWZKFrQ.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-B_h6HVgw.js → app-management-settings-panel-4-eqCZG_.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-D07Ew40N.js → appearance-settings-Dus5TPxo.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-DPacUrzS.js +1 -0
- package/dist/gateway/static/root/assets/{attachment-load-C2Ac3q6g.js → attachment-load-CX2u191M.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-Bc4Is3z0.js → automations-page-BizspokZ.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-CudEcxwk.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-yMQJYHIQ.js → binary-plugins-CSn8R1EL.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-DrNzI_0p.js → block-editor-D5MN7UPI.js} +3 -3
- package/dist/gateway/static/root/assets/browser-settings-page-wKhgAIwg.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-CHHw7Ula.js → browser-workflow-inputs-CeG3fWhC.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-D_EOs50E.js → browser-workflows-page-oqmPd1KI.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-gKLN0aaW.js → capabilities-settings-panel-Dj_x6HTl.js} +5 -5
- package/dist/gateway/static/root/assets/channels-settings-BpsJRsjG.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-B7agEwma.js → chat-terminal-dock-C0m-ie_q.js} +2 -2
- package/dist/gateway/static/root/assets/connectors-page-B-Gdzfob.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-bjxQQFdv.js → cron-expression-DJOvtnKf.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-C7ujLHll.js → date-picker-B06ZCEsb.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-rl8E7nXp.js → dependency-picker-BU8dmVCo.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-D4GbYBcD.js → desktop-pet-INH03b4z.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-Bo34tFlD.js → desktop-pet-settings-CzAGt3M_.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-DuPa1bVQ.js → extension-debug-page-BcEHXLQ2.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CB9xF3qo.js → extension-page-CWefEHKN.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CovEdmGD.js → extension-settings-page-CjBTLU5X.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-CAaoukkR.js → gateway-config-api-4GYzRHAt.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-CesXGTe3.js → gateway-settings-C8MQeYbR.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-C_8vY0Eu.js +1 -0
- package/dist/gateway/static/root/assets/home-page-D1SM6UXd.js +1 -0
- package/dist/gateway/static/root/assets/index-BN4XPtJY.js +70 -0
- package/dist/gateway/static/root/assets/index-CCBexxKW.css +2 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CpZxPmd0.js → keyboard-shortcuts-settings-xvS2czSF.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-DAh4_rTj.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-5KTZwLbX.js → local-apps-page-BAYQxS0S.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-frYgoe2x.js → logs-page-COS-Yb-N.js} +2 -2
- package/dist/gateway/static/root/assets/{management-settings-9iZjSpHe.js → management-settings-DYmKy_2v.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-C4-0M8mu.js → markdown-split-Cr32dNv1.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CjMa9GMF.js → media-plugins-KPSjs3vW.js} +1 -1
- package/dist/gateway/static/root/assets/{mobile-pairing-wizard-DikJ7HCm.js → mobile-pairing-wizard-pWsC7jcc.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-CC45W2KR.js → notes-page-DBBnJrFf.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-CSAzL8Tf.js +4 -0
- package/dist/gateway/static/root/assets/popover-select-DrILF6mR.js +1 -0
- package/dist/gateway/static/root/assets/project-detail-page-DHIJpssV.js +1 -0
- package/dist/gateway/static/root/assets/{projects-page-DR7OvyAl.js → projects-page-BDoAwszu.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-DPi4SQVV.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-DLv-QsQo.js → runtime-tools-settings-panel-DFTHpNg6.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-DDW7aJWa.js → schema-form-CW7qifxi.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-VNrtwwV5.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-CUcTHMDp.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-5NTg906_.js → settings-form-section-OMPX3Svb.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-DgTYtrmh.js → settings-page-CDKXJ12S.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-Dnvfemeb.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-BX2Ev7-I.js → share-preview-page-BoSIu0WX.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-C87QeRxC.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-rY5ujr0j.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-Cmqu9f_n.js → skills-page-DAAlmTSh.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-KOxLvm84.js → skills-page.utils-CiMRNDFM.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-CS7cDwv2.js → system-settings-panel-Bq7niN-G.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-JtztFp2Y.js +1 -0
- package/dist/gateway/static/root/assets/tunnel-api-eBX1eb2v.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-DvATIVb_.js → use-autosave-CkwILwYg.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-CMH2GOGL.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-C3BgRKG2.js → voice-api-key-field-BG-kpmoU.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DHcQSZZD.js → work-discovery-overlay-BOH2utuu.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-Nx6xmy_N.js → workflow-run-setup-panel-B92rr2yf.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-DXvdYJff.js +5 -0
- package/dist/gateway/static/root/index.html +3 -3
- 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/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/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/execution-environments.js +22 -0
- 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 +3 -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 +1 -1
- package/dist/src/gateway/service.js +3 -3
- package/dist/src/heartbeat/index.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/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 +3 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-KPtQudPf.js +0 -1
- package/dist/gateway/static/root/assets/agents-DKQZKGCB.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-_toby2SK.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-DH-QeQ0O.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-Bv8GclZd.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-Bh7BqWsN.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-DifO0WX4.js +0 -2
- package/dist/gateway/static/root/assets/heartbeat-settings-Bu5cIcNb.js +0 -1
- package/dist/gateway/static/root/assets/home-page-sQfx98tH.js +0 -1
- package/dist/gateway/static/root/assets/index-C73V7tJP.js +0 -70
- package/dist/gateway/static/root/assets/index-C9rUND9-.css +0 -2
- package/dist/gateway/static/root/assets/local-app-workbench-page-DjvHSI0e.js +0 -2
- package/dist/gateway/static/root/assets/notes-workbench-BFreGbmY.js +0 -4
- package/dist/gateway/static/root/assets/popover-select-DBrVS3tZ.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-53z9nB5L.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-BkSGDDbn.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-C-yaSuuQ.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CelrRPXt.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-Dm_gdAfm.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-D2Zd9l04.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BvND7xsL.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-COpgFG6K.js +0 -1
- package/dist/gateway/static/root/assets/tunnel-api-D3h311_s.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-PKrbPu4w.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-DBkP6B4E.js +0 -5
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=20260713-1" />
|
|
12
12
|
<link rel="manifest" href="/site.webmanifest?v=20260713-1" />
|
|
13
13
|
<title>XOPC — Keep what matters moving.</title>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-BN4XPtJY.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-zJ_50EbN.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BOUWij0V.js">
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
<link rel="modulepreload" crossorigin href="/assets/skeleton-BwbyijEw.js">
|
|
39
39
|
<link rel="modulepreload" crossorigin href="/assets/settings-shell-dialog-layer-BU3UuiJr.js">
|
|
40
40
|
<link rel="modulepreload" crossorigin href="/assets/settings-shell-layer-context-DCp6ykjQ.js">
|
|
41
|
-
<link rel="modulepreload" crossorigin href="/assets/popover-select-
|
|
41
|
+
<link rel="modulepreload" crossorigin href="/assets/popover-select-DrILF6mR.js">
|
|
42
42
|
<link rel="modulepreload" crossorigin href="/assets/circle-check-C23XjkUj.js">
|
|
43
43
|
<link rel="modulepreload" crossorigin href="/assets/cloud-C4-yfnnk.js">
|
|
44
44
|
<link rel="modulepreload" crossorigin href="/assets/copy-Dv6d4Dvw.js">
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
<link rel="modulepreload" crossorigin href="/assets/activity-store-DLfkwJzZ.js">
|
|
69
69
|
<link rel="modulepreload" crossorigin href="/assets/theme-store-5-XHH7F0.js">
|
|
70
70
|
<link rel="stylesheet" crossorigin href="/assets/markdown-view-Y68dCxuc.css">
|
|
71
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
71
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CCBexxKW.css">
|
|
72
72
|
</head>
|
|
73
73
|
<body>
|
|
74
74
|
<div id="root"></div>
|
package/dist/package.js
CHANGED
|
@@ -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();
|
|
@@ -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";
|
|
@@ -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,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,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,6 +14,7 @@ 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";
|
|
18
19
|
import { SessionShareService, SessionShareSnapshotConflictError } from "../../../share/session-share-service.js";
|
|
19
20
|
import { HostedSessionShareBuilder, HostedSessionSharePublisher, HostedShareAuthorizationError, HostedShareBindingStore } from "../../../share/hosted-session-share.js";
|
|
@@ -1329,6 +1330,7 @@ async function handleDirectoryFile(c, store, service, record, relPath, clientIp,
|
|
|
1329
1330
|
status: 200,
|
|
1330
1331
|
headers: {
|
|
1331
1332
|
"Content-Type": shareResponseContentType(mime),
|
|
1333
|
+
...useInline && mime === "text/html" ? { "Content-Security-Policy": SHARED_HTML_CSP } : {},
|
|
1332
1334
|
"Content-Disposition": disposition,
|
|
1333
1335
|
"Content-Length": String(fileStat.size),
|
|
1334
1336
|
"Cache-Control": "private, no-store",
|
|
@@ -1494,6 +1496,7 @@ async function handleFileDownload(c, store, record, clientIp, inline = false) {
|
|
|
1494
1496
|
status: 200,
|
|
1495
1497
|
headers: {
|
|
1496
1498
|
"Content-Type": shareResponseContentType(record.mimeType),
|
|
1499
|
+
...inline && record.mimeType === "text/html" ? { "Content-Security-Policy": SHARED_HTML_CSP } : {},
|
|
1497
1500
|
"Content-Disposition": disposition,
|
|
1498
1501
|
"Content-Length": String(fileStat.size),
|
|
1499
1502
|
"Cache-Control": "private, no-store",
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Shared HTML runs with an opaque origin, without access to console storage. */
|
|
2
|
+
export declare const SHARED_HTML_CSP: string;
|
|
1
3
|
/**
|
|
2
4
|
* Compute SHA-256 CSP hashes for inline `<script>` blocks in an HTML string.
|
|
3
5
|
* Only scripts without a `src` attribute are considered inline.
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
//#region src/gateway/security/csp.ts
|
|
3
|
+
/** Shared HTML runs with an opaque origin, without access to console storage. */
|
|
4
|
+
const SHARED_HTML_CSP = [
|
|
5
|
+
"default-src 'none'",
|
|
6
|
+
"sandbox allow-scripts allow-popups allow-popups-to-escape-sandbox allow-downloads allow-forms allow-modals",
|
|
7
|
+
"script-src 'unsafe-inline' https:",
|
|
8
|
+
"style-src 'unsafe-inline' https:",
|
|
9
|
+
"img-src https: data: blob:",
|
|
10
|
+
"media-src https: data: blob:",
|
|
11
|
+
"font-src https: data:",
|
|
12
|
+
"connect-src https:",
|
|
13
|
+
"frame-src 'none'",
|
|
14
|
+
"frame-ancestors 'none'",
|
|
15
|
+
"base-uri 'none'",
|
|
16
|
+
"object-src 'none'",
|
|
17
|
+
"form-action https:"
|
|
18
|
+
].join("; ");
|
|
3
19
|
/**
|
|
4
20
|
* Compute SHA-256 CSP hashes for inline `<script>` blocks in an HTML string.
|
|
5
21
|
* Only scripts without a `src` attribute are considered inline.
|
|
@@ -53,4 +69,4 @@ function buildGatewayConsoleCspHeader(options) {
|
|
|
53
69
|
].join("; ");
|
|
54
70
|
}
|
|
55
71
|
//#endregion
|
|
56
|
-
export { buildGatewayConsoleCspHeader, computeInlineScriptHashes };
|
|
72
|
+
export { SHARED_HTML_CSP, buildGatewayConsoleCspHeader, computeInlineScriptHashes };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
4
3
|
import { getModelRegistry } from "../../providers/model-registry.js";
|
|
4
|
+
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
5
5
|
import { init_providers } from "../../providers/index.js";
|
|
6
6
|
import { disposeAllSessionMcpRuntimes } from "../../agent/mcp/bundle-mcp-runtime.js";
|
|
7
7
|
import { reloadImageGenerationProviders } from "../../agent/image/generation/provider-registry.js";
|
|
@@ -9,14 +9,14 @@ import { closeXopcDatabase, openXopcDatabase } from "../storage/sqlite/connectio
|
|
|
9
9
|
import "../storage/sqlite/index.js";
|
|
10
10
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
11
11
|
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
12
|
-
import { buildSessionKey, init_session_key, sanitizeSegment } from "../routing/session-key.js";
|
|
13
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
14
12
|
import { init_paths, resolveAgentDir, resolveConfigPath, resolveExtensionsDir } from "../config/paths.js";
|
|
13
|
+
import { prewarmModelRegistry } from "../providers/model-registry.js";
|
|
15
14
|
import { areExtensionsGloballyDisabled } from "../extensions/discover-extensions.js";
|
|
16
15
|
import { buildExtensionMetadataSnapshot } from "../extensions/extension-metadata-snapshot.js";
|
|
17
16
|
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, init_channel_catalog_service } from "../channels/catalog/channel-catalog-service.js";
|
|
18
17
|
import { loadConfig, saveConfig } from "../config/loader.js";
|
|
19
|
-
import {
|
|
18
|
+
import { buildSessionKey, init_session_key, sanitizeSegment } from "../routing/session-key.js";
|
|
19
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
20
20
|
import { init_providers, providers_exports } from "../providers/index.js";
|
|
21
21
|
import { TaskRepository } from "../tasks/task-repository.js";
|
|
22
22
|
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_ACK_MAX_CHARS, HEARTBEAT_OK, NO_REPLY, shouldSilence, stripHeartbeatToken } from "./tokens.js";
|
|
2
|
-
import { appendCronEventLines } from "./event-prompt.js";
|
|
3
2
|
import { isWithinActiveHours } from "./active-hours.js";
|
|
4
3
|
import { isHeartbeatContentEmpty } from "./content-check.js";
|
|
4
|
+
import { appendCronEventLines } from "./event-prompt.js";
|
|
5
5
|
import { createHeartbeatWake } from "./wake.js";
|
|
6
6
|
export { DEFAULT_ACK_MAX_CHARS, HEARTBEAT_OK, NO_REPLY, appendCronEventLines, createHeartbeatWake, isHeartbeatContentEmpty, isWithinActiveHours, shouldSilence, stripHeartbeatToken };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_sync_provider_auth, resolveProviderApiKeyForAgentSync } from "../../auth/sync-provider-auth.js";
|
|
2
1
|
import { getApiKeyFromEnv, init_env_keys } from "../env-keys.js";
|
|
2
|
+
import { init_sync_provider_auth, resolveProviderApiKeyForAgentSync } from "../../auth/sync-provider-auth.js";
|
|
3
3
|
import { getDefaultAuthProfileStore } from "./auth-profile-store.js";
|
|
4
4
|
//#region src/providers/auth-runtime/resolve-auth.ts
|
|
5
5
|
init_env_keys();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __esmMin, __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
3
|
-
import { getModelOAuthProviderIds, init_registry } from "../auth/oauth/registry.js";
|
|
4
|
-
import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync-provider-auth.js";
|
|
5
3
|
import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
|
|
6
4
|
import { init_model_ref, splitProviderModelRef } from "./model-ref.js";
|
|
7
5
|
import { ModelRegistry, getModelRegistry, init_model_registry, prewarmModelRegistry, resetModelRegistry } from "./model-registry.js";
|
|
6
|
+
import { getModelOAuthProviderIds, init_registry } from "../auth/oauth/registry.js";
|
|
8
7
|
import { CredentialResolver, hasCredentials, init_credentials } from "../auth/credentials.js";
|
|
8
|
+
import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync-provider-auth.js";
|
|
9
9
|
import { EXTENSION_PROVIDER_BASE_URL, init_constants } from "./constants.js";
|
|
10
10
|
import { applyOfficialModelMetadataCorrections, getSupplementalModels, init_model_supplements } from "./model-supplements.js";
|
|
11
11
|
import { getProviderRegistry, init_plugin_registry } from "./plugin-registry.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
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 { resolveModelsJsonPath } from "../config/paths.js";
|
|
5
4
|
import { init_resolve_config_value, resolveConfigValue, resolveHeaders } from "../config/resolve-config-value.js";
|
|
5
|
+
import { resolveModelsJsonPath } from "../config/paths.js";
|
|
6
6
|
import { getDefaultModelValues, init_models_json, validateModelsConfig } from "../config/models-json.js";
|
|
7
7
|
import { getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
|
|
8
8
|
import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { getOAuthProviderDefinition, init_registry } from "../auth/oauth/registry.js";
|
|
3
2
|
import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
|
|
3
|
+
import { getOAuthProviderDefinition, init_registry } from "../auth/oauth/registry.js";
|
|
4
4
|
import { XOPC_CLOUD_PROVIDER_ID, init_xopc_cloud_config, resolveXopcModelRouterUrl } from "./xopc-cloud-config.js";
|
|
5
5
|
//#region src/providers/register-runtime-providers.ts
|
|
6
6
|
function registerRuntimeProvider(modelRuntime, source) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveStateDir } from "../config/paths-state.js";
|
|
2
|
-
import { init_paths } from "../config/paths.js";
|
|
3
2
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
3
|
+
import { init_paths } from "../config/paths.js";
|
|
4
4
|
import { CredentialResolver, init_credentials } from "../auth/credentials.js";
|
|
5
5
|
import { resolveMediaReference } from "../media/media-reference.js";
|
|
6
6
|
import { projectSessionShare } from "./session-share-projector.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveStateDir } from "../config/paths-state.js";
|
|
2
|
-
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
3
2
|
import { init_paths, resolveAgentProfileDir, resolveBundledSkillsDir } from "../config/paths.js";
|
|
3
|
+
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
4
4
|
import { resolveBootstrapFilesSync } from "../agent/bootstrap/bootstrap-files.js";
|
|
5
5
|
import { createSkillConfigManager, isSkillEnabled } from "../agent/skills/config.js";
|
|
6
6
|
import { loadSkills } from "../agent/skills/index.js";
|