@symerian/symi 2.4.4 → 2.5.0
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/{agents-D0WIqYlR.js → agents-BEPfMqrg.js} +4 -4
- package/dist/{agents.config-DijsN6pE.js → agents.config-D60gMagv.js} +1 -1
- package/dist/{agents.config-BJhlUUzn.js → agents.config-DPv-AmZD.js} +1 -1
- package/dist/{audio-preflight-C40mKAp7.js → audio-preflight-CPBOQV4I.js} +4 -4
- package/dist/{audio-preflight-O3ASWbaG.js → audio-preflight-D02HwB-I.js} +4 -4
- package/dist/{auth-choice-CBrZeM8N.js → auth-choice-BeHaRQfM.js} +1 -1
- package/dist/{auth-choice-CzrXJoq0.js → auth-choice-CTeG2A5P.js} +1 -1
- package/dist/{banner-DBCyc2l3.js → banner-DihS8WHF.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +6 -6
- package/dist/bundled/session-memory/handler.js +6 -6
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-CcNcqLfp.js → channel-options-BJphNYiq.js} +1 -1
- package/dist/{channel-options-D4b4yiR3.js → channel-options-D2Zf6a2L.js} +1 -1
- package/dist/{channel-web-BxgOSVS3.js → channel-web-BnZ6c0_u.js} +1 -1
- package/dist/{channels-cli-CH8FgCHM.js → channels-cli-CF9LDCSC.js} +4 -4
- package/dist/{channels-cli-DahG1tUQ.js → channels-cli-COMko9mZ.js} +4 -4
- package/dist/{chrome-CDJYxX5a.js → chrome-D2SKJnR7.js} +7 -7
- package/dist/{chrome-BFekevcE.js → chrome-EyvdASWt.js} +7 -7
- package/dist/{cli-xjbQGnY4.js → cli-DXpAHJS4.js} +1 -1
- package/dist/{cli-BG5jr57F.js → cli-DYNTJxmZ.js} +1 -1
- package/dist/{command-registry-jAjzb3Ub.js → command-registry-X_FmrHib.js} +9 -9
- package/dist/{completion-cli-C5YhoKGC.js → completion-cli-D1aObtjM.js} +1 -1
- package/dist/{completion-cli-zIGxgk1g.js → completion-cli-Dhj0jCR_.js} +2 -2
- package/dist/{config-cli-3hyKITmM.js → config-cli-BDpBT1b-.js} +1 -1
- package/dist/{config-cli-CPhmjH-O.js → config-cli-BrmaXVj4.js} +1 -1
- package/dist/{configure-C39-I7AH.js → configure-CkCFJCKp.js} +3 -3
- package/dist/{configure-S9KIFkj-.js → configure-oMqP6jIk.js} +3 -3
- package/dist/{deliver-BH0l3UKW.js → deliver-C-37cZUe.js} +1 -1
- package/dist/{deliver-CvCK5Mm9.js → deliver-D1ZN6-fl.js} +1 -1
- package/dist/{doctor-completion-DMcB-j3Q.js → doctor-completion-vhqAoURB.js} +1 -1
- package/dist/{doctor-completion-DjNFcAWO.js → doctor-completion-wGoyzRH8.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +6 -6
- package/dist/{gateway-cli-CptbhYJ1.js → gateway-cli-BBPEwiAc.js} +9 -9
- package/dist/{gateway-cli-Bwd_To8f.js → gateway-cli-uDuGdJsH.js} +9 -9
- package/dist/{glass-ui-ws-B4jT1ok5.js → glass-ui-ws-DiqQflvy.js} +7 -7
- package/dist/{glass-ui-ws-B8ap5D2v.js → glass-ui-ws-TCkne4L4.js} +7 -7
- package/dist/{health-DhqSQMPI.js → health-1KsVR3eN.js} +1 -1
- package/dist/{health-DCb7BG-3.js → health-CPYlV7Zg.js} +1 -1
- package/dist/{hooks-cli-D5W9ERxc.js → hooks-cli-CL266d2E.js} +2 -2
- package/dist/{hooks-cli-DK2j2rIy.js → hooks-cli-PKy2h3eb.js} +2 -2
- package/dist/{image-B0wGflxA.js → image-Cp3JDEBB.js} +1 -1
- package/dist/{image-CHzdaNJ4.js → image-DcpMiprB.js} +1 -1
- package/dist/index.js +6 -6
- package/dist/llm-slug-generator.js +6 -6
- package/dist/{models-Bh86hVEJ.js → models-BsS_l1gY.js} +2 -2
- package/dist/{models-cli-DNLCTKv1.js → models-cli-CmR7k-2e.js} +2 -2
- package/dist/{models-cli-DLEKxIbC.js → models-cli-CvxkLybz.js} +3 -3
- package/dist/{onboard-CYMyc_UX.js → onboard-Bgo_BcMo.js} +2 -2
- package/dist/{onboard-ey37IWby.js → onboard-D2GpwLzg.js} +2 -2
- package/dist/{onboard-channels-Dj_lMj0q.js → onboard-channels-3WFDi7Ts.js} +1 -1
- package/dist/{onboard-channels-BmoLkeU6.js → onboard-channels-BNTeFCna.js} +1 -1
- package/dist/{onboarding-Dm9fej7n.js → onboarding-BUumoJYB.js} +3 -3
- package/dist/{onboarding-DLyAGYc6.js → onboarding-CbkyewZp.js} +3 -3
- package/dist/{onboarding.finalize-CEBQJBqF.js → onboarding.finalize-B2_mgA4K.js} +6 -6
- package/dist/{onboarding.finalize-csPp9wn_.js → onboarding.finalize-sESCY9Iq.js} +5 -5
- package/dist/{pi-embedded-Lrmi4POJ.js → pi-embedded-BIIdwXKr.js} +316 -85
- package/dist/{pi-embedded-BUYWm5p1.js → pi-embedded-BOF7XlCO.js} +316 -85
- package/dist/{pi-embedded-helpers-lgx_U5KS.js → pi-embedded-helpers-B8kqLWns.js} +4 -4
- package/dist/{pi-embedded-helpers-DLFjnVBb.js → pi-embedded-helpers-ag2bosuj.js} +4 -4
- package/dist/{plugin-registry-D1vzxXON.js → plugin-registry-BDfC2z-e.js} +1 -1
- package/dist/{plugin-registry-ChH5CJIw.js → plugin-registry-IXa-nyg0.js} +1 -1
- package/dist/plugin-sdk/agents/output-normalizer.d.ts +69 -0
- package/dist/plugin-sdk/{channel-web-DOZ-G9xX.js → channel-web-HznAZS1r.js} +1 -1
- package/dist/plugin-sdk/index.js +2 -2
- package/dist/plugin-sdk/{reply-BIMkrLWh.js → reply-DpnW-aMb.js} +302 -71
- package/dist/plugin-sdk/{web-BsZ7_Dy0.js → web-CGNEXRkp.js} +2 -2
- package/dist/{plugins-cli-CCMRc0SH.js → plugins-cli-DAxj0T7n.js} +2 -2
- package/dist/{plugins-cli-0PARfFDh.js → plugins-cli-DsYvb9az.js} +2 -2
- package/dist/{program-CTvCt90X.js → program-C_UFd0ph.js} +7 -7
- package/dist/{program-context-LQmFqAP2.js → program-context-C-1s9IMf.js} +17 -17
- package/dist/{prompt-select-styled-M1mZT6zR.js → prompt-select-styled-CYRG7OzR.js} +4 -4
- package/dist/{prompt-select-styled-Dk4KU3bk.js → prompt-select-styled-uEjL8GAK.js} +4 -4
- package/dist/{provider-auth-helpers-DM1hfi20.js → provider-auth-helpers-CJUiVhCt.js} +1 -1
- package/dist/{provider-auth-helpers-CXq_C8eC.js → provider-auth-helpers-CpOR6tLS.js} +1 -1
- package/dist/{push-apns-7t_aUx_g.js → push-apns-21LKYvkS.js} +1 -1
- package/dist/{push-apns-D-D1fcAb.js → push-apns-Ciljlk7J.js} +1 -1
- package/dist/{pw-ai-De-KR9_s.js → pw-ai-1htA-NnS.js} +1 -1
- package/dist/{pw-ai-BnAKvSuw.js → pw-ai-Ch7liUOW.js} +1 -1
- package/dist/{register.agent-nABNjBav.js → register.agent-BSv7WO-U.js} +6 -6
- package/dist/{register.agent-CWwXTRwB.js → register.agent-stsk6Gip.js} +5 -5
- package/dist/{register.configure-FljQTqAv.js → register.configure-C8oDtnaI.js} +6 -6
- package/dist/{register.configure-CV6utD3b.js → register.configure-DNQTd6SJ.js} +6 -6
- package/dist/{register.maintenance-BxRP1viU.js → register.maintenance-B3f3jkUo.js} +7 -7
- package/dist/{register.maintenance-CAACXueD.js → register.maintenance-dTI3y4Eh.js} +8 -8
- package/dist/{register.message-uz5SnsUO.js → register.message-Cbb4nH_0.js} +2 -2
- package/dist/{register.message-D_Cc5Hcu.js → register.message-K9BDeFyy.js} +2 -2
- package/dist/{register.onboard-BGsi8HVc.js → register.onboard-BBfmwa3j.js} +4 -4
- package/dist/{register.onboard-C8C1xEuj.js → register.onboard-Djz7Di9K.js} +4 -4
- package/dist/{register.setup-CbPytgHL.js → register.setup-B6hkCLH0.js} +4 -4
- package/dist/{register.setup-CyxXsD-4.js → register.setup-Dmu1jt3n.js} +4 -4
- package/dist/{register.status-health-sessions-DW422lcn.js → register.status-health-sessions-CvwhBkbb.js} +3 -3
- package/dist/{register.status-health-sessions-B_BYvadL.js → register.status-health-sessions-DaSrMm3l.js} +3 -3
- package/dist/{register.subclis-DAEtHKAL.js → register.subclis-Dv1WM9Kj.js} +9 -9
- package/dist/{reply-BWno_mxL.js → reply-BvVsPU7v.js} +303 -72
- package/dist/{run-main-GCA3ZWtS.js → run-main-55CDVAv6.js} +14 -14
- package/dist/{runner-DUBExAb5.js → runner-BcQ0sF9T.js} +1 -1
- package/dist/{runner-odEv83vv.js → runner-D0QUGA_X.js} +1 -1
- package/dist/{server-methods-C0qS1GBg.js → server-methods-Bf8SpXoW.js} +7 -7
- package/dist/{server-methods-BgZzcT_t.js → server-methods-CDDLS3ke.js} +7 -7
- package/dist/{server-node-events-BqTGMdx6.js → server-node-events-B9iZK3qE.js} +2 -2
- package/dist/{server-node-events-CCfQHLwH.js → server-node-events-Dx0L419d.js} +2 -2
- package/dist/{status-uaQ9lnOb.js → status-5XgxbiNb.js} +1 -1
- package/dist/{status-C0ghzWRG.js → status-C-kU0UFm.js} +1 -1
- package/dist/{status-BzeN5Od7.js → status-C-vthqzQ.js} +2 -2
- package/dist/{status-C_eTc_yp.js → status-DEymUALi.js} +2 -2
- package/dist/{subagent-registry-CtKDHowr.js → subagent-registry-CZah-77E.js} +303 -72
- package/dist/{update-cli-B2AkRDy-.js → update-cli-B21iNb0v.js} +7 -7
- package/dist/{update-cli-CYjjpmcv.js → update-cli-BSk-OFnI.js} +8 -8
- package/dist/{update-runner-C71_pwI8.js → update-runner-B5bKK21U.js} +1 -1
- package/dist/{update-runner-Co1TMSnd.js → update-runner-DPwXk0QQ.js} +1 -1
- package/dist/{web-DyULVUaV.js → web-CB23XCVF.js} +2 -2
- package/dist/{web-YnBBOOGf.js → web-DSgWG_2m.js} +6 -6
- package/dist/{web-DOlZ2V8e.js → web-DVvZ_mDC.js} +6 -6
- package/dist/{web-x4zdMRTu.js → web-mkZpWfVs.js} +1 -1
- package/package.json +1 -1
|
@@ -104,7 +104,7 @@ import JSON5 from "json5";
|
|
|
104
104
|
import { inspect } from "node:util";
|
|
105
105
|
import fs$1 from "node:fs/promises";
|
|
106
106
|
import { fileURLToPath } from "node:url";
|
|
107
|
-
import { complete, completeSimple, streamSimple } from "@mariozechner/pi-ai";
|
|
107
|
+
import { complete, completeSimple, createAssistantMessageEventStream, streamSimple } from "@mariozechner/pi-ai";
|
|
108
108
|
import crypto, { createHash, createHmac, randomBytes, randomUUID } from "node:crypto";
|
|
109
109
|
import { CURRENT_SESSION_VERSION, DefaultResourceLoader, SessionManager, SettingsManager, codingTools, createAgentSession, createEditTool, createReadTool, createWriteTool, estimateTokens, generateSummary, readTool } from "@mariozechner/pi-coding-agent";
|
|
110
110
|
import WebSocket from "ws";
|
|
@@ -44696,6 +44696,199 @@ function createCacheTrace(params) {
|
|
|
44696
44696
|
};
|
|
44697
44697
|
}
|
|
44698
44698
|
|
|
44699
|
+
//#endregion
|
|
44700
|
+
//#region src/agents/model-token-filter.ts
|
|
44701
|
+
/**
|
|
44702
|
+
* Strips model-specific control tokens from streamed text.
|
|
44703
|
+
*
|
|
44704
|
+
* Used both server-side (in the streaming pipeline) and by the Glass UI
|
|
44705
|
+
* (as a defense-in-depth fallback). The patterns here cover tokens known
|
|
44706
|
+
* to leak from Gemma 4 / vLLM; Claude output is left untouched.
|
|
44707
|
+
*/
|
|
44708
|
+
const GEMMA_TOKEN_PATTERNS = [
|
|
44709
|
+
/<\|channel>\w*/g,
|
|
44710
|
+
/<channel\|>/g,
|
|
44711
|
+
/<start_of_turn>(?:model|user)?/g,
|
|
44712
|
+
/<end_of_turn>/g,
|
|
44713
|
+
/<\|(?:fim_prefix|fim_suffix|fim_middle)\|>/g,
|
|
44714
|
+
/^\s*<bos>\s*/gm,
|
|
44715
|
+
/<\|[^|>]{0,30}\|>/g,
|
|
44716
|
+
/<\|[^>]{0,30}>/g
|
|
44717
|
+
];
|
|
44718
|
+
/**
|
|
44719
|
+
* Aggressively strip all fragments of model control token corruption from
|
|
44720
|
+
* tool arguments. This catches cases where the model produces raw garbage
|
|
44721
|
+
* like `<|<|"|<|<|\'` that doesn't match any known token template.
|
|
44722
|
+
*/
|
|
44723
|
+
const AGGRESSIVE_TOKEN_FRAGMENTS = [/<\|/g, /\|>/g];
|
|
44724
|
+
const GEMMA_MODEL_HINTS$1 = ["gemma", "redsand/"];
|
|
44725
|
+
function isGemmaModel$1(modelId) {
|
|
44726
|
+
const lower = modelId.toLowerCase();
|
|
44727
|
+
return GEMMA_MODEL_HINTS$1.some((hint) => lower.includes(hint));
|
|
44728
|
+
}
|
|
44729
|
+
/**
|
|
44730
|
+
* Strip known control tokens from text. Only applies to Gemma-family models;
|
|
44731
|
+
* other models pass through unchanged.
|
|
44732
|
+
*/
|
|
44733
|
+
/**
|
|
44734
|
+
* Strip known control tokens from text. Only applies to Gemma-family models;
|
|
44735
|
+
* other models pass through unchanged. Used for streamed text output.
|
|
44736
|
+
*/
|
|
44737
|
+
function stripModelTokens(text, modelId) {
|
|
44738
|
+
if (!text || !isGemmaModel$1(modelId)) return text;
|
|
44739
|
+
let result = text;
|
|
44740
|
+
for (const re of GEMMA_TOKEN_PATTERNS) {
|
|
44741
|
+
re.lastIndex = 0;
|
|
44742
|
+
result = result.replace(re, "");
|
|
44743
|
+
}
|
|
44744
|
+
return result;
|
|
44745
|
+
}
|
|
44746
|
+
/**
|
|
44747
|
+
* Aggressively strip ALL token-like fragments from a string. Used for tool
|
|
44748
|
+
* call arguments where any `<|` corruption causes downstream failures.
|
|
44749
|
+
* More aggressive than `stripModelTokens` — removes bare `<|` and `|>` fragments
|
|
44750
|
+
* that don't match any known token template.
|
|
44751
|
+
*/
|
|
44752
|
+
function stripModelTokensAggressive(text, modelId) {
|
|
44753
|
+
if (!text || !isGemmaModel$1(modelId)) return text;
|
|
44754
|
+
let result = stripModelTokens(text, modelId);
|
|
44755
|
+
for (const re of AGGRESSIVE_TOKEN_FRAGMENTS) {
|
|
44756
|
+
re.lastIndex = 0;
|
|
44757
|
+
result = result.replace(re, "");
|
|
44758
|
+
}
|
|
44759
|
+
return result;
|
|
44760
|
+
}
|
|
44761
|
+
|
|
44762
|
+
//#endregion
|
|
44763
|
+
//#region src/agents/output-normalizer.ts
|
|
44764
|
+
const MONOLOGUE_REGEX_PATTERNS = [
|
|
44765
|
+
/\n*I have addressed the request fully\.?\s*(?:\n[\s\S]*)?$/,
|
|
44766
|
+
/\n*I[''\u2019]ve reviewed my response[\s\S]*$/,
|
|
44767
|
+
/\n*\*?\*?Verification:?\*?\*?\s*\n[\s\S]*?(?:Everything is correct|All requirements met)\.?\s*\u2705?\s*$/,
|
|
44768
|
+
/\n*\d+\.\s*\*?\*?Requirements:?\*?\*?[\s\S]*?\d+\.\s*\*?\*?Verification:?\*?\*?[\s\S]*$/
|
|
44769
|
+
];
|
|
44770
|
+
const SELF_REF_OPENERS = [
|
|
44771
|
+
"i have addressed",
|
|
44772
|
+
"i've reviewed",
|
|
44773
|
+
"i‘ve reviewed",
|
|
44774
|
+
"i’ve reviewed",
|
|
44775
|
+
"status check",
|
|
44776
|
+
"address requirements",
|
|
44777
|
+
"verification:",
|
|
44778
|
+
"requirements:"
|
|
44779
|
+
];
|
|
44780
|
+
const ASSESSMENT_KEYWORDS = [
|
|
44781
|
+
"requirements",
|
|
44782
|
+
"verification",
|
|
44783
|
+
"correct",
|
|
44784
|
+
"addressed",
|
|
44785
|
+
"fulfilled",
|
|
44786
|
+
"confirmed",
|
|
44787
|
+
"passed"
|
|
44788
|
+
];
|
|
44789
|
+
/**
|
|
44790
|
+
* Layer 2: Structural monologue detection.
|
|
44791
|
+
* Detects a trailing block that:
|
|
44792
|
+
* 1. Starts after a double newline
|
|
44793
|
+
* 2. Opens with a self-referential phrase
|
|
44794
|
+
* 3. Contains a numbered list with assessment keywords
|
|
44795
|
+
* 4. Sits at the end of the text
|
|
44796
|
+
*/
|
|
44797
|
+
function detectMonologueStructural(text) {
|
|
44798
|
+
let searchFrom = Math.floor(text.length * .15);
|
|
44799
|
+
while (searchFrom < text.length) {
|
|
44800
|
+
const breakPos = text.indexOf("\n\n", searchFrom);
|
|
44801
|
+
if (breakPos < 0) return null;
|
|
44802
|
+
const trailingBlock = text.slice(breakPos).toLowerCase();
|
|
44803
|
+
if (!SELF_REF_OPENERS.some((opener) => trailingBlock.includes(opener))) {
|
|
44804
|
+
searchFrom = breakPos + 2;
|
|
44805
|
+
continue;
|
|
44806
|
+
}
|
|
44807
|
+
const hasNumberedList = /\d+\.\s/.test(trailingBlock);
|
|
44808
|
+
const hasBoldHeaders = /\*\*\w/.test(trailingBlock);
|
|
44809
|
+
if (!hasNumberedList && !hasBoldHeaders) {
|
|
44810
|
+
searchFrom = breakPos + 2;
|
|
44811
|
+
continue;
|
|
44812
|
+
}
|
|
44813
|
+
if (ASSESSMENT_KEYWORDS.filter((kw) => trailingBlock.includes(kw)).length < 2) {
|
|
44814
|
+
searchFrom = breakPos + 2;
|
|
44815
|
+
continue;
|
|
44816
|
+
}
|
|
44817
|
+
return breakPos;
|
|
44818
|
+
}
|
|
44819
|
+
return null;
|
|
44820
|
+
}
|
|
44821
|
+
/**
|
|
44822
|
+
* Strip monologue from final text using the hierarchy:
|
|
44823
|
+
* Layer 2 (structural) first, Layer 3 (regex) as fallback.
|
|
44824
|
+
* Layer 1 (prompt tuning) happens before the model produces output.
|
|
44825
|
+
*/
|
|
44826
|
+
function stripMonologue(text) {
|
|
44827
|
+
const structuralCut = detectMonologueStructural(text);
|
|
44828
|
+
if (structuralCut !== null) {
|
|
44829
|
+
const cleaned = text.slice(0, structuralCut).trim();
|
|
44830
|
+
if (cleaned) return cleaned;
|
|
44831
|
+
}
|
|
44832
|
+
for (const pattern of MONOLOGUE_REGEX_PATTERNS) {
|
|
44833
|
+
const result = text.replace(pattern, "");
|
|
44834
|
+
if (result !== text && result.trim()) return result.trim();
|
|
44835
|
+
}
|
|
44836
|
+
return text;
|
|
44837
|
+
}
|
|
44838
|
+
const DEFAULT_REPETITION_MIN_BLOCK = 150;
|
|
44839
|
+
function detectRepetition(text, minBlock) {
|
|
44840
|
+
if (text.length < minBlock * 2.5) return false;
|
|
44841
|
+
const sampleStart = Math.floor(text.length * .25);
|
|
44842
|
+
const sample = text.slice(sampleStart, sampleStart + minBlock);
|
|
44843
|
+
const searchStart = sampleStart + minBlock;
|
|
44844
|
+
return text.indexOf(sample, searchStart) >= 0;
|
|
44845
|
+
}
|
|
44846
|
+
function sanitizeArgs(args, modelId) {
|
|
44847
|
+
const result = {};
|
|
44848
|
+
for (const [key, value] of Object.entries(args)) if (typeof value === "string") result[key] = stripModelTokensAggressive(value, modelId);
|
|
44849
|
+
else if (Array.isArray(value)) result[key] = value.map((item) => typeof item === "string" ? stripModelTokensAggressive(item, modelId) : item && typeof item === "object" ? sanitizeArgs(item, modelId) : item);
|
|
44850
|
+
else if (value && typeof value === "object") result[key] = sanitizeArgs(value, modelId);
|
|
44851
|
+
else result[key] = value;
|
|
44852
|
+
return result;
|
|
44853
|
+
}
|
|
44854
|
+
/**
|
|
44855
|
+
* Create an output normalizer configured for the given model profile.
|
|
44856
|
+
*
|
|
44857
|
+
* For Claude: passthrough (no stripping, no monologue, no aggressive cleaning).
|
|
44858
|
+
* For Gemma/vLLM: full normalization pipeline.
|
|
44859
|
+
* For unknown: conservative defaults.
|
|
44860
|
+
*/
|
|
44861
|
+
function createOutputNormalizer(profile, modelId) {
|
|
44862
|
+
const isGemma = isGemmaModel$1(modelId);
|
|
44863
|
+
const shouldStrip = isGemma || profile.filters.stripPatterns.length > 0;
|
|
44864
|
+
const shouldSuppressMonologue = profile.filters.suppressMonologue;
|
|
44865
|
+
let accumulated = "";
|
|
44866
|
+
return {
|
|
44867
|
+
normalizeTextDelta(delta) {
|
|
44868
|
+
const text = shouldStrip ? stripModelTokens(delta, modelId) : delta;
|
|
44869
|
+
accumulated += text;
|
|
44870
|
+
if (detectRepetition(accumulated, DEFAULT_REPETITION_MIN_BLOCK)) return {
|
|
44871
|
+
text,
|
|
44872
|
+
abort: { reason: "repetition-detected" }
|
|
44873
|
+
};
|
|
44874
|
+
return { text };
|
|
44875
|
+
},
|
|
44876
|
+
normalizeToolArgs(args) {
|
|
44877
|
+
if (!isGemma) return args;
|
|
44878
|
+
return sanitizeArgs(args, modelId);
|
|
44879
|
+
},
|
|
44880
|
+
normalizeFinalText(text) {
|
|
44881
|
+
let result = text;
|
|
44882
|
+
if (shouldStrip) result = stripModelTokens(result, modelId);
|
|
44883
|
+
if (shouldSuppressMonologue) result = stripMonologue(result);
|
|
44884
|
+
return result.trim();
|
|
44885
|
+
},
|
|
44886
|
+
reset() {
|
|
44887
|
+
accumulated = "";
|
|
44888
|
+
}
|
|
44889
|
+
};
|
|
44890
|
+
}
|
|
44891
|
+
|
|
44699
44892
|
//#endregion
|
|
44700
44893
|
//#region src/agents/model-aware-stream.ts
|
|
44701
44894
|
/**
|
|
@@ -44707,6 +44900,7 @@ function createCacheTrace(params) {
|
|
|
44707
44900
|
*/
|
|
44708
44901
|
function createModelAwareStreamFn(opts) {
|
|
44709
44902
|
const underlying = opts.baseStreamFn ?? streamSimple;
|
|
44903
|
+
const fullModelId = opts.provider ? `${opts.provider}/${opts.modelId}` : opts.modelId;
|
|
44710
44904
|
const mergedParams = {
|
|
44711
44905
|
...opts.profile.params,
|
|
44712
44906
|
...opts.configExtraParams,
|
|
@@ -44743,9 +44937,11 @@ function createModelAwareStreamFn(opts) {
|
|
|
44743
44937
|
}
|
|
44744
44938
|
callerOnPayload?.(payload);
|
|
44745
44939
|
};
|
|
44940
|
+
const normalizer = createOutputNormalizer(opts.profile, fullModelId);
|
|
44746
44941
|
return (model, context, options) => {
|
|
44747
44942
|
const callerOnPayload = options?.onPayload;
|
|
44748
|
-
|
|
44943
|
+
normalizer.reset();
|
|
44944
|
+
const streamOrPromise = underlying(model, context, {
|
|
44749
44945
|
...nativeOpts,
|
|
44750
44946
|
...options,
|
|
44751
44947
|
onPayload: (payload) => onPayloadHook(payload, callerOnPayload),
|
|
@@ -44754,8 +44950,106 @@ function createModelAwareStreamFn(opts) {
|
|
|
44754
44950
|
...options?.headers
|
|
44755
44951
|
} } : {}
|
|
44756
44952
|
});
|
|
44953
|
+
if (streamOrPromise instanceof Promise) return streamOrPromise.then((s) => wrapStreamWithNormalizer(s, normalizer));
|
|
44954
|
+
return wrapStreamWithNormalizer(streamOrPromise, normalizer);
|
|
44757
44955
|
};
|
|
44758
44956
|
}
|
|
44957
|
+
/**
|
|
44958
|
+
* Wrap an AssistantMessageEventStream to intercept and normalize events:
|
|
44959
|
+
* - text_delta: strip tokens, detect repetition
|
|
44960
|
+
* - toolcall_end: sanitize tool call arguments
|
|
44961
|
+
* - done: normalize final message text
|
|
44962
|
+
*/
|
|
44963
|
+
function wrapStreamWithNormalizer(rawStream, normalizer) {
|
|
44964
|
+
const normalized = createAssistantMessageEventStream();
|
|
44965
|
+
(async () => {
|
|
44966
|
+
try {
|
|
44967
|
+
for await (const event of rawStream) {
|
|
44968
|
+
const processed = normalizeEvent(event, normalizer);
|
|
44969
|
+
if (processed.abort) {
|
|
44970
|
+
normalized.push({
|
|
44971
|
+
type: "error",
|
|
44972
|
+
reason: "aborted",
|
|
44973
|
+
errorMessage: `output-normalizer: ${processed.abort.reason}`,
|
|
44974
|
+
usage: {
|
|
44975
|
+
input: 0,
|
|
44976
|
+
output: 0
|
|
44977
|
+
}
|
|
44978
|
+
});
|
|
44979
|
+
break;
|
|
44980
|
+
}
|
|
44981
|
+
normalized.push(processed.event);
|
|
44982
|
+
}
|
|
44983
|
+
} catch (err) {
|
|
44984
|
+
normalized.push({
|
|
44985
|
+
type: "error",
|
|
44986
|
+
reason: "error",
|
|
44987
|
+
errorMessage: err instanceof Error ? err.message : String(err),
|
|
44988
|
+
usage: {
|
|
44989
|
+
input: 0,
|
|
44990
|
+
output: 0
|
|
44991
|
+
}
|
|
44992
|
+
});
|
|
44993
|
+
}
|
|
44994
|
+
})();
|
|
44995
|
+
return normalized;
|
|
44996
|
+
}
|
|
44997
|
+
function normalizeEvent(event, normalizer) {
|
|
44998
|
+
if (event.type === "text_delta") {
|
|
44999
|
+
const result = normalizer.normalizeTextDelta(event.delta);
|
|
45000
|
+
if (result.abort) return {
|
|
45001
|
+
event,
|
|
45002
|
+
abort: result.abort
|
|
45003
|
+
};
|
|
45004
|
+
if (result.text !== event.delta) return { event: {
|
|
45005
|
+
...event,
|
|
45006
|
+
delta: result.text
|
|
45007
|
+
} };
|
|
45008
|
+
return { event };
|
|
45009
|
+
}
|
|
45010
|
+
if (event.type === "toolcall_end" && event.toolCall) {
|
|
45011
|
+
const tc = event.toolCall;
|
|
45012
|
+
if (tc.arguments && typeof tc.arguments === "object") {
|
|
45013
|
+
const cleanedArgs = normalizer.normalizeToolArgs(tc.arguments);
|
|
45014
|
+
return { event: {
|
|
45015
|
+
...event,
|
|
45016
|
+
toolCall: {
|
|
45017
|
+
...tc,
|
|
45018
|
+
arguments: cleanedArgs
|
|
45019
|
+
}
|
|
45020
|
+
} };
|
|
45021
|
+
}
|
|
45022
|
+
return { event };
|
|
45023
|
+
}
|
|
45024
|
+
if (event.type === "done" && event.message) {
|
|
45025
|
+
const msg = event.message;
|
|
45026
|
+
if (Array.isArray(msg.content)) {
|
|
45027
|
+
let changed = false;
|
|
45028
|
+
const normalizedContent = msg.content.map((block) => {
|
|
45029
|
+
if (block.type === "text" && "text" in block) {
|
|
45030
|
+
const cleaned = normalizer.normalizeFinalText(block.text);
|
|
45031
|
+
if (cleaned !== block.text) {
|
|
45032
|
+
changed = true;
|
|
45033
|
+
return {
|
|
45034
|
+
...block,
|
|
45035
|
+
text: cleaned
|
|
45036
|
+
};
|
|
45037
|
+
}
|
|
45038
|
+
}
|
|
45039
|
+
return block;
|
|
45040
|
+
});
|
|
45041
|
+
if (changed) return { event: {
|
|
45042
|
+
...event,
|
|
45043
|
+
message: {
|
|
45044
|
+
...msg,
|
|
45045
|
+
content: normalizedContent
|
|
45046
|
+
}
|
|
45047
|
+
} };
|
|
45048
|
+
}
|
|
45049
|
+
return { event };
|
|
45050
|
+
}
|
|
45051
|
+
return { event };
|
|
45052
|
+
}
|
|
44759
45053
|
/** Detect vLLM/Gemma providers by model hints or baseUrl patterns. */
|
|
44760
45054
|
function isVllmProvider(provider, modelId, config) {
|
|
44761
45055
|
const lower = `${provider}/${modelId}`.toLowerCase();
|
|
@@ -47817,7 +48111,7 @@ function resolveSymipulseMs(opts) {
|
|
|
47817
48111
|
|
|
47818
48112
|
//#endregion
|
|
47819
48113
|
//#region src/agents/transcript-policy.ts
|
|
47820
|
-
const GEMMA_MODEL_HINTS
|
|
48114
|
+
const GEMMA_MODEL_HINTS = ["gemma", "redsand/"];
|
|
47821
48115
|
const MISTRAL_MODEL_HINTS = [
|
|
47822
48116
|
"mistral",
|
|
47823
48117
|
"mixtral",
|
|
@@ -47846,11 +48140,11 @@ function isAnthropicApi(modelApi, provider) {
|
|
|
47846
48140
|
if (modelApi === "anthropic-messages") return true;
|
|
47847
48141
|
return normalizeProviderId(provider ?? "") === "anthropic";
|
|
47848
48142
|
}
|
|
47849
|
-
function isGemmaModel
|
|
48143
|
+
function isGemmaModel(params) {
|
|
47850
48144
|
if (normalizeProviderId(params.provider ?? "") === "redsand") return true;
|
|
47851
48145
|
const modelId = (params.modelId ?? "").toLowerCase();
|
|
47852
48146
|
if (!modelId) return false;
|
|
47853
|
-
return GEMMA_MODEL_HINTS
|
|
48147
|
+
return GEMMA_MODEL_HINTS.some((hint) => modelId.includes(hint));
|
|
47854
48148
|
}
|
|
47855
48149
|
function isMistralModel(params) {
|
|
47856
48150
|
if (normalizeProviderId(params.provider ?? "") === "mistral") return true;
|
|
@@ -47868,7 +48162,7 @@ function resolveTranscriptPolicy(params) {
|
|
|
47868
48162
|
provider,
|
|
47869
48163
|
modelId
|
|
47870
48164
|
});
|
|
47871
|
-
const isGemma = isGemmaModel
|
|
48165
|
+
const isGemma = isGemmaModel({
|
|
47872
48166
|
provider,
|
|
47873
48167
|
modelId
|
|
47874
48168
|
});
|
|
@@ -52329,7 +52623,7 @@ async function runAgentTurn(params) {
|
|
|
52329
52623
|
function createDefaultDeps() {
|
|
52330
52624
|
return {
|
|
52331
52625
|
sendMessageWhatsApp: async (...args) => {
|
|
52332
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
52626
|
+
const { sendMessageWhatsApp } = await import("./web-mkZpWfVs.js");
|
|
52333
52627
|
return await sendMessageWhatsApp(...args);
|
|
52334
52628
|
},
|
|
52335
52629
|
sendMessageTelegram: async (...args) => {
|
|
@@ -67643,7 +67937,7 @@ function loadWebLoginQr() {
|
|
|
67643
67937
|
return webLoginQrPromise;
|
|
67644
67938
|
}
|
|
67645
67939
|
function loadWebChannel() {
|
|
67646
|
-
webChannelPromise ??= import("./web-
|
|
67940
|
+
webChannelPromise ??= import("./web-mkZpWfVs.js");
|
|
67647
67941
|
return webChannelPromise;
|
|
67648
67942
|
}
|
|
67649
67943
|
function loadWhatsAppActions() {
|
|
@@ -68861,69 +69155,6 @@ function parseUpdateFileChunk(lines, lineNumber, allowMissingContext) {
|
|
|
68861
69155
|
};
|
|
68862
69156
|
}
|
|
68863
69157
|
|
|
68864
|
-
//#endregion
|
|
68865
|
-
//#region src/agents/model-token-filter.ts
|
|
68866
|
-
/**
|
|
68867
|
-
* Strips model-specific control tokens from streamed text.
|
|
68868
|
-
*
|
|
68869
|
-
* Used both server-side (in the streaming pipeline) and by the Glass UI
|
|
68870
|
-
* (as a defense-in-depth fallback). The patterns here cover tokens known
|
|
68871
|
-
* to leak from Gemma 4 / vLLM; Claude output is left untouched.
|
|
68872
|
-
*/
|
|
68873
|
-
const GEMMA_TOKEN_PATTERNS = [
|
|
68874
|
-
/<\|channel>\w*/g,
|
|
68875
|
-
/<channel\|>/g,
|
|
68876
|
-
/<start_of_turn>(?:model|user)?/g,
|
|
68877
|
-
/<end_of_turn>/g,
|
|
68878
|
-
/<\|(?:fim_prefix|fim_suffix|fim_middle)\|>/g,
|
|
68879
|
-
/^\s*<bos>\s*/gm,
|
|
68880
|
-
/<\|[^|>]{0,30}\|>/g,
|
|
68881
|
-
/<\|[^>]{0,30}>/g
|
|
68882
|
-
];
|
|
68883
|
-
/**
|
|
68884
|
-
* Aggressively strip all fragments of model control token corruption from
|
|
68885
|
-
* tool arguments. This catches cases where the model produces raw garbage
|
|
68886
|
-
* like `<|<|"|<|<|\'` that doesn't match any known token template.
|
|
68887
|
-
*/
|
|
68888
|
-
const AGGRESSIVE_TOKEN_FRAGMENTS = [/<\|/g, /\|>/g];
|
|
68889
|
-
const GEMMA_MODEL_HINTS = ["gemma", "redsand/"];
|
|
68890
|
-
function isGemmaModel(modelId) {
|
|
68891
|
-
const lower = modelId.toLowerCase();
|
|
68892
|
-
return GEMMA_MODEL_HINTS.some((hint) => lower.includes(hint));
|
|
68893
|
-
}
|
|
68894
|
-
/**
|
|
68895
|
-
* Strip known control tokens from text. Only applies to Gemma-family models;
|
|
68896
|
-
* other models pass through unchanged.
|
|
68897
|
-
*/
|
|
68898
|
-
/**
|
|
68899
|
-
* Strip known control tokens from text. Only applies to Gemma-family models;
|
|
68900
|
-
* other models pass through unchanged. Used for streamed text output.
|
|
68901
|
-
*/
|
|
68902
|
-
function stripModelTokens(text, modelId) {
|
|
68903
|
-
if (!text || !isGemmaModel(modelId)) return text;
|
|
68904
|
-
let result = text;
|
|
68905
|
-
for (const re of GEMMA_TOKEN_PATTERNS) {
|
|
68906
|
-
re.lastIndex = 0;
|
|
68907
|
-
result = result.replace(re, "");
|
|
68908
|
-
}
|
|
68909
|
-
return result;
|
|
68910
|
-
}
|
|
68911
|
-
/**
|
|
68912
|
-
* Aggressively strip ALL token-like fragments from a string. Used for tool
|
|
68913
|
-
* call arguments where any `<|` corruption causes downstream failures.
|
|
68914
|
-
* More aggressive than `stripModelTokens` — removes bare `<|` and `|>` fragments
|
|
68915
|
-
* that don't match any known token template.
|
|
68916
|
-
*/
|
|
68917
|
-
function stripModelTokensAggressive(text, modelId) {
|
|
68918
|
-
if (!text || !isGemmaModel(modelId)) return text;
|
|
68919
|
-
let result = stripModelTokens(text, modelId);
|
|
68920
|
-
for (const re of AGGRESSIVE_TOKEN_FRAGMENTS) {
|
|
68921
|
-
re.lastIndex = 0;
|
|
68922
|
-
result = result.replace(re, "");
|
|
68923
|
-
}
|
|
68924
|
-
return result;
|
|
68925
|
-
}
|
|
68926
|
-
|
|
68927
69158
|
//#endregion
|
|
68928
69159
|
//#region src/agents/pi-tools.abort.ts
|
|
68929
69160
|
function throwAbortError() {
|
|
@@ -72074,4 +72305,4 @@ function initSubagentRegistry() {
|
|
|
72074
72305
|
}
|
|
72075
72306
|
|
|
72076
72307
|
//#endregion
|
|
72077
|
-
export { resolveCronStyleNow as $, resolveTtsApiKey as $n, setGatewaySigusr1RestartPolicy as $t,
|
|
72308
|
+
export { resolveCronStyleNow as $, resolveTtsApiKey as $n, setGatewaySigusr1RestartPolicy as $t, getActiveEmbeddedRunCount as A, DEFAULT_INPUT_MAX_REDIRECTS as An, normalizeOptionalAgentId as At, DEFAULT_GROUP_HISTORY_LIMIT as B, formatInboundEnvelope as Bn, CHANNEL_TARGET_DESCRIPTION as Bt, resolveAgentDeliveryPlan as C, parseVerboseOverride as Cn, getAgentRunContext as Cr, summarizeRestartSentinel as Ct, createOutboundSendDeps$1 as D, peekSystemEvents as Dn, normalizeCronJobCreate as Dt, createDefaultDeps as E, peekSystemEventEntries as En, normalizeHttpWebhookUrl as Et, identityHasValues as F, resolveInputFileLimits as Fn, migrateLegacyCronPayload as Ft, provider_dispatcher_exports as G, isAbortTrigger as Gn, applyBrowserProxyPaths as Gt, recordPendingHistoryEntryIfEnabled as H, formatZonedTimestamp as Hn, detectSuspiciousPatterns as Ht, loadAgentIdentityFromWorkspace as I, estimateBase64DecodedBytes as In, buildDeliveryFromLegacyPayload as It, getTotalPendingReplies as J, normalizeMentionText as Jn, deferGatewayRestartUntilIdle as Jt, dispatchInboundMessage as K, stopSubagentsForRequester as Kn, persistBrowserProxyFiles as Kt, parseIdentityMarkdown as L, resolveAgentTimeoutMs as Ln, hasLegacyDeliveryHints as Lt, stripModelTokens as M, extractFileContentFromSource as Mn, normalizeOptionalText as Mt, resolveModelProfile as N, extractImageContentFromSource as Nn, normalizePayloadToSystemText as Nt, runEmbeddedPiAgent as O, DEFAULT_INPUT_IMAGE_MAX_BYTES as On, normalizeCronJobPatch as Ot, resolveAgentAvatar as P, normalizeMimeList as Pn, normalizeRequiredName as Pt, appendCronStyleCurrentTimeLine as Q, isTtsProviderConfigured as Qn, scheduleGatewaySigusr1Restart as Qt, buildPairingReply as R, createInboundDebouncer as Rn, stripLegacyDeliveryFields as Rt, resolveSessionKeyForRequest as S, applyVerboseOverride as Sn, emitAgentEvent as Sr, readRestartSentinel as St, createOutboundSendDeps as T, isSystemEventContextChanged as Tn, registerAgentRunContext as Tr, writeRestartSentinel as Tt, shouldAckReactionForWhatsApp as U, hasControlCommand as Un, getHookType as Ut, buildHistoryContextFromEntries as V, resolveEnvelopeFormatOptions as Vn, buildSafeExternalPrompt as Vt, dispatchReplyWithBufferedBlockDispatcher as W, shouldComputeCommandAuthorized as Wn, isExternalHookSession as Wt, getReplyFromConfig as X, getTtsProvider as Xn, isGatewaySigusr1RestartExternallyAllowed as Xt, createDedupeCache as Y, resolveUserTimezone as Yn, emitGatewayRestart as Yt, BARE_SESSION_RESET_PROMPT as Z, isTtsEnabled as Zn, markGatewaySigusr1RestartHandled as Zt, readJsonBodyWithLimit as _, maskApiKey as _n, DEFAULT_HEARTBEAT_EVERY as _r, runWithModelFallback as _t, listSubagentRunsForRequester as a, formatUsageReportLines as an, setTtsProvider as ar, readLatestAssistantReply as at, sleepWithAbort as b, formatRemainingShort as bn, stripHeartbeatToken as br, formatDoctorNonInteractiveHint as bt, clearSessionQueues as c, buildChannelSummary as cn, OPENAI_TTS_VOICES as cr, ensureOutboundSessionEntry as ct, sniffMimeFromBase64 as d, resolveCommitHash as dn, getTotalQueueSize as dr, resolveHeartbeatSenderContext as dt, setPreRestartDeferralCheck as en, resolveTtsAutoMode as er, getCliSessionId as et, getPluginToolMeta as f, requestHeartbeatNow as fn, resetAllLanes as fr, resolveOutboundTarget as ft, handleSlackHttpRequest as g, resolveSendPolicy as gn, DEFAULT_HEARTBEAT_ACK_MAX_CHARS as gr, CHANNEL_MESSAGE_ACTION_NAMES as gt, deleteTelegramUpdateOffset as h, normalizeSendPolicy as hn, CommandLane as hr, resetDirectoryCache as ht, listDescendantRunsForRequester as i, loadProviderUsageSummary as in, setTtsEnabled as ir, createSymiTools as it, waitForEmbeddedPiRunEnd as j, DEFAULT_INPUT_TIMEOUT_MS as jn, normalizeOptionalSessionKey as jt, abortEmbeddedPiRun as k, DEFAULT_INPUT_IMAGE_MIMES as kn, inferLegacyName as kt, applyToolPolicyPipeline as l, buildChannelAccountSnapshot as ln, getActiveTaskCount as lr, resolveOutboundSessionRoute as lt, loadSymiPlugins as m, resolveHeartbeatReasonKind as mn, waitForActiveTasks as mr, formatTargetDisplay as mt, countActiveRunsForSession as n, normalizeGroupActivation as nn, resolveTtsPrefsPath as nr, runCliAgent as nt, subagent_registry_exports as o, formatUsageWindowSummary as on, textToSpeech as or, resolveAnnounceTargetFromKey as ot, createPluginLoaderLogger as p, setHeartbeatWakeHandler as pn, setCommandLaneConcurrency as pr, resolveSessionDeliveryTarget as pt, createReplyDispatcher as q, buildMentionRegexes as qn, consumeGatewaySigusr1RestartAuthorization as qt, initSubagentRegistry as r, parseActivationCommand as rn, resolveTtsProviderOrder as rr, sha256HexPrefix as rt, runSubagentAnnounceFlow as s, resolveUsageProviderId as sn, OPENAI_TTS_MODELS as sr, runMessageAction as st, countActiveDescendantRuns as t, unbindThreadBindingsBySessionKey as tn, resolveTtsConfig as tr, setCliSessionId as tt, buildDefaultToolPolicyPipelineSteps as u, formatChannelAllowFrom as un, getQueueSize as ur, resolveHeartbeatDeliveryTarget as ut, requestBodyErrorToText as v, DEFAULT_OAUTH_WARN_MS as vn, isHeartbeatContentEffectivelyEmpty as vr, describeFailoverError as vt, resolveAgentOutboundTarget as w, enqueueSystemEvent as wn, onAgentEvent as wr, trimLogTail as wt, agentCommand as x, applyModelOverrideToSessionEntry as xn, clearAgentRunContext as xr, formatRestartSentinelMessage as xt, computeBackoff as y, buildAuthHealthSummary as yn, resolveHeartbeatPrompt as yr, consumeRestartSentinel as yt, resolveMentionGating as z, resolveInboundDebounceMs as zn, CHANNEL_TARGETS_DESCRIPTION as zt };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { g as resolveStateDir } from "./paths-Cqn-zk3M.js";
|
|
2
2
|
import { B as theme, h as pathExists } from "./utils-B-0b9bGM.js";
|
|
3
3
|
import "./thinking-EAliFiVK.js";
|
|
4
|
-
import { V as trimLogTail } from "./reply-
|
|
4
|
+
import { V as trimLogTail } from "./reply-BvVsPU7v.js";
|
|
5
5
|
import { t as resolveSymiPackageRoot } from "./symi-root-CrGJbkzf.js";
|
|
6
6
|
import "./registry-Cja8eT7G.js";
|
|
7
7
|
import { f as defaultRuntime } from "./subsystem-D9vIQve0.js";
|
|
@@ -106,7 +106,7 @@ import "./stagger-BUClb97_.js";
|
|
|
106
106
|
import { c as resolveGatewayLaunchAgentLabel, d as resolveGatewaySystemdServiceName, f as resolveGatewayWindowsTaskName } from "./constants-C8_BLnaW.js";
|
|
107
107
|
import "./channel-selection-DuWs0Aak.js";
|
|
108
108
|
import { r as parseSemver } from "./runtime-guard-B37eizu-.js";
|
|
109
|
-
import "./program-context-
|
|
109
|
+
import "./program-context-C-1s9IMf.js";
|
|
110
110
|
import "./catalog-RiADx7MA.js";
|
|
111
111
|
import "./skills-status-CURJKnyY.js";
|
|
112
112
|
import { n as inheritOptionFromParent } from "./command-options-BtDai3oC.js";
|
|
@@ -117,7 +117,7 @@ import "./npm-registry-spec-C2JDdSZS.js";
|
|
|
117
117
|
import "./skill-scanner-CLs8u6vQ.js";
|
|
118
118
|
import "./installs-C1Cebk97.js";
|
|
119
119
|
import "./channels-status-issues-B_kBkl_u.js";
|
|
120
|
-
import { r as installCompletion } from "./completion-cli-
|
|
120
|
+
import { r as installCompletion } from "./completion-cli-D1aObtjM.js";
|
|
121
121
|
import "./daemon-runtime-2mwX-jqj.js";
|
|
122
122
|
import "./systemd-riq8uNJQ.js";
|
|
123
123
|
import { t as resolveGatewayService } from "./service-Cl74hx8J.js";
|
|
@@ -126,19 +126,19 @@ import "./systemd-hints-BR6gChwm.js";
|
|
|
126
126
|
import { i as runDaemonInstall, r as runDaemonRestart } from "./daemon-cli-DscwlsKW.js";
|
|
127
127
|
import "./diagnostics-BAMlsVVX.js";
|
|
128
128
|
import { t as renderTable } from "./table-BTgkRafz.js";
|
|
129
|
-
import "./health-
|
|
129
|
+
import "./health-1KsVR3eN.js";
|
|
130
130
|
import "./control-ui-assets-Z947tKLt.js";
|
|
131
131
|
import { a as resolveNpmChannelTag, c as DEFAULT_PACKAGE_CHANNEL, d as formatUpdateChannelLabel, g as resolveUpdateChannelDisplay, h as resolveEffectiveUpdateChannel, m as normalizeUpdateChannel, n as compareSemverStrings, r as fetchNpmTagVersion, s as DEFAULT_GIT_CHANNEL, t as checkUpdateStatus, u as channelToNpmTag } from "./update-check-CtckACbb.js";
|
|
132
132
|
import "./dm-policy-shared-Bh3TbexU.js";
|
|
133
133
|
import { i as resolveUpdateAvailability, n as formatUpdateOneLiner, t as formatUpdateAvailableHint } from "./status.update-DtwCUTf-.js";
|
|
134
|
-
import { a as globalInstallArgs, c as readPackageVersion, i as detectGlobalInstallManagerForRoot, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as readPackageName, t as runGatewayUpdate } from "./update-runner-
|
|
134
|
+
import { a as globalInstallArgs, c as readPackageVersion, i as detectGlobalInstallManagerForRoot, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as readPackageName, t as runGatewayUpdate } from "./update-runner-DPwXk0QQ.js";
|
|
135
135
|
import "./logging-BzzwiKjv.js";
|
|
136
136
|
import { n as updateNpmInstalledPlugins, t as syncPluginsForUpdateChannel } from "./update-rw7wJwHd.js";
|
|
137
137
|
import "./doctor-config-flow-QnaBd8kL.js";
|
|
138
138
|
import "./systemd-linger-aQ75ZlXY.js";
|
|
139
139
|
import "./health-format-DSwnXZPU.js";
|
|
140
|
-
import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-
|
|
141
|
-
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-
|
|
140
|
+
import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-uEjL8GAK.js";
|
|
141
|
+
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-vhqAoURB.js";
|
|
142
142
|
import os from "node:os";
|
|
143
143
|
import path from "node:path";
|
|
144
144
|
import fs from "node:fs/promises";
|
|
@@ -16,7 +16,7 @@ import "./client-DMBZpU6X.js";
|
|
|
16
16
|
import "./call-BcE47FtD.js";
|
|
17
17
|
import "./message-channel-C9dERklz.js";
|
|
18
18
|
import "./pairing-token-Byh6drgn.js";
|
|
19
|
-
import { wt as trimLogTail } from "./subagent-registry-
|
|
19
|
+
import { wt as trimLogTail } from "./subagent-registry-CZah-77E.js";
|
|
20
20
|
import "./sessions-CJXnZVjR.js";
|
|
21
21
|
import "./tokens-Csntmwwn.js";
|
|
22
22
|
import "./plugins-CwSlLxM8.js";
|
|
@@ -111,10 +111,10 @@ import "./npm-registry-spec-DkaZNHAW.js";
|
|
|
111
111
|
import "./skill-scanner-BGWOBqLY.js";
|
|
112
112
|
import "./installs-CgQpVncj.js";
|
|
113
113
|
import "./channels-status-issues-c7qZbYG5.js";
|
|
114
|
-
import "./register.subclis-
|
|
115
|
-
import "./command-registry-
|
|
114
|
+
import "./register.subclis-Dv1WM9Kj.js";
|
|
115
|
+
import "./command-registry-X_FmrHib.js";
|
|
116
116
|
import "./program-context-CqzR_m-7.js";
|
|
117
|
-
import { r as installCompletion } from "./completion-cli-
|
|
117
|
+
import { r as installCompletion } from "./completion-cli-Dhj0jCR_.js";
|
|
118
118
|
import "./daemon-runtime-CfRwa6qh.js";
|
|
119
119
|
import { r as parseSemver } from "./runtime-guard-D7waq_Ho.js";
|
|
120
120
|
import "./systemd-DlMdyFDY.js";
|
|
@@ -124,19 +124,19 @@ import "./systemd-hints-sQipWGd1.js";
|
|
|
124
124
|
import { i as runDaemonInstall, r as runDaemonRestart } from "./daemon-cli-wWnBIQtk.js";
|
|
125
125
|
import "./diagnostics-CS1ov_hH.js";
|
|
126
126
|
import { t as renderTable } from "./table-D01d2GuY.js";
|
|
127
|
-
import "./health-
|
|
127
|
+
import "./health-CPYlV7Zg.js";
|
|
128
128
|
import "./control-ui-assets-BseSWee1.js";
|
|
129
129
|
import { a as resolveNpmChannelTag, c as DEFAULT_PACKAGE_CHANNEL, d as formatUpdateChannelLabel, g as resolveUpdateChannelDisplay, h as resolveEffectiveUpdateChannel, m as normalizeUpdateChannel, n as compareSemverStrings, r as fetchNpmTagVersion, s as DEFAULT_GIT_CHANNEL, t as checkUpdateStatus, u as channelToNpmTag } from "./update-check-ZdimP1aU.js";
|
|
130
130
|
import "./dm-policy-shared-DJ-61hCT.js";
|
|
131
131
|
import { i as resolveUpdateAvailability, n as formatUpdateOneLiner, t as formatUpdateAvailableHint } from "./status.update-DbmZz0Aq.js";
|
|
132
|
-
import { a as globalInstallArgs, c as readPackageVersion, i as detectGlobalInstallManagerForRoot, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as readPackageName, t as runGatewayUpdate } from "./update-runner-
|
|
132
|
+
import { a as globalInstallArgs, c as readPackageVersion, i as detectGlobalInstallManagerForRoot, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as readPackageName, t as runGatewayUpdate } from "./update-runner-B5bKK21U.js";
|
|
133
133
|
import "./logging-BGewRZy0.js";
|
|
134
134
|
import { n as updateNpmInstalledPlugins, t as syncPluginsForUpdateChannel } from "./update-DEMKx4eC.js";
|
|
135
135
|
import "./doctor-config-flow-CA3eiKhd.js";
|
|
136
136
|
import "./systemd-linger-DA_LW52P.js";
|
|
137
137
|
import "./health-format-CzgUHmmX.js";
|
|
138
|
-
import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-
|
|
139
|
-
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-
|
|
138
|
+
import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-CYRG7OzR.js";
|
|
139
|
+
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-wGoyzRH8.js";
|
|
140
140
|
import { spawn, spawnSync } from "node:child_process";
|
|
141
141
|
import os from "node:os";
|
|
142
142
|
import path from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { nt as pathExists } from "./entry.js";
|
|
2
2
|
import { t as runCommandWithTimeout } from "./exec-CBKBIMpA.js";
|
|
3
|
-
import { wt as trimLogTail } from "./subagent-registry-
|
|
3
|
+
import { wt as trimLogTail } from "./subagent-registry-CZah-77E.js";
|
|
4
4
|
import { n as resolveControlUiDistIndexHealth, r as resolveControlUiDistIndexPathForRoot } from "./control-ui-assets-BseSWee1.js";
|
|
5
5
|
import { c as DEFAULT_PACKAGE_CHANNEL, f as isBetaTag, l as DEV_BRANCH, n as compareSemverStrings, o as detectPackageManager$1, p as isStableTag, u as channelToNpmTag } from "./update-check-ZdimP1aU.js";
|
|
6
6
|
import os from "node:os";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as pathExists } from "./utils-B-0b9bGM.js";
|
|
2
|
-
import { V as trimLogTail } from "./reply-
|
|
2
|
+
import { V as trimLogTail } from "./reply-BvVsPU7v.js";
|
|
3
3
|
import { t as runCommandWithTimeout } from "./exec-CWkblSrI.js";
|
|
4
4
|
import { n as resolveControlUiDistIndexHealth, r as resolveControlUiDistIndexPathForRoot } from "./control-ui-assets-Z947tKLt.js";
|
|
5
5
|
import { c as DEFAULT_PACKAGE_CHANNEL, f as isBetaTag, l as DEV_BRANCH, n as compareSemverStrings, o as detectPackageManager$1, p as isStableTag, u as channelToNpmTag } from "./update-check-CtckACbb.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./paths-Cqn-zk3M.js";
|
|
2
2
|
import "./utils-B-0b9bGM.js";
|
|
3
3
|
import "./thinking-EAliFiVK.js";
|
|
4
|
-
import "./reply-
|
|
4
|
+
import "./reply-BvVsPU7v.js";
|
|
5
5
|
import "./registry-Cja8eT7G.js";
|
|
6
6
|
import "./subsystem-D9vIQve0.js";
|
|
7
7
|
import "./exec-CWkblSrI.js";
|
|
@@ -101,7 +101,7 @@ import "./pi-tools.policy-CIDBbw6x.js";
|
|
|
101
101
|
import "./control-service-Bz7rxLWq.js";
|
|
102
102
|
import "./stagger-BUClb97_.js";
|
|
103
103
|
import "./channel-selection-DuWs0Aak.js";
|
|
104
|
-
import { n as monitorWebInbox, t as monitorWebChannel } from "./channel-web-
|
|
104
|
+
import { n as monitorWebInbox, t as monitorWebChannel } from "./channel-web-BnZ6c0_u.js";
|
|
105
105
|
import { n as sendMessageWhatsApp } from "./outbound-DB5Zus0-.js";
|
|
106
106
|
import { i as waitForWaConnection, t as createWaSocket } from "./session-DIBTkyvE.js";
|
|
107
107
|
import { t as loginWeb } from "./login-dIlDkG4X.js";
|
|
@@ -5,7 +5,7 @@ import "./agent-scope-BxoUQqgM.js";
|
|
|
5
5
|
import { r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-Bs9YvKLa.js";
|
|
6
6
|
import "./workspace-wAaHI8-5.js";
|
|
7
7
|
import "./tokens-H1H1LiSQ.js";
|
|
8
|
-
import { C as resolveEnvelopeFormatOptions, D as normalizeMentionText, E as buildMentionRegexes, S as formatInboundEnvelope, T as shouldComputeCommandAuthorized, _ as parseActivationCommand, b as createInboundDebouncer, c as DEFAULT_GROUP_HISTORY_LIMIT, d as shouldAckReactionForWhatsApp, f as dispatchReplyWithBufferedBlockDispatcher, g as normalizeGroupActivation, h as getReplyFromConfig, l as buildHistoryContextFromEntries, m as createDedupeCache, n as sleepWithAbort, o as buildPairingReply, s as resolveMentionGating, t as computeBackoff, u as recordPendingHistoryEntryIfEnabled, v as formatDurationPrecise, w as hasControlCommand, x as resolveInboundDebounceMs, y as enqueueSystemEvent } from "./pi-embedded-
|
|
8
|
+
import { C as resolveEnvelopeFormatOptions, D as normalizeMentionText, E as buildMentionRegexes, S as formatInboundEnvelope, T as shouldComputeCommandAuthorized, _ as parseActivationCommand, b as createInboundDebouncer, c as DEFAULT_GROUP_HISTORY_LIMIT, d as shouldAckReactionForWhatsApp, f as dispatchReplyWithBufferedBlockDispatcher, g as normalizeGroupActivation, h as getReplyFromConfig, l as buildHistoryContextFromEntries, m as createDedupeCache, n as sleepWithAbort, o as buildPairingReply, s as resolveMentionGating, t as computeBackoff, u as recordPendingHistoryEntryIfEnabled, v as formatDurationPrecise, w as hasControlCommand, x as resolveInboundDebounceMs, y as enqueueSystemEvent } from "./pi-embedded-BIIdwXKr.js";
|
|
9
9
|
import "./plugins-DQYI3Fr-.js";
|
|
10
10
|
import { i as logWebSelfId, l as readWebSelfId, n as WA_WEB_AUTH_DIR, p as webAuthExists, r as getWebAuthAgeMs, s as pickWebChannel, t as resolveWhatsAppAccount } from "./accounts-tNElYrCH.js";
|
|
11
11
|
import "./boolean-B8-BqKGQ.js";
|
|
@@ -13,7 +13,7 @@ import { t as formatCliCommand } from "./command-format-BaxDnULz.js";
|
|
|
13
13
|
import "./bindings-B7Ke6LJi.js";
|
|
14
14
|
import "./send-DeFniOjh.js";
|
|
15
15
|
import "./send-CiTGOvEc.js";
|
|
16
|
-
import "./deliver-
|
|
16
|
+
import "./deliver-D1ZN6-fl.js";
|
|
17
17
|
import "./diagnostic-CI0kRQkt.js";
|
|
18
18
|
import "./diagnostic-session-state-Bxo4UHOL.js";
|
|
19
19
|
import "./accounts-CWktKM8a.js";
|
|
@@ -23,10 +23,10 @@ import "./model-auth-DK43VicI.js";
|
|
|
23
23
|
import "./github-copilot-token-C_qUP7p5.js";
|
|
24
24
|
import "./pi-model-discovery-DaNAekda.js";
|
|
25
25
|
import "./message-channel-Dz5lr5b0.js";
|
|
26
|
-
import { Ct as resolveGroupSessionKey, G as updateLastRoute, H as loadSessionStore, U as readSessionUpdatedAt, W as recordSessionMetaFromInbound } from "./pi-embedded-helpers-
|
|
26
|
+
import { Ct as resolveGroupSessionKey, G as updateLastRoute, H as loadSessionStore, U as readSessionUpdatedAt, W as recordSessionMetaFromInbound } from "./pi-embedded-helpers-ag2bosuj.js";
|
|
27
27
|
import { n as loadConfig } from "./config-DRbjHIwD.js";
|
|
28
28
|
import "./manifest-registry-D0IQ3WuX.js";
|
|
29
|
-
import "./chrome-
|
|
29
|
+
import "./chrome-EyvdASWt.js";
|
|
30
30
|
import "./frontmatter-C_bv_0P8.js";
|
|
31
31
|
import "./skills-BFekKL7i.js";
|
|
32
32
|
import "./redact-jSxx6Ep2.js";
|
|
@@ -37,7 +37,7 @@ import { h as resolveChannelGroupRequireMention, m as resolveChannelGroupPolicy
|
|
|
37
37
|
import "./accounts-qtxJ-6em.js";
|
|
38
38
|
import { s as resolveStorePath } from "./paths-DLyHUt31.js";
|
|
39
39
|
import "./tool-images-DXB7tqWi.js";
|
|
40
|
-
import "./image-
|
|
40
|
+
import "./image-Cp3JDEBB.js";
|
|
41
41
|
import { c as resolveIdentityNamePrefix, l as resolveMessagePrefix, t as createReplyPrefixOptions } from "./reply-prefix-XlyuyChD.js";
|
|
42
42
|
import "./manager-D_LwXbc6.js";
|
|
43
43
|
import "./gemini-auth-CdSPHuLl.js";
|
|
@@ -52,7 +52,7 @@ import "./render-CDCvpfhh.js";
|
|
|
52
52
|
import "./commands-registry-D7CTCQPm.js";
|
|
53
53
|
import "./skill-commands-BJMb_psG.js";
|
|
54
54
|
import { t as finalizeInboundContext } from "./inbound-context-BlHX0H3E.js";
|
|
55
|
-
import { p as registerUnhandledRejectionHandler } from "./runner-
|
|
55
|
+
import { p as registerUnhandledRejectionHandler } from "./runner-D0QUGA_X.js";
|
|
56
56
|
import "./fetch-Bso4i15F.js";
|
|
57
57
|
import { n as recordChannelActivity } from "./channel-activity-CsM_hJ_s.js";
|
|
58
58
|
import { t as convertMarkdownTables } from "./tables-DuZspiBu.js";
|