@xopcai/xopc 0.0.250 → 0.0.251
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-BN6FJXkJ.js → agent-avatar-dicebear-Bo_dmLv8.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-C7rZH1A2.js → agent-defaults-settings-panel-kILWelNb.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-CgGaoo4z.js → agents-yuUn8n-f.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-D2gMshuS.js → app-management-settings-panel-Cz56nrVF.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-wMu0jSKx.js → appearance-settings-DxSws5U4.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-BnizTdgs.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-u6EE3JV8.js → archive-plugin-7k15-hqo.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-DbJurnv-.js → attachment-load-B-SFpjd9.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-Ew_e5HDn.js → automations-page-Qy36j19q.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-CZRKqSqY.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-DtDFNfPM.js → binary-plugins-CPOZQt8F.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-CnAwmabq.js → block-editor-DhvVlIp9.js} +50 -50
- package/dist/gateway/static/root/assets/browser-settings-page-pN5LbChY.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflows-page-CcbUOWDF.js → browser-workflows-page-C65MI57t.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CJw2e16J.js +7 -0
- package/dist/gateway/static/root/assets/channels-settings-CRgjb4Ck.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CryTDNdD.js → chat-terminal-dock-1PJoxRuV.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-Dcpdy06y.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-ji5aWrjG.js → cron-expression-CBCc6zFA.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-Dro_w3eX.js → date-picker-u8K5Kt_N.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-Ce19KKnX.js → dependency-picker-y_i_cnpz.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-DsSi-3uZ.js → desktop-pet-DyL0JxLm.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-8WQ4woJy.js → desktop-pet-settings-d2d_IsyP.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-CgvEBfLZ.js → extension-debug-page-DqIBKJwl.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DkznBbMj.js → extension-page-DUW1xxj2.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BOjhchK2.js → extension-settings-page-BHY9qaNw.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-OEruhhX3.js → gateway-config-api-e3BRcgDx.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-BgH3A0LO.js → gateway-settings-Cheo0Rkc.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-7CD9iPR7.js +1 -0
- package/dist/gateway/static/root/assets/home-page-DVrTRqNc.js +1 -0
- package/dist/gateway/static/root/assets/{index-DAryGvZ7.css → index-B7CX4Qob.css} +1 -1
- package/dist/gateway/static/root/assets/{index-BcaF-dgQ.js → index-BHrpyJ4t.js} +17 -17
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BYhfzsqe.js → keyboard-shortcuts-settings-BtlqMleF.js} +1 -1
- package/dist/gateway/static/root/assets/languages-5WaOu0Lf.js +2 -0
- package/dist/gateway/static/root/assets/local-app-workbench-page-BjxfkjxE.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-vBlknU7C.js → local-apps-page-B7xqQe2s.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-kACaPZKL.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-Dnx6mSNe.js → management-settings-A432siER.js} +1 -1
- package/dist/gateway/static/root/assets/markdown-editor-BjMTIM-m.js +1 -0
- package/dist/gateway/static/root/assets/{media-plugins-DrMYeHe7.js → media-plugins-CpvYiauZ.js} +1 -1
- package/dist/gateway/static/root/assets/{mobile-pairing-wizard-AKgGy3Kx.js → mobile-pairing-wizard-DyjVGngO.js} +1 -1
- package/dist/gateway/static/root/assets/note-detail-panel-CUd8O4K7.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-BLQwd39W.js +8 -0
- package/dist/gateway/static/root/assets/{page-tabs-CX9T71by.js → page-tabs-B3FKzjR6.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-DvEHoimN.js → preview-open-alternatives-DnjrwAHD.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-NttW338u.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-BzH8pjEz.js +1 -0
- package/dist/gateway/static/root/assets/remote-access-hub-BxpjSDnL.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CQ13P-mS.js → runtime-tools-settings-panel-LO4wZ_dO.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-BUVyTpZj.js → schema-form-crcj4-Pm.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-BLMaibOb.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-BRvvKhoH.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-DVY-8_B9.js → settings-form-section-Bl4MvTmq.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-CdiVYyTl.js → settings-page-DplrjZ6x.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-BhenBnUj.js → setup-status-panel-DTOsxQC1.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-C88YLKm4.js → share-preview-page-CJP1kURj.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-CemgzEi4.js +1 -0
- package/dist/gateway/static/root/assets/{skill-reload-api-MDI9Lz6z.js → skill-reload-api-BWYanBlQ.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-DLir1nM0.js → skills-page-DsjcKg9Q.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-BMZAfS3G.js → skills-page.utils-D6gWBbvy.js} +1 -1
- package/dist/gateway/static/root/assets/source-workspace-editor-CVWzt0oT.js +1 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-BM8ivYan.js → system-settings-panel-_eCXfqCo.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-D0Z_K5JT.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-DemxChjo.js → tunnel-api-W5mktxl1.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-CV3Ui5hu.js → use-autosave-Na2DYzT3.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-CxfnoRVn.js → user-model-page-B_-SNat-.js} +2 -2
- package/dist/gateway/static/root/assets/{vendor-codemirror--gTq3YAI.js → vendor-codemirror-Qdcjid65.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-CUoCi4Sq.js → voice-api-key-field-OXweUxS_.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BhDlkCMB.js → work-discovery-overlay-BqOsO47I.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-D8CcPc_C.js → workflow-run-setup-panel-B9S_lfT1.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-CNOT2Coo.js +5 -0
- package/dist/gateway/static/root/index.html +2 -2
- 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/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/files/file-service.js +139 -14
- 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/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service.js +4 -4
- 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/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/voice/realtime/agentEngine.js +0 -1
- package/dist/src/work-discovery/service.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/apps-page-KF1Gnv36.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-Ch-ldu35.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-DtVhsHJW.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel--sXeylhe.js +0 -7
- package/dist/gateway/static/root/assets/channels-settings-AXSBDujZ.js +0 -1
- package/dist/gateway/static/root/assets/code-editor-D4_k-6QN.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-HBHUWohz.js +0 -2
- package/dist/gateway/static/root/assets/heartbeat-settings-C97naDkO.js +0 -1
- package/dist/gateway/static/root/assets/home-page-BBKKme4G.js +0 -1
- package/dist/gateway/static/root/assets/html-workspace-editor-C3DKAkMc.js +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-DNncc2tn.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-CizZInrT.js +0 -2
- package/dist/gateway/static/root/assets/markdown-editor-nDLmA_LF.js +0 -2
- package/dist/gateway/static/root/assets/markdown-split-DtBtcHWi.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-Bw3jD9Jf.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-Dpqq7Z-J.js +0 -8
- package/dist/gateway/static/root/assets/project-detail-page-BuT6MCTs.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-DXWMxOjf.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-7rBCUWzZ.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-gmEOYNb4.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DYYoJcl7.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-Dq7xIj0_.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-P0_RldWv.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-Bxn2Dc16.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-BHrpyJ4t.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">
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
<link rel="modulepreload" crossorigin href="/assets/activity-store-DfBjTSo9.js">
|
|
57
57
|
<link rel="modulepreload" crossorigin href="/assets/theme-store-BOgkc_9D.js">
|
|
58
58
|
<link rel="stylesheet" crossorigin href="/assets/markdown-view-Y68dCxuc.css">
|
|
59
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
59
|
+
<link rel="stylesheet" crossorigin href="/assets/index-B7CX4Qob.css">
|
|
60
60
|
</head>
|
|
61
61
|
<body>
|
|
62
62
|
<div id="root"></div>
|
package/dist/package.js
CHANGED
|
@@ -6,16 +6,16 @@ import { getInteractionState } from "../storage/sqlite/interaction-state-reposit
|
|
|
6
6
|
import { getSessionMetadata } from "../storage/sqlite/session-repository.js";
|
|
7
7
|
import "../storage/sqlite/index.js";
|
|
8
8
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
9
|
-
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
10
9
|
import { expandWorkspacePathString, init_workspace_path } from "../config/workspace-path.js";
|
|
11
10
|
import { init_agent_scope, resolveAgentProfileDir } from "./agent-scope.js";
|
|
12
|
-
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
13
|
-
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
14
11
|
import { init_paths, resolveBundledSkillsDir } from "../config/paths.js";
|
|
15
|
-
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../auth/sync-provider-auth.js";
|
|
16
12
|
import { CredentialResolver, init_credentials } from "../auth/credentials.js";
|
|
13
|
+
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
14
|
+
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../auth/sync-provider-auth.js";
|
|
17
15
|
import { getApiKeySync, getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
18
16
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
17
|
+
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
18
|
+
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
19
19
|
import { extractTextContent } from "./context/workspace.js";
|
|
20
20
|
import { buildExecutionScopeContextForPrompt } from "./context/execution-scope.js";
|
|
21
21
|
import { clearBootstrapSnapshot } from "./bootstrap/bootstrap-cache.js";
|
|
@@ -4,10 +4,10 @@ import { finishContextExtractionRun } from "../../storage/sqlite/context-extract
|
|
|
4
4
|
import { getSessionMetadata } from "../../storage/sqlite/session-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 { listUserAssertions } from "../../user-model/repository.js";
|
|
13
13
|
import { readAgentMessageContent } from "../memory/agent-message-access.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,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
|
|
@@ -2,10 +2,10 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { parseNoteAttachmentTarget } from "../notes/attachment-ref.js";
|
|
4
4
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
5
|
-
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
6
5
|
import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
7
|
-
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
8
6
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
7
|
+
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
8
|
+
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
9
9
|
import { extractTextContent } from "./context/workspace.js";
|
|
10
10
|
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
11
11
|
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,15 +1,15 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
|
4
|
+
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
4
5
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
5
|
-
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
6
6
|
import { getApiKey, init_providers, resolveModel } from "../../providers/index.js";
|
|
7
|
+
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
8
|
+
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
7
9
|
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
8
10
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
9
11
|
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
10
|
-
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
11
12
|
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
12
|
-
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
13
13
|
//#region src/agent/tasks/task-judge-service.ts
|
|
14
14
|
init_schema();
|
|
15
15
|
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";
|
|
@@ -4,7 +4,7 @@ import "../projects/index.js";
|
|
|
4
4
|
import { basename, dirname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
5
5
|
import { constants } from "node:fs";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
|
-
import { access, lstat, opendir, realpath, stat } from "node:fs/promises";
|
|
7
|
+
import { access, lstat, open, opendir, realpath, stat } from "node:fs/promises";
|
|
8
8
|
//#region src/files/file-service.ts
|
|
9
9
|
init_agent_scope();
|
|
10
10
|
const SKIPPED_NAMES = new Set([
|
|
@@ -12,26 +12,120 @@ const SKIPPED_NAMES = new Set([
|
|
|
12
12
|
".git",
|
|
13
13
|
"node_modules"
|
|
14
14
|
]);
|
|
15
|
+
const TEXT_SNIFF_BYTES = 8 * 1024;
|
|
15
16
|
const TEXT_EXTENSIONS = new Set([
|
|
17
|
+
"astro",
|
|
18
|
+
"bash",
|
|
19
|
+
"bat",
|
|
20
|
+
"c",
|
|
21
|
+
"cc",
|
|
22
|
+
"cfg",
|
|
23
|
+
"clj",
|
|
24
|
+
"cljs",
|
|
25
|
+
"cljc",
|
|
26
|
+
"cmd",
|
|
27
|
+
"conf",
|
|
28
|
+
"cpp",
|
|
29
|
+
"cs",
|
|
16
30
|
"css",
|
|
17
31
|
"csv",
|
|
18
|
-
"
|
|
32
|
+
"cts",
|
|
33
|
+
"cxx",
|
|
34
|
+
"dart",
|
|
35
|
+
"editorconfig",
|
|
36
|
+
"edn",
|
|
37
|
+
"env",
|
|
38
|
+
"erl",
|
|
39
|
+
"ex",
|
|
40
|
+
"exs",
|
|
41
|
+
"fish",
|
|
42
|
+
"fs",
|
|
43
|
+
"fsx",
|
|
44
|
+
"gitattributes",
|
|
45
|
+
"gitignore",
|
|
46
|
+
"go",
|
|
47
|
+
"gql",
|
|
48
|
+
"graphql",
|
|
49
|
+
"groovy",
|
|
50
|
+
"h",
|
|
51
|
+
"hh",
|
|
52
|
+
"hpp",
|
|
53
|
+
"hrl",
|
|
19
54
|
"htm",
|
|
55
|
+
"html",
|
|
56
|
+
"hxx",
|
|
57
|
+
"ini",
|
|
58
|
+
"java",
|
|
20
59
|
"js",
|
|
21
60
|
"json",
|
|
61
|
+
"json5",
|
|
62
|
+
"jsonc",
|
|
22
63
|
"jsx",
|
|
23
|
-
"
|
|
64
|
+
"kt",
|
|
65
|
+
"kts",
|
|
66
|
+
"less",
|
|
67
|
+
"lock",
|
|
68
|
+
"log",
|
|
69
|
+
"lua",
|
|
70
|
+
"m",
|
|
24
71
|
"markdown",
|
|
72
|
+
"md",
|
|
25
73
|
"mjs",
|
|
26
|
-
"
|
|
74
|
+
"mm",
|
|
75
|
+
"mts",
|
|
76
|
+
"nix",
|
|
77
|
+
"npmrc",
|
|
78
|
+
"php",
|
|
79
|
+
"pl",
|
|
80
|
+
"pm",
|
|
81
|
+
"properties",
|
|
82
|
+
"proto",
|
|
83
|
+
"ps1",
|
|
84
|
+
"py",
|
|
85
|
+
"pyw",
|
|
86
|
+
"r",
|
|
87
|
+
"rb",
|
|
88
|
+
"rs",
|
|
89
|
+
"sass",
|
|
90
|
+
"scala",
|
|
91
|
+
"scss",
|
|
92
|
+
"sh",
|
|
93
|
+
"sol",
|
|
94
|
+
"sql",
|
|
95
|
+
"svelte",
|
|
27
96
|
"svg",
|
|
97
|
+
"swift",
|
|
98
|
+
"tf",
|
|
99
|
+
"tfvars",
|
|
100
|
+
"toml",
|
|
28
101
|
"ts",
|
|
29
|
-
"tsx",
|
|
30
102
|
"tsv",
|
|
103
|
+
"tsx",
|
|
31
104
|
"txt",
|
|
105
|
+
"vue",
|
|
32
106
|
"xml",
|
|
107
|
+
"xsd",
|
|
108
|
+
"xsl",
|
|
33
109
|
"yaml",
|
|
34
|
-
"yml"
|
|
110
|
+
"yml",
|
|
111
|
+
"zsh"
|
|
112
|
+
]);
|
|
113
|
+
const TEXT_FILE_NAMES = new Set([
|
|
114
|
+
".dockerignore",
|
|
115
|
+
".eslintignore",
|
|
116
|
+
".prettierignore",
|
|
117
|
+
".stylelintignore",
|
|
118
|
+
"brewfile",
|
|
119
|
+
"changelog",
|
|
120
|
+
"codeowners",
|
|
121
|
+
"dockerfile",
|
|
122
|
+
"gemfile",
|
|
123
|
+
"jenkinsfile",
|
|
124
|
+
"license",
|
|
125
|
+
"makefile",
|
|
126
|
+
"procfile",
|
|
127
|
+
"rakefile",
|
|
128
|
+
"readme"
|
|
35
129
|
]);
|
|
36
130
|
const MIME_TYPES = {
|
|
37
131
|
png: "image/png",
|
|
@@ -82,17 +176,47 @@ function normalizeRelativePath(input) {
|
|
|
82
176
|
if (normalized.includes("\0") || normalized.split("/").some((part) => part === "..")) throw new FileServiceError(400, "Invalid file path");
|
|
83
177
|
return normalized.split("/").filter((part) => part && part !== ".").join("/");
|
|
84
178
|
}
|
|
85
|
-
function
|
|
179
|
+
function fileExtension(name) {
|
|
180
|
+
return name.includes(".") ? name.split(".").pop().toLowerCase() : "";
|
|
181
|
+
}
|
|
182
|
+
function isTextFileName(name) {
|
|
183
|
+
const normalized = name.toLowerCase();
|
|
184
|
+
const extension = fileExtension(normalized);
|
|
185
|
+
return TEXT_EXTENSIONS.has(extension) || TEXT_FILE_NAMES.has(normalized) || normalized.startsWith(".env.") || normalized.startsWith("dockerfile.");
|
|
186
|
+
}
|
|
187
|
+
function bufferLooksText(buffer) {
|
|
188
|
+
if (buffer.length === 0) return true;
|
|
189
|
+
let controlBytes = 0;
|
|
190
|
+
for (const byte of buffer) {
|
|
191
|
+
if (byte === 0) return false;
|
|
192
|
+
if ((byte < 8 || byte > 13 && byte < 32) && byte !== 27) controlBytes += 1;
|
|
193
|
+
}
|
|
194
|
+
return controlBytes / buffer.length < .01;
|
|
195
|
+
}
|
|
196
|
+
async function isTextFile(name, absolutePath) {
|
|
197
|
+
if (isTextFileName(name)) return true;
|
|
198
|
+
if (MIME_TYPES[fileExtension(name)]) return false;
|
|
199
|
+
const handle = await open(absolutePath, "r").catch(() => null);
|
|
200
|
+
if (!handle) return false;
|
|
201
|
+
try {
|
|
202
|
+
const buffer = Buffer.allocUnsafe(TEXT_SNIFF_BYTES);
|
|
203
|
+
const { bytesRead } = await handle.read(buffer, 0, buffer.length, 0);
|
|
204
|
+
return bufferLooksText(buffer.subarray(0, bytesRead));
|
|
205
|
+
} finally {
|
|
206
|
+
await handle.close();
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
function mimeType(name, directory, textFile) {
|
|
86
210
|
if (directory) return "inode/directory";
|
|
87
|
-
return MIME_TYPES[name
|
|
211
|
+
return MIME_TYPES[fileExtension(name)] ?? (textFile ? "text/plain" : "application/octet-stream");
|
|
88
212
|
}
|
|
89
|
-
function capabilities(name, directory, writable) {
|
|
213
|
+
function capabilities(name, directory, writable, textFile) {
|
|
90
214
|
if (directory) return writable ? ["share", "upload"] : ["share"];
|
|
91
|
-
const extension =
|
|
215
|
+
const extension = fileExtension(name);
|
|
92
216
|
const result = ["download", "share"];
|
|
93
|
-
if (MIME_TYPES[extension] ||
|
|
217
|
+
if (MIME_TYPES[extension] || textFile) result.unshift("preview");
|
|
94
218
|
if (writable) {
|
|
95
|
-
if (
|
|
219
|
+
if (textFile) result.push("edit");
|
|
96
220
|
result.push("delete");
|
|
97
221
|
}
|
|
98
222
|
return result;
|
|
@@ -146,6 +270,7 @@ async function fileResourceFromPath(space, absolutePath, displayPath = absoluteP
|
|
|
146
270
|
const relativePath = relative(await realpath(space.root), displayPath).split(sep).join("/");
|
|
147
271
|
const name = basename(displayPath);
|
|
148
272
|
const directory = info.isDirectory();
|
|
273
|
+
const textFile = !directory && await isTextFile(name, absolutePath);
|
|
149
274
|
return {
|
|
150
275
|
id: fileResourceId(space.id, relativePath),
|
|
151
276
|
spaceId: space.id,
|
|
@@ -153,11 +278,11 @@ async function fileResourceFromPath(space, absolutePath, displayPath = absoluteP
|
|
|
153
278
|
relativePath,
|
|
154
279
|
parentPath: dirname(relativePath).split(sep).join("/").replace(/^\.$/, ""),
|
|
155
280
|
kind: directory ? "directory" : "file",
|
|
156
|
-
mimeType: mimeType(name, directory),
|
|
281
|
+
mimeType: mimeType(name, directory, textFile),
|
|
157
282
|
size: info.size,
|
|
158
283
|
modifiedAt: Math.max(0, Math.round(info.mtimeMs)),
|
|
159
284
|
revision: `${revisionInfo.mtimeNs}:${revisionInfo.ctimeNs}:${revisionInfo.ino}:${revisionInfo.size}`,
|
|
160
|
-
capabilities: capabilities(name, directory, space.writable)
|
|
285
|
+
capabilities: capabilities(name, directory, space.writable, textFile)
|
|
161
286
|
};
|
|
162
287
|
}
|
|
163
288
|
var FileSpaceService = class {
|
|
@@ -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";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ContextPlanningConfigSchema, KnowledgeMemoryConfigSchema, UserModelConfigSchema, 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,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";
|
|
@@ -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";
|
|
@@ -12,16 +12,16 @@ import { getSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
|
12
12
|
import "../storage/sqlite/index.js";
|
|
13
13
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
14
14
|
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
15
|
-
import { buildSessionKey, init_session_key, sanitizeSegment } from "../routing/session-key.js";
|
|
16
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
17
|
-
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
18
15
|
import { init_paths, resolveConfigPath, resolveExtensionsDir } from "../config/paths.js";
|
|
16
|
+
import { prewarmModelRegistry } from "../providers/model-registry.js";
|
|
19
17
|
import { areExtensionsGloballyDisabled } from "../extensions/discover-extensions.js";
|
|
20
18
|
import { buildExtensionMetadataSnapshot } from "../extensions/extension-metadata-snapshot.js";
|
|
21
19
|
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, init_channel_catalog_service } from "../channels/catalog/channel-catalog-service.js";
|
|
22
20
|
import { loadConfig, saveConfig } from "../config/loader.js";
|
|
23
|
-
import {
|
|
21
|
+
import { buildSessionKey, init_session_key, sanitizeSegment } from "../routing/session-key.js";
|
|
22
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
24
23
|
import { init_providers, providers_exports } from "../providers/index.js";
|
|
24
|
+
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
25
25
|
import { TaskRepository } from "../tasks/task-repository.js";
|
|
26
26
|
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
27
27
|
import { getEmbeddedExecutionSession } from "../agent/embedded/execution-context.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";
|