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,8 +1,8 @@
|
|
|
1
|
-
import { c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix } from "./paths-
|
|
2
|
-
import { D as normalizeAgentId, y as DEFAULT_AGENT_ID } from "./workspace-
|
|
1
|
+
import { c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix } from "./paths-Cvc9EM8Y.js";
|
|
2
|
+
import { D as normalizeAgentId, y as DEFAULT_AGENT_ID } from "./workspace-Dbn4gFdH.js";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
|
-
import
|
|
5
|
+
import fs from "node:fs";
|
|
6
6
|
|
|
7
7
|
//#region src/config/sessions/paths.ts
|
|
8
8
|
function resolveAgentSessionsDir(agentId, env = process.env, homedir = () => resolveRequiredHomeDir(env, os.homedir)) {
|
|
@@ -95,7 +95,7 @@ function resolveStructuralSessionFallbackPath(candidateAbsPath, expectedAgentId)
|
|
|
95
95
|
}
|
|
96
96
|
function safeRealpathSync(filePath) {
|
|
97
97
|
try {
|
|
98
|
-
return
|
|
98
|
+
return fs.realpathSync(filePath);
|
|
99
99
|
} catch {
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { c as resolveStateDir } from "./paths-
|
|
3
|
-
import { C as appendFileLog } from "./subsystem-
|
|
4
|
-
import { Tr as normalizeUsage, Ua as isTruthyEnvValue } from "./model-selection-
|
|
5
|
-
import { n as SILENT_REPLY_TOKEN } from "./tokens-
|
|
6
|
-
import { D as refreshRunProgress, c as logModelCallCompleted, p as logSessionStateChange, s as logMessageQueued, t as diag, u as logModelCallStarted } from "./diagnostic-
|
|
2
|
+
import { c as resolveStateDir } from "./paths-Cvc9EM8Y.js";
|
|
3
|
+
import { C as appendFileLog } from "./subsystem-BCjklMkJ.js";
|
|
4
|
+
import { Tr as normalizeUsage, Ua as isTruthyEnvValue } from "./model-selection-CpVr-61V.js";
|
|
5
|
+
import { n as SILENT_REPLY_TOKEN } from "./tokens-9Mla_HDp.js";
|
|
6
|
+
import { D as refreshRunProgress, c as logModelCallCompleted, p as logSessionStateChange, s as logMessageQueued, t as diag, u as logModelCallStarted } from "./diagnostic-BQTUSnsG.js";
|
|
7
7
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-Bnyx-w0F.js";
|
|
8
|
-
import { a as isMessagingToolDuplicateNormalized, o as normalizeTextForComparison } from "./pi-embedded-helpers-
|
|
9
|
-
import { a as formatReasoningMessage, c as promoteThinkingTagsToBlocks, i as extractThinkingFromTaggedText, n as extractAssistantThinking, r as extractThinkingFromTaggedStream, t as extractAssistantText } from "./pi-embedded-utils-
|
|
8
|
+
import { a as isMessagingToolDuplicateNormalized, o as normalizeTextForComparison } from "./pi-embedded-helpers-C-hJQ8AQ.js";
|
|
9
|
+
import { a as formatReasoningMessage, c as promoteThinkingTagsToBlocks, i as extractThinkingFromTaggedText, n as extractAssistantThinking, r as extractThinkingFromTaggedStream, t as extractAssistantText } from "./pi-embedded-utils-DPMX1Kdc.js";
|
|
10
10
|
import { r as parseFenceSpans } from "./fences-DHXKaTRv.js";
|
|
11
|
-
import { t as parseReplyDirectives } from "./reply-directives-
|
|
11
|
+
import { t as parseReplyDirectives } from "./reply-directives-BpvtuQ6W.js";
|
|
12
12
|
import path from "node:path";
|
|
13
13
|
import { randomUUID } from "node:crypto";
|
|
14
14
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { f as logVerbose } from "./subsystem-
|
|
3
|
-
import { J as loadConfig, ai as resolveSlackBotToken, ni as resolveSlackAccount } from "./model-selection-
|
|
2
|
+
import { f as logVerbose } from "./subsystem-BCjklMkJ.js";
|
|
3
|
+
import { J as loadConfig, ai as resolveSlackBotToken, ni as resolveSlackAccount } from "./model-selection-CpVr-61V.js";
|
|
4
4
|
import { i as requireTargetKind, n as ensureTargetId, r as parseMentionPrefixOrAtUserTarget, t as buildMessagingTarget } from "./targets-CSakuiCy.js";
|
|
5
|
-
import { i as isSilentReplyText } from "./tokens-
|
|
6
|
-
import { r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-
|
|
7
|
-
import { d as resolveTextChunkLimit, i as chunkMarkdownTextWithMode, l as resolveChunkMode, u as resolveChunkNewlinePacking } from "./chunk-
|
|
8
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
9
|
-
import { a as loadWebMedia, n as markdownToIR, t as chunkMarkdownIR } from "./ir-
|
|
5
|
+
import { i as isSilentReplyText } from "./tokens-9Mla_HDp.js";
|
|
6
|
+
import { r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-DaQ-LaL5.js";
|
|
7
|
+
import { d as resolveTextChunkLimit, i as chunkMarkdownTextWithMode, l as resolveChunkMode, u as resolveChunkNewlinePacking } from "./chunk-B7KZoDXm.js";
|
|
8
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-CPpxzad4.js";
|
|
9
|
+
import { a as loadWebMedia, n as markdownToIR, t as chunkMarkdownIR } from "./ir-BdrsYTip.js";
|
|
10
10
|
import { t as renderMarkdownWithMarkers } from "./render-BZdJrUxT.js";
|
|
11
11
|
import { WebClient } from "@slack/web-api";
|
|
12
12
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { it as normalizeE164, st as resolveUserPath } from "./subsystem-
|
|
3
|
-
import { J as loadConfig, mi as resolveIMessageAccount } from "./model-selection-
|
|
4
|
-
import { m as kindFromMime } from "./image-ops-
|
|
5
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
6
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
7
|
-
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-
|
|
2
|
+
import { it as normalizeE164, st as resolveUserPath } from "./subsystem-BCjklMkJ.js";
|
|
3
|
+
import { J as loadConfig, mi as resolveIMessageAccount } from "./model-selection-CpVr-61V.js";
|
|
4
|
+
import { m as kindFromMime } from "./image-ops-O8pHxo7i.js";
|
|
5
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-CPpxzad4.js";
|
|
6
|
+
import { t as convertMarkdownTables } from "./tables-CjRug-NJ.js";
|
|
7
|
+
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-DrSw_Ksh.js";
|
|
8
8
|
import { spawn } from "node:child_process";
|
|
9
9
|
import { createInterface } from "node:readline";
|
|
10
10
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { r as avoidTrailingHighSurrogateBreak } from "./subsystem-
|
|
3
|
-
import { J as loadConfig, si as resolveSignalAccount } from "./model-selection-
|
|
2
|
+
import { r as avoidTrailingHighSurrogateBreak } from "./subsystem-BCjklMkJ.js";
|
|
3
|
+
import { J as loadConfig, si as resolveSignalAccount } from "./model-selection-CpVr-61V.js";
|
|
4
4
|
import { n as generateSecureUuid } from "./secure-random-BDA1WAvZ.js";
|
|
5
|
-
import { m as kindFromMime } from "./image-ops-
|
|
5
|
+
import { m as kindFromMime } from "./image-ops-O8pHxo7i.js";
|
|
6
6
|
import { n as fetchWithTimeout } from "./fetch-timeout-BfPtlUW6.js";
|
|
7
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
8
|
-
import { n as markdownToIR, t as chunkMarkdownIR } from "./ir-
|
|
7
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-CPpxzad4.js";
|
|
8
|
+
import { n as markdownToIR, t as chunkMarkdownIR } from "./ir-BdrsYTip.js";
|
|
9
9
|
import { t as resolveFetch } from "./fetch-D61IHNsz.js";
|
|
10
|
-
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-
|
|
10
|
+
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-DrSw_Ksh.js";
|
|
11
11
|
|
|
12
12
|
//#region src/signal/format.ts
|
|
13
13
|
function normalizeUrlForComparison(url) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { mt as resolvePreferredOpenClawTmpDir, r as avoidTrailingHighSurrogateBreak } from "./subsystem-
|
|
3
|
-
import { J as loadConfig, _i as resolveDiscordAccount, b as resolveRetryConfig, vi as normalizeDiscordToken, x as retryAsync } from "./model-selection-
|
|
2
|
+
import { mt as resolvePreferredOpenClawTmpDir, r as avoidTrailingHighSurrogateBreak } from "./subsystem-BCjklMkJ.js";
|
|
3
|
+
import { J as loadConfig, _i as resolveDiscordAccount, b as resolveRetryConfig, vi as normalizeDiscordToken, x as retryAsync } from "./model-selection-CpVr-61V.js";
|
|
4
4
|
import { i as requireTargetKind, r as parseMentionPrefixOrAtUserTarget, t as buildMessagingTarget } from "./targets-CSakuiCy.js";
|
|
5
|
-
import { _ as maxBytesForKind, l as extensionForMime } from "./image-ops-
|
|
6
|
-
import { i as chunkMarkdownTextWithMode, l as resolveChunkMode, u as resolveChunkNewlinePacking } from "./chunk-
|
|
7
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
8
|
-
import { a as loadWebMedia, o as loadWebMediaRaw } from "./ir-
|
|
5
|
+
import { _ as maxBytesForKind, l as extensionForMime } from "./image-ops-O8pHxo7i.js";
|
|
6
|
+
import { i as chunkMarkdownTextWithMode, l as resolveChunkMode, u as resolveChunkNewlinePacking } from "./chunk-B7KZoDXm.js";
|
|
7
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-CPpxzad4.js";
|
|
8
|
+
import { a as loadWebMedia, o as loadWebMediaRaw } from "./ir-BdrsYTip.js";
|
|
9
9
|
import { t as resolveFetch } from "./fetch-D61IHNsz.js";
|
|
10
|
-
import { a as createDiscordRetryRunner, i as normalizePollInput, n as recordChannelActivity, r as normalizePollDurationHours } from "./channel-activity-
|
|
10
|
+
import { a as createDiscordRetryRunner, i as normalizePollInput, n as recordChannelActivity, r as normalizePollDurationHours } from "./channel-activity-rKX7OerG.js";
|
|
11
11
|
import { t as buildOutboundMediaLoadOptions } from "./load-options-DzQsLh91.js";
|
|
12
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
12
|
+
import { t as convertMarkdownTables } from "./tables-CjRug-NJ.js";
|
|
13
13
|
import fs from "node:fs/promises";
|
|
14
14
|
import path from "node:path";
|
|
15
15
|
import { promisify } from "node:util";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, o as resolveOAuthDir } from "./paths-
|
|
3
|
-
import { Z as CONFIG_DIR, ct as safeParseJson, f as logVerbose, r as avoidTrailingHighSurrogateBreak, t as createSubsystemLogger, u as danger } from "./subsystem-
|
|
4
|
-
import { I as DEFAULT_ACCOUNT_ID, L as normalizeAccountId } from "./workspace-
|
|
5
|
-
import { J as loadConfig, La as resolveTelegramPreviewStreamMode, Qr as resolveTelegramAccount, Ua as isTruthyEnvValue, Ur as getChannelPlugin, Wn as writeJsonAtomic, Wr as listChannelPlugins, X as readConfigFileSnapshotForWrite, Z as writeConfigFile, Za as withFileLock$1 } from "./model-selection-
|
|
6
|
-
import { _ as logTelegramPoll, g as logTelegramDelivery, h as logTelegramApiRequest, m as logTelegramAccountState, v as logTelegramUpdate, y as logTelegramWebhook } from "./diagnostic-
|
|
2
|
+
import { c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, o as resolveOAuthDir } from "./paths-Cvc9EM8Y.js";
|
|
3
|
+
import { Z as CONFIG_DIR, ct as safeParseJson, f as logVerbose, r as avoidTrailingHighSurrogateBreak, t as createSubsystemLogger, u as danger } from "./subsystem-BCjklMkJ.js";
|
|
4
|
+
import { I as DEFAULT_ACCOUNT_ID, L as normalizeAccountId } from "./workspace-Dbn4gFdH.js";
|
|
5
|
+
import { J as loadConfig, La as resolveTelegramPreviewStreamMode, Qr as resolveTelegramAccount, Ua as isTruthyEnvValue, Ur as getChannelPlugin, Wn as writeJsonAtomic, Wr as listChannelPlugins, X as readConfigFileSnapshotForWrite, Z as writeConfigFile, Za as withFileLock$1 } from "./model-selection-CpVr-61V.js";
|
|
6
|
+
import { _ as logTelegramPoll, g as logTelegramDelivery, h as logTelegramApiRequest, m as logTelegramAccountState, v as logTelegramUpdate, y as logTelegramWebhook } from "./diagnostic-BQTUSnsG.js";
|
|
7
7
|
import { n as sha256HexPrefix, t as redactIdentifier } from "./redact-identifier-WYElxwAZ.js";
|
|
8
|
-
import { t as redactSensitiveText } from "./redact-
|
|
9
|
-
import { h as normalizeMimeType, m as kindFromMime, p as isGifMedia, u as getFileExtension } from "./image-ops-
|
|
10
|
-
import { _ as readErrorName, d as extractErrorCode, m as formatUncaughtError, p as formatErrorMessage, t as hasProxyEnvConfigured, u as collectErrorGraphCandidates } from "./proxy-env-
|
|
11
|
-
import { r as makeProxyFetch } from "./proxy-fetch-
|
|
12
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
13
|
-
import { a as loadWebMedia, n as markdownToIR } from "./ir-
|
|
8
|
+
import { t as redactSensitiveText } from "./redact-BOHmCPP_.js";
|
|
9
|
+
import { h as normalizeMimeType, m as kindFromMime, p as isGifMedia, u as getFileExtension } from "./image-ops-O8pHxo7i.js";
|
|
10
|
+
import { _ as readErrorName, d as extractErrorCode, m as formatUncaughtError, p as formatErrorMessage, t as hasProxyEnvConfigured, u as collectErrorGraphCandidates } from "./proxy-env-BL6Wl2NH.js";
|
|
11
|
+
import { r as makeProxyFetch } from "./proxy-fetch-CK5AQAYw.js";
|
|
12
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-CPpxzad4.js";
|
|
13
|
+
import { a as loadWebMedia, n as markdownToIR } from "./ir-BdrsYTip.js";
|
|
14
14
|
import { t as renderMarkdownWithMarkers } from "./render-BZdJrUxT.js";
|
|
15
15
|
import { t as resolveFetch } from "./fetch-D61IHNsz.js";
|
|
16
|
-
import { i as normalizePollInput, n as recordChannelActivity, o as createTelegramRetryRunner } from "./channel-activity-
|
|
16
|
+
import { i as normalizePollInput, n as recordChannelActivity, o as createTelegramRetryRunner } from "./channel-activity-rKX7OerG.js";
|
|
17
17
|
import { t as buildOutboundMediaLoadOptions } from "./load-options-DzQsLh91.js";
|
|
18
18
|
import fs from "node:fs/promises";
|
|
19
19
|
import os from "node:os";
|
|
20
20
|
import path from "node:path";
|
|
21
|
-
import
|
|
22
|
-
import
|
|
21
|
+
import fs$1, { readFileSync } from "node:fs";
|
|
22
|
+
import JSON5 from "json5";
|
|
23
23
|
import process$1 from "node:process";
|
|
24
24
|
import crypto, { randomBytes } from "node:crypto";
|
|
25
25
|
import * as net$1 from "node:net";
|
|
@@ -157,7 +157,7 @@ function getPairingAdapter(channelId) {
|
|
|
157
157
|
//#region src/plugin-sdk/json-store.ts
|
|
158
158
|
async function readJsonFileWithFallback(filePath, fallback) {
|
|
159
159
|
try {
|
|
160
|
-
const parsed = safeParseJson(await
|
|
160
|
+
const parsed = safeParseJson(await fs$1.promises.readFile(filePath, "utf-8"));
|
|
161
161
|
if (parsed == null) return {
|
|
162
162
|
value: fallback,
|
|
163
163
|
exists: true
|
|
@@ -244,7 +244,7 @@ async function readPairingRequests(filePath) {
|
|
|
244
244
|
}
|
|
245
245
|
async function ensureJsonFile(filePath, fallback) {
|
|
246
246
|
try {
|
|
247
|
-
await
|
|
247
|
+
await fs$1.promises.access(filePath);
|
|
248
248
|
} catch {
|
|
249
249
|
await writeJsonFile(filePath, fallback);
|
|
250
250
|
}
|
|
@@ -400,7 +400,7 @@ function resolveAllowFromReadCacheOrMissing(filePath, stat) {
|
|
|
400
400
|
async function readAllowFromStateForPathWithExists(channel, filePath) {
|
|
401
401
|
let stat = null;
|
|
402
402
|
try {
|
|
403
|
-
stat = await
|
|
403
|
+
stat = await fs$1.promises.stat(filePath);
|
|
404
404
|
} catch (err) {
|
|
405
405
|
if (err.code !== "ENOENT") throw err;
|
|
406
406
|
}
|
|
@@ -443,7 +443,7 @@ async function writeAllowFromState(filePath, allowFrom) {
|
|
|
443
443
|
});
|
|
444
444
|
let stat = null;
|
|
445
445
|
try {
|
|
446
|
-
stat = await
|
|
446
|
+
stat = await fs$1.promises.stat(filePath);
|
|
447
447
|
} catch {}
|
|
448
448
|
setAllowFromReadCache(filePath, {
|
|
449
449
|
exists: true,
|
|
@@ -1050,10 +1050,10 @@ function resolveCronStorePath(storePath) {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
async function loadCronStore(storePath) {
|
|
1052
1052
|
try {
|
|
1053
|
-
const raw = await
|
|
1053
|
+
const raw = await fs$1.promises.readFile(storePath, "utf-8");
|
|
1054
1054
|
let parsed;
|
|
1055
1055
|
try {
|
|
1056
|
-
parsed =
|
|
1056
|
+
parsed = JSON5.parse(raw);
|
|
1057
1057
|
} catch (err) {
|
|
1058
1058
|
throw new Error(`Failed to parse cron store at ${storePath}: ${String(err)}`, { cause: err });
|
|
1059
1059
|
}
|
|
@@ -1076,13 +1076,13 @@ async function loadCronStore(storePath) {
|
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
1078
|
async function saveCronStore(storePath, store) {
|
|
1079
|
-
await
|
|
1079
|
+
await fs$1.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
1080
1080
|
const json = JSON.stringify(store, null, 2);
|
|
1081
1081
|
const cached = serializedStoreCache.get(storePath);
|
|
1082
1082
|
if (cached === json) return;
|
|
1083
1083
|
let previous = cached ?? null;
|
|
1084
1084
|
if (previous === null) try {
|
|
1085
|
-
previous = await
|
|
1085
|
+
previous = await fs$1.promises.readFile(storePath, "utf-8");
|
|
1086
1086
|
} catch (err) {
|
|
1087
1087
|
if (err.code !== "ENOENT") throw err;
|
|
1088
1088
|
}
|
|
@@ -1091,9 +1091,9 @@ async function saveCronStore(storePath, store) {
|
|
|
1091
1091
|
return;
|
|
1092
1092
|
}
|
|
1093
1093
|
const tmp = `${storePath}.${process.pid}.${randomBytes(8).toString("hex")}.tmp`;
|
|
1094
|
-
await
|
|
1094
|
+
await fs$1.promises.writeFile(tmp, json, "utf-8");
|
|
1095
1095
|
if (previous !== null) try {
|
|
1096
|
-
await
|
|
1096
|
+
await fs$1.promises.copyFile(storePath, `${storePath}.bak`);
|
|
1097
1097
|
} catch {}
|
|
1098
1098
|
await renameWithRetry(tmp, storePath);
|
|
1099
1099
|
serializedStoreCache.set(storePath, json);
|
|
@@ -1102,7 +1102,7 @@ const RENAME_MAX_RETRIES = 3;
|
|
|
1102
1102
|
const RENAME_BASE_DELAY_MS = 50;
|
|
1103
1103
|
async function renameWithRetry(src, dest) {
|
|
1104
1104
|
for (let attempt = 0; attempt <= RENAME_MAX_RETRIES; attempt++) try {
|
|
1105
|
-
await
|
|
1105
|
+
await fs$1.promises.rename(src, dest);
|
|
1106
1106
|
return;
|
|
1107
1107
|
} catch (err) {
|
|
1108
1108
|
const code = err.code;
|
|
@@ -1111,8 +1111,8 @@ async function renameWithRetry(src, dest) {
|
|
|
1111
1111
|
continue;
|
|
1112
1112
|
}
|
|
1113
1113
|
if (code === "EPERM" || code === "EEXIST") {
|
|
1114
|
-
await
|
|
1115
|
-
await
|
|
1114
|
+
await fs$1.promises.copyFile(src, dest);
|
|
1115
|
+
await fs$1.promises.unlink(src).catch(() => {});
|
|
1116
1116
|
return;
|
|
1117
1117
|
}
|
|
1118
1118
|
throw err;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { yn as recordSessionMetaFromInbound } from "./model-selection-
|
|
3
|
-
import { p as resolveStorePath } from "./run-with-concurrency-
|
|
2
|
+
import { yn as recordSessionMetaFromInbound } from "./model-selection-CpVr-61V.js";
|
|
3
|
+
import { p as resolveStorePath } from "./run-with-concurrency-4jh_yc-4.js";
|
|
4
4
|
|
|
5
5
|
//#region src/channels/session-meta.ts
|
|
6
6
|
var session_meta_exports = /* @__PURE__ */ __exportAll({ recordInboundSessionMetaSafe: () => recordInboundSessionMetaSafe });
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { c as resolveAgentWorkspaceDir, n as listAgentIds, s as resolveAgentSkillsFilter } from "./agent-scope-
|
|
3
|
-
import { c as resolveStateDir } from "./paths-
|
|
4
|
-
import { Z as CONFIG_DIR, f as logVerbose, st as resolveUserPath, t as createSubsystemLogger } from "./subsystem-
|
|
5
|
-
import { Hn as createAsyncLock } from "./model-selection-
|
|
6
|
-
import { o as resolvePluginSkillDirs, t as buildWorkspaceSkillCommandSpecs } from "./skills-
|
|
7
|
-
import { a as listChatCommands } from "./commands-registry-
|
|
2
|
+
import { c as resolveAgentWorkspaceDir, n as listAgentIds, s as resolveAgentSkillsFilter } from "./agent-scope-cbxkoURo.js";
|
|
3
|
+
import { c as resolveStateDir } from "./paths-Cvc9EM8Y.js";
|
|
4
|
+
import { Z as CONFIG_DIR, f as logVerbose, st as resolveUserPath, t as createSubsystemLogger } from "./subsystem-BCjklMkJ.js";
|
|
5
|
+
import { Hn as createAsyncLock } from "./model-selection-CpVr-61V.js";
|
|
6
|
+
import { o as resolvePluginSkillDirs, t as buildWorkspaceSkillCommandSpecs } from "./skills-Bn7terph.js";
|
|
7
|
+
import { a as listChatCommands } from "./commands-registry-CeUqKxlW.js";
|
|
8
8
|
import os from "node:os";
|
|
9
9
|
import path from "node:path";
|
|
10
|
-
import
|
|
10
|
+
import fs from "node:fs";
|
|
11
11
|
import { randomUUID } from "node:crypto";
|
|
12
12
|
import chokidar from "chokidar";
|
|
13
13
|
|
|
@@ -248,13 +248,13 @@ function listSkillCommandsForAgents(params) {
|
|
|
248
248
|
const workspaceFilters = /* @__PURE__ */ new Map();
|
|
249
249
|
for (const agentId of agentIds) {
|
|
250
250
|
const workspaceDir = resolveAgentWorkspaceDir(params.cfg, agentId);
|
|
251
|
-
if (!
|
|
251
|
+
if (!fs.existsSync(workspaceDir)) {
|
|
252
252
|
logVerbose(`Skipping agent "${agentId}": workspace does not exist: ${workspaceDir}`);
|
|
253
253
|
continue;
|
|
254
254
|
}
|
|
255
255
|
let canonicalDir;
|
|
256
256
|
try {
|
|
257
|
-
canonicalDir =
|
|
257
|
+
canonicalDir = fs.realpathSync(workspaceDir);
|
|
258
258
|
} catch {
|
|
259
259
|
logVerbose(`Skipping agent "${agentId}": cannot resolve workspace: ${workspaceDir}`);
|
|
260
260
|
continue;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { m as normalizeSkillFilter } from "./agent-scope-
|
|
2
|
-
import { H as isPathInside, K as isDangerousHostEnvVarName, N as isPathInsideWithRealpath, Z as CONFIG_DIR, mt as resolvePreferredOpenClawTmpDir, st as resolveUserPath, t as createSubsystemLogger } from "./subsystem-
|
|
3
|
-
import { h as resolveOpenClawPackageRootSync } from "./workspace-
|
|
4
|
-
import { It as normalizePluginsConfig, Lt as resolveEffectiveEnableState, Mt as loadPluginManifestRegistry, Rt as resolveMemorySlotDecision, ro as normalizeResolvedSecretInputString } from "./model-selection-
|
|
5
|
-
import { a as resolveOpenClawManifestBlock, c as resolveOpenClawManifestRequires, d as hasBinary, f as isConfigPathTruthyWithDefaults, i as parseOpenClawManifestInstallBase, l as parseFrontmatterBlock, n as normalizeStringList, o as resolveOpenClawManifestInstall, r as parseFrontmatterBool, s as resolveOpenClawManifestOs, t as getFrontmatterString, u as evaluateRuntimeEligibility } from "./frontmatter-
|
|
6
|
-
import { n as assertNoPathAliasEscape } from "./path-alias-guards-
|
|
1
|
+
import { m as normalizeSkillFilter } from "./agent-scope-cbxkoURo.js";
|
|
2
|
+
import { H as isPathInside, K as isDangerousHostEnvVarName, N as isPathInsideWithRealpath, Z as CONFIG_DIR, mt as resolvePreferredOpenClawTmpDir, st as resolveUserPath, t as createSubsystemLogger } from "./subsystem-BCjklMkJ.js";
|
|
3
|
+
import { h as resolveOpenClawPackageRootSync } from "./workspace-Dbn4gFdH.js";
|
|
4
|
+
import { It as normalizePluginsConfig, Lt as resolveEffectiveEnableState, Mt as loadPluginManifestRegistry, Rt as resolveMemorySlotDecision, ro as normalizeResolvedSecretInputString } from "./model-selection-CpVr-61V.js";
|
|
5
|
+
import { a as resolveOpenClawManifestBlock, c as resolveOpenClawManifestRequires, d as hasBinary, f as isConfigPathTruthyWithDefaults, i as parseOpenClawManifestInstallBase, l as parseFrontmatterBlock, n as normalizeStringList, o as resolveOpenClawManifestInstall, r as parseFrontmatterBool, s as resolveOpenClawManifestOs, t as getFrontmatterString, u as evaluateRuntimeEligibility } from "./frontmatter-PMByWrfP.js";
|
|
6
|
+
import { n as assertNoPathAliasEscape } from "./path-alias-guards-Cd5yHmTq.js";
|
|
7
7
|
import os from "node:os";
|
|
8
8
|
import path from "node:path";
|
|
9
|
-
import
|
|
9
|
+
import fs from "node:fs";
|
|
10
10
|
import { URL as URL$1, fileURLToPath } from "node:url";
|
|
11
11
|
import { formatSkillsForPrompt, loadSkillsFromDir } from "@mariozechner/pi-coding-agent";
|
|
12
12
|
|
|
@@ -542,13 +542,13 @@ function shortPath(value) {
|
|
|
542
542
|
//#region src/agents/skills/bundled-dir.ts
|
|
543
543
|
function looksLikeSkillsDir(dir) {
|
|
544
544
|
try {
|
|
545
|
-
const entries =
|
|
545
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
546
546
|
for (const entry of entries) {
|
|
547
547
|
if (entry.name.startsWith(".")) continue;
|
|
548
548
|
const fullPath = path.join(dir, entry.name);
|
|
549
549
|
if (entry.isFile() && entry.name.endsWith(".md")) return true;
|
|
550
550
|
if (entry.isDirectory()) {
|
|
551
|
-
if (
|
|
551
|
+
if (fs.existsSync(path.join(fullPath, "SKILL.md"))) return true;
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
554
|
} catch {
|
|
@@ -563,7 +563,7 @@ function resolveBundledSkillsDir(opts = {}) {
|
|
|
563
563
|
const execPath = opts.execPath ?? process.execPath;
|
|
564
564
|
const execDir = path.dirname(execPath);
|
|
565
565
|
const sibling = path.join(execDir, "skills");
|
|
566
|
-
if (
|
|
566
|
+
if (fs.existsSync(sibling)) return sibling;
|
|
567
567
|
} catch {}
|
|
568
568
|
try {
|
|
569
569
|
const moduleUrl = opts.moduleUrl ?? import.meta.url;
|
|
@@ -626,7 +626,7 @@ function resolvePluginSkillDirs(params) {
|
|
|
626
626
|
const trimmed = raw.trim();
|
|
627
627
|
if (!trimmed) continue;
|
|
628
628
|
const candidate = path.resolve(record.rootDir, trimmed);
|
|
629
|
-
if (!
|
|
629
|
+
if (!fs.existsSync(candidate)) {
|
|
630
630
|
log.warn(`plugin skill path not found (${record.id}): ${candidate}`);
|
|
631
631
|
continue;
|
|
632
632
|
}
|
|
@@ -657,7 +657,7 @@ async function serializeByKey(key, task) {
|
|
|
657
657
|
|
|
658
658
|
//#endregion
|
|
659
659
|
//#region src/agents/skills/workspace.ts
|
|
660
|
-
const fsp =
|
|
660
|
+
const fsp = fs.promises;
|
|
661
661
|
const skillsLogger = createSubsystemLogger("skills");
|
|
662
662
|
const skillCommandDebugOnce = /* @__PURE__ */ new Set();
|
|
663
663
|
/**
|
|
@@ -734,7 +734,7 @@ function resolveSkillsLimits(config) {
|
|
|
734
734
|
}
|
|
735
735
|
function listChildDirectories(dir) {
|
|
736
736
|
try {
|
|
737
|
-
const entries =
|
|
737
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
738
738
|
const dirs = [];
|
|
739
739
|
for (const entry of entries) {
|
|
740
740
|
if (entry.name.startsWith(".")) continue;
|
|
@@ -745,7 +745,7 @@ function listChildDirectories(dir) {
|
|
|
745
745
|
continue;
|
|
746
746
|
}
|
|
747
747
|
if (entry.isSymbolicLink()) try {
|
|
748
|
-
if (
|
|
748
|
+
if (fs.statSync(fullPath).isDirectory()) dirs.push(entry.name);
|
|
749
749
|
} catch {}
|
|
750
750
|
}
|
|
751
751
|
return dirs;
|
|
@@ -756,7 +756,7 @@ function listChildDirectories(dir) {
|
|
|
756
756
|
function resolveNestedSkillsRoot(dir, opts) {
|
|
757
757
|
const nested = path.join(dir, "skills");
|
|
758
758
|
try {
|
|
759
|
-
if (!
|
|
759
|
+
if (!fs.existsSync(nested) || !fs.statSync(nested).isDirectory()) return { baseDir: dir };
|
|
760
760
|
} catch {
|
|
761
761
|
return { baseDir: dir };
|
|
762
762
|
}
|
|
@@ -765,7 +765,7 @@ function resolveNestedSkillsRoot(dir, opts) {
|
|
|
765
765
|
const toScan = scanLimit === 0 ? [] : nestedDirs.slice(0, Math.min(nestedDirs.length, scanLimit));
|
|
766
766
|
for (const name of toScan) {
|
|
767
767
|
const skillMd = path.join(nested, name, "SKILL.md");
|
|
768
|
-
if (
|
|
768
|
+
if (fs.existsSync(skillMd)) return {
|
|
769
769
|
baseDir: nested,
|
|
770
770
|
note: `Detected nested skills root at ${nested}`
|
|
771
771
|
};
|
|
@@ -785,9 +785,9 @@ function loadSkillEntries(workspaceDir, opts) {
|
|
|
785
785
|
const loadSkills = (params) => {
|
|
786
786
|
const baseDir = resolveNestedSkillsRoot(params.dir, { maxEntriesToScan: limits.maxCandidatesPerRoot }).baseDir;
|
|
787
787
|
const rootSkillMd = path.join(baseDir, "SKILL.md");
|
|
788
|
-
if (
|
|
788
|
+
if (fs.existsSync(rootSkillMd)) {
|
|
789
789
|
try {
|
|
790
|
-
const size =
|
|
790
|
+
const size = fs.statSync(rootSkillMd).size;
|
|
791
791
|
if (size > limits.maxSkillFileBytes) {
|
|
792
792
|
skillsLogger.warn("Skipping skills root due to oversized SKILL.md.", {
|
|
793
793
|
dir: baseDir,
|
|
@@ -826,9 +826,9 @@ function loadSkillEntries(workspaceDir, opts) {
|
|
|
826
826
|
for (const name of limitedChildren) {
|
|
827
827
|
const skillDir = path.join(baseDir, name);
|
|
828
828
|
const skillMd = path.join(skillDir, "SKILL.md");
|
|
829
|
-
if (!
|
|
829
|
+
if (!fs.existsSync(skillMd)) continue;
|
|
830
830
|
try {
|
|
831
|
-
const size =
|
|
831
|
+
const size = fs.statSync(skillMd).size;
|
|
832
832
|
if (size > limits.maxSkillFileBytes) {
|
|
833
833
|
skillsLogger.warn("Skipping skill due to oversized SKILL.md.", {
|
|
834
834
|
skill: name,
|
|
@@ -896,7 +896,7 @@ function loadSkillEntries(workspaceDir, opts) {
|
|
|
896
896
|
return Array.from(merged.values()).map((skill) => {
|
|
897
897
|
let frontmatter = {};
|
|
898
898
|
try {
|
|
899
|
-
frontmatter = parseFrontmatter(
|
|
899
|
+
frontmatter = parseFrontmatter(fs.readFileSync(skill.filePath, "utf-8"));
|
|
900
900
|
} catch {}
|
|
901
901
|
return {
|
|
902
902
|
skill,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ot as resolveConfigDir } from "./subsystem-
|
|
2
|
-
import { c as detectMime, l as extensionForMime } from "./image-ops-
|
|
1
|
+
import { ot as resolveConfigDir } from "./subsystem-BCjklMkJ.js";
|
|
2
|
+
import { c as detectMime, l as extensionForMime } from "./image-ops-O8pHxo7i.js";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import crypto from "node:crypto";
|