@xopcai/xopc 0.0.52 → 0.0.53
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/dingtalk/src/plugin.js +1 -1
- package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
- 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/api/api.js +2 -2
- package/dist/extensions/weixin/src/auth/accounts.js +1 -1
- package/dist/extensions/weixin/src/cdn/upload.js +1 -1
- package/dist/extensions/weixin/src/media/data-url.js +1 -1
- package/dist/extensions/weixin/src/messaging/debug-mode.js +1 -1
- package/dist/extensions/weixin/src/messaging/inbound.js +1 -1
- package/dist/extensions/weixin/src/messaging/process-message.js +1 -1
- package/dist/extensions/weixin/src/plugin.js +1 -1
- package/dist/extensions/weixin/src/storage/sync-buf.js +1 -1
- package/dist/gateway/static/root/assets/{agents-CLNe-mJX.js → agents-Dk8idifM.js} +2 -2
- package/dist/gateway/static/root/assets/{agents-CLNe-mJX.js.map → agents-Dk8idifM.js.map} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-c5XF02ek.js → apps-page-C4_ekFnF.js} +2 -2
- package/dist/gateway/static/root/assets/{apps-page-c5XF02ek.js.map → apps-page-C4_ekFnF.js.map} +1 -1
- package/dist/gateway/static/root/assets/{channels-settings-BTgdsBM4.js → channels-settings-BoRUNSby.js} +2 -2
- package/dist/gateway/static/root/assets/{channels-settings-BTgdsBM4.js.map → channels-settings-BoRUNSby.js.map} +1 -1
- package/dist/gateway/static/root/assets/{cron-dreaming-jobs-CiQJHx3s.js → cron-dreaming-jobs-DjK4YEV9.js} +2 -2
- package/dist/gateway/static/root/assets/{cron-dreaming-jobs-CiQJHx3s.js.map → cron-dreaming-jobs-DjK4YEV9.js.map} +1 -1
- package/dist/gateway/static/root/assets/{cron-page-DJOj7JWb.js → cron-page-wQAlt7WL.js} +2 -2
- package/dist/gateway/static/root/assets/{cron-page-DJOj7JWb.js.map → cron-page-wQAlt7WL.js.map} +1 -1
- package/dist/gateway/static/root/assets/{dist-BY3E71wk.js → dist-DfWs1l6V.js} +2 -2
- package/dist/gateway/static/root/assets/{dist-BY3E71wk.js.map → dist-DfWs1l6V.js.map} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-DzkYBiW-.js → extension-debug-page-DKpIM74M.js} +2 -2
- package/dist/gateway/static/root/assets/{extension-debug-page-DzkYBiW-.js.map → extension-debug-page-DKpIM74M.js.map} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-yF0LIy5D.js → extension-page-DR980mtQ.js} +2 -2
- package/dist/gateway/static/root/assets/{extension-page-yF0LIy5D.js.map → extension-page-DR980mtQ.js.map} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CS_Y4y3w.js → extension-settings-page-CZWcC3OA.js} +2 -2
- package/dist/gateway/static/root/assets/{extension-settings-page-CS_Y4y3w.js.map → extension-settings-page-CZWcC3OA.js.map} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-config-api-DD2LdM_Q.js → heartbeat-config-api-D4vLbsOG.js} +2 -2
- package/dist/gateway/static/root/assets/{heartbeat-config-api-DD2LdM_Q.js.map → heartbeat-config-api-D4vLbsOG.js.map} +1 -1
- package/dist/gateway/static/root/assets/{index-V5ZnG6RE.js → index-DZLKmP08.js} +4 -4
- package/dist/gateway/static/root/assets/{index-V5ZnG6RE.js.map → index-DZLKmP08.js.map} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-D79WclZL.js → logs-page-f_viqgaf.js} +2 -2
- package/dist/gateway/static/root/assets/{logs-page-D79WclZL.js.map → logs-page-f_viqgaf.js.map} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-R_QJy3OK.js → sessions-page-DW2-c8fv.js} +2 -2
- package/dist/gateway/static/root/assets/{sessions-page-R_QJy3OK.js.map → sessions-page-DW2-c8fv.js.map} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-CGaj_9Qb.js → settings-page-D7-piKSc.js} +2 -2
- package/dist/gateway/static/root/assets/{settings-page-CGaj_9Qb.js.map → settings-page-D7-piKSc.js.map} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-UzbTgnVY.js → skills-page-ChpOJZM1.js} +2 -2
- package/dist/gateway/static/root/assets/{skills-page-UzbTgnVY.js.map → skills-page-ChpOJZM1.js.map} +1 -1
- package/dist/gateway/static/root/assets/{use-image-provider-credentials-DAx__u3a.js → use-image-provider-credentials-131rA-SV.js} +2 -2
- package/dist/gateway/static/root/assets/{use-image-provider-credentials-DAx__u3a.js.map → use-image-provider-credentials-131rA-SV.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 +2 -2
- package/dist/src/agent/goals/post-turn.js +1 -1
- package/dist/src/agent/image/load-image-media.js +1 -1
- package/dist/src/agent/ipc/bus.js +1 -1
- package/dist/src/agent/ipc/inbox.js +2 -2
- package/dist/src/agent/ipc/socket.js +1 -1
- package/dist/src/agent/memory/builtin-memory-store.js +1 -1
- package/dist/src/agent/memory/dreaming/deep-promotion.js +1 -1
- package/dist/src/agent/memory/dreaming/events.js +1 -1
- package/dist/src/agent/memory/dreaming/last-run.js +1 -1
- package/dist/src/agent/memory/dreaming/light-sweep.js +1 -1
- package/dist/src/agent/memory/dreaming/preview.js +1 -1
- package/dist/src/agent/memory/dreaming/rem-patterns.js +1 -1
- package/dist/src/agent/memory/dreaming/short-term-store.js +1 -1
- package/dist/src/agent/memory/dreaming/utils.js +1 -1
- package/dist/src/agent/memory/plugin-discovery.js +1 -1
- package/dist/src/agent/models/manager.js +1 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +2 -2
- package/dist/src/agent/service.js +5 -5
- package/dist/src/agent/skills/config.js +1 -1
- package/dist/src/agent/skills/hub-hash.js +2 -2
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/skills/hub-pull.js +1 -1
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/managed-store.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/dreaming-tool.js +1 -1
- package/dist/src/agent/tools/factory.js +1 -1
- package/dist/src/agent/tools/image-generate-tool.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 +3 -3
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/browser/providers/extension.js +37 -3
- package/dist/src/browser/providers/extension.js.map +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/channels/outbound/persist-store.js +1 -1
- package/dist/src/channels/pairing/allow-from-file.js +1 -1
- package/dist/src/channels/pairing/pairing-store.js +2 -2
- 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/config.js +1 -1
- package/dist/src/cli/commands/doctor/checks/config-health.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/doctor/checks/session-integrity.js +1 -1
- package/dist/src/cli/commands/doctor/checks/state-integrity.js +1 -1
- package/dist/src/cli/commands/doctor/checks/workspace-status.js +1 -1
- package/dist/src/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/extension-pack.js +1 -1
- package/dist/src/cli/commands/image.js +1 -1
- package/dist/src/cli/commands/init.js +4 -4
- package/dist/src/cli/utils/init-workspace.js +2 -2
- package/dist/src/config/index.js +3 -3
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.js +2 -2
- 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/daemon/launchd.js +2 -2
- package/dist/src/daemon/systemd.js +2 -2
- package/dist/src/extensions/health.js +1 -1
- package/dist/src/extensions/loader.js +1 -1
- package/dist/src/extensions/lockfile.js +2 -2
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/hono/lib/extension-store.js +1 -1
- package/dist/src/gateway/hono/lib/static-ui.js +1 -1
- package/dist/src/gateway/hono/oauth.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/config.js +1 -1
- package/dist/src/gateway/hono/routes/dreaming.js +1 -1
- package/dist/src/gateway/hono/routes/host-fs.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/workspace.js +3 -3
- package/dist/src/gateway/hono/sse.js +2 -2
- package/dist/src/gateway/lock.js +2 -2
- package/dist/src/gateway/service/run-gateway-agent.js +2 -2
- package/dist/src/gateway/service.js +18 -9
- package/dist/src/gateway/service.js.map +1 -1
- package/dist/src/gateway/workspace-fs-file-list.js +1 -1
- package/dist/src/gateway/workspace-heartbeat-path.js +1 -1
- package/dist/src/infra/update-check.js +1 -1
- package/dist/src/infra/update-lock.js +3 -3
- package/dist/src/infra/update-runner.js +1 -1
- package/dist/src/infra/update-startup.js +2 -2
- package/dist/src/infra/write-file-atomic.js +2 -2
- package/dist/src/providers/auth-runtime/auth-profile-store.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 +2 -2
- package/dist/src/session/parity/jsonl-transcript-io.js +2 -2
- package/dist/src/session/parity/sessions-json-file.js +1 -1
- package/dist/src/session/parity/transcript-file-lock.js +2 -2
- package/dist/src/session/parity/transcript-paths.js +1 -1
- package/dist/src/session/search-index-cache.js +1 -1
- package/dist/src/session/search-index.js +1 -1
- package/dist/src/session/session-title.js +1 -1
- package/dist/src/session/store.js +4 -4
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/tui/tui.js +1 -1
- 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/dist/src/voice/tts/providers/edge-speech.js +1 -1
- package/package.json +1 -1
|
@@ -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,6 +1,6 @@
|
|
|
1
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
1
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
3
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
4
4
|
import { JobDataSchema } from "./validation.js";
|
|
5
5
|
import { access, readFile } from "fs/promises";
|
|
6
6
|
//#region src/cron/persistence.ts
|
|
@@ -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,10 +1,10 @@
|
|
|
1
1
|
import { __esmMin, __exportAll } 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 path from "node:path";
|
|
5
|
-
import os from "node:os";
|
|
6
4
|
import { existsSync } from "node:fs";
|
|
7
5
|
import { access, constants as constants$1, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import os from "node:os";
|
|
8
8
|
import { spawn, spawnSync } from "node:child_process";
|
|
9
9
|
//#region src/daemon/launchd.ts
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __esmMin, __exportAll } 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 path from "node:path";
|
|
5
|
-
import os from "node:os";
|
|
6
4
|
import { existsSync } from "node:fs";
|
|
7
5
|
import { access, constants as constants$1, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import os from "node:os";
|
|
8
8
|
import { execSync, spawn, spawnSync } from "node:child_process";
|
|
9
9
|
//#region src/daemon/systemd.ts
|
|
10
10
|
/**
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
import { PACKAGE_VERSION, init_package_version } from "../package-version.js";
|
|
2
|
-
import { init_agent_scope, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
3
2
|
import { createLogger, createServiceLogger } from "../utils/logger/index.js";
|
|
4
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
|
+
import { init_agent_scope, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
5
5
|
import { init_paths, resolveBundledExtensionsDir, resolveExtensionSdkPath, resolveExtensionsDir, resolveWorkspaceExtensionsDir } from "../config/paths.js";
|
|
6
6
|
import { init_loader, loadConfig } from "../config/loader.js";
|
|
7
7
|
import { getProviderRegistry, init_plugin_registry } from "../providers/plugin-registry.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
1
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
3
|
import { init_logger } from "../utils/logger.js";
|
|
3
4
|
import { init_paths, resolveExtensionsDir, resolveExtensionsLockPath } from "../config/paths.js";
|
|
4
|
-
import {
|
|
5
|
+
import { mkdir, readFile } from "fs/promises";
|
|
5
6
|
import { dirname, join } from "path";
|
|
6
7
|
import { existsSync } from "fs";
|
|
7
|
-
import { mkdir, readFile } from "fs/promises";
|
|
8
8
|
import { createHash } from "crypto";
|
|
9
9
|
//#region src/extensions/lockfile.ts
|
|
10
10
|
init_write_file_atomic();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { DEFAULT_AGENT_ID, init_agent_scope, listAgentEntries, normalizeAgentId, 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 { AGENT_PROFILE_MARKDOWN_SYSTEM_FILES } from "../agent/context/workspace.js";
|
|
5
5
|
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
6
6
|
import { seedWorkspaceProfileMarkdownFiles } from "../agent/context/workspace-seed.js";
|
|
7
7
|
import { applyAgentConfig, findAgentEntryIndex, pruneAgentConfig, removeAgentDirsFromDisk } from "../commands/agents.config.js";
|
|
8
8
|
import { GATEWAY_BUILTIN_TOOL_IDS } from "./agent-builtin-tools.js";
|
|
9
|
-
import { join, resolve } from "node:path";
|
|
10
9
|
import { mkdir, readFile, realpath, stat, unlink, writeFile } from "node:fs/promises";
|
|
10
|
+
import { join, resolve } from "node:path";
|
|
11
11
|
//#region src/gateway/agents-admin.ts
|
|
12
12
|
/**
|
|
13
13
|
* Gateway REST helpers for multi-agent management.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { init_write_file_atomic, writeTextAtomic } from "../../../infra/write-file-atomic.js";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
2
3
|
import { join } from "node:path";
|
|
3
4
|
import { homedir } from "node:os";
|
|
4
|
-
import { readFile } from "node:fs/promises";
|
|
5
5
|
//#region src/gateway/hono/lib/extension-store.ts
|
|
6
6
|
init_write_file_atomic();
|
|
7
7
|
/** Extension UI: write-through JSON KV per namespace under ~/.xopc/extensions/{namespace}/storage.json */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { dirname, resolve } from "node:path";
|
|
2
1
|
import { readFileSync } from "node:fs";
|
|
2
|
+
import { dirname, resolve } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
//#region src/gateway/hono/lib/static-ui.ts
|
|
5
5
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
@@ -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";
|
|
@@ -7,8 +7,8 @@ import { createOAuthHandler } from "../oauth.js";
|
|
|
7
7
|
import { createOAuthAsyncHandler } from "../oauth-async.js";
|
|
8
8
|
import { extensionAssetMimeType } from "../lib/extension-assets.js";
|
|
9
9
|
import { loadExtensionStore, saveExtensionStore } from "../lib/extension-store.js";
|
|
10
|
-
import { relative, resolve } from "node:path";
|
|
11
10
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
11
|
+
import { relative, resolve } from "node:path";
|
|
12
12
|
//#region src/gateway/hono/routes/auth-registry-extensions.ts
|
|
13
13
|
init_providers();
|
|
14
14
|
const EXTENSION_ASSET_CSP = "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; connect-src 'none'; frame-ancestors 'self'; frame-src 'none'; base-uri 'none'; object-src 'none'; form-action 'none'";
|
|
@@ -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 { normalizePatchAgentImageGenerationModel, normalizePatchAgentModel } from "../lib/agent-model.js";
|
|
4
4
|
import { applyToolsWebPatch } from "../../config-tools-web.js";
|
|
5
5
|
import { buildSafeWebConfigPayload } from "../lib/config-payload.js";
|
|
@@ -5,8 +5,8 @@ import { resolveDreamingConfig } from "../../../agent/memory/dreaming/config.js"
|
|
|
5
5
|
import { parseDreamingLastRunFile } from "../../../agent/memory/dreaming/last-run.js";
|
|
6
6
|
import { readDreamingEvents } from "../../../agent/memory/dreaming/events.js";
|
|
7
7
|
import { previewDreamingDeepPromotion } from "../../../agent/memory/dreaming/preview.js";
|
|
8
|
-
import path from "node:path";
|
|
9
8
|
import fs from "node:fs/promises";
|
|
9
|
+
import path from "node:path";
|
|
10
10
|
//#region src/gateway/hono/routes/dreaming.ts
|
|
11
11
|
init_schema();
|
|
12
12
|
function isRecord(v) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../../utils/logger.js";
|
|
3
|
+
import { readdir, realpath, stat } from "node:fs/promises";
|
|
3
4
|
import * as path$1 from "node:path";
|
|
4
5
|
import * as os$1 from "node:os";
|
|
5
|
-
import { readdir, realpath, stat } from "node:fs/promises";
|
|
6
6
|
//#region src/gateway/hono/routes/host-fs.ts
|
|
7
7
|
init_logger();
|
|
8
8
|
const log = createLogger("HostFs");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
2
|
+
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
2
3
|
import { init_resolve_config_value, testApiKeyResolution } from "../../../config/resolve-config-value.js";
|
|
3
4
|
import { init_models_json, loadModelsJson, saveModelsJson, validateModelsConfig } from "../../../config/models-json.js";
|
|
4
5
|
import { getModelRegistry } from "../../../providers/model-registry.js";
|
|
5
|
-
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
6
6
|
import { getProviderRegistry, init_plugin_registry } from "../../../providers/plugin-registry.js";
|
|
7
7
|
import { PROVIDER_META, getAllModels, getAllProviders, getAvailableModels, getProviderActiveKeySource, init_providers, isProviderConfigured } from "../../../providers/index.js";
|
|
8
8
|
import { getImageGenerationProvider } from "../../../agent/image/generation/provider-registry.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
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";
|
|
9
9
|
import { resolveHeartbeatMdPath } from "../../workspace-heartbeat-path.js";
|
|
10
10
|
import { listWorkspaceRelativeFilesFsFallback } from "../../workspace-fs-file-list.js";
|
|
11
11
|
import { runRipgrepInDirectory, runRipgrepListFiles } from "../../workspace-ripgrep.js";
|
|
12
|
-
import { join, resolve } from "node:path";
|
|
13
12
|
import { readFile, readdir, stat, writeFile } from "node:fs/promises";
|
|
13
|
+
import { join, resolve } from "node:path";
|
|
14
14
|
//#region src/gateway/hono/routes/workspace.ts
|
|
15
15
|
init_schema();
|
|
16
16
|
init_agent_scope();
|
|
@@ -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";
|
package/dist/src/gateway/lock.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import fsSync from "node:fs";
|
|
3
1
|
import { createHash } from "node:crypto";
|
|
2
|
+
import fsSync from "node:fs";
|
|
4
3
|
import fs from "node:fs/promises";
|
|
4
|
+
import path from "node:path";
|
|
5
5
|
import net from "node:net";
|
|
6
6
|
import { homedir } from "os";
|
|
7
7
|
//#region src/gateway/lock.ts
|
|
@@ -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 { inboundCorrelationMetadataFromAsyncLogContext } 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 { prependEnvelopeTimestamp } from "../../channels/envelope-timestamp.js";
|
|
7
7
|
import { shouldSkipWebchatInboundByAbortCutoff } from "../../session/abort-cutoff.js";
|
|
8
8
|
import "../chat-limits.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
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 { createLogger } from "../utils/logger/index.js";
|
|
10
6
|
import { init_logger } from "../utils/logger.js";
|
|
7
|
+
import { resolveStateDir } from "../config/paths-state.js";
|
|
11
8
|
import { init_paths, resolveAgentDir, resolveConfigPath, resolveCronJobsPath, resolveExtensionsDir } from "../config/paths.js";
|
|
9
|
+
import { getWorkspacePath, init_schema } from "../config/schema.js";
|
|
12
10
|
import { loadConfig, saveConfig } from "../config/loader.js";
|
|
11
|
+
import { buildSessionKey, init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
12
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
13
13
|
import { getModelRegistry } from "../providers/model-registry.js";
|
|
14
14
|
import { init_providers, providers_exports } from "../providers/index.js";
|
|
15
15
|
import { createSkillConfigManager } from "../agent/skills/config.js";
|
|
@@ -48,8 +48,8 @@ import { restartGatewayProcessWithFreshPid } from "./respawn.js";
|
|
|
48
48
|
import { getDistinctSessionChatIds } from "./service/session-chat-ids.js";
|
|
49
49
|
import { runGatewayAgent } from "./service/run-gateway-agent.js";
|
|
50
50
|
import { GatewaySseHub } from "./service/sse-hub.js";
|
|
51
|
-
import { join } from "node:path";
|
|
52
51
|
import { existsSync, mkdirSync, rmSync } from "node:fs";
|
|
52
|
+
import { join } from "node:path";
|
|
53
53
|
import crypto from "crypto";
|
|
54
54
|
//#region src/gateway/service.ts
|
|
55
55
|
init_schema();
|
|
@@ -401,11 +401,11 @@ var GatewayService = class {
|
|
|
401
401
|
async startBrowserExtensionServerIfNeeded() {
|
|
402
402
|
const browser = (this.config.agents?.defaults)?.browser;
|
|
403
403
|
if (browser?.backend !== "extension") return;
|
|
404
|
+
const ext = browser.extension;
|
|
405
|
+
const port = typeof ext?.port === "number" ? ext.port : 19820;
|
|
406
|
+
const host = typeof ext?.host === "string" && ext.host ? ext.host : "127.0.0.1";
|
|
404
407
|
try {
|
|
405
408
|
const { acquireExtensionBrowserServer } = await import("../browser/providers/extension-ws-acquire.js");
|
|
406
|
-
const ext = browser.extension;
|
|
407
|
-
const port = typeof ext?.port === "number" ? ext.port : 19820;
|
|
408
|
-
const host = typeof ext?.host === "string" && ext.host ? ext.host : "127.0.0.1";
|
|
409
409
|
const { provider, release } = await acquireExtensionBrowserServer({
|
|
410
410
|
port,
|
|
411
411
|
host
|
|
@@ -417,7 +417,16 @@ var GatewayService = class {
|
|
|
417
417
|
host
|
|
418
418
|
}, "Browser extension WS server started");
|
|
419
419
|
} catch (err) {
|
|
420
|
-
|
|
420
|
+
const code = err && typeof err === "object" && "code" in err ? err.code : void 0;
|
|
421
|
+
log.error({
|
|
422
|
+
err,
|
|
423
|
+
phase: "browser_extension_ws",
|
|
424
|
+
...code === "EADDRINUSE" ? {
|
|
425
|
+
bindPort: port,
|
|
426
|
+
bindHost: host,
|
|
427
|
+
hint: "Another process holds this port (default 19820). Stop it or set agents.defaults.browser.extension.port."
|
|
428
|
+
} : {}
|
|
429
|
+
}, `Failed to start browser extension WS server: ${err instanceof Error ? err.message : String(err)}`);
|
|
421
430
|
}
|
|
422
431
|
}
|
|
423
432
|
/**
|