@xopcai/xopc 0.0.90 → 0.0.91
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/README.md +36 -12
- package/README.zh-CN.md +36 -12
- 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/plugin.js +1 -1
- package/dist/extensions/telegram/src/routing-integration.js +2 -2
- 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/Combination-HAlzriaz.js +41 -0
- package/dist/gateway/static/root/assets/agents-bVWUlrlD.js +222 -0
- package/dist/gateway/static/root/assets/apps-page-CIC8bmvZ.js +1 -0
- package/dist/gateway/static/root/assets/{attachment-preview-renderer-CpyoFbs4.js → attachment-preview-renderer-DBAxQXb-.js} +2 -2
- package/dist/gateway/static/root/assets/{attachment-process-heavy-CqVriadb.js → attachment-process-heavy-Csq3TrrP.js} +4 -4
- package/dist/gateway/static/root/assets/channels-settings-C8G8RAAP.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-BrtH2VzC.js → channels-status-swr-CYWL5DLD.js} +1 -1
- package/dist/gateway/static/root/assets/copy-Dv6d4Dvw.js +1 -0
- package/dist/gateway/static/root/assets/{cron-api-CyqbgfHM.js → cron-api-TVqLlGAC.js} +1 -1
- package/dist/gateway/static/root/assets/cron-page-BtcFYlvv.js +1 -0
- package/dist/gateway/static/root/assets/dist-CUV1uY5f.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-D6Ak0STa.js → extension-debug-page-mTLHRDp1.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Q0P3d6DW.js → extension-page-iI8BI7WK.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CL55LwU_.js → extension-settings-page-ByXcdubM.js} +1 -1
- package/dist/gateway/static/root/assets/{fetch-Dqa9iTWl.js → fetch-BWtQq_Ys.js} +1 -1
- package/dist/gateway/static/root/assets/{field-primitives-HUR6JElP.js → field-primitives-BsZ-4VT5.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-config-api-DusckjUX.js → heartbeat-config-api-WjTsRLCU.js} +1 -1
- package/dist/gateway/static/root/assets/{index-BYcGfwcE.js → index-CKkR-v9U.js} +85 -81
- package/dist/gateway/static/root/assets/index-VlELBY99.css +1 -0
- package/dist/gateway/static/root/assets/logs-page-ClnIpxfd.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-page-B91pLkEI.css +1 -0
- package/dist/gateway/static/root/assets/note-detail-page-DJ2Mb4x7.js +179 -0
- package/dist/gateway/static/root/assets/note-time-JLBPSLzK.js +1 -0
- package/dist/gateway/static/root/assets/notes-page-BE-75qz9.js +1 -0
- package/dist/gateway/static/root/assets/{pdf-BnEvgIXZ.js → pdf-epILhEOn.js} +1 -1
- package/dist/gateway/static/root/assets/preload-helper-zJ_50EbN.js +1 -0
- package/dist/gateway/static/root/assets/sessions-page-bJJkWtTl.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-a0qGVOlr.js → settings-form-section-DSYCknxM.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-WcMXLq2U.js +3 -0
- package/dist/gateway/static/root/assets/share-preview-page-awRqs4hV.js +2 -0
- package/dist/gateway/static/root/assets/skills-page-Lu-i1JG7.js +2 -0
- package/dist/gateway/static/root/assets/{theme-store-C0Ehmdo5.js → theme-store-BC-42BoZ.js} +1 -1
- package/dist/gateway/static/root/assets/toast-z0toXu32.js +1 -0
- package/dist/gateway/static/root/assets/url-CY1RQKTU.js +3 -0
- package/dist/gateway/static/root/assets/{utils-DRQryzdn.js → utils-DX3TQuap.js} +1 -1
- package/dist/gateway/static/root/assets/vendor-codemirror-DYoKfS8f.js +45 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-D0viACE2.js → voice-api-key-field-B5uKlDqA.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-page.utils-DnG8JBhV.js → workflow-page.utils-ClC37yEp.js} +1 -1
- package/dist/gateway/static/root/assets/workflows-page-C7VhIXtR.js +27 -0
- package/dist/gateway/static/root/index.html +10 -8
- 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/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/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/build-direct-message-content.js +1 -1
- 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/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 +1 -1
- 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/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/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/session-integrity.js +2 -2
- 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/gateway/logs.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/commands/onboard.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +2 -2
- package/dist/src/commands/agents.config.js +1 -1
- package/dist/src/config/agent-profile.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/cron/run-log-store.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 +3 -3
- package/dist/src/gateway/file-path-classifier.js +2 -2
- package/dist/src/gateway/hono/lib/config-payload.d.ts +1 -0
- package/dist/src/gateway/hono/lib/config-payload.js +2 -1
- package/dist/src/gateway/hono/lib/config-payload.js.map +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/middleware/auth.js +1 -2
- package/dist/src/gateway/hono/middleware/auth.js.map +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/gateway.d.ts +2 -2
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +12 -0
- package/dist/src/gateway/hono/routes/config-patch/gateway.js.map +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/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/lazy-bundles.js.map +1 -1
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/notes.d.ts +3 -0
- package/dist/src/gateway/hono/routes/notes.js +274 -0
- package/dist/src/gateway/hono/routes/notes.js.map +1 -0
- package/dist/src/gateway/hono/routes/sessions.js.map +1 -1
- package/dist/src/gateway/hono/routes/shares.js +1 -1
- package/dist/src/gateway/hono/routes/workspace.js +4 -4
- 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.d.ts +3 -0
- package/dist/src/gateway/service.js +11 -1
- 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-ripgrep.d.ts +6 -0
- package/dist/src/gateway/workspace-ripgrep.js +62 -11
- package/dist/src/gateway/workspace-ripgrep.js.map +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/notes/attachment-ref.d.ts +9 -0
- package/dist/src/notes/attachment-ref.js +27 -0
- package/dist/src/notes/attachment-ref.js.map +1 -0
- package/dist/src/notes/index.d.ts +4 -0
- package/dist/src/notes/index.js +4 -0
- package/dist/src/notes/note-attachment-sync.d.ts +7 -0
- package/dist/src/notes/note-attachment-sync.js +46 -0
- package/dist/src/notes/note-attachment-sync.js.map +1 -0
- package/dist/src/notes/note-index-meta.d.ts +14 -0
- package/dist/src/notes/note-index-meta.js +87 -0
- package/dist/src/notes/note-index-meta.js.map +1 -0
- package/dist/src/notes/paths.d.ts +5 -0
- package/dist/src/notes/paths.js +23 -0
- package/dist/src/notes/paths.js.map +1 -0
- package/dist/src/notes/service.d.ts +42 -0
- package/dist/src/notes/service.js +331 -0
- package/dist/src/notes/service.js.map +1 -0
- package/dist/src/notes/store.d.ts +33 -0
- package/dist/src/notes/store.js +317 -0
- package/dist/src/notes/store.js.map +1 -0
- package/dist/src/notes/types.d.ts +162 -0
- package/dist/src/notes/types.js +1 -0
- 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/init-session-turn.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/resolve-session.js +4 -4
- 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 +2 -2
- package/dist/src/session/store.js +6 -6
- 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/tui/clipboard-image.js +3 -3
- package/dist/src/tui/theme-manager.js +1 -1
- 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.js +3 -3
- 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/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/agents-cPvvYLXo.js +0 -222
- package/dist/gateway/static/root/assets/apps-page-Bk1_P5FJ.js +0 -1
- package/dist/gateway/static/root/assets/channels-settings-CZoeQwHz.js +0 -1
- package/dist/gateway/static/root/assets/cron-page-BpLdiQN8.js +0 -1
- package/dist/gateway/static/root/assets/dist-BTWC-BTN.js +0 -45
- package/dist/gateway/static/root/assets/dist-BpAiK86n.js +0 -1
- package/dist/gateway/static/root/assets/eye-DAfL1U7M.js +0 -1
- package/dist/gateway/static/root/assets/index-V7MQ7834.css +0 -1
- package/dist/gateway/static/root/assets/logs-page-_HcZ2fgK.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-iezSMjho.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-C9_nYQwM.js +0 -3
- package/dist/gateway/static/root/assets/share-preview-page-DExl7CJy.js +0 -2
- package/dist/gateway/static/root/assets/skills-page-BlgGD93t.js +0 -2
- package/dist/gateway/static/root/assets/url-fxyYANfA.js +0 -3
- package/dist/gateway/static/root/assets/vendor-codemirror-D0yxdRpg.js +0 -58
- package/dist/gateway/static/root/assets/workflows-page-BvMobnJP.js +0 -27
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MEMORY_MD_FILENAME } from "./constants.js";
|
|
2
2
|
import { clamp01, compareCandidatesByScore, computeCandidateScore, extractPromotionMarkers, isContaminatedSnippet, isExpiredEntry, readFileLines, resolveDeepDefaults, sliceRange, snippetHash } from "./utils.js";
|
|
3
3
|
import { loadDreamingStore } from "./short-term-store.js";
|
|
4
|
-
import fs from "node:fs/promises";
|
|
5
4
|
import path from "node:path";
|
|
5
|
+
import fs from "node:fs/promises";
|
|
6
6
|
//#region src/agent/memory/dreaming/preview.ts
|
|
7
7
|
async function previewDreamingDeepPromotion(params) {
|
|
8
8
|
const cfg = resolveDeepDefaults(params.config);
|
|
@@ -4,8 +4,8 @@ import { DREAMING_DIR_RELATIVE, DREAMS_MD_FILENAME, MS_PER_DAY } from "./constan
|
|
|
4
4
|
import { isoDay } from "./utils.js";
|
|
5
5
|
import { bumpEntryPhaseSignal, loadDreamingStore, saveDreamingStore } from "./short-term-store.js";
|
|
6
6
|
import "./last-run.js";
|
|
7
|
-
import fs from "node:fs/promises";
|
|
8
7
|
import path from "node:path";
|
|
8
|
+
import fs from "node:fs/promises";
|
|
9
9
|
//#region src/agent/memory/dreaming/rem-patterns.ts
|
|
10
10
|
init_logger();
|
|
11
11
|
const log = createLogger("Dreaming:REM");
|
|
@@ -2,9 +2,9 @@ import { createLogger } from "../../../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../../../utils/logger.js";
|
|
3
3
|
import { SHORT_TERM_PROMOTION_LOCK_RELATIVE, SHORT_TERM_RECALL_STORE_RELATIVE } from "./constants.js";
|
|
4
4
|
import { buildEntryKey, clamp01, isoDay, normalizeMemoryPath } from "./utils.js";
|
|
5
|
+
import path from "node:path";
|
|
5
6
|
import { createHash, randomUUID } from "node:crypto";
|
|
6
7
|
import fs from "node:fs/promises";
|
|
7
|
-
import path from "node:path";
|
|
8
8
|
//#region src/agent/memory/dreaming/short-term-store.ts
|
|
9
9
|
init_logger();
|
|
10
10
|
const log = createLogger("Dreaming:Store");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_DEEP_CRON, DIVERSITY_WEIGHT, MS_PER_DAY, REINFORCEMENT_WEIGHT } from "./constants.js";
|
|
2
|
+
import path from "node:path";
|
|
2
3
|
import { createHash } from "node:crypto";
|
|
3
4
|
import fs from "node:fs/promises";
|
|
4
|
-
import path from "node:path";
|
|
5
5
|
//#region src/agent/memory/dreaming/utils.ts
|
|
6
6
|
/** Normalize a workspace-relative memory path: forward slashes, no odd ../ escapes at start. */
|
|
7
7
|
function normalizeMemoryPath(rel) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { readdir, stat } from "node:fs/promises";
|
|
2
1
|
import { dirname, join } from "node:path";
|
|
2
|
+
import { readdir, stat } from "node:fs/promises";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
//#region src/agent/memory/plugin-discovery.ts
|
|
5
5
|
async function discoverMemoryPlugins() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
1
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
3
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
4
4
|
import { getAllModels, getDefaultModelSync, init_providers, resolveModel } from "../../providers/index.js";
|
|
5
5
|
import { resolveAgentTurnTimeoutMs, runAgentTurnWithTimeout } from "../orchestration/run-agent-turn-with-timeout.js";
|
|
6
6
|
import { isAssistantTurnAborted, isAssistantTurnFailed, maybeRetryTurnAfterTransientLlmFailure } from "../orchestration/llm-turn-retry.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { resolveStateDir } from "../../config/paths-state.js";
|
|
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 { DEFAULT_USER_FILENAME } from "../context/workspace.js";
|
|
6
6
|
import { createSkillConfigManager } from "../skills/config.js";
|
|
@@ -8,8 +8,8 @@ import { buildTtsSystemPromptHint } from "../../voice/tts/directives.js";
|
|
|
8
8
|
import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
9
9
|
import { selectSkillsVisibleInPrompt } from "../skills/format-skills-prompt.js";
|
|
10
10
|
import { buildSystemPrompt } from "./system-prompt.js";
|
|
11
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
12
11
|
import { join } from "node:path";
|
|
12
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
13
13
|
//#region src/agent/prompt/service-prompt-builder.ts
|
|
14
14
|
/**
|
|
15
15
|
* System Prompt Builder - Builds the complete system prompt
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { init_agent_scope, resolveAgentProfileDir } from "../agent-scope.js";
|
|
2
2
|
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
3
|
-
import { readFileSync } from "node:fs";
|
|
4
3
|
import { join, resolve } from "node:path";
|
|
4
|
+
import { readFileSync } from "node:fs";
|
|
5
5
|
//#region src/agent/reply/post-compaction-context.ts
|
|
6
6
|
init_agent_scope();
|
|
7
7
|
const MAX_CONTEXT_CHARS = 1800;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { realpathSync } from "node:fs";
|
|
2
|
-
import { isAbsolute, normalize, resolve, sep } from "node:path";
|
|
3
1
|
import { homedir } from "node:os";
|
|
2
|
+
import { isAbsolute, normalize, resolve, sep } from "node:path";
|
|
3
|
+
import { realpathSync } from "node:fs";
|
|
4
4
|
//#region src/agent/sandbox/path-policy.ts
|
|
5
5
|
/**
|
|
6
6
|
* Path safety validation for sandbox isolation.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "../agent-scope.js";
|
|
2
1
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
2
|
+
import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "../agent-scope.js";
|
|
3
3
|
import { extractProfileAgentId } from "../../config/agent-profile.js";
|
|
4
4
|
import { getDefaultModelSync, init_providers } from "../../providers/index.js";
|
|
5
5
|
import { formatInboundFileTextBlock } from "../../channels/attachments/inbound-persist.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, resolveAgentHomeDir, resolveAgentProfileDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
4
1
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
5
2
|
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
3
|
+
import { init_agent_scope, resolveAgentHomeDir, resolveAgentProfileDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
6
4
|
import { extractProfileAgentId, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
5
|
+
import { createLogger } from "../utils/logger/index.js";
|
|
6
|
+
import { init_logger } from "../utils/logger.js";
|
|
7
7
|
import { extractTextContent } from "./context/workspace.js";
|
|
8
8
|
import { onSessionTranscriptUpdate } from "../session/transcript-events.js";
|
|
9
9
|
import { getWorkflowProgressBroker } from "./workflow/progress-broker.js";
|
|
@@ -59,8 +59,8 @@ import { reconcileManagedDreamingCronJobs } from "./service/reconcile-dreaming-c
|
|
|
59
59
|
import { parseOutboundSessionKey } from "./service/parse-outbound-session-key.js";
|
|
60
60
|
import { cleanTrailingErrors } from "./memory/message-sanitizer.js";
|
|
61
61
|
import { tryApplySessionTranscriptHygiene } from "./transcript/transcript-hygiene.js";
|
|
62
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
63
62
|
import { join } from "node:path";
|
|
63
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
64
64
|
//#region src/agent/service.ts
|
|
65
65
|
init_schema();
|
|
66
66
|
init_logger();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
1
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
3
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
4
4
|
import { resolveEffectiveReasoningLevel, resolveEffectiveThinkingLevel } from "../../session/thinking-resolve.js";
|
|
5
5
|
import { effectiveWorkspacePathForSession } from "../../session/session-workspace.js";
|
|
6
6
|
import "../../session/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __toCommonJS } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { init_write_file_atomic, writeTextAtomicSync } 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_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
5
5
|
import { init_installer, installer_exports } from "./installer.js";
|
|
6
6
|
import { join } from "path";
|
|
7
7
|
import { existsSync, readFileSync } from "fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
2
|
-
import { createReadStream, existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
3
1
|
import { join, relative } from "node:path";
|
|
2
|
+
import { createReadStream, existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
3
|
+
import { createHash } from "node:crypto";
|
|
4
4
|
//#region src/agent/skills/hub-hash.ts
|
|
5
5
|
/**
|
|
6
6
|
* Deterministic content hash for a skill directory (for hub lock / drift detection).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
1
|
import { init_paths, resolveSkillsLockPath } from "../../config/paths.js";
|
|
2
|
+
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
//#region src/agent/skills/hub-lock.ts
|
|
5
5
|
/**
|
|
@@ -4,9 +4,9 @@ import { formatScanSummary, scanSkillDirectory } from "./scanner.js";
|
|
|
4
4
|
import { getSkillsLockEntry, recordSkillsHubInstall } from "./hub-lock.js";
|
|
5
5
|
import { installSkillFromZip, isValidSkillId } from "./managed-store.js";
|
|
6
6
|
import { computeSkillTreeHashSync } from "./hub-hash.js";
|
|
7
|
-
import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
8
|
-
import { basename, join, normalize, resolve, sep } from "node:path";
|
|
9
7
|
import { tmpdir } from "node:os";
|
|
8
|
+
import { basename, join, normalize, resolve, sep } from "node:path";
|
|
9
|
+
import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
10
10
|
import { execFileSync } from "node:child_process";
|
|
11
11
|
import { fileURLToPath } from "node:url";
|
|
12
12
|
import { fetch } from "undici";
|
|
@@ -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 } from "../../config/paths.js";
|
|
5
5
|
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
6
6
|
import { findInstallSpec, getDefaultInstallerPreferences, hasBinary, init_installer, installSkill } from "./installer.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_paths, resolveSkillsDir } from "../../config/paths.js";
|
|
2
2
|
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
3
3
|
import { loadSkillsLock } from "./hub-lock.js";
|
|
4
|
-
import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
5
4
|
import { dirname, join, resolve, sep } from "node:path";
|
|
5
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
6
6
|
import AdmZip from "adm-zip";
|
|
7
7
|
//#region src/agent/skills/managed-store.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 { readFile, readdir } from "fs/promises";
|
|
4
3
|
import { join } from "path";
|
|
4
|
+
import { readFile, readdir } from "fs/promises";
|
|
5
5
|
//#region src/agent/skills/scanner.ts
|
|
6
6
|
/**
|
|
7
7
|
* Skill security scanner — scans skill directories for potentially dangerous code patterns.
|
|
@@ -2,9 +2,9 @@ import { init_paths, resolveSkillsDir } from "../../config/paths.js";
|
|
|
2
2
|
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
3
3
|
import { fuzzyFindText, normalizeForFuzzyMatch, normalizeToLF, restoreLineEndings } from "../tools/edit-diff.js";
|
|
4
4
|
import { formatScanSummary, scanSkillDirectory } from "./scanner.js";
|
|
5
|
-
import { mkdir, writeFile } from "fs/promises";
|
|
6
5
|
import { join, resolve, sep } from "path";
|
|
7
6
|
import { existsSync, realpathSync } from "fs";
|
|
7
|
+
import { mkdir, writeFile } from "fs/promises";
|
|
8
8
|
//#region src/agent/skills/skill-manage-ops.ts
|
|
9
9
|
/**
|
|
10
10
|
* Shared logic for the skill_manage agent tool (create / edit / patch / delete / write_file / remove_file).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { resolveStateDir } from "../../config/paths-state.js";
|
|
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, resolveBundledSkillsDir } from "../../config/paths.js";
|
|
5
5
|
import { createSkillConfigManager, isSkillEnabled } from "./config.js";
|
|
6
6
|
import { formatSkillsForPrompt, selectSkillsVisibleInPrompt } from "./format-skills-prompt.js";
|
|
@@ -3,8 +3,8 @@ import { init_logger } from "../../utils/logger.js";
|
|
|
3
3
|
import { SHORT_TERM_PROMOTION_LOCK_RELATIVE, SHORT_TERM_RECALL_STORE_RELATIVE } from "../memory/dreaming/constants.js";
|
|
4
4
|
import { loadDreamingStore, saveDreamingStore } from "../memory/dreaming/short-term-store.js";
|
|
5
5
|
import { resolveDreamingConfig } from "../memory/dreaming/config.js";
|
|
6
|
-
import fs from "node:fs/promises";
|
|
7
6
|
import path from "node:path";
|
|
7
|
+
import fs from "node:fs/promises";
|
|
8
8
|
import { Type } from "@sinclair/typebox";
|
|
9
9
|
//#region src/agent/tools/dreaming-tool.ts
|
|
10
10
|
init_logger();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { init_session_key, parseSessionKey } from "../../routing/session-key.js";
|
|
1
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
3
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { init_session_key, parseSessionKey } from "../../routing/session-key.js";
|
|
4
4
|
import { createReadFileTool } from "./read.js";
|
|
5
5
|
import { createWriteFileTool } from "./write.js";
|
|
6
6
|
import { createEditFileTool } from "./edit.js";
|
|
@@ -4,9 +4,9 @@ import { isFailoverError } from "../failover-error.js";
|
|
|
4
4
|
import { imageAssetFromDataUrl, imageFileExtensionForMimeType, mimeTypeFromFileName, parseImageDataUrl, sniffImageMimeType } from "../image/generation/image-assets.js";
|
|
5
5
|
import { getImageGenerationProvider } from "../image/generation/provider-registry.js";
|
|
6
6
|
import { generateImage, listImageGenerationProvidersSummary } from "../image/generation/runtime.js";
|
|
7
|
+
import path from "node:path";
|
|
7
8
|
import { randomBytes } from "node:crypto";
|
|
8
9
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
9
|
-
import path from "node:path";
|
|
10
10
|
import { Type } from "@sinclair/typebox";
|
|
11
11
|
//#region src/agent/tools/image-generate-tool.ts
|
|
12
12
|
const DEFAULT_COUNT = 1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
2
2
|
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
3
|
-
import { readFile } from "fs/promises";
|
|
4
3
|
import { basename } from "node:path";
|
|
4
|
+
import { readFile } from "fs/promises";
|
|
5
5
|
import { Type } from "@sinclair/typebox";
|
|
6
6
|
//#region src/agent/tools/send-media.ts
|
|
7
7
|
const SendMediaSchema = Type.Object({
|
|
@@ -2,9 +2,9 @@ import { resolveStateDir } from "../../config/paths-state.js";
|
|
|
2
2
|
import { init_paths } from "../../config/paths.js";
|
|
3
3
|
import { createSkillConfigManager } from "../skills/config.js";
|
|
4
4
|
import { applyPatchToContent, atomicWriteUtf8, effectiveAgentWritePolicy, ensureCategorySegment, isPathInsideDir, maxSkillMdChars, maxSupportFileBytes, mutatableSkillOrNull, resolveCreateSkillDir, scanSkillDirOrError, validateSkillMdContent, validateSkillNameSegment, validateSupportingRelativePath } from "../skills/skill-manage-ops.js";
|
|
5
|
-
import { readFile, rm } from "fs/promises";
|
|
6
5
|
import { join } from "path";
|
|
7
6
|
import { existsSync, rmSync } from "fs";
|
|
7
|
+
import { readFile, rm } from "fs/promises";
|
|
8
8
|
import { Type } from "@sinclair/typebox";
|
|
9
9
|
//#region src/agent/tools/skill-manage-tool.ts
|
|
10
10
|
init_paths();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { extractProfileAgentId } from "../../config/agent-profile.js";
|
|
1
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
3
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { extractProfileAgentId } from "../../config/agent-profile.js";
|
|
4
4
|
import { parseWorkflowScript } from "../workflow/parser.js";
|
|
5
5
|
import "../workflow/index.js";
|
|
6
6
|
import { Type } from "@sinclair/typebox";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
2
2
|
import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
3
3
|
import { evaluateFilePolicy } from "../sandbox/exec-policy.js";
|
|
4
|
-
import { mkdir, writeFile } from "fs/promises";
|
|
5
4
|
import { dirname } from "path";
|
|
5
|
+
import { mkdir, writeFile } from "fs/promises";
|
|
6
6
|
import { Type } from "@sinclair/typebox";
|
|
7
7
|
//#region src/agent/tools/write.ts
|
|
8
8
|
const MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_paths_state, resolveStateDir } from "../../config/paths-state.js";
|
|
2
2
|
import { BUILTIN_WORKFLOWS } from "./builtins/index.js";
|
|
3
3
|
import { parseWorkflowScript } from "./parser.js";
|
|
4
|
-
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
5
4
|
import { join } from "node:path";
|
|
5
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
6
6
|
//#region src/agent/workflow/catalog.ts
|
|
7
7
|
/**
|
|
8
8
|
* Catalog for named workflows.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
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";
|
|
5
|
-
import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.js";
|
|
6
4
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
7
|
-
import {
|
|
5
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
6
|
+
import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.js";
|
|
8
7
|
import { dirname, join } from "path";
|
|
8
|
+
import { mkdir, readFile, rm } from "fs/promises";
|
|
9
9
|
//#region src/auth/credentials.ts
|
|
10
10
|
function getCredentialResolver(options) {
|
|
11
11
|
return new CredentialResolver(options);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
|
-
import { chmodSync, existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
3
2
|
import path from "node:path";
|
|
3
|
+
import { chmodSync, existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
4
4
|
import { homedir } from "os";
|
|
5
5
|
//#region src/auth/profiles/store.ts
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
2
3
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
|
|
3
4
|
import { init_loader, loadConfig } from "../config/loader.js";
|
|
4
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
6
|
//#region src/auth/sync-provider-auth.ts
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { isAbsolute, relative, resolve, sep } from "node:path";
|
|
3
2
|
import { homedir } from "node:os";
|
|
3
|
+
import { isAbsolute, relative, resolve, sep } from "node:path";
|
|
4
4
|
//#region src/browser/cache-dir-policy.ts
|
|
5
5
|
function expandHome(input) {
|
|
6
6
|
if (input === "~") return homedir();
|
|
@@ -2,10 +2,10 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { loadPlaywrightCoreModule } from "./providers/playwright-doctor.js";
|
|
4
4
|
import { pickFreePort } from "./free-port.js";
|
|
5
|
+
import { homedir, platform } from "node:os";
|
|
6
|
+
import { join } from "node:path";
|
|
5
7
|
import { existsSync } from "node:fs";
|
|
6
8
|
import { mkdir, rm } from "node:fs/promises";
|
|
7
|
-
import { join } from "node:path";
|
|
8
|
-
import { homedir, platform } from "node:os";
|
|
9
9
|
import { spawn } from "node:child_process";
|
|
10
10
|
//#region src/browser/cdp-local-launcher.ts
|
|
11
11
|
/**
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { PACKAGE_VERSION, init_package_version } from "../../package-version.js";
|
|
2
|
-
import {
|
|
2
|
+
import { assertCacheDir, init_cache_dir_policy } from "../cache-dir-policy.js";
|
|
3
3
|
import { createLogger } from "../../utils/logger/index.js";
|
|
4
4
|
import { init_logger } from "../../utils/logger.js";
|
|
5
5
|
import { init_paths, resolveBinDir } from "../../config/paths.js";
|
|
6
|
-
import {
|
|
6
|
+
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
7
7
|
import { resolvePackageRoot } from "../../infra/update-check.js";
|
|
8
|
+
import { dirname, join } from "node:path";
|
|
8
9
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
9
10
|
import { readFile, readdir, rm } from "node:fs/promises";
|
|
10
|
-
import { dirname, join } from "node:path";
|
|
11
11
|
import { spawn } from "node:child_process";
|
|
12
12
|
import { fileURLToPath } from "node:url";
|
|
13
13
|
//#region src/browser/providers/browser-ext-install.ts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { assertCacheDir, expandHome, init_cache_dir_policy } from "../cache-dir-policy.js";
|
|
1
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
3
|
import { init_logger } from "../../utils/logger.js";
|
|
3
4
|
import { init_paths, resolveBinDir } from "../../config/paths.js";
|
|
4
|
-
import { assertCacheDir, expandHome, init_cache_dir_policy } from "../cache-dir-policy.js";
|
|
5
5
|
import { loadPlaywrightCoreModule } from "./playwright-doctor.js";
|
|
6
6
|
import { WEBDRIVER_OVERRIDE_SCRIPT, buildStealthArgs, filterCloakBrowserExtraArgs, generateFingerprintSeed, makeExecutable, removeQuarantineAttr } from "../stealth.js";
|
|
7
7
|
import { pickFreePort } from "../free-port.js";
|
|
8
|
-
import {
|
|
8
|
+
import { arch, platform, tmpdir } from "node:os";
|
|
9
|
+
import { join, resolve } from "node:path";
|
|
9
10
|
import { createReadStream, createWriteStream } from "node:fs";
|
|
11
|
+
import { createHash } from "node:crypto";
|
|
10
12
|
import { mkdir, mkdtemp, rm, stat } from "node:fs/promises";
|
|
11
|
-
import { join, resolve } from "node:path";
|
|
12
|
-
import { arch, platform, tmpdir } from "node:os";
|
|
13
13
|
import { spawn } from "node:child_process";
|
|
14
14
|
import { Readable, Transform } from "node:stream";
|
|
15
15
|
import AdmZip from "adm-zip";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
2
3
|
import { existsSync } from "node:fs";
|
|
3
4
|
import { stat } from "node:fs/promises";
|
|
4
|
-
import { dirname, join } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
//#region src/browser/providers/playwright-doctor.ts
|
|
7
7
|
/** Root directory of the `playwright-core` package (Electron extraResources or node_modules). */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { chmod, stat } from "node:fs/promises";
|
|
4
3
|
import { platform } from "node:os";
|
|
4
|
+
import { chmod, stat } from "node:fs/promises";
|
|
5
5
|
import { exec } from "node:child_process";
|
|
6
6
|
import { promisify } from "node:util";
|
|
7
7
|
//#region src/browser/stealth.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 { mkdir, writeFile } from "fs/promises";
|
|
4
3
|
import { join, resolve } from "path";
|
|
4
|
+
import { mkdir, writeFile } from "fs/promises";
|
|
5
5
|
import { randomBytes } from "crypto";
|
|
6
6
|
//#region src/channels/attachments/inbound-persist.ts
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { mkdir, writeFile } from "fs/promises";
|
|
4
3
|
import { join, resolve } from "path";
|
|
4
|
+
import { mkdir, writeFile } from "fs/promises";
|
|
5
5
|
import { randomBytes } from "crypto";
|
|
6
6
|
//#region src/channels/attachments/outbound-tts-persist.ts
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
|
-
import { randomUUID } from "node:crypto";
|
|
3
2
|
import { join } from "path";
|
|
4
3
|
import { existsSync, mkdirSync, readFileSync } from "fs";
|
|
4
|
+
import { randomUUID } from "node:crypto";
|
|
5
5
|
//#region src/channels/outbound/persist-store.ts
|
|
6
6
|
/**
|
|
7
7
|
* Durable outbound queue (crash recovery): JSON file under agent internal dir.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { appendAllowFromIdSync } from "./allow-from-file.js";
|
|
2
2
|
import "./pairing-constants.js";
|
|
3
|
-
import crypto from "node:crypto";
|
|
4
|
-
import fs from "node:fs";
|
|
5
3
|
import path from "node:path";
|
|
4
|
+
import fs from "node:fs";
|
|
5
|
+
import crypto from "node:crypto";
|
|
6
6
|
//#region src/channels/pairing/pairing-store.ts
|
|
7
7
|
const PAIRING_CODE_LENGTH = 8;
|
|
8
8
|
const PAIRING_CODE_ALPHABET = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { init_agent_scope, normalizeAgentId, resolveAgentProfileDir } from "../agent/agent-scope.js";
|
|
2
|
-
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
3
2
|
import { init_agent_session_key, resolveAgentIdFromSessionKey } from "../routing/agent-session-key.js";
|
|
3
|
+
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
4
4
|
import { commandRegistry } from "./registry.js";
|
|
5
|
-
import { readFile } from "node:fs/promises";
|
|
6
5
|
import { join } from "node:path";
|
|
6
|
+
import { readFile } from "node:fs/promises";
|
|
7
7
|
//#region src/chat-commands/agent-edit.ts
|
|
8
8
|
/**
|
|
9
9
|
* /agent-edit — open the current chat as an agent profile editing session.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
2
|
+
import { init_session_key, parseSessionKey } from "../../routing/session-key.js";
|
|
1
3
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
4
|
import { init_logger } from "../../utils/logger.js";
|
|
3
5
|
import { init_paths, resolveConfigPath } from "../../config/paths.js";
|
|
4
|
-
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
5
6
|
import { init_loader, loadConfig, saveConfig } from "../../config/loader.js";
|
|
6
|
-
import { init_session_key, parseSessionKey } from "../../routing/session-key.js";
|
|
7
7
|
import { commandRegistry } from "../registry.js";
|
|
8
8
|
import { resolveAllowlistMatchSimple } from "../../channels/security.js";
|
|
9
9
|
import { parseConfigValue } from "../config-value.js";
|
|
@@ -4,8 +4,8 @@ import { init_loader, saveConfig } from "../config/loader.js";
|
|
|
4
4
|
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
5
5
|
import { getRoutingInfo, getSessionDisplayName } from "./session-key.js";
|
|
6
6
|
import { wrapMarkdownExportAsHtml } from "../session/chat-export.js";
|
|
7
|
-
import { mkdir, writeFile } from "fs/promises";
|
|
8
7
|
import { join } from "path";
|
|
8
|
+
import { mkdir, writeFile } from "fs/promises";
|
|
9
9
|
//#region src/chat-commands/context.ts
|
|
10
10
|
init_logger();
|
|
11
11
|
init_loader();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
2
1
|
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
2
|
+
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
3
3
|
import { resolveGatewayLocalClientHost } from "../../config/gateway-bind.js";
|
|
4
4
|
import { formatExamples, register } from "../registry.js";
|
|
5
5
|
import { existsSync, readFileSync } from "fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ConfigSchema, init_schema } from "../../../../config/schema.js";
|
|
2
2
|
import { init_loader, loadConfig, saveConfig } from "../../../../config/loader.js";
|
|
3
|
-
import { existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
4
3
|
import { dirname } from "node:path";
|
|
4
|
+
import { existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
5
5
|
//#region src/cli/commands/doctor/checks/config-health.ts
|
|
6
6
|
init_loader();
|
|
7
7
|
init_schema();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "../../../../providers/env-keys.js";
|
|
2
1
|
import { getAgentDefaultModelRef, init_schema, parseModelRef } from "../../../../config/schema.js";
|
|
3
2
|
import { init_loader, loadConfig } from "../../../../config/loader.js";
|
|
3
|
+
import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "../../../../providers/env-keys.js";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
//#region src/cli/commands/doctor/checks/provider-auth.ts
|
|
6
6
|
init_loader();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { init_agent_scope, listAgentEntries, resolveDefaultAgentId } from "../../../../agent/agent-scope.js";
|
|
2
|
+
import { init_session_key, parseSessionKey } from "../../../../routing/session-key.js";
|
|
2
3
|
import { init_transcript_paths, resolveSessionFilePath } from "../../../../session/parity/transcript-paths.js";
|
|
3
4
|
import { FILENAMES, init_paths, resolveSessionsDir } from "../../../../config/paths.js";
|
|
4
5
|
import { init_loader, loadConfig } from "../../../../config/loader.js";
|
|
5
|
-
import { init_session_key, parseSessionKey } from "../../../../routing/session-key.js";
|
|
6
|
-
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
7
6
|
import { basename, join } from "node:path";
|
|
7
|
+
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
8
8
|
//#region src/cli/commands/doctor/checks/session-integrity.ts
|
|
9
9
|
init_agent_scope();
|
|
10
10
|
init_loader();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { accessSync, chmodSync, constants, existsSync, mkdirSync, statSync } from "node:fs";
|
|
2
1
|
import { join } from "node:path";
|
|
2
|
+
import { accessSync, chmodSync, constants, existsSync, mkdirSync, statSync } from "node:fs";
|
|
3
3
|
//#region src/cli/commands/doctor/checks/state-integrity.ts
|
|
4
4
|
function isWritable(dir) {
|
|
5
5
|
try {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_agent_scope, resolveAgentProfileDir, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../../../agent/agent-scope.js";
|
|
2
2
|
import { WORKSPACE_FILES, init_paths } from "../../../../config/paths.js";
|
|
3
3
|
import { init_loader, loadConfig } from "../../../../config/loader.js";
|
|
4
|
-
import { existsSync } from "node:fs";
|
|
5
4
|
import { join } from "node:path";
|
|
5
|
+
import { existsSync } from "node:fs";
|
|
6
6
|
//#region src/cli/commands/doctor/checks/workspace-status.ts
|
|
7
7
|
init_agent_scope();
|
|
8
8
|
init_loader();
|