@xopcai/xopc 0.0.189 → 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 +0 -3
- 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-DTFKTPs8.js → activity-store-DstnJCS5.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-DqO25Qe5.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-DWeXfwVU.js → api-BTL9kayv.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BRpV8PXG.js → app-management-settings-panel-DkFeIdBf.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-3ntKM9nQ.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-Df7Ycj_7.js → archive-plugin-Ch2RmLCC.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-UHgfZYtj.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-BJah99wE.js → binary-plugins-D6CqlymH.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-DNlY5KqF.js → block-editor-ClL6HEg9.js} +48 -48
- package/dist/gateway/static/root/assets/browser-settings-page-DW99iDmD.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-vyUfdzAd.js → browser-workflow-inputs-BYy48VhN.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-C1cKZjx-.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-BGG2kpJB.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-BUuBEJuP.js → desktop-pet-Cv8rGhYW.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BGfVIJM3.js → desktop-pet-settings-CIeJdwfV.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-DrQFfHH_.js → directory-picker-path-field-D8jXEiAY.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-CEnIFOX-.js → extension-debug-page-CCZ9u6TZ.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CCqHbexs.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-CgUE2Ii1.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-DxhKNiCF.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-DCFdc-HD.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-Bf2VLtXW.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-Ca1RuI13.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-B3Eop1zn.js → management-settings--V_fovKD.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-BGOYjgnM.js → markdown-split-Dt9-in6W.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CT0txyM4.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-DfKgAe78.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-DNrbCgmC.js → page-tabs-C5ge434C.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-BTqViDOR.js → preview-open-alternatives-BFa9DgSV.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-C_2L4_Iu.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-BFLfkDGG.js → schema-form-B84DckWe.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-C9a-EbTZ.js → settings-loading-skeleton-CCtlhoy7.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-DI9qDH5x.js → settings-page-DQmMKf8r.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-D-LWQdI5.js → settings-page-layout-EQIOJa_L.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-CJwmPvgs.js → setup-status-panel-Cwi-SPja.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-BKSMG9r5.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-zsz2HIlZ.js → skills-page.utils-Jhm24i4h.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-IWNDBI1O.js → system-settings-panel-Dpx2ags2.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-CgtK02kP.js → task-detail-page-DLAdxI6e.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-BkJe7UDo.js → theme-store-DnBOcGXi.js} +1 -1
- package/dist/gateway/static/root/assets/{typed-models-lib-C07LGthO.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-Boue1D46.js → voice-api-key-field-BISTPfq_.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-bbmvCmc8.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-DlHv-GZC.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 +7 -7
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/tool-activity.js +0 -36
- package/dist/packages/realtime-client/src/index.js +105 -48
- package/dist/packages/realtime-protocol/src/index.js +6 -1
- package/dist/src/agent/agent-manager.d.ts +0 -1
- package/dist/src/agent/agent-manager.js +6 -13
- package/dist/src/agent/background-review/coordinator.js +1 -1
- package/dist/src/agent/background-review/run-background-review.js +5 -7
- 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/context/workspace-templates/SOUL.md +1 -1
- 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/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/direct-turn-helpers.js +1 -1
- package/dist/src/agent/service.d.ts +1 -2
- package/dist/src/agent/service.js +4 -17
- package/dist/src/agent/skills/marketplace/adapters/clawhub/adapter.js +1 -1
- 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 +0 -3
- package/dist/src/agent/tools/factory.js +1 -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/validation.d.ts +28 -28
- package/dist/src/automations/draft/automation-draft-validator.d.ts +3 -3
- package/dist/src/chat-commands/builtins/understanding.js +2 -5
- package/dist/src/cli/commands/doctor/checks/database-schema.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/schema.d.ts +24 -117
- package/dist/src/config/schema.js +9 -39
- package/dist/src/connectors/learning-coordinator.js +75 -3
- 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/dreaming-automation-reconciler.d.ts +3 -3
- package/dist/src/gateway/dreaming-automation-reconciler.js +48 -88
- package/dist/src/gateway/hono/lib/config-payload.d.ts +19 -7
- package/dist/src/gateway/hono/lib/config-payload.js +3 -1
- 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/agents.js +1 -33
- 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/index.js +2 -2
- package/dist/src/gateway/hono/routes/lazy-bundles.js +1 -5
- 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/you.d.ts +0 -22
- package/dist/src/gateway/hono/routes/you.js +234 -1118
- package/dist/src/gateway/service/config-coordinator.d.ts +1 -1
- package/dist/src/gateway/service/run-gateway-agent.js +2 -4
- 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/proactive/execution/context.js +8 -13
- package/dist/src/realtime/broker.d.ts +1 -0
- package/dist/src/realtime/broker.js +19 -2
- package/dist/src/realtime/runtime.js +6 -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/fts.d.ts +2 -0
- package/dist/src/storage/sqlite/fts.js +29 -1
- package/dist/src/storage/sqlite/index.d.ts +4 -6
- package/dist/src/storage/sqlite/index.js +5 -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/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/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/tui/tool-summary.js +1 -7
- package/dist/src/tui/tui-startup-resources.js +1 -2
- 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 -54
- 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/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 +3 -8
- package/dist/gateway/static/root/assets/agents-BvdqdER9.js +0 -2
- package/dist/gateway/static/root/assets/apps-page-nKLsfy6C.js +0 -1
- package/dist/gateway/static/root/assets/automations-page-Dh5bdZiN.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-CRJ_nAuh.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DeQR5BZt.js +0 -7
- package/dist/gateway/static/root/assets/capability-presets-api-D7tkhDMv.js +0 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-D7uK3q1p.js +0 -1
- package/dist/gateway/static/root/assets/channels-settings-Bw6Dniyq.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-BrUTz4uU.js +0 -1
- package/dist/gateway/static/root/assets/connector-logo-8YU53RUT.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-k9tMiOL5.js +0 -2
- package/dist/gateway/static/root/assets/cron-expression-B3B1eqnr.js +0 -2
- package/dist/gateway/static/root/assets/extension-settings-page-DEZw_7zN.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-Dg8qCiIp.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-27tRzDEo.js +0 -1
- package/dist/gateway/static/root/assets/home-page-VA511kMr.js +0 -3
- package/dist/gateway/static/root/assets/index-BvR-i-m6.js +0 -216
- package/dist/gateway/static/root/assets/index-zybP34zk.css +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CaJq4-wV.js +0 -2
- package/dist/gateway/static/root/assets/locale-store-DUW5YE3R.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-BLTCg69e.js +0 -2
- package/dist/gateway/static/root/assets/messages-CMjnbdbn.js +0 -3
- package/dist/gateway/static/root/assets/notes-workbench-Bp1w9UM1.js +0 -4
- package/dist/gateway/static/root/assets/project-detail-page-CZmbPDQN.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-D5pzqfm5.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CC-XhVGI.js +0 -1
- package/dist/gateway/static/root/assets/segmented-styles-BL8oLBEp.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-B2eTLVDV.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CRuZ_bl0.js +0 -1
- package/dist/gateway/static/root/assets/settings-form-section-C4GXGeA4.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-YzSDS4G_.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-CwOo8zZk.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-xd1cgSGN.js +0 -2
- package/dist/gateway/static/root/assets/time-picker-CstQ___Y.js +0 -1
- package/dist/gateway/static/root/assets/use-save-bar-registration-CQYE0l6z.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-BnQAWS_B.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-page-CAszL1y8.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-DxGzo3-x.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/gateway/hono/routes/memory.d.ts +0 -3
- package/dist/src/gateway/hono/routes/memory.js +0 -460
- 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/user-context/actionableInsights.d.ts +0 -14
- package/dist/src/user-context/actionableInsights.js +0 -34
- 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
|
@@ -1,460 +0,0 @@
|
|
|
1
|
-
import { LOCAL_USER_ID } from "../../../user-context/owner.js";
|
|
2
|
-
import { appendMemorySignal, appendMemoryTraceEvent, deleteMemoryRecord, getMemoryRecord, listMemoryRecords, listMemorySignals, listMemoryTraceEvents, searchMemoryRecords, summarizeMemoryRecallFeedback, summarizeUserUnderstandingQuality, upsertMemoryRecord } from "../../../storage/sqlite/memory-records-repository.js";
|
|
3
|
-
import { listKnowledgeSourceChanges, listKnowledgeSourceItems, listKnowledgeSyncRuns } from "../../../storage/sqlite/knowledge-repository.js";
|
|
4
|
-
import "../../../storage/sqlite/index.js";
|
|
5
|
-
import { ResponseLanguageSchema, init_response_language } from "../../../i18n/response-language.js";
|
|
6
|
-
import { UserContextConfigSchema, init_config } from "../../../user-context/config.js";
|
|
7
|
-
import { init_agent_scope, resolveDefaultAgentId } from "../../../agent/agent-scope.js";
|
|
8
|
-
import { discoverMemoryPlugins } from "../../../agent/memory/plugin-discovery.js";
|
|
9
|
-
import { createMemoryManagerFromConfig } from "../../../agent/memory/create-memory-manager.js";
|
|
10
|
-
import { resolveAdaptiveUnderstandingCadence } from "../../../agent/memory/understanding/quality.js";
|
|
11
|
-
import { summarizeMemoryUseAudit } from "../../../user-context/memory-use-audit.js";
|
|
12
|
-
//#region src/gateway/hono/routes/memory.ts
|
|
13
|
-
init_agent_scope();
|
|
14
|
-
init_config();
|
|
15
|
-
init_response_language();
|
|
16
|
-
const MEMORY_KINDS = new Set([
|
|
17
|
-
"user_profile",
|
|
18
|
-
"preference",
|
|
19
|
-
"boundary",
|
|
20
|
-
"relationship",
|
|
21
|
-
"project_context",
|
|
22
|
-
"commitment",
|
|
23
|
-
"routine",
|
|
24
|
-
"personal_logistics",
|
|
25
|
-
"open_question",
|
|
26
|
-
"milestone",
|
|
27
|
-
"current_state",
|
|
28
|
-
"user_note",
|
|
29
|
-
"workspace_fact",
|
|
30
|
-
"daily_note",
|
|
31
|
-
"session_summary",
|
|
32
|
-
"derived_insight",
|
|
33
|
-
"task_lesson",
|
|
34
|
-
"tool_preference",
|
|
35
|
-
"long_term_goal"
|
|
36
|
-
]);
|
|
37
|
-
const MEMORY_EXPLICITNESS = new Set([
|
|
38
|
-
"explicit",
|
|
39
|
-
"observed",
|
|
40
|
-
"inferred"
|
|
41
|
-
]);
|
|
42
|
-
const MEMORY_DURABILITY = new Set([
|
|
43
|
-
"ephemeral",
|
|
44
|
-
"durable",
|
|
45
|
-
"recurring"
|
|
46
|
-
]);
|
|
47
|
-
const MEMORY_DISCLOSURE_POLICIES = new Set([
|
|
48
|
-
"silent",
|
|
49
|
-
"referenceable",
|
|
50
|
-
"ask_before_reference"
|
|
51
|
-
]);
|
|
52
|
-
const MEMORY_STATUSES = new Set([
|
|
53
|
-
"candidate",
|
|
54
|
-
"active",
|
|
55
|
-
"needs_review",
|
|
56
|
-
"stale",
|
|
57
|
-
"archived",
|
|
58
|
-
"rejected"
|
|
59
|
-
]);
|
|
60
|
-
const MEMORY_SENSITIVITIES = new Set([
|
|
61
|
-
"normal",
|
|
62
|
-
"personal",
|
|
63
|
-
"secret",
|
|
64
|
-
"regulated"
|
|
65
|
-
]);
|
|
66
|
-
const KNOWLEDGE_SYNTHESIS_STATUSES = new Set([
|
|
67
|
-
"pending",
|
|
68
|
-
"processing",
|
|
69
|
-
"completed",
|
|
70
|
-
"failed",
|
|
71
|
-
"ignored"
|
|
72
|
-
]);
|
|
73
|
-
function parseLimit(raw, fallback = 100) {
|
|
74
|
-
const parsed = raw ? Number.parseInt(raw, 10) : fallback;
|
|
75
|
-
return Number.isFinite(parsed) ? Math.max(1, Math.min(500, parsed)) : fallback;
|
|
76
|
-
}
|
|
77
|
-
function parseFeedbackSummaryLimit(raw) {
|
|
78
|
-
const parsed = raw ? Number.parseInt(raw, 10) : 1e3;
|
|
79
|
-
return Number.isFinite(parsed) ? Math.max(1, Math.min(5e3, parsed)) : 1e3;
|
|
80
|
-
}
|
|
81
|
-
function parseWindowDays(raw) {
|
|
82
|
-
const parsed = raw ? Number.parseInt(raw, 10) : 30;
|
|
83
|
-
return Number.isFinite(parsed) ? Math.max(1, Math.min(365, parsed)) : 30;
|
|
84
|
-
}
|
|
85
|
-
function parseKind(raw) {
|
|
86
|
-
return typeof raw === "string" && MEMORY_KINDS.has(raw) ? raw : void 0;
|
|
87
|
-
}
|
|
88
|
-
function parseStatus(raw) {
|
|
89
|
-
return typeof raw === "string" && MEMORY_STATUSES.has(raw) ? raw : void 0;
|
|
90
|
-
}
|
|
91
|
-
function parseSensitivity(raw) {
|
|
92
|
-
return typeof raw === "string" && MEMORY_SENSITIVITIES.has(raw) ? raw : void 0;
|
|
93
|
-
}
|
|
94
|
-
function parseEnum(raw, allowed) {
|
|
95
|
-
return typeof raw === "string" && allowed.has(raw) ? raw : void 0;
|
|
96
|
-
}
|
|
97
|
-
function registerMemoryRoutes(authenticated, deps) {
|
|
98
|
-
authenticated.get("/api/you/providers", async (c) => {
|
|
99
|
-
const cfg = deps.service.currentConfig;
|
|
100
|
-
const plugins = await discoverMemoryPlugins(cfg);
|
|
101
|
-
return c.json({ providers: [{
|
|
102
|
-
id: "local",
|
|
103
|
-
displayName: "Local Knowledge Store",
|
|
104
|
-
available: true,
|
|
105
|
-
configured: true,
|
|
106
|
-
capabilities: {
|
|
107
|
-
search: true,
|
|
108
|
-
read: true,
|
|
109
|
-
write: true,
|
|
110
|
-
update: true,
|
|
111
|
-
delete: true,
|
|
112
|
-
keywordSearch: true,
|
|
113
|
-
semanticSearch: false,
|
|
114
|
-
hybridSearch: false,
|
|
115
|
-
citations: true,
|
|
116
|
-
sync: false,
|
|
117
|
-
local: true
|
|
118
|
-
}
|
|
119
|
-
}, ...plugins.map((plugin) => ({
|
|
120
|
-
id: plugin.manifest?.id ?? plugin.name,
|
|
121
|
-
displayName: plugin.manifest?.displayName ?? plugin.name,
|
|
122
|
-
available: plugin.available,
|
|
123
|
-
configured: false,
|
|
124
|
-
capabilities: plugin.manifest?.capabilities ?? {}
|
|
125
|
-
}))] });
|
|
126
|
-
});
|
|
127
|
-
authenticated.get("/api/you/config", (c) => {
|
|
128
|
-
const cfg = deps.service.currentConfig;
|
|
129
|
-
return c.json({ userContext: cfg.userContext });
|
|
130
|
-
});
|
|
131
|
-
authenticated.put("/api/you/config", deps.strictRateLimitMiddleware, async (c) => {
|
|
132
|
-
const cfg = deps.service.currentConfig;
|
|
133
|
-
const body = await c.req.json().catch(() => ({}));
|
|
134
|
-
const parsed = UserContextConfigSchema.safeParse(body);
|
|
135
|
-
if (!parsed.success) return c.json({ error: `userContext ${parsed.error.issues[0]?.message ?? "is invalid"}` }, 400);
|
|
136
|
-
const save = await deps.service.saveConfig({
|
|
137
|
-
...cfg,
|
|
138
|
-
userContext: parsed.data
|
|
139
|
-
});
|
|
140
|
-
if (!save.saved) return c.json({ error: save.error ?? "save failed" }, 500);
|
|
141
|
-
deps.service.refreshUserProfileContext();
|
|
142
|
-
return c.json({ userContext: deps.service.currentConfig.userContext });
|
|
143
|
-
});
|
|
144
|
-
authenticated.patch("/api/you/preferences", deps.strictRateLimitMiddleware, async (c) => {
|
|
145
|
-
const cfg = deps.service.currentConfig;
|
|
146
|
-
const body = await c.req.json().catch(() => ({}));
|
|
147
|
-
const responseLanguage = ResponseLanguageSchema.safeParse(body.responseLanguage);
|
|
148
|
-
if (!responseLanguage.success) return c.json({ error: "Invalid responseLanguage" }, 400);
|
|
149
|
-
const userContext = UserContextConfigSchema.parse({
|
|
150
|
-
...cfg.userContext,
|
|
151
|
-
preferences: { responseLanguage: responseLanguage.data }
|
|
152
|
-
});
|
|
153
|
-
const save = await deps.service.saveConfig({
|
|
154
|
-
...cfg,
|
|
155
|
-
userContext
|
|
156
|
-
});
|
|
157
|
-
if (!save.saved) return c.json({ error: save.error ?? "save failed" }, 500);
|
|
158
|
-
deps.service.refreshUserProfileContext();
|
|
159
|
-
return c.json({ preferences: userContext.preferences });
|
|
160
|
-
});
|
|
161
|
-
authenticated.get("/api/you/memories", (c) => {
|
|
162
|
-
if (c.req.query("agentId")) return c.json({ error: "agentId is not supported" }, 400);
|
|
163
|
-
const records = listMemoryRecords({
|
|
164
|
-
providerId: c.req.query("providerId") || void 0,
|
|
165
|
-
userId: LOCAL_USER_ID,
|
|
166
|
-
workspaceId: c.req.query("workspaceId") || void 0,
|
|
167
|
-
projectId: c.req.query("projectId") || void 0,
|
|
168
|
-
kind: parseKind(c.req.query("kind")),
|
|
169
|
-
status: parseStatus(c.req.query("status")),
|
|
170
|
-
limit: parseLimit(c.req.query("limit")),
|
|
171
|
-
offset: c.req.query("offset") ? Number.parseInt(c.req.query("offset"), 10) : 0
|
|
172
|
-
});
|
|
173
|
-
return c.json({ records });
|
|
174
|
-
});
|
|
175
|
-
authenticated.post("/api/you/memories/search", async (c) => {
|
|
176
|
-
const body = await c.req.json().catch(() => ({}));
|
|
177
|
-
const query = typeof body.query === "string" ? body.query.trim() : "";
|
|
178
|
-
if (!query) return c.json({ error: "Missing required field: query" }, 400);
|
|
179
|
-
if (Object.hasOwn(body, "agentId") || Object.hasOwn(body, "userId")) return c.json({ error: "agentId and userId are not accepted" }, 400);
|
|
180
|
-
const records = searchMemoryRecords({
|
|
181
|
-
query,
|
|
182
|
-
providerId: typeof body.providerId === "string" ? body.providerId : void 0,
|
|
183
|
-
userId: LOCAL_USER_ID,
|
|
184
|
-
workspaceId: typeof body.workspaceId === "string" ? body.workspaceId : void 0,
|
|
185
|
-
projectId: typeof body.projectId === "string" ? body.projectId : void 0,
|
|
186
|
-
kinds: Array.isArray(body.kinds) ? body.kinds.map(parseKind).filter((v) => Boolean(v)) : void 0,
|
|
187
|
-
statuses: Array.isArray(body.statuses) ? body.statuses.map(parseStatus).filter((v) => Boolean(v)) : void 0,
|
|
188
|
-
maxResults: typeof body.maxResults === "number" ? body.maxResults : void 0,
|
|
189
|
-
minScore: typeof body.minScore === "number" ? body.minScore : void 0
|
|
190
|
-
});
|
|
191
|
-
return c.json({ results: records });
|
|
192
|
-
});
|
|
193
|
-
authenticated.post("/api/you/memories", async (c) => {
|
|
194
|
-
const body = await c.req.json().catch(() => ({}));
|
|
195
|
-
const kind = parseKind(body.kind);
|
|
196
|
-
const content = typeof body.content === "string" ? body.content.trim() : "";
|
|
197
|
-
if (Object.hasOwn(body, "agentId") || Object.hasOwn(body, "userId")) return c.json({ error: "agentId and userId are not accepted" }, 400);
|
|
198
|
-
if (!kind || !content) return c.json({ error: "Missing required fields: kind, content" }, 400);
|
|
199
|
-
const record = upsertMemoryRecord({
|
|
200
|
-
id: typeof body.id === "string" && body.id.trim() ? body.id.trim() : void 0,
|
|
201
|
-
providerId: typeof body.providerId === "string" && body.providerId.trim() ? body.providerId.trim() : "local",
|
|
202
|
-
kind,
|
|
203
|
-
sourceAgentId: resolveDefaultAgentId(deps.service.currentConfig),
|
|
204
|
-
workspaceId: typeof body.workspaceId === "string" ? body.workspaceId : deps.service.currentWorkspacePath,
|
|
205
|
-
sessionKey: typeof body.sessionKey === "string" ? body.sessionKey : void 0,
|
|
206
|
-
projectId: typeof body.projectId === "string" ? body.projectId : void 0,
|
|
207
|
-
content,
|
|
208
|
-
source: body.source && typeof body.source === "object" ? body.source : void 0,
|
|
209
|
-
confidence: typeof body.confidence === "number" ? body.confidence : void 0,
|
|
210
|
-
tags: Array.isArray(body.tags) ? body.tags.filter((tag) => typeof tag === "string") : void 0,
|
|
211
|
-
status: parseStatus(body.status),
|
|
212
|
-
sensitivity: parseSensitivity(body.sensitivity),
|
|
213
|
-
canonicalKey: typeof body.canonicalKey === "string" ? body.canonicalKey : void 0,
|
|
214
|
-
explicitness: parseEnum(body.explicitness, MEMORY_EXPLICITNESS),
|
|
215
|
-
durability: parseEnum(body.durability, MEMORY_DURABILITY),
|
|
216
|
-
importance: typeof body.importance === "number" ? body.importance : void 0,
|
|
217
|
-
disclosurePolicy: parseEnum(body.disclosurePolicy, MEMORY_DISCLOSURE_POLICIES),
|
|
218
|
-
evidence: Array.isArray(body.evidence) ? body.evidence.filter((item) => Boolean(item) && typeof item === "object") : void 0,
|
|
219
|
-
reviewAfter: typeof body.reviewAfter === "string" ? body.reviewAfter : void 0,
|
|
220
|
-
expiresAt: typeof body.expiresAt === "string" ? body.expiresAt : void 0,
|
|
221
|
-
validFrom: typeof body.validFrom === "string" ? body.validFrom : void 0,
|
|
222
|
-
validTo: typeof body.validTo === "string" ? body.validTo : void 0,
|
|
223
|
-
supersedesRecordId: typeof body.supersedesRecordId === "string" ? body.supersedesRecordId : void 0,
|
|
224
|
-
conflictGroupId: typeof body.conflictGroupId === "string" ? body.conflictGroupId : void 0
|
|
225
|
-
});
|
|
226
|
-
return c.json({ record }, 201);
|
|
227
|
-
});
|
|
228
|
-
authenticated.put("/api/you/memories/:id", async (c) => {
|
|
229
|
-
const existing = getMemoryRecord(c.req.param("id"));
|
|
230
|
-
if (!existing) return c.json({ error: "Memory record not found" }, 404);
|
|
231
|
-
if (c.req.query("agentId")) return c.json({ error: "agentId is not supported" }, 400);
|
|
232
|
-
const body = await c.req.json().catch(() => ({}));
|
|
233
|
-
const record = upsertMemoryRecord({
|
|
234
|
-
id: existing.id,
|
|
235
|
-
providerId: existing.source.provider ?? "local",
|
|
236
|
-
kind: parseKind(body.kind) ?? existing.kind,
|
|
237
|
-
sourceAgentId: existing.provenance.sourceAgentId,
|
|
238
|
-
workspaceId: existing.scope.workspaceId,
|
|
239
|
-
sessionKey: existing.scope.sessionKey,
|
|
240
|
-
projectId: typeof body.projectId === "string" ? body.projectId : existing.scope.projectId,
|
|
241
|
-
content: typeof body.content === "string" ? body.content : existing.content,
|
|
242
|
-
source: body.source && typeof body.source === "object" ? body.source : existing.source,
|
|
243
|
-
confidence: typeof body.confidence === "number" ? body.confidence : existing.confidence,
|
|
244
|
-
tags: Array.isArray(body.tags) ? body.tags.filter((tag) => typeof tag === "string") : existing.tags,
|
|
245
|
-
status: parseStatus(body.status) ?? existing.status,
|
|
246
|
-
sensitivity: parseSensitivity(body.sensitivity) ?? existing.sensitivity,
|
|
247
|
-
canonicalKey: typeof body.canonicalKey === "string" ? body.canonicalKey : existing.canonicalKey,
|
|
248
|
-
explicitness: parseEnum(body.explicitness, MEMORY_EXPLICITNESS) ?? existing.explicitness,
|
|
249
|
-
durability: parseEnum(body.durability, MEMORY_DURABILITY) ?? existing.durability,
|
|
250
|
-
importance: typeof body.importance === "number" ? body.importance : existing.importance,
|
|
251
|
-
disclosurePolicy: parseEnum(body.disclosurePolicy, MEMORY_DISCLOSURE_POLICIES) ?? existing.disclosurePolicy,
|
|
252
|
-
evidence: Array.isArray(body.evidence) ? body.evidence.filter((item) => Boolean(item) && typeof item === "object") : existing.evidence,
|
|
253
|
-
reviewAfter: typeof body.reviewAfter === "string" ? body.reviewAfter : existing.reviewAfter,
|
|
254
|
-
expiresAt: typeof body.expiresAt === "string" ? body.expiresAt : existing.expiresAt,
|
|
255
|
-
validFrom: typeof body.validFrom === "string" ? body.validFrom : existing.validFrom,
|
|
256
|
-
validTo: typeof body.validTo === "string" ? body.validTo : existing.validTo,
|
|
257
|
-
supersedesRecordId: typeof body.supersedesRecordId === "string" ? body.supersedesRecordId : existing.supersedesRecordId,
|
|
258
|
-
conflictGroupId: typeof body.conflictGroupId === "string" ? body.conflictGroupId : existing.conflictGroupId
|
|
259
|
-
});
|
|
260
|
-
return c.json({ record });
|
|
261
|
-
});
|
|
262
|
-
authenticated.delete("/api/you/memories/:id", (c) => {
|
|
263
|
-
const existing = getMemoryRecord(c.req.param("id"));
|
|
264
|
-
if (c.req.query("agentId")) return c.json({ error: "agentId is not supported" }, 400);
|
|
265
|
-
if (!existing || existing.scope.userId !== "local-owner") return c.json({ error: "Memory record not found" }, 404);
|
|
266
|
-
if (!deleteMemoryRecord(c.req.param("id"))) return c.json({ error: "Memory record not found" }, 404);
|
|
267
|
-
return c.json({ ok: true });
|
|
268
|
-
});
|
|
269
|
-
authenticated.get("/api/you/signals", (c) => {
|
|
270
|
-
if (c.req.query("agentId")) return c.json({ error: "agentId is not supported" }, 400);
|
|
271
|
-
const signals = listMemorySignals({
|
|
272
|
-
recordId: c.req.query("recordId") || void 0,
|
|
273
|
-
providerId: c.req.query("providerId") || void 0,
|
|
274
|
-
userId: LOCAL_USER_ID,
|
|
275
|
-
workspaceId: c.req.query("workspaceId") || void 0,
|
|
276
|
-
limit: parseLimit(c.req.query("limit"))
|
|
277
|
-
});
|
|
278
|
-
return c.json({ signals });
|
|
279
|
-
});
|
|
280
|
-
authenticated.get("/api/knowledge/source-items", (c) => {
|
|
281
|
-
const sourceItems = listKnowledgeSourceItems({
|
|
282
|
-
sourceInstanceId: c.req.query("sourceInstanceId") || void 0,
|
|
283
|
-
synthesisStatus: parseEnum(c.req.query("synthesisStatus"), KNOWLEDGE_SYNTHESIS_STATUSES),
|
|
284
|
-
includeDeleted: c.req.query("includeDeleted") === "true",
|
|
285
|
-
limit: parseLimit(c.req.query("limit")),
|
|
286
|
-
offset: c.req.query("offset") ? Number.parseInt(c.req.query("offset"), 10) : 0
|
|
287
|
-
});
|
|
288
|
-
return c.json({ sourceItems });
|
|
289
|
-
});
|
|
290
|
-
authenticated.get("/api/knowledge/source-changes", (c) => {
|
|
291
|
-
const afterSequenceQuery = c.req.query("afterSequence");
|
|
292
|
-
const afterSequence = afterSequenceQuery ? Number.parseInt(afterSequenceQuery, 10) : void 0;
|
|
293
|
-
const sourceChanges = listKnowledgeSourceChanges({
|
|
294
|
-
sourceInstanceId: c.req.query("sourceInstanceId") || void 0,
|
|
295
|
-
afterSequence: Number.isFinite(afterSequence) ? afterSequence : void 0,
|
|
296
|
-
limit: parseLimit(c.req.query("limit"))
|
|
297
|
-
});
|
|
298
|
-
return c.json({ sourceChanges });
|
|
299
|
-
});
|
|
300
|
-
authenticated.get("/api/knowledge/sync-runs", (c) => {
|
|
301
|
-
const syncRuns = listKnowledgeSyncRuns({
|
|
302
|
-
sourceInstanceId: c.req.query("sourceInstanceId") || void 0,
|
|
303
|
-
limit: parseLimit(c.req.query("limit"))
|
|
304
|
-
});
|
|
305
|
-
return c.json({ syncRuns });
|
|
306
|
-
});
|
|
307
|
-
authenticated.get("/api/you/traces", (c) => {
|
|
308
|
-
const traces = listMemoryTraceEvents({
|
|
309
|
-
providerId: c.req.query("providerId") || void 0,
|
|
310
|
-
sessionKey: c.req.query("sessionKey") || void 0,
|
|
311
|
-
phase: c.req.query("phase") || void 0,
|
|
312
|
-
limit: parseLimit(c.req.query("limit"))
|
|
313
|
-
});
|
|
314
|
-
return c.json({ traces });
|
|
315
|
-
});
|
|
316
|
-
authenticated.get("/api/you/memory-use-audit", (c) => {
|
|
317
|
-
const traces = listMemoryTraceEvents({
|
|
318
|
-
sessionKey: c.req.query("sessionKey") || void 0,
|
|
319
|
-
limit: parseLimit(c.req.query("limit"))
|
|
320
|
-
});
|
|
321
|
-
return c.json({ audit: summarizeMemoryUseAudit(traces) });
|
|
322
|
-
});
|
|
323
|
-
authenticated.get("/api/you/feedback-summary", (c) => {
|
|
324
|
-
const summaries = summarizeMemoryRecallFeedback({
|
|
325
|
-
recordId: c.req.query("recordId") || void 0,
|
|
326
|
-
providerId: c.req.query("providerId") || void 0,
|
|
327
|
-
sessionKey: c.req.query("sessionKey") || void 0,
|
|
328
|
-
limit: parseFeedbackSummaryLimit(c.req.query("limit"))
|
|
329
|
-
});
|
|
330
|
-
return c.json({ summaries });
|
|
331
|
-
});
|
|
332
|
-
authenticated.get("/api/you/quality", (c) => {
|
|
333
|
-
const cfg = deps.service.currentConfig;
|
|
334
|
-
const metrics = summarizeUserUnderstandingQuality({ windowDays: parseWindowDays(c.req.query("windowDays")) });
|
|
335
|
-
const baseIntervalTurns = cfg.userContext.understanding.reviewIntervalTurns;
|
|
336
|
-
const cadence = resolveAdaptiveUnderstandingCadence(baseIntervalTurns, metrics, cfg.userContext.understanding.adaptiveCadence);
|
|
337
|
-
return c.json({
|
|
338
|
-
metrics,
|
|
339
|
-
cadence
|
|
340
|
-
});
|
|
341
|
-
});
|
|
342
|
-
authenticated.post("/api/you/signals", async (c) => {
|
|
343
|
-
const body = await c.req.json().catch(() => ({}));
|
|
344
|
-
const source = typeof body.source === "string" ? body.source : "";
|
|
345
|
-
if (!source) return c.json({ error: "Missing required field: source" }, 400);
|
|
346
|
-
const signalId = appendMemorySignal({
|
|
347
|
-
providerId: typeof body.providerId === "string" ? body.providerId : void 0,
|
|
348
|
-
sourceAgentId: resolveDefaultAgentId(deps.service.currentConfig),
|
|
349
|
-
workspaceId: typeof body.workspaceId === "string" ? body.workspaceId : void 0,
|
|
350
|
-
sessionKey: typeof body.sessionKey === "string" ? body.sessionKey : void 0,
|
|
351
|
-
signal: {
|
|
352
|
-
source,
|
|
353
|
-
recordId: typeof body.recordId === "string" ? body.recordId : void 0,
|
|
354
|
-
score: typeof body.score === "number" ? body.score : void 0,
|
|
355
|
-
content: typeof body.content === "string" ? body.content : void 0,
|
|
356
|
-
metadata: body.metadata && typeof body.metadata === "object" ? body.metadata : void 0
|
|
357
|
-
}
|
|
358
|
-
});
|
|
359
|
-
return c.json({ signalId }, 201);
|
|
360
|
-
});
|
|
361
|
-
authenticated.post("/api/you/providers/:id/test", deps.strictRateLimitMiddleware, async (c) => {
|
|
362
|
-
const providerId = c.req.param("id");
|
|
363
|
-
const cfg = deps.service.currentConfig;
|
|
364
|
-
const workspace = deps.service.currentWorkspacePath;
|
|
365
|
-
const manager = createMemoryManagerFromConfig(cfg);
|
|
366
|
-
await manager.initializeAll(`memory-provider-test-${Date.now()}`, {
|
|
367
|
-
workspace,
|
|
368
|
-
agentId: resolveDefaultAgentId(cfg)
|
|
369
|
-
});
|
|
370
|
-
const provider = manager.providersList.find((p) => p.id === providerId);
|
|
371
|
-
if (!provider) return c.json({
|
|
372
|
-
providerId,
|
|
373
|
-
available: false,
|
|
374
|
-
checks: [{
|
|
375
|
-
name: "load",
|
|
376
|
-
ok: false,
|
|
377
|
-
message: "Provider not loaded"
|
|
378
|
-
}]
|
|
379
|
-
}, 404);
|
|
380
|
-
const token = `xopc-memory-smoke-${Date.now()}`;
|
|
381
|
-
const checks = [{
|
|
382
|
-
name: "load",
|
|
383
|
-
ok: true
|
|
384
|
-
}, {
|
|
385
|
-
name: "available",
|
|
386
|
-
ok: provider.isAvailable()
|
|
387
|
-
}];
|
|
388
|
-
const started = Date.now();
|
|
389
|
-
try {
|
|
390
|
-
const write = await manager.write({
|
|
391
|
-
kind: "workspace_fact",
|
|
392
|
-
content: `Smoke test record for ${providerId}: ${token}`,
|
|
393
|
-
scope: { userId: LOCAL_USER_ID },
|
|
394
|
-
tags: ["xopc-smoke-test"]
|
|
395
|
-
});
|
|
396
|
-
checks.push({
|
|
397
|
-
name: "write",
|
|
398
|
-
ok: write.success,
|
|
399
|
-
message: write.error ?? write.message
|
|
400
|
-
});
|
|
401
|
-
const ownResults = (await manager.search({
|
|
402
|
-
query: token,
|
|
403
|
-
scope: { userId: LOCAL_USER_ID },
|
|
404
|
-
maxResults: 10
|
|
405
|
-
})).filter((result) => result.citation.providerId === providerId);
|
|
406
|
-
checks.push({
|
|
407
|
-
name: "search",
|
|
408
|
-
ok: ownResults.length > 0,
|
|
409
|
-
resultCount: ownResults.length
|
|
410
|
-
});
|
|
411
|
-
const recordId = ownResults[0]?.record.id ?? write.record?.id;
|
|
412
|
-
if (recordId) {
|
|
413
|
-
const read = await manager.read({
|
|
414
|
-
id: recordId,
|
|
415
|
-
scope: { userId: LOCAL_USER_ID }
|
|
416
|
-
});
|
|
417
|
-
checks.push({
|
|
418
|
-
name: "read",
|
|
419
|
-
ok: Boolean(read),
|
|
420
|
-
message: read ? void 0 : "Record was not readable"
|
|
421
|
-
});
|
|
422
|
-
} else checks.push({
|
|
423
|
-
name: "read",
|
|
424
|
-
ok: false,
|
|
425
|
-
message: "No record id available"
|
|
426
|
-
});
|
|
427
|
-
manager.recordSignal({
|
|
428
|
-
source: "search_recall",
|
|
429
|
-
content: `Smoke signal for ${providerId}: ${token}`
|
|
430
|
-
});
|
|
431
|
-
checks.push({
|
|
432
|
-
name: "sync",
|
|
433
|
-
ok: true
|
|
434
|
-
});
|
|
435
|
-
} catch (err) {
|
|
436
|
-
checks.push({
|
|
437
|
-
name: "error",
|
|
438
|
-
ok: false,
|
|
439
|
-
message: err instanceof Error ? err.message : String(err)
|
|
440
|
-
});
|
|
441
|
-
} finally {
|
|
442
|
-
appendMemoryTraceEvent({
|
|
443
|
-
phase: "test",
|
|
444
|
-
providerId,
|
|
445
|
-
request: { token },
|
|
446
|
-
resultCount: checks.filter((check) => check.ok).length,
|
|
447
|
-
error: checks.some((check) => !check.ok) ? "one or more checks failed" : void 0,
|
|
448
|
-
durationMs: Date.now() - started
|
|
449
|
-
});
|
|
450
|
-
await manager.shutdownAll();
|
|
451
|
-
}
|
|
452
|
-
return c.json({
|
|
453
|
-
providerId,
|
|
454
|
-
available: provider.isAvailable(),
|
|
455
|
-
checks
|
|
456
|
-
});
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
//#endregion
|
|
460
|
-
export { registerMemoryRoutes };
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
export type DreamingMode = 'off' | 'observe' | 'review' | 'automatic';
|
|
2
|
-
export type DreamingActiveMode = Exclude<DreamingMode, 'off'>;
|
|
3
|
-
export type DreamingPhase = 'light' | 'deep' | 'rem';
|
|
4
|
-
export interface DreamingRun {
|
|
5
|
-
runId: string;
|
|
6
|
-
agentId: string;
|
|
7
|
-
workspaceId: string;
|
|
8
|
-
phase: DreamingPhase;
|
|
9
|
-
mode: DreamingActiveMode;
|
|
10
|
-
triggerKind: 'schedule' | 'manual';
|
|
11
|
-
algorithmVersion: string;
|
|
12
|
-
configSnapshot: Record<string, unknown>;
|
|
13
|
-
status: 'running' | 'completed' | 'failed';
|
|
14
|
-
reason?: string;
|
|
15
|
-
metrics: Record<string, unknown>;
|
|
16
|
-
startedAt: string;
|
|
17
|
-
completedAt?: string;
|
|
18
|
-
}
|
|
19
|
-
export interface DreamingDecision {
|
|
20
|
-
decisionId: string;
|
|
21
|
-
runId: string;
|
|
22
|
-
recordId?: string;
|
|
23
|
-
action: 'observe' | 'propose' | 'activate' | 'skip';
|
|
24
|
-
reasonCode: string;
|
|
25
|
-
score?: number;
|
|
26
|
-
evidence: Record<string, unknown>;
|
|
27
|
-
createdAt: string;
|
|
28
|
-
}
|
|
29
|
-
export declare function startDreamingRun(input: {
|
|
30
|
-
agentId: string;
|
|
31
|
-
workspaceId: string;
|
|
32
|
-
phase: DreamingPhase;
|
|
33
|
-
mode: DreamingActiveMode;
|
|
34
|
-
triggerKind?: 'schedule' | 'manual';
|
|
35
|
-
algorithmVersion: string;
|
|
36
|
-
configSnapshot: Record<string, unknown>;
|
|
37
|
-
nowMs?: number;
|
|
38
|
-
}): DreamingRun;
|
|
39
|
-
export declare function finishDreamingRun(input: {
|
|
40
|
-
runId: string;
|
|
41
|
-
ok: boolean;
|
|
42
|
-
reason: string;
|
|
43
|
-
metrics?: Record<string, unknown>;
|
|
44
|
-
nowMs?: number;
|
|
45
|
-
}): DreamingRun | null;
|
|
46
|
-
export declare function recordDreamingDecision(input: {
|
|
47
|
-
runId: string;
|
|
48
|
-
recordId?: string;
|
|
49
|
-
action: 'observe' | 'propose' | 'activate' | 'skip';
|
|
50
|
-
reasonCode: string;
|
|
51
|
-
score?: number;
|
|
52
|
-
evidence?: Record<string, unknown>;
|
|
53
|
-
nowMs?: number;
|
|
54
|
-
}): string;
|
|
55
|
-
export declare function getDreamingRun(runId: string): DreamingRun | null;
|
|
56
|
-
export declare function listDreamingRuns(options?: {
|
|
57
|
-
agentId?: string;
|
|
58
|
-
workspaceId?: string;
|
|
59
|
-
limit?: number;
|
|
60
|
-
}): DreamingRun[];
|
|
61
|
-
export declare function listDreamingDecisions(runId: string, limit?: number): DreamingDecision[];
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "./transaction.js";
|
|
2
|
-
import { randomUUID } from "node:crypto";
|
|
3
|
-
//#region src/storage/sqlite/dreaming-repository.ts
|
|
4
|
-
function rowToRun(row) {
|
|
5
|
-
let metrics = {};
|
|
6
|
-
let configSnapshot = {};
|
|
7
|
-
try {
|
|
8
|
-
metrics = JSON.parse(row.metrics_json);
|
|
9
|
-
} catch {}
|
|
10
|
-
try {
|
|
11
|
-
configSnapshot = JSON.parse(row.config_snapshot_json);
|
|
12
|
-
} catch {}
|
|
13
|
-
return {
|
|
14
|
-
runId: row.run_id,
|
|
15
|
-
agentId: row.agent_id,
|
|
16
|
-
workspaceId: row.workspace_id,
|
|
17
|
-
phase: row.phase,
|
|
18
|
-
mode: row.mode,
|
|
19
|
-
triggerKind: row.trigger_kind,
|
|
20
|
-
status: row.status,
|
|
21
|
-
algorithmVersion: row.algorithm_version,
|
|
22
|
-
configSnapshot,
|
|
23
|
-
...row.reason ? { reason: row.reason } : {},
|
|
24
|
-
metrics,
|
|
25
|
-
startedAt: new Date(row.started_at).toISOString(),
|
|
26
|
-
...row.completed_at ? { completedAt: new Date(row.completed_at).toISOString() } : {}
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function rowToDecision(row) {
|
|
30
|
-
let evidence = {};
|
|
31
|
-
try {
|
|
32
|
-
evidence = JSON.parse(row.evidence_json);
|
|
33
|
-
} catch {}
|
|
34
|
-
return {
|
|
35
|
-
decisionId: row.decision_id,
|
|
36
|
-
runId: row.run_id,
|
|
37
|
-
...row.record_id ? { recordId: row.record_id } : {},
|
|
38
|
-
action: row.action,
|
|
39
|
-
reasonCode: row.reason_code,
|
|
40
|
-
...row.score == null ? {} : { score: row.score },
|
|
41
|
-
evidence,
|
|
42
|
-
createdAt: new Date(row.created_at).toISOString()
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
function startDreamingRun(input) {
|
|
46
|
-
const runId = randomUUID();
|
|
47
|
-
const now = input.nowMs ?? Date.now();
|
|
48
|
-
runSqliteWriteTransaction((db) => db.prepare(`INSERT INTO dreaming_runs (
|
|
49
|
-
run_id, agent_id, workspace_id, phase, mode, trigger_kind,
|
|
50
|
-
algorithm_version, config_snapshot_json, status, started_at
|
|
51
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, 'running', ?)`).run(runId, input.agentId, input.workspaceId, input.phase, input.mode, input.triggerKind ?? "schedule", input.algorithmVersion, JSON.stringify(input.configSnapshot), now));
|
|
52
|
-
return getDreamingRun(runId);
|
|
53
|
-
}
|
|
54
|
-
function finishDreamingRun(input) {
|
|
55
|
-
const now = input.nowMs ?? Date.now();
|
|
56
|
-
runSqliteWriteTransaction((db) => db.prepare(`UPDATE dreaming_runs SET status = ?, reason = ?, metrics_json = ?, completed_at = ? WHERE run_id = ?`).run(input.ok ? "completed" : "failed", input.reason, JSON.stringify(input.metrics ?? {}), now, input.runId));
|
|
57
|
-
return getDreamingRun(input.runId);
|
|
58
|
-
}
|
|
59
|
-
function recordDreamingDecision(input) {
|
|
60
|
-
const id = randomUUID();
|
|
61
|
-
runSqliteWriteTransaction((db) => db.prepare(`INSERT INTO dreaming_decisions (decision_id, run_id, record_id, action, reason_code, score, evidence_json, created_at)
|
|
62
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`).run(id, input.runId, input.recordId ?? null, input.action, input.reasonCode, input.score == null ? null : Math.max(0, Math.min(1, input.score)), JSON.stringify(input.evidence ?? {}), input.nowMs ?? Date.now()));
|
|
63
|
-
return id;
|
|
64
|
-
}
|
|
65
|
-
function getDreamingRun(runId) {
|
|
66
|
-
const row = getSqliteDatabase().prepare(`SELECT * FROM dreaming_runs WHERE run_id = ?`).get(runId);
|
|
67
|
-
return row ? rowToRun(row) : null;
|
|
68
|
-
}
|
|
69
|
-
function listDreamingRuns(options = {}) {
|
|
70
|
-
const where = [];
|
|
71
|
-
const params = [];
|
|
72
|
-
if (options.agentId) {
|
|
73
|
-
where.push("agent_id = ?");
|
|
74
|
-
params.push(options.agentId);
|
|
75
|
-
}
|
|
76
|
-
if (options.workspaceId) {
|
|
77
|
-
where.push("workspace_id = ?");
|
|
78
|
-
params.push(options.workspaceId);
|
|
79
|
-
}
|
|
80
|
-
const limit = Math.max(1, Math.min(200, options.limit ?? 50));
|
|
81
|
-
return getSqliteDatabase().prepare(`SELECT * FROM dreaming_runs ${where.length ? `WHERE ${where.join(" AND ")}` : ""} ORDER BY started_at DESC LIMIT ?`).all(...params, limit).map(rowToRun);
|
|
82
|
-
}
|
|
83
|
-
function listDreamingDecisions(runId, limit = 200) {
|
|
84
|
-
const safeLimit = Math.max(1, Math.min(500, limit));
|
|
85
|
-
return getSqliteDatabase().prepare(`SELECT * FROM dreaming_decisions WHERE run_id = ? ORDER BY created_at, decision_id LIMIT ?`).all(runId, safeLimit).map(rowToDecision);
|
|
86
|
-
}
|
|
87
|
-
//#endregion
|
|
88
|
-
export { finishDreamingRun, getDreamingRun, listDreamingDecisions, listDreamingRuns, recordDreamingDecision, startDreamingRun };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { getSqliteDatabase } from "./transaction.js";
|
|
2
|
-
import { evaluateMemoryReadiness } from "../../user-context/memory-readiness.js";
|
|
3
|
-
//#region src/storage/sqlite/memory-readiness-repository.ts
|
|
4
|
-
function getMemoryReadiness(options) {
|
|
5
|
-
const nowMs = options.nowMs ?? Date.now();
|
|
6
|
-
const sinceMs = nowMs - Math.max(1, Math.min(90, Math.floor(options.windowDays ?? 30))) * 864e5;
|
|
7
|
-
const db = getSqliteDatabase();
|
|
8
|
-
const feedback = db.prepare(`SELECT feedback.level, feedback.rating
|
|
9
|
-
FROM memory_feedback AS feedback
|
|
10
|
-
JOIN memory_trace_events AS trace ON trace.trace_id = feedback.trace_id
|
|
11
|
-
WHERE trace.phase IN ('search', 'inject')
|
|
12
|
-
AND trace.source_agent_id = ?
|
|
13
|
-
AND feedback.updated_at >= ?`).all(options.agentId, sinceMs);
|
|
14
|
-
const runs = db.prepare(`SELECT status FROM dreaming_runs
|
|
15
|
-
WHERE agent_id = ? AND workspace_id = ? AND started_at >= ?
|
|
16
|
-
ORDER BY started_at DESC LIMIT 100`).all(options.agentId, options.workspaceId, sinceMs);
|
|
17
|
-
const responseFeedback = feedback.filter((item) => item.level === "response");
|
|
18
|
-
const recordFeedback = feedback.filter((item) => item.level === "record");
|
|
19
|
-
return evaluateMemoryReadiness({
|
|
20
|
-
evaluatedTurns: responseFeedback.length,
|
|
21
|
-
helpfulTurns: responseFeedback.filter((item) => item.rating === "helpful").length,
|
|
22
|
-
recordFeedback: recordFeedback.length,
|
|
23
|
-
recordErrors: recordFeedback.filter((item) => item.rating === "incorrect" || item.rating === "outdated" || item.rating === "sensitive").length,
|
|
24
|
-
sensitiveFeedback: recordFeedback.filter((item) => item.rating === "sensitive").length,
|
|
25
|
-
dreamingRuns: runs.length,
|
|
26
|
-
dreamingFailures: runs.filter((item) => item.status === "failed").length
|
|
27
|
-
}, { nowMs });
|
|
28
|
-
}
|
|
29
|
-
//#endregion
|
|
30
|
-
export { getMemoryReadiness };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export type MemoryReferenceGrantScope = 'once' | 'session' | 'always';
|
|
2
|
-
export type MemoryReferenceConsentStatus = 'pending' | 'granted' | 'denied' | 'consumed';
|
|
3
|
-
export type MemoryReferenceConsent = {
|
|
4
|
-
id: string;
|
|
5
|
-
recordId: string;
|
|
6
|
-
sessionKey: string;
|
|
7
|
-
purpose: string;
|
|
8
|
-
status: MemoryReferenceConsentStatus;
|
|
9
|
-
grantScope?: MemoryReferenceGrantScope;
|
|
10
|
-
expiresAt?: string;
|
|
11
|
-
createdAt: string;
|
|
12
|
-
updatedAt: string;
|
|
13
|
-
};
|
|
14
|
-
export declare function ensureMemoryReferenceConsentRequest(input: {
|
|
15
|
-
recordId: string;
|
|
16
|
-
sessionKey: string;
|
|
17
|
-
purpose: string;
|
|
18
|
-
}): MemoryReferenceConsent;
|
|
19
|
-
export declare function listMemoryReferenceConsents(options?: {
|
|
20
|
-
status?: MemoryReferenceConsentStatus;
|
|
21
|
-
sessionKey?: string;
|
|
22
|
-
}): MemoryReferenceConsent[];
|
|
23
|
-
export declare function decideMemoryReferenceConsent(id: string, decision: 'deny' | MemoryReferenceGrantScope): MemoryReferenceConsent | undefined;
|
|
24
|
-
export declare function revokeMemoryReferenceConsent(id: string): MemoryReferenceConsent | undefined;
|
|
25
|
-
export declare function hasMemoryReferenceConsent(recordId: string, sessionKey: string): boolean;
|
|
26
|
-
/** Resolve a valid grant. One-shot grants are consumed atomically. */
|
|
27
|
-
export declare function consumeMemoryReferenceConsent(recordId: string, sessionKey: string): boolean;
|