@ixo/oracle-runtime 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bootstrap/ambient-factory.d.ts +32 -0
- package/dist/bootstrap/ambient-factory.d.ts.map +1 -0
- package/dist/bootstrap/ambient-factory.js +128 -0
- package/dist/bootstrap/create-oracle-app.d.ts +112 -0
- package/dist/bootstrap/create-oracle-app.d.ts.map +1 -0
- package/dist/bootstrap/create-oracle-app.js +530 -0
- package/dist/bootstrap/graceful-shutdown.d.ts +20 -0
- package/dist/bootstrap/graceful-shutdown.d.ts.map +1 -0
- package/dist/bootstrap/graceful-shutdown.js +61 -0
- package/dist/bootstrap/index.d.ts +13 -0
- package/dist/bootstrap/index.d.ts.map +1 -0
- package/dist/bootstrap/index.js +6 -0
- package/dist/bootstrap/inspect.d.ts +74 -0
- package/dist/bootstrap/inspect.d.ts.map +1 -0
- package/dist/bootstrap/inspect.js +111 -0
- package/dist/bootstrap/plugin-loader.d.ts +50 -0
- package/dist/bootstrap/plugin-loader.d.ts.map +1 -0
- package/dist/bootstrap/plugin-loader.js +119 -0
- package/dist/bootstrap/runtime-app-module.d.ts +38 -0
- package/dist/bootstrap/runtime-app-module.d.ts.map +1 -0
- package/dist/bootstrap/runtime-app-module.js +114 -0
- package/dist/bootstrap/schema-composer.d.ts +46 -0
- package/dist/bootstrap/schema-composer.d.ts.map +1 -0
- package/dist/bootstrap/schema-composer.js +65 -0
- package/dist/config/base-env-config.d.ts +31 -0
- package/dist/config/base-env-config.d.ts.map +1 -0
- package/dist/config/base-env-config.js +70 -0
- package/dist/config/base-env-schema.d.ts +77 -0
- package/dist/config/base-env-schema.d.ts.map +1 -0
- package/dist/config/base-env-schema.js +102 -0
- package/dist/events/scoped-emitter.d.ts +33 -0
- package/dist/events/scoped-emitter.d.ts.map +1 -0
- package/dist/events/scoped-emitter.js +32 -0
- package/dist/graph/index.d.ts +8 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +6 -0
- package/dist/graph/main-agent-types.d.ts +88 -0
- package/dist/graph/main-agent-types.d.ts.map +1 -0
- package/dist/graph/main-agent-types.js +20 -0
- package/dist/graph/main-agent.d.ts +16 -0
- package/dist/graph/main-agent.d.ts.map +1 -0
- package/dist/graph/main-agent.js +251 -0
- package/dist/graph/middlewares/capability-gate-middleware.d.ts +35 -0
- package/dist/graph/middlewares/capability-gate-middleware.d.ts.map +1 -0
- package/dist/graph/middlewares/capability-gate-middleware.js +54 -0
- package/dist/graph/middlewares/index.d.ts +7 -0
- package/dist/graph/middlewares/index.d.ts.map +1 -0
- package/dist/graph/middlewares/index.js +6 -0
- package/dist/graph/middlewares/page-context-middleware.d.ts +23 -0
- package/dist/graph/middlewares/page-context-middleware.d.ts.map +1 -0
- package/dist/graph/middlewares/page-context-middleware.js +68 -0
- package/dist/graph/middlewares/safety-guardrail-middleware.d.ts +26 -0
- package/dist/graph/middlewares/safety-guardrail-middleware.d.ts.map +1 -0
- package/dist/graph/middlewares/safety-guardrail-middleware.js +88 -0
- package/dist/graph/middlewares/summarization-middleware.d.ts +17 -0
- package/dist/graph/middlewares/summarization-middleware.d.ts.map +1 -0
- package/dist/graph/middlewares/summarization-middleware.js +62 -0
- package/dist/graph/middlewares/tool-repetition-guard-middleware.d.ts +24 -0
- package/dist/graph/middlewares/tool-repetition-guard-middleware.d.ts.map +1 -0
- package/dist/graph/middlewares/tool-repetition-guard-middleware.js +112 -0
- package/dist/graph/middlewares/tool-validation-middleware.d.ts +24 -0
- package/dist/graph/middlewares/tool-validation-middleware.d.ts.map +1 -0
- package/dist/graph/middlewares/tool-validation-middleware.js +61 -0
- package/dist/graph/prompt-composer.d.ts +69 -0
- package/dist/graph/prompt-composer.d.ts.map +1 -0
- package/dist/graph/prompt-composer.js +315 -0
- package/dist/graph/state.d.ts +65 -0
- package/dist/graph/state.d.ts.map +1 -0
- package/dist/graph/state.js +60 -0
- package/dist/graph/sub-agent-fallback.d.ts +56 -0
- package/dist/graph/sub-agent-fallback.d.ts.map +1 -0
- package/dist/graph/sub-agent-fallback.js +79 -0
- package/dist/graph/subagent-as-tool.d.ts +77 -0
- package/dist/graph/subagent-as-tool.d.ts.map +1 -0
- package/dist/graph/subagent-as-tool.js +197 -0
- package/dist/graph/wrap-plugin-tool.d.ts +28 -0
- package/dist/graph/wrap-plugin-tool.d.ts.map +1 -0
- package/dist/graph/wrap-plugin-tool.js +30 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/llm/index.d.ts +2 -0
- package/dist/llm/index.d.ts.map +1 -0
- package/dist/llm/index.js +1 -0
- package/dist/llm/llm-provider.d.ts +41 -0
- package/dist/llm/llm-provider.d.ts.map +1 -0
- package/dist/llm/llm-provider.js +130 -0
- package/dist/manifest/index.d.ts +6 -0
- package/dist/manifest/index.d.ts.map +1 -0
- package/dist/manifest/index.js +3 -0
- package/dist/manifest/schema.d.ts +31 -0
- package/dist/manifest/schema.d.ts.map +1 -0
- package/dist/manifest/schema.js +44 -0
- package/dist/manifest/tier1-renderer.d.ts +31 -0
- package/dist/manifest/tier1-renderer.d.ts.map +1 -0
- package/dist/manifest/tier1-renderer.js +68 -0
- package/dist/manifest/validator.d.ts +34 -0
- package/dist/manifest/validator.d.ts.map +1 -0
- package/dist/manifest/validator.js +111 -0
- package/dist/matrix/checkpointer/matrix-upload-utils.d.ts +66 -0
- package/dist/matrix/checkpointer/matrix-upload-utils.d.ts.map +1 -0
- package/dist/matrix/checkpointer/matrix-upload-utils.js +228 -0
- package/dist/matrix/checkpointer/type.d.ts +4 -0
- package/dist/matrix/checkpointer/type.d.ts.map +1 -0
- package/dist/matrix/checkpointer/type.js +1 -0
- package/dist/matrix/checkpointer/user-matrix-sqlite-sync-service.module.d.ts +3 -0
- package/dist/matrix/checkpointer/user-matrix-sqlite-sync-service.module.d.ts.map +1 -0
- package/dist/matrix/checkpointer/user-matrix-sqlite-sync-service.module.js +22 -0
- package/dist/matrix/checkpointer/user-matrix-sqlite-sync-service.service.d.ts +93 -0
- package/dist/matrix/checkpointer/user-matrix-sqlite-sync-service.service.d.ts.map +1 -0
- package/dist/matrix/checkpointer/user-matrix-sqlite-sync-service.service.js +856 -0
- package/dist/matrix/room-membership.d.ts +11 -0
- package/dist/matrix/room-membership.d.ts.map +1 -0
- package/dist/matrix/room-membership.js +33 -0
- package/dist/meta-tools/index.d.ts +28 -0
- package/dist/meta-tools/index.d.ts.map +1 -0
- package/dist/meta-tools/index.js +24 -0
- package/dist/meta-tools/list-capabilities.d.ts +12 -0
- package/dist/meta-tools/list-capabilities.d.ts.map +1 -0
- package/dist/meta-tools/list-capabilities.js +55 -0
- package/dist/meta-tools/load-capability.d.ts +24 -0
- package/dist/meta-tools/load-capability.d.ts.map +1 -0
- package/dist/meta-tools/load-capability.js +82 -0
- package/dist/modules/auth/auth-header.middleware.d.ts +37 -0
- package/dist/modules/auth/auth-header.middleware.d.ts.map +1 -0
- package/dist/modules/auth/auth-header.middleware.js +115 -0
- package/dist/modules/auth/auth.module.d.ts +9 -0
- package/dist/modules/auth/auth.module.d.ts.map +1 -0
- package/dist/modules/auth/auth.module.js +27 -0
- package/dist/modules/auth/index.d.ts +3 -0
- package/dist/modules/auth/index.d.ts.map +1 -0
- package/dist/modules/auth/index.js +2 -0
- package/dist/modules/auth/validate-ucan-delegation.d.ts +31 -0
- package/dist/modules/auth/validate-ucan-delegation.d.ts.map +1 -0
- package/dist/modules/auth/validate-ucan-delegation.js +36 -0
- package/dist/modules/blob-store/blob-store.module.d.ts +10 -0
- package/dist/modules/blob-store/blob-store.module.d.ts.map +1 -0
- package/dist/modules/blob-store/blob-store.module.js +25 -0
- package/dist/modules/blob-store/blob-store.service.d.ts +66 -0
- package/dist/modules/blob-store/blob-store.service.d.ts.map +1 -0
- package/dist/modules/blob-store/blob-store.service.js +108 -0
- package/dist/modules/blob-store/index.d.ts +3 -0
- package/dist/modules/blob-store/index.d.ts.map +1 -0
- package/dist/modules/blob-store/index.js +2 -0
- package/dist/modules/health/health.controller.d.ts +18 -0
- package/dist/modules/health/health.controller.d.ts.map +1 -0
- package/dist/modules/health/health.controller.js +48 -0
- package/dist/modules/health/health.module.d.ts +8 -0
- package/dist/modules/health/health.module.d.ts.map +1 -0
- package/dist/modules/health/health.module.js +21 -0
- package/dist/modules/index.d.ts +8 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/modules/index.js +6 -0
- package/dist/modules/messages/__test-fixtures__/deps.d.ts +41 -0
- package/dist/modules/messages/__test-fixtures__/deps.d.ts.map +1 -0
- package/dist/modules/messages/__test-fixtures__/deps.js +73 -0
- package/dist/modules/messages/__test-fixtures__/fake-agent.d.ts +27 -0
- package/dist/modules/messages/__test-fixtures__/fake-agent.d.ts.map +1 -0
- package/dist/modules/messages/__test-fixtures__/fake-agent.js +41 -0
- package/dist/modules/messages/__test-fixtures__/fake-response.d.ts +29 -0
- package/dist/modules/messages/__test-fixtures__/fake-response.d.ts.map +1 -0
- package/dist/modules/messages/__test-fixtures__/fake-response.js +55 -0
- package/dist/modules/messages/agent-builder.d.ts +64 -0
- package/dist/modules/messages/agent-builder.d.ts.map +1 -0
- package/dist/modules/messages/agent-builder.js +219 -0
- package/dist/modules/messages/batch-invoker.d.ts +36 -0
- package/dist/modules/messages/batch-invoker.d.ts.map +1 -0
- package/dist/modules/messages/batch-invoker.js +58 -0
- package/dist/modules/messages/dto/list-messages.dto.d.ts +4 -0
- package/dist/modules/messages/dto/list-messages.dto.d.ts.map +1 -0
- package/dist/modules/messages/dto/list-messages.dto.js +17 -0
- package/dist/modules/messages/dto/send-message.dto.d.ts +73 -0
- package/dist/modules/messages/dto/send-message.dto.d.ts.map +1 -0
- package/dist/modules/messages/dto/send-message.dto.js +318 -0
- package/dist/modules/messages/file-processing-credit-sink.port.d.ts +20 -0
- package/dist/modules/messages/file-processing-credit-sink.port.d.ts.map +1 -0
- package/dist/modules/messages/file-processing-credit-sink.port.js +1 -0
- package/dist/modules/messages/file-processing.service.d.ts +195 -0
- package/dist/modules/messages/file-processing.service.d.ts.map +1 -0
- package/dist/modules/messages/file-processing.service.js +1278 -0
- package/dist/modules/messages/homeserver-cache.d.ts +11 -0
- package/dist/modules/messages/homeserver-cache.d.ts.map +1 -0
- package/dist/modules/messages/homeserver-cache.js +31 -0
- package/dist/modules/messages/matrix-listener-bridge.d.ts +63 -0
- package/dist/modules/messages/matrix-listener-bridge.d.ts.map +1 -0
- package/dist/modules/messages/matrix-listener-bridge.js +280 -0
- package/dist/modules/messages/messages.controller.d.ts +13 -0
- package/dist/modules/messages/messages.controller.d.ts.map +1 -0
- package/dist/modules/messages/messages.controller.js +95 -0
- package/dist/modules/messages/messages.module.d.ts +3 -0
- package/dist/modules/messages/messages.module.d.ts.map +1 -0
- package/dist/modules/messages/messages.module.js +75 -0
- package/dist/modules/messages/messages.service.d.ts +112 -0
- package/dist/modules/messages/messages.service.d.ts.map +1 -0
- package/dist/modules/messages/messages.service.js +279 -0
- package/dist/modules/messages/oracle-runtime-bundle.d.ts +38 -0
- package/dist/modules/messages/oracle-runtime-bundle.d.ts.map +1 -0
- package/dist/modules/messages/oracle-runtime-bundle.js +40 -0
- package/dist/modules/messages/post-message-syncer.d.ts +30 -0
- package/dist/modules/messages/post-message-syncer.d.ts.map +1 -0
- package/dist/modules/messages/post-message-syncer.js +73 -0
- package/dist/modules/messages/request-preparer.d.ts +53 -0
- package/dist/modules/messages/request-preparer.d.ts.map +1 -0
- package/dist/modules/messages/request-preparer.js +139 -0
- package/dist/modules/messages/sse-stream-runner.d.ts +73 -0
- package/dist/modules/messages/sse-stream-runner.d.ts.map +1 -0
- package/dist/modules/messages/sse-stream-runner.js +352 -0
- package/dist/modules/messages/sse.utils.d.ts +29 -0
- package/dist/modules/messages/sse.utils.d.ts.map +1 -0
- package/dist/modules/messages/sse.utils.js +77 -0
- package/dist/modules/messages/user-context-fetcher.d.ts +41 -0
- package/dist/modules/messages/user-context-fetcher.d.ts.map +1 -0
- package/dist/modules/messages/user-context-fetcher.js +117 -0
- package/dist/modules/secrets/index.d.ts +2 -0
- package/dist/modules/secrets/index.d.ts.map +1 -0
- package/dist/modules/secrets/index.js +1 -0
- package/dist/modules/secrets/secrets.service.d.ts +29 -0
- package/dist/modules/secrets/secrets.service.d.ts.map +1 -0
- package/dist/modules/secrets/secrets.service.js +107 -0
- package/dist/modules/sessions/dto/create-session.dto.d.ts +6 -0
- package/dist/modules/sessions/dto/create-session.dto.d.ts.map +1 -0
- package/dist/modules/sessions/dto/create-session.dto.js +5 -0
- package/dist/modules/sessions/dto/delete-session.dto.d.ts +6 -0
- package/dist/modules/sessions/dto/delete-session.dto.d.ts.map +1 -0
- package/dist/modules/sessions/dto/delete-session.dto.js +5 -0
- package/dist/modules/sessions/dto/list-sessions.dto.d.ts +7 -0
- package/dist/modules/sessions/dto/list-sessions.dto.d.ts.map +1 -0
- package/dist/modules/sessions/dto/list-sessions.dto.js +6 -0
- package/dist/modules/sessions/session-history-processor.service.d.ts +48 -0
- package/dist/modules/sessions/session-history-processor.service.d.ts.map +1 -0
- package/dist/modules/sessions/session-history-processor.service.js +254 -0
- package/dist/modules/sessions/sessions.controller.d.ts +13 -0
- package/dist/modules/sessions/sessions.controller.d.ts.map +1 -0
- package/dist/modules/sessions/sessions.controller.js +113 -0
- package/dist/modules/sessions/sessions.module.d.ts +3 -0
- package/dist/modules/sessions/sessions.module.d.ts.map +1 -0
- package/dist/modules/sessions/sessions.module.js +49 -0
- package/dist/modules/sessions/sessions.service.d.ts +23 -0
- package/dist/modules/sessions/sessions.service.d.ts.map +1 -0
- package/dist/modules/sessions/sessions.service.js +168 -0
- package/dist/modules/subscription/subscription.middleware.d.ts +37 -0
- package/dist/modules/subscription/subscription.middleware.d.ts.map +1 -0
- package/dist/modules/subscription/subscription.middleware.js +141 -0
- package/dist/modules/subscription/subscription.module.d.ts +12 -0
- package/dist/modules/subscription/subscription.module.d.ts.map +1 -0
- package/dist/modules/subscription/subscription.module.js +26 -0
- package/dist/modules/throttler/throttler.module.d.ts +11 -0
- package/dist/modules/throttler/throttler.module.d.ts.map +1 -0
- package/dist/modules/throttler/throttler.module.js +32 -0
- package/dist/modules/ucan/index.d.ts +7 -0
- package/dist/modules/ucan/index.d.ts.map +1 -0
- package/dist/modules/ucan/index.js +6 -0
- package/dist/modules/ucan/ucan.config.d.ts +87 -0
- package/dist/modules/ucan/ucan.config.d.ts.map +1 -0
- package/dist/modules/ucan/ucan.config.js +114 -0
- package/dist/modules/ucan/ucan.module.d.ts +29 -0
- package/dist/modules/ucan/ucan.module.d.ts.map +1 -0
- package/dist/modules/ucan/ucan.module.js +46 -0
- package/dist/modules/ucan/ucan.service.d.ts +129 -0
- package/dist/modules/ucan/ucan.service.d.ts.map +1 -0
- package/dist/modules/ucan/ucan.service.js +582 -0
- package/dist/modules/ws/emitter.d.ts +12 -0
- package/dist/modules/ws/emitter.d.ts.map +1 -0
- package/dist/modules/ws/emitter.js +12 -0
- package/dist/modules/ws/ws.gateway.d.ts +34 -0
- package/dist/modules/ws/ws.gateway.d.ts.map +1 -0
- package/dist/modules/ws/ws.gateway.js +241 -0
- package/dist/modules/ws/ws.module.d.ts +3 -0
- package/dist/modules/ws/ws.module.d.ts.map +1 -0
- package/dist/modules/ws/ws.module.js +21 -0
- package/dist/modules/ws/ws.service.d.ts +25 -0
- package/dist/modules/ws/ws.service.d.ts.map +1 -0
- package/dist/modules/ws/ws.service.js +113 -0
- package/dist/plugin-api/define-plugin.d.ts +19 -0
- package/dist/plugin-api/define-plugin.d.ts.map +1 -0
- package/dist/plugin-api/define-plugin.js +25 -0
- package/dist/plugin-api/oracle-plugin.d.ts +92 -0
- package/dist/plugin-api/oracle-plugin.d.ts.map +1 -0
- package/dist/plugin-api/oracle-plugin.js +15 -0
- package/dist/plugin-api/tool-helper.d.ts +33 -0
- package/dist/plugin-api/tool-helper.d.ts.map +1 -0
- package/dist/plugin-api/tool-helper.js +40 -0
- package/dist/plugin-api/types.d.ts +378 -0
- package/dist/plugin-api/types.d.ts.map +1 -0
- package/dist/plugin-api/types.js +1 -0
- package/dist/plugins/agui/agui-agent.d.ts +10 -0
- package/dist/plugins/agui/agui-agent.d.ts.map +1 -0
- package/dist/plugins/agui/agui-agent.js +110 -0
- package/dist/plugins/agui/agui.plugin.d.ts +16 -0
- package/dist/plugins/agui/agui.plugin.d.ts.map +1 -0
- package/dist/plugins/agui/agui.plugin.js +117 -0
- package/dist/plugins/agui/index.d.ts +3 -0
- package/dist/plugins/agui/index.d.ts.map +1 -0
- package/dist/plugins/agui/index.js +2 -0
- package/dist/plugins/composio/composio-tools.d.ts +59 -0
- package/dist/plugins/composio/composio-tools.d.ts.map +1 -0
- package/dist/plugins/composio/composio-tools.js +88 -0
- package/dist/plugins/composio/composio-ucan.d.ts +14 -0
- package/dist/plugins/composio/composio-ucan.d.ts.map +1 -0
- package/dist/plugins/composio/composio-ucan.js +32 -0
- package/dist/plugins/composio/composio.plugin.d.ts +45 -0
- package/dist/plugins/composio/composio.plugin.d.ts.map +1 -0
- package/dist/plugins/composio/composio.plugin.js +116 -0
- package/dist/plugins/composio/index.d.ts +4 -0
- package/dist/plugins/composio/index.d.ts.map +1 -0
- package/dist/plugins/composio/index.js +3 -0
- package/dist/plugins/credits/claim-processing.module.d.ts +28 -0
- package/dist/plugins/credits/claim-processing.module.d.ts.map +1 -0
- package/dist/plugins/credits/claim-processing.module.js +37 -0
- package/dist/plugins/credits/claim-processing.service.d.ts +92 -0
- package/dist/plugins/credits/claim-processing.service.d.ts.map +1 -0
- package/dist/plugins/credits/claim-processing.service.js +406 -0
- package/dist/plugins/credits/credits-middleware.d.ts +23 -0
- package/dist/plugins/credits/credits-middleware.d.ts.map +1 -0
- package/dist/plugins/credits/credits-middleware.js +154 -0
- package/dist/plugins/credits/credits.plugin.d.ts +55 -0
- package/dist/plugins/credits/credits.plugin.d.ts.map +1 -0
- package/dist/plugins/credits/credits.plugin.js +95 -0
- package/dist/plugins/credits/file-processing-sink.module.d.ts +18 -0
- package/dist/plugins/credits/file-processing-sink.module.d.ts.map +1 -0
- package/dist/plugins/credits/file-processing-sink.module.js +56 -0
- package/dist/plugins/credits/index.d.ts +8 -0
- package/dist/plugins/credits/index.d.ts.map +1 -0
- package/dist/plugins/credits/index.js +7 -0
- package/dist/plugins/credits/subscription-sink.module.d.ts +23 -0
- package/dist/plugins/credits/subscription-sink.module.d.ts.map +1 -0
- package/dist/plugins/credits/subscription-sink.module.js +54 -0
- package/dist/plugins/credits/token-limiter.d.ts +139 -0
- package/dist/plugins/credits/token-limiter.d.ts.map +1 -0
- package/dist/plugins/credits/token-limiter.js +302 -0
- package/dist/plugins/domain-indexer/domain-indexer-agent.d.ts +7 -0
- package/dist/plugins/domain-indexer/domain-indexer-agent.d.ts.map +1 -0
- package/dist/plugins/domain-indexer/domain-indexer-agent.js +48 -0
- package/dist/plugins/domain-indexer/domain-indexer-tools.d.ts +8 -0
- package/dist/plugins/domain-indexer/domain-indexer-tools.d.ts.map +1 -0
- package/dist/plugins/domain-indexer/domain-indexer-tools.js +194 -0
- package/dist/plugins/domain-indexer/domain-indexer.plugin.d.ts +20 -0
- package/dist/plugins/domain-indexer/domain-indexer.plugin.d.ts.map +1 -0
- package/dist/plugins/domain-indexer/domain-indexer.plugin.js +78 -0
- package/dist/plugins/domain-indexer/index.d.ts +2 -0
- package/dist/plugins/domain-indexer/index.d.ts.map +1 -0
- package/dist/plugins/domain-indexer/index.js +1 -0
- package/dist/plugins/editor/apply-sandbox-output.d.ts +33 -0
- package/dist/plugins/editor/apply-sandbox-output.d.ts.map +1 -0
- package/dist/plugins/editor/apply-sandbox-output.js +302 -0
- package/dist/plugins/editor/block-actions.d.ts +84 -0
- package/dist/plugins/editor/block-actions.d.ts.map +1 -0
- package/dist/plugins/editor/block-actions.js +471 -0
- package/dist/plugins/editor/blocknote-helper.d.ts +147 -0
- package/dist/plugins/editor/blocknote-helper.d.ts.map +1 -0
- package/dist/plugins/editor/blocknote-helper.js +542 -0
- package/dist/plugins/editor/blocknote-tools.d.ts +364 -0
- package/dist/plugins/editor/blocknote-tools.d.ts.map +1 -0
- package/dist/plugins/editor/blocknote-tools.js +2123 -0
- package/dist/plugins/editor/editor-agent.d.ts +47 -0
- package/dist/plugins/editor/editor-agent.d.ts.map +1 -0
- package/dist/plugins/editor/editor-agent.js +158 -0
- package/dist/plugins/editor/editor-mx.d.ts +56 -0
- package/dist/plugins/editor/editor-mx.d.ts.map +1 -0
- package/dist/plugins/editor/editor-mx.js +100 -0
- package/dist/plugins/editor/editor.plugin.d.ts +32 -0
- package/dist/plugins/editor/editor.plugin.d.ts.map +1 -0
- package/dist/plugins/editor/editor.plugin.js +189 -0
- package/dist/plugins/editor/index.d.ts +6 -0
- package/dist/plugins/editor/index.d.ts.map +1 -0
- package/dist/plugins/editor/index.js +5 -0
- package/dist/plugins/editor/mint-invocation-tool.d.ts +72 -0
- package/dist/plugins/editor/mint-invocation-tool.d.ts.map +1 -0
- package/dist/plugins/editor/mint-invocation-tool.js +173 -0
- package/dist/plugins/editor/page-functions.d.ts +100 -0
- package/dist/plugins/editor/page-functions.d.ts.map +1 -0
- package/dist/plugins/editor/page-functions.js +317 -0
- package/dist/plugins/editor/page-tools.d.ts +75 -0
- package/dist/plugins/editor/page-tools.d.ts.map +1 -0
- package/dist/plugins/editor/page-tools.js +238 -0
- package/dist/plugins/editor/prompts.d.ts +22 -0
- package/dist/plugins/editor/prompts.d.ts.map +1 -0
- package/dist/plugins/editor/prompts.js +451 -0
- package/dist/plugins/editor/provider.d.ts +101 -0
- package/dist/plugins/editor/provider.d.ts.map +1 -0
- package/dist/plugins/editor/provider.js +249 -0
- package/dist/plugins/editor/standalone-editor-tool.d.ts +17 -0
- package/dist/plugins/editor/standalone-editor-tool.d.ts.map +1 -0
- package/dist/plugins/editor/standalone-editor-tool.js +136 -0
- package/dist/plugins/editor/survey-helpers.d.ts +112 -0
- package/dist/plugins/editor/survey-helpers.d.ts.map +1 -0
- package/dist/plugins/editor/survey-helpers.js +358 -0
- package/dist/plugins/firecrawl/firecrawl-agent.d.ts +7 -0
- package/dist/plugins/firecrawl/firecrawl-agent.d.ts.map +1 -0
- package/dist/plugins/firecrawl/firecrawl-agent.js +84 -0
- package/dist/plugins/firecrawl/firecrawl-tools.d.ts +37 -0
- package/dist/plugins/firecrawl/firecrawl-tools.d.ts.map +1 -0
- package/dist/plugins/firecrawl/firecrawl-tools.js +129 -0
- package/dist/plugins/firecrawl/firecrawl.plugin.d.ts +32 -0
- package/dist/plugins/firecrawl/firecrawl.plugin.d.ts.map +1 -0
- package/dist/plugins/firecrawl/firecrawl.plugin.js +69 -0
- package/dist/plugins/firecrawl/index.d.ts +3 -0
- package/dist/plugins/firecrawl/index.d.ts.map +1 -0
- package/dist/plugins/firecrawl/index.js +2 -0
- package/dist/plugins/index.d.ts +47 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +69 -0
- package/dist/plugins/matrix-group-chats/channel-memory.module.d.ts +7 -0
- package/dist/plugins/matrix-group-chats/channel-memory.module.d.ts.map +1 -0
- package/dist/plugins/matrix-group-chats/channel-memory.module.js +22 -0
- package/dist/plugins/matrix-group-chats/channel-memory.repo.d.ts +62 -0
- package/dist/plugins/matrix-group-chats/channel-memory.repo.d.ts.map +1 -0
- package/dist/plugins/matrix-group-chats/channel-memory.repo.js +311 -0
- package/dist/plugins/matrix-group-chats/channel-memory.service.d.ts +89 -0
- package/dist/plugins/matrix-group-chats/channel-memory.service.d.ts.map +1 -0
- package/dist/plugins/matrix-group-chats/channel-memory.service.js +565 -0
- package/dist/plugins/matrix-group-chats/channel-memory.summarizer.d.ts +18 -0
- package/dist/plugins/matrix-group-chats/channel-memory.summarizer.d.ts.map +1 -0
- package/dist/plugins/matrix-group-chats/channel-memory.summarizer.js +128 -0
- package/dist/plugins/matrix-group-chats/channel-memory.types.d.ts +50 -0
- package/dist/plugins/matrix-group-chats/channel-memory.types.d.ts.map +1 -0
- package/dist/plugins/matrix-group-chats/channel-memory.types.js +2 -0
- package/dist/plugins/matrix-group-chats/guard.d.ts +83 -0
- package/dist/plugins/matrix-group-chats/guard.d.ts.map +1 -0
- package/dist/plugins/matrix-group-chats/guard.js +138 -0
- package/dist/plugins/matrix-group-chats/index.d.ts +59 -0
- package/dist/plugins/matrix-group-chats/index.d.ts.map +1 -0
- package/dist/plugins/matrix-group-chats/index.js +140 -0
- package/dist/plugins/matrix-group-chats/middleware.d.ts +31 -0
- package/dist/plugins/matrix-group-chats/middleware.d.ts.map +1 -0
- package/dist/plugins/matrix-group-chats/middleware.js +186 -0
- package/dist/plugins/matrix-group-chats/power-levels.d.ts +15 -0
- package/dist/plugins/matrix-group-chats/power-levels.d.ts.map +1 -0
- package/dist/plugins/matrix-group-chats/power-levels.js +36 -0
- package/dist/plugins/matrix-group-chats/room-info.d.ts +23 -0
- package/dist/plugins/matrix-group-chats/room-info.d.ts.map +1 -0
- package/dist/plugins/matrix-group-chats/room-info.js +34 -0
- package/dist/plugins/matrix-group-chats/tools.d.ts +8 -0
- package/dist/plugins/matrix-group-chats/tools.d.ts.map +1 -0
- package/dist/plugins/matrix-group-chats/tools.js +154 -0
- package/dist/plugins/memory/index.d.ts +5 -0
- package/dist/plugins/memory/index.d.ts.map +1 -0
- package/dist/plugins/memory/index.js +3 -0
- package/dist/plugins/memory/memory-tools.d.ts +52 -0
- package/dist/plugins/memory/memory-tools.d.ts.map +1 -0
- package/dist/plugins/memory/memory-tools.js +88 -0
- package/dist/plugins/memory/memory-ucan.d.ts +17 -0
- package/dist/plugins/memory/memory-ucan.d.ts.map +1 -0
- package/dist/plugins/memory/memory-ucan.js +43 -0
- package/dist/plugins/memory/memory.plugin.d.ts +51 -0
- package/dist/plugins/memory/memory.plugin.d.ts.map +1 -0
- package/dist/plugins/memory/memory.plugin.js +76 -0
- package/dist/plugins/memory/types.d.ts +75 -0
- package/dist/plugins/memory/types.d.ts.map +1 -0
- package/dist/plugins/memory/types.js +2 -0
- package/dist/plugins/portal/index.d.ts +3 -0
- package/dist/plugins/portal/index.d.ts.map +1 -0
- package/dist/plugins/portal/index.js +2 -0
- package/dist/plugins/portal/portal-agent.d.ts +9 -0
- package/dist/plugins/portal/portal-agent.d.ts.map +1 -0
- package/dist/plugins/portal/portal-agent.js +70 -0
- package/dist/plugins/portal/portal.plugin.d.ts +16 -0
- package/dist/plugins/portal/portal.plugin.d.ts.map +1 -0
- package/dist/plugins/portal/portal.plugin.js +115 -0
- package/dist/plugins/sandbox/index.d.ts +3 -0
- package/dist/plugins/sandbox/index.d.ts.map +1 -0
- package/dist/plugins/sandbox/index.js +2 -0
- package/dist/plugins/sandbox/sandbox-mcp.d.ts +46 -0
- package/dist/plugins/sandbox/sandbox-mcp.d.ts.map +1 -0
- package/dist/plugins/sandbox/sandbox-mcp.js +80 -0
- package/dist/plugins/sandbox/sandbox-write-blob.d.ts +22 -0
- package/dist/plugins/sandbox/sandbox-write-blob.d.ts.map +1 -0
- package/dist/plugins/sandbox/sandbox-write-blob.js +80 -0
- package/dist/plugins/sandbox/sandbox.plugin.d.ts +80 -0
- package/dist/plugins/sandbox/sandbox.plugin.d.ts.map +1 -0
- package/dist/plugins/sandbox/sandbox.plugin.js +204 -0
- package/dist/plugins/skills/index.d.ts +3 -0
- package/dist/plugins/skills/index.d.ts.map +1 -0
- package/dist/plugins/skills/index.js +2 -0
- package/dist/plugins/skills/skills-tools.d.ts +20 -0
- package/dist/plugins/skills/skills-tools.d.ts.map +1 -0
- package/dist/plugins/skills/skills-tools.js +204 -0
- package/dist/plugins/skills/skills-ucan.d.ts +24 -0
- package/dist/plugins/skills/skills-ucan.d.ts.map +1 -0
- package/dist/plugins/skills/skills-ucan.js +28 -0
- package/dist/plugins/skills/skills.plugin.d.ts +37 -0
- package/dist/plugins/skills/skills.plugin.d.ts.map +1 -0
- package/dist/plugins/skills/skills.plugin.js +82 -0
- package/dist/plugins/slack/index.d.ts +4 -0
- package/dist/plugins/slack/index.d.ts.map +1 -0
- package/dist/plugins/slack/index.js +3 -0
- package/dist/plugins/slack/slack.module.d.ts +9 -0
- package/dist/plugins/slack/slack.module.d.ts.map +1 -0
- package/dist/plugins/slack/slack.module.js +27 -0
- package/dist/plugins/slack/slack.plugin.d.ts +30 -0
- package/dist/plugins/slack/slack.plugin.d.ts.map +1 -0
- package/dist/plugins/slack/slack.plugin.js +40 -0
- package/dist/plugins/slack/slack.service.d.ts +32 -0
- package/dist/plugins/slack/slack.service.d.ts.map +1 -0
- package/dist/plugins/slack/slack.service.js +157 -0
- package/dist/plugins/user-preferences/index.d.ts +4 -0
- package/dist/plugins/user-preferences/index.d.ts.map +1 -0
- package/dist/plugins/user-preferences/index.js +3 -0
- package/dist/plugins/user-preferences/service/user-preferences.service.d.ts +61 -0
- package/dist/plugins/user-preferences/service/user-preferences.service.d.ts.map +1 -0
- package/dist/plugins/user-preferences/service/user-preferences.service.js +105 -0
- package/dist/plugins/user-preferences/user-preferences-http.module.d.ts +10 -0
- package/dist/plugins/user-preferences/user-preferences-http.module.d.ts.map +1 -0
- package/dist/plugins/user-preferences/user-preferences-http.module.js +23 -0
- package/dist/plugins/user-preferences/user-preferences-tool.d.ts +22 -0
- package/dist/plugins/user-preferences/user-preferences-tool.d.ts.map +1 -0
- package/dist/plugins/user-preferences/user-preferences-tool.js +103 -0
- package/dist/plugins/user-preferences/user-preferences.controller.d.ts +18 -0
- package/dist/plugins/user-preferences/user-preferences.controller.d.ts.map +1 -0
- package/dist/plugins/user-preferences/user-preferences.controller.js +72 -0
- package/dist/plugins/user-preferences/user-preferences.plugin.d.ts +27 -0
- package/dist/plugins/user-preferences/user-preferences.plugin.d.ts.map +1 -0
- package/dist/plugins/user-preferences/user-preferences.plugin.js +66 -0
- package/dist/registries/config-schema-registry.d.ts +24 -0
- package/dist/registries/config-schema-registry.d.ts.map +1 -0
- package/dist/registries/config-schema-registry.js +27 -0
- package/dist/registries/index.d.ts +13 -0
- package/dist/registries/index.d.ts.map +1 -0
- package/dist/registries/index.js +6 -0
- package/dist/registries/manifest-registry.d.ts +49 -0
- package/dist/registries/manifest-registry.d.ts.map +1 -0
- package/dist/registries/manifest-registry.js +53 -0
- package/dist/registries/middleware-registry.d.ts +41 -0
- package/dist/registries/middleware-registry.d.ts.map +1 -0
- package/dist/registries/middleware-registry.js +52 -0
- package/dist/registries/shared-state-registry.d.ts +41 -0
- package/dist/registries/shared-state-registry.d.ts.map +1 -0
- package/dist/registries/shared-state-registry.js +65 -0
- package/dist/registries/subagent-registry.d.ts +55 -0
- package/dist/registries/subagent-registry.d.ts.map +1 -0
- package/dist/registries/subagent-registry.js +106 -0
- package/dist/registries/test-fixtures.d.ts +47 -0
- package/dist/registries/test-fixtures.d.ts.map +1 -0
- package/dist/registries/test-fixtures.js +168 -0
- package/dist/registries/tool-registry.d.ts +74 -0
- package/dist/registries/tool-registry.d.ts.map +1 -0
- package/dist/registries/tool-registry.js +130 -0
- package/dist/runtime-context/ambient.d.ts +118 -0
- package/dist/runtime-context/ambient.d.ts.map +1 -0
- package/dist/runtime-context/ambient.js +1 -0
- package/dist/runtime-context/build-plugin.d.ts +20 -0
- package/dist/runtime-context/build-plugin.d.ts.map +1 -0
- package/dist/runtime-context/build-plugin.js +16 -0
- package/dist/runtime-context/build-runtime.d.ts +60 -0
- package/dist/runtime-context/build-runtime.d.ts.map +1 -0
- package/dist/runtime-context/build-runtime.js +81 -0
- package/dist/testing/create-test-runtime.d.ts +95 -0
- package/dist/testing/create-test-runtime.d.ts.map +1 -0
- package/dist/testing/create-test-runtime.js +302 -0
- package/dist/testing/index.d.ts +5 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +5 -0
- package/dist/testing/integration/chat-client.d.ts +143 -0
- package/dist/testing/integration/chat-client.d.ts.map +1 -0
- package/dist/testing/integration/chat-client.js +238 -0
- package/dist/testing/integration/harness.d.ts +189 -0
- package/dist/testing/integration/harness.d.ts.map +1 -0
- package/dist/testing/integration/harness.js +461 -0
- package/dist/testing/integration/index.d.ts +14 -0
- package/dist/testing/integration/index.d.ts.map +1 -0
- package/dist/testing/integration/index.js +18 -0
- package/dist/testing/integration/setup.d.ts +2 -0
- package/dist/testing/integration/setup.d.ts.map +1 -0
- package/dist/testing/integration/setup.js +41 -0
- package/dist/testing/integration/sse-parser.d.ts +99 -0
- package/dist/testing/integration/sse-parser.d.ts.map +1 -0
- package/dist/testing/integration/sse-parser.js +125 -0
- package/dist/testing/integration/ucan.d.ts +74 -0
- package/dist/testing/integration/ucan.d.ts.map +1 -0
- package/dist/testing/integration/ucan.js +95 -0
- package/dist/testing/integration/wait-for-matrix-loaded.d.ts +19 -0
- package/dist/testing/integration/wait-for-matrix-loaded.d.ts.map +1 -0
- package/dist/testing/integration/wait-for-matrix-loaded.js +31 -0
- package/dist/testing/mocks.d.ts +64 -0
- package/dist/testing/mocks.d.ts.map +1 -0
- package/dist/testing/mocks.js +141 -0
- package/dist/testing/nest-doubles.d.ts +10 -0
- package/dist/testing/nest-doubles.d.ts.map +1 -0
- package/dist/testing/nest-doubles.js +19 -0
- package/dist/utils/emoji.d.ts +3 -0
- package/dist/utils/emoji.d.ts.map +1 -0
- package/dist/utils/emoji.js +36 -0
- package/package.json +102 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { MemoryEngineService } from '@ixo/common';
|
|
2
|
+
import { Cache } from '@nestjs/cache-manager';
|
|
3
|
+
import { ConfigService } from '@nestjs/config';
|
|
4
|
+
import { UcanService } from '../ucan/ucan.service.js';
|
|
5
|
+
/**
|
|
6
|
+
* Local widening: the graph state's `userContext` field is typed as
|
|
7
|
+
* `Record<string, unknown>`. `@ixo/common`'s `UserContextData` is a
|
|
8
|
+
* structural subtype (typed slots like `identity`, `work`, etc.) but
|
|
9
|
+
* TypeScript treats them as distinct types. We carry the looser shape
|
|
10
|
+
* through this module so the value flows cleanly into `buildTimeState`.
|
|
11
|
+
*/
|
|
12
|
+
type UserContextRecord = Record<string, unknown>;
|
|
13
|
+
/**
|
|
14
|
+
* Per-room fetcher for Memory Engine `userContext`, cached for 5 minutes.
|
|
15
|
+
*
|
|
16
|
+
* Used by `AgentBuilder` to populate `state.userContext` BEFORE the agent is
|
|
17
|
+
* compiled so the system prompt sees the value on turn 1. The previous
|
|
18
|
+
* middleware-based approach wrote the value mid-run, by which point the
|
|
19
|
+
* prompt was already a frozen string — so turn-1 prompts were always empty.
|
|
20
|
+
*
|
|
21
|
+
* Returns `undefined` when:
|
|
22
|
+
* - `MEMORY_ENGINE_URL` is not configured (`MemoryEngineService` is null)
|
|
23
|
+
* - UCAN signing key is missing (Matrix listener path, no per-user UCAN)
|
|
24
|
+
* - the Memory Engine call throws — userContext is best-effort, missing
|
|
25
|
+
* enrichment must never break a chat.
|
|
26
|
+
*/
|
|
27
|
+
export declare class UserContextFetcher {
|
|
28
|
+
private readonly cache;
|
|
29
|
+
private readonly memoryEngine;
|
|
30
|
+
private readonly ucanService;
|
|
31
|
+
private readonly configService;
|
|
32
|
+
private readonly logger;
|
|
33
|
+
constructor(cache: Cache, memoryEngine: MemoryEngineService | null, ucanService: UcanService, configService: ConfigService);
|
|
34
|
+
fetch(params: {
|
|
35
|
+
roomId: string;
|
|
36
|
+
userDid: string;
|
|
37
|
+
sessionId: string;
|
|
38
|
+
}): Promise<UserContextRecord | undefined>;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=user-context-fetcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-context-fetcher.d.ts","sourceRoot":"","sources":["../../../src/modules/messages/user-context-fetcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,KAAK,EAAiB,MAAM,uBAAuB,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;;;;;GAMG;AACH,KAAK,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAQjD;;;;;;;;;;;;;GAaG;AACH,qBACa,kBAAkB;IAIJ,OAAO,CAAC,QAAQ,CAAC,KAAK;IAG7C,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,aAAa;IARhC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuC;gBAGpB,KAAK,EAAE,KAAK,EAGnC,YAAY,EAAE,mBAAmB,GAAG,IAAI,EACxC,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa;IAOzC,KAAK,CAAC,MAAM,EAAE;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;CAyF3C"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
var UserContextFetcher_1;
|
|
14
|
+
import { MemoryEngineService } from '@ixo/common';
|
|
15
|
+
import { Cache, CACHE_MANAGER } from '@nestjs/cache-manager';
|
|
16
|
+
import { Inject, Injectable, Logger, Optional } from '@nestjs/common';
|
|
17
|
+
import { ConfigService } from '@nestjs/config';
|
|
18
|
+
import { minutes } from '@nestjs/throttler';
|
|
19
|
+
import { UcanService } from '../ucan/ucan.service.js';
|
|
20
|
+
const CACHE_TTL_MS = minutes(5);
|
|
21
|
+
function cacheKey(sessionId) {
|
|
22
|
+
return `user-context:${sessionId}`;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Per-room fetcher for Memory Engine `userContext`, cached for 5 minutes.
|
|
26
|
+
*
|
|
27
|
+
* Used by `AgentBuilder` to populate `state.userContext` BEFORE the agent is
|
|
28
|
+
* compiled so the system prompt sees the value on turn 1. The previous
|
|
29
|
+
* middleware-based approach wrote the value mid-run, by which point the
|
|
30
|
+
* prompt was already a frozen string — so turn-1 prompts were always empty.
|
|
31
|
+
*
|
|
32
|
+
* Returns `undefined` when:
|
|
33
|
+
* - `MEMORY_ENGINE_URL` is not configured (`MemoryEngineService` is null)
|
|
34
|
+
* - UCAN signing key is missing (Matrix listener path, no per-user UCAN)
|
|
35
|
+
* - the Memory Engine call throws — userContext is best-effort, missing
|
|
36
|
+
* enrichment must never break a chat.
|
|
37
|
+
*/
|
|
38
|
+
let UserContextFetcher = UserContextFetcher_1 = class UserContextFetcher {
|
|
39
|
+
cache;
|
|
40
|
+
memoryEngine;
|
|
41
|
+
ucanService;
|
|
42
|
+
configService;
|
|
43
|
+
logger = new Logger(UserContextFetcher_1.name);
|
|
44
|
+
constructor(cache, memoryEngine, ucanService, configService) {
|
|
45
|
+
this.cache = cache;
|
|
46
|
+
this.memoryEngine = memoryEngine;
|
|
47
|
+
this.ucanService = ucanService;
|
|
48
|
+
this.configService = configService;
|
|
49
|
+
this.logger.log(`[UserContextFetcher] constructed — memoryEngine=${this.memoryEngine ? 'available' : 'null'}, hasSigningKey=${this.ucanService.hasSigningKey()}`);
|
|
50
|
+
}
|
|
51
|
+
async fetch(params) {
|
|
52
|
+
const { roomId, userDid, sessionId } = params;
|
|
53
|
+
this.logger.debug(`[UserContextFetcher] fetch begin — room=${roomId}, user=${userDid}, sessionid=${sessionId}`);
|
|
54
|
+
if (!this.memoryEngine) {
|
|
55
|
+
this.logger.warn(`[UserContextFetcher] skip — MemoryEngineService not configured (MEMORY_ENGINE_URL unset)`);
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
if (!this.ucanService.hasSigningKey()) {
|
|
59
|
+
this.logger.warn(`[UserContextFetcher] skip — UCAN signing key not loaded (no per-user invocation)`);
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
const cached = await this.cache.get(cacheKey(sessionId));
|
|
63
|
+
if (cached) {
|
|
64
|
+
this.logger.log(`[UserContextFetcher] cache hit — room=${roomId}, keys=${Object.keys(cached).length}`);
|
|
65
|
+
return cached;
|
|
66
|
+
}
|
|
67
|
+
this.logger.log(`[UserContextFetcher] cache miss — room=${roomId}`);
|
|
68
|
+
const engineUrl = this.configService.get('MEMORY_ENGINE_URL');
|
|
69
|
+
if (!engineUrl) {
|
|
70
|
+
this.logger.warn(`[UserContextFetcher] skip — MEMORY_ENGINE_URL not in ConfigService (but MemoryEngineService is set?)`);
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
let invocation;
|
|
74
|
+
try {
|
|
75
|
+
invocation = await this.ucanService.createServiceInvocation(engineUrl, userDid, 'ixo:memory');
|
|
76
|
+
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
this.logger.warn(`[UserContextFetcher] UCAN invocation threw for room ${roomId}: ${err instanceof Error ? err.message : String(err)}`);
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
if (!invocation) {
|
|
82
|
+
this.logger.warn(`[UserContextFetcher] UCAN invocation returned null for room ${roomId} (did:web resolution failed?)`);
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
const oracleDid = this.configService.get('ORACLE_DID') ?? '';
|
|
86
|
+
this.logger.log(`[UserContextFetcher] calling gatherUserContext — engine=${engineUrl}, room=${roomId}, oracle=${oracleDid}`);
|
|
87
|
+
try {
|
|
88
|
+
const context = await this.memoryEngine.gatherUserContext({
|
|
89
|
+
oracleDid,
|
|
90
|
+
roomId,
|
|
91
|
+
oracleToken: '',
|
|
92
|
+
userToken: '',
|
|
93
|
+
oracleHomeServer: '',
|
|
94
|
+
userHomeServer: '',
|
|
95
|
+
ucanInvocation: invocation,
|
|
96
|
+
});
|
|
97
|
+
const widened = { ...context };
|
|
98
|
+
const keyCount = Object.keys(widened).length;
|
|
99
|
+
this.logger.log(`[UserContextFetcher] gather returned ${keyCount} key(s) for room ${roomId}: ${keyCount > 0 ? Object.keys(widened).join(', ') : '(empty)'}`);
|
|
100
|
+
await this.cache.set(cacheKey(sessionId), widened, CACHE_TTL_MS);
|
|
101
|
+
return widened;
|
|
102
|
+
}
|
|
103
|
+
catch (err) {
|
|
104
|
+
this.logger.warn(`[UserContextFetcher] gatherUserContext threw for room ${roomId}: ${err instanceof Error ? err.message : String(err)}`);
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
UserContextFetcher = UserContextFetcher_1 = __decorate([
|
|
110
|
+
Injectable(),
|
|
111
|
+
__param(0, Inject(CACHE_MANAGER)),
|
|
112
|
+
__param(1, Optional()),
|
|
113
|
+
__param(1, Inject(MemoryEngineService)),
|
|
114
|
+
__metadata("design:paramtypes", [Cache, Object, UcanService,
|
|
115
|
+
ConfigService])
|
|
116
|
+
], UserContextFetcher);
|
|
117
|
+
export { UserContextFetcher };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/secrets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SecretsService } from './secrets.service.js';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type JWK } from '@ixo/oracles-chain-client';
|
|
2
|
+
import type { Cache } from 'cache-manager';
|
|
3
|
+
export interface SecretIndexEntry {
|
|
4
|
+
name: string;
|
|
5
|
+
eventId: string;
|
|
6
|
+
publicKeyId: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class SecretsService {
|
|
9
|
+
private static instance;
|
|
10
|
+
private cacheManager;
|
|
11
|
+
private encryptionKey;
|
|
12
|
+
private constructor();
|
|
13
|
+
setEncryptionKey(key: JWK): void;
|
|
14
|
+
setCacheManager(cache: Cache): void;
|
|
15
|
+
static getInstance(): SecretsService;
|
|
16
|
+
/**
|
|
17
|
+
* Get the secret index from room state events.
|
|
18
|
+
* Cheap operation — one API call per invocation.
|
|
19
|
+
*/
|
|
20
|
+
getSecretIndex(roomId: string): Promise<SecretIndexEntry[]>;
|
|
21
|
+
private cacheKey;
|
|
22
|
+
/**
|
|
23
|
+
* Load secret values from timeline events, using cache where possible.
|
|
24
|
+
* Only fetches timeline events for secrets whose eventId has changed.
|
|
25
|
+
* Stale entries (deleted secrets) expire naturally via the 24h TTL.
|
|
26
|
+
*/
|
|
27
|
+
loadSecretValues(roomId: string, index: SecretIndexEntry[]): Promise<Record<string, string>>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=secrets.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secrets.service.d.ts","sourceRoot":"","sources":["../../../src/modules/secrets/secrets.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAGjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB;AASD,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAiB;IAExC,OAAO,CAAC,YAAY,CAAsB;IAG1C,OAAO,CAAC,aAAa,CAAoB;IAEzC,OAAO;IAEP,gBAAgB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;IAIhC,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAInC,MAAM,CAAC,WAAW,IAAI,cAAc;IAOpC;;;OAGG;IACG,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAwCjE,OAAO,CAAC,QAAQ;IAIhB;;;;OAIG;IACG,gBAAgB,CACpB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,gBAAgB,EAAE,GACxB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CA6DnC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { decryptJWE } from '@ixo/oracles-chain-client';
|
|
2
|
+
import { MatrixManager } from '@ixo/matrix';
|
|
3
|
+
import { Logger } from '@nestjs/common';
|
|
4
|
+
const TWENTY_FOUR_HOURS = 24 * 60 * 60 * 1000;
|
|
5
|
+
export class SecretsService {
|
|
6
|
+
static instance;
|
|
7
|
+
cacheManager = null;
|
|
8
|
+
// TODO: Key rotation — change to Map<string, JWK> keyed by publicKeyId to support multiple keys
|
|
9
|
+
encryptionKey = null;
|
|
10
|
+
constructor() { }
|
|
11
|
+
setEncryptionKey(key) {
|
|
12
|
+
this.encryptionKey = key;
|
|
13
|
+
}
|
|
14
|
+
setCacheManager(cache) {
|
|
15
|
+
this.cacheManager = cache;
|
|
16
|
+
}
|
|
17
|
+
static getInstance() {
|
|
18
|
+
if (!SecretsService.instance) {
|
|
19
|
+
SecretsService.instance = new SecretsService();
|
|
20
|
+
}
|
|
21
|
+
return SecretsService.instance;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get the secret index from room state events.
|
|
25
|
+
* Cheap operation — one API call per invocation.
|
|
26
|
+
*/
|
|
27
|
+
async getSecretIndex(roomId) {
|
|
28
|
+
try {
|
|
29
|
+
const client = MatrixManager.getInstance().getClient();
|
|
30
|
+
if (!client) {
|
|
31
|
+
Logger.warn('[SecretsService] Matrix client not available');
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
// Fetch all room state and filter for secret index events.
|
|
35
|
+
// Matrix CS API has no endpoint to fetch all state events of a single type,
|
|
36
|
+
// so getRoomState (all state) + client-side filter is the only option.
|
|
37
|
+
const roomState = await client.mxClient.getRoomState(roomId);
|
|
38
|
+
const index = [];
|
|
39
|
+
for (const event of roomState) {
|
|
40
|
+
if (event.type !== 'ixo.room.secret.index')
|
|
41
|
+
continue;
|
|
42
|
+
// Filter out deleted entries (empty content)
|
|
43
|
+
if (!event.content || Object.keys(event.content).length === 0)
|
|
44
|
+
continue;
|
|
45
|
+
if (!event.content.eventId)
|
|
46
|
+
continue;
|
|
47
|
+
index.push({
|
|
48
|
+
name: event.state_key,
|
|
49
|
+
eventId: event.content.eventId,
|
|
50
|
+
publicKeyId: event.content.publicKeyId,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
Logger.log(`[SecretsService] Found ${index.length} secret(s) in room ${roomId}: ${index.map((e) => e.name).join(', ')}`);
|
|
54
|
+
return index;
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
Logger.error(`[SecretsService] Failed to get secret index for room ${roomId}:`, error);
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
cacheKey(roomId, name) {
|
|
62
|
+
return `secret:${roomId}:${name}`;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Load secret values from timeline events, using cache where possible.
|
|
66
|
+
* Only fetches timeline events for secrets whose eventId has changed.
|
|
67
|
+
* Stale entries (deleted secrets) expire naturally via the 24h TTL.
|
|
68
|
+
*/
|
|
69
|
+
async loadSecretValues(roomId, index) {
|
|
70
|
+
const result = {};
|
|
71
|
+
const toFetch = [];
|
|
72
|
+
for (const entry of index) {
|
|
73
|
+
const cached = await this.cacheManager?.get(this.cacheKey(roomId, entry.name));
|
|
74
|
+
if (cached && cached.eventId === entry.eventId) {
|
|
75
|
+
// Cache hit — same eventId means value hasn't changed
|
|
76
|
+
result[entry.name] = cached.value;
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
// Cache miss or eventId changed (secret was updated)
|
|
80
|
+
toFetch.push(entry);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (toFetch.length > 0) {
|
|
84
|
+
Logger.log(`[SecretsService] Fetching ${toFetch.length} secret value(s) for room ${roomId}`);
|
|
85
|
+
}
|
|
86
|
+
for (const entry of toFetch) {
|
|
87
|
+
try {
|
|
88
|
+
const event = await MatrixManager.getInstance().getEventById(roomId, entry.eventId);
|
|
89
|
+
let value = event?.content
|
|
90
|
+
?.value ?? '';
|
|
91
|
+
if (!this.encryptionKey) {
|
|
92
|
+
Logger.error(`[SecretsService] Secret "${entry.name}" is encrypted but no encryption key loaded — skipping`);
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
// TODO: Key rotation — select correct key via entry.publicKeyId
|
|
96
|
+
value = await decryptJWE(value, this.encryptionKey);
|
|
97
|
+
Logger.log(`[SecretsService] Decrypted secret "${entry.name}" (${value.length} chars)`);
|
|
98
|
+
result[entry.name] = value;
|
|
99
|
+
await this.cacheManager?.set(this.cacheKey(roomId, entry.name), { value, eventId: entry.eventId }, TWENTY_FOUR_HOURS);
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
Logger.error(`[SecretsService] Failed to fetch/decrypt secret "${entry.name}" (event ${entry.eventId}):`, error);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return result;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-session.dto.d.ts","sourceRoot":"","sources":["../../../../src/modules/sessions/dto/create-session.dto.ts"],"names":[],"mappings":"AAAA,qBAAa,gBAAgB;IAC3B,GAAG,EAAG,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-session.dto.d.ts","sourceRoot":"","sources":["../../../../src/modules/sessions/dto/delete-session.dto.ts"],"names":[],"mappings":"AAAA,qBAAa,gBAAgB;IAC3B,GAAG,EAAG,MAAM,CAAC;IACb,SAAS,EAAG,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-sessions.dto.d.ts","sourceRoot":"","sources":["../../../../src/modules/sessions/dto/list-sessions.dto.ts"],"names":[],"mappings":"AAAA,qBAAa,eAAe;IAC1B,GAAG,EAAG,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { MemoryEngineService, SessionManagerService } from '@ixo/common';
|
|
2
|
+
import { ConfigService } from '@nestjs/config';
|
|
3
|
+
import { type Cache } from 'cache-manager';
|
|
4
|
+
import { MessagesService } from '../messages/messages.service.js';
|
|
5
|
+
import { UcanService } from '../ucan/ucan.service.js';
|
|
6
|
+
export interface ProcessSessionHistoryParams {
|
|
7
|
+
sessionId: string;
|
|
8
|
+
did: string;
|
|
9
|
+
oracleEntityDid: string;
|
|
10
|
+
homeServer?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class SessionHistoryProcessor {
|
|
13
|
+
private readonly messagesService;
|
|
14
|
+
private readonly memoryEngineService;
|
|
15
|
+
private readonly sessionManagerService;
|
|
16
|
+
private readonly configService;
|
|
17
|
+
private readonly cacheManager;
|
|
18
|
+
private readonly ucanService?;
|
|
19
|
+
private readonly logger;
|
|
20
|
+
constructor(messagesService: MessagesService, memoryEngineService: MemoryEngineService, sessionManagerService: SessionManagerService, configService: ConfigService, cacheManager: Cache, ucanService?: UcanService | undefined);
|
|
21
|
+
/**
|
|
22
|
+
* Process session history by sending messages to memory engine.
|
|
23
|
+
* Uses cache locking to prevent concurrent processing for the same session.
|
|
24
|
+
*/
|
|
25
|
+
processSessionHistory(params: ProcessSessionHistoryParams): Promise<void>;
|
|
26
|
+
private processSessionHistoryWithRetry;
|
|
27
|
+
private processSessionHistoryInternal;
|
|
28
|
+
/**
|
|
29
|
+
* Transform LangChain messages into the role/content shape the
|
|
30
|
+
* memory engine expects. `userSpeakerLabel` and `oracleSpeakerLabel` become
|
|
31
|
+
* the `name` (and `role`) the memory engine sees for each message — these
|
|
32
|
+
* are what graphiti's extractor will use as the speaker entity in the graph,
|
|
33
|
+
* so they MUST be meaningful identities (not the literal strings
|
|
34
|
+
* "user"/"assistant"), otherwise every fact gets pinned to a generic
|
|
35
|
+
* placeholder node.
|
|
36
|
+
*/
|
|
37
|
+
private transformMessagesToMemoryEngineFormat;
|
|
38
|
+
/**
|
|
39
|
+
* Resolve the user's display name for graphiti's speaker label. Cascade:
|
|
40
|
+
* 1. `userName` from preferences (caller passes it in — fetched once
|
|
41
|
+
* alongside agentName)
|
|
42
|
+
* 2. Matrix profile displayname (looked up via @did-…:homeServer)
|
|
43
|
+
* 3. "Me" — safe fallback because each user has their own group_id
|
|
44
|
+
* partition in graphiti, so a generic label can't collide cross-user.
|
|
45
|
+
*/
|
|
46
|
+
private resolveUserDisplayName;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=session-history-processor.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-history-processor.service.d.ts","sourceRoot":"","sources":["../../../src/modules/sessions/session-history-processor.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAKzE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,qBACa,uBAAuB;IAIhC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IACtC,OAAO,CAAC,QAAQ,CAAC,aAAa;IACP,OAAO,CAAC,QAAQ,CAAC,YAAY;IACxC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC;IAR3C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA4C;gBAGhD,eAAe,EAAE,eAAe,EAChC,mBAAmB,EAAE,mBAAmB,EACxC,qBAAqB,EAAE,qBAAqB,EAC5C,aAAa,EAAE,aAAa,EACL,YAAY,EAAE,KAAK,EAC9B,WAAW,CAAC,EAAE,WAAW,YAAA;IAGxD;;;OAGG;IACG,qBAAqB,CACzB,MAAM,EAAE,2BAA2B,GAClC,OAAO,CAAC,IAAI,CAAC;YAuBF,8BAA8B;YAiC9B,6BAA6B;IAgJ3C;;;;;;;;OAQG;IACH,OAAO,CAAC,qCAAqC;IAyD7C;;;;;;;OAOG;YACW,sBAAsB;CAwBrC"}
|