@xopcai/xopc 0.0.37 → 0.0.38
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-koRRzxbf.js → agents-C0b6j9Kk.js} +2 -2
- package/dist/gateway/static/root/assets/{agents-koRRzxbf.js.map → agents-C0b6j9Kk.js.map} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-D_aWJQl6.js → apps-page-BtKY2glj.js} +2 -2
- package/dist/gateway/static/root/assets/{apps-page-D_aWJQl6.js.map → apps-page-BtKY2glj.js.map} +1 -1
- package/dist/gateway/static/root/assets/{channels-settings-OVIjvEhV.js → channels-settings-CaxrdDzq.js} +2 -2
- package/dist/gateway/static/root/assets/{channels-settings-OVIjvEhV.js.map → channels-settings-CaxrdDzq.js.map} +1 -1
- package/dist/gateway/static/root/assets/{cron-api-DuKLRD5h.js → cron-api-BMAYh86a.js} +2 -2
- package/dist/gateway/static/root/assets/{cron-api-DuKLRD5h.js.map → cron-api-BMAYh86a.js.map} +1 -1
- package/dist/gateway/static/root/assets/{cron-page-BJ-PTCWZ.js → cron-page-DxXnOz-l.js} +2 -2
- package/dist/gateway/static/root/assets/{cron-page-BJ-PTCWZ.js.map → cron-page-DxXnOz-l.js.map} +1 -1
- package/dist/gateway/static/root/assets/{dist-BmWGCLpp.js → dist-tEQzKijF.js} +2 -2
- package/dist/gateway/static/root/assets/{dist-BmWGCLpp.js.map → dist-tEQzKijF.js.map} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-UuHqRdRY.js → extension-debug-page-DJrTJlUb.js} +2 -2
- package/dist/gateway/static/root/assets/{extension-debug-page-UuHqRdRY.js.map → extension-debug-page-DJrTJlUb.js.map} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BfVmZyDY.js → extension-page-Db0Jkez6.js} +2 -2
- package/dist/gateway/static/root/assets/{extension-page-BfVmZyDY.js.map → extension-page-Db0Jkez6.js.map} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-bb27iUl0.js → extension-settings-page-C5MfwifV.js} +2 -2
- package/dist/gateway/static/root/assets/{extension-settings-page-bb27iUl0.js.map → extension-settings-page-C5MfwifV.js.map} +1 -1
- package/dist/gateway/static/root/assets/{index-JEcQYChp.js → index-xAzvk1zE.js} +4 -4
- package/dist/gateway/static/root/assets/{index-JEcQYChp.js.map → index-xAzvk1zE.js.map} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-CCYv5vDQ.js → logs-page-BWNM_MTa.js} +2 -2
- package/dist/gateway/static/root/assets/{logs-page-CCYv5vDQ.js.map → logs-page-BWNM_MTa.js.map} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-C1T-K4sK.js → sessions-page-Dwvpsn7p.js} +2 -2
- package/dist/gateway/static/root/assets/{sessions-page-C1T-K4sK.js.map → sessions-page-Dwvpsn7p.js.map} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-BoRVhtGO.js → settings-page-DqWAZbrP.js} +2 -2
- package/dist/gateway/static/root/assets/{settings-page-BoRVhtGO.js.map → settings-page-DqWAZbrP.js.map} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-D98E2LLR.js → skills-page-C6MuRJhq.js} +2 -2
- package/dist/gateway/static/root/assets/{skills-page-D98E2LLR.js.map → skills-page-C6MuRJhq.js.map} +1 -1
- package/dist/gateway/static/root/assets/{use-image-provider-credentials-CXCQFOJF.js → use-image-provider-credentials-B1TYItC3.js} +2 -2
- package/dist/gateway/static/root/assets/{use-image-provider-credentials-CXCQFOJF.js.map → use-image-provider-credentials-B1TYItC3.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/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/agents.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 +2 -2
- 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 +2 -2
- 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 +4 -4
- 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/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 +5 -5
- 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 +2 -1
|
@@ -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, resolveWorkspaceExtensionsDir } 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";
|
|
@@ -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, relative } from "node:path";
|
|
4
3
|
import { readdir } from "node:fs/promises";
|
|
4
|
+
import { join, relative } from "node:path";
|
|
5
5
|
//#region src/gateway/workspace-fs-file-list.ts
|
|
6
6
|
init_logger();
|
|
7
7
|
const log = createLogger("WorkspaceFsFileList");
|
|
@@ -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
2
|
import { channelToNpmTag } from "./update-channels.js";
|
|
3
|
-
import { dirname, join } from "node:path";
|
|
4
3
|
import { access, readFile } from "node:fs/promises";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
//#region src/infra/update-check.ts
|
|
7
7
|
init_package_version();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { init_write_file_atomic, writeTextAtomic } from "./write-file-atomic.js";
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
|
-
import {
|
|
5
|
-
import { dirname } from "node:path";
|
|
4
|
+
import { init_paths_state, resolveUpdateLockPath } from "../config/paths-state.js";
|
|
6
5
|
import { mkdir, readFile, unlink } from "node:fs/promises";
|
|
6
|
+
import { dirname } from "node:path";
|
|
7
7
|
//#region src/infra/update-lock.ts
|
|
8
8
|
init_write_file_atomic();
|
|
9
9
|
init_paths_state();
|
|
@@ -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 "node:path";
|
|
4
3
|
import { access, readdir, unlink } from "node:fs/promises";
|
|
4
|
+
import { join } from "node:path";
|
|
5
5
|
import { spawn } from "node:child_process";
|
|
6
6
|
//#region src/infra/update-runner.ts
|
|
7
7
|
init_logger();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PACKAGE_VERSION, init_package_version } from "../package-version.js";
|
|
2
|
-
import {
|
|
2
|
+
import { init_write_file_atomic, writeTextAtomic } from "./write-file-atomic.js";
|
|
3
3
|
import { createLogger } from "../utils/logger/index.js";
|
|
4
4
|
import { init_logger } from "../utils/logger.js";
|
|
5
|
-
import {
|
|
5
|
+
import { init_paths_state, resolveUpdateCheckStatePath } from "../config/paths-state.js";
|
|
6
6
|
import { acquireUpdateLock } from "./update-lock.js";
|
|
7
7
|
import { normalizeUpdateChannel } from "./update-channels.js";
|
|
8
8
|
import { compareSemver, detectInstallKind, resolveNpmChannelTag, resolvePackageRoot } from "./update-check.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { chmodSync, closeSync, copyFileSync, fsyncSync, mkdirSync, openSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
4
2
|
import { randomUUID } from "node:crypto";
|
|
3
|
+
import { chmodSync, closeSync, copyFileSync, fsyncSync, mkdirSync, openSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
5
4
|
import { chmod, copyFile, mkdir, open, rename, rm } from "node:fs/promises";
|
|
5
|
+
import path from "node:path";
|
|
6
6
|
//#region src/infra/write-file-atomic.ts
|
|
7
7
|
/**
|
|
8
8
|
* Durable single-file writes: temp file → fsync → rename to target.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { dirname, join } from "node:path";
|
|
4
3
|
import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
5
|
//#region src/providers/auth-runtime/auth-profile-store.ts
|
|
6
6
|
/**
|
|
7
7
|
* {@link AuthProfileStore} implementations.
|
|
@@ -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 "@earendil-works/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 "@earendil-works/pi-ai";
|
|
10
10
|
//#region src/providers/model-registry.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
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 {
|
|
4
|
+
import { mkdir, readFile } from "fs/promises";
|
|
4
5
|
import { join } from "path";
|
|
5
6
|
import { existsSync } from "fs";
|
|
6
|
-
import { mkdir, readFile } from "fs/promises";
|
|
7
7
|
//#region src/session/config-store.ts
|
|
8
8
|
/**
|
|
9
9
|
* Session Config Store
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FILENAMES, init_paths } from "../config/paths.js";
|
|
2
2
|
import { SessionSearchIndex } from "./search-index.js";
|
|
3
|
-
import { join } from "node:path";
|
|
4
3
|
import { stat } from "node:fs/promises";
|
|
4
|
+
import { join } from "node:path";
|
|
5
5
|
//#region src/session/search-index-cache.ts
|
|
6
6
|
/**
|
|
7
7
|
* Shared cache for {@link SessionSearchIndex} builds (invalidated on session writes).
|
|
@@ -2,8 +2,8 @@ import { FILENAMES, init_paths } from "../config/paths.js";
|
|
|
2
2
|
import { fileStemToSessionKey } from "./session-file-key.js";
|
|
3
3
|
import { isTranscriptContextEntry } from "./session-context-for-llm.js";
|
|
4
4
|
import { parseStoredTranscriptJson } from "./transcript-format.js";
|
|
5
|
-
import { basename, join } from "node:path";
|
|
6
5
|
import { readFile, readdir } from "node:fs/promises";
|
|
6
|
+
import { basename, join } from "node:path";
|
|
7
7
|
//#region src/session/search-index.ts
|
|
8
8
|
/**
|
|
9
9
|
* In-memory inverted index over session transcript JSON files on disk.
|
|
@@ -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,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
1
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
3
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
4
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
5
5
|
import { FILENAMES, init_paths, resolveSessionsDir } from "../config/paths.js";
|
|
6
|
-
import {
|
|
6
|
+
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
7
7
|
import { buildSessionContextForLlm, isTranscriptContextEntry, mergeLlmMessagesPreservingContextRows } from "./session-context-for-llm.js";
|
|
8
8
|
import { buildTranscriptEnvelope, parseStoredTranscriptJson } from "./transcript-format.js";
|
|
9
9
|
import { invalidateSessionSearchIndexCache } from "./search-index-cache.js";
|
|
@@ -12,10 +12,10 @@ import "./types.js";
|
|
|
12
12
|
import { SessionCompactor } from "../agent/memory/compaction.js";
|
|
13
13
|
import { SlidingWindow } from "../agent/memory/window.js";
|
|
14
14
|
import { normalizeCompactionCheckpointId } from "./compaction-checkpoints.js";
|
|
15
|
-
import { basename, join } from "path";
|
|
16
|
-
import { existsSync } from "fs";
|
|
17
15
|
import { copyFile, mkdir, readFile, readdir, stat, unlink } from "fs/promises";
|
|
18
16
|
import { randomUUID } from "node:crypto";
|
|
17
|
+
import { basename, join } from "path";
|
|
18
|
+
import { existsSync } from "fs";
|
|
19
19
|
//#region src/session/store.ts
|
|
20
20
|
init_write_file_atomic();
|
|
21
21
|
init_paths();
|
|
@@ -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 { getAllProviders, getModelsByProvider, init_providers } from "../../providers/index.js";
|
|
6
6
|
import { MessageBus, MessageBusShutdownError } from "../../infra/bus/queue.js";
|
package/dist/src/tui/tui.js
CHANGED
|
@@ -17,9 +17,9 @@ import { GatewaySseBackend } from "./backends/gateway-sse-backend.js";
|
|
|
17
17
|
import { ChatLog } from "./components/chat-log.js";
|
|
18
18
|
import { CustomEditor } from "./components/custom-editor.js";
|
|
19
19
|
import { TuiBottomBar } from "./components/tui-bottom-bar.js";
|
|
20
|
+
import { mkdtempSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
|
|
20
21
|
import { join } from "node:path";
|
|
21
22
|
import { tmpdir } from "node:os";
|
|
22
|
-
import { mkdtempSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
|
|
23
23
|
import { spawnSync } from "node:child_process";
|
|
24
24
|
import { CombinedAutocompleteProvider, Container, Loader, ProcessTerminal, TUI, Text, setKeybindings } from "@earendil-works/pi-tui";
|
|
25
25
|
//#region src/tui/tui.ts
|
|
@@ -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
|
|
@@ -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 { registerSpeechProvider } from "../speech-registry.js";
|
|
4
|
+
import { mkdtempSync, readFileSync, rmSync } from "node:fs";
|
|
4
5
|
import path from "node:path";
|
|
5
6
|
import { tmpdir } from "node:os";
|
|
6
|
-
import { mkdtempSync, readFileSync, rmSync } from "node:fs";
|
|
7
7
|
//#region src/voice/tts/providers/edge-speech.ts
|
|
8
8
|
/**
|
|
9
9
|
* Edge TTS provider — wraps the `node-edge-tts` package. Requires no API key
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xopcai/xopc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.38",
|
|
4
4
|
"description": "The OPC workstation that grows with you: AI assistant for One Person Companies — CLI, gateway, multi-channel (Telegram/WeChat), 20+ LLM providers via pi-ai, extensions and skills.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"node": ">=22.0.0"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
+
"abort-controller": "^3.0.0",
|
|
57
58
|
"@grammyjs/runner": "^2.0.3",
|
|
58
59
|
"@grammyjs/types": "^3.26.0",
|
|
59
60
|
"@hono/node-server": "^2.0.0",
|