@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,107 +0,0 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "./transaction.js";
|
|
2
|
-
import { randomUUID } from "node:crypto";
|
|
3
|
-
//#region src/storage/sqlite/memory-reference-consent-repository.ts
|
|
4
|
-
function fromRow(row) {
|
|
5
|
-
return {
|
|
6
|
-
id: row.consent_id,
|
|
7
|
-
recordId: row.record_id,
|
|
8
|
-
sessionKey: row.session_key,
|
|
9
|
-
purpose: row.purpose,
|
|
10
|
-
status: row.status,
|
|
11
|
-
...row.grant_scope ? { grantScope: row.grant_scope } : {},
|
|
12
|
-
...row.expires_at ? { expiresAt: new Date(row.expires_at).toISOString() } : {},
|
|
13
|
-
createdAt: new Date(row.created_at).toISOString(),
|
|
14
|
-
updatedAt: new Date(row.updated_at).toISOString()
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
function ensureMemoryReferenceConsentRequest(input) {
|
|
18
|
-
return runSqliteWriteTransaction((db) => {
|
|
19
|
-
const existing = db.prepare(`
|
|
20
|
-
SELECT * FROM memory_reference_consents
|
|
21
|
-
WHERE record_id = ? AND session_key = ? AND status = 'pending'
|
|
22
|
-
`).get(input.recordId, input.sessionKey);
|
|
23
|
-
if (existing) return fromRow(existing);
|
|
24
|
-
const id = randomUUID();
|
|
25
|
-
const now = Date.now();
|
|
26
|
-
db.prepare(`
|
|
27
|
-
INSERT INTO memory_reference_consents (
|
|
28
|
-
consent_id, record_id, session_key, purpose, status, created_at, updated_at
|
|
29
|
-
) VALUES (?, ?, ?, ?, 'pending', ?, ?)
|
|
30
|
-
`).run(id, input.recordId, input.sessionKey, input.purpose.trim().slice(0, 500), now, now);
|
|
31
|
-
return fromRow(db.prepare("SELECT * FROM memory_reference_consents WHERE consent_id = ?").get(id));
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
function listMemoryReferenceConsents(options = {}) {
|
|
35
|
-
const clauses = [];
|
|
36
|
-
const params = [];
|
|
37
|
-
if (options.status) {
|
|
38
|
-
clauses.push("status = ?");
|
|
39
|
-
params.push(options.status);
|
|
40
|
-
}
|
|
41
|
-
if (options.sessionKey) {
|
|
42
|
-
clauses.push("session_key = ?");
|
|
43
|
-
params.push(options.sessionKey);
|
|
44
|
-
}
|
|
45
|
-
const where = clauses.length ? ` WHERE ${clauses.join(" AND ")}` : "";
|
|
46
|
-
return getSqliteDatabase().prepare(`SELECT * FROM memory_reference_consents${where} ORDER BY created_at DESC`).all(...params).map(fromRow);
|
|
47
|
-
}
|
|
48
|
-
function decideMemoryReferenceConsent(id, decision) {
|
|
49
|
-
return runSqliteWriteTransaction((db) => {
|
|
50
|
-
const current = db.prepare("SELECT * FROM memory_reference_consents WHERE consent_id = ?").get(id);
|
|
51
|
-
if (!current || current.status !== "pending") return void 0;
|
|
52
|
-
const now = Date.now();
|
|
53
|
-
const expiresAt = decision === "once" ? now + 900 * 1e3 : decision === "session" ? now + 1440 * 60 * 1e3 : null;
|
|
54
|
-
db.prepare(`
|
|
55
|
-
UPDATE memory_reference_consents
|
|
56
|
-
SET status = ?, grant_scope = ?, expires_at = ?, updated_at = ?
|
|
57
|
-
WHERE consent_id = ?
|
|
58
|
-
`).run(decision === "deny" ? "denied" : "granted", decision === "deny" ? null : decision, expiresAt, now, id);
|
|
59
|
-
return fromRow(db.prepare("SELECT * FROM memory_reference_consents WHERE consent_id = ?").get(id));
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
function revokeMemoryReferenceConsent(id) {
|
|
63
|
-
return runSqliteWriteTransaction((db) => {
|
|
64
|
-
const current = db.prepare("SELECT * FROM memory_reference_consents WHERE consent_id = ?").get(id);
|
|
65
|
-
if (!current || current.status !== "granted") return void 0;
|
|
66
|
-
const now = Date.now();
|
|
67
|
-
db.prepare(`
|
|
68
|
-
UPDATE memory_reference_consents
|
|
69
|
-
SET status = 'denied', grant_scope = NULL, expires_at = NULL, updated_at = ?
|
|
70
|
-
WHERE consent_id = ? AND status = 'granted'
|
|
71
|
-
`).run(now, id);
|
|
72
|
-
return fromRow(db.prepare("SELECT * FROM memory_reference_consents WHERE consent_id = ?").get(id));
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
function hasMemoryReferenceConsent(recordId, sessionKey) {
|
|
76
|
-
const now = Date.now();
|
|
77
|
-
return Boolean(getSqliteDatabase().prepare(`
|
|
78
|
-
SELECT 1 FROM memory_reference_consents
|
|
79
|
-
WHERE record_id = ? AND status = 'granted'
|
|
80
|
-
AND (expires_at IS NULL OR expires_at > ?)
|
|
81
|
-
AND (grant_scope = 'always' OR session_key = ?)
|
|
82
|
-
LIMIT 1
|
|
83
|
-
`).get(recordId, now, sessionKey));
|
|
84
|
-
}
|
|
85
|
-
/** Resolve a valid grant. One-shot grants are consumed atomically. */
|
|
86
|
-
function consumeMemoryReferenceConsent(recordId, sessionKey) {
|
|
87
|
-
return runSqliteWriteTransaction((db) => {
|
|
88
|
-
const now = Date.now();
|
|
89
|
-
const row = db.prepare(`
|
|
90
|
-
SELECT * FROM memory_reference_consents
|
|
91
|
-
WHERE record_id = ? AND status = 'granted'
|
|
92
|
-
AND (expires_at IS NULL OR expires_at > ?)
|
|
93
|
-
AND (grant_scope = 'always' OR session_key = ?)
|
|
94
|
-
ORDER BY CASE grant_scope WHEN 'once' THEN 0 WHEN 'session' THEN 1 ELSE 2 END, updated_at DESC
|
|
95
|
-
LIMIT 1
|
|
96
|
-
`).get(recordId, now, sessionKey);
|
|
97
|
-
if (!row) return false;
|
|
98
|
-
if (row.grant_scope === "once") db.prepare(`UPDATE memory_reference_consents SET status = 'consumed', updated_at = ? WHERE consent_id = ?`).run(now, row.consent_id);
|
|
99
|
-
db.prepare(`
|
|
100
|
-
UPDATE memory_reference_consents SET status = 'consumed', updated_at = ?
|
|
101
|
-
WHERE record_id = ? AND session_key = ? AND status = 'pending'
|
|
102
|
-
`).run(now, recordId, sessionKey);
|
|
103
|
-
return true;
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
//#endregion
|
|
107
|
-
export { consumeMemoryReferenceConsent, decideMemoryReferenceConsent, ensureMemoryReferenceConsentRequest, hasMemoryReferenceConsent, listMemoryReferenceConsents, revokeMemoryReferenceConsent };
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
export type UserEntityType = 'person' | 'project' | 'organization';
|
|
2
|
-
export type UserEntityHandleType = 'email' | 'provider_user' | 'display_name';
|
|
3
|
-
export type UserClaimClass = 'relationship' | 'project' | 'routine';
|
|
4
|
-
export type UserClaimState = 'provisional' | 'active' | 'rejected' | 'stale';
|
|
5
|
-
export type UserClaimUserState = 'auto' | 'confirmed' | 'rejected';
|
|
6
|
-
export type UserEntity = {
|
|
7
|
-
id: string;
|
|
8
|
-
type: UserEntityType;
|
|
9
|
-
canonicalLabel: string;
|
|
10
|
-
createdAt: string;
|
|
11
|
-
updatedAt: string;
|
|
12
|
-
};
|
|
13
|
-
export type UserClaim = {
|
|
14
|
-
id: string;
|
|
15
|
-
agentId: string;
|
|
16
|
-
class: UserClaimClass;
|
|
17
|
-
key: string;
|
|
18
|
-
subjectEntityId?: string;
|
|
19
|
-
value: Record<string, unknown>;
|
|
20
|
-
state: UserClaimState;
|
|
21
|
-
userState: UserClaimUserState;
|
|
22
|
-
confidence: number;
|
|
23
|
-
independentEvidenceCount: number;
|
|
24
|
-
activeDayCount: number;
|
|
25
|
-
firstObservedAt: string;
|
|
26
|
-
lastReinforcedAt: string;
|
|
27
|
-
memoryRecordId?: string;
|
|
28
|
-
createdAt: string;
|
|
29
|
-
updatedAt: string;
|
|
30
|
-
};
|
|
31
|
-
export declare function resolveUserEntity(input: {
|
|
32
|
-
type: UserEntityType;
|
|
33
|
-
canonicalLabel: string;
|
|
34
|
-
handles: Array<{
|
|
35
|
-
type: UserEntityHandleType;
|
|
36
|
-
value: string;
|
|
37
|
-
sourceScope: string;
|
|
38
|
-
verified: boolean;
|
|
39
|
-
}>;
|
|
40
|
-
nowMs?: number;
|
|
41
|
-
}): UserEntity;
|
|
42
|
-
export declare function reinforceUserClaim(input: {
|
|
43
|
-
agentId: string;
|
|
44
|
-
class: UserClaimClass;
|
|
45
|
-
key: string;
|
|
46
|
-
subjectEntityId?: string;
|
|
47
|
-
value: Record<string, unknown>;
|
|
48
|
-
evidence: Array<{
|
|
49
|
-
logicalEventKey: string;
|
|
50
|
-
sourceItemId: string;
|
|
51
|
-
sourceInstanceId: string;
|
|
52
|
-
relation: 'supports' | 'contradicts';
|
|
53
|
-
observedAt: string;
|
|
54
|
-
}>;
|
|
55
|
-
nowMs?: number;
|
|
56
|
-
}): UserClaim;
|
|
57
|
-
export declare function removeUserClaimEvidenceForSource(sourceInstanceId: string): {
|
|
58
|
-
deletedClaimCount: number;
|
|
59
|
-
deletedMemoryRecordIds: string[];
|
|
60
|
-
retainedClaims: Array<{
|
|
61
|
-
memoryRecordId: string;
|
|
62
|
-
state: UserClaimState;
|
|
63
|
-
}>;
|
|
64
|
-
};
|
|
65
|
-
export declare function setUserClaimDecision(claimId: string, userState: Exclude<UserClaimUserState, 'auto'>): UserClaim | undefined;
|
|
66
|
-
export declare function linkUserClaimMemoryRecord(claimId: string, memoryRecordId: string): void;
|
|
67
|
-
export declare function getUserClaim(claimId: string): UserClaim | undefined;
|
|
68
|
-
export declare function listUserClaims(options?: {
|
|
69
|
-
agentId?: string;
|
|
70
|
-
state?: UserClaimState;
|
|
71
|
-
limit?: number;
|
|
72
|
-
}): UserClaim[];
|
|
73
|
-
export declare function listUserClaimEvidence(claimId: string): Array<{
|
|
74
|
-
logicalEventKey: string;
|
|
75
|
-
sourceItemId: string;
|
|
76
|
-
sourceInstanceId: string;
|
|
77
|
-
relation: string;
|
|
78
|
-
observedAt: string;
|
|
79
|
-
}>;
|
|
80
|
-
export declare function listUserPeopleGraphRows(): {
|
|
81
|
-
people: Array<UserEntity & {
|
|
82
|
-
handles: Array<{
|
|
83
|
-
type: UserEntityHandleType;
|
|
84
|
-
value: string;
|
|
85
|
-
}>;
|
|
86
|
-
}>;
|
|
87
|
-
edges: Array<{
|
|
88
|
-
entityId: string;
|
|
89
|
-
sourceInstanceId: string;
|
|
90
|
-
mentionCount: number;
|
|
91
|
-
lastObservedAt: string;
|
|
92
|
-
}>;
|
|
93
|
-
evidenceCount: number;
|
|
94
|
-
};
|
|
95
|
-
export declare function listUserClaimStatsBySource(): Record<string, {
|
|
96
|
-
evidenceCount: number;
|
|
97
|
-
provisionalClaims: number;
|
|
98
|
-
activeClaims: number;
|
|
99
|
-
resolvedEntities: number;
|
|
100
|
-
lastEvidenceAt?: string;
|
|
101
|
-
}>;
|
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "./transaction.js";
|
|
2
|
-
import { randomUUID } from "node:crypto";
|
|
3
|
-
//#region src/storage/sqlite/user-claims-repository.ts
|
|
4
|
-
function entityFromRow(row) {
|
|
5
|
-
return {
|
|
6
|
-
id: row.entity_id,
|
|
7
|
-
type: row.entity_type,
|
|
8
|
-
canonicalLabel: row.canonical_label,
|
|
9
|
-
createdAt: new Date(row.created_at).toISOString(),
|
|
10
|
-
updatedAt: new Date(row.updated_at).toISOString()
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
function claimFromRow(row) {
|
|
14
|
-
return {
|
|
15
|
-
id: row.claim_id,
|
|
16
|
-
agentId: row.agent_id,
|
|
17
|
-
class: row.claim_class,
|
|
18
|
-
key: row.claim_key,
|
|
19
|
-
...row.subject_entity_id ? { subjectEntityId: row.subject_entity_id } : {},
|
|
20
|
-
value: JSON.parse(row.value_json),
|
|
21
|
-
state: row.state,
|
|
22
|
-
userState: row.user_state,
|
|
23
|
-
confidence: row.confidence,
|
|
24
|
-
independentEvidenceCount: row.independent_evidence_count,
|
|
25
|
-
activeDayCount: row.active_day_count,
|
|
26
|
-
firstObservedAt: new Date(row.first_observed_at).toISOString(),
|
|
27
|
-
lastReinforcedAt: new Date(row.last_reinforced_at).toISOString(),
|
|
28
|
-
...row.memory_record_id ? { memoryRecordId: row.memory_record_id } : {},
|
|
29
|
-
createdAt: new Date(row.created_at).toISOString(),
|
|
30
|
-
updatedAt: new Date(row.updated_at).toISOString()
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
function resolveUserEntity(input) {
|
|
34
|
-
const now = input.nowMs ?? Date.now();
|
|
35
|
-
return runSqliteWriteTransaction((db) => {
|
|
36
|
-
const handles = input.handles.map((handle) => ({
|
|
37
|
-
...handle,
|
|
38
|
-
value: handle.value.trim().toLowerCase()
|
|
39
|
-
})).filter((handle) => handle.value);
|
|
40
|
-
const strong = handles.filter((handle) => handle.verified);
|
|
41
|
-
let row;
|
|
42
|
-
for (const handle of strong) {
|
|
43
|
-
row = db.prepare(`SELECT e.* FROM user_entities e JOIN user_entity_handles h ON h.entity_id = e.entity_id
|
|
44
|
-
WHERE h.handle_type = ? AND h.normalized_value = ? AND h.source_scope = ?`).get(handle.type, handle.value, handle.sourceScope);
|
|
45
|
-
if (row) break;
|
|
46
|
-
}
|
|
47
|
-
if (!row) {
|
|
48
|
-
const fallback = handles[0];
|
|
49
|
-
if (fallback) row = db.prepare(`SELECT e.* FROM user_entities e JOIN user_entity_handles h ON h.entity_id = e.entity_id
|
|
50
|
-
WHERE h.handle_type = ? AND h.normalized_value = ? AND h.source_scope = ?`).get(fallback.type, fallback.value, fallback.sourceScope);
|
|
51
|
-
}
|
|
52
|
-
const entityId = row?.entity_id ?? randomUUID();
|
|
53
|
-
if (!row) db.prepare(`INSERT INTO user_entities (entity_id, entity_type, canonical_label, created_at, updated_at)
|
|
54
|
-
VALUES (?, ?, ?, ?, ?)`).run(entityId, input.type, input.canonicalLabel, now, now);
|
|
55
|
-
else {
|
|
56
|
-
const incomingHumanName = input.canonicalLabel.includes(" ") && !input.canonicalLabel.includes("@");
|
|
57
|
-
const existingHumanName = row.canonical_label.includes(" ") && !row.canonical_label.includes("@");
|
|
58
|
-
if (incomingHumanName && (!existingHumanName || input.canonicalLabel.length > row.canonical_label.length)) db.prepare("UPDATE user_entities SET canonical_label = ?, updated_at = ? WHERE entity_id = ?").run(input.canonicalLabel, now, entityId);
|
|
59
|
-
}
|
|
60
|
-
for (const handle of handles) db.prepare(`INSERT OR IGNORE INTO user_entity_handles
|
|
61
|
-
(entity_id, handle_type, normalized_value, source_scope, verified, created_at)
|
|
62
|
-
VALUES (?, ?, ?, ?, ?, ?)`).run(entityId, handle.type, handle.value, handle.sourceScope, handle.verified ? 1 : 0, now);
|
|
63
|
-
return entityFromRow(db.prepare("SELECT * FROM user_entities WHERE entity_id = ?").get(entityId));
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
function thresholds(claimClass) {
|
|
67
|
-
return claimClass === "routine" ? {
|
|
68
|
-
evidence: 3,
|
|
69
|
-
days: 3
|
|
70
|
-
} : {
|
|
71
|
-
evidence: 3,
|
|
72
|
-
days: 2
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
function refreshUserClaim(db, row, now) {
|
|
76
|
-
const stats = db.prepare(`SELECT
|
|
77
|
-
SUM(CASE WHEN relation = 'supports' THEN 1 ELSE 0 END) AS evidence_count,
|
|
78
|
-
SUM(CASE WHEN relation = 'contradicts' THEN 1 ELSE 0 END) AS contradiction_count,
|
|
79
|
-
COUNT(DISTINCT CASE WHEN relation = 'supports' THEN date(observed_at / 1000, 'unixepoch') END) AS active_days,
|
|
80
|
-
MAX(observed_at) AS last_observed
|
|
81
|
-
FROM user_claim_evidence WHERE claim_id = ?`).get(row.claim_id);
|
|
82
|
-
const evidenceCount = stats.evidence_count ?? 0;
|
|
83
|
-
const contradictionCount = stats.contradiction_count ?? 0;
|
|
84
|
-
const limit = thresholds(row.claim_class);
|
|
85
|
-
const state = row.user_state === "rejected" ? "rejected" : row.user_state === "confirmed" ? "active" : contradictionCount >= evidenceCount && contradictionCount > 0 ? "stale" : evidenceCount >= limit.evidence && stats.active_days >= limit.days ? "active" : "provisional";
|
|
86
|
-
const confidence = Math.max(.1, Math.min(.92, .48 + Math.min(evidenceCount, 8) * .035 + Math.min(stats.active_days, 5) * .045 - Math.min(contradictionCount, 5) * .08));
|
|
87
|
-
db.prepare(`UPDATE user_claims SET state = ?, confidence = ?, independent_evidence_count = ?,
|
|
88
|
-
active_day_count = ?, last_reinforced_at = ?, updated_at = ? WHERE claim_id = ?`).run(state, confidence, evidenceCount, stats.active_days, stats.last_observed ?? row.last_reinforced_at, now, row.claim_id);
|
|
89
|
-
return claimFromRow(db.prepare("SELECT * FROM user_claims WHERE claim_id = ?").get(row.claim_id));
|
|
90
|
-
}
|
|
91
|
-
function reinforceUserClaim(input) {
|
|
92
|
-
const now = input.nowMs ?? Date.now();
|
|
93
|
-
return runSqliteWriteTransaction((db) => {
|
|
94
|
-
let row = db.prepare("SELECT * FROM user_claims WHERE agent_id = ? AND claim_class = ? AND claim_key = ?").get(input.agentId, input.class, input.key);
|
|
95
|
-
const claimId = row?.claim_id ?? randomUUID();
|
|
96
|
-
if (!row) {
|
|
97
|
-
const firstObserved = Math.min(...input.evidence.map((item) => Date.parse(item.observedAt)), now);
|
|
98
|
-
db.prepare(`INSERT INTO user_claims (
|
|
99
|
-
claim_id, agent_id, claim_class, claim_key, subject_entity_id, value_json, state, user_state,
|
|
100
|
-
confidence, independent_evidence_count, active_day_count, first_observed_at, last_reinforced_at,
|
|
101
|
-
created_at, updated_at
|
|
102
|
-
) VALUES (?, ?, ?, ?, ?, ?, 'provisional', 'auto', 0, 0, 0, ?, ?, ?, ?)`).run(claimId, input.agentId, input.class, input.key, input.subjectEntityId ?? null, JSON.stringify(input.value), firstObserved, now, now, now);
|
|
103
|
-
}
|
|
104
|
-
for (const evidence of input.evidence) db.prepare(`INSERT INTO user_claim_evidence (
|
|
105
|
-
claim_id, logical_event_key, source_item_id, source_instance_id, relation, observed_at, created_at
|
|
106
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
107
|
-
ON CONFLICT(claim_id, logical_event_key) DO UPDATE SET
|
|
108
|
-
source_item_id = excluded.source_item_id,
|
|
109
|
-
source_instance_id = excluded.source_instance_id,
|
|
110
|
-
relation = excluded.relation,
|
|
111
|
-
observed_at = excluded.observed_at`).run(claimId, evidence.logicalEventKey, evidence.sourceItemId, evidence.sourceInstanceId, evidence.relation, Date.parse(evidence.observedAt), now);
|
|
112
|
-
db.prepare("UPDATE user_claims SET subject_entity_id = ?, value_json = ? WHERE claim_id = ?").run(input.subjectEntityId ?? null, JSON.stringify(input.value), claimId);
|
|
113
|
-
row = db.prepare("SELECT * FROM user_claims WHERE claim_id = ?").get(claimId);
|
|
114
|
-
return refreshUserClaim(db, row, now);
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
function removeUserClaimEvidenceForSource(sourceInstanceId) {
|
|
118
|
-
return runSqliteWriteTransaction((db) => {
|
|
119
|
-
const affected = db.prepare(`SELECT DISTINCT c.* FROM user_claims c
|
|
120
|
-
JOIN user_claim_evidence e ON e.claim_id = c.claim_id
|
|
121
|
-
WHERE e.source_instance_id = ?`).all(sourceInstanceId);
|
|
122
|
-
db.prepare("DELETE FROM user_claim_evidence WHERE source_instance_id = ?").run(sourceInstanceId);
|
|
123
|
-
const deletedMemoryRecordIds = [];
|
|
124
|
-
const retainedClaims = [];
|
|
125
|
-
let deletedClaimCount = 0;
|
|
126
|
-
const now = Date.now();
|
|
127
|
-
for (const row of affected) {
|
|
128
|
-
if (db.prepare("SELECT COUNT(*) AS count FROM user_claim_evidence WHERE claim_id = ?").get(row.claim_id).count === 0) {
|
|
129
|
-
if (row.memory_record_id) deletedMemoryRecordIds.push(row.memory_record_id);
|
|
130
|
-
db.prepare("DELETE FROM user_claims WHERE claim_id = ?").run(row.claim_id);
|
|
131
|
-
deletedClaimCount += 1;
|
|
132
|
-
continue;
|
|
133
|
-
}
|
|
134
|
-
const claim = refreshUserClaim(db, row, now);
|
|
135
|
-
if (claim.memoryRecordId) retainedClaims.push({
|
|
136
|
-
memoryRecordId: claim.memoryRecordId,
|
|
137
|
-
state: claim.state
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
return {
|
|
141
|
-
deletedClaimCount,
|
|
142
|
-
deletedMemoryRecordIds,
|
|
143
|
-
retainedClaims
|
|
144
|
-
};
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
function setUserClaimDecision(claimId, userState) {
|
|
148
|
-
runSqliteWriteTransaction((db) => {
|
|
149
|
-
db.prepare(`UPDATE user_claims SET user_state = ?, state = ?, updated_at = ? WHERE claim_id = ?`).run(userState, userState === "confirmed" ? "active" : "rejected", Date.now(), claimId);
|
|
150
|
-
});
|
|
151
|
-
return getUserClaim(claimId);
|
|
152
|
-
}
|
|
153
|
-
function linkUserClaimMemoryRecord(claimId, memoryRecordId) {
|
|
154
|
-
runSqliteWriteTransaction((db) => {
|
|
155
|
-
db.prepare("UPDATE user_claims SET memory_record_id = ?, updated_at = ? WHERE claim_id = ?").run(memoryRecordId, Date.now(), claimId);
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
function getUserClaim(claimId) {
|
|
159
|
-
const row = getSqliteDatabase().prepare("SELECT * FROM user_claims WHERE claim_id = ?").get(claimId);
|
|
160
|
-
return row ? claimFromRow(row) : void 0;
|
|
161
|
-
}
|
|
162
|
-
function listUserClaims(options = {}) {
|
|
163
|
-
const where = [];
|
|
164
|
-
const params = [];
|
|
165
|
-
if (options.agentId) {
|
|
166
|
-
where.push("agent_id = ?");
|
|
167
|
-
params.push(options.agentId);
|
|
168
|
-
}
|
|
169
|
-
if (options.state) {
|
|
170
|
-
where.push("state = ?");
|
|
171
|
-
params.push(options.state);
|
|
172
|
-
}
|
|
173
|
-
const limit = Math.max(1, Math.min(options.limit ?? 100, 500));
|
|
174
|
-
return getSqliteDatabase().prepare(`SELECT * FROM user_claims
|
|
175
|
-
${where.length ? `WHERE ${where.join(" AND ")}` : ""}
|
|
176
|
-
ORDER BY confidence DESC, last_reinforced_at DESC LIMIT ?`).all(...params, limit).map(claimFromRow);
|
|
177
|
-
}
|
|
178
|
-
function listUserClaimEvidence(claimId) {
|
|
179
|
-
return getSqliteDatabase().prepare(`SELECT logical_event_key, source_item_id, source_instance_id, relation, observed_at
|
|
180
|
-
FROM user_claim_evidence WHERE claim_id = ? ORDER BY observed_at DESC`).all(claimId).map((row) => ({
|
|
181
|
-
logicalEventKey: row.logical_event_key,
|
|
182
|
-
sourceItemId: row.source_item_id,
|
|
183
|
-
sourceInstanceId: row.source_instance_id,
|
|
184
|
-
relation: row.relation,
|
|
185
|
-
observedAt: new Date(row.observed_at).toISOString()
|
|
186
|
-
}));
|
|
187
|
-
}
|
|
188
|
-
function listUserPeopleGraphRows() {
|
|
189
|
-
const db = getSqliteDatabase();
|
|
190
|
-
const entities = db.prepare(`SELECT * FROM user_entities e WHERE entity_type = 'person'
|
|
191
|
-
AND EXISTS (SELECT 1 FROM user_claims c JOIN user_claim_evidence ce ON ce.claim_id = c.claim_id
|
|
192
|
-
WHERE c.subject_entity_id = e.entity_id)`).all();
|
|
193
|
-
const handles = db.prepare(`SELECT entity_id, handle_type, normalized_value FROM user_entity_handles
|
|
194
|
-
WHERE entity_id IN (SELECT entity_id FROM user_entities WHERE entity_type = 'person')`).all();
|
|
195
|
-
const byEntity = /* @__PURE__ */ new Map();
|
|
196
|
-
for (const handle of handles) {
|
|
197
|
-
const values = byEntity.get(handle.entity_id) ?? [];
|
|
198
|
-
values.push({
|
|
199
|
-
type: handle.handle_type,
|
|
200
|
-
value: handle.normalized_value
|
|
201
|
-
});
|
|
202
|
-
byEntity.set(handle.entity_id, values);
|
|
203
|
-
}
|
|
204
|
-
const edgeRows = db.prepare(`SELECT c.subject_entity_id AS entity_id, e.source_instance_id,
|
|
205
|
-
COUNT(*) AS mention_count, MAX(e.observed_at) AS last_observed_at
|
|
206
|
-
FROM user_claims c JOIN user_claim_evidence e ON e.claim_id = c.claim_id
|
|
207
|
-
WHERE c.claim_class = 'relationship' AND c.subject_entity_id IS NOT NULL AND e.relation = 'supports'
|
|
208
|
-
GROUP BY c.subject_entity_id, e.source_instance_id`).all();
|
|
209
|
-
return {
|
|
210
|
-
people: entities.map((row) => ({
|
|
211
|
-
...entityFromRow(row),
|
|
212
|
-
handles: byEntity.get(row.entity_id) ?? []
|
|
213
|
-
})),
|
|
214
|
-
edges: edgeRows.map((row) => ({
|
|
215
|
-
entityId: row.entity_id,
|
|
216
|
-
sourceInstanceId: row.source_instance_id,
|
|
217
|
-
mentionCount: row.mention_count,
|
|
218
|
-
lastObservedAt: new Date(row.last_observed_at).toISOString()
|
|
219
|
-
})),
|
|
220
|
-
evidenceCount: edgeRows.reduce((sum, row) => sum + row.mention_count, 0)
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
function listUserClaimStatsBySource() {
|
|
224
|
-
const rows = getSqliteDatabase().prepare(`SELECT e.source_instance_id,
|
|
225
|
-
COUNT(*) AS evidence_count,
|
|
226
|
-
COUNT(DISTINCT CASE WHEN c.state = 'provisional' THEN c.claim_id END) AS provisional_claims,
|
|
227
|
-
COUNT(DISTINCT CASE WHEN c.state = 'active' THEN c.claim_id END) AS active_claims,
|
|
228
|
-
COUNT(DISTINCT c.subject_entity_id) AS resolved_entities,
|
|
229
|
-
MAX(e.observed_at) AS last_evidence_at
|
|
230
|
-
FROM user_claim_evidence e JOIN user_claims c ON c.claim_id = e.claim_id
|
|
231
|
-
GROUP BY e.source_instance_id`).all();
|
|
232
|
-
return Object.fromEntries(rows.map((row) => [row.source_instance_id, {
|
|
233
|
-
evidenceCount: row.evidence_count,
|
|
234
|
-
provisionalClaims: row.provisional_claims,
|
|
235
|
-
activeClaims: row.active_claims,
|
|
236
|
-
resolvedEntities: row.resolved_entities,
|
|
237
|
-
...row.last_evidence_at == null ? {} : { lastEvidenceAt: new Date(row.last_evidence_at).toISOString() }
|
|
238
|
-
}]));
|
|
239
|
-
}
|
|
240
|
-
//#endregion
|
|
241
|
-
export { getUserClaim, linkUserClaimMemoryRecord, listUserClaimEvidence, listUserClaimStatsBySource, listUserClaims, listUserPeopleGraphRows, reinforceUserClaim, removeUserClaimEvidenceForSource, resolveUserEntity, setUserClaimDecision };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { UserProfilePromptState } from '../../user-context/profile.js';
|
|
2
|
-
export declare function getUserProfilePromptState(principalId?: string): UserProfilePromptState;
|
|
3
|
-
export declare function setUserProfilePromptState(input: Pick<UserProfilePromptState, 'state' | 'suggestionHash' | 'snoozedUntil'>, principalId?: string): UserProfilePromptState;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "./transaction.js";
|
|
2
|
-
//#region src/storage/sqlite/user-profile-setup-repository.ts
|
|
3
|
-
function fromRow(row) {
|
|
4
|
-
return {
|
|
5
|
-
state: row.state,
|
|
6
|
-
suggestionHash: row.suggestion_hash ?? void 0,
|
|
7
|
-
snoozedUntil: row.snoozed_until ?? void 0,
|
|
8
|
-
updatedAt: row.updated_at
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
function getUserProfilePromptState(principalId = "local-owner") {
|
|
12
|
-
const row = getSqliteDatabase().prepare("SELECT * FROM user_profile_prompt_state WHERE principal_id = ?").get(principalId);
|
|
13
|
-
return row ? fromRow(row) : { state: "active" };
|
|
14
|
-
}
|
|
15
|
-
function setUserProfilePromptState(input, principalId = "local-owner") {
|
|
16
|
-
const updatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
17
|
-
return runSqliteWriteTransaction((db) => {
|
|
18
|
-
db.prepare(`
|
|
19
|
-
INSERT INTO user_profile_prompt_state (
|
|
20
|
-
principal_id, state, suggestion_hash, snoozed_until, updated_at
|
|
21
|
-
) VALUES (?, ?, ?, ?, ?)
|
|
22
|
-
ON CONFLICT(principal_id) DO UPDATE SET
|
|
23
|
-
state = excluded.state,
|
|
24
|
-
suggestion_hash = excluded.suggestion_hash,
|
|
25
|
-
snoozed_until = excluded.snoozed_until,
|
|
26
|
-
updated_at = excluded.updated_at
|
|
27
|
-
`).run(principalId, input.state, input.suggestionHash ?? null, input.snoozedUntil ?? null, updatedAt);
|
|
28
|
-
return getUserProfilePromptState(principalId);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
//#endregion
|
|
32
|
-
export { getUserProfilePromptState, setUserProfilePromptState };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { MemoryRecord } from '../agent/memory/types.js';
|
|
2
|
-
export declare const USER_CONFIRMED_MEMORY_TAG = "user-confirmed";
|
|
3
|
-
export declare const INSIGHT_ACCEPTED_TAG = "insight-action:accepted";
|
|
4
|
-
export declare const INSIGHT_DISMISSED_TAG = "insight-action:dismissed";
|
|
5
|
-
export type ActionableInsightSuggestion = {
|
|
6
|
-
id: string;
|
|
7
|
-
insight: string;
|
|
8
|
-
kind: MemoryRecord['kind'];
|
|
9
|
-
action: 'make_repeatable' | 'start_progress' | 'add_playbook';
|
|
10
|
-
evidenceCount: number;
|
|
11
|
-
confidence?: number;
|
|
12
|
-
sourceName: string;
|
|
13
|
-
};
|
|
14
|
-
export declare function buildActionableInsightSuggestions(records: MemoryRecord[], existingTaskTexts: readonly string[]): ActionableInsightSuggestion[];
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { isActionableUnderstandingContent, isNearDuplicateUnderstanding } from "./understandingQuality.js";
|
|
2
|
-
//#region src/user-context/actionableInsights.ts
|
|
3
|
-
const USER_CONFIRMED_MEMORY_TAG = "user-confirmed";
|
|
4
|
-
const INSIGHT_ACCEPTED_TAG = "insight-action:accepted";
|
|
5
|
-
const INSIGHT_DISMISSED_TAG = "insight-action:dismissed";
|
|
6
|
-
function actionFor(record) {
|
|
7
|
-
if (record.kind === "routine") return "make_repeatable";
|
|
8
|
-
if (record.kind === "long_term_goal") return "start_progress";
|
|
9
|
-
if (record.kind === "task_lesson" || record.kind === "derived_insight") return "add_playbook";
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
function buildActionableInsightSuggestions(records, existingTaskTexts) {
|
|
13
|
-
const selected = [];
|
|
14
|
-
const sorted = records.filter((record) => record.status === "active").filter((record) => record.tags?.includes(USER_CONFIRMED_MEMORY_TAG)).filter((record) => !record.tags?.includes("insight-action:accepted") && !record.tags?.includes("insight-action:dismissed")).filter((record) => isActionableUnderstandingContent(record.content)).filter((record) => record.kind !== "long_term_goal" || record.durability !== "ephemeral").sort((left, right) => right.importance - left.importance || Date.parse(right.updatedAt) - Date.parse(left.updatedAt));
|
|
15
|
-
for (const record of sorted) {
|
|
16
|
-
const action = actionFor(record);
|
|
17
|
-
if (!action) continue;
|
|
18
|
-
if (selected.some((item) => item.action === action && isNearDuplicateUnderstanding(item.insight, record.content))) continue;
|
|
19
|
-
if (action === "start_progress" && existingTaskTexts.some((text) => isNearDuplicateUnderstanding(text, record.content))) continue;
|
|
20
|
-
selected.push({
|
|
21
|
-
id: record.id,
|
|
22
|
-
insight: record.content,
|
|
23
|
-
kind: record.kind,
|
|
24
|
-
action,
|
|
25
|
-
evidenceCount: record.evidence?.length ?? 0,
|
|
26
|
-
confidence: record.confidence,
|
|
27
|
-
sourceName: record.source.provider ?? "local"
|
|
28
|
-
});
|
|
29
|
-
if (selected.length === 5) break;
|
|
30
|
-
}
|
|
31
|
-
return selected;
|
|
32
|
-
}
|
|
33
|
-
//#endregion
|
|
34
|
-
export { INSIGHT_ACCEPTED_TAG, INSIGHT_DISMISSED_TAG, USER_CONFIRMED_MEMORY_TAG, buildActionableInsightSuggestions };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { UserContextPlan } from '../agent/memory/context/types.js';
|
|
2
|
-
import { type RelationshipSettings } from '../storage/sqlite/index.js';
|
|
3
|
-
export interface ContextSnapshot {
|
|
4
|
-
id: string;
|
|
5
|
-
traceId: string;
|
|
6
|
-
ownerKind: 'session';
|
|
7
|
-
ownerId: string;
|
|
8
|
-
sessionKey?: string;
|
|
9
|
-
query: string;
|
|
10
|
-
selectedItems: UserContextPlan['items'];
|
|
11
|
-
rejectedItems: UserContextPlan['rejected'];
|
|
12
|
-
consentRequests: UserContextPlan['consentRequests'];
|
|
13
|
-
relationshipPolicy: RelationshipSettings;
|
|
14
|
-
estimatedTokens: number;
|
|
15
|
-
allocation?: UserContextPlan['allocation'];
|
|
16
|
-
createdAt: number;
|
|
17
|
-
}
|
|
18
|
-
export declare class ContextCompiler {
|
|
19
|
-
capture(input: {
|
|
20
|
-
sessionKey: string;
|
|
21
|
-
query: string;
|
|
22
|
-
plan: UserContextPlan;
|
|
23
|
-
now?: number;
|
|
24
|
-
}): ContextSnapshot;
|
|
25
|
-
get(id: string): ContextSnapshot | undefined;
|
|
26
|
-
latestForSession(sessionKey: string, since?: number): ContextSnapshot | undefined;
|
|
27
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
2
|
-
import { getRelationshipSettings } from "../storage/sqlite/relationship-settings-repository.js";
|
|
3
|
-
import "../storage/sqlite/index.js";
|
|
4
|
-
import { randomUUID } from "node:crypto";
|
|
5
|
-
//#region src/user-context/context-compiler.ts
|
|
6
|
-
function fromRow(row) {
|
|
7
|
-
return {
|
|
8
|
-
id: row.snapshot_id,
|
|
9
|
-
traceId: row.trace_id,
|
|
10
|
-
ownerKind: row.owner_kind,
|
|
11
|
-
ownerId: row.owner_id,
|
|
12
|
-
...row.session_key ? { sessionKey: row.session_key } : {},
|
|
13
|
-
query: row.query,
|
|
14
|
-
selectedItems: JSON.parse(row.selected_items_json),
|
|
15
|
-
rejectedItems: JSON.parse(row.rejected_items_json),
|
|
16
|
-
consentRequests: JSON.parse(row.consent_requests_json),
|
|
17
|
-
relationshipPolicy: JSON.parse(row.relationship_policy_json),
|
|
18
|
-
estimatedTokens: row.estimated_tokens,
|
|
19
|
-
...row.allocation_json ? { allocation: JSON.parse(row.allocation_json) } : {},
|
|
20
|
-
createdAt: row.created_at
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
var ContextCompiler = class {
|
|
24
|
-
capture(input) {
|
|
25
|
-
const now = input.now ?? Date.now();
|
|
26
|
-
const id = randomUUID();
|
|
27
|
-
runSqliteWriteTransaction((db) => {
|
|
28
|
-
db.prepare(`INSERT INTO context_snapshots (
|
|
29
|
-
snapshot_id, trace_id, owner_kind, owner_id, session_key, query, selected_items_json,
|
|
30
|
-
rejected_items_json, consent_requests_json, relationship_policy_json,
|
|
31
|
-
estimated_tokens, allocation_json, created_at
|
|
32
|
-
) VALUES (?, ?, 'session', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(id, input.plan.traceId, input.sessionKey, input.sessionKey, input.query.trim(), JSON.stringify(input.plan.items), JSON.stringify(input.plan.rejected), JSON.stringify(input.plan.consentRequests), JSON.stringify(getRelationshipSettings()), input.plan.estimatedTokens, input.plan.allocation ? JSON.stringify(input.plan.allocation) : null, now);
|
|
33
|
-
});
|
|
34
|
-
return this.get(id);
|
|
35
|
-
}
|
|
36
|
-
get(id) {
|
|
37
|
-
const row = getSqliteDatabase().prepare("SELECT * FROM context_snapshots WHERE snapshot_id = ?").get(id);
|
|
38
|
-
return row ? fromRow(row) : void 0;
|
|
39
|
-
}
|
|
40
|
-
latestForSession(sessionKey, since = 0) {
|
|
41
|
-
const row = getSqliteDatabase().prepare(`SELECT * FROM context_snapshots
|
|
42
|
-
WHERE session_key = ? AND created_at >= ?
|
|
43
|
-
ORDER BY created_at DESC LIMIT 1`).get(sessionKey, since);
|
|
44
|
-
return row ? fromRow(row) : void 0;
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
//#endregion
|
|
48
|
-
export { ContextCompiler };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { MemoryRecord } from '../agent/memory/types.js';
|
|
2
|
-
export type PreparedUserContextImport = {
|
|
3
|
-
statement: string;
|
|
4
|
-
kind: MemoryRecord['kind'];
|
|
5
|
-
sensitivity: NonNullable<MemoryRecord['sensitivity']>;
|
|
6
|
-
durability: MemoryRecord['durability'];
|
|
7
|
-
disclosurePolicy: MemoryRecord['disclosurePolicy'];
|
|
8
|
-
};
|
|
9
|
-
export declare function prepareUserContextImport(candidates: unknown[], existingStatements: Iterable<string>): {
|
|
10
|
-
imports: PreparedUserContextImport[];
|
|
11
|
-
skippedCount: number;
|
|
12
|
-
};
|