@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 @@
|
|
|
1
|
+
{"version":3,"file":"base-env-config.d.ts","sourceRoot":"","sources":["../../src/config/base-env-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAiB,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEnE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG;IACzC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,CAAC,SAAS,MAAM,kBAAkB,EACpC,GAAG,EAAE,CAAC,EACN,YAAY,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GACnC,kBAAkB,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IACrC,UAAU,CAAC,CAAC,SAAS,MAAM,kBAAkB,EAAE,GAAG,EAAE,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;CAC/E;AAmDD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,aAAa,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAChD,eAAe,CAiBjB;AAED,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { baseEnvSchema } from './base-env-schema.js';
|
|
3
|
+
/**
|
|
4
|
+
* Convert hyphen-delimited Matrix usernames (`@did-ixo-ixo1...:host`) to
|
|
5
|
+
* colon DIDs (`did:ixo:ixo1...`). Lifted verbatim from
|
|
6
|
+
* `apps/app/src/utils/header.utils.ts` so the checkpointer can derive
|
|
7
|
+
* `ORACLE_DID` from `MATRIX_ORACLE_ADMIN_USER_ID` without depending on
|
|
8
|
+
* the AuthModule (which lives in a parallel relocation task).
|
|
9
|
+
*/
|
|
10
|
+
function normalizeDid(input) {
|
|
11
|
+
const username = input.split(':')[0] ?? '';
|
|
12
|
+
const parts = username.split('-');
|
|
13
|
+
if (parts.length < 3 || parts[0] !== '@did') {
|
|
14
|
+
throw new Error(`Invalid DID format: ${input}`);
|
|
15
|
+
}
|
|
16
|
+
const namespace = parts[1];
|
|
17
|
+
const identifier = parts.slice(2).join('-');
|
|
18
|
+
return `did:${namespace}:${identifier}`;
|
|
19
|
+
}
|
|
20
|
+
let _singleton;
|
|
21
|
+
function singletonConfigService() {
|
|
22
|
+
if (!_singleton) {
|
|
23
|
+
const parsed = baseEnvSchema.safeParse(process.env);
|
|
24
|
+
const baseVars = parsed.success
|
|
25
|
+
? parsed.data
|
|
26
|
+
: process.env;
|
|
27
|
+
let oracleDid;
|
|
28
|
+
const matrixUserId = typeof process.env.MATRIX_ORACLE_ADMIN_USER_ID === 'string'
|
|
29
|
+
? process.env.MATRIX_ORACLE_ADMIN_USER_ID
|
|
30
|
+
: undefined;
|
|
31
|
+
if (matrixUserId) {
|
|
32
|
+
try {
|
|
33
|
+
oracleDid = normalizeDid(matrixUserId);
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
// Leave ORACLE_DID unset; getOrThrow callers will fail loudly.
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const merged = {
|
|
40
|
+
...baseVars,
|
|
41
|
+
...(oracleDid ? { ORACLE_DID: oracleDid } : {}),
|
|
42
|
+
};
|
|
43
|
+
_singleton = new ConfigService(merged);
|
|
44
|
+
}
|
|
45
|
+
return _singleton;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Returns a `BaseEnvAccessor` backed by the supplied `ConfigService`
|
|
49
|
+
* (when called from inside a Nest DI scope) or by the lazily-built
|
|
50
|
+
* singleton seeded from `process.env`.
|
|
51
|
+
*
|
|
52
|
+
* Test helpers can call `resetBaseEnvConfigForTesting()` to clear the
|
|
53
|
+
* singleton between cases.
|
|
54
|
+
*/
|
|
55
|
+
export function getBaseEnvConfig(configService) {
|
|
56
|
+
const svc = configService ?? singletonConfigService();
|
|
57
|
+
return {
|
|
58
|
+
get(key, defaultValue) {
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
60
|
+
return svc.get(key, defaultValue);
|
|
61
|
+
},
|
|
62
|
+
getOrThrow(key) {
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
64
|
+
return svc.getOrThrow(key);
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export function resetBaseEnvConfigForTesting() {
|
|
69
|
+
_singleton = undefined;
|
|
70
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Tier-0 (core) environment variables. Always required by the runtime
|
|
4
|
+
* regardless of which plugins are installed.
|
|
5
|
+
*
|
|
6
|
+
* Plugin-owned env vars (Composio, Slack, Memory, Firecrawl, Domain Indexer,
|
|
7
|
+
* Sandbox, Skills, Credits/Subscription, Tasks/Redis) are NOT declared here —
|
|
8
|
+
* each plugin contributes its own `configSchema` which the boot composer
|
|
9
|
+
* extends onto this base schema at runtime.
|
|
10
|
+
*
|
|
11
|
+
* `LANGSMITH_*` keys are declared here because LangChain auto-wires tracing
|
|
12
|
+
* when they are present in `process.env`; the runtime never reads them
|
|
13
|
+
* directly, but documenting them in the base schema makes them visible to
|
|
14
|
+
* `qiforge env` / inspect tooling.
|
|
15
|
+
*
|
|
16
|
+
* Field names match today's `apps/app/src/config.ts` exactly so existing
|
|
17
|
+
* `.env` files keep working without renames.
|
|
18
|
+
*/
|
|
19
|
+
export declare const baseEnvSchema: z.ZodObject<{
|
|
20
|
+
NODE_ENV: z.ZodDefault<z.ZodEnum<{
|
|
21
|
+
development: "development";
|
|
22
|
+
production: "production";
|
|
23
|
+
test: "test";
|
|
24
|
+
}>>;
|
|
25
|
+
PORT: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
26
|
+
ORACLE_NAME: z.ZodString;
|
|
27
|
+
CORS_ORIGIN: z.ZodDefault<z.ZodString>;
|
|
28
|
+
NETWORK: z.ZodEnum<{
|
|
29
|
+
mainnet: "mainnet";
|
|
30
|
+
testnet: "testnet";
|
|
31
|
+
devnet: "devnet";
|
|
32
|
+
}>;
|
|
33
|
+
MATRIX_BASE_URL: z.ZodString;
|
|
34
|
+
MATRIX_RECOVERY_PHRASE: z.ZodString;
|
|
35
|
+
MATRIX_STORE_PATH: z.ZodDefault<z.ZodString>;
|
|
36
|
+
MATRIX_ORACLE_ADMIN_USER_ID: z.ZodString;
|
|
37
|
+
MATRIX_ORACLE_ADMIN_PASSWORD: z.ZodString;
|
|
38
|
+
MATRIX_ORACLE_ADMIN_ACCESS_TOKEN: z.ZodString;
|
|
39
|
+
MATRIX_ACCOUNT_ROOM_ID: z.ZodString;
|
|
40
|
+
MATRIX_VALUE_PIN: z.ZodString;
|
|
41
|
+
SQLITE_DATABASE_PATH: z.ZodString;
|
|
42
|
+
BLOCKSYNC_GRAPHQL_URL: z.ZodString;
|
|
43
|
+
ORACLE_DID: z.ZodString;
|
|
44
|
+
ORACLE_ENTITY_DID: z.ZodString;
|
|
45
|
+
SECP_MNEMONIC: z.ZodString;
|
|
46
|
+
RPC_URL: z.ZodString;
|
|
47
|
+
LLM_PROVIDER: z.ZodDefault<z.ZodEnum<{
|
|
48
|
+
openrouter: "openrouter";
|
|
49
|
+
nebius: "nebius";
|
|
50
|
+
}>>;
|
|
51
|
+
OPENAI_API_KEY: z.ZodOptional<z.ZodString>;
|
|
52
|
+
OPEN_ROUTER_API_KEY: z.ZodOptional<z.ZodString>;
|
|
53
|
+
NEBIUS_API_KEY: z.ZodOptional<z.ZodString>;
|
|
54
|
+
ORACLE_SECRETS: z.ZodDefault<z.ZodString>;
|
|
55
|
+
LIVE_AGENT_AUTH_API_KEY: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
56
|
+
LANGSMITH_TRACING: z.ZodOptional<z.ZodString>;
|
|
57
|
+
LANGSMITH_API_KEY: z.ZodOptional<z.ZodString>;
|
|
58
|
+
LANGSMITH_PROJECT: z.ZodOptional<z.ZodString>;
|
|
59
|
+
LANGSMITH_ENDPOINT: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
export type BaseEnv = z.infer<typeof baseEnvSchema>;
|
|
62
|
+
/**
|
|
63
|
+
* Cross-field check the merged schema cannot express on its own (we keep the
|
|
64
|
+
* base schema as a `ZodObject` so plugins can still `.extend()` on top of it
|
|
65
|
+
* via the schema composer).
|
|
66
|
+
*
|
|
67
|
+
* Enforces that the API key for the selected `LLM_PROVIDER` is set —
|
|
68
|
+
* otherwise the runtime would boot fine and every model call would fail at
|
|
69
|
+
* request time with a generic upstream 401. Returns a list of structured
|
|
70
|
+
* errors in the same shape as the schema composer's so they slot into the
|
|
71
|
+
* existing boot-error reporter without special-casing.
|
|
72
|
+
*/
|
|
73
|
+
export declare function validateLlmProviderKey(env: Record<string, unknown>): Array<{
|
|
74
|
+
field: string;
|
|
75
|
+
message: string;
|
|
76
|
+
}>;
|
|
77
|
+
//# sourceMappingURL=base-env-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-env-schema.d.ts","sourceRoot":"","sources":["../../src/config/base-env-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsDxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CA0B3C"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Tier-0 (core) environment variables. Always required by the runtime
|
|
4
|
+
* regardless of which plugins are installed.
|
|
5
|
+
*
|
|
6
|
+
* Plugin-owned env vars (Composio, Slack, Memory, Firecrawl, Domain Indexer,
|
|
7
|
+
* Sandbox, Skills, Credits/Subscription, Tasks/Redis) are NOT declared here —
|
|
8
|
+
* each plugin contributes its own `configSchema` which the boot composer
|
|
9
|
+
* extends onto this base schema at runtime.
|
|
10
|
+
*
|
|
11
|
+
* `LANGSMITH_*` keys are declared here because LangChain auto-wires tracing
|
|
12
|
+
* when they are present in `process.env`; the runtime never reads them
|
|
13
|
+
* directly, but documenting them in the base schema makes them visible to
|
|
14
|
+
* `qiforge env` / inspect tooling.
|
|
15
|
+
*
|
|
16
|
+
* Field names match today's `apps/app/src/config.ts` exactly so existing
|
|
17
|
+
* `.env` files keep working without renames.
|
|
18
|
+
*/
|
|
19
|
+
export const baseEnvSchema = z.object({
|
|
20
|
+
// Runtime
|
|
21
|
+
NODE_ENV: z
|
|
22
|
+
.enum(['development', 'production', 'test'])
|
|
23
|
+
.default('development'),
|
|
24
|
+
PORT: z.coerce.number().default(3000),
|
|
25
|
+
ORACLE_NAME: z.string(),
|
|
26
|
+
CORS_ORIGIN: z.string().default('*'),
|
|
27
|
+
NETWORK: z.enum(['mainnet', 'testnet', 'devnet']),
|
|
28
|
+
// Matrix
|
|
29
|
+
MATRIX_BASE_URL: z.string(),
|
|
30
|
+
MATRIX_RECOVERY_PHRASE: z.string(),
|
|
31
|
+
MATRIX_STORE_PATH: z.string().default('./matrix-storage'),
|
|
32
|
+
MATRIX_ORACLE_ADMIN_USER_ID: z.string(),
|
|
33
|
+
MATRIX_ORACLE_ADMIN_PASSWORD: z.string(),
|
|
34
|
+
MATRIX_ORACLE_ADMIN_ACCESS_TOKEN: z.string(),
|
|
35
|
+
MATRIX_ACCOUNT_ROOM_ID: z.string(),
|
|
36
|
+
MATRIX_VALUE_PIN: z.string(),
|
|
37
|
+
// Storage paths
|
|
38
|
+
SQLITE_DATABASE_PATH: z.string(),
|
|
39
|
+
// Blocksync / chain
|
|
40
|
+
BLOCKSYNC_GRAPHQL_URL: z.string(),
|
|
41
|
+
/**
|
|
42
|
+
* The oracle's own DID (`did:ixo:ixo1...`). Distinct from the
|
|
43
|
+
* `ORACLE_ENTITY_DID` (entity record on chain). Used by UcanService as
|
|
44
|
+
* the signer identity when minting downstream-service invocations.
|
|
45
|
+
*/
|
|
46
|
+
ORACLE_DID: z.string(),
|
|
47
|
+
ORACLE_ENTITY_DID: z.string(),
|
|
48
|
+
SECP_MNEMONIC: z.string(),
|
|
49
|
+
RPC_URL: z.string(),
|
|
50
|
+
// LLM provider selection (provider-specific keys are optional so a fork
|
|
51
|
+
// can choose between OpenRouter and Nebius without setting both).
|
|
52
|
+
LLM_PROVIDER: z.enum(['openrouter', 'nebius']).default('openrouter'),
|
|
53
|
+
OPENAI_API_KEY: z.string().optional(),
|
|
54
|
+
OPEN_ROUTER_API_KEY: z.string().optional(),
|
|
55
|
+
NEBIUS_API_KEY: z.string().optional(),
|
|
56
|
+
// Operator-defined secrets surfaced to capabilities as `x-os-*` headers.
|
|
57
|
+
// Format: `KEY1=value1,KEY2=value2`. Defaults to empty.
|
|
58
|
+
ORACLE_SECRETS: z.string().default(''),
|
|
59
|
+
// Live agent auth
|
|
60
|
+
LIVE_AGENT_AUTH_API_KEY: z.string().optional().default(''),
|
|
61
|
+
// LangSmith tracing — auto-wired by LangChain when these are set. Optional.
|
|
62
|
+
LANGSMITH_TRACING: z.string().optional(),
|
|
63
|
+
LANGSMITH_API_KEY: z.string().optional(),
|
|
64
|
+
LANGSMITH_PROJECT: z.string().optional(),
|
|
65
|
+
LANGSMITH_ENDPOINT: z.string().optional(),
|
|
66
|
+
});
|
|
67
|
+
/**
|
|
68
|
+
* Cross-field check the merged schema cannot express on its own (we keep the
|
|
69
|
+
* base schema as a `ZodObject` so plugins can still `.extend()` on top of it
|
|
70
|
+
* via the schema composer).
|
|
71
|
+
*
|
|
72
|
+
* Enforces that the API key for the selected `LLM_PROVIDER` is set —
|
|
73
|
+
* otherwise the runtime would boot fine and every model call would fail at
|
|
74
|
+
* request time with a generic upstream 401. Returns a list of structured
|
|
75
|
+
* errors in the same shape as the schema composer's so they slot into the
|
|
76
|
+
* existing boot-error reporter without special-casing.
|
|
77
|
+
*/
|
|
78
|
+
export function validateLlmProviderKey(env) {
|
|
79
|
+
const errors = [];
|
|
80
|
+
const provider = env.LLM_PROVIDER;
|
|
81
|
+
if (provider === 'nebius') {
|
|
82
|
+
const key = env.NEBIUS_API_KEY;
|
|
83
|
+
if (typeof key !== 'string' || key.length === 0) {
|
|
84
|
+
errors.push({
|
|
85
|
+
field: 'NEBIUS_API_KEY',
|
|
86
|
+
message: "LLM provider 'nebius' selected via LLM_PROVIDER but NEBIUS_API_KEY is not set. " +
|
|
87
|
+
'Set NEBIUS_API_KEY, or switch LLM_PROVIDER to openrouter and set OPEN_ROUTER_API_KEY.',
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return errors;
|
|
91
|
+
}
|
|
92
|
+
// Default (openrouter) — selected when LLM_PROVIDER is unset or 'openrouter'.
|
|
93
|
+
const key = env.OPEN_ROUTER_API_KEY;
|
|
94
|
+
if (typeof key !== 'string' || key.length === 0) {
|
|
95
|
+
errors.push({
|
|
96
|
+
field: 'OPEN_ROUTER_API_KEY',
|
|
97
|
+
message: "LLM provider 'openrouter' selected via LLM_PROVIDER but OPEN_ROUTER_API_KEY is not set. " +
|
|
98
|
+
'Set OPEN_ROUTER_API_KEY, or switch LLM_PROVIDER to nebius and set NEBIUS_API_KEY.',
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
return errors;
|
|
102
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ActionCallEventPayload, BrowserToolCallEventPayload, MessageCacheInvalidationPayload, ReasoningEventPayload, RenderComponentEventPayload, RouterEventPayload, ToolCallEventPayload } from '../plugin-api/types.js';
|
|
2
|
+
import type { EmitAdapter } from '../runtime-context/ambient.js';
|
|
3
|
+
/** Identity of the current request — every emitted event carries these. */
|
|
4
|
+
export interface ScopeKeys {
|
|
5
|
+
sessionId: string;
|
|
6
|
+
requestId: string;
|
|
7
|
+
}
|
|
8
|
+
/** The seven typed emitter methods a RuntimeContext exposes via `ctx.emit`. */
|
|
9
|
+
export interface ScopedEmitter {
|
|
10
|
+
toolCall(payload: ToolCallEventPayload): void;
|
|
11
|
+
actionCall(payload: ActionCallEventPayload): void;
|
|
12
|
+
renderComponent(payload: RenderComponentEventPayload): void;
|
|
13
|
+
reasoning(payload: ReasoningEventPayload): void;
|
|
14
|
+
browserToolCall(payload: BrowserToolCallEventPayload): void;
|
|
15
|
+
router(payload: RouterEventPayload): void;
|
|
16
|
+
messageCacheInvalidation(payload: MessageCacheInvalidationPayload): void;
|
|
17
|
+
}
|
|
18
|
+
/** Event names exposed by `@ixo/oracles-events`. */
|
|
19
|
+
export declare const EVENT_NAMES: {
|
|
20
|
+
readonly toolCall: "tool_call";
|
|
21
|
+
readonly actionCall: "action_call";
|
|
22
|
+
readonly renderComponent: "render_component";
|
|
23
|
+
readonly reasoning: "reasoning";
|
|
24
|
+
readonly browserToolCall: "browser_tool_call";
|
|
25
|
+
readonly router: "router.update";
|
|
26
|
+
readonly messageCacheInvalidation: "message_cache_invalidation";
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Build a scoped emitter that injects the current `sessionId`/`requestId`
|
|
30
|
+
* onto every emitted payload before forwarding to the underlying sink.
|
|
31
|
+
*/
|
|
32
|
+
export declare function createScopedEmitter(scope: ScopeKeys, sink: EmitAdapter): ScopedEmitter;
|
|
33
|
+
//# sourceMappingURL=scoped-emitter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scoped-emitter.d.ts","sourceRoot":"","sources":["../../src/events/scoped-emitter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,+BAA+B,EAC/B,qBAAqB,EACrB,2BAA2B,EAC3B,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,WAAW,EAEZ,MAAM,+BAA+B,CAAC;AAEvC,2EAA2E;AAC3E,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,+EAA+E;AAC/E,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC9C,UAAU,CAAC,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAClD,eAAe,CAAC,OAAO,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAC5D,SAAS,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAChD,eAAe,CAAC,OAAO,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAC5D,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC1C,wBAAwB,CAAC,OAAO,EAAE,+BAA+B,GAAG,IAAI,CAAC;CAC1E;AAED,oDAAoD;AACpD,eAAO,MAAM,WAAW;;;;;;;;CAQd,CAAC;AAEX;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,WAAW,GAChB,aAAa,CAmBf"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Event names exposed by `@ixo/oracles-events`. */
|
|
2
|
+
export const EVENT_NAMES = {
|
|
3
|
+
toolCall: 'tool_call',
|
|
4
|
+
actionCall: 'action_call',
|
|
5
|
+
renderComponent: 'render_component',
|
|
6
|
+
reasoning: 'reasoning',
|
|
7
|
+
browserToolCall: 'browser_tool_call',
|
|
8
|
+
router: 'router.update',
|
|
9
|
+
messageCacheInvalidation: 'message_cache_invalidation',
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Build a scoped emitter that injects the current `sessionId`/`requestId`
|
|
13
|
+
* onto every emitted payload before forwarding to the underlying sink.
|
|
14
|
+
*/
|
|
15
|
+
export function createScopedEmitter(scope, sink) {
|
|
16
|
+
const send = (eventName, payload) => {
|
|
17
|
+
sink.emit(eventName, {
|
|
18
|
+
...payload,
|
|
19
|
+
sessionId: scope.sessionId,
|
|
20
|
+
requestId: scope.requestId,
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
toolCall: (payload) => send(EVENT_NAMES.toolCall, payload),
|
|
25
|
+
actionCall: (payload) => send(EVENT_NAMES.actionCall, payload),
|
|
26
|
+
renderComponent: (payload) => send(EVENT_NAMES.renderComponent, payload),
|
|
27
|
+
reasoning: (payload) => send(EVENT_NAMES.reasoning, payload),
|
|
28
|
+
browserToolCall: (payload) => send(EVENT_NAMES.browserToolCall, payload),
|
|
29
|
+
router: (payload) => send(EVENT_NAMES.router, payload),
|
|
30
|
+
messageCacheInvalidation: (payload) => send(EVENT_NAMES.messageCacheInvalidation, payload),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { createSubagentAsTool, type AgentSpec, type SubagentToolOptions, } from './subagent-as-tool.js';
|
|
2
|
+
export * from './middlewares/index.js';
|
|
3
|
+
export { createMainAgent, MainAgentGraphState, type CompiledMainAgent, type MainAgentArgs, type MainAgentHooks, type MainAgentRegistries, type MainAgentRequestContext, type TMainAgentGraphState, } from './main-agent.js';
|
|
4
|
+
export { composePrompt, formatTimeContext, formatUserPreferences, buildOracleSection, SLACK_FORMATTING_CONSTRAINTS_CONTENT, type ComposePromptInput, } from './prompt-composer.js';
|
|
5
|
+
export { collectSubAgentsWithFallback, type CollectSubAgentsInput, } from './sub-agent-fallback.js';
|
|
6
|
+
export { wrapPluginTool, type WrapPluginToolOptions, } from './wrap-plugin-tool.js';
|
|
7
|
+
export { type UserPreferences, type BrowserToolCall, type AgAction, } from './state.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/graph/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,KAAK,SAAS,EACd,KAAK,mBAAmB,GACzB,MAAM,uBAAuB,CAAC;AAE/B,cAAc,wBAAwB,CAAC;AAEvC,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,GAC1B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,oCAAoC,EACpC,KAAK,kBAAkB,GACxB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,4BAA4B,EAC5B,KAAK,qBAAqB,GAC3B,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,cAAc,EACd,KAAK,qBAAqB,GAC3B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,QAAQ,GACd,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { createSubagentAsTool, } from './subagent-as-tool.js';
|
|
2
|
+
export * from './middlewares/index.js';
|
|
3
|
+
export { createMainAgent, MainAgentGraphState, } from './main-agent.js';
|
|
4
|
+
export { composePrompt, formatTimeContext, formatUserPreferences, buildOracleSection, SLACK_FORMATTING_CONSTRAINTS_CONTENT, } from './prompt-composer.js';
|
|
5
|
+
export { collectSubAgentsWithFallback, } from './sub-agent-fallback.js';
|
|
6
|
+
export { wrapPluginTool, } from './wrap-plugin-tool.js';
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { BaseChatModel } from '@langchain/core/language_models/chat_models';
|
|
2
|
+
import type { BaseCheckpointSaver } from '@langchain/langgraph';
|
|
3
|
+
import type { ReactAgent } from 'langchain';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import type { ChatOpenAIFields, MergedConfig, ModelRole, OracleIdentity } from '../plugin-api/types.js';
|
|
6
|
+
import type { ConfigSchemaRegistry } from '../registries/config-schema-registry.js';
|
|
7
|
+
import type { ManifestRegistry } from '../registries/manifest-registry.js';
|
|
8
|
+
import type { MiddlewareRegistry } from '../registries/middleware-registry.js';
|
|
9
|
+
import type { SharedStateRegistry } from '../registries/shared-state-registry.js';
|
|
10
|
+
import type { SubAgentRegistry } from '../registries/subagent-registry.js';
|
|
11
|
+
import type { ToolRegistry } from '../registries/tool-registry.js';
|
|
12
|
+
import type { AmbientServices } from '../runtime-context/ambient.js';
|
|
13
|
+
import type { TMainAgentGraphState } from './state.js';
|
|
14
|
+
/** The 6 internal registries the runtime composes. */
|
|
15
|
+
export interface MainAgentRegistries {
|
|
16
|
+
tools: ToolRegistry;
|
|
17
|
+
subAgents: SubAgentRegistry;
|
|
18
|
+
middlewares: MiddlewareRegistry;
|
|
19
|
+
manifests: ManifestRegistry;
|
|
20
|
+
configSchema: ConfigSchemaRegistry;
|
|
21
|
+
sharedState: SharedStateRegistry;
|
|
22
|
+
}
|
|
23
|
+
export declare const mainAgentRequestContextSchema: z.ZodObject<{
|
|
24
|
+
user: z.ZodObject<{
|
|
25
|
+
did: z.ZodString;
|
|
26
|
+
matrixUserId: z.ZodString;
|
|
27
|
+
ucanDelegation: z.ZodAny;
|
|
28
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
29
|
+
currentTime: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
session: z.ZodObject<{
|
|
32
|
+
id: z.ZodString;
|
|
33
|
+
client: z.ZodEnum<{
|
|
34
|
+
portal: "portal";
|
|
35
|
+
matrix: "matrix";
|
|
36
|
+
slack: "slack";
|
|
37
|
+
}>;
|
|
38
|
+
requestId: z.ZodString;
|
|
39
|
+
wsId: z.ZodOptional<z.ZodString>;
|
|
40
|
+
roomId: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
history: z.ZodObject<{
|
|
43
|
+
userContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
/** Per-request shape — exposes only what the main-agent build needs. */
|
|
47
|
+
export type MainAgentRequestContext = z.infer<typeof mainAgentRequestContextSchema>;
|
|
48
|
+
/**
|
|
49
|
+
* Optional hooks the consuming app provides to keep platform-specific behaviour
|
|
50
|
+
* (model selection, checkpointer wiring, secret injection) out of the runtime.
|
|
51
|
+
*
|
|
52
|
+
* Sandbox-tool secret-wrapping (today: `wrappedSandboxTools`) deliberately
|
|
53
|
+
* lives outside this hook surface — the sandbox plugin owns it once it lands.
|
|
54
|
+
*/
|
|
55
|
+
export interface MainAgentHooks {
|
|
56
|
+
/** Resolve a checkpointer for a user. Mirrors apps/app's per-user SQLite store. */
|
|
57
|
+
checkpointerForUser?: (userDid: string) => Promise<BaseCheckpointSaver>;
|
|
58
|
+
/** Optional model resolver. Default: `ambient.llm.get('main')`. */
|
|
59
|
+
resolveModel?: (role: ModelRole, params?: ChatOpenAIFields) => ReturnType<AmbientServices['llm']['get']>;
|
|
60
|
+
/** Look up a human-readable page title for the page-context middleware. */
|
|
61
|
+
getRoomTitle?: (roomId: string) => Promise<string | undefined>;
|
|
62
|
+
/** Cheap classification model used by the safety-guardrail middleware. */
|
|
63
|
+
safetyModel?: BaseChatModel;
|
|
64
|
+
/** Tool names whose `ToolMessage` outputs should be stripped between turns. */
|
|
65
|
+
validationSkipToolNames?: string[];
|
|
66
|
+
/** Operational-mode block — overridden when a richer mode applies. */
|
|
67
|
+
operationalMode?: string;
|
|
68
|
+
/** Editor block — populated by the editor plugin. */
|
|
69
|
+
editorSection?: string;
|
|
70
|
+
/** Composio guidance block — populated by the composio plugin. */
|
|
71
|
+
composioContext?: string;
|
|
72
|
+
/** Per-key secret bullet list (e.g. `- _USER_SECRET_FOO`). */
|
|
73
|
+
userSecretsContext?: string;
|
|
74
|
+
/** Degraded-services notice appended to the system prompt body. */
|
|
75
|
+
degradedServicesBlock?: string;
|
|
76
|
+
}
|
|
77
|
+
export interface MainAgentArgs {
|
|
78
|
+
registries: MainAgentRegistries;
|
|
79
|
+
identity: OracleIdentity;
|
|
80
|
+
config: MergedConfig;
|
|
81
|
+
requestCtx: MainAgentRequestContext;
|
|
82
|
+
ambient: AmbientServices;
|
|
83
|
+
state: Partial<TMainAgentGraphState>;
|
|
84
|
+
availablePlugins: ReadonlySet<string>;
|
|
85
|
+
hooks?: MainAgentHooks;
|
|
86
|
+
}
|
|
87
|
+
export type CompiledMainAgent = ReactAgent<any>;
|
|
88
|
+
//# sourceMappingURL=main-agent-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main-agent-types.d.ts","sourceRoot":"","sources":["../../src/graph/main-agent-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,cAAc,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,sDAAsD;AACtD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,WAAW,EAAE,kBAAkB,CAAC;IAChC,SAAS,EAAE,gBAAgB,CAAC;IAC5B,YAAY,EAAE,oBAAoB,CAAC;IACnC,WAAW,EAAE,mBAAmB,CAAC;CAClC;AAED,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;iBAkBxC,CAAC;AACH,wEAAwE;AACxE,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,mFAAmF;IACnF,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACxE,mEAAmE;IACnE,YAAY,CAAC,EAAE,CACb,IAAI,EAAE,SAAS,EACf,MAAM,CAAC,EAAE,gBAAgB,KACtB,UAAU,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/C,2EAA2E;IAC3E,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC/D,0EAA0E;IAC1E,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,+EAA+E;IAC/E,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;IACnC,sEAAsE;IACtE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,8DAA8D;IAC9D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mEAAmE;IACnE,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,mBAAmB,CAAC;IAChC,QAAQ,EAAE,cAAc,CAAC;IACzB,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,EAAE,uBAAuB,CAAC;IACpC,OAAO,EAAE,eAAe,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACrC,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB;AAGD,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const mainAgentRequestContextSchema = z.object({
|
|
3
|
+
user: z.object({
|
|
4
|
+
did: z.string(),
|
|
5
|
+
matrixUserId: z.string(),
|
|
6
|
+
ucanDelegation: z.any(), // You may prefer a stricter schema for UCAN later.
|
|
7
|
+
timezone: z.string().optional(),
|
|
8
|
+
currentTime: z.string().optional(),
|
|
9
|
+
}),
|
|
10
|
+
session: z.object({
|
|
11
|
+
id: z.string(),
|
|
12
|
+
client: z.enum(['portal', 'matrix', 'slack']),
|
|
13
|
+
requestId: z.string(),
|
|
14
|
+
wsId: z.string().optional(),
|
|
15
|
+
roomId: z.string().optional(),
|
|
16
|
+
}),
|
|
17
|
+
history: z.object({
|
|
18
|
+
userContext: z.record(z.string(), z.unknown()).optional(),
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CompiledMainAgent, MainAgentArgs } from './main-agent-types.js';
|
|
2
|
+
import { MainAgentGraphState } from './state.js';
|
|
3
|
+
/**
|
|
4
|
+
* Build a compiled main agent from the runtime's registries plus per-request
|
|
5
|
+
* context. Replaces the legacy 1,052-line monolith — every behaviour
|
|
6
|
+
* preserved, the inlined arrays now flow from registries.
|
|
7
|
+
*
|
|
8
|
+
* Sandbox tools, MCP setup, and oracle→service UCAN minting (memory,
|
|
9
|
+
* sandbox, composio) move into the corresponding bundled plugins; this
|
|
10
|
+
* function deliberately knows nothing about them.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createMainAgent(args: MainAgentArgs): Promise<CompiledMainAgent>;
|
|
13
|
+
export { MainAgentGraphState };
|
|
14
|
+
export type { CompiledMainAgent, MainAgentArgs, MainAgentHooks, MainAgentRegistries, MainAgentRequestContext, } from './main-agent-types.js';
|
|
15
|
+
export type { TMainAgentGraphState } from './state.js';
|
|
16
|
+
//# sourceMappingURL=main-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main-agent.d.ts","sourceRoot":"","sources":["../../src/graph/main-agent.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAc9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AA0CjD;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,iBAAiB,CAAC,CA0P5B;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC"}
|