@xopcai/xopc 0.0.298 → 0.0.299
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-DQx3cICI.js → agent-avatar-dicebear-BnrB5fWD.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-BdAFy0gE.js → agent-defaults-settings-panel-CaA7l5Xv.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-9Q_62jYG.js → agents-DNxSNGao.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-rZk3-w6S.js → app-management-settings-panel-Dfrcz-vZ.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CbIWkXlh.js → appearance-settings-BLB_xmtb.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-BeNbZ2aw.js → apps-page-Bg-7fqIS.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-CNi0DDvL.js → archive-plugin-CISHdvCz.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CThmC7i6.js → attachment-load-c0q_Q6IQ.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BGe-cTjn.js → automations-page-BOiNdKcv.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-rHXrY_xk.js → automations-workspace-DDdsNbjH.js} +1 -1
- package/dist/gateway/static/root/assets/{binary-plugins-Cv_aLtBz.js → binary-plugins-BO1hALPX.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-BkS6rDLR.js → block-editor-BWzZ4hDH.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-D93HlJH4.js → browser-automations-page-B8LfUUco.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-BdHYYHIv.js → browser-settings-page-BtZbX85K.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-BJ5gZB8e.js → capabilities-settings-panel-mNpAFqTf.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-settings-CikNo086.js → channels-settings-BBX7Gp4q.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-Dr3iyWHW.js → chat-terminal-dock-CLYsf1w_.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-model-settings-CgDUQ9On.js → computer-model-settings-DYWcZu2X.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-unz5J8oW.js → computer-settings-page-B4pC7mRs.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-EdtkQUqf.js → connectors-page-BVUnp0UV.js} +1 -1
- package/dist/gateway/static/root/assets/{cron-expression-DU3E4CbL.js → cron-expression-DKSgHs4I.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-BjGxRWfE.js → date-picker-DRTglPVS.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-B9Fsdq_j.js → dependency-picker-_-7WsbTH.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-BVIdx2PC.js → desktop-pet-CR7n2K67.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CjTgpDfw.js → desktop-pet-settings-Bu7g83kd.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-CaSz5VAr.js → device-pairing-wizard-D5z7BvaO.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-CMjMKdg0.js → extension-debug-page-BI8pvu2u.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Dm4ohyoF.js → extension-page-EZC07dGv.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-jsjKLZ_n.js → extension-settings-page-DLYC6gVA.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-CnMgDQVJ.js → gateway-settings-C17LDur8.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-CJNc9fVz.js → heartbeat-settings-BAMr_vYa.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-X0TcW6Fs.js → home-page-DG19Sjrn.js} +1 -1
- package/dist/gateway/static/root/assets/{index-BwqBcOv1.js → index-B7JCOaCc.js} +50 -50
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-7eX6_wx-.js → keyboard-shortcuts-settings-DfNQK_hR.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-C5Q12itI.js → local-app-workbench-page-h48NEuKs.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-C9L4Hlw5.js → local-apps-page-DFMrfoGF.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-BC131pzE.js → logs-page-CD9MfQDD.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-CeDBuLQg.js → management-settings-Dib_yIDQ.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-DWfT8oeo.js → media-plugins-DlZXjN6z.js} +1 -1
- package/dist/gateway/static/root/assets/{note-detail-panel-DkN6faxv.js → note-detail-panel-CS0W3ESn.js} +3 -3
- package/dist/gateway/static/root/assets/{notes-page-C4hKdQdj.js → notes-page-BNMVGN6Y.js} +1 -1
- package/dist/gateway/static/root/assets/{page-tabs-BcTjkR5o.js → page-tabs-BLzm5EXm.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-DYH10UsL.js → preview-open-alternatives-B6QLKIZy.js} +1 -1
- package/dist/gateway/static/root/assets/{proactive-page-LEG1kQFJ.js → proactive-page-W_uN2_ie.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-HxD09IfH.js → project-detail-page-Gfze4S0P.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-D2fC38bE.js → projects-page-DT7zmH0f.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-DvXeZ98_.js → remote-access-hub-CXQkXSU2.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CXpFgOci.js → runtime-tools-settings-panel-DHkNbhpP.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-DaT4vD2j.js → schema-form-BTLg2fN1.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-CxTLRoxv.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-BgtDlDZh.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-B6ZUcWOA.js → settings-form-section-D9rWLTBX.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-Chvn3lRv.js → settings-page-BR9XJ0j9.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-BS51qtzu.js → setup-status-panel-BSo76NwE.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-Brta3iG6.js → share-preview-page-Dx2IpPEp.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-oSqDaSSF.js → shares-settings-BMF0Bo06.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-CITITcjJ.js → skill-reload-api-DNBw3BJR.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-cxh7-L-8.js → skills-page-CaX9EQtn.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-CM_4-WWk.js → skills-page.utils-CxWdcFKs.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-CCv2jppr.js → system-settings-panel-BkiXkDSq.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-Dip4NJ1W.js → task-detail-page-UBuGZQkl.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-B0z39eec.js → tunnel-api-CEXwG7vJ.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-B2Vitgh0.js → use-autosave-BHxjmV8l.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-DARb0_C4.js → user-model-page-Dvtr3CPj.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-XsHsCfWR.js → voice-api-key-field-BCNM-BaQ.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-B5mnI1IB.js → work-discovery-overlay-tig5sF-Q.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-DcFMhxC_.js → workflow-run-setup-panel-OcS30LVZ.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-CaaEc_f1.js → workflows-page-AqlMn0Bx.js} +1 -1
- package/dist/gateway/static/root/index.html +1 -1
- 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/memory/compaction.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +11 -4
- package/dist/src/agent/service/process-direct-streaming.js +2 -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/oauth/xopc-cloud.js +1 -1
- 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/chat-commands/agent-edit.js +1 -1
- package/dist/src/chat-commands/builtins/config.d.ts +1 -0
- package/dist/src/chat-commands/builtins/config.js +13 -9
- package/dist/src/chat-commands/builtins/model.js +2 -1
- package/dist/src/chat-commands/builtins/session.js +10 -7
- package/dist/src/chat-commands/builtins/skill.js +0 -1
- package/dist/src/chat-commands/builtins/thinking.js +12 -8
- package/dist/src/chat-commands/builtins/tts.js +7 -7
- package/dist/src/chat-commands/builtins/understanding.js +2 -1
- package/dist/src/chat-commands/command-parse.js +5 -6
- package/dist/src/chat-commands/context.js +19 -16
- package/dist/src/cli/commands/agent.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +3 -3
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/computer/runtime.js +1 -1
- package/dist/src/config/index.js +4 -4
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.js +2 -2
- package/dist/src/config/schema.js +1 -1
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/chat-stream/mapper.js +1 -0
- package/dist/src/gateway/chat-stream/protocol.d.ts +2 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +3 -1
- package/dist/src/gateway/hono/routes/session-input-handler.js +21 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service.js +5 -5
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/session/reset-triggers.d.ts +2 -0
- package/dist/src/session/reset-triggers.js +11 -1
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/tui/tui-commands.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +2 -2
- package/dist/src/user-context/config.js +2 -2
- package/dist/src/work-discovery/service.js +2 -2
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +4 -4
- package/dist/gateway/static/root/assets/sessions-page-T5S0FTQJ.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Bi3puKV6.js +0 -1
|
@@ -42,10 +42,17 @@ async function tryRunSlashCommand(deps, ctx, content, options) {
|
|
|
42
42
|
matched: false,
|
|
43
43
|
aggregatedText: ""
|
|
44
44
|
};
|
|
45
|
-
if (!commandRegistry.has(parsed.command))
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
if (!commandRegistry.has(parsed.command)) {
|
|
46
|
+
if (parsed.command.startsWith("skill:")) return {
|
|
47
|
+
matched: false,
|
|
48
|
+
aggregatedText: ""
|
|
49
|
+
};
|
|
50
|
+
return {
|
|
51
|
+
matched: true,
|
|
52
|
+
aggregatedText: `Unknown command: /${parsed.command}\nType /help to see available commands.`,
|
|
53
|
+
command: parsed.command
|
|
54
|
+
};
|
|
55
|
+
}
|
|
49
56
|
const command = commandRegistry.findByName(parsed.command);
|
|
50
57
|
if (options?.sourceContexts?.length && !command?.acceptsContext) return {
|
|
51
58
|
matched: true,
|
|
@@ -256,12 +256,13 @@ async function* runProcessDirectStreaming(deps, input) {
|
|
|
256
256
|
if (slash.matched) {
|
|
257
257
|
ranSlashCommand = true;
|
|
258
258
|
slashCommandMetadata = slash.metadata;
|
|
259
|
+
if (slash.metadata?.sessionConfigChanged === true) pushVisible({ type: "session_config_updated" });
|
|
259
260
|
const text = slash.aggregatedText.trim();
|
|
260
261
|
if (text) {
|
|
261
262
|
webchatSlashReceipt = text;
|
|
262
263
|
pushAssistantReceipt(queue, text, input.runId, slashCommandMetadata);
|
|
263
264
|
} else if (channel === "webchat") {
|
|
264
|
-
webchatSlashReceipt = "Command finished with no assistant text.
|
|
265
|
+
webchatSlashReceipt = "Command finished with no assistant text. A task continuation may still be scheduled automatically.";
|
|
265
266
|
pushAssistantReceipt(queue, webchatSlashReceipt, input.runId);
|
|
266
267
|
}
|
|
267
268
|
const workflowRun = slash.metadata?.workflowRun;
|
|
@@ -2,11 +2,11 @@ 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";
|
|
5
6
|
import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
6
7
|
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
7
|
-
import { init_providers, resolveModel } from "../providers/index.js";
|
|
8
|
-
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
9
8
|
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
9
|
+
import { init_providers, resolveModel } from "../providers/index.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 { init_providers, resolveModel } from "../../providers/index.js";
|
|
5
4
|
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
5
|
+
import { init_providers, resolveModel } from "../../providers/index.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_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
1
|
import { init_paths, resolveSkillsLockPath } from "../../config/paths.js";
|
|
2
|
+
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.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, init_task_run_repository } from "../../tasks/task-run-repository.js";
|
|
4
|
-
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
5
4
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
6
|
-
import { getApiKey, init_providers, resolveModel } from "../../providers/index.js";
|
|
7
|
-
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
8
5
|
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
6
|
+
import { getApiKey, init_providers, resolveModel } from "../../providers/index.js";
|
|
9
7
|
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
10
8
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
11
9
|
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
10
|
+
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
12
11
|
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";
|
|
4
3
|
import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
5
4
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
6
5
|
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_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
5
4
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
6
|
-
import {
|
|
5
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
7
6
|
import { getOAuthProviderDefinition, init_registry } from "./oauth/registry.js";
|
|
7
|
+
import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.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,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { generatePKCE, init_pkce } from "./pkce.js";
|
|
3
2
|
import { init_resolution, resolveConnectedPlatformEndpoint } from "../../platform/resolution.js";
|
|
3
|
+
import { generatePKCE, init_pkce } from "./pkce.js";
|
|
4
4
|
import { hostname } from "node:os";
|
|
5
5
|
import { randomBytes } from "node:crypto";
|
|
6
6
|
import http from "node:http";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
1
|
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
2
|
+
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.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";
|
|
2
3
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
|
|
3
|
-
import { init_registry, isOAuthOnlyProvider } from "./oauth/registry.js";
|
|
4
4
|
import { init_loader, loadConfig } from "../config/loader.js";
|
|
5
|
-
import {
|
|
5
|
+
import { init_registry, isOAuthOnlyProvider } from "./oauth/registry.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 { resolveStateDir } from "../../config/paths-state.js";
|
|
3
3
|
import { createLogger } from "../../utils/logger/index.js";
|
|
4
4
|
import { init_logger } from "../../utils/logger.js";
|
|
5
|
-
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
6
5
|
import { init_paths, resolveBinDir, resolveConfigPath } from "../../config/paths.js";
|
|
6
|
+
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
7
7
|
import { assertCacheDir } from "../cache-dir-policy.js";
|
|
8
8
|
import { BROWSER_EXTENSION_ID, BROWSER_NATIVE_HOST_NAME } from "../extension-identity.js";
|
|
9
9
|
import "../native-messaging-host.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { init_agent_scope, normalizeAgentId, resolveAgentProfileDir } from "../agent/agent-scope.js";
|
|
2
|
-
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
3
2
|
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
3
|
+
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
4
4
|
import { commandRegistry } from "./registry.js";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { readFile } from "node:fs/promises";
|
|
@@ -19,12 +19,13 @@ function isBlockedPath(path) {
|
|
|
19
19
|
for (const blocked of BLOCKED_WRITE_PATHS) if (joined === blocked || joined.startsWith(`${blocked}.`)) return true;
|
|
20
20
|
return false;
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
22
|
+
const SENSITIVE_CONFIG_KEY = /(?:api[_-]?key|token|secret|password|passwd|credential|private[_-]?key|authorization|cookie)$/i;
|
|
23
|
+
function redactConfigForDisplay(value) {
|
|
24
|
+
if (Array.isArray(value)) return value.map(redactConfigForDisplay);
|
|
25
|
+
if (!value || typeof value !== "object") return value;
|
|
26
|
+
const out = {};
|
|
27
|
+
for (const [key, entry] of Object.entries(value)) out[key] = SENSITIVE_CONFIG_KEY.test(key) ? "[redacted]" : redactConfigForDisplay(entry);
|
|
28
|
+
return out;
|
|
28
29
|
}
|
|
29
30
|
function senderMayWritePersistentConfig(ctx) {
|
|
30
31
|
const { source, senderId, isGroup } = ctx;
|
|
@@ -84,9 +85,12 @@ const configCommand = {
|
|
|
84
85
|
const action = parts[0]?.toLowerCase();
|
|
85
86
|
const rest = parts.slice(1).join(" ").trim();
|
|
86
87
|
if (!action || action === "show" || action === "get") {
|
|
88
|
+
if (!senderMayWritePersistentConfig(ctx)) return {
|
|
89
|
+
content: "⚠️ You are not allowed to view configuration from this chat surface.",
|
|
90
|
+
success: false
|
|
91
|
+
};
|
|
87
92
|
const config = ctx.getConfig?.() ?? loadConfig(resolveConfigPath());
|
|
88
|
-
const plain = JSON.parse(JSON.stringify(config));
|
|
89
|
-
redactConfigForDisplay(plain);
|
|
93
|
+
const plain = redactConfigForDisplay(JSON.parse(JSON.stringify(config)));
|
|
90
94
|
if (rest) {
|
|
91
95
|
const parsed = parseConfigPath(rest);
|
|
92
96
|
if (!parsed.ok || !parsed.path) return {
|
|
@@ -183,4 +187,4 @@ function registerConfigCommand() {
|
|
|
183
187
|
commandRegistry.register(configCommand);
|
|
184
188
|
}
|
|
185
189
|
//#endregion
|
|
186
|
-
export { registerConfigCommand };
|
|
190
|
+
export { redactConfigForDisplay, registerConfigCommand };
|
|
@@ -78,7 +78,8 @@ const switchCommand = {
|
|
|
78
78
|
const modelName = modelId.split("/").pop() || modelId;
|
|
79
79
|
return {
|
|
80
80
|
content: joinBlocks(`✅ Switched to ${code(modelId)} (${modelName}).`, "This model will be used for your next message."),
|
|
81
|
-
success: true
|
|
81
|
+
success: true,
|
|
82
|
+
metadata: { sessionConfigChanged: true }
|
|
82
83
|
};
|
|
83
84
|
}
|
|
84
85
|
return {
|
|
@@ -16,7 +16,7 @@ const newCommand = {
|
|
|
16
16
|
await ctx.setTyping(true);
|
|
17
17
|
await ctx.resetSession();
|
|
18
18
|
return {
|
|
19
|
-
content: "",
|
|
19
|
+
content: "✅ New session started. Previous transcript archived; model and session overrides kept.",
|
|
20
20
|
success: true
|
|
21
21
|
};
|
|
22
22
|
}
|
|
@@ -42,7 +42,7 @@ const listCommand = {
|
|
|
42
42
|
sessions.sort((a, b) => b.updatedAt.getTime() - a.updatedAt.getTime());
|
|
43
43
|
const content = "📋 Your Sessions:\n\n" + sessions.slice(0, 10).map((s) => {
|
|
44
44
|
const indicator = s.isActive ? "▶️" : " ";
|
|
45
|
-
const name = getSessionDisplayName(s.key);
|
|
45
|
+
const name = s.name ?? getSessionDisplayName(s.key);
|
|
46
46
|
const date = s.updatedAt.toLocaleDateString();
|
|
47
47
|
return `${indicator} ${name}\n ${s.messageCount} messages · ${date}`;
|
|
48
48
|
}).join("\n\n");
|
|
@@ -53,7 +53,7 @@ const listCommand = {
|
|
|
53
53
|
type: "session-list",
|
|
54
54
|
sessions: sessions.slice(0, 5).map((s) => ({
|
|
55
55
|
...s,
|
|
56
|
-
name: getSessionDisplayName(s.key)
|
|
56
|
+
name: s.name ?? getSessionDisplayName(s.key)
|
|
57
57
|
})),
|
|
58
58
|
currentSession: ctx.conversationId
|
|
59
59
|
}]
|
|
@@ -67,7 +67,7 @@ const listCommand = {
|
|
|
67
67
|
const clearCommand = {
|
|
68
68
|
id: "session.clear",
|
|
69
69
|
name: "clear",
|
|
70
|
-
description: "Clear current session
|
|
70
|
+
description: "Clear current session and archive its previous transcript",
|
|
71
71
|
category: "session",
|
|
72
72
|
scope: [
|
|
73
73
|
"global",
|
|
@@ -76,10 +76,9 @@ const clearCommand = {
|
|
|
76
76
|
],
|
|
77
77
|
handler: async (ctx) => {
|
|
78
78
|
await ctx.setTyping(true);
|
|
79
|
-
|
|
80
|
-
await ctx.clearSession();
|
|
79
|
+
await ctx.resetSession();
|
|
81
80
|
return {
|
|
82
|
-
content:
|
|
81
|
+
content: "🗑️ Session cleared. Previous transcript archived.",
|
|
83
82
|
success: true
|
|
84
83
|
};
|
|
85
84
|
}
|
|
@@ -226,6 +225,10 @@ const archiveCommand = {
|
|
|
226
225
|
"group"
|
|
227
226
|
],
|
|
228
227
|
handler: async (ctx) => {
|
|
228
|
+
if (ctx.channelId === "webchat") return {
|
|
229
|
+
content: "Archive this chat from the sidebar so the app can navigate away safely.",
|
|
230
|
+
success: false
|
|
231
|
+
};
|
|
229
232
|
await ctx.setTyping(true);
|
|
230
233
|
await ctx.archiveSession();
|
|
231
234
|
return {
|
|
@@ -70,7 +70,6 @@ function parseInstallArgs(args) {
|
|
|
70
70
|
const skillCommand = {
|
|
71
71
|
id: "system.skill",
|
|
72
72
|
name: "skill",
|
|
73
|
-
aliases: ["skills"],
|
|
74
73
|
description: "Install skills from explicit sources. Subcommands: install <source>",
|
|
75
74
|
category: "tool",
|
|
76
75
|
scope: ["global", "private"],
|
|
@@ -49,8 +49,9 @@ const thinkCommand = {
|
|
|
49
49
|
xhigh: "Extra high thinking effort",
|
|
50
50
|
max: "Maximum thinking effort",
|
|
51
51
|
adaptive: "Auto-adjust based on task complexity"
|
|
52
|
-
}[level]}\n\
|
|
53
|
-
success: true
|
|
52
|
+
}[level]}\n\nSaved for this conversation until you change it.`,
|
|
53
|
+
success: true,
|
|
54
|
+
metadata: { sessionConfigChanged: true }
|
|
54
55
|
};
|
|
55
56
|
}
|
|
56
57
|
};
|
|
@@ -88,8 +89,9 @@ const reasoningCommand = {
|
|
|
88
89
|
off: "Hide reasoning from user",
|
|
89
90
|
on: "Show reasoning after completion",
|
|
90
91
|
stream: "Stream reasoning in real-time"
|
|
91
|
-
}[level]}\n\
|
|
92
|
-
success: true
|
|
92
|
+
}[level]}\n\nSaved for this conversation until you change it.`,
|
|
93
|
+
success: true,
|
|
94
|
+
metadata: { sessionConfigChanged: true }
|
|
93
95
|
};
|
|
94
96
|
}
|
|
95
97
|
};
|
|
@@ -116,8 +118,9 @@ const verboseCommand = {
|
|
|
116
118
|
const newLevel = await ctx.getVerboseLevel?.() === "on" ? "off" : "on";
|
|
117
119
|
await setSessionAgentField(ctx.getSessionConfigStore?.(), ctx.conversationId, "verboseLevel", newLevel);
|
|
118
120
|
return {
|
|
119
|
-
content: `📝 *Verbose Mode*\n\nMode: *${newLevel}*\n\n${newLevel === "on" ? "Verbose output enabled
|
|
120
|
-
success: true
|
|
121
|
+
content: `📝 *Verbose Mode*\n\nMode: *${newLevel}*\n\n${newLevel === "on" ? "Verbose output enabled for this conversation." : "Verbose output disabled for this conversation."}`,
|
|
122
|
+
success: true,
|
|
123
|
+
metadata: { sessionConfigChanged: true }
|
|
121
124
|
};
|
|
122
125
|
}
|
|
123
126
|
const level = normalizeVerboseLevel(args.trim());
|
|
@@ -131,8 +134,9 @@ const verboseCommand = {
|
|
|
131
134
|
off: "Minimal output",
|
|
132
135
|
on: "Normal verbose output",
|
|
133
136
|
full: "Full verbose output with all details"
|
|
134
|
-
}[level]}\n\
|
|
135
|
-
success: true
|
|
137
|
+
}[level]}\n\nSaved for this conversation until you change it.`,
|
|
138
|
+
success: true,
|
|
139
|
+
metadata: { sessionConfigChanged: true }
|
|
136
140
|
};
|
|
137
141
|
}
|
|
138
142
|
};
|
|
@@ -84,7 +84,7 @@ Voice: *${currentVoice}*
|
|
|
84
84
|
switch (arg) {
|
|
85
85
|
case "on":
|
|
86
86
|
case "enable": {
|
|
87
|
-
const success = await ctx.updateConfig?.("tts.enabled", true);
|
|
87
|
+
const success = await ctx.updateConfig?.("messages.tts.enabled", true);
|
|
88
88
|
const base = success ? "✅ TTS enabled. Use `/tts always` or `/tts inbound` to set trigger mode." : "❌ Failed to enable TTS.";
|
|
89
89
|
return {
|
|
90
90
|
content: success ? appendTtsReadinessNote(base, ctx.getConfig?.()) : base,
|
|
@@ -93,7 +93,7 @@ Voice: *${currentVoice}*
|
|
|
93
93
|
}
|
|
94
94
|
case "off":
|
|
95
95
|
case "disable": {
|
|
96
|
-
const success = await ctx.updateConfig?.("tts.enabled", false);
|
|
96
|
+
const success = await ctx.updateConfig?.("messages.tts.enabled", false);
|
|
97
97
|
return {
|
|
98
98
|
content: success ? "✅ TTS disabled." : "❌ Failed to disable TTS.",
|
|
99
99
|
success: !!success
|
|
@@ -103,8 +103,8 @@ Voice: *${currentVoice}*
|
|
|
103
103
|
case "inbound":
|
|
104
104
|
case "tagged": {
|
|
105
105
|
const mode = arg;
|
|
106
|
-
const success = await ctx.updateConfig?.("tts.trigger", mode);
|
|
107
|
-
if (success && !isEnabled) await ctx.updateConfig?.("tts.enabled", true);
|
|
106
|
+
const success = await ctx.updateConfig?.("messages.tts.trigger", mode);
|
|
107
|
+
if (success && !isEnabled) await ctx.updateConfig?.("messages.tts.enabled", true);
|
|
108
108
|
const base = success ? `✅ TTS trigger mode set to *${mode}*${!isEnabled ? " and TTS enabled" : ""}.` : `❌ Failed to set TTS trigger mode.`;
|
|
109
109
|
return {
|
|
110
110
|
content: success ? appendTtsReadinessNote(base, ctx.getConfig?.()) : base,
|
|
@@ -112,7 +112,7 @@ Voice: *${currentVoice}*
|
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
114
|
case "never": {
|
|
115
|
-
const success = await ctx.updateConfig?.("tts.trigger", "off");
|
|
115
|
+
const success = await ctx.updateConfig?.("messages.tts.trigger", "off");
|
|
116
116
|
return {
|
|
117
117
|
content: success ? "✅ TTS trigger mode set to *off*." : "❌ Failed to set TTS trigger mode.",
|
|
118
118
|
success: !!success
|
|
@@ -165,7 +165,7 @@ Voice: *${currentVoice}*
|
|
|
165
165
|
content: `❌ Invalid provider: ${provider}\nValid providers: openai, alibaba, minimax, edge`,
|
|
166
166
|
success: false
|
|
167
167
|
};
|
|
168
|
-
const success = await ctx.updateConfig?.("tts.provider", provider);
|
|
168
|
+
const success = await ctx.updateConfig?.("messages.tts.provider", provider);
|
|
169
169
|
const base = success ? `✅ TTS provider set to *${provider}*.` : "❌ Failed to set TTS provider.";
|
|
170
170
|
return {
|
|
171
171
|
content: success ? appendTtsReadinessNote(base, ctx.getConfig?.()) : base,
|
|
@@ -175,7 +175,7 @@ Voice: *${currentVoice}*
|
|
|
175
175
|
if (subcommand === "voice" && subarg) {
|
|
176
176
|
const voice = subarg;
|
|
177
177
|
const provider = currentProvider;
|
|
178
|
-
const success = await ctx.updateConfig?.(`tts.${provider}.voice`, voice);
|
|
178
|
+
const success = await ctx.updateConfig?.(`messages.tts.providers.${provider}.voice`, voice);
|
|
179
179
|
return {
|
|
180
180
|
content: success ? `✅ TTS voice set to *${voice}* for ${provider}.` : "❌ Failed to set TTS voice.",
|
|
181
181
|
success: !!success
|
|
@@ -101,7 +101,8 @@ const learningCommand = {
|
|
|
101
101
|
const mode = (await store.get(ctx.conversationId))?.userContextMode ?? "enabled";
|
|
102
102
|
return {
|
|
103
103
|
content: globallyEnabled && mode === "enabled" ? "User understanding is enabled for this conversation." : globallyEnabled && mode === "temporary" ? "This is a temporary conversation. Stored user context is not read, and this conversation does not update user understanding." : globallyEnabled ? "User understanding is off for this conversation. Existing chat history is still stored; use /remember for anything you explicitly want saved." : "User understanding is disabled globally. Existing chat history is still stored.",
|
|
104
|
-
success: true
|
|
104
|
+
success: true,
|
|
105
|
+
...action !== "status" ? { metadata: { sessionConfigChanged: true } } : {}
|
|
105
106
|
};
|
|
106
107
|
}
|
|
107
108
|
};
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
function normalizeTelegramCommandName(command) {
|
|
7
7
|
const at = command.indexOf("@");
|
|
8
|
-
|
|
9
|
-
return command.slice(0, at);
|
|
8
|
+
return (at === -1 ? command : command.slice(0, at)).toLowerCase();
|
|
10
9
|
}
|
|
11
10
|
/**
|
|
12
11
|
* Parse a `/command` from message text. Handles:
|
|
@@ -20,14 +19,14 @@ function parseSlashCommand(text) {
|
|
|
20
19
|
const line = part.trim();
|
|
21
20
|
if (!line.startsWith("/")) continue;
|
|
22
21
|
const withoutPrefix = line.slice(1);
|
|
23
|
-
const
|
|
24
|
-
if (
|
|
22
|
+
const whitespaceIndex = withoutPrefix.search(/\s/);
|
|
23
|
+
if (whitespaceIndex === -1) return {
|
|
25
24
|
command: normalizeTelegramCommandName(withoutPrefix),
|
|
26
25
|
args: ""
|
|
27
26
|
};
|
|
28
27
|
return {
|
|
29
|
-
command: normalizeTelegramCommandName(withoutPrefix.slice(0,
|
|
30
|
-
args: withoutPrefix.slice(
|
|
28
|
+
command: normalizeTelegramCommandName(withoutPrefix.slice(0, whitespaceIndex)),
|
|
29
|
+
args: withoutPrefix.slice(whitespaceIndex + 1).trim()
|
|
31
30
|
};
|
|
32
31
|
}
|
|
33
32
|
return null;
|
|
@@ -86,13 +86,6 @@ var CommandContextImpl = class {
|
|
|
86
86
|
await this.clearSession();
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
|
-
await this.deps.bus.publishOutbound({
|
|
90
|
-
channel: this.source,
|
|
91
|
-
chat_id: this.chatId,
|
|
92
|
-
content: "✅ New session started. Previous transcript archived; model and session overrides kept.",
|
|
93
|
-
type: "message",
|
|
94
|
-
metadata: this.outboundMetadata()
|
|
95
|
-
});
|
|
96
89
|
log.info({ conversationId: this.conversationId }, "Session reset");
|
|
97
90
|
}
|
|
98
91
|
async clearSession() {
|
|
@@ -120,15 +113,25 @@ var CommandContextImpl = class {
|
|
|
120
113
|
log.info({ conversationId: this.conversationId }, "Session archived");
|
|
121
114
|
}
|
|
122
115
|
async listSessions() {
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
116
|
+
const { items } = await this.deps.sessionStore.list({
|
|
117
|
+
channel: this.channelId,
|
|
118
|
+
limit: 100,
|
|
119
|
+
sortBy: "updatedAt",
|
|
120
|
+
sortOrder: "desc"
|
|
121
|
+
});
|
|
122
|
+
return items.filter((item) => {
|
|
123
|
+
if (this.channelId === "webchat") return true;
|
|
124
|
+
const routing = item.routing;
|
|
125
|
+
if (!routing) return item.key === this.conversationId;
|
|
126
|
+
return routing.peerId === this.chatId && (!this.accountId || routing.accountId === this.accountId) && (!this.threadId || routing.threadId === this.threadId);
|
|
127
|
+
}).map((item) => ({
|
|
128
|
+
key: item.key,
|
|
129
|
+
name: item.name ?? getSessionDisplayName(item.key),
|
|
130
|
+
messageCount: item.messageCount,
|
|
131
|
+
createdAt: new Date(item.createdAt),
|
|
132
|
+
updatedAt: new Date(item.updatedAt),
|
|
133
|
+
isActive: item.key === this.conversationId
|
|
134
|
+
}));
|
|
132
135
|
}
|
|
133
136
|
async switchSession(conversationId) {
|
|
134
137
|
log.info({
|
|
@@ -2,8 +2,8 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
4
4
|
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
5
|
-
import { loadConfig } from "../../config/loader.js";
|
|
6
5
|
import { init_agent_session_key, resolveAgentMainConversationId } from "../../routing/agent-session-key.js";
|
|
6
|
+
import { loadConfig } from "../../config/loader.js";
|
|
7
7
|
import { ExtensionLoader } from "../../extensions/loader.js";
|
|
8
8
|
import "../../extensions/index.js";
|
|
9
9
|
import { MessageBus, MessageBusShutdownError } from "../../infra/bus/queue.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getAgentDefaultModelRef, init_schema, parseModelRef } from "../../../../config/schema.js";
|
|
2
|
-
import {
|
|
2
|
+
import { getDefaultAgentId, init_resolve_route } from "../../../../routing/resolve-route.js";
|
|
3
|
+
import { init_loader, loadConfig } from "../../../../config/loader.js";
|
|
3
4
|
import { getModelOAuthProviderIds, init_registry } from "../../../../auth/oauth/registry.js";
|
|
5
|
+
import { PROVIDER_ENV_MAP, init_env_keys } from "../../../../providers/env-keys.js";
|
|
4
6
|
import { CredentialResolver, init_credentials } from "../../../../auth/credentials.js";
|
|
5
|
-
import { init_loader, loadConfig } from "../../../../config/loader.js";
|
|
6
|
-
import { getDefaultAgentId, init_resolve_route } from "../../../../routing/resolve-route.js";
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
8
8
|
//#region src/cli/commands/doctor/checks/provider-auth.ts
|
|
9
9
|
init_credentials();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
2
|
-
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
3
2
|
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
3
|
+
import { CredentialResolver, init_credentials } from "../../auth/credentials.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";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { resolveEffectiveAgentConfigForSession } from "../config/agent-profile.js";
|
|
3
4
|
import { COMPUTER_CONTROL_TOOL, ComputerAppSchema, ComputerObservationSchema, ComputerWindowSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
4
5
|
import { ComputerServiceLimitsSchema, computerModelProfile, init_model_policy } from "./model-policy.js";
|
|
5
6
|
import { getApiKey, init_providers, resolveModel } from "../providers/index.js";
|
|
6
|
-
import { resolveEffectiveAgentConfigForSession } from "../config/agent-profile.js";
|
|
7
7
|
import { enterComputerControl, leaveComputerControl } from "./control-guard.js";
|
|
8
8
|
import { ComputerDiagnosticSchema, ComputerOperationError, computerDiagnostic, computerRecovery } from "./errors.js";
|
|
9
9
|
import { ComputerModelAdapter, predictComputerStep, readComputerJson } from "./model-adapter.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 { applyConfigOverrides, getConfigOverrides, resetConfigOverrides, setConfigOverride, unsetConfigOverride } from "./runtime-overrides.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";
|
|
9
10
|
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";
|
|
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
11
|
import { init_loader, loadConfig, saveConfig } from "./loader.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
|
|
13
|
+
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";
|
|
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,10 +2,10 @@ 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_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
6
5
|
import { init_paths, resolveConfigPath } from "./paths.js";
|
|
7
|
-
import {
|
|
6
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
8
7
|
import { assertChannelPluginConfigs, init_validate_channel_configs } from "./validate-channel-configs.js";
|
|
8
|
+
import { init_resolution, setActivePlatformDiscovery } from "../platform/resolution.js";
|
|
9
9
|
import { dirname } from "path";
|
|
10
10
|
import { existsSync, mkdirSync, promises, readFileSync } from "fs";
|
|
11
11
|
import { config } from "dotenv";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { ComputerProfileSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
3
|
-
import { init_write_file_atomic, writeTextAtomicSync } from "../infra/write-file-atomic.js";
|
|
4
2
|
import { init_paths, resolveModelsJsonPath } from "./paths.js";
|
|
3
|
+
import { init_write_file_atomic, writeTextAtomicSync } from "../infra/write-file-atomic.js";
|
|
4
|
+
import { ComputerProfileSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
5
5
|
import { init_model_policy, isComputerModel } from "../computer/model-policy.js";
|
|
6
6
|
import { existsSync, readFileSync } from "fs";
|
|
7
7
|
import { z } from "zod";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { ComputerConfigSchema, init_config } from "../computer/config.js";
|
|
2
3
|
import { AgentModelsOverrideSchema, AgentsConfigSchema as AgentsConfigSchema$1, DEFAULT_AGENT_MODEL_REF, ImageGenerationRouteSchema, ModelRouteSchema } from "../agent-config/schema.js";
|
|
3
4
|
import { init_agent_config } from "../agent-config/index.js";
|
|
4
|
-
import { ComputerConfigSchema, init_config } from "../computer/config.js";
|
|
5
5
|
import { DEFAULT_CONTEXT_COMPACTION_POLICY, UserContextConfigSchema, init_config as init_config$1 } from "../user-context/config.js";
|
|
6
6
|
import { init_default_model } from "./default-model.js";
|
|
7
7
|
import { init_public_url, validatePublicUrl } from "./public-url.js";
|