@jini-ai/provider-plugins 0.7.3-next.2 → 0.7.3-next.3
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/catalog.json +25 -20
- package/dist/model-proxy-anthropic/index.d.ts +18 -0
- package/dist/model-proxy-anthropic/index.js +32 -0
- package/dist/model-proxy-azure/index.d.ts +19 -0
- package/dist/model-proxy-azure/index.js +32 -0
- package/dist/model-proxy-google/index.d.ts +18 -0
- package/dist/model-proxy-google/index.js +25 -0
- package/dist/model-proxy-ollama/index.d.ts +8 -0
- package/dist/model-proxy-ollama/index.js +13 -0
- package/dist/model-proxy-openai/index.d.ts +8 -0
- package/dist/model-proxy-openai/index.js +13 -0
- package/dist/observability-opentelemetry/otel-port.d.ts +3 -1
- package/dist/observability-opentelemetry/otel-port.js +20 -7
- package/dist/xai/media/index.d.ts +67 -0
- package/dist/xai/media/index.js +132 -0
- package/dist/xai/oauth-port.d.ts +132 -0
- package/dist/xai/oauth-port.js +5 -0
- package/dist/xai/preset.d.ts +22 -0
- package/dist/xai/preset.js +28 -0
- package/dist/xai/routes.d.ts +108 -0
- package/dist/xai/routes.js +658 -0
- package/package.json +67 -26
- package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/jini.plugin.json +3 -3
- package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/package-license.json +1 -1
- package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/server/index.mjs +2 -2
- package/plugins/analytics-posthog/{0.7.3-next.2 → 0.7.3-next.3}/README.md +1 -1
- package/plugins/analytics-posthog/{0.7.3-next.2 → 0.7.3-next.3}/jini.plugin.json +4 -4
- package/plugins/analytics-posthog/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/package-license.json +1 -1
- package/plugins/analytics-posthog/{0.7.3-next.2 → 0.7.3-next.3}/server/index.mjs +2 -2
- package/plugins/charts-echarts/{0.7.3-next.2 → 0.7.3-next.3}/client/provider.js +1 -1
- package/plugins/charts-echarts/{0.7.3-next.2 → 0.7.3-next.3}/jini.plugin.json +3 -3
- package/plugins/charts-echarts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/package-license.json +1 -1
- package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/jini.plugin.json +2 -2
- package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/package-license.json +1 -1
- package/plugins/fixture-provider/{0.7.3-next.2 → 0.7.3-next.3}/jini.plugin.json +2 -2
- package/plugins/fixture-provider/0.7.3-next.3/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
- package/plugins/formspree/{0.7.3-next.2 → 0.7.3-next.3}/jini.plugin.json +2 -2
- package/plugins/formspree/0.7.3-next.3/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
- package/plugins/google-forms/{0.7.3-next.2 → 0.7.3-next.3}/jini.plugin.json +2 -2
- package/plugins/google-forms/0.7.3-next.3/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
- package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/README.md +1 -1
- package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/jini.plugin.json +5 -5
- package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_core/package-license.json +1 -1
- package/plugins/observability-opentelemetry/0.7.3-next.3/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
- package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/server/index.mjs +22 -13
- package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/README.md +1 -1
- package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/jini.plugin.json +5 -5
- package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_core/package-license.json +1 -1
- package/plugins/observability-sentry/0.7.3-next.3/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
- package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/server/index.mjs +18 -8
- package/plugins/payments-stripe/{0.7.3-next.2 → 0.7.3-next.3}/jini.plugin.json +2 -2
- package/plugins/payments-stripe/0.7.3-next.3/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
- package/plugins/xai/0.7.3-next.3/jini.plugin.json +48 -0
- package/plugins/xai/0.7.3-next.3/licenses/_jini-ai_core/LICENSE +201 -0
- package/plugins/xai/0.7.3-next.3/licenses/_jini-ai_core/package-license.json +5 -0
- package/plugins/xai/0.7.3-next.3/licenses/_jini-ai_protocol/LICENSE +201 -0
- package/plugins/xai/0.7.3-next.3/licenses/_jini-ai_protocol/package-license.json +5 -0
- package/plugins/xai/0.7.3-next.3/licenses/_jini-ai_provider-plugins/LICENSE +201 -0
- package/plugins/xai/0.7.3-next.3/licenses/_jini-ai_provider-plugins/NOTICE +28 -0
- package/plugins/xai/0.7.3-next.3/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
- package/plugins/xai/0.7.3-next.3/licenses/zod/LICENSE +21 -0
- package/plugins/xai/0.7.3-next.3/licenses/zod/package-license.json +5 -0
- package/plugins/xai/0.7.3-next.3/server/index.mjs +1597 -0
- package/plugins/fixture-provider/0.7.3-next.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
- package/plugins/formspree/0.7.3-next.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
- package/plugins/google-forms/0.7.3-next.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
- package/plugins/observability-opentelemetry/0.7.3-next.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
- package/plugins/observability-sentry/0.7.3-next.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
- package/plugins/payments-stripe/0.7.3-next.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
- /package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/CHANGELOG.md +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/LICENSE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/NOTICE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/README.md +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/licenses/langfuse/LICENSE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/licenses/langfuse/LICENSE-SOURCE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/licenses/langfuse/SOURCE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/licenses/langfuse/package-license.json +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/licenses/langfuse-core/LICENSE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/licenses/langfuse-core/LICENSE-SOURCE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/licenses/langfuse-core/SOURCE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/licenses/langfuse-core/package-license.json +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/licenses/mustache/LICENSE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.3-next.2 → 0.7.3-next.3}/licenses/mustache/package-license.json +0 -0
- /package/plugins/analytics-posthog/{0.7.3-next.2 → 0.7.3-next.3}/CHANGELOG.md +0 -0
- /package/plugins/analytics-posthog/{0.7.3-next.2 → 0.7.3-next.3}/LICENSE +0 -0
- /package/plugins/analytics-posthog/{0.7.3-next.2 → 0.7.3-next.3}/NOTICE +0 -0
- /package/plugins/analytics-posthog/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
- /package/plugins/analytics-posthog/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
- /package/plugins/analytics-posthog/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_posthog_core/LICENSE +0 -0
- /package/plugins/analytics-posthog/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_posthog_core/package-license.json +0 -0
- /package/plugins/analytics-posthog/{0.7.3-next.2 → 0.7.3-next.3}/licenses/posthog-js/LICENSE +0 -0
- /package/plugins/analytics-posthog/{0.7.3-next.2 → 0.7.3-next.3}/licenses/posthog-js/package-license.json +0 -0
- /package/plugins/analytics-posthog/{0.7.3-next.2 → 0.7.3-next.3}/licenses/posthog-node/LICENSE +0 -0
- /package/plugins/analytics-posthog/{0.7.3-next.2 → 0.7.3-next.3}/licenses/posthog-node/package-license.json +0 -0
- /package/plugins/analytics-posthog/{0.7.3-next.2 → 0.7.3-next.3}/server/consent-adapter.mjs +0 -0
- /package/plugins/analytics-posthog/{0.7.3-next.2 → 0.7.3-next.3}/server/posthog-browser.js +0 -0
- /package/plugins/charts-echarts/{0.7.3-next.2 → 0.7.3-next.3}/client/styles.css +0 -0
- /package/plugins/charts-echarts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
- /package/plugins/charts-echarts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
- /package/plugins/charts-echarts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/echarts/LICENSE +0 -0
- /package/plugins/charts-echarts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/echarts/NOTICE +0 -0
- /package/plugins/charts-echarts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/echarts/package-license.json +0 -0
- /package/plugins/charts-echarts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/tslib/LICENSE.txt +0 -0
- /package/plugins/charts-echarts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/tslib/package-license.json +0 -0
- /package/plugins/charts-echarts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/zrender/LICENSE +0 -0
- /package/plugins/charts-echarts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/zrender/package-license.json +0 -0
- /package/plugins/charts-echarts/{0.7.3-next.2 → 0.7.3-next.3}/server/index.mjs +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/client/provider.js +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/client/styles.css +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_reduxjs_toolkit/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_reduxjs_toolkit/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/clsx/license +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/clsx/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-array/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-array/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-color/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-color/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-format/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-format/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-interpolate/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-interpolate/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-path/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-path/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-scale/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-scale/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-shape/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-shape/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-time/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-time/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-time-format/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/d3-time-format/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/decimal.js-light/LICENCE.md +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/decimal.js-light/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/es-toolkit/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/es-toolkit/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/eventemitter3/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/eventemitter3/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/immer/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/immer/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/internmap/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/internmap/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/react/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/react/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/react-dom/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/react-dom/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/react-is/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/react-is/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/react-redux/LICENSE.md +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/react-redux/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/recharts/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/recharts/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/redux/LICENSE.md +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/redux/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/redux-thunk/LICENSE.md +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/redux-thunk/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/reselect/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/reselect/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/scheduler/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/scheduler/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/tiny-invariant/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/tiny-invariant/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/use-sync-external-store/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/use-sync-external-store/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/victory-vendor/LICENSE.txt +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/licenses/victory-vendor/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.3-next.2 → 0.7.3-next.3}/server/index.mjs +0 -0
- /package/plugins/fixture-provider/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
- /package/plugins/fixture-provider/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
- /package/plugins/fixture-provider/{0.7.3-next.2 → 0.7.3-next.3}/server/index.mjs +0 -0
- /package/plugins/formspree/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
- /package/plugins/formspree/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
- /package/plugins/formspree/{0.7.3-next.2 → 0.7.3-next.3}/server/index.mjs +0 -0
- /package/plugins/google-forms/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
- /package/plugins/google-forms/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
- /package/plugins/google-forms/{0.7.3-next.2 → 0.7.3-next.3}/server/index.mjs +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/CHANGELOG.md +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/NOTICE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_core/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_api/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_api/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_api-logs/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_api-logs/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_context-async-hooks/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_context-async-hooks/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_core/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_core/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_otlp-exporter-base/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_otlp-exporter-base/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_otlp-transformer/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_otlp-transformer/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_resources/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_resources/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_sdk-metrics/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_sdk-metrics/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_sdk-trace/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_sdk-trace/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_sdk-trace-base/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_sdk-trace-base/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_sdk-trace-node/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_sdk-trace-node/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_semantic-conventions/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_semantic-conventions/package-license.json +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/CHANGELOG.md +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/NOTICE +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_core/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_api/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_opentelemetry_api/package-license.json +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_sentry_conventions/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_sentry_conventions/package-license.json +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_sentry_core/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_sentry_core/package-license.json +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_sentry_node/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_sentry_node/package-license.json +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_sentry_opentelemetry/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_sentry_opentelemetry/package-license.json +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_sentry_server-runtime-injection/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_sentry_server-runtime-injection/LICENSE-SOURCE +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_sentry_server-runtime-injection/package-license.json +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_sentry_server-utils/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_sentry_server-utils/LICENSE-SOURCE +0 -0
- /package/plugins/observability-sentry/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_sentry_server-utils/package-license.json +0 -0
- /package/plugins/payments-stripe/{0.7.3-next.2 → 0.7.3-next.3}/CHANGELOG.md +0 -0
- /package/plugins/payments-stripe/{0.7.3-next.2 → 0.7.3-next.3}/LICENSE +0 -0
- /package/plugins/payments-stripe/{0.7.3-next.2 → 0.7.3-next.3}/NOTICE +0 -0
- /package/plugins/payments-stripe/{0.7.3-next.2 → 0.7.3-next.3}/README.md +0 -0
- /package/plugins/payments-stripe/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
- /package/plugins/payments-stripe/{0.7.3-next.2 → 0.7.3-next.3}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
- /package/plugins/payments-stripe/{0.7.3-next.2 → 0.7.3-next.3}/server/index.mjs +0 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/** @file The generic OAuth (PKCE) mechanics the xAI routes call, stated as one injected port. The host binds it (the OAuth
|
|
2
|
+
* functions of `@jini-ai/agent-runtime`, which keeps owning them) and proves the match with `satisfies OAuthPkceFlowPort`.
|
|
3
|
+
* The OAuth types are restated here from `@jini-ai/agent-runtime/providers/{oauth-provider,oauth-tokens,oauth-credentials,oauth-callback-server,pkce}`
|
|
4
|
+
* so this plugin imports no agent-runtime implementation. The xAI preset itself lives in `./preset.ts`. */
|
|
5
|
+
/** A provider's OAuth+PKCE client config. */
|
|
6
|
+
export interface OAuthPkceProviderConfig {
|
|
7
|
+
/** Stable id used to key the token in any per-provider cache and to guard against state/provider mismatch. */
|
|
8
|
+
providerId: string;
|
|
9
|
+
issuer: string;
|
|
10
|
+
authorizationEndpoint: string;
|
|
11
|
+
tokenEndpoint: string;
|
|
12
|
+
clientId: string;
|
|
13
|
+
scope: string;
|
|
14
|
+
}
|
|
15
|
+
/** RFC 6749 §5.1 token endpoint response (subset). */
|
|
16
|
+
export interface OAuthTokenResponse {
|
|
17
|
+
access_token: string;
|
|
18
|
+
token_type?: string;
|
|
19
|
+
expires_in?: number;
|
|
20
|
+
refresh_token?: string;
|
|
21
|
+
scope?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Stored OAuth token. Mirrors the relevant subset of an OAuth 2.0 token-endpoint response (RFC 6749 §5.1).
|
|
25
|
+
* `client_id`, `redirect_uri`, and `issuer` aren't persisted because they're constants in the provider's own config.
|
|
26
|
+
*/
|
|
27
|
+
export interface StoredOAuthToken {
|
|
28
|
+
/** The bearer token to send as `Authorization: Bearer ...`. */
|
|
29
|
+
accessToken: string;
|
|
30
|
+
/** Refresh token (RFC 6749 §6) if the auth server issued one. */
|
|
31
|
+
refreshToken?: string;
|
|
32
|
+
/** Absolute epoch ms at which `accessToken` expires. Optional: some providers never expire. */
|
|
33
|
+
expiresAt?: number;
|
|
34
|
+
/** RFC 6749 §5.1 token_type. Almost always `Bearer`. */
|
|
35
|
+
tokenType: string;
|
|
36
|
+
/** Space-separated scopes granted (verbatim from the token response). */
|
|
37
|
+
scope?: string;
|
|
38
|
+
/** Wall-clock epoch ms when this record was first persisted. */
|
|
39
|
+
savedAt: number;
|
|
40
|
+
}
|
|
41
|
+
export interface ResolvedOAuthCredential {
|
|
42
|
+
accessToken: string;
|
|
43
|
+
/** Whether this came back unchanged from disk or was refreshed inline. */
|
|
44
|
+
source: 'stored' | 'refreshed';
|
|
45
|
+
}
|
|
46
|
+
export type OAuthCallbackOutcome = {
|
|
47
|
+
kind: 'ok';
|
|
48
|
+
code: string;
|
|
49
|
+
state: string;
|
|
50
|
+
} | {
|
|
51
|
+
kind: 'error';
|
|
52
|
+
error: string;
|
|
53
|
+
state?: string;
|
|
54
|
+
};
|
|
55
|
+
export interface OAuthCallbackListener {
|
|
56
|
+
/** Where the listener is actually bound (informational, esp. for tests). */
|
|
57
|
+
readonly address: {
|
|
58
|
+
host: string;
|
|
59
|
+
port: number;
|
|
60
|
+
};
|
|
61
|
+
/** Stops the listener early (e.g. the user cancelled OAuth in the UI). */
|
|
62
|
+
stop(): Promise<void>;
|
|
63
|
+
}
|
|
64
|
+
/** The in-memory pending-authorization cache behind the begin/complete dance. The daemon only reads it; `begin` fills it. */
|
|
65
|
+
export interface OAuthPendingAuthorizations {
|
|
66
|
+
/** One-shot: removes the state before returning it, so a callback replay cannot reuse it. */
|
|
67
|
+
consume(required: {
|
|
68
|
+
state: string;
|
|
69
|
+
}): unknown;
|
|
70
|
+
size(): number;
|
|
71
|
+
/** Stops the cache's background sweeper. */
|
|
72
|
+
stop(): void;
|
|
73
|
+
}
|
|
74
|
+
/** `Pending` is the host's concrete cache: `begin` fills the cache that `createPendingCache` made, so a host states its own
|
|
75
|
+
* class (`OAuthPkceFlowPort<PendingAuthCache>`) and the check against the real functions stays exact. The routes take the default. */
|
|
76
|
+
export interface OAuthPkceFlowPort<Pending extends OAuthPendingAuthorizations = OAuthPendingAuthorizations> {
|
|
77
|
+
begin(required: {
|
|
78
|
+
config: OAuthPkceProviderConfig;
|
|
79
|
+
pending: Pending;
|
|
80
|
+
redirectUri: string;
|
|
81
|
+
}): {
|
|
82
|
+
authorizeUrl: string;
|
|
83
|
+
state: string;
|
|
84
|
+
};
|
|
85
|
+
/** Throws when `state` is unknown, expired, already consumed, or issued for a different provider. */
|
|
86
|
+
complete(required: {
|
|
87
|
+
config: OAuthPkceProviderConfig;
|
|
88
|
+
pending: Pending;
|
|
89
|
+
state: string;
|
|
90
|
+
code: string;
|
|
91
|
+
}, optional?: {
|
|
92
|
+
fetchImpl?: typeof fetch;
|
|
93
|
+
}): Promise<OAuthTokenResponse>;
|
|
94
|
+
readonly tokens: {
|
|
95
|
+
/** `null` when none is stored (or the persisted entry is malformed). */
|
|
96
|
+
get(required: {
|
|
97
|
+
dataDir: string;
|
|
98
|
+
fileName: string;
|
|
99
|
+
}): Promise<StoredOAuthToken | null>;
|
|
100
|
+
set(required: {
|
|
101
|
+
dataDir: string;
|
|
102
|
+
fileName: string;
|
|
103
|
+
token: StoredOAuthToken;
|
|
104
|
+
}): Promise<void>;
|
|
105
|
+
/** A no-op when absent. */
|
|
106
|
+
clear(required: {
|
|
107
|
+
dataDir: string;
|
|
108
|
+
fileName: string;
|
|
109
|
+
}): Promise<void>;
|
|
110
|
+
};
|
|
111
|
+
/** A usable bearer, refreshed in place when near expiry; `null` when nothing is stored or the refresh fails. */
|
|
112
|
+
resolveBearer(required: {
|
|
113
|
+
config: OAuthPkceProviderConfig;
|
|
114
|
+
tokenFileName: string;
|
|
115
|
+
dataDir: string;
|
|
116
|
+
}, optional?: {
|
|
117
|
+
fetchImpl?: typeof fetch;
|
|
118
|
+
}): Promise<ResolvedOAuthCredential | null>;
|
|
119
|
+
/** Opens the one-shot loopback listener for the OAuth redirect; it self-closes after the first matching callback or the timeout. */
|
|
120
|
+
startCallbackListener(required: {
|
|
121
|
+
host: string;
|
|
122
|
+
port: number;
|
|
123
|
+
path: string;
|
|
124
|
+
expectedState: string;
|
|
125
|
+
onCallback: (outcome: OAuthCallbackOutcome) => Promise<void> | void;
|
|
126
|
+
}, optional?: {
|
|
127
|
+
timeoutMs?: number;
|
|
128
|
+
}): Promise<OAuthCallbackListener>;
|
|
129
|
+
createPendingCache(required?: Record<string, never>, optional?: {
|
|
130
|
+
ttlMs?: number;
|
|
131
|
+
}): Pending;
|
|
132
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** @file The generic OAuth (PKCE) mechanics the xAI routes call, stated as one injected port. The host binds it (the OAuth
|
|
2
|
+
* functions of `@jini-ai/agent-runtime`, which keeps owning them) and proves the match with `satisfies OAuthPkceFlowPort`.
|
|
3
|
+
* The OAuth types are restated here from `@jini-ai/agent-runtime/providers/{oauth-provider,oauth-tokens,oauth-credentials,oauth-callback-server,pkce}`
|
|
4
|
+
* so this plugin imports no agent-runtime implementation. The xAI preset itself lives in `./preset.ts`. */
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** @file The concrete xAI OAuth (PKCE) preset: provider config, fixed loopback redirect and redirect-URI helper. Moved here from
|
|
2
|
+
* `@jini-ai/agent-runtime`'s generic `providers/oauth-provider.ts`, which keeps the config-driven mechanics. */
|
|
3
|
+
import type { OAuthPkceProviderConfig } from './oauth-port.js';
|
|
4
|
+
/** Stable provider id used to key an xAI token in any per-provider cache. */
|
|
5
|
+
export declare const XAI_OAUTH_PROVIDER_ID = "xai";
|
|
6
|
+
export declare const XAI_OAUTH_REDIRECT_HOST = "127.0.0.1";
|
|
7
|
+
export declare const XAI_OAUTH_REDIRECT_PORT = 56121;
|
|
8
|
+
export declare const XAI_OAUTH_REDIRECT_PATH = "/callback";
|
|
9
|
+
/**
|
|
10
|
+
* xAI Grok OAuth 2.0 + PKCE provider config. xAI doesn't speak MCP and
|
|
11
|
+
* doesn't expose Dynamic Client Registration, so the issuer / endpoints /
|
|
12
|
+
* client_id / scope are hardcoded rather than discovered — same as the
|
|
13
|
+
* origin.
|
|
14
|
+
*
|
|
15
|
+
* `clientId` is a proof-of-concept id reused from NousResearch/hermes-agent
|
|
16
|
+
* (xAI does not publish a public application-registration flow); a
|
|
17
|
+
* consumer that provisions its own client_id with xAI should override this
|
|
18
|
+
* field rather than edit the constant.
|
|
19
|
+
*/
|
|
20
|
+
export declare const XAI_OAUTH_PROVIDER_CONFIG: OAuthPkceProviderConfig;
|
|
21
|
+
/** The fixed loopback redirect URI xAI's client_id is registered against. */
|
|
22
|
+
export declare function xaiOAuthRedirectUri(): string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Stable provider id used to key an xAI token in any per-provider cache. */
|
|
2
|
+
export const XAI_OAUTH_PROVIDER_ID = 'xai';
|
|
3
|
+
export const XAI_OAUTH_REDIRECT_HOST = '127.0.0.1';
|
|
4
|
+
export const XAI_OAUTH_REDIRECT_PORT = 56121;
|
|
5
|
+
export const XAI_OAUTH_REDIRECT_PATH = '/callback';
|
|
6
|
+
/**
|
|
7
|
+
* xAI Grok OAuth 2.0 + PKCE provider config. xAI doesn't speak MCP and
|
|
8
|
+
* doesn't expose Dynamic Client Registration, so the issuer / endpoints /
|
|
9
|
+
* client_id / scope are hardcoded rather than discovered — same as the
|
|
10
|
+
* origin.
|
|
11
|
+
*
|
|
12
|
+
* `clientId` is a proof-of-concept id reused from NousResearch/hermes-agent
|
|
13
|
+
* (xAI does not publish a public application-registration flow); a
|
|
14
|
+
* consumer that provisions its own client_id with xAI should override this
|
|
15
|
+
* field rather than edit the constant.
|
|
16
|
+
*/
|
|
17
|
+
export const XAI_OAUTH_PROVIDER_CONFIG = {
|
|
18
|
+
providerId: XAI_OAUTH_PROVIDER_ID,
|
|
19
|
+
issuer: 'https://auth.x.ai',
|
|
20
|
+
authorizationEndpoint: 'https://auth.x.ai/oauth2/authorize',
|
|
21
|
+
tokenEndpoint: 'https://auth.x.ai/oauth2/token',
|
|
22
|
+
clientId: 'b1a00492-073a-47ea-816f-4c329264a828',
|
|
23
|
+
scope: 'openid profile email offline_access grok-cli:access api:access',
|
|
24
|
+
};
|
|
25
|
+
/** The fixed loopback redirect URI xAI's client_id is registered against. */
|
|
26
|
+
export function xaiOAuthRedirectUri() {
|
|
27
|
+
return `http://${XAI_OAUTH_REDIRECT_HOST}:${XAI_OAUTH_REDIRECT_PORT}${XAI_OAUTH_REDIRECT_PATH}`;
|
|
28
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { BaseUrlGuardPort } from '@jini-ai/core/contracts/agents';
|
|
2
|
+
import { type JsonRouteSpec, type ReportRouteInternalError, type RouteHostContext, type ServerRoute } from '@jini-ai/core/contracts/server';
|
|
3
|
+
import type { OAuthCallbackListener, OAuthPendingAuthorizations, OAuthPkceFlowPort, OAuthPkceProviderConfig, OAuthTokenResponse, StoredOAuthToken } from './oauth-port.js';
|
|
4
|
+
/** What a host hands the xAI route list: the same-origin policy and incident sink, the reporter, and the body ceiling.
|
|
5
|
+
* A structural subset of the daemon's route host, so a daemon host passes its own object with no adapter. */
|
|
6
|
+
export interface XaiRouteHost {
|
|
7
|
+
readonly context: RouteHostContext;
|
|
8
|
+
readonly reportInternalError: ReportRouteInternalError;
|
|
9
|
+
readonly jsonBodyMaxBytes: number;
|
|
10
|
+
}
|
|
11
|
+
export interface XaiInternalErrorContext {
|
|
12
|
+
readonly source: 'oauth-start' | 'oauth-complete' | 'oauth-disconnect' | 'auth-status' | 'search';
|
|
13
|
+
readonly correlationId: string;
|
|
14
|
+
readonly error: unknown;
|
|
15
|
+
}
|
|
16
|
+
export interface XaiHttpDeps {
|
|
17
|
+
/** The OAuth+PKCE mechanics, bound by the host (agent-runtime's functions). Required: this plugin imports no implementation. */
|
|
18
|
+
readonly oauth: OAuthPkceFlowPort;
|
|
19
|
+
/** Refuses a search base URL that points at an internal address (SSRF guard). Required, host-bound. */
|
|
20
|
+
readonly baseUrlGuard: BaseUrlGuardPort;
|
|
21
|
+
/** The clock for token save/expiry instants. Required, host-bound. */
|
|
22
|
+
readonly now: () => number;
|
|
23
|
+
/** Directory the xAI OAuth token is persisted under (`<dataDir>/<tokenFileName>`). Defaults to `process.cwd()` — a host with a real dataDir should override this (matching `create-local-node-daemon.ts`'s `memoryRoutesDeps.dataDir` pattern). */
|
|
24
|
+
readonly dataDir?: string;
|
|
25
|
+
/** On-disk file name for the stored token, scoped under `dataDir`. Defaults to `xai-oauth-token.json`. */
|
|
26
|
+
readonly tokenFileName?: string;
|
|
27
|
+
/** The OAuth+PKCE provider config to drive the dance against. Defaults to `@jini-ai/agent-runtime`'s real `XAI_OAUTH_PROVIDER_CONFIG` preset — override only to point at a different client_id/issuer (e.g. once a non-PoC xAI client_id is provisioned). */
|
|
28
|
+
readonly providerConfig?: OAuthPkceProviderConfig;
|
|
29
|
+
/** Loopback callback host `providerConfig.clientId` is registered against. Defaults to `XAI_OAUTH_REDIRECT_HOST` (`127.0.0.1`) — see module doc on why this is fixed for xAI's PoC client_id. */
|
|
30
|
+
readonly callbackHost?: string;
|
|
31
|
+
/** Loopback callback port `providerConfig.clientId` is registered against. Defaults to `XAI_OAUTH_REDIRECT_PORT` (`56121`). */
|
|
32
|
+
readonly callbackPort?: number;
|
|
33
|
+
/** Loopback callback path `providerConfig.clientId` is registered against. Defaults to `XAI_OAUTH_REDIRECT_PATH` (`/callback`). */
|
|
34
|
+
readonly callbackPath?: string;
|
|
35
|
+
/** In-memory pending-authorization cache backing the begin/complete dance. Defaults to a fresh 30-minute `PendingAuthCache`, shared across every request `xaiRoutes` mounts — see module doc on why this must be resolved once, not per-call. */
|
|
36
|
+
readonly pending?: OAuthPendingAuthorizations;
|
|
37
|
+
/** Mutable slot holding the in-flight loopback listener, if any (only one OAuth dance can be in flight at a time — the port is a singleton). Shared the same way `pending` is. Defaults to `{ current: null }`. */
|
|
38
|
+
readonly listenerRef?: {
|
|
39
|
+
current: OAuthCallbackListener | null;
|
|
40
|
+
};
|
|
41
|
+
/** Base URL for xAI's Responses API (`POST {searchBaseUrl}/responses`). Defaults to `https://api.x.ai/v1`. */
|
|
42
|
+
readonly searchBaseUrl?: string;
|
|
43
|
+
/** Model id sent to the Responses API when a search request doesn't supply its own. Defaults to xAI's real `grok-4.20-reasoning`. */
|
|
44
|
+
readonly searchDefaultModel?: string;
|
|
45
|
+
readonly fetchImpl?: typeof fetch;
|
|
46
|
+
/** Deadline for one search request *and* its response body, in milliseconds. Defaults to {@link DEFAULT_SEARCH_TIMEOUT_MS}. */
|
|
47
|
+
readonly searchTimeoutMs?: number;
|
|
48
|
+
/** Required for direct handlers; {@link xaiRoutes} binds the host's reporter. */ readonly reportInternalError: ReportRouteInternalError;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Maps a token-endpoint response onto the persisted record. Pure (the save instant is a parameter)
|
|
52
|
+
* so the mapping is testable on its own. `token_type` is optional on the wire type; today's
|
|
53
|
+
* exchange path always supplies it (openid-client rejects a response without one), and an absent
|
|
54
|
+
* value is stored as RFC 6750's `Bearer`. Exported for this module's tests; not re-exported.
|
|
55
|
+
*/
|
|
56
|
+
export declare function toStoredOAuthToken({ tokenResp, nowMs }: {
|
|
57
|
+
tokenResp: OAuthTokenResponse;
|
|
58
|
+
nowMs: number;
|
|
59
|
+
}): StoredOAuthToken;
|
|
60
|
+
export interface XaiOauthStartResponse {
|
|
61
|
+
readonly authorizeUrl: string;
|
|
62
|
+
readonly state: string;
|
|
63
|
+
readonly callback: {
|
|
64
|
+
readonly host: string;
|
|
65
|
+
readonly port: number;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export declare const xaiOauthStartRoute: JsonRouteSpec<void, XaiOauthStartResponse, XaiHttpDeps, undefined>;
|
|
69
|
+
export interface XaiOkResponse {
|
|
70
|
+
readonly ok: true;
|
|
71
|
+
}
|
|
72
|
+
interface XaiOauthCompleteRequest {
|
|
73
|
+
readonly state: string;
|
|
74
|
+
readonly code: string;
|
|
75
|
+
}
|
|
76
|
+
export declare const xaiOauthCompleteRoute: JsonRouteSpec<XaiOauthCompleteRequest, XaiOkResponse, XaiHttpDeps, undefined>;
|
|
77
|
+
export declare const xaiOauthCancelRoute: JsonRouteSpec<void, XaiOkResponse, XaiHttpDeps, undefined>;
|
|
78
|
+
export interface XaiAuthStatusResponse {
|
|
79
|
+
readonly connected: boolean;
|
|
80
|
+
readonly expiresAt: number | null;
|
|
81
|
+
readonly scope: string | null;
|
|
82
|
+
readonly savedAt: number | null;
|
|
83
|
+
readonly listening: boolean;
|
|
84
|
+
}
|
|
85
|
+
export declare const xaiAuthStatusRoute: JsonRouteSpec<void, XaiAuthStatusResponse, XaiHttpDeps, undefined>;
|
|
86
|
+
export declare const xaiOauthDisconnectRoute: JsonRouteSpec<void, XaiOkResponse, XaiHttpDeps, undefined>;
|
|
87
|
+
interface XaiSearchRequest {
|
|
88
|
+
readonly query: string;
|
|
89
|
+
readonly allowedXHandles?: readonly string[];
|
|
90
|
+
readonly excludedXHandles?: readonly string[];
|
|
91
|
+
readonly fromDate?: string;
|
|
92
|
+
readonly toDate?: string;
|
|
93
|
+
readonly enableImageUnderstanding?: boolean;
|
|
94
|
+
readonly enableVideoUnderstanding?: boolean;
|
|
95
|
+
readonly model?: string;
|
|
96
|
+
}
|
|
97
|
+
export interface XaiSearchResponse {
|
|
98
|
+
readonly answer: string;
|
|
99
|
+
readonly citations: readonly string[];
|
|
100
|
+
readonly model: string;
|
|
101
|
+
}
|
|
102
|
+
export declare const xaiSearchRoute: JsonRouteSpec<XaiSearchRequest, XaiSearchResponse, XaiHttpDeps, undefined>;
|
|
103
|
+
/** Every xAI route as data, each behind the same-origin gate its spec declares. Defaults are resolved once per call, so the routes share one pending-auth cache and listener slot. Internal failures are reported through the host's reporter. */
|
|
104
|
+
export declare function xaiRoutes({ deps, host }: {
|
|
105
|
+
readonly deps: Omit<XaiHttpDeps, 'reportInternalError'>;
|
|
106
|
+
readonly host: XaiRouteHost;
|
|
107
|
+
}, _optional?: Record<string, never>): ServerRoute[];
|
|
108
|
+
export {};
|