@fased/fased 0.1.57 → 0.1.59
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/anthropic-payload-policy.js +188 -0
- package/dist/agents/anthropic-transport-stream.js +736 -0
- package/dist/agents/copilot-dynamic-headers.js +1 -1
- package/dist/agents/current-model-catalog.js +5 -2
- package/dist/agents/custom-api-registry.js +21 -0
- package/dist/agents/google-transport-stream.js +543 -0
- package/dist/agents/model-catalog-status.js +6 -1
- package/dist/agents/models-config.js +2 -1
- package/dist/agents/openai-completions-compat.js +49 -0
- package/dist/agents/openai-responses-payload-policy.js +100 -0
- package/dist/agents/openai-tool-schema.js +130 -0
- package/dist/agents/openai-transport-stream.js +1040 -0
- package/dist/agents/pi-embedded-runner/compact.js +9 -0
- package/dist/agents/pi-embedded-runner/run/attempt.js +9 -0
- package/dist/agents/pi-embedded-runner/session-manager-init.js +5 -20
- package/dist/agents/provider-extension-catalog-manifest.js +2 -2
- package/dist/agents/provider-request-config.js +1 -1
- package/dist/agents/provider-stream.js +29 -0
- package/dist/agents/provider-transport-fetch.js +89 -0
- package/dist/agents/provider-transport-stream.js +72 -0
- package/dist/agents/system-prompt-cache-boundary.js +1 -1
- package/dist/agents/system-prompt.js +1 -1
- package/dist/agents/transport-message-transform.js +143 -0
- package/dist/agents/transport-stream-shared.js +81 -0
- package/dist/brand.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/channels/delivery.js +78 -0
- package/dist/channels/plugins/catalog.js +10 -5
- package/dist/cli/components-cli.js +16 -13
- package/dist/cli/program/register.subclis.js +9 -0
- package/dist/cli/providers-cli.js +79 -6
- package/dist/cli/services-cli.js +28 -0
- package/dist/commands/auth-choice.js +1 -1
- package/dist/commands/models/list.auth-overview.js +12 -0
- package/dist/commands/onboard-channels.js +5 -0
- package/dist/commands/onboard-helpers.js +1 -1
- package/dist/commands/vllm-setup.js +12 -3
- package/dist/control-ui/assets/{app-DltSyY4Y.js → app-S_jg-ADS.js} +1706 -1675
- package/dist/control-ui/assets/{index-D5JlBp7f.js → index-C22rDOFm.js} +3 -3
- package/dist/control-ui/assets/{providers-Cc89iMdx.js → providers-QMn4w2_f.js} +3 -3
- package/dist/control-ui/index.html +1 -1
- package/dist/control-ui/version.json +1 -1
- package/dist/gateway/control-reply-text.js +10 -1
- package/dist/gateway/method-scopes.js +2 -0
- package/dist/gateway/protocol/schema/agents-models-skills.js +1 -0
- package/dist/gateway/server-chat.js +3 -3
- package/dist/gateway/server-methods/channels.js +10 -2
- package/dist/gateway/server-methods/chat.js +19 -12
- package/dist/gateway/server-methods/models.js +4 -0
- package/dist/gateway/server-methods/services.js +47 -2
- package/dist/gateway/server-methods-list.js +2 -0
- package/dist/gateway/session-event-payloads.js +20 -9
- package/dist/infra/google-api-base-url.js +29 -0
- package/dist/plugin-sdk/{accounts-CmMwe9Dt.js → accounts-DxblobYM.js} +1 -1
- package/dist/plugin-sdk/{actions-DYViFQiX.js → actions-D4UNimWa.js} +2 -2
- package/dist/plugin-sdk/{active-listener-DVbpcisf.js → active-listener-CFuy106s.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-D-Mfay8i.js → audio-preflight-CxZixyhW.js} +25 -25
- package/dist/plugin-sdk/{audit-JImYFOzJ.js → audit-Cs0K7LBp.js} +1 -1
- package/dist/plugin-sdk/{channel-access-cxCK2mci.js → channel-access-D5aHoTY8.js} +1 -1
- package/dist/plugin-sdk/{channel-access-configure-B_qYjml8.js → channel-access-configure-Dvch9mMQ.js} +1 -1
- package/dist/plugin-sdk/channel-plugin-common.d.ts +2 -2
- package/dist/plugin-sdk/channel-plugin-common.js +4 -4
- package/dist/plugin-sdk/{chunk-CF8nvZNj.js → chunk-B0FUGc5A.js} +1 -1
- package/dist/plugin-sdk/{chunk-items-yLFoO571.js → chunk-items-Cy9a3X7x.js} +1 -1
- package/dist/plugin-sdk/command-status.js +25 -25
- package/dist/plugin-sdk/{commands-registry-CK4KmMG0.js → commands-registry-DmDRhRAU.js} +2 -2
- package/dist/plugin-sdk/{common-Cky4hpqr.js → common-CfUOowOp.js} +1 -1
- package/dist/plugin-sdk/{config-Dbxj_jUP.js → config-mxULv0fQ.js} +4 -1
- package/dist/plugin-sdk/{config-schema-aKPMn6ML.js → config-schema-D8E0LX8X.js} +4422 -486
- package/dist/plugin-sdk/device-pair.d.ts +1 -1
- package/dist/plugin-sdk/discord.d.ts +4 -4
- package/dist/plugin-sdk/discord.js +19 -19
- package/dist/plugin-sdk/{handle-action-BSNDD2Vc.js → handle-action-DbVCF9HZ.js} +13 -13
- package/dist/plugin-sdk/{helpers-CDo2XBSr.js → helpers-BXbdgs5H.js} +1 -1
- package/dist/plugin-sdk/{image-ops-DbeBxbn4.js → image-ops-D7jPxaph.js} +1 -1
- package/dist/plugin-sdk/index.d.ts +15 -15
- package/dist/plugin-sdk/index.js +27 -27
- package/dist/plugin-sdk/{login-CWXvFTd8.js → login-BRxww6nv.js} +3 -3
- package/dist/plugin-sdk/{login-qr-CJB2zjmM.js → login-qr-DJXsk9XH.js} +3 -3
- package/dist/plugin-sdk/{manager-CbiFFLKS.js → manager-Y2S_5IlI.js} +2 -2
- package/dist/plugin-sdk/{markdown-tables-Bskt9r8i.js → markdown-tables-DHLFQqaF.js} +1 -1
- package/dist/plugin-sdk/{media-B3aAg5rh.js → media-Czo4carg.js} +2 -2
- package/dist/plugin-sdk/{monitor-BYGbTI5V.js → monitor-CFHFAUOj.js} +32 -32
- package/dist/plugin-sdk/{monitor-BJs6z7AT.js → monitor-xS9A8Upr.js} +29 -29
- package/dist/plugin-sdk/ollama-runtime.js +970 -0
- package/dist/plugin-sdk/{openresponses-http-BGCl2dS2.js → openresponses-http-BcUbeVV6.js} +25 -25
- package/dist/plugin-sdk/{optional-runtime-dependency-BlTVkcAg.js → optional-runtime-dependency-DdMbxS24.js} +1 -1
- package/dist/plugin-sdk/{outbound-CIemga5_.js → outbound-Db8mRN6P.js} +6 -6
- package/dist/plugin-sdk/{outbound-attachment-2RckWqrk.js → outbound-attachment-BqFjcypb.js} +2 -2
- package/dist/plugin-sdk/{pairing-message-r-VQfhFB.js → pairing-message-B3GC_7CD.js} +1 -1
- package/dist/plugin-sdk/{pairing-message-C403mq4K.d.ts → pairing-message-CxonJmwM.d.ts} +1 -1
- package/dist/plugin-sdk/{pairing-store-uPnLfGgB.js → pairing-store-CQikgIbw.js} +2 -2
- package/dist/plugin-sdk/{pi-model-discovery-BpEilAym.js → pi-model-discovery-CY3m5zJP.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-runtime-DwNdFaz-.js → pi-model-discovery-runtime-DSh1T2pn.js} +2 -2
- package/dist/plugin-sdk/provider-web-search-config-contract.d.ts +1 -1
- package/dist/plugin-sdk/{pw-ai-H7UgunQQ.js → pw-ai-AFUqn-tQ.js} +3 -3
- package/dist/plugin-sdk/{replies-CKMwkH4G.js → replies-Fzh9PhXl.js} +2 -2
- package/dist/plugin-sdk/{resolve-outbound-target-B68fSoGi.js → resolve-outbound-target-KpF3co6T.js} +1 -1
- package/dist/plugin-sdk/{resolve-route-B8fOfihG.js → resolve-route-CDl74O19.js} +1 -1
- package/dist/plugin-sdk/{retry-policy-B6GQldxB.js → retry-policy-D4uiqUOG.js} +1 -1
- package/dist/plugin-sdk/{runtime-nVJl3PlS.js → runtime-Bb6KRnCC.js} +6 -4
- package/dist/plugin-sdk/{runtime-dependency-DlqVSsSs.js → runtime-dependency-DLDmB94f.js} +11 -11
- package/dist/plugin-sdk/sat-runtime.d.ts +2 -2
- package/dist/plugin-sdk/sat-runtime.js +25 -25
- package/dist/plugin-sdk/{send-CPK_HlYW.js → send-5nFktR1n.js} +5 -5
- package/dist/plugin-sdk/{send-hSu1HWms.js → send-Bfzf11VY.js} +7 -7
- package/dist/plugin-sdk/{send-D3DQOg2a.js → send-C4k4JuJN.js} +6 -6
- package/dist/plugin-sdk/{send-BHokB4TR.js → send-D-uDKGIq.js} +6 -6
- package/dist/plugin-sdk/{send-BCJ4hi3t.js → send-Du8ykP1k.js} +8 -8
- package/dist/plugin-sdk/{session-DQ4Dr-mf.js → session-CS-Td9EM.js} +2 -2
- package/dist/plugin-sdk/{skill-commands-CmdoKLh_.js → skill-commands-CFAlXWHk.js} +2 -2
- package/dist/plugin-sdk/{slack-B70NHpMF.js → slack-DXYGbizH.js} +37 -37
- package/dist/plugin-sdk/{slack-actions-fSmP981b.js → slack-actions-BcMkNv1Z.js} +11 -11
- package/dist/plugin-sdk/slack.d.ts +4 -4
- package/dist/plugin-sdk/slack.js +9 -9
- package/dist/plugin-sdk/{sticker-cache-B4dG2sKU.js → sticker-cache-Dr3rYfU1.js} +3 -3
- package/dist/plugin-sdk/{tables-EX4Hy-a-.js → tables-bFXyRpkx.js} +1 -1
- package/dist/plugin-sdk/{targets-BeGUCGWK.js → targets-DH7a9lKB.js} +1 -1
- package/dist/plugin-sdk/{telegram-actions-CM8SJgc9.js → telegram-actions-Besbw_Hg.js} +28 -28
- package/dist/plugin-sdk/telegram.d.ts +4 -4
- package/dist/plugin-sdk/telegram.js +8 -8
- package/dist/plugin-sdk/{thread-bindings.lifecycle-tHK_1mvp.js → thread-bindings.lifecycle-CgOvvdw8.js} +3 -3
- package/dist/plugin-sdk/{thread-bindings.state-D7xG1GHu.js → thread-bindings.state-CQpk44Hq.js} +2 -2
- package/dist/plugin-sdk/{tmp-fased-dir-Ouj58axY.d.ts → tmp-fased-dir-DQ00xQ5D.d.ts} +1 -1
- package/dist/plugin-sdk/{types-B4hj6HgR.d.ts → types-B6zx-Dl2.d.ts} +1 -1
- package/dist/plugin-sdk/{types-dWZFX1fk.d.ts → types-eUM7hcDz.d.ts} +1 -1
- package/dist/plugin-sdk/{web-BFolfZ3i.js → web-Q1-G--JH.js} +30 -30
- package/dist/plugin-sdk/{whatsapp-actions-CYmleHCz.js → whatsapp-actions-BtSc2CBv.js} +13 -13
- package/dist/plugin-sdk/{whatsapp-heartbeat-BEwm4GK3.js → whatsapp-heartbeat-Bg9TuYzl.js} +2 -2
- package/dist/plugin-sdk/whatsapp.d.ts +9 -9
- package/dist/plugin-sdk/whatsapp.js +12 -12
- package/dist/plugin-sdk/{wsl-BtMDzMv5.js → wsl-C4DGFkOd.js} +3 -3
- package/dist/plugin-sdk/{zod-schema.providers-core-FaYR6KdD.d.ts → zod-schema.providers-core-CIzCjXH9.d.ts} +61 -61
- package/dist/plugins/provider-runtime.js +79 -0
- package/dist/providers/refresh.js +14 -0
- package/extensions/acpx/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/fased-federation/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +12 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +2 -2
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +12 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +12 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/sat-mining/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +12 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +12 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +12 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +12 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app-S_jg-ADS.js","./icons-D3-vEvih.js","./open-external-url-DwSiwMPl.js","./marketplace-order-evidence-DkR0ZRHa.js","./mining-commit-R-6nu87p.js","./chat-model-ref-Djkv93yn.js","./task-ledger-source-route-C-yTp0QU.js","./wallet-policy-C3ZS66Rl.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={"entry-loaded":10,"app-import-start":20,"app-imported":30,"custom-element-defined":40,connected:50,"first-updated":60,rendered:70,"boot-failed":100};function t(t,n){if(typeof window>`u`)return;let r=window.__FASED_CONTROL_UI_BOOT=window.__FASED_CONTROL_UI_BOOT??{},i=e[r.stage]??0;e[t]<i&&r.stage!==`boot-failed`||(r.stage=t,r.detail=n??``,r.updatedAt=Date.now(),typeof r.mark==`function`&&r.mark(t,n),typeof window.dispatchEvent==`function`&&typeof CustomEvent==`function`&&window.dispatchEvent(new CustomEvent(`fased-control-ui-boot`,{detail:{stage:t,detail:n??``}})))}var n=`modulepreload`,r=function(e,t){return new URL(e,t).href},i={},a=function(e,t,a){let o=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),s=document.querySelector(`meta[property=csp-nonce]`),c=s?.nonce||s?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function u(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}o=l(t.map(t=>{if(t=r(t,a),t=u(t),t in i)return;i[t]=!0;let o=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.href===t&&(!o||r.rel===`stylesheet`))return}let s=document.createElement(`link`);if(s.rel=o?`stylesheet`:n,o||(s.as=`script`),s.crossOrigin=``,s.href=t,c&&s.setAttribute(`nonce`,c),document.head.appendChild(s),o)return new Promise((e,n)=>{s.addEventListener(`load`,e),s.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function s(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then(t=>{for(let e of t||[])e.status===`rejected`&&s(e.reason);return e().catch(s)})};function o(e){let n=e instanceof Error?e.stack??e.message:String(e);t(`boot-failed`,n||`Unknown dashboard boot error.`);let r=document.querySelector(`fased-app`);if(!r)return;r.innerHTML=``;let i=document.createElement(`style`);i.textContent=`
|
|
3
3
|
body {
|
|
4
4
|
margin: 0;
|
|
@@ -57,5 +57,5 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app-DltSyY4Y.js","./
|
|
|
57
57
|
font-weight: 650;
|
|
58
58
|
cursor: pointer;
|
|
59
59
|
}
|
|
60
|
-
`;let a=document.createElement(`div`);a.className=`boot-page`;let o=document.createElement(`section`);o.className=`boot-card`;let s=document.createElement(`h1`);s.className=`boot-title`,s.textContent=`Dashboard bundle could not load`;let c=document.createElement(`p`);c.className=`boot-desc`,c.textContent=`The gateway page loaded, but the browser could not start the dashboard bundle. Reload first. If it keeps happening after an update, clear this site's browser data and sign in again.`;let l=document.createElement(`div`);l.className=`boot-error`,l.textContent=n||`Unknown dashboard boot error.`;let u=document.createElement(`button`);u.className=`boot-button`,u.textContent=`Reload`,u.addEventListener(`click`,()=>window.location.reload()),o.append(s,c,l,u),a.append(o),r.append(i,a)}t(`entry-loaded`),t(`app-import-start`),a(()=>import(`./app-
|
|
61
|
-
//# sourceMappingURL=index-
|
|
60
|
+
`;let a=document.createElement(`div`);a.className=`boot-page`;let o=document.createElement(`section`);o.className=`boot-card`;let s=document.createElement(`h1`);s.className=`boot-title`,s.textContent=`Dashboard bundle could not load`;let c=document.createElement(`p`);c.className=`boot-desc`,c.textContent=`The gateway page loaded, but the browser could not start the dashboard bundle. Reload first. If it keeps happening after an update, clear this site's browser data and sign in again.`;let l=document.createElement(`div`);l.className=`boot-error`,l.textContent=n||`Unknown dashboard boot error.`;let u=document.createElement(`button`);u.className=`boot-button`,u.textContent=`Reload`,u.addEventListener(`click`,()=>window.location.reload()),o.append(s,c,l,u),a.append(o),r.append(i,a)}t(`entry-loaded`),t(`app-import-start`),a(()=>import(`./app-S_jg-ADS.js`).then(()=>t(`app-imported`)),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url).catch(o);export{t as n,a as t};
|
|
61
|
+
//# sourceMappingURL=index-C22rDOFm.js.map
|
|
@@ -883,7 +883,7 @@ import{a as e,r as t,t as n}from"./icons-D3-vEvih.js";import{A as r,C as i,D as
|
|
|
883
883
|
${n.label??X(a)}
|
|
884
884
|
</div>
|
|
885
885
|
<div class="providers-setup-card__sub">
|
|
886
|
-
${t?`
|
|
886
|
+
${t?`Built-in Ollama transport; no Fased plugin is required. Do not add /v1.`:i?`LM Studio local server. Discovery reads /api/v1/models.`:`OpenAI-compatible local servers: vLLM, SGLang, TGI, LocalAI, FastChat.`}
|
|
887
887
|
</div>
|
|
888
888
|
</div>
|
|
889
889
|
<input type="hidden" name="provider" value=${a} />
|
|
@@ -898,7 +898,7 @@ import{a as e,r as t,t as n}from"./icons-D3-vEvih.js";import{A as r,C as i,D as
|
|
|
898
898
|
/>
|
|
899
899
|
</label>
|
|
900
900
|
<label class="providers-field">
|
|
901
|
-
Model ID
|
|
901
|
+
${t?`Model ID (for example qwen3:4b; ollama/ is optional)`:i?`Model ID (lmstudio/ prefix is optional)`:`Model ID (vllm/ prefix is optional)`}
|
|
902
902
|
<input
|
|
903
903
|
name="modelId"
|
|
904
904
|
type="text"
|
|
@@ -1141,4 +1141,4 @@ import{a as e,r as t,t as n}from"./icons-D3-vEvih.js";import{A as r,C as i,D as
|
|
|
1141
1141
|
</section>
|
|
1142
1142
|
</section>
|
|
1143
1143
|
`}export{Ae as renderProviders};
|
|
1144
|
-
//# sourceMappingURL=providers-
|
|
1144
|
+
//# sourceMappingURL=providers-QMn4w2_f.js.map
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32.png" />
|
|
15
15
|
<link rel="apple-touch-icon" sizes="180x180" href="./apple-touch-icon.png" />
|
|
16
16
|
<script data-fased-boot-watchdog src="./boot-watchdog.js" defer></script>
|
|
17
|
-
<script type="module" crossorigin src="./assets/index-
|
|
17
|
+
<script type="module" crossorigin src="./assets/index-C22rDOFm.js"></script>
|
|
18
18
|
<link rel="stylesheet" crossorigin href="./assets/index-RwVraC3c.css">
|
|
19
19
|
</head>
|
|
20
20
|
<body>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.1.
|
|
1
|
+
{"version":"0.1.59"}
|
|
@@ -26,6 +26,15 @@ function isSuppressedControlReplyText(text) {
|
|
|
26
26
|
const normalized = text.trim();
|
|
27
27
|
return SUPPRESSED_CONTROL_REPLY_TOKENS.some((token) => isSilentReplyText(normalized, token));
|
|
28
28
|
}
|
|
29
|
+
function stripTrailingSuppressedControlReplyToken(text) {
|
|
30
|
+
const tokens = SUPPRESSED_CONTROL_REPLY_TOKENS.join("|");
|
|
31
|
+
const trailingToken = new RegExp(`(?:^|\\r?\\n)[\\t ]*(?:${tokens})[\\t ]*$`, "i");
|
|
32
|
+
const match = trailingToken.exec(text);
|
|
33
|
+
if (!match) {
|
|
34
|
+
return text;
|
|
35
|
+
}
|
|
36
|
+
return text.slice(0, match.index).trimEnd();
|
|
37
|
+
}
|
|
29
38
|
function isSuppressedControlReplyLeadFragment(text) {
|
|
30
39
|
const trimmed = text.trim();
|
|
31
40
|
const normalized = normalizeSuppressedControlReplyFragment(text);
|
|
@@ -51,4 +60,4 @@ function isSuppressedControlReplyLeadFragment(text) {
|
|
|
51
60
|
}
|
|
52
61
|
|
|
53
62
|
//#endregion
|
|
54
|
-
export { isSuppressedControlReplyLeadFragment, isSuppressedControlReplyText };
|
|
63
|
+
export { isSuppressedControlReplyLeadFragment, isSuppressedControlReplyText, stripTrailingSuppressedControlReplyToken };
|
|
@@ -7,7 +7,7 @@ import { DEFAULT_HEARTBEAT_ACK_MAX_CHARS, stripHeartbeatToken } from "../auto-re
|
|
|
7
7
|
import { getAgentRunContext } from "../infra/agent-events.js";
|
|
8
8
|
import { resolveHeartbeatVisibility } from "../infra/heartbeat-visibility.js";
|
|
9
9
|
import { formatForLog } from "./ws-log.js";
|
|
10
|
-
import { isSuppressedControlReplyLeadFragment, isSuppressedControlReplyText } from "./control-reply-text.js";
|
|
10
|
+
import { isSuppressedControlReplyLeadFragment, isSuppressedControlReplyText, stripTrailingSuppressedControlReplyToken } from "./control-reply-text.js";
|
|
11
11
|
import { broadcastSessionLifecycleEvent, broadcastSessionToolEvent } from "./server-session-events.js";
|
|
12
12
|
|
|
13
13
|
//#region src/gateway/server-chat.ts
|
|
@@ -204,7 +204,7 @@ function createToolEventRecipientRegistry() {
|
|
|
204
204
|
}
|
|
205
205
|
function createAgentEventHandler({ broadcast, broadcastToConnIds, nodeSendToSession, agentRunSeq, chatRunState, resolveSessionKeyForRun, clearAgentRunContext, toolEventRecipients, sessionEventSubscribers }) {
|
|
206
206
|
const emitChatDelta = (sessionKey, clientRunId, sourceRunId, seq, text) => {
|
|
207
|
-
const cleaned = stripInlineDirectiveTagsForDisplay(text).text;
|
|
207
|
+
const cleaned = stripTrailingSuppressedControlReplyToken(stripInlineDirectiveTagsForDisplay(text).text);
|
|
208
208
|
if (!cleaned) {
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
@@ -242,7 +242,7 @@ function createAgentEventHandler({ broadcast, broadcastToConnIds, nodeSendToSess
|
|
|
242
242
|
nodeSendToSession(sessionKey, "chat", payload);
|
|
243
243
|
};
|
|
244
244
|
const emitChatFinal = (sessionKey, clientRunId, sourceRunId, seq, jobState, error) => {
|
|
245
|
-
const bufferedText = stripInlineDirectiveTagsForDisplay(chatRunState.buffers.get(clientRunId) ?? "").text.trim();
|
|
245
|
+
const bufferedText = stripTrailingSuppressedControlReplyToken(stripInlineDirectiveTagsForDisplay(chatRunState.buffers.get(clientRunId) ?? "").text).trim();
|
|
246
246
|
const normalizedHeartbeatText = normalizeHeartbeatChatFinalText({
|
|
247
247
|
runId: clientRunId,
|
|
248
248
|
sourceRunId,
|
|
@@ -13,6 +13,7 @@ import { listChatChannels } from "../../channels/registry.js";
|
|
|
13
13
|
import { ErrorCodes, errorShape } from "../protocol/schema/error-codes.js";
|
|
14
14
|
import { formatValidationErrors, validateChannelsLogoutParams, validateChannelsRuntimeControlParams, validateChannelsStatusParams } from "../protocol/index.js";
|
|
15
15
|
import { getChannelActivity } from "../../infra/channel-activity.js";
|
|
16
|
+
import { getChannelDelivery } from "../../channels/delivery.js";
|
|
16
17
|
import { buildChannelUiCatalog, listChannelPluginCatalogEntries } from "../../channels/plugins/catalog.js";
|
|
17
18
|
import { resolveChannelDefaultAccountId } from "../../channels/plugins/helpers.js";
|
|
18
19
|
import { formatForLog } from "../ws-log.js";
|
|
@@ -31,13 +32,15 @@ function buildStatusChannelCatalog(params) {
|
|
|
31
32
|
resolved.set(meta.id, {
|
|
32
33
|
id: meta.id,
|
|
33
34
|
meta,
|
|
35
|
+
delivery: getChannelDelivery(meta.id),
|
|
34
36
|
catalogOnly: !pluginIds.has(meta.id)
|
|
35
37
|
});
|
|
36
38
|
}
|
|
37
39
|
for (const plugin of params.plugins) {
|
|
38
40
|
resolved.set(plugin.id, {
|
|
39
41
|
id: plugin.id,
|
|
40
|
-
meta: plugin.meta
|
|
42
|
+
meta: plugin.meta,
|
|
43
|
+
delivery: getChannelDelivery(plugin.id)
|
|
41
44
|
});
|
|
42
45
|
}
|
|
43
46
|
const workspaceDir = resolveAgentWorkspaceDir(params.cfg, resolveDefaultAgentId(params.cfg));
|
|
@@ -53,6 +56,7 @@ function buildStatusChannelCatalog(params) {
|
|
|
53
56
|
resolved.set(entry.id, {
|
|
54
57
|
id: entry.id,
|
|
55
58
|
meta: entry.meta,
|
|
59
|
+
delivery: entry.delivery,
|
|
56
60
|
catalogOnly: true,
|
|
57
61
|
install: entry.install
|
|
58
62
|
});
|
|
@@ -423,6 +427,7 @@ const channelsHandlers = {
|
|
|
423
427
|
running: false,
|
|
424
428
|
connected: false,
|
|
425
429
|
catalogOnly: true,
|
|
430
|
+
delivery: entry.delivery,
|
|
426
431
|
...pendingRestart ? { pendingRestart: true } : {},
|
|
427
432
|
install: catalogEntry?.install
|
|
428
433
|
};
|
|
@@ -438,7 +443,10 @@ const channelsHandlers = {
|
|
|
438
443
|
defaultAccountId,
|
|
439
444
|
snapshot: defaultAccount ?? { accountId: defaultAccountId }
|
|
440
445
|
}) : { configured: defaultAccount?.configured ?? false };
|
|
441
|
-
channelsMap[plugin.id] =
|
|
446
|
+
channelsMap[plugin.id] = {
|
|
447
|
+
...summary && typeof summary === "object" ? summary : {},
|
|
448
|
+
delivery: entry.delivery
|
|
449
|
+
};
|
|
442
450
|
accountsMap[plugin.id] = accounts;
|
|
443
451
|
defaultAccountIdMap[plugin.id] = defaultAccountId;
|
|
444
452
|
}
|
|
@@ -23,7 +23,7 @@ import { createReplyDispatcher } from "../../auto-reply/reply/reply-dispatcher.j
|
|
|
23
23
|
import { dispatchInboundMessage } from "../../auto-reply/dispatch.js";
|
|
24
24
|
import { createReplyPrefixOptions } from "../../channels/reply-prefix.js";
|
|
25
25
|
import { formatForLog } from "../ws-log.js";
|
|
26
|
-
import { isSuppressedControlReplyText } from "../control-reply-text.js";
|
|
26
|
+
import { isSuppressedControlReplyText, stripTrailingSuppressedControlReplyToken } from "../control-reply-text.js";
|
|
27
27
|
import { abortChatRunById, abortChatRunsForSessionKey, isChatStopCommandText, resolveChatRunExpiresAtMs } from "../chat-abort.js";
|
|
28
28
|
import { getMaxChatHistoryMessagesBytes } from "../server-constants.js";
|
|
29
29
|
import { parseMessageWithAttachments } from "../chat-attachments.js";
|
|
@@ -73,7 +73,7 @@ function truncateChatHistoryText(text) {
|
|
|
73
73
|
truncated: true
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
function sanitizeChatHistoryContentBlock(block) {
|
|
76
|
+
function sanitizeChatHistoryContentBlock(block, stripControlToken = false) {
|
|
77
77
|
if (!block || typeof block !== "object") {
|
|
78
78
|
return {
|
|
79
79
|
block,
|
|
@@ -83,10 +83,12 @@ function sanitizeChatHistoryContentBlock(block) {
|
|
|
83
83
|
const entry = { ...block };
|
|
84
84
|
let changed = false;
|
|
85
85
|
if (typeof entry.text === "string") {
|
|
86
|
-
const
|
|
86
|
+
const originalText = entry.text;
|
|
87
|
+
const controlSafe = stripControlToken ? stripTrailingSuppressedControlReplyToken(originalText) : originalText;
|
|
88
|
+
const stripped = stripInlineDirectiveTagsForDisplay(controlSafe);
|
|
87
89
|
const res = truncateChatHistoryText(stripped.text);
|
|
88
90
|
entry.text = res.text;
|
|
89
|
-
changed ||= stripped.changed || res.truncated;
|
|
91
|
+
changed ||= controlSafe !== originalText || stripped.changed || res.truncated;
|
|
90
92
|
}
|
|
91
93
|
if (typeof entry.partialJson === "string") {
|
|
92
94
|
const res = truncateChatHistoryText(entry.partialJson);
|
|
@@ -129,6 +131,7 @@ function sanitizeChatHistoryMessage(message) {
|
|
|
129
131
|
}
|
|
130
132
|
const entry = { ...message };
|
|
131
133
|
let changed = false;
|
|
134
|
+
const isAssistant = entry.role === "assistant";
|
|
132
135
|
if ("details" in entry) {
|
|
133
136
|
delete entry.details;
|
|
134
137
|
changed = true;
|
|
@@ -142,22 +145,26 @@ function sanitizeChatHistoryMessage(message) {
|
|
|
142
145
|
changed = true;
|
|
143
146
|
}
|
|
144
147
|
if (typeof entry.content === "string") {
|
|
145
|
-
const
|
|
148
|
+
const originalContent = entry.content;
|
|
149
|
+
const controlSafe = isAssistant ? stripTrailingSuppressedControlReplyToken(originalContent) : originalContent;
|
|
150
|
+
const stripped = stripInlineDirectiveTagsForDisplay(controlSafe);
|
|
146
151
|
const res = truncateChatHistoryText(stripped.text);
|
|
147
152
|
entry.content = res.text;
|
|
148
|
-
changed ||= stripped.changed || res.truncated;
|
|
153
|
+
changed ||= controlSafe !== originalContent || stripped.changed || res.truncated;
|
|
149
154
|
} else if (Array.isArray(entry.content)) {
|
|
150
|
-
const updated = entry.content.map((block) => sanitizeChatHistoryContentBlock(block));
|
|
155
|
+
const updated = entry.content.map((block) => sanitizeChatHistoryContentBlock(block, isAssistant));
|
|
151
156
|
if (updated.some((item) => item.changed)) {
|
|
152
157
|
entry.content = updated.map((item) => item.block);
|
|
153
158
|
changed = true;
|
|
154
159
|
}
|
|
155
160
|
}
|
|
156
161
|
if (typeof entry.text === "string") {
|
|
157
|
-
const
|
|
162
|
+
const originalText = entry.text;
|
|
163
|
+
const controlSafe = isAssistant ? stripTrailingSuppressedControlReplyToken(originalText) : originalText;
|
|
164
|
+
const stripped = stripInlineDirectiveTagsForDisplay(controlSafe);
|
|
158
165
|
const res = truncateChatHistoryText(stripped.text);
|
|
159
166
|
entry.text = res.text;
|
|
160
|
-
changed ||= stripped.changed || res.truncated;
|
|
167
|
+
changed ||= controlSafe !== originalText || stripped.changed || res.truncated;
|
|
161
168
|
}
|
|
162
169
|
return {
|
|
163
170
|
message: changed ? entry : message,
|
|
@@ -171,12 +178,12 @@ function sanitizeChatHistoryMessages(messages) {
|
|
|
171
178
|
let changed = false;
|
|
172
179
|
const next = [];
|
|
173
180
|
for (const message of messages) {
|
|
174
|
-
|
|
175
|
-
changed ||= res.changed;
|
|
176
|
-
if (shouldDropAssistantHistoryMessage(res.message)) {
|
|
181
|
+
if (shouldDropAssistantHistoryMessage(message)) {
|
|
177
182
|
changed = true;
|
|
178
183
|
continue;
|
|
179
184
|
}
|
|
185
|
+
const res = sanitizeChatHistoryMessage(message);
|
|
186
|
+
changed ||= res.changed;
|
|
180
187
|
next.push(res.message);
|
|
181
188
|
}
|
|
182
189
|
return changed ? next : messages;
|
|
@@ -11,10 +11,12 @@ import { loadConfig, writeConfigFile } from "../../config/io.js";
|
|
|
11
11
|
import "../../config/config.js";
|
|
12
12
|
import { resolveProfileUnusableUntilForDisplay } from "../../agents/auth-profiles/usage.js";
|
|
13
13
|
import "../../agents/auth-profiles.js";
|
|
14
|
+
import { ensureFasedModelsJson } from "../../agents/models-config.js";
|
|
14
15
|
import { deriveModelMetadata } from "../../agents/model-metadata.js";
|
|
15
16
|
import { ErrorCodes, errorShape } from "../protocol/schema/error-codes.js";
|
|
16
17
|
import { formatValidationErrors, validateModelsAuthClearParams, validateModelsAuthConfigureParams, validateModelsAuthInteractiveStartParams, validateModelsAuthStatusParams, validateModelsAuthStoreParams, validateModelsCatalogStatusParams, validateModelsListParams } from "../protocol/index.js";
|
|
17
18
|
import { loadProviderExtensionCatalogIndex } from "../../agents/provider-extension-catalog-index.js";
|
|
19
|
+
import { markGatewayModelCatalogStaleForReload } from "../server-model-catalog.js";
|
|
18
20
|
import { buildModelCatalogStatus } from "../../agents/model-catalog-status.js";
|
|
19
21
|
import { DEFAULT_OAUTH_WARN_MS, buildAuthHealthSummary } from "../../agents/auth-health.js";
|
|
20
22
|
import { normalizeLegacyOnboardAuthChoice } from "../../commands/auth-choice-legacy.js";
|
|
@@ -684,6 +686,8 @@ const modelsHandlers = {
|
|
|
684
686
|
opts: plan.opts
|
|
685
687
|
});
|
|
686
688
|
await writeConfigFile(result.config);
|
|
689
|
+
await ensureFasedModelsJson(result.config, agentDir);
|
|
690
|
+
markGatewayModelCatalogStaleForReload();
|
|
687
691
|
respond(true, {
|
|
688
692
|
ok: true,
|
|
689
693
|
provider: plan.provider,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { loadConfig } from "../../config/io.js";
|
|
1
|
+
import { loadConfig, writeConfigFile } from "../../config/io.js";
|
|
2
2
|
import "../../config/config.js";
|
|
3
3
|
import { ErrorCodes, errorShape } from "../protocol/schema/error-codes.js";
|
|
4
4
|
import "../protocol/index.js";
|
|
5
|
-
import { buildCapabilityReadinessReport } from "../../capabilities/catalog.js";
|
|
5
|
+
import { buildCapabilityReadinessReport, loadCapabilityCatalog } from "../../capabilities/catalog.js";
|
|
6
|
+
import { installCapabilityComponent } from "../../capabilities/install.js";
|
|
7
|
+
import { scheduleGatewaySigusr1Restart } from "../../infra/restart.js";
|
|
6
8
|
import { formatForLog } from "../ws-log.js";
|
|
7
9
|
import { runGmailSetup } from "../../hooks/gmail-ops.js";
|
|
8
10
|
import { listConfiguredWebSearchProviders, runWebSearch } from "../../web-search/runtime.js";
|
|
@@ -63,6 +65,49 @@ const servicesHandlers = {
|
|
|
63
65
|
respond(false, undefined, errorShape(ErrorCodes.UNAVAILABLE, formatForLog(err)));
|
|
64
66
|
}
|
|
65
67
|
},
|
|
68
|
+
"services.component.install": async ({ respond, params }) => {
|
|
69
|
+
try {
|
|
70
|
+
const id = stringParam(params, "id");
|
|
71
|
+
if (!id) {
|
|
72
|
+
respond(false, undefined, errorShape(ErrorCodes.INVALID_REQUEST, "Component id is required"));
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
const result = await installCapabilityComponent({
|
|
76
|
+
id,
|
|
77
|
+
config: loadConfig()
|
|
78
|
+
});
|
|
79
|
+
await writeConfigFile(result.config);
|
|
80
|
+
respond(true, {
|
|
81
|
+
ok: true,
|
|
82
|
+
id,
|
|
83
|
+
pluginId: result.pluginId,
|
|
84
|
+
message: `Installed ${result.entry.label}.`,
|
|
85
|
+
restartRequired: result.entry.restartRequired !== false,
|
|
86
|
+
warnings: result.slotWarnings,
|
|
87
|
+
report: buildCapabilityReadinessReport({ config: result.config })
|
|
88
|
+
});
|
|
89
|
+
} catch (err) {
|
|
90
|
+
respond(false, undefined, errorShape(ErrorCodes.UNAVAILABLE, formatForLog(err)));
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"services.component.restart": async ({ respond, params }) => {
|
|
94
|
+
try {
|
|
95
|
+
const id = stringParam(params, "id");
|
|
96
|
+
const entry = id ? loadCapabilityCatalog().find((candidate) => candidate.id === id) : null;
|
|
97
|
+
if (!entry) {
|
|
98
|
+
respond(false, undefined, errorShape(ErrorCodes.INVALID_REQUEST, "Known component id is required"));
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const restart = scheduleGatewaySigusr1Restart({ reason: `services.component.restart:${entry.id}` });
|
|
102
|
+
respond(true, {
|
|
103
|
+
ok: true,
|
|
104
|
+
id: entry.id,
|
|
105
|
+
message: restart.coalesced ? `Gateway restart already pending for ${entry.label}.` : `Scheduled Gateway restart for ${entry.label}.`
|
|
106
|
+
});
|
|
107
|
+
} catch (err) {
|
|
108
|
+
respond(false, undefined, errorShape(ErrorCodes.UNAVAILABLE, formatForLog(err)));
|
|
109
|
+
}
|
|
110
|
+
},
|
|
66
111
|
"services.gmail.setup": async ({ respond, params }) => {
|
|
67
112
|
try {
|
|
68
113
|
const parsed = gmailSetupOptions(params);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { stripInlineDirectiveTagsForDisplay } from "../utils/directive-tags.js";
|
|
2
2
|
import { stripEnvelopeFromMessage } from "./chat-sanitize.js";
|
|
3
|
-
import { isSuppressedControlReplyText } from "./control-reply-text.js";
|
|
3
|
+
import { isSuppressedControlReplyText, stripTrailingSuppressedControlReplyToken } from "./control-reply-text.js";
|
|
4
4
|
|
|
5
5
|
//#region src/gateway/session-event-payloads.ts
|
|
6
6
|
const SESSION_EVENT_TEXT_MAX_CHARS = 12e3;
|
|
@@ -16,7 +16,7 @@ function truncateSessionEventText(text) {
|
|
|
16
16
|
truncated: true
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
function sanitizeSessionEventContentBlock(block) {
|
|
19
|
+
function sanitizeSessionEventContentBlock(block, stripControlToken = false) {
|
|
20
20
|
if (!block || typeof block !== "object" || Array.isArray(block)) {
|
|
21
21
|
return {
|
|
22
22
|
block,
|
|
@@ -26,10 +26,12 @@ function sanitizeSessionEventContentBlock(block) {
|
|
|
26
26
|
const entry = { ...block };
|
|
27
27
|
let changed = false;
|
|
28
28
|
if (typeof entry.text === "string") {
|
|
29
|
-
const
|
|
29
|
+
const originalText = entry.text;
|
|
30
|
+
const controlSafe = stripControlToken ? stripTrailingSuppressedControlReplyToken(originalText) : originalText;
|
|
31
|
+
const stripped = stripInlineDirectiveTagsForDisplay(controlSafe);
|
|
30
32
|
const truncated = truncateSessionEventText(stripped.text);
|
|
31
33
|
entry.text = truncated.text;
|
|
32
|
-
changed ||= stripped.changed || truncated.truncated;
|
|
34
|
+
changed ||= controlSafe !== originalText || stripped.changed || truncated.truncated;
|
|
33
35
|
}
|
|
34
36
|
if (typeof entry.content === "string") {
|
|
35
37
|
const stripped = stripInlineDirectiveTagsForDisplay(entry.content);
|
|
@@ -114,6 +116,11 @@ function projectSessionMessageForEvent(message) {
|
|
|
114
116
|
}
|
|
115
117
|
const entry = { ...stripped };
|
|
116
118
|
let changed = false;
|
|
119
|
+
const originalAssistantText = extractAssistantText(entry);
|
|
120
|
+
if (originalAssistantText !== undefined && isSuppressedControlReplyText(originalAssistantText)) {
|
|
121
|
+
return undefined;
|
|
122
|
+
}
|
|
123
|
+
const isAssistant = entry.role === "assistant";
|
|
117
124
|
if ("details" in entry) {
|
|
118
125
|
delete entry.details;
|
|
119
126
|
changed = true;
|
|
@@ -127,22 +134,26 @@ function projectSessionMessageForEvent(message) {
|
|
|
127
134
|
changed = true;
|
|
128
135
|
}
|
|
129
136
|
if (typeof entry.content === "string") {
|
|
130
|
-
const
|
|
137
|
+
const originalContent = entry.content;
|
|
138
|
+
const controlSafe = isAssistant ? stripTrailingSuppressedControlReplyToken(originalContent) : originalContent;
|
|
139
|
+
const strippedContent = stripInlineDirectiveTagsForDisplay(controlSafe);
|
|
131
140
|
const truncated = truncateSessionEventText(strippedContent.text);
|
|
132
141
|
entry.content = truncated.text;
|
|
133
|
-
changed ||= strippedContent.changed || truncated.truncated;
|
|
142
|
+
changed ||= controlSafe !== originalContent || strippedContent.changed || truncated.truncated;
|
|
134
143
|
} else if (Array.isArray(entry.content)) {
|
|
135
|
-
const updated = entry.content.map((block) => sanitizeSessionEventContentBlock(block));
|
|
144
|
+
const updated = entry.content.map((block) => sanitizeSessionEventContentBlock(block, isAssistant));
|
|
136
145
|
if (updated.some((item) => item.changed)) {
|
|
137
146
|
entry.content = updated.map((item) => item.block);
|
|
138
147
|
changed = true;
|
|
139
148
|
}
|
|
140
149
|
}
|
|
141
150
|
if (typeof entry.text === "string") {
|
|
142
|
-
const
|
|
151
|
+
const originalText = entry.text;
|
|
152
|
+
const controlSafe = isAssistant ? stripTrailingSuppressedControlReplyToken(originalText) : originalText;
|
|
153
|
+
const strippedText = stripInlineDirectiveTagsForDisplay(controlSafe);
|
|
143
154
|
const truncated = truncateSessionEventText(strippedText.text);
|
|
144
155
|
entry.text = truncated.text;
|
|
145
|
-
changed ||= strippedText.changed || truncated.truncated;
|
|
156
|
+
changed ||= controlSafe !== originalText || strippedText.changed || truncated.truncated;
|
|
146
157
|
}
|
|
147
158
|
const projected = changed ? entry : stripped;
|
|
148
159
|
const assistantText = extractAssistantText(projected);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/infra/google-api-base-url.ts
|
|
2
|
+
const DEFAULT_GOOGLE_API_BASE_URL = "https://generativelanguage.googleapis.com/v1beta";
|
|
3
|
+
const GOOGLE_GENERATIVE_LANGUAGE_HOST = "generativelanguage.googleapis.com";
|
|
4
|
+
function trimTrailingSlashes(value) {
|
|
5
|
+
return value.replace(/\/+$/, "");
|
|
6
|
+
}
|
|
7
|
+
function isCanonicalGoogleApiOriginShorthand(value) {
|
|
8
|
+
return /^https:\/\/generativelanguage\.googleapis\.com\/?$/i.test(value);
|
|
9
|
+
}
|
|
10
|
+
function normalizeGoogleApiBaseUrl(baseUrl) {
|
|
11
|
+
const raw = trimTrailingSlashes(baseUrl?.trim() || DEFAULT_GOOGLE_API_BASE_URL);
|
|
12
|
+
try {
|
|
13
|
+
const url = new URL(raw);
|
|
14
|
+
url.hash = "";
|
|
15
|
+
url.search = "";
|
|
16
|
+
if (url.hostname.toLowerCase() === GOOGLE_GENERATIVE_LANGUAGE_HOST && trimTrailingSlashes(url.pathname || "") === "") {
|
|
17
|
+
url.pathname = "/v1beta";
|
|
18
|
+
}
|
|
19
|
+
return trimTrailingSlashes(url.toString());
|
|
20
|
+
} catch {
|
|
21
|
+
if (isCanonicalGoogleApiOriginShorthand(raw)) {
|
|
22
|
+
return DEFAULT_GOOGLE_API_BASE_URL;
|
|
23
|
+
}
|
|
24
|
+
return raw;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
export { normalizeGoogleApiBaseUrl };
|
|
@@ -2,7 +2,7 @@ import { i as defaultRuntime } from "./subsystem-DBPNbQDQ.js";
|
|
|
2
2
|
import { c as success, n as info, p as getChildLogger } from "./globals-B_jjtAje.js";
|
|
3
3
|
import { a as resolveOAuthDir, c as expandHomePrefix, u as resolveRequiredHomeDir } from "./paths-BEmvSyOV.js";
|
|
4
4
|
import { h as resolveUserPath } from "./utils-CYk9EKoq.js";
|
|
5
|
-
import {
|
|
5
|
+
import { xa as formatCliCommand } from "./config-mxULv0fQ.js";
|
|
6
6
|
import { n as resolveAccountEntry, t as createAccountListHelpers } from "./account-helpers-Bdfws46K.js";
|
|
7
7
|
import { f as DEFAULT_ACCOUNT_ID, p as normalizeAccountId } from "./session-key-HSJ2KQTc.js";
|
|
8
8
|
import path from "node:path";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as logVerbose } from "./globals-B_jjtAje.js";
|
|
2
|
-
import { n as loadConfig } from "./config-
|
|
2
|
+
import { n as loadConfig } from "./config-mxULv0fQ.js";
|
|
3
3
|
import { i as resolveSlackAccount, s as resolveSlackBotToken } from "./accounts-CuqIKU8X.js";
|
|
4
4
|
import { n as validateSlackBlocksArray } from "./blocks-input-Bg-8S2pl.js";
|
|
5
|
-
import { i as buildSlackBlocksFallbackText, t as sendMessageSlack } from "./send-
|
|
5
|
+
import { i as buildSlackBlocksFallbackText, t as sendMessageSlack } from "./send-5nFktR1n.js";
|
|
6
6
|
import { n as createSlackWebClient } from "./client-pI228AVT.js";
|
|
7
7
|
|
|
8
8
|
//#region src/slack/actions.ts
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Et as isAudioAttachment, St as normalizeMediaAttachments, Tt as runCapability, bt as buildProviderRegistry, wt as resolveMediaAttachmentLocalRoots, xt as createMediaAttachmentCache } from "./config-schema-
|
|
2
|
-
import "./runtime-
|
|
1
|
+
import { Et as isAudioAttachment, St as normalizeMediaAttachments, Tt as runCapability, bt as buildProviderRegistry, wt as resolveMediaAttachmentLocalRoots, xt as createMediaAttachmentCache } from "./config-schema-D8E0LX8X.js";
|
|
2
|
+
import "./runtime-Bb6KRnCC.js";
|
|
3
3
|
import "./subsystem-DBPNbQDQ.js";
|
|
4
4
|
import { i as logVerbose, s as shouldLogVerbose } from "./globals-B_jjtAje.js";
|
|
5
5
|
import "./paths-BEmvSyOV.js";
|
|
6
6
|
import "./utils-CYk9EKoq.js";
|
|
7
|
-
import "./config-
|
|
7
|
+
import "./config-mxULv0fQ.js";
|
|
8
8
|
import "./agent-scope-CCjfjKoO.js";
|
|
9
9
|
import "./accounts-RHZyaB73.js";
|
|
10
10
|
import "./accounts-CuqIKU8X.js";
|
|
11
11
|
import "./logger-BbFvCoKk.js";
|
|
12
12
|
import "./exec-DQ8j4Fm3.js";
|
|
13
|
-
import "./accounts-
|
|
13
|
+
import "./accounts-DxblobYM.js";
|
|
14
14
|
import "./allow-list-DyAxs4yw.js";
|
|
15
15
|
import "./redact-Bm8vu_ju.js";
|
|
16
16
|
import "./github-copilot-token-CUK__1s1.js";
|
|
@@ -18,41 +18,41 @@ import "./retry-DstNBhDW.js";
|
|
|
18
18
|
import "./paths-CTZ2RS_E.js";
|
|
19
19
|
import "./ssrf-fG4UHKBw.js";
|
|
20
20
|
import "./fetch-guard-CeG6u6ld.js";
|
|
21
|
-
import "./send-
|
|
22
|
-
import "./helpers-
|
|
23
|
-
import "./wsl-
|
|
24
|
-
import "./pairing-store-
|
|
25
|
-
import "./chunk-
|
|
21
|
+
import "./send-D-uDKGIq.js";
|
|
22
|
+
import "./helpers-BXbdgs5H.js";
|
|
23
|
+
import "./wsl-C4DGFkOd.js";
|
|
24
|
+
import "./pairing-store-CQikgIbw.js";
|
|
25
|
+
import "./chunk-B0FUGc5A.js";
|
|
26
26
|
import "./tailscale-status-DwpNdO3Z.js";
|
|
27
27
|
import "./reply-prefix-CeVw7Mn2.js";
|
|
28
28
|
import "./tokens-BbnqfVuu.js";
|
|
29
29
|
import "./pairing-token-Cs3BRKc0.js";
|
|
30
30
|
import "./diagnostic-DLL_zekv.js";
|
|
31
31
|
import "./diagnostic-session-state-DqgfGYqZ.js";
|
|
32
|
-
import "./optional-runtime-dependency-
|
|
33
|
-
import "./image-ops-
|
|
32
|
+
import "./optional-runtime-dependency-DdMbxS24.js";
|
|
33
|
+
import "./image-ops-D7jPxaph.js";
|
|
34
34
|
import "./memory-search-DTjIMw8J.js";
|
|
35
|
-
import "./manager-
|
|
35
|
+
import "./manager-Y2S_5IlI.js";
|
|
36
36
|
import "./query-expansion-CAI2kKLQ.js";
|
|
37
|
-
import "./common-
|
|
38
|
-
import "./commands-registry-
|
|
39
|
-
import "./runtime-dependency-
|
|
37
|
+
import "./common-CfUOowOp.js";
|
|
38
|
+
import "./commands-registry-DmDRhRAU.js";
|
|
39
|
+
import "./runtime-dependency-DLDmB94f.js";
|
|
40
40
|
import "./path-alias-guards-DjgDArrp.js";
|
|
41
41
|
import "./fs-safe-g4g7GT02.js";
|
|
42
|
-
import "./markdown-tables-
|
|
43
|
-
import "./media-
|
|
44
|
-
import "./send-
|
|
45
|
-
import "./outbound-attachment-
|
|
42
|
+
import "./markdown-tables-DHLFQqaF.js";
|
|
43
|
+
import "./media-Czo4carg.js";
|
|
44
|
+
import "./send-C4k4JuJN.js";
|
|
45
|
+
import "./outbound-attachment-BqFjcypb.js";
|
|
46
46
|
import "./fetch-BtmoPIlf.js";
|
|
47
|
-
import "./thread-bindings.state-
|
|
48
|
-
import "./skill-commands-
|
|
47
|
+
import "./thread-bindings.state-CQpk44Hq.js";
|
|
48
|
+
import "./skill-commands-CFAlXWHk.js";
|
|
49
49
|
import "./sandbox-paths-Dx2lUqCu.js";
|
|
50
50
|
import "./directory-live-CSuYxdwk.js";
|
|
51
|
-
import "./targets-
|
|
52
|
-
import "./pi-model-discovery-
|
|
53
|
-
import "./resolve-route-
|
|
51
|
+
import "./targets-DH7a9lKB.js";
|
|
52
|
+
import "./pi-model-discovery-CY3m5zJP.js";
|
|
53
|
+
import "./resolve-route-CDl74O19.js";
|
|
54
54
|
import "./render-e7fENCYH.js";
|
|
55
|
-
import "./tables-
|
|
55
|
+
import "./tables-bFXyRpkx.js";
|
|
56
56
|
import "./shared-CBgp_GBw.js";
|
|
57
57
|
|
|
58
58
|
//#region src/media-understanding/audio-preflight.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
2
|
import { c as isRecord } from "./utils-CYk9EKoq.js";
|
|
3
3
|
import { a as resolveDiscordAccount } from "./accounts-RHZyaB73.js";
|
|
4
|
-
import { $ as fetchChannelPermissionsDiscord } from "./send-
|
|
4
|
+
import { $ as fetchChannelPermissionsDiscord } from "./send-Du8ykP1k.js";
|
|
5
5
|
|
|
6
6
|
//#region src/discord/audit.ts
|
|
7
7
|
var audit_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as promptChannelAccessConfig } from "./channel-access-
|
|
1
|
+
import { t as promptChannelAccessConfig } from "./channel-access-D5aHoTY8.js";
|
|
2
2
|
|
|
3
3
|
//#region src/channels/plugins/onboarding/channel-access-configure.ts
|
|
4
4
|
async function configureChannelAccessWithAllowlist(params) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as DEFAULT_ACCOUNT_ID, r as normalizeAccountId } from "./session-key--_1zVBRB.js";
|
|
2
2
|
import { Y as ChannelMessageActionContext, n as ChannelPlugin, ut as getChatChannelMeta } from "./types.plugin-_fbu40Re.js";
|
|
3
|
-
import { _ as FasedAgentPluginApi, t as PluginRuntime } from "./types-
|
|
4
|
-
import { a as buildChannelConfigSchema, c as emptyPluginConfigSchema, i as setAccountEnabledInConfigSection, n as formatPairingApproveHint, o as applyAccountNameToChannelSection, r as deleteAccountFromConfigSection, s as migrateBaseNameToDefaultAccount, t as PAIRING_APPROVED_MESSAGE } from "./pairing-message-
|
|
3
|
+
import { _ as FasedAgentPluginApi, t as PluginRuntime } from "./types-B6zx-Dl2.js";
|
|
4
|
+
import { a as buildChannelConfigSchema, c as emptyPluginConfigSchema, i as setAccountEnabledInConfigSection, n as formatPairingApproveHint, o as applyAccountNameToChannelSection, r as deleteAccountFromConfigSection, s as migrateBaseNameToDefaultAccount, t as PAIRING_APPROVED_MESSAGE } from "./pairing-message-CxonJmwM.js";
|
|
5
5
|
export { type ChannelMessageActionContext, type ChannelPlugin, DEFAULT_ACCOUNT_ID, type FasedAgentPluginApi, PAIRING_APPROVED_MESSAGE, type PluginRuntime, applyAccountNameToChannelSection, buildChannelConfigSchema, deleteAccountFromConfigSection, emptyPluginConfigSchema, formatPairingApproveHint, getChatChannelMeta, migrateBaseNameToDefaultAccount, normalizeAccountId, setAccountEnabledInConfigSection };
|