@copilotkit/runtime 2.0.0-rc.6 → 2.0.0-rc.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -4
- package/dist/agent/{url-download.cjs → ai-sdk/url-download.cjs} +19 -76
- package/dist/agent/ai-sdk/url-download.cjs.map +1 -0
- package/dist/agent/{url-download.d.cts → ai-sdk/url-download.d.cts} +11 -8
- package/dist/agent/ai-sdk/url-download.d.cts.map +1 -0
- package/dist/agent/{url-download.d.mts → ai-sdk/url-download.d.mts} +11 -8
- package/dist/agent/ai-sdk/url-download.d.mts.map +1 -0
- package/dist/agent/{url-download.mjs → ai-sdk/url-download.mjs} +20 -74
- package/dist/agent/ai-sdk/url-download.mjs.map +1 -0
- package/dist/agent/ai-sdk.cjs +425 -0
- package/dist/agent/ai-sdk.cjs.map +1 -0
- package/dist/agent/ai-sdk.d.cts +119 -0
- package/dist/agent/ai-sdk.d.cts.map +1 -0
- package/dist/agent/ai-sdk.d.mts +119 -0
- package/dist/agent/ai-sdk.d.mts.map +1 -0
- package/dist/agent/ai-sdk.mjs +419 -0
- package/dist/agent/ai-sdk.mjs.map +1 -0
- package/dist/agent/classic-tools.cjs +185 -0
- package/dist/agent/classic-tools.cjs.map +1 -0
- package/dist/agent/classic-tools.mjs +183 -0
- package/dist/agent/classic-tools.mjs.map +1 -0
- package/dist/agent/converters/aisdk.cjs +17 -4
- package/dist/agent/converters/aisdk.cjs.map +1 -1
- package/dist/agent/converters/aisdk.d.cts.map +1 -1
- package/dist/agent/converters/aisdk.d.mts.map +1 -1
- package/dist/agent/converters/aisdk.mjs +18 -2
- package/dist/agent/converters/aisdk.mjs.map +1 -1
- package/dist/agent/converters/tanstack.cjs +202 -30
- package/dist/agent/converters/tanstack.cjs.map +1 -1
- package/dist/agent/converters/tanstack.d.cts +90 -6
- package/dist/agent/converters/tanstack.d.cts.map +1 -1
- package/dist/agent/converters/tanstack.d.mts +90 -6
- package/dist/agent/converters/tanstack.d.mts.map +1 -1
- package/dist/agent/converters/tanstack.mjs +202 -29
- package/dist/agent/converters/tanstack.mjs.map +1 -1
- package/dist/agent/learned-skills.cjs +15 -17
- package/dist/agent/learned-skills.cjs.map +1 -1
- package/dist/agent/learned-skills.d.cts +9 -3
- package/dist/agent/learned-skills.d.cts.map +1 -1
- package/dist/agent/learned-skills.d.mts +9 -3
- package/dist/agent/learned-skills.d.mts.map +1 -1
- package/dist/agent/learned-skills.mjs +15 -16
- package/dist/agent/learned-skills.mjs.map +1 -1
- package/dist/agent/model.cjs +42 -0
- package/dist/agent/model.cjs.map +1 -0
- package/dist/agent/model.d.cts +19 -0
- package/dist/agent/model.d.cts.map +1 -0
- package/dist/agent/model.d.mts +19 -0
- package/dist/agent/model.d.mts.map +1 -0
- package/dist/agent/model.mjs +41 -0
- package/dist/agent/model.mjs.map +1 -0
- package/dist/agent/state-delta.cjs +0 -1
- package/dist/agent/state-delta.cjs.map +1 -1
- package/dist/agent.cjs +558 -0
- package/dist/agent.cjs.map +1 -0
- package/dist/agent.d.cts +455 -0
- package/dist/agent.d.cts.map +1 -0
- package/dist/agent.d.mts +455 -0
- package/dist/agent.d.mts.map +1 -0
- package/dist/agent.mjs +551 -0
- package/dist/agent.mjs.map +1 -0
- package/dist/index.cjs +23 -28
- package/dist/index.d.cts +14 -14
- package/dist/index.d.mts +14 -14
- package/dist/index.mjs +8 -8
- package/dist/internal/learned-skills.d.cts +1 -1
- package/dist/internal/learned-skills.d.mts +1 -1
- package/dist/node.cjs +2 -3
- package/dist/node.d.cts +3 -3
- package/dist/node.d.mts +3 -3
- package/dist/node.mjs +3 -3
- package/dist/runtime/core/channel-manager.cjs +10 -2
- package/dist/runtime/core/channel-manager.cjs.map +1 -1
- package/dist/runtime/core/channel-manager.d.cts +1 -1
- package/dist/runtime/core/channel-manager.d.mts +1 -1
- package/dist/runtime/core/channel-manager.mjs +10 -1
- package/dist/runtime/core/channel-manager.mjs.map +1 -1
- package/dist/runtime/core/debug-event-bus.cjs +4 -3
- package/dist/runtime/core/debug-event-bus.cjs.map +1 -1
- package/dist/runtime/core/debug-event-bus.d.cts +5 -1
- package/dist/runtime/core/debug-event-bus.d.cts.map +1 -1
- package/dist/runtime/core/debug-event-bus.d.mts +4 -0
- package/dist/runtime/core/debug-event-bus.d.mts.map +1 -1
- package/dist/runtime/core/debug-event-bus.mjs +5 -3
- package/dist/runtime/core/debug-event-bus.mjs.map +1 -1
- package/dist/runtime/core/fetch-cors.cjs.map +1 -1
- package/dist/runtime/core/fetch-cors.d.cts +2 -2
- package/dist/runtime/core/fetch-cors.d.cts.map +1 -1
- package/dist/runtime/core/fetch-cors.d.mts +2 -2
- package/dist/runtime/core/fetch-cors.d.mts.map +1 -1
- package/dist/runtime/core/fetch-cors.mjs.map +1 -1
- package/dist/runtime/core/fetch-handler.cjs +17 -14
- package/dist/runtime/core/fetch-handler.cjs.map +1 -1
- package/dist/runtime/core/fetch-handler.d.cts +22 -14
- package/dist/runtime/core/fetch-handler.d.cts.map +1 -1
- package/dist/runtime/core/fetch-handler.d.mts +22 -14
- package/dist/runtime/core/fetch-handler.d.mts.map +1 -1
- package/dist/runtime/core/fetch-handler.mjs +9 -5
- package/dist/runtime/core/fetch-handler.mjs.map +1 -1
- package/dist/runtime/core/hooks.cjs.map +1 -1
- package/dist/runtime/core/hooks.d.cts +5 -5
- package/dist/runtime/core/hooks.d.cts.map +1 -1
- package/dist/runtime/core/hooks.d.mts +5 -5
- package/dist/runtime/core/hooks.d.mts.map +1 -1
- package/dist/runtime/core/hooks.mjs.map +1 -1
- package/dist/runtime/core/learning.cjs.map +1 -1
- package/dist/runtime/core/learning.d.cts +9 -9
- package/dist/runtime/core/learning.d.cts.map +1 -1
- package/dist/runtime/core/learning.d.mts +8 -8
- package/dist/runtime/core/learning.d.mts.map +1 -1
- package/dist/runtime/core/learning.mjs.map +1 -1
- package/dist/runtime/core/logger.cjs +105 -14
- package/dist/runtime/core/logger.cjs.map +1 -1
- package/dist/runtime/core/logger.d.cts +26 -9
- package/dist/runtime/core/logger.d.cts.map +1 -1
- package/dist/runtime/core/logger.d.mts +26 -9
- package/dist/runtime/core/logger.d.mts.map +1 -1
- package/dist/runtime/core/logger.mjs +105 -12
- package/dist/runtime/core/logger.mjs.map +1 -1
- package/dist/runtime/core/middleware-sse-parser.cjs +3 -4
- package/dist/runtime/core/middleware-sse-parser.cjs.map +1 -1
- package/dist/runtime/core/middleware-sse-parser.d.cts.map +1 -1
- package/dist/runtime/core/middleware-sse-parser.d.mts.map +1 -1
- package/dist/runtime/core/middleware-sse-parser.mjs +2 -2
- package/dist/runtime/core/middleware-sse-parser.mjs.map +1 -1
- package/dist/runtime/core/middleware.cjs +5 -5
- package/dist/runtime/core/middleware.cjs.map +1 -1
- package/dist/runtime/core/middleware.d.cts +3 -3
- package/dist/runtime/core/middleware.d.cts.map +1 -1
- package/dist/runtime/core/middleware.d.mts +3 -3
- package/dist/runtime/core/middleware.d.mts.map +1 -1
- package/dist/runtime/core/middleware.mjs +4 -3
- package/dist/runtime/core/middleware.mjs.map +1 -1
- package/dist/runtime/core/package-info.cjs +1 -1
- package/dist/runtime/core/package-info.mjs +1 -1
- package/dist/runtime/core/runtime-error-reporter.cjs.map +1 -1
- package/dist/runtime/core/runtime-error-reporter.mjs.map +1 -1
- package/dist/runtime/core/runtime.cjs +44 -46
- package/dist/runtime/core/runtime.cjs.map +1 -1
- package/dist/runtime/core/runtime.d.cts +178 -91
- package/dist/runtime/core/runtime.d.cts.map +1 -1
- package/dist/runtime/core/runtime.d.mts +178 -91
- package/dist/runtime/core/runtime.d.mts.map +1 -1
- package/dist/runtime/core/runtime.mjs +42 -42
- package/dist/runtime/core/runtime.mjs.map +1 -1
- package/dist/runtime/endpoints/auto-start-channels.cjs +3 -4
- package/dist/runtime/endpoints/auto-start-channels.cjs.map +1 -1
- package/dist/runtime/endpoints/auto-start-channels.mjs +2 -2
- package/dist/runtime/endpoints/auto-start-channels.mjs.map +1 -1
- package/dist/runtime/endpoints/node-fetch-handler.cjs +4 -8
- package/dist/runtime/endpoints/node-fetch-handler.cjs.map +1 -1
- package/dist/runtime/endpoints/node-fetch-handler.d.cts +4 -5
- package/dist/runtime/endpoints/node-fetch-handler.d.cts.map +1 -1
- package/dist/runtime/endpoints/node-fetch-handler.d.mts +4 -5
- package/dist/runtime/endpoints/node-fetch-handler.d.mts.map +1 -1
- package/dist/runtime/endpoints/node-fetch-handler.mjs +3 -5
- package/dist/runtime/endpoints/node-fetch-handler.mjs.map +1 -1
- package/dist/runtime/endpoints/node.cjs +7 -5
- package/dist/runtime/endpoints/node.cjs.map +1 -1
- package/dist/runtime/endpoints/node.d.cts +16 -16
- package/dist/runtime/endpoints/node.d.cts.map +1 -1
- package/dist/runtime/endpoints/node.d.mts +16 -16
- package/dist/runtime/endpoints/node.d.mts.map +1 -1
- package/dist/runtime/endpoints/node.mjs +9 -7
- package/dist/runtime/endpoints/node.mjs.map +1 -1
- package/dist/runtime/event-transforms/index.d.cts +4 -0
- package/dist/runtime/event-transforms/index.d.mts +4 -0
- package/dist/runtime/event-transforms/index.mjs +5 -0
- package/dist/runtime/event-transforms/open-generative-ui-middleware.cjs +277 -0
- package/dist/runtime/event-transforms/open-generative-ui-middleware.cjs.map +1 -0
- package/dist/runtime/event-transforms/open-generative-ui-middleware.d.cts +61 -0
- package/dist/runtime/event-transforms/open-generative-ui-middleware.d.cts.map +1 -0
- package/dist/runtime/event-transforms/open-generative-ui-middleware.d.mts +61 -0
- package/dist/runtime/event-transforms/open-generative-ui-middleware.d.mts.map +1 -0
- package/dist/runtime/event-transforms/open-generative-ui-middleware.mjs +276 -0
- package/dist/runtime/event-transforms/open-generative-ui-middleware.mjs.map +1 -0
- package/dist/runtime/event-transforms/recorded-events.cjs +68 -0
- package/dist/runtime/event-transforms/recorded-events.cjs.map +1 -0
- package/dist/runtime/event-transforms/recorded-events.d.cts +27 -0
- package/dist/runtime/event-transforms/recorded-events.d.cts.map +1 -0
- package/dist/runtime/event-transforms/recorded-events.d.mts +27 -0
- package/dist/runtime/event-transforms/recorded-events.d.mts.map +1 -0
- package/dist/runtime/event-transforms/recorded-events.mjs +68 -0
- package/dist/runtime/event-transforms/recorded-events.mjs.map +1 -0
- package/dist/runtime/event-transforms/streaming-json-scanner.cjs +289 -0
- package/dist/runtime/event-transforms/streaming-json-scanner.cjs.map +1 -0
- package/dist/runtime/event-transforms/streaming-json-scanner.mjs +288 -0
- package/dist/runtime/event-transforms/streaming-json-scanner.mjs.map +1 -0
- package/dist/runtime/generative-ui/a2ui-v09-actions.cjs +106 -0
- package/dist/runtime/generative-ui/a2ui-v09-actions.cjs.map +1 -0
- package/dist/runtime/generative-ui/a2ui-v09-actions.mjs +106 -0
- package/dist/runtime/generative-ui/a2ui-v09-actions.mjs.map +1 -0
- package/dist/runtime/generative-ui/a2ui-v09-catalog.cjs +422 -0
- package/dist/runtime/generative-ui/a2ui-v09-catalog.cjs.map +1 -0
- package/dist/runtime/generative-ui/a2ui-v09-catalog.mjs +422 -0
- package/dist/runtime/generative-ui/a2ui-v09-catalog.mjs.map +1 -0
- package/dist/runtime/generative-ui/a2ui-v09-middleware.cjs +84 -0
- package/dist/runtime/generative-ui/a2ui-v09-middleware.cjs.map +1 -0
- package/dist/runtime/generative-ui/a2ui-v09-middleware.d.cts +41 -0
- package/dist/runtime/generative-ui/a2ui-v09-middleware.d.cts.map +1 -0
- package/dist/runtime/generative-ui/a2ui-v09-middleware.d.mts +41 -0
- package/dist/runtime/generative-ui/a2ui-v09-middleware.d.mts.map +1 -0
- package/dist/runtime/generative-ui/a2ui-v09-middleware.mjs +83 -0
- package/dist/runtime/generative-ui/a2ui-v09-middleware.mjs.map +1 -0
- package/dist/runtime/generative-ui/a2ui-v09-operations.cjs +694 -0
- package/dist/runtime/generative-ui/a2ui-v09-operations.cjs.map +1 -0
- package/dist/runtime/generative-ui/a2ui-v09-operations.mjs +694 -0
- package/dist/runtime/generative-ui/a2ui-v09-operations.mjs.map +1 -0
- package/dist/runtime/generative-ui/generative-ui-middleware.cjs +0 -1
- package/dist/runtime/generative-ui/generative-ui-middleware.cjs.map +1 -1
- package/dist/runtime/generative-ui/index.d.cts +1 -0
- package/dist/runtime/generative-ui/index.d.mts +1 -0
- package/dist/runtime/generative-ui/surface-writer.cjs +4 -5
- package/dist/runtime/generative-ui/surface-writer.cjs.map +1 -1
- package/dist/runtime/generative-ui/surface-writer.d.cts +1 -1
- package/dist/runtime/generative-ui/surface-writer.d.cts.map +1 -1
- package/dist/runtime/generative-ui/surface-writer.d.mts.map +1 -1
- package/dist/runtime/generative-ui/surface-writer.mjs +5 -5
- package/dist/runtime/generative-ui/surface-writer.mjs.map +1 -1
- package/dist/runtime/handlers/get-runtime-info.cjs +24 -6
- package/dist/runtime/handlers/get-runtime-info.cjs.map +1 -1
- package/dist/runtime/handlers/get-runtime-info.mjs +25 -7
- package/dist/runtime/handlers/get-runtime-info.mjs.map +1 -1
- package/dist/runtime/handlers/handle-connect.cjs +3 -8
- package/dist/runtime/handlers/handle-connect.cjs.map +1 -1
- package/dist/runtime/handlers/handle-connect.mjs +3 -8
- package/dist/runtime/handlers/handle-connect.mjs.map +1 -1
- package/dist/runtime/handlers/handle-debug-events.cjs.map +1 -1
- package/dist/runtime/handlers/handle-debug-events.mjs.map +1 -1
- package/dist/runtime/handlers/handle-inspector-learning.cjs +2 -3
- package/dist/runtime/handlers/handle-inspector-learning.cjs.map +1 -1
- package/dist/runtime/handlers/handle-inspector-learning.mjs.map +1 -1
- package/dist/runtime/handlers/handle-inspector-metadata.cjs +2 -3
- package/dist/runtime/handlers/handle-inspector-metadata.cjs.map +1 -1
- package/dist/runtime/handlers/handle-inspector-metadata.mjs.map +1 -1
- package/dist/runtime/handlers/handle-run.cjs +11 -16
- package/dist/runtime/handlers/handle-run.cjs.map +1 -1
- package/dist/runtime/handlers/handle-run.mjs +8 -12
- package/dist/runtime/handlers/handle-run.mjs.map +1 -1
- package/dist/runtime/handlers/handle-stop.cjs +5 -5
- package/dist/runtime/handlers/handle-stop.cjs.map +1 -1
- package/dist/runtime/handlers/handle-stop.mjs +2 -1
- package/dist/runtime/handlers/handle-stop.mjs.map +1 -1
- package/dist/runtime/handlers/handle-suggest.cjs +6 -3
- package/dist/runtime/handlers/handle-suggest.cjs.map +1 -1
- package/dist/runtime/handlers/handle-suggest.mjs +6 -2
- package/dist/runtime/handlers/handle-suggest.mjs.map +1 -1
- package/dist/runtime/handlers/handle-trajectory-connect.cjs.map +1 -1
- package/dist/runtime/handlers/handle-trajectory-connect.mjs.map +1 -1
- package/dist/runtime/handlers/handle-transcribe.cjs +0 -1
- package/dist/runtime/handlers/handle-transcribe.cjs.map +1 -1
- package/dist/runtime/handlers/handle-transcribe.mjs.map +1 -1
- package/dist/runtime/handlers/intelligence/annotate.cjs +8 -8
- package/dist/runtime/handlers/intelligence/annotate.cjs.map +1 -1
- package/dist/runtime/handlers/intelligence/annotate.mjs +5 -4
- package/dist/runtime/handlers/intelligence/annotate.mjs.map +1 -1
- package/dist/runtime/handlers/intelligence/connect.cjs +6 -2
- package/dist/runtime/handlers/intelligence/connect.cjs.map +1 -1
- package/dist/runtime/handlers/intelligence/connect.mjs +6 -2
- package/dist/runtime/handlers/intelligence/connect.mjs.map +1 -1
- package/dist/runtime/handlers/intelligence/memories.cjs +28 -23
- package/dist/runtime/handlers/intelligence/memories.cjs.map +1 -1
- package/dist/runtime/handlers/intelligence/memories.mjs +12 -6
- package/dist/runtime/handlers/intelligence/memories.mjs.map +1 -1
- package/dist/runtime/handlers/intelligence/run.cjs +38 -30
- package/dist/runtime/handlers/intelligence/run.cjs.map +1 -1
- package/dist/runtime/handlers/intelligence/run.mjs +37 -28
- package/dist/runtime/handlers/intelligence/run.mjs.map +1 -1
- package/dist/runtime/handlers/intelligence/thread-names.cjs +6 -5
- package/dist/runtime/handlers/intelligence/thread-names.cjs.map +1 -1
- package/dist/runtime/handlers/intelligence/thread-names.mjs +3 -1
- package/dist/runtime/handlers/intelligence/thread-names.mjs.map +1 -1
- package/dist/runtime/handlers/intelligence/threads.cjs +40 -31
- package/dist/runtime/handlers/intelligence/threads.cjs.map +1 -1
- package/dist/runtime/handlers/intelligence/threads.mjs +18 -8
- package/dist/runtime/handlers/intelligence/threads.mjs.map +1 -1
- package/dist/runtime/handlers/shared/agent-utils.cjs +50 -46
- package/dist/runtime/handlers/shared/agent-utils.cjs.map +1 -1
- package/dist/runtime/handlers/shared/agent-utils.mjs +47 -42
- package/dist/runtime/handlers/shared/agent-utils.mjs.map +1 -1
- package/dist/runtime/handlers/shared/cloud-telemetry.cjs +0 -1
- package/dist/runtime/handlers/shared/cloud-telemetry.cjs.map +1 -1
- package/dist/runtime/handlers/shared/memory-policy.cjs.map +1 -1
- package/dist/runtime/handlers/shared/memory-policy.mjs.map +1 -1
- package/dist/runtime/handlers/shared/resolve-intelligence-user.cjs +4 -3
- package/dist/runtime/handlers/shared/resolve-intelligence-user.cjs.map +1 -1
- package/dist/runtime/handlers/shared/resolve-intelligence-user.mjs +4 -3
- package/dist/runtime/handlers/shared/resolve-intelligence-user.mjs.map +1 -1
- package/dist/runtime/handlers/shared/sse-response.cjs +77 -78
- package/dist/runtime/handlers/shared/sse-response.cjs.map +1 -1
- package/dist/runtime/handlers/shared/sse-response.mjs +77 -77
- package/dist/runtime/handlers/shared/sse-response.mjs.map +1 -1
- package/dist/runtime/handlers/shared/thread-access.cjs +4 -3
- package/dist/runtime/handlers/shared/thread-access.cjs.map +1 -1
- package/dist/runtime/handlers/shared/thread-access.d.cts.map +1 -1
- package/dist/runtime/handlers/shared/thread-access.d.mts.map +1 -1
- package/dist/runtime/handlers/shared/thread-access.mjs +4 -3
- package/dist/runtime/handlers/shared/thread-access.mjs.map +1 -1
- package/dist/runtime/handlers/sse/connect.cjs +2 -0
- package/dist/runtime/handlers/sse/connect.cjs.map +1 -1
- package/dist/runtime/handlers/sse/connect.mjs +2 -0
- package/dist/runtime/handlers/sse/connect.mjs.map +1 -1
- package/dist/runtime/handlers/sse/run.cjs +5 -2
- package/dist/runtime/handlers/sse/run.cjs.map +1 -1
- package/dist/runtime/handlers/sse/run.mjs +5 -2
- package/dist/runtime/handlers/sse/run.mjs.map +1 -1
- package/dist/runtime/index.d.cts +13 -18
- package/dist/runtime/index.d.mts +13 -18
- package/dist/runtime/intelligence-platform/analytics-context.cjs +84 -0
- package/dist/runtime/intelligence-platform/analytics-context.cjs.map +1 -0
- package/dist/runtime/intelligence-platform/analytics-context.mjs +83 -0
- package/dist/runtime/intelligence-platform/analytics-context.mjs.map +1 -0
- package/dist/runtime/intelligence-platform/client.cjs +30 -4
- package/dist/runtime/intelligence-platform/client.cjs.map +1 -1
- package/dist/runtime/intelligence-platform/client.d.cts +25 -2
- package/dist/runtime/intelligence-platform/client.d.cts.map +1 -1
- package/dist/runtime/intelligence-platform/client.d.mts +25 -2
- package/dist/runtime/intelligence-platform/client.d.mts.map +1 -1
- package/dist/runtime/intelligence-platform/client.mjs +30 -3
- package/dist/runtime/intelligence-platform/client.mjs.map +1 -1
- package/dist/runtime/intelligence-platform/learning-management.cjs +7 -8
- package/dist/runtime/intelligence-platform/learning-management.cjs.map +1 -1
- package/dist/runtime/intelligence-platform/learning-management.mjs +7 -7
- package/dist/runtime/intelligence-platform/learning-management.mjs.map +1 -1
- package/dist/runtime/intelligence-platform/skill-registry/archive.cjs +104 -110
- package/dist/runtime/intelligence-platform/skill-registry/archive.cjs.map +1 -1
- package/dist/runtime/intelligence-platform/skill-registry/archive.d.cts +8 -2
- package/dist/runtime/intelligence-platform/skill-registry/archive.d.cts.map +1 -1
- package/dist/runtime/intelligence-platform/skill-registry/archive.d.mts +8 -2
- package/dist/runtime/intelligence-platform/skill-registry/archive.d.mts.map +1 -1
- package/dist/runtime/intelligence-platform/skill-registry/archive.mjs +104 -109
- package/dist/runtime/intelligence-platform/skill-registry/archive.mjs.map +1 -1
- package/dist/runtime/intelligence-platform/skill-registry/config.cjs +0 -1
- package/dist/runtime/intelligence-platform/skill-registry/config.cjs.map +1 -1
- package/dist/runtime/intelligence-platform/skill-registry/index.d.cts +1 -1
- package/dist/runtime/intelligence-platform/skill-registry/index.d.mts +1 -1
- package/dist/runtime/intelligence-platform/skill-registry/registry.cjs +22 -19
- package/dist/runtime/intelligence-platform/skill-registry/registry.cjs.map +1 -1
- package/dist/runtime/intelligence-platform/skill-registry/registry.d.cts.map +1 -1
- package/dist/runtime/intelligence-platform/skill-registry/registry.d.mts.map +1 -1
- package/dist/runtime/intelligence-platform/skill-registry/registry.mjs +22 -19
- package/dist/runtime/intelligence-platform/skill-registry/registry.mjs.map +1 -1
- package/dist/runtime/intelligence-platform/stop-run.cjs +50 -0
- package/dist/runtime/intelligence-platform/stop-run.cjs.map +1 -0
- package/dist/runtime/intelligence-platform/stop-run.mjs +50 -0
- package/dist/runtime/intelligence-platform/stop-run.mjs.map +1 -0
- package/dist/runtime/intelligence-platform/thread-lock-heartbeat.cjs +3 -3
- package/dist/runtime/intelligence-platform/thread-lock-heartbeat.cjs.map +1 -1
- package/dist/runtime/intelligence-platform/thread-lock-heartbeat.mjs +2 -1
- package/dist/runtime/intelligence-platform/thread-lock-heartbeat.mjs.map +1 -1
- package/dist/runtime/intelligence-platform/trajectories.cjs +2 -3
- package/dist/runtime/intelligence-platform/trajectories.cjs.map +1 -1
- package/dist/runtime/intelligence-platform/trajectories.mjs +2 -2
- package/dist/runtime/intelligence-platform/trajectories.mjs.map +1 -1
- package/dist/runtime/node.d.cts +2 -2
- package/dist/runtime/node.d.mts +2 -2
- package/dist/runtime/runner/agent-runner.cjs +0 -1
- package/dist/runtime/runner/agent-runner.cjs.map +1 -1
- package/dist/runtime/runner/agent-runner.d.cts +9 -0
- package/dist/runtime/runner/agent-runner.d.cts.map +1 -1
- package/dist/runtime/runner/agent-runner.d.mts +9 -0
- package/dist/runtime/runner/agent-runner.d.mts.map +1 -1
- package/dist/runtime/runner/agent-runner.mjs.map +1 -1
- package/dist/runtime/runner/in-memory.cjs +0 -1
- package/dist/runtime/runner/in-memory.cjs.map +1 -1
- package/dist/runtime/runner/index.d.cts +1 -1
- package/dist/runtime/runner/index.d.mts +1 -1
- package/dist/runtime/runner/index.mjs +1 -1
- package/dist/runtime/runner/intelligence.cjs +55 -9
- package/dist/runtime/runner/intelligence.cjs.map +1 -1
- package/dist/runtime/runner/intelligence.d.cts +12 -1
- package/dist/runtime/runner/intelligence.d.cts.map +1 -1
- package/dist/runtime/runner/intelligence.d.mts +12 -1
- package/dist/runtime/runner/intelligence.d.mts.map +1 -1
- package/dist/runtime/runner/intelligence.mjs +56 -10
- package/dist/runtime/runner/intelligence.mjs.map +1 -1
- package/dist/runtime/telemetry/disclosure.cjs +2 -3
- package/dist/runtime/telemetry/disclosure.cjs.map +1 -1
- package/dist/runtime/telemetry/disclosure.mjs +3 -3
- package/dist/runtime/telemetry/disclosure.mjs.map +1 -1
- package/dist/runtime/telemetry/events.d.cts +1 -1
- package/dist/runtime/telemetry/events.d.mts +1 -1
- package/dist/runtime/telemetry/instance-created.cjs +33 -12
- package/dist/runtime/telemetry/instance-created.cjs.map +1 -1
- package/dist/runtime/telemetry/instance-created.mjs +33 -12
- package/dist/runtime/telemetry/instance-created.mjs.map +1 -1
- package/dist/runtime/telemetry/telemetry-client.cjs +0 -5
- package/dist/runtime/telemetry/telemetry-client.cjs.map +1 -1
- package/dist/runtime/telemetry/telemetry-client.mjs +0 -4
- package/dist/runtime/telemetry/telemetry-client.mjs.map +1 -1
- package/dist/runtime/telemetry/telemetry-identity.cjs +0 -1
- package/dist/runtime/telemetry/telemetry-identity.cjs.map +1 -1
- package/dist/v2/index.d.cts +242 -0
- package/dist/v2/index.d.mts +242 -0
- package/dist/v2/node.d.cts +18 -0
- package/dist/v2/node.d.mts +18 -0
- package/package.json +84 -29
- package/dist/_virtual/_rolldown/runtime.cjs +0 -29
- package/dist/agent/converters/index.d.mts +0 -2
- package/dist/agent/index.cjs +0 -1328
- package/dist/agent/index.cjs.map +0 -1
- package/dist/agent/index.d.cts +0 -467
- package/dist/agent/index.d.cts.map +0 -1
- package/dist/agent/index.d.mts +0 -468
- package/dist/agent/index.d.mts.map +0 -1
- package/dist/agent/index.mjs +0 -1318
- package/dist/agent/index.mjs.map +0 -1
- package/dist/agent/mcp-tool-names.cjs +0 -82
- package/dist/agent/mcp-tool-names.cjs.map +0 -1
- package/dist/agent/mcp-tool-names.mjs +0 -80
- package/dist/agent/mcp-tool-names.mjs.map +0 -1
- package/dist/agent/url-download.cjs.map +0 -1
- package/dist/agent/url-download.d.cts.map +0 -1
- package/dist/agent/url-download.d.mts.map +0 -1
- package/dist/agent/url-download.mjs.map +0 -1
- package/dist/runtime/index.d.cts.map +0 -1
- package/dist/runtime/index.d.mts.map +0 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CopilotKitRuntimeLogger } from "../core/logger.cjs";
|
|
2
|
+
import { CopilotKitRuntimeFetchHandler } from "../core/fetch-handler.cjs";
|
|
2
3
|
import { IncomingMessage, ServerResponse } from "node:http";
|
|
3
4
|
|
|
4
5
|
//#region src/runtime/endpoints/node-fetch-handler.d.ts
|
|
5
6
|
type NodeFetchHandler = (req: IncomingMessage, res: ServerResponse) => Promise<void>;
|
|
6
|
-
declare function
|
|
7
|
-
/** @deprecated Use `createCopilotNodeHandler` instead. */
|
|
8
|
-
declare const createNodeFetchHandler: typeof createCopilotNodeHandler;
|
|
7
|
+
declare function createCopilotKitNodeHandler(handler: CopilotKitRuntimeFetchHandler, logger?: CopilotKitRuntimeLogger): NodeFetchHandler;
|
|
9
8
|
//#endregion
|
|
10
|
-
export { NodeFetchHandler,
|
|
9
|
+
export { NodeFetchHandler, createCopilotKitNodeHandler };
|
|
11
10
|
//# sourceMappingURL=node-fetch-handler.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-fetch-handler.d.cts","names":[],"sources":["../../../src/runtime/endpoints/node-fetch-handler.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"node-fetch-handler.d.cts","names":[],"sources":["../../../src/runtime/endpoints/node-fetch-handler.ts"],"mappings":";;;;;KAmCY,gBAAA,IACV,GAAA,EAAK,eAAA,EACL,GAAA,EAAK,cAAA,KACF,OAAA;AAAA,iBAEW,2BAAA,CACd,OAAA,EAAS,6BAAA,EACT,MAAA,GAAQ,uBAAA,GACP,gBAAA"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CopilotKitRuntimeLogger } from "../core/logger.mjs";
|
|
2
|
+
import { CopilotKitRuntimeFetchHandler } from "../core/fetch-handler.mjs";
|
|
2
3
|
import { IncomingMessage, ServerResponse } from "node:http";
|
|
3
4
|
|
|
4
5
|
//#region src/runtime/endpoints/node-fetch-handler.d.ts
|
|
5
6
|
type NodeFetchHandler = (req: IncomingMessage, res: ServerResponse) => Promise<void>;
|
|
6
|
-
declare function
|
|
7
|
-
/** @deprecated Use `createCopilotNodeHandler` instead. */
|
|
8
|
-
declare const createNodeFetchHandler: typeof createCopilotNodeHandler;
|
|
7
|
+
declare function createCopilotKitNodeHandler(handler: CopilotKitRuntimeFetchHandler, logger?: CopilotKitRuntimeLogger): NodeFetchHandler;
|
|
9
8
|
//#endregion
|
|
10
|
-
export { NodeFetchHandler,
|
|
9
|
+
export { NodeFetchHandler, createCopilotKitNodeHandler };
|
|
11
10
|
//# sourceMappingURL=node-fetch-handler.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-fetch-handler.d.mts","names":[],"sources":["../../../src/runtime/endpoints/node-fetch-handler.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"node-fetch-handler.d.mts","names":[],"sources":["../../../src/runtime/endpoints/node-fetch-handler.ts"],"mappings":";;;;;KAmCY,gBAAA,IACV,GAAA,EAAK,eAAA,EACL,GAAA,EAAK,cAAA,KACF,OAAA;AAAA,iBAEW,2BAAA,CACd,OAAA,EAAS,6BAAA,EACT,MAAA,GAAQ,uBAAA,GACP,gBAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getRuntimeLogger } from "../core/logger.mjs";
|
|
2
2
|
import { createHeaders, createRequest, sendResponse } from "@remix-run/node-fetch-server";
|
|
3
3
|
|
|
4
4
|
//#region src/runtime/endpoints/node-fetch-handler.ts
|
|
@@ -7,7 +7,7 @@ const METHODS_WITHOUT_BODY = new Set([
|
|
|
7
7
|
"HEAD",
|
|
8
8
|
"OPTIONS"
|
|
9
9
|
]);
|
|
10
|
-
function
|
|
10
|
+
function createCopilotKitNodeHandler(handler, logger = getRuntimeLogger()) {
|
|
11
11
|
return async (req, res) => {
|
|
12
12
|
try {
|
|
13
13
|
const method = (req.method ?? "GET").toUpperCase();
|
|
@@ -21,8 +21,6 @@ function createCopilotNodeHandler(handler) {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
/** @deprecated Use `createCopilotNodeHandler` instead. */
|
|
25
|
-
const createNodeFetchHandler = createCopilotNodeHandler;
|
|
26
24
|
/**
|
|
27
25
|
* Build a Fetch Request from a Node IncomingMessage whose body stream has
|
|
28
26
|
* already been consumed by a body parser.
|
|
@@ -69,5 +67,5 @@ function synthesizeBody(body) {
|
|
|
69
67
|
}
|
|
70
68
|
|
|
71
69
|
//#endregion
|
|
72
|
-
export {
|
|
70
|
+
export { createCopilotKitNodeHandler };
|
|
73
71
|
//# sourceMappingURL=node-fetch-handler.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-fetch-handler.mjs","names":[],"sources":["../../../src/runtime/endpoints/node-fetch-handler.ts"],"sourcesContent":["/**\n * Generic Node ↔ Fetch bridge for CopilotKit runtime.\n *\n * Wraps a `
|
|
1
|
+
{"version":3,"file":"node-fetch-handler.mjs","names":[],"sources":["../../../src/runtime/endpoints/node-fetch-handler.ts"],"sourcesContent":["/**\n * Generic Node ↔ Fetch bridge for CopilotKit runtime.\n *\n * Wraps a `CopilotKitRuntimeFetchHandler` as a Node HTTP handler using\n * `@remix-run/node-fetch-server` for reliable streaming and conversion.\n *\n * When body-parsing middleware (Express `express.json()`, NestJS's default\n * parser, …) runs first, the Node request stream is already consumed and\n * `req.body` holds the parsed content. Reading the exhausted stream would hang,\n * so that case re-serialises `req.body` into the Fetch `Request` instead.\n *\n * @example\n * ```typescript\n * import { createServer } from \"node:http\";\n * import { createCopilotKitRuntimeHandler } from \"@copilotkit/runtime\";\n * import { createCopilotKitNodeHandler } from \"@copilotkit/runtime/node\";\n *\n * const handler = createCopilotKitRuntimeHandler({ runtime, basePath: \"/api/copilotkit\", cors: true });\n * const nodeHandler = createCopilotKitNodeHandler(handler);\n * createServer(nodeHandler).listen(3000);\n * ```\n */\n\nimport type { IncomingMessage, ServerResponse } from \"node:http\";\nimport {\n createHeaders,\n createRequest,\n sendResponse,\n} from \"@remix-run/node-fetch-server\";\nimport type { CopilotKitRuntimeFetchHandler } from \"../core/fetch-handler\";\nimport { getRuntimeLogger } from \"../core/logger\";\nimport type { CopilotKitRuntimeLogger } from \"../core/logger\";\n\nconst METHODS_WITHOUT_BODY = new Set([\"GET\", \"HEAD\", \"OPTIONS\"]);\n\nexport type NodeFetchHandler = (\n req: IncomingMessage,\n res: ServerResponse,\n) => Promise<void>;\n\nexport function createCopilotKitNodeHandler(\n handler: CopilotKitRuntimeFetchHandler,\n logger: CopilotKitRuntimeLogger = getRuntimeLogger(),\n): NodeFetchHandler {\n return async (req: IncomingMessage, res: ServerResponse) => {\n try {\n const method = (req.method ?? \"GET\").toUpperCase();\n const fetchReq =\n !METHODS_WITHOUT_BODY.has(method) && hasPreParsedBody(req)\n ? buildPreParsedRequest(req, res)\n : createRequest(req, res);\n const fetchRes = await handler(fetchReq);\n await sendResponse(res, fetchRes);\n } catch (err: unknown) {\n logger.error({ err }, \"Error in Node fetch handler\");\n if (!res.headersSent) {\n res.statusCode = 500;\n res.end(\"Internal Server Error\");\n }\n }\n };\n}\n\n/**\n * Build a Fetch Request from a Node IncomingMessage whose body stream has\n * already been consumed by a body parser.\n *\n * The URL, headers and abort wiring match `createRequest` (the streaming path),\n * so a request routes the same way whether or not a parser ran first. In\n * particular the URL comes from `req.url`, which is what a mounting router\n * matched against; `originalUrl` still carries the mount prefix and would miss\n * the handler's `basePath`.\n */\nfunction buildPreParsedRequest(\n req: IncomingMessage & { body?: unknown },\n res: ServerResponse,\n): Request {\n const method = (req.method ?? \"GET\").toUpperCase();\n const headers = createHeaders(req);\n const protocol =\n \"encrypted\" in req.socket && req.socket.encrypted ? \"https:\" : \"http:\";\n const host = headers.get(\"host\") ?? \"localhost\";\n const url = new URL(req.url ?? \"/\", `${protocol}//${host}`);\n\n // Wire an AbortSignal so client disconnects propagate to the fetch handler\n const controller = new AbortController();\n res.on(\"close\", () => {\n if (!res.writableFinished) controller.abort();\n });\n\n const init: RequestInit = {\n method,\n headers,\n signal: controller.signal,\n };\n\n const { body, contentType } = synthesizeBody(req.body);\n if (contentType) {\n headers.set(\"content-type\", contentType);\n }\n headers.delete(\"content-length\");\n if (body !== undefined) {\n init.body = body;\n }\n\n return new Request(url, init);\n}\n\nfunction hasPreParsedBody(req: IncomingMessage & { body?: unknown }): boolean {\n if (req.body === undefined || req.body === null) return false;\n\n // Only `readableEnded` means \"a parser drained this stream to its end\".\n // `req.complete` and the private `_readableState.ended` are set by the HTTP\n // parser once the socket has all the bytes, whether or not anything read them.\n //\n // That distinction matters because `req.body` being set does not prove a parser\n // ran: body-parser 1.x (Express 4) assigns `req.body = req.body || {}` before\n // its own content-type checks, so a request it declines to parse — multipart\n // upload, text/plain — reaches us with `req.body === {}` and a full, unread\n // stream. Treating that as pre-parsed rebuilt the request from `{}` and\n // dropped the real payload.\n return Boolean(req.readableEnded);\n}\n\nfunction synthesizeBody(body: unknown): {\n body?: BodyInit;\n contentType?: string;\n} {\n if (Buffer.isBuffer(body) || body instanceof Uint8Array) {\n // Buffer/Uint8Array<ArrayBufferLike> are valid fetch bodies at runtime,\n // but the DOM lib's BodyInit only admits ArrayBuffer-backed views.\n return { body: body as BodyInit };\n }\n if (typeof body === \"string\") {\n return { body };\n }\n if (typeof body === \"object\" && body !== null) {\n return { body: JSON.stringify(body), contentType: \"application/json\" };\n }\n return {};\n}\n"],"mappings":";;;;AAiCA,MAAM,uBAAuB,IAAI,IAAI;CAAC;CAAO;CAAQ;CAAU,CAAC;AAOhE,SAAgB,4BACd,SACA,SAAkC,kBAAkB,EAClC;AAClB,QAAO,OAAO,KAAsB,QAAwB;AAC1D,MAAI;GACF,MAAM,UAAU,IAAI,UAAU,OAAO,aAAa;AAMlD,SAAM,aAAa,KADF,MAAM,QAHrB,CAAC,qBAAqB,IAAI,OAAO,IAAI,iBAAiB,IAAI,GACtD,sBAAsB,KAAK,IAAI,GAC/B,cAAc,KAAK,IAAI,CACW,CACP;WAC1B,KAAc;AACrB,UAAO,MAAM,EAAE,KAAK,EAAE,8BAA8B;AACpD,OAAI,CAAC,IAAI,aAAa;AACpB,QAAI,aAAa;AACjB,QAAI,IAAI,wBAAwB;;;;;;;;;;;;;;;AAgBxC,SAAS,sBACP,KACA,KACS;CACT,MAAM,UAAU,IAAI,UAAU,OAAO,aAAa;CAClD,MAAM,UAAU,cAAc,IAAI;CAClC,MAAM,WACJ,eAAe,IAAI,UAAU,IAAI,OAAO,YAAY,WAAW;CACjE,MAAM,OAAO,QAAQ,IAAI,OAAO,IAAI;CACpC,MAAM,MAAM,IAAI,IAAI,IAAI,OAAO,KAAK,GAAG,SAAS,IAAI,OAAO;CAG3D,MAAM,aAAa,IAAI,iBAAiB;AACxC,KAAI,GAAG,eAAe;AACpB,MAAI,CAAC,IAAI,iBAAkB,YAAW,OAAO;GAC7C;CAEF,MAAM,OAAoB;EACxB;EACA;EACA,QAAQ,WAAW;EACpB;CAED,MAAM,EAAE,MAAM,gBAAgB,eAAe,IAAI,KAAK;AACtD,KAAI,YACF,SAAQ,IAAI,gBAAgB,YAAY;AAE1C,SAAQ,OAAO,iBAAiB;AAChC,KAAI,SAAS,OACX,MAAK,OAAO;AAGd,QAAO,IAAI,QAAQ,KAAK,KAAK;;AAG/B,SAAS,iBAAiB,KAAoD;AAC5E,KAAI,IAAI,SAAS,UAAa,IAAI,SAAS,KAAM,QAAO;AAYxD,QAAO,QAAQ,IAAI,cAAc;;AAGnC,SAAS,eAAe,MAGtB;AACA,KAAI,OAAO,SAAS,KAAK,IAAI,gBAAgB,WAG3C,QAAO,EAAQ,MAAkB;AAEnC,KAAI,OAAO,SAAS,SAClB,QAAO,EAAE,MAAM;AAEjB,KAAI,OAAO,SAAS,YAAY,SAAS,KACvC,QAAO;EAAE,MAAM,KAAK,UAAU,KAAK;EAAE,aAAa;EAAoB;AAExE,QAAO,EAAE"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
const require_logger = require('../core/logger.cjs');
|
|
1
2
|
const require_fetch_handler = require('../core/fetch-handler.cjs');
|
|
2
3
|
const require_node_fetch_handler = require('./node-fetch-handler.cjs');
|
|
3
4
|
const require_auto_start_channels = require('./auto-start-channels.cjs');
|
|
4
5
|
|
|
5
6
|
//#region src/runtime/endpoints/node.ts
|
|
6
|
-
function
|
|
7
|
-
const handler = require_fetch_handler.
|
|
8
|
-
const
|
|
7
|
+
function createCopilotKitNodeListener(options) {
|
|
8
|
+
const handler = require_fetch_handler.createCopilotKitRuntimeHandler(options);
|
|
9
|
+
const logger = require_logger.getRuntimeLogger(options.runtime);
|
|
10
|
+
const listener = require_node_fetch_handler.createCopilotKitNodeHandler(handler, logger);
|
|
9
11
|
listener.channels = handler.channels;
|
|
10
|
-
require_auto_start_channels.autoStartChannels(listener.channels);
|
|
12
|
+
require_auto_start_channels.autoStartChannels(listener.channels, logger);
|
|
11
13
|
return listener;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
//#endregion
|
|
15
|
-
exports.
|
|
17
|
+
exports.createCopilotKitNodeListener = createCopilotKitNodeListener;
|
|
16
18
|
//# sourceMappingURL=node.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.cjs","names":["
|
|
1
|
+
{"version":3,"file":"node.cjs","names":["createCopilotKitRuntimeHandler","getRuntimeLogger","createCopilotKitNodeHandler"],"sources":["../../../src/runtime/endpoints/node.ts"],"sourcesContent":["import { createCopilotKitRuntimeHandler } from \"../core/fetch-handler\";\nimport type { CopilotKitRuntimeHandlerOptions } from \"../core/fetch-handler\";\nimport type { RuntimeWithDeclaredChannels } from \"../core/runtime\";\nimport type { ChannelsControl } from \"../core/channel-manager\";\nimport { createCopilotKitNodeHandler } from \"./node-fetch-handler\";\nimport type { NodeFetchHandler } from \"./node-fetch-handler\";\nimport { autoStartChannels } from \"./auto-start-channels\";\nimport { getRuntimeLogger } from \"../core/logger\";\n\n/**\n * A Node.js HTTP request listener that is also a callable object carrying an\n * optional {@link ChannelsControl} surface, mirroring\n * `CopilotKitRuntimeFetchHandler.channels`. Node is the long-running,\n * lifecycle-owning entry point for the runtime, so it is the surface that\n * exposes `.channels` for callers that need to observe or stop the managed\n * Channel activation the listener starts at creation.\n */\nexport type NodeCopilotKitListener = NodeFetchHandler & {\n channels?: ChannelsControl;\n};\n\n/**\n * A {@link NodeCopilotKitListener} whose {@link ChannelsControl} surface is\n * guaranteed present. Returned when the runtime was constructed with at least\n * one declared Intelligence Channel and activation was not opted out of, so the\n * documented `listener.channels.ready(...)` call type-checks without a `!` or a\n * `?.` under strict TypeScript — the Node mirror of\n * `CopilotKitRuntimeFetchHandlerWithChannels`.\n */\nexport type NodeCopilotKitListenerWithChannels = NodeFetchHandler & {\n /** Lifecycle control surface for the runtime's declared managed Channels. */\n channels: ChannelsControl;\n};\n\n/**\n * Convenience wrapper for creating a Node.js HTTP request listener\n * from CopilotKit runtime handler options.\n *\n * When the runtime declares managed Channels (and activation was not opted\n * out of via `activateChannels: false`), the returned listener exposes\n * `.channels` — the same {@link ChannelsControl} surface carried by the\n * underlying fetch handler.\n *\n * ## Managed Channels lifecycle\n *\n * Creating the listener STARTS activation — which opens the persistent Realtime\n * Gateway WebSocket and starts every direct adapter on the declared Channels.\n * Node owns its own process lifetime, so there is nothing to defer to and no\n * required incantation: a declared Channel connects because it was declared.\n * (The generic `createCopilotKitRuntimeHandler` is the opposite — it stays lazy for\n * serverless/edge safety; see its TSDoc.)\n *\n * `await listener.channels.ready()` is therefore OPTIONAL and purely\n * await-and-observe: it resolves once every declared Channel has settled to\n * `online`/`setup_required` and rejects with the activation failure, observing\n * the activation started at creation rather than triggering a second one. Await\n * it when startup should block on Channels being live (or should exit non-zero\n * when they are not); skip it and activation failures land in the logs instead.\n * `listener.channels.stop()` tears activation down.\n *\n * Pass `activateChannels: false` to build no control surface and open no socket\n * — the clean opt-out for a test or a short-lived script that mounts the\n * listener without wanting its Channels connected.\n *\n * @example\n * ```typescript\n * import { createServer } from \"node:http\";\n * import { CopilotKitRuntime } from \"@copilotkit/runtime\";\n * import { createCopilotKitNodeListener } from \"@copilotkit/runtime/node\";\n *\n * const listener = createCopilotKitNodeListener({\n * runtime: new CopilotKitRuntime({ agents: { ... } }),\n * basePath: \"/api/copilotkit\",\n * cors: true,\n * });\n * createServer(listener).listen(3000);\n * // Declared managed Channels are already connecting at this point.\n *\n * // Optional: block startup on them being live. Bound it so one wedged adapter\n * // cannot hang startup forever.\n * await listener.channels.ready({ timeoutMs: 30_000 });\n * ```\n */\n/**\n * Overload: a runtime constructed with at least one declared Intelligence\n * Channel (a {@link RuntimeWithDeclaredChannels}-branded runtime), when\n * activation is not disabled, yields a listener with a **non-optional**\n * {@link ChannelsControl}. `activateChannels` is constrained to\n * `true | undefined` here so passing `activateChannels: false` (which leaves no\n * `.channels`) falls through to the optional-shape overload below rather than\n * dishonestly promising a control surface that will not exist. Mirrors the\n * `createCopilotKitRuntimeHandler` overload pair so the brand survives the wrapper.\n *\n * The brand comes from constructing the runtime with a literal non-empty\n * `channels` list (`readonly [Channel, ...Channel[]]`). A runtime built from a\n * dynamically-assembled `Channel[]` is not branded, so it falls to the\n * optional-shape overload and its call sites still need `?.`.\n */\nexport function createCopilotKitNodeListener(\n options: CopilotKitRuntimeHandlerOptions & {\n runtime: RuntimeWithDeclaredChannels;\n activateChannels?: true | undefined;\n },\n): NodeCopilotKitListenerWithChannels;\n/**\n * Overload: every other runtime (SSE, Intelligence without channels, or with\n * activation disabled) yields a listener whose `.channels` is optional.\n */\nexport function createCopilotKitNodeListener(\n options: CopilotKitRuntimeHandlerOptions,\n): NodeCopilotKitListener;\nexport function createCopilotKitNodeListener(\n options: CopilotKitRuntimeHandlerOptions,\n): NodeCopilotKitListener {\n const handler = createCopilotKitRuntimeHandler(options);\n const logger = getRuntimeLogger(options.runtime);\n const listener: NodeCopilotKitListener = createCopilotKitNodeHandler(\n handler,\n logger,\n );\n listener.channels = handler.channels;\n autoStartChannels(listener.channels, logger);\n return listener;\n}\n"],"mappings":";;;;;;AA+GA,SAAgB,6BACd,SACwB;CACxB,MAAM,UAAUA,qDAA+B,QAAQ;CACvD,MAAM,SAASC,gCAAiB,QAAQ,QAAQ;CAChD,MAAM,WAAmCC,uDACvC,SACA,OACD;AACD,UAAS,WAAW,QAAQ;AAC5B,+CAAkB,SAAS,UAAU,OAAO;AAC5C,QAAO"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { RuntimeWithDeclaredChannels } from "../core/runtime.cjs";
|
|
2
2
|
import { ChannelsControl } from "../core/channel-manager.cjs";
|
|
3
|
-
import {
|
|
3
|
+
import { CopilotKitRuntimeHandlerOptions } from "../core/fetch-handler.cjs";
|
|
4
4
|
import { NodeFetchHandler } from "./node-fetch-handler.cjs";
|
|
5
5
|
|
|
6
6
|
//#region src/runtime/endpoints/node.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* A Node.js HTTP request listener that is also a callable object carrying an
|
|
9
9
|
* optional {@link ChannelsControl} surface, mirroring
|
|
10
|
-
* `
|
|
10
|
+
* `CopilotKitRuntimeFetchHandler.channels`. Node is the long-running,
|
|
11
11
|
* lifecycle-owning entry point for the runtime, so it is the surface that
|
|
12
12
|
* exposes `.channels` for callers that need to observe or stop the managed
|
|
13
13
|
* Channel activation the listener starts at creation.
|
|
14
14
|
*/
|
|
15
|
-
type
|
|
15
|
+
type NodeCopilotKitListener = NodeFetchHandler & {
|
|
16
16
|
channels?: ChannelsControl;
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
|
-
* A {@link
|
|
19
|
+
* A {@link NodeCopilotKitListener} whose {@link ChannelsControl} surface is
|
|
20
20
|
* guaranteed present. Returned when the runtime was constructed with at least
|
|
21
21
|
* one declared Intelligence Channel and activation was not opted out of, so the
|
|
22
22
|
* documented `listener.channels.ready(...)` call type-checks without a `!` or a
|
|
23
23
|
* `?.` under strict TypeScript — the Node mirror of
|
|
24
|
-
* `
|
|
24
|
+
* `CopilotKitRuntimeFetchHandlerWithChannels`.
|
|
25
25
|
*/
|
|
26
|
-
type
|
|
26
|
+
type NodeCopilotKitListenerWithChannels = NodeFetchHandler & {
|
|
27
27
|
/** Lifecycle control surface for the runtime's declared managed Channels. */channels: ChannelsControl;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
@@ -41,7 +41,7 @@ type NodeCopilotListenerWithChannels = NodeFetchHandler & {
|
|
|
41
41
|
* Gateway WebSocket and starts every direct adapter on the declared Channels.
|
|
42
42
|
* Node owns its own process lifetime, so there is nothing to defer to and no
|
|
43
43
|
* required incantation: a declared Channel connects because it was declared.
|
|
44
|
-
* (The generic `
|
|
44
|
+
* (The generic `createCopilotKitRuntimeHandler` is the opposite — it stays lazy for
|
|
45
45
|
* serverless/edge safety; see its TSDoc.)
|
|
46
46
|
*
|
|
47
47
|
* `await listener.channels.ready()` is therefore OPTIONAL and purely
|
|
@@ -59,11 +59,11 @@ type NodeCopilotListenerWithChannels = NodeFetchHandler & {
|
|
|
59
59
|
* @example
|
|
60
60
|
* ```typescript
|
|
61
61
|
* import { createServer } from "node:http";
|
|
62
|
-
* import {
|
|
63
|
-
* import {
|
|
62
|
+
* import { CopilotKitRuntime } from "@copilotkit/runtime";
|
|
63
|
+
* import { createCopilotKitNodeListener } from "@copilotkit/runtime/node";
|
|
64
64
|
*
|
|
65
|
-
* const listener =
|
|
66
|
-
* runtime: new
|
|
65
|
+
* const listener = createCopilotKitNodeListener({
|
|
66
|
+
* runtime: new CopilotKitRuntime({ agents: { ... } }),
|
|
67
67
|
* basePath: "/api/copilotkit",
|
|
68
68
|
* cors: true,
|
|
69
69
|
* });
|
|
@@ -83,22 +83,22 @@ type NodeCopilotListenerWithChannels = NodeFetchHandler & {
|
|
|
83
83
|
* `true | undefined` here so passing `activateChannels: false` (which leaves no
|
|
84
84
|
* `.channels`) falls through to the optional-shape overload below rather than
|
|
85
85
|
* dishonestly promising a control surface that will not exist. Mirrors the
|
|
86
|
-
* `
|
|
86
|
+
* `createCopilotKitRuntimeHandler` overload pair so the brand survives the wrapper.
|
|
87
87
|
*
|
|
88
88
|
* The brand comes from constructing the runtime with a literal non-empty
|
|
89
89
|
* `channels` list (`readonly [Channel, ...Channel[]]`). A runtime built from a
|
|
90
90
|
* dynamically-assembled `Channel[]` is not branded, so it falls to the
|
|
91
91
|
* optional-shape overload and its call sites still need `?.`.
|
|
92
92
|
*/
|
|
93
|
-
declare function
|
|
93
|
+
declare function createCopilotKitNodeListener(options: CopilotKitRuntimeHandlerOptions & {
|
|
94
94
|
runtime: RuntimeWithDeclaredChannels;
|
|
95
95
|
activateChannels?: true | undefined;
|
|
96
|
-
}):
|
|
96
|
+
}): NodeCopilotKitListenerWithChannels;
|
|
97
97
|
/**
|
|
98
98
|
* Overload: every other runtime (SSE, Intelligence without channels, or with
|
|
99
99
|
* activation disabled) yields a listener whose `.channels` is optional.
|
|
100
100
|
*/
|
|
101
|
-
declare function
|
|
101
|
+
declare function createCopilotKitNodeListener(options: CopilotKitRuntimeHandlerOptions): NodeCopilotKitListener;
|
|
102
102
|
//#endregion
|
|
103
|
-
export {
|
|
103
|
+
export { NodeCopilotKitListener, NodeCopilotKitListenerWithChannels, createCopilotKitNodeListener };
|
|
104
104
|
//# sourceMappingURL=node.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.cts","names":[],"sources":["../../../src/runtime/endpoints/node.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"node.d.cts","names":[],"sources":["../../../src/runtime/endpoints/node.ts"],"mappings":";;;;;;;;AAiBA;;;;;;KAAY,sBAAA,GAAyB,gBAAA;EACnC,QAAA,GAAW,eAAA;AAAA;AAWb;;;;;;;;AAAA,KAAY,kCAAA,GAAqC,gBAAA;EAqEjC,6EAnEd,QAAA,EAAU,eAAA;AAAA;;;;;;;;;;;;;;AA6EZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAVgB,4BAAA,CACd,OAAA,EAAS,+BAAA;EACP,OAAA,EAAS,2BAAA;EACT,gBAAA;AAAA,IAED,kCAAA;;;;;iBAKa,4BAAA,CACd,OAAA,EAAS,+BAAA,GACR,sBAAA"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { RuntimeWithDeclaredChannels } from "../core/runtime.mjs";
|
|
2
2
|
import { ChannelsControl } from "../core/channel-manager.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { CopilotKitRuntimeHandlerOptions } from "../core/fetch-handler.mjs";
|
|
4
4
|
import { NodeFetchHandler } from "./node-fetch-handler.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/runtime/endpoints/node.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* A Node.js HTTP request listener that is also a callable object carrying an
|
|
9
9
|
* optional {@link ChannelsControl} surface, mirroring
|
|
10
|
-
* `
|
|
10
|
+
* `CopilotKitRuntimeFetchHandler.channels`. Node is the long-running,
|
|
11
11
|
* lifecycle-owning entry point for the runtime, so it is the surface that
|
|
12
12
|
* exposes `.channels` for callers that need to observe or stop the managed
|
|
13
13
|
* Channel activation the listener starts at creation.
|
|
14
14
|
*/
|
|
15
|
-
type
|
|
15
|
+
type NodeCopilotKitListener = NodeFetchHandler & {
|
|
16
16
|
channels?: ChannelsControl;
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
|
-
* A {@link
|
|
19
|
+
* A {@link NodeCopilotKitListener} whose {@link ChannelsControl} surface is
|
|
20
20
|
* guaranteed present. Returned when the runtime was constructed with at least
|
|
21
21
|
* one declared Intelligence Channel and activation was not opted out of, so the
|
|
22
22
|
* documented `listener.channels.ready(...)` call type-checks without a `!` or a
|
|
23
23
|
* `?.` under strict TypeScript — the Node mirror of
|
|
24
|
-
* `
|
|
24
|
+
* `CopilotKitRuntimeFetchHandlerWithChannels`.
|
|
25
25
|
*/
|
|
26
|
-
type
|
|
26
|
+
type NodeCopilotKitListenerWithChannels = NodeFetchHandler & {
|
|
27
27
|
/** Lifecycle control surface for the runtime's declared managed Channels. */channels: ChannelsControl;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
@@ -41,7 +41,7 @@ type NodeCopilotListenerWithChannels = NodeFetchHandler & {
|
|
|
41
41
|
* Gateway WebSocket and starts every direct adapter on the declared Channels.
|
|
42
42
|
* Node owns its own process lifetime, so there is nothing to defer to and no
|
|
43
43
|
* required incantation: a declared Channel connects because it was declared.
|
|
44
|
-
* (The generic `
|
|
44
|
+
* (The generic `createCopilotKitRuntimeHandler` is the opposite — it stays lazy for
|
|
45
45
|
* serverless/edge safety; see its TSDoc.)
|
|
46
46
|
*
|
|
47
47
|
* `await listener.channels.ready()` is therefore OPTIONAL and purely
|
|
@@ -59,11 +59,11 @@ type NodeCopilotListenerWithChannels = NodeFetchHandler & {
|
|
|
59
59
|
* @example
|
|
60
60
|
* ```typescript
|
|
61
61
|
* import { createServer } from "node:http";
|
|
62
|
-
* import {
|
|
63
|
-
* import {
|
|
62
|
+
* import { CopilotKitRuntime } from "@copilotkit/runtime";
|
|
63
|
+
* import { createCopilotKitNodeListener } from "@copilotkit/runtime/node";
|
|
64
64
|
*
|
|
65
|
-
* const listener =
|
|
66
|
-
* runtime: new
|
|
65
|
+
* const listener = createCopilotKitNodeListener({
|
|
66
|
+
* runtime: new CopilotKitRuntime({ agents: { ... } }),
|
|
67
67
|
* basePath: "/api/copilotkit",
|
|
68
68
|
* cors: true,
|
|
69
69
|
* });
|
|
@@ -83,22 +83,22 @@ type NodeCopilotListenerWithChannels = NodeFetchHandler & {
|
|
|
83
83
|
* `true | undefined` here so passing `activateChannels: false` (which leaves no
|
|
84
84
|
* `.channels`) falls through to the optional-shape overload below rather than
|
|
85
85
|
* dishonestly promising a control surface that will not exist. Mirrors the
|
|
86
|
-
* `
|
|
86
|
+
* `createCopilotKitRuntimeHandler` overload pair so the brand survives the wrapper.
|
|
87
87
|
*
|
|
88
88
|
* The brand comes from constructing the runtime with a literal non-empty
|
|
89
89
|
* `channels` list (`readonly [Channel, ...Channel[]]`). A runtime built from a
|
|
90
90
|
* dynamically-assembled `Channel[]` is not branded, so it falls to the
|
|
91
91
|
* optional-shape overload and its call sites still need `?.`.
|
|
92
92
|
*/
|
|
93
|
-
declare function
|
|
93
|
+
declare function createCopilotKitNodeListener(options: CopilotKitRuntimeHandlerOptions & {
|
|
94
94
|
runtime: RuntimeWithDeclaredChannels;
|
|
95
95
|
activateChannels?: true | undefined;
|
|
96
|
-
}):
|
|
96
|
+
}): NodeCopilotKitListenerWithChannels;
|
|
97
97
|
/**
|
|
98
98
|
* Overload: every other runtime (SSE, Intelligence without channels, or with
|
|
99
99
|
* activation disabled) yields a listener whose `.channels` is optional.
|
|
100
100
|
*/
|
|
101
|
-
declare function
|
|
101
|
+
declare function createCopilotKitNodeListener(options: CopilotKitRuntimeHandlerOptions): NodeCopilotKitListener;
|
|
102
102
|
//#endregion
|
|
103
|
-
export {
|
|
103
|
+
export { NodeCopilotKitListener, NodeCopilotKitListenerWithChannels, createCopilotKitNodeListener };
|
|
104
104
|
//# sourceMappingURL=node.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.mts","names":[],"sources":["../../../src/runtime/endpoints/node.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"node.d.mts","names":[],"sources":["../../../src/runtime/endpoints/node.ts"],"mappings":";;;;;;;;AAiBA;;;;;;KAAY,sBAAA,GAAyB,gBAAA;EACnC,QAAA,GAAW,eAAA;AAAA;AAWb;;;;;;;;AAAA,KAAY,kCAAA,GAAqC,gBAAA;EAqEjC,6EAnEd,QAAA,EAAU,eAAA;AAAA;;;;;;;;;;;;;;AA6EZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAVgB,4BAAA,CACd,OAAA,EAAS,+BAAA;EACP,OAAA,EAAS,2BAAA;EACT,gBAAA;AAAA,IAED,kCAAA;;;;;iBAKa,4BAAA,CACd,OAAA,EAAS,+BAAA,GACR,sBAAA"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getRuntimeLogger } from "../core/logger.mjs";
|
|
2
|
+
import { createCopilotKitRuntimeHandler } from "../core/fetch-handler.mjs";
|
|
3
|
+
import { createCopilotKitNodeHandler } from "./node-fetch-handler.mjs";
|
|
3
4
|
import { autoStartChannels } from "./auto-start-channels.mjs";
|
|
4
5
|
|
|
5
6
|
//#region src/runtime/endpoints/node.ts
|
|
6
|
-
function
|
|
7
|
-
const handler =
|
|
8
|
-
const
|
|
7
|
+
function createCopilotKitNodeListener(options) {
|
|
8
|
+
const handler = createCopilotKitRuntimeHandler(options);
|
|
9
|
+
const logger = getRuntimeLogger(options.runtime);
|
|
10
|
+
const listener = createCopilotKitNodeHandler(handler, logger);
|
|
9
11
|
listener.channels = handler.channels;
|
|
10
|
-
autoStartChannels(listener.channels);
|
|
12
|
+
autoStartChannels(listener.channels, logger);
|
|
11
13
|
return listener;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
//#endregion
|
|
15
|
-
export {
|
|
17
|
+
export { createCopilotKitNodeListener };
|
|
16
18
|
//# sourceMappingURL=node.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.mjs","names":[],"sources":["../../../src/runtime/endpoints/node.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"node.mjs","names":[],"sources":["../../../src/runtime/endpoints/node.ts"],"sourcesContent":["import { createCopilotKitRuntimeHandler } from \"../core/fetch-handler\";\nimport type { CopilotKitRuntimeHandlerOptions } from \"../core/fetch-handler\";\nimport type { RuntimeWithDeclaredChannels } from \"../core/runtime\";\nimport type { ChannelsControl } from \"../core/channel-manager\";\nimport { createCopilotKitNodeHandler } from \"./node-fetch-handler\";\nimport type { NodeFetchHandler } from \"./node-fetch-handler\";\nimport { autoStartChannels } from \"./auto-start-channels\";\nimport { getRuntimeLogger } from \"../core/logger\";\n\n/**\n * A Node.js HTTP request listener that is also a callable object carrying an\n * optional {@link ChannelsControl} surface, mirroring\n * `CopilotKitRuntimeFetchHandler.channels`. Node is the long-running,\n * lifecycle-owning entry point for the runtime, so it is the surface that\n * exposes `.channels` for callers that need to observe or stop the managed\n * Channel activation the listener starts at creation.\n */\nexport type NodeCopilotKitListener = NodeFetchHandler & {\n channels?: ChannelsControl;\n};\n\n/**\n * A {@link NodeCopilotKitListener} whose {@link ChannelsControl} surface is\n * guaranteed present. Returned when the runtime was constructed with at least\n * one declared Intelligence Channel and activation was not opted out of, so the\n * documented `listener.channels.ready(...)` call type-checks without a `!` or a\n * `?.` under strict TypeScript — the Node mirror of\n * `CopilotKitRuntimeFetchHandlerWithChannels`.\n */\nexport type NodeCopilotKitListenerWithChannels = NodeFetchHandler & {\n /** Lifecycle control surface for the runtime's declared managed Channels. */\n channels: ChannelsControl;\n};\n\n/**\n * Convenience wrapper for creating a Node.js HTTP request listener\n * from CopilotKit runtime handler options.\n *\n * When the runtime declares managed Channels (and activation was not opted\n * out of via `activateChannels: false`), the returned listener exposes\n * `.channels` — the same {@link ChannelsControl} surface carried by the\n * underlying fetch handler.\n *\n * ## Managed Channels lifecycle\n *\n * Creating the listener STARTS activation — which opens the persistent Realtime\n * Gateway WebSocket and starts every direct adapter on the declared Channels.\n * Node owns its own process lifetime, so there is nothing to defer to and no\n * required incantation: a declared Channel connects because it was declared.\n * (The generic `createCopilotKitRuntimeHandler` is the opposite — it stays lazy for\n * serverless/edge safety; see its TSDoc.)\n *\n * `await listener.channels.ready()` is therefore OPTIONAL and purely\n * await-and-observe: it resolves once every declared Channel has settled to\n * `online`/`setup_required` and rejects with the activation failure, observing\n * the activation started at creation rather than triggering a second one. Await\n * it when startup should block on Channels being live (or should exit non-zero\n * when they are not); skip it and activation failures land in the logs instead.\n * `listener.channels.stop()` tears activation down.\n *\n * Pass `activateChannels: false` to build no control surface and open no socket\n * — the clean opt-out for a test or a short-lived script that mounts the\n * listener without wanting its Channels connected.\n *\n * @example\n * ```typescript\n * import { createServer } from \"node:http\";\n * import { CopilotKitRuntime } from \"@copilotkit/runtime\";\n * import { createCopilotKitNodeListener } from \"@copilotkit/runtime/node\";\n *\n * const listener = createCopilotKitNodeListener({\n * runtime: new CopilotKitRuntime({ agents: { ... } }),\n * basePath: \"/api/copilotkit\",\n * cors: true,\n * });\n * createServer(listener).listen(3000);\n * // Declared managed Channels are already connecting at this point.\n *\n * // Optional: block startup on them being live. Bound it so one wedged adapter\n * // cannot hang startup forever.\n * await listener.channels.ready({ timeoutMs: 30_000 });\n * ```\n */\n/**\n * Overload: a runtime constructed with at least one declared Intelligence\n * Channel (a {@link RuntimeWithDeclaredChannels}-branded runtime), when\n * activation is not disabled, yields a listener with a **non-optional**\n * {@link ChannelsControl}. `activateChannels` is constrained to\n * `true | undefined` here so passing `activateChannels: false` (which leaves no\n * `.channels`) falls through to the optional-shape overload below rather than\n * dishonestly promising a control surface that will not exist. Mirrors the\n * `createCopilotKitRuntimeHandler` overload pair so the brand survives the wrapper.\n *\n * The brand comes from constructing the runtime with a literal non-empty\n * `channels` list (`readonly [Channel, ...Channel[]]`). A runtime built from a\n * dynamically-assembled `Channel[]` is not branded, so it falls to the\n * optional-shape overload and its call sites still need `?.`.\n */\nexport function createCopilotKitNodeListener(\n options: CopilotKitRuntimeHandlerOptions & {\n runtime: RuntimeWithDeclaredChannels;\n activateChannels?: true | undefined;\n },\n): NodeCopilotKitListenerWithChannels;\n/**\n * Overload: every other runtime (SSE, Intelligence without channels, or with\n * activation disabled) yields a listener whose `.channels` is optional.\n */\nexport function createCopilotKitNodeListener(\n options: CopilotKitRuntimeHandlerOptions,\n): NodeCopilotKitListener;\nexport function createCopilotKitNodeListener(\n options: CopilotKitRuntimeHandlerOptions,\n): NodeCopilotKitListener {\n const handler = createCopilotKitRuntimeHandler(options);\n const logger = getRuntimeLogger(options.runtime);\n const listener: NodeCopilotKitListener = createCopilotKitNodeHandler(\n handler,\n logger,\n );\n listener.channels = handler.channels;\n autoStartChannels(listener.channels, logger);\n return listener;\n}\n"],"mappings":";;;;;;AA+GA,SAAgB,6BACd,SACwB;CACxB,MAAM,UAAU,+BAA+B,QAAQ;CACvD,MAAM,SAAS,iBAAiB,QAAQ,QAAQ;CAChD,MAAM,WAAmC,4BACvC,SACA,OACD;AACD,UAAS,WAAW,QAAQ;AAC5B,mBAAkB,SAAS,UAAU,OAAO;AAC5C,QAAO"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ArgsParser, GenerateSandboxedUIParams, OnParamEvent, OpenGenerativeUIMiddleware } from "./open-generative-ui-middleware.cjs";
|
|
2
|
+
import { RecordedEventTransformOptions, transformRecordedEvents } from "./recorded-events.cjs";
|
|
3
|
+
import { A2UIMiddleware, A2UIMiddlewareConfig as A2UIMiddlewareConfig$1 } from "@ag-ui/a2ui-middleware";
|
|
4
|
+
export { A2UIMiddleware, type A2UIMiddlewareConfig$1 as A2UIMiddlewareConfig };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ArgsParser, GenerateSandboxedUIParams, OnParamEvent, OpenGenerativeUIMiddleware } from "./open-generative-ui-middleware.mjs";
|
|
2
|
+
import { RecordedEventTransformOptions, transformRecordedEvents } from "./recorded-events.mjs";
|
|
3
|
+
import { A2UIMiddleware as A2UIMiddleware$1, A2UIMiddlewareConfig as A2UIMiddlewareConfig$1 } from "@ag-ui/a2ui-middleware";
|
|
4
|
+
export { A2UIMiddleware$1 as A2UIMiddleware, type A2UIMiddlewareConfig$1 as A2UIMiddlewareConfig };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ArgsParser, OpenGenerativeUIMiddleware } from "./open-generative-ui-middleware.mjs";
|
|
2
|
+
import { transformRecordedEvents } from "./recorded-events.mjs";
|
|
3
|
+
import { A2UIMiddleware as A2UIMiddleware$1 } from "@ag-ui/a2ui-middleware";
|
|
4
|
+
|
|
5
|
+
export { A2UIMiddleware$1 as A2UIMiddleware };
|