@xopcai/xopc 0.0.18 → 0.0.20
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/extensions/telegram/src/plugin.js +1 -1
- package/dist/extensions/telegram/src/routing-integration.js +2 -2
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/plugin.js +1 -1
- package/dist/gateway/static/root/assets/{agents-D1c5jt8x.js → agents-DbLV2ldC.js} +2 -2
- package/dist/gateway/static/root/assets/{agents-D1c5jt8x.js.map → agents-DbLV2ldC.js.map} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-bi53w_qy.js → apps-page-CDRSbv3l.js} +2 -2
- package/dist/gateway/static/root/assets/{apps-page-bi53w_qy.js.map → apps-page-CDRSbv3l.js.map} +1 -1
- package/dist/gateway/static/root/assets/{channels-settings-CPWWa4rf.js → channels-settings-DyNnMN1-.js} +2 -2
- package/dist/gateway/static/root/assets/{channels-settings-CPWWa4rf.js.map → channels-settings-DyNnMN1-.js.map} +1 -1
- package/dist/gateway/static/root/assets/{cron-page-CFuU6V8l.js → cron-page-D-fhl446.js} +2 -2
- package/dist/gateway/static/root/assets/{cron-page-CFuU6V8l.js.map → cron-page-D-fhl446.js.map} +1 -1
- package/dist/gateway/static/root/assets/{cron-utils-D7qRCgCo.js → cron-utils-DqyPqEDr.js} +2 -2
- package/dist/gateway/static/root/assets/{cron-utils-D7qRCgCo.js.map → cron-utils-DqyPqEDr.js.map} +1 -1
- package/dist/gateway/static/root/assets/{dist-CS--Aojm.js → dist-BTNDXpKu.js} +2 -2
- package/dist/gateway/static/root/assets/{dist-CS--Aojm.js.map → dist-BTNDXpKu.js.map} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-DkaqKijm.js → extension-debug-page-CiOtMG3X.js} +2 -2
- package/dist/gateway/static/root/assets/{extension-debug-page-DkaqKijm.js.map → extension-debug-page-CiOtMG3X.js.map} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-5WNq5ZxE.js → extension-page-a59AFw7Q.js} +2 -2
- package/dist/gateway/static/root/assets/{extension-page-5WNq5ZxE.js.map → extension-page-a59AFw7Q.js.map} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BM4emw9B.js → extension-settings-page-BQyLvxBY.js} +2 -2
- package/dist/gateway/static/root/assets/{extension-settings-page-BM4emw9B.js.map → extension-settings-page-BQyLvxBY.js.map} +1 -1
- package/dist/gateway/static/root/assets/{index-DJnBAhem.js → index-fGYWcYhm.js} +53 -53
- package/dist/gateway/static/root/assets/{index-DJnBAhem.js.map → index-fGYWcYhm.js.map} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-Du6UoHCK.js → logs-page-DMSWW0-k.js} +2 -2
- package/dist/gateway/static/root/assets/{logs-page-Du6UoHCK.js.map → logs-page-DMSWW0-k.js.map} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-CzTpNrb3.js → sessions-page-CL2E3nPk.js} +2 -2
- package/dist/gateway/static/root/assets/{sessions-page-CzTpNrb3.js.map → sessions-page-CL2E3nPk.js.map} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-jqrVlTkQ.js → settings-page-CSIVMAJE.js} +2 -2
- package/dist/gateway/static/root/assets/settings-page-CSIVMAJE.js.map +1 -0
- package/dist/gateway/static/root/assets/{skills-page-Dg_Uk_jM.js → skills-page-0rmNu4AL.js} +2 -2
- package/dist/gateway/static/root/assets/{skills-page-Dg_Uk_jM.js.map → skills-page-0rmNu4AL.js.map} +1 -1
- package/dist/gateway/static/root/index.html +1 -1
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +6 -6
- package/dist/src/agent/context/workspace-seed.js +1 -1
- package/dist/src/agent/ipc/bus.js +1 -1
- package/dist/src/agent/ipc/inbox.js +1 -1
- package/dist/src/agent/ipc/socket.js +1 -1
- package/dist/src/agent/models/manager.js +1 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +1 -1
- package/dist/src/agent/service.js +4 -4
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/scanner.js +1 -1
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/skills/skill-manager.js +1 -1
- package/dist/src/agent/tools/factory.js +1 -1
- package/dist/src/agent/tools/send-media.js +1 -1
- package/dist/src/agent/tools/skill-manage-tool.js +1 -1
- package/dist/src/agent/tools/write.js +1 -1
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/channels/attachments/inbound-persist.js +1 -1
- package/dist/src/channels/attachments/outbound-tts-persist.js +1 -1
- package/dist/src/chat-commands/builtins/config.js +2 -2
- package/dist/src/chat-commands/context.js +1 -1
- package/dist/src/cli/commands/agent.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/init.js +3 -3
- package/dist/src/config/index.js +2 -2
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/profile.js +2 -2
- package/dist/src/cron/executor.js +2 -2
- package/dist/src/cron/persistence.js +1 -1
- package/dist/src/cron/run-log-store.js +1 -1
- package/dist/src/extensions/health.js +1 -1
- package/dist/src/extensions/loader.js +1 -1
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/hono/oauth.js +1 -1
- package/dist/src/gateway/hono/routes/config.js +1 -1
- package/dist/src/gateway/hono/routes/workspace.js +2 -2
- package/dist/src/gateway/hono/sse.js +2 -2
- package/dist/src/gateway/service.js +4 -4
- package/dist/src/gateway/workspace-heartbeat-path.js +1 -1
- package/dist/src/infra/update-startup.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/session/config-store.js +1 -1
- package/dist/src/session/session-title.js +1 -1
- package/dist/src/session/store.js +3 -3
- package/dist/src/utils/logger/audit.js +1 -1
- package/dist/src/utils/logger/log-store.js +1 -1
- package/dist/src/utils/logger/rotation.js +1 -1
- package/dist/src/voice/tts/audio.js +1 -1
- package/package.json +1 -1
- package/dist/gateway/static/root/assets/settings-page-jqrVlTkQ.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DEFAULT_AGENT_ID, init_agent_scope, resolveAgentBootstrapDir } from "../agent-scope.js";
|
|
2
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
+
import { DEFAULT_AGENT_ID, init_agent_scope, resolveAgentBootstrapDir } from "../agent-scope.js";
|
|
4
4
|
import { WORKSPACE_FILES, init_paths } from "../../config/paths.js";
|
|
5
5
|
import { BOOTSTRAP_FILES } from "./workspace.js";
|
|
6
6
|
import { dirname, join } from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
2
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
4
4
|
import { createResponseMessage, createSignalMessage, createTaskMessage } from "./types.js";
|
|
5
5
|
import { AgentInbox } from "./inbox.js";
|
|
6
6
|
//#region src/agent/ipc/bus.ts
|
|
@@ -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 { init_paths, resolveAgentDir } from "../../config/paths.js";
|
|
4
|
+
import { mkdir, readFile, readdir, rename, writeFile } from "fs/promises";
|
|
4
5
|
import { join } from "path";
|
|
5
6
|
import { existsSync, watch } from "fs";
|
|
6
|
-
import { mkdir, readFile, readdir, rename, writeFile } from "fs/promises";
|
|
7
7
|
//#region src/agent/ipc/inbox.ts
|
|
8
8
|
init_logger();
|
|
9
9
|
init_paths();
|
|
@@ -2,8 +2,8 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { init_paths, resolveSocketPath } from "../../config/paths.js";
|
|
4
4
|
import { isValidIPCMessage } from "./types.js";
|
|
5
|
-
import { dirname } from "path";
|
|
6
5
|
import { mkdir } from "fs/promises";
|
|
6
|
+
import { dirname } from "path";
|
|
7
7
|
import { Socket, createServer } from "net";
|
|
8
8
|
//#region src/agent/ipc/socket.ts
|
|
9
9
|
init_logger();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
2
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
+
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
4
4
|
import { getAllModels, getDefaultModelSync, init_providers, resolveModel } from "../../providers/index.js";
|
|
5
5
|
import { resolveAgentTurnTimeoutMs, runAgentTurnWithTimeout } from "../orchestration/run-agent-turn-with-timeout.js";
|
|
6
6
|
import { isAssistantTurnAborted, isAssistantTurnFailed, maybeRetryTurnAfterTransientLlmFailure } from "../orchestration/llm-turn-retry.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { resolveStateDir } from "../../config/paths-state.js";
|
|
2
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
+
import { resolveStateDir } from "../../config/paths-state.js";
|
|
4
4
|
import { init_paths } from "../../config/paths.js";
|
|
5
5
|
import { DEFAULT_USER_FILENAME, toWorkspaceBootstrapFile } from "../context/workspace.js";
|
|
6
6
|
import { createSkillConfigManager } from "../skills/config.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { runWithLogContext, updateAsyncLogContext } from "../utils/logger/context.js";
|
|
2
|
+
import { createLogger } from "../utils/logger/index.js";
|
|
3
|
+
import { init_logger } from "../utils/logger.js";
|
|
1
4
|
import { init_agent_scope, resolveAgentBootstrapDir, resolveAgentHomeDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
2
5
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
3
|
-
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
4
6
|
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
7
|
+
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
5
8
|
import { extractProfileAgentId, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
6
|
-
import { runWithLogContext, updateAsyncLogContext } from "../utils/logger/context.js";
|
|
7
|
-
import { createLogger } from "../utils/logger/index.js";
|
|
8
|
-
import { init_logger } from "../utils/logger.js";
|
|
9
9
|
import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
10
10
|
import { extractTextContent, loadBootstrapFiles } from "./context/workspace.js";
|
|
11
11
|
import { isTTSAvailable } from "../voice/tts/factory.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { resolveStateDir } from "../../config/paths-state.js";
|
|
2
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
+
import { resolveStateDir } from "../../config/paths-state.js";
|
|
4
4
|
import { init_paths } from "../../config/paths.js";
|
|
5
5
|
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
6
6
|
import { findInstallSpec, getDefaultInstallerPreferences, hasBinary, init_installer, installSkill } from "./installer.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 { join } from "path";
|
|
4
3
|
import { readFile, readdir } from "fs/promises";
|
|
4
|
+
import { join } from "path";
|
|
5
5
|
//#region src/agent/skills/scanner.ts
|
|
6
6
|
/**
|
|
7
7
|
* Skill security scanner — scans skill directories for potentially dangerous code patterns.
|
|
@@ -2,9 +2,9 @@ import { init_paths, resolveSkillsDir } from "../../config/paths.js";
|
|
|
2
2
|
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
3
3
|
import { formatScanSummary, scanSkillDirectory } from "./scanner.js";
|
|
4
4
|
import { fuzzyFindText, normalizeForFuzzyMatch, normalizeToLF, restoreLineEndings } from "../tools/edit-diff.js";
|
|
5
|
+
import { mkdir, writeFile } from "fs/promises";
|
|
5
6
|
import { join, resolve, sep } from "path";
|
|
6
7
|
import { existsSync, realpathSync } from "fs";
|
|
7
|
-
import { mkdir, writeFile } from "fs/promises";
|
|
8
8
|
//#region src/agent/skills/skill-manage-ops.ts
|
|
9
9
|
/**
|
|
10
10
|
* Shared logic for the skill_manage agent tool (create / edit / patch / delete / write_file / remove_file).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { resolveStateDir } from "../../config/paths-state.js";
|
|
2
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
+
import { resolveStateDir } from "../../config/paths-state.js";
|
|
4
4
|
import { init_paths, resolveBundledSkillsDir } from "../../config/paths.js";
|
|
5
5
|
import { createSkillConfigManager, isSkillEnabled } from "./config.js";
|
|
6
6
|
import { formatSkillsForPrompt, selectSkillsVisibleInPrompt } from "./format-skills-prompt.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { init_session_key, parseSessionKey } from "../../routing/session-key.js";
|
|
2
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
+
import { init_session_key, parseSessionKey } from "../../routing/session-key.js";
|
|
4
4
|
import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
5
5
|
import { createReadFileTool } from "./read.js";
|
|
6
6
|
import { createWriteFileTool } from "./write.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
2
2
|
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
3
|
-
import { basename } from "node:path";
|
|
4
3
|
import { readFile } from "fs/promises";
|
|
4
|
+
import { basename } from "node:path";
|
|
5
5
|
import { Type } from "@sinclair/typebox";
|
|
6
6
|
//#region src/agent/tools/send-media.ts
|
|
7
7
|
const SendMediaSchema = Type.Object({
|
|
@@ -2,9 +2,9 @@ import { resolveStateDir } from "../../config/paths-state.js";
|
|
|
2
2
|
import { init_paths } from "../../config/paths.js";
|
|
3
3
|
import { createSkillConfigManager } from "../skills/config.js";
|
|
4
4
|
import { applyPatchToContent, atomicWriteUtf8, effectiveAgentWritePolicy, ensureCategorySegment, isPathInsideDir, maxSkillMdChars, maxSupportFileBytes, mutatableSkillOrNull, resolveCreateSkillDir, scanSkillDirOrError, validateSkillMdContent, validateSkillNameSegment, validateSupportingRelativePath } from "../skills/skill-manage-ops.js";
|
|
5
|
+
import { readFile, rm } from "fs/promises";
|
|
5
6
|
import { join } from "path";
|
|
6
7
|
import { existsSync, rmSync } from "fs";
|
|
7
|
-
import { readFile, rm } from "fs/promises";
|
|
8
8
|
import { Type } from "@sinclair/typebox";
|
|
9
9
|
//#region src/agent/tools/skill-manage-tool.ts
|
|
10
10
|
init_paths();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
2
2
|
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
3
|
-
import { dirname } from "path";
|
|
4
3
|
import { mkdir, writeFile } from "fs/promises";
|
|
4
|
+
import { dirname } from "path";
|
|
5
5
|
import { Type } from "@sinclair/typebox";
|
|
6
6
|
//#region src/agent/tools/write.ts
|
|
7
7
|
const MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
@@ -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 { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.js";
|
|
6
|
-
import {
|
|
5
|
+
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
7
6
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
7
|
+
import { dirname, join } from "path";
|
|
8
8
|
//#region src/auth/credentials.ts
|
|
9
9
|
function getCredentialResolver(options) {
|
|
10
10
|
return new CredentialResolver(options);
|
|
@@ -1,7 +1,7 @@
|
|
|
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
3
|
import { init_loader, loadConfig } from "../config/loader.js";
|
|
4
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
6
|
//#region src/auth/sync-provider-auth.ts
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { join, resolve } from "path";
|
|
4
3
|
import { mkdir, writeFile } from "fs/promises";
|
|
4
|
+
import { join, resolve } from "path";
|
|
5
5
|
import { randomBytes } from "crypto";
|
|
6
6
|
//#region src/channels/attachments/inbound-persist.ts
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { join, resolve } from "path";
|
|
4
3
|
import { mkdir, writeFile } from "fs/promises";
|
|
4
|
+
import { join, resolve } from "path";
|
|
5
5
|
import { randomBytes } from "crypto";
|
|
6
6
|
//#region src/channels/attachments/outbound-tts-persist.ts
|
|
7
7
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
2
|
-
import { init_session_key, parseSessionKey } from "../../routing/session-key.js";
|
|
3
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
4
2
|
import { init_logger } from "../../utils/logger.js";
|
|
5
3
|
import { init_paths, resolveConfigPath } from "../../config/paths.js";
|
|
4
|
+
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
6
5
|
import { init_loader, loadConfig, saveConfig } from "../../config/loader.js";
|
|
6
|
+
import { init_session_key, parseSessionKey } from "../../routing/session-key.js";
|
|
7
7
|
import { resolveAllowlistMatchSimple } from "../../channels/security.js";
|
|
8
8
|
import { commandRegistry } from "../registry.js";
|
|
9
9
|
import { parseConfigValue } from "../config-value.js";
|
|
@@ -4,8 +4,8 @@ import { init_loader, saveConfig } from "../config/loader.js";
|
|
|
4
4
|
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
5
5
|
import { getRoutingInfo, getSessionDisplayName } from "./session-key.js";
|
|
6
6
|
import { wrapMarkdownExportAsHtml } from "../session/chat-export.js";
|
|
7
|
-
import { join } from "path";
|
|
8
7
|
import { mkdir, writeFile } from "fs/promises";
|
|
8
|
+
import { join } from "path";
|
|
9
9
|
//#region src/chat-commands/context.ts
|
|
10
10
|
init_logger();
|
|
11
11
|
init_loader();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getWorkspacePath } from "../../config/schema.js";
|
|
2
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
+
import { getWorkspacePath } from "../../config/schema.js";
|
|
4
4
|
import { loadConfig } from "../../config/loader.js";
|
|
5
5
|
import { MessageBus, MessageBusShutdownError } from "../../infra/bus/queue.js";
|
|
6
6
|
import "../../infra/bus/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "../../../../providers/env-keys.js";
|
|
1
2
|
import { getAgentDefaultModelRef, init_schema, parseModelRef } from "../../../../config/schema.js";
|
|
2
3
|
import { init_loader, loadConfig } from "../../../../config/loader.js";
|
|
3
|
-
import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "../../../../providers/env-keys.js";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
//#region src/cli/commands/doctor/checks/provider-auth.ts
|
|
6
6
|
init_loader();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { resolveStateDir } from "../../config/paths-state.js";
|
|
2
|
-
import { resolveAgentBootstrapDir, resolveAgentWorkspaceDir } from "../../agent/agent-scope.js";
|
|
3
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
4
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
+
import { resolveStateDir } from "../../config/paths-state.js";
|
|
4
|
+
import { resolveAgentBootstrapDir, resolveAgentWorkspaceDir } from "../../agent/agent-scope.js";
|
|
5
5
|
import { WORKSPACE_FILES, init_paths, resolveAgentDir, resolveAgentHomeDir, resolveAgentMetadataPath, resolveBinDir, resolveConfigPath, resolveCredentialsDir, resolveCronDir, resolveExtensionsDir, resolveInboxDir, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogsDir, resolveSessionsDir, resolveSkillsDir, resolveToolsDir, resolveWorkspaceStateDir, resolveWorkspaceStatePath } from "../../config/paths.js";
|
|
6
6
|
import { init_loader, loadConfig, saveConfig } from "../../config/loader.js";
|
|
7
|
+
import { mkdir, writeFile } from "fs/promises";
|
|
7
8
|
import { join } from "path";
|
|
8
9
|
import { existsSync } from "fs";
|
|
9
|
-
import { mkdir, writeFile } from "fs/promises";
|
|
10
10
|
//#region src/cli/commands/init.ts
|
|
11
11
|
init_logger();
|
|
12
12
|
init_paths();
|
package/dist/src/config/index.js
CHANGED
|
@@ -2,13 +2,13 @@ import { ENV_VARS, resolveHomeDir, resolveStateDir } from "./paths-state.js";
|
|
|
2
2
|
import { expandWorkspacePathString, init_workspace_path, normalizeWorkspaceDir, resolveWorkspaceRoot } from "./workspace-path.js";
|
|
3
3
|
import { resolveDefaultAgentWorkspaceDir } from "./workspace-defaults.js";
|
|
4
4
|
import { resolveAgentBootstrapDir, resolveAgentDir as resolveAgentDir$1, resolveAgentHomeDir as resolveAgentHomeDir$1, resolveAgentWorkspaceDir, resolveSessionsDir as resolveSessionsDir$1 } from "../agent/agent-scope.js";
|
|
5
|
+
import { FILENAMES, WORKSPACE_FILES, existsSync, init_paths, resolveAgentAuthProfilesPath, resolveAgentCredentialsDir, resolveAgentDir, resolveAgentHomeDir, resolveAgentMetadataPath, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveCredentialsDir, resolveCronDir, resolveCronJobsPath, resolveCronLogPath, resolveCronLogsDir, resolveCronRunsDir, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveMemoryDir, resolveMemoryPath, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveSessionTranscriptPath, resolveSessionTranscriptPathInDir, resolveSessionsArchiveDir, resolveSessionsDir, resolveSessionsIndexPath, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath } from "./paths.js";
|
|
5
6
|
import { TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema } from "../../extensions/telegram/src/config-schema.js";
|
|
6
7
|
import { WeixinAccountConfigSchema, WeixinConfigSchema } from "../../extensions/weixin/src/config-schema.js";
|
|
7
8
|
import { AgentConfigSchema, AgentDefaultsSchema, AgentModelRefSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, ChannelsConfigSchema, ConfigSchema, CronConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayConfigSchema, HeartbeatConfigSchema, ModelsDevConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, ToolsConfigSchema, UpdateAutoConfigSchema, UpdateConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, getAgentDefaultModelRef, getWorkspacePath, init_schema, parseModelRef } from "./schema.js";
|
|
9
|
+
import { init_loader, loadConfig, registerChannelConfigValidator, saveConfig } from "./loader.js";
|
|
8
10
|
import { applyConfigOverrides, getConfigOverrides, resetConfigOverrides, setConfigOverride, unsetConfigOverride } from "./runtime-overrides.js";
|
|
9
11
|
import { extractProfileAgentId, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
|
|
10
|
-
import { FILENAMES, WORKSPACE_FILES, existsSync, init_paths, resolveAgentAuthProfilesPath, resolveAgentCredentialsDir, resolveAgentDir, resolveAgentHomeDir, resolveAgentMetadataPath, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveCredentialsDir, resolveCronDir, resolveCronJobsPath, resolveCronLogPath, resolveCronLogsDir, resolveCronRunsDir, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveMemoryDir, resolveMemoryPath, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveSessionTranscriptPath, resolveSessionTranscriptPathInDir, resolveSessionsArchiveDir, resolveSessionsDir, resolveSessionsIndexPath, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath } from "./paths.js";
|
|
11
|
-
import { init_loader, loadConfig, registerChannelConfigValidator, saveConfig } from "./loader.js";
|
|
12
12
|
import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
|
|
13
13
|
import { CustomModelSchema, ModelOverrideSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProviderConfigSchema, VercelGatewayRoutingSchema, getDefaultModelValues, init_models_json, loadModelsJson, modelsJsonExists, saveModelsJson, validateModelsConfig } from "./models-json.js";
|
|
14
14
|
import { formatThinkingLevels, listThinkingLevels, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, thinkLevelToNumber } from "../agent/transcript/thinking-types.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { ConfigSchema, init_schema } from "./schema.js";
|
|
3
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
4
3
|
import { init_logger } from "../utils/logger.js";
|
|
5
4
|
import { init_paths, resolveConfigPath } from "./paths.js";
|
|
5
|
+
import { ConfigSchema, init_schema } from "./schema.js";
|
|
6
6
|
import { dirname } from "path";
|
|
7
7
|
import { existsSync, mkdirSync, promises, readFileSync } from "fs";
|
|
8
8
|
import { config } from "dotenv";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { init_paths, resolveModelsJsonPath } from "./paths.js";
|
|
3
|
-
import { z } from "zod";
|
|
4
3
|
import { dirname } from "path";
|
|
5
4
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
5
|
+
import { z } from "zod";
|
|
6
6
|
//#region src/config/models-json.ts
|
|
7
7
|
/**
|
|
8
8
|
* Models.json configuration types and schema
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ENV_VARS, init_paths_state, resolveHomeDir } from "./paths-state.js";
|
|
2
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { ENV_VARS, init_paths_state, resolveHomeDir } from "./paths-state.js";
|
|
4
|
+
import { mkdir, readdir, rm, stat } from "fs/promises";
|
|
4
5
|
import { join } from "path";
|
|
5
6
|
import { existsSync } from "fs";
|
|
6
|
-
import { mkdir, readdir, rm, stat } from "fs/promises";
|
|
7
7
|
//#region src/config/profile.ts
|
|
8
8
|
init_logger();
|
|
9
9
|
init_paths_state();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { init_agent_scope, normalizeAgentId } from "../agent/agent-scope.js";
|
|
2
|
-
import { buildSessionKey, init_session_key } from "../routing/session-key.js";
|
|
3
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
4
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { init_agent_scope, normalizeAgentId } from "../agent/agent-scope.js";
|
|
4
|
+
import { buildSessionKey, init_session_key } from "../routing/session-key.js";
|
|
5
5
|
import { bundledChannelPlugins } from "../generated/bundled-channel-plugins.js";
|
|
6
6
|
import { shouldSilence, stripHeartbeatToken } from "../heartbeat/tokens.js";
|
|
7
7
|
import { getChannelPlugin, listChannelPlugins, syncChannelPluginsFromManager } from "../channels/plugins/registry.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 { JobDataSchema } from "./validation.js";
|
|
4
|
-
import { dirname } from "path";
|
|
5
4
|
import { access, mkdir, readFile, rename, unlink, writeFile } from "fs/promises";
|
|
5
|
+
import { dirname } from "path";
|
|
6
6
|
//#region src/cron/persistence.ts
|
|
7
7
|
init_logger();
|
|
8
8
|
const log = createLogger("CronPersistence");
|
|
@@ -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_paths, resolveCronRunsDir } from "../config/paths.js";
|
|
4
|
-
import { join } from "path";
|
|
5
4
|
import { appendFile, mkdir, readFile, readdir, unlink, writeFile } from "fs/promises";
|
|
5
|
+
import { join } from "path";
|
|
6
6
|
//#region src/cron/run-log-store.ts
|
|
7
7
|
init_paths();
|
|
8
8
|
init_logger();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_paths, resolveExtensionsDir } from "../config/paths.js";
|
|
2
2
|
import { getExtensionLockfileManager } from "./lockfile.js";
|
|
3
|
+
import { readFile, readdir } from "fs/promises";
|
|
3
4
|
import { join } from "path";
|
|
4
5
|
import { existsSync } from "fs";
|
|
5
|
-
import { readFile, readdir } from "fs/promises";
|
|
6
6
|
//#region src/extensions/health.ts
|
|
7
7
|
init_paths();
|
|
8
8
|
var ExtensionHealthChecker = class {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { init_agent_scope, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
2
1
|
import { createLogger, createServiceLogger } from "../utils/logger/index.js";
|
|
3
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { init_agent_scope, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
4
4
|
import { init_paths, resolveBundledExtensionsDir, resolveExtensionSdkPath, resolveExtensionsDir, resolveWorkspaceExtensionsDir } from "../config/paths.js";
|
|
5
5
|
import { init_loader, loadConfig } from "../config/loader.js";
|
|
6
6
|
import { getProviderRegistry, init_plugin_registry } from "../providers/plugin-registry.js";
|
|
@@ -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 { init_paths, resolveExtensionsDir, resolveExtensionsLockPath } from "../config/paths.js";
|
|
4
|
+
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
4
5
|
import { dirname, join } from "path";
|
|
5
6
|
import { existsSync } from "fs";
|
|
6
|
-
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
7
7
|
import { createHash } from "crypto";
|
|
8
8
|
//#region src/extensions/lockfile.ts
|
|
9
9
|
init_logger();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_AGENT_ID, init_agent_scope, listAgentEntries, normalizeAgentId, resolveAgentBootstrapDir, resolveAgentDir, 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 { BOOTSTRAP_FILES } from "../agent/context/workspace.js";
|
|
5
5
|
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
6
6
|
import { seedWorkspaceBootstrapFiles } from "../agent/context/workspace-seed.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
2
|
-
import { init_providers, isProviderConfigured } from "../../providers/index.js";
|
|
3
2
|
import { anthropicOAuthProvider } from "../../auth/oauth/anthropic.js";
|
|
3
|
+
import { init_providers, isProviderConfigured } from "../../providers/index.js";
|
|
4
4
|
import { minimaxOAuthProvider } from "../../auth/oauth/minimax.js";
|
|
5
5
|
import { minimaxCnOAuthProvider } from "../../auth/oauth/minimax-cn.js";
|
|
6
6
|
import { kimiCodingOAuthProvider } from "../../auth/oauth/kimi-coding.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BindingsConfigSchema, init_schema } from "../../../config/schema.js";
|
|
2
1
|
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
2
|
+
import { BindingsConfigSchema, init_schema } from "../../../config/schema.js";
|
|
3
3
|
import { normalizePatchAgentModel } from "../lib/agent-model.js";
|
|
4
4
|
import { applyToolsWebPatch } from "../../config-tools-web.js";
|
|
5
5
|
import { buildSafeWebConfigPayload } from "../lib/config-payload.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { createLogger } from "../../../utils/logger/index.js";
|
|
2
|
+
import { init_logger } from "../../../utils/logger.js";
|
|
1
3
|
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveAgentHomeDir, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../../agent/agent-scope.js";
|
|
2
4
|
import { getWorkspacePath, init_schema } from "../../../config/schema.js";
|
|
3
5
|
import { extractProfileAgentId } from "../../../config/agent-profile.js";
|
|
4
|
-
import { createLogger } from "../../../utils/logger/index.js";
|
|
5
|
-
import { init_logger } from "../../../utils/logger.js";
|
|
6
6
|
import { resolveSafeInboundFilePath } from "../../../channels/attachments/inbound-persist.js";
|
|
7
7
|
import { isPathUnderWorkspace, resolveWorkspaceSafePath, toWorkspaceRelativePosix } from "../../workspace-editor-path.js";
|
|
8
8
|
import { resolveSafeTtsFilePath } from "../../../channels/attachments/outbound-tts-persist.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { buildSessionKey, init_session_key, parseSessionKey } from "../../routing/session-key.js";
|
|
2
|
-
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
3
1
|
import { updateAsyncLogContext } from "../../utils/logger/context.js";
|
|
4
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
5
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
|
+
import { buildSessionKey, init_session_key, parseSessionKey } from "../../routing/session-key.js";
|
|
5
|
+
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
6
6
|
import { MAX_WEBCHAT_ATTACHMENT_FILE_BYTES } from "../chat-limits.js";
|
|
7
7
|
import { stringifySSEData } from "./sse-json.js";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { __toCommonJS } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { PACKAGE_VERSION, init_package_version } from "../package-version.js";
|
|
3
|
-
import { resolveStateDir } from "../config/paths-state.js";
|
|
4
|
-
import { getWorkspacePath, init_schema } from "../config/schema.js";
|
|
5
|
-
import { buildSessionKey, init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
6
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
7
3
|
import { getLogDir } from "../utils/logger/config.js";
|
|
8
4
|
import { getLogStats } from "../utils/logger/stats.js";
|
|
9
5
|
import { inboundCorrelationMetadataFromAsyncLogContext } from "../utils/logger/context.js";
|
|
10
6
|
import { createLogger } from "../utils/logger/index.js";
|
|
11
7
|
import { init_logger } from "../utils/logger.js";
|
|
8
|
+
import { resolveStateDir } from "../config/paths-state.js";
|
|
12
9
|
import { init_paths, resolveAgentDir, resolveConfigPath, resolveCronJobsPath, resolveWorkspaceExtensionsDir } from "../config/paths.js";
|
|
10
|
+
import { getWorkspacePath, init_schema } from "../config/schema.js";
|
|
13
11
|
import { loadConfig, saveConfig } from "../config/loader.js";
|
|
12
|
+
import { buildSessionKey, init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
13
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
14
14
|
import { getModelRegistry } from "../providers/model-registry.js";
|
|
15
15
|
import { init_providers, providers_exports } from "../providers/index.js";
|
|
16
16
|
import { createSkillConfigManager } from "../agent/skills/config.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { init_agent_scope, resolveAgentBootstrapDir, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
2
|
-
import { getWorkspacePath, init_schema } from "../config/schema.js";
|
|
3
2
|
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
3
|
+
import { getWorkspacePath, init_schema } from "../config/schema.js";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
//#region src/gateway/workspace-heartbeat-path.ts
|
|
6
6
|
init_schema();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PACKAGE_VERSION, init_package_version } from "../package-version.js";
|
|
2
|
-
import { resolveStateDir } from "../config/paths-state.js";
|
|
3
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
4
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
|
+
import { resolveStateDir } from "../config/paths-state.js";
|
|
5
5
|
import { init_paths } from "../config/paths.js";
|
|
6
6
|
import { normalizeUpdateChannel } from "./update-channels.js";
|
|
7
7
|
import { compareSemver, detectInstallKind, resolveNpmChannelTag, resolvePackageRoot } from "./update-check.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin, __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync-provider-auth.js";
|
|
3
2
|
import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
|
|
4
|
-
import { ModelRegistry, getModelRegistry, init_model_registry, resetModelRegistry } from "./model-registry.js";
|
|
5
3
|
import { CredentialResolver, hasCredentials, init_credentials, resolveApiKey } from "../auth/credentials.js";
|
|
4
|
+
import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync-provider-auth.js";
|
|
5
|
+
import { ModelRegistry, getModelRegistry, init_model_registry, resetModelRegistry } from "./model-registry.js";
|
|
6
6
|
import { getProviderRegistry, init_plugin_registry } from "./plugin-registry.js";
|
|
7
7
|
import { getModel, getModels, getProviders } from "@mariozechner/pi-ai";
|
|
8
8
|
//#region src/providers/index.ts
|
|
@@ -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 { getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
|
|
4
5
|
import { resolveModelsJsonPath } from "../config/paths.js";
|
|
5
6
|
import { init_resolve_config_value, resolveConfigValue, resolveHeaders } from "../config/resolve-config-value.js";
|
|
6
7
|
import { getDefaultModelValues, init_models_json, validateModelsConfig } from "../config/models-json.js";
|
|
7
|
-
import { getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
|
|
8
8
|
import { existsSync, readFileSync } from "fs";
|
|
9
9
|
import { getModels, getProviders } from "@mariozechner/pi-ai";
|
|
10
10
|
//#region src/providers/model-registry.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
3
4
|
import { join } from "path";
|
|
4
5
|
import { existsSync } from "fs";
|
|
5
|
-
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
6
6
|
//#region src/session/config-store.ts
|
|
7
7
|
/**
|
|
8
8
|
* Session Config Store
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { init_session_key, isCronSessionKey, parseSessionKey } from "../routing/session-key.js";
|
|
2
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { init_session_key, isCronSessionKey, parseSessionKey } from "../routing/session-key.js";
|
|
4
4
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
5
5
|
import { stripInboundFileMetadataFromText } from "../channels/attachments/inbound-persist.js";
|
|
6
6
|
import { stripEnvelopeTimestampPrefix } from "../channels/envelope-timestamp.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { init_agent_scope, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
2
|
-
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
3
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
4
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
5
4
|
import { FILENAMES, init_paths, resolveSessionsDir } from "../config/paths.js";
|
|
5
|
+
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
6
6
|
import { invalidateSessionSearchIndexCache } from "./search-index-cache.js";
|
|
7
7
|
import { resolveSessionShardRelativePath } from "./shard-path.js";
|
|
8
8
|
import "./types.js";
|
|
9
9
|
import { SessionCompactor } from "../agent/memory/compaction.js";
|
|
10
10
|
import { SlidingWindow } from "../agent/memory/window.js";
|
|
11
11
|
import { cleanTrailingErrors, hasProblematicMessages } from "../agent/memory/message-sanitizer.js";
|
|
12
|
+
import { mkdir, readFile, readdir, stat, unlink, writeFile } from "fs/promises";
|
|
12
13
|
import { basename, join } from "path";
|
|
13
14
|
import { existsSync } from "fs";
|
|
14
|
-
import { mkdir, readFile, readdir, stat, unlink, writeFile } from "fs/promises";
|
|
15
15
|
//#region src/session/store.ts
|
|
16
16
|
init_paths();
|
|
17
17
|
init_agent_scope();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { getLogDir, init_config } from "./config.js";
|
|
3
|
+
import { appendFile } from "fs/promises";
|
|
3
4
|
import path from "path";
|
|
4
5
|
import { existsSync, mkdirSync } from "fs";
|
|
5
|
-
import { appendFile } from "fs/promises";
|
|
6
6
|
//#region src/utils/logger/audit.ts
|
|
7
7
|
/**
|
|
8
8
|
* Audit Log
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { readFile } from "fs/promises";
|
|
1
2
|
import { basename, join } from "path";
|
|
2
3
|
import { createReadStream, existsSync, mkdirSync, readdirSync, statSync, unlinkSync } from "fs";
|
|
3
|
-
import { readFile } from "fs/promises";
|
|
4
4
|
import { gunzip } from "zlib";
|
|
5
5
|
import { promisify } from "util";
|
|
6
6
|
import { createInterface } from "readline";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { config, getLogDir, init_config } from "./config.js";
|
|
3
|
+
import { writeFile } from "fs/promises";
|
|
3
4
|
import { join } from "path";
|
|
4
5
|
import { readFileSync, readdirSync, statSync, unlinkSync } from "fs";
|
|
5
|
-
import { writeFile } from "fs/promises";
|
|
6
6
|
import { gzip } from "zlib";
|
|
7
7
|
import { promisify } from "util";
|
|
8
8
|
//#region src/utils/logger/rotation.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 { join } from "path";
|
|
4
3
|
import { unlink, writeFile } from "fs/promises";
|
|
4
|
+
import { join } from "path";
|
|
5
5
|
import { spawn } from "child_process";
|
|
6
6
|
import { tmpdir } from "os";
|
|
7
7
|
//#region src/voice/tts/audio.ts
|