@bitseek/claw 1.3.1 → 1.3.2
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/{accounts-BTexwKe8.js → accounts-CX1yOBOk.js} +1 -1
- package/dist/{accounts-ubG6irXZ.js → accounts-CaiECgq3.js} +16 -16
- package/dist/{accounts-CFz9Jc5d.js → accounts-DZqwa5NK.js} +1 -1
- package/dist/{active-listener-Hd9sOu9T.js → active-listener-neKWQsOO.js} +1 -1
- package/dist/{agent-scope-C6hps0r3.js → agent-scope-CTbRzU1C.js} +4 -4
- package/dist/{api-key-rotation-WzOC5dTW.js → api-key-rotation-BTSy5kZN.js} +2 -2
- package/dist/{audio-preflight-BWOdDA2n.js → audio-preflight-DZWb0ozj.js} +39 -39
- package/dist/{audio-transcription-runner-DaoqvWoi.js → audio-transcription-runner-2dp0SxL3.js} +11 -11
- package/dist/{bindings-CsIiIjqN.js → bindings-Daa-Etag.js} +2 -2
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +65 -65
- package/dist/bundled/bootstrap-extra-files/handler.js +7 -7
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +65 -65
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{plugin-sdk/channel-activity-DAEbma-o.js → channel-activity-Btz1t5_1.js} +3 -3
- package/dist/{chrome-CjTE-vWv.js → chrome-DX1blHAJ.js} +18 -18
- package/dist/{chunk-DtYb6TYl.js → chunk-DEkdXze6.js} +1 -1
- package/dist/{commands-registry-NIsv9Z4R.js → commands-registry-BQkQRhEo.js} +5 -5
- package/dist/control-ui/assets/{index-DeYOAwUj.js → index-DIyxgivc.js} +420 -417
- package/dist/control-ui/assets/index-DIyxgivc.js.map +1 -0
- package/dist/control-ui/assets/index-EvU5ZebS.css +1 -0
- package/dist/control-ui/index.html +2 -2
- package/dist/{deliver-xY3h9X6N.js → deliver-C82Egs0W.js} +22 -22
- package/dist/{diagnostic-BO1GQJJf.js → diagnostic-DpOlXoSr.js} +2 -2
- package/dist/{dock-Cr9V9V1V.js → dock-DWqb4ufG.js} +6 -6
- package/dist/{env-DNMZEG57.js → env-Bn6pmvjK.js} +2 -2
- package/dist/{errors-DEkWxItM.js → errors-azBrKJmF.js} +1 -1
- package/dist/{fetch--iXu7oa7.js → fetch-B82CeaHJ.js} +5 -5
- package/dist/{fetch-guard-CNvY0vzQ.js → fetch-guard-CCLWHwu7.js} +2 -2
- package/dist/{frontmatter-DIRc-IR1.js → frontmatter-5U1LYLH9.js} +2 -2
- package/dist/{fs-safe-D8x_nIIA.js → fs-safe-BDR6eQAw.js} +4 -4
- package/dist/{github-copilot-token-DLGN-8YS.js → github-copilot-token-CPjAmbfr.js} +7 -7
- package/dist/{image-DCyaYY2d.js → image-BQ1JgwZu.js} +6 -6
- package/dist/{image-ops-DCpyia_K.js → image-ops-jvmQoiyw.js} +1 -1
- package/dist/{internal-hooks-yQe6H47q.js → internal-hooks-oLQ2m8YT.js} +1 -1
- package/dist/{ir-BZUjdf-6.js → ir-BODD8g-I.js} +6 -6
- package/dist/llm-slug-generator.js +65 -65
- package/dist/{plugin-sdk/logger-Cr-x0vMf.js → logger-DelEB7MK.js} +1 -1
- package/dist/{login-CgEHUE7h.js → login-Cm2zDfEU.js} +6 -6
- package/dist/{login-qr-DUJfhbUe.js → login-qr-iS1jPDpP.js} +13 -13
- package/dist/{manager-BNuB9clC.js → manager-DdzkWOvc.js} +15 -15
- package/dist/{markdown-tables-BHONoo6S.js → markdown-tables-pfs_NCNh.js} +1 -1
- package/dist/{plugin-sdk/message-channel-CvNq-esz.js → message-channel-POuk6EOq.js} +1 -1
- package/dist/{model-selection-D_Si2Ict.js → model-selection-DfZMxaX3.js} +44 -44
- package/dist/{outbound-DOVV_R6m.js → outbound-4q4mbU-Z.js} +7 -7
- package/dist/{outbound-attachment-C7sJLSnv.js → outbound-attachment-CBCp1oVQ.js} +2 -2
- package/dist/{path-alias-guards-CKjKIhQ3.js → path-alias-guards-DfQIjfhB.js} +1 -1
- package/dist/{paths-Cpu0XgUj.js → paths-BZO1jkK2.js} +3 -3
- package/dist/{paths-aGRLvQx9.js → paths-DKuX7-1L.js} +5 -5
- package/dist/{pi-embedded-BgVoy_Nm.js → pi-embedded-BhZNT6T-.js} +178 -178
- package/dist/{pi-embedded-helpers-CMTVhLjq.js → pi-embedded-helpers-CuwhW4u9.js} +29 -29
- package/dist/{pi-model-discovery-DCIw1y1c.js → pi-model-discovery-COjkql-U.js} +7 -7
- package/dist/plugin-sdk/{accounts-COLYAAOx.js → accounts-4WE2wtsW.js} +1 -1
- package/dist/plugin-sdk/{accounts-BZrkOo6-.js → accounts-AbI8uETR.js} +1 -1
- package/dist/plugin-sdk/{accounts-D_pT5EjF.js → accounts-BYcizTXn.js} +3 -3
- package/dist/plugin-sdk/{active-listener-DxBXcWm_.js → active-listener-pnqLAUOh.js} +1 -1
- package/dist/plugin-sdk/{agent-scope-DT5pxpJB.js → agent-scope-_j3fIYCK.js} +3 -3
- package/dist/plugin-sdk/{api-key-rotation-Dl6Ad7Nj.js → api-key-rotation-CYI51U_M.js} +2 -2
- package/dist/plugin-sdk/{audio-preflight-CkPj4OVY.js → audio-preflight-BTRRjPew.js} +33 -33
- package/dist/plugin-sdk/{audio-transcription-runner-BBn9jEMg.js → audio-transcription-runner-DFZS7uCO.js} +10 -10
- package/dist/plugin-sdk/{bindings-BSfhEjKN.js → bindings-CxxzC7gn.js} +2 -2
- package/dist/{channel-activity-D81g48kD.js → plugin-sdk/channel-activity-B3yZ-f-m.js} +3 -3
- package/dist/plugin-sdk/{channel-web-BaFUnG0F.js → channel-web-C521hZcX.js} +23 -23
- package/dist/plugin-sdk/{chrome-Dn0G4NoF.js → chrome-oPevdeh5.js} +7 -7
- package/dist/plugin-sdk/{chunk-cvtXztAT.js → chunk-BPyPeheZ.js} +1 -1
- package/dist/plugin-sdk/{command-format-BOJz3y1v.js → command-format-DvyMEXQo.js} +1 -1
- package/dist/plugin-sdk/{commands-registry-CZWv_JwZ.js → commands-registry-Dk8re8Lz.js} +5 -5
- package/dist/plugin-sdk/{config-DAwOhnVF.js → config-D7I2_X4P.js} +10 -10
- package/dist/plugin-sdk/{deliver-PdH-MCq8.js → deliver-NrIHn0__.js} +11 -11
- package/dist/plugin-sdk/{diagnostic-BZvj-qNu.js → diagnostic-DL3k_wRi.js} +2 -2
- package/dist/plugin-sdk/{dock-BdR3OYZn.js → dock-CjdkiLH7.js} +6 -6
- package/dist/plugin-sdk/{errors-jusxdu7M.js → errors-DFTN4h2I.js} +1 -1
- package/dist/plugin-sdk/{fetch-guard-Dary6WwJ.js → fetch-guard-BivEyA4v.js} +2 -2
- package/dist/plugin-sdk/{fs-safe-DMCE0ej9.js → fs-safe-B256n7Ff.js} +3 -3
- package/dist/plugin-sdk/{image-B3A2l2ep.js → image-CkPzr3XN.js} +6 -6
- package/dist/plugin-sdk/{image-ops-DulHE5Qc.js → image-ops-C9GXWF3o.js} +1 -1
- package/dist/plugin-sdk/index.js +64 -64
- package/dist/plugin-sdk/{ir-BFXiJrsN.js → ir-BIm-jvIK.js} +6 -6
- package/dist/plugin-sdk/{local-roots-DssN60r6.js → local-roots-2AOXGUXW.js} +4 -4
- package/dist/{logger-BlH5MJiV.js → plugin-sdk/logger-CNhs9eKJ.js} +1 -1
- package/dist/plugin-sdk/{login-D0ul3-6C.js → login-BcLiF9tC.js} +6 -6
- package/dist/plugin-sdk/{login-qr-XWKTFBuI.js → login-qr-GyPUodKJ.js} +9 -9
- package/dist/plugin-sdk/{manager-DGx_cF54.js → manager-DYLqNUb4.js} +10 -10
- package/dist/plugin-sdk/{markdown-tables-CsQpDNU5.js → markdown-tables-D9mmqMKi.js} +1 -1
- package/dist/{message-channel-Dl8dSs0T.js → plugin-sdk/message-channel-_CEZcqxE.js} +1 -1
- package/dist/plugin-sdk/{outbound-D29FHlQl.js → outbound-DdTsUaXa.js} +7 -7
- package/dist/plugin-sdk/{outbound-attachment-DRHrZUOx.js → outbound-attachment--hkuIDR1.js} +2 -2
- package/dist/plugin-sdk/{path-alias-guards-DpKV1B5p.js → path-alias-guards-BqUCBfUg.js} +1 -1
- package/dist/plugin-sdk/{pi-embedded-helpers-CKEUWckk.js → pi-embedded-helpers-CTfvZz83.js} +17 -17
- package/dist/plugin-sdk/{pi-model-discovery-BPeQq9XM.js → pi-model-discovery-CK3Ih_kq.js} +1 -1
- package/dist/plugin-sdk/{plugins-DF_dKXTR.js → plugins-BpHAMNJ1.js} +6 -6
- package/dist/plugin-sdk/{proxy-BfmEDoun.js → proxy-BJdRZOnJ.js} +1 -1
- package/dist/plugin-sdk/{proxy-fetch-BpHIgvBk.js → proxy-fetch-jmbopGcm.js} +1 -1
- package/dist/plugin-sdk/{pw-ai-BmmXDjtm.js → pw-ai-D0Kx7w1D.js} +13 -13
- package/dist/plugin-sdk/{qmd-manager-3hQbqkm5.js → qmd-manager-BDcutPp9.js} +8 -8
- package/dist/plugin-sdk/{query-expansion-BOGLUWB7.js → query-expansion-C_X8SyEA.js} +2 -2
- package/dist/{redact-ScShueoF.js → plugin-sdk/redact-DH8u23pF.js} +1 -1
- package/dist/plugin-sdk/{registry-Cv-oHUj1.js → registry-HF8_S7QO.js} +2 -2
- package/dist/plugin-sdk/{replies-CddwWBTJ.js → replies-DbjvV4gf.js} +3 -3
- package/dist/plugin-sdk/{reply-BCRC0yeW.js → reply-Czob6ZQ0.js} +93 -93
- package/dist/plugin-sdk/{reply-prefix-DXthVxCx.js → reply-prefix-KODsMNJ-.js} +1 -1
- package/dist/plugin-sdk/{resolve-outbound-target-D3Y4F2Le.js → resolve-outbound-target-BPT4aNiD.js} +2 -2
- package/dist/plugin-sdk/{resolve-route-DuwYYn4a.js → resolve-route-De2B5QY_.js} +4 -4
- package/dist/plugin-sdk/{retry-BMcrIz7L.js → retry-pZ8iKytf.js} +1 -1
- package/dist/plugin-sdk/{send-D0AaWnIj.js → send-1uW-uqPf.js} +7 -7
- package/dist/plugin-sdk/{send-C5USYGq7.js → send-BoNw1Bki.js} +8 -8
- package/dist/plugin-sdk/{send-B0ztz6QC.js → send-C-Rd2stz.js} +6 -6
- package/dist/plugin-sdk/{send-DJzwu8kk.js → send-CZIN8SDx.js} +15 -15
- package/dist/plugin-sdk/{send-DEyQJTzd.js → send-wCqsQs_s.js} +10 -10
- package/dist/plugin-sdk/{session-meta-ChWvKVWj.js → session-meta-7J-uHiM_.js} +1 -1
- package/dist/plugin-sdk/{session-BA7tVDpV.js → session-ooYcB82T.js} +5 -5
- package/dist/plugin-sdk/{sessions-BXps6YzJ.js → sessions-lAIo5l8W.js} +6 -6
- package/dist/plugin-sdk/{skill-commands-B20uUsji.js → skill-commands-D1Q6hGS4.js} +5 -5
- package/dist/plugin-sdk/{skills-DXOTei42.js → skills-BWSDv2F_.js} +8 -8
- package/dist/plugin-sdk/{ssrf-Doxv9M7Q.js → ssrf-JKDwTi8i.js} +1 -1
- package/dist/plugin-sdk/{store-BZbE1V-C.js → store-BMeqzQAf.js} +2 -2
- package/dist/plugin-sdk/{subsystem-CM1s2lDT.js → subsystem-B0V8LFBA.js} +2 -2
- package/dist/plugin-sdk/{tables-BhH8EIqU.js → tables-DCSeBGBz.js} +1 -1
- package/dist/{target-errors-B9Jzop3d.js → plugin-sdk/target-errors-0u6pegQv.js} +2 -2
- package/dist/{tokens-B9EDT4jv.js → plugin-sdk/tokens-DF2_VTJy.js} +1 -1
- package/dist/{tool-images-ffdfBx0b.js → plugin-sdk/tool-images-BbsgbHMZ.js} +2 -2
- package/dist/plugin-sdk/{tool-loop-detection-CygMSQUK.js → tool-loop-detection-JkCpGrfk.js} +2 -2
- package/dist/plugin-sdk/{utils-BcL6KGZf.js → utils-BfVxx6bk.js} +1 -1
- package/dist/plugin-sdk/web-D_qaocWb.js +72 -0
- package/dist/plugin-sdk/{whatsapp-actions-CRean1yN.js → whatsapp-actions-tVcrGNQc.js} +25 -25
- package/dist/{plugins-CJoaoIHc.js → plugins-D63QYxW6.js} +11 -11
- package/dist/{proxy-env-BnDt8j9F.js → proxy-env-vYAjKL5q.js} +1 -1
- package/dist/{proxy-fetch-xlbVQYN_.js → proxy-fetch-AvkSvetA.js} +1 -1
- package/dist/{proxy-DfJJLvch.js → proxy-jINniQBi.js} +1 -1
- package/dist/{pw-ai-DGwA7iCM.js → pw-ai-BLNiRUPI.js} +17 -17
- package/dist/{qmd-manager-CeN3N992.js → qmd-manager-BBKfRzj-.js} +11 -11
- package/dist/{query-expansion-CGnW4Mk_.js → query-expansion-2BrixCA2.js} +5 -5
- package/dist/{plugin-sdk/redact-BOuKZWXa.js → redact-uUggP88O.js} +1 -1
- package/dist/{registry-CJCkqTms.js → registry-C2GEGa2t.js} +3 -3
- package/dist/{replies-BFYGUEKu.js → replies-yAf6dFeT.js} +3 -3
- package/dist/{reply-prefix-DK1i6bCJ.js → reply-prefix-9mzt89Cf.js} +1 -1
- package/dist/{resolve-route-C5hVstLo.js → resolve-route-BNElrVxR.js} +4 -4
- package/dist/{retry-DTeP7C3h.js → retry-Ayb7e4XG.js} +1 -1
- package/dist/{send-B4pSMBHk.js → send-Bclgg0Ur.js} +8 -8
- package/dist/{send-BqKSZyIb.js → send-Bjaa69Cy.js} +27 -27
- package/dist/{send-V3fEVmLq.js → send-Cp0yQi_p.js} +10 -10
- package/dist/{send-XAO1mk64.js → send-DQ7hIAIK.js} +7 -7
- package/dist/{send-CN0f1Yst.js → send-DYY51FOR.js} +6 -6
- package/dist/{session-xKPVUYQP.js → session-TVb8hgJP.js} +9 -9
- package/dist/{session-meta-Cqv55kSk.js → session-meta-CyQWVUk4.js} +2 -2
- package/dist/{sessions-CA_BydGA.js → sessions-3jroJwu7.js} +31 -31
- package/dist/{skill-commands-CZFmIM-s.js → skill-commands-CSr9_48V.js} +9 -9
- package/dist/{skills-DMmr25nW.js → skills-B82IjVxn.js} +22 -22
- package/dist/{store-C8KgeMt2.js → store-DhC72KqW.js} +2 -2
- package/dist/{subsystem-BRjuJbbM.js → subsystem-CAatx5oo.js} +14 -14
- package/dist/{tables-BKnPZssn.js → tables-Bfh_TnCf.js} +1 -1
- package/dist/{plugin-sdk/target-errors-QZay02Cv.js → target-errors-CGYXYvSZ.js} +2 -2
- package/dist/{plugin-sdk/tokens-DIE-Bf72.js → tokens-BvzZdrVJ.js} +1 -1
- package/dist/{plugin-sdk/tool-images-heXfaJdb.js → tool-images-CqsWnc1k.js} +2 -2
- package/dist/{tool-loop-detection-CLoYKYIq.js → tool-loop-detection-C4V990MS.js} +3 -3
- package/dist/{utils-BFZnl-5N.js → utils-Bo1RFF0l.js} +6 -6
- package/dist/{web-C1PpWeXj.js → web-DQzzt8wj.js} +69 -69
- package/dist/{whatsapp-actions-CHt12z-f.js → whatsapp-actions-DXjy9m41.js} +28 -28
- package/dist/{workspace-D6mrCnXi.js → workspace-CswOYN9T.js} +21 -21
- package/package.json +1 -1
- package/dist/control-ui/assets/index-Ck63PFX9.css +0 -1
- package/dist/control-ui/assets/index-DeYOAwUj.js.map +0 -1
- package/dist/plugin-sdk/web-BDHHRoXS.js +0 -72
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { u as logVerbose } from "./subsystem-
|
|
2
|
-
import { h as resolveUserPath } from "./utils-
|
|
3
|
-
import { i as registerInternalHook } from "./internal-hooks-
|
|
1
|
+
import { u as logVerbose } from "./subsystem-CAatx5oo.js";
|
|
2
|
+
import { h as resolveUserPath } from "./utils-Bo1RFF0l.js";
|
|
3
|
+
import { i as registerInternalHook } from "./internal-hooks-oLQ2m8YT.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
|
|
6
6
|
//#region src/plugins/commands.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-
|
|
3
|
-
import { r as markdownToSlackMrkdwnChunks, t as sendMessageSlack } from "./send-
|
|
4
|
-
import { i as chunkMarkdownTextWithMode } from "./chunk-
|
|
2
|
+
import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-BvzZdrVJ.js";
|
|
3
|
+
import { r as markdownToSlackMrkdwnChunks, t as sendMessageSlack } from "./send-Bclgg0Ur.js";
|
|
4
|
+
import { i as chunkMarkdownTextWithMode } from "./chunk-DEkdXze6.js";
|
|
5
5
|
|
|
6
6
|
//#region src/auto-reply/reply/reply-reference.ts
|
|
7
7
|
function createReplyReferencePlanner(options) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { r as resolveAgentConfig } from "./agent-scope-
|
|
2
|
+
import { r as resolveAgentConfig } from "./agent-scope-CTbRzU1C.js";
|
|
3
3
|
|
|
4
4
|
//#region src/agents/identity.ts
|
|
5
5
|
const DEFAULT_ACK_REACTION = "👀";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { c as resolveDefaultAgentId } from "./agent-scope-
|
|
3
|
-
import { p as shouldLogVerbose } from "./subsystem-
|
|
2
|
+
import { c as resolveDefaultAgentId } from "./agent-scope-CTbRzU1C.js";
|
|
3
|
+
import { p as shouldLogVerbose } from "./subsystem-CAatx5oo.js";
|
|
4
4
|
import { c as normalizeAgentId, f as sanitizeAgentId, i as buildAgentPeerSessionKey, m as normalizeAccountId, n as DEFAULT_MAIN_KEY, p as DEFAULT_ACCOUNT_ID, r as buildAgentMainSessionKey, t as DEFAULT_AGENT_ID } from "./session-key-a6av96Fj.js";
|
|
5
|
-
import { t as logDebug } from "./logger-
|
|
5
|
+
import { t as logDebug } from "./logger-DelEB7MK.js";
|
|
6
6
|
import { t as normalizeChatType } from "./chat-type-DKb2TlGZ.js";
|
|
7
|
-
import { n as listBindings } from "./bindings-
|
|
7
|
+
import { n as listBindings } from "./bindings-Daa-Etag.js";
|
|
8
8
|
|
|
9
9
|
//#region src/routing/resolve-route.ts
|
|
10
10
|
var resolve_route_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { u as logVerbose } from "./subsystem-
|
|
3
|
-
import { H as loadConfig } from "./model-selection-
|
|
4
|
-
import { i as isSilentReplyText } from "./tokens-
|
|
5
|
-
import { d as resolveSlackAccount, m as resolveSlackBotToken } from "./plugins-
|
|
2
|
+
import { u as logVerbose } from "./subsystem-CAatx5oo.js";
|
|
3
|
+
import { H as loadConfig } from "./model-selection-DfZMxaX3.js";
|
|
4
|
+
import { i as isSilentReplyText } from "./tokens-BvzZdrVJ.js";
|
|
5
|
+
import { d as resolveSlackAccount, m as resolveSlackBotToken } from "./plugins-D63QYxW6.js";
|
|
6
6
|
import { i as requireTargetKind, n as ensureTargetId, r as parseMentionPrefixOrAtUserTarget, t as buildMessagingTarget } from "./targets-Ci42d9xO.js";
|
|
7
|
-
import { r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-
|
|
8
|
-
import { c as resolveChunkMode, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit } from "./chunk-
|
|
9
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
10
|
-
import { a as loadWebMedia, n as markdownToIR, t as chunkMarkdownIR } from "./ir-
|
|
7
|
+
import { r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-CCLWHwu7.js";
|
|
8
|
+
import { c as resolveChunkMode, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit } from "./chunk-DEkdXze6.js";
|
|
9
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-pfs_NCNh.js";
|
|
10
|
+
import { a as loadWebMedia, n as markdownToIR, t as chunkMarkdownIR } from "./ir-BODD8g-I.js";
|
|
11
11
|
import { t as renderMarkdownWithMarkers } from "./render-flG67HhW.js";
|
|
12
12
|
import { WebClient } from "@slack/web-api";
|
|
13
13
|
|
|
@@ -1,28 +1,28 @@
|
|
|
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 { c as danger, t as createSubsystemLogger, u as logVerbose } from "./subsystem-
|
|
2
|
+
import { c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, o as resolveOAuthDir } from "./paths-DKuX7-1L.js";
|
|
3
|
+
import { c as danger, t as createSubsystemLogger, u as logVerbose } from "./subsystem-CAatx5oo.js";
|
|
4
4
|
import { m as normalizeAccountId, p as DEFAULT_ACCOUNT_ID } from "./session-key-a6av96Fj.js";
|
|
5
|
-
import { g as safeParseJson, t as CONFIG_DIR } from "./utils-
|
|
6
|
-
import { An as withFileLock$1, H as loadConfig, K as writeConfigFile, W as readConfigFileSnapshotForWrite, mn as resolveTelegramPreviewStreamMode } from "./model-selection-
|
|
7
|
-
import { t as isTruthyEnvValue } from "./env-
|
|
8
|
-
import { l as resolveTelegramAccount, n as listChannelPlugins, t as getChannelPlugin } from "./plugins-
|
|
9
|
-
import { h as normalizeMimeType, m as kindFromMime, p as isGifMedia, u as getFileExtension } from "./image-ops-
|
|
10
|
-
import { t as redactSensitiveText } from "./redact-
|
|
11
|
-
import { i as formatUncaughtError, n as extractErrorCode, o as readErrorName, r as formatErrorMessage, t as collectErrorGraphCandidates } from "./errors-
|
|
12
|
-
import { t as hasProxyEnvConfigured } from "./proxy-env-
|
|
5
|
+
import { g as safeParseJson, t as CONFIG_DIR } from "./utils-Bo1RFF0l.js";
|
|
6
|
+
import { An as withFileLock$1, H as loadConfig, K as writeConfigFile, W as readConfigFileSnapshotForWrite, mn as resolveTelegramPreviewStreamMode } from "./model-selection-DfZMxaX3.js";
|
|
7
|
+
import { t as isTruthyEnvValue } from "./env-Bn6pmvjK.js";
|
|
8
|
+
import { l as resolveTelegramAccount, n as listChannelPlugins, t as getChannelPlugin } from "./plugins-D63QYxW6.js";
|
|
9
|
+
import { h as normalizeMimeType, m as kindFromMime, p as isGifMedia, u as getFileExtension } from "./image-ops-jvmQoiyw.js";
|
|
10
|
+
import { t as redactSensitiveText } from "./redact-uUggP88O.js";
|
|
11
|
+
import { i as formatUncaughtError, n as extractErrorCode, o as readErrorName, r as formatErrorMessage, t as collectErrorGraphCandidates } from "./errors-azBrKJmF.js";
|
|
12
|
+
import { t as hasProxyEnvConfigured } from "./proxy-env-vYAjKL5q.js";
|
|
13
13
|
import { r as writeJsonAtomic } from "./json-files-JTS4WE3P.js";
|
|
14
|
-
import { t as makeProxyFetch } from "./proxy-fetch-
|
|
15
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
16
|
-
import { a as loadWebMedia, n as markdownToIR, t as chunkMarkdownIR } from "./ir-
|
|
14
|
+
import { t as makeProxyFetch } from "./proxy-fetch-AvkSvetA.js";
|
|
15
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-pfs_NCNh.js";
|
|
16
|
+
import { a as loadWebMedia, n as markdownToIR, t as chunkMarkdownIR } from "./ir-BODD8g-I.js";
|
|
17
17
|
import { t as renderMarkdownWithMarkers } from "./render-flG67HhW.js";
|
|
18
18
|
import { t as resolveFetch } from "./fetch-CIXnD4u2.js";
|
|
19
|
-
import { i as createTelegramRetryRunner, n as recordChannelActivity } from "./channel-activity-
|
|
19
|
+
import { i as createTelegramRetryRunner, n as recordChannelActivity } from "./channel-activity-Btz1t5_1.js";
|
|
20
20
|
import { t as buildOutboundMediaLoadOptions } from "./load-options-xFTRYZAO.js";
|
|
21
21
|
import { n as normalizePollInput } from "./polls-an_kOejR.js";
|
|
22
22
|
import fs from "node:fs/promises";
|
|
23
23
|
import os from "node:os";
|
|
24
24
|
import path from "node:path";
|
|
25
|
-
import
|
|
25
|
+
import fs$1, { readFileSync } from "node:fs";
|
|
26
26
|
import JSON5 from "json5";
|
|
27
27
|
import process$1 from "node:process";
|
|
28
28
|
import crypto, { randomBytes } from "node:crypto";
|
|
@@ -161,7 +161,7 @@ function getPairingAdapter(channelId) {
|
|
|
161
161
|
//#region src/plugin-sdk/json-store.ts
|
|
162
162
|
async function readJsonFileWithFallback(filePath, fallback) {
|
|
163
163
|
try {
|
|
164
|
-
const parsed = safeParseJson(await
|
|
164
|
+
const parsed = safeParseJson(await fs$1.promises.readFile(filePath, "utf-8"));
|
|
165
165
|
if (parsed == null) return {
|
|
166
166
|
value: fallback,
|
|
167
167
|
exists: true
|
|
@@ -248,7 +248,7 @@ async function readPairingRequests(filePath) {
|
|
|
248
248
|
}
|
|
249
249
|
async function ensureJsonFile(filePath, fallback) {
|
|
250
250
|
try {
|
|
251
|
-
await
|
|
251
|
+
await fs$1.promises.access(filePath);
|
|
252
252
|
} catch {
|
|
253
253
|
await writeJsonFile(filePath, fallback);
|
|
254
254
|
}
|
|
@@ -404,7 +404,7 @@ function resolveAllowFromReadCacheOrMissing(filePath, stat) {
|
|
|
404
404
|
async function readAllowFromStateForPathWithExists(channel, filePath) {
|
|
405
405
|
let stat = null;
|
|
406
406
|
try {
|
|
407
|
-
stat = await
|
|
407
|
+
stat = await fs$1.promises.stat(filePath);
|
|
408
408
|
} catch (err) {
|
|
409
409
|
if (err.code !== "ENOENT") throw err;
|
|
410
410
|
}
|
|
@@ -447,7 +447,7 @@ async function writeAllowFromState(filePath, allowFrom) {
|
|
|
447
447
|
});
|
|
448
448
|
let stat = null;
|
|
449
449
|
try {
|
|
450
|
-
stat = await
|
|
450
|
+
stat = await fs$1.promises.stat(filePath);
|
|
451
451
|
} catch {}
|
|
452
452
|
setAllowFromReadCache(filePath, {
|
|
453
453
|
exists: true,
|
|
@@ -1054,7 +1054,7 @@ function resolveCronStorePath(storePath) {
|
|
|
1054
1054
|
}
|
|
1055
1055
|
async function loadCronStore(storePath) {
|
|
1056
1056
|
try {
|
|
1057
|
-
const raw = await
|
|
1057
|
+
const raw = await fs$1.promises.readFile(storePath, "utf-8");
|
|
1058
1058
|
let parsed;
|
|
1059
1059
|
try {
|
|
1060
1060
|
parsed = JSON5.parse(raw);
|
|
@@ -1080,13 +1080,13 @@ async function loadCronStore(storePath) {
|
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
1082
|
async function saveCronStore(storePath, store) {
|
|
1083
|
-
await
|
|
1083
|
+
await fs$1.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
1084
1084
|
const json = JSON.stringify(store, null, 2);
|
|
1085
1085
|
const cached = serializedStoreCache.get(storePath);
|
|
1086
1086
|
if (cached === json) return;
|
|
1087
1087
|
let previous = cached ?? null;
|
|
1088
1088
|
if (previous === null) try {
|
|
1089
|
-
previous = await
|
|
1089
|
+
previous = await fs$1.promises.readFile(storePath, "utf-8");
|
|
1090
1090
|
} catch (err) {
|
|
1091
1091
|
if (err.code !== "ENOENT") throw err;
|
|
1092
1092
|
}
|
|
@@ -1095,9 +1095,9 @@ async function saveCronStore(storePath, store) {
|
|
|
1095
1095
|
return;
|
|
1096
1096
|
}
|
|
1097
1097
|
const tmp = `${storePath}.${process.pid}.${randomBytes(8).toString("hex")}.tmp`;
|
|
1098
|
-
await
|
|
1098
|
+
await fs$1.promises.writeFile(tmp, json, "utf-8");
|
|
1099
1099
|
if (previous !== null) try {
|
|
1100
|
-
await
|
|
1100
|
+
await fs$1.promises.copyFile(storePath, `${storePath}.bak`);
|
|
1101
1101
|
} catch {}
|
|
1102
1102
|
await renameWithRetry(tmp, storePath);
|
|
1103
1103
|
serializedStoreCache.set(storePath, json);
|
|
@@ -1106,7 +1106,7 @@ const RENAME_MAX_RETRIES = 3;
|
|
|
1106
1106
|
const RENAME_BASE_DELAY_MS = 50;
|
|
1107
1107
|
async function renameWithRetry(src, dest) {
|
|
1108
1108
|
for (let attempt = 0; attempt <= RENAME_MAX_RETRIES; attempt++) try {
|
|
1109
|
-
await
|
|
1109
|
+
await fs$1.promises.rename(src, dest);
|
|
1110
1110
|
return;
|
|
1111
1111
|
} catch (err) {
|
|
1112
1112
|
const code = err.code;
|
|
@@ -1115,8 +1115,8 @@ async function renameWithRetry(src, dest) {
|
|
|
1115
1115
|
continue;
|
|
1116
1116
|
}
|
|
1117
1117
|
if (code === "EPERM" || code === "EEXIST") {
|
|
1118
|
-
await
|
|
1119
|
-
await
|
|
1118
|
+
await fs$1.promises.copyFile(src, dest);
|
|
1119
|
+
await fs$1.promises.unlink(src).catch(() => {});
|
|
1120
1120
|
return;
|
|
1121
1121
|
}
|
|
1122
1122
|
throw err;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { w as resolvePreferredOpenClawTmpDir } from "./subsystem-
|
|
3
|
-
import { H as loadConfig } from "./model-selection-
|
|
4
|
-
import { _ as resolveDiscordAccount, v as normalizeDiscordToken } from "./plugins-
|
|
2
|
+
import { w as resolvePreferredOpenClawTmpDir } from "./subsystem-CAatx5oo.js";
|
|
3
|
+
import { H as loadConfig } from "./model-selection-DfZMxaX3.js";
|
|
4
|
+
import { _ as resolveDiscordAccount, v as normalizeDiscordToken } from "./plugins-D63QYxW6.js";
|
|
5
5
|
import { i as requireTargetKind, r as parseMentionPrefixOrAtUserTarget, t as buildMessagingTarget } from "./targets-Ci42d9xO.js";
|
|
6
|
-
import { _ as maxBytesForKind, l as extensionForMime } from "./image-ops-
|
|
7
|
-
import { c as resolveChunkMode, i as chunkMarkdownTextWithMode } from "./chunk-
|
|
8
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
9
|
-
import { a as loadWebMedia, o as loadWebMediaRaw } from "./ir-
|
|
6
|
+
import { _ as maxBytesForKind, l as extensionForMime } from "./image-ops-jvmQoiyw.js";
|
|
7
|
+
import { c as resolveChunkMode, i as chunkMarkdownTextWithMode } from "./chunk-DEkdXze6.js";
|
|
8
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-pfs_NCNh.js";
|
|
9
|
+
import { a as loadWebMedia, o as loadWebMediaRaw } from "./ir-BODD8g-I.js";
|
|
10
10
|
import { t as resolveFetch } from "./fetch-CIXnD4u2.js";
|
|
11
|
-
import { n as retryAsync, t as resolveRetryConfig } from "./retry-
|
|
12
|
-
import { n as recordChannelActivity, r as createDiscordRetryRunner } from "./channel-activity-
|
|
11
|
+
import { n as retryAsync, t as resolveRetryConfig } from "./retry-Ayb7e4XG.js";
|
|
12
|
+
import { n as recordChannelActivity, r as createDiscordRetryRunner } from "./channel-activity-Btz1t5_1.js";
|
|
13
13
|
import { t as buildOutboundMediaLoadOptions } from "./load-options-xFTRYZAO.js";
|
|
14
14
|
import { n as normalizePollInput, t as normalizePollDurationHours } from "./polls-an_kOejR.js";
|
|
15
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
15
|
+
import { t as convertMarkdownTables } from "./tables-Bfh_TnCf.js";
|
|
16
16
|
import fs from "node:fs/promises";
|
|
17
17
|
import path from "node:path";
|
|
18
18
|
import { promisify } from "node:util";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { d as normalizeE164, h as resolveUserPath } from "./utils-
|
|
3
|
-
import { H as loadConfig } from "./model-selection-
|
|
4
|
-
import { m as kindFromMime } from "./image-ops-
|
|
5
|
-
import { t as resolveIMessageAccount } from "./accounts-
|
|
6
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
7
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
8
|
-
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-
|
|
2
|
+
import { d as normalizeE164, h as resolveUserPath } from "./utils-Bo1RFF0l.js";
|
|
3
|
+
import { H as loadConfig } from "./model-selection-DfZMxaX3.js";
|
|
4
|
+
import { m as kindFromMime } from "./image-ops-jvmQoiyw.js";
|
|
5
|
+
import { t as resolveIMessageAccount } from "./accounts-DZqwa5NK.js";
|
|
6
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-pfs_NCNh.js";
|
|
7
|
+
import { t as convertMarkdownTables } from "./tables-Bfh_TnCf.js";
|
|
8
|
+
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-CBCp1oVQ.js";
|
|
9
9
|
import { spawn } from "node:child_process";
|
|
10
10
|
import { createInterface } from "node:readline";
|
|
11
11
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { H as loadConfig } from "./model-selection-
|
|
2
|
+
import { H as loadConfig } from "./model-selection-DfZMxaX3.js";
|
|
3
3
|
import { n as generateSecureUuid } from "./secure-random-CY3Mg7Dp.js";
|
|
4
|
-
import { n as resolveSignalAccount } from "./accounts-
|
|
5
|
-
import { m as kindFromMime } from "./image-ops-
|
|
4
|
+
import { n as resolveSignalAccount } from "./accounts-CX1yOBOk.js";
|
|
5
|
+
import { m as kindFromMime } from "./image-ops-jvmQoiyw.js";
|
|
6
6
|
import { n as fetchWithTimeout } from "./fetch-timeout-CYFFedEH.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-pfs_NCNh.js";
|
|
8
|
+
import { n as markdownToIR, t as chunkMarkdownIR } from "./ir-BODD8g-I.js";
|
|
9
9
|
import { t as resolveFetch } from "./fetch-CIXnD4u2.js";
|
|
10
|
-
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-
|
|
10
|
+
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-CBCp1oVQ.js";
|
|
11
11
|
|
|
12
12
|
//#region src/signal/format.ts
|
|
13
13
|
function normalizeUrlForComparison(url) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as danger, m as success, x as toPinoLikeLogger, y as getChildLogger } from "./subsystem-
|
|
2
|
-
import { a as ensureDir, h as resolveUserPath } from "./utils-
|
|
3
|
-
import { yn as VERSION } from "./model-selection-
|
|
4
|
-
import { n as formatCliCommand } from "./env-
|
|
5
|
-
import { d as resolveDefaultWebAuthDir, f as resolveWebCredsBackupPath, l as readCredsJsonRaw, p as resolveWebCredsPath, s as maybeRestoreCredsFromBackup } from "./accounts-
|
|
6
|
-
import
|
|
1
|
+
import { c as danger, m as success, x as toPinoLikeLogger, y as getChildLogger } from "./subsystem-CAatx5oo.js";
|
|
2
|
+
import { a as ensureDir, h as resolveUserPath } from "./utils-Bo1RFF0l.js";
|
|
3
|
+
import { yn as VERSION } from "./model-selection-DfZMxaX3.js";
|
|
4
|
+
import { n as formatCliCommand } from "./env-Bn6pmvjK.js";
|
|
5
|
+
import { d as resolveDefaultWebAuthDir, f as resolveWebCredsBackupPath, l as readCredsJsonRaw, p as resolveWebCredsPath, s as maybeRestoreCredsFromBackup } from "./accounts-CaiECgq3.js";
|
|
6
|
+
import fs from "node:fs";
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
8
8
|
import { DisconnectReason, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "@whiskeysockets/baileys";
|
|
9
9
|
import qrcode from "qrcode-terminal";
|
|
@@ -22,16 +22,16 @@ async function safeSaveCreds(authDir, saveCreds, logger) {
|
|
|
22
22
|
const raw = readCredsJsonRaw(credsPath);
|
|
23
23
|
if (raw) try {
|
|
24
24
|
JSON.parse(raw);
|
|
25
|
-
|
|
25
|
+
fs.copyFileSync(credsPath, backupPath);
|
|
26
26
|
try {
|
|
27
|
-
|
|
27
|
+
fs.chmodSync(backupPath, 384);
|
|
28
28
|
} catch {}
|
|
29
29
|
} catch {}
|
|
30
30
|
} catch {}
|
|
31
31
|
try {
|
|
32
32
|
await Promise.resolve(saveCreds());
|
|
33
33
|
try {
|
|
34
|
-
|
|
34
|
+
fs.chmodSync(resolveWebCredsPath(authDir), 384);
|
|
35
35
|
} catch {}
|
|
36
36
|
} catch (err) {
|
|
37
37
|
logger.warn({ error: String(err) }, "failed saving WhatsApp creds");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { c as recordSessionMetaFromInbound } from "./sessions-
|
|
3
|
-
import { s as resolveStorePath } from "./paths-
|
|
2
|
+
import { c as recordSessionMetaFromInbound } from "./sessions-3jroJwu7.js";
|
|
3
|
+
import { s as resolveStorePath } from "./paths-BZO1jkK2.js";
|
|
4
4
|
|
|
5
5
|
//#region src/channels/session-meta.ts
|
|
6
6
|
var session_meta_exports = /* @__PURE__ */ __exportAll({ recordInboundSessionMetaSafe: () => recordInboundSessionMetaSafe });
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { d as resolveRequiredHomeDir } from "./paths-
|
|
2
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
1
|
+
import { d as resolveRequiredHomeDir } from "./paths-DKuX7-1L.js";
|
|
2
|
+
import { t as createSubsystemLogger } from "./subsystem-CAatx5oo.js";
|
|
3
3
|
import { c as normalizeAgentId, h as normalizeOptionalAccountId, l as normalizeMainKey, r as buildAgentMainSessionKey, t as DEFAULT_AGENT_ID } from "./session-key-a6av96Fj.js";
|
|
4
|
-
import { d as normalizeE164 } from "./utils-
|
|
5
|
-
import { H as loadConfig, Mn as getProcessStartTime, Nn as isPidAlive, at as parseDurationMs, jn as resolveProcessScopedMap, ot as parseByteSize } from "./model-selection-
|
|
6
|
-
import { c as normalizeHyphenSlug, t as getChannelDock } from "./dock-
|
|
7
|
-
import { r as normalizeChannelId } from "./plugins-
|
|
4
|
+
import { d as normalizeE164 } from "./utils-Bo1RFF0l.js";
|
|
5
|
+
import { H as loadConfig, Mn as getProcessStartTime, Nn as isPidAlive, at as parseDurationMs, jn as resolveProcessScopedMap, ot as parseByteSize } from "./model-selection-DfZMxaX3.js";
|
|
6
|
+
import { c as normalizeHyphenSlug, t as getChannelDock } from "./dock-DWqb4ufG.js";
|
|
7
|
+
import { r as normalizeChannelId } from "./plugins-D63QYxW6.js";
|
|
8
8
|
import { t as normalizeChatType } from "./chat-type-DKb2TlGZ.js";
|
|
9
|
-
import { o as listDeliverableMessageChannels, s as normalizeMessageChannel } from "./message-channel-
|
|
9
|
+
import { o as listDeliverableMessageChannels, s as normalizeMessageChannel } from "./message-channel-POuk6EOq.js";
|
|
10
10
|
import { i as writeTextAtomic } from "./json-files-JTS4WE3P.js";
|
|
11
11
|
import { n as resolveConversationLabel } from "./conversation-label-CEQUZyFY.js";
|
|
12
|
-
import { a as resolveSessionTranscriptPathInDir, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-
|
|
12
|
+
import { a as resolveSessionTranscriptPathInDir, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-BZO1jkK2.js";
|
|
13
13
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-Cso7-m1w.js";
|
|
14
14
|
import fs from "node:fs/promises";
|
|
15
15
|
import os from "node:os";
|
|
16
16
|
import path from "node:path";
|
|
17
|
-
import
|
|
17
|
+
import fs$1 from "node:fs";
|
|
18
18
|
import crypto from "node:crypto";
|
|
19
19
|
import { CURRENT_SESSION_VERSION, SessionManager } from "@mariozechner/pi-coding-agent";
|
|
20
20
|
|
|
@@ -103,7 +103,7 @@ function releaseAllLocksSync() {
|
|
|
103
103
|
if (typeof held.handle.close === "function") held.handle.close().catch(() => {});
|
|
104
104
|
} catch {}
|
|
105
105
|
try {
|
|
106
|
-
|
|
106
|
+
fs$1.rmSync(held.lockPath, { force: true });
|
|
107
107
|
} catch {}
|
|
108
108
|
HELD_LOCKS.delete(sessionFile);
|
|
109
109
|
}
|
|
@@ -908,14 +908,14 @@ function resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, a
|
|
|
908
908
|
function canonicalizePathForComparison$1(filePath) {
|
|
909
909
|
const resolved = path.resolve(filePath);
|
|
910
910
|
try {
|
|
911
|
-
return
|
|
911
|
+
return fs$1.realpathSync(resolved);
|
|
912
912
|
} catch {
|
|
913
913
|
return resolved;
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
916
|
function archiveFileOnDisk(filePath, reason) {
|
|
917
917
|
const archived = `${filePath}.${reason}.${formatSessionArchiveTimestamp()}`;
|
|
918
|
-
|
|
918
|
+
fs$1.renameSync(filePath, archived);
|
|
919
919
|
return archived;
|
|
920
920
|
}
|
|
921
921
|
/**
|
|
@@ -931,7 +931,7 @@ function archiveSessionTranscripts(opts) {
|
|
|
931
931
|
const relative = path.relative(storeDir, candidatePath);
|
|
932
932
|
if (!relative || relative.startsWith("..") || path.isAbsolute(relative)) continue;
|
|
933
933
|
}
|
|
934
|
-
if (!
|
|
934
|
+
if (!fs$1.existsSync(candidatePath)) continue;
|
|
935
935
|
try {
|
|
936
936
|
archived.push(archiveFileOnDisk(candidatePath, opts.reason));
|
|
937
937
|
} catch {}
|
|
@@ -949,15 +949,15 @@ async function cleanupArchivedSessionTranscripts(opts) {
|
|
|
949
949
|
let removed = 0;
|
|
950
950
|
let scanned = 0;
|
|
951
951
|
for (const dir of directories) {
|
|
952
|
-
const entries = await
|
|
952
|
+
const entries = await fs$1.promises.readdir(dir).catch(() => []);
|
|
953
953
|
for (const entry of entries) {
|
|
954
954
|
const timestamp = parseSessionArchiveTimestamp(entry, reason);
|
|
955
955
|
if (timestamp == null) continue;
|
|
956
956
|
scanned += 1;
|
|
957
957
|
if (now - timestamp <= opts.olderThanMs) continue;
|
|
958
958
|
const fullPath = path.join(dir, entry);
|
|
959
|
-
if (!(await
|
|
960
|
-
await
|
|
959
|
+
if (!(await fs$1.promises.stat(fullPath).catch(() => null))?.isFile()) continue;
|
|
960
|
+
await fs$1.promises.rm(fullPath).catch(() => void 0);
|
|
961
961
|
removed += 1;
|
|
962
962
|
}
|
|
963
963
|
}
|
|
@@ -1086,7 +1086,7 @@ function isCacheEnabled(ttlMs) {
|
|
|
1086
1086
|
}
|
|
1087
1087
|
function getFileStatSnapshot(filePath) {
|
|
1088
1088
|
try {
|
|
1089
|
-
const stats =
|
|
1089
|
+
const stats = fs$1.statSync(filePath);
|
|
1090
1090
|
return {
|
|
1091
1091
|
mtimeMs: stats.mtimeMs,
|
|
1092
1092
|
sizeBytes: stats.size
|
|
@@ -1105,7 +1105,7 @@ const NOOP_LOGGER = {
|
|
|
1105
1105
|
function canonicalizePathForComparison(filePath) {
|
|
1106
1106
|
const resolved = path.resolve(filePath);
|
|
1107
1107
|
try {
|
|
1108
|
-
return
|
|
1108
|
+
return fs$1.realpathSync(resolved);
|
|
1109
1109
|
} catch {
|
|
1110
1110
|
return resolved;
|
|
1111
1111
|
}
|
|
@@ -1163,12 +1163,12 @@ function resolveReferencedSessionTranscriptPaths(params) {
|
|
|
1163
1163
|
return referenced;
|
|
1164
1164
|
}
|
|
1165
1165
|
async function readSessionsDirFiles(sessionsDir) {
|
|
1166
|
-
const dirEntries = await
|
|
1166
|
+
const dirEntries = await fs$1.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
|
|
1167
1167
|
const files = [];
|
|
1168
1168
|
for (const dirent of dirEntries) {
|
|
1169
1169
|
if (!dirent.isFile()) continue;
|
|
1170
1170
|
const filePath = path.join(sessionsDir, dirent.name);
|
|
1171
|
-
const stat = await
|
|
1171
|
+
const stat = await fs$1.promises.stat(filePath).catch(() => null);
|
|
1172
1172
|
if (!stat?.isFile()) continue;
|
|
1173
1173
|
files.push({
|
|
1174
1174
|
path: filePath,
|
|
@@ -1181,9 +1181,9 @@ async function readSessionsDirFiles(sessionsDir) {
|
|
|
1181
1181
|
return files;
|
|
1182
1182
|
}
|
|
1183
1183
|
async function removeFileIfExists(filePath) {
|
|
1184
|
-
const stat = await
|
|
1184
|
+
const stat = await fs$1.promises.stat(filePath).catch(() => null);
|
|
1185
1185
|
if (!stat?.isFile()) return 0;
|
|
1186
|
-
await
|
|
1186
|
+
await fs$1.promises.rm(filePath, { force: true }).catch(() => void 0);
|
|
1187
1187
|
return stat.size;
|
|
1188
1188
|
}
|
|
1189
1189
|
async function removeFileForBudget(params) {
|
|
@@ -1542,7 +1542,7 @@ function capEntryCount(store, overrideMax, opts = {}) {
|
|
|
1542
1542
|
}
|
|
1543
1543
|
async function getSessionFileSize(storePath) {
|
|
1544
1544
|
try {
|
|
1545
|
-
return (await
|
|
1545
|
+
return (await fs$1.promises.stat(storePath)).size;
|
|
1546
1546
|
} catch {
|
|
1547
1547
|
return null;
|
|
1548
1548
|
}
|
|
@@ -1559,7 +1559,7 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
1559
1559
|
if (fileSize <= maxBytes) return false;
|
|
1560
1560
|
const backupPath = `${storePath}.bak.${Date.now()}`;
|
|
1561
1561
|
try {
|
|
1562
|
-
await
|
|
1562
|
+
await fs$1.promises.rename(storePath, backupPath);
|
|
1563
1563
|
log$1.info("rotated session store file", {
|
|
1564
1564
|
backupPath: path.basename(backupPath),
|
|
1565
1565
|
sizeBytes: fileSize
|
|
@@ -1570,11 +1570,11 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
1570
1570
|
try {
|
|
1571
1571
|
const dir = path.dirname(storePath);
|
|
1572
1572
|
const baseName = path.basename(storePath);
|
|
1573
|
-
const backups = (await
|
|
1573
|
+
const backups = (await fs$1.promises.readdir(dir)).filter((f) => f.startsWith(`${baseName}.bak.`)).toSorted().toReversed();
|
|
1574
1574
|
const maxBackups = 3;
|
|
1575
1575
|
if (backups.length > maxBackups) {
|
|
1576
1576
|
const toDelete = backups.slice(maxBackups);
|
|
1577
|
-
for (const old of toDelete) await
|
|
1577
|
+
for (const old of toDelete) await fs$1.promises.unlink(path.join(dir, old)).catch(() => void 0);
|
|
1578
1578
|
log$1.info("cleaned up old session store backups", { deleted: toDelete.length });
|
|
1579
1579
|
}
|
|
1580
1580
|
} catch {}
|
|
@@ -1697,7 +1697,7 @@ function loadSessionStore(storePath, opts = {}) {
|
|
|
1697
1697
|
const maxReadAttempts = process.platform === "win32" ? 3 : 1;
|
|
1698
1698
|
const retryBuf = maxReadAttempts > 1 ? new Int32Array(new SharedArrayBuffer(4)) : void 0;
|
|
1699
1699
|
for (let attempt = 0; attempt < maxReadAttempts; attempt++) try {
|
|
1700
|
-
const raw =
|
|
1700
|
+
const raw = fs$1.readFileSync(storePath, "utf-8");
|
|
1701
1701
|
if (raw.length === 0 && attempt < maxReadAttempts - 1) {
|
|
1702
1702
|
Atomics.wait(retryBuf, 0, 0, 50);
|
|
1703
1703
|
continue;
|
|
@@ -1851,7 +1851,7 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
1851
1851
|
});
|
|
1852
1852
|
}
|
|
1853
1853
|
}
|
|
1854
|
-
await
|
|
1854
|
+
await fs$1.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
1855
1855
|
const json = JSON.stringify(store, null, 2);
|
|
1856
1856
|
if (getSerializedSessionStore(storePath) === json) {
|
|
1857
1857
|
updateSessionStoreWriteCaches({
|
|
@@ -2173,8 +2173,8 @@ function resolveMirroredTranscriptText(params) {
|
|
|
2173
2173
|
return trimmed ? trimmed : null;
|
|
2174
2174
|
}
|
|
2175
2175
|
async function ensureSessionHeader(params) {
|
|
2176
|
-
if (
|
|
2177
|
-
await
|
|
2176
|
+
if (fs$1.existsSync(params.sessionFile)) return;
|
|
2177
|
+
await fs$1.promises.mkdir(path.dirname(params.sessionFile), { recursive: true });
|
|
2178
2178
|
const header = {
|
|
2179
2179
|
type: "session",
|
|
2180
2180
|
version: CURRENT_SESSION_VERSION,
|
|
@@ -2182,7 +2182,7 @@ async function ensureSessionHeader(params) {
|
|
|
2182
2182
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2183
2183
|
cwd: process.cwd()
|
|
2184
2184
|
};
|
|
2185
|
-
await
|
|
2185
|
+
await fs$1.promises.writeFile(params.sessionFile, `${JSON.stringify(header)}\n`, {
|
|
2186
2186
|
encoding: "utf-8",
|
|
2187
2187
|
mode: 384
|
|
2188
2188
|
});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { n as listAgentIds, o as resolveAgentSkillsFilter, s as resolveAgentWorkspaceDir } from "./agent-scope-
|
|
3
|
-
import { c as resolveStateDir } from "./paths-
|
|
4
|
-
import { t as createSubsystemLogger, u as logVerbose } from "./subsystem-
|
|
5
|
-
import { h as resolveUserPath, t as CONFIG_DIR } from "./utils-
|
|
6
|
-
import { o as resolvePluginSkillDirs, t as buildWorkspaceSkillCommandSpecs } from "./skills-
|
|
2
|
+
import { n as listAgentIds, o as resolveAgentSkillsFilter, s as resolveAgentWorkspaceDir } from "./agent-scope-CTbRzU1C.js";
|
|
3
|
+
import { c as resolveStateDir } from "./paths-DKuX7-1L.js";
|
|
4
|
+
import { t as createSubsystemLogger, u as logVerbose } from "./subsystem-CAatx5oo.js";
|
|
5
|
+
import { h as resolveUserPath, t as CONFIG_DIR } from "./utils-Bo1RFF0l.js";
|
|
6
|
+
import { o as resolvePluginSkillDirs, t as buildWorkspaceSkillCommandSpecs } from "./skills-B82IjVxn.js";
|
|
7
7
|
import { t as createAsyncLock } from "./json-files-JTS4WE3P.js";
|
|
8
|
-
import { a as listChatCommands } from "./commands-registry-
|
|
8
|
+
import { a as listChatCommands } from "./commands-registry-BQkQRhEo.js";
|
|
9
9
|
import os from "node:os";
|
|
10
10
|
import path from "node:path";
|
|
11
|
-
import
|
|
11
|
+
import fs from "node:fs";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
13
13
|
import chokidar from "chokidar";
|
|
14
14
|
|
|
@@ -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;
|