@xopcai/xopc 0.0.380 → 0.0.382
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/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-D2oKh5ik.js → activity-store-CKTm4K1I.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-OKK1A-IR.js → agent-avatar-dicebear-60ztIsyO.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CzriaMLA.js +1 -0
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-b24CxjaT.js → agent-plugin-dialog-D0h_GOzZ.js} +1 -1
- package/dist/gateway/static/root/assets/agents-Dwjb-Pmc.js +66 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-D-DNV0ms.js → agents-admin-api-6aesahV-.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-DxKh06hG.js → app-management-settings-panel-D7OQP_Q4.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-C8CeHpdR.js → appearance-settings-CY44NMTV.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-CZSTLErb.js → apps-page-CfrhlDw1.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-aoEF5gna.js → archive-plugin-D5ouupwE.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CSWWUZse.js → automations-page-BTyga78U.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-DGZAGTNe.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BM3Lr1BP.js → binary-plugins-sYO6MAV6.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-DMZ3_pPz.js → block-editor-CeytAoXT.js} +39 -39
- package/dist/gateway/static/root/assets/{browser-automation-inputs-BcBLdyVd.js → browser-automation-inputs-BmILL059.js} +1 -1
- package/dist/gateway/static/root/assets/browser-automations-page-Ko-r320n.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-DPICvQED.js +3 -0
- package/dist/gateway/static/root/assets/{cn-JdwAhgNB.js → bundle-mjs-rHxsej31.js} +1 -1
- package/dist/gateway/static/root/assets/{button-CS04eWY9.js → button-aIC072nz.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-Bf6NYuvT.js → capabilities-BFuas9nS.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-BOJYAeEJ.js → capabilities-DFR31Yhq.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-Crb7Oeay.js +2 -0
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-NZZNtjwZ.js → capabilities-settings-panel-ByLA8WMF.js} +6 -6
- package/dist/gateway/static/root/assets/{capability-header-actions-V7TdNf7i.js → capability-header-actions-DBwN3Sxo.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-icon-BYm2-nS-.js → capability-icon-DVoZxEgW.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-sgWMfPkw.js → channels-hokrjIdA.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-B4HNp59x.js → chat-terminal-dock-BBNBN1KZ.js} +2 -2
- package/dist/gateway/static/root/assets/cn-0WouolD0.js +1 -0
- package/dist/gateway/static/root/assets/{computer-settings-page-B2iwtbBu.js → computer-settings-page-BWLBPHzl.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-DTn3Z-MT.js → connector-service-page-Bm5JwIw8.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-ok0F1o0p.js +1 -0
- package/dist/gateway/static/root/assets/{copy-text-row-C1gaJwlZ.js → copy-text-row-C7egVuKr.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-DrUc4ivy.js → date-picker-BhtD9xGl.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-Bs16sgfD.js → dependency-picker-BZ7Xnjqt.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-Dg0Cp16O.js → desktop-pet-CFPxAY1g.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BeJg3R-X.js → desktop-pet-settings-HHN0SYzH.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-sprite-DTqXSpqf.js → desktop-pet-sprite-BP6iMVw1.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-C00mHAYU.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-BZkjdejC.js → directory-picker-path-field-DQm9XjdO.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-CFnlTs2-.js → extension-debug-page-BrwNSqhz.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BH25rxhA.js → extension-page-CpDc5gDd.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-CmaIRIVP.js → extension-provider-DF9qV04X.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-D0af0S3r.js → extension-settings-page-BLXL1IUp.js} +1 -1
- package/dist/gateway/static/root/assets/{fallback-models-BD_9_8lg.js → fallback-models-JL5hZ0k-.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-f-4qw3AG.js → gateway-config-swr-iceAEoJZ.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-BGhPOSfz.js → gateway-realtime-DMpsQXjn.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-U3lzqE82.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-Bc9HD3uV.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-90pvxKox.js → gateway-startup-retry-BS6l0_QM.js} +1 -1
- package/dist/gateway/static/root/assets/highlight-code-BH65IIbJ.js +1 -0
- package/dist/gateway/static/root/assets/highlighted-body-KQOG7T2V-BQJ5YRxv.js +1 -0
- package/dist/gateway/static/root/assets/home-page-hHgcCF-P.js +2 -0
- package/dist/gateway/static/root/assets/{image-generation-api-CtDjTXwX.js → image-generation-api-F2lG3T2E.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-CjFNSzDN.js → imports-page-CsMEvde8.js} +1 -1
- package/dist/gateway/static/root/assets/index-BnHaXfFv.css +1 -0
- package/dist/gateway/static/root/assets/index-odJjleQM.js +255 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DKdWZ7pq.js → keyboard-shortcuts-settings-CeYVir-Q.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-CXJQpTS9.js → local-app-workbench-page-Chj0R32r.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-9dyoG2s0.js → local-apps-page-sTmfe7AL.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-CrD74S6k.js → local-session-drafts-DdLyLxCp.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-pmT2B_By.js → locale-store-AAPVaavy.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-CpR_hGcR.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-CxElPS5j.js → management-settings-B_rVRdFW.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-DSjfHfaW.css → markdown-view-ByJbFign.css} +1 -1
- package/dist/gateway/static/root/assets/markdown-view-roJ1FcXL.js +66 -0
- package/dist/gateway/static/root/assets/{media-plugins-C6tT2oPH.js → media-plugins-Op_dDK0E.js} +1 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-BUSGX-3o.js +1 -0
- package/dist/gateway/static/root/assets/mermaid-render-604gISVe.js +134 -0
- package/dist/gateway/static/root/assets/messages-DwOSR5ue.js +3 -0
- package/dist/gateway/static/root/assets/models-hub-cache-BFSZUHQI.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-D2qf-sDw.js +5 -0
- package/dist/gateway/static/root/assets/{note-image-lightbox-1qg2v-9j.js → note-image-lightbox-BYNLO2pt.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-api-ChO4X97y.js → notes-api-1TYlEpD2.js} +1 -1
- package/dist/gateway/static/root/assets/notes-page-DNvVJasv.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-3bLWMSqt.js → page-context-capture-button-BYqWMp-X.js} +1 -1
- package/dist/gateway/static/root/assets/{page-tabs-D2xpUV26.js → page-tabs-BLGO2VIm.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-Bd4xN8C7.js +1 -0
- package/dist/gateway/static/root/assets/{popover-select-BgSdSbCL.js → popover-select-DHC7J4lG.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-Dvey7GwU.js → preview-open-alternatives-BJU2fmPn.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-BiGwWy9s.js → product-open-page-BRBzKP2h.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-Dvy5ieTo.js → product-preview-content-BapT1QoP.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-DJC5iE_A.js +1 -0
- package/dist/gateway/static/root/assets/{projects-page-CATt0m8t.js → projects-page-BMN9evTF.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-Bi4muyaZ.js → registry-api-BPFXyHk8.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-sJTykTVP.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-9bk1payF.js → runtime-tools-api-Cu0MRsAb.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-BnRVbeGi.js → runtime-tools-settings-panel-CJF3NeTn.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page-BVjQ4A9S.js → scenes-page-D_BBF04t.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-C0QHo3do.js → schema-form-CAmizvOH.js} +1 -1
- package/dist/gateway/static/root/assets/{secret-input-D93UrW4C.js → secret-input-BxWHx6J6.js} +1 -1
- package/dist/gateway/static/root/assets/{send-session-input-BhWG0d-Z.js → send-session-input-G334tGIw.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-D2J6VacQ.js → session-api-DYl61CUz.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-J3r-UiPc.js +16 -0
- package/dist/gateway/static/root/assets/sessions-page-B-wgtLR4.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-CA6YH-tX.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-exRhP9xn.js → settings-form-section-num14vSv.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-CAmWMaOT.js → settings-loading-skeleton-BTqvr_Fw.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-BT6dQ5nv.js → settings-page-B635QEij.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-X1x-2Cp9.js → settings-page-layout-Dx5S-Msc.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-CUmMrn5b.js +1 -0
- package/dist/gateway/static/root/assets/{share-link-dialog-Cu1miKUo.js → share-link-dialog-Bht78zB4.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-CWH4BdnM.js → share-preview-page-epHeT5lh.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-cGtd3rjc.js → shares-api-k1DyfoGP.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-BSQLmRXu.js +1 -0
- package/dist/gateway/static/root/assets/{skeleton-BwbyijEw.js → skeleton-BI5TyibZ.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-pzPKld3K.js → skill-api-CLmxc6fX.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-VT8F0enn.js → skill-reload-api-DZGoQACj.js} +1 -1
- package/dist/gateway/static/root/assets/skills-page-clfZlVOG.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-CDuqpAIG.js → system-settings-panel-DHjH7-OW.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-CNt-P3Kl.js → task-detail-page-BcYnm1sO.js} +2 -2
- package/dist/gateway/static/root/assets/{task-expandable-content-Dgk9lYGd.js → task-expandable-content-OTHBryoz.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-D7m5Eng5.js → theme-store-C2WOFv9Y.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-B90frz6c.js → tracing-settings-page-CnPpysvy.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-BJ2UEjeF.js → tunnel-api-C3bUe4Nc.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-DrV2qcKO.js → usage-page-Dgl7sh2E.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-Ct1x4pqI.js → use-autosave-BXZr6Rm9.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-CyWRo1B1.js → use-composer-attachments-C7M9p0kf.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-JIgp5qPT.js → use-file-preview-expanded-CleMXYWu.js} +2 -2
- package/dist/gateway/static/root/assets/user-model-page-BQBsKpmh.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-CSG8Hx8V.js → voice-api-key-field-BeF8AHPT.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-415pyWx8.js → voice-config-api-CBORJPD_.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-Dp107FXF.js → work-discovery-overlay-3egLlB1M.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-CZKJ6leF.js → workflow-run-setup-panel-BhYnheW-.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-C9dLtlfP.js +6 -0
- package/dist/gateway/static/root/assets/{workspace-api-DO_TWsiS.js → workspace-api-DdkViIn3.js} +2 -2
- package/dist/gateway/static/root/assets/xml-_d7dTN2Q.js +3 -0
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-CBjtpPiL.js → xopc-cloud-account-card-4KUvnfnh.js} +1 -1
- package/dist/gateway/static/root/index.html +38 -35
- package/dist/package.js +1 -1
- package/dist/src/agent/embedded/session-runner.js +21 -3
- package/dist/src/agent/embedded/tool-metadata.d.ts +2 -1
- package/dist/src/agent/external-tools/index.js +6 -3
- package/dist/src/agent/external-tools/tool-registry.d.ts +2 -1
- package/dist/src/endpoint-tools/registry.d.ts +4 -1
- package/dist/src/endpoint-tools/registry.js +14 -0
- package/dist/src/gateway/hono/routes/devices.js +1 -0
- package/dist/src/gateway/hono/routes/endpoint-tools.js +1 -0
- package/dist/src/gateway/service.js +4 -4
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/infra/package-runtime-check.d.ts +7 -0
- package/dist/src/infra/package-runtime-check.js +42 -0
- package/dist/src/infra/package-update-steps.js +3 -1
- package/dist/src/infra/update-global.d.ts +2 -0
- package/dist/src/infra/update-global.js +2 -0
- package/dist/src/voice/platform-streams.js +1 -0
- package/dist/src/voice/realtime/agentEngine.js +51 -2
- package/dist/src/voice/realtime/engine.d.ts +4 -0
- package/dist/src/voice/realtime/runtime.js +3 -3
- package/package.json +7 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-By5OXUfL.js +0 -1
- package/dist/gateway/static/root/assets/agents-tJxKA9VH.js +0 -66
- package/dist/gateway/static/root/assets/automations-workspace-D2RJ-Lzn.js +0 -6
- package/dist/gateway/static/root/assets/browser-automations-page-BLSr6du1.js +0 -3
- package/dist/gateway/static/root/assets/browser-settings-page-BlDHSstc.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-page-DHT4cB-Y.js +0 -2
- package/dist/gateway/static/root/assets/connectors-page-BJii6NMu.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-DPqFaLVI.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BYe-jWB1.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-Bzrm6DMQ.js +0 -1
- package/dist/gateway/static/root/assets/home-page-oHguULk0.js +0 -2
- package/dist/gateway/static/root/assets/index-_xgO2IDa.css +0 -1
- package/dist/gateway/static/root/assets/index-hn5CBddI.js +0 -106
- package/dist/gateway/static/root/assets/logs-page-pMgnuu0O.js +0 -2
- package/dist/gateway/static/root/assets/markdown-view-B_7--qVD.js +0 -201
- package/dist/gateway/static/root/assets/messages-Ib6DaUTo.js +0 -3
- package/dist/gateway/static/root/assets/models-hub-cache-3slk24cw.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-4GI5kfs2.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-DaMnzWfF.js +0 -8
- package/dist/gateway/static/root/assets/personal-page-BeAW5QQd.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-BNgCsfeE.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-5o06KAdu.js +0 -1
- package/dist/gateway/static/root/assets/session-manager-D2xce33J.js +0 -16
- package/dist/gateway/static/root/assets/sessions-page-BHYhAsHC.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DO148Ocl.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-B9EqOzrI.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-B3Z6sQEA.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-Busjd4VD.js +0 -2
- package/dist/gateway/static/root/assets/user-model-page-CQReU8e2.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-2HuveBs_.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./vendor-react-BOUWij0V.js";import{t as n}from"./cloud-C4-yfnnk.js";import{t as r}from"./external-link-DjqjBmc3.js";import{a as i,n as a,r as o}from"./locale-store-
|
|
1
|
+
import{n as e,t}from"./vendor-react-BOUWij0V.js";import{t as n}from"./cloud-C4-yfnnk.js";import{t as r}from"./external-link-DjqjBmc3.js";import{a as i,n as a,r as o}from"./locale-store-AAPVaavy.js";import{n as s,t as c}from"./cloud-credits-BMYMiiNn.js";import{i as l}from"./vendor-swr-BIWyz7Rc.js";import{t as u}from"./button-aIC072nz.js";import{t as d}from"./skeleton-BI5TyibZ.js";import{Yo as f,xo as p}from"./index-odJjleQM.js";var m=e(),h=t();function g(e){let t=(BigInt(e)+500n)/1000n*1000n;return s(String(t))}async function _(){let e=await i(o(`/api/models/xopc-cloud/account-summary`));return c.parse(e.payload)}function v(e){let t=(0,m.c)(148),{labels:i}=e,o=a(y)===`zh`?`zh-CN`:`en-US`,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s={refreshInterval:6e4,revalidateOnFocus:!0},t[0]=s):s=t[0];let{data:c,error:v,isLoading:b,isValidating:x,mutate:S}=l(`/api/models/xopc-cloud/account-summary`,_,s);if(b){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,h.jsx)(d,{className:`h-40 w-full rounded-xl`}),t[1]=e):e=t[1],e}if(v||!c){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,h.jsx)(p,{className:`mt-0.5 size-4 shrink-0 text-amber-500`,"aria-hidden":!0}),t[2]=e):e=t[2];let n;t[3]===i.title?n=t[4]:(n=(0,h.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:i.title}),t[3]=i.title,t[4]=n);let r;t[5]===i.unavailable?r=t[6]:(r=(0,h.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:i.unavailable}),t[5]=i.unavailable,t[6]=r);let a;t[7]!==n||t[8]!==r?(a=(0,h.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[e,(0,h.jsxs)(`div`,{children:[n,r]})]}),t[7]=n,t[8]=r,t[9]=a):a=t[9];let o;t[10]===S?o=t[11]:(o=()=>void S(),t[10]=S,t[11]=o);let s=x?`size-4 animate-spin`:`size-4`,c;t[12]===s?c=t[13]:(c=(0,h.jsx)(f,{className:s,"aria-hidden":!0}),t[12]=s,t[13]=c);let l;t[14]!==x||t[15]!==i.retry||t[16]!==o||t[17]!==c?(l=(0,h.jsxs)(u,{type:`button`,variant:`secondary`,disabled:x,onClick:o,children:[c,i.retry]}),t[14]=x,t[15]=i.retry,t[16]=o,t[17]=c,t[18]=l):l=t[18];let d;return t[19]!==a||t[20]!==l?(d=(0,h.jsx)(`section`,{className:`rounded-xl bg-surface-hover/25 p-4`,children:(0,h.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[a,l]})}),t[19]=a,t[20]=l,t[21]=d):d=t[21],d}let C,w,T,E,D,O,k,A,j,M;if(t[22]!==c.balance.availableCreditMicro||t[23]!==c.balance.expiring[0]||t[24]!==c.balance.grantedCreditMicro||t[25]!==c.balance.purchasedCreditMicro||t[26]!==c.balance.refundReservedCreditMicro||t[27]!==c.balance.usageReservedCreditMicro||t[28]!==c.links.details||t[29]!==c.links.purchase||t[30]!==c.usage.chargedCreditMicro||t[31]!==c.usage.requests||t[32]!==c.usage.totalTokens||t[33]!==i.availableCredits||t[34]!==i.connected||t[35]!==i.details||t[36]!==i.expiring||t[37]!==i.granted||t[38]!==i.purchase||t[39]!==i.purchased||t[40]!==i.recentUsage||t[41]!==i.reserved||t[42]!==i.title||t[43]!==i.tokenUsage||t[44]!==i.usageSummary||t[45]!==i.zeroBalance||t[46]!==o){let e=new Intl.NumberFormat(o),a=i.usageSummary.replace(`{{credits}}`,g(c.usage.chargedCreditMicro)).replace(`{{requests}}`,e.format(c.usage.requests));C=`rounded-xl bg-surface-hover/40 p-4 sm:p-5`;let s;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,h.jsx)(n,{className:`size-4 text-accent-fg`,"aria-hidden":!0}),t[57]=s):s=t[57];let l;t[58]===i.title?l=t[59]:(l=(0,h.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:i.title}),t[58]=i.title,t[59]=l);let d;t[60]===i.connected?d=t[61]:(d=(0,h.jsx)(`span`,{className:`rounded-full bg-emerald-500/10 px-2 py-0.5 text-xs font-medium text-emerald-700 dark:text-emerald-300`,children:i.connected}),t[60]=i.connected,t[61]=d);let f;t[62]!==l||t[63]!==d?(f=(0,h.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[s,l,d]}),t[62]=l,t[63]=d,t[64]=f):f=t[64];let p;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,h.jsx)(r,{className:`size-3.5`,"aria-hidden":!0}),t[65]=p):p=t[65];let m;t[66]!==c.links.purchase||t[67]!==i.purchase?(m=(0,h.jsx)(u,{asChild:!0,variant:`primary`,children:(0,h.jsxs)(`a`,{href:c.links.purchase,target:`_blank`,rel:`noreferrer`,children:[i.purchase,p]})}),t[66]=c.links.purchase,t[67]=i.purchase,t[68]=m):m=t[68];let _;t[69]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,h.jsx)(r,{className:`size-3.5`,"aria-hidden":!0}),t[69]=_):_=t[69];let v;t[70]!==c.links.details||t[71]!==i.details?(v=(0,h.jsx)(u,{asChild:!0,variant:`secondary`,children:(0,h.jsxs)(`a`,{href:c.links.details,target:`_blank`,rel:`noreferrer`,children:[i.details,_]})}),t[70]=c.links.details,t[71]=i.details,t[72]=v):v=t[72];let y;t[73]!==m||t[74]!==v?(y=(0,h.jsxs)(`div`,{className:`flex shrink-0 flex-wrap gap-2`,children:[m,v]}),t[73]=m,t[74]=v,t[75]=y):y=t[75],t[76]!==f||t[77]!==y?(w=(0,h.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[f,y]}),t[76]=f,t[77]=y,t[78]=w):w=t[78],j=`mt-4 grid gap-4 rounded-lg bg-surface-base/45 p-3 sm:grid-cols-[minmax(12rem,0.7fr)_minmax(0,1.3fr)] sm:gap-6`;let b;t[79]===i.availableCredits?b=t[80]:(b=(0,h.jsx)(`p`,{className:`text-xs font-medium text-fg-subtle`,children:i.availableCredits}),t[79]=i.availableCredits,t[80]=b);let x;t[81]===c.balance.availableCreditMicro?x=t[82]:(x=g(c.balance.availableCreditMicro),t[81]=c.balance.availableCreditMicro,t[82]=x);let S;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,h.jsx)(`span`,{className:`ml-2 text-sm font-medium text-fg-muted`,children:`Credits`}),t[83]=S):S=t[83];let N;t[84]===x?N=t[85]:(N=(0,h.jsxs)(`p`,{className:`mt-1 text-2xl font-semibold tracking-tight text-fg`,children:[x,S]}),t[84]=x,t[85]=N);let P;t[86]!==c.balance.availableCreditMicro||t[87]!==i.zeroBalance?(P=c.balance.availableCreditMicro===`0`?(0,h.jsx)(`p`,{className:`mt-1 text-sm font-medium text-danger`,children:i.zeroBalance}):null,t[86]=c.balance.availableCreditMicro,t[87]=i.zeroBalance,t[88]=P):P=t[88];let F=i.purchased,I;t[89]===c.balance.purchasedCreditMicro?I=t[90]:(I=g(c.balance.purchasedCreditMicro),t[89]=c.balance.purchasedCreditMicro,t[90]=I);let L;t[91]!==i.purchased||t[92]!==I?(L=(0,h.jsxs)(`div`,{children:[F,`: `,I,` Credits`]}),t[91]=i.purchased,t[92]=I,t[93]=L):L=t[93];let R=i.granted,z;t[94]===c.balance.grantedCreditMicro?z=t[95]:(z=g(c.balance.grantedCreditMicro),t[94]=c.balance.grantedCreditMicro,t[95]=z);let B;t[96]!==i.granted||t[97]!==z?(B=(0,h.jsxs)(`div`,{children:[R,`: `,z,` Credits`]}),t[96]=i.granted,t[97]=z,t[98]=B):B=t[98];let V=i.reserved,H=String(BigInt(c.balance.usageReservedCreditMicro)+BigInt(c.balance.refundReservedCreditMicro)),U;t[99]===H?U=t[100]:(U=g(H),t[99]=H,t[100]=U);let W;t[101]!==i.reserved||t[102]!==U?(W=(0,h.jsxs)(`div`,{children:[V,`: `,U,` Credits`]}),t[101]=i.reserved,t[102]=U,t[103]=W):W=t[103];let G;t[104]!==L||t[105]!==B||t[106]!==W?(G=(0,h.jsxs)(`div`,{className:`mt-2 space-y-1 text-xs text-fg-muted`,children:[L,B,W]}),t[104]=L,t[105]=B,t[106]=W,t[107]=G):G=t[107];let K;t[108]!==c.balance.expiring[0]||t[109]!==i.expiring||t[110]!==o?(K=c.balance.expiring[0]?(0,h.jsx)(`p`,{className:`mt-2 text-xs text-amber-600 dark:text-amber-400`,children:i.expiring.replace(`{{credits}}`,g(c.balance.expiring[0].creditMicro)).replace(`{{date}}`,new Date(c.balance.expiring[0].expiresAt).toLocaleDateString(o))}):null,t[108]=c.balance.expiring[0],t[109]=i.expiring,t[110]=o,t[111]=K):K=t[111],t[112]!==b||t[113]!==N||t[114]!==P||t[115]!==G||t[116]!==K?(M=(0,h.jsxs)(`div`,{children:[b,N,P,G,K]}),t[112]=b,t[113]=N,t[114]=P,t[115]=G,t[116]=K,t[117]=M):M=t[117],t[118]===i.recentUsage?k=t[119]:(k=(0,h.jsx)(`p`,{className:`text-xs font-medium text-fg-subtle`,children:i.recentUsage}),t[118]=i.recentUsage,t[119]=k),A=(0,h.jsx)(`p`,{className:`mt-1 text-sm leading-relaxed text-fg-muted`,children:a}),D=`mt-2 text-xs text-fg-subtle`,t[120]===i.tokenUsage?O=t[121]:(O=(0,h.jsx)(`summary`,{className:`cursor-pointer`,children:i.tokenUsage}),t[120]=i.tokenUsage,t[121]=O),T=`mt-1`,E=e.format(c.usage.totalTokens),t[22]=c.balance.availableCreditMicro,t[23]=c.balance.expiring[0],t[24]=c.balance.grantedCreditMicro,t[25]=c.balance.purchasedCreditMicro,t[26]=c.balance.refundReservedCreditMicro,t[27]=c.balance.usageReservedCreditMicro,t[28]=c.links.details,t[29]=c.links.purchase,t[30]=c.usage.chargedCreditMicro,t[31]=c.usage.requests,t[32]=c.usage.totalTokens,t[33]=i.availableCredits,t[34]=i.connected,t[35]=i.details,t[36]=i.expiring,t[37]=i.granted,t[38]=i.purchase,t[39]=i.purchased,t[40]=i.recentUsage,t[41]=i.reserved,t[42]=i.title,t[43]=i.tokenUsage,t[44]=i.usageSummary,t[45]=i.zeroBalance,t[46]=o,t[47]=C,t[48]=w,t[49]=T,t[50]=E,t[51]=D,t[52]=O,t[53]=k,t[54]=A,t[55]=j,t[56]=M}else C=t[47],w=t[48],T=t[49],E=t[50],D=t[51],O=t[52],k=t[53],A=t[54],j=t[55],M=t[56];let N;t[122]!==T||t[123]!==E?(N=(0,h.jsxs)(`p`,{className:T,children:[E,` tokens`]}),t[122]=T,t[123]=E,t[124]=N):N=t[124];let P;t[125]!==N||t[126]!==D||t[127]!==O?(P=(0,h.jsxs)(`details`,{className:D,children:[O,N]}),t[125]=N,t[126]=D,t[127]=O,t[128]=P):P=t[128];let F;t[129]!==c.balance.updatedAt||t[130]!==i.updatedAt||t[131]!==o?(F=i.updatedAt.replace(`{{time}}`,new Date(c.balance.updatedAt).toLocaleString(o)),t[129]=c.balance.updatedAt,t[130]=i.updatedAt,t[131]=o,t[132]=F):F=t[132];let I;t[133]===F?I=t[134]:(I=(0,h.jsx)(`p`,{className:`mt-1 text-xs text-fg-subtle`,children:F}),t[133]=F,t[134]=I);let L;t[135]!==P||t[136]!==I||t[137]!==k||t[138]!==A?(L=(0,h.jsxs)(`div`,{children:[k,A,P,I]}),t[135]=P,t[136]=I,t[137]=k,t[138]=A,t[139]=L):L=t[139];let R;t[140]!==L||t[141]!==j||t[142]!==M?(R=(0,h.jsxs)(`div`,{className:j,children:[M,L]}),t[140]=L,t[141]=j,t[142]=M,t[143]=R):R=t[143];let z;return t[144]!==C||t[145]!==w||t[146]!==R?(z=(0,h.jsxs)(`section`,{className:C,children:[w,R]}),t[144]=C,t[145]=w,t[146]=R,t[147]=z):z=t[147],z}function y(e){return e.language}export{v as t};
|
|
@@ -11,12 +11,15 @@
|
|
|
11
11
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=20260910-1" />
|
|
12
12
|
<link rel="manifest" href="/site.webmanifest?v=20260910-1" />
|
|
13
13
|
<title>XOPC — Keep what matters moving.</title>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-odJjleQM.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-zJ_50EbN.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BOUWij0V.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="/assets/dist-CxGUk8J-.js">
|
|
19
19
|
<link rel="modulepreload" crossorigin href="/assets/es2015-DBLcMg5B.js">
|
|
20
|
+
<link rel="modulepreload" crossorigin href="/assets/middleware-Pd0e8Igk.js">
|
|
21
|
+
<link rel="modulepreload" crossorigin href="/assets/messages-DwOSR5ue.js">
|
|
22
|
+
<link rel="modulepreload" crossorigin href="/assets/locale-store-AAPVaavy.js">
|
|
20
23
|
<link rel="modulepreload" crossorigin href="/assets/floating-ui.dom-B7uQOZZW.js">
|
|
21
24
|
<link rel="modulepreload" crossorigin href="/assets/dist-CI_fqRk-.js">
|
|
22
25
|
<link rel="modulepreload" crossorigin href="/assets/dist-BGTk37IG.js">
|
|
@@ -25,28 +28,29 @@
|
|
|
25
28
|
<link rel="modulepreload" crossorigin href="/assets/download-Dk-ZjtO6.js">
|
|
26
29
|
<link rel="modulepreload" crossorigin href="/assets/plus-Q2yW6OE7.js">
|
|
27
30
|
<link rel="modulepreload" crossorigin href="/assets/x-B_N4OPjy.js">
|
|
28
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
29
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
30
|
-
<link rel="modulepreload" crossorigin href="/assets/cn-JdwAhgNB.js">
|
|
31
|
+
<link rel="modulepreload" crossorigin href="/assets/mermaid-render-604gISVe.js">
|
|
32
|
+
<link rel="modulepreload" crossorigin href="/assets/xml-_d7dTN2Q.js">
|
|
31
33
|
<link rel="modulepreload" crossorigin href="/assets/schemas-CObaziC7.js">
|
|
32
34
|
<link rel="modulepreload" crossorigin href="/assets/local-apps-yys1VChX.js">
|
|
33
35
|
<link rel="modulepreload" crossorigin href="/assets/product-delivery-BAks11S4.js">
|
|
34
36
|
<link rel="modulepreload" crossorigin href="/assets/app-link-4gpFbdsr.js">
|
|
37
|
+
<link rel="modulepreload" crossorigin href="/assets/bundle-mjs-rHxsej31.js">
|
|
38
|
+
<link rel="modulepreload" crossorigin href="/assets/cn-0WouolD0.js">
|
|
35
39
|
<link rel="modulepreload" crossorigin href="/assets/copy-to-clipboard-HOJ79TWv.js">
|
|
36
|
-
<link rel="modulepreload" crossorigin href="/assets/markdown-view-
|
|
40
|
+
<link rel="modulepreload" crossorigin href="/assets/markdown-view-roJ1FcXL.js">
|
|
37
41
|
<link rel="modulepreload" crossorigin href="/assets/check-DUBLcKHA.js">
|
|
38
42
|
<link rel="modulepreload" crossorigin href="/assets/copy-Dv6d4Dvw.js">
|
|
39
|
-
<link rel="modulepreload" crossorigin href="/assets/button-
|
|
40
|
-
<link rel="modulepreload" crossorigin href="/assets/copy-text-row-
|
|
43
|
+
<link rel="modulepreload" crossorigin href="/assets/button-aIC072nz.js">
|
|
44
|
+
<link rel="modulepreload" crossorigin href="/assets/copy-text-row-C7egVuKr.js">
|
|
41
45
|
<link rel="modulepreload" crossorigin href="/assets/vendor-swr-BIWyz7Rc.js">
|
|
42
46
|
<link rel="modulepreload" crossorigin href="/assets/activity-YogQEteU.js">
|
|
43
47
|
<link rel="modulepreload" crossorigin href="/assets/bot-DjLkhyZL.js">
|
|
44
48
|
<link rel="modulepreload" crossorigin href="/assets/chevron-left-DqFhpbvK.js">
|
|
45
49
|
<link rel="modulepreload" crossorigin href="/assets/chevron-right-BweFrslA.js">
|
|
46
50
|
<link rel="modulepreload" crossorigin href="/assets/dist-C3DSFZCi.js">
|
|
47
|
-
<link rel="modulepreload" crossorigin href="/assets/skeleton-
|
|
51
|
+
<link rel="modulepreload" crossorigin href="/assets/skeleton-BI5TyibZ.js">
|
|
48
52
|
<link rel="modulepreload" crossorigin href="/assets/settings-shell-dialog-layer-BU3UuiJr.js">
|
|
49
|
-
<link rel="modulepreload" crossorigin href="/assets/popover-select-
|
|
53
|
+
<link rel="modulepreload" crossorigin href="/assets/popover-select-DHC7J4lG.js">
|
|
50
54
|
<link rel="modulepreload" crossorigin href="/assets/circle-alert-BEjgurr2.js">
|
|
51
55
|
<link rel="modulepreload" crossorigin href="/assets/circle-check-C23XjkUj.js">
|
|
52
56
|
<link rel="modulepreload" crossorigin href="/assets/circle-dashed-8qMD7gHf.js">
|
|
@@ -61,7 +65,7 @@
|
|
|
61
65
|
<link rel="modulepreload" crossorigin href="/assets/form-field-width-DJw_jULe.js">
|
|
62
66
|
<link rel="modulepreload" crossorigin href="/assets/interaction-BdhHBbYa.js">
|
|
63
67
|
<link rel="modulepreload" crossorigin href="/assets/is-masked-secret-DOkL5b_X.js">
|
|
64
|
-
<link rel="modulepreload" crossorigin href="/assets/secret-input-
|
|
68
|
+
<link rel="modulepreload" crossorigin href="/assets/secret-input-BxWHx6J6.js">
|
|
65
69
|
<link rel="modulepreload" crossorigin href="/assets/folder-open-CyzJ19I9.js">
|
|
66
70
|
<link rel="modulepreload" crossorigin href="/assets/message-square-plus-XP0tGdlV.js">
|
|
67
71
|
<link rel="modulepreload" crossorigin href="/assets/minimize-2-DtOGrlpo.js">
|
|
@@ -69,54 +73,53 @@
|
|
|
69
73
|
<link rel="modulepreload" crossorigin href="/assets/rotate-cw-LIg3Am9S.js">
|
|
70
74
|
<link rel="modulepreload" crossorigin href="/assets/search-DA7gz22f.js">
|
|
71
75
|
<link rel="modulepreload" crossorigin href="/assets/index.module-Cd9ENXfk.js">
|
|
72
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-
|
|
73
|
-
<link rel="modulepreload" crossorigin href="/assets/session-api-
|
|
76
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-BS6l0_QM.js">
|
|
77
|
+
<link rel="modulepreload" crossorigin href="/assets/session-api-DYl61CUz.js">
|
|
74
78
|
<link rel="modulepreload" crossorigin href="/assets/constants-Dy8Gw0sF.js">
|
|
75
79
|
<link rel="modulepreload" crossorigin href="/assets/app-chrome-BeB4KgOf.js">
|
|
76
80
|
<link rel="modulepreload" crossorigin href="/assets/attachment-utils-core-BIOUBrpT.js">
|
|
77
81
|
<link rel="modulepreload" crossorigin href="/assets/files-Bw4SBGdM.js">
|
|
78
|
-
<link rel="modulepreload" crossorigin href="/assets/workspace-api-
|
|
82
|
+
<link rel="modulepreload" crossorigin href="/assets/workspace-api-DdkViIn3.js">
|
|
79
83
|
<link rel="modulepreload" crossorigin href="/assets/electron-env-Dit0bHgy.js">
|
|
80
84
|
<link rel="modulepreload" crossorigin href="/assets/use-async-resource-GrnWNwMZ.js">
|
|
81
|
-
<link rel="modulepreload" crossorigin href="/assets/activity-store-
|
|
82
|
-
<link rel="modulepreload" crossorigin href="/assets/use-file-preview-expanded-
|
|
85
|
+
<link rel="modulepreload" crossorigin href="/assets/activity-store-CKTm4K1I.js">
|
|
86
|
+
<link rel="modulepreload" crossorigin href="/assets/use-file-preview-expanded-CleMXYWu.js">
|
|
83
87
|
<link rel="modulepreload" crossorigin href="/assets/mic-CuUb7zc-.js">
|
|
84
88
|
<link rel="modulepreload" crossorigin href="/assets/globe-DSSGFWFn.js">
|
|
85
|
-
<link rel="modulepreload" crossorigin href="/assets/share-link-dialog-
|
|
86
|
-
<link rel="modulepreload" crossorigin href="/assets/local-session-drafts-
|
|
89
|
+
<link rel="modulepreload" crossorigin href="/assets/share-link-dialog-Bht78zB4.js">
|
|
90
|
+
<link rel="modulepreload" crossorigin href="/assets/local-session-drafts-DdLyLxCp.js">
|
|
87
91
|
<link rel="modulepreload" crossorigin href="/assets/tasks-DwKXgZ-I.js">
|
|
88
|
-
<link rel="modulepreload" crossorigin href="/assets/capabilities-
|
|
92
|
+
<link rel="modulepreload" crossorigin href="/assets/capabilities-BFuas9nS.js">
|
|
89
93
|
<link rel="modulepreload" crossorigin href="/assets/skill-wire-pattern-BPpeIcCi.js">
|
|
90
|
-
<link rel="modulepreload" crossorigin href="/assets/shares-api-
|
|
91
|
-
<link rel="modulepreload" crossorigin href="/assets/capabilities-
|
|
92
|
-
<link rel="modulepreload" crossorigin href="/assets/use-composer-attachments-
|
|
94
|
+
<link rel="modulepreload" crossorigin href="/assets/shares-api-k1DyfoGP.js">
|
|
95
|
+
<link rel="modulepreload" crossorigin href="/assets/capabilities-DFR31Yhq.js">
|
|
96
|
+
<link rel="modulepreload" crossorigin href="/assets/use-composer-attachments-C7M9p0kf.js">
|
|
93
97
|
<link rel="modulepreload" crossorigin href="/assets/git-branch-Dh9uxTot.js">
|
|
94
|
-
<link rel="modulepreload" crossorigin href="/assets/notes-api-
|
|
98
|
+
<link rel="modulepreload" crossorigin href="/assets/notes-api-1TYlEpD2.js">
|
|
95
99
|
<link rel="modulepreload" crossorigin href="/assets/message-square-fVE7Ghj1.js">
|
|
96
100
|
<link rel="modulepreload" crossorigin href="/assets/pause-DuPxgSxk.js">
|
|
97
101
|
<link rel="modulepreload" crossorigin href="/assets/play-kxZvpBg8.js">
|
|
98
102
|
<link rel="modulepreload" crossorigin href="/assets/rotate-ccw-JM1TBLpp.js">
|
|
99
103
|
<link rel="modulepreload" crossorigin href="/assets/settings-2-D-csvaET.js">
|
|
100
104
|
<link rel="modulepreload" crossorigin href="/assets/sparkles-DHlfQFAF.js">
|
|
101
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
102
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-
|
|
103
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-BGhPOSfz.js">
|
|
105
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-store-U3lzqE82.js">
|
|
106
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-realtime-DMpsQXjn.js">
|
|
104
107
|
<link rel="modulepreload" crossorigin href="/assets/tool-activity-BtJkgjFf.js">
|
|
105
|
-
<link rel="modulepreload" crossorigin href="/assets/registry-api-
|
|
106
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-
|
|
107
|
-
<link rel="modulepreload" crossorigin href="/assets/agents-admin-api-
|
|
108
|
-
<link rel="modulepreload" crossorigin href="/assets/session-manager-
|
|
109
|
-
<link rel="modulepreload" crossorigin href="/assets/send-session-input-
|
|
110
|
-
<link rel="modulepreload" crossorigin href="/assets/theme-store-
|
|
111
|
-
<link rel="modulepreload" crossorigin href="/assets/extension-provider-
|
|
108
|
+
<link rel="modulepreload" crossorigin href="/assets/registry-api-BPFXyHk8.js">
|
|
109
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-config-swr-iceAEoJZ.js">
|
|
110
|
+
<link rel="modulepreload" crossorigin href="/assets/agents-admin-api-6aesahV-.js">
|
|
111
|
+
<link rel="modulepreload" crossorigin href="/assets/session-manager-J3r-UiPc.js">
|
|
112
|
+
<link rel="modulepreload" crossorigin href="/assets/send-session-input-G334tGIw.js">
|
|
113
|
+
<link rel="modulepreload" crossorigin href="/assets/theme-store-C2WOFv9Y.js">
|
|
114
|
+
<link rel="modulepreload" crossorigin href="/assets/extension-provider-DF9qV04X.js">
|
|
112
115
|
<link rel="modulepreload" crossorigin href="/assets/loopi-Djb8XU3l.js">
|
|
113
|
-
<link rel="modulepreload" crossorigin href="/assets/models-hub-cache-
|
|
116
|
+
<link rel="modulepreload" crossorigin href="/assets/models-hub-cache-BFSZUHQI.js">
|
|
114
117
|
<link rel="modulepreload" crossorigin href="/assets/skill-api-utils-C7V4JVXM.js">
|
|
115
118
|
<link rel="modulepreload" crossorigin href="/assets/date-formatters-CUZAyDEg.js">
|
|
116
119
|
<link rel="modulepreload" crossorigin href="/assets/settings-form-draft-Dy10ldo8.js">
|
|
117
|
-
<link rel="stylesheet" crossorigin href="/assets/markdown-view-
|
|
120
|
+
<link rel="stylesheet" crossorigin href="/assets/markdown-view-ByJbFign.css">
|
|
118
121
|
<link rel="stylesheet" crossorigin href="/assets/loopi-C09I2mNj.css">
|
|
119
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
122
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BnHaXfFv.css">
|
|
120
123
|
</head>
|
|
121
124
|
<body>
|
|
122
125
|
<div id="root"></div>
|
package/dist/package.js
CHANGED
|
@@ -136,7 +136,7 @@ var EmbeddedSessionRunnerPool = class {
|
|
|
136
136
|
const existing = this.pool.get(params.runtimeId);
|
|
137
137
|
let entry;
|
|
138
138
|
let reused = false;
|
|
139
|
-
if (reuseEnabled && existing && existing.fingerprint === fingerprint) {
|
|
139
|
+
if (reuseEnabled && existing && !existing.invalidated && existing.fingerprint === fingerprint) {
|
|
140
140
|
this.clearIdleTimer(existing);
|
|
141
141
|
entry = existing;
|
|
142
142
|
entry.lastUsedAt = Date.now();
|
|
@@ -159,11 +159,21 @@ var EmbeddedSessionRunnerPool = class {
|
|
|
159
159
|
policyRevision: executionToolPolicy.revision
|
|
160
160
|
}, "Created embedded session runner");
|
|
161
161
|
}
|
|
162
|
+
entry.activeLeases++;
|
|
163
|
+
let released = false;
|
|
162
164
|
return {
|
|
163
165
|
session: entry.session,
|
|
164
166
|
piSm: entry.piSm,
|
|
165
167
|
reused,
|
|
166
168
|
release: () => {
|
|
169
|
+
if (released || this.pool.get(params.runtimeId) !== entry) return;
|
|
170
|
+
released = true;
|
|
171
|
+
entry.activeLeases--;
|
|
172
|
+
if (entry.activeLeases > 0) return;
|
|
173
|
+
if (entry.invalidated) {
|
|
174
|
+
this.disposePooledRunner(params.runtimeId, entry, "external_tool_connection_changed");
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
167
177
|
if (!this.isEnabledFn()) {
|
|
168
178
|
this.disposePooledRunner(params.runtimeId, entry, "runner_disabled");
|
|
169
179
|
return;
|
|
@@ -306,11 +316,19 @@ var EmbeddedSessionRunnerPool = class {
|
|
|
306
316
|
baseStreamFn,
|
|
307
317
|
lastUsedAt: Date.now(),
|
|
308
318
|
idleTimer: null,
|
|
319
|
+
activeLeases: 0,
|
|
320
|
+
invalidated: false,
|
|
309
321
|
releaseInvalidations: tools.flatMap((tool) => {
|
|
310
322
|
const subscribe = getXopcToolMetadata(tool)?.subscribeInvalidation;
|
|
311
323
|
if (!subscribe) return [];
|
|
312
|
-
return [subscribe(() => {
|
|
313
|
-
|
|
324
|
+
return [subscribe((reason) => {
|
|
325
|
+
const current = this.pool.get(runtimeId);
|
|
326
|
+
if (current?.session !== session) return;
|
|
327
|
+
if (reason === "connection" && current.activeLeases > 0) {
|
|
328
|
+
current.invalidated = true;
|
|
329
|
+
log.info({ runtimeId }, "Device connection changed; runner will refresh after the active turn");
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
314
332
|
abortEmbeddedRun(runtimeId);
|
|
315
333
|
this.evict(runtimeId, "external_tool_catalog_changed");
|
|
316
334
|
})];
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { AgentTool, BeforeToolCallContext } from '@earendil-works/pi-agent-core';
|
|
2
2
|
import type { ToolDefinition } from '@earendil-works/pi-coding-agent';
|
|
3
|
+
export type ToolInvalidationReason = 'connection' | 'authorization';
|
|
3
4
|
export type XopcToolMetadata = Pick<ToolDefinition, 'exposure' | 'namespace' | 'annotations' | 'outputSchema'> & {
|
|
4
5
|
external?: {
|
|
5
6
|
toolRef: string;
|
|
6
7
|
revision: string;
|
|
7
8
|
readOnly: boolean;
|
|
8
9
|
};
|
|
9
|
-
subscribeInvalidation?: (listener: () => void) => () => void;
|
|
10
|
+
subscribeInvalidation?: (listener: (reason?: ToolInvalidationReason) => void) => () => void;
|
|
10
11
|
};
|
|
11
12
|
export declare function setXopcToolMetadata(tool: AgentTool, metadata: XopcToolMetadata): AgentTool;
|
|
12
13
|
export declare function getXopcToolMetadata(tool: AgentTool): XopcToolMetadata | undefined;
|
|
@@ -73,15 +73,18 @@ function createDefaultExternalToolGatewayTools(deps) {
|
|
|
73
73
|
registry.subscribeInvalidation = (conversationId, ref, listener) => {
|
|
74
74
|
const parsed = parseExternalToolRef(ref, "endpoint");
|
|
75
75
|
if (!parsed) return () => {};
|
|
76
|
-
const releaseEndpoint = endpoints.registry.onChange((id) => {
|
|
77
|
-
if (id === parsed?.namespace) listener();
|
|
76
|
+
const releaseEndpoint = endpoints.registry.onChange((id, reason) => {
|
|
77
|
+
if (id === parsed?.namespace) listener(reason ?? "connection");
|
|
78
78
|
});
|
|
79
|
+
const principalId = endpoints.registry.get(parsed.namespace)?.principalId;
|
|
80
|
+
const releasePrincipal = principalId ? endpoints.registry.onPrincipalRevoked(principalId, () => listener("authorization")) : () => {};
|
|
79
81
|
const releaseBinding = endpoints.bindings.onChange((id) => {
|
|
80
|
-
if (id === conversationId) listener();
|
|
82
|
+
if (id === conversationId) listener("authorization");
|
|
81
83
|
});
|
|
82
84
|
return () => {
|
|
83
85
|
releaseEndpoint();
|
|
84
86
|
releaseBinding();
|
|
87
|
+
releasePrincipal();
|
|
85
88
|
};
|
|
86
89
|
};
|
|
87
90
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { AgentTool } from '@earendil-works/pi-agent-core';
|
|
2
2
|
import type { ExternalToolService } from './service.js';
|
|
3
3
|
import type { ExternalToolSource } from './types.js';
|
|
4
|
+
import type { ToolInvalidationReason } from '../embedded/tool-metadata.js';
|
|
4
5
|
import type { ToolExecutorConfig } from '../tools/executor.js';
|
|
5
6
|
export interface ExternalToolRegistry {
|
|
6
7
|
service: ExternalToolService;
|
|
7
8
|
nativeSources: readonly ExternalToolSource[];
|
|
8
9
|
execute: AgentTool['execute'];
|
|
9
10
|
executorConfig?: Partial<ToolExecutorConfig>;
|
|
10
|
-
subscribeInvalidation?: (conversationId: string, toolRef: string, listener: () => void) => () => void;
|
|
11
|
+
subscribeInvalidation?: (conversationId: string, toolRef: string, listener: (reason?: ToolInvalidationReason) => void) => () => void;
|
|
11
12
|
}
|
|
12
13
|
/** Keep the host executor available without exposing its registry in model declarations. */
|
|
13
14
|
export declare function bindExternalToolRegistry(tool: AgentTool, registry: ExternalToolRegistry): void;
|
|
@@ -30,7 +30,10 @@ export declare class EndpointRegistry {
|
|
|
30
30
|
private readonly policy;
|
|
31
31
|
private readonly connectionByEndpointId;
|
|
32
32
|
private readonly changeListeners;
|
|
33
|
-
onChange(listener: (endpointId: string) => void): () => void;
|
|
33
|
+
onChange(listener: (endpointId: string, reason?: 'connection' | 'authorization') => void): () => void;
|
|
34
|
+
private readonly principalRevocationListeners;
|
|
35
|
+
onPrincipalRevoked(principalId: string, listener: () => void): () => void;
|
|
36
|
+
revokePrincipal(principalId: string): void;
|
|
34
37
|
constructor(policy?: EndpointToolPolicy);
|
|
35
38
|
register(hello: EndpointHelloPayload, connectionId: string, transport: EndpointTransport, now?: number): EndpointRegistration;
|
|
36
39
|
remove(endpointId: string, connectionId: string): boolean;
|
|
@@ -29,6 +29,19 @@ var EndpointRegistry = class {
|
|
|
29
29
|
this.changeListeners.delete(listener);
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
+
principalRevocationListeners = /* @__PURE__ */ new Map();
|
|
33
|
+
onPrincipalRevoked(principalId, listener) {
|
|
34
|
+
const listeners = this.principalRevocationListeners.get(principalId) ?? /* @__PURE__ */ new Set();
|
|
35
|
+
listeners.add(listener);
|
|
36
|
+
this.principalRevocationListeners.set(principalId, listeners);
|
|
37
|
+
return () => {
|
|
38
|
+
listeners.delete(listener);
|
|
39
|
+
if (!listeners.size) this.principalRevocationListeners.delete(principalId);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
revokePrincipal(principalId) {
|
|
43
|
+
for (const listener of [...this.principalRevocationListeners.get(principalId) ?? []]) listener();
|
|
44
|
+
}
|
|
32
45
|
constructor(policy = new EndpointToolPolicy()) {
|
|
33
46
|
this.policy = policy;
|
|
34
47
|
}
|
|
@@ -114,6 +127,7 @@ var EndpointRegistry = class {
|
|
|
114
127
|
disconnect(endpointId, code = 4003, reason = "Endpoint disconnected") {
|
|
115
128
|
const connection = this.connectionByEndpointId.get(endpointId);
|
|
116
129
|
if (!connection) return false;
|
|
130
|
+
for (const listener of this.changeListeners) listener(endpointId, "authorization");
|
|
117
131
|
connection.transport.close(code, reason);
|
|
118
132
|
return true;
|
|
119
133
|
}
|
|
@@ -231,6 +231,7 @@ function registerDeviceRoutes(authenticated, deps) {
|
|
|
231
231
|
}, 403);
|
|
232
232
|
const revoked = revokeDevice(principal.deviceId);
|
|
233
233
|
if (revoked) {
|
|
234
|
+
deps.service.endpointTools.registry.revokePrincipal(principal.deviceId);
|
|
234
235
|
deps.service.realtime.disconnectPrincipal(principal.deviceId);
|
|
235
236
|
deps.service.voiceRealtime.disconnectPrincipal(principal.deviceId);
|
|
236
237
|
}
|
|
@@ -103,6 +103,7 @@ function registerEndpointToolRoutes(authenticated, deps) {
|
|
|
103
103
|
const principal = getEndpointPrincipal(id);
|
|
104
104
|
const accessRevoked = Boolean(access && access.revokedAt === void 0 && revokeDevice(id));
|
|
105
105
|
const principalRevoked = Boolean(principal && principal.revokedAt === void 0 && revokeEndpointPrincipal(id));
|
|
106
|
+
if (accessRevoked || principalRevoked) deps.service.endpointTools.registry.revokePrincipal(id);
|
|
106
107
|
if (accessRevoked) {
|
|
107
108
|
deps.service.realtime.disconnectPrincipal(id);
|
|
108
109
|
deps.service.voiceRealtime.disconnectPrincipal(id);
|
|
@@ -94,6 +94,10 @@ import { DiscussionSealer } from "../discussions/sealer.js";
|
|
|
94
94
|
import "../discussions/index.js";
|
|
95
95
|
import { EndpointToolRuntime } from "../endpoint-tools/runtime.js";
|
|
96
96
|
import "../endpoint-tools/index.js";
|
|
97
|
+
import { HomeCapabilityPreflightService } from "../home-intelligence/capability-preflight.js";
|
|
98
|
+
import { HomeAdviceGenerator } from "../home-intelligence/generator.js";
|
|
99
|
+
import { HomeIntelligenceHost } from "../home-intelligence/host.js";
|
|
100
|
+
import { HomeSnapshotBuilder } from "../home-intelligence/snapshot.js";
|
|
97
101
|
import { assertGatewayAuthConfigured, extractToken, resolveGatewayAuth, validateToken } from "./auth.js";
|
|
98
102
|
import { prepareAutomationAgentSession } from "./automation-agent-session.js";
|
|
99
103
|
import { stopTailscaleExposure } from "./tailscale-lifecycle.js";
|
|
@@ -155,10 +159,6 @@ import { TaskMainUpdateDecisionService } from "../tasks/task-main-update-decisio
|
|
|
155
159
|
import { selectTaskMainUpdateAttempt, submitAndConfirmTaskMainUpdate } from "../tasks/task-main-update-input.js";
|
|
156
160
|
import { checkAppContextAccess, prepareAppContext } from "./service/app-context-access.js";
|
|
157
161
|
import { applyAutomaticVoiceLanguage, inferProductLanguageFromEnvironment, initializeVoiceDefaults } from "../voice/language-profile.js";
|
|
158
|
-
import { HomeAdviceGenerator } from "../home-intelligence/generator.js";
|
|
159
|
-
import { HomeIntelligenceHost } from "../home-intelligence/host.js";
|
|
160
|
-
import { HomeSnapshotBuilder } from "../home-intelligence/snapshot.js";
|
|
161
|
-
import { HomeCapabilityPreflightService } from "../home-intelligence/capability-preflight.js";
|
|
162
162
|
import crypto from "node:crypto";
|
|
163
163
|
//#region src/gateway/service.ts
|
|
164
164
|
init_session_repository();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { HomeAdviceBudgetExceededError, isHomeProseLocalized } from "./generator.js";
|
|
4
3
|
import { homePatternKey } from "./strategy.js";
|
|
5
|
-
import { HomeAdvicePolicy } from "./policy.js";
|
|
6
4
|
import { HomeIntelligenceRepository } from "./repository.js";
|
|
7
5
|
import { HomeOpportunityApplicationService } from "./application-service.js";
|
|
6
|
+
import { HomeAdvicePolicy } from "./policy.js";
|
|
7
|
+
import { HomeAdviceBudgetExceededError, isHomeProseLocalized } from "./generator.js";
|
|
8
8
|
import { buildHomeOpportunityNotification } from "./notification.js";
|
|
9
9
|
import { createHash } from "node:crypto";
|
|
10
10
|
//#region src/home-intelligence/host.ts
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type CommandRunner } from './run-command.js';
|
|
2
|
+
/** Check the candidate's complete gateway import graph in a fresh, isolated process. */
|
|
3
|
+
export declare function verifyInstalledGatewayRuntime(params: {
|
|
4
|
+
packageRoot: string;
|
|
5
|
+
runCommand?: CommandRunner;
|
|
6
|
+
env?: NodeJS.ProcessEnv;
|
|
7
|
+
}): Promise<string[]>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { createDefaultCommandRunner } from "./run-command.js";
|
|
2
|
+
import os from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { pathToFileURL } from "node:url";
|
|
5
|
+
import fs from "node:fs/promises";
|
|
6
|
+
//#region src/infra/package-runtime-check.ts
|
|
7
|
+
/** Check the candidate's complete gateway import graph in a fresh, isolated process. */
|
|
8
|
+
async function verifyInstalledGatewayRuntime(params) {
|
|
9
|
+
const stateDir = await fs.mkdtemp(path.join(os.tmpdir(), "xopc-runtime-check-"));
|
|
10
|
+
try {
|
|
11
|
+
const entry = pathToFileURL(path.resolve(params.packageRoot, "dist/src/gateway/index.js")).href;
|
|
12
|
+
const script = `const module = await import(${JSON.stringify(entry)});
|
|
13
|
+
if (typeof module.GatewayServer !== 'function') throw new Error('Missing GatewayServer export');
|
|
14
|
+
process.exit(0);`;
|
|
15
|
+
const probePath = path.join(stateDir, "probe.mjs");
|
|
16
|
+
await fs.writeFile(probePath, script);
|
|
17
|
+
const result = await (params.runCommand ?? createDefaultCommandRunner())([process.execPath, probePath], {
|
|
18
|
+
cwd: params.packageRoot,
|
|
19
|
+
timeoutMs: 3e4,
|
|
20
|
+
env: {
|
|
21
|
+
...params.env ?? process.env,
|
|
22
|
+
XOPC_STATE_DIR: stateDir,
|
|
23
|
+
XOPC_CONFIG: path.join(stateDir, "xopc.json"),
|
|
24
|
+
XOPC_CONFIG_PATH: path.join(stateDir, "xopc.json"),
|
|
25
|
+
XOPC_WORKSPACE: path.join(stateDir, "workspace"),
|
|
26
|
+
XOPC_LOG_DIR: path.join(stateDir, "logs"),
|
|
27
|
+
XOPC_LOG_CONSOLE: "false",
|
|
28
|
+
XOPC_LOG_FILE: "false"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return result.code === 0 ? [] : [`Gateway runtime import failed: ${(result.stderr || result.stdout || `exit ${result.code}`).slice(-8e3)}`];
|
|
32
|
+
} catch (err) {
|
|
33
|
+
return [`Gateway runtime import failed: ${err instanceof Error ? err.message : String(err)}`];
|
|
34
|
+
} finally {
|
|
35
|
+
await fs.rm(stateDir, {
|
|
36
|
+
recursive: true,
|
|
37
|
+
force: true
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { verifyInstalledGatewayRuntime };
|
|
@@ -261,7 +261,9 @@ async function runGlobalPackageUpdateSteps(params) {
|
|
|
261
261
|
if (!stagedInstall) afterVersion = candidateVersion;
|
|
262
262
|
const verificationErrors = await collectInstalledGlobalPackageErrors({
|
|
263
263
|
packageRoot: verificationPackageRoot,
|
|
264
|
-
expectedVersion: resolveExpectedInstalledVersionFromSpec(params.installSpec)
|
|
264
|
+
expectedVersion: resolveExpectedInstalledVersionFromSpec(params.installSpec),
|
|
265
|
+
runCommand: params.runCommand,
|
|
266
|
+
env: params.env
|
|
265
267
|
});
|
|
266
268
|
if (verificationErrors.length > 0) steps.push({
|
|
267
269
|
name: "global install verify",
|
|
@@ -27,6 +27,8 @@ export declare function resolveExpectedInstalledVersionFromSpec(spec: string): s
|
|
|
27
27
|
export declare function collectInstalledGlobalPackageErrors(params: {
|
|
28
28
|
packageRoot: string;
|
|
29
29
|
expectedVersion?: string | null;
|
|
30
|
+
runCommand?: CommandRunner;
|
|
31
|
+
env?: NodeJS.ProcessEnv;
|
|
30
32
|
}): Promise<string[]>;
|
|
31
33
|
export declare function resolveGlobalRoot(managerOrCommand: GlobalInstallManager | ResolvedGlobalInstallCommand, runCommand: CommandRunner, timeoutMs: number, pkgRoot?: string | null): Promise<string | null>;
|
|
32
34
|
export declare function resolveGlobalPackageRoot(managerOrCommand: GlobalInstallManager | ResolvedGlobalInstallCommand, runCommand: CommandRunner, timeoutMs: number, pkgRoot?: string | null): Promise<string | null>;
|
|
@@ -2,6 +2,7 @@ import { applyPathPrepend } from "./path-prepend.js";
|
|
|
2
2
|
import { resolveExecPathBinPrepend } from "./path-env.js";
|
|
3
3
|
import { readPackageVersion } from "./package-json.js";
|
|
4
4
|
import { createDefaultCommandRunner } from "./run-command.js";
|
|
5
|
+
import { verifyInstalledGatewayRuntime } from "./package-runtime-check.js";
|
|
5
6
|
import path from "node:path";
|
|
6
7
|
import fs from "node:fs";
|
|
7
8
|
import fs$1 from "node:fs/promises";
|
|
@@ -142,6 +143,7 @@ async function collectInstalledGlobalPackageErrors(params) {
|
|
|
142
143
|
const installedVersion = await readPackageVersion(params.packageRoot);
|
|
143
144
|
if (params.expectedVersion && installedVersion !== params.expectedVersion) errors.push(`expected installed version ${params.expectedVersion}, found ${installedVersion ?? "<missing>"}`);
|
|
144
145
|
if (!installedVersion) errors.push("missing package.json version");
|
|
146
|
+
if (errors.length === 0) errors.push(...await verifyInstalledGatewayRuntime(params));
|
|
145
147
|
return errors;
|
|
146
148
|
}
|
|
147
149
|
async function resolveGlobalRoot(managerOrCommand, runCommand, timeoutMs, pkgRoot) {
|
|
@@ -126,6 +126,7 @@ async function openPlatformStt(request) {
|
|
|
126
126
|
if (!ready || typeof event.item_id !== "string" || typeof event.text !== "string") throw new Error("Invalid platform transcript");
|
|
127
127
|
let sentence = sentences.get(event.item_id);
|
|
128
128
|
if (sentence?.final) return;
|
|
129
|
+
if (!sentence && !event.text.trim()) return;
|
|
129
130
|
if (!sentence) {
|
|
130
131
|
if (sentences.size >= 1e4) throw new Error("Transcript limit exceeded");
|
|
131
132
|
sentence = {
|
|
@@ -46,6 +46,8 @@ function createAgentVoiceEngine(options) {
|
|
|
46
46
|
const deliveredReplies = /* @__PURE__ */ new Set();
|
|
47
47
|
let lastUserSpeechAt = 0;
|
|
48
48
|
let openingInputSeen = false;
|
|
49
|
+
let preparedGreeting;
|
|
50
|
+
const greetingAbort = new AbortController();
|
|
49
51
|
const turn = new TurnCoordinator(claim.silenceDurationMs, (text, decision, turnId) => {
|
|
50
52
|
if (closed || muted) return;
|
|
51
53
|
const receivedAtMs = turnReceivedAtMs ?? Date.now();
|
|
@@ -131,6 +133,11 @@ function createAgentVoiceEngine(options) {
|
|
|
131
133
|
}
|
|
132
134
|
function openSpeech(response, job) {
|
|
133
135
|
if (job.opening) return job.opening;
|
|
136
|
+
if (response.opening && preparedGreeting?.responseId === response.id) {
|
|
137
|
+
job.opening = preparedGreeting.audio;
|
|
138
|
+
preparedGreeting = void 0;
|
|
139
|
+
return job.opening;
|
|
140
|
+
}
|
|
134
141
|
if (response.firstSynthesisAtMs === void 0) {
|
|
135
142
|
response.firstSynthesisAtMs = Date.now();
|
|
136
143
|
log.info({
|
|
@@ -348,7 +355,7 @@ function createAgentVoiceEngine(options) {
|
|
|
348
355
|
}
|
|
349
356
|
}, Math.max(0, opening.deadlineAt - Date.now()));
|
|
350
357
|
try {
|
|
351
|
-
const speechOpening = prepareSpeechStreamSession(claim.tts.config, {
|
|
358
|
+
const speechOpening = opening && preparedGreeting?.responseId === response.id ? void 0 : prepareSpeechStreamSession(claim.tts.config, {
|
|
352
359
|
appConfig: claim.config,
|
|
353
360
|
signal: response.abortController.signal,
|
|
354
361
|
allowFallback: false
|
|
@@ -710,6 +717,46 @@ function createAgentVoiceEngine(options) {
|
|
|
710
717
|
taskUpdateQueued = false;
|
|
711
718
|
});
|
|
712
719
|
},
|
|
720
|
+
async prepareOpeningGreeting(input) {
|
|
721
|
+
if (!claim.tts || closed || preparedGreeting) return;
|
|
722
|
+
const audio = (async () => {
|
|
723
|
+
const result = await speakStream(input.text, claim.tts.config, {
|
|
724
|
+
appConfig: claim.config,
|
|
725
|
+
parseDirectives: false,
|
|
726
|
+
allowFallback: false,
|
|
727
|
+
signal: AbortSignal.any([
|
|
728
|
+
options.signal,
|
|
729
|
+
greetingAbort.signal,
|
|
730
|
+
AbortSignal.timeout(1e4)
|
|
731
|
+
])
|
|
732
|
+
});
|
|
733
|
+
try {
|
|
734
|
+
if (result.outputFormat !== "pcm") throw new Error("Opening greeting requires PCM audio");
|
|
735
|
+
const chunks = [];
|
|
736
|
+
let bytes = 0;
|
|
737
|
+
for await (const chunk of result.audioStream) {
|
|
738
|
+
bytes += chunk.byteLength;
|
|
739
|
+
if (bytes > 48e4) throw new Error("Opening greeting audio exceeds ten seconds");
|
|
740
|
+
chunks.push(Uint8Array.from(chunk));
|
|
741
|
+
}
|
|
742
|
+
return { result: {
|
|
743
|
+
...result,
|
|
744
|
+
release: async () => {},
|
|
745
|
+
audioStream: new ReadableStream({ start(controller) {
|
|
746
|
+
for (const chunk of chunks) controller.enqueue(chunk);
|
|
747
|
+
controller.close();
|
|
748
|
+
} })
|
|
749
|
+
} };
|
|
750
|
+
} finally {
|
|
751
|
+
await result.release();
|
|
752
|
+
}
|
|
753
|
+
})().catch((error) => ({ error }));
|
|
754
|
+
preparedGreeting = {
|
|
755
|
+
responseId: input.responseId,
|
|
756
|
+
audio
|
|
757
|
+
};
|
|
758
|
+
await audio;
|
|
759
|
+
},
|
|
713
760
|
async offerOpeningGreeting(input) {
|
|
714
761
|
if (openingInputSeen || !canOfferTaskUpdateInput() || options.runtime.sessionBusy(claim.request.conversationId)) return "skipped";
|
|
715
762
|
const opening = {
|
|
@@ -719,7 +766,7 @@ function createAgentVoiceEngine(options) {
|
|
|
719
766
|
const attempt = conversationTail.then(async () => {
|
|
720
767
|
if (Date.now() >= input.deadlineAt) return "expired";
|
|
721
768
|
if (openingInputSeen || !canOfferTaskUpdateInput() || options.runtime.sessionBusy(claim.request.conversationId)) return "skipped";
|
|
722
|
-
await runAssistantTurn(input.text, input.responseId, void 0,
|
|
769
|
+
await runAssistantTurn(input.text, input.responseId, void 0, Date.now(), Date.now(), opening);
|
|
723
770
|
return opening.result;
|
|
724
771
|
});
|
|
725
772
|
conversationTail = attempt.then(() => {}, () => {});
|
|
@@ -802,6 +849,8 @@ function createAgentVoiceEngine(options) {
|
|
|
802
849
|
close() {
|
|
803
850
|
if (closing) return closing;
|
|
804
851
|
closed = true;
|
|
852
|
+
greetingAbort.abort("session_closed");
|
|
853
|
+
preparedGreeting = void 0;
|
|
805
854
|
turn.reset();
|
|
806
855
|
echoCandidates.clear();
|
|
807
856
|
cancelActiveResponse("session_closed");
|
|
@@ -5,6 +5,10 @@ export type VoiceEventSink = <T extends VoiceServerEvent['type']>(type: T, paylo
|
|
|
5
5
|
}>['payload']) => void;
|
|
6
6
|
export interface VoiceEngine {
|
|
7
7
|
start(): Promise<void>;
|
|
8
|
+
prepareOpeningGreeting?(input: {
|
|
9
|
+
responseId: string;
|
|
10
|
+
text: string;
|
|
11
|
+
}): Promise<void>;
|
|
8
12
|
offerOpeningGreeting?(input: {
|
|
9
13
|
responseId: string;
|
|
10
14
|
text: string;
|