@xopcai/xopc 0.0.188 → 0.0.190
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/README.md +1 -4
- package/README.zh-CN.md +0 -3
- 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--QoUGhiS.js → activity-store-DstnJCS5.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-B0yweLNQ.js → agent-avatar-dicebear-9vAbkroX.js} +1 -1
- package/dist/gateway/static/root/assets/agents-D1t4SfMQ.js +68 -0
- package/dist/gateway/static/root/assets/{api-5laWqfiE.js → api-BTL9kayv.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BXJ8Jiv_.js → app-management-settings-panel-DkFeIdBf.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-DG9n9D1M.js → appearance-settings-Bxs8Fpaj.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-Cgrgu5OW.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-Ceh5qrZf.js → archive-plugin-Ch2RmLCC.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-jFW7uYf7.js → attachment-load-BhMQM_Ky.js} +1 -1
- package/dist/gateway/static/root/assets/automations-page-CtJxstKh.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-XDlkI1r4.js → binary-plugins-D6CqlymH.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-kyKc2IhE.js → block-editor-ClL6HEg9.js} +56 -56
- package/dist/gateway/static/root/assets/browser-settings-page-DW99iDmD.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-BJa5Iz_v.js → browser-workflow-inputs-BYy48VhN.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-CTQQOsn5.js → browser-workflows-page-zgLibuMH.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CHUrT9EB.js +7 -0
- package/dist/gateway/static/root/assets/capability-presets-api-BB8t4Ja7.js +1 -0
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-Cycrv0YV.js +1 -0
- package/dist/gateway/static/root/assets/{channel-recipient-api-BgIkWq01.js → channel-recipient-api-BThDGiO3.js} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-V96gPUAU.js +1 -0
- package/dist/gateway/static/root/assets/channels-status-swr-Cz7SAAkm.js +1 -0
- package/dist/gateway/static/root/assets/connectors-api-DS9ED-EL.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-BhlyQoQI.js +2 -0
- package/dist/gateway/static/root/assets/cron-expression-CkgsvhtW.js +2 -0
- package/dist/gateway/static/root/assets/{desktop-pet-CSwd00CV.js → desktop-pet-Cv8rGhYW.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CuNQvHGu.js → desktop-pet-settings-CIeJdwfV.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-ct0n5Rje.js → directory-picker-path-field-D8jXEiAY.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-BeRBuMUU.js → extension-debug-page-CCZ9u6TZ.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DbK-Cwao.js → extension-page-CV36ILRG.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-IyQrSILY.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-api-CC7EvEFp.js → gateway-config-api-D4_r5iJM.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-CYlntpBH.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-B2DmdlwO.js → gateway-startup-retry-EO9mKvzE.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-D4SyWob8.js +1 -0
- package/dist/gateway/static/root/assets/home-page-B2Kagoh8.js +3 -0
- package/dist/gateway/static/root/assets/{image-generation-api-GMTaS6eI.js → image-generation-api-Bu7PyVSh.js} +1 -1
- package/dist/gateway/static/root/assets/index-CYT5DOzr.js +150 -0
- package/dist/gateway/static/root/assets/index-D6e3tPL-.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DhGYddbI.js → keyboard-shortcuts-settings-BMhCuVBZ.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-BHYbFjqy.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-CmnrBmWi.js → local-apps-page-ijIe7_y2.js} +1 -1
- package/dist/gateway/static/root/assets/locale-store-deR2zRaE.js +1 -0
- package/dist/gateway/static/root/assets/logs-page-IIn8Tess.js +2 -0
- package/dist/gateway/static/root/assets/management-settings--V_fovKD.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-split-CZaBPOVn.js → markdown-split-Dt9-in6W.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CiKvSgCv.js → media-plugins-B3pj_iO0.js} +1 -1
- package/dist/gateway/static/root/assets/messages-B4XqB8I6.js +3 -0
- package/dist/gateway/static/root/assets/{notes-page-Bisbzqlz.js → notes-page-DZ366lIT.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-S2sBVOLw.js +4 -0
- package/dist/gateway/static/root/assets/{page-tabs-BxlwhAbH.js → page-tabs-C5ge434C.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-RM8wXxfT.js → preview-open-alternatives-BFa9DgSV.js} +1 -1
- package/dist/gateway/static/root/assets/product-delivery-tRr-7IxY.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-DdBlibek.js → product-open-page-Dc9CcWdu.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-BilzoCJ7.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-BoQUyacP.js +1 -0
- package/dist/gateway/static/root/assets/remote-access-hub-DUyUaCRF.js +1 -0
- package/dist/gateway/static/root/assets/{schema-form-BDKbpmXv.js → schema-form-B84DckWe.js} +1 -1
- package/dist/gateway/static/root/assets/{schemas-C6onAggk.js → schemas-zIBW3wiV.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-Dzxlq1F0.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-TzwlZxU6.js +1 -0
- package/dist/gateway/static/root/assets/settings-form-section-Dp9itvdy.js +1 -0
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-DgIp8_S6.js → settings-loading-skeleton-CCtlhoy7.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-DQmMKf8r.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-layout-97LmwrzC.js → settings-page-layout-EQIOJa_L.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-Cwi-SPja.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-BH7i3g1S.js → share-preview-page-C4_B2jvf.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-CkyuGlZK.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-BJCePQK5.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-BYWLfmJi.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-s-a5WV9j.js → skills-page.utils-Jhm24i4h.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-BxjeMT5k.js → system-settings-panel-Dpx2ags2.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-BahycnfW.js → task-detail-page-DLAdxI6e.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-BRxdsmic.js → theme-store-DnBOcGXi.js} +1 -1
- package/dist/gateway/static/root/assets/{typed-models-lib-39MjwPSq.js → typed-models-lib-DULmTHUB.js} +1 -1
- package/dist/gateway/static/root/assets/use-autosave-BrjVk5VH.js +1 -0
- package/dist/gateway/static/root/assets/user-context-page-9AAFpGAL.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-XU-7sBSg.js → voice-api-key-field-BISTPfq_.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-CJqu8UHq.js → work-discovery-overlay-Wr-uF7VA.js} +1 -1
- package/dist/gateway/static/root/assets/work-discovery-page-BWds95sL.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-DXtg8Qxl.js → workflow-run-setup-panel-DHqHP8_6.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-0b4_DFHr.js +11 -0
- package/dist/gateway/static/root/index.html +9 -9
- package/dist/package.js +1 -1
- package/dist/packages/endpoint-tools-protocol/src/index.js +184 -0
- package/dist/packages/gateway-contract/src/tool-activity.js +0 -36
- package/dist/packages/realtime-client/src/index.js +256 -0
- package/dist/packages/realtime-protocol/src/index.js +88 -0
- package/dist/src/agent/agent-manager.d.ts +1 -1
- package/dist/src/agent/agent-manager.js +7 -13
- package/dist/src/agent/background-review/coordinator.js +1 -1
- package/dist/src/agent/background-review/prompts.d.ts +1 -1
- package/dist/src/agent/background-review/prompts.js +3 -1
- package/dist/src/agent/background-review/run-background-review.d.ts +2 -0
- package/dist/src/agent/background-review/run-background-review.js +10 -9
- package/dist/src/agent/bootstrap/bootstrap-cache.d.ts +0 -1
- package/dist/src/agent/bootstrap/bootstrap-cache.js +3 -4
- package/dist/src/agent/bootstrap/bootstrap-files.d.ts +0 -4
- package/dist/src/agent/bootstrap/bootstrap-files.js +3 -4
- package/dist/src/agent/bootstrap/filter-bootstrap-files.js +1 -4
- package/dist/src/agent/bootstrap/load-bootstrap-files.d.ts +0 -1
- package/dist/src/agent/bootstrap/load-bootstrap-files.js +1 -14
- package/dist/src/agent/bootstrap/types.d.ts +1 -1
- package/dist/src/agent/client-error-format.d.ts +1 -1
- package/dist/src/agent/client-error-format.js +1 -1
- package/dist/src/agent/context/workspace-templates/SOUL.md +1 -1
- package/dist/src/agent/external-tools/endpoint-provider.d.ts +17 -0
- package/dist/src/agent/external-tools/endpoint-provider.js +93 -0
- package/dist/src/agent/external-tools/gateway-tools.js +1 -1
- package/dist/src/agent/external-tools/index.d.ts +4 -5
- package/dist/src/agent/external-tools/index.js +8 -2
- package/dist/src/agent/external-tools/types.d.ts +8 -1
- package/dist/src/agent/external-tools/types.js +2 -1
- package/dist/src/agent/inbound/inbound-loop.js +4 -0
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +9 -8
- package/dist/src/agent/inbound/turn-dispatcher.js +13 -11
- package/dist/src/agent/memory/builtin-provider.d.ts +2 -4
- package/dist/src/agent/memory/builtin-provider.js +35 -15
- package/dist/src/agent/memory/context/types.d.ts +3 -1
- package/dist/src/agent/memory/create-memory-manager.js +2 -0
- package/dist/src/agent/memory/index.d.ts +1 -1
- package/dist/src/agent/memory/index.js +1 -1
- package/dist/src/agent/memory/manager.d.ts +9 -1
- package/dist/src/agent/memory/manager.js +39 -9
- package/dist/src/agent/memory/memory-config.d.ts +1 -1
- package/dist/src/agent/memory/memory-config.js +1 -1
- package/dist/src/agent/memory/source-origin.js +0 -2
- package/dist/src/agent/memory/types.d.ts +5 -1
- package/dist/src/agent/memory/understanding/service.d.ts +10 -10
- package/dist/src/agent/memory/understanding/service.js +108 -176
- package/dist/src/agent/memory/understanding/types.d.ts +7 -8
- package/dist/src/agent/memory/user-context-coordinator.d.ts +2 -1
- package/dist/src/agent/memory/user-context-coordinator.js +27 -41
- package/dist/src/agent/messaging/command-handler.d.ts +2 -2
- package/dist/src/agent/messaging/command-handler.js +3 -3
- package/dist/src/agent/orchestration/agent-orchestrator.js +4 -7
- package/dist/src/agent/prompt/sections/memory-skills.js +4 -4
- package/dist/src/agent/prompt/sections/tooling.js +0 -10
- package/dist/src/agent/prompt/service-prompt-builder.d.ts +0 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +4 -33
- package/dist/src/agent/prompt/system-prompt.js +1 -2
- package/dist/src/agent/service/async-queue.d.ts +1 -1
- package/dist/src/agent/service/async-queue.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.d.ts +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +2 -2
- package/dist/src/agent/service/process-direct-one-shot.d.ts +3 -1
- package/dist/src/agent/service/process-direct-one-shot.js +1 -1
- package/dist/src/agent/service/process-direct-streaming.d.ts +7 -5
- package/dist/src/agent/service/process-direct-streaming.js +5 -5
- package/dist/src/agent/service.d.ts +2 -3
- package/dist/src/agent/service.js +10 -21
- package/dist/src/agent/service.types.d.ts +2 -0
- package/dist/src/agent/session/index.d.ts +1 -1
- package/dist/src/agent/session/session-context.d.ts +2 -0
- package/dist/src/agent/session/session-context.js +4 -0
- package/dist/src/agent/session/session-state-bag.d.ts +4 -4
- package/dist/src/agent/session/session-state-bag.js +1 -1
- package/dist/src/agent/skills/marketplace/adapters/clawhub/adapter.js +1 -1
- package/dist/src/agent/streaming/reasoning-visibility.d.ts +6 -0
- package/dist/src/agent/streaming/{reasoning-visibility-sse.js → reasoning-visibility.js} +3 -6
- package/dist/src/agent/tools/dreaming-tool.d.ts +0 -2
- package/dist/src/agent/tools/dreaming-tool.js +13 -38
- package/dist/src/agent/tools/factory.d.ts +4 -3
- package/dist/src/agent/tools/factory.js +2 -10
- package/dist/src/agent/tools/index.d.ts +0 -1
- package/dist/src/agent/tools/index.js +1 -2
- package/dist/src/agent/tools/memory-tool.js +1 -1
- package/dist/src/agent/workspace-runtime/registry.d.ts +3 -5
- package/dist/src/agent/workspace-runtime/registry.js +2 -15
- package/dist/src/agent-manifest/schema.d.ts +17 -17
- package/dist/src/agent-runtime/index.js +1 -1
- package/dist/src/agent-runtime/memory-runtime.d.ts +2 -2
- package/dist/src/agent-runtime/runtime-profile.js +1 -1
- package/dist/src/automations/domain/types.d.ts +2 -1
- package/dist/src/automations/domain/validation.d.ts +29 -29
- package/dist/src/automations/draft/automation-draft-validator.d.ts +3 -3
- package/dist/src/automations/service/action-executor.js +4 -1
- package/dist/src/channels/pairing/pairing-challenge.d.ts +1 -1
- package/dist/src/channels/pairing/pairing-challenge.js +1 -1
- package/dist/src/chat-commands/builtins/understanding.js +2 -5
- package/dist/src/cli/commands/agent/stream-renderer.js +4 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/init.js +3 -22
- package/dist/src/cli/templates.js +1 -1
- package/dist/src/config/index.js +3 -3
- package/dist/src/config/paths.d.ts +0 -5
- package/dist/src/config/paths.js +2 -11
- package/dist/src/config/rules.js +0 -5
- package/dist/src/config/schema.d.ts +27 -122
- package/dist/src/config/schema.js +9 -42
- package/dist/src/config/web-patch.js +0 -1
- package/dist/src/connectors/learning-coordinator.js +75 -3
- package/dist/src/endpoint-tools/auth.d.ts +20 -0
- package/dist/src/endpoint-tools/auth.js +51 -0
- package/dist/src/endpoint-tools/index.d.ts +5 -0
- package/dist/src/endpoint-tools/index.js +6 -0
- package/dist/src/endpoint-tools/invocation-service.d.ts +68 -0
- package/dist/src/endpoint-tools/invocation-service.js +190 -0
- package/dist/src/endpoint-tools/policy.d.ts +10 -0
- package/dist/src/endpoint-tools/policy.js +18 -0
- package/dist/src/endpoint-tools/registry.d.ts +45 -0
- package/dist/src/endpoint-tools/registry.js +121 -0
- package/dist/src/endpoint-tools/runtime.d.ts +23 -0
- package/dist/src/endpoint-tools/runtime.js +86 -0
- package/dist/src/endpoint-tools/upload-service.d.ts +41 -0
- package/dist/src/endpoint-tools/upload-service.js +103 -0
- package/dist/src/extensions/types/hooks.d.ts +1 -1
- package/dist/src/extensions/update.js +1 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agent-builtin-tools.js +0 -5
- package/dist/src/gateway/agents-admin.d.ts +0 -7
- package/dist/src/gateway/agents-admin.js +3 -32
- package/dist/src/gateway/chat-stream/protocol.d.ts +0 -1
- package/dist/src/gateway/clarify-bridge.d.ts +5 -4
- package/dist/src/gateway/clarify-bridge.js +3 -4
- package/dist/src/gateway/dreaming-automation-reconciler.d.ts +3 -3
- package/dist/src/gateway/dreaming-automation-reconciler.js +48 -88
- package/dist/src/gateway/heartbeat/service.js +4 -1
- package/dist/src/gateway/hono/app.js +1 -5
- package/dist/src/gateway/hono/index.d.ts +0 -1
- package/dist/src/gateway/hono/index.js +1 -2
- package/dist/src/gateway/hono/lib/config-payload.d.ts +20 -9
- package/dist/src/gateway/hono/lib/config-payload.js +3 -2
- package/dist/src/gateway/hono/middleware/auth.js +3 -5
- package/dist/src/gateway/hono/oauth-async.d.ts +1 -0
- package/dist/src/gateway/hono/oauth-async.js +17 -2
- package/dist/src/gateway/hono/routes/agent-stream.js +49 -6
- package/dist/src/gateway/hono/routes/agents.js +1 -33
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/gateway.d.ts +2 -2
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +0 -19
- package/dist/src/gateway/hono/routes/config-patch/misc.js +17 -1
- package/dist/src/gateway/hono/routes/connectors.js +13 -12
- package/dist/src/gateway/hono/routes/deps.d.ts +0 -2
- package/dist/src/gateway/hono/routes/endpoint-tools.d.ts +3 -0
- package/dist/src/gateway/hono/routes/endpoint-tools.js +196 -0
- package/dist/src/gateway/hono/routes/index.js +6 -2
- package/dist/src/gateway/hono/routes/lazy-bundles.js +1 -5
- package/dist/src/gateway/hono/routes/logs.js +0 -4
- package/dist/src/gateway/hono/routes/public-gateway.js +2 -2
- package/dist/src/gateway/hono/routes/realtime.d.ts +3 -0
- package/dist/src/gateway/hono/routes/realtime.js +35 -0
- package/dist/src/gateway/hono/routes/status.js +0 -7
- package/dist/src/gateway/hono/routes/understanding-sources.d.ts +3 -0
- package/dist/src/gateway/hono/routes/understanding-sources.js +203 -0
- package/dist/src/gateway/hono/routes/work-discovery.d.ts +2 -0
- package/dist/src/gateway/hono/routes/work-discovery.js +3 -134
- package/dist/src/gateway/hono/routes/workflows.js +1 -1
- package/dist/src/gateway/hono/routes/you.d.ts +0 -31
- package/dist/src/gateway/hono/routes/you.js +230 -1161
- package/dist/src/gateway/index.d.ts +1 -1
- package/dist/src/gateway/index.js +1 -2
- package/dist/src/gateway/protocol.d.ts +1 -7
- package/dist/src/gateway/security/index.js +1 -1
- package/dist/src/gateway/security/operator-scopes.js +1 -1
- package/dist/src/gateway/server.js +4 -4
- package/dist/src/gateway/service/agent-runner.d.ts +11 -9
- package/dist/src/gateway/service/agent-runner.js +18 -18
- package/dist/src/gateway/service/config-coordinator.d.ts +3 -3
- package/dist/src/gateway/service/run-gateway-agent.d.ts +4 -3
- package/dist/src/gateway/service/run-gateway-agent.js +15 -17
- package/dist/src/gateway/service/session-input-coordinator.d.ts +3 -0
- package/dist/src/gateway/service/session-input-coordinator.js +4 -2
- package/dist/src/gateway/service/types.d.ts +0 -5
- package/dist/src/gateway/service.d.ts +7 -6
- package/dist/src/gateway/service.js +43 -26
- package/dist/src/infra/update-runner.js +1 -1
- package/dist/src/knowledge/connected-knowledge-pipeline.js +1 -1
- package/dist/src/knowledge/connected-understanding-pipeline.d.ts +2 -4
- package/dist/src/knowledge/connected-understanding-pipeline.js +31 -81
- package/dist/src/knowledge/index.js +2 -2
- package/dist/src/knowledge/people-graph.d.ts +22 -25
- package/dist/src/knowledge/people-graph.js +76 -43
- package/dist/src/mcp/channel-bridge.d.ts +6 -9
- package/dist/src/mcp/channel-bridge.js +48 -76
- package/dist/src/mcp/channel-server.js +2 -6
- package/dist/src/proactive/execution/context.js +8 -13
- package/dist/src/realtime/broker.d.ts +31 -0
- package/dist/src/realtime/broker.js +114 -0
- package/dist/src/realtime/runtime.d.ts +20 -0
- package/dist/src/realtime/runtime.js +263 -0
- package/dist/src/realtime/tickets.d.ts +15 -0
- package/dist/src/realtime/tickets.js +38 -0
- package/dist/src/realtime/writer.d.ts +15 -0
- package/dist/src/realtime/writer.js +78 -0
- package/dist/src/share/share-config.js +0 -1
- package/dist/src/share/site-share-config.js +0 -1
- package/dist/src/storage/sqlite/connector-account-repository.js +0 -1
- package/dist/src/storage/sqlite/context-consolidation-repository.d.ts +37 -0
- package/dist/src/storage/sqlite/context-consolidation-repository.js +64 -0
- package/dist/src/storage/sqlite/endpoint-principal-repository.d.ts +17 -0
- package/dist/src/storage/sqlite/endpoint-principal-repository.js +54 -0
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.d.ts +25 -0
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.js +42 -0
- package/dist/src/storage/sqlite/fts.d.ts +2 -0
- package/dist/src/storage/sqlite/fts.js +29 -1
- package/dist/src/storage/sqlite/index.d.ts +6 -6
- package/dist/src/storage/sqlite/index.js +7 -7
- package/dist/src/storage/sqlite/knowledge-repository.d.ts +9 -2
- package/dist/src/storage/sqlite/knowledge-repository.js +58 -10
- package/dist/src/storage/sqlite/memory-records-repository.d.ts +7 -56
- package/dist/src/storage/sqlite/memory-records-repository.js +68 -218
- package/dist/src/storage/sqlite/migrations/109_endpoint_principals.sql +14 -0
- package/dist/src/storage/sqlite/migrations/110_session_input_origin.sql +43 -0
- package/dist/src/storage/sqlite/migrations/111_endpoint_tool_invocations.sql +18 -0
- package/dist/src/storage/sqlite/migrations/112_endpoint_instance_bindings.sql +8 -0
- package/dist/src/storage/sqlite/migrations/113_memory_evidence_single_source.sql +54 -0
- package/dist/src/storage/sqlite/migrations/114_user_context_domain.sql +193 -0
- package/dist/src/storage/sqlite/migrations/115_remove_legacy_user_context.sql +6 -0
- package/dist/src/storage/sqlite/migrations/116_structured_context_consolidation.sql +38 -0
- package/dist/src/storage/sqlite/migrations/117_unified_understanding_sources.sql +110 -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/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/schema.sql +0 -20
- package/dist/src/storage/sqlite/session-input-repository.d.ts +3 -0
- package/dist/src/storage/sqlite/session-input-repository.js +5 -3
- package/dist/src/storage/sqlite/user-context-quality-repository.d.ts +34 -0
- package/dist/src/storage/sqlite/user-context-quality-repository.js +74 -0
- package/dist/src/storage/sqlite/user-context-repository.d.ts +64 -0
- package/dist/src/storage/sqlite/user-context-repository.js +383 -0
- package/dist/src/tasks/home-query-service.d.ts +1 -1
- package/dist/src/tui/backends/embedded-backend.js +5 -2
- package/dist/src/tui/backends/{gateway-sse-backend.d.ts → gateway-realtime-backend.d.ts} +13 -10
- package/dist/src/tui/backends/{gateway-sse-backend.js → gateway-realtime-backend.js} +114 -151
- package/dist/src/tui/tool-summary.js +1 -7
- package/dist/src/tui/tui-agent-events.d.ts +0 -1
- package/dist/src/tui/tui-agent-events.js +2 -15
- package/dist/src/tui/tui-backend.d.ts +4 -4
- package/dist/src/tui/tui-run-state.js +0 -4
- package/dist/src/tui/tui-startup-resources.js +1 -2
- package/dist/src/tui/tui-types.d.ts +2 -9
- package/dist/src/tui/tui-types.js +0 -1
- package/dist/src/tui/tui.js +5 -5
- package/dist/src/tunnel/gateway-lifecycle.d.ts +1 -1
- package/dist/src/tunnel/gateway-lifecycle.js +1 -1
- package/dist/src/user-context/config.d.ts +17 -210
- package/dist/src/user-context/config.js +19 -85
- package/dist/src/user-context/consolidation.d.ts +26 -0
- package/dist/src/user-context/consolidation.js +115 -0
- package/dist/src/user-context/domain.d.ts +75 -0
- package/dist/src/user-context/domain.js +4 -0
- package/dist/src/user-context/manual-understanding.d.ts +7 -14
- package/dist/src/user-context/manual-understanding.js +19 -49
- package/dist/src/{agent/memory/context → user-context}/planner.d.ts +5 -6
- package/dist/src/user-context/planner.js +311 -0
- package/dist/src/user-context/relationship-continuity.d.ts +3 -6
- package/dist/src/user-context/relationship-continuity.js +39 -32
- package/dist/src/user-context/sources/catalog.d.ts +2 -0
- package/dist/src/user-context/sources/catalog.js +149 -0
- package/dist/src/user-context/sources/index.d.ts +3 -0
- package/dist/src/user-context/sources/index.js +3 -0
- package/dist/src/user-context/sources/repository.d.ts +40 -0
- package/dist/src/user-context/sources/repository.js +164 -0
- package/dist/src/user-context/sources/types.d.ts +83 -0
- package/dist/src/user-context/understandingQuality.d.ts +5 -0
- package/dist/src/user-context/understandingQuality.js +44 -0
- package/dist/src/utils/logger/log-stream.d.ts +3 -10
- package/dist/src/utils/logger/log-stream.js +2 -73
- package/dist/src/utils/logger/pino-record.d.ts +1 -1
- package/dist/src/utils/logger/streams.js +1 -1
- package/dist/src/work-discovery/analyzer.d.ts +4 -3
- package/dist/src/work-discovery/analyzer.js +21 -16
- package/dist/src/work-discovery/incremental-repository.js +42 -40
- package/dist/src/work-discovery/index.js +3 -3
- package/dist/src/work-discovery/service.d.ts +7 -7
- package/dist/src/work-discovery/service.js +241 -190
- package/dist/src/work-discovery/source-repository.js +42 -53
- package/dist/src/work-discovery/types.d.ts +2 -14
- package/package.json +5 -7
- package/dist/gateway/static/root/assets/agents-C6OV-gMm.js +0 -2
- package/dist/gateway/static/root/assets/apps-page-Ci14lDeO.js +0 -1
- package/dist/gateway/static/root/assets/automations-page-Q1xmb4Rh.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-DbowrHXD.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DoZPFdKF.js +0 -7
- package/dist/gateway/static/root/assets/capability-presets-api-Dn-7MMEo.js +0 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-Bt8Hnx0h.js +0 -1
- package/dist/gateway/static/root/assets/channels-settings-Bpsebsru.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-DFmdYRE5.js +0 -1
- package/dist/gateway/static/root/assets/connector-logo-TRr9ybf6.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-Tg5kl22i.js +0 -2
- package/dist/gateway/static/root/assets/cron-expression-B3B1eqnr.js +0 -2
- package/dist/gateway/static/root/assets/extension-settings-page-C9ag5tb5.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-9g8uIry9.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-fl1oC_-5.js +0 -1
- package/dist/gateway/static/root/assets/home-page-Bao9jq_z.js +0 -3
- package/dist/gateway/static/root/assets/index-Cl5n1f_U.css +0 -1
- package/dist/gateway/static/root/assets/index-OJgiMh07.js +0 -223
- package/dist/gateway/static/root/assets/local-app-workbench-page-B69NvtvH.js +0 -2
- package/dist/gateway/static/root/assets/locale-store-D6hs74o5.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-Cq3cABqg.js +0 -7
- package/dist/gateway/static/root/assets/messages-D02NNLCZ.js +0 -3
- package/dist/gateway/static/root/assets/notes-workbench-BOZfJFhE.js +0 -4
- package/dist/gateway/static/root/assets/product-delivery-C8JbSj5Y.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-TSKFb2tN.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-BokeBrTT.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-C56anxCX.js +0 -1
- package/dist/gateway/static/root/assets/segmented-styles-BL8oLBEp.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-C7TQADrD.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BDOPKeAX.js +0 -1
- package/dist/gateway/static/root/assets/settings-form-section-zxo5ZGOu.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-BUPSIa9P.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BRg766eW.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-DhEAviQ_.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-Ct7AV8ls.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-DoVuprZm.js +0 -2
- package/dist/gateway/static/root/assets/time-picker-BGk_Tbsj.js +0 -1
- package/dist/gateway/static/root/assets/use-save-bar-registration-5aVSjTjO.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-B9K41qmy.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-page-BBVnRHju.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-Bs_tYfst.js +0 -11
- package/dist/src/agent/code-intelligence/binary.d.ts +0 -15
- package/dist/src/agent/code-intelligence/binary.js +0 -372
- package/dist/src/agent/code-intelligence/index.d.ts +0 -4
- package/dist/src/agent/code-intelligence/index.js +0 -4
- package/dist/src/agent/code-intelligence/runtime.d.ts +0 -34
- package/dist/src/agent/code-intelligence/runtime.js +0 -280
- package/dist/src/agent/code-intelligence/tool-gating.d.ts +0 -5
- package/dist/src/agent/code-intelligence/tool-gating.js +0 -6
- package/dist/src/agent/code-intelligence/tools.d.ts +0 -6
- package/dist/src/agent/code-intelligence/tools.js +0 -266
- package/dist/src/agent/code-intelligence/types.d.ts +0 -22
- package/dist/src/agent/memory/context/planner.js +0 -286
- package/dist/src/agent/memory/dreaming/config.d.ts +0 -48
- package/dist/src/agent/memory/dreaming/config.js +0 -98
- package/dist/src/agent/memory/dreaming/constants.d.ts +0 -12
- package/dist/src/agent/memory/dreaming/constants.js +0 -18
- package/dist/src/agent/memory/dreaming/deep-promotion.d.ts +0 -19
- package/dist/src/agent/memory/dreaming/deep-promotion.js +0 -152
- package/dist/src/agent/memory/dreaming/light-sweep.d.ts +0 -16
- package/dist/src/agent/memory/dreaming/light-sweep.js +0 -115
- package/dist/src/agent/memory/dreaming/preview.d.ts +0 -23
- package/dist/src/agent/memory/dreaming/preview.js +0 -52
- package/dist/src/agent/memory/dreaming/promotion-lifecycle.d.ts +0 -16
- package/dist/src/agent/memory/dreaming/promotion-lifecycle.js +0 -44
- package/dist/src/agent/memory/dreaming/rem-patterns.d.ts +0 -19
- package/dist/src/agent/memory/dreaming/rem-patterns.js +0 -150
- package/dist/src/agent/memory/dreaming/runner.d.ts +0 -10
- package/dist/src/agent/memory/dreaming/runner.js +0 -78
- package/dist/src/agent/memory/dreaming/schedule.d.ts +0 -23
- package/dist/src/agent/memory/dreaming/schedule.js +0 -38
- package/dist/src/agent/memory/dreaming/scope.d.ts +0 -11
- package/dist/src/agent/memory/dreaming/scope.js +0 -33
- package/dist/src/agent/memory/dreaming/utils.d.ts +0 -3
- package/dist/src/agent/memory/dreaming/utils.js +0 -31
- package/dist/src/agent/streaming/reasoning-visibility-sse.d.ts +0 -15
- package/dist/src/gateway/agent-run-relay.d.ts +0 -19
- package/dist/src/gateway/agent-run-relay.js +0 -169
- package/dist/src/gateway/hono/routes/memory.d.ts +0 -3
- package/dist/src/gateway/hono/routes/memory.js +0 -460
- package/dist/src/gateway/hono/sse.d.ts +0 -53
- package/dist/src/gateway/hono/sse.js +0 -207
- package/dist/src/gateway/service/sse-hub.d.ts +0 -10
- package/dist/src/gateway/service/sse-hub.js +0 -53
- package/dist/src/storage/sqlite/dreaming-repository.d.ts +0 -61
- package/dist/src/storage/sqlite/dreaming-repository.js +0 -88
- package/dist/src/storage/sqlite/memory-readiness-repository.d.ts +0 -7
- package/dist/src/storage/sqlite/memory-readiness-repository.js +0 -30
- package/dist/src/storage/sqlite/memory-reference-consent-repository.d.ts +0 -27
- package/dist/src/storage/sqlite/memory-reference-consent-repository.js +0 -107
- package/dist/src/storage/sqlite/user-claims-repository.d.ts +0 -101
- package/dist/src/storage/sqlite/user-claims-repository.js +0 -241
- package/dist/src/storage/sqlite/user-profile-setup-repository.d.ts +0 -3
- package/dist/src/storage/sqlite/user-profile-setup-repository.js +0 -32
- package/dist/src/tui/sse-consumer.d.ts +0 -15
- package/dist/src/tui/sse-consumer.js +0 -73
- package/dist/src/user-context/context-compiler.d.ts +0 -27
- package/dist/src/user-context/context-compiler.js +0 -48
- package/dist/src/user-context/import.d.ts +0 -12
- package/dist/src/user-context/import.js +0 -51
- package/dist/src/user-context/memory-episode-evaluator.d.ts +0 -32
- package/dist/src/user-context/memory-episode-evaluator.js +0 -35
- package/dist/src/user-context/memory-readiness.d.ts +0 -33
- package/dist/src/user-context/memory-readiness.js +0 -41
- package/dist/src/user-context/memory-use-audit.d.ts +0 -10
- package/dist/src/user-context/memory-use-audit.js +0 -26
- package/dist/src/user-context/personal-playbook.d.ts +0 -11
- package/dist/src/user-context/personal-playbook.js +0 -41
- package/dist/src/user-context/profile.d.ts +0 -37
- package/dist/src/user-context/profile.js +0 -163
- package/dist/src/user-context/projection.d.ts +0 -120
- package/dist/src/user-context/projection.js +0 -262
- package/dist/src/user-context/source-recommendations.d.ts +0 -13
- package/dist/src/user-context/source-recommendations.js +0 -85
- /package/dist/src/{agent/code-intelligence → user-context/sources}/types.js +0 -0
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { getSqliteDatabase, runSqliteWriteTransaction } from "./transaction.js";
|
|
2
|
+
import { USER_CONTEXT_PRINCIPAL_ID } from "../../user-context/domain.js";
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
4
|
+
//#region src/storage/sqlite/user-context-repository.ts
|
|
5
|
+
const UNDERSTANDING_SELECT = `
|
|
6
|
+
SELECT u.*, v.statement, v.payload_json
|
|
7
|
+
FROM user_understandings u
|
|
8
|
+
JOIN user_understanding_versions v ON v.version_id = u.current_version_id
|
|
9
|
+
`;
|
|
10
|
+
function scopeFromRow(type, id) {
|
|
11
|
+
return id ? {
|
|
12
|
+
type,
|
|
13
|
+
id
|
|
14
|
+
} : { type };
|
|
15
|
+
}
|
|
16
|
+
function understandingFromRow(row) {
|
|
17
|
+
return {
|
|
18
|
+
id: row.understanding_id,
|
|
19
|
+
kind: row.kind,
|
|
20
|
+
canonicalKey: row.canonical_key,
|
|
21
|
+
status: row.status,
|
|
22
|
+
scope: scopeFromRow(row.scope_type, row.scope_id),
|
|
23
|
+
explicitness: row.explicitness,
|
|
24
|
+
durability: row.durability,
|
|
25
|
+
sensitivity: row.sensitivity,
|
|
26
|
+
disclosurePolicy: row.disclosure_policy,
|
|
27
|
+
confidence: row.confidence,
|
|
28
|
+
statement: row.statement,
|
|
29
|
+
payload: JSON.parse(row.payload_json),
|
|
30
|
+
versionId: row.current_version_id,
|
|
31
|
+
...row.valid_from === null ? {} : { validFrom: row.valid_from },
|
|
32
|
+
...row.valid_to === null ? {} : { validTo: row.valid_to },
|
|
33
|
+
...row.expires_at === null ? {} : { expiresAt: row.expires_at },
|
|
34
|
+
...row.review_at === null ? {} : { reviewAt: row.review_at },
|
|
35
|
+
...row.conflict_group_id ? { conflictGroupId: row.conflict_group_id } : {},
|
|
36
|
+
...row.supersedes_id ? { supersedesId: row.supersedes_id } : {},
|
|
37
|
+
createdAt: row.created_at,
|
|
38
|
+
updatedAt: row.updated_at
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function ruleFromRow(row) {
|
|
42
|
+
return {
|
|
43
|
+
id: row.rule_id,
|
|
44
|
+
category: row.category,
|
|
45
|
+
status: row.status,
|
|
46
|
+
priority: row.priority,
|
|
47
|
+
scope: scopeFromRow(row.scope_type, row.scope_id),
|
|
48
|
+
conditions: JSON.parse(row.conditions_json),
|
|
49
|
+
statement: row.statement,
|
|
50
|
+
revisionId: row.current_revision_id,
|
|
51
|
+
createdAt: row.created_at,
|
|
52
|
+
updatedAt: row.updated_at
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function getUserProfile(principalId = USER_CONTEXT_PRINCIPAL_ID) {
|
|
56
|
+
const row = getSqliteDatabase().prepare("SELECT * FROM user_profiles WHERE principal_id = ?").get(principalId);
|
|
57
|
+
if (!row) return {
|
|
58
|
+
callName: "",
|
|
59
|
+
role: "",
|
|
60
|
+
primaryGoal: "",
|
|
61
|
+
pronouns: "",
|
|
62
|
+
timezone: "",
|
|
63
|
+
locale: "",
|
|
64
|
+
accessibility: {},
|
|
65
|
+
createdAt: 0,
|
|
66
|
+
updatedAt: 0
|
|
67
|
+
};
|
|
68
|
+
return {
|
|
69
|
+
callName: row.call_name,
|
|
70
|
+
role: row.role,
|
|
71
|
+
primaryGoal: row.primary_goal,
|
|
72
|
+
pronouns: row.pronouns,
|
|
73
|
+
timezone: row.timezone,
|
|
74
|
+
locale: row.locale,
|
|
75
|
+
accessibility: JSON.parse(row.accessibility_json),
|
|
76
|
+
createdAt: row.created_at,
|
|
77
|
+
updatedAt: row.updated_at
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function updateUserProfile(patch, principalId = USER_CONTEXT_PRINCIPAL_ID) {
|
|
81
|
+
const current = getUserProfile(principalId);
|
|
82
|
+
const now = Date.now();
|
|
83
|
+
const next = {
|
|
84
|
+
...current,
|
|
85
|
+
...patch,
|
|
86
|
+
createdAt: current.createdAt || now,
|
|
87
|
+
updatedAt: now
|
|
88
|
+
};
|
|
89
|
+
runSqliteWriteTransaction((db) => {
|
|
90
|
+
db.prepare(`
|
|
91
|
+
INSERT INTO user_profiles (
|
|
92
|
+
principal_id, call_name, role, primary_goal, pronouns, timezone, locale, accessibility_json, created_at, updated_at
|
|
93
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
94
|
+
ON CONFLICT(principal_id) DO UPDATE SET
|
|
95
|
+
call_name = excluded.call_name,
|
|
96
|
+
role = excluded.role,
|
|
97
|
+
primary_goal = excluded.primary_goal,
|
|
98
|
+
pronouns = excluded.pronouns,
|
|
99
|
+
timezone = excluded.timezone,
|
|
100
|
+
locale = excluded.locale,
|
|
101
|
+
accessibility_json = excluded.accessibility_json,
|
|
102
|
+
updated_at = excluded.updated_at
|
|
103
|
+
`).run(principalId, next.callName, next.role, next.primaryGoal, next.pronouns, next.timezone, next.locale, JSON.stringify(next.accessibility), next.createdAt, next.updatedAt);
|
|
104
|
+
});
|
|
105
|
+
return next;
|
|
106
|
+
}
|
|
107
|
+
function createUnderstanding(input, principalId = USER_CONTEXT_PRINCIPAL_ID) {
|
|
108
|
+
const id = randomUUID();
|
|
109
|
+
const versionId = randomUUID();
|
|
110
|
+
const now = Date.now();
|
|
111
|
+
runSqliteWriteTransaction((db) => {
|
|
112
|
+
db.prepare(`INSERT INTO user_understandings (
|
|
113
|
+
understanding_id, principal_id, kind, canonical_key, status, scope_type, scope_id,
|
|
114
|
+
explicitness, durability, sensitivity, disclosure_policy, confidence, valid_from,
|
|
115
|
+
valid_to, expires_at, review_at, current_version_id, conflict_group_id, supersedes_id,
|
|
116
|
+
created_at, updated_at
|
|
117
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(id, principalId, input.kind, input.canonicalKey, input.status, input.scope.type, input.scope.id ?? null, input.explicitness, input.durability, input.sensitivity, input.disclosurePolicy, input.confidence, input.validFrom ?? null, input.validTo ?? null, input.expiresAt ?? null, input.reviewAt ?? null, versionId, input.conflictGroupId ?? null, input.supersedesId ?? null, now, now);
|
|
118
|
+
db.prepare(`INSERT INTO user_understanding_versions (
|
|
119
|
+
version_id, understanding_id, statement, payload_json, created_by, change_reason, created_at
|
|
120
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?)`).run(versionId, id, input.statement.trim(), JSON.stringify(input.payload ?? {}), input.createdBy, input.changeReason, now);
|
|
121
|
+
db.prepare("INSERT INTO user_understanding_fts (statement, understanding_id, version_id) VALUES (?, ?, ?)").run(input.statement.trim(), id, versionId);
|
|
122
|
+
});
|
|
123
|
+
return getUnderstanding(id);
|
|
124
|
+
}
|
|
125
|
+
function getUnderstanding(id) {
|
|
126
|
+
const row = getSqliteDatabase().prepare(`${UNDERSTANDING_SELECT} WHERE u.understanding_id = ?`).get(id);
|
|
127
|
+
return row ? understandingFromRow(row) : void 0;
|
|
128
|
+
}
|
|
129
|
+
function listUnderstandings(statuses, principalId = USER_CONTEXT_PRINCIPAL_ID) {
|
|
130
|
+
const db = getSqliteDatabase();
|
|
131
|
+
if (!statuses?.length) return db.prepare(`${UNDERSTANDING_SELECT} WHERE u.principal_id = ? ORDER BY u.updated_at DESC`).all(principalId).map(understandingFromRow);
|
|
132
|
+
const placeholders = statuses.map(() => "?").join(", ");
|
|
133
|
+
return db.prepare(`${UNDERSTANDING_SELECT} WHERE u.principal_id = ? AND u.status IN (${placeholders}) ORDER BY u.updated_at DESC`).all(principalId, ...statuses).map(understandingFromRow);
|
|
134
|
+
}
|
|
135
|
+
function reviseUnderstanding(id, statement, options) {
|
|
136
|
+
const current = getUnderstanding(id);
|
|
137
|
+
if (!current) throw new Error(`User understanding not found: ${id}`);
|
|
138
|
+
const versionId = randomUUID();
|
|
139
|
+
const now = Date.now();
|
|
140
|
+
runSqliteWriteTransaction((db) => {
|
|
141
|
+
db.prepare(`INSERT INTO user_understanding_versions (
|
|
142
|
+
version_id, understanding_id, statement, payload_json, created_by, change_reason, created_at
|
|
143
|
+
) VALUES (?, ?, ?, ?, 'user', ?, ?)`).run(versionId, id, statement.trim(), JSON.stringify(options.payload ?? current.payload), options.changeReason, now);
|
|
144
|
+
db.prepare(`UPDATE user_understandings
|
|
145
|
+
SET current_version_id = ?, canonical_key = ?, explicitness = ?, confidence = ?, updated_at = ?
|
|
146
|
+
WHERE understanding_id = ?`).run(versionId, options.canonicalKey ?? current.canonicalKey, options.explicitness ?? current.explicitness, options.confidence ?? current.confidence, now, id);
|
|
147
|
+
db.prepare("DELETE FROM user_understanding_fts WHERE understanding_id = ?").run(id);
|
|
148
|
+
db.prepare("INSERT INTO user_understanding_fts (statement, understanding_id, version_id) VALUES (?, ?, ?)").run(statement.trim(), id, versionId);
|
|
149
|
+
});
|
|
150
|
+
return getUnderstanding(id);
|
|
151
|
+
}
|
|
152
|
+
function setUnderstandingStatus(id, status, confirmation) {
|
|
153
|
+
const now = Date.now();
|
|
154
|
+
getSqliteDatabase().prepare(`UPDATE user_understandings
|
|
155
|
+
SET status = ?,
|
|
156
|
+
explicitness = COALESCE(?, explicitness),
|
|
157
|
+
confidence = COALESCE(?, confidence),
|
|
158
|
+
updated_at = ?
|
|
159
|
+
WHERE understanding_id = ?`).run(status, confirmation?.explicitness ?? null, confirmation?.confidence ?? null, now, id);
|
|
160
|
+
const result = getUnderstanding(id);
|
|
161
|
+
if (!result) throw new Error(`User understanding not found: ${id}`);
|
|
162
|
+
return result;
|
|
163
|
+
}
|
|
164
|
+
function rejectUnderstanding(id, reason) {
|
|
165
|
+
const current = getUnderstanding(id);
|
|
166
|
+
if (!current) throw new Error(`User understanding not found: ${id}`);
|
|
167
|
+
const now = Date.now();
|
|
168
|
+
runSqliteWriteTransaction((db) => {
|
|
169
|
+
db.prepare("UPDATE user_understandings SET status = 'rejected', updated_at = ? WHERE understanding_id = ?").run(now, id);
|
|
170
|
+
db.prepare(`INSERT INTO context_suppressions (
|
|
171
|
+
suppression_id, principal_id, canonical_key, scope_type, scope_id, reason, expires_at, created_at
|
|
172
|
+
) VALUES (?, ?, ?, ?, ?, ?, NULL, ?)
|
|
173
|
+
ON CONFLICT DO UPDATE SET reason = excluded.reason, expires_at = NULL`).run(randomUUID(), USER_CONTEXT_PRINCIPAL_ID, current.canonicalKey, current.scope.type, current.scope.id ?? null, reason, now);
|
|
174
|
+
});
|
|
175
|
+
return getUnderstanding(id);
|
|
176
|
+
}
|
|
177
|
+
function deleteUnderstanding(id) {
|
|
178
|
+
return runSqliteWriteTransaction((db) => {
|
|
179
|
+
db.prepare("DELETE FROM user_understanding_fts WHERE understanding_id = ?").run(id);
|
|
180
|
+
return Number(db.prepare("DELETE FROM user_understandings WHERE understanding_id = ?").run(id).changes) > 0;
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
function isUnderstandingSuppressed(canonicalKey, scope, principalId = USER_CONTEXT_PRINCIPAL_ID) {
|
|
184
|
+
const row = getSqliteDatabase().prepare(`SELECT 1 FROM context_suppressions
|
|
185
|
+
WHERE principal_id = ? AND canonical_key = ? AND scope_type = ?
|
|
186
|
+
AND COALESCE(scope_id, '') = COALESCE(?, '')
|
|
187
|
+
AND (expires_at IS NULL OR expires_at > ?)`).get(principalId, canonicalKey, scope.type, scope.id ?? null, Date.now());
|
|
188
|
+
return Boolean(row);
|
|
189
|
+
}
|
|
190
|
+
function createCollaborationRule(input, principalId = USER_CONTEXT_PRINCIPAL_ID) {
|
|
191
|
+
const id = randomUUID();
|
|
192
|
+
const revisionId = randomUUID();
|
|
193
|
+
const now = Date.now();
|
|
194
|
+
runSqliteWriteTransaction((db) => {
|
|
195
|
+
db.prepare(`INSERT INTO collaboration_rules (
|
|
196
|
+
rule_id, principal_id, category, status, priority, scope_type, scope_id,
|
|
197
|
+
conditions_json, current_revision_id, created_at, updated_at
|
|
198
|
+
) VALUES (?, ?, ?, 'active', ?, ?, ?, ?, ?, ?, ?)`).run(id, principalId, input.category, input.priority, input.scope.type, input.scope.id ?? null, JSON.stringify(input.conditions), revisionId, now, now);
|
|
199
|
+
db.prepare(`INSERT INTO collaboration_rule_revisions (
|
|
200
|
+
revision_id, rule_id, statement, created_by, created_at
|
|
201
|
+
) VALUES (?, ?, ?, 'user', ?)`).run(revisionId, id, input.statement.trim(), now);
|
|
202
|
+
});
|
|
203
|
+
return getCollaborationRule(id);
|
|
204
|
+
}
|
|
205
|
+
function getCollaborationRule(id) {
|
|
206
|
+
const row = getSqliteDatabase().prepare(`SELECT r.*, v.statement FROM collaboration_rules r
|
|
207
|
+
JOIN collaboration_rule_revisions v ON v.revision_id = r.current_revision_id
|
|
208
|
+
WHERE r.rule_id = ?`).get(id);
|
|
209
|
+
return row ? ruleFromRow(row) : void 0;
|
|
210
|
+
}
|
|
211
|
+
function listCollaborationRules(principalId = USER_CONTEXT_PRINCIPAL_ID) {
|
|
212
|
+
return getSqliteDatabase().prepare(`SELECT r.*, v.statement FROM collaboration_rules r
|
|
213
|
+
JOIN collaboration_rule_revisions v ON v.revision_id = r.current_revision_id
|
|
214
|
+
WHERE r.principal_id = ? ORDER BY r.priority ASC, r.updated_at DESC`).all(principalId).map(ruleFromRow);
|
|
215
|
+
}
|
|
216
|
+
function reviseCollaborationRule(id, statement) {
|
|
217
|
+
if (!getCollaborationRule(id)) throw new Error(`Collaboration rule not found: ${id}`);
|
|
218
|
+
const revisionId = randomUUID();
|
|
219
|
+
const now = Date.now();
|
|
220
|
+
runSqliteWriteTransaction((db) => {
|
|
221
|
+
db.prepare(`INSERT INTO collaboration_rule_revisions (
|
|
222
|
+
revision_id, rule_id, statement, created_by, created_at
|
|
223
|
+
) VALUES (?, ?, ?, 'user', ?)`).run(revisionId, id, statement.trim(), now);
|
|
224
|
+
db.prepare("UPDATE collaboration_rules SET current_revision_id = ?, updated_at = ? WHERE rule_id = ?").run(revisionId, now, id);
|
|
225
|
+
});
|
|
226
|
+
return getCollaborationRule(id);
|
|
227
|
+
}
|
|
228
|
+
function setCollaborationRuleStatus(id, status) {
|
|
229
|
+
getSqliteDatabase().prepare("UPDATE collaboration_rules SET status = ?, updated_at = ? WHERE rule_id = ?").run(status, Date.now(), id);
|
|
230
|
+
const result = getCollaborationRule(id);
|
|
231
|
+
if (!result) throw new Error(`Collaboration rule not found: ${id}`);
|
|
232
|
+
return result;
|
|
233
|
+
}
|
|
234
|
+
function deleteCollaborationRule(id) {
|
|
235
|
+
return Number(getSqliteDatabase().prepare("DELETE FROM collaboration_rules WHERE rule_id = ?").run(id).changes) > 0;
|
|
236
|
+
}
|
|
237
|
+
function createContextEvidence(input, principalId = USER_CONTEXT_PRINCIPAL_ID) {
|
|
238
|
+
const existing = getSqliteDatabase().prepare(`SELECT * FROM context_evidence
|
|
239
|
+
WHERE principal_id = ? AND source_type = ?
|
|
240
|
+
AND COALESCE(source_instance_id, '') = COALESCE(?, '') AND source_ref = ?`).get(principalId, input.sourceType, input.sourceInstanceId ?? null, input.sourceRef);
|
|
241
|
+
if (existing) return {
|
|
242
|
+
id: existing.evidence_id,
|
|
243
|
+
sourceType: existing.source_type,
|
|
244
|
+
...existing.source_instance_id ? { sourceInstanceId: existing.source_instance_id } : {},
|
|
245
|
+
sourceRef: existing.source_ref,
|
|
246
|
+
...existing.redacted_excerpt ? { redactedExcerpt: existing.redacted_excerpt } : {},
|
|
247
|
+
trustLevel: existing.trust_level,
|
|
248
|
+
observedAt: existing.observed_at,
|
|
249
|
+
createdAt: existing.created_at
|
|
250
|
+
};
|
|
251
|
+
const evidence = {
|
|
252
|
+
...input,
|
|
253
|
+
id: randomUUID(),
|
|
254
|
+
createdAt: Date.now()
|
|
255
|
+
};
|
|
256
|
+
getSqliteDatabase().prepare(`INSERT INTO context_evidence (
|
|
257
|
+
evidence_id, principal_id, source_type, source_instance_id, source_ref,
|
|
258
|
+
redacted_excerpt, trust_level, observed_at, created_at
|
|
259
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(evidence.id, principalId, evidence.sourceType, evidence.sourceInstanceId ?? null, evidence.sourceRef, evidence.redactedExcerpt ?? null, evidence.trustLevel, evidence.observedAt, evidence.createdAt);
|
|
260
|
+
return evidence;
|
|
261
|
+
}
|
|
262
|
+
function linkUnderstandingEvidence(versionId, evidenceId, relation, confidence) {
|
|
263
|
+
getSqliteDatabase().prepare(`INSERT INTO understanding_evidence_links (
|
|
264
|
+
version_id, evidence_id, relation, confidence
|
|
265
|
+
) VALUES (?, ?, ?, ?)
|
|
266
|
+
ON CONFLICT(version_id, evidence_id, relation) DO UPDATE SET confidence = excluded.confidence`).run(versionId, evidenceId, relation, confidence);
|
|
267
|
+
}
|
|
268
|
+
function listUnderstandingEvidence(understandingId, relation) {
|
|
269
|
+
return getSqliteDatabase().prepare(`SELECT DISTINCT e.* FROM context_evidence e
|
|
270
|
+
JOIN understanding_evidence_links l ON l.evidence_id = e.evidence_id
|
|
271
|
+
JOIN user_understanding_versions v ON v.version_id = l.version_id
|
|
272
|
+
WHERE v.understanding_id = ? AND (? IS NULL OR l.relation = ?)
|
|
273
|
+
ORDER BY e.observed_at DESC`).all(understandingId, relation ?? null, relation ?? null).map((row) => ({
|
|
274
|
+
id: row.evidence_id,
|
|
275
|
+
sourceType: row.source_type,
|
|
276
|
+
...row.source_instance_id ? { sourceInstanceId: row.source_instance_id } : {},
|
|
277
|
+
sourceRef: row.source_ref,
|
|
278
|
+
...row.redacted_excerpt ? { redactedExcerpt: row.redacted_excerpt } : {},
|
|
279
|
+
trustLevel: row.trust_level,
|
|
280
|
+
observedAt: row.observed_at,
|
|
281
|
+
createdAt: row.created_at
|
|
282
|
+
}));
|
|
283
|
+
}
|
|
284
|
+
function recordContextRun(input) {
|
|
285
|
+
const existing = getSqliteDatabase().prepare("SELECT context_run_id FROM context_runs WHERE turn_id = ?").get(input.turnId);
|
|
286
|
+
const runId = existing?.context_run_id ?? randomUUID();
|
|
287
|
+
runSqliteWriteTransaction((db) => {
|
|
288
|
+
if (existing) {
|
|
289
|
+
db.prepare(`UPDATE context_runs SET principal_id = ?, session_key = ?, query = ?, budget = ?, duration_ms = ?
|
|
290
|
+
WHERE context_run_id = ?`).run(input.principalId ?? "local-owner", input.sessionKey, input.query, input.budget, input.durationMs, runId);
|
|
291
|
+
db.prepare("DELETE FROM context_run_items WHERE context_run_id = ?").run(runId);
|
|
292
|
+
} else db.prepare(`INSERT INTO context_runs (
|
|
293
|
+
context_run_id, principal_id, turn_id, session_key, query, budget, duration_ms, created_at
|
|
294
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)`).run(runId, input.principalId ?? "local-owner", input.turnId, input.sessionKey, input.query, input.budget, input.durationMs, Date.now());
|
|
295
|
+
const insert = db.prepare(`INSERT INTO context_run_items (
|
|
296
|
+
context_run_id, object_type, object_id, version_id, decision, reason, content_snapshot,
|
|
297
|
+
source_label, rank, score, injected_chars
|
|
298
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`);
|
|
299
|
+
for (const item of input.items) insert.run(runId, item.objectType, item.objectId, item.versionId ?? null, item.decision, item.reason, item.content, item.sourceLabel, item.rank ?? null, item.score ?? null, item.injectedChars);
|
|
300
|
+
});
|
|
301
|
+
return runId;
|
|
302
|
+
}
|
|
303
|
+
function getTurnPersonalization(turnId) {
|
|
304
|
+
const db = getSqliteDatabase();
|
|
305
|
+
const run = db.prepare("SELECT context_run_id FROM context_runs WHERE turn_id = ?").get(turnId);
|
|
306
|
+
if (!run) return void 0;
|
|
307
|
+
const rows = db.prepare("SELECT * FROM context_run_items WHERE context_run_id = ? ORDER BY rank ASC, object_type ASC").all(run.context_run_id);
|
|
308
|
+
return {
|
|
309
|
+
runId: run.context_run_id,
|
|
310
|
+
items: rows.map((row) => ({
|
|
311
|
+
objectType: row.object_type,
|
|
312
|
+
objectId: row.object_id,
|
|
313
|
+
...row.version_id ? { versionId: row.version_id } : {},
|
|
314
|
+
decision: row.decision,
|
|
315
|
+
reason: row.reason,
|
|
316
|
+
content: row.content_snapshot,
|
|
317
|
+
sourceLabel: row.source_label,
|
|
318
|
+
...row.rank === null ? {} : { rank: row.rank },
|
|
319
|
+
...row.score === null ? {} : { score: row.score },
|
|
320
|
+
injectedChars: row.injected_chars
|
|
321
|
+
}))
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
function recordContextFeedback(input) {
|
|
325
|
+
if (Boolean(input.objectType) !== Boolean(input.objectId)) throw new Error("objectType and objectId must be provided together");
|
|
326
|
+
getSqliteDatabase().prepare(`INSERT INTO context_feedback (
|
|
327
|
+
feedback_id, turn_id, context_run_id, object_type, object_id, rating, reason, created_at
|
|
328
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
329
|
+
ON CONFLICT DO UPDATE SET rating = excluded.rating, reason = excluded.reason, created_at = excluded.created_at`).run(randomUUID(), input.turnId, input.runId, input.objectType ?? null, input.objectId ?? null, input.rating, input.reason ?? null, Date.now());
|
|
330
|
+
}
|
|
331
|
+
function hasContextConsent(understandingId, sessionKey) {
|
|
332
|
+
const now = Date.now();
|
|
333
|
+
return Boolean(getSqliteDatabase().prepare(`SELECT 1 FROM context_consents
|
|
334
|
+
WHERE understanding_id = ? AND status = 'granted'
|
|
335
|
+
AND (grant_scope = 'always' OR session_key = ?)
|
|
336
|
+
AND (expires_at IS NULL OR expires_at > ?)
|
|
337
|
+
LIMIT 1`).get(understandingId, sessionKey, now));
|
|
338
|
+
}
|
|
339
|
+
function consumeContextConsent(understandingId, sessionKey) {
|
|
340
|
+
const db = getSqliteDatabase();
|
|
341
|
+
const now = Date.now();
|
|
342
|
+
const granted = db.prepare(`SELECT consent_id, grant_scope FROM context_consents
|
|
343
|
+
WHERE understanding_id = ? AND status = 'granted'
|
|
344
|
+
AND (grant_scope = 'always' OR session_key = ?)
|
|
345
|
+
AND (expires_at IS NULL OR expires_at > ?)
|
|
346
|
+
ORDER BY CASE grant_scope WHEN 'once' THEN 0 WHEN 'session' THEN 1 ELSE 2 END
|
|
347
|
+
LIMIT 1`).get(understandingId, sessionKey, now);
|
|
348
|
+
if (granted) {
|
|
349
|
+
if (granted.grant_scope === "once") db.prepare("UPDATE context_consents SET status = 'consumed', updated_at = ? WHERE consent_id = ?").run(now, granted.consent_id);
|
|
350
|
+
return "granted";
|
|
351
|
+
}
|
|
352
|
+
return db.prepare(`SELECT 1 FROM context_consents
|
|
353
|
+
WHERE understanding_id = ? AND session_key = ? AND status = 'denied' LIMIT 1`).get(understandingId, sessionKey) ? "denied" : "missing";
|
|
354
|
+
}
|
|
355
|
+
function ensureContextConsent(understandingId, sessionKey, purpose) {
|
|
356
|
+
const db = getSqliteDatabase();
|
|
357
|
+
const existing = db.prepare(`SELECT consent_id, purpose FROM context_consents
|
|
358
|
+
WHERE understanding_id = ? AND session_key = ? AND status = 'pending'`).get(understandingId, sessionKey);
|
|
359
|
+
if (existing) return {
|
|
360
|
+
id: existing.consent_id,
|
|
361
|
+
understandingId,
|
|
362
|
+
purpose: existing.purpose
|
|
363
|
+
};
|
|
364
|
+
const id = randomUUID();
|
|
365
|
+
const now = Date.now();
|
|
366
|
+
db.prepare(`INSERT INTO context_consents (
|
|
367
|
+
consent_id, principal_id, understanding_id, session_key, purpose, status,
|
|
368
|
+
grant_scope, expires_at, created_at, updated_at
|
|
369
|
+
) VALUES (?, ?, ?, ?, ?, 'pending', NULL, NULL, ?, ?)`).run(id, USER_CONTEXT_PRINCIPAL_ID, understandingId, sessionKey, purpose, now, now);
|
|
370
|
+
return {
|
|
371
|
+
id,
|
|
372
|
+
understandingId,
|
|
373
|
+
purpose
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
function decideContextConsent(id, decision) {
|
|
377
|
+
const expiresAt = decision === "once" ? Date.now() + 5 * 6e4 : null;
|
|
378
|
+
const result = getSqliteDatabase().prepare(`UPDATE context_consents
|
|
379
|
+
SET status = ?, grant_scope = ?, expires_at = ?, updated_at = ? WHERE consent_id = ?`).run(decision === "deny" ? "denied" : "granted", decision === "deny" ? null : decision, expiresAt, Date.now(), id);
|
|
380
|
+
return Number(result.changes) > 0;
|
|
381
|
+
}
|
|
382
|
+
//#endregion
|
|
383
|
+
export { consumeContextConsent, createCollaborationRule, createContextEvidence, createUnderstanding, decideContextConsent, deleteCollaborationRule, deleteUnderstanding, ensureContextConsent, getCollaborationRule, getTurnPersonalization, getUnderstanding, getUserProfile, hasContextConsent, isUnderstandingSuppressed, linkUnderstandingEvidence, listCollaborationRules, listUnderstandingEvidence, listUnderstandings, recordContextFeedback, recordContextRun, rejectUnderstanding, reviseCollaborationRule, reviseUnderstanding, setCollaborationRuleStatus, setUnderstandingStatus, updateUserProfile };
|
|
@@ -77,7 +77,7 @@ export declare function buildHomeBriefing(input: {
|
|
|
77
77
|
id: string;
|
|
78
78
|
kind: "task" | "agent_judgment" | "connector_approval";
|
|
79
79
|
title: string;
|
|
80
|
-
reason: "
|
|
80
|
+
reason: "external" | "paused" | "blocked" | "dependency" | "user_input" | "approval_required" | "overdue" | "needs_input" | "user_approval" | "scheduled" | "retry" | "due_soon" | "decision_needed";
|
|
81
81
|
urgency: "now" | "soon";
|
|
82
82
|
href: string;
|
|
83
83
|
updatedAt: number;
|
|
@@ -185,7 +185,7 @@ var EmbeddedBackend = class {
|
|
|
185
185
|
this.onEvent?.({
|
|
186
186
|
event,
|
|
187
187
|
data: payload,
|
|
188
|
-
source: "
|
|
188
|
+
source: "embedded"
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
191
|
};
|
|
@@ -311,7 +311,10 @@ var EmbeddedBackend = class {
|
|
|
311
311
|
(async () => {
|
|
312
312
|
try {
|
|
313
313
|
const messageForAgent = opts.message.trimStart().startsWith("/") ? opts.message : prependEnvelopeTimestamp(opts.message);
|
|
314
|
-
const stream = agent.turnDispatcher.processDirectStreaming(messageForAgent, opts.sessionKey,
|
|
314
|
+
const stream = agent.turnDispatcher.processDirectStreaming(messageForAgent, opts.sessionKey, {
|
|
315
|
+
type: "system",
|
|
316
|
+
source: "cli"
|
|
317
|
+
}, opts.attachments, opts.thinking, {
|
|
315
318
|
signal,
|
|
316
319
|
runId
|
|
317
320
|
});
|
|
@@ -4,22 +4,24 @@ import type { ChatSendOptions, HistoryMessage, TuiBackend, TuiCompactionResult,
|
|
|
4
4
|
import type { SessionInfo } from '../tui-types.js';
|
|
5
5
|
import type { ReviewContext } from '../../review/review-git.js';
|
|
6
6
|
import { type GatewayCredential } from '../../gateway/credential.js';
|
|
7
|
-
interface
|
|
7
|
+
interface GatewayRealtimeOptions {
|
|
8
8
|
url: string;
|
|
9
9
|
credential?: GatewayCredential;
|
|
10
10
|
}
|
|
11
|
-
export declare function normalizeGatewaySseEvent(evt: TuiEvent): TuiEvent;
|
|
12
11
|
/**
|
|
13
|
-
* TUI backend that communicates with a running xopc gateway via
|
|
12
|
+
* TUI backend that communicates with a running xopc gateway via REST + realtime WebSocket.
|
|
14
13
|
*
|
|
15
|
-
* - Agent input: durable session input REST plus
|
|
16
|
-
* - Broadcast events:
|
|
14
|
+
* - Agent input: durable session input REST plus replayable run topics
|
|
15
|
+
* - Broadcast events: gateway realtime topic
|
|
17
16
|
* - REST calls for sessions, models, etc.
|
|
18
17
|
*/
|
|
19
|
-
export declare class
|
|
18
|
+
export declare class GatewayRealtimeBackend implements TuiBackend {
|
|
20
19
|
private readonly baseUrl;
|
|
21
20
|
private readonly credential;
|
|
22
|
-
private
|
|
21
|
+
private readonly clientId;
|
|
22
|
+
private realtime;
|
|
23
|
+
private activeRunId;
|
|
24
|
+
private observedSessionKey;
|
|
23
25
|
private chatAbort;
|
|
24
26
|
onEvent?: (evt: TuiEvent) => void;
|
|
25
27
|
onConnected?: () => void;
|
|
@@ -28,7 +30,7 @@ export declare class GatewaySseBackend implements TuiBackend {
|
|
|
28
30
|
expected: number;
|
|
29
31
|
received: number;
|
|
30
32
|
}) => void;
|
|
31
|
-
constructor(opts:
|
|
33
|
+
constructor(opts: GatewayRealtimeOptions);
|
|
32
34
|
get connectionLabel(): string;
|
|
33
35
|
start(): void;
|
|
34
36
|
stop(): void;
|
|
@@ -156,7 +158,8 @@ export declare class GatewaySseBackend implements TuiBackend {
|
|
|
156
158
|
deleteSession(sessionKey: string): Promise<{
|
|
157
159
|
ok: boolean;
|
|
158
160
|
}>;
|
|
159
|
-
private
|
|
160
|
-
private
|
|
161
|
+
private startRealtime;
|
|
162
|
+
private handleRealtimeEvent;
|
|
163
|
+
private unsubscribeActiveRun;
|
|
161
164
|
}
|
|
162
165
|
export {};
|