@xopcai/xopc 0.0.108 → 0.0.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/feishu/src/workflow-progress.js +1 -1
- package/dist/extensions/telegram/src/adapters/streaming-adapter.js +1 -1
- package/dist/extensions/telegram/src/inbound-processor.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/src/update-offset-store.js +1 -1
- package/dist/extensions/telegram/src/workflow-progress.js +1 -1
- 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/extensions/weixin/src/workflow-progress.js +1 -1
- package/dist/gateway/static/root/assets/{agents-56kCGHdV.js → agents-D2VtykeA.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-Dd88J47r.js → apps-page-BPQ6ueG-.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-settings-Ckyvnvml.js → channels-settings-DgZc25cS.js} +1 -1
- package/dist/gateway/static/root/assets/{cron-page-DKo2ZdRA.js → cron-page-BQFw5O-8.js} +1 -1
- package/dist/gateway/static/root/assets/{dist-dmxWdtPG.js → dist-BLMShn4_.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-iGpG-vpp.js → extension-debug-page-BbQ8uZY_.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-I7-3uHiD.js → extension-page-DNcTendk.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BisnHG7r.js → extension-settings-page-ClWJvwHK.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-config-api-tbWAFPN8.js → heartbeat-config-api-4O1U_Oki.js} +1 -1
- package/dist/gateway/static/root/assets/{index-slwUkhxH.js → index-S23p3aa0.js} +3 -3
- package/dist/gateway/static/root/assets/{logs-page-CCZiXrWu.js → logs-page-BAIdbvSC.js} +1 -1
- package/dist/gateway/static/root/assets/{note-detail-page-BYbw2GLl.js → note-detail-page-BVDoLwec.js} +1 -1
- package/dist/gateway/static/root/assets/{note-time-Cya72Lte.js → note-time-COWUfBZO.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-DrAO7VRK.js → notes-page-CI3aD7Tm.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-a6UJCK55.js → schema-form-CDpBshDP.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-DNU3Ymvz.js → sessions-page-DM1S4eso.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-advanced-gate-CyEJYTbw.js → settings-advanced-gate-Bz_nYzvB.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-form-section-DpHo2ecA.js → settings-form-section-BxhPoWWH.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-YRwe4q56.js → settings-page-Ch_Sd28M.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-B7rf4QB4.js → share-preview-page-D6u4llqD.js} +1 -1
- package/dist/gateway/static/root/assets/skills-page-XMi76Nps.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-Btagks_B.js → voice-api-key-field-CMt5Xc7_.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-page.utils-DvzJKs6W.js → workflow-page.utils-BcZQmKBX.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-BgOAgCOG.js → workflows-page-CxFbPBed.js} +1 -1
- package/dist/gateway/static/root/index.html +1 -1
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +7 -7
- package/dist/src/agent/agent-scope.js +1 -1
- package/dist/src/agent/bootstrap/load-bootstrap-files.js +1 -1
- package/dist/src/agent/context/workspace-seed.js +2 -2
- package/dist/src/agent/context/workspace-state.js +1 -1
- package/dist/src/agent/goals/goal-run-store.js +4 -4
- package/dist/src/agent/goals/persistent-goal-service.js +1 -1
- package/dist/src/agent/goals/post-turn.js +2 -2
- package/dist/src/agent/image/load-image-media.js +2 -2
- 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/mcp/bundle-mcp-materialize.js +1 -1
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +1 -1
- package/dist/src/agent/mcp/mcp-transport-config.js +1 -1
- package/dist/src/agent/mcp/mcp-transport.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/memory-flush.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/reply/post-compaction-context.js +1 -1
- package/dist/src/agent/reply/workspace-boundary-read.js +1 -1
- package/dist/src/agent/sandbox/path-policy.js +2 -2
- package/dist/src/agent/service.js +4 -4
- package/dist/src/agent/session/session-inspector.js +1 -1
- 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 +2 -2
- 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/starter-agents.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/workflow-tool.js +1 -1
- package/dist/src/agent/tools/write.js +1 -1
- package/dist/src/agent/workflow/catalog.js +1 -1
- package/dist/src/auth/credentials.js +3 -3
- package/dist/src/auth/profiles/store.js +2 -2
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/browser/cache-dir-policy.js +1 -1
- package/dist/src/browser/cdp-local-launcher.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +3 -3
- package/dist/src/browser/providers/cloakbrowser.js +4 -4
- package/dist/src/browser/providers/playwright-doctor.js +1 -1
- package/dist/src/browser/stealth.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/agent-edit.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/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/state-integrity.js +1 -1
- package/dist/src/cli/commands/doctor/checks/workspace-status.js +1 -1
- package/dist/src/cli/commands/extension-create.js +1 -1
- package/dist/src/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +2 -2
- package/dist/src/cli/commands/extension-pack.js +2 -2
- package/dist/src/cli/commands/extension.js +2 -2
- package/dist/src/cli/commands/gateway/logs.js +1 -1
- package/dist/src/cli/commands/image.js +1 -1
- package/dist/src/cli/commands/init.js +3 -3
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +2 -2
- package/dist/src/cli/utils/init-workspace-core.js +2 -2
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/config/agent-typed-models.js +1 -1
- package/dist/src/config/gateway-bind.js +1 -1
- package/dist/src/config/index.js +5 -5
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.js +2 -2
- package/dist/src/config/paths-state.js +1 -1
- package/dist/src/config/profile.js +2 -2
- package/dist/src/config/workspace-path.js +1 -1
- package/dist/src/cron/executor.js +2 -2
- package/dist/src/cron/persistence.js +1 -1
- package/dist/src/daemon/constants.js +1 -1
- package/dist/src/daemon/install-plan.js +2 -2
- package/dist/src/daemon/launchd.js +2 -2
- package/dist/src/daemon/schtasks.js +2 -2
- package/dist/src/daemon/systemd.js +2 -2
- package/dist/src/extensions/bundle-mcp.js +1 -1
- package/dist/src/extensions/discover-extensions.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 +2 -2
- package/dist/src/extensions/update.js +1 -1
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/file-path-classifier.js +2 -2
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/lib/extension-store.js +2 -2
- package/dist/src/gateway/hono/lib/static-ui.js +2 -2
- package/dist/src/gateway/hono/oauth-async.js +1 -1
- package/dist/src/gateway/hono/oauth.js +1 -1
- package/dist/src/gateway/hono/routes/agents.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
- package/dist/src/gateway/hono/routes/dreaming.js +1 -1
- package/dist/src/gateway/hono/routes/host-fs.js +2 -2
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/shares.js +1 -1
- package/dist/src/gateway/hono/routes/workflows.js +1 -1
- package/dist/src/gateway/hono/routes/workspace.js +2 -2
- package/dist/src/gateway/lock.js +3 -3
- package/dist/src/gateway/ports.js +1 -1
- package/dist/src/gateway/service/agent-runner.js +2 -2
- package/dist/src/gateway/service/marketplace-service.js +2 -2
- package/dist/src/gateway/service.js +2 -2
- package/dist/src/gateway/workspace-fs-file-list.js +1 -1
- package/dist/src/infra/brew.js +1 -1
- package/dist/src/infra/package-json.js +1 -1
- package/dist/src/infra/package-update-steps.js +1 -1
- package/dist/src/infra/path-env.js +2 -2
- package/dist/src/infra/restart.js +2 -2
- package/dist/src/infra/stable-node-path.js +1 -1
- package/dist/src/infra/update-check.js +1 -1
- package/dist/src/infra/update-global.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/media/store.js +1 -1
- package/dist/src/notes/agent-context.js +1 -1
- package/dist/src/notes/store.js +2 -2
- package/dist/src/project-trust/trust-store.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/init-session-turn.js +2 -2
- package/dist/src/session/resolve-session.js +3 -3
- package/dist/src/session/session-title.js +2 -2
- package/dist/src/session/store.js +2 -2
- package/dist/src/share/share-auto.js +2 -2
- package/dist/src/share/share-store.js +3 -3
- package/dist/src/share/share-thumbnail.js +2 -2
- package/dist/src/share/share-zip.js +1 -1
- package/dist/src/share/site-share-store.js +3 -3
- package/dist/src/share/site-static-serve.js +1 -1
- package/dist/src/storage/sqlite/connection.js +2 -2
- package/dist/src/storage/sqlite/memory-index-repository.js +2 -2
- package/dist/src/storage/sqlite/migrations/discover.js +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +1 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/tui/clipboard-image.js +3 -3
- package/dist/src/tui/theme-manager.js +1 -1
- package/dist/src/tui/tui-command-formatters.js +3 -3
- package/dist/src/tui/tui-commands.js +2 -2
- package/dist/src/tui/tui-keybindings-file.js +1 -1
- package/dist/src/tui/tui-scoped-models.js +2 -2
- package/dist/src/tui/tui-settings.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +5 -5
- package/dist/src/tunnel/frpc-binary.js +3 -3
- package/dist/src/tunnel/frpc-config.js +1 -1
- package/dist/src/tunnel/frpc-extract.js +1 -1
- package/dist/src/tunnel/tunnel-state.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 +2 -2
- package/dist/src/workflows/draft/workflow-draft-service.js +1 -1
- package/dist/src/workflows/store/event-store.js +1 -1
- package/dist/src/workflows/store/run-store.js +1 -1
- package/package.json +1 -1
- package/dist/gateway/static/root/assets/skills-page-we1NAt7u.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createGatewayRouteLogger } from "../lib/route-logger.js";
|
|
2
|
-
import { readdir, realpath, stat } from "node:fs/promises";
|
|
3
|
-
import * as path$1 from "node:path";
|
|
4
2
|
import * as os$1 from "node:os";
|
|
3
|
+
import * as path$1 from "node:path";
|
|
4
|
+
import { readdir, realpath, stat } from "node:fs/promises";
|
|
5
5
|
//#region src/gateway/hono/routes/host-fs.ts
|
|
6
6
|
const log = createGatewayRouteLogger("HostFs");
|
|
7
7
|
function jsonError(status, message) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
2
|
-
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
3
2
|
import { init_resolve_config_value, testApiKeyResolution } from "../../../config/resolve-config-value.js";
|
|
4
3
|
import { init_models_json, loadModelsJson, saveModelsJson, validateModelsConfig } from "../../../config/models-json.js";
|
|
5
4
|
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, getProviderAuthState, init_providers, isProviderConfigured } from "../../../providers/index.js";
|
|
8
8
|
import { getImageGenerationProvider } from "../../../agent/image/generation/provider-registry.js";
|
|
@@ -13,8 +13,8 @@ import { getClientIpFromHeaders } from "../../security/loopback.js";
|
|
|
13
13
|
import { renderFolderLandingPage, renderShareExpiredPage, renderShareLandingPage } from "../../../share/share-landing.js";
|
|
14
14
|
import { consumeSharePublicLimit } from "../../../share/share-rate-limit.js";
|
|
15
15
|
import { createZipStream, planDirectoryFiles } from "../../../share/share-zip.js";
|
|
16
|
-
import { createHash } from "node:crypto";
|
|
17
16
|
import { createReadStream } from "node:fs";
|
|
17
|
+
import { createHash } from "node:crypto";
|
|
18
18
|
import { stat } from "node:fs/promises";
|
|
19
19
|
import { Readable } from "node:stream";
|
|
20
20
|
//#region src/gateway/hono/routes/shares.ts
|
|
@@ -7,8 +7,8 @@ import { messagesToClientHistory } from "../../../session/client-history.js";
|
|
|
7
7
|
import { resolveWorkflowRunArtifactsDir } from "../../../workflows/store/paths.js";
|
|
8
8
|
import { WorkflowDraftService } from "../../../workflows/draft/workflow-draft-service.js";
|
|
9
9
|
import "../../../workflows/draft/index.js";
|
|
10
|
-
import { readFile, stat } from "node:fs/promises";
|
|
11
10
|
import { basename, join } from "node:path";
|
|
11
|
+
import { readFile, stat } from "node:fs/promises";
|
|
12
12
|
//#region src/gateway/hono/routes/workflows.ts
|
|
13
13
|
init_agent_scope();
|
|
14
14
|
function registerWorkflowRoutes(authenticated, deps) {
|
|
@@ -8,10 +8,10 @@ import { resolveHeartbeatMdPath } from "../../workspace-heartbeat-path.js";
|
|
|
8
8
|
import { createGatewayRouteLogger } from "../lib/route-logger.js";
|
|
9
9
|
import { listWorkspaceRelativeFilesFsFallback } from "../../workspace-fs-file-list.js";
|
|
10
10
|
import { runRipgrepInDirectory, runRipgrepListFiles } from "../../workspace-ripgrep.js";
|
|
11
|
-
import {
|
|
11
|
+
import { basename, dirname, join, resolve } from "node:path";
|
|
12
12
|
import { constants } from "node:fs";
|
|
13
|
+
import { randomUUID } from "node:crypto";
|
|
13
14
|
import { copyFile, link, mkdir, readFile, readdir, rename, stat, unlink, writeFile } from "node:fs/promises";
|
|
14
|
-
import { basename, dirname, join, resolve } from "node:path";
|
|
15
15
|
//#region src/gateway/hono/routes/workspace.ts
|
|
16
16
|
init_agent_scope();
|
|
17
17
|
const log = createGatewayRouteLogger("Workspace");
|
package/dist/src/gateway/lock.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
2
|
-
import fs from "node:fs";
|
|
3
|
-
import fs$1 from "node:fs/promises";
|
|
4
1
|
import path from "node:path";
|
|
5
2
|
import net from "node:net";
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import { createHash } from "node:crypto";
|
|
5
|
+
import fs$1 from "node:fs/promises";
|
|
6
6
|
import { homedir } from "os";
|
|
7
7
|
//#region src/gateway/lock.ts
|
|
8
8
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import fs from "node:fs";
|
|
4
3
|
import net from "node:net";
|
|
4
|
+
import fs from "node:fs";
|
|
5
5
|
import { execFileSync } from "node:child_process";
|
|
6
6
|
//#region src/gateway/ports.ts
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createLogger } from "../../utils/logger/index.js";
|
|
2
|
-
import { init_logger } from "../../utils/logger.js";
|
|
3
1
|
import { buildSessionKey, init_session_key, parseSessionKey } from "../../routing/session-key.js";
|
|
4
2
|
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
3
|
+
import { createLogger } from "../../utils/logger/index.js";
|
|
4
|
+
import { init_logger } from "../../utils/logger.js";
|
|
5
5
|
import { AgentRunRelay } from "../agent-run-relay.js";
|
|
6
6
|
import { ClarifyBridge } from "../clarify-bridge.js";
|
|
7
7
|
import { runGatewayAgent } from "./run-gateway-agent.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { resolveStateDir } from "../../config/paths-state.js";
|
|
1
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
3
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { resolveStateDir } from "../../config/paths-state.js";
|
|
4
4
|
import { init_paths, resolveExtensionsDir } from "../../config/paths.js";
|
|
5
5
|
import { createSkillConfigManager } from "../../agent/skills/config.js";
|
|
6
6
|
import { removeSkillsLockEntry } from "../../agent/skills/hub-lock.js";
|
|
@@ -11,8 +11,8 @@ import { installExtensionFromStoreZip, peekExtensionIdFromStoreZip } from "../..
|
|
|
11
11
|
import { downloadExtensionStoreZipBuffer, fetchMarketplacePackageDetail, resolveExtensionZipDownloadUrl, resolveExtensionsStoreBaseUrl } from "../../agent/skills/marketplace/adapters/store/store-api-client.js";
|
|
12
12
|
import { getMarketplaceProviderDisplayName, resolveSkillsMarketplaceProvider } from "../../agent/skills/marketplace/resolve-adapter.js";
|
|
13
13
|
import { downloadFromMarketplace, getMarketplacePackageDetail, listMarketplaceCategories, listMarketplacePackages } from "../../agent/skills/skills-marketplace.js";
|
|
14
|
-
import { existsSync, mkdirSync, rmSync } from "node:fs";
|
|
15
14
|
import { join } from "node:path";
|
|
15
|
+
import { existsSync, mkdirSync, rmSync } from "node:fs";
|
|
16
16
|
//#region src/gateway/service/marketplace-service.ts
|
|
17
17
|
/**
|
|
18
18
|
* GatewayMarketplaceService — install / browse / remove for the two marketplaces
|
|
@@ -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 { init_agent_scope, listAgentEntries, normalizeAgentId, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
4
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
3
5
|
import { getLogDir } from "../utils/logger/config.js";
|
|
4
6
|
import { getRuntimeLogStats } from "../utils/logger/stats.js";
|
|
5
7
|
import { createLogger } from "../utils/logger/index.js";
|
|
6
8
|
import { init_logger } from "../utils/logger.js";
|
|
7
|
-
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
8
9
|
import { init_paths, resolveAgentDir, resolveConfigPath, resolveCronJobsPath, resolveExtensionsDir } from "../config/paths.js";
|
|
9
10
|
import { areExtensionsGloballyDisabled } from "../extensions/discover-extensions.js";
|
|
10
11
|
import { buildExtensionMetadataSnapshot } from "../extensions/extension-metadata-snapshot.js";
|
|
11
12
|
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, init_channel_catalog_service } from "../channels/catalog/channel-catalog-service.js";
|
|
12
13
|
import { loadConfig, saveConfig } from "../config/loader.js";
|
|
13
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
14
14
|
import { prewarmModelRegistry } from "../providers/model-registry.js";
|
|
15
15
|
import { init_providers, providers_exports } from "../providers/index.js";
|
|
16
16
|
import { closeXopcDatabase, openXopcDatabase } from "../storage/sqlite/connection.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 { readdir } from "node:fs/promises";
|
|
4
3
|
import { join, relative } from "node:path";
|
|
4
|
+
import { readdir } from "node:fs/promises";
|
|
5
5
|
//#region src/gateway/workspace-fs-file-list.ts
|
|
6
6
|
init_logger();
|
|
7
7
|
const log = createLogger("WorkspaceFsFileList");
|
package/dist/src/infra/brew.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readPackageVersion } from "./package-json.js";
|
|
2
2
|
import { XOPC_PACKAGE_NAME, collectInstalledGlobalPackageErrors, globalInstallArgs, globalInstallFallbackArgs, resolveExpectedInstalledVersionFromSpec, resolveGlobalInstallTarget, resolveNpmGlobalPrefixLayoutFromGlobalRoot, resolveNpmGlobalPrefixLayoutFromPrefix } from "./update-global.js";
|
|
3
|
-
import fs from "node:fs/promises";
|
|
4
3
|
import path from "node:path";
|
|
4
|
+
import fs from "node:fs/promises";
|
|
5
5
|
//#region src/infra/package-update-steps.ts
|
|
6
6
|
function formatError(err) {
|
|
7
7
|
return err instanceof Error ? err.message : String(err);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveBrewPathDirs } from "./brew.js";
|
|
2
|
-
import fs from "node:fs";
|
|
3
|
-
import path from "node:path";
|
|
4
2
|
import os from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import fs from "node:fs";
|
|
5
5
|
//#region src/infra/path-env.ts
|
|
6
6
|
function isTruthyEnvValue(value) {
|
|
7
7
|
if (!value) return false;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { init_paths_state, resolveStateDir } from "../config/paths-state.js";
|
|
1
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
3
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { init_paths_state, resolveStateDir } from "../config/paths-state.js";
|
|
4
|
-
import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
5
4
|
import path from "node:path";
|
|
5
|
+
import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
6
6
|
//#region src/infra/restart.ts
|
|
7
7
|
/**
|
|
8
8
|
* Gateway restart coordination — OpenClaw-aligned SIGUSR1 authorization and restart intent.
|
|
@@ -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 { access, readFile } from "node:fs/promises";
|
|
4
3
|
import { dirname, join } from "node:path";
|
|
4
|
+
import { access, readFile } from "node:fs/promises";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
//#region src/infra/update-check.ts
|
|
7
7
|
init_package_version();
|
|
@@ -2,9 +2,9 @@ import { resolveExecPathBinPrepend } from "./path-env.js";
|
|
|
2
2
|
import { readPackageVersion } from "./package-json.js";
|
|
3
3
|
import { applyPathPrepend } from "./path-prepend.js";
|
|
4
4
|
import { createDefaultCommandRunner } from "./run-command.js";
|
|
5
|
+
import path from "node:path";
|
|
5
6
|
import fs from "node:fs";
|
|
6
7
|
import fs$1 from "node:fs/promises";
|
|
7
|
-
import path from "node:path";
|
|
8
8
|
//#region src/infra/update-global.ts
|
|
9
9
|
const XOPC_PACKAGE_NAME = "@xopcai/xopc";
|
|
10
10
|
const GLOBAL_RENAME_PREFIX = ".";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { init_paths_state, resolveUpdateLockPath } from "../config/paths-state.js";
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
|
-
import {
|
|
5
|
-
import { mkdir, readFile, unlink } from "node:fs/promises";
|
|
4
|
+
import { init_write_file_atomic, writeTextAtomic } from "./write-file-atomic.js";
|
|
6
5
|
import { dirname } from "node:path";
|
|
6
|
+
import { mkdir, readFile, unlink } from "node:fs/promises";
|
|
7
7
|
//#region src/infra/update-lock.ts
|
|
8
8
|
init_write_file_atomic();
|
|
9
9
|
init_paths_state();
|
|
@@ -8,8 +8,8 @@ import { runGlobalPackageUpdateSteps } from "./package-update-steps.js";
|
|
|
8
8
|
import { resolveStableNodePath } from "./stable-node-path.js";
|
|
9
9
|
import { trimLogTail } from "./update-log.js";
|
|
10
10
|
import { maybeRestartGatewayAfterUpdate } from "./update-restart.js";
|
|
11
|
-
import fs from "node:fs/promises";
|
|
12
11
|
import path from "node:path";
|
|
12
|
+
import fs from "node:fs/promises";
|
|
13
13
|
//#region src/infra/update-runner.ts
|
|
14
14
|
const DEFAULT_TIMEOUT_MS = 2700 * 1e3;
|
|
15
15
|
const MAX_LOG_CHARS = 8e3;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PACKAGE_VERSION, init_package_version } from "../package-version.js";
|
|
2
|
-
import {
|
|
2
|
+
import { init_paths_state, resolveUpdateCheckStatePath } from "../config/paths-state.js";
|
|
3
3
|
import { createLogger } from "../utils/logger/index.js";
|
|
4
4
|
import { init_logger } from "../utils/logger.js";
|
|
5
|
-
import {
|
|
5
|
+
import { init_write_file_atomic, writeTextAtomic } from "./write-file-atomic.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
|
|
2
|
+
import path from "node:path";
|
|
3
3
|
import { chmodSync, closeSync, copyFileSync, fsyncSync, mkdirSync, openSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { randomUUID } from "node:crypto";
|
|
4
5
|
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.
|
package/dist/src/media/store.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getMediaBucketDir, getMediaDir, isPathInside } from "./paths.js";
|
|
2
2
|
import { buildMediaUri } from "./uri.js";
|
|
3
|
+
import { extname, join, parse } from "node:path";
|
|
3
4
|
import { randomUUID } from "node:crypto";
|
|
4
5
|
import { mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
5
|
-
import { extname, join, parse } from "node:path";
|
|
6
6
|
//#region src/media/store.ts
|
|
7
7
|
/** Default per-file cap for inbound staging (5 MiB). */
|
|
8
8
|
const MEDIA_MAX_BYTES = 5 * 1024 * 1024;
|
|
@@ -7,8 +7,8 @@ import { isSTTAvailable } from "../voice/stt/availability.js";
|
|
|
7
7
|
import "../voice/stt/index.js";
|
|
8
8
|
import { mergeSttConfigFromAppConfig } from "../channels/attachments/voice-stt-webchat.js";
|
|
9
9
|
import { extractDocumentText } from "../document-understanding/extract.js";
|
|
10
|
-
import { readFile } from "node:fs/promises";
|
|
11
10
|
import { extname } from "node:path";
|
|
11
|
+
import { readFile } from "node:fs/promises";
|
|
12
12
|
//#region src/notes/agent-context.ts
|
|
13
13
|
const MAX_NOTE_MARKDOWN_CHARS = 4e4;
|
|
14
14
|
const MAX_TEXT_ATTACHMENT_CHARS = 2e4;
|
package/dist/src/notes/store.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
2
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
4
4
|
import { requireXopcDatabase } from "../storage/sqlite/connection.js";
|
|
5
5
|
import { buildNoteIndexMeta } from "./note-index-meta.js";
|
|
6
6
|
import { deleteNoteRecord, getNoteRecord, listNoteRecords, upsertNoteRecord } from "../storage/sqlite/notes-repository.js";
|
|
7
7
|
import { deleteNoteAgentContextRecord } from "../storage/sqlite/note-agent-context-repository.js";
|
|
8
8
|
import "../storage/sqlite/index.js";
|
|
9
9
|
import { resolveNoteHistoryDir, resolveNoteMediaDir } from "./paths.js";
|
|
10
|
+
import { join } from "node:path";
|
|
10
11
|
import { randomUUID } from "node:crypto";
|
|
11
12
|
import { mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
|
|
12
|
-
import { join } from "node:path";
|
|
13
13
|
//#region src/notes/store.ts
|
|
14
14
|
init_write_file_atomic();
|
|
15
15
|
init_logger();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { resolveStateDir } from "../config/paths-state.js";
|
|
2
2
|
import { init_paths } from "../config/paths.js";
|
|
3
|
-
import { existsSync, mkdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
|
|
4
|
-
import { dirname, join, resolve } from "node:path";
|
|
5
3
|
import { homedir } from "node:os";
|
|
4
|
+
import { dirname, join, resolve } from "node:path";
|
|
5
|
+
import { existsSync, mkdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
|
|
6
6
|
import lockfile from "proper-lockfile";
|
|
7
7
|
//#region src/project-trust/trust-store.ts
|
|
8
8
|
init_paths();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
4
3
|
import { dirname, join } from "node:path";
|
|
4
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
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 { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
|
|
3
|
-
import { CredentialResolver, hasCredentials, init_credentials, resolveApiKey } from "../auth/credentials.js";
|
|
4
2
|
import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync-provider-auth.js";
|
|
3
|
+
import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
|
|
5
4
|
import { ModelRegistry, getModelRegistry, init_model_registry, prewarmModelRegistry, resetModelRegistry } from "./model-registry.js";
|
|
5
|
+
import { CredentialResolver, hasCredentials, init_credentials, resolveApiKey } from "../auth/credentials.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";
|
|
5
4
|
import { resolveModelsJsonPath } from "../config/paths.js";
|
|
6
5
|
import { init_resolve_config_value, resolveConfigValue, resolveHeaders } from "../config/resolve-config-value.js";
|
|
7
6
|
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,7 +1,7 @@
|
|
|
1
|
-
import { createLogger } from "../utils/logger/index.js";
|
|
2
|
-
import { init_logger } from "../utils/logger.js";
|
|
3
1
|
import { SessionConfigSchema, init_schema } from "../config/schema.js";
|
|
4
2
|
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
3
|
+
import { createLogger } from "../utils/logger/index.js";
|
|
4
|
+
import { init_logger } from "../utils/logger.js";
|
|
5
5
|
import { requireXopcDatabase } from "../storage/sqlite/connection.js";
|
|
6
6
|
import "../storage/sqlite/index.js";
|
|
7
7
|
import { evaluateSessionFreshness, resolveSessionResetPolicy } from "./reset-policy.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createLogger } from "../utils/logger/index.js";
|
|
2
|
-
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { init_agent_scope, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
4
1
|
import { SessionConfigSchema, init_schema } from "../config/schema.js";
|
|
2
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
5
3
|
import { init_agent_session_key, normalizeAgentId, resolveAgentIdFromSessionKey } from "../routing/agent-session-key.js";
|
|
6
4
|
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
5
|
+
import { createLogger } from "../utils/logger/index.js";
|
|
6
|
+
import { init_logger } from "../utils/logger.js";
|
|
7
7
|
import { requireXopcDatabase } from "../storage/sqlite/connection.js";
|
|
8
8
|
import { findSessionKeyByTranscriptId, getSessionMetadata, getSessionPersistedLevels } from "../storage/sqlite/session-repository.js";
|
|
9
9
|
import "../storage/sqlite/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createLogger } from "../utils/logger/index.js";
|
|
2
|
-
import { init_logger } from "../utils/logger.js";
|
|
3
1
|
import { isCronSessionKey } from "../routing/session-key-utils.js";
|
|
4
2
|
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
3
|
+
import { createLogger } from "../utils/logger/index.js";
|
|
4
|
+
import { init_logger } from "../utils/logger.js";
|
|
5
5
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
6
6
|
import { readAgentMessageContent } from "../agent/memory/agent-message-access.js";
|
|
7
7
|
import { stripSessionStartupContextFromUserText } from "../agent/reply/startup-context.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createLogger } from "../utils/logger/index.js";
|
|
2
|
-
import { init_logger } from "../utils/logger.js";
|
|
3
1
|
import { init_paths_state, resolveStateDir } from "../config/paths-state.js";
|
|
4
2
|
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
3
|
+
import { createLogger } from "../utils/logger/index.js";
|
|
4
|
+
import { init_logger } from "../utils/logger.js";
|
|
5
5
|
import { requireXopcDatabase } from "../storage/sqlite/connection.js";
|
|
6
6
|
import "./types.js";
|
|
7
7
|
import { buildSessionContextForLlm, mergeLlmMessagesPreservingContextRows, transcriptRowsFromJsonArray } from "./session-context-for-llm.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { resolveMimeType } from "./share-store.js";
|
|
2
|
-
import {
|
|
2
|
+
import { basename, join, resolve } from "node:path";
|
|
3
3
|
import { readdirSync } from "node:fs";
|
|
4
|
+
import { randomUUID } from "node:crypto";
|
|
4
5
|
import { copyFile, mkdir, rm, stat } from "node:fs/promises";
|
|
5
|
-
import { basename, join, resolve } from "node:path";
|
|
6
6
|
//#region src/share/share-auto.ts
|
|
7
7
|
/**
|
|
8
8
|
* Smart-share decision layer.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { resolveStateDir } from "../config/paths-state.js";
|
|
1
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
3
|
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 { SHARE_CONFIG_DEFAULTS } from "./share-types.js";
|
|
6
6
|
import { isPathUnderWorkspace } from "../gateway/workspace-editor-path.js";
|
|
7
7
|
import { logShareAudit } from "./share-audit.js";
|
|
8
|
-
import {
|
|
8
|
+
import { join, relative, resolve } from "node:path";
|
|
9
9
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
10
|
+
import { randomBytes, randomUUID } from "node:crypto";
|
|
10
11
|
import { lstat, readdir, realpath, stat } from "node:fs/promises";
|
|
11
|
-
import { join, relative, resolve } from "node:path";
|
|
12
12
|
//#region src/share/share-store.ts
|
|
13
13
|
init_paths();
|
|
14
14
|
init_logger();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { resolveStateDir } from "../config/paths-state.js";
|
|
1
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
3
|
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 { getShareStore } from "./share-store.js";
|
|
6
6
|
import { getSiteShareStore } from "./site-share-store.js";
|
|
7
7
|
import { loadPlaywrightCoreModule } from "../browser/providers/playwright-doctor.js";
|
|
8
|
-
import { mkdir, readFile, stat, unlink, writeFile } from "node:fs/promises";
|
|
9
8
|
import { join } from "node:path";
|
|
9
|
+
import { mkdir, readFile, stat, unlink, writeFile } from "node:fs/promises";
|
|
10
10
|
//#region src/share/share-thumbnail.ts
|
|
11
11
|
/**
|
|
12
12
|
* Thumbnail generator for shares.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isPathUnderWorkspace } from "../gateway/workspace-editor-path.js";
|
|
2
|
+
import { relative, resolve } from "node:path";
|
|
2
3
|
import { createReadStream } from "node:fs";
|
|
3
4
|
import { lstat, readdir, realpath, stat } from "node:fs/promises";
|
|
4
|
-
import { relative, resolve } from "node:path";
|
|
5
5
|
import { Readable, Transform } from "node:stream";
|
|
6
6
|
import { pipeline } from "node:stream/promises";
|
|
7
7
|
import { crc32, createDeflateRaw } from "node:zlib";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { resolveStateDir } from "../config/paths-state.js";
|
|
1
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
3
|
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 { SITE_SHARE_CONFIG_DEFAULTS } from "./site-share-types.js";
|
|
6
6
|
import { isPathUnderWorkspace } from "../gateway/workspace-editor-path.js";
|
|
7
|
-
import {
|
|
7
|
+
import { join, relative, resolve } from "node:path";
|
|
8
8
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
9
|
+
import { randomBytes, randomUUID } from "node:crypto";
|
|
9
10
|
import { lstat, readdir, realpath, stat } from "node:fs/promises";
|
|
10
|
-
import { join, relative, resolve } from "node:path";
|
|
11
11
|
//#region src/share/site-share-store.ts
|
|
12
12
|
init_paths();
|
|
13
13
|
init_logger();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isPathUnderWorkspace } from "../gateway/workspace-editor-path.js";
|
|
2
2
|
import { resolveMimeType, shareResponseContentType } from "./share-store.js";
|
|
3
|
+
import { join, relative, resolve } from "node:path";
|
|
3
4
|
import { createReadStream } from "node:fs";
|
|
4
5
|
import { readFile, stat } from "node:fs/promises";
|
|
5
|
-
import { join, relative, resolve } from "node:path";
|
|
6
6
|
import { Readable } from "node:stream";
|
|
7
7
|
//#region src/share/site-static-serve.ts
|
|
8
8
|
const HASHED_ASSET_RE = /\.[a-f0-9]{8,}\.(?:js|mjs|css|woff2?|ttf|otf|svg|png|jpg|jpeg|gif|webp|avif|ico)$/i;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { resolveXopcDatabasePath } from "../../config/paths-state.js";
|
|
1
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
3
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { resolveXopcDatabasePath } from "../../config/paths-state.js";
|
|
4
4
|
import { ensureXopcDatabaseSchema } from "./schema.js";
|
|
5
5
|
import { requireNodeSqlite } from "../../infra/node-sqlite.js";
|
|
6
6
|
import { installSqliteTransientRejectionHandler } from "../../infra/unhandled-rejections.js";
|
|
7
|
-
import fs from "node:fs";
|
|
8
7
|
import path from "node:path";
|
|
8
|
+
import fs from "node:fs";
|
|
9
9
|
import childProcess from "node:child_process";
|
|
10
10
|
//#region src/storage/sqlite/connection.ts
|
|
11
11
|
init_logger();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getSqliteDatabase, runSqliteWriteTransaction } from "./transaction.js";
|
|
2
2
|
import { escapeFts5Query } from "./fts.js";
|
|
3
|
-
import { createHash } from "node:crypto";
|
|
4
|
-
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
5
3
|
import { join, relative } from "node:path";
|
|
4
|
+
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
5
|
+
import { createHash } from "node:crypto";
|
|
6
6
|
//#region src/storage/sqlite/memory-index-repository.ts
|
|
7
7
|
const CURATED_MEMORY_FILENAMES = new Set(["MEMORY.md", "USER.md"]);
|
|
8
8
|
const MEMORY_SYNC_CACHE_TTL_MS = 3e4;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
2
1
|
import { join } from "node:path";
|
|
2
|
+
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
3
3
|
//#region src/storage/sqlite/migrations/discover.ts
|
|
4
4
|
/** Matches `002_add_notes_index.sql` → target version 2. */
|
|
5
5
|
const MIGRATION_FILENAME = /^(\d{3})_[\w-]+\.sql$/;
|
|
@@ -3,8 +3,8 @@ import { init_logger } from "../../../utils/logger.js";
|
|
|
3
3
|
import { readSchemaVersion, setSchemaVersion } from "../schema-version.js";
|
|
4
4
|
import { discoverSqlMigrations } from "./discover.js";
|
|
5
5
|
import { DatabaseSchemaMigrationGapError, DatabaseSchemaTooNewError } from "./errors.js";
|
|
6
|
-
import { existsSync } from "node:fs";
|
|
7
6
|
import { dirname, join } from "node:path";
|
|
7
|
+
import { existsSync } from "node:fs";
|
|
8
8
|
import { fileURLToPath } from "node:url";
|
|
9
9
|
//#region src/storage/sqlite/migrations/runner.ts
|
|
10
10
|
init_logger();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SCHEMA_META_SCHEMA_VERSION_KEY, ensureSchemaMetaTable, readSchemaVersion, readSchemaVersionForTest, setSchemaVersion } from "./schema-version.js";
|
|
2
2
|
import { XOPC_DB_BASELINE_SCHEMA_VERSION, XOPC_DB_SCHEMA_VERSION, applyPendingMigrations } from "./migrations/runner.js";
|
|
3
|
-
import { readFileSync } from "node:fs";
|
|
4
3
|
import { dirname, join } from "node:path";
|
|
4
|
+
import { readFileSync } from "node:fs";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
//#region src/storage/sqlite/schema.ts
|
|
7
7
|
const SCHEMA_DIR = dirname(fileURLToPath(import.meta.url));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { init_agent_scope, listAgentEntries, normalizeAgentId } from "../../agent/agent-scope.js";
|
|
1
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
3
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { init_agent_scope, listAgentEntries, normalizeAgentId } from "../../agent/agent-scope.js";
|
|
4
4
|
import { loadConfig } from "../../config/loader.js";
|
|
5
5
|
import { getAvailableModels, init_providers } from "../../providers/index.js";
|
|
6
6
|
import { createCreateShareTool, isShareToolAvailable } from "../../agent/tools/create-share-tool.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { readFileSync, unlinkSync, writeFileSync } from "node:fs";
|
|
3
|
-
import { join } from "node:path";
|
|
4
1
|
import { tmpdir } from "node:os";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { readFileSync, unlinkSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { randomUUID } from "node:crypto";
|
|
5
5
|
import { spawnSync } from "node:child_process";
|
|
6
6
|
//#region src/tui/clipboard-image.ts
|
|
7
7
|
const SUPPORTED_IMAGE_MIME_TYPES = [
|
|
@@ -2,8 +2,8 @@ import { resolveStateDir } from "../config/paths-state.js";
|
|
|
2
2
|
import { init_paths } from "../config/paths.js";
|
|
3
3
|
import { palette } from "./theme/dark.js";
|
|
4
4
|
import { palette as palette$1 } from "./theme/light.js";
|
|
5
|
-
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
6
5
|
import { join } from "node:path";
|
|
6
|
+
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
7
7
|
import chalk from "chalk";
|
|
8
8
|
//#region src/tui/theme-manager.ts
|
|
9
9
|
init_paths();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { parseAgentSessionKey } from "../routing/session-key-utils.js";
|
|
2
|
+
import { init_agent_session_key } from "../routing/agent-session-key.js";
|
|
1
3
|
import { getLogDir } from "../utils/logger/config.js";
|
|
2
4
|
import { getRuntimeLogStats } from "../utils/logger/stats.js";
|
|
3
5
|
import { init_logger } from "../utils/logger.js";
|
|
4
6
|
import { resolveConfigPath } from "../config/paths.js";
|
|
5
|
-
import { parseAgentSessionKey } from "../routing/session-key-utils.js";
|
|
6
|
-
import { init_agent_session_key } from "../routing/agent-session-key.js";
|
|
7
7
|
import { getProviderDisplayName, getSortedProviders, init_providers, providerSupportsApiKey, providerSupportsOAuth } from "../providers/index.js";
|
|
8
8
|
import { createWorkflowCatalog } from "../agent/workflow/catalog.js";
|
|
9
9
|
import { normalizeVerboseLevel } from "../agent/transcript/thinking-types.js";
|
|
@@ -11,8 +11,8 @@ import "../config/index.js";
|
|
|
11
11
|
import { computeContextUsagePercent, formatContextUsageLabel } from "./tui-context-usage.js";
|
|
12
12
|
import { formatSessionPickerDescription } from "./tui-session-format.js";
|
|
13
13
|
import { formatTuiTranscriptTreeEntryDisplayText } from "./tui-transcript-tree.js";
|
|
14
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
15
14
|
import { dirname, join } from "node:path";
|
|
15
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
16
16
|
import { visibleWidth } from "@earendil-works/pi-tui";
|
|
17
17
|
//#region src/tui/tui-command-formatters.ts
|
|
18
18
|
init_providers();
|