@xopcai/xopc 0.0.363 → 0.0.366
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/dist/sidepanel.js +16 -4
- 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-GvR2gZ0T.js → activity-store-SVmnh__i.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-DkcXyPH0.js → agent-avatar-dicebear-CS9lg5h2.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-B-l5AaYN.js → agent-defaults-settings-panel-CvUPtxS4.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-BY6tPYOK.js → agent-plugin-dialog-1tRxDfjI.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-admin-api-BkXb7VEZ.js → agents-admin-api-CVdFV-cU.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-CdSEoeje.js → agents-gdT0whx9.js} +3 -3
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BtD53cfe.js → app-management-settings-panel-CaxnUxvy.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BAweWgX_.js → appearance-settings-6NKquG3v.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-CS6-hrIB.js → apps-page-BoB3MbsB.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-CKe3qAaL.js → archive-plugin-BWtLZtK1.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CtE8r9Y2.js → automations-page-CNngHw2c.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-pnMgR4Da.js → automations-workspace-BKHsdiQ8.js} +1 -1
- package/dist/gateway/static/root/assets/{binary-plugins-J51oS7-D.js → binary-plugins-fIhH-wg6.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-D5hf6WcP.js → block-editor-BhstSZNE.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automation-inputs-5B3qAdmb.js → browser-automation-inputs-B6sOBxVA.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-PZDQlXH4.js → browser-automations-page-HZAKkVVt.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-2YDV-ZWt.js → browser-settings-page-D8IpVQI6.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-CT_ZW9fT.js → capabilities-C4grvUkw.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-BKu9BqPe.js → capabilities-CAIQmCrH.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-CB-iX3Fy.js → capabilities-page-DK8FJRW4.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-BCTuWNaW.js → capabilities-settings-panel-BP2roWcM.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-header-actions--aC5XB9E.js → capability-header-actions-BA1M7RRP.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-JnAQP1bt.js → channels-EQGCxr8W.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-BFZEpvzn.js → chat-terminal-dock-KS_yk1H7.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-Dc9ooEM-.js → computer-settings-page-CGBR0KFw.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-1_QB5D-t.js → connector-service-page-CY_3H_l9.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-Um_Jy5zh.js → connectors-page-CUOL6JX0.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-C9ZqTPui.js → date-picker-CDSZ-PWV.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-DBz0Pmyr.js → dependency-picker-CyNH4m20.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-BLtp2MmX.js → desktop-pet-BsZQsQ2_.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BNGbqwec.js → desktop-pet-settings-DMgkUy6g.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-7rdo-A7d.js → device-pairing-wizard-JjbUN8y-.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-BnilGgwM.js → directory-picker-path-field-CBTI3tKh.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-BGyJpRv4.js → extension-debug-page-C7nSpOKj.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DsrVktRN.js → extension-page-BYUjAvsZ.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-F9JzOWZ3.js → extension-provider-DaLt3bC-.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-jeb0ytRK.js → extension-settings-page-CRasspq0.js} +1 -1
- package/dist/gateway/static/root/assets/{fallback-models-bZcxkEDz.js → fallback-models-BLJFYASE.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-CoRoOG1l.js → gateway-config-swr-DIIzvDLQ.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-D0ygm6bc.js → gateway-realtime-DD70L42G.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-DeUVEPPE.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-settings-A9SzLsGp.js → gateway-settings-B9n5naCr.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-FDS6S6qa.js → gateway-startup-retry-D_EwU7-6.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-CnHzaH9K.js → home-page-BP6qAgBt.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-BPd76jW5.js → image-generation-api-BkK22JsL.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-CzpsV6Vz.js → imports-page-YJKcTKKr.js} +1 -1
- package/dist/gateway/static/root/assets/index-6JNNrzCq.js +106 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-D90Dvlwo.js → keyboard-shortcuts-settings-BG_kM_Rm.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-_9IKMkV8.js → local-app-workbench-page-lHi21M1T.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-D6gejARs.js → local-apps-page-jqthjcQO.js} +1 -1
- package/dist/gateway/static/root/assets/local-session-drafts-C4et6msJ.js +1 -0
- package/dist/gateway/static/root/assets/{locale-store-DId6-v2R.js → locale-store-CvNO-hbt.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page--t8d-oLb.js → logs-page-CH7W-dm5.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-DVDmXzTg.js → management-settings-DVgI_KNm.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-DQZ51j9e.js → markdown-view-DDJlD5jR.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-XLewwq2q.js → media-plugins-C25mOgs2.js} +1 -1
- package/dist/gateway/static/root/assets/messages-pGa2qMzG.js +3 -0
- package/dist/gateway/static/root/assets/models-hub-cache-DzFiL4xV.js +1 -0
- package/dist/gateway/static/root/assets/{note-detail-panel-DuZAEfU1.js → note-detail-panel-kyX-n1db.js} +3 -3
- package/dist/gateway/static/root/assets/{notes-api-Byt65v3r.js → notes-api-CKLw9vjk.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-CgWNESGp.js → notes-page-CLZygZlm.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-api-BYsCbyGZ.js → oauth-api-CC5KkSgG.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-Z72eiQZn.js → page-context-capture-button-KX9mrcJW.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-BtMatL9a.js → personal-page-DnXlcJNJ.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-w5Hdf0hQ.js → product-open-page-D7pknlCh.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-CP6I3ZCV.js → project-detail-page-DhV9DPj8.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-DYs6XrrK.js → projects-page-D181xkFw.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-7F2WNEZC.js → registry-api-CiN49wvk.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-DjYoYAEw.js → remote-access-hub-CQnBARQW.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-Qar_DXLv.js → runtime-tools-settings-panel-wZjlSBiM.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page-BSIcDCa-.js → scenes-page-DWt54veq.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-C_cJLGgF.js → schema-form-CMB61TV1.js} +1 -1
- package/dist/gateway/static/root/assets/secret-input-D93UrW4C.js +1 -0
- package/dist/gateway/static/root/assets/{send-session-input-D1oc6BC6.js → send-session-input-jH6MQwdZ.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-N3N37MrR.js → session-api-CW2X7g_U.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-CMGUwtbN.js → session-manager-BDpdi3lF.js} +2 -2
- package/dist/gateway/static/root/assets/{sessions-page-BBV5Z24a.js → sessions-page-DPEdjUdR.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-B6WGnTLY.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-F2vGXBw7.js → settings-page-Ch71KQjb.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-DJxbjUOg.js → setup-status-panel-C7sLy8Hl.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-TBBGJPfT.js → share-link-dialog-DCSmx-Rl.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-DyRLPsPv.js → share-preview-page-C93IM3QK.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-DU0fHP2G.js → shares-api-B4rLfG3l.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-CJa6FBpP.js → shares-settings-C_6idV8e.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-C340XD9d.js → skill-api-sKX8SSlQ.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-ClyFqHk7.js → skill-reload-api-Ro-s69NW.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-C4lF94m5.js → skills-page-TsrjLYcI.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-CmJUu3lb.js → system-settings-panel-DIjaUlla.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-De-Rr8W6.js → task-detail-page-B4Lby289.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-OhcbFEUR.js → theme-store-DbRLBHVY.js} +1 -1
- package/dist/gateway/static/root/assets/tracing-settings-page-IgY26AYH.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-Bl4nrCuE.js → tunnel-api-CgARwbus.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-QZEAaa8n.js → usage-page-CKju62Cm.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-veoM0dHn.js → use-autosave-C889OTsP.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-DB0bBGzZ.js → use-composer-attachments-Dlm9EFTO.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-Bope6MW6.js → use-file-preview-expanded-BOpcSApw.js} +2 -2
- package/dist/gateway/static/root/assets/{user-model-page-Crh2oNpZ.js → user-model-page-CTkCLRhE.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-CwD6a3KQ.js → voice-api-key-field-evWflGY6.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-Daexehmc.js → voice-config-api-CZoV2Lt4.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-9jnjEAaz.js → work-discovery-overlay-B2-2F39_.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BAcPxdcT.js → workflow-run-setup-panel-cOGM8Nug.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-D8Zm-ooa.js → workflows-page-Csk8xrRk.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-api-Cs4sjV2A.js → workspace-api-B9M9ECTB.js} +2 -2
- package/dist/gateway/static/root/index.html +28 -28
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/session-input-command.js +1 -0
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +34 -2
- package/dist/src/agent/context/execution-context.js +1 -1
- package/dist/src/agent/context/project-context.js +4 -4
- package/dist/src/agent/embedded/run-for-session.js +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/prompt/voice-presentation.d.ts +1 -1
- package/dist/src/agent/prompt/voice-presentation.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +17 -1
- package/dist/src/agent/service.js +2 -2
- package/dist/src/agent/tools/delegation-parent-policy.js +2 -0
- package/dist/src/agent/tools/delegation-policy.js +2 -0
- package/dist/src/agent/tools/factory.d.ts +2 -0
- package/dist/src/agent/tools/factory.js +26 -4
- package/dist/src/agent/tools/index.d.ts +2 -2
- package/dist/src/agent/tools/index.js +3 -3
- package/dist/src/agent/tools/knowledge-memory-tool.d.ts +2 -0
- package/dist/src/agent/tools/knowledge-memory-tool.js +60 -1
- package/dist/src/agent/tools/personal-task-tool.d.ts +12 -8
- package/dist/src/agent/tools/personal-task-tool.js +35 -41
- package/dist/src/agent/tools/user-context-tool.d.ts +2 -0
- package/dist/src/agent/tools/user-context-tool.js +61 -2
- package/dist/src/agent-catalog/repository.d.ts +1 -0
- package/dist/src/agent-catalog/repository.js +3 -0
- package/dist/src/chat-commands/personal-command-policy.d.ts +2 -0
- package/dist/src/chat-commands/personal-command-policy.js +9 -0
- package/dist/src/chat-commands/registry.js +6 -0
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/hono/routes/observability.js +8 -0
- package/dist/src/gateway/hono/routes/projects.js +1 -1
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +2 -0
- package/dist/src/gateway/hono/routes/session-input-handler.js +8 -0
- package/dist/src/gateway/hono/routes/sessions.js +1 -1
- package/dist/src/gateway/hono/routes/voice.js +1 -1
- package/dist/src/gateway/service/agent-runner.d.ts +1 -0
- package/dist/src/gateway/service/agent-runner.js +12 -1
- package/dist/src/gateway/service/run-gateway-agent.d.ts +1 -0
- package/dist/src/gateway/service/run-gateway-agent.js +15 -0
- package/dist/src/gateway/service/session-command-service.js +5 -3
- package/dist/src/gateway/service/session-input-coordinator.d.ts +12 -0
- package/dist/src/gateway/service/session-input-coordinator.js +63 -5
- package/dist/src/gateway/service/sessions-api.js +1 -1
- package/dist/src/gateway/service.d.ts +2 -0
- package/dist/src/gateway/service.js +28 -14
- package/dist/src/gateway/session-context-summary.js +1 -1
- package/dist/src/gateway/session-reset-service.js +1 -1
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/personal-agent/capability-service.js +3 -2
- package/dist/src/personal-agent/communication.d.ts +3 -2
- package/dist/src/personal-agent/communication.js +5 -4
- package/dist/src/personal-agent/conversation-state.d.ts +5 -0
- package/dist/src/personal-agent/conversation-state.js +17 -0
- package/dist/src/personal-agent/persona.d.ts +6 -0
- package/dist/src/personal-agent/persona.js +16 -0
- package/dist/src/personal-agent/policy.d.ts +3 -1
- package/dist/src/personal-agent/policy.js +26 -6
- package/dist/src/personal-agent/prompt-context.d.ts +10 -0
- package/dist/src/personal-agent/prompt-context.js +119 -0
- package/dist/src/personal-agent/prompts.d.ts +7 -0
- package/dist/src/personal-agent/prompts.js +124 -0
- package/dist/src/personal-agent/reply-composer.d.ts +22 -0
- package/dist/src/personal-agent/reply-composer.js +304 -0
- package/dist/src/personal-agent/reply-style.d.ts +2 -0
- package/dist/src/personal-agent/reply-style.js +14 -0
- package/dist/src/personal-agent/repository.d.ts +1 -1
- package/dist/src/personal-agent/repository.js +1 -1
- package/dist/src/personal-agent/request-delivery.d.ts +1 -1
- package/dist/src/personal-agent/request-delivery.js +18 -4
- package/dist/src/personal-agent/request-service.js +3 -3
- package/dist/src/personal-agent/service.d.ts +1 -2
- package/dist/src/personal-agent/service.js +4 -84
- package/dist/src/personal-agent/specialist-capabilities.d.ts +9 -0
- package/dist/src/personal-agent/specialist-capabilities.js +37 -0
- package/dist/src/session/init-session-turn.js +10 -0
- package/dist/src/session/store.js +1 -1
- package/dist/src/storage/sqlite/migrations/234_task_result_reply.sql +14 -0
- package/dist/src/storage/sqlite/migrations/235_personal_conversation_priority.sql +3 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/session-input-repository.d.ts +2 -0
- package/dist/src/storage/sqlite/session-input-repository.js +18 -5
- package/dist/src/tasks/execution-context.js +1 -1
- package/dist/src/tasks/task-main-update-decision-service.js +1 -1
- package/dist/src/tasks/task-result-delivery-service.js +20 -4
- package/dist/src/voice/realtime/agentBroker.js +11 -2
- package/dist/src/voice/realtime/agentEngine.js +50 -17
- package/dist/src/voice/realtime/engine.d.ts +1 -0
- package/dist/src/voice/realtime/omniEngine.d.ts +1 -0
- package/dist/src/voice/realtime/omniEngine.js +21 -2
- package/dist/src/voice/realtime/playback-echo.d.ts +7 -0
- package/dist/src/voice/realtime/playback-echo.js +23 -1
- package/dist/src/voice/realtime/runtime.d.ts +1 -0
- package/dist/src/voice/realtime/runtime.js +5 -0
- package/dist/src/voice/realtime/runtime.types.d.ts +2 -0
- package/dist/src/work-discovery/service.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +4 -4
- package/dist/gateway/static/root/assets/gateway-realtime-store-DBvCRclh.js +0 -1
- package/dist/gateway/static/root/assets/index-BYNmHn-z.js +0 -106
- package/dist/gateway/static/root/assets/local-session-drafts-gbemPamv.js +0 -1
- package/dist/gateway/static/root/assets/messages-BHvpZNe9.js +0 -3
- package/dist/gateway/static/root/assets/models-hub-cache-B9SKjidc.js +0 -1
- package/dist/gateway/static/root/assets/secret-input-DPl3VYM8.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DRc9IDJf.js +0 -1
- package/dist/gateway/static/root/assets/tracing-settings-page-DoBJ0TYY.js +0 -1
|
@@ -3,7 +3,7 @@ import { init_logger } from "../../utils/logger.js";
|
|
|
3
3
|
import { speakStream } from "../tts/speak-core.js";
|
|
4
4
|
import { AudioPlaybackWindow } from "./audio-playback-window.js";
|
|
5
5
|
import { TurnCoordinator } from "./turnPolicy.js";
|
|
6
|
-
import {
|
|
6
|
+
import { PlaybackEchoCandidates } from "./playback-echo.js";
|
|
7
7
|
import { PcmFrameBuffer } from "./pcmFrameBuffer.js";
|
|
8
8
|
import { SpeakableSegmenter } from "./speakable-segmenter.js";
|
|
9
9
|
import crypto from "node:crypto";
|
|
@@ -36,12 +36,16 @@ function createAgentVoiceEngine(options) {
|
|
|
36
36
|
let finalCount = 0;
|
|
37
37
|
let committing = false;
|
|
38
38
|
let recentPlayback;
|
|
39
|
+
const echoCandidates = new PlaybackEchoCandidates();
|
|
39
40
|
const finalizedUtterances = /* @__PURE__ */ new Set();
|
|
40
41
|
let pendingTurn;
|
|
42
|
+
let turnReceivedAtMs;
|
|
41
43
|
let taskUpdateQueued = false;
|
|
42
44
|
let lastUserSpeechAt = 0;
|
|
43
45
|
const turn = new TurnCoordinator(claim.silenceDurationMs, (text, decision, turnId) => {
|
|
44
46
|
if (closed || muted) return;
|
|
47
|
+
const receivedAtMs = turnReceivedAtMs ?? Date.now();
|
|
48
|
+
turnReceivedAtMs = void 0;
|
|
45
49
|
log.info({
|
|
46
50
|
sessionId: claim.sessionId,
|
|
47
51
|
turnId,
|
|
@@ -76,12 +80,14 @@ function createAgentVoiceEngine(options) {
|
|
|
76
80
|
const pending = {
|
|
77
81
|
turnId,
|
|
78
82
|
text,
|
|
79
|
-
cancelled: false
|
|
83
|
+
cancelled: false,
|
|
84
|
+
receivedAtMs,
|
|
85
|
+
committedAtMs: Date.now()
|
|
80
86
|
};
|
|
81
87
|
pendingTurn = pending;
|
|
82
88
|
conversationTail = conversationTail.then(() => {
|
|
83
89
|
if (pendingTurn === pending) pendingTurn = void 0;
|
|
84
|
-
if (generation === inputGeneration && !pending.cancelled) return runAssistantTurn(text, turnId).then(() => {});
|
|
90
|
+
if (generation === inputGeneration && !pending.cancelled) return runAssistantTurn(text, turnId, void 0, pending.receivedAtMs, pending.committedAtMs).then(() => {});
|
|
85
91
|
}).finally(() => {
|
|
86
92
|
if (generation === inputGeneration) queuedTurns -= 1;
|
|
87
93
|
});
|
|
@@ -89,6 +95,11 @@ function createAgentVoiceEngine(options) {
|
|
|
89
95
|
function cancelActiveResponse(reason) {
|
|
90
96
|
const response = activeResponse;
|
|
91
97
|
if (!response) return false;
|
|
98
|
+
if (response.audioStarted && response.audibleText) recentPlayback = {
|
|
99
|
+
responseId: response.id,
|
|
100
|
+
text: response.audibleText,
|
|
101
|
+
expiresAt: Date.now() + PLAYBACK_ECHO_TAIL_MS
|
|
102
|
+
};
|
|
92
103
|
activeResponse = void 0;
|
|
93
104
|
response.abortController.abort(reason);
|
|
94
105
|
send("response.cancelled", {
|
|
@@ -150,7 +161,11 @@ function createAgentVoiceEngine(options) {
|
|
|
150
161
|
log.info({
|
|
151
162
|
sessionId: claim.sessionId,
|
|
152
163
|
responseId: response.id,
|
|
153
|
-
|
|
164
|
+
conversationId: claim.request.conversationId,
|
|
165
|
+
phase: "first_response_audio",
|
|
166
|
+
latencyMs: Date.now() - response.startedAt,
|
|
167
|
+
inputToAudioMs: Date.now() - response.inputReceivedAtMs,
|
|
168
|
+
textToAudioMs: response.firstTextAtMs === void 0 ? void 0 : Date.now() - response.firstTextAtMs
|
|
154
169
|
}, "Realtime voice first audio ready");
|
|
155
170
|
send("response.audio.started", {
|
|
156
171
|
responseId: response.id,
|
|
@@ -235,7 +250,7 @@ function createAgentVoiceEngine(options) {
|
|
|
235
250
|
if (response.speechWorker) prefetchNextSpeech(response);
|
|
236
251
|
else startSpeechWorker(response);
|
|
237
252
|
}
|
|
238
|
-
async function runAssistantTurn(text, turnId, updateClientMessageId) {
|
|
253
|
+
async function runAssistantTurn(text, turnId, updateClientMessageId, receivedAtMs = Date.now(), committedAtMs = receivedAtMs) {
|
|
239
254
|
if (!claim.tts || !claim.request.conversationId || !text.trim() || closed) return false;
|
|
240
255
|
cancelActiveResponse("barge_in");
|
|
241
256
|
const response = {
|
|
@@ -249,6 +264,8 @@ function createAgentVoiceEngine(options) {
|
|
|
249
264
|
speechQueue: [],
|
|
250
265
|
queuedSpeechCharacters: 0,
|
|
251
266
|
startedAt: Date.now(),
|
|
267
|
+
inputReceivedAtMs: receivedAtMs,
|
|
268
|
+
turnCommittedAtMs: committedAtMs,
|
|
252
269
|
firstTextSeen: false,
|
|
253
270
|
awaitingClarification: false,
|
|
254
271
|
taskDone: false,
|
|
@@ -267,13 +284,11 @@ function createAgentVoiceEngine(options) {
|
|
|
267
284
|
conversationId: claim.request.conversationId,
|
|
268
285
|
expectedTranscriptId: claim.conversationSessionId,
|
|
269
286
|
signal: response.abortController.signal,
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
} : {}
|
|
287
|
+
clientMessageId: updateClientMessageId ?? `voice:${claim.conversationSessionId}:${claim.sessionId}:${inputGeneration}:${turnId}`,
|
|
288
|
+
...updateClientMessageId ? { origin: {
|
|
289
|
+
type: "system",
|
|
290
|
+
source: "task_update"
|
|
291
|
+
} } : {}
|
|
277
292
|
});
|
|
278
293
|
response.taskId = task.taskId;
|
|
279
294
|
send("task.created", {
|
|
@@ -285,12 +300,18 @@ function createAgentVoiceEngine(options) {
|
|
|
285
300
|
if (event.type === "assistant_delta" || event.type === "tool_end" && event.payload?.toolName !== "clarify") response.awaitingClarification = false;
|
|
286
301
|
if (event.type === "assistant_delta" && typeof event.payload?.delta === "string") {
|
|
287
302
|
if (response.text.length + event.payload.delta.length > 32e3) throw new Error("Voice response text limit reached");
|
|
288
|
-
if (!response.firstTextSeen) {
|
|
303
|
+
if (!response.firstTextSeen && event.payload.delta.trim()) {
|
|
289
304
|
response.firstTextSeen = true;
|
|
305
|
+
response.firstTextAtMs = Date.now();
|
|
290
306
|
log.info({
|
|
291
307
|
sessionId: claim.sessionId,
|
|
292
308
|
responseId: response.id,
|
|
293
|
-
|
|
309
|
+
conversationId: claim.request.conversationId,
|
|
310
|
+
phase: "first_response_text",
|
|
311
|
+
latencyMs: Date.now() - response.startedAt,
|
|
312
|
+
inputToTextMs: Date.now() - response.inputReceivedAtMs,
|
|
313
|
+
turnDecisionMs: Math.max(0, response.turnCommittedAtMs - response.inputReceivedAtMs),
|
|
314
|
+
queueMs: Math.max(0, response.startedAt - response.turnCommittedAtMs)
|
|
294
315
|
}, "Realtime voice first response text ready");
|
|
295
316
|
}
|
|
296
317
|
response.text += event.payload.delta;
|
|
@@ -418,6 +439,7 @@ function createAgentVoiceEngine(options) {
|
|
|
418
439
|
});
|
|
419
440
|
}
|
|
420
441
|
function bufferFinal(utteranceId, text) {
|
|
442
|
+
if (text && (turnReceivedAtMs === void 0 || turn.isIdle())) turnReceivedAtMs = Date.now();
|
|
421
443
|
try {
|
|
422
444
|
turn.final(utteranceId, text);
|
|
423
445
|
} catch (error) {
|
|
@@ -438,6 +460,7 @@ function createAgentVoiceEngine(options) {
|
|
|
438
460
|
if (event.type === "ready" || event.type === "usage") return;
|
|
439
461
|
if (event.type === "error") {
|
|
440
462
|
turn.reset();
|
|
463
|
+
echoCandidates.clear();
|
|
441
464
|
log.warn({
|
|
442
465
|
err: event.error,
|
|
443
466
|
sessionId: claim.sessionId,
|
|
@@ -454,10 +477,12 @@ function createAgentVoiceEngine(options) {
|
|
|
454
477
|
if (muted || finalizedUtterances.has(event.utteranceId)) return;
|
|
455
478
|
if (event.type === "speech_started") {
|
|
456
479
|
lastUserSpeechAt = Date.now();
|
|
480
|
+
echoCandidates.remember(event.utteranceId, activeResponse?.audioStarted ? activeResponse.audibleText : recentPlayback && recentPlayback.expiresAt >= Date.now() ? recentPlayback.text : void 0);
|
|
457
481
|
if (claim.request.purpose === "conversation") {
|
|
458
482
|
if (pendingTurn) {
|
|
459
483
|
pendingTurn.cancelled = true;
|
|
460
484
|
turn.restore(pendingTurn.turnId, pendingTurn.text);
|
|
485
|
+
turnReceivedAtMs = pendingTurn.receivedAtMs;
|
|
461
486
|
pendingTurn = void 0;
|
|
462
487
|
}
|
|
463
488
|
turn.start(event.utteranceId);
|
|
@@ -490,11 +515,11 @@ function createAgentVoiceEngine(options) {
|
|
|
490
515
|
responseId: activeResponse.id,
|
|
491
516
|
text: activeResponse.audibleText
|
|
492
517
|
} : recentPlayback && recentPlayback.expiresAt >= Date.now() ? recentPlayback : void 0;
|
|
493
|
-
if (claim.request.purpose === "conversation" &&
|
|
518
|
+
if (claim.request.purpose === "conversation" && echoCandidates.matches(event.utteranceId, text, playback?.text)) {
|
|
494
519
|
bufferFinal(event.utteranceId, "");
|
|
495
520
|
log.debug({
|
|
496
521
|
sessionId: claim.sessionId,
|
|
497
|
-
responseId: playback
|
|
522
|
+
responseId: playback?.responseId,
|
|
498
523
|
transcriptCharacters: text.length
|
|
499
524
|
}, "Ignored finalized transcription matching recent voice playback");
|
|
500
525
|
return;
|
|
@@ -506,6 +531,7 @@ function createAgentVoiceEngine(options) {
|
|
|
506
531
|
...event.language === "zh" || event.language === "en" ? { language: event.language } : {}
|
|
507
532
|
});
|
|
508
533
|
if (claim.request.purpose === "conversation") {
|
|
534
|
+
if (claim.request.conversationId) options.runtime.onConversationInput?.(claim.request.conversationId);
|
|
509
535
|
if (activeResponse?.awaitingClarification) {
|
|
510
536
|
turn.reset();
|
|
511
537
|
return;
|
|
@@ -517,7 +543,9 @@ function createAgentVoiceEngine(options) {
|
|
|
517
543
|
}
|
|
518
544
|
function discardInput() {
|
|
519
545
|
turn.reset();
|
|
546
|
+
echoCandidates.clear();
|
|
520
547
|
pendingTurn = void 0;
|
|
548
|
+
turnReceivedAtMs = void 0;
|
|
521
549
|
inputGeneration += 1;
|
|
522
550
|
queuedTurns = 0;
|
|
523
551
|
bufferedAudio = [];
|
|
@@ -541,10 +569,14 @@ function createAgentVoiceEngine(options) {
|
|
|
541
569
|
});
|
|
542
570
|
return inputReset;
|
|
543
571
|
}
|
|
572
|
+
function isConversationIdle() {
|
|
573
|
+
return claim.request.purpose === "conversation" && !closed && Boolean(sttSession) && !committing && !activeResponse && !pendingTurn && queuedTurns === 0 && turn.isIdle() && Date.now() - lastUserSpeechAt >= TASK_UPDATE_QUIET_MS;
|
|
574
|
+
}
|
|
544
575
|
function canOfferTaskUpdateInput() {
|
|
545
|
-
return
|
|
576
|
+
return Boolean(claim.tts) && isConversationIdle();
|
|
546
577
|
}
|
|
547
578
|
return {
|
|
579
|
+
isConversationIdle,
|
|
548
580
|
canOfferTaskUpdate() {
|
|
549
581
|
return !taskUpdateQueued && canOfferTaskUpdateInput();
|
|
550
582
|
},
|
|
@@ -623,6 +655,7 @@ function createAgentVoiceEngine(options) {
|
|
|
623
655
|
if (closing) return closing;
|
|
624
656
|
closed = true;
|
|
625
657
|
turn.reset();
|
|
658
|
+
echoCandidates.clear();
|
|
626
659
|
cancelActiveResponse("session_closed");
|
|
627
660
|
sttAbort.abort("session_closed");
|
|
628
661
|
sttSession?.abort("session_closed");
|
|
@@ -10,6 +10,7 @@ export interface VoiceEngine {
|
|
|
10
10
|
cancel(responseId: string, reason: 'client_cancelled' | 'barge_in'): boolean;
|
|
11
11
|
cancelTask(taskId: string): Promise<boolean>;
|
|
12
12
|
acknowledge(responseId: string, playedDurationMs: number): void;
|
|
13
|
+
isConversationIdle?(): boolean;
|
|
13
14
|
canOfferTaskUpdate?(): boolean;
|
|
14
15
|
offerTaskUpdate?(input: {
|
|
15
16
|
clientMessageId: string;
|
|
@@ -13,6 +13,7 @@ export declare function createOmniVoiceEngine(options: {
|
|
|
13
13
|
bargeIn: boolean;
|
|
14
14
|
send: VoiceEventSink;
|
|
15
15
|
sendAudio: (responseId: string, bytes: Uint8Array) => void;
|
|
16
|
+
onUserInput?: () => void;
|
|
16
17
|
record: (entry: OmniTranscript) => Promise<void>;
|
|
17
18
|
onClose: (reason: string, notify: boolean) => Promise<void>;
|
|
18
19
|
}): VoiceEngine;
|
|
@@ -2,7 +2,7 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { AudioPlaybackWindow } from "./audio-playback-window.js";
|
|
4
4
|
import { TurnCoordinator } from "./turnPolicy.js";
|
|
5
|
-
import {
|
|
5
|
+
import { PlaybackEchoCandidates } from "./playback-echo.js";
|
|
6
6
|
import { PcmFrameBuffer } from "./pcmFrameBuffer.js";
|
|
7
7
|
import crypto from "node:crypto";
|
|
8
8
|
import WebSocket from "ws";
|
|
@@ -44,7 +44,9 @@ function createOmniVoiceEngine(options) {
|
|
|
44
44
|
const pendingInputs = /* @__PURE__ */ new Set();
|
|
45
45
|
let failed = false;
|
|
46
46
|
let platformRequestId;
|
|
47
|
+
let lastInputAt = 0;
|
|
47
48
|
let active;
|
|
49
|
+
const echoCandidates = new PlaybackEchoCandidates();
|
|
48
50
|
let recentPlayback;
|
|
49
51
|
let waitingForCancellation;
|
|
50
52
|
let responseCreateQueued = false;
|
|
@@ -147,6 +149,10 @@ function createOmniVoiceEngine(options) {
|
|
|
147
149
|
const cancel = (reason) => {
|
|
148
150
|
const response = active;
|
|
149
151
|
if (!response) return false;
|
|
152
|
+
if (response.audio && response.text) recentPlayback = {
|
|
153
|
+
text: response.text,
|
|
154
|
+
expiresAt: Date.now() + PLAYBACK_ECHO_TAIL_MS
|
|
155
|
+
};
|
|
150
156
|
active = void 0;
|
|
151
157
|
response.abort.abort(reason);
|
|
152
158
|
response.release();
|
|
@@ -234,6 +240,7 @@ function createOmniVoiceEngine(options) {
|
|
|
234
240
|
failed = true;
|
|
235
241
|
clearTimeout(responseStartTimer);
|
|
236
242
|
turn.reset();
|
|
243
|
+
echoCandidates.clear();
|
|
237
244
|
responseCreateQueued = false;
|
|
238
245
|
log.warn({
|
|
239
246
|
sessionId: options.callId,
|
|
@@ -259,6 +266,7 @@ function createOmniVoiceEngine(options) {
|
|
|
259
266
|
function discardInput() {
|
|
260
267
|
clearTimeout(responseStartTimer);
|
|
261
268
|
turn.reset();
|
|
269
|
+
echoCandidates.clear();
|
|
262
270
|
responseCreateQueued = false;
|
|
263
271
|
speaking.clear();
|
|
264
272
|
turnSettled = false;
|
|
@@ -353,11 +361,13 @@ function createOmniVoiceEngine(options) {
|
|
|
353
361
|
clearingInput = false;
|
|
354
362
|
clearTimeout(clearTimer);
|
|
355
363
|
} else if (event.type === "input_audio_buffer.speech_started") {
|
|
364
|
+
lastInputAt = Date.now();
|
|
356
365
|
if (muted || clearingInput) {
|
|
357
366
|
discardedInputs.add(String(event.item_id));
|
|
358
367
|
return;
|
|
359
368
|
}
|
|
360
369
|
if (recorded.has(String(event.item_id)) || pendingInputs.has(String(event.item_id))) return;
|
|
370
|
+
echoCandidates.remember(String(event.item_id), active?.audio ? active.text : recentPlayback && recentPlayback.expiresAt >= Date.now() ? recentPlayback.text : void 0);
|
|
361
371
|
inputBlocked = false;
|
|
362
372
|
pendingInputs.add(String(event.item_id));
|
|
363
373
|
clearTimeout(responseStartTimer);
|
|
@@ -367,6 +377,7 @@ function createOmniVoiceEngine(options) {
|
|
|
367
377
|
if (active && !active.published) cancel("barge_in");
|
|
368
378
|
options.send("input.speech_started", { utteranceId: String(event.item_id) });
|
|
369
379
|
} else if (event.type === "input_audio_buffer.speech_stopped") {
|
|
380
|
+
lastInputAt = Date.now();
|
|
370
381
|
if (muted || inputBlocked || discardedInputs.has(String(event.item_id)) || recorded.has(String(event.item_id))) return;
|
|
371
382
|
speaking.delete(String(event.item_id));
|
|
372
383
|
turn.stop(String(event.item_id));
|
|
@@ -381,7 +392,7 @@ function createOmniVoiceEngine(options) {
|
|
|
381
392
|
speaking.delete(event.item_id);
|
|
382
393
|
const text = event.transcript.trim();
|
|
383
394
|
const playbackText = active?.audio ? active.text : recentPlayback && recentPlayback.expiresAt >= Date.now() ? recentPlayback.text : void 0;
|
|
384
|
-
if (
|
|
395
|
+
if (echoCandidates.matches(event.item_id, text, playbackText)) {
|
|
385
396
|
turn.final(event.item_id, "");
|
|
386
397
|
log.debug({
|
|
387
398
|
sessionId: options.callId,
|
|
@@ -400,6 +411,10 @@ function createOmniVoiceEngine(options) {
|
|
|
400
411
|
cancel("barge_in");
|
|
401
412
|
}
|
|
402
413
|
turn.final(event.item_id, text);
|
|
414
|
+
if (text) {
|
|
415
|
+
lastInputAt = Date.now();
|
|
416
|
+
options.onUserInput?.();
|
|
417
|
+
}
|
|
403
418
|
save({
|
|
404
419
|
itemId: event.item_id,
|
|
405
420
|
role: "user",
|
|
@@ -559,6 +574,9 @@ function createOmniVoiceEngine(options) {
|
|
|
559
574
|
}
|
|
560
575
|
pumpInput();
|
|
561
576
|
},
|
|
577
|
+
isConversationIdle() {
|
|
578
|
+
return ready && !closed && !failed && !active && !speaking.size && !pendingInputs.size && !responseCreateQueued && !waitingForCancellation && !clearingInput && !inputBlocked && Date.now() - lastInputAt >= 750;
|
|
579
|
+
},
|
|
562
580
|
async commit() {
|
|
563
581
|
throw new Error("Natural conversation uses automatic turn detection");
|
|
564
582
|
},
|
|
@@ -582,6 +600,7 @@ function createOmniVoiceEngine(options) {
|
|
|
582
600
|
clearTimeout(uploadTimer);
|
|
583
601
|
clearTimeout(responseStartTimer);
|
|
584
602
|
turn.reset();
|
|
603
|
+
echoCandidates.clear();
|
|
585
604
|
speaking.clear();
|
|
586
605
|
inputQueue = [];
|
|
587
606
|
queuedInputBytes = 0;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
/** Conservatively identifies finalized ASR that is already in audible assistant output. */
|
|
2
2
|
export declare function isLikelyPlaybackEcho(transcript: string, assistantText: string): boolean;
|
|
3
|
+
/** Retains the playback at speech onset while a provider finishes delayed ASR. */
|
|
4
|
+
export declare class PlaybackEchoCandidates {
|
|
5
|
+
private readonly candidates;
|
|
6
|
+
remember(utteranceId: string, text: string | undefined): void;
|
|
7
|
+
matches(utteranceId: string, transcript: string, currentPlayback?: string): boolean;
|
|
8
|
+
clear(): void;
|
|
9
|
+
}
|
|
@@ -28,5 +28,27 @@ function isLikelyPlaybackEcho(transcript, assistantText) {
|
|
|
28
28
|
if (heard.length < (containsCjk ? 6 : 10)) return false;
|
|
29
29
|
return closestSubstringEditDistance(heard, spoken) / Array.from(heard).length <= .22;
|
|
30
30
|
}
|
|
31
|
+
/** Retains the playback at speech onset while a provider finishes delayed ASR. */
|
|
32
|
+
var PlaybackEchoCandidates = class {
|
|
33
|
+
candidates = /* @__PURE__ */ new Map();
|
|
34
|
+
remember(utteranceId, text) {
|
|
35
|
+
if (!text || this.candidates.has(utteranceId)) return;
|
|
36
|
+
const now = Date.now();
|
|
37
|
+
for (const [id, candidate] of this.candidates) if (candidate.expiresAt < now) this.candidates.delete(id);
|
|
38
|
+
if (this.candidates.size >= 256) this.candidates.delete(this.candidates.keys().next().value);
|
|
39
|
+
this.candidates.set(utteranceId, {
|
|
40
|
+
text: text.slice(-8e3),
|
|
41
|
+
expiresAt: now + 3e4
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
matches(utteranceId, transcript, currentPlayback) {
|
|
45
|
+
const candidate = this.candidates.get(utteranceId);
|
|
46
|
+
this.candidates.delete(utteranceId);
|
|
47
|
+
return Boolean(currentPlayback && isLikelyPlaybackEcho(transcript, currentPlayback) || candidate && candidate.expiresAt >= Date.now() && isLikelyPlaybackEcho(transcript, candidate.text));
|
|
48
|
+
}
|
|
49
|
+
clear() {
|
|
50
|
+
this.candidates.clear();
|
|
51
|
+
}
|
|
52
|
+
};
|
|
31
53
|
//#endregion
|
|
32
|
-
export { isLikelyPlaybackEcho };
|
|
54
|
+
export { PlaybackEchoCandidates, isLikelyPlaybackEcho };
|
|
@@ -27,6 +27,7 @@ export declare class VoiceRealtimeRuntime {
|
|
|
27
27
|
createSession(request: CreateVoiceSessionRequest, principalId: string, now?: number): Promise<CreateVoiceSessionResponse>;
|
|
28
28
|
handleUpgrade(req: IncomingMessage, socket: Socket, head: Buffer): boolean;
|
|
29
29
|
hasConversation(conversationId: string): boolean;
|
|
30
|
+
canPublishReply(conversationId: string): boolean;
|
|
30
31
|
canOfferTaskUpdate(conversationId: string): boolean;
|
|
31
32
|
offerTaskUpdate(input: {
|
|
32
33
|
conversationId: string;
|
|
@@ -313,6 +313,10 @@ var VoiceRealtimeRuntime = class {
|
|
|
313
313
|
this.pruneTickets(Date.now());
|
|
314
314
|
return this.conversationReservations.has(conversationId);
|
|
315
315
|
}
|
|
316
|
+
canPublishReply(conversationId) {
|
|
317
|
+
const sessionId = this.conversationReservations.get(conversationId);
|
|
318
|
+
return (sessionId ? this.activeSessions.get(sessionId) : void 0)?.engine?.isConversationIdle?.() === true;
|
|
319
|
+
}
|
|
316
320
|
canOfferTaskUpdate(conversationId) {
|
|
317
321
|
const sessionId = this.conversationReservations.get(conversationId);
|
|
318
322
|
return (sessionId ? this.activeSessions.get(sessionId) : void 0)?.engine?.canOfferTaskUpdate?.() === true;
|
|
@@ -539,6 +543,7 @@ var VoiceRealtimeRuntime = class {
|
|
|
539
543
|
bargeIn: consumed.config.voice?.realtime?.bargeIn ?? true,
|
|
540
544
|
send,
|
|
541
545
|
sendAudio,
|
|
546
|
+
onUserInput: () => this.options.onConversationInput?.(consumed.request.conversationId),
|
|
542
547
|
record: (entry) => this.options.recordOmniTranscript(consumed.request.conversationId, consumed.sessionId, entry, consumed.conversationSessionId),
|
|
543
548
|
onClose: shutdown
|
|
544
549
|
}) : createAgentVoiceEngine({
|
|
@@ -41,6 +41,8 @@ export interface ResolvedStreamingTts {
|
|
|
41
41
|
route: VoiceProviderRoute;
|
|
42
42
|
}
|
|
43
43
|
export interface VoiceRealtimeRuntimeOptions {
|
|
44
|
+
/** Confirmed non-echo speech invalidates background reply drafts before turn commit. */
|
|
45
|
+
onConversationInput?: (conversationId: string) => void;
|
|
44
46
|
isPrincipalActive?: (principalId: string) => boolean;
|
|
45
47
|
recordOmniTranscript?: (conversationId: string, callId: string, entry: OmniTranscript, expectedTranscriptId: string) => Promise<void>;
|
|
46
48
|
getConversationContext?: (conversationId: string, expectedTranscriptId: string) => Promise<VoiceConversationContext>;
|
|
@@ -12,10 +12,10 @@ import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
|
12
12
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
13
13
|
import { writeKnowledgeItem } from "../knowledge-memory/repository.js";
|
|
14
14
|
import "../knowledge-memory/index.js";
|
|
15
|
-
import { createWorkDiscoveryRun, getProjectUnderstandingRun, getWorkDiscoveryOnboardingState, getWorkDiscoveryRun, getWorkDiscoveryRunByIdempotencyKey, listPendingProjectUnderstandingRuns, setWorkDiscoveryFeedback, setWorkDiscoveryOnboardingState, updateWorkDiscoveryRun } from "./repository.js";
|
|
16
15
|
import { linkAssertionEvidence, reconcileAssertion } from "../user-model/repository.js";
|
|
17
16
|
import { createPriorityWindow, createUserGoal } from "../user-model/goals.js";
|
|
18
17
|
import "../user-model/index.js";
|
|
18
|
+
import { createWorkDiscoveryRun, getProjectUnderstandingRun, getWorkDiscoveryOnboardingState, getWorkDiscoveryRun, getWorkDiscoveryRunByIdempotencyKey, listPendingProjectUnderstandingRuns, setWorkDiscoveryFeedback, setWorkDiscoveryOnboardingState, updateWorkDiscoveryRun } from "./repository.js";
|
|
19
19
|
import { isLocalModelBaseUrl } from "../providers/model-call.js";
|
|
20
20
|
import { createUnderstandingSourceRun, getUnderstandingSourceGrant, getUnderstandingSourceRun, updateUnderstandingSourceGrantCheckpoint, updateUnderstandingSourceGrantPolicies, updateUnderstandingSourceRun, upsertUnderstandingSourceGrant } from "../user-context/sources/repository.js";
|
|
21
21
|
import { allowsRemoteSourceProcessing } from "../user-context/sources/processing-policy.js";
|
|
@@ -4,8 +4,8 @@ import { init_conversation_repository, resolveRoutedConversation } from "../../s
|
|
|
4
4
|
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
5
5
|
import { extractProfileAgentId, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
6
6
|
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
7
|
-
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
8
7
|
import { getProjectWorkspacePathForSession } from "../../projects/workspace.js";
|
|
8
|
+
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
9
9
|
import { automationEventPublisher, getAutomationEventForRun } from "../../automations/events/event-repository.js";
|
|
10
10
|
import { isTerminalWorkflowRunStatus } from "../domain/run.js";
|
|
11
11
|
import { validateWorkflowJsonSchema } from "../domain/schema-validation.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xopcai/xopc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.366",
|
|
4
4
|
"description": "Local-first personal AI for the one-person company, with durable context, tasks, workflows, automations, and local or cloud models.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -161,11 +161,11 @@
|
|
|
161
161
|
"vitepress": "^1.6.4",
|
|
162
162
|
"vitest": "4.1.5",
|
|
163
163
|
"vue": "^3.5.35",
|
|
164
|
-
"@xopcai/computer-control-contract": "0.1.0",
|
|
165
|
-
"@xopcai/endpoint-tools-client": "0.0.0",
|
|
166
|
-
"@xopcai/endpoint-tools-protocol": "0.0.0",
|
|
167
164
|
"@xopcai/browser-control-contract": "0.1.0",
|
|
165
|
+
"@xopcai/endpoint-tools-protocol": "0.0.0",
|
|
166
|
+
"@xopcai/endpoint-tools-client": "0.0.0",
|
|
168
167
|
"@xopcai/gateway-contract": "0.0.0",
|
|
168
|
+
"@xopcai/computer-control-contract": "0.1.0",
|
|
169
169
|
"@xopcai/realtime-client": "0.0.0",
|
|
170
170
|
"@xopcai/realtime-protocol": "0.0.0"
|
|
171
171
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e}from"./locale-store-DId6-v2R.js";var t=e(()=>({connectionState:`idle`,error:null}));function n(e){t.setState(e)}export{t as n,n as t};
|