@symerian/symi 2.4.4 → 2.5.1
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-Cf7lxbx4.js} +4 -4
- package/dist/{agents.config-BJhlUUzn.js → agents.config-CsltNAhl.js} +1 -1
- package/dist/{agents.config-DijsN6pE.js → agents.config-aAHTt-cM.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-CzrXJoq0.js → auth-choice-Cy78Q2jy.js} +1 -1
- package/dist/{auth-choice-CBrZeM8N.js → auth-choice-wU5fEl73.js} +1 -1
- package/dist/{banner-DBCyc2l3.js → banner-BRzyFiIY.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-BcCKOiwh.js} +1 -1
- package/dist/{channel-options-D4b4yiR3.js → channel-options-up8R2ST5.js} +1 -1
- package/dist/{channel-web-BxgOSVS3.js → channel-web-CrH0yvww.js} +1 -1
- package/dist/{channels-cli-DahG1tUQ.js → channels-cli-BiHu6J16.js} +4 -4
- package/dist/{channels-cli-CH8FgCHM.js → channels-cli-DG3sTlC7.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-BUkGaPzi.js} +1 -1
- package/dist/{cli-BG5jr57F.js → cli-YBkGYxfg.js} +1 -1
- package/dist/{command-registry-jAjzb3Ub.js → command-registry-YX9EbrJh.js} +9 -9
- package/dist/{completion-cli-zIGxgk1g.js → completion-cli-Cm8iWdRA.js} +2 -2
- package/dist/{completion-cli-C5YhoKGC.js → completion-cli-DZf03KrT.js} +1 -1
- package/dist/{config-cli-CPhmjH-O.js → config-cli-1PDMhq8v.js} +1 -1
- package/dist/{config-cli-3hyKITmM.js → config-cli-Dx3mtUwm.js} +1 -1
- package/dist/{configure-S9KIFkj-.js → configure-DKN7f4VI.js} +3 -3
- package/dist/{configure-C39-I7AH.js → configure-DZn4tz03.js} +3 -3
- package/dist/control-ui/js/render.js +4 -32
- 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--aLGEAgK.js} +1 -1
- package/dist/{doctor-completion-DjNFcAWO.js → doctor-completion-D4SLAoAE.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +6 -6
- package/dist/{gateway-cli-CptbhYJ1.js → gateway-cli-CMVvut5c.js} +11 -45
- package/dist/{gateway-cli-Bwd_To8f.js → gateway-cli-ZbqwB66o.js} +11 -45
- package/dist/{glass-ui-ws-B8ap5D2v.js → glass-ui-ws-Bg6ek2Vs.js} +7 -7
- package/dist/{glass-ui-ws-B4jT1ok5.js → glass-ui-ws-Cykb9Xv4.js} +7 -7
- package/dist/{health-DhqSQMPI.js → health-BMKu3MJz.js} +1 -1
- package/dist/{health-DCb7BG-3.js → health-CGoPVhko.js} +1 -1
- package/dist/{hooks-cli-DK2j2rIy.js → hooks-cli-CFtgfZBU.js} +2 -2
- package/dist/{hooks-cli-D5W9ERxc.js → hooks-cli-CQUjUbF8.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-BPJ5Z5tU.js} +2 -2
- package/dist/{models-cli-DNLCTKv1.js → models-cli-D9miPqtu.js} +2 -2
- package/dist/{models-cli-DLEKxIbC.js → models-cli-I7FIJUNa.js} +3 -3
- package/dist/{onboard-CYMyc_UX.js → onboard-BU6-iBln.js} +2 -2
- package/dist/{onboard-ey37IWby.js → onboard-CCZ5n-rI.js} +2 -2
- package/dist/{onboard-channels-BmoLkeU6.js → onboard-channels-B188R3F1.js} +1 -1
- package/dist/{onboard-channels-Dj_lMj0q.js → onboard-channels-CaRYhl9J.js} +1 -1
- package/dist/{onboarding-Dm9fej7n.js → onboarding-CNgU4kg8.js} +3 -3
- package/dist/{onboarding-DLyAGYc6.js → onboarding-Gsj-iMyY.js} +3 -3
- package/dist/{onboarding.finalize-csPp9wn_.js → onboarding.finalize-BvPgcu7R.js} +5 -5
- package/dist/{onboarding.finalize-CEBQJBqF.js → onboarding.finalize-C64KHESC.js} +6 -6
- package/dist/{pi-embedded-Lrmi4POJ.js → pi-embedded-DXSWVPEZ.js} +317 -115
- package/dist/{pi-embedded-BUYWm5p1.js → pi-embedded-RoXbo73e.js} +317 -115
- 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-ByLEBcK_.js} +1 -1
- package/dist/{plugin-registry-ChH5CJIw.js → plugin-registry-dNrBrnR0.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-Dn3ufSyq.js} +1 -1
- package/dist/plugin-sdk/index.js +2 -2
- package/dist/plugin-sdk/{reply-BIMkrLWh.js → reply-DqjPcp_q.js} +303 -101
- package/dist/plugin-sdk/{web-BsZ7_Dy0.js → web-GvAx9MMo.js} +2 -2
- package/dist/{plugins-cli-0PARfFDh.js → plugins-cli-BJRG_tkQ.js} +2 -2
- package/dist/{plugins-cli-CCMRc0SH.js → plugins-cli-DPaKpbZ0.js} +2 -2
- package/dist/{program-CTvCt90X.js → program-DCyh129g.js} +7 -7
- package/dist/{program-context-LQmFqAP2.js → program-context-27mCl36z.js} +17 -17
- package/dist/{prompt-select-styled-Dk4KU3bk.js → prompt-select-styled-JUdZMeZI.js} +4 -4
- package/dist/{prompt-select-styled-M1mZT6zR.js → prompt-select-styled-kpNeUDud.js} +4 -4
- package/dist/{provider-auth-helpers-CXq_C8eC.js → provider-auth-helpers-C9GRYN-o.js} +1 -1
- package/dist/{provider-auth-helpers-DM1hfi20.js → provider-auth-helpers-DyW_7UGQ.js} +1 -1
- package/dist/{push-apns-7t_aUx_g.js → push-apns-CZw1UMXk.js} +1 -1
- package/dist/{push-apns-D-D1fcAb.js → push-apns-DSpV-UMg.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-CWwXTRwB.js → register.agent-B7jOO00w.js} +5 -5
- package/dist/{register.agent-nABNjBav.js → register.agent-Dt-fGSRM.js} +6 -6
- package/dist/{register.configure-FljQTqAv.js → register.configure-B4ssKdGP.js} +6 -6
- package/dist/{register.configure-CV6utD3b.js → register.configure-BB1NVcZv.js} +6 -6
- package/dist/{register.maintenance-BxRP1viU.js → register.maintenance-B6JGjudV.js} +7 -7
- package/dist/{register.maintenance-CAACXueD.js → register.maintenance-ICQUl02l.js} +8 -8
- package/dist/{register.message-uz5SnsUO.js → register.message-B-hq0-gd.js} +2 -2
- package/dist/{register.message-D_Cc5Hcu.js → register.message-BEP0P-gF.js} +2 -2
- package/dist/{register.onboard-C8C1xEuj.js → register.onboard-CrgzRM5X.js} +4 -4
- package/dist/{register.onboard-BGsi8HVc.js → register.onboard-Dgsu5_C8.js} +4 -4
- package/dist/{register.setup-CyxXsD-4.js → register.setup-B3pPkZ-g.js} +4 -4
- package/dist/{register.setup-CbPytgHL.js → register.setup-C8xPuOMY.js} +4 -4
- package/dist/{register.status-health-sessions-B_BYvadL.js → register.status-health-sessions-DzM7DkCi.js} +3 -3
- package/dist/{register.status-health-sessions-DW422lcn.js → register.status-health-sessions-RqNzd4Pm.js} +3 -3
- package/dist/{register.subclis-DAEtHKAL.js → register.subclis-DcJgaLOK.js} +9 -9
- package/dist/{reply-BWno_mxL.js → reply-DiFKjgpz.js} +304 -102
- package/dist/{run-main-GCA3ZWtS.js → run-main-Ck0iMwKh.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-BgZzcT_t.js → server-methods-CBQha8Aw.js} +7 -7
- package/dist/{server-methods-C0qS1GBg.js → server-methods-pP1Q9SDn.js} +7 -7
- package/dist/{server-node-events-CCfQHLwH.js → server-node-events-CfY2QTYr.js} +2 -2
- package/dist/{server-node-events-BqTGMdx6.js → server-node-events-aW9AFIXA.js} +2 -2
- package/dist/{status-uaQ9lnOb.js → status-BKc593Qu.js} +1 -1
- package/dist/{status-C0ghzWRG.js → status-BNOqNwMY.js} +1 -1
- package/dist/{status-C_eTc_yp.js → status-DYp8kqmj.js} +2 -2
- package/dist/{status-BzeN5Od7.js → status-iwhTBXbZ.js} +2 -2
- package/dist/{subagent-registry-CtKDHowr.js → subagent-registry-yBrXpTO-.js} +304 -102
- package/dist/{update-cli-CYjjpmcv.js → update-cli-B8lS5-Z5.js} +8 -8
- package/dist/{update-cli-B2AkRDy-.js → update-cli-Cma87YH0.js} +7 -7
- package/dist/{update-runner-C71_pwI8.js → update-runner-Cx6XjioC.js} +1 -1
- package/dist/{update-runner-Co1TMSnd.js → update-runner-DZmjPgW-.js} +1 -1
- package/dist/{web-DOlZ2V8e.js → web-B9ciy43q.js} +6 -6
- package/dist/{web-YnBBOOGf.js → web-BWuN3c4n.js} +6 -6
- package/dist/{web-x4zdMRTu.js → web-C5liFFox.js} +1 -1
- package/dist/{web-DyULVUaV.js → web-CycbZoQb.js} +2 -2
- 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-C5liFFox.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-C5liFFox.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() {
|
|
@@ -69531,31 +69762,6 @@ function resolveToolLoopDetectionConfig(params) {
|
|
|
69531
69762
|
}
|
|
69532
69763
|
};
|
|
69533
69764
|
}
|
|
69534
|
-
/**
|
|
69535
|
-
* Wrap a tool to strip model-specific control tokens from string arguments
|
|
69536
|
-
* before execution. Gemma 4 via vLLM sometimes injects tokens like `<|`
|
|
69537
|
-
* into tool call arguments (e.g. `exec("<|node -v")`). This wrapper
|
|
69538
|
-
* sanitizes all string values in the argument object.
|
|
69539
|
-
*/
|
|
69540
|
-
function wrapToolWithArgSanitization(tool, modelId) {
|
|
69541
|
-
const execute = tool.execute;
|
|
69542
|
-
if (!execute) return tool;
|
|
69543
|
-
return {
|
|
69544
|
-
...tool,
|
|
69545
|
-
execute: async (toolCallId, params, signal, onUpdate) => {
|
|
69546
|
-
return execute(toolCallId, sanitizeToolArgs(params, modelId), signal, onUpdate);
|
|
69547
|
-
}
|
|
69548
|
-
};
|
|
69549
|
-
}
|
|
69550
|
-
function sanitizeToolArgs(params, modelId) {
|
|
69551
|
-
if (!params || typeof params !== "object") return typeof params === "string" ? stripModelTokensAggressive(params, modelId) : params;
|
|
69552
|
-
if (Array.isArray(params)) return params.map((item) => sanitizeToolArgs(item, modelId));
|
|
69553
|
-
const result = {};
|
|
69554
|
-
for (const [key, value] of Object.entries(params)) if (typeof value === "string") result[key] = stripModelTokensAggressive(value, modelId);
|
|
69555
|
-
else if (value && typeof value === "object") result[key] = sanitizeToolArgs(value, modelId);
|
|
69556
|
-
else result[key] = value;
|
|
69557
|
-
return result;
|
|
69558
|
-
}
|
|
69559
69765
|
function createSymiCodingTools(options) {
|
|
69560
69766
|
const execToolName = "exec";
|
|
69561
69767
|
const sandbox = options?.sandbox?.enabled ? options.sandbox : void 0;
|
|
@@ -69779,11 +69985,7 @@ function createSymiCodingTools(options) {
|
|
|
69779
69985
|
agentId
|
|
69780
69986
|
})
|
|
69781
69987
|
}));
|
|
69782
|
-
|
|
69783
|
-
const modelId = options?.modelId ?? "";
|
|
69784
|
-
const modelProvider = options?.modelProvider ?? "";
|
|
69785
|
-
const fullModelId = modelProvider ? `${modelProvider}/${modelId}` : modelId;
|
|
69786
|
-
return fullModelId ? withAbort.map((tool) => wrapToolWithArgSanitization(tool, fullModelId)) : withAbort;
|
|
69988
|
+
return options?.abortSignal ? withHooks.map((tool) => wrapToolWithAbortSignal(tool, options.abortSignal)) : withHooks;
|
|
69787
69989
|
}
|
|
69788
69990
|
|
|
69789
69991
|
//#endregion
|
|
@@ -72074,4 +72276,4 @@ function initSubagentRegistry() {
|
|
|
72074
72276
|
}
|
|
72075
72277
|
|
|
72076
72278
|
//#endregion
|
|
72077
|
-
export {
|
|
72279
|
+
export { getCliSessionId as $, resolveTtsAutoMode as $n, setPreRestartDeferralCheck as $t, getActiveEmbeddedRunCount as A, DEFAULT_INPUT_TIMEOUT_MS as An, normalizeOptionalSessionKey as At, buildHistoryContextFromEntries as B, resolveEnvelopeFormatOptions as Bn, buildSafeExternalPrompt as Bt, resolveAgentDeliveryPlan as C, enqueueSystemEvent as Cn, onAgentEvent as Cr, trimLogTail as Ct, createOutboundSendDeps$1 as D, DEFAULT_INPUT_IMAGE_MAX_BYTES as Dn, normalizeCronJobPatch as Dt, createDefaultDeps as E, peekSystemEvents as En, normalizeCronJobCreate as Et, loadAgentIdentityFromWorkspace as F, estimateBase64DecodedBytes as Fn, buildDeliveryFromLegacyPayload as Ft, dispatchInboundMessage as G, stopSubagentsForRequester as Gn, persistBrowserProxyFiles as Gt, shouldAckReactionForWhatsApp as H, hasControlCommand as Hn, getHookType as Ht, parseIdentityMarkdown as I, resolveAgentTimeoutMs as In, hasLegacyDeliveryHints as It, createDedupeCache as J, resolveUserTimezone as Jn, emitGatewayRestart as Jt, createReplyDispatcher as K, buildMentionRegexes as Kn, consumeGatewaySigusr1RestartAuthorization as Kt, buildPairingReply as L, createInboundDebouncer as Ln, stripLegacyDeliveryFields as Lt, resolveModelProfile as M, extractImageContentFromSource as Mn, normalizePayloadToSystemText as Mt, resolveAgentAvatar as N, normalizeMimeList as Nn, normalizeRequiredName as Nt, runEmbeddedPiAgent as O, DEFAULT_INPUT_IMAGE_MIMES as On, inferLegacyName as Ot, identityHasValues as P, resolveInputFileLimits as Pn, migrateLegacyCronPayload as Pt, resolveCronStyleNow as Q, resolveTtsApiKey as Qn, setGatewaySigusr1RestartPolicy as Qt, resolveMentionGating as R, resolveInboundDebounceMs as Rn, CHANNEL_TARGETS_DESCRIPTION as Rt, resolveSessionKeyForRequest as S, parseVerboseOverride as Sn, getAgentRunContext as Sr, summarizeRestartSentinel as St, createOutboundSendDeps as T, peekSystemEventEntries as Tn, normalizeHttpWebhookUrl as Tt, dispatchReplyWithBufferedBlockDispatcher as U, shouldComputeCommandAuthorized as Un, isExternalHookSession as Ut, recordPendingHistoryEntryIfEnabled as V, formatZonedTimestamp as Vn, detectSuspiciousPatterns as Vt, provider_dispatcher_exports as W, isAbortTrigger as Wn, applyBrowserProxyPaths as Wt, BARE_SESSION_RESET_PROMPT as X, isTtsEnabled as Xn, markGatewaySigusr1RestartHandled as Xt, getReplyFromConfig as Y, getTtsProvider as Yn, isGatewaySigusr1RestartExternallyAllowed as Yt, appendCronStyleCurrentTimeLine as Z, isTtsProviderConfigured as Zn, scheduleGatewaySigusr1Restart as Zt, readJsonBodyWithLimit as _, DEFAULT_OAUTH_WARN_MS as _n, isHeartbeatContentEffectivelyEmpty as _r, describeFailoverError as _t, listSubagentRunsForRequester as a, formatUsageWindowSummary as an, textToSpeech as ar, resolveAnnounceTargetFromKey as at, sleepWithAbort as b, applyModelOverrideToSessionEntry as bn, clearAgentRunContext as br, formatRestartSentinelMessage as bt, clearSessionQueues as c, buildChannelAccountSnapshot as cn, getActiveTaskCount as cr, resolveOutboundSessionRoute as ct, sniffMimeFromBase64 as d, requestHeartbeatNow as dn, resetAllLanes as dr, resolveOutboundTarget as dt, unbindThreadBindingsBySessionKey as en, resolveTtsConfig as er, setCliSessionId as et, getPluginToolMeta as f, setHeartbeatWakeHandler as fn, setCommandLaneConcurrency as fr, resolveSessionDeliveryTarget as ft, handleSlackHttpRequest as g, maskApiKey as gn, DEFAULT_HEARTBEAT_EVERY as gr, runWithModelFallback as gt, deleteTelegramUpdateOffset as h, resolveSendPolicy as hn, DEFAULT_HEARTBEAT_ACK_MAX_CHARS as hr, CHANNEL_MESSAGE_ACTION_NAMES as ht, listDescendantRunsForRequester as i, formatUsageReportLines as in, setTtsProvider as ir, readLatestAssistantReply as it, waitForEmbeddedPiRunEnd as j, extractFileContentFromSource as jn, normalizeOptionalText as jt, abortEmbeddedPiRun as k, DEFAULT_INPUT_MAX_REDIRECTS as kn, normalizeOptionalAgentId as kt, applyToolPolicyPipeline as l, formatChannelAllowFrom as ln, getQueueSize as lr, resolveHeartbeatDeliveryTarget as lt, loadSymiPlugins as m, normalizeSendPolicy as mn, CommandLane as mr, resetDirectoryCache as mt, countActiveRunsForSession as n, parseActivationCommand as nn, resolveTtsProviderOrder as nr, sha256HexPrefix as nt, subagent_registry_exports as o, resolveUsageProviderId as on, OPENAI_TTS_MODELS as or, runMessageAction as ot, createPluginLoaderLogger as p, resolveHeartbeatReasonKind as pn, waitForActiveTasks as pr, formatTargetDisplay as pt, getTotalPendingReplies as q, normalizeMentionText as qn, deferGatewayRestartUntilIdle as qt, initSubagentRegistry as r, loadProviderUsageSummary as rn, setTtsEnabled as rr, createSymiTools as rt, runSubagentAnnounceFlow as s, buildChannelSummary as sn, OPENAI_TTS_VOICES as sr, ensureOutboundSessionEntry as st, countActiveDescendantRuns as t, normalizeGroupActivation as tn, resolveTtsPrefsPath as tr, runCliAgent as tt, buildDefaultToolPolicyPipelineSteps as u, resolveCommitHash as un, getTotalQueueSize as ur, resolveHeartbeatSenderContext as ut, requestBodyErrorToText as v, buildAuthHealthSummary as vn, resolveHeartbeatPrompt as vr, consumeRestartSentinel as vt, resolveAgentOutboundTarget as w, isSystemEventContextChanged as wn, registerAgentRunContext as wr, writeRestartSentinel as wt, agentCommand as x, applyVerboseOverride as xn, emitAgentEvent as xr, readRestartSentinel as xt, computeBackoff as y, formatRemainingShort as yn, stripHeartbeatToken as yr, formatDoctorNonInteractiveHint as yt, DEFAULT_GROUP_HISTORY_LIMIT as z, formatInboundEnvelope as zn, CHANNEL_TARGET_DESCRIPTION as zt };
|
|
@@ -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 {
|
|
19
|
+
import { Ct as trimLogTail } from "./subagent-registry-yBrXpTO-.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-DcJgaLOK.js";
|
|
115
|
+
import "./command-registry-YX9EbrJh.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-Cm8iWdRA.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-CGoPVhko.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-Cx6XjioC.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-kpNeUDud.js";
|
|
139
|
+
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-D4SLAoAE.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,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-DiFKjgpz.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-27mCl36z.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-DZf03KrT.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-BMKu3MJz.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-DZmjPgW-.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-JUdZMeZI.js";
|
|
141
|
+
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion--aLGEAgK.js";
|
|
142
142
|
import os from "node:os";
|
|
143
143
|
import path from "node:path";
|
|
144
144
|
import fs from "node:fs/promises";
|
|
@@ -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 {
|
|
3
|
+
import { Ct as trimLogTail } from "./subagent-registry-yBrXpTO-.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-DiFKjgpz.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";
|