@sazabi/cli 1.2.0-dev.gaa7d756 → 1.2.0-dev.gb502d02

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.
Files changed (2) hide show
  1. package/dist/index.js +392 -392
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -206,131 +206,131 @@ When events are arriving, report back:
206
206
  Do not print the public key or full keyed URL in the summary.
207
207
  `;var eG=()=>{};var oG=`## Overview
208
208
 
209
- Stream Cloudflare Logpush datasets — HTTP requests, firewall events, DNS logs, Spectrum events, and more into Sazabi.
209
+ Stream Cloudflare Workers Observability logs and traces into Sazabi.
210
210
 
211
211
  ## How it works
212
212
 
213
- Cloudflare Logpush exports zone and account logs to Sazabi over HTTP.
214
-
215
- Connect your Cloudflare account and Sazabi creates and maintains a Logpush job for each dataset you select. Or point a Logpush job at a Sazabi endpoint yourself.
213
+ Add OTLP destinations pointing at Sazabi in Cloudflare's Workers Observability settings, then opt each Worker in to logs and/or traces. Cloudflare's built-in Workers Observability exporter pushes the telemetry to those destinations.
216
214
 
217
215
  ## Streams
218
216
 
219
- - **Logpush datasets** — one log stream per selected zone or account dataset.
217
+ - **Workers logs** — console output and structured log events from each opted-in Worker, exported by the built-in Workers Observability OTLP exporter.
218
+ - **Workers traces** — OTLP spans covering Worker executions, binding calls, and fetch requests.
220
219
 
221
220
  ## Requirements
222
221
 
223
- - Logpush requires an **Enterprise** Cloudflare plan.
224
- - To connect your account: a Cloudflare API token with account read, zone read, and zone logs edit permissions.
225
- - To create the job yourself: set the Logpush job's timestamp output format to RFC3339.
222
+ - Workers Observability access on your Cloudflare account.
226
223
 
227
224
  ## Limitations
228
225
 
229
- - Cloudflare Workers telemetry comes from the separate Cloudflare Workers log source provider (over OTLP), not Logpush.
226
+ - Cloudflare Logpush datasets HTTP requests, firewall events, DNS logs, and other zone or account logs — come from the separate Cloudflare Logpush log source provider, not this one.
230
227
  `;var nG=()=>{};var iG=`---
231
- name: cloudflare-log-source-setup
232
- description: Connect Cloudflare Logpush to a Sazabi project so zone and account Logpush datasets (HTTP requests, firewall events, DNS logs, Spectrum events) stream into Sazabi. Use when the user wants to "connect Cloudflare", "set up Cloudflare Logpush logs in Sazabi", "ingest Cloudflare logs", "add Cloudflare as a log source", "add a Cloudflare data source", or after running \`sazabi log-sources skill --provider cloudflare\`. Covers both Sazabi's API-token onboarding (Sazabi provisions Logpush jobs) and a standalone manual Logpush HTTP job; requires a Cloudflare Enterprise plan. For Workers telemetry use the separate Cloudflare Workers log source provider.
228
+ name: cloudflare-workers-log-source-setup
229
+ description: Stream Cloudflare Workers logs and traces to a Sazabi project via Workers Observability OTLP export. Use when the user wants to "connect Cloudflare Workers", "set up Workers logs or traces in Sazabi", "ingest Workers telemetry", "add Cloudflare Workers as a log source", or after running \`sazabi log-sources skill --provider cloudflare_workers\`. Points Workers Observability at Sazabi's keyed OTLP intake; distinct from the Cloudflare Logpush log source provider and needs no Logpush entitlement or Enterprise plan.
233
230
  surface: log-source
234
231
  phase: setup
235
- requires: cloudflare
232
+ requires: cloudflare_workers
236
233
  ---
237
234
 
238
- # Cloudflare Logpush log source setup
235
+ # Cloudflare Workers log source setup
239
236
 
240
- You can automate Cloudflare Logpush ingestion through Sazabi's native API token onboarding, or create a standalone manual Logpush HTTP job.
237
+ Use Cloudflare **Workers Observability** to stream Workers logs and traces to Sazabi via OTLP.
241
238
 
242
- > **Cloudflare Logpush is only available on the Enterprise plan.** Free, Pro, and Business accounts cannot create Logpush jobs and will not be able to complete this setup. (Workers telemetry has a separate path via the Cloudflare Workers log source provider, which uses OTLP not Logpush and is available on the Workers Paid plan.)
239
+ > This is **not** the Cloudflare Logpush integration. For zone/account Logpush datasets (HTTP requests, firewall events, DNS logs, Spectrum events, etc.), use the separate **Cloudflare Logpush** log source provider. Workers Observability does not require a paid Cloudflare plan or Logpush entitlement; Logpush does.
243
240
 
244
- ## Native path — API token & account linkage
241
+ ## Setup
245
242
 
246
- 1. Create a Cloudflare API token granting:
247
- - **Account Settings: Read**
248
- - **Zone: Read**
249
- - **Zone Logs: Edit**
243
+ 1. In Sazabi, create or select a public key for this log source.
244
+ 2. In the Cloudflare dashboard, go to **Workers & Pages > Observability > Telemetry** and click **Add Destination**. The "Add New Destination" dialog has these fields, in this order. Fill them in 1:1.
250
245
 
251
- Dashboard links include a templated shortcut that pre-populates scopes.
246
+ ### Destination 1: Logs
252
247
 
253
- 2. Collect the Cloudflare **Account ID** (\`[a-f0-9]{32}\` hex) from \`/dash.cloudflare.com\` URLs or Overview.
254
- 3. Paste token + account ID into Sazabi validation; persisted metadata includes hashed secrets and account label.
255
- 4. Select zone or account Logpush datasets from the log streams selector. Sazabi provisions a Logpush job and a per-log-stream public key for each selected dataset.
248
+ - **Destination Type**: \`Logs\`
249
+ - **OTLP Logs Endpoint**: \`https://{publicKeyHex}.{projectRegion}.intake.{intakeDomain}/v1/logs\`
250
+ - **Destination Name**: \`sazabi-logs\`
251
+ - Click **Save**.
256
252
 
257
- ### Logpush selectors
253
+ ### Destination 2: Traces
258
254
 
259
- Configure log streams per Logpush dataset (zone/account scoped). Respect dedupe prompts so duplicate jobs are not recreated.
255
+ Click **Add Destination** again and repeat with:
260
256
 
261
- ## Manual Logpush fallback
257
+ - **Destination Type**: \`Traces\`
258
+ - **OTLP Traces Endpoint**: \`https://{publicKeyHex}.{projectRegion}.intake.{intakeDomain}/v1/traces\`
259
+ - **Destination Name**: \`sazabi-traces\`
260
+ - Click **Save**.
262
261
 
263
- Without native automation you can manually create Cloudflare Logpush jobs:
262
+ ### Opt each Worker in
264
263
 
265
- 1. Destination type: **HTTP**.
266
- 2. Destination URL: \`https://{publicKeyHex}.{projectRegion}.intake.{intakeDomain}/v1/logs\` (copy from Sazabi). The key hex is embedded in the hostname; no \`api_key\` query param is needed.
267
- 3. In job **Output options**, set **Timestamp format** to **RFC3339** for reliable parsing.
264
+ In each Worker's \`wrangler.jsonc\` or \`wrangler.toml\`, enable observability and list the destination names for the signals you want to export, then redeploy.
268
265
 
269
266
  ## Verification
270
267
 
271
- Send representative traffic through the selected Cloudflare zones or account products and confirm matching normalized events in Sazabi.
268
+ Invoke the Worker and confirm Workers logs or traces appear in Sazabi. If Cloudflare shows the destination as "Never run", confirm the Worker config references the exact destination name and has been redeployed.
272
269
  `;var rG=()=>{};var aG=`## Overview
273
270
 
274
- Stream Cloudflare Workers Observability logs and traces into Sazabi.
271
+ Stream Cloudflare Logpush datasets — HTTP requests, firewall events, DNS logs, Spectrum events, and more into Sazabi.
275
272
 
276
273
  ## How it works
277
274
 
278
- Add OTLP destinations pointing at Sazabi in Cloudflare's Workers Observability settings, then opt each Worker in to logs and/or traces. Cloudflare's built-in Workers Observability exporter pushes the telemetry to those destinations.
275
+ Cloudflare Logpush exports zone and account logs to Sazabi over HTTP.
276
+
277
+ Connect your Cloudflare account and Sazabi creates and maintains a Logpush job for each dataset you select. Or point a Logpush job at a Sazabi endpoint yourself.
279
278
 
280
279
  ## Streams
281
280
 
282
- - **Workers logs** — console output and structured log events from each opted-in Worker, exported by the built-in Workers Observability OTLP exporter.
283
- - **Workers traces** — OTLP spans covering Worker executions, binding calls, and fetch requests.
281
+ - **Logpush datasets** — one log stream per selected zone or account dataset.
284
282
 
285
283
  ## Requirements
286
284
 
287
- - Workers Observability access on your Cloudflare account.
285
+ - Logpush requires an **Enterprise** Cloudflare plan.
286
+ - To connect your account: a Cloudflare API token with account read, zone read, and zone logs edit permissions.
287
+ - To create the job yourself: set the Logpush job's timestamp output format to RFC3339.
288
288
 
289
289
  ## Limitations
290
290
 
291
- - Cloudflare Logpush datasets HTTP requests, firewall events, DNS logs, and other zone or account logs — come from the separate Cloudflare Logpush log source provider, not this one.
291
+ - Cloudflare Workers telemetry comes from the separate Cloudflare Workers log source provider (over OTLP), not Logpush.
292
292
  `;var sG=()=>{};var lG=`---
293
- name: cloudflare-workers-log-source-setup
294
- description: Stream Cloudflare Workers logs and traces to a Sazabi project via Workers Observability OTLP export. Use when the user wants to "connect Cloudflare Workers", "set up Workers logs or traces in Sazabi", "ingest Workers telemetry", "add Cloudflare Workers as a log source", or after running \`sazabi log-sources skill --provider cloudflare_workers\`. Points Workers Observability at Sazabi's keyed OTLP intake; distinct from the Cloudflare Logpush log source provider and needs no Logpush entitlement or Enterprise plan.
293
+ name: cloudflare-log-source-setup
294
+ description: Connect Cloudflare Logpush to a Sazabi project so zone and account Logpush datasets (HTTP requests, firewall events, DNS logs, Spectrum events) stream into Sazabi. Use when the user wants to "connect Cloudflare", "set up Cloudflare Logpush logs in Sazabi", "ingest Cloudflare logs", "add Cloudflare as a log source", "add a Cloudflare data source", or after running \`sazabi log-sources skill --provider cloudflare\`. Covers both Sazabi's API-token onboarding (Sazabi provisions Logpush jobs) and a standalone manual Logpush HTTP job; requires a Cloudflare Enterprise plan. For Workers telemetry use the separate Cloudflare Workers log source provider.
295
295
  surface: log-source
296
296
  phase: setup
297
- requires: cloudflare_workers
297
+ requires: cloudflare
298
298
  ---
299
299
 
300
- # Cloudflare Workers log source setup
300
+ # Cloudflare Logpush log source setup
301
301
 
302
- Use Cloudflare **Workers Observability** to stream Workers logs and traces to Sazabi via OTLP.
302
+ You can automate Cloudflare Logpush ingestion through Sazabi's native API token onboarding, or create a standalone manual Logpush HTTP job.
303
303
 
304
- > This is **not** the Cloudflare Logpush integration. For zone/account Logpush datasets (HTTP requests, firewall events, DNS logs, Spectrum events, etc.), use the separate **Cloudflare Logpush** log source provider. Workers Observability does not require a paid Cloudflare plan or Logpush entitlement; Logpush does.
304
+ > **Cloudflare Logpush is only available on the Enterprise plan.** Free, Pro, and Business accounts cannot create Logpush jobs and will not be able to complete this setup. (Workers telemetry has a separate path via the Cloudflare Workers log source provider, which uses OTLP not Logpush and is available on the Workers Paid plan.)
305
305
 
306
- ## Setup
306
+ ## Native path — API token & account linkage
307
307
 
308
- 1. In Sazabi, create or select a public key for this log source.
309
- 2. In the Cloudflare dashboard, go to **Workers & Pages > Observability > Telemetry** and click **Add Destination**. The "Add New Destination" dialog has these fields, in this order. Fill them in 1:1.
308
+ 1. Create a Cloudflare API token granting:
309
+ - **Account Settings: Read**
310
+ - **Zone: Read**
311
+ - **Zone Logs: Edit**
310
312
 
311
- ### Destination 1: Logs
313
+ Dashboard links include a templated shortcut that pre-populates scopes.
312
314
 
313
- - **Destination Type**: \`Logs\`
314
- - **OTLP Logs Endpoint**: \`https://{publicKeyHex}.{projectRegion}.intake.{intakeDomain}/v1/logs\`
315
- - **Destination Name**: \`sazabi-logs\`
316
- - Click **Save**.
315
+ 2. Collect the Cloudflare **Account ID** (\`[a-f0-9]{32}\` hex) from \`/dash.cloudflare.com\` URLs or Overview.
316
+ 3. Paste token + account ID into Sazabi validation; persisted metadata includes hashed secrets and account label.
317
+ 4. Select zone or account Logpush datasets from the log streams selector. Sazabi provisions a Logpush job and a per-log-stream public key for each selected dataset.
317
318
 
318
- ### Destination 2: Traces
319
+ ### Logpush selectors
319
320
 
320
- Click **Add Destination** again and repeat with:
321
+ Configure log streams per Logpush dataset (zone/account scoped). Respect dedupe prompts so duplicate jobs are not recreated.
321
322
 
322
- - **Destination Type**: \`Traces\`
323
- - **OTLP Traces Endpoint**: \`https://{publicKeyHex}.{projectRegion}.intake.{intakeDomain}/v1/traces\`
324
- - **Destination Name**: \`sazabi-traces\`
325
- - Click **Save**.
323
+ ## Manual Logpush fallback
326
324
 
327
- ### Opt each Worker in
325
+ Without native automation you can manually create Cloudflare Logpush jobs:
328
326
 
329
- In each Worker's \`wrangler.jsonc\` or \`wrangler.toml\`, enable observability and list the destination names for the signals you want to export, then redeploy.
327
+ 1. Destination type: **HTTP**.
328
+ 2. Destination URL: \`https://{publicKeyHex}.{projectRegion}.intake.{intakeDomain}/v1/logs\` (copy from Sazabi). The key hex is embedded in the hostname; no \`api_key\` query param is needed.
329
+ 3. In job **Output options**, set **Timestamp format** to **RFC3339** for reliable parsing.
330
330
 
331
331
  ## Verification
332
332
 
333
- Invoke the Worker and confirm Workers logs or traces appear in Sazabi. If Cloudflare shows the destination as "Never run", confirm the Worker config references the exact destination name and has been redeployed.
333
+ Send representative traffic through the selected Cloudflare zones or account products and confirm matching normalized events in Sazabi.
334
334
  `;var cG=()=>{};var dG=`## Overview
335
335
 
336
336
  Stream logs from any AWS CloudWatch log group into Sazabi.
@@ -3711,129 +3711,284 @@ Trigger any OpenRouter generation. Within a minute, new spans should appear in S
3711
3711
  - Privacy Mode strips prompt/completion content irreversibly at OpenRouter; Sazabi cannot recover it. Enable it only when the user cannot send prompts off the OpenRouter workspace.
3712
3712
  `;var kH=()=>{};var RH=`## Overview
3713
3713
 
3714
- Send your OpenTelemetry logs and traces to Sazabi's OTLP-compatible intake.
3714
+ Forward logs and traces from your infrastructure into Sazabi using the OpenTelemetry Collector.
3715
3715
 
3716
3716
  ## How it works
3717
3717
 
3718
- Point your OpenTelemetry SDK's OTLP exporter at a Sazabi endpoint. The SDK then sends your log records and spans straight to Sazabi over OTLP/HTTP, with no other code changes.
3718
+ Add a Sazabi OTLP/HTTP exporter to your Collector and include it in the service pipelines you already run. The Collector then forwards the logs and traces from those pipelines into Sazabi.
3719
3719
 
3720
3720
  ## Streams
3721
3721
 
3722
- - **Logs** — OTLP log records from any OpenTelemetry SDK or collector.
3723
- - **Traces** — OTLP spans from your instrumented applications.
3722
+ - **Logs** — log records routed from your existing Collector pipelines over OTLP/HTTP.
3723
+ - **Traces** — spans exported through the \`otlphttp\` exporter from any pipeline that includes it.
3724
3724
 
3725
3725
  ## Limitations
3726
3726
 
3727
- - Metrics sent to the endpoint aren't stored yet. To store OTLP metrics as searchable log records, use the OpenTelemetry Metrics source instead.
3727
+ - This intake doesn't store metrics. Point metrics pipelines at the OpenTelemetry Metrics source to keep them searchable.
3728
3728
  `;var PH=()=>{};var BH=`---
3729
- name: otel-log-source-setup
3730
- description: Connect any OpenTelemetry-instrumented application to a Sazabi project using the standard OTLP HTTP exporter environment variables. Use when the user wants to "connect OpenTelemetry", "set up OTLP export to Sazabi", "send OTel logs or traces to Sazabi", "instrument my app for Sazabi", or after running \`sazabi log-sources skill --provider otel\`. Generic any-language setup covering the Node.js, Python, Go, Java, .NET, Rust, and Ruby SDKs.
3729
+ name: otel-collector-log-source-setup
3730
+ description: Connect the OpenTelemetry Collector to a Sazabi project so logs and traces from the user's infrastructure stream into Sazabi. Use when the user wants to "connect the OTel Collector", "set up Collector export to Sazabi", "forward Collector pipelines to Sazabi", or after running \`sazabi log-sources skill --provider otel_collector\`. Adds an OTLP/HTTP exporter to the Collector configuration pointed at Sazabi's keyed intake endpoint.
3731
3731
  surface: log-source
3732
3732
  phase: setup
3733
- requires: otel
3733
+ requires: otel_collector
3734
3734
  ---
3735
3735
 
3736
- # OpenTelemetry (generic) log source setup
3737
-
3738
- Walk the user through connecting any OpenTelemetry-instrumented application to a Sazabi project via the standard **OTLP HTTP** exporter env vars. This is the generic, any-language manual setup - works with the Node.js, Python, Go, Java, .NET, Rust, or Ruby OpenTelemetry SDKs.
3739
-
3740
- **Principle:** Do the work. Only pause when the user must act: choosing a Sazabi project, picking an SDK, installing packages in their app, or restarting their process. If a step fails, diagnose and retry before asking the user to intervene.
3741
-
3742
- <important>
3743
- Use AskUserQuestion only for user-owned boundaries: choosing the project, choosing the SDK language, or confirming the SDK is bootstrapped. Never echo \`PUBLIC_KEY\` back to the user - refer to it as \`<your-public-key>\`.
3744
- </important>
3736
+ # OpenTelemetry Collector log source setup
3745
3737
 
3746
- If the user is configuring an OpenTelemetry Collector, Grafana Alloy, Vector, or a vendor-native OTLP destination (OpenRouter, Inngest, Trigger.dev, Railway, Temporal, etc.) instead of an in-process SDK, stop and use that source's skill instead - those flows exist as separate log source providers (\`otel_collector\`, \`grafana_alloy\`, \`vector\`, \`openrouter\`, \`inngest\`, \`trigger_dev\`, \`railway\`, \`temporal\`).
3738
+ Walk the user through connecting the OpenTelemetry Collector to Sazabi so logs and traces from their infrastructure appear in the project.
3747
3739
 
3748
- ## Phase 0: Preflight
3740
+ **Principle:** Do the work. Only pause when the user must act (applying config, restarting the collector, choosing pipelines). If a step fails, diagnose and retry before asking the user to intervene.
3749
3741
 
3750
- Use the Sazabi CLI. First choose the command prefix:
3742
+ **UX:** Use \`AskUserQuestion\` for all user-facing questions.
3751
3743
 
3752
- \`\`\`sh
3753
- if command -v sazabi >/dev/null 2>&1; then
3754
- SAZABI_CLI="sazabi"
3755
- else
3756
- SAZABI_CLI="bunx @sazabi/cli"
3757
- fi
3758
- \`\`\`
3744
+ ## Phase 0: Pre-flight
3759
3745
 
3760
- Use \`$SAZABI_CLI\` for every Sazabi command below. In the Sazabi agent runtime \`sazabi\` is pre-installed and pre-authenticated; do not ask the user to run \`npm i -g\`.
3746
+ This skill assumes Sazabi MCP tools are available. If \`list_projects\` or \`create_data_source_connection\` are unavailable, stop and explain that this workflow requires those tools.
3761
3747
 
3762
- Check authentication:
3748
+ The user needs:
3749
+ 1. A Sazabi project to receive the telemetry
3750
+ 2. An OpenTelemetry Collector running (or about to be deployed)
3751
+ 3. Access to modify the collector config (\`otelcol.yaml\` or Helm values)
3763
3752
 
3764
- \`\`\`sh
3765
- $SAZABI_CLI auth whoami --json
3766
- \`\`\`
3753
+ ## Phase 1: Identify the Sazabi Project
3767
3754
 
3768
- If authentication fails, ask the user how to authenticate.
3755
+ If the target project is already clear from context, reuse it. Otherwise call \`list_projects\` and ask the user which project should receive the collector data.
3769
3756
 
3770
- Browser login:
3757
+ Capture the selected project ID as \`SAZABI_PROJECT_ID\`.
3771
3758
 
3772
- \`\`\`sh
3773
- $SAZABI_CLI auth login
3774
- \`\`\`
3759
+ ## Phase 2: Provision the Connection and Get the Intake Key
3775
3760
 
3776
- Existing token:
3761
+ Call the appropriate connection-creation tool with \`type: "otel_collector"\` and \`projectId: SAZABI_PROJECT_ID\`.
3777
3762
 
3778
- \`\`\`sh
3779
- $SAZABI_CLI auth save <token>
3780
- \`\`\`
3763
+ Capture the returned \`publicKey\`, derive \`publicKeyHex\` by stripping the leading \`sazabi_public_\` prefix, and construct the intake endpoint as \`https://<publicKeyHex>.<region>.intake.<domain>\`.
3781
3764
 
3782
- Do not print the token back to the user.
3765
+ ## Phase 3: Configure the Collector
3783
3766
 
3784
- ## Phase 1: Choose the Sazabi project
3767
+ Ask which signals the user wants to forward (logs, traces) so the pipeline section can reference the right exporters. Note: metrics are not yet supported and will be silently dropped.
3785
3768
 
3786
- If the active project is already clear from context, reuse it. Otherwise:
3769
+ **\`otelcol.yaml\` exporter block:**
3770
+ \`\`\`yaml
3771
+ exporters:
3772
+ otlphttp/sazabi:
3773
+ endpoint: https://<intake-host>
3787
3774
 
3788
- \`\`\`sh
3789
- $SAZABI_CLI projects list --json
3790
- $SAZABI_CLI projects use <project-id>
3775
+ service:
3776
+ pipelines:
3777
+ logs:
3778
+ exporters: [otlphttp/sazabi]
3779
+ traces:
3780
+ exporters: [otlphttp/sazabi]
3791
3781
  \`\`\`
3792
3782
 
3793
- Capture the selected project ID as \`SAZABI_PROJECT_ID\`.
3783
+ Merge the exporter into the user's existing pipeline rather than replacing their current exporters - add \`otlphttp/sazabi\` to the appropriate \`exporters\` lists.
3794
3784
 
3795
- ## Phase 2: Create the log source and capture the public key
3785
+ AskUserQuestion: Have you applied the config and restarted (or deployed) the collector?
3796
3786
 
3797
- Check first whether a generic \`otel\` log source already exists for the project - \`$SAZABI_CLI log-sources list --provider otel --json\` returns \`{ "items": [...] }\` with each log source's \`id\`. If one exists, reuse it: capture its \`id\` as \`INSTANCE_ID\`. Its plaintext key is only returned at creation time; if the customer still has it, reuse it as \`PUBLIC_KEY\` and skip ahead to Phase 3 (which can also recover the keyed endpoint from the log source). If the key was lost, delete the existing log source (\`$SAZABI_CLI log-sources delete <id>\`) and re-create it below to mint a fresh key.
3787
+ ## Phase 4: Verify
3798
3788
 
3799
- Otherwise, create the log source:
3789
+ After the user confirms the config is applied, check whether telemetry is arriving in the Sazabi project. If nothing appears within a few minutes:
3800
3790
 
3801
- \`\`\`sh
3802
- CREATE_JSON=$($SAZABI_CLI log-sources create otel --json)
3803
- \`\`\`
3791
+ 1. Enable debug logging on the collector (\`service.telemetry.logs.level: debug\`) and look for exporter errors
3792
+ 2. Confirm the pipeline section references \`otlphttp/sazabi\` in the correct signal pipelines
3793
+ 3. Verify the endpoint URL includes the correct public key hex
3804
3794
 
3805
- The \`otel\` source has no provider-side credentials - \`create\` runs connectionless with no \`--metadata\`. Sazabi mints the log source, its keyed log stream, and the public intake key in one call and returns the key's plaintext value once in the create response.
3795
+ ## Troubleshooting
3806
3796
 
3807
- Extract the log source ID and the minted public key:
3797
+ ### No data appearing
3808
3798
 
3809
- \`\`\`sh
3810
- INSTANCE_ID=$(printf '%s' "$CREATE_JSON" | jq -r '.logSource.id')
3811
- PUBLIC_KEY=$(printf '%s' "$CREATE_JSON" | jq -r '.publicKey')
3812
- \`\`\`
3799
+ - Check collector logs for \`otlphttp/sazabi\` exporter errors
3800
+ - Confirm \`otlphttp/sazabi\` is listed in \`service.pipelines.<signal>.exporters\`
3801
+ - Verify no network policy is blocking outbound HTTPS to the intake endpoint
3813
3802
 
3814
- Treat \`PUBLIC_KEY\` as sensitive. The plaintext value is only returned by \`create\`. \`public-keys list --json\` does not include it. If you ever lose the plaintext, delete the log source (\`$SAZABI_CLI log-sources delete "$INSTANCE_ID"\`) and re-create it to mint a fresh key, then re-capture \`.publicKey\`.
3803
+ ### Authentication errors
3815
3804
 
3816
- **If \`create\` reports the log source already exists:** Run \`log-sources list --provider otel --json\`, take the existing log source's \`id\` from \`.items[]\`. If the customer still has its key, reuse it; otherwise delete that log source and re-create it to mint a fresh key, then proceed.
3805
+ - Confirm the endpoint hostname includes the \`-<publicKeyHex>\` segment
3806
+ - Regenerate the intake key from the Sazabi dashboard if it was rotated
3817
3807
 
3818
- ## Phase 3: Capture the OTLP endpoint
3808
+ ### Helm deployment
3819
3809
 
3820
- The \`create --json\` response carries the keyed endpoint the user's app will need:
3810
+ For the \`opentelemetry-collector\` Helm chart, pass the config via \`config\` in \`values.yaml\` and merge the exporter block into the existing structure.
3811
+ `;var TH=()=>{};var _H=`## Overview
3821
3812
 
3822
- \`\`\`sh
3823
- OTLP_ENDPOINT=$(printf '%s' "$CREATE_JSON" | jq -r '.endpointCards[0].url')
3824
- OTLP_PROTOCOL="http/protobuf"
3825
- \`\`\`
3813
+ Send your OpenTelemetry metrics to Sazabi, stored as searchable log records.
3826
3814
 
3827
- For a log source reused from Phase 2, recover the endpoint from its log stream instead:
3815
+ ## How it works
3828
3816
 
3829
- \`\`\`sh
3830
- OTLP_ENDPOINT=$($SAZABI_CLI log-sources get "$INSTANCE_ID" --json \\
3831
- | jq -r '.logSource.streams[0].endpointCards[0].url // empty')
3832
- \`\`\`
3817
+ Point your OTLP metrics exporter at a Sazabi endpoint. Sazabi stores each incoming metric data point as a log record. Metrics then run through the same search pipeline as your logs and traces, so you can line up a spike with the telemetry around it. There's no separate metrics backend.
3833
3818
 
3834
- The intake host accepts every OTLP signal at one base URL and path-dispatches by suffix:
3819
+ ## Streams
3835
3820
 
3836
- - \`POST /v1/logs\` is persisted as logs.
3821
+ - **OpenTelemetry metrics** — Sazabi stores each OTLP metric data point as a searchable log record with \`metric.name\`, \`metric.type\`, \`metric.unit\`, and \`metric.value\` attributes. You search them alongside your logs and traces.
3822
+ `;var OH=()=>{};var QH=`---
3823
+ name: otel-metrics-log-source-setup
3824
+ description: Connect an OpenTelemetry metrics producer (SDK or Collector) to a Sazabi project, where metrics are ingested and stored as searchable log records. Use when the user wants to "connect OpenTelemetry metrics", "send OTel metrics to Sazabi", "set up metrics ingestion in Sazabi", or after running \`sazabi log-sources skill --provider otel_metrics\`. Points OTLP metrics export at Sazabi's keyed metrics intake endpoint.
3825
+ surface: log-source
3826
+ phase: setup
3827
+ requires: otel_metrics
3828
+ ---
3829
+
3830
+ # OpenTelemetry Metrics log source setup
3831
+
3832
+ Agent-facing runbook for connecting an OpenTelemetry metrics producer (SDK or Collector) to Sazabi. Metrics are ingested and stored as log records.
3833
+
3834
+ ## When to use this source
3835
+
3836
+ - The user emits OpenTelemetry metrics and wants them in Sazabi alongside logs and traces.
3837
+ - The user exports OTLP metrics from an OpenTelemetry Collector or an SDK metrics pipeline.
3838
+ - The user has no dedicated metrics backend and is comfortable querying metrics as log records.
3839
+
3840
+ Prefer the standard \`otel\` source when the user only needs logs and traces. Use this source when metrics ingestion is the goal.
3841
+
3842
+ ## Prerequisites
3843
+
3844
+ - A running application or OpenTelemetry Collector that can export OTLP metrics over HTTP (\`http/protobuf\` or \`http/json\`).
3845
+ - Permission to set environment variables (or edit the Collector config) on that runtime.
3846
+ - A Sazabi OpenTelemetry Metrics log source, which mints the public key used in the endpoint URL.
3847
+
3848
+ ## Setup steps
3849
+
3850
+ 1. Create the OpenTelemetry Metrics log source in Sazabi (Settings → Log sources → OpenTelemetry Metrics). Copy the generated public key / endpoint.
3851
+ 2. Set the OTLP metrics exporter environment on the producer:
3852
+ - \`OTEL_EXPORTER_OTLP_METRICS_ENDPOINT\` = the Sazabi metrics endpoint shown in the setup flow (\`https://<publicKeyHex>.<region>.intake.<domain>/v1/metrics\`).
3853
+ - \`OTEL_EXPORTER_OTLP_PROTOCOL\` = \`http/protobuf\` (or \`http/json\`).
3854
+ - If the SDK requires it, authenticate with \`OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer <publicKey>\`; the keyed hostname also carries the public key.
3855
+ 3. For an OpenTelemetry Collector, configure an \`otlphttp\` exporter with the same \`metrics_endpoint\` and wire it into the \`metrics\` pipeline.
3856
+ 4. Restart or redeploy the producer so the exporter picks up the new configuration.
3857
+
3858
+ ## Verify
3859
+
3860
+ - Generate or wait for a metric to be exported.
3861
+ - Confirm Sazabi receives it: the metric appears as a log record with \`telemetry.type=metric\`, \`metric.name\`, \`metric.type\`, and \`metric.value\` attributes, tagged with the exporting \`service.name\`.
3862
+
3863
+ ## Notes
3864
+
3865
+ - Each metric data point becomes one log record; histogram and summary points are summarized by their sum/count.
3866
+ - Logs and traces posted to the same endpoint are handled normally (path dispatch on \`/v1/logs\`, \`/v1/traces\`, \`/v1/metrics\`).
3867
+ `;var DH=()=>{};var NH=`## Overview
3868
+
3869
+ Send your OpenTelemetry logs and traces to Sazabi's OTLP-compatible intake.
3870
+
3871
+ ## How it works
3872
+
3873
+ Point your OpenTelemetry SDK's OTLP exporter at a Sazabi endpoint. The SDK then sends your log records and spans straight to Sazabi over OTLP/HTTP, with no other code changes.
3874
+
3875
+ ## Streams
3876
+
3877
+ - **Logs** — OTLP log records from any OpenTelemetry SDK or collector.
3878
+ - **Traces** — OTLP spans from your instrumented applications.
3879
+
3880
+ ## Limitations
3881
+
3882
+ - Metrics sent to the endpoint aren't stored yet. To store OTLP metrics as searchable log records, use the OpenTelemetry Metrics source instead.
3883
+ `;var LH=()=>{};var zH=`---
3884
+ name: otel-log-source-setup
3885
+ description: Connect any OpenTelemetry-instrumented application to a Sazabi project using the standard OTLP HTTP exporter environment variables. Use when the user wants to "connect OpenTelemetry", "set up OTLP export to Sazabi", "send OTel logs or traces to Sazabi", "instrument my app for Sazabi", or after running \`sazabi log-sources skill --provider otel\`. Generic any-language setup covering the Node.js, Python, Go, Java, .NET, Rust, and Ruby SDKs.
3886
+ surface: log-source
3887
+ phase: setup
3888
+ requires: otel
3889
+ ---
3890
+
3891
+ # OpenTelemetry (generic) log source setup
3892
+
3893
+ Walk the user through connecting any OpenTelemetry-instrumented application to a Sazabi project via the standard **OTLP HTTP** exporter env vars. This is the generic, any-language manual setup - works with the Node.js, Python, Go, Java, .NET, Rust, or Ruby OpenTelemetry SDKs.
3894
+
3895
+ **Principle:** Do the work. Only pause when the user must act: choosing a Sazabi project, picking an SDK, installing packages in their app, or restarting their process. If a step fails, diagnose and retry before asking the user to intervene.
3896
+
3897
+ <important>
3898
+ Use AskUserQuestion only for user-owned boundaries: choosing the project, choosing the SDK language, or confirming the SDK is bootstrapped. Never echo \`PUBLIC_KEY\` back to the user - refer to it as \`<your-public-key>\`.
3899
+ </important>
3900
+
3901
+ If the user is configuring an OpenTelemetry Collector, Grafana Alloy, Vector, or a vendor-native OTLP destination (OpenRouter, Inngest, Trigger.dev, Railway, Temporal, etc.) instead of an in-process SDK, stop and use that source's skill instead - those flows exist as separate log source providers (\`otel_collector\`, \`grafana_alloy\`, \`vector\`, \`openrouter\`, \`inngest\`, \`trigger_dev\`, \`railway\`, \`temporal\`).
3902
+
3903
+ ## Phase 0: Preflight
3904
+
3905
+ Use the Sazabi CLI. First choose the command prefix:
3906
+
3907
+ \`\`\`sh
3908
+ if command -v sazabi >/dev/null 2>&1; then
3909
+ SAZABI_CLI="sazabi"
3910
+ else
3911
+ SAZABI_CLI="bunx @sazabi/cli"
3912
+ fi
3913
+ \`\`\`
3914
+
3915
+ Use \`$SAZABI_CLI\` for every Sazabi command below. In the Sazabi agent runtime \`sazabi\` is pre-installed and pre-authenticated; do not ask the user to run \`npm i -g\`.
3916
+
3917
+ Check authentication:
3918
+
3919
+ \`\`\`sh
3920
+ $SAZABI_CLI auth whoami --json
3921
+ \`\`\`
3922
+
3923
+ If authentication fails, ask the user how to authenticate.
3924
+
3925
+ Browser login:
3926
+
3927
+ \`\`\`sh
3928
+ $SAZABI_CLI auth login
3929
+ \`\`\`
3930
+
3931
+ Existing token:
3932
+
3933
+ \`\`\`sh
3934
+ $SAZABI_CLI auth save <token>
3935
+ \`\`\`
3936
+
3937
+ Do not print the token back to the user.
3938
+
3939
+ ## Phase 1: Choose the Sazabi project
3940
+
3941
+ If the active project is already clear from context, reuse it. Otherwise:
3942
+
3943
+ \`\`\`sh
3944
+ $SAZABI_CLI projects list --json
3945
+ $SAZABI_CLI projects use <project-id>
3946
+ \`\`\`
3947
+
3948
+ Capture the selected project ID as \`SAZABI_PROJECT_ID\`.
3949
+
3950
+ ## Phase 2: Create the log source and capture the public key
3951
+
3952
+ Check first whether a generic \`otel\` log source already exists for the project - \`$SAZABI_CLI log-sources list --provider otel --json\` returns \`{ "items": [...] }\` with each log source's \`id\`. If one exists, reuse it: capture its \`id\` as \`INSTANCE_ID\`. Its plaintext key is only returned at creation time; if the customer still has it, reuse it as \`PUBLIC_KEY\` and skip ahead to Phase 3 (which can also recover the keyed endpoint from the log source). If the key was lost, delete the existing log source (\`$SAZABI_CLI log-sources delete <id>\`) and re-create it below to mint a fresh key.
3953
+
3954
+ Otherwise, create the log source:
3955
+
3956
+ \`\`\`sh
3957
+ CREATE_JSON=$($SAZABI_CLI log-sources create otel --json)
3958
+ \`\`\`
3959
+
3960
+ The \`otel\` source has no provider-side credentials - \`create\` runs connectionless with no \`--metadata\`. Sazabi mints the log source, its keyed log stream, and the public intake key in one call and returns the key's plaintext value once in the create response.
3961
+
3962
+ Extract the log source ID and the minted public key:
3963
+
3964
+ \`\`\`sh
3965
+ INSTANCE_ID=$(printf '%s' "$CREATE_JSON" | jq -r '.logSource.id')
3966
+ PUBLIC_KEY=$(printf '%s' "$CREATE_JSON" | jq -r '.publicKey')
3967
+ \`\`\`
3968
+
3969
+ Treat \`PUBLIC_KEY\` as sensitive. The plaintext value is only returned by \`create\`. \`public-keys list --json\` does not include it. If you ever lose the plaintext, delete the log source (\`$SAZABI_CLI log-sources delete "$INSTANCE_ID"\`) and re-create it to mint a fresh key, then re-capture \`.publicKey\`.
3970
+
3971
+ **If \`create\` reports the log source already exists:** Run \`log-sources list --provider otel --json\`, take the existing log source's \`id\` from \`.items[]\`. If the customer still has its key, reuse it; otherwise delete that log source and re-create it to mint a fresh key, then proceed.
3972
+
3973
+ ## Phase 3: Capture the OTLP endpoint
3974
+
3975
+ The \`create --json\` response carries the keyed endpoint the user's app will need:
3976
+
3977
+ \`\`\`sh
3978
+ OTLP_ENDPOINT=$(printf '%s' "$CREATE_JSON" | jq -r '.endpointCards[0].url')
3979
+ OTLP_PROTOCOL="http/protobuf"
3980
+ \`\`\`
3981
+
3982
+ For a log source reused from Phase 2, recover the endpoint from its log stream instead:
3983
+
3984
+ \`\`\`sh
3985
+ OTLP_ENDPOINT=$($SAZABI_CLI log-sources get "$INSTANCE_ID" --json \\
3986
+ | jq -r '.logSource.streams[0].endpointCards[0].url // empty')
3987
+ \`\`\`
3988
+
3989
+ The intake host accepts every OTLP signal at one base URL and path-dispatches by suffix:
3990
+
3991
+ - \`POST /v1/logs\` is persisted as logs.
3837
3992
  - \`POST /v1/traces\` is persisted as spans.
3838
3993
  - \`POST /v1/metrics\` is accepted with a 200 response but not yet stored. Do not promise the user metrics; mention them only if they ask.
3839
3994
 
@@ -3977,161 +4132,6 @@ When telemetry is arriving, report back:
3977
4132
  - That \`/v1/logs\` and \`/v1/traces\` are live and \`/v1/metrics\` is not yet persisted.
3978
4133
 
3979
4134
  Do not print \`PUBLIC_KEY\` in the summary.
3980
- `;var TH=()=>{};var _H=`## Overview
3981
-
3982
- Forward logs and traces from your infrastructure into Sazabi using the OpenTelemetry Collector.
3983
-
3984
- ## How it works
3985
-
3986
- Add a Sazabi OTLP/HTTP exporter to your Collector and include it in the service pipelines you already run. The Collector then forwards the logs and traces from those pipelines into Sazabi.
3987
-
3988
- ## Streams
3989
-
3990
- - **Logs** — log records routed from your existing Collector pipelines over OTLP/HTTP.
3991
- - **Traces** — spans exported through the \`otlphttp\` exporter from any pipeline that includes it.
3992
-
3993
- ## Limitations
3994
-
3995
- - This intake doesn't store metrics. Point metrics pipelines at the OpenTelemetry Metrics source to keep them searchable.
3996
- `;var OH=()=>{};var QH=`---
3997
- name: otel-collector-log-source-setup
3998
- description: Connect the OpenTelemetry Collector to a Sazabi project so logs and traces from the user's infrastructure stream into Sazabi. Use when the user wants to "connect the OTel Collector", "set up Collector export to Sazabi", "forward Collector pipelines to Sazabi", or after running \`sazabi log-sources skill --provider otel_collector\`. Adds an OTLP/HTTP exporter to the Collector configuration pointed at Sazabi's keyed intake endpoint.
3999
- surface: log-source
4000
- phase: setup
4001
- requires: otel_collector
4002
- ---
4003
-
4004
- # OpenTelemetry Collector log source setup
4005
-
4006
- Walk the user through connecting the OpenTelemetry Collector to Sazabi so logs and traces from their infrastructure appear in the project.
4007
-
4008
- **Principle:** Do the work. Only pause when the user must act (applying config, restarting the collector, choosing pipelines). If a step fails, diagnose and retry before asking the user to intervene.
4009
-
4010
- **UX:** Use \`AskUserQuestion\` for all user-facing questions.
4011
-
4012
- ## Phase 0: Pre-flight
4013
-
4014
- This skill assumes Sazabi MCP tools are available. If \`list_projects\` or \`create_data_source_connection\` are unavailable, stop and explain that this workflow requires those tools.
4015
-
4016
- The user needs:
4017
- 1. A Sazabi project to receive the telemetry
4018
- 2. An OpenTelemetry Collector running (or about to be deployed)
4019
- 3. Access to modify the collector config (\`otelcol.yaml\` or Helm values)
4020
-
4021
- ## Phase 1: Identify the Sazabi Project
4022
-
4023
- If the target project is already clear from context, reuse it. Otherwise call \`list_projects\` and ask the user which project should receive the collector data.
4024
-
4025
- Capture the selected project ID as \`SAZABI_PROJECT_ID\`.
4026
-
4027
- ## Phase 2: Provision the Connection and Get the Intake Key
4028
-
4029
- Call the appropriate connection-creation tool with \`type: "otel_collector"\` and \`projectId: SAZABI_PROJECT_ID\`.
4030
-
4031
- Capture the returned \`publicKey\`, derive \`publicKeyHex\` by stripping the leading \`sazabi_public_\` prefix, and construct the intake endpoint as \`https://<publicKeyHex>.<region>.intake.<domain>\`.
4032
-
4033
- ## Phase 3: Configure the Collector
4034
-
4035
- Ask which signals the user wants to forward (logs, traces) so the pipeline section can reference the right exporters. Note: metrics are not yet supported and will be silently dropped.
4036
-
4037
- **\`otelcol.yaml\` exporter block:**
4038
- \`\`\`yaml
4039
- exporters:
4040
- otlphttp/sazabi:
4041
- endpoint: https://<intake-host>
4042
-
4043
- service:
4044
- pipelines:
4045
- logs:
4046
- exporters: [otlphttp/sazabi]
4047
- traces:
4048
- exporters: [otlphttp/sazabi]
4049
- \`\`\`
4050
-
4051
- Merge the exporter into the user's existing pipeline rather than replacing their current exporters - add \`otlphttp/sazabi\` to the appropriate \`exporters\` lists.
4052
-
4053
- AskUserQuestion: Have you applied the config and restarted (or deployed) the collector?
4054
-
4055
- ## Phase 4: Verify
4056
-
4057
- After the user confirms the config is applied, check whether telemetry is arriving in the Sazabi project. If nothing appears within a few minutes:
4058
-
4059
- 1. Enable debug logging on the collector (\`service.telemetry.logs.level: debug\`) and look for exporter errors
4060
- 2. Confirm the pipeline section references \`otlphttp/sazabi\` in the correct signal pipelines
4061
- 3. Verify the endpoint URL includes the correct public key hex
4062
-
4063
- ## Troubleshooting
4064
-
4065
- ### No data appearing
4066
-
4067
- - Check collector logs for \`otlphttp/sazabi\` exporter errors
4068
- - Confirm \`otlphttp/sazabi\` is listed in \`service.pipelines.<signal>.exporters\`
4069
- - Verify no network policy is blocking outbound HTTPS to the intake endpoint
4070
-
4071
- ### Authentication errors
4072
-
4073
- - Confirm the endpoint hostname includes the \`-<publicKeyHex>\` segment
4074
- - Regenerate the intake key from the Sazabi dashboard if it was rotated
4075
-
4076
- ### Helm deployment
4077
-
4078
- For the \`opentelemetry-collector\` Helm chart, pass the config via \`config\` in \`values.yaml\` and merge the exporter block into the existing structure.
4079
- `;var DH=()=>{};var NH=`## Overview
4080
-
4081
- Send your OpenTelemetry metrics to Sazabi, stored as searchable log records.
4082
-
4083
- ## How it works
4084
-
4085
- Point your OTLP metrics exporter at a Sazabi endpoint. Sazabi stores each incoming metric data point as a log record. Metrics then run through the same search pipeline as your logs and traces, so you can line up a spike with the telemetry around it. There's no separate metrics backend.
4086
-
4087
- ## Streams
4088
-
4089
- - **OpenTelemetry metrics** — Sazabi stores each OTLP metric data point as a searchable log record with \`metric.name\`, \`metric.type\`, \`metric.unit\`, and \`metric.value\` attributes. You search them alongside your logs and traces.
4090
- `;var LH=()=>{};var zH=`---
4091
- name: otel-metrics-log-source-setup
4092
- description: Connect an OpenTelemetry metrics producer (SDK or Collector) to a Sazabi project, where metrics are ingested and stored as searchable log records. Use when the user wants to "connect OpenTelemetry metrics", "send OTel metrics to Sazabi", "set up metrics ingestion in Sazabi", or after running \`sazabi log-sources skill --provider otel_metrics\`. Points OTLP metrics export at Sazabi's keyed metrics intake endpoint.
4093
- surface: log-source
4094
- phase: setup
4095
- requires: otel_metrics
4096
- ---
4097
-
4098
- # OpenTelemetry Metrics log source setup
4099
-
4100
- Agent-facing runbook for connecting an OpenTelemetry metrics producer (SDK or Collector) to Sazabi. Metrics are ingested and stored as log records.
4101
-
4102
- ## When to use this source
4103
-
4104
- - The user emits OpenTelemetry metrics and wants them in Sazabi alongside logs and traces.
4105
- - The user exports OTLP metrics from an OpenTelemetry Collector or an SDK metrics pipeline.
4106
- - The user has no dedicated metrics backend and is comfortable querying metrics as log records.
4107
-
4108
- Prefer the standard \`otel\` source when the user only needs logs and traces. Use this source when metrics ingestion is the goal.
4109
-
4110
- ## Prerequisites
4111
-
4112
- - A running application or OpenTelemetry Collector that can export OTLP metrics over HTTP (\`http/protobuf\` or \`http/json\`).
4113
- - Permission to set environment variables (or edit the Collector config) on that runtime.
4114
- - A Sazabi OpenTelemetry Metrics log source, which mints the public key used in the endpoint URL.
4115
-
4116
- ## Setup steps
4117
-
4118
- 1. Create the OpenTelemetry Metrics log source in Sazabi (Settings → Log sources → OpenTelemetry Metrics). Copy the generated public key / endpoint.
4119
- 2. Set the OTLP metrics exporter environment on the producer:
4120
- - \`OTEL_EXPORTER_OTLP_METRICS_ENDPOINT\` = the Sazabi metrics endpoint shown in the setup flow (\`https://<publicKeyHex>.<region>.intake.<domain>/v1/metrics\`).
4121
- - \`OTEL_EXPORTER_OTLP_PROTOCOL\` = \`http/protobuf\` (or \`http/json\`).
4122
- - If the SDK requires it, authenticate with \`OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer <publicKey>\`; the keyed hostname also carries the public key.
4123
- 3. For an OpenTelemetry Collector, configure an \`otlphttp\` exporter with the same \`metrics_endpoint\` and wire it into the \`metrics\` pipeline.
4124
- 4. Restart or redeploy the producer so the exporter picks up the new configuration.
4125
-
4126
- ## Verify
4127
-
4128
- - Generate or wait for a metric to be exported.
4129
- - Confirm Sazabi receives it: the metric appears as a log record with \`telemetry.type=metric\`, \`metric.name\`, \`metric.type\`, and \`metric.value\` attributes, tagged with the exporting \`service.name\`.
4130
-
4131
- ## Notes
4132
-
4133
- - Each metric data point becomes one log record; histogram and summary points are summarized by their sum/count.
4134
- - Logs and traces posted to the same endpoint are handled normally (path dispatch on \`/v1/logs\`, \`/v1/traces\`, \`/v1/metrics\`).
4135
4135
  `;var MH=()=>{};var UH=`## Overview
4136
4136
 
4137
4137
  Stream Plain customer support events — threads, customers, labels, and more — into Sazabi.
@@ -4520,6 +4520,27 @@ opentelemetry-instrument python app.py
4520
4520
  For deploy shutdowns, make sure your OpenTelemetry SDK flushes before the process exits. The \`SIGTERM\` handler in \`instrumentation.cjs\` above calls \`shutdown()\` so the last telemetry batch is not dropped during Porter redeploys. It deliberately does not call \`process.exit()\`; if your app already has a \`SIGTERM\` handler, that handler stays in charge of when the process exits.
4521
4521
  `;var qH=()=>{};var YH=`## Overview
4522
4522
 
4523
+ Forward browser \`posthog-js\` capture traffic — analytics events, identify calls, and session replay snapshots — into Sazabi.
4524
+
4525
+ ## How it works
4526
+
4527
+ Point \`posthog-js\` at a reverse proxy you control. The proxy copies browser capture traffic to Sazabi and still sends PostHog's own SDK, config, and feature-flag traffic to PostHog. This is additive — your app keeps sending to PostHog with its existing project token.
4528
+
4529
+ ## Streams
4530
+
4531
+ - **Analytics events** — browser capture requests from \`posthog-js\` on the SDK \`/e/\` endpoint.
4532
+ - **Identify calls** — user identification requests from the SDK \`/i/\` endpoint.
4533
+ - **Session replay snapshots** — replay payloads from the SDK \`/s/\` endpoint.
4534
+
4535
+ ## Requirements
4536
+
4537
+ - A reverse proxy you control that can split PostHog SDK routes by path
4538
+
4539
+ ## Limitations
4540
+
4541
+ - This source captures only what \`posthog-js\` sends from the browser. It does not cover server-side PostHog events — use the PostHog CDP webhook source for those.
4542
+ `;var KH=()=>{};var JH='---\nname: posthog-sdk-log-source-setup\ndescription: Set up PostHog SDK browser analytics and session replay forwarding to Sazabi through a customer-controlled reverse proxy. Use when the user wants to "connect the PostHog SDK", "forward posthog-js events to Sazabi", "proxy PostHog capture traffic", or after running `sazabi log-sources skill --provider posthog_sdk`. The Sazabi public key rides in the capture target path; the PostHog `phc_*` token stays in `posthog.init` and is never used for Sazabi authentication.\nsurface: log-source\nphase: setup\nrequires: posthog_sdk\n---\n\n# PostHog SDK log source setup\n\nWalk the user through forwarding `posthog-js` capture traffic to Sazabi with a manual SDK and reverse-proxy flow. Sazabi auth is the public key in the capture target path; the PostHog `phc_*` token stays in `posthog.init` and is never used for Sazabi authentication.\n\n**Principle:** Do the work. Only pause when the user must choose a Sazabi project, confirm the PostHog region, provide a missing `phc_*` token, or edit/deploy app or proxy code. Never print `PUBLIC_KEY`, `SAZABI_CAPTURE_TARGET`, or the `phc_*` token in summaries.\n\n<important>\nUse AskUserQuestion only for user-owned boundaries. Use CLI discovery before asking.\n</important>\n\n## Phase 0: Check prerequisites\n\nChoose the Sazabi CLI command prefix:\n\n```sh\nif command -v sazabi >/dev/null 2>&1; then\n SAZABI_CLI="sazabi"\nelse\n SAZABI_CLI="bunx @sazabi/cli"\nfi\n```\n\nCheck auth and confirm the app already uses `posthog-js` or has a place to initialize it:\n\n```sh\n$SAZABI_CLI auth whoami --json\n```\n\nIf auth fails, ask whether to run `$SAZABI_CLI auth login` or `$SAZABI_CLI auth save <token>`. Do not echo tokens.\n\nConfirm Sazabi exposes the source type and inspect existing log sources:\n\n```sh\n$SAZABI_CLI log-sources providers --json | jq -e \'.items[] | select(.id == "posthog_sdk")\'\n$SAZABI_CLI log-sources list --provider posthog_sdk --json\n```\n\nIf an existing PostHog SDK log source is reused, Phase 2 recovers the keyed capture target from the log source; rotation (delete + recreate) is only needed when the key is compromised or deactivated (the plaintext key itself is only returned at create time).\n\n## Phase 1: Choose the Sazabi project\n\nReuse the active project only when it is clearly correct. Otherwise list projects and ask which project should receive the PostHog SDK telemetry:\n\n```sh\n$SAZABI_CLI projects list --json\n$SAZABI_CLI projects use <project-id>\nSAZABI_PROJECT_ID=<project-id>\n```\n\n## Phase 2: Create the Sazabi capture target\n\nCreate or reuse the log source. `create --json` (no `--metadata` — this source is connectionless) returns the public key as a plaintext string under `.publicKey`, shown only once at creation time, and the keyed capture target URL under `.endpointCards[0].url`. For an existing log source the capture target remains recoverable via `log-sources get`; rotate (delete + recreate) only when the key is compromised or deactivated.\n\n```sh\nLIST_JSON=$($SAZABI_CLI log-sources list --provider posthog_sdk --json)\nINSTANCE_ID=$(printf \'%s\' "$LIST_JSON" | jq -r \'.items[0].id // empty\')\n\nif [ -n "$INSTANCE_ID" ]; then\n # Reuse the existing log source; the keyed capture target is recoverable\n # from its log stream\'s endpoint cards.\n SAZABI_CAPTURE_TARGET=$($SAZABI_CLI log-sources get "$INSTANCE_ID" --json \\\n | jq -r \'.logSource.streams[0].endpointCards[0].url // empty\')\nelse\n CREATE_JSON=$($SAZABI_CLI log-sources create posthog_sdk --json)\n INSTANCE_ID=$(printf \'%s\' "$CREATE_JSON" | jq -r \'.logSource.id\')\n PUBLIC_KEY=$(printf \'%s\' "$CREATE_JSON" | jq -r \'.publicKey\')\n SAZABI_CAPTURE_TARGET=$(printf \'%s\' "$CREATE_JSON" | jq -r \'.endpointCards[0].url\')\nfi\n```\n\nKeep `SAZABI_CAPTURE_TARGET` local for app/proxy configuration and out of public logs, PRs, tickets, and summaries — the key hex is embedded in its hostname.\n\n## Phase 3: Configure the browser SDK\n\nAsk the user to confirm US vs EU PostHog when app config does not reveal it. Keep the real PostHog `phc_*` project token as the first argument and set `api_host` to the customer-controlled proxy path:\n\n```ts\nimport posthog from "posthog-js";\n\nposthog.init("<your phc_* project token>", {\n api_host: "/ingest",\n ui_host: "https://us.posthog.com",\n});\n```\n\nFor EU Cloud, use `ui_host: "https://eu.posthog.com"`. Do not replace the PostHog token with the Sazabi public key. There is no `session_recording.enabled` option in `posthog.init` — session replay is turned on in the PostHog project settings and is controlled client-side by `disable_session_recording` (default `false`).\n\n## Phase 4: Configure the reverse proxy\n\nPreserve path suffixes and query strings. Route only capture paths to Sazabi:\n\n```txt\n/e/* -> $SAZABI_CAPTURE_TARGET/e/*\n/i/* -> $SAZABI_CAPTURE_TARGET/i/*\n/s/* -> $SAZABI_CAPTURE_TARGET/s/*\n```\n\nRoute PostHog configuration, flag, and asset paths to the PostHog ingestion host:\n\n```txt\n/array/*, /flags/*, /decide/*, static assets, and other SDK paths -> https://us.i.posthog.com/*\n```\n\nFor EU Cloud, use `https://eu.i.posthog.com`. Never route the whole `api_host` prefix to Sazabi.\n\n**Next.js proxies:** add `skipTrailingSlashRedirect: true` to `next.config`. posthog-js posts to trailing-slash capture paths (`/e/`, `/i/v0/e/`, `/s/`); without this flag Next.js 308-redirects them to the slash-less path, which stops matching the capture rule and falls through to PostHog.\n\n## Phase 5: Verify and report\n\nDeploy or reload the app. Trigger a page view, custom event, identify call if the app normally identifies users, and enough interaction to produce a replay snapshot.\n\n```sh\n$SAZABI_CLI log-sources get "$INSTANCE_ID" --json\n```\n\nVerify telemetry arrival in Sazabi through the dashboard log source status or log search for the selected project. Success is at least one recent PostHog SDK event and, when session replay is enabled in your PostHog project, replay snapshot records after a short delay.\n\nReport `INSTANCE_ID`, Sazabi project, proxy path, and PostHog region. Do not report `PUBLIC_KEY`, `SAZABI_CAPTURE_TARGET`, or the `phc_*` token.\n\n## Troubleshooting\n\n- **Sazabi 401:** the `SAZABI_CAPTURE_TARGET` hostname is missing a valid `sazabi_public_` key hex or the key was deactivated. Rotate the key by deleting and recreating the log source (`$SAZABI_CLI log-sources delete "$INSTANCE_ID"` then `log-sources create posthog_sdk --json`), read the new `.endpointCards[0].url` as `SAZABI_CAPTURE_TARGET`, and redeploy.\n- **Feature flags or remote config break:** `/array/*`, `/flags/*`, `/decide/*`, or static SDK assets are routed to Sazabi. Route them to `https://us.i.posthog.com` or `https://eu.i.posthog.com`.\n- **Events do not appear:** inspect browser network requests to `api_host`; confirm ad blockers are not blocking the path, the proxy preserves suffixes and query strings, and `SAZABI_CAPTURE_TARGET` belongs to the selected Sazabi project/environment.\n- **Session replay is missing:** confirm session replay is enabled in your PostHog project settings (and `disable_session_recording` is not set), the session was not sampled out or disabled by a linked flag, `/s/*` routes to Sazabi, and the session was long enough to emit snapshots.\n- **Old public key is lost:** the plaintext key is shown only at log-source-create time, but the keyed capture target URL remains recoverable via `$SAZABI_CLI log-sources get "$INSTANCE_ID" --json` (`.logSource.streams[0].endpointCards[0].url`) — that URL is all the proxy needs. Only rotate (delete + recreate the log source) when the key itself is compromised; do not try to recover the old plaintext from `public-keys list` or `public-keys get`.\n';var WH=()=>{};var XH=`## Overview
4543
+
4523
4544
  Forward your PostHog product analytics and error events into Sazabi.
4524
4545
 
4525
4546
  ## How it works
@@ -4534,7 +4555,7 @@ PostHog's Data Pipeline posts each matching event to a Sazabi endpoint, and Saza
4534
4555
 
4535
4556
  - PostHog workspace with access to CDP / Data Pipeline destinations (paid PostHog feature)
4536
4557
  - The PostHog region for your workspace, either US or EU
4537
- `;var KH=()=>{};var JH=`---
4558
+ `;var ZH=()=>{};var tq=`---
4538
4559
  name: posthog-log-source-setup
4539
4560
  description: Connect a PostHog organization to a Sazabi project so PostHog events stream into Sazabi via auto-provisioned CDP HTTP-webhook destinations. Use when the user wants to "connect PostHog", "ingest PostHog events", "add PostHog as a log source", "add a PostHog data source", or after running \`sazabi log-sources skill --provider posthog\`. Drives the Sazabi CLI (\`log-sources create\` + \`log-streams create\`) plus direct calls to PostHog's REST API for project discovery and scope validation; log stream creation triggers the backend to POST to \`/api/projects/{id}/hog_functions/\` and mint a Sazabi public key.
4540
4561
  surface: log-source
@@ -4800,28 +4821,7 @@ A hog function that is \`active\` on the Sazabi side does not emit events unless
4800
4821
  ### Manual webhook destination already exists
4801
4822
 
4802
4823
  If the user previously hand-created an HTTP Webhook destination in PostHog (the legacy manual flow), it will keep forwarding to Sazabi independently of this log source — this skill's native flow installs a **separate** hog function. Either delete the manual destination in PostHog before running this skill (to avoid duplicate events) or leave both in place if intentional.
4803
- `;var WH=()=>{};var XH=`## Overview
4804
-
4805
- Forward browser \`posthog-js\` capture traffic — analytics events, identify calls, and session replay snapshots — into Sazabi.
4806
-
4807
- ## How it works
4808
-
4809
- Point \`posthog-js\` at a reverse proxy you control. The proxy copies browser capture traffic to Sazabi and still sends PostHog's own SDK, config, and feature-flag traffic to PostHog. This is additive — your app keeps sending to PostHog with its existing project token.
4810
-
4811
- ## Streams
4812
-
4813
- - **Analytics events** — browser capture requests from \`posthog-js\` on the SDK \`/e/\` endpoint.
4814
- - **Identify calls** — user identification requests from the SDK \`/i/\` endpoint.
4815
- - **Session replay snapshots** — replay payloads from the SDK \`/s/\` endpoint.
4816
-
4817
- ## Requirements
4818
-
4819
- - A reverse proxy you control that can split PostHog SDK routes by path
4820
-
4821
- ## Limitations
4822
-
4823
- - This source captures only what \`posthog-js\` sends from the browser. It does not cover server-side PostHog events — use the PostHog CDP webhook source for those.
4824
- `;var ZH=()=>{};var tq='---\nname: posthog-sdk-log-source-setup\ndescription: Set up PostHog SDK browser analytics and session replay forwarding to Sazabi through a customer-controlled reverse proxy. Use when the user wants to "connect the PostHog SDK", "forward posthog-js events to Sazabi", "proxy PostHog capture traffic", or after running `sazabi log-sources skill --provider posthog_sdk`. The Sazabi public key rides in the capture target path; the PostHog `phc_*` token stays in `posthog.init` and is never used for Sazabi authentication.\nsurface: log-source\nphase: setup\nrequires: posthog_sdk\n---\n\n# PostHog SDK log source setup\n\nWalk the user through forwarding `posthog-js` capture traffic to Sazabi with a manual SDK and reverse-proxy flow. Sazabi auth is the public key in the capture target path; the PostHog `phc_*` token stays in `posthog.init` and is never used for Sazabi authentication.\n\n**Principle:** Do the work. Only pause when the user must choose a Sazabi project, confirm the PostHog region, provide a missing `phc_*` token, or edit/deploy app or proxy code. Never print `PUBLIC_KEY`, `SAZABI_CAPTURE_TARGET`, or the `phc_*` token in summaries.\n\n<important>\nUse AskUserQuestion only for user-owned boundaries. Use CLI discovery before asking.\n</important>\n\n## Phase 0: Check prerequisites\n\nChoose the Sazabi CLI command prefix:\n\n```sh\nif command -v sazabi >/dev/null 2>&1; then\n SAZABI_CLI="sazabi"\nelse\n SAZABI_CLI="bunx @sazabi/cli"\nfi\n```\n\nCheck auth and confirm the app already uses `posthog-js` or has a place to initialize it:\n\n```sh\n$SAZABI_CLI auth whoami --json\n```\n\nIf auth fails, ask whether to run `$SAZABI_CLI auth login` or `$SAZABI_CLI auth save <token>`. Do not echo tokens.\n\nConfirm Sazabi exposes the source type and inspect existing log sources:\n\n```sh\n$SAZABI_CLI log-sources providers --json | jq -e \'.items[] | select(.id == "posthog_sdk")\'\n$SAZABI_CLI log-sources list --provider posthog_sdk --json\n```\n\nIf an existing PostHog SDK log source is reused, Phase 2 recovers the keyed capture target from the log source; rotation (delete + recreate) is only needed when the key is compromised or deactivated (the plaintext key itself is only returned at create time).\n\n## Phase 1: Choose the Sazabi project\n\nReuse the active project only when it is clearly correct. Otherwise list projects and ask which project should receive the PostHog SDK telemetry:\n\n```sh\n$SAZABI_CLI projects list --json\n$SAZABI_CLI projects use <project-id>\nSAZABI_PROJECT_ID=<project-id>\n```\n\n## Phase 2: Create the Sazabi capture target\n\nCreate or reuse the log source. `create --json` (no `--metadata` — this source is connectionless) returns the public key as a plaintext string under `.publicKey`, shown only once at creation time, and the keyed capture target URL under `.endpointCards[0].url`. For an existing log source the capture target remains recoverable via `log-sources get`; rotate (delete + recreate) only when the key is compromised or deactivated.\n\n```sh\nLIST_JSON=$($SAZABI_CLI log-sources list --provider posthog_sdk --json)\nINSTANCE_ID=$(printf \'%s\' "$LIST_JSON" | jq -r \'.items[0].id // empty\')\n\nif [ -n "$INSTANCE_ID" ]; then\n # Reuse the existing log source; the keyed capture target is recoverable\n # from its log stream\'s endpoint cards.\n SAZABI_CAPTURE_TARGET=$($SAZABI_CLI log-sources get "$INSTANCE_ID" --json \\\n | jq -r \'.logSource.streams[0].endpointCards[0].url // empty\')\nelse\n CREATE_JSON=$($SAZABI_CLI log-sources create posthog_sdk --json)\n INSTANCE_ID=$(printf \'%s\' "$CREATE_JSON" | jq -r \'.logSource.id\')\n PUBLIC_KEY=$(printf \'%s\' "$CREATE_JSON" | jq -r \'.publicKey\')\n SAZABI_CAPTURE_TARGET=$(printf \'%s\' "$CREATE_JSON" | jq -r \'.endpointCards[0].url\')\nfi\n```\n\nKeep `SAZABI_CAPTURE_TARGET` local for app/proxy configuration and out of public logs, PRs, tickets, and summaries — the key hex is embedded in its hostname.\n\n## Phase 3: Configure the browser SDK\n\nAsk the user to confirm US vs EU PostHog when app config does not reveal it. Keep the real PostHog `phc_*` project token as the first argument and set `api_host` to the customer-controlled proxy path:\n\n```ts\nimport posthog from "posthog-js";\n\nposthog.init("<your phc_* project token>", {\n api_host: "/ingest",\n ui_host: "https://us.posthog.com",\n});\n```\n\nFor EU Cloud, use `ui_host: "https://eu.posthog.com"`. Do not replace the PostHog token with the Sazabi public key. There is no `session_recording.enabled` option in `posthog.init` — session replay is turned on in the PostHog project settings and is controlled client-side by `disable_session_recording` (default `false`).\n\n## Phase 4: Configure the reverse proxy\n\nPreserve path suffixes and query strings. Route only capture paths to Sazabi:\n\n```txt\n/e/* -> $SAZABI_CAPTURE_TARGET/e/*\n/i/* -> $SAZABI_CAPTURE_TARGET/i/*\n/s/* -> $SAZABI_CAPTURE_TARGET/s/*\n```\n\nRoute PostHog configuration, flag, and asset paths to the PostHog ingestion host:\n\n```txt\n/array/*, /flags/*, /decide/*, static assets, and other SDK paths -> https://us.i.posthog.com/*\n```\n\nFor EU Cloud, use `https://eu.i.posthog.com`. Never route the whole `api_host` prefix to Sazabi.\n\n**Next.js proxies:** add `skipTrailingSlashRedirect: true` to `next.config`. posthog-js posts to trailing-slash capture paths (`/e/`, `/i/v0/e/`, `/s/`); without this flag Next.js 308-redirects them to the slash-less path, which stops matching the capture rule and falls through to PostHog.\n\n## Phase 5: Verify and report\n\nDeploy or reload the app. Trigger a page view, custom event, identify call if the app normally identifies users, and enough interaction to produce a replay snapshot.\n\n```sh\n$SAZABI_CLI log-sources get "$INSTANCE_ID" --json\n```\n\nVerify telemetry arrival in Sazabi through the dashboard log source status or log search for the selected project. Success is at least one recent PostHog SDK event and, when session replay is enabled in your PostHog project, replay snapshot records after a short delay.\n\nReport `INSTANCE_ID`, Sazabi project, proxy path, and PostHog region. Do not report `PUBLIC_KEY`, `SAZABI_CAPTURE_TARGET`, or the `phc_*` token.\n\n## Troubleshooting\n\n- **Sazabi 401:** the `SAZABI_CAPTURE_TARGET` hostname is missing a valid `sazabi_public_` key hex or the key was deactivated. Rotate the key by deleting and recreating the log source (`$SAZABI_CLI log-sources delete "$INSTANCE_ID"` then `log-sources create posthog_sdk --json`), read the new `.endpointCards[0].url` as `SAZABI_CAPTURE_TARGET`, and redeploy.\n- **Feature flags or remote config break:** `/array/*`, `/flags/*`, `/decide/*`, or static SDK assets are routed to Sazabi. Route them to `https://us.i.posthog.com` or `https://eu.i.posthog.com`.\n- **Events do not appear:** inspect browser network requests to `api_host`; confirm ad blockers are not blocking the path, the proxy preserves suffixes and query strings, and `SAZABI_CAPTURE_TARGET` belongs to the selected Sazabi project/environment.\n- **Session replay is missing:** confirm session replay is enabled in your PostHog project settings (and `disable_session_recording` is not set), the session was not sampled out or disabled by a linked flag, `/s/*` routes to Sazabi, and the session was long enough to emit snapshots.\n- **Old public key is lost:** the plaintext key is shown only at log-source-create time, but the keyed capture target URL remains recoverable via `$SAZABI_CLI log-sources get "$INSTANCE_ID" --json` (`.logSource.streams[0].endpointCards[0].url`) — that URL is all the proxy needs. Only rotate (delete + recreate the log source) when the key itself is compromised; do not try to recover the old plaintext from `public-keys list` or `public-keys get`.\n';var eq=()=>{};var oq="## Overview\n\nForward Prometheus metrics into Sazabi as searchable log records.\n\n## How it works\n\nPrometheus doesn't speak OTLP, so an OpenTelemetry Collector scrapes your existing Prometheus targets and forwards the metrics to Sazabi. Sazabi stores each data point as a searchable log record and keeps its name, type, value, and labels as structured attributes.\n\n## Streams\n\n- **Prometheus metrics** — one searchable record per scraped data point, with Prometheus labels preserved as attributes, metric identity captured as `metric.name`, `metric.type`, and `metric.value`, and histogram/summary points keeping `metric.count`, `metric.sum`, `metric.min`, and `metric.max` when present.\n\n## Requirements\n\n- An OpenTelemetry Collector (Contrib distribution) with the `prometheus` receiver and `otlphttp` exporter.\n";var nq=()=>{};var iq=`---
4824
+ `;var eq=()=>{};var oq="## Overview\n\nForward Prometheus metrics into Sazabi as searchable log records.\n\n## How it works\n\nPrometheus doesn't speak OTLP, so an OpenTelemetry Collector scrapes your existing Prometheus targets and forwards the metrics to Sazabi. Sazabi stores each data point as a searchable log record and keeps its name, type, value, and labels as structured attributes.\n\n## Streams\n\n- **Prometheus metrics** — one searchable record per scraped data point, with Prometheus labels preserved as attributes, metric identity captured as `metric.name`, `metric.type`, and `metric.value`, and histogram/summary points keeping `metric.count`, `metric.sum`, `metric.min`, and `metric.max` when present.\n\n## Requirements\n\n- An OpenTelemetry Collector (Contrib distribution) with the `prometheus` receiver and `otlphttp` exporter.\n";var nq=()=>{};var iq=`---
4825
4825
  name: prometheus-log-source-setup
4826
4826
  description: Forward Prometheus metrics to a Sazabi project, where they appear as searchable log records. Use when the user wants to "connect Prometheus", "send Prometheus metrics to Sazabi", "set up Prometheus scraping into Sazabi", or after running \`sazabi log-sources skill --provider prometheus\`. Walks the user through forwarding scraped metrics (via an OpenTelemetry Collector pipeline) to Sazabi's keyed intake endpoint.
4827
4827
  surface: log-source
@@ -5354,71 +5354,6 @@ If your application already emits OpenTelemetry directly (or runs an OTel Collec
5354
5354
  Redeploy or restart the app so it loads the new configuration, then run LLM/agent workloads that generate spans; inspect Sazabi for traces tagged with the Respan adapter. Traces carry GenAI (\`gen_ai.*\`) and Traceloop (\`traceloop.*\`) attributes, which Sazabi maps to model/token/input/output fields.
5355
5355
  `;var Aq=()=>{};var bq=`## Overview
5356
5356
 
5357
- Forward errors, exceptions, structured logs, and other envelope telemetry from any Sentry SDK into Sazabi.
5358
-
5359
- ## How it works
5360
-
5361
- Point your Sentry SDK at a Sazabi DSN. Send events only to Sazabi by swapping the DSN, or send to both Sazabi and your existing Sentry project so its dashboards and alerting stay intact.
5362
-
5363
- ## Streams
5364
-
5365
- - **Errors and events** — exceptions, transactions, streamed spans, trace metrics, sessions, check-ins, feedback, and client reports. Includes automatic grouping, pattern detection, and root-cause analysis.
5366
- - **Structured logs** — Sazabi splits each batch of SDK logs into individual searchable records. Sentry attributes and trace/span links are kept.
5367
- - **Envelope telemetry** — Sazabi turns JSON and text envelope items from your SDK traffic into searchable records, and handles new item types as Sentry adds them.
5368
-
5369
- ## Requirements
5370
-
5371
- - To capture logs, turn on structured logging in the SDK (\`enableLogs: true\` for JavaScript or \`enable_logs=True\` for Python).
5372
-
5373
- ## Limitations
5374
-
5375
- - Sazabi does not store binary attachments, profiles, replay recordings, or native crash blobs as logs.
5376
- `;var yq=()=>{};var Sq=`---
5377
- name: sentry-log-source-setup
5378
- description: Forward Sentry SDK telemetry to a Sazabi project by swapping the SDK DSN for Sazabi's intake-shaped DSN. Use when the user wants to "connect the Sentry SDK", "forward Sentry errors to Sazabi", "swap my Sentry DSN", or after running \`sazabi log-sources skill --provider sentry\`. Works with official Sentry clients (JavaScript, Python, Go, Ruby, Java, .NET, etc.); distinct from the Sentry Platform log source provider, which streams Sentry issues and alerts via webhooks.
5379
- surface: log-source
5380
- phase: setup
5381
- requires: sentry
5382
- ---
5383
-
5384
- # Sentry SDK log source setup
5385
-
5386
- Forward Sentry SDK telemetry to Sazabi by swapping the SDK **DSN** to Sazabi’s intake-shaped DSN. This aligns with official Sentry clients (JavaScript, Python, Go, Ruby, Java, .NET, etc.).
5387
-
5388
- ## Phase 1: Mint credentials in Sazabi
5389
-
5390
- 1. Ensure the Sazabi organization has the Sentry integration enabled for the desired **Sazabi project**.
5391
- 2. Complete dashboard setup until Sazabi shows the **DSN** in the manual flow (\`https://sazabi@{publicKey}.{projectRegion}.intake.{intakeDomain}/0\` pattern, where \`{publicKey}\` is the key hex embedded in the hostname).
5392
-
5393
- ## Phase 2: Application configuration
5394
-
5395
- 1. Locate where your app calls \`Sentry.init\` / \`sentry_sdk.init\` (or equivalent).
5396
- 2. Replace the **DSN** string with Sazabi’s value exactly—host is \`{publicKey}.{projectRegion}.intake.{intakeDomain}\` (the key hex is the leading hostname label), user segment is the literal \`sazabi\`.
5397
- 3. Enable structured logs in the SDK when log capture is desired (\`enableLogs: true\` for JavaScript or \`enable_logs=True\` for Python).
5398
- 4. Remove or avoid logging the raw DSN; treat \`{publicKey}\` as a bearer-like secret embedded in the DSN hostname.
5399
-
5400
- Example shapes (adapt to your SDK):
5401
-
5402
- \`\`\`javascript
5403
- // Node / browser-style init
5404
- Sentry.init({
5405
- dsn: "https://sazabi@<publicKey>.<projectRegion>.intake.<intakeDomain>/0",
5406
- enableLogs: true,
5407
- });
5408
- \`\`\`
5409
-
5410
- \`\`\`python
5411
- sentry_sdk.init(
5412
- dsn="https://sazabi@<publicKey>.<projectRegion>.intake.<intakeDomain>/0",
5413
- enable_logs=True,
5414
- )
5415
- \`\`\`
5416
-
5417
- ## Phase 3: Verify
5418
-
5419
- Trigger a test exception and emit a structured log. Confirm both arrive in Sazabi for this project and that ingestion is not silently blocked by CSP or outbound proxy rules.
5420
- `;var Iq=()=>{};var vq=`## Overview
5421
-
5422
5357
  Stream Sentry issue, comment, and alert events into Sazabi.
5423
5358
 
5424
5359
  ## How it works
@@ -5435,7 +5370,7 @@ Connecting your Sentry account creates a Sentry Internal Integration in your org
5435
5370
 
5436
5371
  - **Owner or Manager role in your Sentry org** — creating an Internal Integration needs \`org:write\`, which Admin, Member, and Billing roles do not have (Sentry returns 403), whether you connect your account or create the integration yourself.
5437
5372
  - To connect your account: a Sentry user auth token with these scopes (Sentry UI labels): **Organization: Read & Write** (\`org:write\`), **Project: Read** (\`project:read\`), and **Issue & Event: Read** (\`event:read\`). The \`org:write\` scope only lets Sazabi create the Internal Integration for you; the integration itself only receives read-level webhook events.
5438
- `;var Cq=()=>{};var wq=`---
5373
+ `;var yq=()=>{};var Sq=`---
5439
5374
  name: sentry-platform-log-source-setup
5440
5375
  description: Connect a Sentry organization to a Sazabi project so issue, comment, and alert events stream in through a Sentry Internal Integration. Use when the user wants to "connect Sentry", "stream Sentry issues to Sazabi", "set up Sentry alerts in Sazabi", "point a Sentry webhook at Sazabi", or after running \`sazabi log-sources skill --provider sentry_platform\`. Covers both setup paths - account (Sazabi creates the Internal Integration via the Sentry API using an org:write auth token, and the single log stream auto-provisions) and endpoint (the user creates the Internal Integration themselves in Sentry's Developer Settings and points its webhook at a Sazabi keyed intake URL, no auth token shared). Distinct from the Sentry SDK log source provider, which forwards SDK telemetry via a swapped DSN.
5441
5376
  surface: log-source
@@ -5654,6 +5589,71 @@ Confirm the token is a **user auth token** minted from **Account → API → Aut
5654
5589
  ### Log source persisted but log stream stuck in \`pending\`
5655
5590
 
5656
5591
  Provisioning runs in a Temporal workflow. Wait 30 seconds and re-run \`streams list\`. If still pending after a minute, the workflow likely errored — surface \`errorMessage\` and retry by deleting the log source and re-running A2. (Endpoint-path log sources do not go through this workflow — the webhook lives entirely in Sentry.)
5592
+ `;var Iq=()=>{};var vq=`## Overview
5593
+
5594
+ Forward errors, exceptions, structured logs, and other envelope telemetry from any Sentry SDK into Sazabi.
5595
+
5596
+ ## How it works
5597
+
5598
+ Point your Sentry SDK at a Sazabi DSN. Send events only to Sazabi by swapping the DSN, or send to both Sazabi and your existing Sentry project so its dashboards and alerting stay intact.
5599
+
5600
+ ## Streams
5601
+
5602
+ - **Errors and events** — exceptions, transactions, streamed spans, trace metrics, sessions, check-ins, feedback, and client reports. Includes automatic grouping, pattern detection, and root-cause analysis.
5603
+ - **Structured logs** — Sazabi splits each batch of SDK logs into individual searchable records. Sentry attributes and trace/span links are kept.
5604
+ - **Envelope telemetry** — Sazabi turns JSON and text envelope items from your SDK traffic into searchable records, and handles new item types as Sentry adds them.
5605
+
5606
+ ## Requirements
5607
+
5608
+ - To capture logs, turn on structured logging in the SDK (\`enableLogs: true\` for JavaScript or \`enable_logs=True\` for Python).
5609
+
5610
+ ## Limitations
5611
+
5612
+ - Sazabi does not store binary attachments, profiles, replay recordings, or native crash blobs as logs.
5613
+ `;var Cq=()=>{};var wq=`---
5614
+ name: sentry-log-source-setup
5615
+ description: Forward Sentry SDK telemetry to a Sazabi project by swapping the SDK DSN for Sazabi's intake-shaped DSN. Use when the user wants to "connect the Sentry SDK", "forward Sentry errors to Sazabi", "swap my Sentry DSN", or after running \`sazabi log-sources skill --provider sentry\`. Works with official Sentry clients (JavaScript, Python, Go, Ruby, Java, .NET, etc.); distinct from the Sentry Platform log source provider, which streams Sentry issues and alerts via webhooks.
5616
+ surface: log-source
5617
+ phase: setup
5618
+ requires: sentry
5619
+ ---
5620
+
5621
+ # Sentry SDK log source setup
5622
+
5623
+ Forward Sentry SDK telemetry to Sazabi by swapping the SDK **DSN** to Sazabi’s intake-shaped DSN. This aligns with official Sentry clients (JavaScript, Python, Go, Ruby, Java, .NET, etc.).
5624
+
5625
+ ## Phase 1: Mint credentials in Sazabi
5626
+
5627
+ 1. Ensure the Sazabi organization has the Sentry integration enabled for the desired **Sazabi project**.
5628
+ 2. Complete dashboard setup until Sazabi shows the **DSN** in the manual flow (\`https://sazabi@{publicKey}.{projectRegion}.intake.{intakeDomain}/0\` pattern, where \`{publicKey}\` is the key hex embedded in the hostname).
5629
+
5630
+ ## Phase 2: Application configuration
5631
+
5632
+ 1. Locate where your app calls \`Sentry.init\` / \`sentry_sdk.init\` (or equivalent).
5633
+ 2. Replace the **DSN** string with Sazabi’s value exactly—host is \`{publicKey}.{projectRegion}.intake.{intakeDomain}\` (the key hex is the leading hostname label), user segment is the literal \`sazabi\`.
5634
+ 3. Enable structured logs in the SDK when log capture is desired (\`enableLogs: true\` for JavaScript or \`enable_logs=True\` for Python).
5635
+ 4. Remove or avoid logging the raw DSN; treat \`{publicKey}\` as a bearer-like secret embedded in the DSN hostname.
5636
+
5637
+ Example shapes (adapt to your SDK):
5638
+
5639
+ \`\`\`javascript
5640
+ // Node / browser-style init
5641
+ Sentry.init({
5642
+ dsn: "https://sazabi@<publicKey>.<projectRegion>.intake.<intakeDomain>/0",
5643
+ enableLogs: true,
5644
+ });
5645
+ \`\`\`
5646
+
5647
+ \`\`\`python
5648
+ sentry_sdk.init(
5649
+ dsn="https://sazabi@<publicKey>.<projectRegion>.intake.<intakeDomain>/0",
5650
+ enable_logs=True,
5651
+ )
5652
+ \`\`\`
5653
+
5654
+ ## Phase 3: Verify
5655
+
5656
+ Trigger a test exception and emit a structured log. Confirm both arrive in Sazabi for this project and that ingestion is not silently blocked by CSP or outbound proxy rules.
5657
5657
  `;var Eq=()=>{};var xq=`## Overview
5658
5658
 
5659
5659
  Stream your Supabase Postgres, Auth, and Edge Function logs into Sazabi.
@@ -6689,7 +6689,7 @@ When events are arriving, report back:
6689
6689
  - That events are landing, with payload fields preserved under \`webhook.*\`.
6690
6690
 
6691
6691
  Do not print \`PUBLIC_KEY\` (or the full keyed URL) in the summary.
6692
- `;var Kq=()=>{};var Wq,Jq;var Zq=h(()=>{Z2();eG();nG();rG();sG();cG();uG();pG();mG();AG();yG();IG();CG();EG();kG();PG();TG();OG();DG();LG();MG();jG();FG();GG();qG();KG();WG();ZG();eH();nH();rH();sH();cH();uH();pH();mH();AH();yH();IH();CH();EH();kH();PH();TH();OH();DH();LH();MH();jH();FH();GH();qH();KH();WH();ZH();eq();nq();rq();sq();cq();uq();pq();mq();Aq();yq();Iq();Cq();Eq();kq();Pq();Tq();Oq();Dq();Lq();Mq();jq();Fq();Gq();qq();Kq();Wq={cloudflare:oG.trim(),cloudflare_workers:aG.trim(),cloudwatch:dG.trim(),convex:bG.trim(),datadog:vG.trim(),daytona:xG.trim(),digital_ocean:BG.trim(),e2b:QG.trim(),elastic_cloud:zG.trim(),fluent_bit:$G.trim(),fly_io:VG.trim(),gcp:JG.trim(),grafana_alloy:tH.trim(),inngest:iH.trim(),langchain:lH.trim(),mastra:gH.trim(),neon:fH.trim(),netlify:SH.trim(),openrouter:wH.trim(),otel:RH.trim(),otel_collector:_H.trim(),otel_metrics:NH.trim(),plain:UH.trim(),posthog:YH.trim(),posthog_sdk:XH.trim(),porter:HH.trim(),prometheus:oq.trim(),railway:aq.trim(),render:dq.trim(),respan:hq.trim(),sentry:bq.trim(),sentry_platform:vq.trim(),supabase:xq.trim(),temporal:Bq.trim(),trigger_dev:Qq.trim(),vector:zq.trim(),vercel:$q.trim(),webhook_events:Vq.trim(),claude_code:X2.trim(),codex:hG.trim()},Jq={cloudflare:iG.trim(),cloudflare_workers:lG.trim(),cloudwatch:gG.trim(),convex:SG.trim(),datadog:wG.trim(),daytona:RG.trim(),digital_ocean:_G.trim(),e2b:NG.trim(),elastic_cloud:UG.trim(),fluent_bit:HG.trim(),fly_io:YG.trim(),gcp:XG.trim(),grafana_alloy:oH.trim(),inngest:aH.trim(),langchain:dH.trim(),mastra:hH.trim(),neon:bH.trim(),netlify:vH.trim(),openrouter:xH.trim(),otel:BH.trim(),otel_collector:QH.trim(),otel_metrics:zH.trim(),plain:$H.trim(),posthog:JH.trim(),posthog_sdk:tq.trim(),porter:VH.trim(),prometheus:iq.trim(),railway:lq.trim(),render:gq.trim(),respan:fq.trim(),sentry:Sq.trim(),sentry_platform:wq.trim(),supabase:Rq.trim(),temporal:_q.trim(),trigger_dev:Nq.trim(),vector:Uq.trim(),vercel:Hq.trim(),webhook_events:Yq.trim(),claude_code:tG.trim(),codex:fG.trim()}});var qR=(e)=>{let t=Jq[e];if(t)return t;return Wq[e]};var Xq=h(()=>{Zq()});var te="available";var VR;var eV=h(()=>{VR={perStreamInstructions:!0,groups:[{id:"enable",section:"config",title:"Enable telemetry in Claude Code settings",actions:[{instruction:"Add the following environment variables to the `env` block in `~/.claude/settings.json` — set `OTEL_EXPORTER_OTLP_ENDPOINT` to your intake URL (above).",payloads:[{kind:"code",label:"~/.claude/settings.json",language:"json",copyLabel:"Claude Code settings",value:`{
6692
+ `;var Kq=()=>{};var Wq,Jq;var Zq=h(()=>{Z2();eG();nG();rG();sG();cG();uG();pG();mG();AG();yG();IG();CG();EG();kG();PG();TG();OG();DG();LG();MG();jG();FG();GG();qG();KG();WG();ZG();eH();nH();rH();sH();cH();uH();pH();mH();AH();yH();IH();CH();EH();kH();PH();TH();OH();DH();LH();MH();jH();FH();GH();qH();KH();WH();ZH();eq();nq();rq();sq();cq();uq();pq();mq();Aq();yq();Iq();Cq();Eq();kq();Pq();Tq();Oq();Dq();Lq();Mq();jq();Fq();Gq();qq();Kq();Wq={cloudflare:aG.trim(),cloudflare_workers:oG.trim(),cloudwatch:dG.trim(),convex:bG.trim(),datadog:vG.trim(),daytona:xG.trim(),digital_ocean:BG.trim(),e2b:QG.trim(),elastic_cloud:zG.trim(),fluent_bit:$G.trim(),fly_io:VG.trim(),gcp:JG.trim(),grafana_alloy:tH.trim(),inngest:iH.trim(),langchain:lH.trim(),mastra:gH.trim(),neon:fH.trim(),netlify:SH.trim(),openrouter:wH.trim(),otel:NH.trim(),otel_collector:RH.trim(),otel_metrics:_H.trim(),plain:UH.trim(),posthog:XH.trim(),posthog_sdk:YH.trim(),porter:HH.trim(),prometheus:oq.trim(),railway:aq.trim(),render:dq.trim(),respan:hq.trim(),sentry:vq.trim(),sentry_platform:bq.trim(),supabase:xq.trim(),temporal:Bq.trim(),trigger_dev:Qq.trim(),vector:zq.trim(),vercel:$q.trim(),webhook_events:Vq.trim(),claude_code:X2.trim(),codex:hG.trim()},Jq={cloudflare:lG.trim(),cloudflare_workers:iG.trim(),cloudwatch:gG.trim(),convex:SG.trim(),datadog:wG.trim(),daytona:RG.trim(),digital_ocean:_G.trim(),e2b:NG.trim(),elastic_cloud:UG.trim(),fluent_bit:HG.trim(),fly_io:YG.trim(),gcp:XG.trim(),grafana_alloy:oH.trim(),inngest:aH.trim(),langchain:dH.trim(),mastra:hH.trim(),neon:bH.trim(),netlify:vH.trim(),openrouter:xH.trim(),otel:zH.trim(),otel_collector:BH.trim(),otel_metrics:QH.trim(),plain:$H.trim(),posthog:tq.trim(),posthog_sdk:JH.trim(),porter:VH.trim(),prometheus:iq.trim(),railway:lq.trim(),render:gq.trim(),respan:fq.trim(),sentry:wq.trim(),sentry_platform:Sq.trim(),supabase:Rq.trim(),temporal:_q.trim(),trigger_dev:Nq.trim(),vector:Uq.trim(),vercel:Hq.trim(),webhook_events:Yq.trim(),claude_code:tG.trim(),codex:fG.trim()}});var qR=(e)=>{let t=Jq[e];if(t)return t;return Wq[e]};var Xq=h(()=>{Zq()});var te="available";var VR;var eV=h(()=>{VR={perStreamInstructions:!0,groups:[{id:"enable",section:"config",title:"Enable telemetry in Claude Code settings",actions:[{instruction:"Add the following environment variables to the `env` block in `~/.claude/settings.json` — set `OTEL_EXPORTER_OTLP_ENDPOINT` to your intake URL (above).",payloads:[{kind:"code",label:"~/.claude/settings.json",language:"json",copyLabel:"Claude Code settings",value:`{
6693
6693
  "env": {
6694
6694
  "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
6695
6695
  "OTEL_LOGS_EXPORTER": "otlp",
@@ -6698,7 +6698,7 @@ Do not print \`PUBLIC_KEY\` (or the full keyed URL) in the summary.
6698
6698
  "OTEL_LOG_USER_PROMPTS": "1",
6699
6699
  "OTEL_LOG_ASSISTANT_RESPONSES": "0"
6700
6700
  }
6701
- }`}],notes:[{text:"`OTEL_LOG_USER_PROMPTS` exports raw prompt text (including anything you paste). Remove it to keep prompts private while still tracking tool calls and API usage.",variant:"requirement"},{text:"Keep `OTEL_LOG_ASSISTANT_RESPONSES` at `0` — when unset it falls back to the prompts setting, so enabling prompts alone would also export model responses. Tool content stays redacted unless `OTEL_LOG_TOOL_DETAILS`/`OTEL_LOG_TOOL_CONTENT` are enabled."},{text:"Claude Code metrics are not ingested yet — leave `OTEL_METRICS_EXPORTER` unset; enabling it only ships traffic that Sazabi discards."}]}]},{id:"restart",section:"verify",title:"Restart Claude Code",actions:[{instruction:"Env vars load at startup — telemetry begins with your next Claude Code session, not the current one. Restart Claude Code now."}]}]}});var tV;var nV=h(()=>{eV();tV={id:"claude_code",name:"Claude Code",searchAliases:["claude","anthropic","claude-code","coding agent"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"claude-code",label:"Claude Code",transform:"otlp-passthrough"}],lifecycleSkipReason:"Manual Claude Code env-var setup is not exercised by automated lifecycle tests yet.",subtitle:"Ship Claude Code session telemetry — prompts, tool calls, and model API requests with token counts and cost — to Sazabi via its built-in OTLP exporter.",features:["Prompt and tool-call events","Token usage & cost per API request","Session and user attribution","No code changes required"],evidenceHints:[".claude/settings.json with CLAUDE_CODE_ENABLE_TELEMETRY or OTEL_* env vars","Claude Code CLI installed and in active use","Anthropic API key or Claude subscription usage"],setupSkill:te,dashboard:{slug:"claude-code",iconKey:"claude-code",intakeSourceId:"claude-code"}}});var vt,Nf=(e,t="http/protobuf")=>[{instruction:`Add the OpenTelemetry SDK to your ${e}.`,notes:[{text:"Most languages have official OpenTelemetry SDKs available (e.g., `@opentelemetry/api` for Node.js, `opentelemetry-api` for Python, etc.)."}]},{instruction:`Initialize OpenTelemetry in your ${e}.`},{instruction:`Set the following environment variables in your ${e} environment — \`OTEL_EXPORTER_OTLP_ENDPOINT\` is your intake URL (above).`,payloads:[{kind:"copyable",label:"`OTEL_EXPORTER_OTLP_PROTOCOL`",value:t,copyLabel:"OTLP protocol"}],notes:[Uke]}],Uke;var Un=h(()=>{vt={label:"Connect",pendingLabel:"Connecting..."},Uke={text:"Most OpenTelemetry SDKs automatically detect these environment variables. If your SDK is already configured in code, use the same endpoint and protocol values there instead."}});var KR,YR,WR;var oV=h(()=>{Un();KR={kind:"multi-step",steps:[{id:"prepare",title:"Create token",notes:[{variant:"requirement",text:"**Cloudflare Logpush is only available on the Enterprise plan.** Free, Pro, and Business accounts cannot create Logpush jobs."}],actions:[{kind:"instruction",instruction:"Create a Cloudflare API token with **Account Settings: Read**, **Zone: Read**, and **Zone Logs: Edit** permissions.",payloads:[{kind:"external-link",label:"Open Cloudflare API token template",href:"https://dash.cloudflare.com/profile/api-tokens?permissionGroupKeys=%5B%7B%22key%22%3A%22account_settings%22%2C%22type%22%3A%22read%22%2C%22scope%22%3A%22account%22%7D%2C%7B%22key%22%3A%22logs%22%2C%22type%22%3A%22edit%22%2C%22scope%22%3A%22zone%22%7D%2C%7B%22key%22%3A%22zone%22%2C%22type%22%3A%22read%22%2C%22scope%22%3A%22zone%22%7D%5D&name=Sazabi+Cloudflare+Logpush"}]},{kind:"instruction",instruction:"Pick the account you want to connect, click **Continue to summary**, then **Create Token**, and copy the token for the next step."}]},{id:"credentials",title:"Enter credentials",actions:[{id:"token",kind:"secret",label:"Cloudflare API token",instruction:"Enter your Cloudflare API token below.",description:"Token with Account Settings Read, Zone Read, and Logs Edit permissions.",placeholder:"Enter your Cloudflare API token"},{id:"accountId",kind:"text",label:"Cloudflare account ID",instruction:"Enter your Cloudflare account ID below.",description:"The 32-character hex ID from your Cloudflare dashboard URL or account overview.",placeholder:"e.g. a1b2c3d4e5f6...",pattern:"^[a-f0-9]{32}$",patternMessage:"Enter the 32-character Cloudflare account ID."}]}],submit:{actions:[{kind:"validate",action:"validate",input:{token:"$token",accountId:"$accountId"},resultAs:"validate"}],metadata:{cloudflareApiToken:"$token",accountId:"$accountId",accountName:"$validate.accountName"},button:vt},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/cloudflare"},YR={content:{kind:"list",listAction:"listLogpushDatasets",listInput:{connectionId:"${context.connectionId}"},columns:[{field:"datasetName",header:"Dataset",cell:"badge"},{field:"scopeDetail",header:"Scope"}],searchPlaceholder:"Search datasets and zones...",searchFields:["datasetName","scopeDetail"],dedupeByConfigField:["scope","zoneId","dataset"],dedupeMissingFieldAsEmpty:!0,emptyState:{noMatches:"No Logpush datasets match your search.",allConfigured:"All Logpush datasets already have log streams configured."},toStreamItem:{displayName:"$item.displayName",config:{scope:"$item.scope",accountId:"$item.accountId",zoneId:"$item.zoneId",zoneName:"$item.zoneName",dataset:"$item.dataset",datasetName:"$item.datasetName"}}}},WR={groups:[{id:"open-logpush",section:"config",title:"Open Logpush",notes:[{variant:"requirement",text:"**Cloudflare Logpush is only available on the Enterprise plan.** Free, Pro, and Business accounts cannot create Logpush jobs."}],actions:[{instruction:"Create a Logpush job in your [Cloudflare dashboard](https://dash.cloudflare.com) under **Analytics & Logs > Logpush**, or via the Cloudflare API."},{instruction:"Select **HTTP** as the destination type."}]},{id:"destination",section:"config",title:"Set the destination",actions:[{instruction:"Paste your Sazabi intake URL (above) into the Logpush HTTP destination field."}]},{id:"output-options",section:"config",title:"Set output options",actions:[{instruction:"In the Logpush job's **Output options**, set **Timestamp format** to **RFC3339** so Sazabi can parse event times accurately."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/cloudflare"}});var Fke,$ke,rV;var iV=h(()=>{oV();Fke=["cloudflareApiToken"],$ke={id:"cloudflare-logpush",label:"Cloudflare Logpush",transform:"cloudflare-logpush"},rV={id:"cloudflare",name:"Cloudflare Logpush",searchAliases:["cloudflare","cf","logpush"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:Fke,serverOwnedStreamConfigFields:["logpushJobId"],intake:[$ke],subtitle:"Stream your Cloudflare Logpush jobs to Sazabi for edge network observability.",features:["Zone Logpush","Account Logpush","Edge analytics"],evidenceHints:["Cloudflare zones, account Logpush config, or Terraform cloudflare provider","CLOUDFLARE_* environment variables or scripts that call the Cloudflare API","README/docs naming Cloudflare for edge, DNS, CDN, firewall, or Workers traffic"],setupSkill:te,dashboard:{iconKey:"cloudflare",intakeSourceId:"cloudflare-logpush",streamSelectorLayout:"sidepanel",actions:{submit:{validate:{procedure:"cloudflare.validateToken"}},list:{listLogpushDatasets:{procedure:"cloudflare.listLogpushDatasets",itemsField:"items"}}}}}});var JR;var sV=h(()=>{JR={perStreamInstructions:!0,docsUrl:"https://docs.sazabi.com/data/sources/endpoint/cloudflare-workers",groups:[{id:"open-telemetry",section:"config",title:"Open telemetry destinations",actions:[{instruction:"In your Cloudflare dashboard, go to **Workers & Pages > Observability > Telemetry** and click **Add Destination**."},{instruction:"Add one destination for logs and a second for traces."}]},{id:"logs",section:"config",title:"Configure logs destination",actions:[{instruction:"Paste these values into Cloudflare's **Add New Destination** dialog for logs — the endpoint is your **OTLP logs endpoint** (above).",payloads:[{kind:"copyable",label:"Destination type",value:"Logs"},{kind:"copyable",label:"Destination name",value:"sazabi-logs"}]}]},{id:"traces",section:"config",title:"Configure traces destination",actions:[{instruction:"Paste these values into Cloudflare's **Add New Destination** dialog for traces — the endpoint is your **OTLP traces endpoint** (above).",payloads:[{kind:"copyable",label:"Destination type",value:"Traces"},{kind:"copyable",label:"Destination name",value:"sazabi-traces"}]}]},{id:"enable-worker",section:"config",title:"Enable destinations",actions:[{instruction:"In each Worker's `wrangler.jsonc` / `wrangler.toml`, enable observability and list the log and trace destination names you created."},{instruction:"Redeploy the Worker after updating Wrangler config.",notes:[{text:"The destination is enabled only after the deployed Worker references it by name."}]}]}]}});var aV;var cV=h(()=>{sV();aV={id:"cloudflare_workers",name:"Cloudflare Workers",searchAliases:["cloudflare","cf","workers"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"cloudflare-workers",label:"Cloudflare Workers Observability",aliases:["cloudflare"],transform:"otlp-strict-signal",transformOptions:{missingAuthMessage:"Missing Cloudflare Workers Observability auth: provide Authorization: Bearer <publicKey>"}}],lifecycleEligible:!0,subtitle:"Stream Cloudflare Workers Observability logs and traces to Sazabi via OTLP.",features:["Workers Observability OTLP logs","Workers Observability OTLP traces"],evidenceHints:["wrangler.toml/json config with observability or Workers deployments","@cloudflare/workers-types, hono on Workers, or Worker entrypoints such as src/worker.ts","README/docs naming Cloudflare Workers, Pages Functions, or Durable Objects"],setupSkill:te,dashboard:{iconKey:"cloudflare",intakeSourceId:"cloudflare",streamSelectorLayout:"sidepanel"},streamCardinality:"multi"}});var ZR,XR,eT,tT,nT,oT;var lV=h(()=>{Un();ZR={action:"prefetch",input:{projectId:"${context.projectId}",templateUrl:"${context.cloudformationTemplateUrl}"},resultAs:"cloudwatch"},XR={id:"role-arn",title:"Enter role ARN",actions:[{id:"arn",kind:"text",label:"Role ARN",instruction:"Enter the IAM role ARN below.",placeholder:"arn:aws:iam::123456789012:role/SazabiLogIngestion-Sazabi-...",pattern:"^arn:aws:iam::(\\d{12}):role\\/[\\w+=,.@\\-\\/]+$",patternMessage:"Invalid ARN format. Expected: arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME"}]},eT={actions:[{kind:"validate",action:"validate",input:{projectId:"${context.projectId}",roleArn:"$arn",externalId:"${context.extras.cloudwatch.externalId}"},resultAs:"validateRole"}],metadata:{roleArn:"$arn",awsAccountId:"$validateRole.awsAccountId",externalId:"${context.extras.cloudwatch.externalId}"},displayName:"AWS Account $validateRole.awsAccountId",button:vt},tT={kind:"choice",title:"Choose setup method",description:"Select how you want to create the CloudWatch IAM role.",options:[{id:"cloudformation",label:"CloudFormation",description:"Launch a stack with the required trust and permissions.",flow:{kind:"multi-step",prefetch:ZR,steps:[{id:"prepare",title:"Launch stack",actions:[{kind:"instruction",instruction:"Launch a CloudFormation stack in your AWS account to create the IAM role that lets Sazabi read your CloudWatch logs.",payloads:[{kind:"external-link",label:"Launch CloudFormation stack",href:"${context.extras.cloudwatch.cloudFormationQuickCreateUrl}"}]},{kind:"instruction",instruction:"After the stack is created, find your role ARN under **Stacks → ${context.extras.cloudwatch.stackName} → Outputs** and copy the `RoleArn` value."}]},XR],submit:eT}},{id:"terraform",label:"Terraform",description:"Apply Terraform resources in your AWS account.",flow:{kind:"multi-step",prefetch:ZR,steps:[{id:"prepare",title:"Apply Terraform",actions:[{kind:"instruction",instruction:"Add this configuration to your Terraform files. It creates the IAM role that lets Sazabi read your CloudWatch logs.",payloads:[{kind:"code",language:"hcl",copyLabel:"Terraform",value:`data "aws_caller_identity" "current" {}
6701
+ }`}],notes:[{text:"`OTEL_LOG_USER_PROMPTS` exports raw prompt text (including anything you paste). Remove it to keep prompts private while still tracking tool calls and API usage.",variant:"requirement"},{text:"Keep `OTEL_LOG_ASSISTANT_RESPONSES` at `0` — when unset it falls back to the prompts setting, so enabling prompts alone would also export model responses. Tool content stays redacted unless `OTEL_LOG_TOOL_DETAILS`/`OTEL_LOG_TOOL_CONTENT` are enabled."},{text:"Claude Code metrics are not ingested yet — leave `OTEL_METRICS_EXPORTER` unset; enabling it only ships traffic that Sazabi discards."}]}]},{id:"restart",section:"verify",title:"Restart Claude Code",actions:[{instruction:"Env vars load at startup — telemetry begins with your next Claude Code session, not the current one. Restart Claude Code now."}]}]}});var tV;var nV=h(()=>{eV();tV={id:"claude_code",name:"Claude Code",searchAliases:["claude","anthropic","claude-code","coding agent"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"claude-code",label:"Claude Code",transform:"otlp-passthrough"}],lifecycleSkipReason:"Manual Claude Code env-var setup is not exercised by automated lifecycle tests yet.",subtitle:"Ship Claude Code session telemetry — prompts, tool calls, and model API requests with token counts and cost — to Sazabi via its built-in OTLP exporter.",features:["Prompt and tool-call events","Token usage & cost per API request","Session and user attribution","No code changes required"],evidenceHints:[".claude/settings.json with CLAUDE_CODE_ENABLE_TELEMETRY or OTEL_* env vars","Claude Code CLI installed and in active use","Anthropic API key or Claude subscription usage"],setupSkill:te,dashboard:{slug:"claude-code",iconKey:"claude-code",intakeSourceId:"claude-code"}}});var KR;var oV=h(()=>{KR={perStreamInstructions:!0,docsUrl:"https://docs.sazabi.com/data/sources/endpoint/cloudflare-workers",groups:[{id:"open-telemetry",section:"config",title:"Open telemetry destinations",actions:[{instruction:"In your Cloudflare dashboard, go to **Workers & Pages > Observability > Telemetry** and click **Add Destination**."},{instruction:"Add one destination for logs and a second for traces."}]},{id:"logs",section:"config",title:"Configure logs destination",actions:[{instruction:"Paste these values into Cloudflare's **Add New Destination** dialog for logs — the endpoint is your **OTLP logs endpoint** (above).",payloads:[{kind:"copyable",label:"Destination type",value:"Logs"},{kind:"copyable",label:"Destination name",value:"sazabi-logs"}]}]},{id:"traces",section:"config",title:"Configure traces destination",actions:[{instruction:"Paste these values into Cloudflare's **Add New Destination** dialog for traces — the endpoint is your **OTLP traces endpoint** (above).",payloads:[{kind:"copyable",label:"Destination type",value:"Traces"},{kind:"copyable",label:"Destination name",value:"sazabi-traces"}]}]},{id:"enable-worker",section:"config",title:"Enable destinations",actions:[{instruction:"In each Worker's `wrangler.jsonc` / `wrangler.toml`, enable observability and list the log and trace destination names you created."},{instruction:"Redeploy the Worker after updating Wrangler config.",notes:[{text:"The destination is enabled only after the deployed Worker references it by name."}]}]}]}});var rV;var iV=h(()=>{oV();rV={id:"cloudflare_workers",name:"Cloudflare Workers",searchAliases:["cloudflare","cf","workers"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"cloudflare-workers",label:"Cloudflare Workers Observability",aliases:["cloudflare"],transform:"otlp-strict-signal",transformOptions:{missingAuthMessage:"Missing Cloudflare Workers Observability auth: provide Authorization: Bearer <publicKey>"}}],lifecycleEligible:!0,subtitle:"Stream Cloudflare Workers Observability logs and traces to Sazabi via OTLP.",features:["Workers Observability OTLP logs","Workers Observability OTLP traces"],evidenceHints:["wrangler.toml/json config with observability or Workers deployments","@cloudflare/workers-types, hono on Workers, or Worker entrypoints such as src/worker.ts","README/docs naming Cloudflare Workers, Pages Functions, or Durable Objects"],setupSkill:te,dashboard:{iconKey:"cloudflare",intakeSourceId:"cloudflare",streamSelectorLayout:"sidepanel"},streamCardinality:"multi"}});var vt,Nf=(e,t="http/protobuf")=>[{instruction:`Add the OpenTelemetry SDK to your ${e}.`,notes:[{text:"Most languages have official OpenTelemetry SDKs available (e.g., `@opentelemetry/api` for Node.js, `opentelemetry-api` for Python, etc.)."}]},{instruction:`Initialize OpenTelemetry in your ${e}.`},{instruction:`Set the following environment variables in your ${e} environment — \`OTEL_EXPORTER_OTLP_ENDPOINT\` is your intake URL (above).`,payloads:[{kind:"copyable",label:"`OTEL_EXPORTER_OTLP_PROTOCOL`",value:t,copyLabel:"OTLP protocol"}],notes:[Uke]}],Uke;var Un=h(()=>{vt={label:"Connect",pendingLabel:"Connecting..."},Uke={text:"Most OpenTelemetry SDKs automatically detect these environment variables. If your SDK is already configured in code, use the same endpoint and protocol values there instead."}});var YR,WR,JR;var sV=h(()=>{Un();YR={kind:"multi-step",steps:[{id:"prepare",title:"Create token",notes:[{variant:"requirement",text:"**Cloudflare Logpush is only available on the Enterprise plan.** Free, Pro, and Business accounts cannot create Logpush jobs."}],actions:[{kind:"instruction",instruction:"Create a Cloudflare API token with **Account Settings: Read**, **Zone: Read**, and **Zone Logs: Edit** permissions.",payloads:[{kind:"external-link",label:"Open Cloudflare API token template",href:"https://dash.cloudflare.com/profile/api-tokens?permissionGroupKeys=%5B%7B%22key%22%3A%22account_settings%22%2C%22type%22%3A%22read%22%2C%22scope%22%3A%22account%22%7D%2C%7B%22key%22%3A%22logs%22%2C%22type%22%3A%22edit%22%2C%22scope%22%3A%22zone%22%7D%2C%7B%22key%22%3A%22zone%22%2C%22type%22%3A%22read%22%2C%22scope%22%3A%22zone%22%7D%5D&name=Sazabi+Cloudflare+Logpush"}]},{kind:"instruction",instruction:"Pick the account you want to connect, click **Continue to summary**, then **Create Token**, and copy the token for the next step."}]},{id:"credentials",title:"Enter credentials",actions:[{id:"token",kind:"secret",label:"Cloudflare API token",instruction:"Enter your Cloudflare API token below.",description:"Token with Account Settings Read, Zone Read, and Logs Edit permissions.",placeholder:"Enter your Cloudflare API token"},{id:"accountId",kind:"text",label:"Cloudflare account ID",instruction:"Enter your Cloudflare account ID below.",description:"The 32-character hex ID from your Cloudflare dashboard URL or account overview.",placeholder:"e.g. a1b2c3d4e5f6...",pattern:"^[a-f0-9]{32}$",patternMessage:"Enter the 32-character Cloudflare account ID."}]}],submit:{actions:[{kind:"validate",action:"validate",input:{token:"$token",accountId:"$accountId"},resultAs:"validate"}],metadata:{cloudflareApiToken:"$token",accountId:"$accountId",accountName:"$validate.accountName"},button:vt},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/cloudflare"},WR={content:{kind:"list",listAction:"listLogpushDatasets",listInput:{connectionId:"${context.connectionId}"},columns:[{field:"datasetName",header:"Dataset",cell:"badge"},{field:"scopeDetail",header:"Scope"}],searchPlaceholder:"Search datasets and zones...",searchFields:["datasetName","scopeDetail"],dedupeByConfigField:["scope","zoneId","dataset"],dedupeMissingFieldAsEmpty:!0,emptyState:{noMatches:"No Logpush datasets match your search.",allConfigured:"All Logpush datasets already have log streams configured."},toStreamItem:{displayName:"$item.displayName",config:{scope:"$item.scope",accountId:"$item.accountId",zoneId:"$item.zoneId",zoneName:"$item.zoneName",dataset:"$item.dataset",datasetName:"$item.datasetName"}}}},JR={groups:[{id:"open-logpush",section:"config",title:"Open Logpush",notes:[{variant:"requirement",text:"**Cloudflare Logpush is only available on the Enterprise plan.** Free, Pro, and Business accounts cannot create Logpush jobs."}],actions:[{instruction:"Create a Logpush job in your [Cloudflare dashboard](https://dash.cloudflare.com) under **Analytics & Logs > Logpush**, or via the Cloudflare API."},{instruction:"Select **HTTP** as the destination type."}]},{id:"destination",section:"config",title:"Set the destination",actions:[{instruction:"Paste your Sazabi intake URL (above) into the Logpush HTTP destination field."}]},{id:"output-options",section:"config",title:"Set output options",actions:[{instruction:"In the Logpush job's **Output options**, set **Timestamp format** to **RFC3339** so Sazabi can parse event times accurately."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/cloudflare"}});var Fke,$ke,aV;var cV=h(()=>{sV();Fke=["cloudflareApiToken"],$ke={id:"cloudflare-logpush",label:"Cloudflare Logpush",transform:"cloudflare-logpush"},aV={id:"cloudflare",name:"Cloudflare Logpush",searchAliases:["cloudflare","cf","logpush"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:Fke,serverOwnedStreamConfigFields:["logpushJobId"],intake:[$ke],subtitle:"Stream your Cloudflare Logpush jobs to Sazabi for edge network observability.",features:["Zone Logpush","Account Logpush","Edge analytics"],evidenceHints:["Cloudflare zones, account Logpush config, or Terraform cloudflare provider","CLOUDFLARE_* environment variables or scripts that call the Cloudflare API","README/docs naming Cloudflare for edge, DNS, CDN, firewall, or Workers traffic"],setupSkill:te,dashboard:{iconKey:"cloudflare",intakeSourceId:"cloudflare-logpush",streamSelectorLayout:"sidepanel",actions:{submit:{validate:{procedure:"cloudflare.validateToken"}},list:{listLogpushDatasets:{procedure:"cloudflare.listLogpushDatasets",itemsField:"items"}}}}}});var ZR,XR,eT,tT,nT,oT;var lV=h(()=>{Un();ZR={action:"prefetch",input:{projectId:"${context.projectId}",templateUrl:"${context.cloudformationTemplateUrl}"},resultAs:"cloudwatch"},XR={id:"role-arn",title:"Enter role ARN",actions:[{id:"arn",kind:"text",label:"Role ARN",instruction:"Enter the IAM role ARN below.",placeholder:"arn:aws:iam::123456789012:role/SazabiLogIngestion-Sazabi-...",pattern:"^arn:aws:iam::(\\d{12}):role\\/[\\w+=,.@\\-\\/]+$",patternMessage:"Invalid ARN format. Expected: arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME"}]},eT={actions:[{kind:"validate",action:"validate",input:{projectId:"${context.projectId}",roleArn:"$arn",externalId:"${context.extras.cloudwatch.externalId}"},resultAs:"validateRole"}],metadata:{roleArn:"$arn",awsAccountId:"$validateRole.awsAccountId",externalId:"${context.extras.cloudwatch.externalId}"},displayName:"AWS Account $validateRole.awsAccountId",button:vt},tT={kind:"choice",title:"Choose setup method",description:"Select how you want to create the CloudWatch IAM role.",options:[{id:"cloudformation",label:"CloudFormation",description:"Launch a stack with the required trust and permissions.",flow:{kind:"multi-step",prefetch:ZR,steps:[{id:"prepare",title:"Launch stack",actions:[{kind:"instruction",instruction:"Launch a CloudFormation stack in your AWS account to create the IAM role that lets Sazabi read your CloudWatch logs.",payloads:[{kind:"external-link",label:"Launch CloudFormation stack",href:"${context.extras.cloudwatch.cloudFormationQuickCreateUrl}"}]},{kind:"instruction",instruction:"After the stack is created, find your role ARN under **Stacks → ${context.extras.cloudwatch.stackName} → Outputs** and copy the `RoleArn` value."}]},XR],submit:eT}},{id:"terraform",label:"Terraform",description:"Apply Terraform resources in your AWS account.",flow:{kind:"multi-step",prefetch:ZR,steps:[{id:"prepare",title:"Apply Terraform",actions:[{kind:"instruction",instruction:"Add this configuration to your Terraform files. It creates the IAM role that lets Sazabi read your CloudWatch logs.",payloads:[{kind:"code",language:"hcl",copyLabel:"Terraform",value:`data "aws_caller_identity" "current" {}
6702
6702
 
6703
6703
  resource "aws_iam_role" "sazabi_log_ingestion" {
6704
6704
  name = "SazabiLogIngestion"
@@ -7126,7 +7126,7 @@ export const mastra = new Mastra({
7126
7126
 
7127
7127
  // Use your Mastra instance
7128
7128
  const agent = mastra.getAgent("my-agent");
7129
- const response = await agent.generate("Hello, world!");`}]}]},{id:"redeploy",section:"verify",title:"Redeploy and verify",actions:[{instruction:"Redeploy or restart the service, then run an agent, tool, or workflow to generate a trace."}]}]}});var ZV;var XV=h(()=>{JV();ZV={id:"mastra",name:"Mastra",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual SDK setup is not exercised by automated lifecycle tests yet.",intake:[{id:"mastra",label:"Mastra",transform:"otlp-passthrough"}],subtitle:"Stream your Mastra agent traces directly to Sazabi for AI workflow observability.",features:["Agent traces","Tool tracing","Workflow monitoring"],evidenceHints:["@mastra packages, mastra.config files, or Mastra agent definitions","MASTRA_* environment variables","README/docs naming Mastra for agents, workflows, or LLM orchestration"],setupSkill:te,dashboard:{iconKey:"mastra",intakeSourceId:"mastra"}}});var kT;var eK=h(()=>{kT={perStreamInstructions:!0,docsUrl:"https://docs.sazabi.com/data/sources/endpoint/neon",groups:[{id:"open-integration",section:"config",title:"Open Neon integration",notes:[{text:"Neon's OpenTelemetry integration forwards Postgres logs to Sazabi."},{variant:"requirement",text:"The integration is available on Neon's **Scale** plan, and both the integration itself and Postgres logs export are currently in Beta."},{variant:"requirement",text:"You'll need admin access on the Neon project to add it."}],actions:[{instruction:"Add Neon's OpenTelemetry integration for Postgres logs.",payloads:[{kind:"external-link",label:"Open Neon integrations",href:"https://console.neon.tech/app/projects",description:"Choose the Neon project you want to monitor, then open the project's **Integrations** page."}]}]},{id:"select-data",section:"config",title:"Select exported data",actions:[{instruction:"In **Select data to export**, enable `Postgres logs` and leave `Metrics` disabled. Neon does not expose a traces export for this integration."},{instruction:"Choose the `HTTP` protocol."},{instruction:"Configure authentication as `Bearer`. Neon adds the `Bearer` prefix to outgoing requests automatically."}]},{id:"values",section:"config",title:"Set integration values",actions:[{instruction:"Paste your Sazabi intake URL (above) into the **OTLP endpoint URL** field, then paste these values into the Neon OpenTelemetry configuration sidebar.",payloads:[{kind:"copyable",label:"Connection protocol",value:"HTTP"},{kind:"copyable",label:"Data to export",value:"Postgres logs only"},{kind:"copyable",label:"Authentication method",value:"Bearer"},{kind:"copyable",label:"Bearer token value",value:"sazabi",copyLabel:"Neon bearer token value",description:"Neon requires a non-empty Bearer token, but Sazabi authenticates using the public key hex embedded in the endpoint hostname and ignores this value — any placeholder works."},{kind:"copyable",label:"`service.name` resource attribute",value:"neon-postgres",copyLabel:"Neon service.name value",description:"Optional but recommended — paste under **Resource attributes** in Neon. Change the suffix (e.g. `neon-postgres-prod`, `neon-checkout-db`) when you have more than one Neon project so log streams stay easy to filter in Sazabi."}]}]},{id:"save",section:"verify",title:"Save and verify",actions:[{instruction:"Save the integration, then wait a few minutes for logs to start arriving; if the compute has Scale to Zero enabled and is currently suspended, run a query against the database to wake it and begin log delivery."},{instruction:"If logs do not arrive after a few minutes, check the Neon integration's status panel for OTLP export errors."}]}]}});var txe,tK;var nK=h(()=>{eK();txe=[],tK={id:"neon",name:"Neon",capabilities:["connectionless"],auth:[],delivery:["push"],sensitiveFields:txe,lifecycleSkipReason:"Manual OTLP setup is not exercised by automated lifecycle tests yet.",intake:[{id:"neon",label:"Neon",transform:"otlp-passthrough"}],subtitle:"Forward Neon Postgres logs to Sazabi for database observability without sending metrics or traces.",features:["Postgres logs","Connection events","Error and warning logs"],evidenceHints:["Neon connection strings, neon.tech hosts, or @neondatabase/serverless packages","DATABASE_URL/POSTGRES_URL values documented as Neon","README/docs naming Neon as the Postgres provider"],setupSkill:te,dashboard:{iconKey:"neon",intakeSourceId:"neon"}}});var xT;var oK=h(()=>{xT={groups:[{id:"open-form",section:"config",title:"Open log drain form",notes:[{variant:"requirement",text:"Log drains require a Netlify Enterprise plan."}],actions:[{instruction:"Configure a log drain in your [Netlify site settings](https://app.netlify.com) under **Logs & Metrics > Log Drains**."},{instruction:"Select **General HTTP endpoint** as the service."}]},{id:"values",section:"config",title:"Set drain values",actions:[{instruction:"Paste your Sazabi intake URL (above) into the **Full URL** field, and set the log drain format below.",payloads:[{kind:"copyable",label:"Log drain format",value:"JSON"}]}]},{id:"save",section:"verify",title:"Save and verify",actions:[{instruction:"Save the drain, then deploy or request the site so Netlify emits fresh logs."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/netlify"}});var rK;var iK=h(()=>{oK();rK={id:"netlify",name:"Netlify",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual drain setup is not exercised by automated lifecycle tests yet.",intake:[{id:"netlify",label:"Netlify",transform:"netlify-drain"}],subtitle:"Forward your Netlify deployment logs directly to Sazabi for Jamstack observability.",features:["Build logs","Function logs","Edge handler logs"],evidenceHints:["netlify.toml, .netlify/, or Netlify build/deploy scripts","NETLIFY_* environment variables or functions under netlify/functions","README/docs naming Netlify as the deployment host"],setupSkill:te,dashboard:{iconKey:"netlify",intakeSourceId:"netlify"}}});var PT;var sK=h(()=>{PT={groups:[{id:"open-form",section:"config",title:"Open observability settings",actions:[{instruction:"In the OpenRouter dashboard, open **Settings > Observability**, toggle **Enable Broadcast** on, then click the edit icon next to **OpenTelemetry Collector**.",payloads:[{kind:"external-link",label:"Settings > Observability",href:"https://openrouter.ai/settings/observability"}]}]},{id:"values",section:"config",title:"Set destination values",actions:[{instruction:"Paste your Sazabi intake URL (above) into the **Endpoint** field of the OpenTelemetry Collector destination form."}]},{id:"test",section:"verify",title:"Test and save",description:"OpenRouter saves the destination only after a successful connection test.",actions:[{instruction:"Click **Test Connection** to verify Sazabi accepts the trace.",notes:[{text:"A green check confirms forwarding is enabled."}]}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/openrouter"}});var aK;var cK=h(()=>{sK();aK={id:"openrouter",name:"OpenRouter",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"OpenRouter Broadcast destination setup is not exercised by automated lifecycle tests yet.",intake:[{id:"openrouter",label:"OpenRouter",transform:"otlp-passthrough"}],subtitle:"Forward OpenRouter trace spans to Sazabi from the OpenRouter dashboard.",features:["Trace spans per generation","Token & cost tracking","Model & provider attribution"],evidenceHints:["OpenRouter API URLs, OPENROUTER_* environment variables, or openrouter packages","LLM gateway code sending requests to openrouter.ai","README/docs naming OpenRouter for model routing or tracing"],setupSkill:te,dashboard:{iconKey:"openrouter",intakeSourceId:"openrouter"}}});var RT;var lK=h(()=>{RT={perStreamInstructions:!0,groups:[{id:"instrument",section:"config",title:"Instrument application",notes:[{text:"Metrics sent to the endpoint aren't stored yet."}],actions:[{instruction:"Add the OpenTelemetry SDK to your application. Most languages have official SDKs available (e.g., `@opentelemetry/api` for Node.js, `opentelemetry-api` for Python, etc.)."},{instruction:"Initialize the OpenTelemetry SDK in your application and configure the OTLP exporters for the signals you want (logs and/or traces)."}]},{id:"environment",section:"config",title:"Set OTLP environment",actions:[{instruction:"Set these variables in the environment that runs your application — `OTEL_EXPORTER_OTLP_ENDPOINT` is your intake URL (above).",payloads:[{kind:"copyable",label:"`OTEL_EXPORTER_OTLP_PROTOCOL`",value:"http/protobuf",copyLabel:"OTLP protocol"}],notes:[{text:"These variables work with any OpenTelemetry SDK (Node.js, Python, Go, Java, .NET, etc.)."}]}]},{id:"redeploy",section:"verify",title:"Redeploy and verify",actions:[{instruction:"Restart or redeploy the application, then generate a test log or trace to confirm Sazabi receives telemetry."}]}]}});var nxe,uK;var dK=h(()=>{lK();nxe={id:"otel-trace",label:"OpenTelemetry Traces",aliases:["mastra","otlp-trace","otlp-traces","otel-traces"],transform:"otlp-traces-only"},uK={id:"otel",name:"OpenTelemetry",searchAliases:["otel","open telemetry"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"otel",label:"OpenTelemetry",aliases:["gcl","otlp"],transform:"otlp-passthrough"},nxe],lifecycleSkipReason:"Manual OTLP setup is not exercised by automated lifecycle tests yet.",subtitle:"Send OpenTelemetry logs and traces directly to Sazabi's OTLP-compatible intake for AI-powered observability.",features:["OTLP log export","OTLP trace export","Any OTEL SDK"],evidenceHints:["@opentelemetry packages, opentelemetry-* SDKs, or OTEL_* environment variables","OTLP exporter configuration in application code or deployment manifests","Existing OpenTelemetry instrumentation without a more specific Sazabi source"],setupSkill:te,dashboard:{slug:"opentelemetry",iconKey:"opentelemetry",intakeSourceId:"otel"}}});var TT;var pK=h(()=>{TT={perStreamInstructions:!0,groups:[{id:"copy-config",section:"config",title:"Copy Collector config",actions:[{instruction:"Add the Sazabi exporter and include it in the logs and traces pipelines.",payloads:[{kind:"code-tabs",label:"Collector configuration",description:"Choose the snippet format that matches how you deploy the Collector.",tabs:[{id:"yaml",label:"`otelcol.yaml`",language:"yaml",copyLabel:"Collector config",value:`exporters:
7129
+ const response = await agent.generate("Hello, world!");`}]}]},{id:"redeploy",section:"verify",title:"Redeploy and verify",actions:[{instruction:"Redeploy or restart the service, then run an agent, tool, or workflow to generate a trace."}]}]}});var ZV;var XV=h(()=>{JV();ZV={id:"mastra",name:"Mastra",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual SDK setup is not exercised by automated lifecycle tests yet.",intake:[{id:"mastra",label:"Mastra",transform:"otlp-passthrough"}],subtitle:"Stream your Mastra agent traces directly to Sazabi for AI workflow observability.",features:["Agent traces","Tool tracing","Workflow monitoring"],evidenceHints:["@mastra packages, mastra.config files, or Mastra agent definitions","MASTRA_* environment variables","README/docs naming Mastra for agents, workflows, or LLM orchestration"],setupSkill:te,dashboard:{iconKey:"mastra",intakeSourceId:"mastra"}}});var kT;var eK=h(()=>{kT={perStreamInstructions:!0,docsUrl:"https://docs.sazabi.com/data/sources/endpoint/neon",groups:[{id:"open-integration",section:"config",title:"Open Neon integration",notes:[{text:"Neon's OpenTelemetry integration forwards Postgres logs to Sazabi."},{variant:"requirement",text:"The integration is available on Neon's **Scale** plan, and both the integration itself and Postgres logs export are currently in Beta."},{variant:"requirement",text:"You'll need admin access on the Neon project to add it."}],actions:[{instruction:"Add Neon's OpenTelemetry integration for Postgres logs.",payloads:[{kind:"external-link",label:"Open Neon integrations",href:"https://console.neon.tech/app/projects",description:"Choose the Neon project you want to monitor, then open the project's **Integrations** page."}]}]},{id:"select-data",section:"config",title:"Select exported data",actions:[{instruction:"In **Select data to export**, enable `Postgres logs` and leave `Metrics` disabled. Neon does not expose a traces export for this integration."},{instruction:"Choose the `HTTP` protocol."},{instruction:"Configure authentication as `Bearer`. Neon adds the `Bearer` prefix to outgoing requests automatically."}]},{id:"values",section:"config",title:"Set integration values",actions:[{instruction:"Paste your Sazabi intake URL (above) into the **OTLP endpoint URL** field, then paste these values into the Neon OpenTelemetry configuration sidebar.",payloads:[{kind:"copyable",label:"Connection protocol",value:"HTTP"},{kind:"copyable",label:"Data to export",value:"Postgres logs only"},{kind:"copyable",label:"Authentication method",value:"Bearer"},{kind:"copyable",label:"Bearer token value",value:"sazabi",copyLabel:"Neon bearer token value",description:"Neon requires a non-empty Bearer token, but Sazabi authenticates using the public key hex embedded in the endpoint hostname and ignores this value — any placeholder works."},{kind:"copyable",label:"`service.name` resource attribute",value:"neon-postgres",copyLabel:"Neon service.name value",description:"Optional but recommended — paste under **Resource attributes** in Neon. Change the suffix (e.g. `neon-postgres-prod`, `neon-checkout-db`) when you have more than one Neon project so log streams stay easy to filter in Sazabi."}]}]},{id:"save",section:"verify",title:"Save and verify",actions:[{instruction:"Save the integration, then wait a few minutes for logs to start arriving; if the compute has Scale to Zero enabled and is currently suspended, run a query against the database to wake it and begin log delivery."},{instruction:"If logs do not arrive after a few minutes, check the Neon integration's status panel for OTLP export errors."}]}]}});var txe,tK;var nK=h(()=>{eK();txe=[],tK={id:"neon",name:"Neon",capabilities:["connectionless"],auth:[],delivery:["push"],sensitiveFields:txe,lifecycleSkipReason:"Manual OTLP setup is not exercised by automated lifecycle tests yet.",intake:[{id:"neon",label:"Neon",transform:"otlp-passthrough"}],subtitle:"Forward Neon Postgres logs to Sazabi for database observability without sending metrics or traces.",features:["Postgres logs","Connection events","Error and warning logs"],evidenceHints:["Neon connection strings, neon.tech hosts, or @neondatabase/serverless packages","DATABASE_URL/POSTGRES_URL values documented as Neon","README/docs naming Neon as the Postgres provider"],setupSkill:te,dashboard:{iconKey:"neon",intakeSourceId:"neon"}}});var xT;var oK=h(()=>{xT={groups:[{id:"open-form",section:"config",title:"Open log drain form",notes:[{variant:"requirement",text:"Log drains require a Netlify Enterprise plan."}],actions:[{instruction:"Configure a log drain in your [Netlify site settings](https://app.netlify.com) under **Logs & Metrics > Log Drains**."},{instruction:"Select **General HTTP endpoint** as the service."}]},{id:"values",section:"config",title:"Set drain values",actions:[{instruction:"Paste your Sazabi intake URL (above) into the **Full URL** field, and set the log drain format below.",payloads:[{kind:"copyable",label:"Log drain format",value:"JSON"}]}]},{id:"save",section:"verify",title:"Save and verify",actions:[{instruction:"Save the drain, then deploy or request the site so Netlify emits fresh logs."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/netlify"}});var rK;var iK=h(()=>{oK();rK={id:"netlify",name:"Netlify",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual drain setup is not exercised by automated lifecycle tests yet.",intake:[{id:"netlify",label:"Netlify",transform:"netlify-drain"}],subtitle:"Forward your Netlify deployment logs directly to Sazabi for Jamstack observability.",features:["Build logs","Function logs","Edge handler logs"],evidenceHints:["netlify.toml, .netlify/, or Netlify build/deploy scripts","NETLIFY_* environment variables or functions under netlify/functions","README/docs naming Netlify as the deployment host"],setupSkill:te,dashboard:{iconKey:"netlify",intakeSourceId:"netlify"}}});var PT;var sK=h(()=>{PT={groups:[{id:"open-form",section:"config",title:"Open observability settings",actions:[{instruction:"In the OpenRouter dashboard, open **Settings > Observability**, toggle **Enable Broadcast** on, then click the edit icon next to **OpenTelemetry Collector**.",payloads:[{kind:"external-link",label:"Settings > Observability",href:"https://openrouter.ai/settings/observability"}]}]},{id:"values",section:"config",title:"Set destination values",actions:[{instruction:"Paste your Sazabi intake URL (above) into the **Endpoint** field of the OpenTelemetry Collector destination form."}]},{id:"test",section:"verify",title:"Test and save",description:"OpenRouter saves the destination only after a successful connection test.",actions:[{instruction:"Click **Test Connection** to verify Sazabi accepts the trace.",notes:[{text:"A green check confirms forwarding is enabled."}]}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/openrouter"}});var aK;var cK=h(()=>{sK();aK={id:"openrouter",name:"OpenRouter",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"OpenRouter Broadcast destination setup is not exercised by automated lifecycle tests yet.",intake:[{id:"openrouter",label:"OpenRouter",transform:"otlp-passthrough"}],subtitle:"Forward OpenRouter trace spans to Sazabi from the OpenRouter dashboard.",features:["Trace spans per generation","Token & cost tracking","Model & provider attribution"],evidenceHints:["OpenRouter API URLs, OPENROUTER_* environment variables, or openrouter packages","LLM gateway code sending requests to openrouter.ai","README/docs naming OpenRouter for model routing or tracing"],setupSkill:te,dashboard:{iconKey:"openrouter",intakeSourceId:"openrouter"}}});var RT;var lK=h(()=>{RT={perStreamInstructions:!0,groups:[{id:"copy-config",section:"config",title:"Copy Collector config",actions:[{instruction:"Add the Sazabi exporter and include it in the logs and traces pipelines.",payloads:[{kind:"code-tabs",label:"Collector configuration",description:"Choose the snippet format that matches how you deploy the Collector.",tabs:[{id:"yaml",label:"`otelcol.yaml`",language:"yaml",copyLabel:"Collector config",value:`exporters:
7130
7130
  otlphttp/sazabi:
7131
7131
  endpoint: "https://\${context.ingestHost}"
7132
7132
 
@@ -7152,7 +7152,7 @@ service:
7152
7152
  traces:
7153
7153
  receivers: [otlp]
7154
7154
  processors: [batch]
7155
- exporters: [otlphttp/sazabi]`}]}]}]},{id:"adjust-pipelines",section:"config",title:"Adjust pipelines",actions:[{instruction:"Match the receivers to the sources you have configured.",notes:[{text:"The `filelog` receiver collects container logs on Kubernetes; the `otlp` receiver accepts spans from instrumented services."}]}]}]}});var gK;var mK=h(()=>{pK();gK={id:"otel_collector",name:"OpenTelemetry Collector",searchAliases:["otel","otel collector","open telemetry collector"],capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual agent setup is not exercised by automated lifecycle tests yet.",intake:[{id:"otel-collector",label:"OpenTelemetry Collector",transform:"otlp-passthrough"}],subtitle:"Forward logs and traces from your infrastructure to Sazabi using the OpenTelemetry Collector.",features:["Kubernetes DaemonSet","Vendor-neutral standard","Extensible via contrib","Logs and traces"],evidenceHints:["otelcol, opentelemetry-collector, or collector config YAML","Kubernetes DaemonSets or Helm values for OpenTelemetry Collector","OTLP receiver/exporter pipelines that can add a Sazabi exporter"],setupSkill:te,dashboard:{iconKey:"otel-collector",intakeSourceId:"otel-collector"}}});var BT;var hK=h(()=>{BT={perStreamInstructions:!0,groups:[{id:"instrument",section:"config",title:"Instrument application",notes:[{text:"Sazabi stores each incoming metric data point as a log record, so you can search metrics alongside your logs and traces and line them up with each other."}],actions:[{instruction:"Add or enable the OpenTelemetry metrics SDK in your application, or configure the OTLP metrics exporter on your OpenTelemetry Collector."}]},{id:"environment",section:"config",title:"Set OTLP metrics environment",actions:[{instruction:"Set these variables in the environment that runs your application or Collector — `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` is your intake URL (above).",payloads:[{kind:"copyable",label:"`OTEL_EXPORTER_OTLP_PROTOCOL`",value:"http/protobuf",copyLabel:"OTLP protocol"}],notes:[{text:"These variables work with any OpenTelemetry SDK or Collector that exports OTLP metrics."}]}]},{id:"redeploy",section:"verify",title:"Redeploy and verify",actions:[{instruction:"Restart or redeploy, then generate a metric to confirm Sazabi receives it as a log record."}]}]}});var AK;var fK=h(()=>{hK();AK={id:"otel_metrics",name:"OpenTelemetry Metrics",searchAliases:["otel metrics","opentelemetry metrics","otlp metrics","metrics as logs"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"otel-metrics",label:"OpenTelemetry Metrics",aliases:["otlp-metrics"],transform:"otlp-metrics-as-logs"}],lifecycleSkipReason:"Manual OTLP metrics setup is not exercised by automated lifecycle tests yet.",subtitle:"Send OpenTelemetry metrics to Sazabi's OTLP intake and store them as searchable log records.",features:["OTLP metric export","Metrics stored as log records","Any OTEL SDK or Collector"],evidenceHints:["OTLP metric exporters (OTEL_EXPORTER_OTLP_METRICS_* env vars) without a metrics backend","OpenTelemetry metrics instrumentation routed to a generic OTLP endpoint","A desire to query metrics alongside logs and traces in one place"],setupSkill:te,dashboard:{slug:"opentelemetry-metrics",iconKey:"opentelemetry-metrics",intakeSourceId:"otel-metrics"}}});var OT,_T,DT;var yK=h(()=>{Un();OT={kind:"multi-step",steps:[{id:"prepare",title:"Create API key",actions:[{kind:"instruction",instruction:"In Plain, open **Settings → Machine users** and create a machine user API key. The API key settings live under a workspace-scoped URL (`app.plain.com/workspace/<your-org-id>/settings/machine-users`), so open it from within your own Plain workspace."},{kind:"instruction",instruction:"Grant the key these permissions: `webhookTarget:create`, `webhookTarget:edit`, `webhookTarget:delete`, `webhookTarget:read`, and `subscriptionEventTypes:read`. Workspace read access is included with every key."}]},{id:"credentials",title:"Enter API key",actions:[{id:"apiKey",kind:"secret",label:"Plain API key",instruction:"Enter your Plain API key below.",description:"Machine user API key with webhookTarget and subscriptionEventTypes permissions.",placeholder:"plainApiKey_..."}]}],submit:{actions:[{kind:"validate",action:"validate",input:{apiKey:"$apiKey"},resultAs:"workspace"}],metadata:{plainApiKey:"$apiKey"},displayName:"$workspace.workspaceName",button:vt},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/plain"},_T={groups:[{id:"open-webhooks",section:"config",title:"Open Plain webhooks",actions:[{instruction:"In your [Plain workspace](https://app.plain.com/settings/webhooks), go to **Settings > Webhooks** and click **Create webhook target**.",notes:[{text:"You configure and own this webhook target — you choose which event types it subscribes to in Plain. Sazabi never receives a Plain API key on this path and does not create, edit, or delete the target. To have Sazabi enumerate event types and manage the webhook target for you, connect your Plain account instead."}]}]},{id:"endpoint",section:"config",title:"Set webhook URL",actions:[{instruction:"Paste your Sazabi intake URL (above) into the webhook target configuration."},{instruction:"Enable the target and select the event types you want to forward."}]},{id:"verify",section:"verify",title:"Save and verify",actions:[{instruction:"Save the webhook target, then trigger a subscribed event in Plain (for example create or update a thread). Events appear in Sazabi within a few minutes."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/plain"},DT={content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:[{field:"eventType",header:"Event type",cell:"mono"},{field:"description",header:"Description",cell:"muted"}],searchPlaceholder:"Search event types...",searchFields:["eventType","description"],dedupeByConfigField:"eventType",dedupeExpandArrayField:"eventTypes",aggregateSelection:{displayName:"Plain events",itemField:"eventType",configField:"eventTypes"},emptyState:{noMatches:"No event types found.",allConfigured:"All Plain event types already have log streams configured.",noItems:"Plain returned no subscribable event types for this API key. Confirm the key has subscriptionEventTypes:read permission."},toStreamItem:{displayName:"$item.eventType",config:{eventType:"$item.eventType"}}}}});var oxe,rxe,bK;var IK=h(()=>{yK();oxe=["plainApiKey"],rxe={id:"plain",label:"Plain",transform:"plain-webhook"},bK={id:"plain",name:"Plain",searchAliases:["plain.com","plain support","plain customer support"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!1,lifecycleSkipReason:"No automated integration fixture yet: Plain has no sandbox workspace API for minting disposable API keys and webhook targets in CI.",sensitiveFields:oxe,serverOwnedStreamConfigFields:["webhookTargetId"],intake:[rxe],subtitle:"Stream Plain customer support events into Sazabi for unified observability of your support workflows.",features:["Webhook event streaming","Multi-event webhook targets","Thread and customer activity"],evidenceHints:["@team-plain/typescript-sdk usage or PLAIN_API_KEY environment variables","core-api.uk.plain.com GraphQL calls or Plain webhook handlers","README/docs naming Plain for customer support, tickets, or threads"],setupSkill:te,dashboard:{iconKey:"plain",intakeSourceId:"plain",streamSelectorLayout:"sidepanel",streamTableColumns:[{kind:"config-text",header:"Event types",width:"w-96",configField:"eventTypes",fallbackLabel:"Unknown events"}],actions:{submit:{validate:{kind:"source-action",actionId:"validate",sensitiveInputFields:["apiKey"]}},list:{list:{kind:"source-action",actionId:"list-event-types",itemsField:"eventTypes"}}}}}});var QT;var SK=h(()=>{QT={groups:[{id:"send-telemetry",section:"config",title:"Send OpenTelemetry",actions:[{instruction:"Send OTLP telemetry to Sazabi directly from your app, or from a collector running in Porter.",payloads:[{kind:"external-link",label:"Open Porter dashboard",href:"https://dashboard.porter.run"}],notes:[{text:"Porter does not provide a generic log drain."}]}]},{id:"configure-exporter",section:"config",title:"Configure the exporter",actions:[{instruction:"Set these environment variables on the Porter service you want to monitor.",payloads:[{kind:"code",label:"Porter environment variables",description:"Porter injects the `PORTER_*` values from its app and deployment metadata at runtime. The keyed endpoint URL embeds your project key, so no auth header is needed.",language:"bash",value:`OTEL_EXPORTER_OTLP_ENDPOINT=https://\${context.ingestHost}
7155
+ exporters: [otlphttp/sazabi]`}]}]}]},{id:"adjust-pipelines",section:"config",title:"Adjust pipelines",actions:[{instruction:"Match the receivers to the sources you have configured.",notes:[{text:"The `filelog` receiver collects container logs on Kubernetes; the `otlp` receiver accepts spans from instrumented services."}]}]}]}});var uK;var dK=h(()=>{lK();uK={id:"otel_collector",name:"OpenTelemetry Collector",searchAliases:["otel","otel collector","open telemetry collector"],capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual agent setup is not exercised by automated lifecycle tests yet.",intake:[{id:"otel-collector",label:"OpenTelemetry Collector",transform:"otlp-passthrough"}],subtitle:"Forward logs and traces from your infrastructure to Sazabi using the OpenTelemetry Collector.",features:["Kubernetes DaemonSet","Vendor-neutral standard","Extensible via contrib","Logs and traces"],evidenceHints:["otelcol, opentelemetry-collector, or collector config YAML","Kubernetes DaemonSets or Helm values for OpenTelemetry Collector","OTLP receiver/exporter pipelines that can add a Sazabi exporter"],setupSkill:te,dashboard:{iconKey:"otel-collector",intakeSourceId:"otel-collector"}}});var TT;var pK=h(()=>{TT={perStreamInstructions:!0,groups:[{id:"instrument",section:"config",title:"Instrument application",notes:[{text:"Sazabi stores each incoming metric data point as a log record, so you can search metrics alongside your logs and traces and line them up with each other."}],actions:[{instruction:"Add or enable the OpenTelemetry metrics SDK in your application, or configure the OTLP metrics exporter on your OpenTelemetry Collector."}]},{id:"environment",section:"config",title:"Set OTLP metrics environment",actions:[{instruction:"Set these variables in the environment that runs your application or Collector — `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` is your intake URL (above).",payloads:[{kind:"copyable",label:"`OTEL_EXPORTER_OTLP_PROTOCOL`",value:"http/protobuf",copyLabel:"OTLP protocol"}],notes:[{text:"These variables work with any OpenTelemetry SDK or Collector that exports OTLP metrics."}]}]},{id:"redeploy",section:"verify",title:"Redeploy and verify",actions:[{instruction:"Restart or redeploy, then generate a metric to confirm Sazabi receives it as a log record."}]}]}});var gK;var mK=h(()=>{pK();gK={id:"otel_metrics",name:"OpenTelemetry Metrics",searchAliases:["otel metrics","opentelemetry metrics","otlp metrics","metrics as logs"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"otel-metrics",label:"OpenTelemetry Metrics",aliases:["otlp-metrics"],transform:"otlp-metrics-as-logs"}],lifecycleSkipReason:"Manual OTLP metrics setup is not exercised by automated lifecycle tests yet.",subtitle:"Send OpenTelemetry metrics to Sazabi's OTLP intake and store them as searchable log records.",features:["OTLP metric export","Metrics stored as log records","Any OTEL SDK or Collector"],evidenceHints:["OTLP metric exporters (OTEL_EXPORTER_OTLP_METRICS_* env vars) without a metrics backend","OpenTelemetry metrics instrumentation routed to a generic OTLP endpoint","A desire to query metrics alongside logs and traces in one place"],setupSkill:te,dashboard:{slug:"opentelemetry-metrics",iconKey:"opentelemetry-metrics",intakeSourceId:"otel-metrics"}}});var BT;var hK=h(()=>{BT={perStreamInstructions:!0,groups:[{id:"instrument",section:"config",title:"Instrument application",notes:[{text:"Metrics sent to the endpoint aren't stored yet."}],actions:[{instruction:"Add the OpenTelemetry SDK to your application. Most languages have official SDKs available (e.g., `@opentelemetry/api` for Node.js, `opentelemetry-api` for Python, etc.)."},{instruction:"Initialize the OpenTelemetry SDK in your application and configure the OTLP exporters for the signals you want (logs and/or traces)."}]},{id:"environment",section:"config",title:"Set OTLP environment",actions:[{instruction:"Set these variables in the environment that runs your application — `OTEL_EXPORTER_OTLP_ENDPOINT` is your intake URL (above).",payloads:[{kind:"copyable",label:"`OTEL_EXPORTER_OTLP_PROTOCOL`",value:"http/protobuf",copyLabel:"OTLP protocol"}],notes:[{text:"These variables work with any OpenTelemetry SDK (Node.js, Python, Go, Java, .NET, etc.)."}]}]},{id:"redeploy",section:"verify",title:"Redeploy and verify",actions:[{instruction:"Restart or redeploy the application, then generate a test log or trace to confirm Sazabi receives telemetry."}]}]}});var nxe,AK;var fK=h(()=>{hK();nxe={id:"otel-trace",label:"OpenTelemetry Traces",aliases:["mastra","otlp-trace","otlp-traces","otel-traces"],transform:"otlp-traces-only"},AK={id:"otel",name:"OpenTelemetry",searchAliases:["otel","open telemetry"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"otel",label:"OpenTelemetry",aliases:["gcl","otlp"],transform:"otlp-passthrough"},nxe],lifecycleSkipReason:"Manual OTLP setup is not exercised by automated lifecycle tests yet.",subtitle:"Send OpenTelemetry logs and traces directly to Sazabi's OTLP-compatible intake for AI-powered observability.",features:["OTLP log export","OTLP trace export","Any OTEL SDK"],evidenceHints:["@opentelemetry packages, opentelemetry-* SDKs, or OTEL_* environment variables","OTLP exporter configuration in application code or deployment manifests","Existing OpenTelemetry instrumentation without a more specific Sazabi source"],setupSkill:te,dashboard:{slug:"opentelemetry",iconKey:"opentelemetry",intakeSourceId:"otel"}}});var OT,_T,DT;var yK=h(()=>{Un();OT={kind:"multi-step",steps:[{id:"prepare",title:"Create API key",actions:[{kind:"instruction",instruction:"In Plain, open **Settings → Machine users** and create a machine user API key. The API key settings live under a workspace-scoped URL (`app.plain.com/workspace/<your-org-id>/settings/machine-users`), so open it from within your own Plain workspace."},{kind:"instruction",instruction:"Grant the key these permissions: `webhookTarget:create`, `webhookTarget:edit`, `webhookTarget:delete`, `webhookTarget:read`, and `subscriptionEventTypes:read`. Workspace read access is included with every key."}]},{id:"credentials",title:"Enter API key",actions:[{id:"apiKey",kind:"secret",label:"Plain API key",instruction:"Enter your Plain API key below.",description:"Machine user API key with webhookTarget and subscriptionEventTypes permissions.",placeholder:"plainApiKey_..."}]}],submit:{actions:[{kind:"validate",action:"validate",input:{apiKey:"$apiKey"},resultAs:"workspace"}],metadata:{plainApiKey:"$apiKey"},displayName:"$workspace.workspaceName",button:vt},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/plain"},_T={groups:[{id:"open-webhooks",section:"config",title:"Open Plain webhooks",actions:[{instruction:"In your [Plain workspace](https://app.plain.com/settings/webhooks), go to **Settings > Webhooks** and click **Create webhook target**.",notes:[{text:"You configure and own this webhook target — you choose which event types it subscribes to in Plain. Sazabi never receives a Plain API key on this path and does not create, edit, or delete the target. To have Sazabi enumerate event types and manage the webhook target for you, connect your Plain account instead."}]}]},{id:"endpoint",section:"config",title:"Set webhook URL",actions:[{instruction:"Paste your Sazabi intake URL (above) into the webhook target configuration."},{instruction:"Enable the target and select the event types you want to forward."}]},{id:"verify",section:"verify",title:"Save and verify",actions:[{instruction:"Save the webhook target, then trigger a subscribed event in Plain (for example create or update a thread). Events appear in Sazabi within a few minutes."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/plain"},DT={content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:[{field:"eventType",header:"Event type",cell:"mono"},{field:"description",header:"Description",cell:"muted"}],searchPlaceholder:"Search event types...",searchFields:["eventType","description"],dedupeByConfigField:"eventType",dedupeExpandArrayField:"eventTypes",aggregateSelection:{displayName:"Plain events",itemField:"eventType",configField:"eventTypes"},emptyState:{noMatches:"No event types found.",allConfigured:"All Plain event types already have log streams configured.",noItems:"Plain returned no subscribable event types for this API key. Confirm the key has subscriptionEventTypes:read permission."},toStreamItem:{displayName:"$item.eventType",config:{eventType:"$item.eventType"}}}}});var oxe,rxe,bK;var IK=h(()=>{yK();oxe=["plainApiKey"],rxe={id:"plain",label:"Plain",transform:"plain-webhook"},bK={id:"plain",name:"Plain",searchAliases:["plain.com","plain support","plain customer support"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!1,lifecycleSkipReason:"No automated integration fixture yet: Plain has no sandbox workspace API for minting disposable API keys and webhook targets in CI.",sensitiveFields:oxe,serverOwnedStreamConfigFields:["webhookTargetId"],intake:[rxe],subtitle:"Stream Plain customer support events into Sazabi for unified observability of your support workflows.",features:["Webhook event streaming","Multi-event webhook targets","Thread and customer activity"],evidenceHints:["@team-plain/typescript-sdk usage or PLAIN_API_KEY environment variables","core-api.uk.plain.com GraphQL calls or Plain webhook handlers","README/docs naming Plain for customer support, tickets, or threads"],setupSkill:te,dashboard:{iconKey:"plain",intakeSourceId:"plain",streamSelectorLayout:"sidepanel",streamTableColumns:[{kind:"config-text",header:"Event types",width:"w-96",configField:"eventTypes",fallbackLabel:"Unknown events"}],actions:{submit:{validate:{kind:"source-action",actionId:"validate",sensitiveInputFields:["apiKey"]}},list:{list:{kind:"source-action",actionId:"list-event-types",itemsField:"eventTypes"}}}}}});var QT;var SK=h(()=>{QT={groups:[{id:"send-telemetry",section:"config",title:"Send OpenTelemetry",actions:[{instruction:"Send OTLP telemetry to Sazabi directly from your app, or from a collector running in Porter.",payloads:[{kind:"external-link",label:"Open Porter dashboard",href:"https://dashboard.porter.run"}],notes:[{text:"Porter does not provide a generic log drain."}]}]},{id:"configure-exporter",section:"config",title:"Configure the exporter",actions:[{instruction:"Set these environment variables on the Porter service you want to monitor.",payloads:[{kind:"code",label:"Porter environment variables",description:"Porter injects the `PORTER_*` values from its app and deployment metadata at runtime. The keyed endpoint URL embeds your project key, so no auth header is needed.",language:"bash",value:`OTEL_EXPORTER_OTLP_ENDPOINT=https://\${context.ingestHost}
7156
7156
  OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
7157
7157
  OTEL_SERVICE_NAME=$PORTER_APP_SERVICE_NAME
7158
7158
  OTEL_RESOURCE_ATTRIBUTES=service.version=$PORTER_IMAGE_TAG,porter.revision=$PORTER_POD_REVISION,porter.pod.name=$PORTER_POD_NAME`,copyLabel:"Porter environment variables"}],notes:[{text:"You can also put shared values in a Porter environment group."}]},{instruction:"Install the OpenTelemetry SDK if your app does not already initialize OpenTelemetry.",payloads:[{kind:"code-tabs",label:"Install the OpenTelemetry SDK",tabs:[{id:"node",label:"Node.js",language:"bash",value:"bun add @opentelemetry/api @opentelemetry/sdk-node @opentelemetry/auto-instrumentations-node @opentelemetry/exporter-trace-otlp-proto @opentelemetry/exporter-logs-otlp-proto @opentelemetry/sdk-logs",copyLabel:"Node.js OpenTelemetry install"},{id:"python",label:"Python",language:"bash",value:`pip install opentelemetry-distro opentelemetry-exporter-otlp-proto-http
@@ -7186,10 +7186,7 @@ try {
7186
7186
  });
7187
7187
  } catch (err) {
7188
7188
  console.error("OpenTelemetry initialization failed", err);
7189
- }`,copyLabel:"Node.js instrumentation.cjs",collapsible:!0}]},{instruction:"Redeploy the Porter service, then generate a request or test log line."},{instruction:"Return to Sazabi and check for incoming logs or traces. If nothing appears, check the Porter logs for OpenTelemetry exporter errors."}]}]}});var CK;var vK=h(()=>{SK();CK={id:"porter",name:"Porter",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleEligible:!1,lifecycleSkipReason:"Manual OTEL setup is not exercised by automated lifecycle tests yet.",intake:[{id:"porter",label:"Porter",transform:"otlp-passthrough"}],subtitle:"Forward your Porter application logs and traces directly to Sazabi for real-time monitoring.",features:["Application logs","Deployment logs","Service monitoring"],evidenceHints:["porter.yaml or .github/workflows/porter.yml","PORTER_* environment variables","README/docs naming Porter (porter.run) as the deploy host"],setupSkill:te,dashboard:{iconKey:"porter",intakeSourceId:"porter"}}});var LT,ixe,NT,MT;var EK=h(()=>{Un();LT={kind:"multi-step",steps:[{id:"prepare",title:"Create key",actions:[{kind:"instruction",instruction:"Create a personal API key in your PostHog account under **Settings > Personal API keys** ([US](https://us.posthog.com/settings/user-api-keys) · [EU](https://eu.posthog.com/settings/user-api-keys))."},{kind:"instruction",instruction:"Grant it these scopes:\n\n- `project:read` - list your projects\n- `organization:read` - show your organization\n- `hog_function:write` - install the webhook destination"}]},{id:"credentials",title:"Enter API key",actions:[{id:"token",kind:"secret",label:"Personal API key",instruction:"Enter your personal API key below.",placeholder:"phx_..."}]}],submit:{actions:[{kind:"validate",action:"validate",input:{token:"$token"},resultAs:"validate"},{kind:"preflight",action:"preflight",input:{token:"$token",region:"$validate.posthogApiRegion",organizationId:"$validate.posthogOrganizationId"}}],metadata:{posthogPersonalApiKey:"$token",posthogApiRegion:"$validate.posthogApiRegion",posthogOrganizationId:"$validate.posthogOrganizationId",posthogOrganizationName:"$validate.posthogOrganizationName"},button:vt},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/posthog"},ixe=[{field:"name",header:"Project"},{field:"organizationName",header:"Organization",width:"w-48",transform:"fallback: - "}],NT={content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:ixe,searchPlaceholder:"Search projects...",searchFields:["name","organizationName"],dedupeByConfigField:"posthogProjectId",emptyState:{noMatches:"No projects found.",allConfigured:"All projects already have PostHog destinations configured."},toStreamItem:{displayName:"$item.name",config:{posthogProjectId:"$item.id",posthogProjectName:"$item.name"}}}},MT={docsUrl:"https://docs.sazabi.com/data/sources/endpoint/posthog",groups:[{id:"prepare",section:"config",title:"Open destination form",actions:[{instruction:"Configure an [HTTP Webhook destination](https://${context.posthogRegion}.posthog.com/pipeline/new/hog-template-webhook) in PostHog under **Data Pipeline > Destinations**."}]},{id:"values",section:"config",title:"Set destination values",actions:[{instruction:"Paste your Sazabi intake URL (above) into the **Destination URL** field, then set these values in the PostHog HTTP Webhook destination form.",payloads:[{kind:"copyable",label:"Method",value:"POST"},{kind:"code",label:"Body template",language:"json",copyLabel:"Body template",value:`{
7190
- "event": "{event}",
7191
- "person": "{person}"
7192
- }`}]}]},{id:"verify",section:"verify",title:"Save and verify",actions:[{instruction:"Save the PostHog destination, send a test event, and check Sazabi for the incoming product event."}]}]}});var sxe,axe,wK;var kK=h(()=>{EK();sxe=["posthogPersonalApiKey"],axe={id:"posthog",label:"PostHog",transform:"posthog-cdp"},wK={id:"posthog",name:"PostHog",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:sxe,serverOwnedStreamConfigFields:["posthogHogFunctionId"],intake:[axe],subtitle:"Forward your PostHog events directly to Sazabi for real-time product and error observability.",features:["CDP webhook forwarding","Event property mapping","Real-time streaming"],evidenceHints:["posthog-js, posthog-node, or posthog-python packages","POSTHOG_* or NEXT_PUBLIC_POSTHOG_* environment variables","README/docs naming PostHog for product analytics, feature flags, or session replay"],setupSkill:te,dashboard:{iconKey:"posthog",intakeSourceId:"posthog",streamSelectorLayout:"sidepanel",actions:{submit:{validate:{kind:"source-action",actionId:"validate-personal-api-key",sensitiveInputFields:["token"]},preflight:{kind:"source-action",actionId:"run-preflight-checks",normalize:"preflight",sensitiveInputFields:["token"]}},list:{list:{kind:"source-action",actionId:"list-projects",itemsField:"projects"}}}}}});var zT;var xK=h(()=>{zT={perStreamInstructions:!0,groups:[{id:"plan-proxy",section:"config",title:"Plan reverse proxy",actions:[{instruction:"Configure posthog-js to use a reverse proxy as `api_host`."},{instruction:"Send capture paths (`/e/`, `/i/`, `/s/`) to Sazabi, and send PostHog config, flags, and assets to PostHog.",notes:[{text:"Session replay is controlled by your PostHog project settings, not a `posthog.init` option."}]}]},{id:"target",section:"config",title:"Set capture target",actions:[{instruction:"Use your Sazabi intake URL (above) as the upstream destination for capture-path proxy rules."}]},{id:"initialize",section:"config",title:"Initialize posthog-js",actions:[{instruction:"Point posthog-js at your reverse proxy path.",payloads:[{kind:"code-tabs",label:"Initialize posthog-js",tabs:[{id:"javascript",label:"JavaScript",language:"javascript",copyLabel:"JavaScript",value:`import posthog from "posthog-js";
7189
+ }`,copyLabel:"Node.js instrumentation.cjs",collapsible:!0}]},{instruction:"Redeploy the Porter service, then generate a request or test log line."},{instruction:"Return to Sazabi and check for incoming logs or traces. If nothing appears, check the Porter logs for OpenTelemetry exporter errors."}]}]}});var CK;var vK=h(()=>{SK();CK={id:"porter",name:"Porter",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleEligible:!1,lifecycleSkipReason:"Manual OTEL setup is not exercised by automated lifecycle tests yet.",intake:[{id:"porter",label:"Porter",transform:"otlp-passthrough"}],subtitle:"Forward your Porter application logs and traces directly to Sazabi for real-time monitoring.",features:["Application logs","Deployment logs","Service monitoring"],evidenceHints:["porter.yaml or .github/workflows/porter.yml","PORTER_* environment variables","README/docs naming Porter (porter.run) as the deploy host"],setupSkill:te,dashboard:{iconKey:"porter",intakeSourceId:"porter"}}});var LT;var EK=h(()=>{LT={perStreamInstructions:!0,groups:[{id:"plan-proxy",section:"config",title:"Plan reverse proxy",actions:[{instruction:"Configure posthog-js to use a reverse proxy as `api_host`."},{instruction:"Send capture paths (`/e/`, `/i/`, `/s/`) to Sazabi, and send PostHog config, flags, and assets to PostHog.",notes:[{text:"Session replay is controlled by your PostHog project settings, not a `posthog.init` option."}]}]},{id:"target",section:"config",title:"Set capture target",actions:[{instruction:"Use your Sazabi intake URL (above) as the upstream destination for capture-path proxy rules."}]},{id:"initialize",section:"config",title:"Initialize posthog-js",actions:[{instruction:"Point posthog-js at your reverse proxy path.",payloads:[{kind:"code-tabs",label:"Initialize posthog-js",tabs:[{id:"javascript",label:"JavaScript",language:"javascript",copyLabel:"JavaScript",value:`import posthog from "posthog-js";
7193
7190
 
7194
7191
  posthog.init("<your phc_* project token>", {
7195
7192
  api_host: "/ingest",
@@ -7230,7 +7227,10 @@ const config: NextConfig = {
7230
7227
  },
7231
7228
  };
7232
7229
 
7233
- export default config;`}]}]}]}});var cxe,PK;var RK=h(()=>{xK();cxe=[],PK={id:"posthog_sdk",name:"PostHog SDK",searchAliases:["posthog","post hog"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"posthog-sdk",label:"PostHog SDK",transform:"posthog-sdk"}],lifecycleSkipReason:"Manual SDK setup is not exercised by automated lifecycle tests yet.",subtitle:"Forward PostHog SDK analytics and session replay to Sazabi by repointing posthog-js api_host.",features:["Session replay forwarding","Event capture","SDK integration"],evidenceHints:["posthog-js browser SDK initialization with api_host or capture options","NEXT_PUBLIC_POSTHOG_* browser environment variables","Frontend session replay or product analytics setup that should be proxied through Sazabi"],sensitiveFields:cxe,setupSkill:te,dashboard:{iconKey:"posthog",intakeSourceId:"posthog-sdk"}}});var jT;var TK=h(()=>{jT={perStreamInstructions:!0,groups:[{id:"collector-config",section:"config",title:"Export metrics through the OpenTelemetry Collector",notes:[{variant:"requirement",text:"Requires the OpenTelemetry Collector (Contrib distribution) with the `prometheus` receiver and `otlphttp` exporter."},{text:"Sazabi ingests each metric data point as a searchable log record, so there are no dashboards to configure."}],actions:[{instruction:"Prometheus does not speak OTLP directly, so run an OpenTelemetry Collector that scrapes your Prometheus targets and forwards the metrics to Sazabi.",payloads:[{kind:"code",label:"Collector configuration",language:"yaml",copyLabel:"OpenTelemetry Collector configuration for Prometheus",description:"Point `scrape_configs.static_configs.targets` at your existing Prometheus targets or scrape endpoints.",value:`receivers:
7230
+ export default config;`}]}]}]}});var ixe,wK;var kK=h(()=>{EK();ixe=[],wK={id:"posthog_sdk",name:"PostHog SDK",searchAliases:["posthog","post hog"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"posthog-sdk",label:"PostHog SDK",transform:"posthog-sdk"}],lifecycleSkipReason:"Manual SDK setup is not exercised by automated lifecycle tests yet.",subtitle:"Forward PostHog SDK analytics and session replay to Sazabi by repointing posthog-js api_host.",features:["Session replay forwarding","Event capture","SDK integration"],evidenceHints:["posthog-js browser SDK initialization with api_host or capture options","NEXT_PUBLIC_POSTHOG_* browser environment variables","Frontend session replay or product analytics setup that should be proxied through Sazabi"],sensitiveFields:ixe,setupSkill:te,dashboard:{iconKey:"posthog",intakeSourceId:"posthog-sdk"}}});var NT,sxe,MT,zT;var xK=h(()=>{Un();NT={kind:"multi-step",steps:[{id:"prepare",title:"Create key",actions:[{kind:"instruction",instruction:"Create a personal API key in your PostHog account under **Settings > Personal API keys** ([US](https://us.posthog.com/settings/user-api-keys) · [EU](https://eu.posthog.com/settings/user-api-keys))."},{kind:"instruction",instruction:"Grant it these scopes:\n\n- `project:read` - list your projects\n- `organization:read` - show your organization\n- `hog_function:write` - install the webhook destination"}]},{id:"credentials",title:"Enter API key",actions:[{id:"token",kind:"secret",label:"Personal API key",instruction:"Enter your personal API key below.",placeholder:"phx_..."}]}],submit:{actions:[{kind:"validate",action:"validate",input:{token:"$token"},resultAs:"validate"},{kind:"preflight",action:"preflight",input:{token:"$token",region:"$validate.posthogApiRegion",organizationId:"$validate.posthogOrganizationId"}}],metadata:{posthogPersonalApiKey:"$token",posthogApiRegion:"$validate.posthogApiRegion",posthogOrganizationId:"$validate.posthogOrganizationId",posthogOrganizationName:"$validate.posthogOrganizationName"},button:vt},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/posthog"},sxe=[{field:"name",header:"Project"},{field:"organizationName",header:"Organization",width:"w-48",transform:"fallback: - "}],MT={content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:sxe,searchPlaceholder:"Search projects...",searchFields:["name","organizationName"],dedupeByConfigField:"posthogProjectId",emptyState:{noMatches:"No projects found.",allConfigured:"All projects already have PostHog destinations configured."},toStreamItem:{displayName:"$item.name",config:{posthogProjectId:"$item.id",posthogProjectName:"$item.name"}}}},zT={docsUrl:"https://docs.sazabi.com/data/sources/endpoint/posthog",groups:[{id:"prepare",section:"config",title:"Open destination form",actions:[{instruction:"Configure an [HTTP Webhook destination](https://${context.posthogRegion}.posthog.com/pipeline/new/hog-template-webhook) in PostHog under **Data Pipeline > Destinations**."}]},{id:"values",section:"config",title:"Set destination values",actions:[{instruction:"Paste your Sazabi intake URL (above) into the **Destination URL** field, then set these values in the PostHog HTTP Webhook destination form.",payloads:[{kind:"copyable",label:"Method",value:"POST"},{kind:"code",label:"Body template",language:"json",copyLabel:"Body template",value:`{
7231
+ "event": "{event}",
7232
+ "person": "{person}"
7233
+ }`}]}]},{id:"verify",section:"verify",title:"Save and verify",actions:[{instruction:"Save the PostHog destination, send a test event, and check Sazabi for the incoming product event."}]}]}});var axe,cxe,PK;var RK=h(()=>{xK();axe=["posthogPersonalApiKey"],cxe={id:"posthog",label:"PostHog",transform:"posthog-cdp"},PK={id:"posthog",name:"PostHog",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:axe,serverOwnedStreamConfigFields:["posthogHogFunctionId"],intake:[cxe],subtitle:"Forward your PostHog events directly to Sazabi for real-time product and error observability.",features:["CDP webhook forwarding","Event property mapping","Real-time streaming"],evidenceHints:["posthog-js, posthog-node, or posthog-python packages","POSTHOG_* or NEXT_PUBLIC_POSTHOG_* environment variables","README/docs naming PostHog for product analytics, feature flags, or session replay"],setupSkill:te,dashboard:{iconKey:"posthog",intakeSourceId:"posthog",streamSelectorLayout:"sidepanel",actions:{submit:{validate:{kind:"source-action",actionId:"validate-personal-api-key",sensitiveInputFields:["token"]},preflight:{kind:"source-action",actionId:"run-preflight-checks",normalize:"preflight",sensitiveInputFields:["token"]}},list:{list:{kind:"source-action",actionId:"list-projects",itemsField:"projects"}}}}}});var jT;var TK=h(()=>{jT={perStreamInstructions:!0,groups:[{id:"collector-config",section:"config",title:"Export metrics through the OpenTelemetry Collector",notes:[{variant:"requirement",text:"Requires the OpenTelemetry Collector (Contrib distribution) with the `prometheus` receiver and `otlphttp` exporter."},{text:"Sazabi ingests each metric data point as a searchable log record, so there are no dashboards to configure."}],actions:[{instruction:"Prometheus does not speak OTLP directly, so run an OpenTelemetry Collector that scrapes your Prometheus targets and forwards the metrics to Sazabi.",payloads:[{kind:"code",label:"Collector configuration",language:"yaml",copyLabel:"OpenTelemetry Collector configuration for Prometheus",description:"Point `scrape_configs.static_configs.targets` at your existing Prometheus targets or scrape endpoints.",value:`receivers:
7234
7234
  prometheus:
7235
7235
  config:
7236
7236
  scrape_configs:
@@ -7275,7 +7275,7 @@ const respan = new Respan({
7275
7275
  });
7276
7276
  await respan.initialize();
7277
7277
 
7278
- // All supported LLM and agent calls are now auto-traced and exported to Sazabi.`}],notes:[{text:"The SDK sends its auto-instrumented spans to Sazabi over OTLP/HTTP — you do not need a separate OpenTelemetry exporter."},{text:"Using an agent framework? Pass the matching instrumentor, e.g. `Respan({ instrumentations: [...] })`, exactly as you would when exporting to Respan's own backend — only the base URL changes."},{text:"Already send OpenTelemetry directly (or run an OTel Collector)? Skip the Respan SDK and point your existing OTLP/HTTP trace exporter at the same host with the standard `/v1/traces` path (http/json or http/protobuf). This source accepts both the Respan SDK's `/api/v2/traces` path and the standard OTLP `/v1/traces` path."}]}]},{id:"redeploy",section:"verify",title:"Redeploy and verify",actions:[{instruction:"Redeploy or restart the service, then run an LLM or agent workload to generate a trace."}]}]}});var jK;var UK=h(()=>{zK();jK={id:"respan",name:"Respan",capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"respan",label:"Respan",transform:"otlp-passthrough",transformOptions:{tracePathSuffixes:["/api/v2/traces","/v1/traces"]}}],lifecycleSkipReason:"Manual SDK setup is not exercised by automated lifecycle tests yet.",subtitle:"Stream your Respan LLM traces directly to Sazabi for AI application observability.",features:["LLM traces","Token & cost tracking","Agent workflow monitoring"],evidenceHints:["respan-ai or @respan/respan packages, or a Respan() initializer","RESPAN_API_KEY environment variables","README/docs naming Respan for LLM tracing or observability"],setupSkill:te,dashboard:{iconKey:"respan",intakeSourceId:"respan"}}});var qT;var FK=h(()=>{qT={kind:"choice",title:"Choose Sentry SDK",description:"Choose the SDK snippet that matches your application, or copy the DSN for any other official Sentry SDK.",options:[{id:"javascript",label:"JavaScript / Node.js",description:"Initialize `@sentry/node` with the Sazabi DSN.",flow:{groups:[{id:"configure",section:"config",title:"Initialize SDK",actions:[{instruction:"Pick how you want events routed, then initialize the SDK with the matching snippet.",payloads:[{kind:"options",options:[{id:"sazabi-only",label:"Send only to Sazabi",description:"Replaces your Sentry project DSN with the Sazabi DSN — the simplest setup; your existing Sentry project no longer receives these events.",payloads:[{kind:"code",language:"javascript",copyLabel:"JavaScript",value:`import * as Sentry from "@sentry/node";
7278
+ // All supported LLM and agent calls are now auto-traced and exported to Sazabi.`}],notes:[{text:"The SDK sends its auto-instrumented spans to Sazabi over OTLP/HTTP — you do not need a separate OpenTelemetry exporter."},{text:"Using an agent framework? Pass the matching instrumentor, e.g. `Respan({ instrumentations: [...] })`, exactly as you would when exporting to Respan's own backend — only the base URL changes."},{text:"Already send OpenTelemetry directly (or run an OTel Collector)? Skip the Respan SDK and point your existing OTLP/HTTP trace exporter at the same host with the standard `/v1/traces` path (http/json or http/protobuf). This source accepts both the Respan SDK's `/api/v2/traces` path and the standard OTLP `/v1/traces` path."}]}]},{id:"redeploy",section:"verify",title:"Redeploy and verify",actions:[{instruction:"Redeploy or restart the service, then run an LLM or agent workload to generate a trace."}]}]}});var jK;var UK=h(()=>{zK();jK={id:"respan",name:"Respan",capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"respan",label:"Respan",transform:"otlp-passthrough",transformOptions:{tracePathSuffixes:["/api/v2/traces","/v1/traces"]}}],lifecycleSkipReason:"Manual SDK setup is not exercised by automated lifecycle tests yet.",subtitle:"Stream your Respan LLM traces directly to Sazabi for AI application observability.",features:["LLM traces","Token & cost tracking","Agent workflow monitoring"],evidenceHints:["respan-ai or @respan/respan packages, or a Respan() initializer","RESPAN_API_KEY environment variables","README/docs naming Respan for LLM tracing or observability"],setupSkill:te,dashboard:{iconKey:"respan",intakeSourceId:"respan"}}});var qT,VT;var FK=h(()=>{Un();qT={kind:"multi-step",steps:[{id:"prepare",title:"Create token",notes:[{variant:"requirement",text:"You must be an **Owner** or **Manager** in the Sentry organization — creating an Internal Integration needs the `org:write` scope, which Admin, Member, and Billing roles do not have (Sentry returns 403)."}],actions:[{kind:"instruction",instruction:"Create a Sentry **User Auth Token** (not an Organization Auth Token) with **Organization: Read & Write** (`org:write`), **Project: Read**, and **Issue & Event: Read** scopes. User Auth Tokens are created under your personal Sentry settings; Organization Auth Tokens (under org settings) require different management and scopes — use a User Auth Token.",payloads:[{kind:"external-link",label:"Open Sentry auth token settings",href:"https://sentry.io/settings/account/api/auth-tokens/new-token/"}],notes:[{text:"The `org:write` scope only lets Sazabi create the Internal Integration; the integration itself only receives read-level webhook events."}]},{kind:"instruction",instruction:"Confirm the Permissions Preview at the bottom of the Sentry form shows `event:read, org:write, project:read` before submitting."}]},{id:"credentials",title:"Enter credentials",actions:[{id:"token",kind:"secret",label:"Sentry auth token",instruction:"Enter your Sentry auth token below.",description:"A Sentry User Auth Token (not Organization Auth Token) with the org:write, project:read, and event:read scopes.",placeholder:"Enter your Sentry auth token"},{id:"organizationSlug",kind:"text",label:"Sentry organization slug",instruction:"Enter your Sentry organization slug below.",description:"The slug from your Sentry URL: sentry.io/organizations/<slug>/",placeholder:"e.g. my-org",pattern:"^[a-z0-9][a-z0-9-]*[a-z0-9]$",patternMessage:"Enter a valid Sentry organization slug (lowercase, hyphens allowed)."}]}],submit:{actions:[{kind:"validate",action:"validate",input:{token:"$token",organizationSlug:"$organizationSlug"},resultAs:"validate"}],metadata:{sentryAuthToken:"$token",organizationSlug:"$organizationSlug"},button:vt},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/sentry"},VT={groups:[{id:"create-integration",section:"config",title:"Create the Internal Integration",notes:[{variant:"requirement",text:"Creating an Internal Integration needs the **`org:write`** scope, which Sentry grants only to organization **Owners** and **Managers**. On this path the scope never leaves Sentry — you give Sazabi no auth token."}],actions:[{instruction:"In Sentry, go to **Settings → Developer Settings → Custom Integrations** and choose **New Internal Integration**.",payloads:[{kind:"external-link",label:"Open Sentry Custom Integrations",href:"https://sentry.io/settings/developer-settings/"}]},{instruction:"Under **Webhooks**, enable webhooks and subscribe to the **Issue** and **Comment** resources. To route alerts as well, enable **Alert Rule Action** so the integration can be added as a notification destination on Issue Alert and Metric Alert rules."}]},{id:"endpoint",section:"config",title:"Set the webhook URL",actions:[{instruction:"Paste your Sazabi intake URL (above) into the Internal Integration's Webhook URL field."},{instruction:"Save the integration."}]},{id:"verify",section:"verify",title:"Verify",actions:[{instruction:"Do something in Sentry to trigger an event — comment on an issue, change an issue's status, or create a fresh issue by throwing an exception in an instrumented project. `issue` and `comment` webhooks arrive within a few minutes."},{instruction:"To stream `event_alert` / `metric_alert` webhooks, edit each Issue Alert or Metric Alert rule in Sentry and add this integration as a notification destination — alerts are opt-in."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/sentry-platform"}});var pxe,gxe,$K;var GK=h(()=>{FK();pxe=["sentryAuthToken"],gxe={id:"sentry-platform",label:"Sentry Platform",transform:"sentry-platform-webhook"},$K={id:"sentry_platform",name:"Sentry",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],streamCardinality:"single",sensitiveFields:pxe,serverOwnedStreamConfigFields:["sentryAppSlug"],intake:[gxe],subtitle:"Connect your Sentry organization to stream errors, issues, and alerts to Sazabi in real-time.",features:["Error streaming","Issue tracking","Alert forwarding","Metric alerts"],evidenceHints:["Sentry organization or project config where org-level event forwarding is preferred","sentry-cli release/deploy automation that would benefit from platform context","Multiple Sentry SDK projects that should be connected through one Sentry platform integration"],setupSkill:te,dashboard:{iconKey:"sentry",intakeSourceId:"sentry-platform",actions:{submit:{validate:{kind:"source-action",actionId:"validate",sensitiveInputFields:["token"]}}}}}});var KT;var HK=h(()=>{KT={kind:"choice",title:"Choose Sentry SDK",description:"Choose the SDK snippet that matches your application, or copy the DSN for any other official Sentry SDK.",options:[{id:"javascript",label:"JavaScript / Node.js",description:"Initialize `@sentry/node` with the Sazabi DSN.",flow:{groups:[{id:"configure",section:"config",title:"Initialize SDK",actions:[{instruction:"Pick how you want events routed, then initialize the SDK with the matching snippet.",payloads:[{kind:"options",options:[{id:"sazabi-only",label:"Send only to Sazabi",description:"Replaces your Sentry project DSN with the Sazabi DSN — the simplest setup; your existing Sentry project no longer receives these events.",payloads:[{kind:"code",language:"javascript",copyLabel:"JavaScript",value:`import * as Sentry from "@sentry/node";
7279
7279
 
7280
7280
  Sentry.init({
7281
7281
  dsn: "https://sazabi@\${context.ingestHost}/0",
@@ -7319,7 +7319,7 @@ sentry_sdk.init(
7319
7319
  dsn=SENTRY_DSN,
7320
7320
  enable_logs=True,
7321
7321
  before_send=_forward_to_sazabi,
7322
- )`}],notes:[{text:"The Python SDK has no built-in multiplexed transport, so a second `Client` plus a `before_send` hook forwards a copy of each event to Sazabi; returning `event` keeps your primary Sentry project receiving it."},{text:"`before_send` forwards error events only — structured logs stay on your primary Sentry project on this path. Verify Sazabi delivery with a test exception."}]}]}]}]},{id:"verify",section:"verify",title:"Verify telemetry",actions:[{instruction:"Restart the app, then send a test exception and write a structured log to confirm they arrive in Sazabi.",notes:[{text:"The snippet above already enables structured logging (`enable_logs=True`)."},{text:"This DSN also works with other official Sentry SDKs including Go, Ruby, Java, and .NET."}]}]}]}}]}});var $K;var GK=h(()=>{FK();$K={id:"sentry",name:"Sentry SDK",searchAliases:["sentry"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"sentry-dsn",label:"Sentry SDK",transform:"sentry-envelope"}],lifecycleSkipReason:"Manual SDK setup is not exercised by automated lifecycle tests yet.",subtitle:"Forward Sentry SDK errors, structured logs, and envelope telemetry directly to Sazabi.",features:["Error forwarding","Structured logs","Envelope telemetry","SDK integration"],evidenceHints:["@sentry packages, sentry.properties, SENTRY_DSN, or sentry-cli releases","Sentry.init calls or framework-specific Sentry config files","README/docs naming Sentry as the error tracking provider"],setupSkill:te,dashboard:{iconKey:"sentry",intakeSourceId:"sentry-dsn"}}});var VT,KT;var HK=h(()=>{Un();VT={kind:"multi-step",steps:[{id:"prepare",title:"Create token",notes:[{variant:"requirement",text:"You must be an **Owner** or **Manager** in the Sentry organization — creating an Internal Integration needs the `org:write` scope, which Admin, Member, and Billing roles do not have (Sentry returns 403)."}],actions:[{kind:"instruction",instruction:"Create a Sentry **User Auth Token** (not an Organization Auth Token) with **Organization: Read & Write** (`org:write`), **Project: Read**, and **Issue & Event: Read** scopes. User Auth Tokens are created under your personal Sentry settings; Organization Auth Tokens (under org settings) require different management and scopes — use a User Auth Token.",payloads:[{kind:"external-link",label:"Open Sentry auth token settings",href:"https://sentry.io/settings/account/api/auth-tokens/new-token/"}],notes:[{text:"The `org:write` scope only lets Sazabi create the Internal Integration; the integration itself only receives read-level webhook events."}]},{kind:"instruction",instruction:"Confirm the Permissions Preview at the bottom of the Sentry form shows `event:read, org:write, project:read` before submitting."}]},{id:"credentials",title:"Enter credentials",actions:[{id:"token",kind:"secret",label:"Sentry auth token",instruction:"Enter your Sentry auth token below.",description:"A Sentry User Auth Token (not Organization Auth Token) with the org:write, project:read, and event:read scopes.",placeholder:"Enter your Sentry auth token"},{id:"organizationSlug",kind:"text",label:"Sentry organization slug",instruction:"Enter your Sentry organization slug below.",description:"The slug from your Sentry URL: sentry.io/organizations/<slug>/",placeholder:"e.g. my-org",pattern:"^[a-z0-9][a-z0-9-]*[a-z0-9]$",patternMessage:"Enter a valid Sentry organization slug (lowercase, hyphens allowed)."}]}],submit:{actions:[{kind:"validate",action:"validate",input:{token:"$token",organizationSlug:"$organizationSlug"},resultAs:"validate"}],metadata:{sentryAuthToken:"$token",organizationSlug:"$organizationSlug"},button:vt},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/sentry"},KT={groups:[{id:"create-integration",section:"config",title:"Create the Internal Integration",notes:[{variant:"requirement",text:"Creating an Internal Integration needs the **`org:write`** scope, which Sentry grants only to organization **Owners** and **Managers**. On this path the scope never leaves Sentry — you give Sazabi no auth token."}],actions:[{instruction:"In Sentry, go to **Settings → Developer Settings → Custom Integrations** and choose **New Internal Integration**.",payloads:[{kind:"external-link",label:"Open Sentry Custom Integrations",href:"https://sentry.io/settings/developer-settings/"}]},{instruction:"Under **Webhooks**, enable webhooks and subscribe to the **Issue** and **Comment** resources. To route alerts as well, enable **Alert Rule Action** so the integration can be added as a notification destination on Issue Alert and Metric Alert rules."}]},{id:"endpoint",section:"config",title:"Set the webhook URL",actions:[{instruction:"Paste your Sazabi intake URL (above) into the Internal Integration's Webhook URL field."},{instruction:"Save the integration."}]},{id:"verify",section:"verify",title:"Verify",actions:[{instruction:"Do something in Sentry to trigger an event — comment on an issue, change an issue's status, or create a fresh issue by throwing an exception in an instrumented project. `issue` and `comment` webhooks arrive within a few minutes."},{instruction:"To stream `event_alert` / `metric_alert` webhooks, edit each Issue Alert or Metric Alert rule in Sentry and add this integration as a notification destination — alerts are opt-in."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/sentry-platform"}});var pxe,gxe,qK;var VK=h(()=>{HK();pxe=["sentryAuthToken"],gxe={id:"sentry-platform",label:"Sentry Platform",transform:"sentry-platform-webhook"},qK={id:"sentry_platform",name:"Sentry",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],streamCardinality:"single",sensitiveFields:pxe,serverOwnedStreamConfigFields:["sentryAppSlug"],intake:[gxe],subtitle:"Connect your Sentry organization to stream errors, issues, and alerts to Sazabi in real-time.",features:["Error streaming","Issue tracking","Alert forwarding","Metric alerts"],evidenceHints:["Sentry organization or project config where org-level event forwarding is preferred","sentry-cli release/deploy automation that would benefit from platform context","Multiple Sentry SDK projects that should be connected through one Sentry platform integration"],setupSkill:te,dashboard:{iconKey:"sentry",intakeSourceId:"sentry-platform",actions:{submit:{validate:{kind:"source-action",actionId:"validate",sensitiveInputFields:["token"]}}}}}});var YT;var KK=h(()=>{YT={groups:[{id:"open-form",section:"config",title:"Open log drain form",notes:[{variant:"requirement",text:"Log Drains require a Supabase Pro, Team, or Enterprise plan."}],actions:[{instruction:"In the [Supabase dashboard](https://supabase.com/dashboard), open the project whose logs you want to forward, then open **Project Settings > Log Drains** and click **Add destination**."}]},{id:"fields",section:"config",title:"Copy drain fields",actions:[{instruction:"Fill in the **Name** and **Description** fields.",payloads:[{kind:"copyable",label:"Name",value:"Sazabi"},{kind:"copyable",label:"Description",value:"Forward Supabase logs to Sazabi for observability and AI analysis."}]},{instruction:"Set **Type** to **OpenTelemetry Protocol (OTLP)**."}]},{id:"otlp-endpoint",section:"config",title:"OTLP Endpoint",actions:[{instruction:"Paste your Sazabi intake URL (above) into the **OTLP Endpoint** field."}]},{id:"delivery-fields",section:"config",title:"Finish drain fields",actions:[{instruction:"Fill in the **Protocol** field.",payloads:[{kind:"copyable",label:"Protocol",value:"HTTP/Protobuf"}]},{instruction:"Set **Gzip Compression** to **Enabled**."}]},{id:"save",section:"verify",title:"Save and verify",actions:[{instruction:"Save the log drain, then trigger activity — run a query or hit your project's API. Logs appear in Sazabi within a few minutes."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/supabase"}});var YK;var WK=h(()=>{KK();YK={id:"supabase",name:"Supabase",capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"supabase",label:"Supabase",transform:"supabase-drain"}],lifecycleSkipReason:"Manual drain setup is not exercised by automated lifecycle tests yet.",subtitle:"Stream your Supabase project logs directly to Sazabi for unified observability.",features:["Database logs","Auth events","Edge Function logs"],evidenceHints:["supabase/ directory, supabase/config.toml, or Supabase CLI scripts","@supabase/* packages, SUPABASE_URL, or SUPABASE_SERVICE_ROLE_KEY","README/docs naming Supabase for Postgres, Auth, Storage, or Edge Functions"],setupSkill:te,dashboard:{iconKey:"supabase",intakeSourceId:"supabase"}}});var WT;var JK=h(()=>{Un();WT={groups:[{id:"instrument",section:"config",title:"Instrument workers",description:"Set up each Temporal worker runtime to send OpenTelemetry data.",actions:[...Nf("Temporal worker")]},{id:"redeploy",section:"verify",title:"Redeploy and verify",actions:[{instruction:"Redeploy or restart your Temporal workers, then run a workflow or activity to generate fresh telemetry."}]}]}});var ZK;var XK=h(()=>{JK();ZK={id:"temporal",name:"Temporal",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual worker setup is not exercised by automated lifecycle tests yet.",intake:[{id:"temporal",label:"Temporal",transform:"otlp-passthrough"}],subtitle:"Forward OpenTelemetry logs and traces from your Temporal workers to Sazabi for durable execution observability.",features:["Worker logs","Workflow and activity traces"],evidenceHints:["@temporalio packages, Temporal worker entrypoints, workflows/, or activities/","TEMPORAL_ADDRESS, TEMPORAL_NAMESPACE, or Temporal Cloud deployment docs","Background workflows or durable orchestration code that already emits OTLP telemetry"],setupSkill:te,dashboard:{iconKey:"temporal",intakeSourceId:"temporal"}}});var JT;var eY=h(()=>{JT={perStreamInstructions:!0,groups:[{id:"prepare",section:"config",title:"Prepare Trigger.dev project",actions:[{instruction:"Install `@opentelemetry/exporter-logs-otlp-http` in the package that owns your `trigger.config.ts` file."},{instruction:"If your project already sets up OpenTelemetry in code, reuse the Sazabi log intake URL in that setup instead of adding a second exporter."}]},{id:"configure",section:"config",title:"Configure log exporter",actions:[{instruction:"Add the OTLP log exporter to `trigger.config.ts`.",payloads:[{kind:"code",label:"`trigger.config.ts`",language:"typescript",value:`import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-http";
7322
+ )`}],notes:[{text:"The Python SDK has no built-in multiplexed transport, so a second `Client` plus a `before_send` hook forwards a copy of each event to Sazabi; returning `event` keeps your primary Sentry project receiving it."},{text:"`before_send` forwards error events only — structured logs stay on your primary Sentry project on this path. Verify Sazabi delivery with a test exception."}]}]}]}]},{id:"verify",section:"verify",title:"Verify telemetry",actions:[{instruction:"Restart the app, then send a test exception and write a structured log to confirm they arrive in Sazabi.",notes:[{text:"The snippet above already enables structured logging (`enable_logs=True`)."},{text:"This DSN also works with other official Sentry SDKs including Go, Ruby, Java, and .NET."}]}]}]}}]}});var qK;var VK=h(()=>{HK();qK={id:"sentry",name:"Sentry SDK",searchAliases:["sentry"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"sentry-dsn",label:"Sentry SDK",transform:"sentry-envelope"}],lifecycleSkipReason:"Manual SDK setup is not exercised by automated lifecycle tests yet.",subtitle:"Forward Sentry SDK errors, structured logs, and envelope telemetry directly to Sazabi.",features:["Error forwarding","Structured logs","Envelope telemetry","SDK integration"],evidenceHints:["@sentry packages, sentry.properties, SENTRY_DSN, or sentry-cli releases","Sentry.init calls or framework-specific Sentry config files","README/docs naming Sentry as the error tracking provider"],setupSkill:te,dashboard:{iconKey:"sentry",intakeSourceId:"sentry-dsn"}}});var YT;var KK=h(()=>{YT={groups:[{id:"open-form",section:"config",title:"Open log drain form",notes:[{variant:"requirement",text:"Log Drains require a Supabase Pro, Team, or Enterprise plan."}],actions:[{instruction:"In the [Supabase dashboard](https://supabase.com/dashboard), open the project whose logs you want to forward, then open **Project Settings > Log Drains** and click **Add destination**."}]},{id:"fields",section:"config",title:"Copy drain fields",actions:[{instruction:"Fill in the **Name** and **Description** fields.",payloads:[{kind:"copyable",label:"Name",value:"Sazabi"},{kind:"copyable",label:"Description",value:"Forward Supabase logs to Sazabi for observability and AI analysis."}]},{instruction:"Set **Type** to **OpenTelemetry Protocol (OTLP)**."}]},{id:"otlp-endpoint",section:"config",title:"OTLP Endpoint",actions:[{instruction:"Paste your Sazabi intake URL (above) into the **OTLP Endpoint** field."}]},{id:"delivery-fields",section:"config",title:"Finish drain fields",actions:[{instruction:"Fill in the **Protocol** field.",payloads:[{kind:"copyable",label:"Protocol",value:"HTTP/Protobuf"}]},{instruction:"Set **Gzip Compression** to **Enabled**."}]},{id:"save",section:"verify",title:"Save and verify",actions:[{instruction:"Save the log drain, then trigger activity — run a query or hit your project's API. Logs appear in Sazabi within a few minutes."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/supabase"}});var YK;var WK=h(()=>{KK();YK={id:"supabase",name:"Supabase",capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"supabase",label:"Supabase",transform:"supabase-drain"}],lifecycleSkipReason:"Manual drain setup is not exercised by automated lifecycle tests yet.",subtitle:"Stream your Supabase project logs directly to Sazabi for unified observability.",features:["Database logs","Auth events","Edge Function logs"],evidenceHints:["supabase/ directory, supabase/config.toml, or Supabase CLI scripts","@supabase/* packages, SUPABASE_URL, or SUPABASE_SERVICE_ROLE_KEY","README/docs naming Supabase for Postgres, Auth, Storage, or Edge Functions"],setupSkill:te,dashboard:{iconKey:"supabase",intakeSourceId:"supabase"}}});var WT;var JK=h(()=>{Un();WT={groups:[{id:"instrument",section:"config",title:"Instrument workers",description:"Set up each Temporal worker runtime to send OpenTelemetry data.",actions:[...Nf("Temporal worker")]},{id:"redeploy",section:"verify",title:"Redeploy and verify",actions:[{instruction:"Redeploy or restart your Temporal workers, then run a workflow or activity to generate fresh telemetry."}]}]}});var ZK;var XK=h(()=>{JK();ZK={id:"temporal",name:"Temporal",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual worker setup is not exercised by automated lifecycle tests yet.",intake:[{id:"temporal",label:"Temporal",transform:"otlp-passthrough"}],subtitle:"Forward OpenTelemetry logs and traces from your Temporal workers to Sazabi for durable execution observability.",features:["Worker logs","Workflow and activity traces"],evidenceHints:["@temporalio packages, Temporal worker entrypoints, workflows/, or activities/","TEMPORAL_ADDRESS, TEMPORAL_NAMESPACE, or Temporal Cloud deployment docs","Background workflows or durable orchestration code that already emits OTLP telemetry"],setupSkill:te,dashboard:{iconKey:"temporal",intakeSourceId:"temporal"}}});var JT;var eY=h(()=>{JT={perStreamInstructions:!0,groups:[{id:"prepare",section:"config",title:"Prepare Trigger.dev project",actions:[{instruction:"Install `@opentelemetry/exporter-logs-otlp-http` in the package that owns your `trigger.config.ts` file."},{instruction:"If your project already sets up OpenTelemetry in code, reuse the Sazabi log intake URL in that setup instead of adding a second exporter."}]},{id:"configure",section:"config",title:"Configure log exporter",actions:[{instruction:"Add the OTLP log exporter to `trigger.config.ts`.",payloads:[{kind:"code",label:"`trigger.config.ts`",language:"typescript",value:`import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-http";
7323
7323
  import { defineConfig } from "@trigger.dev/sdk";
7324
7324
 
7325
7325
  export default defineConfig({
@@ -7409,7 +7409,7 @@ sinks:
7409
7409
  codec: otlp`}]}]}]},{id:"wire-sources",section:"config",title:"Wire sources",actions:[{instruction:'Replace `inputs: ["*"]` on the `remap` transform with your specific source or transform IDs in production. `["*"]` also matches `internal_metrics` and other unrelated components.',notes:[{variant:"requirement",text:"The sink's `otlp` codec doesn't build the OTLP envelope on its own. If you wire raw sources straight into it, Vector drops every event."},{text:"Sazabi indexes logs and traces from Vector. It accepts metrics at the intake but silently drops them."}]}]},{id:"traces",section:"config",title:"Forward traces (optional)",actions:[{instruction:'Add a second `opentelemetry` sink with `uri` ending in `/v1/traces` and explicit `inputs` referencing an already-OTLP-shaped source, typically an `opentelemetry` Vector source with `use_otlp_decoding.traces: true` (use `inputs: ["otlp_in.traces"]`).',notes:[{text:"No remap is needed for traces."},{variant:"requirement",text:'Do not wire `["*"]` into a traces sink.'}]}]}]}});var rY;var iY=h(()=>{oY();rY={id:"vector",name:"Vector",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual agent setup is not exercised by automated lifecycle tests yet.",intake:[{id:"vector",label:"Vector",transform:"otlp-passthrough"}],subtitle:"Forward logs and traces from your infrastructure to Sazabi using the Vector observability pipeline.",features:["Kubernetes DaemonSet","High-throughput pipeline","Built-in transforms","Multiple source types"],evidenceHints:["vector.toml/yaml/json, vector.dev Helm values, or Vector sidecars","VECTOR_* environment variables or VRL transform config","README/docs naming Vector as the observability pipeline"],setupSkill:te,dashboard:{iconKey:"vector",intakeSourceId:"vector"}}});var eB,tB,XT,nB;var sY=h(()=>{Un();eB={kind:"multi-step",steps:[{id:"prepare",title:"Create token",actions:[{kind:"instruction",instruction:"Create a full-access API token in your [Vercel account settings](https://vercel.com/account/tokens). For team accounts, create the token while scoped to the correct team.",notes:[{text:"A token gets the same permissions as your account."}]}]},{id:"credentials",title:"Enter token",actions:[{id:"token",kind:"secret",label:"API token",instruction:"Enter your Vercel API token below.",placeholder:"Enter your Vercel API token"}]}],submit:{actions:[{kind:"validate",action:"validate",input:{token:"$token"},resultAs:"validate"}],metadata:{vercelApiToken:"$token",vercelTeamId:"$validate.teamId",vercelTeamName:"$validate.teamName"},button:vt}},tB={groups:[{id:"open-drains",section:"config",title:"Open Drains",notes:[{variant:"requirement",text:"**Vercel Drains require the Pro or Enterprise plan.** Hobby and Pro Trial teams cannot create drains."}],actions:[{instruction:"In your [Vercel dashboard](https://vercel.com/dashboard), go to **Team Settings > Drains** and create a new drain."},{instruction:"Choose **Logs** as the data to deliver.",notes:[{text:"This path covers logs only — to send traces or Web Analytics events, connect your Vercel account instead and Sazabi creates those drains for you."}]}]},{id:"endpoint",section:"config",title:"Set the endpoint",actions:[{instruction:"Paste your Sazabi intake URL (above) into the drain's endpoint field."}]},{id:"delivery-settings",section:"config",title:"Set delivery options",actions:[{instruction:"Set the delivery format to **JSON**.",notes:[{text:"Sazabi does not parse NDJSON on this endpoint."}]},{instruction:"Pick the projects, environments, and log sources to send.",notes:[{text:"Sazabi accepts every Vercel log source (Static, Lambda, Edge, Build, External, Firewall, Redirect)."}]}]},{id:"verify",section:"verify",title:"Save and verify",actions:[{instruction:"Save the drain, then send some traffic — push a deployment or hit an application route. Logs show up in Sazabi within a few minutes."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/vercel"},XT=[{field:"name",header:"Project"},{field:"framework",header:"Framework",width:"w-32",cell:"badge",transform:"fallback:Unspecified"}],nB={content:{kind:"tabs",tabs:[{id:"logs",label:"Logs",content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:XT,searchPlaceholder:"Search projects...",searchFields:["name","framework"],dedupeByConfigField:"vercelProjectId",dedupeExtraMatch:{drainType:"logs"},emptyState:{noMatches:"No projects found.",allConfigured:"All projects already have logs drains configured."},toStreamItem:{displayName:"$item.name (Logs)",config:{vercelProjectId:"$item.id",vercelProjectName:"$item.name",drainType:"logs"}}}},{id:"traces",label:"Traces",content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:XT,searchPlaceholder:"Search projects...",searchFields:["name","framework"],dedupeByConfigField:"vercelProjectId",dedupeExtraMatch:{drainType:"traces"},emptyState:{noMatches:"No projects found.",allConfigured:"All projects already have traces drains configured."},toStreamItem:{displayName:"$item.name (Traces)",config:{vercelProjectId:"$item.id",vercelProjectName:"$item.name",drainType:"traces"}}}},{id:"analytics",label:"Analytics",content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:XT,searchPlaceholder:"Search projects...",searchFields:["name","framework"],dedupeByConfigField:"vercelProjectId",dedupeExtraMatch:{drainType:"analytics"},emptyState:{noMatches:"No projects found.",allConfigured:"All projects already have analytics drains configured."},toStreamItem:{displayName:"$item.name (Analytics)",config:{vercelProjectId:"$item.id",vercelProjectName:"$item.name",drainType:"analytics"}}}}]}}});var mxe,hxe,Axe,aY;var cY=h(()=>{sY();mxe=["vercelApiToken"],hxe={id:"vercel",label:"Vercel",transform:"vercel-drain"},Axe={id:"vercel-analytics",label:"Vercel Analytics",transform:"vercel-analytics-drain"},aY={id:"vercel",name:"Vercel",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:mxe,serverOwnedStreamConfigFields:["vercelDrainId"],secretStreamConfigFields:["drainSecret"],intake:[hxe,Axe],subtitle:"Forward your Vercel deployment logs, traces, and Web Analytics events directly to Sazabi for real-time analysis and alerting.",features:["Log forwarding","Trace forwarding","Web Analytics forwarding","Real-time streaming"],evidenceHints:["vercel.json, .vercel/, or Vercel build/deploy scripts","@vercel packages, VERCEL_* environment variables, or GitHub Actions that run vercel","README/docs naming Vercel as the deployment host"],setupSkill:te,dashboard:{iconKey:"vercel",intakeSourceId:"vercel",streamSelectorLayout:"sidepanel",streamTableColumns:[{kind:"config-enum-badge",header:"Type",width:"w-24",configField:"drainType",values:[{value:"logs",label:"Logs"},{value:"traces",label:"Traces"},{value:"analytics",label:"Analytics"}],fallbackLabel:"N/A"}],actions:{submit:{validate:{kind:"source-action",actionId:"validate-token"}},list:{list:{kind:"source-action",actionId:"list-projects",itemsField:"projects"}}}}}});var oB;var lY=h(()=>{oB={perStreamInstructions:!0,groups:[{id:"endpoint",section:"config",title:"Send events",actions:[{instruction:"Send an HTTP `POST` with a JSON body to your webhook URL (above).",notes:[{text:"A single JSON object is stored as one event; a JSON array of objects is stored as one event per element."},{text:"You can append any path — for example `/deploys` — to record the event's origin; the path is passed through and stored as `webhook.path`."}]}]},{id:"configure-vendor",section:"config",title:"Paste the URL into your vendor",actions:[{instruction:"Open your vendor's webhook or outbound-event settings, add a new endpoint, and paste the URL above. Choose JSON as the payload format if the vendor offers a choice.",notes:[{text:"Sazabi reads the time, severity, and message from common field names when present, and stores every field of the payload under `webhook.*` either way. There is nothing to map or declare."}]}]},{id:"verify",section:"verify",title:"Send a test event and verify",actions:[{instruction:"Trigger a test event from your vendor — most webhook settings pages have a “Send test” button — or POST a sample event yourself, then watch for it below.",payloads:[{kind:"code",label:"Send a test event",language:"bash",copyLabel:"curl test event",value:`curl -X POST \\
7410
7410
  https://\${context.ingestHost}/test \\
7411
7411
  -H 'content-type: application/json' \\
7412
- -d '{"event":"hello.world","level":"info","message":"first webhook event"}'`}]}]}]}});var uY;var dY=h(()=>{lY();uY={id:"webhook_events",name:"Webhook Events",searchAliases:["webhook","webhooks","json events","http events","generic webhook","event stream"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"webhook-events",label:"Webhook Events",transform:"webhook-events"}],lifecycleSkipReason:"Manual webhook setup is not exercised by automated lifecycle tests yet.",subtitle:"Point any vendor's webhooks at Sazabi. Arbitrary JSON events land as searchable log records with zero vendor-specific configuration.",features:["Any JSON event stream","One keyed URL per endpoint","Full payload preserved as attributes","No schema or field mapping"],evidenceHints:["A vendor that emits plain JSON webhooks without a dedicated Sazabi source","An internal service, deploy bot, or cron that POSTs JSON events","Existing outbound webhook configuration with no other Sazabi destination"],setupSkill:te,dashboard:{slug:"webhook-events",iconKey:"webhook-events",intakeSourceId:"webhook-events"}}});var Mf,zf,SIt,fxe,CIt,vIt,EIt,Hc,wIt,kIt,yxe,bxe,Ixe,xIt;var pY=h(()=>{nV();iV();cV();dV();mV();fV();IV();vV();kV();RV();OV();QV();MV();UV();GV();VV();WV();XV();nK();iK();cK();dK();mK();fK();IK();vK();kK();RK();OK();QK();MK();UK();GK();VK();WK();XK();nY();iY();cY();dY();Mf=[tV,rV,aV,uV,gV,AV,bV,CV,wV,PV,BV,DV,NV,jV,$V,qV,YV,ZV,tK,rK,aK,uK,gK,AK,bK,CK,wK,PK,BK,DK,NK,jK,qK,$K,YK,ZK,tY,rY,aY,uY],zf=Mf,SIt=Object.fromEntries(zf.map((e)=>[e.id,e.sensitiveFields??[]])),fxe=["publicKeyId"],CIt=Object.fromEntries(zf.map((e)=>[e.id,[...new Set([...fxe,...e.serverOwnedStreamConfigFields??[],...e.secretStreamConfigFields??[]])]])),vIt=Object.fromEntries(zf.map((e)=>[e.id,e.secretStreamConfigFields??[]])),EIt=Object.fromEntries(zf.flatMap((e)=>[...Object.values(e.dashboard?.actions?.submit??{}),...Object.values(e.dashboard?.actions?.list??{}),...Object.values(e.dashboard?.actions?.prefetch??{})].flatMap((t)=>{let n=t.sensitiveInputFields??[];if(n.length===0)return[];return[["procedure"in t?t.procedure:`${e.id}.${t.actionId}`,n]]}))),Hc=["vercel","cloudflare","railway","render","fly_io","netlify","supabase","digital_ocean","inngest","trigger_dev","temporal","mastra","neon","langchain","daytona","e2b","cloudwatch","convex","datadog","sentry","sentry_platform","openrouter","posthog","posthog_sdk","gcp","otel","otel_metrics","fluent_bit","vector","grafana_alloy","otel_collector","cloudflare_workers","elastic_cloud","porter","respan","plain","prometheus","webhook_events","claude_code","codex"],wIt=Mf.map((e)=>({id:e.id,name:e.name,capabilities:e.capabilities})),kIt=Object.fromEntries(Mf.map((e)=>[e.id,{name:e.name,setupSkill:e.setupSkill}])),yxe={cloudflare:KR,cloudwatch:tT,convex:iT,digital_ocean:uT,fly_io:AT,gcp:bT,plain:OT,posthog:LT,render:FT,sentry_platform:VT,vercel:eB},bxe={cloudflare:YR,cloudwatch:nT,convex:aT,digital_ocean:pT,fly_io:yT,gcp:IT,plain:DT,posthog:NT,render:GT,vercel:nB},Ixe={cloudflare:WR,cloudflare_workers:JR,cloudwatch:oT,convex:sT,datadog:cT,daytona:lT,digital_ocean:dT,fluent_bit:hT,fly_io:fT,grafana_alloy:CT,e2b:gT,elastic_cloud:mT,gcp:ST,inngest:vT,langchain:ET,mastra:wT,neon:kT,netlify:xT,openrouter:PT,otel:RT,otel_collector:TT,otel_metrics:BT,plain:_T,posthog:MT,posthog_sdk:zT,porter:QT,prometheus:jT,railway:UT,render:$T,respan:HT,sentry:qT,sentry_platform:KT,supabase:YT,temporal:WT,trigger_dev:JT,vector:ZT,vercel:tB,webhook_events:oB,claude_code:VR,codex:rT},xIt=Mf.map((e)=>({sourceId:e.id,name:e.name,capabilities:e.capabilities,setupAuthModes:e.auth,deliveryModes:e.delivery,hasDashboardMetadata:Boolean(e.dashboard),hasManagedFlow:Boolean(yxe[e.id]),hasConnectionlessFlow:Boolean(Ixe[e.id]),hasStreamSelector:Boolean(bxe[e.id]),lifecycleEligible:e.lifecycleEligible??!1,lifecycleSkipReason:e.lifecycleSkipReason}))});var gY=h(()=>{pY()});var rB=h(()=>{Xq();gY()});var mY,iB,Sxe,jf,Cxe,hY,sB,Hs,fp,AY,fY,yY,Uf,bY,IY,qc,SY,CY,Vc,vY,EY,Ff,wY,kY,$f,xY,PY,Gf,vxe;var Hf=h(()=>{rB();De();Ve();mY=Hc,iB=a.enum(mY),Sxe=a.enum(["pending","provisioning","active","error"]),jf=a.enum(["managed","connectionless"]),Cxe=a.object({name:a.string().describe("Field name used as the JSON key in metadata."),type:a.string().describe('Zod type name, e.g. "string", "boolean", "enum".'),required:a.boolean().describe("Whether the field is required."),sensitive:a.boolean().describe("Whether the field contains a secret and will be encrypted."),description:a.string().nullable().describe("Human-readable description of the field.")}),hY=a.object({id:a.string().describe("Log source provider identifier."),name:a.string().describe("Human-readable display name."),modes:a.array(jf).describe("Setup modes this provider supports. `managed` log sources take vendor credentials; `connectionless` log sources mint a keyed intake endpoint."),metadataFields:a.array(Cxe).describe("Fields required in the metadata object when creating a managed log source. Empty for connectionless-only providers."),setupSkill:a.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),sB=a.object({kind:a.enum(["url","hostPort"]).describe("Card shape. `url` = a complete keyed URL whose hostname authenticates; `hostPort` = a non-keyed listener host + port whose credential travels separately."),label:a.string().optional().describe("Card label. Present when a log source exposes several endpoints (e.g. separate logs and traces destinations)."),url:a.string().optional().describe("The complete keyed intake URL. Present when kind is `url`."),host:a.string().optional().describe("The regional listener hostname (no scheme). Present when kind is `hostPort`."),port:a.number().int().optional().describe("The listener port. Present when kind is `hostPort`."),description:a.string().optional().describe("Vendor-specific guidance rendered under the value."),extraCredential:a.object({label:a.string(),value:a.string(),description:a.string().optional()}).optional().describe("The credential the sender must attach when the hostname alone does not authenticate. Present when kind is `hostPort`.")}),Hs=a.object({id:a.string().uuid(),logSourceId:a.string().uuid().describe("Root log source ID. Every log stream roots on exactly one log source."),displayName:a.string().nullable().describe("Display name pulled automatically from information available through the log source connection (e.g. the vendor object's name). Null when no connection-derived name exists; connectionless log streams are always nameless."),config:a.record(a.string(),a.unknown()),status:Sxe,errorMessage:a.string().nullable(),enabled:a.boolean().describe("Whether the log stream is currently ingesting. Independent of provisioning status: a paused log stream stays configured but stops accepting new data."),createdAt:a.string().datetime(),endpointCards:a.array(sB).optional().describe("Server-computed endpoint card(s) for this log stream's delivery key — where to point the sender. Present only for log streams that carry their own intake key.")}),fp=a.object({id:a.string().uuid(),provider:iB,mode:jf,name:a.string().describe('Display name — a generated mnemonic (e.g. "amber-falcon"). Assigned at creation and immutable.'),streamCount:a.number().int(),createdAt:a.string().datetime()}),AY=fp.extend({streams:a.array(Hs).describe("The log source's live log streams, newest first.")}),fY=a.object({}),yY=a.object({providers:a.array(hY)}),Uf=E({operationId:"logSources.listProviders",description:"List all supported log source providers with their setup modes and metadata requirements.",backend:"api",route:{method:"GET",path:"/log-sources/providers",tags:["Log Sources"]},input:fY,output:yY,pagination:"none",async:"sync"}),bY=a.object({projectId:a.string().uuid().optional().describe("Project to list log sources for. Auto-filled from SDK context when omitted."),provider:iB.optional().describe("Filter log sources by provider.")}),IY=a.object({logSources:a.array(fp)}),qc=E({operationId:"logSources.list",description:"List log sources within one project.",backend:"api",route:{method:"GET",path:"/log-sources",tags:["Log Sources"]},input:bY,output:IY,pagination:"none",async:"sync"}),SY=a.object({projectId:a.string().uuid().optional().describe("Project to create the log source in. Auto-filled from SDK context when omitted."),provider:iB.describe("Log source provider identifier."),mode:jf.optional().describe("Setup mode. Defaults to `managed` when metadata is provided, otherwise `connectionless`. Must be a mode the provider supports (see `modes` on the provider catalog)."),metadata:a.record(a.string(),a.unknown()).optional().describe("Vendor credentials and configuration for managed setup. Fields vary by provider (see `metadataFields` on the provider catalog). Required for managed mode; must be omitted for connectionless mode.")}).strict(),CY=a.object({logSource:fp.describe("The created log source."),streamId:a.string().uuid().optional().describe("ID of the log stream created alongside the log source. Present for connectionless log sources (which always mint their keyed log stream) and for managed providers that auto-provision a default log stream."),publicKey:a.string().optional().describe("Intake key minted for the log source. Store this securely — it is only shown once. Present for connectionless log sources and for managed providers that ingest through a Sazabi endpoint."),endpointCards:a.array(sB).optional().describe("Server-computed endpoint card(s) for the minted key — where to point the sender. Present for connectionless log sources.")}),Vc=E({operationId:"logSources.create",description:"Create a log source. Managed mode takes vendor credentials in `metadata`, validates them, and provisions delivery behind the log source. Connectionless mode mints the log source plus a keyed log stream and returns the intake key and endpoint card(s) to point the sender at.",backend:"api",route:{method:"POST",path:"/log-sources",successStatus:201,tags:["Log Sources"]},input:SY,output:CY,pagination:"none",async:"sync"}),vY=a.object({logSourceId:a.string().uuid().describe("Log source ID to fetch.")}),EY=a.object({logSource:AY}),Ff=E({operationId:"logSources.get",description:"Get one log source by ID, including its log streams and their endpoint card(s).",backend:"api",route:{method:"GET",path:"/log-sources/{logSourceId}",tags:["Log Sources"]},input:vY,output:EY,pagination:"none",async:"sync"}),wY=a.object({logSourceId:a.string().uuid().describe("Log source ID to update."),enabled:a.boolean().optional().describe("Pause (`false`) or resume (`true`) ingestion for all of the log source's log streams. Reversible; never deletes anything.")}).strict(),kY=a.object({logSource:fp}),$f=E({operationId:"logSources.update",description:"Update a log source: pause or resume ingestion across its log streams. Log sources cannot be renamed — their generated names are immutable.",backend:"api",route:{method:"PATCH",path:"/log-sources/{logSourceId}",tags:["Log Sources"]},input:wY,output:kY,pagination:"none",async:"sync"}),xY=a.object({logSourceId:a.string().uuid().describe("Log source ID to delete.")}),PY=a.object({success:a.boolean(),teardownError:a.string().nullable().describe("Null when vendor-side cleanup succeeded or was not needed; error message when remote cleanup failed and must be finished manually.")}),Gf=E({operationId:"logSources.delete",description:"Delete a log source. Tombstones the log source and its log streams, deactivates their intake keys (already-ingested data is preserved with its attribution), and runs vendor-side cleanup for managed log sources when the provider supports it.",backend:"api",route:{method:"DELETE",path:"/log-sources/{logSourceId}",successStatus:200,tags:["Log Sources"]},input:xY,output:PY,pagination:"none",async:"sync"}),vxe={listProviders:Uf.contract,list:qc.contract,create:Vc.contract,get:Ff.contract,update:$f.contract,delete:Gf.contract}});var Exe,wxe,aB,kxe,xxe,cB,Pxe,Rxe,lB,Txe,Bxe,uB,Oxe,_xe,dB,Dxe,Qxe,pB,jSt;var RY=h(()=>{De();Ve();Hf();Exe=a.object({logSourceId:a.string().uuid().describe("Log source ID to list log streams for."),enabled:a.boolean().optional().describe("Optional filter on log stream ingestion state. Omit to list all log streams; pass true for only enabled log streams or false for only paused log streams.")}),wxe=a.object({streams:a.array(Hs)}),aB=E({operationId:"logStreams.list",description:"List the log streams that belong to a log source.",backend:"api",route:{method:"GET",path:"/log-streams",tags:["Log Streams"]},input:Exe,output:wxe,pagination:"none",async:"sync"}),kxe=a.object({logSourceId:a.string().uuid().describe("Log source ID to create the log stream under."),config:a.record(a.string(),a.unknown()).optional().describe("Platform-specific log stream configuration.")}).strict(),xxe=a.object({streamId:a.string().uuid().describe("ID of the created log stream.")}),cB=E({operationId:"logStreams.create",description:"Create a new log stream under a managed log source. Triggers async provisioning; poll the log stream to track it. Connectionless log sources are single-stream — create another log source instead.",backend:"api",route:{method:"POST",path:"/log-streams",successStatus:201,tags:["Log Streams"]},input:kxe,output:xxe,pagination:"none",async:"sync"}),Pxe=a.object({streamId:a.string().uuid().describe("Log stream ID to fetch.")}),Rxe=a.object({stream:Hs}),lB=E({operationId:"logStreams.get",description:"Get one log stream by ID. Use to poll provisioning status.",backend:"api",route:{method:"GET",path:"/log-streams/{streamId}",tags:["Log Streams"]},input:Pxe,output:Rxe,pagination:"none",async:"sync"}),Txe=a.object({streamId:a.string().uuid().describe("Log stream ID to update."),enabled:a.boolean().optional().describe("Pause (`false`) or resume (`true`) ingestion for this log stream. Reversible; never deletes anything.")}).strict(),Bxe=a.object({stream:Hs}),uB=E({operationId:"logStreams.update",description:"Update a log stream: pause or resume its ingestion. Log streams cannot be renamed.",backend:"api",route:{method:"PATCH",path:"/log-streams/{streamId}",tags:["Log Streams"]},input:Txe,output:Bxe,pagination:"none",async:"sync"}),Oxe=a.object({streamId:a.string().uuid().describe("Log stream ID to delete.")}),_xe=a.object({success:a.boolean()}),dB=E({operationId:"logStreams.delete",description:"Delete a log stream. Tombstones the log stream and deactivates its intake key. Deleting a connectionless log source's only log stream tombstones the log source too.",backend:"api",route:{method:"DELETE",path:"/log-streams/{streamId}",successStatus:200,tags:["Log Streams"]},input:Oxe,output:_xe,pagination:"none",async:"sync"}),Dxe=a.object({streamId:a.string().uuid().describe("Log stream ID to reassign."),targetLogSourceId:a.string().uuid().describe("Log source to move the log stream under. Must be a connectionless log source in the same project; the stream's key is rebound to this log source's intake adapter.")}).strict(),Qxe=a.object({stream:Hs}),pB=E({operationId:"logStreams.reassign",description:"Move a log stream to a different connectionless log source in the same project. Preserves the stream's ID, intake key credential, and ingested data; rebinds the key's intake adapter to the target log source's provider so future data is processed as that provider's format.",backend:"api",route:{method:"POST",path:"/log-streams/{streamId}/reassign",successStatus:200,tags:["Log Streams"]},input:Dxe,output:Qxe,pagination:"none",async:"sync"}),jSt={list:aB.contract,create:cB.contract,get:lB.contract,update:uB.contract,delete:dB.contract,reassign:pB.contract}});var TY,BY,OY,_Y,DY,QY,LY,qf,NY,MY,Lxe,zY,gB,jY,UY,FY,$Y,GY,HY,qY,VY,Nxe,KY,YY,Kc,Yc,Wc,Jc,Zc,Mxe;var mB=h(()=>{De();Ve();TY=a.enum(["eq","neq","in","contains","starts_with","gt","gte","lt","lte","between","exists"]).describe("Filter operator: 'eq' (equals), 'neq' (not equals), 'in' (in array), 'contains' (substring), 'starts_with' (prefix), 'gt' (greater than), 'gte' (greater than or equal), 'lt' (less than), 'lte' (less than or equal), 'between' (range), 'exists' (field exists)"),BY=a.enum(["any","all","phrase"]).describe("Search mode: 'any' (match any token), 'all' (match all tokens), 'phrase' (exact phrase match)"),OY=a.object({query:a.string().min(1,"Search query must be at least 1 character").max(500,"Search query must be at most 500 characters").describe("Search query text (1-500 characters)"),fields:a.array(a.string()).optional().describe("Fields to search in (defaults to backend allowlist)"),mode:BY.optional().default("all").describe("Token matching mode")}),_Y=a.object({field:a.string().describe("Field name to filter on"),op:TY.describe("Filter operator"),value:a.union([a.string(),a.number(),a.boolean(),a.array(a.union([a.string(),a.number()])),a.object({from:a.string(),to:a.string()})]).describe("Filter value (type depends on operator)")}).superRefine((e,t)=>{if(e.op==="in"&&!Array.isArray(e.value))t.addIssue({code:a.ZodIssueCode.custom,message:"Value must be an array when op is 'in'",path:["value"]});if(e.op==="between"){let n=e.value;if(!(typeof n==="object"&&n!==null&&("from"in n)&&("to"in n)))t.addIssue({code:a.ZodIssueCode.custom,message:"Value must be an object with from/to when op is 'between'",path:["value"]})}if(e.op==="exists"&&typeof e.value!=="boolean")t.addIssue({code:a.ZodIssueCode.custom,message:"Value must be boolean when op is 'exists'",path:["value"]})}),DY=a.object({field:a.string().describe("Field name to sort by"),direction:a.enum(["asc","desc"]).default("desc").describe("Sort direction: 'asc' for ascending, 'desc' for descending")}),QY=a.object({limit:a.number().int().min(1,"Limit must be at least 1").max(1000,"Limit must be at most 1000").default(50).describe("Maximum number of rows to return"),cursor:a.string().optional().describe("Opaque cursor from previous response for pagination")}),LY=a.object({projectId:a.string().uuid().optional().describe("Project to query logs for. Auto-filled from CLI and SDK context when omitted."),search:OY.optional().describe("Full-text search configuration"),filters:a.array(_Y).optional().describe("Structured filter clauses (ANDed together). When no `timestamp` filter is provided, queries default to a 24h look-back window; pass an explicit `timestamp` filter to query a different range."),select:a.array(a.string()).optional().describe("Fields to return (defaults to backend default set)"),sort:DY.optional().describe("Sort configuration (defaults to timestamp desc)"),pagination:QY.optional().describe("Pagination configuration")}),qf=a.enum(["clickhouse","better-stack","datadog","gcp","axiom","cloudwatch","sentry","posthog","mezmo"]),NY=a.enum(["native","external"]),MY=a.object({projectId:a.string().uuid().optional().describe("Project to inspect. Auto-filled from CLI and SDK context when omitted."),question:a.string().trim().min(1).max(2000).optional().describe("Optional natural-language question used to retrieve coherent schema bundles."),topK:a.number().int().min(1).max(32).optional().describe("Max schema bundles to return when question is set (default 8)")}),Lxe=a.object({id:a.string().describe("Stable schema-bundle document id"),service:a.string().describe("Emitting service for this co-occurrence shape"),keys:a.array(a.string()).describe("Co-occurring otel_log_attributes keys in this bundle"),rowCount:a.number().nonnegative().describe("Observed row count when the bundle was compiled"),score:a.number().optional().describe("Retrieval rank score when returned from vector search")}),zY=a.object({backend:a.object({id:qf,name:a.string(),kind:NY}).describe("Active log backend for the project"),features:a.array(a.string()).describe("Backend features registered on the server"),commands:a.array(a.enum(["schema","query","volume","patterns","nativeQuery"])).describe("CLI/API commands available for this backend"),queryableFields:a.array(a.string()).describe("Fields accepted by the normalized logs.query contract"),searchableFields:a.array(a.string()).describe("Fields accepted by logs.query full-text search"),question:a.string().optional().describe("Echo of the question used for retrieval when provided"),selectedBundles:a.array(Lxe).describe("Question-conditioned coherent schema bundles (empty when question omitted)"),selectedAttributeKeys:a.array(a.string()).describe("Flattened attribute keys from selectedBundles, or recent keys when question omitted"),observedServiceNames:a.array(a.string()).describe("Recently observed service names for this project"),observedAttributeKeys:a.array(a.string()).describe("Observed / selected attribute keys for agent and CLI schema discovery"),indexStatus:a.enum(["ready","empty","unavailable","skipped"]).describe("ready: bundles retrieved; empty: index missing/empty; unavailable: retrieval failed; skipped: no question (legacy path)"),schemaContext:a.record(a.string(),a.any()).optional().describe("Backend-specific schema guidance and examples")}),gB=a.enum(["1m","5m","15m","1h"]),jY=a.enum(["service_name","severity_text","environment"]),UY=a.object({projectId:a.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),startDate:a.string().datetime({offset:!0}),endDate:a.string().datetime({offset:!0}),interval:gB.optional().describe("Aggregation bucket size for the volume series"),groupBy:jY.optional().describe("Optional field to split volume series by"),filters:a.object({service_name:a.string().optional(),severity_text:a.string().optional(),environment:a.string().optional()}).optional()}).refine((e)=>new Date(e.startDate)<new Date(e.endDate),{message:"startDate must be before endDate",path:["endDate"]}),FY=a.object({total:a.number().nonnegative(),startDate:a.string().datetime({offset:!0}),endDate:a.string().datetime({offset:!0}),interval:gB,series:a.array(a.object({group:a.string(),total:a.number().nonnegative(),points:a.array(a.object({bucket:a.string(),count:a.number().nonnegative()}))}))}),$Y=a.object({projectId:a.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),query:a.string().min(1).max(500).optional().describe("Optional text to match against normalized log patterns"),severity:a.string().optional().describe("Optional severity_text value, for example ERROR"),startDate:a.string().datetime({offset:!0}).optional().describe("Optional earliest last-seen timestamp"),endDate:a.string().datetime({offset:!0}).optional().describe("Optional latest last-seen timestamp"),limit:a.number().int().min(1).max(100).default(25).describe("Maximum number of log patterns to return")}).refine((e)=>!e.startDate||!e.endDate||new Date(e.startDate)<new Date(e.endDate),{message:"startDate must be before endDate",path:["endDate"]}),GY=a.object({serviceName:a.string().nullable(),fingerprint:a.string(),pattern:a.string(),severity:a.string().nullable(),occurrences:a.number().nonnegative(),firstSeen:a.string().nullable(),lastSeen:a.string().nullable(),representativeId:a.string().nullable()}),HY=a.object({patterns:a.array(GY),meta:a.object({backendId:qf,count:a.number().int().nonnegative(),took:a.number().nonnegative()})}),qY=a.object({projectId:a.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),query:a.string().min(1,"Query cannot be empty").max(1e4,"Query must be 10000 characters or less")}),VY=a.object({result:a.string().describe("Backend-formatted query result"),format:a.literal("text"),meta:a.object({backendId:qf,took:a.number().nonnegative(),truncated:a.boolean()})}),Nxe=a.object({cursor:a.string().nullable().describe("Cursor for next page (null if no more results)"),hasMore:a.boolean().describe("Whether more results are available")}),KY=a.object({count:a.number().int().nonnegative().describe("Number of log rows returned in this response"),took:a.number().nonnegative().describe("Query execution time in milliseconds")}),YY=a.object({data:a.array(a.record(a.string(),a.any())).describe("Array of log rows with selected fields"),nextCursor:a.string().nullable().describe("Pass as 'cursor' in the next query to fetch the next page. Null when there are no more results."),meta:KY.describe("Query execution metadata")}),Kc=E({operationId:"logs.query",description:"Query logs within one project.",backend:"api",route:{method:"POST",path:"/logs/query",tags:["Logs"]},input:LY,output:YY,pagination:"cursor",async:"sync"}),Yc=E({operationId:"logs.schema",description:"Describe the active log backend, supported commands, query fields, and schema context.",backend:"api",route:{method:"POST",path:"/logs/schema",tags:["Logs"]},input:MY,output:zY,pagination:"none",async:"sync"}),Wc=E({operationId:"logs.volume",description:"Query pre-aggregated log volume for one project.",backend:"api",route:{method:"POST",path:"/logs/volume",tags:["Logs"]},input:UY,output:FY,pagination:"none",async:"sync"}),Jc=E({operationId:"logs.patterns",description:"Query normalized log patterns for discovery workflows.",backend:"api",route:{method:"POST",path:"/logs/patterns",tags:["Logs"]},input:$Y,output:HY,pagination:"none",async:"sync"}),Zc=E({operationId:"logs.nativeQuery",description:"Run a read-only query in the log store's native query language, with server-side guardrails.",backend:"api",route:{method:"POST",path:"/logs/native-query",tags:["Logs"]},input:qY,output:VY,pagination:"none",async:"sync"}),Mxe={query:Kc.contract,schema:Yc.contract,volume:Wc.contract,patterns:Jc.contract,nativeQuery:Zc.contract}});var WY=h(()=>{JA()});var hB=h(()=>{WY()});var ZY=()=>{};var AB,fB,Vf,zxe,jxe,Xc,Kf,XY,eW,yB,tW,nW,Uxe,oW,bB,Fxe,$xe,Gxe,Hxe,qxe,Vxe,Kxe,Yxe,Wxe,Jxe,Zxe,Xxe,ePe,IB,rW,iW,tPe,SB;var Yf=h(()=>{De();AB=["streamable-http","sse"],fB=["none","headers","oauth","aws-sigv4"],Vf=["none","client_secret_basic","client_secret_post"],zxe=["preset","custom"],jxe=["configured","authorizing","connected","error"],Xc=["enabled","disabled","custom-only"],Kf=["enabled","write_blocked","disabled"],XY=a.enum(AB),eW=a.enum(fB),yB=a.enum(Vf),tW=a.enum(zxe),nW=a.enum(jxe),Uxe=a.enum(Xc),oW=a.enum(Kf),bB=a.object({id:a.string().min(1),name:a.string().min(1),value:a.string().min(1)}),Fxe=a.object({id:a.string().min(1),name:a.string().min(1),maskedValue:a.string().min(1)}),$xe=a.object({authMode:a.literal("none")}),Gxe=a.object({tokenUrl:a.string().url(),clientId:a.string().min(1),clientSecret:a.string().min(1).optional(),tokenEndpointAuthMethod:yB.optional(),refreshToken:a.string().min(1),headerName:a.string().min(1).default("Authorization"),headerValuePrefix:a.string().default("Bearer "),expiresAt:a.string().datetime().optional()}),Hxe=a.object({authMode:a.literal("headers"),headers:a.array(bB),refreshCredentials:Gxe.optional()}),qxe=a.object({authMode:a.literal("aws-sigv4"),accessKeyId:a.string().min(1),secretAccessKey:a.string().min(1),sessionToken:a.string().min(1).optional(),region:a.string().min(1),service:a.string().min(1).default("aws-mcp")}),Vxe=a.preprocess((e)=>{if(typeof e!=="string")return;let t=e.trim();return t.length>0?t:void 0},a.string().min(1).optional()).optional(),Kxe=a.object({accessToken:a.string().min(1),refreshToken:a.string().min(1).optional(),tokenType:a.string().min(1).optional(),scope:Vxe,expiresAt:a.string().datetime().optional()}).transform(({scope:e,...t})=>e===void 0?t:{...t,scope:e}),Yxe=a.object({authMode:a.literal("oauth"),providerId:a.string().min(1),tokens:Kxe,headers:a.array(bB).optional()}),Wxe=a.discriminatedUnion("authMode",[$xe,Hxe,Yxe,qxe]),Jxe=a.string().min(1).regex(/^enc:v1:/,"Encrypted auth config must use enc:v1 format."),Zxe=a.object({codeVerifier:a.string().min(1),clientId:a.string().min(1),clientSecret:a.string().min(1).optional(),tokenEndpointAuthMethod:yB.optional(),tokenUrl:a.string().url().optional(),resourceUrl:a.string().url().optional(),projectId:a.string().uuid().optional(),returnTo:a.string().min(1).max(2000).optional(),messageId:a.string().min(1).max(240).optional(),scopes:a.array(a.string().min(1)).optional()}),Xxe=a.object({type:a.string().optional(),properties:a.record(a.string(),a.unknown()).optional(),required:a.array(a.string()).optional(),additionalProperties:a.boolean().optional()}).catchall(a.unknown()),ePe=a.object({supportsOAuth:a.boolean().default(!1),supportsCustomHeaders:a.boolean().default(!0),supportsToolDiscovery:a.boolean().default(!0),readOnlyToolNames:a.array(a.string()).default([])}),IB=a.object({name:a.string().min(1),title:a.string().min(1),description:a.string().min(1),inputSchema:Xxe,annotations:a.record(a.string(),a.unknown()).default({}),availability:oW,isReadOnly:a.boolean()}),rW=a.object({discoveredAt:a.string().datetime(),tools:a.array(IB)}),iW=a.object({mode:a.enum(["user","system"]),managedBy:a.object({type:a.literal("integration"),id:a.string().min(1),displayName:a.string().min(1),iconKey:a.string().min(1)}).nullable(),capabilities:a.object({canRename:a.boolean(),canEditCredentials:a.boolean(),canSetReadOnly:a.boolean(),canConfigureTools:a.boolean(),canDisconnect:a.boolean()})}),tPe=a.object({id:a.string().uuid(),organizationId:a.string().min(1),projectId:a.string().uuid(),providerId:a.string().min(1),source:tW,displayName:a.string().min(1),connectionKey:a.string().min(1),serverUrl:a.string().url(),transport:XY,authMode:eW,installStatus:nW,installedByUserId:a.string().nullable(),connectedAt:a.string().datetime().nullable(),toolSnapshot:rW.nullable(),enabledToolNames:a.array(a.string()),readOnly:a.boolean().default(!1),version:a.number().int().nonnegative(),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),deletedAt:a.string().datetime().nullable()}),SB=iW});var vB=x(function(ZSt,Zf){var sW,aW,cW,lW,uW,dW,pW,gW,mW,hW,AW,fW,yW,Wf,CB,bW,IW,SW,el,CW,vW,EW,wW,kW,xW,PW,RW,TW,Jf,BW,OW,_W;(function(e){var t=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(r){e(n(t,n(r)))});else if(typeof Zf==="object"&&typeof ZSt==="object")e(n(t,n(ZSt)));else e(n(t));function n(r,o){if(r!==t)if(typeof Object.create==="function")Object.defineProperty(r,"__esModule",{value:!0});else r.__esModule=!0;return function(i,s){return r[i]=o?o(i,s):s}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var c in s)if(Object.prototype.hasOwnProperty.call(s,c))i[c]=s[c]};sW=function(i,s){if(typeof s!=="function"&&s!==null)throw TypeError("Class extends value "+String(s)+" is not a constructor or null");t(i,s);function c(){this.constructor=i}i.prototype=s===null?Object.create(s):(c.prototype=s.prototype,new c)},aW=Object.assign||function(i){for(var s,c=1,l=arguments.length;c<l;c++){s=arguments[c];for(var u in s)if(Object.prototype.hasOwnProperty.call(s,u))i[u]=s[u]}return i},cW=function(i,s){var c={};for(var l in i)if(Object.prototype.hasOwnProperty.call(i,l)&&s.indexOf(l)<0)c[l]=i[l];if(i!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var u=0,l=Object.getOwnPropertySymbols(i);u<l.length;u++)if(s.indexOf(l[u])<0&&Object.prototype.propertyIsEnumerable.call(i,l[u]))c[l[u]]=i[l[u]]}return c},lW=function(i,s,c,l){var u=arguments.length,d=u<3?s:l===null?l=Object.getOwnPropertyDescriptor(s,c):l,p;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")d=Reflect.decorate(i,s,c,l);else for(var g=i.length-1;g>=0;g--)if(p=i[g])d=(u<3?p(d):u>3?p(s,c,d):p(s,c))||d;return u>3&&d&&Object.defineProperty(s,c,d),d},uW=function(i,s){return function(c,l){s(c,l,i)}},dW=function(i,s,c,l,u,d){function p(le){if(le!==void 0&&typeof le!=="function")throw TypeError("Function expected");return le}var g=l.kind,m=g==="getter"?"get":g==="setter"?"set":"value",A=!s&&i?l.static?i:i.prototype:null,f=s||(A?Object.getOwnPropertyDescriptor(A,l.name):{}),S,v=!1;for(var P=c.length-1;P>=0;P--){var O={};for(var K in l)O[K]=K==="access"?{}:l[K];for(var K in l.access)O.access[K]=l.access[K];O.addInitializer=function(le){if(v)throw TypeError("Cannot add initializers after decoration has completed");d.push(p(le||null))};var M=(0,c[P])(g==="accessor"?{get:f.get,set:f.set}:f[m],O);if(g==="accessor"){if(M===void 0)continue;if(M===null||typeof M!=="object")throw TypeError("Object expected");if(S=p(M.get))f.get=S;if(S=p(M.set))f.set=S;if(S=p(M.init))u.unshift(S)}else if(S=p(M))if(g==="field")u.unshift(S);else f[m]=S}if(A)Object.defineProperty(A,l.name,f);v=!0},pW=function(i,s,c){var l=arguments.length>2;for(var u=0;u<s.length;u++)c=l?s[u].call(i,c):s[u].call(i);return l?c:void 0},gW=function(i){return typeof i==="symbol"?i:"".concat(i)},mW=function(i,s,c){if(typeof s==="symbol")s=s.description?"[".concat(s.description,"]"):"";return Object.defineProperty(i,"name",{configurable:!0,value:c?"".concat(c," ",s):s})},hW=function(i,s){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(i,s)},AW=function(i,s,c,l){function u(d){return d instanceof c?d:new c(function(p){p(d)})}return new(c||(c=Promise))(function(d,p){function g(f){try{A(l.next(f))}catch(S){p(S)}}function m(f){try{A(l.throw(f))}catch(S){p(S)}}function A(f){f.done?d(f.value):u(f.value).then(g,m)}A((l=l.apply(i,s||[])).next())})},fW=function(i,s){var c={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},l,u,d,p=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return p.next=g(0),p.throw=g(1),p.return=g(2),typeof Symbol==="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(A){return function(f){return m([A,f])}}function m(A){if(l)throw TypeError("Generator is already executing.");while(p&&(p=0,A[0]&&(c=0)),c)try{if(l=1,u&&(d=A[0]&2?u.return:A[0]?u.throw||((d=u.return)&&d.call(u),0):u.next)&&!(d=d.call(u,A[1])).done)return d;if(u=0,d)A=[A[0]&2,d.value];switch(A[0]){case 0:case 1:d=A;break;case 4:return c.label++,{value:A[1],done:!1};case 5:c.label++,u=A[1],A=[0];continue;case 7:A=c.ops.pop(),c.trys.pop();continue;default:if((d=c.trys,!(d=d.length>0&&d[d.length-1]))&&(A[0]===6||A[0]===2)){c=0;continue}if(A[0]===3&&(!d||A[1]>d[0]&&A[1]<d[3])){c.label=A[1];break}if(A[0]===6&&c.label<d[1]){c.label=d[1],d=A;break}if(d&&c.label<d[2]){c.label=d[2],c.ops.push(A);break}if(d[2])c.ops.pop();c.trys.pop();continue}A=s.call(i,c)}catch(f){A=[6,f],u=0}finally{l=d=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}},yW=function(i,s){for(var c in i)if(c!=="default"&&!Object.prototype.hasOwnProperty.call(s,c))Jf(s,i,c)},Jf=Object.create?function(i,s,c,l){if(l===void 0)l=c;var u=Object.getOwnPropertyDescriptor(s,c);if(!u||("get"in u?!s.__esModule:u.writable||u.configurable))u={enumerable:!0,get:function(){return s[c]}};Object.defineProperty(i,l,u)}:function(i,s,c,l){if(l===void 0)l=c;i[l]=s[c]},Wf=function(i){var s=typeof Symbol==="function"&&Symbol.iterator,c=s&&i[s],l=0;if(c)return c.call(i);if(i&&typeof i.length==="number")return{next:function(){if(i&&l>=i.length)i=void 0;return{value:i&&i[l++],done:!i}}};throw TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},CB=function(i,s){var c=typeof Symbol==="function"&&i[Symbol.iterator];if(!c)return i;var l=c.call(i),u,d=[],p;try{while((s===void 0||s-- >0)&&!(u=l.next()).done)d.push(u.value)}catch(g){p={error:g}}finally{try{if(u&&!u.done&&(c=l.return))c.call(l)}finally{if(p)throw p.error}}return d},bW=function(){for(var i=[],s=0;s<arguments.length;s++)i=i.concat(CB(arguments[s]));return i},IW=function(){for(var i=0,s=0,c=arguments.length;s<c;s++)i+=arguments[s].length;for(var l=Array(i),u=0,s=0;s<c;s++)for(var d=arguments[s],p=0,g=d.length;p<g;p++,u++)l[u]=d[p];return l},SW=function(i,s,c){if(c||arguments.length===2){for(var l=0,u=s.length,d;l<u;l++)if(d||!(l in s)){if(!d)d=Array.prototype.slice.call(s,0,l);d[l]=s[l]}}return i.concat(d||Array.prototype.slice.call(s))},el=function(i){return this instanceof el?(this.v=i,this):new el(i)},CW=function(i,s,c){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var l=c.apply(i,s||[]),u,d=[];return u=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),g("next"),g("throw"),g("return",p),u[Symbol.asyncIterator]=function(){return this},u;function p(P){return function(O){return Promise.resolve(O).then(P,S)}}function g(P,O){if(l[P]){if(u[P]=function(K){return new Promise(function(M,le){d.push([P,K,M,le])>1||m(P,K)})},O)u[P]=O(u[P])}}function m(P,O){try{A(l[P](O))}catch(K){v(d[0][3],K)}}function A(P){P.value instanceof el?Promise.resolve(P.value.v).then(f,S):v(d[0][2],P)}function f(P){m("next",P)}function S(P){m("throw",P)}function v(P,O){if(P(O),d.shift(),d.length)m(d[0][0],d[0][1])}},vW=function(i){var s,c;return s={},l("next"),l("throw",function(u){throw u}),l("return"),s[Symbol.iterator]=function(){return this},s;function l(u,d){s[u]=i[u]?function(p){return(c=!c)?{value:el(i[u](p)),done:!1}:d?d(p):p}:d}},EW=function(i){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var s=i[Symbol.asyncIterator],c;return s?s.call(i):(i=typeof Wf==="function"?Wf(i):i[Symbol.iterator](),c={},l("next"),l("throw"),l("return"),c[Symbol.asyncIterator]=function(){return this},c);function l(d){c[d]=i[d]&&function(p){return new Promise(function(g,m){p=i[d](p),u(g,m,p.done,p.value)})}}function u(d,p,g,m){Promise.resolve(m).then(function(A){d({value:A,done:g})},p)}},wW=function(i,s){if(Object.defineProperty)Object.defineProperty(i,"raw",{value:s});else i.raw=s;return i};var n=Object.create?function(i,s){Object.defineProperty(i,"default",{enumerable:!0,value:s})}:function(i,s){i.default=s},r=function(i){return r=Object.getOwnPropertyNames||function(s){var c=[];for(var l in s)if(Object.prototype.hasOwnProperty.call(s,l))c[c.length]=l;return c},r(i)};kW=function(i){if(i&&i.__esModule)return i;var s={};if(i!=null){for(var c=r(i),l=0;l<c.length;l++)if(c[l]!=="default")Jf(s,i,c[l])}return n(s,i),s},xW=function(i){return i&&i.__esModule?i:{default:i}},PW=function(i,s,c,l){if(c==="a"&&!l)throw TypeError("Private accessor was defined without a getter");if(typeof s==="function"?i!==s||!l:!s.has(i))throw TypeError("Cannot read private member from an object whose class did not declare it");return c==="m"?l:c==="a"?l.call(i):l?l.value:s.get(i)},RW=function(i,s,c,l,u){if(l==="m")throw TypeError("Private method is not writable");if(l==="a"&&!u)throw TypeError("Private accessor was defined without a setter");if(typeof s==="function"?i!==s||!u:!s.has(i))throw TypeError("Cannot write private member to an object whose class did not declare it");return l==="a"?u.call(i,c):u?u.value=c:s.set(i,c),c},TW=function(i,s){if(s===null||typeof s!=="object"&&typeof s!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof i==="function"?s===i:i.has(s)},BW=function(i,s,c){if(s!==null&&s!==void 0){if(typeof s!=="object"&&typeof s!=="function")throw TypeError("Object expected.");var l,u;if(c){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");l=s[Symbol.asyncDispose]}if(l===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(l=s[Symbol.dispose],c)u=l}if(typeof l!=="function")throw TypeError("Object not disposable.");if(u)l=function(){try{u.call(this)}catch(d){return Promise.reject(d)}};i.stack.push({value:s,dispose:l,async:c})}else if(c)i.stack.push({async:!0});return s};var o=typeof SuppressedError==="function"?SuppressedError:function(i,s,c){var l=Error(c);return l.name="SuppressedError",l.error=i,l.suppressed=s,l};OW=function(i){function s(d){i.error=i.hasError?new o(d,i.error,"An error was suppressed during disposal."):d,i.hasError=!0}var c,l=0;function u(){while(c=i.stack.pop())try{if(!c.async&&l===1)return l=0,i.stack.push(c),Promise.resolve().then(u);if(c.dispose){var d=c.dispose.call(c.value);if(c.async)return l|=2,Promise.resolve(d).then(u,function(p){return s(p),u()})}else l|=1}catch(p){s(p)}if(l===1)return i.hasError?Promise.reject(i.error):Promise.resolve();if(i.hasError)throw i.error}return u()},_W=function(i,s){if(typeof i==="string"&&/^\.\.?\//.test(i))return i.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(c,l,u,d,p){return l?s?".jsx":".js":u&&(!d||!p)?c:u+d+"."+p.toLowerCase()+"js"});return i},e("__extends",sW),e("__assign",aW),e("__rest",cW),e("__decorate",lW),e("__param",uW),e("__esDecorate",dW),e("__runInitializers",pW),e("__propKey",gW),e("__setFunctionName",mW),e("__metadata",hW),e("__awaiter",AW),e("__generator",fW),e("__exportStar",yW),e("__createBinding",Jf),e("__values",Wf),e("__read",CB),e("__spread",bW),e("__spreadArrays",IW),e("__spreadArray",SW),e("__await",el),e("__asyncGenerator",CW),e("__asyncDelegator",vW),e("__asyncValues",EW),e("__makeTemplateObject",wW),e("__importStar",kW),e("__importDefault",xW),e("__classPrivateFieldGet",PW),e("__classPrivateFieldSet",RW),e("__classPrivateFieldIn",TW),e("__addDisposableResource",BW),e("__disposeResources",OW),e("__rewriteRelativeImportExtension",_W)})});var EB=x(function(DW){Object.defineProperty(DW,"__esModule",{value:!0});DW.MAX_HASHABLE_LENGTH=DW.INIT=DW.KEY=DW.DIGEST_LENGTH=DW.BLOCK_SIZE=void 0;DW.BLOCK_SIZE=64;DW.DIGEST_LENGTH=32;DW.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);DW.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];DW.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1});var MW=x(function(LW){Object.defineProperty(LW,"__esModule",{value:!0});LW.RawSha256=void 0;var vo=EB(),sPe=function(){function e(){this.state=Int32Array.from(vo.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw Error("Attempted to update an already finished hash.");var n=0,r=t.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>vo.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");while(r>0)if(this.buffer[this.bufferLength++]=t[n++],r--,this.bufferLength===vo.BLOCK_SIZE)this.hashBuffer(),this.bufferLength=0},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%vo.BLOCK_SIZE>=vo.BLOCK_SIZE-8){for(var o=this.bufferLength;o<vo.BLOCK_SIZE;o++)n.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(var o=this.bufferLength;o<vo.BLOCK_SIZE-8;o++)n.setUint8(o,0);n.setUint32(vo.BLOCK_SIZE-8,Math.floor(t/4294967296),!0),n.setUint32(vo.BLOCK_SIZE-4,t),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(vo.DIGEST_LENGTH);for(var o=0;o<8;o++)i[o*4]=this.state[o]>>>24&255,i[o*4+1]=this.state[o]>>>16&255,i[o*4+2]=this.state[o]>>>8&255,i[o*4+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){var t=this,n=t.buffer,r=t.state,o=r[0],i=r[1],s=r[2],c=r[3],l=r[4],u=r[5],d=r[6],p=r[7];for(var g=0;g<vo.BLOCK_SIZE;g++){if(g<16)this.temp[g]=(n[g*4]&255)<<24|(n[g*4+1]&255)<<16|(n[g*4+2]&255)<<8|n[g*4+3]&255;else{var m=this.temp[g-2],A=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10;m=this.temp[g-15];var f=(m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3;this.temp[g]=(A+this.temp[g-7]|0)+(f+this.temp[g-16]|0)}var S=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&u^~l&d)|0)+(p+(vo.KEY[g]+this.temp[g]|0)|0)|0,v=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&i^o&s^i&s)|0;p=d,d=u,u=l,l=c+S|0,c=s,s=i,i=o,o=S+v|0}r[0]+=o,r[1]+=i,r[2]+=s,r[3]+=c,r[4]+=l,r[5]+=u,r[6]+=d,r[7]+=p},e}();LW.RawSha256=sPe});var UW=x(function(tCt,jW){var{defineProperty:Xf,getOwnPropertyDescriptor:aPe,getOwnPropertyNames:cPe}=Object,lPe=Object.prototype.hasOwnProperty,uPe=(e,t)=>Xf(e,"name",{value:t,configurable:!0}),dPe=(e,t)=>{for(var n in t)Xf(e,n,{get:t[n],enumerable:!0})},pPe=(e,t,n,r)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of cPe(t))if(!lPe.call(e,o)&&o!==n)Xf(e,o,{get:()=>t[o],enumerable:!(r=aPe(t,o))||r.enumerable})}return e},gPe=(e)=>pPe(Xf({},"__esModule",{value:!0}),e),zW={};dPe(zW,{isArrayBuffer:()=>mPe});jW.exports=gPe(zW);var mPe=uPe((e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]","isArrayBuffer")});var HW=x(function(nCt,GW){var{defineProperty:ey,getOwnPropertyDescriptor:hPe,getOwnPropertyNames:APe}=Object,fPe=Object.prototype.hasOwnProperty,FW=(e,t)=>ey(e,"name",{value:t,configurable:!0}),yPe=(e,t)=>{for(var n in t)ey(e,n,{get:t[n],enumerable:!0})},bPe=(e,t,n,r)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of APe(t))if(!fPe.call(e,o)&&o!==n)ey(e,o,{get:()=>t[o],enumerable:!(r=hPe(t,o))||r.enumerable})}return e},IPe=(e)=>bPe(ey({},"__esModule",{value:!0}),e),$W={};yPe($W,{fromArrayBuffer:()=>CPe,fromString:()=>vPe});GW.exports=IPe($W);var SPe=UW(),wB=F("buffer"),CPe=FW((e,t=0,n=e.byteLength-t)=>{if(!(0,SPe.isArrayBuffer)(e))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return wB.Buffer.from(e,t,n)},"fromArrayBuffer"),vPe=FW((e,t)=>{if(typeof e!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?wB.Buffer.from(e,t):wB.Buffer.from(e)},"fromString")});var WW=x(function(oCt,YW){var{defineProperty:ty,getOwnPropertyDescriptor:EPe,getOwnPropertyNames:wPe}=Object,kPe=Object.prototype.hasOwnProperty,kB=(e,t)=>ty(e,"name",{value:t,configurable:!0}),xPe=(e,t)=>{for(var n in t)ty(e,n,{get:t[n],enumerable:!0})},PPe=(e,t,n,r)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of wPe(t))if(!kPe.call(e,o)&&o!==n)ty(e,o,{get:()=>t[o],enumerable:!(r=EPe(t,o))||r.enumerable})}return e},RPe=(e)=>PPe(ty({},"__esModule",{value:!0}),e),qW={};xPe(qW,{fromUtf8:()=>KW,toUint8Array:()=>TPe,toUtf8:()=>BPe});YW.exports=RPe(qW);var VW=HW(),KW=kB((e)=>{let t=(0,VW.fromString)(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),TPe=kB((e)=>{if(typeof e==="string")return KW(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)},"toUint8Array"),BPe=kB((e)=>{if(typeof e==="string")return e;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return(0,VW.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength).toString("utf8")},"toUtf8")});var XW=x(function(JW){Object.defineProperty(JW,"__esModule",{value:!0});JW.convertToBuffer=void 0;var OPe=WW(),_Pe=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:OPe.fromUtf8;function DPe(e){if(e instanceof Uint8Array)return e;if(typeof e==="string")return _Pe(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)}JW.convertToBuffer=DPe});var nJ=x(function(eJ){Object.defineProperty(eJ,"__esModule",{value:!0});eJ.isEmptyData=void 0;function QPe(e){if(typeof e==="string")return e.length===0;return e.byteLength===0}eJ.isEmptyData=QPe});var iJ=x(function(oJ){Object.defineProperty(oJ,"__esModule",{value:!0});oJ.numToUint8=void 0;function LPe(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}oJ.numToUint8=LPe});var cJ=x(function(sJ){Object.defineProperty(sJ,"__esModule",{value:!0});sJ.uint32ArrayFrom=void 0;function NPe(e){if(!Uint32Array.from){var t=new Uint32Array(e.length),n=0;while(n<e.length)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}sJ.uint32ArrayFrom=NPe});var lJ=x(function(tl){Object.defineProperty(tl,"__esModule",{value:!0});tl.uint32ArrayFrom=tl.numToUint8=tl.isEmptyData=tl.convertToBuffer=void 0;var MPe=XW();Object.defineProperty(tl,"convertToBuffer",{enumerable:!0,get:function(){return MPe.convertToBuffer}});var zPe=nJ();Object.defineProperty(tl,"isEmptyData",{enumerable:!0,get:function(){return zPe.isEmptyData}});var jPe=iJ();Object.defineProperty(tl,"numToUint8",{enumerable:!0,get:function(){return jPe.numToUint8}});var UPe=cJ();Object.defineProperty(tl,"uint32ArrayFrom",{enumerable:!0,get:function(){return UPe.uint32ArrayFrom}})});var gJ=x(function(dJ){Object.defineProperty(dJ,"__esModule",{value:!0});dJ.Sha256=void 0;var uJ=vB(),oy=EB(),ny=MW(),xB=lJ(),$Pe=function(){function e(t){this.secret=t,this.hash=new ny.RawSha256,this.reset()}return e.prototype.update=function(t){if((0,xB.isEmptyData)(t)||this.error)return;try{this.hash.update((0,xB.convertToBuffer)(t))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;if(this.outer){if(!this.outer.finished)this.outer.update(this.hash.digest());return this.outer.digest()}return this.hash.digest()},e.prototype.digest=function(){return uJ.__awaiter(this,void 0,void 0,function(){return uJ.__generator(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new ny.RawSha256,this.secret){this.outer=new ny.RawSha256;var t=GPe(this.secret),n=new Uint8Array(oy.BLOCK_SIZE);n.set(t);for(var r=0;r<oy.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(var r=0;r<t.byteLength;r++)t[r]=0}},e}();dJ.Sha256=$Pe;function GPe(e){var t=(0,xB.convertToBuffer)(e);if(t.byteLength>oy.BLOCK_SIZE){var n=new ny.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(oy.BLOCK_SIZE);return r.set(t),r}});var mJ=x(function(PB){Object.defineProperty(PB,"__esModule",{value:!0});var HPe=vB();HPe.__exportStar(gJ(),PB)});var ry=()=>{};var hJ="io.modelcontextprotocol/related-task",sy="2.0",Ut,AJ,fJ,hCt,qPe,VPe,RB,so,ay,nn,Eo,wo,on,cy,KPe,YPe,yJ,yp,bJ,IJ,ACt,TB,WPe,BB,JPe,bp,nl,SJ,ZPe,XPe,eRe,tRe,nRe,oRe,rRe,iRe,CJ,sRe,OB,aRe,cRe,_B,lRe,Ip,Sp,uRe,Cp,ly,dRe,DB,QB,LB,NB,fCt,MB,zB,jB,pRe,vJ,EJ,UB,wJ,vp,ol,kJ,gRe,mRe,xJ,hRe,PJ,FB,ARe,fRe,RJ,TJ,yRe,bRe,IRe,SRe,CRe,vRe,ERe,wRe,kRe,BJ,xRe,PRe,$B,GB,HB,RRe,TRe,BRe,qB,ORe,OJ,_J,_Re,DRe,DJ,QRe,QJ,uy,yCt,LRe,NRe,LJ,MRe,NJ,zRe,jRe,URe,FRe,$Re,GRe,HRe,qRe,VRe,iy,KRe,YRe,MJ,zJ,jJ,WRe,JRe,ZRe,XRe,eTe,tTe,nTe,oTe,rTe,iTe,sTe,aTe,cTe,lTe,uTe,UJ,dTe,pTe,FJ,gTe,mTe,hTe,ATe,$J,fTe,yTe,bTe,ITe,bCt,ICt,SCt,CCt,vCt,ECt;var qs=h(()=>{hB();Ut=WA((e)=>e!==null&&(typeof e==="object"||typeof e==="function")),AJ=ut([k(),je().int()]),fJ=k(),hCt=Tt({ttl:je().optional(),pollInterval:je().optional()}),qPe=ne({ttl:je().optional()}),VPe=ne({taskId:k()}),RB=Tt({progressToken:AJ.optional(),[hJ]:VPe.optional()}),so=ne({_meta:RB.optional()}),ay=so.extend({task:qPe.optional()}),nn=ne({method:k(),params:so.loose().optional()}),Eo=ne({_meta:RB.optional()}),wo=ne({method:k(),params:Eo.loose().optional()}),on=Tt({_meta:RB.optional()}),cy=ut([k(),je().int()]),KPe=ne({jsonrpc:ue(sy),id:cy,...nn.shape}).strict(),YPe=ne({jsonrpc:ue(sy),...wo.shape}).strict(),yJ=ne({jsonrpc:ue(sy),id:cy,result:on}).strict();(function(e){e[e.ConnectionClosed=-32000]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(yp||(yp={}));bJ=ne({jsonrpc:ue(sy),id:cy.optional(),error:ne({code:je().int(),message:k(),data:lt().optional()})}).strict(),IJ=ut([KPe,YPe,yJ,bJ]),ACt=ut([yJ,bJ]),TB=on.strict(),WPe=Eo.extend({requestId:cy.optional(),reason:k().optional()}),BB=wo.extend({method:ue("notifications/cancelled"),params:WPe}),JPe=ne({src:k(),mimeType:k().optional(),sizes:ee(k()).optional(),theme:tn(["light","dark"]).optional()}),bp=ne({icons:ee(JPe).optional()}),nl=ne({name:k(),title:k().optional()}),SJ=nl.extend({...nl.shape,...bp.shape,version:k(),websiteUrl:k().optional(),description:k().optional()}),ZPe=Lc(ne({applyDefaults:Xe().optional()}),tt(k(),lt())),XPe=ap((e)=>{if(e&&typeof e==="object"&&!Array.isArray(e)){if(Object.keys(e).length===0)return{form:{}}}return e},Lc(ne({form:ZPe.optional(),url:Ut.optional()}),tt(k(),lt()).optional())),eRe=Tt({list:Ut.optional(),cancel:Ut.optional(),requests:Tt({sampling:Tt({createMessage:Ut.optional()}).optional(),elicitation:Tt({create:Ut.optional()}).optional()}).optional()}),tRe=Tt({list:Ut.optional(),cancel:Ut.optional(),requests:Tt({tools:Tt({call:Ut.optional()}).optional()}).optional()}),nRe=ne({experimental:tt(k(),Ut).optional(),sampling:ne({context:Ut.optional(),tools:Ut.optional()}).optional(),elicitation:XPe.optional(),roots:ne({listChanged:Xe().optional()}).optional(),tasks:eRe.optional(),extensions:tt(k(),Ut).optional()}),oRe=so.extend({protocolVersion:k(),capabilities:nRe,clientInfo:SJ}),rRe=nn.extend({method:ue("initialize"),params:oRe}),iRe=ne({experimental:tt(k(),Ut).optional(),logging:Ut.optional(),completions:Ut.optional(),prompts:ne({listChanged:Xe().optional()}).optional(),resources:ne({subscribe:Xe().optional(),listChanged:Xe().optional()}).optional(),tools:ne({listChanged:Xe().optional()}).optional(),tasks:tRe.optional(),extensions:tt(k(),Ut).optional()}),CJ=on.extend({protocolVersion:k(),capabilities:iRe,serverInfo:SJ,instructions:k().optional()}),sRe=wo.extend({method:ue("notifications/initialized"),params:Eo.optional()}),OB=nn.extend({method:ue("ping"),params:so.optional()}),aRe=ne({progress:je(),total:pt(je()),message:pt(k())}),cRe=ne({...Eo.shape,...aRe.shape,progressToken:AJ}),_B=wo.extend({method:ue("notifications/progress"),params:cRe}),lRe=so.extend({cursor:fJ.optional()}),Ip=nn.extend({params:lRe.optional()}),Sp=on.extend({nextCursor:fJ.optional()}),uRe=tn(["working","input_required","completed","failed","cancelled"]),Cp=ne({taskId:k(),status:uRe,ttl:ut([je(),ep()]),createdAt:k(),lastUpdatedAt:k(),pollInterval:pt(je()),statusMessage:pt(k())}),ly=on.extend({task:Cp}),dRe=Eo.merge(Cp),DB=wo.extend({method:ue("notifications/tasks/status"),params:dRe}),QB=nn.extend({method:ue("tasks/get"),params:so.extend({taskId:k()})}),LB=on.merge(Cp),NB=nn.extend({method:ue("tasks/result"),params:so.extend({taskId:k()})}),fCt=on.loose(),MB=Ip.extend({method:ue("tasks/list")}),zB=Sp.extend({tasks:ee(Cp)}),jB=nn.extend({method:ue("tasks/cancel"),params:so.extend({taskId:k()})}),pRe=on.merge(Cp),vJ=ne({uri:k(),mimeType:pt(k()),_meta:tt(k(),lt()).optional()}),EJ=vJ.extend({text:k()}),UB=k().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),wJ=vJ.extend({blob:UB}),vp=tn(["user","assistant"]),ol=ne({audience:ee(vp).optional(),priority:je().min(0).max(1).optional(),lastModified:Li.datetime({offset:!0}).optional()}),kJ=ne({...nl.shape,...bp.shape,uri:k(),description:pt(k()),mimeType:pt(k()),size:pt(je()),annotations:ol.optional(),_meta:pt(Tt({}))}),gRe=ne({...nl.shape,...bp.shape,uriTemplate:k(),description:pt(k()),mimeType:pt(k()),annotations:ol.optional(),_meta:pt(Tt({}))}),mRe=Ip.extend({method:ue("resources/list")}),xJ=Sp.extend({resources:ee(kJ)}),hRe=Ip.extend({method:ue("resources/templates/list")}),PJ=Sp.extend({resourceTemplates:ee(gRe)}),FB=so.extend({uri:k()}),ARe=FB,fRe=nn.extend({method:ue("resources/read"),params:ARe}),RJ=on.extend({contents:ee(ut([EJ,wJ]))}),TJ=wo.extend({method:ue("notifications/resources/list_changed"),params:Eo.optional()}),yRe=FB,bRe=nn.extend({method:ue("resources/subscribe"),params:yRe}),IRe=FB,SRe=nn.extend({method:ue("resources/unsubscribe"),params:IRe}),CRe=Eo.extend({uri:k()}),vRe=wo.extend({method:ue("notifications/resources/updated"),params:CRe}),ERe=ne({name:k(),description:pt(k()),required:pt(Xe())}),wRe=ne({...nl.shape,...bp.shape,description:pt(k()),arguments:pt(ee(ERe)),_meta:pt(Tt({}))}),kRe=Ip.extend({method:ue("prompts/list")}),BJ=Sp.extend({prompts:ee(wRe)}),xRe=so.extend({name:k(),arguments:tt(k(),k()).optional()}),PRe=nn.extend({method:ue("prompts/get"),params:xRe}),$B=ne({type:ue("text"),text:k(),annotations:ol.optional(),_meta:tt(k(),lt()).optional()}),GB=ne({type:ue("image"),data:UB,mimeType:k(),annotations:ol.optional(),_meta:tt(k(),lt()).optional()}),HB=ne({type:ue("audio"),data:UB,mimeType:k(),annotations:ol.optional(),_meta:tt(k(),lt()).optional()}),RRe=ne({type:ue("tool_use"),name:k(),id:k(),input:tt(k(),lt()),_meta:tt(k(),lt()).optional()}),TRe=ne({type:ue("resource"),resource:ut([EJ,wJ]),annotations:ol.optional(),_meta:tt(k(),lt()).optional()}),BRe=kJ.extend({type:ue("resource_link")}),qB=ut([$B,GB,HB,BRe,TRe]),ORe=ne({role:vp,content:qB}),OJ=on.extend({description:k().optional(),messages:ee(ORe)}),_J=wo.extend({method:ue("notifications/prompts/list_changed"),params:Eo.optional()}),_Re=ne({title:k().optional(),readOnlyHint:Xe().optional(),destructiveHint:Xe().optional(),idempotentHint:Xe().optional(),openWorldHint:Xe().optional()}),DRe=ne({taskSupport:tn(["required","optional","forbidden"]).optional()}),DJ=ne({...nl.shape,...bp.shape,description:k().optional(),inputSchema:ne({type:ue("object"),properties:tt(k(),Ut).optional(),required:ee(k()).optional()}).catchall(lt()),outputSchema:ne({type:ue("object"),properties:tt(k(),Ut).optional(),required:ee(k()).optional()}).catchall(lt()).optional(),annotations:_Re.optional(),execution:DRe.optional(),_meta:tt(k(),lt()).optional()}),QRe=Ip.extend({method:ue("tools/list")}),QJ=Sp.extend({tools:ee(DJ)}),uy=on.extend({content:ee(qB).default([]),structuredContent:tt(k(),lt()).optional(),isError:Xe().optional()}),yCt=uy.or(on.extend({toolResult:lt()})),LRe=ay.extend({name:k(),arguments:tt(k(),lt()).optional()}),NRe=nn.extend({method:ue("tools/call"),params:LRe}),LJ=wo.extend({method:ue("notifications/tools/list_changed"),params:Eo.optional()}),MRe=ne({autoRefresh:Xe().default(!0),debounceMs:je().int().nonnegative().default(300)}),NJ=tn(["debug","info","notice","warning","error","critical","alert","emergency"]),zRe=so.extend({level:NJ}),jRe=nn.extend({method:ue("logging/setLevel"),params:zRe}),URe=Eo.extend({level:NJ,logger:k().optional(),data:lt()}),FRe=wo.extend({method:ue("notifications/message"),params:URe}),$Re=ne({name:k().optional()}),GRe=ne({hints:ee($Re).optional(),costPriority:je().min(0).max(1).optional(),speedPriority:je().min(0).max(1).optional(),intelligencePriority:je().min(0).max(1).optional()}),HRe=ne({mode:tn(["auto","required","none"]).optional()}),qRe=ne({type:ue("tool_result"),toolUseId:k().describe("The unique identifier for the corresponding tool call."),content:ee(qB).default([]),structuredContent:ne({}).loose().optional(),isError:Xe().optional(),_meta:tt(k(),lt()).optional()}),VRe=rp("type",[$B,GB,HB]),iy=rp("type",[$B,GB,HB,RRe,qRe]),KRe=ne({role:vp,content:ut([iy,ee(iy)]),_meta:tt(k(),lt()).optional()}),YRe=ay.extend({messages:ee(KRe),modelPreferences:GRe.optional(),systemPrompt:k().optional(),includeContext:tn(["none","thisServer","allServers"]).optional(),temperature:je().optional(),maxTokens:je().int(),stopSequences:ee(k()).optional(),metadata:Ut.optional(),tools:ee(DJ).optional(),toolChoice:HRe.optional()}),MJ=nn.extend({method:ue("sampling/createMessage"),params:YRe}),zJ=on.extend({model:k(),stopReason:pt(tn(["endTurn","stopSequence","maxTokens"]).or(k())),role:vp,content:VRe}),jJ=on.extend({model:k(),stopReason:pt(tn(["endTurn","stopSequence","maxTokens","toolUse"]).or(k())),role:vp,content:ut([iy,ee(iy)])}),WRe=ne({type:ue("boolean"),title:k().optional(),description:k().optional(),default:Xe().optional()}),JRe=ne({type:ue("string"),title:k().optional(),description:k().optional(),minLength:je().optional(),maxLength:je().optional(),format:tn(["email","uri","date","date-time"]).optional(),default:k().optional()}),ZRe=ne({type:tn(["number","integer"]),title:k().optional(),description:k().optional(),minimum:je().optional(),maximum:je().optional(),default:je().optional()}),XRe=ne({type:ue("string"),title:k().optional(),description:k().optional(),enum:ee(k()),default:k().optional()}),eTe=ne({type:ue("string"),title:k().optional(),description:k().optional(),oneOf:ee(ne({const:k(),title:k()})),default:k().optional()}),tTe=ne({type:ue("string"),title:k().optional(),description:k().optional(),enum:ee(k()),enumNames:ee(k()).optional(),default:k().optional()}),nTe=ut([XRe,eTe]),oTe=ne({type:ue("array"),title:k().optional(),description:k().optional(),minItems:je().optional(),maxItems:je().optional(),items:ne({type:ue("string"),enum:ee(k())}),default:ee(k()).optional()}),rTe=ne({type:ue("array"),title:k().optional(),description:k().optional(),minItems:je().optional(),maxItems:je().optional(),items:ne({anyOf:ee(ne({const:k(),title:k()}))}),default:ee(k()).optional()}),iTe=ut([oTe,rTe]),sTe=ut([tTe,nTe,iTe]),aTe=ut([sTe,WRe,JRe,ZRe]),cTe=ay.extend({mode:ue("form").optional(),message:k(),requestedSchema:ne({type:ue("object"),properties:tt(k(),aTe),required:ee(k()).optional()})}),lTe=ay.extend({mode:ue("url"),message:k(),elicitationId:k(),url:k().url()}),uTe=ut([cTe,lTe]),UJ=nn.extend({method:ue("elicitation/create"),params:uTe}),dTe=Eo.extend({elicitationId:k()}),pTe=wo.extend({method:ue("notifications/elicitation/complete"),params:dTe}),FJ=on.extend({action:tn(["accept","decline","cancel"]),content:ap((e)=>e===null?void 0:e,tt(k(),ut([k(),je(),Xe(),ee(k())])).optional())}),gTe=ne({type:ue("ref/resource"),uri:k()}),mTe=ne({type:ue("ref/prompt"),name:k()}),hTe=so.extend({ref:ut([mTe,gTe]),argument:ne({name:k(),value:k()}),context:ne({arguments:tt(k(),k()).optional()}).optional()}),ATe=nn.extend({method:ue("completion/complete"),params:hTe}),$J=on.extend({completion:Tt({values:ee(k()).max(100),total:pt(je().int()),hasMore:pt(Xe())})}),fTe=ne({uri:k().startsWith("file://"),name:k().optional(),_meta:tt(k(),lt()).optional()}),yTe=nn.extend({method:ue("roots/list"),params:so.optional()}),bTe=on.extend({roots:ee(fTe)}),ITe=wo.extend({method:ue("notifications/roots/list_changed"),params:Eo.optional()}),bCt=ut([OB,rRe,ATe,jRe,PRe,kRe,mRe,hRe,fRe,bRe,SRe,NRe,QRe,QB,NB,MB,jB]),ICt=ut([BB,_B,sRe,ITe,DB]),SCt=ut([TB,zJ,jJ,FJ,bTe,LB,zB,ly]),CCt=ut([OB,MJ,UJ,yTe,QB,NB,MB,jB]),vCt=ut([BB,_B,FRe,vRe,TJ,LJ,_J,DB,pTe]),ECt=ut([TB,CJ,$J,OJ,BJ,xJ,PJ,RJ,uy,QJ,LB,zB,ly])});var STe;var dy=h(()=>{STe=Symbol("Let zodToJsonSchema decide on which parser to use")});var VB=h(()=>{dy()});var ko=()=>{};var KB=h(()=>{Dt()});var YB=()=>{};var py=h(()=>{Dt()});var WB=h(()=>{Dt()});var JB=()=>{};var ZB=h(()=>{Dt()});var XB=h(()=>{Dt();ko()});var eO=h(()=>{Dt()});var ovt;var gy=h(()=>{ovt=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});var my=h(()=>{Dt();gy();py();ko()});var tO=h(()=>{Dt();my();ko()});var nO=h(()=>{ko()});var hy=h(()=>{Dt()});var oO=h(()=>{Dt();hy()});var rO=()=>{};var iO=h(()=>{Dt()});var sO=h(()=>{Dt();ko()});var aO=h(()=>{Dt()});var cO=h(()=>{Dt()});var lO=h(()=>{Dt()});var uO=h(()=>{Dt()});var dO=h(()=>{ko()});var pO=h(()=>{ko()});var gO=h(()=>{Dt()});var mO=h(()=>{ko();KB();YB();py();WB();JB();ZB();XB();eO();tO();nO();oO();rO();iO();sO();aO();cO();my();lO();gy();uO();dO();hy();pO();gO()});var Dt=h(()=>{dy();mO();ko()});var GJ=()=>{};var hO=h(()=>{Dt();VB();ko()});var HJ=h(()=>{hO();dy();VB();Dt();GJ();ko();KB();YB();py();WB();JB();ZB();XB();eO();tO();nO();oO();rO();iO();sO();aO();cO();gO();my();lO();gy();uO();dO();hy();pO();mO();hO()});var VJ=h(()=>{ry();HJ()});var YJ=h(()=>{ry();qs();VJ()});var kp=x(function(ZJ){Object.defineProperty(ZJ,"__esModule",{value:!0});ZJ.regexpCode=ZJ.getEsmExportName=ZJ.getProperty=ZJ.safeStringify=ZJ.stringify=ZJ.strConcat=ZJ.addCodeArg=ZJ.str=ZJ._=ZJ.nil=ZJ._Code=ZJ.Name=ZJ.IDENTIFIER=ZJ._CodeOrName=void 0;class Ay{}ZJ._CodeOrName=Ay;ZJ.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class rl extends Ay{constructor(e){super();if(!ZJ.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}ZJ.Name=rl;class qo extends Ay{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>{if(n instanceof rl)t[n.str]=(t[n.str]||0)+1;return t},{})}}ZJ._Code=qo;ZJ.nil=new qo("");function WJ(e,...t){let n=[e[0]],r=0;while(r<t.length)fO(n,t[r]),n.push(e[++r]);return new qo(n)}ZJ._=WJ;var AO=new qo("+");function JJ(e,...t){let n=[wp(e[0])],r=0;while(r<t.length)n.push(AO),fO(n,t[r]),n.push(AO,wp(e[++r]));return BTe(n),new qo(n)}ZJ.str=JJ;function fO(e,t){if(t instanceof qo)e.push(...t._items);else if(t instanceof rl)e.push(t);else e.push(DTe(t))}ZJ.addCodeArg=fO;function BTe(e){let t=1;while(t<e.length-1){if(e[t]===AO){let n=OTe(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function OTe(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof rl||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof rl))return`"${e}${t.slice(1)}`;return}function _Te(e,t){return t.emptyStr()?e:e.emptyStr()?t:JJ`${e}${t}`}ZJ.strConcat=_Te;function DTe(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:wp(Array.isArray(e)?e.join(","):e)}function QTe(e){return new qo(wp(e))}ZJ.stringify=QTe;function wp(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ZJ.safeStringify=wp;function LTe(e){return typeof e=="string"&&ZJ.IDENTIFIER.test(e)?new qo(`.${e}`):WJ`[${e}]`}ZJ.getProperty=LTe;function NTe(e){if(typeof e=="string"&&ZJ.IDENTIFIER.test(e))return new qo(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ZJ.getEsmExportName=NTe;function MTe(e){return new qo(e.toString())}ZJ.regexpCode=MTe});var SO=x(function(n4){Object.defineProperty(n4,"__esModule",{value:!0});n4.ValueScope=n4.ValueScopeName=n4.Scope=n4.varKinds=n4.UsedValueState=void 0;var Fn=kp();class e4 extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var yy;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(yy||(n4.UsedValueState=yy={}));n4.varKinds={const:new Fn.Name("const"),let:new Fn.Name("let"),var:new Fn.Name("var")};class bO{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Fn.Name?e:this.name(e)}name(e){return new Fn.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}n4.Scope=bO;class IO extends Fn.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=Fn._`.${new Fn.Name(t)}[${n}]`}}n4.ValueScopeName=IO;var JTe=Fn._`\n`;class t4 extends bO{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?JTe:Fn.nil}}get(){return this._scope}name(e){return new IO(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let r=this.toName(e),{prefix:o}=r,i=(n=t.key)!==null&&n!==void 0?n:t.ref,s=this._values[o];if(s){let u=s.get(i);if(u)return u}else s=this._values[o]=new Map;s.set(i,r);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=t.ref,r.setValue(t,{property:o,itemIndex:l}),r}getValue(e,t){let n=this._values[e];if(!n)return;return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(n)=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return Fn._`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,(r)=>{if(r.value===void 0)throw Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,n)}_reduceValues(e,t,n={},r){let o=Fn.nil;for(let i in e){let s=e[i];if(!s)continue;let c=n[i]=n[i]||new Map;s.forEach((l)=>{if(c.has(l))return;c.set(l,yy.Started);let u=t(l);if(u){let d=this.opts.es5?n4.varKinds.var:n4.varKinds.const;o=Fn._`${o}${d} ${l} = ${u};${this.opts._n}`}else if(u=r===null||r===void 0?void 0:r(l))o=Fn._`${o}${u}${this.opts._n}`;else throw new e4(l);c.set(l,yy.Completed)})}return o}}n4.ValueScope=t4});var Ne=x(function($n){Object.defineProperty($n,"__esModule",{value:!0});$n.or=$n.and=$n.not=$n.CodeGen=$n.operators=$n.varKinds=$n.ValueScopeName=$n.ValueScope=$n.Scope=$n.Name=$n.regexpCode=$n.stringify=$n.getProperty=$n.nil=$n.strConcat=$n.str=$n._=void 0;var Ue=kp(),Vo=SO(),Ni=kp();Object.defineProperty($n,"_",{enumerable:!0,get:function(){return Ni._}});Object.defineProperty($n,"str",{enumerable:!0,get:function(){return Ni.str}});Object.defineProperty($n,"strConcat",{enumerable:!0,get:function(){return Ni.strConcat}});Object.defineProperty($n,"nil",{enumerable:!0,get:function(){return Ni.nil}});Object.defineProperty($n,"getProperty",{enumerable:!0,get:function(){return Ni.getProperty}});Object.defineProperty($n,"stringify",{enumerable:!0,get:function(){return Ni.stringify}});Object.defineProperty($n,"regexpCode",{enumerable:!0,get:function(){return Ni.regexpCode}});Object.defineProperty($n,"Name",{enumerable:!0,get:function(){return Ni.Name}});var Ey=SO();Object.defineProperty($n,"Scope",{enumerable:!0,get:function(){return Ey.Scope}});Object.defineProperty($n,"ValueScope",{enumerable:!0,get:function(){return Ey.ValueScope}});Object.defineProperty($n,"ValueScopeName",{enumerable:!0,get:function(){return Ey.ValueScopeName}});Object.defineProperty($n,"varKinds",{enumerable:!0,get:function(){return Ey.varKinds}});$n.operators={GT:new Ue._Code(">"),GTE:new Ue._Code(">="),LT:new Ue._Code("<"),LTE:new Ue._Code("<="),EQ:new Ue._Code("==="),NEQ:new Ue._Code("!=="),NOT:new Ue._Code("!"),OR:new Ue._Code("||"),AND:new Ue._Code("&&"),ADD:new Ue._Code("+")};class Mi{optimizeNodes(){return this}optimizeNames(e,t){return this}}class r4 extends Mi{constructor(e,t,n){super();this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?Vo.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${r};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=sl(this.rhs,e,t);return this}get names(){return this.rhs instanceof Ue._CodeOrName?this.rhs.names:{}}}class EO extends Mi{constructor(e,t,n){super();this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof Ue.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=sl(this.rhs,e,t),this}get names(){let e=this.lhs instanceof Ue.Name?{}:{...this.lhs.names};return vy(e,this.rhs)}}class i4 extends EO{constructor(e,t,n,r){super(e,n,r);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class s4 extends Mi{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class a4 extends Mi{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class c4 extends Mi{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class l4 extends Mi{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=sl(this.code,e,t),this}get names(){return this.code instanceof Ue._CodeOrName?this.code.names:{}}}class wy extends Mi{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let n=e[t].optimizeNodes();if(Array.isArray(n))e.splice(t,1,...n);else if(n)e[t]=n;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;while(r--){let o=n[r];if(o.optimizeNames(e,t))continue;tBe(e,o.names),n.splice(r,1)}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Vs(e,t.names),{})}}class zi extends wy{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class u4 extends wy{}class xp extends zi{}xp.kind="else";class Zr extends zi{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new xp(n):n}if(t){if(e===!1)return t instanceof Zr?t:t.nodes;if(this.nodes.length)return this;return new Zr(h4(e),t instanceof Zr?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=sl(this.condition,e,t),this}get names(){let e=super.names;if(vy(e,this.condition),this.else)Vs(e,this.else.names);return e}}Zr.kind="if";class il extends zi{}il.kind="for";class d4 extends il{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=sl(this.iteration,e,t),this}get names(){return Vs(super.names,this.iteration.names)}}class p4 extends il{constructor(e,t,n,r){super();this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?Vo.varKinds.var:this.varKind,{name:n,from:r,to:o}=this;return`for(${t} ${n}=${r}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=vy(super.names,this.from);return vy(e,this.to)}}class CO extends il{constructor(e,t,n,r){super();this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=sl(this.iterable,e,t),this}get names(){return Vs(super.names,this.iterable.names)}}class by extends zi{constructor(e,t,n){super();this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}by.kind="func";class Iy extends wy{render(e){return"return "+super.render(e)}}Iy.kind="return";class g4 extends zi{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(r=this.finally)===null||r===void 0||r.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)Vs(e,this.catch.names);if(this.finally)Vs(e,this.finally.names);return e}}class Sy extends zi{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Sy.kind="catch";class Cy extends zi{render(e){return"finally"+super.render(e)}}Cy.kind="finally";class m4{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
7412
+ -d '{"event":"hello.world","level":"info","message":"first webhook event"}'`}]}]}]}});var uY;var dY=h(()=>{lY();uY={id:"webhook_events",name:"Webhook Events",searchAliases:["webhook","webhooks","json events","http events","generic webhook","event stream"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"webhook-events",label:"Webhook Events",transform:"webhook-events"}],lifecycleSkipReason:"Manual webhook setup is not exercised by automated lifecycle tests yet.",subtitle:"Point any vendor's webhooks at Sazabi. Arbitrary JSON events land as searchable log records with zero vendor-specific configuration.",features:["Any JSON event stream","One keyed URL per endpoint","Full payload preserved as attributes","No schema or field mapping"],evidenceHints:["A vendor that emits plain JSON webhooks without a dedicated Sazabi source","An internal service, deploy bot, or cron that POSTs JSON events","Existing outbound webhook configuration with no other Sazabi destination"],setupSkill:te,dashboard:{slug:"webhook-events",iconKey:"webhook-events",intakeSourceId:"webhook-events"}}});var Mf,zf,SIt,fxe,CIt,vIt,EIt,Hc,wIt,kIt,yxe,bxe,Ixe,xIt;var pY=h(()=>{nV();iV();cV();dV();mV();fV();IV();vV();kV();RV();OV();QV();MV();UV();GV();VV();WV();XV();nK();iK();cK();dK();mK();fK();IK();vK();kK();RK();OK();QK();MK();UK();GK();VK();WK();XK();nY();iY();cY();dY();Mf=[tV,aV,rV,uV,gV,AV,bV,CV,wV,PV,BV,DV,NV,jV,$V,qV,YV,ZV,tK,rK,aK,AK,uK,gK,bK,CK,PK,wK,BK,DK,NK,jK,$K,qK,YK,ZK,tY,rY,aY,uY],zf=Mf,SIt=Object.fromEntries(zf.map((e)=>[e.id,e.sensitiveFields??[]])),fxe=["publicKeyId"],CIt=Object.fromEntries(zf.map((e)=>[e.id,[...new Set([...fxe,...e.serverOwnedStreamConfigFields??[],...e.secretStreamConfigFields??[]])]])),vIt=Object.fromEntries(zf.map((e)=>[e.id,e.secretStreamConfigFields??[]])),EIt=Object.fromEntries(zf.flatMap((e)=>[...Object.values(e.dashboard?.actions?.submit??{}),...Object.values(e.dashboard?.actions?.list??{}),...Object.values(e.dashboard?.actions?.prefetch??{})].flatMap((t)=>{let n=t.sensitiveInputFields??[];if(n.length===0)return[];return[["procedure"in t?t.procedure:`${e.id}.${t.actionId}`,n]]}))),Hc=["vercel","cloudflare","railway","render","fly_io","netlify","supabase","digital_ocean","inngest","trigger_dev","temporal","mastra","neon","langchain","daytona","e2b","cloudwatch","convex","datadog","sentry","sentry_platform","openrouter","posthog","posthog_sdk","gcp","otel","otel_metrics","fluent_bit","vector","grafana_alloy","otel_collector","cloudflare_workers","elastic_cloud","porter","respan","plain","prometheus","webhook_events","claude_code","codex"],wIt=Mf.map((e)=>({id:e.id,name:e.name,capabilities:e.capabilities})),kIt=Object.fromEntries(Mf.map((e)=>[e.id,{name:e.name,setupSkill:e.setupSkill}])),yxe={cloudflare:YR,cloudwatch:tT,convex:iT,digital_ocean:uT,fly_io:AT,gcp:bT,plain:OT,posthog:NT,render:FT,sentry_platform:qT,vercel:eB},bxe={cloudflare:WR,cloudwatch:nT,convex:aT,digital_ocean:pT,fly_io:yT,gcp:IT,plain:DT,posthog:MT,render:GT,vercel:nB},Ixe={cloudflare:JR,cloudflare_workers:KR,cloudwatch:oT,convex:sT,datadog:cT,daytona:lT,digital_ocean:dT,fluent_bit:hT,fly_io:fT,grafana_alloy:CT,e2b:gT,elastic_cloud:mT,gcp:ST,inngest:vT,langchain:ET,mastra:wT,neon:kT,netlify:xT,openrouter:PT,otel:BT,otel_collector:RT,otel_metrics:TT,plain:_T,posthog:zT,posthog_sdk:LT,porter:QT,prometheus:jT,railway:UT,render:$T,respan:HT,sentry:KT,sentry_platform:VT,supabase:YT,temporal:WT,trigger_dev:JT,vector:ZT,vercel:tB,webhook_events:oB,claude_code:VR,codex:rT},xIt=Mf.map((e)=>({sourceId:e.id,name:e.name,capabilities:e.capabilities,setupAuthModes:e.auth,deliveryModes:e.delivery,hasDashboardMetadata:Boolean(e.dashboard),hasManagedFlow:Boolean(yxe[e.id]),hasConnectionlessFlow:Boolean(Ixe[e.id]),hasStreamSelector:Boolean(bxe[e.id]),lifecycleEligible:e.lifecycleEligible??!1,lifecycleSkipReason:e.lifecycleSkipReason}))});var gY=h(()=>{pY()});var rB=h(()=>{Xq();gY()});var mY,iB,Sxe,jf,Cxe,hY,sB,Hs,fp,AY,fY,yY,Uf,bY,IY,qc,SY,CY,Vc,vY,EY,Ff,wY,kY,$f,xY,PY,Gf,vxe;var Hf=h(()=>{rB();De();Ve();mY=Hc,iB=a.enum(mY),Sxe=a.enum(["pending","provisioning","active","error"]),jf=a.enum(["managed","connectionless"]),Cxe=a.object({name:a.string().describe("Field name used as the JSON key in metadata."),type:a.string().describe('Zod type name, e.g. "string", "boolean", "enum".'),required:a.boolean().describe("Whether the field is required."),sensitive:a.boolean().describe("Whether the field contains a secret and will be encrypted."),description:a.string().nullable().describe("Human-readable description of the field.")}),hY=a.object({id:a.string().describe("Log source provider identifier."),name:a.string().describe("Human-readable display name."),modes:a.array(jf).describe("Setup modes this provider supports. `managed` log sources take vendor credentials; `connectionless` log sources mint a keyed intake endpoint."),metadataFields:a.array(Cxe).describe("Fields required in the metadata object when creating a managed log source. Empty for connectionless-only providers."),setupSkill:a.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),sB=a.object({kind:a.enum(["url","hostPort"]).describe("Card shape. `url` = a complete keyed URL whose hostname authenticates; `hostPort` = a non-keyed listener host + port whose credential travels separately."),label:a.string().optional().describe("Card label. Present when a log source exposes several endpoints (e.g. separate logs and traces destinations)."),url:a.string().optional().describe("The complete keyed intake URL. Present when kind is `url`."),host:a.string().optional().describe("The regional listener hostname (no scheme). Present when kind is `hostPort`."),port:a.number().int().optional().describe("The listener port. Present when kind is `hostPort`."),description:a.string().optional().describe("Vendor-specific guidance rendered under the value."),extraCredential:a.object({label:a.string(),value:a.string(),description:a.string().optional()}).optional().describe("The credential the sender must attach when the hostname alone does not authenticate. Present when kind is `hostPort`.")}),Hs=a.object({id:a.string().uuid(),logSourceId:a.string().uuid().describe("Root log source ID. Every log stream roots on exactly one log source."),displayName:a.string().nullable().describe("Display name pulled automatically from information available through the log source connection (e.g. the vendor object's name). Null when no connection-derived name exists; connectionless log streams are always nameless."),config:a.record(a.string(),a.unknown()),status:Sxe,errorMessage:a.string().nullable(),enabled:a.boolean().describe("Whether the log stream is currently ingesting. Independent of provisioning status: a paused log stream stays configured but stops accepting new data."),createdAt:a.string().datetime(),endpointCards:a.array(sB).optional().describe("Server-computed endpoint card(s) for this log stream's delivery key — where to point the sender. Present only for log streams that carry their own intake key.")}),fp=a.object({id:a.string().uuid(),provider:iB,mode:jf,name:a.string().describe('Display name — a generated mnemonic (e.g. "amber-falcon"). Assigned at creation and immutable.'),streamCount:a.number().int(),createdAt:a.string().datetime()}),AY=fp.extend({streams:a.array(Hs).describe("The log source's live log streams, newest first.")}),fY=a.object({}),yY=a.object({providers:a.array(hY)}),Uf=E({operationId:"logSources.listProviders",description:"List all supported log source providers with their setup modes and metadata requirements.",backend:"api",route:{method:"GET",path:"/log-sources/providers",tags:["Log Sources"]},input:fY,output:yY,pagination:"none",async:"sync"}),bY=a.object({projectId:a.string().uuid().optional().describe("Project to list log sources for. Auto-filled from SDK context when omitted."),provider:iB.optional().describe("Filter log sources by provider.")}),IY=a.object({logSources:a.array(fp)}),qc=E({operationId:"logSources.list",description:"List log sources within one project.",backend:"api",route:{method:"GET",path:"/log-sources",tags:["Log Sources"]},input:bY,output:IY,pagination:"none",async:"sync"}),SY=a.object({projectId:a.string().uuid().optional().describe("Project to create the log source in. Auto-filled from SDK context when omitted."),provider:iB.describe("Log source provider identifier."),mode:jf.optional().describe("Setup mode. Defaults to `managed` when metadata is provided, otherwise `connectionless`. Must be a mode the provider supports (see `modes` on the provider catalog)."),metadata:a.record(a.string(),a.unknown()).optional().describe("Vendor credentials and configuration for managed setup. Fields vary by provider (see `metadataFields` on the provider catalog). Required for managed mode; must be omitted for connectionless mode.")}).strict(),CY=a.object({logSource:fp.describe("The created log source."),streamId:a.string().uuid().optional().describe("ID of the log stream created alongside the log source. Present for connectionless log sources (which always mint their keyed log stream) and for managed providers that auto-provision a default log stream."),publicKey:a.string().optional().describe("Intake key minted for the log source. Store this securely — it is only shown once. Present for connectionless log sources and for managed providers that ingest through a Sazabi endpoint."),endpointCards:a.array(sB).optional().describe("Server-computed endpoint card(s) for the minted key — where to point the sender. Present for connectionless log sources.")}),Vc=E({operationId:"logSources.create",description:"Create a log source. Managed mode takes vendor credentials in `metadata`, validates them, and provisions delivery behind the log source. Connectionless mode mints the log source plus a keyed log stream and returns the intake key and endpoint card(s) to point the sender at.",backend:"api",route:{method:"POST",path:"/log-sources",successStatus:201,tags:["Log Sources"]},input:SY,output:CY,pagination:"none",async:"sync"}),vY=a.object({logSourceId:a.string().uuid().describe("Log source ID to fetch.")}),EY=a.object({logSource:AY}),Ff=E({operationId:"logSources.get",description:"Get one log source by ID, including its log streams and their endpoint card(s).",backend:"api",route:{method:"GET",path:"/log-sources/{logSourceId}",tags:["Log Sources"]},input:vY,output:EY,pagination:"none",async:"sync"}),wY=a.object({logSourceId:a.string().uuid().describe("Log source ID to update."),enabled:a.boolean().optional().describe("Pause (`false`) or resume (`true`) ingestion for all of the log source's log streams. Reversible; never deletes anything.")}).strict(),kY=a.object({logSource:fp}),$f=E({operationId:"logSources.update",description:"Update a log source: pause or resume ingestion across its log streams. Log sources cannot be renamed — their generated names are immutable.",backend:"api",route:{method:"PATCH",path:"/log-sources/{logSourceId}",tags:["Log Sources"]},input:wY,output:kY,pagination:"none",async:"sync"}),xY=a.object({logSourceId:a.string().uuid().describe("Log source ID to delete.")}),PY=a.object({success:a.boolean(),teardownError:a.string().nullable().describe("Null when vendor-side cleanup succeeded or was not needed; error message when remote cleanup failed and must be finished manually.")}),Gf=E({operationId:"logSources.delete",description:"Delete a log source. Tombstones the log source and its log streams, deactivates their intake keys (already-ingested data is preserved with its attribution), and runs vendor-side cleanup for managed log sources when the provider supports it.",backend:"api",route:{method:"DELETE",path:"/log-sources/{logSourceId}",successStatus:200,tags:["Log Sources"]},input:xY,output:PY,pagination:"none",async:"sync"}),vxe={listProviders:Uf.contract,list:qc.contract,create:Vc.contract,get:Ff.contract,update:$f.contract,delete:Gf.contract}});var Exe,wxe,aB,kxe,xxe,cB,Pxe,Rxe,lB,Txe,Bxe,uB,Oxe,_xe,dB,Dxe,Qxe,pB,jSt;var RY=h(()=>{De();Ve();Hf();Exe=a.object({logSourceId:a.string().uuid().describe("Log source ID to list log streams for."),enabled:a.boolean().optional().describe("Optional filter on log stream ingestion state. Omit to list all log streams; pass true for only enabled log streams or false for only paused log streams.")}),wxe=a.object({streams:a.array(Hs)}),aB=E({operationId:"logStreams.list",description:"List the log streams that belong to a log source.",backend:"api",route:{method:"GET",path:"/log-streams",tags:["Log Streams"]},input:Exe,output:wxe,pagination:"none",async:"sync"}),kxe=a.object({logSourceId:a.string().uuid().describe("Log source ID to create the log stream under."),config:a.record(a.string(),a.unknown()).optional().describe("Platform-specific log stream configuration.")}).strict(),xxe=a.object({streamId:a.string().uuid().describe("ID of the created log stream.")}),cB=E({operationId:"logStreams.create",description:"Create a new log stream under a managed log source. Triggers async provisioning; poll the log stream to track it. Connectionless log sources are single-stream — create another log source instead.",backend:"api",route:{method:"POST",path:"/log-streams",successStatus:201,tags:["Log Streams"]},input:kxe,output:xxe,pagination:"none",async:"sync"}),Pxe=a.object({streamId:a.string().uuid().describe("Log stream ID to fetch.")}),Rxe=a.object({stream:Hs}),lB=E({operationId:"logStreams.get",description:"Get one log stream by ID. Use to poll provisioning status.",backend:"api",route:{method:"GET",path:"/log-streams/{streamId}",tags:["Log Streams"]},input:Pxe,output:Rxe,pagination:"none",async:"sync"}),Txe=a.object({streamId:a.string().uuid().describe("Log stream ID to update."),enabled:a.boolean().optional().describe("Pause (`false`) or resume (`true`) ingestion for this log stream. Reversible; never deletes anything.")}).strict(),Bxe=a.object({stream:Hs}),uB=E({operationId:"logStreams.update",description:"Update a log stream: pause or resume its ingestion. Log streams cannot be renamed.",backend:"api",route:{method:"PATCH",path:"/log-streams/{streamId}",tags:["Log Streams"]},input:Txe,output:Bxe,pagination:"none",async:"sync"}),Oxe=a.object({streamId:a.string().uuid().describe("Log stream ID to delete.")}),_xe=a.object({success:a.boolean()}),dB=E({operationId:"logStreams.delete",description:"Delete a log stream. Tombstones the log stream and deactivates its intake key. Deleting a connectionless log source's only log stream tombstones the log source too.",backend:"api",route:{method:"DELETE",path:"/log-streams/{streamId}",successStatus:200,tags:["Log Streams"]},input:Oxe,output:_xe,pagination:"none",async:"sync"}),Dxe=a.object({streamId:a.string().uuid().describe("Log stream ID to reassign."),targetLogSourceId:a.string().uuid().describe("Log source to move the log stream under. Must be a connectionless log source in the same project; the stream's key is rebound to this log source's intake adapter.")}).strict(),Qxe=a.object({stream:Hs}),pB=E({operationId:"logStreams.reassign",description:"Move a log stream to a different connectionless log source in the same project. Preserves the stream's ID, intake key credential, and ingested data; rebinds the key's intake adapter to the target log source's provider so future data is processed as that provider's format.",backend:"api",route:{method:"POST",path:"/log-streams/{streamId}/reassign",successStatus:200,tags:["Log Streams"]},input:Dxe,output:Qxe,pagination:"none",async:"sync"}),jSt={list:aB.contract,create:cB.contract,get:lB.contract,update:uB.contract,delete:dB.contract,reassign:pB.contract}});var TY,BY,OY,_Y,DY,QY,LY,qf,NY,MY,Lxe,zY,gB,jY,UY,FY,$Y,GY,HY,qY,VY,Nxe,KY,YY,Kc,Yc,Wc,Jc,Zc,Mxe;var mB=h(()=>{De();Ve();TY=a.enum(["eq","neq","in","contains","starts_with","gt","gte","lt","lte","between","exists"]).describe("Filter operator: 'eq' (equals), 'neq' (not equals), 'in' (in array), 'contains' (substring), 'starts_with' (prefix), 'gt' (greater than), 'gte' (greater than or equal), 'lt' (less than), 'lte' (less than or equal), 'between' (range), 'exists' (field exists)"),BY=a.enum(["any","all","phrase"]).describe("Search mode: 'any' (match any token), 'all' (match all tokens), 'phrase' (exact phrase match)"),OY=a.object({query:a.string().min(1,"Search query must be at least 1 character").max(500,"Search query must be at most 500 characters").describe("Search query text (1-500 characters)"),fields:a.array(a.string()).optional().describe("Fields to search in (defaults to backend allowlist)"),mode:BY.optional().default("all").describe("Token matching mode")}),_Y=a.object({field:a.string().describe("Field name to filter on"),op:TY.describe("Filter operator"),value:a.union([a.string(),a.number(),a.boolean(),a.array(a.union([a.string(),a.number()])),a.object({from:a.string(),to:a.string()})]).describe("Filter value (type depends on operator)")}).superRefine((e,t)=>{if(e.op==="in"&&!Array.isArray(e.value))t.addIssue({code:a.ZodIssueCode.custom,message:"Value must be an array when op is 'in'",path:["value"]});if(e.op==="between"){let n=e.value;if(!(typeof n==="object"&&n!==null&&("from"in n)&&("to"in n)))t.addIssue({code:a.ZodIssueCode.custom,message:"Value must be an object with from/to when op is 'between'",path:["value"]})}if(e.op==="exists"&&typeof e.value!=="boolean")t.addIssue({code:a.ZodIssueCode.custom,message:"Value must be boolean when op is 'exists'",path:["value"]})}),DY=a.object({field:a.string().describe("Field name to sort by"),direction:a.enum(["asc","desc"]).default("desc").describe("Sort direction: 'asc' for ascending, 'desc' for descending")}),QY=a.object({limit:a.number().int().min(1,"Limit must be at least 1").max(1000,"Limit must be at most 1000").default(50).describe("Maximum number of rows to return"),cursor:a.string().optional().describe("Opaque cursor from previous response for pagination")}),LY=a.object({projectId:a.string().uuid().optional().describe("Project to query logs for. Auto-filled from CLI and SDK context when omitted."),search:OY.optional().describe("Full-text search configuration"),filters:a.array(_Y).optional().describe("Structured filter clauses (ANDed together). When no `timestamp` filter is provided, queries default to a 24h look-back window; pass an explicit `timestamp` filter to query a different range."),select:a.array(a.string()).optional().describe("Fields to return (defaults to backend default set)"),sort:DY.optional().describe("Sort configuration (defaults to timestamp desc)"),pagination:QY.optional().describe("Pagination configuration")}),qf=a.enum(["clickhouse","better-stack","datadog","gcp","axiom","cloudwatch","sentry","posthog","mezmo"]),NY=a.enum(["native","external"]),MY=a.object({projectId:a.string().uuid().optional().describe("Project to inspect. Auto-filled from CLI and SDK context when omitted."),question:a.string().trim().min(1).max(2000).optional().describe("Optional natural-language question used to retrieve coherent schema bundles."),topK:a.number().int().min(1).max(32).optional().describe("Max schema bundles to return when question is set (default 8)")}),Lxe=a.object({id:a.string().describe("Stable schema-bundle document id"),service:a.string().describe("Emitting service for this co-occurrence shape"),keys:a.array(a.string()).describe("Co-occurring otel_log_attributes keys in this bundle"),rowCount:a.number().nonnegative().describe("Observed row count when the bundle was compiled"),score:a.number().optional().describe("Retrieval rank score when returned from vector search")}),zY=a.object({backend:a.object({id:qf,name:a.string(),kind:NY}).describe("Active log backend for the project"),features:a.array(a.string()).describe("Backend features registered on the server"),commands:a.array(a.enum(["schema","query","volume","patterns","nativeQuery"])).describe("CLI/API commands available for this backend"),queryableFields:a.array(a.string()).describe("Fields accepted by the normalized logs.query contract"),searchableFields:a.array(a.string()).describe("Fields accepted by logs.query full-text search"),question:a.string().optional().describe("Echo of the question used for retrieval when provided"),selectedBundles:a.array(Lxe).describe("Question-conditioned coherent schema bundles (empty when question omitted)"),selectedAttributeKeys:a.array(a.string()).describe("Flattened attribute keys from selectedBundles, or recent keys when question omitted"),observedServiceNames:a.array(a.string()).describe("Recently observed service names for this project"),observedAttributeKeys:a.array(a.string()).describe("Observed / selected attribute keys for agent and CLI schema discovery"),indexStatus:a.enum(["ready","empty","unavailable","skipped"]).describe("ready: bundles retrieved; empty: index missing/empty; unavailable: retrieval failed; skipped: no question (legacy path)"),schemaContext:a.record(a.string(),a.any()).optional().describe("Backend-specific schema guidance and examples")}),gB=a.enum(["1m","5m","15m","1h"]),jY=a.enum(["service_name","severity_text","environment"]),UY=a.object({projectId:a.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),startDate:a.string().datetime({offset:!0}),endDate:a.string().datetime({offset:!0}),interval:gB.optional().describe("Aggregation bucket size for the volume series"),groupBy:jY.optional().describe("Optional field to split volume series by"),filters:a.object({service_name:a.string().optional(),severity_text:a.string().optional(),environment:a.string().optional()}).optional()}).refine((e)=>new Date(e.startDate)<new Date(e.endDate),{message:"startDate must be before endDate",path:["endDate"]}),FY=a.object({total:a.number().nonnegative(),startDate:a.string().datetime({offset:!0}),endDate:a.string().datetime({offset:!0}),interval:gB,series:a.array(a.object({group:a.string(),total:a.number().nonnegative(),points:a.array(a.object({bucket:a.string(),count:a.number().nonnegative()}))}))}),$Y=a.object({projectId:a.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),query:a.string().min(1).max(500).optional().describe("Optional text to match against normalized log patterns"),severity:a.string().optional().describe("Optional severity_text value, for example ERROR"),startDate:a.string().datetime({offset:!0}).optional().describe("Optional earliest last-seen timestamp"),endDate:a.string().datetime({offset:!0}).optional().describe("Optional latest last-seen timestamp"),limit:a.number().int().min(1).max(100).default(25).describe("Maximum number of log patterns to return")}).refine((e)=>!e.startDate||!e.endDate||new Date(e.startDate)<new Date(e.endDate),{message:"startDate must be before endDate",path:["endDate"]}),GY=a.object({serviceName:a.string().nullable(),fingerprint:a.string(),pattern:a.string(),severity:a.string().nullable(),occurrences:a.number().nonnegative(),firstSeen:a.string().nullable(),lastSeen:a.string().nullable(),representativeId:a.string().nullable()}),HY=a.object({patterns:a.array(GY),meta:a.object({backendId:qf,count:a.number().int().nonnegative(),took:a.number().nonnegative()})}),qY=a.object({projectId:a.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),query:a.string().min(1,"Query cannot be empty").max(1e4,"Query must be 10000 characters or less")}),VY=a.object({result:a.string().describe("Backend-formatted query result"),format:a.literal("text"),meta:a.object({backendId:qf,took:a.number().nonnegative(),truncated:a.boolean()})}),Nxe=a.object({cursor:a.string().nullable().describe("Cursor for next page (null if no more results)"),hasMore:a.boolean().describe("Whether more results are available")}),KY=a.object({count:a.number().int().nonnegative().describe("Number of log rows returned in this response"),took:a.number().nonnegative().describe("Query execution time in milliseconds")}),YY=a.object({data:a.array(a.record(a.string(),a.any())).describe("Array of log rows with selected fields"),nextCursor:a.string().nullable().describe("Pass as 'cursor' in the next query to fetch the next page. Null when there are no more results."),meta:KY.describe("Query execution metadata")}),Kc=E({operationId:"logs.query",description:"Query logs within one project.",backend:"api",route:{method:"POST",path:"/logs/query",tags:["Logs"]},input:LY,output:YY,pagination:"cursor",async:"sync"}),Yc=E({operationId:"logs.schema",description:"Describe the active log backend, supported commands, query fields, and schema context.",backend:"api",route:{method:"POST",path:"/logs/schema",tags:["Logs"]},input:MY,output:zY,pagination:"none",async:"sync"}),Wc=E({operationId:"logs.volume",description:"Query pre-aggregated log volume for one project.",backend:"api",route:{method:"POST",path:"/logs/volume",tags:["Logs"]},input:UY,output:FY,pagination:"none",async:"sync"}),Jc=E({operationId:"logs.patterns",description:"Query normalized log patterns for discovery workflows.",backend:"api",route:{method:"POST",path:"/logs/patterns",tags:["Logs"]},input:$Y,output:HY,pagination:"none",async:"sync"}),Zc=E({operationId:"logs.nativeQuery",description:"Run a read-only query in the log store's native query language, with server-side guardrails.",backend:"api",route:{method:"POST",path:"/logs/native-query",tags:["Logs"]},input:qY,output:VY,pagination:"none",async:"sync"}),Mxe={query:Kc.contract,schema:Yc.contract,volume:Wc.contract,patterns:Jc.contract,nativeQuery:Zc.contract}});var WY=h(()=>{JA()});var hB=h(()=>{WY()});var ZY=()=>{};var AB,fB,Vf,zxe,jxe,Xc,Kf,XY,eW,yB,tW,nW,Uxe,oW,bB,Fxe,$xe,Gxe,Hxe,qxe,Vxe,Kxe,Yxe,Wxe,Jxe,Zxe,Xxe,ePe,IB,rW,iW,tPe,SB;var Yf=h(()=>{De();AB=["streamable-http","sse"],fB=["none","headers","oauth","aws-sigv4"],Vf=["none","client_secret_basic","client_secret_post"],zxe=["preset","custom"],jxe=["configured","authorizing","connected","error"],Xc=["enabled","disabled","custom-only"],Kf=["enabled","write_blocked","disabled"],XY=a.enum(AB),eW=a.enum(fB),yB=a.enum(Vf),tW=a.enum(zxe),nW=a.enum(jxe),Uxe=a.enum(Xc),oW=a.enum(Kf),bB=a.object({id:a.string().min(1),name:a.string().min(1),value:a.string().min(1)}),Fxe=a.object({id:a.string().min(1),name:a.string().min(1),maskedValue:a.string().min(1)}),$xe=a.object({authMode:a.literal("none")}),Gxe=a.object({tokenUrl:a.string().url(),clientId:a.string().min(1),clientSecret:a.string().min(1).optional(),tokenEndpointAuthMethod:yB.optional(),refreshToken:a.string().min(1),headerName:a.string().min(1).default("Authorization"),headerValuePrefix:a.string().default("Bearer "),expiresAt:a.string().datetime().optional()}),Hxe=a.object({authMode:a.literal("headers"),headers:a.array(bB),refreshCredentials:Gxe.optional()}),qxe=a.object({authMode:a.literal("aws-sigv4"),accessKeyId:a.string().min(1),secretAccessKey:a.string().min(1),sessionToken:a.string().min(1).optional(),region:a.string().min(1),service:a.string().min(1).default("aws-mcp")}),Vxe=a.preprocess((e)=>{if(typeof e!=="string")return;let t=e.trim();return t.length>0?t:void 0},a.string().min(1).optional()).optional(),Kxe=a.object({accessToken:a.string().min(1),refreshToken:a.string().min(1).optional(),tokenType:a.string().min(1).optional(),scope:Vxe,expiresAt:a.string().datetime().optional()}).transform(({scope:e,...t})=>e===void 0?t:{...t,scope:e}),Yxe=a.object({authMode:a.literal("oauth"),providerId:a.string().min(1),tokens:Kxe,headers:a.array(bB).optional()}),Wxe=a.discriminatedUnion("authMode",[$xe,Hxe,Yxe,qxe]),Jxe=a.string().min(1).regex(/^enc:v1:/,"Encrypted auth config must use enc:v1 format."),Zxe=a.object({codeVerifier:a.string().min(1),clientId:a.string().min(1),clientSecret:a.string().min(1).optional(),tokenEndpointAuthMethod:yB.optional(),tokenUrl:a.string().url().optional(),resourceUrl:a.string().url().optional(),projectId:a.string().uuid().optional(),returnTo:a.string().min(1).max(2000).optional(),messageId:a.string().min(1).max(240).optional(),scopes:a.array(a.string().min(1)).optional()}),Xxe=a.object({type:a.string().optional(),properties:a.record(a.string(),a.unknown()).optional(),required:a.array(a.string()).optional(),additionalProperties:a.boolean().optional()}).catchall(a.unknown()),ePe=a.object({supportsOAuth:a.boolean().default(!1),supportsCustomHeaders:a.boolean().default(!0),supportsToolDiscovery:a.boolean().default(!0),readOnlyToolNames:a.array(a.string()).default([])}),IB=a.object({name:a.string().min(1),title:a.string().min(1),description:a.string().min(1),inputSchema:Xxe,annotations:a.record(a.string(),a.unknown()).default({}),availability:oW,isReadOnly:a.boolean()}),rW=a.object({discoveredAt:a.string().datetime(),tools:a.array(IB)}),iW=a.object({mode:a.enum(["user","system"]),managedBy:a.object({type:a.literal("integration"),id:a.string().min(1),displayName:a.string().min(1),iconKey:a.string().min(1)}).nullable(),capabilities:a.object({canRename:a.boolean(),canEditCredentials:a.boolean(),canSetReadOnly:a.boolean(),canConfigureTools:a.boolean(),canDisconnect:a.boolean()})}),tPe=a.object({id:a.string().uuid(),organizationId:a.string().min(1),projectId:a.string().uuid(),providerId:a.string().min(1),source:tW,displayName:a.string().min(1),connectionKey:a.string().min(1),serverUrl:a.string().url(),transport:XY,authMode:eW,installStatus:nW,installedByUserId:a.string().nullable(),connectedAt:a.string().datetime().nullable(),toolSnapshot:rW.nullable(),enabledToolNames:a.array(a.string()),readOnly:a.boolean().default(!1),version:a.number().int().nonnegative(),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),deletedAt:a.string().datetime().nullable()}),SB=iW});var vB=x(function(ZSt,Zf){var sW,aW,cW,lW,uW,dW,pW,gW,mW,hW,AW,fW,yW,Wf,CB,bW,IW,SW,el,CW,vW,EW,wW,kW,xW,PW,RW,TW,Jf,BW,OW,_W;(function(e){var t=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(r){e(n(t,n(r)))});else if(typeof Zf==="object"&&typeof ZSt==="object")e(n(t,n(ZSt)));else e(n(t));function n(r,o){if(r!==t)if(typeof Object.create==="function")Object.defineProperty(r,"__esModule",{value:!0});else r.__esModule=!0;return function(i,s){return r[i]=o?o(i,s):s}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var c in s)if(Object.prototype.hasOwnProperty.call(s,c))i[c]=s[c]};sW=function(i,s){if(typeof s!=="function"&&s!==null)throw TypeError("Class extends value "+String(s)+" is not a constructor or null");t(i,s);function c(){this.constructor=i}i.prototype=s===null?Object.create(s):(c.prototype=s.prototype,new c)},aW=Object.assign||function(i){for(var s,c=1,l=arguments.length;c<l;c++){s=arguments[c];for(var u in s)if(Object.prototype.hasOwnProperty.call(s,u))i[u]=s[u]}return i},cW=function(i,s){var c={};for(var l in i)if(Object.prototype.hasOwnProperty.call(i,l)&&s.indexOf(l)<0)c[l]=i[l];if(i!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var u=0,l=Object.getOwnPropertySymbols(i);u<l.length;u++)if(s.indexOf(l[u])<0&&Object.prototype.propertyIsEnumerable.call(i,l[u]))c[l[u]]=i[l[u]]}return c},lW=function(i,s,c,l){var u=arguments.length,d=u<3?s:l===null?l=Object.getOwnPropertyDescriptor(s,c):l,p;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")d=Reflect.decorate(i,s,c,l);else for(var g=i.length-1;g>=0;g--)if(p=i[g])d=(u<3?p(d):u>3?p(s,c,d):p(s,c))||d;return u>3&&d&&Object.defineProperty(s,c,d),d},uW=function(i,s){return function(c,l){s(c,l,i)}},dW=function(i,s,c,l,u,d){function p(le){if(le!==void 0&&typeof le!=="function")throw TypeError("Function expected");return le}var g=l.kind,m=g==="getter"?"get":g==="setter"?"set":"value",A=!s&&i?l.static?i:i.prototype:null,f=s||(A?Object.getOwnPropertyDescriptor(A,l.name):{}),S,v=!1;for(var P=c.length-1;P>=0;P--){var O={};for(var K in l)O[K]=K==="access"?{}:l[K];for(var K in l.access)O.access[K]=l.access[K];O.addInitializer=function(le){if(v)throw TypeError("Cannot add initializers after decoration has completed");d.push(p(le||null))};var M=(0,c[P])(g==="accessor"?{get:f.get,set:f.set}:f[m],O);if(g==="accessor"){if(M===void 0)continue;if(M===null||typeof M!=="object")throw TypeError("Object expected");if(S=p(M.get))f.get=S;if(S=p(M.set))f.set=S;if(S=p(M.init))u.unshift(S)}else if(S=p(M))if(g==="field")u.unshift(S);else f[m]=S}if(A)Object.defineProperty(A,l.name,f);v=!0},pW=function(i,s,c){var l=arguments.length>2;for(var u=0;u<s.length;u++)c=l?s[u].call(i,c):s[u].call(i);return l?c:void 0},gW=function(i){return typeof i==="symbol"?i:"".concat(i)},mW=function(i,s,c){if(typeof s==="symbol")s=s.description?"[".concat(s.description,"]"):"";return Object.defineProperty(i,"name",{configurable:!0,value:c?"".concat(c," ",s):s})},hW=function(i,s){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(i,s)},AW=function(i,s,c,l){function u(d){return d instanceof c?d:new c(function(p){p(d)})}return new(c||(c=Promise))(function(d,p){function g(f){try{A(l.next(f))}catch(S){p(S)}}function m(f){try{A(l.throw(f))}catch(S){p(S)}}function A(f){f.done?d(f.value):u(f.value).then(g,m)}A((l=l.apply(i,s||[])).next())})},fW=function(i,s){var c={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},l,u,d,p=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return p.next=g(0),p.throw=g(1),p.return=g(2),typeof Symbol==="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(A){return function(f){return m([A,f])}}function m(A){if(l)throw TypeError("Generator is already executing.");while(p&&(p=0,A[0]&&(c=0)),c)try{if(l=1,u&&(d=A[0]&2?u.return:A[0]?u.throw||((d=u.return)&&d.call(u),0):u.next)&&!(d=d.call(u,A[1])).done)return d;if(u=0,d)A=[A[0]&2,d.value];switch(A[0]){case 0:case 1:d=A;break;case 4:return c.label++,{value:A[1],done:!1};case 5:c.label++,u=A[1],A=[0];continue;case 7:A=c.ops.pop(),c.trys.pop();continue;default:if((d=c.trys,!(d=d.length>0&&d[d.length-1]))&&(A[0]===6||A[0]===2)){c=0;continue}if(A[0]===3&&(!d||A[1]>d[0]&&A[1]<d[3])){c.label=A[1];break}if(A[0]===6&&c.label<d[1]){c.label=d[1],d=A;break}if(d&&c.label<d[2]){c.label=d[2],c.ops.push(A);break}if(d[2])c.ops.pop();c.trys.pop();continue}A=s.call(i,c)}catch(f){A=[6,f],u=0}finally{l=d=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}},yW=function(i,s){for(var c in i)if(c!=="default"&&!Object.prototype.hasOwnProperty.call(s,c))Jf(s,i,c)},Jf=Object.create?function(i,s,c,l){if(l===void 0)l=c;var u=Object.getOwnPropertyDescriptor(s,c);if(!u||("get"in u?!s.__esModule:u.writable||u.configurable))u={enumerable:!0,get:function(){return s[c]}};Object.defineProperty(i,l,u)}:function(i,s,c,l){if(l===void 0)l=c;i[l]=s[c]},Wf=function(i){var s=typeof Symbol==="function"&&Symbol.iterator,c=s&&i[s],l=0;if(c)return c.call(i);if(i&&typeof i.length==="number")return{next:function(){if(i&&l>=i.length)i=void 0;return{value:i&&i[l++],done:!i}}};throw TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},CB=function(i,s){var c=typeof Symbol==="function"&&i[Symbol.iterator];if(!c)return i;var l=c.call(i),u,d=[],p;try{while((s===void 0||s-- >0)&&!(u=l.next()).done)d.push(u.value)}catch(g){p={error:g}}finally{try{if(u&&!u.done&&(c=l.return))c.call(l)}finally{if(p)throw p.error}}return d},bW=function(){for(var i=[],s=0;s<arguments.length;s++)i=i.concat(CB(arguments[s]));return i},IW=function(){for(var i=0,s=0,c=arguments.length;s<c;s++)i+=arguments[s].length;for(var l=Array(i),u=0,s=0;s<c;s++)for(var d=arguments[s],p=0,g=d.length;p<g;p++,u++)l[u]=d[p];return l},SW=function(i,s,c){if(c||arguments.length===2){for(var l=0,u=s.length,d;l<u;l++)if(d||!(l in s)){if(!d)d=Array.prototype.slice.call(s,0,l);d[l]=s[l]}}return i.concat(d||Array.prototype.slice.call(s))},el=function(i){return this instanceof el?(this.v=i,this):new el(i)},CW=function(i,s,c){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var l=c.apply(i,s||[]),u,d=[];return u=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),g("next"),g("throw"),g("return",p),u[Symbol.asyncIterator]=function(){return this},u;function p(P){return function(O){return Promise.resolve(O).then(P,S)}}function g(P,O){if(l[P]){if(u[P]=function(K){return new Promise(function(M,le){d.push([P,K,M,le])>1||m(P,K)})},O)u[P]=O(u[P])}}function m(P,O){try{A(l[P](O))}catch(K){v(d[0][3],K)}}function A(P){P.value instanceof el?Promise.resolve(P.value.v).then(f,S):v(d[0][2],P)}function f(P){m("next",P)}function S(P){m("throw",P)}function v(P,O){if(P(O),d.shift(),d.length)m(d[0][0],d[0][1])}},vW=function(i){var s,c;return s={},l("next"),l("throw",function(u){throw u}),l("return"),s[Symbol.iterator]=function(){return this},s;function l(u,d){s[u]=i[u]?function(p){return(c=!c)?{value:el(i[u](p)),done:!1}:d?d(p):p}:d}},EW=function(i){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var s=i[Symbol.asyncIterator],c;return s?s.call(i):(i=typeof Wf==="function"?Wf(i):i[Symbol.iterator](),c={},l("next"),l("throw"),l("return"),c[Symbol.asyncIterator]=function(){return this},c);function l(d){c[d]=i[d]&&function(p){return new Promise(function(g,m){p=i[d](p),u(g,m,p.done,p.value)})}}function u(d,p,g,m){Promise.resolve(m).then(function(A){d({value:A,done:g})},p)}},wW=function(i,s){if(Object.defineProperty)Object.defineProperty(i,"raw",{value:s});else i.raw=s;return i};var n=Object.create?function(i,s){Object.defineProperty(i,"default",{enumerable:!0,value:s})}:function(i,s){i.default=s},r=function(i){return r=Object.getOwnPropertyNames||function(s){var c=[];for(var l in s)if(Object.prototype.hasOwnProperty.call(s,l))c[c.length]=l;return c},r(i)};kW=function(i){if(i&&i.__esModule)return i;var s={};if(i!=null){for(var c=r(i),l=0;l<c.length;l++)if(c[l]!=="default")Jf(s,i,c[l])}return n(s,i),s},xW=function(i){return i&&i.__esModule?i:{default:i}},PW=function(i,s,c,l){if(c==="a"&&!l)throw TypeError("Private accessor was defined without a getter");if(typeof s==="function"?i!==s||!l:!s.has(i))throw TypeError("Cannot read private member from an object whose class did not declare it");return c==="m"?l:c==="a"?l.call(i):l?l.value:s.get(i)},RW=function(i,s,c,l,u){if(l==="m")throw TypeError("Private method is not writable");if(l==="a"&&!u)throw TypeError("Private accessor was defined without a setter");if(typeof s==="function"?i!==s||!u:!s.has(i))throw TypeError("Cannot write private member to an object whose class did not declare it");return l==="a"?u.call(i,c):u?u.value=c:s.set(i,c),c},TW=function(i,s){if(s===null||typeof s!=="object"&&typeof s!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof i==="function"?s===i:i.has(s)},BW=function(i,s,c){if(s!==null&&s!==void 0){if(typeof s!=="object"&&typeof s!=="function")throw TypeError("Object expected.");var l,u;if(c){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");l=s[Symbol.asyncDispose]}if(l===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(l=s[Symbol.dispose],c)u=l}if(typeof l!=="function")throw TypeError("Object not disposable.");if(u)l=function(){try{u.call(this)}catch(d){return Promise.reject(d)}};i.stack.push({value:s,dispose:l,async:c})}else if(c)i.stack.push({async:!0});return s};var o=typeof SuppressedError==="function"?SuppressedError:function(i,s,c){var l=Error(c);return l.name="SuppressedError",l.error=i,l.suppressed=s,l};OW=function(i){function s(d){i.error=i.hasError?new o(d,i.error,"An error was suppressed during disposal."):d,i.hasError=!0}var c,l=0;function u(){while(c=i.stack.pop())try{if(!c.async&&l===1)return l=0,i.stack.push(c),Promise.resolve().then(u);if(c.dispose){var d=c.dispose.call(c.value);if(c.async)return l|=2,Promise.resolve(d).then(u,function(p){return s(p),u()})}else l|=1}catch(p){s(p)}if(l===1)return i.hasError?Promise.reject(i.error):Promise.resolve();if(i.hasError)throw i.error}return u()},_W=function(i,s){if(typeof i==="string"&&/^\.\.?\//.test(i))return i.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(c,l,u,d,p){return l?s?".jsx":".js":u&&(!d||!p)?c:u+d+"."+p.toLowerCase()+"js"});return i},e("__extends",sW),e("__assign",aW),e("__rest",cW),e("__decorate",lW),e("__param",uW),e("__esDecorate",dW),e("__runInitializers",pW),e("__propKey",gW),e("__setFunctionName",mW),e("__metadata",hW),e("__awaiter",AW),e("__generator",fW),e("__exportStar",yW),e("__createBinding",Jf),e("__values",Wf),e("__read",CB),e("__spread",bW),e("__spreadArrays",IW),e("__spreadArray",SW),e("__await",el),e("__asyncGenerator",CW),e("__asyncDelegator",vW),e("__asyncValues",EW),e("__makeTemplateObject",wW),e("__importStar",kW),e("__importDefault",xW),e("__classPrivateFieldGet",PW),e("__classPrivateFieldSet",RW),e("__classPrivateFieldIn",TW),e("__addDisposableResource",BW),e("__disposeResources",OW),e("__rewriteRelativeImportExtension",_W)})});var EB=x(function(DW){Object.defineProperty(DW,"__esModule",{value:!0});DW.MAX_HASHABLE_LENGTH=DW.INIT=DW.KEY=DW.DIGEST_LENGTH=DW.BLOCK_SIZE=void 0;DW.BLOCK_SIZE=64;DW.DIGEST_LENGTH=32;DW.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);DW.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];DW.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1});var MW=x(function(LW){Object.defineProperty(LW,"__esModule",{value:!0});LW.RawSha256=void 0;var vo=EB(),sPe=function(){function e(){this.state=Int32Array.from(vo.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw Error("Attempted to update an already finished hash.");var n=0,r=t.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>vo.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");while(r>0)if(this.buffer[this.bufferLength++]=t[n++],r--,this.bufferLength===vo.BLOCK_SIZE)this.hashBuffer(),this.bufferLength=0},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%vo.BLOCK_SIZE>=vo.BLOCK_SIZE-8){for(var o=this.bufferLength;o<vo.BLOCK_SIZE;o++)n.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(var o=this.bufferLength;o<vo.BLOCK_SIZE-8;o++)n.setUint8(o,0);n.setUint32(vo.BLOCK_SIZE-8,Math.floor(t/4294967296),!0),n.setUint32(vo.BLOCK_SIZE-4,t),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(vo.DIGEST_LENGTH);for(var o=0;o<8;o++)i[o*4]=this.state[o]>>>24&255,i[o*4+1]=this.state[o]>>>16&255,i[o*4+2]=this.state[o]>>>8&255,i[o*4+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){var t=this,n=t.buffer,r=t.state,o=r[0],i=r[1],s=r[2],c=r[3],l=r[4],u=r[5],d=r[6],p=r[7];for(var g=0;g<vo.BLOCK_SIZE;g++){if(g<16)this.temp[g]=(n[g*4]&255)<<24|(n[g*4+1]&255)<<16|(n[g*4+2]&255)<<8|n[g*4+3]&255;else{var m=this.temp[g-2],A=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10;m=this.temp[g-15];var f=(m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3;this.temp[g]=(A+this.temp[g-7]|0)+(f+this.temp[g-16]|0)}var S=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&u^~l&d)|0)+(p+(vo.KEY[g]+this.temp[g]|0)|0)|0,v=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&i^o&s^i&s)|0;p=d,d=u,u=l,l=c+S|0,c=s,s=i,i=o,o=S+v|0}r[0]+=o,r[1]+=i,r[2]+=s,r[3]+=c,r[4]+=l,r[5]+=u,r[6]+=d,r[7]+=p},e}();LW.RawSha256=sPe});var UW=x(function(tCt,jW){var{defineProperty:Xf,getOwnPropertyDescriptor:aPe,getOwnPropertyNames:cPe}=Object,lPe=Object.prototype.hasOwnProperty,uPe=(e,t)=>Xf(e,"name",{value:t,configurable:!0}),dPe=(e,t)=>{for(var n in t)Xf(e,n,{get:t[n],enumerable:!0})},pPe=(e,t,n,r)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of cPe(t))if(!lPe.call(e,o)&&o!==n)Xf(e,o,{get:()=>t[o],enumerable:!(r=aPe(t,o))||r.enumerable})}return e},gPe=(e)=>pPe(Xf({},"__esModule",{value:!0}),e),zW={};dPe(zW,{isArrayBuffer:()=>mPe});jW.exports=gPe(zW);var mPe=uPe((e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]","isArrayBuffer")});var HW=x(function(nCt,GW){var{defineProperty:ey,getOwnPropertyDescriptor:hPe,getOwnPropertyNames:APe}=Object,fPe=Object.prototype.hasOwnProperty,FW=(e,t)=>ey(e,"name",{value:t,configurable:!0}),yPe=(e,t)=>{for(var n in t)ey(e,n,{get:t[n],enumerable:!0})},bPe=(e,t,n,r)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of APe(t))if(!fPe.call(e,o)&&o!==n)ey(e,o,{get:()=>t[o],enumerable:!(r=hPe(t,o))||r.enumerable})}return e},IPe=(e)=>bPe(ey({},"__esModule",{value:!0}),e),$W={};yPe($W,{fromArrayBuffer:()=>CPe,fromString:()=>vPe});GW.exports=IPe($W);var SPe=UW(),wB=F("buffer"),CPe=FW((e,t=0,n=e.byteLength-t)=>{if(!(0,SPe.isArrayBuffer)(e))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return wB.Buffer.from(e,t,n)},"fromArrayBuffer"),vPe=FW((e,t)=>{if(typeof e!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?wB.Buffer.from(e,t):wB.Buffer.from(e)},"fromString")});var WW=x(function(oCt,YW){var{defineProperty:ty,getOwnPropertyDescriptor:EPe,getOwnPropertyNames:wPe}=Object,kPe=Object.prototype.hasOwnProperty,kB=(e,t)=>ty(e,"name",{value:t,configurable:!0}),xPe=(e,t)=>{for(var n in t)ty(e,n,{get:t[n],enumerable:!0})},PPe=(e,t,n,r)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of wPe(t))if(!kPe.call(e,o)&&o!==n)ty(e,o,{get:()=>t[o],enumerable:!(r=EPe(t,o))||r.enumerable})}return e},RPe=(e)=>PPe(ty({},"__esModule",{value:!0}),e),qW={};xPe(qW,{fromUtf8:()=>KW,toUint8Array:()=>TPe,toUtf8:()=>BPe});YW.exports=RPe(qW);var VW=HW(),KW=kB((e)=>{let t=(0,VW.fromString)(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),TPe=kB((e)=>{if(typeof e==="string")return KW(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)},"toUint8Array"),BPe=kB((e)=>{if(typeof e==="string")return e;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return(0,VW.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength).toString("utf8")},"toUtf8")});var XW=x(function(JW){Object.defineProperty(JW,"__esModule",{value:!0});JW.convertToBuffer=void 0;var OPe=WW(),_Pe=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:OPe.fromUtf8;function DPe(e){if(e instanceof Uint8Array)return e;if(typeof e==="string")return _Pe(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)}JW.convertToBuffer=DPe});var nJ=x(function(eJ){Object.defineProperty(eJ,"__esModule",{value:!0});eJ.isEmptyData=void 0;function QPe(e){if(typeof e==="string")return e.length===0;return e.byteLength===0}eJ.isEmptyData=QPe});var iJ=x(function(oJ){Object.defineProperty(oJ,"__esModule",{value:!0});oJ.numToUint8=void 0;function LPe(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}oJ.numToUint8=LPe});var cJ=x(function(sJ){Object.defineProperty(sJ,"__esModule",{value:!0});sJ.uint32ArrayFrom=void 0;function NPe(e){if(!Uint32Array.from){var t=new Uint32Array(e.length),n=0;while(n<e.length)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}sJ.uint32ArrayFrom=NPe});var lJ=x(function(tl){Object.defineProperty(tl,"__esModule",{value:!0});tl.uint32ArrayFrom=tl.numToUint8=tl.isEmptyData=tl.convertToBuffer=void 0;var MPe=XW();Object.defineProperty(tl,"convertToBuffer",{enumerable:!0,get:function(){return MPe.convertToBuffer}});var zPe=nJ();Object.defineProperty(tl,"isEmptyData",{enumerable:!0,get:function(){return zPe.isEmptyData}});var jPe=iJ();Object.defineProperty(tl,"numToUint8",{enumerable:!0,get:function(){return jPe.numToUint8}});var UPe=cJ();Object.defineProperty(tl,"uint32ArrayFrom",{enumerable:!0,get:function(){return UPe.uint32ArrayFrom}})});var gJ=x(function(dJ){Object.defineProperty(dJ,"__esModule",{value:!0});dJ.Sha256=void 0;var uJ=vB(),oy=EB(),ny=MW(),xB=lJ(),$Pe=function(){function e(t){this.secret=t,this.hash=new ny.RawSha256,this.reset()}return e.prototype.update=function(t){if((0,xB.isEmptyData)(t)||this.error)return;try{this.hash.update((0,xB.convertToBuffer)(t))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;if(this.outer){if(!this.outer.finished)this.outer.update(this.hash.digest());return this.outer.digest()}return this.hash.digest()},e.prototype.digest=function(){return uJ.__awaiter(this,void 0,void 0,function(){return uJ.__generator(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new ny.RawSha256,this.secret){this.outer=new ny.RawSha256;var t=GPe(this.secret),n=new Uint8Array(oy.BLOCK_SIZE);n.set(t);for(var r=0;r<oy.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(var r=0;r<t.byteLength;r++)t[r]=0}},e}();dJ.Sha256=$Pe;function GPe(e){var t=(0,xB.convertToBuffer)(e);if(t.byteLength>oy.BLOCK_SIZE){var n=new ny.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(oy.BLOCK_SIZE);return r.set(t),r}});var mJ=x(function(PB){Object.defineProperty(PB,"__esModule",{value:!0});var HPe=vB();HPe.__exportStar(gJ(),PB)});var ry=()=>{};var hJ="io.modelcontextprotocol/related-task",sy="2.0",Ut,AJ,fJ,hCt,qPe,VPe,RB,so,ay,nn,Eo,wo,on,cy,KPe,YPe,yJ,yp,bJ,IJ,ACt,TB,WPe,BB,JPe,bp,nl,SJ,ZPe,XPe,eRe,tRe,nRe,oRe,rRe,iRe,CJ,sRe,OB,aRe,cRe,_B,lRe,Ip,Sp,uRe,Cp,ly,dRe,DB,QB,LB,NB,fCt,MB,zB,jB,pRe,vJ,EJ,UB,wJ,vp,ol,kJ,gRe,mRe,xJ,hRe,PJ,FB,ARe,fRe,RJ,TJ,yRe,bRe,IRe,SRe,CRe,vRe,ERe,wRe,kRe,BJ,xRe,PRe,$B,GB,HB,RRe,TRe,BRe,qB,ORe,OJ,_J,_Re,DRe,DJ,QRe,QJ,uy,yCt,LRe,NRe,LJ,MRe,NJ,zRe,jRe,URe,FRe,$Re,GRe,HRe,qRe,VRe,iy,KRe,YRe,MJ,zJ,jJ,WRe,JRe,ZRe,XRe,eTe,tTe,nTe,oTe,rTe,iTe,sTe,aTe,cTe,lTe,uTe,UJ,dTe,pTe,FJ,gTe,mTe,hTe,ATe,$J,fTe,yTe,bTe,ITe,bCt,ICt,SCt,CCt,vCt,ECt;var qs=h(()=>{hB();Ut=WA((e)=>e!==null&&(typeof e==="object"||typeof e==="function")),AJ=ut([k(),je().int()]),fJ=k(),hCt=Tt({ttl:je().optional(),pollInterval:je().optional()}),qPe=ne({ttl:je().optional()}),VPe=ne({taskId:k()}),RB=Tt({progressToken:AJ.optional(),[hJ]:VPe.optional()}),so=ne({_meta:RB.optional()}),ay=so.extend({task:qPe.optional()}),nn=ne({method:k(),params:so.loose().optional()}),Eo=ne({_meta:RB.optional()}),wo=ne({method:k(),params:Eo.loose().optional()}),on=Tt({_meta:RB.optional()}),cy=ut([k(),je().int()]),KPe=ne({jsonrpc:ue(sy),id:cy,...nn.shape}).strict(),YPe=ne({jsonrpc:ue(sy),...wo.shape}).strict(),yJ=ne({jsonrpc:ue(sy),id:cy,result:on}).strict();(function(e){e[e.ConnectionClosed=-32000]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(yp||(yp={}));bJ=ne({jsonrpc:ue(sy),id:cy.optional(),error:ne({code:je().int(),message:k(),data:lt().optional()})}).strict(),IJ=ut([KPe,YPe,yJ,bJ]),ACt=ut([yJ,bJ]),TB=on.strict(),WPe=Eo.extend({requestId:cy.optional(),reason:k().optional()}),BB=wo.extend({method:ue("notifications/cancelled"),params:WPe}),JPe=ne({src:k(),mimeType:k().optional(),sizes:ee(k()).optional(),theme:tn(["light","dark"]).optional()}),bp=ne({icons:ee(JPe).optional()}),nl=ne({name:k(),title:k().optional()}),SJ=nl.extend({...nl.shape,...bp.shape,version:k(),websiteUrl:k().optional(),description:k().optional()}),ZPe=Lc(ne({applyDefaults:Xe().optional()}),tt(k(),lt())),XPe=ap((e)=>{if(e&&typeof e==="object"&&!Array.isArray(e)){if(Object.keys(e).length===0)return{form:{}}}return e},Lc(ne({form:ZPe.optional(),url:Ut.optional()}),tt(k(),lt()).optional())),eRe=Tt({list:Ut.optional(),cancel:Ut.optional(),requests:Tt({sampling:Tt({createMessage:Ut.optional()}).optional(),elicitation:Tt({create:Ut.optional()}).optional()}).optional()}),tRe=Tt({list:Ut.optional(),cancel:Ut.optional(),requests:Tt({tools:Tt({call:Ut.optional()}).optional()}).optional()}),nRe=ne({experimental:tt(k(),Ut).optional(),sampling:ne({context:Ut.optional(),tools:Ut.optional()}).optional(),elicitation:XPe.optional(),roots:ne({listChanged:Xe().optional()}).optional(),tasks:eRe.optional(),extensions:tt(k(),Ut).optional()}),oRe=so.extend({protocolVersion:k(),capabilities:nRe,clientInfo:SJ}),rRe=nn.extend({method:ue("initialize"),params:oRe}),iRe=ne({experimental:tt(k(),Ut).optional(),logging:Ut.optional(),completions:Ut.optional(),prompts:ne({listChanged:Xe().optional()}).optional(),resources:ne({subscribe:Xe().optional(),listChanged:Xe().optional()}).optional(),tools:ne({listChanged:Xe().optional()}).optional(),tasks:tRe.optional(),extensions:tt(k(),Ut).optional()}),CJ=on.extend({protocolVersion:k(),capabilities:iRe,serverInfo:SJ,instructions:k().optional()}),sRe=wo.extend({method:ue("notifications/initialized"),params:Eo.optional()}),OB=nn.extend({method:ue("ping"),params:so.optional()}),aRe=ne({progress:je(),total:pt(je()),message:pt(k())}),cRe=ne({...Eo.shape,...aRe.shape,progressToken:AJ}),_B=wo.extend({method:ue("notifications/progress"),params:cRe}),lRe=so.extend({cursor:fJ.optional()}),Ip=nn.extend({params:lRe.optional()}),Sp=on.extend({nextCursor:fJ.optional()}),uRe=tn(["working","input_required","completed","failed","cancelled"]),Cp=ne({taskId:k(),status:uRe,ttl:ut([je(),ep()]),createdAt:k(),lastUpdatedAt:k(),pollInterval:pt(je()),statusMessage:pt(k())}),ly=on.extend({task:Cp}),dRe=Eo.merge(Cp),DB=wo.extend({method:ue("notifications/tasks/status"),params:dRe}),QB=nn.extend({method:ue("tasks/get"),params:so.extend({taskId:k()})}),LB=on.merge(Cp),NB=nn.extend({method:ue("tasks/result"),params:so.extend({taskId:k()})}),fCt=on.loose(),MB=Ip.extend({method:ue("tasks/list")}),zB=Sp.extend({tasks:ee(Cp)}),jB=nn.extend({method:ue("tasks/cancel"),params:so.extend({taskId:k()})}),pRe=on.merge(Cp),vJ=ne({uri:k(),mimeType:pt(k()),_meta:tt(k(),lt()).optional()}),EJ=vJ.extend({text:k()}),UB=k().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),wJ=vJ.extend({blob:UB}),vp=tn(["user","assistant"]),ol=ne({audience:ee(vp).optional(),priority:je().min(0).max(1).optional(),lastModified:Li.datetime({offset:!0}).optional()}),kJ=ne({...nl.shape,...bp.shape,uri:k(),description:pt(k()),mimeType:pt(k()),size:pt(je()),annotations:ol.optional(),_meta:pt(Tt({}))}),gRe=ne({...nl.shape,...bp.shape,uriTemplate:k(),description:pt(k()),mimeType:pt(k()),annotations:ol.optional(),_meta:pt(Tt({}))}),mRe=Ip.extend({method:ue("resources/list")}),xJ=Sp.extend({resources:ee(kJ)}),hRe=Ip.extend({method:ue("resources/templates/list")}),PJ=Sp.extend({resourceTemplates:ee(gRe)}),FB=so.extend({uri:k()}),ARe=FB,fRe=nn.extend({method:ue("resources/read"),params:ARe}),RJ=on.extend({contents:ee(ut([EJ,wJ]))}),TJ=wo.extend({method:ue("notifications/resources/list_changed"),params:Eo.optional()}),yRe=FB,bRe=nn.extend({method:ue("resources/subscribe"),params:yRe}),IRe=FB,SRe=nn.extend({method:ue("resources/unsubscribe"),params:IRe}),CRe=Eo.extend({uri:k()}),vRe=wo.extend({method:ue("notifications/resources/updated"),params:CRe}),ERe=ne({name:k(),description:pt(k()),required:pt(Xe())}),wRe=ne({...nl.shape,...bp.shape,description:pt(k()),arguments:pt(ee(ERe)),_meta:pt(Tt({}))}),kRe=Ip.extend({method:ue("prompts/list")}),BJ=Sp.extend({prompts:ee(wRe)}),xRe=so.extend({name:k(),arguments:tt(k(),k()).optional()}),PRe=nn.extend({method:ue("prompts/get"),params:xRe}),$B=ne({type:ue("text"),text:k(),annotations:ol.optional(),_meta:tt(k(),lt()).optional()}),GB=ne({type:ue("image"),data:UB,mimeType:k(),annotations:ol.optional(),_meta:tt(k(),lt()).optional()}),HB=ne({type:ue("audio"),data:UB,mimeType:k(),annotations:ol.optional(),_meta:tt(k(),lt()).optional()}),RRe=ne({type:ue("tool_use"),name:k(),id:k(),input:tt(k(),lt()),_meta:tt(k(),lt()).optional()}),TRe=ne({type:ue("resource"),resource:ut([EJ,wJ]),annotations:ol.optional(),_meta:tt(k(),lt()).optional()}),BRe=kJ.extend({type:ue("resource_link")}),qB=ut([$B,GB,HB,BRe,TRe]),ORe=ne({role:vp,content:qB}),OJ=on.extend({description:k().optional(),messages:ee(ORe)}),_J=wo.extend({method:ue("notifications/prompts/list_changed"),params:Eo.optional()}),_Re=ne({title:k().optional(),readOnlyHint:Xe().optional(),destructiveHint:Xe().optional(),idempotentHint:Xe().optional(),openWorldHint:Xe().optional()}),DRe=ne({taskSupport:tn(["required","optional","forbidden"]).optional()}),DJ=ne({...nl.shape,...bp.shape,description:k().optional(),inputSchema:ne({type:ue("object"),properties:tt(k(),Ut).optional(),required:ee(k()).optional()}).catchall(lt()),outputSchema:ne({type:ue("object"),properties:tt(k(),Ut).optional(),required:ee(k()).optional()}).catchall(lt()).optional(),annotations:_Re.optional(),execution:DRe.optional(),_meta:tt(k(),lt()).optional()}),QRe=Ip.extend({method:ue("tools/list")}),QJ=Sp.extend({tools:ee(DJ)}),uy=on.extend({content:ee(qB).default([]),structuredContent:tt(k(),lt()).optional(),isError:Xe().optional()}),yCt=uy.or(on.extend({toolResult:lt()})),LRe=ay.extend({name:k(),arguments:tt(k(),lt()).optional()}),NRe=nn.extend({method:ue("tools/call"),params:LRe}),LJ=wo.extend({method:ue("notifications/tools/list_changed"),params:Eo.optional()}),MRe=ne({autoRefresh:Xe().default(!0),debounceMs:je().int().nonnegative().default(300)}),NJ=tn(["debug","info","notice","warning","error","critical","alert","emergency"]),zRe=so.extend({level:NJ}),jRe=nn.extend({method:ue("logging/setLevel"),params:zRe}),URe=Eo.extend({level:NJ,logger:k().optional(),data:lt()}),FRe=wo.extend({method:ue("notifications/message"),params:URe}),$Re=ne({name:k().optional()}),GRe=ne({hints:ee($Re).optional(),costPriority:je().min(0).max(1).optional(),speedPriority:je().min(0).max(1).optional(),intelligencePriority:je().min(0).max(1).optional()}),HRe=ne({mode:tn(["auto","required","none"]).optional()}),qRe=ne({type:ue("tool_result"),toolUseId:k().describe("The unique identifier for the corresponding tool call."),content:ee(qB).default([]),structuredContent:ne({}).loose().optional(),isError:Xe().optional(),_meta:tt(k(),lt()).optional()}),VRe=rp("type",[$B,GB,HB]),iy=rp("type",[$B,GB,HB,RRe,qRe]),KRe=ne({role:vp,content:ut([iy,ee(iy)]),_meta:tt(k(),lt()).optional()}),YRe=ay.extend({messages:ee(KRe),modelPreferences:GRe.optional(),systemPrompt:k().optional(),includeContext:tn(["none","thisServer","allServers"]).optional(),temperature:je().optional(),maxTokens:je().int(),stopSequences:ee(k()).optional(),metadata:Ut.optional(),tools:ee(DJ).optional(),toolChoice:HRe.optional()}),MJ=nn.extend({method:ue("sampling/createMessage"),params:YRe}),zJ=on.extend({model:k(),stopReason:pt(tn(["endTurn","stopSequence","maxTokens"]).or(k())),role:vp,content:VRe}),jJ=on.extend({model:k(),stopReason:pt(tn(["endTurn","stopSequence","maxTokens","toolUse"]).or(k())),role:vp,content:ut([iy,ee(iy)])}),WRe=ne({type:ue("boolean"),title:k().optional(),description:k().optional(),default:Xe().optional()}),JRe=ne({type:ue("string"),title:k().optional(),description:k().optional(),minLength:je().optional(),maxLength:je().optional(),format:tn(["email","uri","date","date-time"]).optional(),default:k().optional()}),ZRe=ne({type:tn(["number","integer"]),title:k().optional(),description:k().optional(),minimum:je().optional(),maximum:je().optional(),default:je().optional()}),XRe=ne({type:ue("string"),title:k().optional(),description:k().optional(),enum:ee(k()),default:k().optional()}),eTe=ne({type:ue("string"),title:k().optional(),description:k().optional(),oneOf:ee(ne({const:k(),title:k()})),default:k().optional()}),tTe=ne({type:ue("string"),title:k().optional(),description:k().optional(),enum:ee(k()),enumNames:ee(k()).optional(),default:k().optional()}),nTe=ut([XRe,eTe]),oTe=ne({type:ue("array"),title:k().optional(),description:k().optional(),minItems:je().optional(),maxItems:je().optional(),items:ne({type:ue("string"),enum:ee(k())}),default:ee(k()).optional()}),rTe=ne({type:ue("array"),title:k().optional(),description:k().optional(),minItems:je().optional(),maxItems:je().optional(),items:ne({anyOf:ee(ne({const:k(),title:k()}))}),default:ee(k()).optional()}),iTe=ut([oTe,rTe]),sTe=ut([tTe,nTe,iTe]),aTe=ut([sTe,WRe,JRe,ZRe]),cTe=ay.extend({mode:ue("form").optional(),message:k(),requestedSchema:ne({type:ue("object"),properties:tt(k(),aTe),required:ee(k()).optional()})}),lTe=ay.extend({mode:ue("url"),message:k(),elicitationId:k(),url:k().url()}),uTe=ut([cTe,lTe]),UJ=nn.extend({method:ue("elicitation/create"),params:uTe}),dTe=Eo.extend({elicitationId:k()}),pTe=wo.extend({method:ue("notifications/elicitation/complete"),params:dTe}),FJ=on.extend({action:tn(["accept","decline","cancel"]),content:ap((e)=>e===null?void 0:e,tt(k(),ut([k(),je(),Xe(),ee(k())])).optional())}),gTe=ne({type:ue("ref/resource"),uri:k()}),mTe=ne({type:ue("ref/prompt"),name:k()}),hTe=so.extend({ref:ut([mTe,gTe]),argument:ne({name:k(),value:k()}),context:ne({arguments:tt(k(),k()).optional()}).optional()}),ATe=nn.extend({method:ue("completion/complete"),params:hTe}),$J=on.extend({completion:Tt({values:ee(k()).max(100),total:pt(je().int()),hasMore:pt(Xe())})}),fTe=ne({uri:k().startsWith("file://"),name:k().optional(),_meta:tt(k(),lt()).optional()}),yTe=nn.extend({method:ue("roots/list"),params:so.optional()}),bTe=on.extend({roots:ee(fTe)}),ITe=wo.extend({method:ue("notifications/roots/list_changed"),params:Eo.optional()}),bCt=ut([OB,rRe,ATe,jRe,PRe,kRe,mRe,hRe,fRe,bRe,SRe,NRe,QRe,QB,NB,MB,jB]),ICt=ut([BB,_B,sRe,ITe,DB]),SCt=ut([TB,zJ,jJ,FJ,bTe,LB,zB,ly]),CCt=ut([OB,MJ,UJ,yTe,QB,NB,MB,jB]),vCt=ut([BB,_B,FRe,vRe,TJ,LJ,_J,DB,pTe]),ECt=ut([TB,CJ,$J,OJ,BJ,xJ,PJ,RJ,uy,QJ,LB,zB,ly])});var STe;var dy=h(()=>{STe=Symbol("Let zodToJsonSchema decide on which parser to use")});var VB=h(()=>{dy()});var ko=()=>{};var KB=h(()=>{Dt()});var YB=()=>{};var py=h(()=>{Dt()});var WB=h(()=>{Dt()});var JB=()=>{};var ZB=h(()=>{Dt()});var XB=h(()=>{Dt();ko()});var eO=h(()=>{Dt()});var ovt;var gy=h(()=>{ovt=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});var my=h(()=>{Dt();gy();py();ko()});var tO=h(()=>{Dt();my();ko()});var nO=h(()=>{ko()});var hy=h(()=>{Dt()});var oO=h(()=>{Dt();hy()});var rO=()=>{};var iO=h(()=>{Dt()});var sO=h(()=>{Dt();ko()});var aO=h(()=>{Dt()});var cO=h(()=>{Dt()});var lO=h(()=>{Dt()});var uO=h(()=>{Dt()});var dO=h(()=>{ko()});var pO=h(()=>{ko()});var gO=h(()=>{Dt()});var mO=h(()=>{ko();KB();YB();py();WB();JB();ZB();XB();eO();tO();nO();oO();rO();iO();sO();aO();cO();my();lO();gy();uO();dO();hy();pO();gO()});var Dt=h(()=>{dy();mO();ko()});var GJ=()=>{};var hO=h(()=>{Dt();VB();ko()});var HJ=h(()=>{hO();dy();VB();Dt();GJ();ko();KB();YB();py();WB();JB();ZB();XB();eO();tO();nO();oO();rO();iO();sO();aO();cO();gO();my();lO();gy();uO();dO();hy();pO();mO();hO()});var VJ=h(()=>{ry();HJ()});var YJ=h(()=>{ry();qs();VJ()});var kp=x(function(ZJ){Object.defineProperty(ZJ,"__esModule",{value:!0});ZJ.regexpCode=ZJ.getEsmExportName=ZJ.getProperty=ZJ.safeStringify=ZJ.stringify=ZJ.strConcat=ZJ.addCodeArg=ZJ.str=ZJ._=ZJ.nil=ZJ._Code=ZJ.Name=ZJ.IDENTIFIER=ZJ._CodeOrName=void 0;class Ay{}ZJ._CodeOrName=Ay;ZJ.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class rl extends Ay{constructor(e){super();if(!ZJ.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}ZJ.Name=rl;class qo extends Ay{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>{if(n instanceof rl)t[n.str]=(t[n.str]||0)+1;return t},{})}}ZJ._Code=qo;ZJ.nil=new qo("");function WJ(e,...t){let n=[e[0]],r=0;while(r<t.length)fO(n,t[r]),n.push(e[++r]);return new qo(n)}ZJ._=WJ;var AO=new qo("+");function JJ(e,...t){let n=[wp(e[0])],r=0;while(r<t.length)n.push(AO),fO(n,t[r]),n.push(AO,wp(e[++r]));return BTe(n),new qo(n)}ZJ.str=JJ;function fO(e,t){if(t instanceof qo)e.push(...t._items);else if(t instanceof rl)e.push(t);else e.push(DTe(t))}ZJ.addCodeArg=fO;function BTe(e){let t=1;while(t<e.length-1){if(e[t]===AO){let n=OTe(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function OTe(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof rl||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof rl))return`"${e}${t.slice(1)}`;return}function _Te(e,t){return t.emptyStr()?e:e.emptyStr()?t:JJ`${e}${t}`}ZJ.strConcat=_Te;function DTe(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:wp(Array.isArray(e)?e.join(","):e)}function QTe(e){return new qo(wp(e))}ZJ.stringify=QTe;function wp(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ZJ.safeStringify=wp;function LTe(e){return typeof e=="string"&&ZJ.IDENTIFIER.test(e)?new qo(`.${e}`):WJ`[${e}]`}ZJ.getProperty=LTe;function NTe(e){if(typeof e=="string"&&ZJ.IDENTIFIER.test(e))return new qo(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ZJ.getEsmExportName=NTe;function MTe(e){return new qo(e.toString())}ZJ.regexpCode=MTe});var SO=x(function(n4){Object.defineProperty(n4,"__esModule",{value:!0});n4.ValueScope=n4.ValueScopeName=n4.Scope=n4.varKinds=n4.UsedValueState=void 0;var Fn=kp();class e4 extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var yy;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(yy||(n4.UsedValueState=yy={}));n4.varKinds={const:new Fn.Name("const"),let:new Fn.Name("let"),var:new Fn.Name("var")};class bO{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Fn.Name?e:this.name(e)}name(e){return new Fn.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}n4.Scope=bO;class IO extends Fn.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=Fn._`.${new Fn.Name(t)}[${n}]`}}n4.ValueScopeName=IO;var JTe=Fn._`\n`;class t4 extends bO{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?JTe:Fn.nil}}get(){return this._scope}name(e){return new IO(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let r=this.toName(e),{prefix:o}=r,i=(n=t.key)!==null&&n!==void 0?n:t.ref,s=this._values[o];if(s){let u=s.get(i);if(u)return u}else s=this._values[o]=new Map;s.set(i,r);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=t.ref,r.setValue(t,{property:o,itemIndex:l}),r}getValue(e,t){let n=this._values[e];if(!n)return;return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(n)=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return Fn._`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,(r)=>{if(r.value===void 0)throw Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,n)}_reduceValues(e,t,n={},r){let o=Fn.nil;for(let i in e){let s=e[i];if(!s)continue;let c=n[i]=n[i]||new Map;s.forEach((l)=>{if(c.has(l))return;c.set(l,yy.Started);let u=t(l);if(u){let d=this.opts.es5?n4.varKinds.var:n4.varKinds.const;o=Fn._`${o}${d} ${l} = ${u};${this.opts._n}`}else if(u=r===null||r===void 0?void 0:r(l))o=Fn._`${o}${u}${this.opts._n}`;else throw new e4(l);c.set(l,yy.Completed)})}return o}}n4.ValueScope=t4});var Ne=x(function($n){Object.defineProperty($n,"__esModule",{value:!0});$n.or=$n.and=$n.not=$n.CodeGen=$n.operators=$n.varKinds=$n.ValueScopeName=$n.ValueScope=$n.Scope=$n.Name=$n.regexpCode=$n.stringify=$n.getProperty=$n.nil=$n.strConcat=$n.str=$n._=void 0;var Ue=kp(),Vo=SO(),Ni=kp();Object.defineProperty($n,"_",{enumerable:!0,get:function(){return Ni._}});Object.defineProperty($n,"str",{enumerable:!0,get:function(){return Ni.str}});Object.defineProperty($n,"strConcat",{enumerable:!0,get:function(){return Ni.strConcat}});Object.defineProperty($n,"nil",{enumerable:!0,get:function(){return Ni.nil}});Object.defineProperty($n,"getProperty",{enumerable:!0,get:function(){return Ni.getProperty}});Object.defineProperty($n,"stringify",{enumerable:!0,get:function(){return Ni.stringify}});Object.defineProperty($n,"regexpCode",{enumerable:!0,get:function(){return Ni.regexpCode}});Object.defineProperty($n,"Name",{enumerable:!0,get:function(){return Ni.Name}});var Ey=SO();Object.defineProperty($n,"Scope",{enumerable:!0,get:function(){return Ey.Scope}});Object.defineProperty($n,"ValueScope",{enumerable:!0,get:function(){return Ey.ValueScope}});Object.defineProperty($n,"ValueScopeName",{enumerable:!0,get:function(){return Ey.ValueScopeName}});Object.defineProperty($n,"varKinds",{enumerable:!0,get:function(){return Ey.varKinds}});$n.operators={GT:new Ue._Code(">"),GTE:new Ue._Code(">="),LT:new Ue._Code("<"),LTE:new Ue._Code("<="),EQ:new Ue._Code("==="),NEQ:new Ue._Code("!=="),NOT:new Ue._Code("!"),OR:new Ue._Code("||"),AND:new Ue._Code("&&"),ADD:new Ue._Code("+")};class Mi{optimizeNodes(){return this}optimizeNames(e,t){return this}}class r4 extends Mi{constructor(e,t,n){super();this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?Vo.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${r};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=sl(this.rhs,e,t);return this}get names(){return this.rhs instanceof Ue._CodeOrName?this.rhs.names:{}}}class EO extends Mi{constructor(e,t,n){super();this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof Ue.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=sl(this.rhs,e,t),this}get names(){let e=this.lhs instanceof Ue.Name?{}:{...this.lhs.names};return vy(e,this.rhs)}}class i4 extends EO{constructor(e,t,n,r){super(e,n,r);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class s4 extends Mi{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class a4 extends Mi{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class c4 extends Mi{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class l4 extends Mi{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=sl(this.code,e,t),this}get names(){return this.code instanceof Ue._CodeOrName?this.code.names:{}}}class wy extends Mi{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let n=e[t].optimizeNodes();if(Array.isArray(n))e.splice(t,1,...n);else if(n)e[t]=n;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;while(r--){let o=n[r];if(o.optimizeNames(e,t))continue;tBe(e,o.names),n.splice(r,1)}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Vs(e,t.names),{})}}class zi extends wy{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class u4 extends wy{}class xp extends zi{}xp.kind="else";class Zr extends zi{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new xp(n):n}if(t){if(e===!1)return t instanceof Zr?t:t.nodes;if(this.nodes.length)return this;return new Zr(h4(e),t instanceof Zr?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=sl(this.condition,e,t),this}get names(){let e=super.names;if(vy(e,this.condition),this.else)Vs(e,this.else.names);return e}}Zr.kind="if";class il extends zi{}il.kind="for";class d4 extends il{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=sl(this.iteration,e,t),this}get names(){return Vs(super.names,this.iteration.names)}}class p4 extends il{constructor(e,t,n,r){super();this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?Vo.varKinds.var:this.varKind,{name:n,from:r,to:o}=this;return`for(${t} ${n}=${r}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=vy(super.names,this.from);return vy(e,this.to)}}class CO extends il{constructor(e,t,n,r){super();this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=sl(this.iterable,e,t),this}get names(){return Vs(super.names,this.iterable.names)}}class by extends zi{constructor(e,t,n){super();this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}by.kind="func";class Iy extends wy{render(e){return"return "+super.render(e)}}Iy.kind="return";class g4 extends zi{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(r=this.finally)===null||r===void 0||r.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)Vs(e,this.catch.names);if(this.finally)Vs(e,this.finally.names);return e}}class Sy extends zi{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Sy.kind="catch";class Cy extends zi{render(e){return"finally"+super.render(e)}}Cy.kind="finally";class m4{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
7413
7413
  `:""},this._extScope=e,this._scope=new Vo.Scope({parent:e}),this._nodes=[new u4]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let o=this._scope.toName(t);if(n!==void 0&&r)this._constants[o.str]=n;return this._leafNode(new r4(e,o,n)),o}const(e,t,n){return this._def(Vo.varKinds.const,e,t,n)}let(e,t,n){return this._def(Vo.varKinds.let,e,t,n)}var(e,t,n){return this._def(Vo.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new EO(e,t,n))}add(e,t){return this._leafNode(new i4(e,$n.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==Ue.nil)this._leafNode(new l4(e));return this}object(...e){let t=["{"];for(let[n,r]of e){if(t.length>1)t.push(",");if(t.push(n),n!==r||this.opts.es5)t.push(":"),(0,Ue.addCodeArg)(t,r)}return t.push("}"),new Ue._Code(t)}if(e,t,n){if(this._blockNode(new Zr(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Zr(e))}else(){return this._elseNode(new xp)}endIf(){return this._endBlockNode(Zr,xp)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new d4(e),t)}forRange(e,t,n,r,o=this.opts.es5?Vo.varKinds.var:Vo.varKinds.let){let i=this._scope.toName(e);return this._for(new p4(o,i,t,n),()=>r(i))}forOf(e,t,n,r=Vo.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let i=t instanceof Ue.Name?t:this.var("_arr",t);return this.forRange("_i",0,Ue._`${i}.length`,(s)=>{this.var(o,Ue._`${i}[${s}]`),n(o)})}return this._for(new CO("of",r,o,t),()=>n(o))}forIn(e,t,n,r=this.opts.es5?Vo.varKinds.var:Vo.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,Ue._`Object.keys(${t})`,n);let o=this._scope.toName(e);return this._for(new CO("in",r,o,t),()=>n(o))}endFor(){return this._endBlockNode(il)}label(e){return this._leafNode(new s4(e))}break(e){return this._leafNode(new a4(e))}return(e){let t=new Iy;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(Iy)}try(e,t,n){if(!t&&!n)throw Error('CodeGen: "try" without "catch" and "finally"');let r=new g4;if(this._blockNode(r),this.code(e),t){let o=this.name("e");this._currNode=r.catch=new Sy(o),t(o)}if(n)this._currNode=r.finally=new Cy,this.code(n);return this._endBlockNode(Sy,Cy)}throw(e){return this._leafNode(new c4(e))}block(e,t){if(this._blockStarts.push(this._nodes.length),e)this.code(e).endBlock(t);return this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=Ue.nil,n,r){if(this._blockNode(new by(e,t,n)),r)this.code(r).endFunc();return this}endFunc(){return this._endBlockNode(by)}optimize(e=1){while(e-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Zr))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}$n.CodeGen=m4;function Vs(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function vy(e,t){return t instanceof Ue._CodeOrName?Vs(e,t.names):e}function sl(e,t,n){if(e instanceof Ue.Name)return r(e);if(!o(e))return e;return new Ue._Code(e._items.reduce((i,s)=>{if(s instanceof Ue.Name)s=r(s);if(s instanceof Ue._Code)i.push(...s._items);else i.push(s);return i},[]));function r(i){let s=n[i.str];if(s===void 0||t[i.str]!==1)return i;return delete t[i.str],s}function o(i){return i instanceof Ue._Code&&i._items.some((s)=>s instanceof Ue.Name&&t[s.str]===1&&n[s.str]!==void 0)}}function tBe(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function h4(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:Ue._`!${vO(e)}`}$n.not=h4;var nBe=A4($n.operators.AND);function oBe(...e){return e.reduce(nBe)}$n.and=oBe;var rBe=A4($n.operators.OR);function iBe(...e){return e.reduce(rBe)}$n.or=iBe;function A4(e){return(t,n)=>t===Ue.nil?n:n===Ue.nil?t:Ue._`${vO(t)} ${e} ${vO(n)}`}function vO(e){return e instanceof Ue.Name?e:Ue._`(${e})`}});var $e=x(function(w4){Object.defineProperty(w4,"__esModule",{value:!0});w4.checkStrictMode=w4.getErrorPath=w4.Type=w4.useFunc=w4.setEvaluated=w4.evaluatedPropsToName=w4.mergeEvaluated=w4.eachItem=w4.unescapeJsonPointer=w4.escapeJsonPointer=w4.escapeFragment=w4.unescapeFragment=w4.schemaRefOrVal=w4.schemaHasRulesButRef=w4.schemaHasRules=w4.checkUnknownRules=w4.alwaysValidSchema=w4.toHash=void 0;var gt=Ne(),lBe=kp();function uBe(e){let t={};for(let n of e)t[n]=!0;return t}w4.toHash=uBe;function dBe(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return I4(e,t),!S4(t,e.self.RULES.all)}w4.alwaysValidSchema=dBe;function I4(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema)return;if(typeof t==="boolean")return;let o=r.RULES.keywords;for(let i in t)if(!o[i])E4(e,`unknown keyword: "${i}"`)}w4.checkUnknownRules=I4;function S4(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(t[n])return!0;return!1}w4.schemaHasRules=S4;function pBe(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}w4.schemaHasRulesButRef=pBe;function gBe({topSchemaRef:e,schemaPath:t},n,r,o){if(!o){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return gt._`${n}`}return gt._`${e}${t}${(0,gt.getProperty)(r)}`}w4.schemaRefOrVal=gBe;function mBe(e){return C4(decodeURIComponent(e))}w4.unescapeFragment=mBe;function hBe(e){return encodeURIComponent(kO(e))}w4.escapeFragment=hBe;function kO(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}w4.escapeJsonPointer=kO;function C4(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}w4.unescapeJsonPointer=C4;function ABe(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}w4.eachItem=ABe;function y4({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:r}){return(o,i,s,c)=>{let l=s===void 0?i:s instanceof gt.Name?(i instanceof gt.Name?e(o,i,s):t(o,i,s),s):i instanceof gt.Name?(t(o,s,i),i):n(i,s);return c===gt.Name&&!(l instanceof gt.Name)?r(o,l):l}}w4.mergeEvaluated={props:y4({mergeNames:(e,t,n)=>e.if(gt._`${n} !== true && ${t} !== undefined`,()=>{e.if(gt._`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,gt._`${n} || {}`).code(gt._`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if(gt._`${n} !== true`,()=>{if(t===!0)e.assign(n,!0);else e.assign(n,gt._`${n} || {}`),xO(e,n,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:v4}),items:y4({mergeNames:(e,t,n)=>e.if(gt._`${n} !== true && ${t} !== undefined`,()=>e.assign(n,gt._`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if(gt._`${n} !== true`,()=>e.assign(n,t===!0?!0:gt._`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function v4(e,t){if(t===!0)return e.var("props",!0);let n=e.var("props",gt._`{}`);if(t!==void 0)xO(e,n,t);return n}w4.evaluatedPropsToName=v4;function xO(e,t,n){Object.keys(n).forEach((r)=>e.assign(gt._`${t}${(0,gt.getProperty)(r)}`,!0))}w4.setEvaluated=xO;var b4={};function fBe(e,t){return e.scopeValue("func",{ref:t,code:b4[t.code]||(b4[t.code]=new lBe._Code(t.code))})}w4.useFunc=fBe;var wO;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(wO||(w4.Type=wO={}));function yBe(e,t,n){if(e instanceof gt.Name){let r=t===wO.Num;return n?r?gt._`"[" + ${e} + "]"`:gt._`"['" + ${e} + "']"`:r?gt._`"/" + ${e}`:gt._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,gt.getProperty)(e).toString():"/"+kO(e)}w4.getErrorPath=yBe;function E4(e,t,n=e.opts.strictSchema){if(!n)return;if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}w4.checkStrictMode=E4});var Xr=x(function(x4){Object.defineProperty(x4,"__esModule",{value:!0});var fn=Ne(),LBe={data:new fn.Name("data"),valCxt:new fn.Name("valCxt"),instancePath:new fn.Name("instancePath"),parentData:new fn.Name("parentData"),parentDataProperty:new fn.Name("parentDataProperty"),rootData:new fn.Name("rootData"),dynamicAnchors:new fn.Name("dynamicAnchors"),vErrors:new fn.Name("vErrors"),errors:new fn.Name("errors"),this:new fn.Name("this"),self:new fn.Name("self"),scope:new fn.Name("scope"),json:new fn.Name("json"),jsonPos:new fn.Name("jsonPos"),jsonLen:new fn.Name("jsonLen"),jsonPart:new fn.Name("jsonPart")};x4.default=LBe});var Pp=x(function(B4){Object.defineProperty(B4,"__esModule",{value:!0});B4.extendErrors=B4.resetErrorsCount=B4.reportExtraError=B4.reportError=B4.keyword$DataError=B4.keywordError=void 0;var Ge=Ne(),xy=$e(),Rn=Xr();B4.keywordError={message:({keyword:e})=>Ge.str`must pass "${e}" keyword validation`};B4.keyword$DataError={message:({keyword:e,schemaType:t})=>t?Ge.str`"${e}" keyword must be ${t} ($data)`:Ge.str`"${e}" keyword is invalid ($data)`};function MBe(e,t=B4.keywordError,n,r){let{it:o}=e,{gen:i,compositeRule:s,allErrors:c}=o,l=T4(e,t,n);if(r!==null&&r!==void 0?r:s||c)P4(i,l);else R4(o,Ge._`[${l}]`)}B4.reportError=MBe;function zBe(e,t=B4.keywordError,n){let{it:r}=e,{gen:o,compositeRule:i,allErrors:s}=r,c=T4(e,t,n);if(P4(o,c),!(i||s))R4(r,Rn.default.vErrors)}B4.reportExtraError=zBe;function jBe(e,t){e.assign(Rn.default.errors,t),e.if(Ge._`${Rn.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(Ge._`${Rn.default.vErrors}.length`,t),()=>e.assign(Rn.default.vErrors,null)))}B4.resetErrorsCount=jBe;function UBe({gen:e,keyword:t,schemaValue:n,data:r,errsCount:o,it:i}){if(o===void 0)throw Error("ajv implementation error");let s=e.name("err");e.forRange("i",o,Rn.default.errors,(c)=>{if(e.const(s,Ge._`${Rn.default.vErrors}[${c}]`),e.if(Ge._`${s}.instancePath === undefined`,()=>e.assign(Ge._`${s}.instancePath`,(0,Ge.strConcat)(Rn.default.instancePath,i.errorPath))),e.assign(Ge._`${s}.schemaPath`,Ge.str`${i.errSchemaPath}/${t}`),i.opts.verbose)e.assign(Ge._`${s}.schema`,n),e.assign(Ge._`${s}.data`,r)})}B4.extendErrors=UBe;function P4(e,t){let n=e.const("err",t);e.if(Ge._`${Rn.default.vErrors} === null`,()=>e.assign(Rn.default.vErrors,Ge._`[${n}]`),Ge._`${Rn.default.vErrors}.push(${n})`),e.code(Ge._`${Rn.default.errors}++`)}function R4(e,t){let{gen:n,validateName:r,schemaEnv:o}=e;if(o.$async)n.throw(Ge._`new ${e.ValidationError}(${t})`);else n.assign(Ge._`${r}.errors`,t),n.return(!1)}var Ks={keyword:new Ge.Name("keyword"),schemaPath:new Ge.Name("schemaPath"),params:new Ge.Name("params"),propertyName:new Ge.Name("propertyName"),message:new Ge.Name("message"),schema:new Ge.Name("schema"),parentSchema:new Ge.Name("parentSchema")};function T4(e,t,n){let{createErrors:r}=e.it;if(r===!1)return Ge._`{}`;return FBe(e,t,n)}function FBe(e,t,n={}){let{gen:r,it:o}=e,i=[$Be(o,n),GBe(e,n)];return HBe(e,t,i),r.object(...i)}function $Be({errorPath:e},{instancePath:t}){let n=t?Ge.str`${e}${(0,xy.getErrorPath)(t,xy.Type.Str)}`:e;return[Rn.default.instancePath,(0,Ge.strConcat)(Rn.default.instancePath,n)]}function GBe({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:r}){let o=r?t:Ge.str`${t}/${e}`;if(n)o=Ge.str`${o}${(0,xy.getErrorPath)(n,xy.Type.Str)}`;return[Ks.schemaPath,o]}function HBe(e,{params:t,message:n},r){let{keyword:o,data:i,schemaValue:s,it:c}=e,{opts:l,propertyName:u,topSchemaRef:d,schemaPath:p}=c;if(r.push([Ks.keyword,o],[Ks.params,typeof t=="function"?t(e):t||Ge._`{}`]),l.messages)r.push([Ks.message,typeof n=="function"?n(e):n]);if(l.verbose)r.push([Ks.schema,s],[Ks.parentSchema,Ge._`${d}${p}`],[Rn.default.data,i]);if(u)r.push([Ks.propertyName,u])}});var L4=x(function(D4){Object.defineProperty(D4,"__esModule",{value:!0});D4.boolOrEmptySchema=D4.topBoolOrEmptySchema=void 0;var WBe=Pp(),JBe=Ne(),ZBe=Xr(),XBe={message:"boolean schema is false"};function eOe(e){let{gen:t,schema:n,validateName:r}=e;if(n===!1)_4(e,!1);else if(typeof n=="object"&&n.$async===!0)t.return(ZBe.default.data);else t.assign(JBe._`${r}.errors`,null),t.return(!0)}D4.topBoolOrEmptySchema=eOe;function tOe(e,t){let{gen:n,schema:r}=e;if(r===!1)n.var(t,!1),_4(e);else n.var(t,!0)}D4.boolOrEmptySchema=tOe;function _4(e,t){let{gen:n,data:r}=e,o={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,WBe.reportError)(o,XBe,void 0,t)}});var RO=x(function(N4){Object.defineProperty(N4,"__esModule",{value:!0});N4.getRules=N4.isJSONType=void 0;var oOe=["string","number","integer","boolean","null","object","array"],rOe=new Set(oOe);function iOe(e){return typeof e=="string"&&rOe.has(e)}N4.isJSONType=iOe;function sOe(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}N4.getRules=sOe});var TO=x(function(U4){Object.defineProperty(U4,"__esModule",{value:!0});U4.shouldUseRule=U4.shouldUseGroup=U4.schemaHasRulesForType=void 0;function cOe({schema:e,self:t},n){let r=t.RULES.types[n];return r&&r!==!0&&z4(e,r)}U4.schemaHasRulesForType=cOe;function z4(e,t){return t.rules.some((n)=>j4(e,n))}U4.shouldUseGroup=z4;function j4(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some((r)=>e[r]!==void 0))}U4.shouldUseRule=j4});var Rp=x(function(q4){Object.defineProperty(q4,"__esModule",{value:!0});q4.reportTypeError=q4.checkDataTypes=q4.checkDataType=q4.coerceAndCheckDataType=q4.getJSONTypes=q4.getSchemaTypes=q4.DataType=void 0;var dOe=RO(),pOe=TO(),gOe=Pp(),Qe=Ne(),$4=$e(),al;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(al||(q4.DataType=al={}));function mOe(e){let t=G4(e.type);if(t.includes("null")){if(e.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(e.nullable===!0)t.push("null")}return t}q4.getSchemaTypes=mOe;function G4(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(dOe.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}q4.getJSONTypes=G4;function hOe(e,t){let{gen:n,data:r,opts:o}=e,i=AOe(t,o.coerceTypes),s=t.length>0&&!(i.length===0&&t.length===1&&(0,pOe.schemaHasRulesForType)(e,t[0]));if(s){let c=OO(t,r,o.strictNumbers,al.Wrong);n.if(c,()=>{if(i.length)fOe(e,t,i);else _O(e)})}return s}q4.coerceAndCheckDataType=hOe;var H4=new Set(["string","number","integer","boolean","null"]);function AOe(e,t){return t?e.filter((n)=>H4.has(n)||t==="array"&&n==="array"):[]}function fOe(e,t,n){let{gen:r,data:o,opts:i}=e,s=r.let("dataType",Qe._`typeof ${o}`),c=r.let("coerced",Qe._`undefined`);if(i.coerceTypes==="array")r.if(Qe._`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>r.assign(o,Qe._`${o}[0]`).assign(s,Qe._`typeof ${o}`).if(OO(t,o,i.strictNumbers),()=>r.assign(c,o)));r.if(Qe._`${c} !== undefined`);for(let u of n)if(H4.has(u)||u==="array"&&i.coerceTypes==="array")l(u);r.else(),_O(e),r.endIf(),r.if(Qe._`${c} !== undefined`,()=>{r.assign(o,c),yOe(e,c)});function l(u){switch(u){case"string":r.elseIf(Qe._`${s} == "number" || ${s} == "boolean"`).assign(c,Qe._`"" + ${o}`).elseIf(Qe._`${o} === null`).assign(c,Qe._`""`);return;case"number":r.elseIf(Qe._`${s} == "boolean" || ${o} === null
7414
7414
  || (${s} == "string" && ${o} && ${o} == +${o})`).assign(c,Qe._`+${o}`);return;case"integer":r.elseIf(Qe._`${s} === "boolean" || ${o} === null
7415
7415
  || (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(c,Qe._`+${o}`);return;case"boolean":r.elseIf(Qe._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(c,!1).elseIf(Qe._`${o} === "true" || ${o} === 1`).assign(c,!0);return;case"null":r.elseIf(Qe._`${o} === "" || ${o} === 0 || ${o} === false`),r.assign(c,null);return;case"array":r.elseIf(Qe._`${s} === "string" || ${s} === "number"