wednesdayai 0.4.12-dev.708 → 0.4.12-dev.709
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/{agent-scope-DxKPMu8w.js → agent-scope-cbxkoURo.js} +3 -3
- package/dist/{agent-turn-runner-Bo-14dCk.js → agent-turn-runner-BGEMB9i7.js} +5 -5
- package/dist/{api-key-rotation-MCks5z9E.js → api-key-rotation-Di-Xv7dE.js} +2 -2
- package/dist/{audio-preflight-D-jX_3PI.js → audio-preflight-B2oeH152.js} +27 -27
- package/dist/{audio-transcription-runner-z8iu9ZW_.js → audio-transcription-runner-D1gaKiYc.js} +11 -11
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +58 -58
- package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-journal/handler.js +58 -58
- package/dist/bundled/session-memory/handler.js +58 -58
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-CSc4nhSd.js → channel-activity-rKX7OerG.js} +3 -3
- package/dist/{chrome-DsAfEH5c.js → chrome-DFRVroOs.js} +15 -15
- package/dist/{chunk-c1jvtxVA.js → chunk-B7KZoDXm.js} +3 -3
- package/dist/{command-queue-BkU8VL2o.js → command-queue-DZsc5M2W.js} +1 -1
- package/dist/{command-registry-b8VeqJpJ.js → command-registry-XVw7Umb-.js} +4 -4
- package/dist/{commands-registry-K0xWPmkW.js → commands-registry-CeUqKxlW.js} +2 -2
- package/dist/{completion-cli-eM5rgTAp.js → completion-cli-Cs6_r67M.js} +1 -1
- package/dist/{completion-cli-SMlq8SpJ.js → completion-cli-OG8408r3.js} +2 -2
- package/dist/{deliver-CKX3D5Qb.js → deliver-D9ZlDeeK.js} +24 -24
- package/dist/{diagnostic-CwxQVPgP.js → diagnostic-BQTUSnsG.js} +5 -5
- package/dist/{doctor-completion-CVSivX8q.js → doctor-completion-DHGYwnha.js} +1 -1
- package/dist/{doctor-completion-DSkCajIl.js → doctor-completion-DHzAQdU5.js} +1 -1
- package/dist/entry.js +2 -2
- package/dist/{fetch-D0fPm94V.js → fetch-BRLmqIUZ.js} +8 -8
- package/dist/{fetch-guard-DGkoJpgm.js → fetch-guard-DaQ-LaL5.js} +3 -3
- package/dist/{frontmatter-saAwiKEb.js → frontmatter-PMByWrfP.js} +5 -5
- package/dist/{fs-safe-LRpYbPaA.js → fs-safe-DwICJjkN.js} +4 -4
- package/dist/{gateway-cli-90-omfdt.js → gateway-cli-0mPia-yK.js} +18 -1
- package/dist/{gateway-cli-CilhVdIf.js → gateway-cli-DZZF_m3l.js} +18 -1
- package/dist/{github-copilot-token-zGOMIGSh.js → github-copilot-token-WSjo05vB.js} +7 -7
- package/dist/{image-ops-D_fm2PuR.js → image-ops-O8pHxo7i.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{ir-CM-jZPvD.js → ir-BdrsYTip.js} +5 -5
- package/dist/{legacy-names-vLJrYADD.js → legacy-names-CLlrMq8r.js} +1 -1
- package/dist/llm-slug-generator.js +58 -58
- package/dist/{logger-a0-zAY5a.js → logger-DNehzD_s.js} +1 -1
- package/dist/{manager-D8_WeA0B.js → manager-Dha79IeT.js} +12 -12
- package/dist/{markdown-tables-DDy0mHfA.js → markdown-tables-CPpxzad4.js} +2 -2
- package/dist/{model-selection-C8cuSPJ6.js → model-selection-CpVr-61V.js} +86 -86
- package/dist/{onboard-DSm2g3vN.js → onboard-8QmY5qtC.js} +1 -1
- package/dist/{onboard-DqwoTpU5.js → onboard-BwuGjbN2.js} +1 -1
- package/dist/{onboarding-CbkMsexm.js → onboarding-BeCgp92Z.js} +1 -1
- package/dist/{onboarding-BA0mgN0_.js → onboarding-BwJssndg.js} +1 -1
- package/dist/{onboarding.finalize-GSMxZGDr.js → onboarding.finalize-Dl0NbVZ8.js} +3 -3
- package/dist/{onboarding.finalize-DmqP9pws.js → onboarding.finalize-GThlsTQx.js} +4 -4
- package/dist/{outbound-attachment-BqwSHCKk.js → outbound-attachment-DrSw_Ksh.js} +2 -2
- package/dist/{outbound-message-hooks-B2Lq5cjw.js → outbound-message-hooks-BclU8TMt.js} +4 -4
- package/dist/{path-alias-guards-Zj-NwKjV.js → path-alias-guards-Cd5yHmTq.js} +1 -1
- package/dist/{paths-C6TxBCvO.js → paths-Cvc9EM8Y.js} +5 -5
- package/dist/{pi-embedded-BruS0ZnZ.js → pi-embedded-JPR-Maki.js} +169 -169
- package/dist/{pi-embedded-helpers-BYrpALPI.js → pi-embedded-helpers-C-hJQ8AQ.js} +24 -24
- package/dist/{pi-embedded-utils-B-HQafgJ.js → pi-embedded-utils-DPMX1Kdc.js} +3 -3
- package/dist/{pi-model-discovery-DoljOCVG.js → pi-model-discovery-ynxqOQma.js} +7 -7
- package/dist/{program-BR_-31Ib.js → program-DAwSVRFz.js} +2 -2
- package/dist/{program-context-DqNMfWhq.js → program-context-B3m_Vhb8.js} +6 -6
- package/dist/{prompt-select-styled-Cft7TSRk.js → prompt-select-styled-DGKn-Jnb.js} +1 -1
- package/dist/{prompt-select-styled-D0PhzQ3o.js → prompt-select-styled-DWcT6TS3.js} +1 -1
- package/dist/{provider-image-BGFyw5bc.js → provider-image-CjgTKy78.js} +5 -5
- package/dist/{proxy-fWL7CKDP.js → proxy-C9sq6M-h.js} +1 -1
- package/dist/{proxy-env-Bp4LRKl9.js → proxy-env-BL6Wl2NH.js} +2 -2
- package/dist/{proxy-fetch-DCI0KuH6.js → proxy-fetch-CK5AQAYw.js} +1 -1
- package/dist/{pw-ai-CYVcKfKX.js → pw-ai-DM-YIw_o.js} +14 -14
- package/dist/{qmd-manager-xNXMqudI.js → qmd-manager-fdxSsmnA.js} +10 -10
- package/dist/{query-expansion-DwSgrk0v.js → query-expansion-Dm2XbrYk.js} +5 -5
- package/dist/{recorder-DHFOr5-p.js → recorder--EPc-GsC.js} +4 -4
- package/dist/{redact-DZne_lu8.js → redact-BOHmCPP_.js} +1 -1
- package/dist/{register.maintenance-Dgcu5Nb-.js → register.maintenance-B0E0HWS3.js} +5 -5
- package/dist/{register.maintenance-BFoMS877.js → register.maintenance-Cde6wAYK.js} +4 -4
- package/dist/{register.onboard-9IafuGo3.js → register.onboard-BpTumYaA.js} +2 -2
- package/dist/{register.onboard-CWxGOIeC.js → register.onboard-BzLofY35.js} +2 -2
- package/dist/{register.setup-Bawf4MtR.js → register.setup-C9FYWtwC.js} +2 -2
- package/dist/{register.setup-CpH51l_z.js → register.setup-mxq7ayTY.js} +2 -2
- package/dist/{register.subclis-CHB5C1GR.js → register.subclis-DyqB2k1U.js} +3 -3
- package/dist/{replies-czd0p1_N.js → replies-zGU1jl6b.js} +4 -4
- package/dist/{reply-directives-v0ld56O3.js → reply-directives-BpvtuQ6W.js} +2 -2
- package/dist/{reply-prefix-DVkNDBNe.js → reply-prefix-C7WlN3qm.js} +1 -1
- package/dist/{resolve-route-Bx05SNin.js → resolve-route-BuurQ_RE.js} +5 -5
- package/dist/{run-main-BShsJ2ew.js → run-main-WS7QF27g.js} +3 -3
- package/dist/{run-with-concurrency-BXDCD4Tu.js → run-with-concurrency-4jh_yc-4.js} +4 -4
- package/dist/{runs-BIIlPzkU.js → runs-ysBHYx8g.js} +8 -8
- package/dist/{send-CDhxZ4gL.js → send-AlsHHAwq.js} +7 -7
- package/dist/{send-BHu4zHcK.js → send-B8TQjDLF.js} +6 -6
- package/dist/{send-DB64Q7ia.js → send-CdkJHvhd.js} +6 -6
- package/dist/{send-Bx7VMqkE.js → send-D5oa8eVL.js} +8 -8
- package/dist/{send-D1vxqVJJ.js → send-DDzPcUw9.js} +27 -27
- package/dist/{session-meta-D3RTAsqe.js → session-meta-BM6rSCmn.js} +2 -2
- package/dist/{skill-commands-D7C-ROwS.js → skill-commands-C_W-vMXu.js} +9 -9
- package/dist/{skills-Dz90ga_I.js → skills-Bn7terph.js} +21 -21
- package/dist/{store-gQ6FSjVk.js → store-xxN6qyAh.js} +2 -2
- package/dist/{subsystem-CPYnUTN4.js → subsystem-BCjklMkJ.js} +64 -64
- package/dist/{tables-DHp8qKo9.js → tables-CjRug-NJ.js} +1 -1
- package/dist/{tokens-9BPY4SaX.js → tokens-9Mla_HDp.js} +1 -1
- package/dist/{tool-loop-detection-C1fqyXXD.js → tool-loop-detection-8uvf8mSd.js} +2 -2
- package/dist/{update-cli-_yxN7Iuk.js → update-cli-BrR0aq-I.js} +4 -4
- package/dist/{update-cli-pxJZTMTe.js → update-cli-CjIUOznW.js} +5 -5
- package/dist/{user-run-recording-BCrEbuKq.js → user-run-recording-B6Tm0B7M.js} +2 -2
- package/dist/{workspace-B707AGIc.js → workspace-Dbn4gFdH.js} +9 -9
- package/extensions/acpx/package.json +1 -1
- package/extensions/anthropic/package.json +1 -1
- package/extensions/bifrost/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/deepgram/package.json +1 -1
- package/extensions/deepinfra/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/diffs/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/dream-cycle/package.json +1 -1
- package/extensions/elevenlabs/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/gemini-search/package.json +1 -1
- package/extensions/google/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/grok-search/package.json +1 -1
- package/extensions/groq/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/kimi-search/package.json +1 -1
- package/extensions/learning-core/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +1 -1
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/mistral/package.json +1 -1
- package/extensions/moonshot/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +1 -1
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +1 -1
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/openai/package.json +1 -1
- package/extensions/openai-realtime/package.json +1 -1
- package/extensions/openrouter/package.json +1 -1
- package/extensions/perplexity-search/package.json +1 -1
- package/extensions/searxng-search/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +1 -1
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +1 -1
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zai/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +1 -1
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +1 -1
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { _ as toAgentModelListLike, a as resolveAgentEffectiveModelPrimary, c as resolveAgentWorkspaceDir, g as resolveAgentModelPrimaryValue, l as resolveDefaultAgentId, r as resolveAgentConfig } from "./agent-scope-
|
|
3
|
-
import { c as resolveStateDir, d as resolveRequiredHomeDir, i as resolveDefaultConfigCandidates, l as expandHomePrefix, o as resolveOAuthDir, r as resolveConfigPath, s as resolveOAuthPath, t as DEFAULT_GATEWAY_PORT } from "./paths-
|
|
4
|
-
import { A as resolveConfigIncludes, D as ConfigIncludeError, E as normalizeConfigPaths, F as openBoundaryFileSync, G as applyConfigEnvVars, H as isPathInside$1, J as MissingEnvVarError, M as isPathInside$2, O as INCLUDE_KEY, X as resolveConfigEnvVars, Y as containsEnvVarReference, b as getChildLogger, dt as sleep, f as logVerbose, it as normalizeE164, j as isBlockedObjectKey, k as readConfigIncludeFileWithGuards, n as stripAnsi, ot as resolveConfigDir, q as sanitizeHostExecEnv, rt as isRecord$3, st as resolveUserPath, t as createSubsystemLogger, w as createFileLogWriter } from "./subsystem-
|
|
2
|
+
import { _ as toAgentModelListLike, a as resolveAgentEffectiveModelPrimary, c as resolveAgentWorkspaceDir, g as resolveAgentModelPrimaryValue, l as resolveDefaultAgentId, r as resolveAgentConfig } from "./agent-scope-cbxkoURo.js";
|
|
3
|
+
import { c as resolveStateDir, d as resolveRequiredHomeDir, i as resolveDefaultConfigCandidates, l as expandHomePrefix, o as resolveOAuthDir, r as resolveConfigPath, s as resolveOAuthPath, t as DEFAULT_GATEWAY_PORT } from "./paths-Cvc9EM8Y.js";
|
|
4
|
+
import { A as resolveConfigIncludes, D as ConfigIncludeError, E as normalizeConfigPaths, F as openBoundaryFileSync, G as applyConfigEnvVars, H as isPathInside$1, J as MissingEnvVarError, M as isPathInside$2, O as INCLUDE_KEY, X as resolveConfigEnvVars, Y as containsEnvVarReference, b as getChildLogger, dt as sleep, f as logVerbose, it as normalizeE164, j as isBlockedObjectKey, k as readConfigIncludeFileWithGuards, n as stripAnsi, ot as resolveConfigDir, q as sanitizeHostExecEnv, rt as isRecord$3, st as resolveUserPath, t as createSubsystemLogger, w as createFileLogWriter } from "./subsystem-BCjklMkJ.js";
|
|
5
5
|
import { t as isPlainObject$2 } from "./plain-object-CLm2c5Nu.js";
|
|
6
|
-
import { D as normalizeAgentId, G as parseAgentSessionKey, I as DEFAULT_ACCOUNT_ID, L as normalizeAccountId$1, O as normalizeMainKey, R as normalizeOptionalAccountId, _ as runExec, w as expandIdentityLinksToMatchKeys, x as buildAgentMainSessionKey, y as DEFAULT_AGENT_ID } from "./workspace-
|
|
7
|
-
import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken, t as DEFAULT_COPILOT_API_BASE_URL } from "./github-copilot-token-
|
|
8
|
-
import { a as registerInternalHook, s as parseBooleanValue, t as readManifestNamespace } from "./legacy-names-
|
|
9
|
-
import { a as parseSessionArchiveTimestamp, c as resolveSessionFilePath, d as resolveSessionTranscriptPathInDir, i as isSessionArchiveArtifactName, n as formatSessionArchiveTimestamp, p as resolveStorePath, r as isPrimarySessionTranscriptFileName, s as resolveDefaultSessionStorePath, t as runTasksWithConcurrency, u as resolveSessionTranscriptPath } from "./run-with-concurrency-
|
|
6
|
+
import { D as normalizeAgentId, G as parseAgentSessionKey, I as DEFAULT_ACCOUNT_ID, L as normalizeAccountId$1, O as normalizeMainKey, R as normalizeOptionalAccountId, _ as runExec, w as expandIdentityLinksToMatchKeys, x as buildAgentMainSessionKey, y as DEFAULT_AGENT_ID } from "./workspace-Dbn4gFdH.js";
|
|
7
|
+
import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken, t as DEFAULT_COPILOT_API_BASE_URL } from "./github-copilot-token-WSjo05vB.js";
|
|
8
|
+
import { a as registerInternalHook, s as parseBooleanValue, t as readManifestNamespace } from "./legacy-names-CLlrMq8r.js";
|
|
9
|
+
import { a as parseSessionArchiveTimestamp, c as resolveSessionFilePath, d as resolveSessionTranscriptPathInDir, i as isSessionArchiveArtifactName, n as formatSessionArchiveTimestamp, p as resolveStorePath, r as isPrimarySessionTranscriptFileName, s as resolveDefaultSessionStorePath, t as runTasksWithConcurrency, u as resolveSessionTranscriptPath } from "./run-with-concurrency-4jh_yc-4.js";
|
|
10
10
|
import { n as resolveConversationLabel, r as normalizeChatType } from "./conversation-label-BnH5Yy9T.js";
|
|
11
11
|
import { createRequire } from "node:module";
|
|
12
12
|
import fs, { appendFile, chmod, mkdir, open, readFile, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
13
13
|
import os, { userInfo } from "node:os";
|
|
14
14
|
import path, { join } from "node:path";
|
|
15
|
-
import
|
|
16
|
-
import
|
|
15
|
+
import fs$1 from "node:fs";
|
|
16
|
+
import JSON5 from "json5";
|
|
17
17
|
import util, { isDeepStrictEqual } from "node:util";
|
|
18
18
|
import { execFileSync, spawn } from "node:child_process";
|
|
19
19
|
import { fileURLToPath } from "node:url";
|
|
@@ -280,7 +280,7 @@ function isValidPid(pid) {
|
|
|
280
280
|
function isZombieProcess(pid) {
|
|
281
281
|
if (process.platform !== "linux") return false;
|
|
282
282
|
try {
|
|
283
|
-
return
|
|
283
|
+
return fs$1.readFileSync(`/proc/${pid}/status`, "utf8").match(/^State:\s+(\S)/m)?.[1] === "Z";
|
|
284
284
|
} catch {
|
|
285
285
|
return false;
|
|
286
286
|
}
|
|
@@ -307,7 +307,7 @@ function getProcessStartTime(pid) {
|
|
|
307
307
|
if (process.platform !== "linux") return null;
|
|
308
308
|
if (!isValidPid(pid)) return null;
|
|
309
309
|
try {
|
|
310
|
-
const stat =
|
|
310
|
+
const stat = fs$1.readFileSync(`/proc/${pid}/stat`, "utf8");
|
|
311
311
|
const commEndIndex = stat.lastIndexOf(")");
|
|
312
312
|
if (commEndIndex < 0) return null;
|
|
313
313
|
const fields = stat.slice(commEndIndex + 1).trimStart().split(/\s+/);
|
|
@@ -630,7 +630,7 @@ function resolveAuthStorePathForDisplay(agentDir) {
|
|
|
630
630
|
return pathname.startsWith("~") ? pathname : resolveUserPath(pathname);
|
|
631
631
|
}
|
|
632
632
|
function ensureAuthStoreFile(pathname) {
|
|
633
|
-
if (
|
|
633
|
+
if (fs$1.existsSync(pathname)) return;
|
|
634
634
|
saveJsonFile(pathname, {
|
|
635
635
|
version: AUTH_STORE_VERSION,
|
|
636
636
|
profiles: {}
|
|
@@ -893,7 +893,7 @@ function loadAuthProfileStoreForAgent(agentDir, options) {
|
|
|
893
893
|
if (shouldWrite && legacy !== null) {
|
|
894
894
|
const legacyPath = resolveLegacyAuthStorePath(agentDir);
|
|
895
895
|
try {
|
|
896
|
-
|
|
896
|
+
fs$1.unlinkSync(legacyPath);
|
|
897
897
|
} catch (err) {
|
|
898
898
|
if (err?.code !== "ENOENT") log$23.warn("failed to delete legacy auth.json after migration", {
|
|
899
899
|
err,
|
|
@@ -1081,7 +1081,7 @@ function loadDotEnv(opts) {
|
|
|
1081
1081
|
const quiet = opts?.quiet ?? true;
|
|
1082
1082
|
dotenv.config({ quiet });
|
|
1083
1083
|
const globalEnvPath = path.join(resolveConfigDir(process.env), ".env");
|
|
1084
|
-
if (!
|
|
1084
|
+
if (!fs$1.existsSync(globalEnvPath)) return;
|
|
1085
1085
|
dotenv.config({
|
|
1086
1086
|
quiet,
|
|
1087
1087
|
path: globalEnvPath,
|
|
@@ -1119,7 +1119,7 @@ function resolveTimeoutMs(timeoutMs) {
|
|
|
1119
1119
|
function readEtcShells() {
|
|
1120
1120
|
if (cachedEtcShells !== void 0) return cachedEtcShells;
|
|
1121
1121
|
try {
|
|
1122
|
-
const entries =
|
|
1122
|
+
const entries = fs$1.readFileSync("/etc/shells", "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#") && path.isAbsolute(line));
|
|
1123
1123
|
cachedEtcShells = new Set(entries);
|
|
1124
1124
|
} catch {
|
|
1125
1125
|
cachedEtcShells = null;
|
|
@@ -1624,7 +1624,7 @@ function resolveActiveTalkProviderConfig(talk) {
|
|
|
1624
1624
|
};
|
|
1625
1625
|
}
|
|
1626
1626
|
function readTalkApiKeyFromProfile(deps = {}) {
|
|
1627
|
-
const fsImpl = deps.fs ??
|
|
1627
|
+
const fsImpl = deps.fs ?? fs$1;
|
|
1628
1628
|
const osImpl = deps.os ?? os;
|
|
1629
1629
|
const pathImpl = deps.path ?? path;
|
|
1630
1630
|
const home = osImpl.homedir();
|
|
@@ -3656,7 +3656,7 @@ function normalizeMatchTarget(value) {
|
|
|
3656
3656
|
}
|
|
3657
3657
|
function tryRealpath(value) {
|
|
3658
3658
|
try {
|
|
3659
|
-
return
|
|
3659
|
+
return fs$1.realpathSync(value);
|
|
3660
3660
|
} catch {
|
|
3661
3661
|
return null;
|
|
3662
3662
|
}
|
|
@@ -4209,8 +4209,8 @@ function resolveWindowsExecutableExtensions(executable, env) {
|
|
|
4209
4209
|
}
|
|
4210
4210
|
function isExecutableFile(filePath) {
|
|
4211
4211
|
try {
|
|
4212
|
-
if (!
|
|
4213
|
-
if (process.platform !== "win32")
|
|
4212
|
+
if (!fs$1.statSync(filePath).isFile()) return false;
|
|
4213
|
+
if (process.platform !== "win32") fs$1.accessSync(filePath, fs$1.constants.X_OK);
|
|
4214
4214
|
return true;
|
|
4215
4215
|
} catch {
|
|
4216
4216
|
return false;
|
|
@@ -4249,7 +4249,7 @@ const DEFAULT_SAFE_BINS = [
|
|
|
4249
4249
|
function tryResolveRealpath(filePath) {
|
|
4250
4250
|
if (!filePath) return;
|
|
4251
4251
|
try {
|
|
4252
|
-
return
|
|
4252
|
+
return fs$1.realpathSync(filePath);
|
|
4253
4253
|
} catch {
|
|
4254
4254
|
return;
|
|
4255
4255
|
}
|
|
@@ -5124,7 +5124,7 @@ function listWritableExplicitTrustedSafeBinDirs(entries) {
|
|
|
5124
5124
|
for (const dir of resolved) {
|
|
5125
5125
|
let stat;
|
|
5126
5126
|
try {
|
|
5127
|
-
stat =
|
|
5127
|
+
stat = fs$1.statSync(dir);
|
|
5128
5128
|
} catch {
|
|
5129
5129
|
continue;
|
|
5130
5130
|
}
|
|
@@ -5771,7 +5771,7 @@ function releaseAllLocksSync() {
|
|
|
5771
5771
|
if (typeof held.handle.close === "function") held.handle.close().catch(() => {});
|
|
5772
5772
|
} catch {}
|
|
5773
5773
|
try {
|
|
5774
|
-
|
|
5774
|
+
fs$1.rmSync(held.lockPath, { force: true });
|
|
5775
5775
|
} catch {}
|
|
5776
5776
|
HELD_LOCKS.delete(sessionFile);
|
|
5777
5777
|
}
|
|
@@ -6614,7 +6614,7 @@ const credsSaveQueues = resolveProcessScopedMap(Symbol.for("openclaw.webCredsSav
|
|
|
6614
6614
|
function canonicalWebAuthDir(authDir) {
|
|
6615
6615
|
const resolvedAuthDir = resolveUserPath(authDir);
|
|
6616
6616
|
try {
|
|
6617
|
-
return
|
|
6617
|
+
return fs$1.realpathSync.native(resolvedAuthDir);
|
|
6618
6618
|
} catch (err) {
|
|
6619
6619
|
if (err.code === "ENOENT") return resolvedAuthDir;
|
|
6620
6620
|
throw err;
|
|
@@ -6629,7 +6629,7 @@ function isWebAuthBeingCleared(authDir) {
|
|
|
6629
6629
|
}
|
|
6630
6630
|
function statFileSync(filePath) {
|
|
6631
6631
|
try {
|
|
6632
|
-
return
|
|
6632
|
+
return fs$1.statSync(filePath);
|
|
6633
6633
|
} catch {
|
|
6634
6634
|
return null;
|
|
6635
6635
|
}
|
|
@@ -6641,7 +6641,7 @@ function hasWebCredsSync(authDir) {
|
|
|
6641
6641
|
const resolvedAuthDir = resolveUserPath(authDir);
|
|
6642
6642
|
maybeRestoreCredsFromBackup(resolvedAuthDir);
|
|
6643
6643
|
try {
|
|
6644
|
-
const stats =
|
|
6644
|
+
const stats = fs$1.statSync(resolveWebCredsPath(resolvedAuthDir));
|
|
6645
6645
|
return stats.isFile() && stats.size > 1;
|
|
6646
6646
|
} catch {
|
|
6647
6647
|
return false;
|
|
@@ -6649,10 +6649,10 @@ function hasWebCredsSync(authDir) {
|
|
|
6649
6649
|
}
|
|
6650
6650
|
function readCredsJsonRaw(filePath) {
|
|
6651
6651
|
try {
|
|
6652
|
-
if (!
|
|
6653
|
-
const stats =
|
|
6652
|
+
if (!fs$1.existsSync(filePath)) return null;
|
|
6653
|
+
const stats = fs$1.statSync(filePath);
|
|
6654
6654
|
if (!stats.isFile() || stats.size <= 1) return null;
|
|
6655
|
-
return
|
|
6655
|
+
return fs$1.readFileSync(filePath, "utf-8");
|
|
6656
6656
|
} catch {
|
|
6657
6657
|
return null;
|
|
6658
6658
|
}
|
|
@@ -6677,12 +6677,12 @@ function maybeRestoreCredsFromBackup(authDir) {
|
|
|
6677
6677
|
const backupRaw = readCredsJsonRaw(backupPath);
|
|
6678
6678
|
const backupStats = statFileSync(backupPath);
|
|
6679
6679
|
if (!backupStats?.isFile() || !backupRaw || !isParseableJson(backupRaw)) return;
|
|
6680
|
-
|
|
6680
|
+
fs$1.copyFileSync(backupPath, credsPath);
|
|
6681
6681
|
try {
|
|
6682
|
-
|
|
6682
|
+
fs$1.chmodSync(credsPath, 384);
|
|
6683
6683
|
} catch {}
|
|
6684
6684
|
try {
|
|
6685
|
-
|
|
6685
|
+
fs$1.utimesSync(credsPath, backupStats.atime, backupStats.mtime);
|
|
6686
6686
|
} catch {}
|
|
6687
6687
|
logger.warn({ credsPath }, "restored corrupted WhatsApp creds.json from backup");
|
|
6688
6688
|
} catch {}
|
|
@@ -6702,7 +6702,7 @@ function listWhatsAppAuthDirs(cfg) {
|
|
|
6702
6702
|
accountId
|
|
6703
6703
|
}).authDir);
|
|
6704
6704
|
try {
|
|
6705
|
-
const entries =
|
|
6705
|
+
const entries = fs$1.readdirSync(whatsappDir, { withFileTypes: true });
|
|
6706
6706
|
for (const entry of entries) {
|
|
6707
6707
|
if (!entry.isDirectory()) continue;
|
|
6708
6708
|
authDirs.add(path.join(whatsappDir, entry.name));
|
|
@@ -6724,7 +6724,7 @@ function resolveLegacyAuthDir() {
|
|
|
6724
6724
|
}
|
|
6725
6725
|
function legacyAuthExists(authDir) {
|
|
6726
6726
|
try {
|
|
6727
|
-
return
|
|
6727
|
+
return fs$1.existsSync(path.join(authDir, "creds.json"));
|
|
6728
6728
|
} catch {
|
|
6729
6729
|
return false;
|
|
6730
6730
|
}
|
|
@@ -7088,7 +7088,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
7088
7088
|
const accountCfg = resolveAccountCfg(accountId !== DEFAULT_ACCOUNT_ID ? accountId : DEFAULT_ACCOUNT_ID);
|
|
7089
7089
|
const accountTokenFile = accountCfg?.tokenFile?.trim();
|
|
7090
7090
|
if (accountTokenFile) {
|
|
7091
|
-
if (!
|
|
7091
|
+
if (!fs$1.existsSync(accountTokenFile)) {
|
|
7092
7092
|
opts.logMissingFile?.(`channels.telegram.accounts.${accountId}.tokenFile not found: ${accountTokenFile}`);
|
|
7093
7093
|
return {
|
|
7094
7094
|
token: "",
|
|
@@ -7096,7 +7096,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
7096
7096
|
};
|
|
7097
7097
|
}
|
|
7098
7098
|
try {
|
|
7099
|
-
const token =
|
|
7099
|
+
const token = fs$1.readFileSync(accountTokenFile, "utf-8").trim();
|
|
7100
7100
|
if (token) return {
|
|
7101
7101
|
token,
|
|
7102
7102
|
source: "tokenFile"
|
|
@@ -7124,7 +7124,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
7124
7124
|
const allowEnv = accountId === DEFAULT_ACCOUNT_ID;
|
|
7125
7125
|
const tokenFile = telegramCfg?.tokenFile?.trim();
|
|
7126
7126
|
if (tokenFile) {
|
|
7127
|
-
if (!
|
|
7127
|
+
if (!fs$1.existsSync(tokenFile)) {
|
|
7128
7128
|
opts.logMissingFile?.(`channels.telegram.tokenFile not found: ${tokenFile}`);
|
|
7129
7129
|
return {
|
|
7130
7130
|
token: "",
|
|
@@ -7132,7 +7132,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
7132
7132
|
};
|
|
7133
7133
|
}
|
|
7134
7134
|
try {
|
|
7135
|
-
const token =
|
|
7135
|
+
const token = fs$1.readFileSync(tokenFile, "utf-8").trim();
|
|
7136
7136
|
if (token) return {
|
|
7137
7137
|
token,
|
|
7138
7138
|
source: "tokenFile"
|
|
@@ -10641,9 +10641,9 @@ function buildSessionHeader(sessionId) {
|
|
|
10641
10641
|
})}\n`;
|
|
10642
10642
|
}
|
|
10643
10643
|
async function ensureSessionHeader(params) {
|
|
10644
|
-
if (
|
|
10645
|
-
await
|
|
10646
|
-
await
|
|
10644
|
+
if (fs$1.existsSync(params.sessionFile)) return;
|
|
10645
|
+
await fs$1.promises.mkdir(path.dirname(params.sessionFile), { recursive: true });
|
|
10646
|
+
await fs$1.promises.writeFile(params.sessionFile, buildSessionHeader(params.sessionId), {
|
|
10647
10647
|
encoding: "utf-8",
|
|
10648
10648
|
mode: 384
|
|
10649
10649
|
});
|
|
@@ -11232,7 +11232,7 @@ function capEntryCount(store, overrideMax, opts = {}) {
|
|
|
11232
11232
|
}
|
|
11233
11233
|
async function getSessionFileSize(storePath) {
|
|
11234
11234
|
try {
|
|
11235
|
-
return (await
|
|
11235
|
+
return (await fs$1.promises.stat(storePath)).size;
|
|
11236
11236
|
} catch {
|
|
11237
11237
|
return null;
|
|
11238
11238
|
}
|
|
@@ -11260,7 +11260,7 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
11260
11260
|
}
|
|
11261
11261
|
const backupPath = `${storePath}.bak.${Date.now()}`;
|
|
11262
11262
|
try {
|
|
11263
|
-
await
|
|
11263
|
+
await fs$1.promises.rename(storePath, backupPath);
|
|
11264
11264
|
log$9.info("rotated session store file", {
|
|
11265
11265
|
backupPath: path.basename(backupPath),
|
|
11266
11266
|
sizeBytes: fileSize
|
|
@@ -11271,11 +11271,11 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
11271
11271
|
try {
|
|
11272
11272
|
const dir = path.dirname(storePath);
|
|
11273
11273
|
const baseName = path.basename(storePath);
|
|
11274
|
-
const backups = (await
|
|
11274
|
+
const backups = (await fs$1.promises.readdir(dir)).filter((f) => f.startsWith(`${baseName}.bak.`)).toSorted().toReversed();
|
|
11275
11275
|
const maxBackups = 3;
|
|
11276
11276
|
if (backups.length > maxBackups) {
|
|
11277
11277
|
const toDelete = backups.slice(maxBackups);
|
|
11278
|
-
for (const old of toDelete) await
|
|
11278
|
+
for (const old of toDelete) await fs$1.promises.unlink(path.join(dir, old)).catch(() => void 0);
|
|
11279
11279
|
log$9.info("cleaned up old session store backups", { deleted: toDelete.length });
|
|
11280
11280
|
}
|
|
11281
11281
|
} catch {}
|
|
@@ -11291,7 +11291,7 @@ const NOOP_LOGGER = {
|
|
|
11291
11291
|
function canonicalizePathForComparison$1(filePath) {
|
|
11292
11292
|
const resolved = path.resolve(filePath);
|
|
11293
11293
|
try {
|
|
11294
|
-
return
|
|
11294
|
+
return fs$1.realpathSync(resolved);
|
|
11295
11295
|
} catch {
|
|
11296
11296
|
return resolved;
|
|
11297
11297
|
}
|
|
@@ -11349,12 +11349,12 @@ function resolveReferencedSessionTranscriptPaths(params) {
|
|
|
11349
11349
|
return referenced;
|
|
11350
11350
|
}
|
|
11351
11351
|
async function readSessionsDirFiles(sessionsDir) {
|
|
11352
|
-
const dirEntries = await
|
|
11352
|
+
const dirEntries = await fs$1.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
|
|
11353
11353
|
const files = [];
|
|
11354
11354
|
for (const dirent of dirEntries) {
|
|
11355
11355
|
if (!dirent.isFile()) continue;
|
|
11356
11356
|
const filePath = path.join(sessionsDir, dirent.name);
|
|
11357
|
-
const stat = await
|
|
11357
|
+
const stat = await fs$1.promises.stat(filePath).catch(() => null);
|
|
11358
11358
|
if (!stat?.isFile()) continue;
|
|
11359
11359
|
files.push({
|
|
11360
11360
|
path: filePath,
|
|
@@ -11386,9 +11386,9 @@ function isProtectedFromBudgetRemoval(filePath, replayedFloorMs, nowMs) {
|
|
|
11386
11386
|
}
|
|
11387
11387
|
async function removeFileIfExists(filePath) {
|
|
11388
11388
|
if (isPreservationArmed() || !isJsonlSessionBackend()) return 0;
|
|
11389
|
-
const stat = await
|
|
11389
|
+
const stat = await fs$1.promises.stat(filePath).catch(() => null);
|
|
11390
11390
|
if (!stat?.isFile()) return 0;
|
|
11391
|
-
await
|
|
11391
|
+
await fs$1.promises.rm(filePath, { force: true }).catch(() => void 0);
|
|
11392
11392
|
return stat.size;
|
|
11393
11393
|
}
|
|
11394
11394
|
async function removeFileForBudget(params) {
|
|
@@ -11796,19 +11796,19 @@ function resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, a
|
|
|
11796
11796
|
function canonicalizePathForComparison(filePath) {
|
|
11797
11797
|
const resolved = path.resolve(filePath);
|
|
11798
11798
|
try {
|
|
11799
|
-
return
|
|
11799
|
+
return fs$1.realpathSync(resolved);
|
|
11800
11800
|
} catch {
|
|
11801
11801
|
return resolved;
|
|
11802
11802
|
}
|
|
11803
11803
|
}
|
|
11804
11804
|
function archiveFileOnDisk(filePath, reasonOrOpts) {
|
|
11805
11805
|
if (typeof reasonOrOpts !== "string") {
|
|
11806
|
-
|
|
11807
|
-
|
|
11806
|
+
fs$1.linkSync(filePath, reasonOrOpts.destinationPath);
|
|
11807
|
+
fs$1.unlinkSync(filePath);
|
|
11808
11808
|
return reasonOrOpts.destinationPath;
|
|
11809
11809
|
}
|
|
11810
11810
|
const archived = `${filePath}.${reasonOrOpts}.${formatSessionArchiveTimestamp()}`;
|
|
11811
|
-
|
|
11811
|
+
fs$1.renameSync(filePath, archived);
|
|
11812
11812
|
return archived;
|
|
11813
11813
|
}
|
|
11814
11814
|
/**
|
|
@@ -11824,7 +11824,7 @@ function archiveSessionTranscripts(opts) {
|
|
|
11824
11824
|
const relative = path.relative(storeDir, candidatePath);
|
|
11825
11825
|
if (!relative || relative.startsWith("..") || path.isAbsolute(relative)) continue;
|
|
11826
11826
|
}
|
|
11827
|
-
if (!
|
|
11827
|
+
if (!fs$1.existsSync(candidatePath)) continue;
|
|
11828
11828
|
try {
|
|
11829
11829
|
archived.push(archiveFileOnDisk(candidatePath, opts.reason));
|
|
11830
11830
|
} catch (err) {
|
|
@@ -11847,15 +11847,15 @@ async function cleanupArchivedSessionTranscripts(opts) {
|
|
|
11847
11847
|
let removed = 0;
|
|
11848
11848
|
let scanned = 0;
|
|
11849
11849
|
for (const dir of directories) {
|
|
11850
|
-
const entries = await
|
|
11850
|
+
const entries = await fs$1.promises.readdir(dir).catch(() => []);
|
|
11851
11851
|
for (const entry of entries) {
|
|
11852
11852
|
const timestamp = parseSessionArchiveTimestamp(entry, reason);
|
|
11853
11853
|
if (timestamp == null) continue;
|
|
11854
11854
|
scanned += 1;
|
|
11855
11855
|
if (now - timestamp <= opts.olderThanMs) continue;
|
|
11856
11856
|
const fullPath = path.join(dir, entry);
|
|
11857
|
-
if (!(await
|
|
11858
|
-
await
|
|
11857
|
+
if (!(await fs$1.promises.stat(fullPath).catch(() => null))?.isFile()) continue;
|
|
11858
|
+
await fs$1.promises.rm(fullPath).catch(() => void 0);
|
|
11859
11859
|
removed += 1;
|
|
11860
11860
|
}
|
|
11861
11861
|
}
|
|
@@ -11984,7 +11984,7 @@ function isCacheEnabled(ttlMs) {
|
|
|
11984
11984
|
}
|
|
11985
11985
|
function getFileStatSnapshot(filePath) {
|
|
11986
11986
|
try {
|
|
11987
|
-
const stats =
|
|
11987
|
+
const stats = fs$1.statSync(filePath);
|
|
11988
11988
|
return {
|
|
11989
11989
|
mtimeMs: stats.mtimeMs,
|
|
11990
11990
|
sizeBytes: stats.size
|
|
@@ -12159,7 +12159,7 @@ function persistHighWaterMarkToRedis(client, keyPrefix, sessionId, highWaterMark
|
|
|
12159
12159
|
});
|
|
12160
12160
|
}
|
|
12161
12161
|
async function findLastMatchingUserLineIndex(sessionFile, promptText, fromLineIndex) {
|
|
12162
|
-
const fileStream =
|
|
12162
|
+
const fileStream = fs$1.createReadStream(sessionFile, { encoding: "utf-8" });
|
|
12163
12163
|
const lines = readline.createInterface({
|
|
12164
12164
|
input: fileStream,
|
|
12165
12165
|
crlfDelay: Infinity
|
|
@@ -12186,7 +12186,7 @@ async function findLastMatchingUserLineIndex(sessionFile, promptText, fromLineIn
|
|
|
12186
12186
|
}
|
|
12187
12187
|
async function syncConfiguredSessionTranscriptToRuntimeUnlocked(params, active, transcriptStateKey, pendingAppends = []) {
|
|
12188
12188
|
if (!active.runtime) return;
|
|
12189
|
-
if (!
|
|
12189
|
+
if (!fs$1.existsSync(params.sessionFile)) {
|
|
12190
12190
|
setConfiguredTranscriptHighWaterMark(active, transcriptStateKey, 0);
|
|
12191
12191
|
return;
|
|
12192
12192
|
}
|
|
@@ -12206,7 +12206,7 @@ async function syncConfiguredSessionTranscriptToRuntimeUnlocked(params, active,
|
|
|
12206
12206
|
const currentTurnLineIndex = params.currentUserTurn != null ? await findLastMatchingUserLineIndex(params.sessionFile, params.currentUserTurn.promptText, highWaterMark) : void 0;
|
|
12207
12207
|
let lineIndex = 0;
|
|
12208
12208
|
let syncedLineIndex = highWaterMark;
|
|
12209
|
-
const fileStream =
|
|
12209
|
+
const fileStream = fs$1.createReadStream(params.sessionFile, { encoding: "utf-8" });
|
|
12210
12210
|
const lines = readline.createInterface({
|
|
12211
12211
|
input: fileStream,
|
|
12212
12212
|
crlfDelay: Infinity
|
|
@@ -12401,7 +12401,7 @@ function loadSessionStoreFromDisk(storePath, opts = {}) {
|
|
|
12401
12401
|
const maxReadAttempts = process.platform === "win32" ? 3 : 1;
|
|
12402
12402
|
const retryBuf = maxReadAttempts > 1 ? new Int32Array(new SharedArrayBuffer(4)) : void 0;
|
|
12403
12403
|
for (let attempt = 0; attempt < maxReadAttempts; attempt++) try {
|
|
12404
|
-
const raw =
|
|
12404
|
+
const raw = fs$1.readFileSync(storePath, "utf-8");
|
|
12405
12405
|
if (raw.length === 0 && attempt < maxReadAttempts - 1) {
|
|
12406
12406
|
Atomics.wait(retryBuf, 0, 0, 50);
|
|
12407
12407
|
continue;
|
|
@@ -12579,7 +12579,7 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
12579
12579
|
mode: "primary",
|
|
12580
12580
|
storePath
|
|
12581
12581
|
});
|
|
12582
|
-
await
|
|
12582
|
+
await fs$1.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
12583
12583
|
const json = JSON.stringify(store, null, 2);
|
|
12584
12584
|
const writePrimaryAfterJsonl = async () => {
|
|
12585
12585
|
if (configuredPrimary) await configuredSessionStoragePrimaryWrite(configuredPrimary, store);
|
|
@@ -14144,13 +14144,13 @@ function resolveBundledPluginsDir() {
|
|
|
14144
14144
|
try {
|
|
14145
14145
|
const execDir = path.dirname(process.execPath);
|
|
14146
14146
|
const sibling = path.join(execDir, "extensions");
|
|
14147
|
-
if (
|
|
14147
|
+
if (fs$1.existsSync(sibling)) return sibling;
|
|
14148
14148
|
} catch {}
|
|
14149
14149
|
try {
|
|
14150
14150
|
let cursor = path.dirname(fileURLToPath(import.meta.url));
|
|
14151
14151
|
for (let i = 0; i < 6; i += 1) {
|
|
14152
14152
|
const candidate = path.join(cursor, "extensions");
|
|
14153
|
-
if (
|
|
14153
|
+
if (fs$1.existsSync(candidate) && fs$1.existsSync(path.join(cursor, "package.json"))) return candidate;
|
|
14154
14154
|
const parent = path.dirname(cursor);
|
|
14155
14155
|
if (parent === cursor) break;
|
|
14156
14156
|
cursor = parent;
|
|
@@ -14219,7 +14219,7 @@ function parseSessionConsumers(raw) {
|
|
|
14219
14219
|
function resolvePluginManifestPath(rootDir) {
|
|
14220
14220
|
for (const filename of PLUGIN_MANIFEST_FILENAMES) {
|
|
14221
14221
|
const candidate = path.join(rootDir, filename);
|
|
14222
|
-
if (
|
|
14222
|
+
if (fs$1.existsSync(candidate)) return candidate;
|
|
14223
14223
|
}
|
|
14224
14224
|
return path.join(rootDir, PLUGIN_MANIFEST_FILENAME);
|
|
14225
14225
|
}
|
|
@@ -14245,7 +14245,7 @@ function loadPluginManifest(rootDir, rejectHardlinks = true) {
|
|
|
14245
14245
|
}
|
|
14246
14246
|
let raw;
|
|
14247
14247
|
try {
|
|
14248
|
-
raw = JSON.parse(
|
|
14248
|
+
raw = JSON.parse(fs$1.readFileSync(opened.fd, "utf-8"));
|
|
14249
14249
|
} catch (err) {
|
|
14250
14250
|
return {
|
|
14251
14251
|
ok: false,
|
|
@@ -14253,7 +14253,7 @@ function loadPluginManifest(rootDir, rejectHardlinks = true) {
|
|
|
14253
14253
|
manifestPath
|
|
14254
14254
|
};
|
|
14255
14255
|
} finally {
|
|
14256
|
-
|
|
14256
|
+
fs$1.closeSync(opened.fd);
|
|
14257
14257
|
}
|
|
14258
14258
|
return {
|
|
14259
14259
|
...loadPluginManifestFromObject(raw, rejectHardlinks),
|
|
@@ -14421,7 +14421,7 @@ function safeRealpathSync(targetPath, cache) {
|
|
|
14421
14421
|
const cached = cache?.get(targetPath);
|
|
14422
14422
|
if (cached) return cached;
|
|
14423
14423
|
try {
|
|
14424
|
-
const resolved =
|
|
14424
|
+
const resolved = fs$1.realpathSync(targetPath);
|
|
14425
14425
|
cache?.set(targetPath, resolved);
|
|
14426
14426
|
return resolved;
|
|
14427
14427
|
} catch {
|
|
@@ -14430,7 +14430,7 @@ function safeRealpathSync(targetPath, cache) {
|
|
|
14430
14430
|
}
|
|
14431
14431
|
function safeStatSync(targetPath) {
|
|
14432
14432
|
try {
|
|
14433
|
-
return
|
|
14433
|
+
return fs$1.statSync(targetPath);
|
|
14434
14434
|
} catch {
|
|
14435
14435
|
return null;
|
|
14436
14436
|
}
|
|
@@ -14562,12 +14562,12 @@ function readPackageManifest(dir, rejectHardlinks = true) {
|
|
|
14562
14562
|
});
|
|
14563
14563
|
if (!opened.ok) return null;
|
|
14564
14564
|
try {
|
|
14565
|
-
const raw =
|
|
14565
|
+
const raw = fs$1.readFileSync(opened.fd, "utf-8");
|
|
14566
14566
|
return JSON.parse(raw);
|
|
14567
14567
|
} catch {
|
|
14568
14568
|
return null;
|
|
14569
14569
|
} finally {
|
|
14570
|
-
|
|
14570
|
+
fs$1.closeSync(opened.fd);
|
|
14571
14571
|
}
|
|
14572
14572
|
}
|
|
14573
14573
|
function deriveIdHint(params) {
|
|
@@ -14635,14 +14635,14 @@ function resolvePackageEntrySource(params) {
|
|
|
14635
14635
|
return null;
|
|
14636
14636
|
}
|
|
14637
14637
|
const safeSource = opened.path;
|
|
14638
|
-
|
|
14638
|
+
fs$1.closeSync(opened.fd);
|
|
14639
14639
|
return safeSource;
|
|
14640
14640
|
}
|
|
14641
14641
|
function discoverInDirectory(params) {
|
|
14642
|
-
if (!
|
|
14642
|
+
if (!fs$1.existsSync(params.dir)) return;
|
|
14643
14643
|
let entries = [];
|
|
14644
14644
|
try {
|
|
14645
|
-
entries =
|
|
14645
|
+
entries = fs$1.readdirSync(params.dir, { withFileTypes: true });
|
|
14646
14646
|
} catch (err) {
|
|
14647
14647
|
params.diagnostics.push({
|
|
14648
14648
|
level: "warn",
|
|
@@ -14705,7 +14705,7 @@ function discoverInDirectory(params) {
|
|
|
14705
14705
|
}
|
|
14706
14706
|
continue;
|
|
14707
14707
|
}
|
|
14708
|
-
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(fullPath, candidate)).find((candidate) =>
|
|
14708
|
+
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(fullPath, candidate)).find((candidate) => fs$1.existsSync(candidate));
|
|
14709
14709
|
if (indexFile && isExtensionFile(indexFile)) addCandidate({
|
|
14710
14710
|
candidates: params.candidates,
|
|
14711
14711
|
diagnostics: params.diagnostics,
|
|
@@ -14723,7 +14723,7 @@ function discoverInDirectory(params) {
|
|
|
14723
14723
|
}
|
|
14724
14724
|
function discoverFromPath(params) {
|
|
14725
14725
|
const resolved = resolveUserPath(params.rawPath);
|
|
14726
|
-
if (!
|
|
14726
|
+
if (!fs$1.existsSync(resolved)) {
|
|
14727
14727
|
params.diagnostics.push({
|
|
14728
14728
|
level: "error",
|
|
14729
14729
|
code: "PLUGIN_LOAD_ERROR",
|
|
@@ -14732,7 +14732,7 @@ function discoverFromPath(params) {
|
|
|
14732
14732
|
});
|
|
14733
14733
|
return;
|
|
14734
14734
|
}
|
|
14735
|
-
const stat =
|
|
14735
|
+
const stat = fs$1.statSync(resolved);
|
|
14736
14736
|
if (stat.isFile()) {
|
|
14737
14737
|
if (!isExtensionFile(resolved)) {
|
|
14738
14738
|
params.diagnostics.push({
|
|
@@ -14792,7 +14792,7 @@ function discoverFromPath(params) {
|
|
|
14792
14792
|
}
|
|
14793
14793
|
return;
|
|
14794
14794
|
}
|
|
14795
|
-
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(resolved, candidate)).find((candidate) =>
|
|
14795
|
+
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(resolved, candidate)).find((candidate) => fs$1.existsSync(candidate));
|
|
14796
14796
|
if (indexFile && isExtensionFile(indexFile)) {
|
|
14797
14797
|
addCandidate({
|
|
14798
14798
|
candidates: params.candidates,
|
|
@@ -15163,7 +15163,7 @@ function buildCacheKey$1(params) {
|
|
|
15163
15163
|
}
|
|
15164
15164
|
function safeStatMtimeMs(filePath) {
|
|
15165
15165
|
try {
|
|
15166
|
-
return
|
|
15166
|
+
return fs$1.statSync(filePath).mtimeMs;
|
|
15167
15167
|
} catch {
|
|
15168
15168
|
return null;
|
|
15169
15169
|
}
|
|
@@ -20397,7 +20397,7 @@ function validateConfigObjectWithPluginsBase(raw, opts) {
|
|
|
20397
20397
|
};
|
|
20398
20398
|
const buildManifestSchemaCacheKey = (manifestPath) => {
|
|
20399
20399
|
try {
|
|
20400
|
-
const mtimeMs =
|
|
20400
|
+
const mtimeMs = fs$1.statSync(manifestPath).mtimeMs;
|
|
20401
20401
|
return mtimeMs ? `${manifestPath}:${mtimeMs}` : manifestPath;
|
|
20402
20402
|
} catch {
|
|
20403
20403
|
return manifestPath;
|
|
@@ -20422,7 +20422,7 @@ function validateConfigObjectWithPluginsBase(raw, opts) {
|
|
|
20422
20422
|
manifestRoot = record.sourcePath;
|
|
20423
20423
|
} else if (sources.size === 0) {
|
|
20424
20424
|
const bundledDir = resolveBundledPluginsDir();
|
|
20425
|
-
if (bundledDir &&
|
|
20425
|
+
if (bundledDir && fs$1.existsSync(bundledDir)) {
|
|
20426
20426
|
const realSourcePath = safeRealpathSync(resolveUserPath(record.sourcePath), bundledInstallRealpathCache);
|
|
20427
20427
|
const realBundledDir = safeRealpathSync(bundledDir, bundledInstallRealpathCache) ?? bundledDir;
|
|
20428
20428
|
if (!realSourcePath || !isPathWithinRoot(realBundledDir, realSourcePath)) {
|
|
@@ -21157,8 +21157,8 @@ function resolveConfigPathForDeps(deps) {
|
|
|
21157
21157
|
}
|
|
21158
21158
|
function normalizeDeps(overrides = {}) {
|
|
21159
21159
|
return {
|
|
21160
|
-
fs: overrides.fs ??
|
|
21161
|
-
json5: overrides.json5 ??
|
|
21160
|
+
fs: overrides.fs ?? fs$1,
|
|
21161
|
+
json5: overrides.json5 ?? JSON5,
|
|
21162
21162
|
env: overrides.env ?? process.env,
|
|
21163
21163
|
homedir: overrides.homedir ?? (() => resolveRequiredHomeDir(overrides.env ?? process.env, os.homedir)),
|
|
21164
21164
|
configPath: overrides.configPath ?? "",
|
|
@@ -21169,11 +21169,11 @@ function maybeLoadDotEnvForConfig(env) {
|
|
|
21169
21169
|
if (env !== process.env) return;
|
|
21170
21170
|
loadDotEnv({ quiet: true });
|
|
21171
21171
|
}
|
|
21172
|
-
function parseConfigJson5(raw, json5
|
|
21172
|
+
function parseConfigJson5(raw, json5 = JSON5) {
|
|
21173
21173
|
try {
|
|
21174
21174
|
return {
|
|
21175
21175
|
ok: true,
|
|
21176
|
-
parsed: json5
|
|
21176
|
+
parsed: json5.parse(raw)
|
|
21177
21177
|
};
|
|
21178
21178
|
} catch (err) {
|
|
21179
21179
|
return {
|
|
@@ -9,7 +9,7 @@ import { t as WizardCancelledError } from "./prompts-BBkof-cQ.js";
|
|
|
9
9
|
import { t as createClackPrompter } from "./clack-prompter-fldgCPEr.js";
|
|
10
10
|
import { t as assertSupportedRuntime } from "./runtime-guard-DchtXvGj.js";
|
|
11
11
|
import { t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-BOcdJaFy.js";
|
|
12
|
-
import { t as runOnboardingWizard } from "./onboarding-
|
|
12
|
+
import { t as runOnboardingWizard } from "./onboarding-BeCgp92Z.js";
|
|
13
13
|
import { n as logConfigUpdated } from "./logging-DgKdQHpc.js";
|
|
14
14
|
import { i as normalizeLegacyOnboardAuthChoice, r as isDeprecatedAuthChoice, t as ONBOARD_PROVIDER_AUTH_FLAGS } from "./onboard-provider-auth-flags-CloquEDg.js";
|
|
15
15
|
import { t as applyOnboardingLocalWorkspaceConfig } from "./onboard-config-YMJ1PLAF.js";
|
|
@@ -9,7 +9,7 @@ import { t as assertSupportedRuntime } from "./runtime-guard-DYUXYZIl.js";
|
|
|
9
9
|
import { t as WizardCancelledError } from "./prompts-m1IJwIAx.js";
|
|
10
10
|
import { t as createClackPrompter } from "./clack-prompter-CcVX4jId.js";
|
|
11
11
|
import { t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-BYJFVHH_.js";
|
|
12
|
-
import { t as runOnboardingWizard } from "./onboarding-
|
|
12
|
+
import { t as runOnboardingWizard } from "./onboarding-BwJssndg.js";
|
|
13
13
|
import { n as logConfigUpdated } from "./logging-DcZLtf7P.js";
|
|
14
14
|
import { i as normalizeLegacyOnboardAuthChoice, r as isDeprecatedAuthChoice, t as ONBOARD_PROVIDER_AUTH_FLAGS } from "./onboard-provider-auth-flags-D3DJ3bcx.js";
|
|
15
15
|
import { t as applyOnboardingLocalWorkspaceConfig } from "./onboard-config-FrOdovje.js";
|
|
@@ -327,7 +327,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
327
327
|
mode
|
|
328
328
|
});
|
|
329
329
|
await writeConfigFile(nextConfig);
|
|
330
|
-
const { finalizeOnboardingWizard } = await import("./onboarding.finalize-
|
|
330
|
+
const { finalizeOnboardingWizard } = await import("./onboarding.finalize-GThlsTQx.js");
|
|
331
331
|
const { launchedTui } = await finalizeOnboardingWizard({
|
|
332
332
|
flow,
|
|
333
333
|
opts,
|
|
@@ -327,7 +327,7 @@ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
327
327
|
mode
|
|
328
328
|
});
|
|
329
329
|
await writeConfigFile(nextConfig);
|
|
330
|
-
const { finalizeOnboardingWizard } = await import("./onboarding.finalize-
|
|
330
|
+
const { finalizeOnboardingWizard } = await import("./onboarding.finalize-Dl0NbVZ8.js");
|
|
331
331
|
const { launchedTui } = await finalizeOnboardingWizard({
|
|
332
332
|
flow,
|
|
333
333
|
opts,
|
|
@@ -120,9 +120,9 @@ import "./heartbeat-tick-CsyeD75h.js";
|
|
|
120
120
|
import "./redact-snapshot-nXjCb0rC.js";
|
|
121
121
|
import "./session-cost-usage-BiAoknlp.js";
|
|
122
122
|
import "./runtime-guard-DYUXYZIl.js";
|
|
123
|
-
import "./program-context-
|
|
123
|
+
import "./program-context-B3m_Vhb8.js";
|
|
124
124
|
import "./note-DCbCarQS.js";
|
|
125
|
-
import { r as installCompletion } from "./completion-cli-
|
|
125
|
+
import { r as installCompletion } from "./completion-cli-Cs6_r67M.js";
|
|
126
126
|
import { n as gatewayInstallErrorHint, t as buildGatewayInstallPlan } from "./daemon-install-helpers-DLapr-v1.js";
|
|
127
127
|
import { n as GATEWAY_DAEMON_RUNTIME_OPTIONS, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-BYJFVHH_.js";
|
|
128
128
|
import { t as resolveGatewayService } from "./service-Hy5BSgmp.js";
|
|
@@ -131,7 +131,7 @@ import { r as healthCommand } from "./health-CGT9fJfK.js";
|
|
|
131
131
|
import { t as ensureControlUiAssetsBuilt } from "./control-ui-assets-DonecnKL.js";
|
|
132
132
|
import { t as resolveOnboardingSecretInputString } from "./onboarding.secret-input-COacoKk4.js";
|
|
133
133
|
import { t as formatHealthCheckFailure } from "./health-format-_VGfj3fm.js";
|
|
134
|
-
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-
|
|
134
|
+
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-DHGYwnha.js";
|
|
135
135
|
import { t as runTui } from "./tui-CaJoaHhO.js";
|
|
136
136
|
import os from "node:os";
|
|
137
137
|
import path from "node:path";
|