@symerian/symi 2.6.9 → 2.6.11
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-BRw8yhIW.js → accounts-D1r2dq1t.js} +21 -21
- package/dist/{accounts-3dCrO3oZ.js → accounts-dRUMQQrB.js} +1 -1
- package/dist/{accounts-BuZxOb3B.js → accounts-wSphH5gv.js} +1 -1
- package/dist/{active-listener-CfHHV2SU.js → active-listener-DFUTUjxt.js} +1 -1
- package/dist/{agent-scope-CpEJ0B88.js → agent-scope-D68_xfTL.js} +3 -3
- package/dist/{agents-yeSooTtP.js → agents-DRRBdgqz.js} +4 -4
- package/dist/{agents.config-DoTRueo1.js → agents.config-BO1N5Z_6.js} +1 -1
- package/dist/{agents.config-XOcM83Bx.js → agents.config-GCucbcBy.js} +1 -1
- package/dist/{audio-preflight-C40mKAp7.js → audio-preflight-CPBOQV4I.js} +4 -4
- package/dist/{audio-preflight-DHTaS5U1.js → audio-preflight-CjV36MUe.js} +29 -29
- package/dist/{auth-choice-CSfG00oW.js → auth-choice-C1sul2-I.js} +1 -1
- package/dist/{auth-choice-6h5vk1cG.js → auth-choice-i7tTgbDd.js} +1 -1
- package/dist/{auth-profiles-DdK1Hxaa.js → auth-profiles-Bl9aU7fc.js} +17 -17
- package/dist/{banner-C2tjwP2M.js → banner-VbhMdl-b.js} +1 -1
- package/dist/{bindings-BsHoBLIE.js → bindings-Bat2RnAR.js} +2 -2
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +53 -53
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +53 -53
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-B6G1jnQT.js → channel-activity-DK0AV-r9.js} +1 -1
- package/dist/{channel-options-CHyjRl0C.js → channel-options-CsXOvqAc.js} +1 -1
- package/dist/{channel-options-5wdTOBFJ.js → channel-options-Esf0QB4M.js} +1 -1
- package/dist/{channel-web-VYYpZqcw.js → channel-web-DDC84nZg.js} +1 -1
- package/dist/{channels-cli-Dm1d93Oy.js → channels-cli-C989dAD4.js} +4 -4
- package/dist/{channels-cli-CNS4BcpR.js → channels-cli-DomEe8uI.js} +4 -4
- package/dist/{chrome-DYZwl5Gv.js → chrome-D2SKJnR7.js} +5 -5
- package/dist/{chrome-CDJYxX5a.js → chrome-DRHvMBbb.js} +16 -16
- package/dist/{chunk-09egQapi.js → chunk-DR8ukp6r.js} +1 -1
- package/dist/{cli-D4MEJZ7W.js → cli-CPRCkEdK.js} +1 -1
- package/dist/{cli-DqQ3teJy.js → cli-RXswESw1.js} +1 -1
- package/dist/{command-registry-yzABgrim.js → command-registry-DwBw5-nh.js} +9 -9
- package/dist/{commands-registry-Bfc7Uz0o.js → commands-registry-DIakZUZb.js} +4 -4
- package/dist/{completion-cli-DDCDJyTb.js → completion-cli-C43sjF75.js} +2 -2
- package/dist/{completion-cli-zI_h8pr3.js → completion-cli-Cwx8MtF9.js} +1 -1
- package/dist/{config-5SdHIcHU.js → config-CvmE3Yx1.js} +12 -12
- package/dist/{config-cli-vqQE9gkx.js → config-cli-CkkIU7AY.js} +1 -1
- package/dist/{config-cli-Bth4qEO1.js → config-cli-DG0xBZhs.js} +1 -1
- package/dist/{configure-DyeOg2hp.js → configure-DlVtomYJ.js} +3 -3
- package/dist/{configure-DU1IcIoq.js → configure-nxnXIUVI.js} +3 -3
- package/dist/{deliver-BH0l3UKW.js → deliver-C-37cZUe.js} +1 -1
- package/dist/{deliver-dODxSv3b.js → deliver-UMgfGLxW.js} +20 -20
- package/dist/{diagnostic-rPhsBoZz.js → diagnostic-spWOtH_g.js} +1 -1
- package/dist/{doctor-completion-R-1oda1v.js → doctor-completion-CWr51Q4O.js} +1 -1
- package/dist/{doctor-completion-BbWijhz0.js → doctor-completion-Dd5P0i9L.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/{env-BDXYbTKj.js → env-xmBFQPBP.js} +1 -1
- package/dist/extensionAPI.js +6 -6
- package/dist/{frontmatter-CTR5f_Ez.js → frontmatter-CV0YkjoY.js} +2 -2
- package/dist/{gateway-cli-BFWLsB3b.js → gateway-cli-B1h1FhD-.js} +9 -9
- package/dist/{gateway-cli-DGKFkUrv.js → gateway-cli-BBJjWKyu.js} +9 -9
- package/dist/{gemini-auth-Dy12ZAH3.js → gemini-auth-C6Z-2T42.js} +1 -1
- package/dist/{github-copilot-token-cCYzSU9h.js → github-copilot-token-B8B2pmph.js} +7 -7
- package/dist/{glass-ui-ws-DDgLRQXa.js → glass-ui-ws-Bk01KSVI.js} +7 -7
- package/dist/{glass-ui-ws-DFRu8a15.js → glass-ui-ws-UewDPjVh.js} +7 -7
- package/dist/{health-BxPSqsO6.js → health-BiipZUOd.js} +1 -1
- package/dist/{health-CJ7Y6Rln.js → health-Dzi6letr.js} +1 -1
- package/dist/{hooks-cli-elIqdnzb.js → hooks-cli-BdelOAPH.js} +2 -2
- package/dist/{hooks-cli-BAVmPXDl.js → hooks-cli-DxRXaSHR.js} +2 -2
- package/dist/{image-CXu8W39c.js → image-CK4oZUJJ.js} +4 -4
- package/dist/{image-CHzdaNJ4.js → image-DcpMiprB.js} +1 -1
- package/dist/{image-ops-C7CauEK8.js → image-ops-M5agStZn.js} +16 -16
- package/dist/index.js +6 -6
- package/dist/{ir-CTiz95Vb.js → ir-B-XXcYFe.js} +4 -4
- package/dist/llm-slug-generator.js +53 -53
- package/dist/{local-roots-DhZz0Ybs.js → local-roots-CdXg5-Cx.js} +5 -5
- package/dist/{login-ul8zaw_S.js → login-BHUrERYo.js} +7 -7
- package/dist/{login-qr-AP9agO-i.js → login-qr-BKIOHn1V.js} +12 -12
- package/dist/{manager-PprhCvO_.js → manager-DW3JqFpY.js} +22 -22
- package/dist/{manifest-registry-yb7sAlu4.js → manifest-registry-0J48biqr.js} +19 -19
- package/dist/{markdown-tables-C-BmIap8.js → markdown-tables-tW9bGjLM.js} +1 -1
- package/dist/{message-channel-OlFBYAw8.js → message-channel-DwDSKGn4.js} +1 -1
- package/dist/{models-CIUYv1__.js → models-DUrbBEOU.js} +2 -2
- package/dist/{models-cli-DmffFgOZ.js → models-cli-CF0KZtK4.js} +2 -2
- package/dist/{models-cli-ydxkD2B-.js → models-cli-D5KE-evn.js} +3 -3
- package/dist/{onboard-DhJBvsPB.js → onboard-Bizq_LAS.js} +2 -2
- package/dist/{onboard-BBZMfGdo.js → onboard-DK-oOqRl.js} +2 -2
- package/dist/{onboard-channels-LCDTtAGK.js → onboard-channels-B6yLPqH5.js} +1 -1
- package/dist/{onboard-channels-0wtc-NTC.js → onboard-channels-DSZzjOo1.js} +1 -1
- package/dist/{onboarding-Bm11jSTl.js → onboarding-CkWWIQA7.js} +3 -3
- package/dist/{onboarding-Bs7a2RIn.js → onboarding-DGSCNnGY.js} +3 -3
- package/dist/{onboarding.finalize-fdahnZvf.js → onboarding.finalize-BMGwhjIR.js} +6 -6
- package/dist/{onboarding.finalize-DOpAnwny.js → onboarding.finalize-Dj0noUgo.js} +5 -5
- package/dist/{outbound-CtMCmwxR.js → outbound-CIVsLpJK.js} +7 -7
- package/dist/{outbound-attachment-DJldbweZ.js → outbound-attachment-CHcmlip8.js} +2 -2
- package/dist/paths-CYmyCDsE.js +212 -0
- package/dist/{paths-CbQV9WEg.js → paths-DEuVuViW.js} +1 -1
- package/dist/{pi-auth-json-Bk8ERadJ.js → pi-auth-json-BYuCWAs0.js} +8 -8
- package/dist/{pi-embedded-BwQa2XMa.js → pi-embedded-DLma-HLn.js} +60 -17
- package/dist/{pi-embedded-helpers-lgx_U5KS.js → pi-embedded-helpers-B8kqLWns.js} +4 -4
- package/dist/{pi-embedded-helpers-pubKo8HQ.js → pi-embedded-helpers-BU8EZuwx.js} +73 -73
- package/dist/{plugin-registry-CQCjMWVC.js → plugin-registry-BcgpVdtC.js} +1 -1
- package/dist/{plugin-registry-D3CP_n5q.js → plugin-registry-D8PAS3Sx.js} +1 -1
- package/dist/plugin-sdk/{channel-web-B76ttiD9.js → channel-web-DgNOPxkV.js} +1 -1
- package/dist/plugin-sdk/index.js +2 -2
- package/dist/plugin-sdk/{reply-CQPVXorK.js → reply-DJN8Xcq2.js} +46 -3
- package/dist/plugin-sdk/{web-DtkJFFr4.js → web-HkDBSFef.js} +2 -2
- package/dist/{plugins-BzmbgY7s.js → plugins-Bkr5ZdYs.js} +9 -9
- package/dist/{plugins-cli-FUQHZ6tU.js → plugins-cli-B_ln22KG.js} +2 -2
- package/dist/{plugins-cli-D_r2gFIY.js → plugins-cli-Bcmq1fs1.js} +2 -2
- package/dist/{program-DwrSPQU4.js → program-C_rxRb1M.js} +7 -7
- package/dist/{program-context-CN4mNmYa.js → program-context-BqH8IVSK.js} +17 -17
- package/dist/{prompt-select-styled-CK3VsV2a.js → prompt-select-styled-D8WAeDQY.js} +4 -4
- package/dist/{prompt-select-styled-BQW1Ropv.js → prompt-select-styled-DMRbQO0q.js} +4 -4
- package/dist/{provider-auth-helpers-CY8preuC.js → provider-auth-helpers-DiuVmtmQ.js} +1 -1
- package/dist/{provider-auth-helpers-Bg07iIOF.js → provider-auth-helpers-DstpUAya.js} +1 -1
- package/dist/{push-apns-D2hExRgY.js → push-apns-DKU4DgbI.js} +1 -1
- package/dist/{push-apns-6u2NUzOH.js → push-apns-be2xWY22.js} +1 -1
- package/dist/{pw-ai-De-KR9_s.js → pw-ai-1htA-NnS.js} +1 -1
- package/dist/{pw-ai-B5asscAD.js → pw-ai-BTgmcNVp.js} +11 -11
- package/dist/{qmd-manager-iDLSiI4Z.js → qmd-manager-BKu9rOuB.js} +7 -7
- package/dist/{register.agent-BqRVkePg.js → register.agent-Dcd_oFsG.js} +6 -6
- package/dist/{register.agent-BhM4QQqa.js → register.agent-k7WxtPOd.js} +5 -5
- package/dist/{register.configure-0qzVn1Z5.js → register.configure-BOgCp-h4.js} +6 -6
- package/dist/{register.configure-BtnhfP3M.js → register.configure-DMHVPA-T.js} +6 -6
- package/dist/{register.maintenance-DrijKQoQ.js → register.maintenance-BdBlQQ6G.js} +8 -8
- package/dist/{register.maintenance-BNqMCfLm.js → register.maintenance-Bsbgpe-Z.js} +7 -7
- package/dist/{register.message-2iSjsSI-.js → register.message-BE0gDUQZ.js} +2 -2
- package/dist/{register.message-CGexab2Y.js → register.message-DAyubW1M.js} +2 -2
- package/dist/{register.onboard-D1b3xhDD.js → register.onboard-CTKa4O9W.js} +4 -4
- package/dist/{register.onboard-DIAkE9FI.js → register.onboard-CqavyaNa.js} +4 -4
- package/dist/{register.setup-Bvv5sUpg.js → register.setup-BO3CD8Pz.js} +4 -4
- package/dist/{register.setup-Clq3FwZo.js → register.setup-DpkI2F6r.js} +4 -4
- package/dist/{register.status-health-sessions-IPxdVhoD.js → register.status-health-sessions-C5Qa-DmU.js} +3 -3
- package/dist/{register.status-health-sessions-JHfNAhk3.js → register.status-health-sessions-ClDUpT3j.js} +3 -3
- package/dist/{register.subclis-C5wTDVDa.js → register.subclis-Bvil7KuO.js} +9 -9
- package/dist/{registry-DYq1AYOv.js → registry-UkL38jvt.js} +17 -17
- package/dist/{replies-LSmuwOhA.js → replies-mfnbLu2p.js} +3 -3
- package/dist/{reply-dzRBlsmK.js → reply-4ilKYVzu.js} +46 -3
- package/dist/{reply-prefix-DpqZu44Z.js → reply-prefix-DkGsdyBm.js} +1 -1
- package/dist/{resolve-route-C4_I4GFI.js → resolve-route-q8AFnU5c.js} +4 -4
- package/dist/{retry-BBVXkKBV.js → retry-CqMeDhyp.js} +1 -1
- package/dist/{run-main-jPbs3Gm5.js → run-main-D1n_tgGX.js} +14 -14
- package/dist/{runner-DUBExAb5.js → runner-BcQ0sF9T.js} +1 -1
- package/dist/{runner-WAG0M5s9.js → runner-CKYly94z.js} +22 -22
- package/dist/{send-DYj_o4_F.js → send-B7z8CDbr.js} +18 -18
- package/dist/{send-CQAKg_12.js → send-Cd81AY_Z.js} +7 -7
- package/dist/{send-CvhXrdgS.js → send-D3zDmQim.js} +10 -10
- package/dist/{send-DAN9hA5h.js → send-XRUYukww.js} +6 -6
- package/dist/{send-CVMyYPQw.js → send-qItpAHcI.js} +6 -6
- package/dist/{server-methods-DuaVOb2k.js → server-methods-BRdl4pcP.js} +7 -7
- package/dist/{server-methods-CJbZTdch.js → server-methods-VC0ahxUh.js} +7 -7
- package/dist/{server-node-events-BgFWyVCV.js → server-node-events-Bq2fr8Z3.js} +2 -2
- package/dist/{server-node-events-DesNIafd.js → server-node-events-Y5xFGvsj.js} +2 -2
- package/dist/{session-DSU1vxxi.js → session-Dh2wWQkD.js} +8 -8
- package/dist/{skill-commands-DcVwOafC.js → skill-commands-B_f8uGi7.js} +16 -16
- package/dist/{skills-Bs0AW1g3.js → skills-CGHRETGF.js} +24 -24
- package/dist/{sqlite-D_mz1_-y.js → sqlite-Bv87EXeg.js} +16 -16
- package/dist/{status-BV22IA25.js → status-BxNHXm7T.js} +1 -1
- package/dist/{status-DOB2UmDg.js → status-CRCD2RpZ.js} +2 -2
- package/dist/{status-Bxkdy4Dq.js → status-DNJBoKuu.js} +1 -1
- package/dist/{status-BxfE61b4.js → status-DOCg6R55.js} +2 -2
- package/dist/{store-01F_JM7O.js → store-Ea3zM6xK.js} +6 -6
- package/dist/{subagent-registry-DEdqc42m.js → subagent-registry-7wPEZQKK.js} +46 -3
- package/dist/{subsystem-BjyjJF-d.js → subsystem-DN75fnEF.js} +1 -1
- package/dist/{tables-qMwbq29u.js → tables-BX7_aBvN.js} +1 -1
- package/dist/{target-errors-Bbr9rlzN.js → target-errors-7KhTCTdS.js} +2 -2
- package/dist/{thinking-BprCy23Z.js → thinking-C9-JAUzD.js} +5 -5
- package/dist/{tokens-Bux9Y_xD.js → tokens-BZGy4v--.js} +1 -1
- package/dist/{tool-images-SqqWIT22.js → tool-images-B1qVCntj.js} +2 -2
- package/dist/{tool-loop-detection-DR_rrIA1.js → tool-loop-detection-C8FBZVVx.js} +3 -3
- package/dist/{unified-runner-BIj2b1Y-.js → unified-runner-quomT1T-.js} +268 -225
- package/dist/{update-cli-CNlljdlx.js → update-cli-CcyCWvCB.js} +8 -8
- package/dist/{update-cli-D4OgWd1l.js → update-cli-FOE23Lo4.js} +7 -7
- package/dist/{update-runner-CZd6ajL6.js → update-runner-CJg-OANA.js} +1 -1
- package/dist/{update-runner-Dtay-1lf.js → update-runner-Dcjlf0aY.js} +1 -1
- package/dist/{web-qJRZWEaD.js → web-BTmqdXgt.js} +2 -2
- package/dist/{web-DUi3cu-p.js → web-CuNZExQK.js} +1 -1
- package/dist/{web-B-E-mzTK.js → web-DPBfrIzo.js} +6 -6
- package/dist/{web-DP9s1zzp.js → web-DcHxbz2H.js} +57 -57
- package/dist/{whatsapp-actions-BIeSWsCF.js → whatsapp-actions-SXenaJIn.js} +23 -23
- package/dist/{workspace-DscDraUb.js → workspace-DqJ5h-ZB.js} +27 -27
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { I as resolveUserPath, S as CONFIG_DIR } from "./registry-
|
|
2
|
-
import { f as normalizeSkillFilter } from "./agent-scope-
|
|
3
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
4
|
-
import { h as resolveSymiPackageRootSync } from "./workspace-
|
|
5
|
-
import { c as resolveMemorySlotDecision, d as isDangerousHostEnvVarName, o as normalizePluginsConfig, s as resolveEnableState, t as loadPluginManifestRegistry } from "./manifest-registry-
|
|
6
|
-
import { a as resolveSymiManifestBlock, c as resolveSymiManifestRequires, d as hasBinary, f as isConfigPathTruthyWithDefaults, i as parseSymiManifestInstallBase, l as parseFrontmatterBlock, n as normalizeStringList, o as resolveSymiManifestInstall, p as resolveRuntimePlatform, r as parseFrontmatterBool, s as resolveSymiManifestOs, t as getFrontmatterString, u as evaluateRuntimeRequires } from "./frontmatter-
|
|
1
|
+
import { I as resolveUserPath, S as CONFIG_DIR } from "./registry-UkL38jvt.js";
|
|
2
|
+
import { f as normalizeSkillFilter } from "./agent-scope-D68_xfTL.js";
|
|
3
|
+
import { t as createSubsystemLogger } from "./subsystem-DN75fnEF.js";
|
|
4
|
+
import { h as resolveSymiPackageRootSync } from "./workspace-DqJ5h-ZB.js";
|
|
5
|
+
import { c as resolveMemorySlotDecision, d as isDangerousHostEnvVarName, o as normalizePluginsConfig, s as resolveEnableState, t as loadPluginManifestRegistry } from "./manifest-registry-0J48biqr.js";
|
|
6
|
+
import { a as resolveSymiManifestBlock, c as resolveSymiManifestRequires, d as hasBinary, f as isConfigPathTruthyWithDefaults, i as parseSymiManifestInstallBase, l as parseFrontmatterBlock, n as normalizeStringList, o as resolveSymiManifestInstall, p as resolveRuntimePlatform, r as parseFrontmatterBool, s as resolveSymiManifestOs, t as getFrontmatterString, u as evaluateRuntimeRequires } from "./frontmatter-CV0YkjoY.js";
|
|
7
7
|
import path from "node:path";
|
|
8
|
-
import
|
|
8
|
+
import fsSync from "node:fs";
|
|
9
9
|
import os from "node:os";
|
|
10
|
-
import fs
|
|
10
|
+
import fs from "node:fs/promises";
|
|
11
11
|
import { fileURLToPath } from "node:url";
|
|
12
12
|
import { formatSkillsForPrompt, loadSkillsFromDir } from "@mariozechner/pi-coding-agent";
|
|
13
13
|
|
|
@@ -391,7 +391,7 @@ async function assertNoSymlinkEscape(relative, root, options) {
|
|
|
391
391
|
const isLast = idx === parts.length - 1;
|
|
392
392
|
current = path.join(current, part);
|
|
393
393
|
try {
|
|
394
|
-
if ((await fs
|
|
394
|
+
if ((await fs.lstat(current)).isSymbolicLink()) {
|
|
395
395
|
if (options?.allowFinalSymlink && isLast) return;
|
|
396
396
|
const target = await tryRealpath(current);
|
|
397
397
|
if (!isPathInside(rootReal, target)) throw new Error(`Symlink escapes sandbox root (${shortPath(rootReal)}): ${shortPath(current)}`);
|
|
@@ -405,7 +405,7 @@ async function assertNoSymlinkEscape(relative, root, options) {
|
|
|
405
405
|
}
|
|
406
406
|
async function tryRealpath(value) {
|
|
407
407
|
try {
|
|
408
|
-
return await fs
|
|
408
|
+
return await fs.realpath(value);
|
|
409
409
|
} catch {
|
|
410
410
|
return path.resolve(value);
|
|
411
411
|
}
|
|
@@ -424,13 +424,13 @@ function shortPath(value) {
|
|
|
424
424
|
//#region src/agents/skills/bundled-dir.ts
|
|
425
425
|
function looksLikeSkillsDir(dir) {
|
|
426
426
|
try {
|
|
427
|
-
const entries =
|
|
427
|
+
const entries = fsSync.readdirSync(dir, { withFileTypes: true });
|
|
428
428
|
for (const entry of entries) {
|
|
429
429
|
if (entry.name.startsWith(".")) continue;
|
|
430
430
|
const fullPath = path.join(dir, entry.name);
|
|
431
431
|
if (entry.isFile() && entry.name.endsWith(".md")) return true;
|
|
432
432
|
if (entry.isDirectory()) {
|
|
433
|
-
if (
|
|
433
|
+
if (fsSync.existsSync(path.join(fullPath, "SKILL.md"))) return true;
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
} catch {
|
|
@@ -445,7 +445,7 @@ function resolveBundledSkillsDir(opts = {}) {
|
|
|
445
445
|
const execPath = opts.execPath ?? process.execPath;
|
|
446
446
|
const execDir = path.dirname(execPath);
|
|
447
447
|
const sibling = path.join(execDir, "skills");
|
|
448
|
-
if (
|
|
448
|
+
if (fsSync.existsSync(sibling)) return sibling;
|
|
449
449
|
} catch {}
|
|
450
450
|
try {
|
|
451
451
|
const moduleUrl = opts.moduleUrl ?? import.meta.url;
|
|
@@ -501,7 +501,7 @@ function resolvePluginSkillDirs(params) {
|
|
|
501
501
|
const trimmed = raw.trim();
|
|
502
502
|
if (!trimmed) continue;
|
|
503
503
|
const candidate = path.resolve(record.rootDir, trimmed);
|
|
504
|
-
if (!
|
|
504
|
+
if (!fsSync.existsSync(candidate)) {
|
|
505
505
|
log.warn(`plugin skill path not found (${record.id}): ${candidate}`);
|
|
506
506
|
continue;
|
|
507
507
|
}
|
|
@@ -528,7 +528,7 @@ async function serializeByKey(key, task) {
|
|
|
528
528
|
|
|
529
529
|
//#endregion
|
|
530
530
|
//#region src/agents/skills/workspace.ts
|
|
531
|
-
const fsp =
|
|
531
|
+
const fsp = fsSync.promises;
|
|
532
532
|
const skillsLogger = createSubsystemLogger("skills");
|
|
533
533
|
const skillCommandDebugOnce = /* @__PURE__ */ new Set();
|
|
534
534
|
/**
|
|
@@ -605,7 +605,7 @@ function resolveSkillsLimits(config) {
|
|
|
605
605
|
}
|
|
606
606
|
function listChildDirectories(dir) {
|
|
607
607
|
try {
|
|
608
|
-
const entries =
|
|
608
|
+
const entries = fsSync.readdirSync(dir, { withFileTypes: true });
|
|
609
609
|
const dirs = [];
|
|
610
610
|
for (const entry of entries) {
|
|
611
611
|
if (entry.name.startsWith(".")) continue;
|
|
@@ -616,7 +616,7 @@ function listChildDirectories(dir) {
|
|
|
616
616
|
continue;
|
|
617
617
|
}
|
|
618
618
|
if (entry.isSymbolicLink()) try {
|
|
619
|
-
if (
|
|
619
|
+
if (fsSync.statSync(fullPath).isDirectory()) dirs.push(entry.name);
|
|
620
620
|
} catch {}
|
|
621
621
|
}
|
|
622
622
|
return dirs;
|
|
@@ -627,7 +627,7 @@ function listChildDirectories(dir) {
|
|
|
627
627
|
function resolveNestedSkillsRoot(dir, opts) {
|
|
628
628
|
const nested = path.join(dir, "skills");
|
|
629
629
|
try {
|
|
630
|
-
if (!
|
|
630
|
+
if (!fsSync.existsSync(nested) || !fsSync.statSync(nested).isDirectory()) return { baseDir: dir };
|
|
631
631
|
} catch {
|
|
632
632
|
return { baseDir: dir };
|
|
633
633
|
}
|
|
@@ -636,7 +636,7 @@ function resolveNestedSkillsRoot(dir, opts) {
|
|
|
636
636
|
const toScan = scanLimit === 0 ? [] : nestedDirs.slice(0, Math.min(nestedDirs.length, scanLimit));
|
|
637
637
|
for (const name of toScan) {
|
|
638
638
|
const skillMd = path.join(nested, name, "SKILL.md");
|
|
639
|
-
if (
|
|
639
|
+
if (fsSync.existsSync(skillMd)) return {
|
|
640
640
|
baseDir: nested,
|
|
641
641
|
note: `Detected nested skills root at ${nested}`
|
|
642
642
|
};
|
|
@@ -656,9 +656,9 @@ function loadSkillEntries(workspaceDir, opts) {
|
|
|
656
656
|
const loadSkills = (params) => {
|
|
657
657
|
const baseDir = resolveNestedSkillsRoot(params.dir, { maxEntriesToScan: limits.maxCandidatesPerRoot }).baseDir;
|
|
658
658
|
const rootSkillMd = path.join(baseDir, "SKILL.md");
|
|
659
|
-
if (
|
|
659
|
+
if (fsSync.existsSync(rootSkillMd)) {
|
|
660
660
|
try {
|
|
661
|
-
const size =
|
|
661
|
+
const size = fsSync.statSync(rootSkillMd).size;
|
|
662
662
|
if (size > limits.maxSkillFileBytes) {
|
|
663
663
|
skillsLogger.warn("Skipping skills root due to oversized SKILL.md.", {
|
|
664
664
|
dir: baseDir,
|
|
@@ -697,9 +697,9 @@ function loadSkillEntries(workspaceDir, opts) {
|
|
|
697
697
|
for (const name of limitedChildren) {
|
|
698
698
|
const skillDir = path.join(baseDir, name);
|
|
699
699
|
const skillMd = path.join(skillDir, "SKILL.md");
|
|
700
|
-
if (!
|
|
700
|
+
if (!fsSync.existsSync(skillMd)) continue;
|
|
701
701
|
try {
|
|
702
|
-
const size =
|
|
702
|
+
const size = fsSync.statSync(skillMd).size;
|
|
703
703
|
if (size > limits.maxSkillFileBytes) {
|
|
704
704
|
skillsLogger.warn("Skipping skill due to oversized SKILL.md.", {
|
|
705
705
|
skill: name,
|
|
@@ -767,7 +767,7 @@ function loadSkillEntries(workspaceDir, opts) {
|
|
|
767
767
|
return Array.from(merged.values()).map((skill) => {
|
|
768
768
|
let frontmatter = {};
|
|
769
769
|
try {
|
|
770
|
-
frontmatter = parseFrontmatter(
|
|
770
|
+
frontmatter = parseFrontmatter(fsSync.readFileSync(skill.filePath, "utf-8"));
|
|
771
771
|
} catch {}
|
|
772
772
|
return {
|
|
773
773
|
skill,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
2
|
-
import { o as resolveSessionTranscriptsDirForAgent } from "./paths-
|
|
1
|
+
import { t as createSubsystemLogger } from "./subsystem-DN75fnEF.js";
|
|
2
|
+
import { o as resolveSessionTranscriptsDirForAgent } from "./paths-DEuVuViW.js";
|
|
3
3
|
import { t as redactSensitiveText } from "./redact-BDMXB06K.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import path from "node:path";
|
|
6
|
-
import
|
|
7
|
-
import fs
|
|
6
|
+
import fsSync from "node:fs";
|
|
7
|
+
import fs from "node:fs/promises";
|
|
8
8
|
import crypto from "node:crypto";
|
|
9
9
|
|
|
10
10
|
//#region src/memory/fs-utils.ts
|
|
@@ -14,7 +14,7 @@ function isFileMissingError(err) {
|
|
|
14
14
|
async function statRegularFile(absPath) {
|
|
15
15
|
let stat;
|
|
16
16
|
try {
|
|
17
|
-
stat = await fs
|
|
17
|
+
stat = await fs.lstat(absPath);
|
|
18
18
|
} catch (err) {
|
|
19
19
|
if (isFileMissingError(err)) return { missing: true };
|
|
20
20
|
throw err;
|
|
@@ -71,7 +71,7 @@ async function runTasksWithConcurrency(params) {
|
|
|
71
71
|
//#region src/memory/internal.ts
|
|
72
72
|
function ensureDir(dir) {
|
|
73
73
|
try {
|
|
74
|
-
|
|
74
|
+
fsSync.mkdirSync(dir, { recursive: true });
|
|
75
75
|
} catch {}
|
|
76
76
|
return dir;
|
|
77
77
|
}
|
|
@@ -90,7 +90,7 @@ function isMemoryPath(relPath) {
|
|
|
90
90
|
return normalized.startsWith("memory/");
|
|
91
91
|
}
|
|
92
92
|
async function walkDir(dir, files) {
|
|
93
|
-
const entries = await fs
|
|
93
|
+
const entries = await fs.readdir(dir, { withFileTypes: true });
|
|
94
94
|
for (const entry of entries) {
|
|
95
95
|
const full = path.join(dir, entry.name);
|
|
96
96
|
if (entry.isSymbolicLink()) continue;
|
|
@@ -110,7 +110,7 @@ async function listMemoryFiles(workspaceDir, extraPaths) {
|
|
|
110
110
|
const memoryDir = path.join(workspaceDir, "memory");
|
|
111
111
|
const addMarkdownFile = async (absPath) => {
|
|
112
112
|
try {
|
|
113
|
-
const stat = await fs
|
|
113
|
+
const stat = await fs.lstat(absPath);
|
|
114
114
|
if (stat.isSymbolicLink() || !stat.isFile()) return;
|
|
115
115
|
if (!absPath.endsWith(".md")) return;
|
|
116
116
|
result.push(absPath);
|
|
@@ -119,12 +119,12 @@ async function listMemoryFiles(workspaceDir, extraPaths) {
|
|
|
119
119
|
await addMarkdownFile(memoryFile);
|
|
120
120
|
await addMarkdownFile(altMemoryFile);
|
|
121
121
|
try {
|
|
122
|
-
const dirStat = await fs
|
|
122
|
+
const dirStat = await fs.lstat(memoryDir);
|
|
123
123
|
if (!dirStat.isSymbolicLink() && dirStat.isDirectory()) await walkDir(memoryDir, result);
|
|
124
124
|
} catch {}
|
|
125
125
|
const normalizedExtraPaths = normalizeExtraMemoryPaths(workspaceDir, extraPaths);
|
|
126
126
|
if (normalizedExtraPaths.length > 0) for (const inputPath of normalizedExtraPaths) try {
|
|
127
|
-
const stat = await fs
|
|
127
|
+
const stat = await fs.lstat(inputPath);
|
|
128
128
|
if (stat.isSymbolicLink()) continue;
|
|
129
129
|
if (stat.isDirectory()) {
|
|
130
130
|
await walkDir(inputPath, result);
|
|
@@ -138,7 +138,7 @@ async function listMemoryFiles(workspaceDir, extraPaths) {
|
|
|
138
138
|
for (const entry of result) {
|
|
139
139
|
let key = entry;
|
|
140
140
|
try {
|
|
141
|
-
key = await fs
|
|
141
|
+
key = await fs.realpath(entry);
|
|
142
142
|
} catch {}
|
|
143
143
|
if (seen.has(key)) continue;
|
|
144
144
|
seen.add(key);
|
|
@@ -152,14 +152,14 @@ function hashText(value) {
|
|
|
152
152
|
async function buildFileEntry(absPath, workspaceDir) {
|
|
153
153
|
let stat;
|
|
154
154
|
try {
|
|
155
|
-
stat = await fs
|
|
155
|
+
stat = await fs.stat(absPath);
|
|
156
156
|
} catch (err) {
|
|
157
157
|
if (isFileMissingError(err)) return null;
|
|
158
158
|
throw err;
|
|
159
159
|
}
|
|
160
160
|
let content;
|
|
161
161
|
try {
|
|
162
|
-
content = await fs
|
|
162
|
+
content = await fs.readFile(absPath, "utf-8");
|
|
163
163
|
} catch (err) {
|
|
164
164
|
if (isFileMissingError(err)) return null;
|
|
165
165
|
throw err;
|
|
@@ -293,7 +293,7 @@ const log = createSubsystemLogger("memory");
|
|
|
293
293
|
async function listSessionFilesForAgent(agentId) {
|
|
294
294
|
const dir = resolveSessionTranscriptsDirForAgent(agentId);
|
|
295
295
|
try {
|
|
296
|
-
return (await fs
|
|
296
|
+
return (await fs.readdir(dir, { withFileTypes: true })).filter((entry) => entry.isFile()).map((entry) => entry.name).filter((name) => name.endsWith(".jsonl")).map((name) => path.join(dir, name));
|
|
297
297
|
} catch {
|
|
298
298
|
return [];
|
|
299
299
|
}
|
|
@@ -323,8 +323,8 @@ function extractSessionText(content) {
|
|
|
323
323
|
}
|
|
324
324
|
async function buildSessionEntry(absPath) {
|
|
325
325
|
try {
|
|
326
|
-
const stat = await fs
|
|
327
|
-
const lines = (await fs
|
|
326
|
+
const stat = await fs.stat(absPath);
|
|
327
|
+
const lines = (await fs.readFile(absPath, "utf-8")).split("\n");
|
|
328
328
|
const collected = [];
|
|
329
329
|
const lineMap = [];
|
|
330
330
|
for (let jsonlIdx = 0; jsonlIdx < lines.length; jsonlIdx++) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dt as createPluginLoaderLogger, ft as loadSymiPlugins } from "./reply-
|
|
1
|
+
import { dt as createPluginLoaderLogger, ft as loadSymiPlugins } from "./reply-4ilKYVzu.js";
|
|
2
2
|
import { t as createSubsystemLogger } from "./subsystem-D9vIQve0.js";
|
|
3
3
|
import { D as resolveDefaultAgentWorkspaceDir, c as resolveAgentWorkspaceDir, l as resolveDefaultAgentId } from "./agent-scope-CgUHAtCo.js";
|
|
4
4
|
import { i as loadConfig } from "./config-CHwyw6l5.js";
|
|
@@ -9,7 +9,7 @@ import { c as resolveAgentWorkspaceDir } from "./agent-scope-D-jRCY0d.js";
|
|
|
9
9
|
import { t as buildWorkspaceSkillStatus } from "./skills-status-DKXJ-tbi.js";
|
|
10
10
|
import { H as VERSION, i as loadConfig, o as readConfigFileSnapshot } from "./config-DHBLS1Hl.js";
|
|
11
11
|
import { n as callGateway, t as buildGatewayConnectionDetails } from "./call-BcE47FtD.js";
|
|
12
|
-
import { En as peekSystemEvents, St as summarizeRestartSentinel, cn as buildChannelAccountSnapshot, in as formatUsageReportLines, ln as formatChannelAllowFrom, nt as sha256HexPrefix, rn as loadProviderUsageSummary, sn as buildChannelSummary, xt as readRestartSentinel } from "./subagent-registry-
|
|
12
|
+
import { En as peekSystemEvents, St as summarizeRestartSentinel, cn as buildChannelAccountSnapshot, in as formatUsageReportLines, ln as formatChannelAllowFrom, nt as sha256HexPrefix, rn as loadProviderUsageSummary, sn as buildChannelSummary, xt as readRestartSentinel } from "./subagent-registry-7wPEZQKK.js";
|
|
13
13
|
import { F as resolveMainSessionKey, j as resolveFreshSessionTotalTokens, o as loadSessionStore } from "./sessions-CJXnZVjR.js";
|
|
14
14
|
import { n as listChannelPlugins } from "./plugins-CwSlLxM8.js";
|
|
15
15
|
import { o as getTailnetHostname, s as readTailscaleStatusJson } from "./tailscale-CbbvYNVw.js";
|
|
@@ -29,7 +29,7 @@ import { t as formatRuntimeStatusWithDetails } from "./runtime-status-hFVEC3wO.j
|
|
|
29
29
|
import { t as readLastGatewayErrorLine } from "./diagnostics-CS1ov_hH.js";
|
|
30
30
|
import { t as renderTable } from "./table-D01d2GuY.js";
|
|
31
31
|
import { a as resolveGatewayProbeAuth$1, c as probeGateway, t as runSecurityAudit } from "./audit-Byo5jCLN.js";
|
|
32
|
-
import { o as resolveHeartbeatSummaryForAgent, t as formatHealthChannelLines } from "./health-
|
|
32
|
+
import { o as resolveHeartbeatSummaryForAgent, t as formatHealthChannelLines } from "./health-BiipZUOd.js";
|
|
33
33
|
import { g as resolveUpdateChannelDisplay, i as formatGitInstallLabel, m as normalizeUpdateChannel, t as checkUpdateStatus } from "./update-check-ZdimP1aU.js";
|
|
34
34
|
import { t as resolveNodeService } from "./node-service-fcZExd22.js";
|
|
35
35
|
import { n as redactSecrets, t as formatGatewayAuthUsed } from "./format-DVLB9DNB.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as createSubsystemLogger } from "./entry.js";
|
|
2
2
|
import { D as resolveDefaultAgentWorkspaceDir, c as resolveAgentWorkspaceDir, l as resolveDefaultAgentId } from "./agent-scope-D-jRCY0d.js";
|
|
3
3
|
import { i as loadConfig } from "./config-DHBLS1Hl.js";
|
|
4
|
-
import { m as loadSymiPlugins, p as createPluginLoaderLogger } from "./subagent-registry-
|
|
4
|
+
import { m as loadSymiPlugins, p as createPluginLoaderLogger } from "./subagent-registry-7wPEZQKK.js";
|
|
5
5
|
|
|
6
6
|
//#region src/plugins/status.ts
|
|
7
7
|
const log = createSubsystemLogger("plugins");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { u as resolveGatewayPort } from "./paths-Cqn-zk3M.js";
|
|
2
2
|
import { B as theme, k as info, z as isRich } from "./utils-B-0b9bGM.js";
|
|
3
|
-
import { B as summarizeRestartSentinel, Jt as sha256HexPrefix, _t as formatUsageReportLines, a as buildChannelSummary, gt as loadProviderUsageSummary, h as listAgentsForGateway, m as classifySessionKey, o as buildChannelAccountSnapshot, pr as lookupContextTokens, s as formatChannelAllowFrom, wr as peekSystemEvents, x as resolveSessionModelRef, z as readRestartSentinel } from "./reply-
|
|
3
|
+
import { B as summarizeRestartSentinel, Jt as sha256HexPrefix, _t as formatUsageReportLines, a as buildChannelSummary, gt as loadProviderUsageSummary, h as listAgentsForGateway, m as classifySessionKey, o as buildChannelAccountSnapshot, pr as lookupContextTokens, s as formatChannelAllowFrom, wr as peekSystemEvents, x as resolveSessionModelRef, z as readRestartSentinel } from "./reply-4ilKYVzu.js";
|
|
4
4
|
import { S as parseAgentSessionKey } from "./session-key-DCt45XZa.js";
|
|
5
5
|
import { t as resolveSymiPackageRoot } from "./symi-root-CrGJbkzf.js";
|
|
6
6
|
import { n as runExec } from "./exec-CWkblSrI.js";
|
|
@@ -28,7 +28,7 @@ import { t as formatRuntimeStatusWithDetails } from "./runtime-status-CR9445g5.j
|
|
|
28
28
|
import { t as readLastGatewayErrorLine } from "./diagnostics-BAMlsVVX.js";
|
|
29
29
|
import { t as renderTable } from "./table-BTgkRafz.js";
|
|
30
30
|
import { a as resolveGatewayProbeAuth$1, c as probeGateway, t as runSecurityAudit } from "./audit-CrITRV6w.js";
|
|
31
|
-
import { a as resolveHeartbeatSummaryForAgent, t as formatHealthChannelLines } from "./health-
|
|
31
|
+
import { a as resolveHeartbeatSummaryForAgent, t as formatHealthChannelLines } from "./health-Dzi6letr.js";
|
|
32
32
|
import { g as resolveUpdateChannelDisplay, i as formatGitInstallLabel, m as normalizeUpdateChannel, t as checkUpdateStatus } from "./update-check-CtckACbb.js";
|
|
33
33
|
import { t as resolveNodeService } from "./node-service-Cxz4e-Qd.js";
|
|
34
34
|
import { n as redactSecrets, t as formatGatewayAuthUsed } from "./format-yQZNwAF2.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { P as resolveConfigDir } from "./registry-
|
|
2
|
-
import { c as detectMime, l as extensionForMime } from "./image-ops-
|
|
1
|
+
import { P as resolveConfigDir } from "./registry-UkL38jvt.js";
|
|
2
|
+
import { c as detectMime, l as extensionForMime } from "./image-ops-M5agStZn.js";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import fs
|
|
4
|
+
import fs from "node:fs/promises";
|
|
5
5
|
import crypto from "node:crypto";
|
|
6
6
|
|
|
7
7
|
//#region src/media/store.ts
|
|
@@ -24,7 +24,7 @@ function getMediaDir() {
|
|
|
24
24
|
}
|
|
25
25
|
async function ensureMediaDir() {
|
|
26
26
|
const mediaDir = resolveMediaDir();
|
|
27
|
-
await fs
|
|
27
|
+
await fs.mkdir(mediaDir, {
|
|
28
28
|
recursive: true,
|
|
29
29
|
mode: 448
|
|
30
30
|
});
|
|
@@ -33,7 +33,7 @@ async function ensureMediaDir() {
|
|
|
33
33
|
async function saveMediaBuffer(buffer, contentType, subdir = "inbound", maxBytes = MAX_BYTES, originalFilename) {
|
|
34
34
|
if (buffer.byteLength > maxBytes) throw new Error(`Media exceeds ${(maxBytes / (1024 * 1024)).toFixed(0)}MB limit`);
|
|
35
35
|
const dir = path.join(resolveMediaDir(), subdir);
|
|
36
|
-
await fs
|
|
36
|
+
await fs.mkdir(dir, {
|
|
37
37
|
recursive: true,
|
|
38
38
|
mode: 448
|
|
39
39
|
});
|
|
@@ -51,7 +51,7 @@ async function saveMediaBuffer(buffer, contentType, subdir = "inbound", maxBytes
|
|
|
51
51
|
id = sanitized ? `${sanitized}---${uuid}${ext}` : `${uuid}${ext}`;
|
|
52
52
|
} else id = ext ? `${uuid}${ext}` : uuid;
|
|
53
53
|
const dest = path.join(dir, id);
|
|
54
|
-
await fs
|
|
54
|
+
await fs.writeFile(dest, buffer, { mode: 384 });
|
|
55
55
|
return {
|
|
56
56
|
id,
|
|
57
57
|
path: dest,
|
|
@@ -32878,7 +32878,9 @@ function stripModelTokensAggressive(text, modelId) {
|
|
|
32878
32878
|
*/
|
|
32879
32879
|
function cleanResidualTokenFragments(text) {
|
|
32880
32880
|
if (!text) return text;
|
|
32881
|
-
|
|
32881
|
+
let result = text.replace(/^[<"|]+(?!<[A-Z_])(?=[a-zA-Z0-9/~$.(])/gm, "").replace(/[<"|]+$/gm, "").trim();
|
|
32882
|
+
if (result.length >= 2 && result.length < 20 && !result.includes(" ") && !result.includes("-") && !result.includes("/") && !result.includes(".") && result[0] === result[1]) result = result.slice(1);
|
|
32883
|
+
return result;
|
|
32882
32884
|
}
|
|
32883
32885
|
|
|
32884
32886
|
//#endregion
|
|
@@ -35669,15 +35671,56 @@ function sanitizeParams(params) {
|
|
|
35669
35671
|
};
|
|
35670
35672
|
}
|
|
35671
35673
|
/**
|
|
35674
|
+
* Build a usage example string from a tool's JSON schema for helpful error messages.
|
|
35675
|
+
* Returns something like: web_search({ query: "<search terms>" })
|
|
35676
|
+
*/
|
|
35677
|
+
function buildToolUsageExample(toolName, schema) {
|
|
35678
|
+
const props = schema?.properties;
|
|
35679
|
+
if (!props || typeof props !== "object") return `${toolName}({ ... })`;
|
|
35680
|
+
return `${toolName}({ ${Object.entries(props).slice(0, 4).map(([key, def]) => {
|
|
35681
|
+
const typeDef = def;
|
|
35682
|
+
if (Array.isArray(typeDef?.enum)) return `${key}: "${typeDef.enum[0]}"`;
|
|
35683
|
+
if (typeDef?.type === "string") return `${key}: "<${typeof typeDef.description === "string" ? typeDef.description.slice(0, 30) : key}>"`;
|
|
35684
|
+
return `${key}: ...`;
|
|
35685
|
+
}).join(", ")} })`;
|
|
35686
|
+
}
|
|
35687
|
+
/**
|
|
35688
|
+
* Extract required fields from a tool's JSON schema.
|
|
35689
|
+
*/
|
|
35690
|
+
function getRequiredFields(schema) {
|
|
35691
|
+
const required = schema?.required;
|
|
35692
|
+
return Array.isArray(required) ? required.filter((r) => typeof r === "string") : [];
|
|
35693
|
+
}
|
|
35694
|
+
/**
|
|
35695
|
+
* Create a relaxed copy of a tool schema with required fields removed.
|
|
35696
|
+
* This allows args with missing fields to pass pi-agent-core's schema
|
|
35697
|
+
* validation, reaching our execute() wrapper where we can return a
|
|
35698
|
+
* helpful error message with a usage example.
|
|
35699
|
+
*/
|
|
35700
|
+
function relaxSchema(schema) {
|
|
35701
|
+
if (!schema || typeof schema !== "object") return schema;
|
|
35702
|
+
const copy = { ...schema };
|
|
35703
|
+
delete copy.required;
|
|
35704
|
+
return copy;
|
|
35705
|
+
}
|
|
35706
|
+
/**
|
|
35672
35707
|
* Wrap a single tool with universal argument sanitization.
|
|
35673
35708
|
*/
|
|
35674
35709
|
function wrapToolWithArgValidation(tool) {
|
|
35675
35710
|
const toolName = (tool.name ?? "").toLowerCase().trim();
|
|
35676
35711
|
const isExecTool = EXEC_TOOL_NAMES.has(toolName);
|
|
35712
|
+
const originalRequired = getRequiredFields(tool.parameters);
|
|
35713
|
+
const usageExample = buildToolUsageExample(toolName, tool.parameters);
|
|
35677
35714
|
const originalExecute = tool.execute;
|
|
35678
35715
|
return {
|
|
35679
35716
|
...tool,
|
|
35717
|
+
parameters: relaxSchema(tool.parameters),
|
|
35680
35718
|
execute(toolCallId, params, ...rest) {
|
|
35719
|
+
const missingFields = originalRequired.filter((field) => params[field] === void 0 || params[field] === null);
|
|
35720
|
+
if (missingFields.length > 0) {
|
|
35721
|
+
log$1.warn(`[validate] ${toolName} missing required fields: ${missingFields.join(", ")}`);
|
|
35722
|
+
return Promise.resolve({ output: `Error: Missing required argument${missingFields.length > 1 ? "s" : ""}: ${missingFields.join(", ")}. Please try again with all required arguments.\nExample: ${usageExample}` });
|
|
35723
|
+
}
|
|
35681
35724
|
const { cleaned, changed } = sanitizeParams(params);
|
|
35682
35725
|
if (changed) log$1.debug(`[validate] sanitized args for ${toolName}: ${Object.keys(params).filter((k) => cleaned[k] !== params[k]).join(",")}`);
|
|
35683
35726
|
const effectiveParams = changed ? cleaned : params;
|
|
@@ -53026,7 +53069,7 @@ function isVoiceChannelType(type) {
|
|
|
53026
53069
|
function createDefaultDeps() {
|
|
53027
53070
|
return {
|
|
53028
53071
|
sendMessageWhatsApp: async (...args) => {
|
|
53029
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
53072
|
+
const { sendMessageWhatsApp } = await import("./web-CuNZExQK.js");
|
|
53030
53073
|
return await sendMessageWhatsApp(...args);
|
|
53031
53074
|
},
|
|
53032
53075
|
sendMessageTelegram: async (...args) => {
|
|
@@ -68340,7 +68383,7 @@ function loadWebLoginQr() {
|
|
|
68340
68383
|
return webLoginQrPromise;
|
|
68341
68384
|
}
|
|
68342
68385
|
function loadWebChannel() {
|
|
68343
|
-
webChannelPromise ??= import("./web-
|
|
68386
|
+
webChannelPromise ??= import("./web-CuNZExQK.js");
|
|
68344
68387
|
return webChannelPromise;
|
|
68345
68388
|
}
|
|
68346
68389
|
function loadWhatsAppActions() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { at as isFileLogLevelEnabled, ct as levelToMinLevel, lt as normalizeLogLevel, n as CHAT_CHANNEL_ORDER, q as isVerbose, rt as getChildLogger, st as loggingState, ut as readLoggingConfig } from "./registry-
|
|
1
|
+
import { at as isFileLogLevelEnabled, ct as levelToMinLevel, lt as normalizeLogLevel, n as CHAT_CHANNEL_ORDER, q as isVerbose, rt as getChildLogger, st as loggingState, ut as readLoggingConfig } from "./registry-UkL38jvt.js";
|
|
2
2
|
import { Chalk } from "chalk";
|
|
3
3
|
|
|
4
4
|
//#region src/terminal/progress-line.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as detectMime } from "./image-ops-
|
|
2
|
-
import { r as sanitizeToolResultImages } from "./tool-images-
|
|
1
|
+
import { c as detectMime } from "./image-ops-M5agStZn.js";
|
|
2
|
+
import { r as sanitizeToolResultImages } from "./tool-images-B1qVCntj.js";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
|
|
5
5
|
//#region src/agents/tools/common.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { p as normalizeAccountId } from "./session-key-BCzIW1Y2.js";
|
|
2
|
-
import { D as escapeRegExp, M as normalizeE164, i as getChatChannelMeta, l as requireActivePluginRegistry, n as CHAT_CHANNEL_ORDER } from "./registry-
|
|
3
|
-
import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, d as resolveSlackAccount, f as resolveSlackReplyToMode, l as resolveTelegramAccount } from "./plugins-
|
|
4
|
-
import { t as resolveWhatsAppAccount } from "./accounts-
|
|
5
|
-
import { t as resolveIMessageAccount } from "./accounts-
|
|
6
|
-
import { n as resolveSignalAccount } from "./accounts-
|
|
2
|
+
import { D as escapeRegExp, M as normalizeE164, i as getChatChannelMeta, l as requireActivePluginRegistry, n as CHAT_CHANNEL_ORDER } from "./registry-UkL38jvt.js";
|
|
3
|
+
import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, d as resolveSlackAccount, f as resolveSlackReplyToMode, l as resolveTelegramAccount } from "./plugins-Bkr5ZdYs.js";
|
|
4
|
+
import { t as resolveWhatsAppAccount } from "./accounts-D1r2dq1t.js";
|
|
5
|
+
import { t as resolveIMessageAccount } from "./accounts-dRUMQQrB.js";
|
|
6
|
+
import { n as resolveSignalAccount } from "./accounts-wSphH5gv.js";
|
|
7
7
|
|
|
8
8
|
//#region src/shared/string-normalization.ts
|
|
9
9
|
function normalizeStringEntries(list) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
2
|
-
import { i as getImageMetadata, n as buildImageResizeSideGrid, s as resizeToJpeg, t as IMAGE_REDUCE_QUALITY_STEPS } from "./image-ops-
|
|
1
|
+
import { t as createSubsystemLogger } from "./subsystem-DN75fnEF.js";
|
|
2
|
+
import { i as getImageMetadata, n as buildImageResizeSideGrid, s as resizeToJpeg, t as IMAGE_REDUCE_QUALITY_STEPS } from "./image-ops-M5agStZn.js";
|
|
3
3
|
|
|
4
4
|
//#region src/agents/image-sanitization.ts
|
|
5
5
|
const DEFAULT_IMAGE_MAX_DIMENSION_PX = 1200;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./paths-
|
|
2
|
-
import { W as isPlainObject } from "./registry-
|
|
3
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
1
|
+
import "./paths-CYmyCDsE.js";
|
|
2
|
+
import { W as isPlainObject } from "./registry-UkL38jvt.js";
|
|
3
|
+
import { t as createSubsystemLogger } from "./subsystem-DN75fnEF.js";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
|
|
6
6
|
//#region src/agents/tool-loop-detection.ts
|