@sazabi/cli 0.15.3-dev.g969f3ee → 0.15.3-dev.ge4631f1

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 +22 -22
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6546,7 +6546,7 @@ When events are arriving, report back:
6546
6546
  - That events are landing, with payload fields preserved under \`webhook.*\`.
6547
6547
 
6548
6548
  Do not print \`PUBLIC_KEY\` (or the full keyed URL) in the summary.
6549
- `;var l_=()=>{};var d_,g_;var y_=d(()=>{SD();ID();OD();TD();DD();zD();jD();RD();UD();ED();GD();JD();HD();FD();XD();QD();eC();nC();iC();aC();sC();lC();dC();yC();mC();wC();vC();SC();IC();OC();TC();DC();zC();jC();RC();UC();EC();GC();JC();HC();FC();XC();QC();ez();nz();iz();az();sz();lz();dz();yz();mz();wz();vz();Sz();Iz();Oz();Tz();Dz();zz();jz();Rz();Uz();Ez();Gz();Jz();Hz();Fz();Xz();Qz();e_();n_();i_();a_();s_();l_();d_={cloudflare:PD.trim(),cloudflare_workers:AD.trim(),cloudwatch:CD.trim(),convex:ND.trim(),datadog:MD.trim(),daytona:qD.trim(),digital_ocean:WD.trim(),e2b:YD.trim(),elastic_cloud:tC.trim(),fluent_bit:rC.trim(),fly_io:hC.trim(),gcp:gC.trim(),grafana_alloy:pC.trim(),inngest:kC.trim(),langchain:$C.trim(),mastra:LC.trim(),neon:_C.trim(),netlify:xC.trim(),openrouter:KC.trim(),otel:BC.trim(),otel_collector:ZC.trim(),otel_metrics:VC.trim(),plain:oz.trim(),posthog:uz.trim(),posthog_sdk:bz.trim(),porter:cz.trim(),prometheus:fz.trim(),railway:Pz.trim(),render:Az.trim(),respan:Cz.trim(),sentry:Nz.trim(),sentry_platform:Mz.trim(),supabase:qz.trim(),temporal:Wz.trim(),trigger_dev:Yz.trim(),vector:t_.trim(),vercel:r_.trim(),webhook_events:h_.trim()},g_={cloudflare:$D.trim(),cloudflare_workers:LD.trim(),cloudwatch:_D.trim(),convex:xD.trim(),datadog:KD.trim(),daytona:BD.trim(),digital_ocean:ZD.trim(),e2b:VD.trim(),elastic_cloud:oC.trim(),fluent_bit:cC.trim(),fly_io:uC.trim(),gcp:bC.trim(),grafana_alloy:fC.trim(),inngest:PC.trim(),langchain:AC.trim(),mastra:CC.trim(),neon:NC.trim(),netlify:MC.trim(),openrouter:qC.trim(),otel:WC.trim(),otel_collector:YC.trim(),otel_metrics:tz.trim(),plain:rz.trim(),posthog:gz.trim(),posthog_sdk:pz.trim(),porter:hz.trim(),prometheus:kz.trim(),railway:$z.trim(),render:Lz.trim(),respan:_z.trim(),sentry:xz.trim(),sentry_platform:Kz.trim(),supabase:Bz.trim(),temporal:Zz.trim(),trigger_dev:Vz.trim(),vector:o_.trim(),vercel:c_.trim(),webhook_events:u_.trim()}});var gv=(e)=>{let t=g_[e];if(t)return t;return d_[e]};var b_=d(()=>{y_()});var H="available";var Ue,cl=(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:[t8]}],t8;var St=d(()=>{Ue={label:"Connect",pendingLabel:"Connecting..."},t8={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 yv,bv,mv;var m_=d(()=>{St();yv={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:Ue},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/cloudflare"},bv={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 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"}}}},mv={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 n8,o8,p_;var w_=d(()=>{m_();n8=["cloudflareApiToken"],o8={id:"cloudflare-logpush",label:"Cloudflare Logpush",subdomain:"cloudflare-logpush",transform:"cloudflare-logpush"},p_={id:"cloudflare",name:"Cloudflare Logpush",searchAliases:["cloudflare","cf","logpush"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:n8,intake:[o8],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:H,dashboard:{iconKey:"cloudflare",intakeSourceId:"cloudflare-logpush",streamSelectorLayout:"sidepanel",actions:{submit:{validate:{procedure:"cloudflare.validateToken"}},list:{listLogpushDatasets:{procedure:"cloudflare.listLogpushDatasets",itemsField:"items"}}}}}});var pv;var f_=d(()=>{pv={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 v_;var k_=d(()=>{f_();v_={id:"cloudflare_workers",name:"Cloudflare Workers",searchAliases:["cloudflare","cf","workers"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"cloudflare-workers",label:"Cloudflare Workers Observability",subdomain:"cloudflare",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:H,dashboard:{iconKey:"cloudflare",intakeSourceId:"cloudflare",streamSelectorLayout:"sidepanel"},streamCardinality:"multi"}});var wv,fv,vv,kv,Sv,Pv;var S_=d(()=>{St();wv={action:"prefetch",input:{projectId:"${context.projectId}",templateUrl:"${context.cloudformationTemplateUrl}"},resultAs:"cloudwatch"},fv={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"}]},vv={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:Ue},kv={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:wv,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."}]},fv],submit:vv}},{id:"terraform",label:"Terraform",description:"Apply Terraform resources in your AWS account.",flow:{kind:"multi-step",prefetch:wv,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" {}
6549
+ `;var l_=()=>{};var d_,g_;var y_=d(()=>{SD();ID();OD();TD();DD();zD();jD();RD();UD();ED();GD();JD();HD();FD();XD();QD();eC();nC();iC();aC();sC();lC();dC();yC();mC();wC();vC();SC();IC();OC();TC();DC();zC();jC();RC();UC();EC();GC();JC();HC();FC();XC();QC();ez();nz();iz();az();sz();lz();dz();yz();mz();wz();vz();Sz();Iz();Oz();Tz();Dz();zz();jz();Rz();Uz();Ez();Gz();Jz();Hz();Fz();Xz();Qz();e_();n_();i_();a_();s_();l_();d_={cloudflare:PD.trim(),cloudflare_workers:AD.trim(),cloudwatch:CD.trim(),convex:ND.trim(),datadog:MD.trim(),daytona:qD.trim(),digital_ocean:WD.trim(),e2b:YD.trim(),elastic_cloud:tC.trim(),fluent_bit:rC.trim(),fly_io:hC.trim(),gcp:gC.trim(),grafana_alloy:pC.trim(),inngest:kC.trim(),langchain:$C.trim(),mastra:LC.trim(),neon:_C.trim(),netlify:xC.trim(),openrouter:KC.trim(),otel:BC.trim(),otel_collector:ZC.trim(),otel_metrics:VC.trim(),plain:oz.trim(),posthog:uz.trim(),posthog_sdk:bz.trim(),porter:cz.trim(),prometheus:fz.trim(),railway:Pz.trim(),render:Az.trim(),respan:Cz.trim(),sentry:Nz.trim(),sentry_platform:Mz.trim(),supabase:qz.trim(),temporal:Wz.trim(),trigger_dev:Yz.trim(),vector:t_.trim(),vercel:r_.trim(),webhook_events:h_.trim()},g_={cloudflare:$D.trim(),cloudflare_workers:LD.trim(),cloudwatch:_D.trim(),convex:xD.trim(),datadog:KD.trim(),daytona:BD.trim(),digital_ocean:ZD.trim(),e2b:VD.trim(),elastic_cloud:oC.trim(),fluent_bit:cC.trim(),fly_io:uC.trim(),gcp:bC.trim(),grafana_alloy:fC.trim(),inngest:PC.trim(),langchain:AC.trim(),mastra:CC.trim(),neon:NC.trim(),netlify:MC.trim(),openrouter:qC.trim(),otel:WC.trim(),otel_collector:YC.trim(),otel_metrics:tz.trim(),plain:rz.trim(),posthog:gz.trim(),posthog_sdk:pz.trim(),porter:hz.trim(),prometheus:kz.trim(),railway:$z.trim(),render:Lz.trim(),respan:_z.trim(),sentry:xz.trim(),sentry_platform:Kz.trim(),supabase:Bz.trim(),temporal:Zz.trim(),trigger_dev:Vz.trim(),vector:o_.trim(),vercel:c_.trim(),webhook_events:u_.trim()}});var gv=(e)=>{let t=g_[e];if(t)return t;return d_[e]};var b_=d(()=>{y_()});var H="available";var Ue,cl=(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:[t8]}],t8;var St=d(()=>{Ue={label:"Connect",pendingLabel:"Connecting..."},t8={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 yv,bv,mv;var m_=d(()=>{St();yv={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:Ue},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/cloudflare"},bv={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 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"}}}},mv={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 n8,o8,p_;var w_=d(()=>{m_();n8=["cloudflareApiToken"],o8={id:"cloudflare-logpush",label:"Cloudflare Logpush",transform:"cloudflare-logpush"},p_={id:"cloudflare",name:"Cloudflare Logpush",searchAliases:["cloudflare","cf","logpush"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:n8,intake:[o8],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:H,dashboard:{iconKey:"cloudflare",intakeSourceId:"cloudflare-logpush",streamSelectorLayout:"sidepanel",actions:{submit:{validate:{procedure:"cloudflare.validateToken"}},list:{listLogpushDatasets:{procedure:"cloudflare.listLogpushDatasets",itemsField:"items"}}}}}});var pv;var f_=d(()=>{pv={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 v_;var k_=d(()=>{f_();v_={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:H,dashboard:{iconKey:"cloudflare",intakeSourceId:"cloudflare",streamSelectorLayout:"sidepanel"},streamCardinality:"multi"}});var wv,fv,vv,kv,Sv,Pv;var S_=d(()=>{St();wv={action:"prefetch",input:{projectId:"${context.projectId}",templateUrl:"${context.cloudformationTemplateUrl}"},resultAs:"cloudwatch"},fv={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"}]},vv={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:Ue},kv={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:wv,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."}]},fv],submit:vv}},{id:"terraform",label:"Terraform",description:"Apply Terraform resources in your AWS account.",flow:{kind:"multi-step",prefetch:wv,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" {}
6550
6550
 
6551
6551
  resource "aws_iam_role" "sazabi_log_ingestion" {
6552
6552
  name = "SazabiLogIngestion"
@@ -6621,7 +6621,7 @@ service:
6621
6621
  pipelines:
6622
6622
  logs:
6623
6623
  receivers: [awscloudwatch]
6624
- exporters: [otlphttp]`}],notes:[{text:"The key is embedded in the endpoint hostname, so no OTLP auth header is required."}]}]},{id:"run",section:"verify",title:"Run and verify",actions:[{instruction:"Deploy the collector, then write a new log event in one of the forwarded log groups and check the collector logs for export errors. Logs should appear in Sazabi within a few minutes."}]}]}});var i8,P_;var I_=d(()=>{S_();i8=["externalId"],P_={id:"cloudwatch",name:"CloudWatch",searchAliases:["aws","amazon","amazon web services","amazon cloudwatch"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,requiresConnectionPublicKey:!0,sensitiveFields:i8,subtitle:"Stream your AWS CloudWatch logs directly to Sazabi for real-time analysis and alerting.",features:["Log forwarding","Real-time streaming","Multi-region support"],evidenceHints:["AWS ECS, Lambda, CloudFormation, CDK, SAM, Serverless, or Terraform AWS resources","CloudWatch log group names, awslogs drivers, or logs:* IAM permissions","AWS_REGION/AWS_DEFAULT_REGION environment variables with runtime logging to CloudWatch"],setupSkill:H,dashboard:{iconKey:"cloudwatch",intakeSourceId:"cloudwatch",streamSelectorLayout:"sidepanel",connectionMetadataSection:{title:"AWS account details",description:"The AWS account and IAM role used for log ingestion.",fields:[{key:"awsAccountId",label:"AWS account ID",description:"AWS account connected to this data source."},{key:"roleArn",label:"IAM role ARN",description:"IAM role Sazabi assumes for log ingestion."}]},actions:{submit:{validate:{kind:"source-action",actionId:"validate-role"}},list:{list:{kind:"source-action",actionId:"list-log-groups",itemsField:"logGroups"}},prefetch:{prefetch:{kind:"source-action",actionId:"get-setup-info"}}}}}});var Iv,$v,Ov;var $_=d(()=>{St();Iv={kind:"multi-step",steps:[{id:"credentials",title:"Enter access token",actions:[{kind:"instruction",instruction:"Create a team access token in your [Convex dashboard team settings](https://dashboard.convex.dev)."},{id:"token",kind:"secret",label:"Team access token",instruction:"Enter your Team access token below.",placeholder:"eyJ..."}]},{id:"team",title:"Choose team",actions:[{id:"team",kind:"select",label:"Team",instruction:"Select the Convex team whose deployments Sazabi should list.",placeholder:"Select a team",optionsAction:"options",optionsInput:{token:"$token"},optionValueField:"id",optionLabelField:"name",optionDescriptionField:"slug"}]}],submit:{metadata:{accessToken:"$token",teamId:"$team.id",teamName:"$team.name"},displayName:"$team.name",button:Ue}},$v={groups:[{id:"open-log-streams",section:"config",title:"Open Log Streams",notes:[{variant:"requirement",text:"**Convex log streams require the Pro plan.** Free/Starter teams cannot configure log streams."}],actions:[{instruction:"In your [Convex dashboard](https://dashboard.convex.dev), open the deployment you want to forward, then go to **Settings > Integrations** and configure a **Webhook** log stream.",notes:[{text:"Log streams are **per deployment** — repeat this setup for each deployment you want to forward. To onboard many deployments at once, connect your Convex account instead and Sazabi creates the log streams for you."}]}]},{id:"endpoint",section:"config",title:"Set webhook URL",actions:[{instruction:"Paste your Sazabi intake URL (above) into the webhook configuration."}]},{id:"verify",section:"verify",title:"Save and verify",actions:[{instruction:"Save the log stream, then trigger activity — run a Convex function or hit a deployed endpoint. Logs appear in Sazabi within a few minutes."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/convex"},Ov={content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:[{field:"name",header:"Name"},{field:"slug",header:"Slug",width:"w-48",cell:"muted"}],searchPlaceholder:"Search deployments...",searchFields:["name"],dedupeByConfigField:"deploymentId",emptyState:{noMatches:"No deployments found.",allConfigured:"All deployments already have log streams configured."},toStreamItem:{displayName:"$item.name",config:{deploymentId:"$item.id",deploymentName:"$item.name"}}}}});var r8,a8,O_;var A_=d(()=>{$_();r8=["accessToken"],a8={id:"convex",label:"Convex",subdomain:"convex",transform:"convex-webhook"},O_={id:"convex",name:"Convex",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:r8,intake:[a8],subtitle:"Forward your Convex deployment logs directly to Sazabi for serverless observability.",features:["Function logs","Database mutations","Scheduled job monitoring"],evidenceHints:["convex/ directory, convex.json, or convex package imports","CONVEX_* or NEXT_PUBLIC_CONVEX_URL environment variables","README/docs naming Convex for serverless functions or database state"],setupSkill:H,dashboard:{iconKey:"convex",intakeSourceId:"convex",streamSelectorLayout:"sidepanel",actions:{list:{options:{procedure:"convex.listTeams",itemsField:"teams",sensitiveInputFields:["token"]},list:{procedure:"convex.listDeployments",itemsField:"deployments",sensitiveInputFields:["token"]}}}}}});var Av;var T_=d(()=>{Av={perStreamInstructions:!0,groups:[{id:"configure",section:"config",title:"Configure the Datadog Agent",actions:[{instruction:"Choose how this Datadog Agent should ship logs to Sazabi, then apply the matching configuration.",payloads:[{kind:"options",options:[{id:"datadog-yaml-dual-ship",label:"`datadog.yaml` dual-ship",description:"Keep the Agent's Datadog API key and add Sazabi as an additional logs endpoint.",payloads:[{kind:"copyable",label:"Intake host",value:"${context.ingestHost}",copyLabel:"Datadog intake host",description:"Use this host in `logs_config.additional_endpoints`."},{kind:"code",language:"yaml",copyLabel:"datadog.yaml dual-ship configuration",value:`# Enable logs collection if it is not already enabled.
6624
+ exporters: [otlphttp]`}],notes:[{text:"The key is embedded in the endpoint hostname, so no OTLP auth header is required."}]}]},{id:"run",section:"verify",title:"Run and verify",actions:[{instruction:"Deploy the collector, then write a new log event in one of the forwarded log groups and check the collector logs for export errors. Logs should appear in Sazabi within a few minutes."}]}]}});var i8,P_;var I_=d(()=>{S_();i8=["externalId"],P_={id:"cloudwatch",name:"CloudWatch",searchAliases:["aws","amazon","amazon web services","amazon cloudwatch"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,requiresConnectionPublicKey:!0,sensitiveFields:i8,subtitle:"Stream your AWS CloudWatch logs directly to Sazabi for real-time analysis and alerting.",features:["Log forwarding","Real-time streaming","Multi-region support"],evidenceHints:["AWS ECS, Lambda, CloudFormation, CDK, SAM, Serverless, or Terraform AWS resources","CloudWatch log group names, awslogs drivers, or logs:* IAM permissions","AWS_REGION/AWS_DEFAULT_REGION environment variables with runtime logging to CloudWatch"],setupSkill:H,dashboard:{iconKey:"cloudwatch",intakeSourceId:"cloudwatch",streamSelectorLayout:"sidepanel",connectionMetadataSection:{title:"AWS account details",description:"The AWS account and IAM role used for log ingestion.",fields:[{key:"awsAccountId",label:"AWS account ID",description:"AWS account connected to this data source."},{key:"roleArn",label:"IAM role ARN",description:"IAM role Sazabi assumes for log ingestion."}]},actions:{submit:{validate:{kind:"source-action",actionId:"validate-role"}},list:{list:{kind:"source-action",actionId:"list-log-groups",itemsField:"logGroups"}},prefetch:{prefetch:{kind:"source-action",actionId:"get-setup-info"}}}}}});var Iv,$v,Ov;var $_=d(()=>{St();Iv={kind:"multi-step",steps:[{id:"credentials",title:"Enter access token",actions:[{kind:"instruction",instruction:"Create a team access token in your [Convex dashboard team settings](https://dashboard.convex.dev)."},{id:"token",kind:"secret",label:"Team access token",instruction:"Enter your Team access token below.",placeholder:"eyJ..."}]},{id:"team",title:"Choose team",actions:[{id:"team",kind:"select",label:"Team",instruction:"Select the Convex team whose deployments Sazabi should list.",placeholder:"Select a team",optionsAction:"options",optionsInput:{token:"$token"},optionValueField:"id",optionLabelField:"name",optionDescriptionField:"slug"}]}],submit:{metadata:{accessToken:"$token",teamId:"$team.id",teamName:"$team.name"},displayName:"$team.name",button:Ue}},$v={groups:[{id:"open-log-streams",section:"config",title:"Open Log Streams",notes:[{variant:"requirement",text:"**Convex log streams require the Pro plan.** Free/Starter teams cannot configure log streams."}],actions:[{instruction:"In your [Convex dashboard](https://dashboard.convex.dev), open the deployment you want to forward, then go to **Settings > Integrations** and configure a **Webhook** log stream.",notes:[{text:"Log streams are **per deployment** — repeat this setup for each deployment you want to forward. To onboard many deployments at once, connect your Convex account instead and Sazabi creates the log streams for you."}]}]},{id:"endpoint",section:"config",title:"Set webhook URL",actions:[{instruction:"Paste your Sazabi intake URL (above) into the webhook configuration."}]},{id:"verify",section:"verify",title:"Save and verify",actions:[{instruction:"Save the log stream, then trigger activity — run a Convex function or hit a deployed endpoint. Logs appear in Sazabi within a few minutes."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/convex"},Ov={content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:[{field:"name",header:"Name"},{field:"slug",header:"Slug",width:"w-48",cell:"muted"}],searchPlaceholder:"Search deployments...",searchFields:["name"],dedupeByConfigField:"deploymentId",emptyState:{noMatches:"No deployments found.",allConfigured:"All deployments already have log streams configured."},toStreamItem:{displayName:"$item.name",config:{deploymentId:"$item.id",deploymentName:"$item.name"}}}}});var r8,a8,O_;var A_=d(()=>{$_();r8=["accessToken"],a8={id:"convex",label:"Convex",transform:"convex-webhook"},O_={id:"convex",name:"Convex",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:r8,intake:[a8],subtitle:"Forward your Convex deployment logs directly to Sazabi for serverless observability.",features:["Function logs","Database mutations","Scheduled job monitoring"],evidenceHints:["convex/ directory, convex.json, or convex package imports","CONVEX_* or NEXT_PUBLIC_CONVEX_URL environment variables","README/docs naming Convex for serverless functions or database state"],setupSkill:H,dashboard:{iconKey:"convex",intakeSourceId:"convex",streamSelectorLayout:"sidepanel",actions:{list:{options:{procedure:"convex.listTeams",itemsField:"teams",sensitiveInputFields:["token"]},list:{procedure:"convex.listDeployments",itemsField:"deployments",sensitiveInputFields:["token"]}}}}}});var Av;var T_=d(()=>{Av={perStreamInstructions:!0,groups:[{id:"configure",section:"config",title:"Configure the Datadog Agent",actions:[{instruction:"Choose how this Datadog Agent should ship logs to Sazabi, then apply the matching configuration.",payloads:[{kind:"options",options:[{id:"datadog-yaml-dual-ship",label:"`datadog.yaml` dual-ship",description:"Keep the Agent's Datadog API key and add Sazabi as an additional logs endpoint.",payloads:[{kind:"copyable",label:"Intake host",value:"${context.ingestHost}",copyLabel:"Datadog intake host",description:"Use this host in `logs_config.additional_endpoints`."},{kind:"code",language:"yaml",copyLabel:"datadog.yaml dual-ship configuration",value:`# Enable logs collection if it is not already enabled.
6625
6625
  logs_enabled: true
6626
6626
 
6627
6627
  # Send a copy of logs to Sazabi while the primary Agent config
@@ -6644,7 +6644,7 @@ DD_API_KEY=any-non-empty-value
6644
6644
  DD_LOGS_ENABLED=true
6645
6645
  DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true
6646
6646
  DD_LOGS_CONFIG_LOGS_DD_URL=https://\${context.ingestHost}
6647
- DD_LOGS_CONFIG_FORCE_USE_HTTP=true`}],notes:[{text:"`DD_API_KEY` is not used by Sazabi — the intake URL carries your public key in the hostname — but the Datadog Agent requires it to be a non-empty value to start."}]}]}]}]},{id:"restart",section:"verify",title:"Restart and verify",description:"Restart or redeploy the Agent after applying the config.",actions:[{instruction:"Restart or redeploy the Agent so it picks up the updated configuration.",notes:[{variant:"requirement",text:"Avoid configuring both a Sazabi additional endpoint and a Sazabi-only logs URL in the same Agent, or you may send duplicate logs."}]}]}]}});var L_;var D_=d(()=>{T_();L_={id:"datadog",name:"Datadog Agent",capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"datadog",label:"Datadog",subdomain:"datadog",transform:"datadog-agent"}],lifecycleSkipReason:"Manual SDK/agent setup is not exercised by automated lifecycle tests yet.",subtitle:"Forward your Datadog Agent logs directly to Sazabi for AI-powered observability.",features:["Agent log forwarding","Minimal configuration","Keep existing setup"],evidenceHints:["datadog-agent config, DD_* environment variables, or docker-compose Datadog sidecars","dd-trace, @datadog/*, datadog-lambda-js, or Datadog CI/deploy scripts","README/docs naming Datadog as the current logs, metrics, traces, or APM provider"],setupSkill:H,dashboard:{iconKey:"datadog",intakeSourceId:"datadog"}}});var Tv;var C_=d(()=>{Tv={groups:[{id:"open-settings",section:"config",title:"Open OpenTelemetry card",notes:[{variant:"requirement",text:"The OpenTelemetry card is visible to organization owners only."}],actions:[{instruction:"Open the [Daytona dashboard](https://app.daytona.io), choose your organization, open **Settings**, and find the **OpenTelemetry** card."}]},{id:"values",section:"config",title:"Set OTLP values",actions:[{instruction:"Set the **OTLP Endpoint** on the Daytona OpenTelemetry card to your intake URL (above)."}]},{id:"save",section:"verify",title:"Save and verify",actions:[{instruction:"Save the OpenTelemetry card, then restart or start a sandbox.",payloads:[{kind:"bulleted-list",items:["Filter in Sazabi using the resource attributes Daytona stamps on each record: `daytona_organization_id`, `daytona_region_id`, `daytona_snapshot`.","Sazabi currently stores logs and traces from this source. Metrics sent to the endpoint aren't stored yet.","Daytona only retains sandbox telemetry for 3 days in its own dashboard, so Sazabi is the durable store."]}],notes:[{text:"Sandboxes begin exporting telemetry automatically on their next start with no per-sandbox change required."}]}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/daytona"}});var z_;var __=d(()=>{C_();z_={id:"daytona",name:"Daytona",capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"daytona",label:"Daytona",subdomain:"daytona",transform:"otlp-signal-dispatch",transformOptions:{unsupportedPathMessage:"Unsupported Daytona OTLP path: expected /v1/logs, /v1/traces, or /v1/metrics",metricsWarningMessage:"Daytona metrics received but not yet supported"}}],lifecycleSkipReason:"Manual webhook setup is not exercised by automated lifecycle tests yet.",subtitle:"Stream sandbox telemetry from your Daytona organization to Sazabi via org-level OpenTelemetry export.",features:["Org-level OTLP logs and traces","Sandbox resource attributes (organization, region, snapshot)","Durable retention beyond Daytona's 3-day window"],evidenceHints:["Daytona SDK/CLI usage, Daytona sandbox config, or DAYTONA_* environment variables","Code execution sandbox infrastructure backed by Daytona snapshots","README/docs naming Daytona for agent or development sandboxes"],setupSkill:H,dashboard:{iconKey:"daytona",intakeSourceId:"daytona"}}});var Lv,Dv,Cv;var j_=d(()=>{St();Lv={kind:"multi-step",steps:[{id:"prepare",title:"Create access token",actions:[{kind:"instruction",instruction:"Create a [DigitalOcean personal access token](https://cloud.digitalocean.com/account/api/tokens) with **Full Access** scope, or use Custom Scopes with `app:read`, `app:update`, `actions:read`, `regions:read`, and `sizes:read` so Sazabi can set up log forwarding on your apps."}]},{id:"credentials",title:"Enter access token",actions:[{id:"token",kind:"secret",label:"Personal access token",instruction:"Enter your personal access token below.",placeholder:"dop_v1_..."}]}],submit:{actions:[{kind:"validate",action:"validate",input:{token:"$token"}}],metadata:{apiToken:"$token"},button:Ue},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/digitalocean"},Dv={docsUrl:"https://docs.sazabi.com/data/sources/endpoint/digital-ocean",groups:[{id:"open-log-forwarding",section:"config",title:"Open Log Forwarding",actions:[{instruction:"In the [DigitalOcean control panel](https://cloud.digitalocean.com/apps), open the App Platform app you want to forward, then go to **Settings > Log Forwarding** and add a **Datadog** destination. You can also add the destination through your app spec (`app.yaml`) or `doctl apps update`."},{instruction:"Repeat this setup for every app you want to forward — log destinations are configured **per app** and attach to each service, worker, and job.",notes:[{text:"To add forwarding across an app in one step from a picker, connect your DigitalOcean account instead."},{text:"App Platform Functions, Droplets, Spaces, Managed Databases, and Managed Kubernetes are not covered by this path — forward those with Sazabi's [OpenTelemetry endpoint](https://docs.sazabi.com/data/sources/endpoint/opentelemetry)."}]}]},{id:"endpoint",section:"config",title:"Set Datadog destination values",actions:[{instruction:"Paste your Sazabi intake URL (above) into the **Endpoint (API URL)** field, and this key into the **API key** field.",payloads:[{kind:"copyable",label:"Datadog API key",value:"${context.publicKey}",copyLabel:"Sazabi public key",description:"App Platform requires a Datadog API key field — the key embedded in the endpoint hostname is what actually authenticates the stream."}]}]},{id:"verify",section:"verify",title:"Save and verify",actions:[{instruction:"Save the log destination, then trigger activity — deploy the app or hit one of its routes. Logs appear in Sazabi within a few minutes."}]}]},Cv={content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:[{field:"name",header:"Name"},{field:"componentCount",header:"Components",width:"w-40",cell:"badge"}],searchPlaceholder:"Search apps...",searchFields:["name"],dedupeByConfigField:"appId",emptyState:{noMatches:"No apps found.",allConfigured:"All apps already have log streams configured.",noItems:"No App Platform apps found in this DigitalOcean account. Create an app in DigitalOcean first, then return here to forward its logs."},toStreamItem:{displayName:"$item.name",config:{appId:"$item.id",appName:"$item.name"}}}}});var c8,s8,N_;var R_=d(()=>{j_();c8=["apiToken"],s8={id:"digital-ocean",label:"DigitalOcean",subdomain:"digital-ocean",transform:"datadog-agent"},N_={id:"digital_ocean",name:"DigitalOcean",searchAliases:["digital ocean","do"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:c8,intake:[s8],subtitle:"Forward your DigitalOcean infrastructure logs directly to Sazabi for unified observability.",features:["Log forwarding","App Platform logs"],evidenceHints:[".do/app.yaml, DigitalOcean App Platform specs, or doctl scripts","DIGITALOCEAN_* environment variables or Terraform digitalocean provider resources","README/docs naming DigitalOcean Apps, Droplets, Kubernetes, or Spaces"],setupSkill:H,dashboard:{iconKey:"digital-ocean",intakeSourceId:"digital-ocean",streamSelectorLayout:"sidepanel",streamTableColumns:[{kind:"config-text",header:"App",width:"w-32",configField:"appName",fallbackLabel:"Unknown app"}],actions:{submit:{validate:{kind:"source-action",actionId:"validate-token",sensitiveInputFields:["token"]}},list:{list:{kind:"source-action",actionId:"list-apps",itemsField:"apps"}}}}}});var h8,zv;var x_=d(()=>{h8=[{instruction:"Set `SAZABI_INTAKE_URL` to your intake URL (above) in the application that creates E2B sandboxes."}],zv={groups:[{id:"values",section:"config",title:"Set environment variables",actions:h8},{id:"instrument",section:"config",title:"Instrument sandbox logs",actions:[{instruction:"Emit sandbox stdout and stderr through the OpenTelemetry logs SDK.",payloads:[{kind:"code-tabs",label:"SDK integration",tabs:[{id:"typescript",label:"TypeScript",language:"typescript",value:`import { Sandbox } from '@e2b/code-interpreter'
6647
+ DD_LOGS_CONFIG_FORCE_USE_HTTP=true`}],notes:[{text:"`DD_API_KEY` is not used by Sazabi — the intake URL carries your public key in the hostname — but the Datadog Agent requires it to be a non-empty value to start."}]}]}]}]},{id:"restart",section:"verify",title:"Restart and verify",description:"Restart or redeploy the Agent after applying the config.",actions:[{instruction:"Restart or redeploy the Agent so it picks up the updated configuration.",notes:[{variant:"requirement",text:"Avoid configuring both a Sazabi additional endpoint and a Sazabi-only logs URL in the same Agent, or you may send duplicate logs."}]}]}]}});var L_;var D_=d(()=>{T_();L_={id:"datadog",name:"Datadog Agent",capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"datadog",label:"Datadog",transform:"datadog-agent"}],lifecycleSkipReason:"Manual SDK/agent setup is not exercised by automated lifecycle tests yet.",subtitle:"Forward your Datadog Agent logs directly to Sazabi for AI-powered observability.",features:["Agent log forwarding","Minimal configuration","Keep existing setup"],evidenceHints:["datadog-agent config, DD_* environment variables, or docker-compose Datadog sidecars","dd-trace, @datadog/*, datadog-lambda-js, or Datadog CI/deploy scripts","README/docs naming Datadog as the current logs, metrics, traces, or APM provider"],setupSkill:H,dashboard:{iconKey:"datadog",intakeSourceId:"datadog"}}});var Tv;var C_=d(()=>{Tv={groups:[{id:"open-settings",section:"config",title:"Open OpenTelemetry card",notes:[{variant:"requirement",text:"The OpenTelemetry card is visible to organization owners only."}],actions:[{instruction:"Open the [Daytona dashboard](https://app.daytona.io), choose your organization, open **Settings**, and find the **OpenTelemetry** card."}]},{id:"values",section:"config",title:"Set OTLP values",actions:[{instruction:"Set the **OTLP Endpoint** on the Daytona OpenTelemetry card to your intake URL (above)."}]},{id:"save",section:"verify",title:"Save and verify",actions:[{instruction:"Save the OpenTelemetry card, then restart or start a sandbox.",payloads:[{kind:"bulleted-list",items:["Filter in Sazabi using the resource attributes Daytona stamps on each record: `daytona_organization_id`, `daytona_region_id`, `daytona_snapshot`.","Sazabi currently stores logs and traces from this source. Metrics sent to the endpoint aren't stored yet.","Daytona only retains sandbox telemetry for 3 days in its own dashboard, so Sazabi is the durable store."]}],notes:[{text:"Sandboxes begin exporting telemetry automatically on their next start with no per-sandbox change required."}]}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/daytona"}});var z_;var __=d(()=>{C_();z_={id:"daytona",name:"Daytona",capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"daytona",label:"Daytona",transform:"otlp-signal-dispatch",transformOptions:{unsupportedPathMessage:"Unsupported Daytona OTLP path: expected /v1/logs, /v1/traces, or /v1/metrics",metricsWarningMessage:"Daytona metrics received but not yet supported"}}],lifecycleSkipReason:"Manual webhook setup is not exercised by automated lifecycle tests yet.",subtitle:"Stream sandbox telemetry from your Daytona organization to Sazabi via org-level OpenTelemetry export.",features:["Org-level OTLP logs and traces","Sandbox resource attributes (organization, region, snapshot)","Durable retention beyond Daytona's 3-day window"],evidenceHints:["Daytona SDK/CLI usage, Daytona sandbox config, or DAYTONA_* environment variables","Code execution sandbox infrastructure backed by Daytona snapshots","README/docs naming Daytona for agent or development sandboxes"],setupSkill:H,dashboard:{iconKey:"daytona",intakeSourceId:"daytona"}}});var Lv,Dv,Cv;var j_=d(()=>{St();Lv={kind:"multi-step",steps:[{id:"prepare",title:"Create access token",actions:[{kind:"instruction",instruction:"Create a [DigitalOcean personal access token](https://cloud.digitalocean.com/account/api/tokens) with **Full Access** scope, or use Custom Scopes with `app:read`, `app:update`, `actions:read`, `regions:read`, and `sizes:read` so Sazabi can set up log forwarding on your apps."}]},{id:"credentials",title:"Enter access token",actions:[{id:"token",kind:"secret",label:"Personal access token",instruction:"Enter your personal access token below.",placeholder:"dop_v1_..."}]}],submit:{actions:[{kind:"validate",action:"validate",input:{token:"$token"}}],metadata:{apiToken:"$token"},button:Ue},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/digitalocean"},Dv={docsUrl:"https://docs.sazabi.com/data/sources/endpoint/digital-ocean",groups:[{id:"open-log-forwarding",section:"config",title:"Open Log Forwarding",actions:[{instruction:"In the [DigitalOcean control panel](https://cloud.digitalocean.com/apps), open the App Platform app you want to forward, then go to **Settings > Log Forwarding** and add a **Datadog** destination. You can also add the destination through your app spec (`app.yaml`) or `doctl apps update`."},{instruction:"Repeat this setup for every app you want to forward — log destinations are configured **per app** and attach to each service, worker, and job.",notes:[{text:"To add forwarding across an app in one step from a picker, connect your DigitalOcean account instead."},{text:"App Platform Functions, Droplets, Spaces, Managed Databases, and Managed Kubernetes are not covered by this path — forward those with Sazabi's [OpenTelemetry endpoint](https://docs.sazabi.com/data/sources/endpoint/opentelemetry)."}]}]},{id:"endpoint",section:"config",title:"Set Datadog destination values",actions:[{instruction:"Paste your Sazabi intake URL (above) into the **Endpoint (API URL)** field, and this key into the **API key** field.",payloads:[{kind:"copyable",label:"Datadog API key",value:"${context.publicKey}",copyLabel:"Sazabi public key",description:"App Platform requires a Datadog API key field — the key embedded in the endpoint hostname is what actually authenticates the stream."}]}]},{id:"verify",section:"verify",title:"Save and verify",actions:[{instruction:"Save the log destination, then trigger activity — deploy the app or hit one of its routes. Logs appear in Sazabi within a few minutes."}]}]},Cv={content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:[{field:"name",header:"Name"},{field:"componentCount",header:"Components",width:"w-40",cell:"badge"}],searchPlaceholder:"Search apps...",searchFields:["name"],dedupeByConfigField:"appId",emptyState:{noMatches:"No apps found.",allConfigured:"All apps already have log streams configured.",noItems:"No App Platform apps found in this DigitalOcean account. Create an app in DigitalOcean first, then return here to forward its logs."},toStreamItem:{displayName:"$item.name",config:{appId:"$item.id",appName:"$item.name"}}}}});var c8,s8,N_;var R_=d(()=>{j_();c8=["apiToken"],s8={id:"digital-ocean",label:"DigitalOcean",transform:"datadog-agent"},N_={id:"digital_ocean",name:"DigitalOcean",searchAliases:["digital ocean","do"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:c8,intake:[s8],subtitle:"Forward your DigitalOcean infrastructure logs directly to Sazabi for unified observability.",features:["Log forwarding","App Platform logs"],evidenceHints:[".do/app.yaml, DigitalOcean App Platform specs, or doctl scripts","DIGITALOCEAN_* environment variables or Terraform digitalocean provider resources","README/docs naming DigitalOcean Apps, Droplets, Kubernetes, or Spaces"],setupSkill:H,dashboard:{iconKey:"digital-ocean",intakeSourceId:"digital-ocean",streamSelectorLayout:"sidepanel",streamTableColumns:[{kind:"config-text",header:"App",width:"w-32",configField:"appName",fallbackLabel:"Unknown app"}],actions:{submit:{validate:{kind:"source-action",actionId:"validate-token",sensitiveInputFields:["token"]}},list:{list:{kind:"source-action",actionId:"list-apps",itemsField:"apps"}}}}}});var h8,zv;var x_=d(()=>{h8=[{instruction:"Set `SAZABI_INTAKE_URL` to your intake URL (above) in the application that creates E2B sandboxes."}],zv={groups:[{id:"values",section:"config",title:"Set environment variables",actions:h8},{id:"instrument",section:"config",title:"Instrument sandbox logs",actions:[{instruction:"Emit sandbox stdout and stderr through the OpenTelemetry logs SDK.",payloads:[{kind:"code-tabs",label:"SDK integration",tabs:[{id:"typescript",label:"TypeScript",language:"typescript",value:`import { Sandbox } from '@e2b/code-interpreter'
6648
6648
  import { logs, SeverityNumber } from '@opentelemetry/api-logs'
6649
6649
  import { LoggerProvider, BatchLogRecordProcessor } from '@opentelemetry/sdk-logs'
6650
6650
  import { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-http'
@@ -6767,7 +6767,7 @@ finally:
6767
6767
  sandbox.kill()
6768
6768
  finally:
6769
6769
  # Flush logs before exit; runs even if sandbox.kill() raises.
6770
- logger_provider.shutdown()`,copyLabel:"Python code"}]}]}]},{id:"verify",section:"verify",title:"Run and verify",actions:[{instruction:"Run a sandbox with the instrumentation in place. Its stdout and stderr should appear in Sazabi within a couple of minutes."}]}]}});var U_;var M_=d(()=>{x_();U_={id:"e2b",name:"E2B",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual SDK setup is not exercised by automated lifecycle tests yet.",intake:[{id:"e2b",label:"E2B",subdomain:"e2b",transform:"otlp-passthrough"}],subtitle:"Stream your E2B sandbox logs directly to Sazabi for code execution observability.",features:["Sandbox stdout/stderr capture"],evidenceHints:["e2b packages, E2B_API_KEY, or sandbox template config","Code execution sandbox workflows using E2B","README/docs naming E2B for agent sandboxes or code interpreter workloads"],setupSkill:H,dashboard:{iconKey:"e2b",intakeSourceId:"e2b"}}});var _v;var E_=d(()=>{_v={perStreamInstructions:!0,kind:"choice",title:"Choose Elastic forwarder",description:"Forward Elastic Cloud logs to Sazabi with Elastic Agent's embedded Collector or with a self-managed Logstash pipeline.",options:[{id:"elastic-agent",label:"Elastic Agent",description:"Use Elastic Agent 8.13+ or Fleet 9.2+ with an OpenTelemetry Collector config.",flow:{groups:[{id:"prepare-agent",section:"config",title:"Prepare Elastic Agent",notes:[{text:"Elastic Agent 8.13+ ships an embedded OpenTelemetry Collector (EDOT)."}],actions:[{instruction:"Point Elastic Agent at Sazabi through the embedded OTel Collector, not via a Fleet output.",notes:[{text:"Fleet's **Outputs** UI does not expose an OTLP type."}]}]},{id:"copy-config",section:"config",title:"Copy Collector config",actions:[{instruction:"Configure Sazabi as a standard `otlphttp` exporter.",payloads:[{kind:"code",label:"sazabi-otel.yml",language:"yaml",copyLabel:"OTel Collector config",value:`receivers:
6770
+ logger_provider.shutdown()`,copyLabel:"Python code"}]}]}]},{id:"verify",section:"verify",title:"Run and verify",actions:[{instruction:"Run a sandbox with the instrumentation in place. Its stdout and stderr should appear in Sazabi within a couple of minutes."}]}]}});var U_;var M_=d(()=>{x_();U_={id:"e2b",name:"E2B",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual SDK setup is not exercised by automated lifecycle tests yet.",intake:[{id:"e2b",label:"E2B",transform:"otlp-passthrough"}],subtitle:"Stream your E2B sandbox logs directly to Sazabi for code execution observability.",features:["Sandbox stdout/stderr capture"],evidenceHints:["e2b packages, E2B_API_KEY, or sandbox template config","Code execution sandbox workflows using E2B","README/docs naming E2B for agent sandboxes or code interpreter workloads"],setupSkill:H,dashboard:{iconKey:"e2b",intakeSourceId:"e2b"}}});var _v;var E_=d(()=>{_v={perStreamInstructions:!0,kind:"choice",title:"Choose Elastic forwarder",description:"Forward Elastic Cloud logs to Sazabi with Elastic Agent's embedded Collector or with a self-managed Logstash pipeline.",options:[{id:"elastic-agent",label:"Elastic Agent",description:"Use Elastic Agent 8.13+ or Fleet 9.2+ with an OpenTelemetry Collector config.",flow:{groups:[{id:"prepare-agent",section:"config",title:"Prepare Elastic Agent",notes:[{text:"Elastic Agent 8.13+ ships an embedded OpenTelemetry Collector (EDOT)."}],actions:[{instruction:"Point Elastic Agent at Sazabi through the embedded OTel Collector, not via a Fleet output.",notes:[{text:"Fleet's **Outputs** UI does not expose an OTLP type."}]}]},{id:"copy-config",section:"config",title:"Copy Collector config",actions:[{instruction:"Configure Sazabi as a standard `otlphttp` exporter.",payloads:[{kind:"code",label:"sazabi-otel.yml",language:"yaml",copyLabel:"OTel Collector config",value:`receivers:
6771
6771
  filelog:
6772
6772
  include: ["/var/log/**/*.log"]
6773
6773
  start_at: beginning
@@ -6837,7 +6837,7 @@ output {
6837
6837
  content_type => "application/json"
6838
6838
  message => "%{[@metadata][otlp_body]}"
6839
6839
  }
6840
- }`}],notes:[{text:'The pipeline polls the index every minute via the `schedule` setting, builds an OTLP/HTTP `resourceLogs` envelope in a `ruby` filter, and POSTs the raw JSON via the `http` output (using `format => "message"` so Logstash sends the exact body the filter builds).'},{text:"The `ruby` filter is included with Logstash by default."}]}]},{id:"update-endpoint",section:"config",title:"Update endpoint",actions:[{instruction:"Replace `<your-deployment>` and `<region>` with your Elastic Cloud deployment's Elasticsearch endpoint, for example `https://acme.es.us-central1.gcp.cloud.es.io:443`."}]}]}}]}});var K_;var G_=d(()=>{E_();K_={id:"elastic_cloud",name:"Elastic Cloud",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual agent setup is not exercised by automated lifecycle tests yet.",intake:[{id:"elastic-cloud",label:"Elastic Cloud",subdomain:"elastic-cloud",transform:"otlp-passthrough"}],subtitle:"Forward logs from your Elastic Cloud deployment to Sazabi using Elastic Agent or Logstash.",features:["Elastic Agent OTel Collector output","Logstash pipeline forwarding","No Sazabi infrastructure required"],evidenceHints:["Elastic Agent, Beats, Logstash, or Elasticsearch/Kibana config","ELASTIC_* environment variables or Terraform elasticstack/elastic provider resources","README/docs naming Elastic Cloud, Elasticsearch, or Kibana for observability"],setupSkill:H,dashboard:{iconKey:"elastic-cloud",intakeSourceId:"elastic-cloud"}}});var jv;var q_=d(()=>{jv={perStreamInstructions:!0,groups:[{id:"copy-config",section:"config",title:"Copy output configuration",notes:[{variant:"requirement",text:"Requires Fluent Bit v2.0 or later. The `opentelemetry` output plugin is included in the default distribution, so no additional installation is needed."}],actions:[{instruction:"Configure Fluent Bit's built-in `opentelemetry` output plugin.",payloads:[{kind:"code-tabs",label:"Output configuration",description:"Choose the snippet format that matches how you manage Fluent Bit.",tabs:[{id:"classic",label:"Classic config",language:"bash",copyLabel:"Classic Fluent Bit output configuration",value:`[OUTPUT]
6840
+ }`}],notes:[{text:'The pipeline polls the index every minute via the `schedule` setting, builds an OTLP/HTTP `resourceLogs` envelope in a `ruby` filter, and POSTs the raw JSON via the `http` output (using `format => "message"` so Logstash sends the exact body the filter builds).'},{text:"The `ruby` filter is included with Logstash by default."}]}]},{id:"update-endpoint",section:"config",title:"Update endpoint",actions:[{instruction:"Replace `<your-deployment>` and `<region>` with your Elastic Cloud deployment's Elasticsearch endpoint, for example `https://acme.es.us-central1.gcp.cloud.es.io:443`."}]}]}}]}});var K_;var G_=d(()=>{E_();K_={id:"elastic_cloud",name:"Elastic Cloud",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual agent setup is not exercised by automated lifecycle tests yet.",intake:[{id:"elastic-cloud",label:"Elastic Cloud",transform:"otlp-passthrough"}],subtitle:"Forward logs from your Elastic Cloud deployment to Sazabi using Elastic Agent or Logstash.",features:["Elastic Agent OTel Collector output","Logstash pipeline forwarding","No Sazabi infrastructure required"],evidenceHints:["Elastic Agent, Beats, Logstash, or Elasticsearch/Kibana config","ELASTIC_* environment variables or Terraform elasticstack/elastic provider resources","README/docs naming Elastic Cloud, Elasticsearch, or Kibana for observability"],setupSkill:H,dashboard:{iconKey:"elastic-cloud",intakeSourceId:"elastic-cloud"}}});var jv;var q_=d(()=>{jv={perStreamInstructions:!0,groups:[{id:"copy-config",section:"config",title:"Copy output configuration",notes:[{variant:"requirement",text:"Requires Fluent Bit v2.0 or later. The `opentelemetry` output plugin is included in the default distribution, so no additional installation is needed."}],actions:[{instruction:"Configure Fluent Bit's built-in `opentelemetry` output plugin.",payloads:[{kind:"code-tabs",label:"Output configuration",description:"Choose the snippet format that matches how you manage Fluent Bit.",tabs:[{id:"classic",label:"Classic config",language:"bash",copyLabel:"Classic Fluent Bit output configuration",value:`[OUTPUT]
6841
6841
  name opentelemetry
6842
6842
  match *
6843
6843
  host \${context.ingestHost}
@@ -6853,7 +6853,7 @@ output {
6853
6853
  port 443
6854
6854
  logs_uri /v1/logs
6855
6855
  tls on
6856
- tls.verify on`}]}]}]},{id:"restart",section:"verify",title:"Restart and verify",actions:[{instruction:"Restart Fluent Bit so it picks up the updated output configuration, then trigger some log activity.",notes:[{text:"If logs do not appear after restart, check the Fluent Bit process logs for TLS, DNS, or authorization errors."}]}]}]}});var J_;var B_=d(()=>{q_();J_={id:"fluent_bit",name:"Fluent Bit",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual agent setup is not exercised by automated lifecycle tests yet.",intake:[{id:"fluent-bit",label:"Fluent Bit",subdomain:"fluent-bit",transform:"otlp-passthrough"}],subtitle:"Forward logs from your Kubernetes cluster or any infrastructure to Sazabi using the Fluent Bit agent.",features:["Kubernetes DaemonSet","Container log collection","Multi-pipeline routing","Low resource footprint"],evidenceHints:["fluent-bit.conf, parsers.conf, Helm values, or Kubernetes DaemonSets","Fluent Bit outputs already shipping container logs","README/docs naming Fluent Bit as the log forwarder"],setupSkill:H,dashboard:{iconKey:"fluent-bit",intakeSourceId:"fluent-bit"}}});var Nv,Rv,xv;var H_=d(()=>{St();Nv={kind:"multi-step",steps:[{id:"prepare",title:"Create token",actions:[{kind:"instruction",instruction:"Create a read-only organization token from the CLI or the Fly.io dashboard.",payloads:[{kind:"options",options:[{id:"cli",label:"CLI",payloads:[{kind:"code",language:"bash",copyLabel:"flyctl read-only token command",value:"flyctl tokens create readonly -o <org-slug>"}]},{id:"dashboard",label:"Dashboard",payloads:[{kind:"external-link",label:"Open the Fly.io dashboard",href:"https://fly.io/dashboard",description:"Open the org's Tokens tab and create a read-only token."}]}]}]}]},{id:"credentials",title:"Enter credentials",actions:[{id:"token",kind:"secret",label:"API token",instruction:"Enter your Fly.io API token below.",placeholder:"FlyV1 ..."},{id:"orgSlug",kind:"text",label:"Organization slug",instruction:"Enter your organization slug below.",placeholder:"personal"}]}],submit:{actions:[{kind:"validate",action:"validate",input:{dataSourceType:"fly_io",metadata:{apiToken:"$token",organizationSlug:"$orgSlug"}}}],metadata:{apiToken:"$token",organizationSlug:"$orgSlug"},button:Ue},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/fly-io"},Rv={groups:[{id:"shipper",section:"config",title:"Run a log shipper",description:"Fly.io has no managed log-drain API, so you run a log shipper inside your Fly organization and point it at Sazabi.",notes:[{text:"The shipper reads Fly's internal NATS log stream, so it must run in the **same Fly organization** as the apps you want to monitor. The shipper is required either way — to also let Sazabi discover and verify your apps from a read-only token, connect your Fly.io account instead."}],actions:[{instruction:"Pick a log-shipper option — you run **one**, not both. **Option A — fly-log-shipper (simplest):** launch the stock [superfly/fly-log-shipper](https://github.com/superfly/fly-log-shipper) image in your org and enable its generic `http` sink with the two secrets below; Sazabi parses Fly's native JSON event format directly. **Option B — dedicated OTLP shipper:** for per-app keys and richer OTLP resource attributes, build a Vector app that wraps events in an OTLP `resourceLogs` envelope and POSTs to the OTLP endpoint below."}]},{id:"endpoint",section:"config",title:"Set the shipper secrets",actions:[{instruction:"Set the fly-log-shipper secrets (Option A): `HTTP_URL` is your intake URL (above); `HTTP_TOKEN` is the key below.",payloads:[{kind:"copyable",label:"`HTTP_TOKEN`",value:"${context.publicKey}",description:"Your Sazabi public key, sent as a bearer token. Paste the raw key with no `Bearer ` prefix."},{kind:"code",label:"Set both secrets on the shipper app",language:"bash",value:'fly secrets set -a <log-shipper-app> \\\n HTTP_URL="https://${context.ingestHost}/fly-log-shipper" \\\n HTTP_TOKEN="${context.publicKey}"'}]},{instruction:"If you chose the dedicated OTLP shipper (Option B), POST OTLP `resourceLogs` to the endpoint below — with the same public key as a bearer token — instead of setting the two secrets above.",payloads:[{kind:"showIngestUrl",label:"OTLP endpoint (Option B)",pathSuffix:"/v1/logs"}]}]},{id:"verify",section:"verify",title:"Deploy and verify",actions:[{instruction:"Deploy the shipper, then trigger activity — deploy an app or hit a deployed route. Logs appear in Sazabi within a few minutes."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/fly-io"},xv={content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:[{field:"name",header:"Name"}],searchPlaceholder:"Search apps...",searchFields:["name"],dedupeByConfigField:"appName",emptyState:{noMatches:"No apps found.",allConfigured:"All apps already have log streams configured."},toStreamItem:{displayName:"$item.name",config:{appName:"$item.name"}}}}});var l8,u8,W_;var F_=d(()=>{H_();l8=["apiToken"],u8={id:"fly-io",label:"Fly.io",subdomain:"fly-io",transform:"otlp-with-fly-log-shipper"},W_={id:"fly_io",name:"Fly.io",searchAliases:["fly","flyio"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:l8,intake:[u8],subtitle:"Forward your Fly.io application logs directly to Sazabi for global monitoring.",features:["Log shipping","Multi-region logs","Machine monitoring"],evidenceHints:["fly.toml or .fly/ app configuration","FLY_* environment variables or scripts that run flyctl/fly deploy","README/docs naming Fly.io as the deployment host"],setupSkill:H,dashboard:{iconKey:"fly-io",intakeSourceId:"fly-io",streamSelectorLayout:"sidepanel",actions:{submit:{validate:{procedure:"dataSources.validateConnection"}},list:{list:{kind:"source-action",actionId:"list-apps",itemsField:"apps"}}}}}});var Uv,Mv,Ev;var Z_=d(()=>{St();Uv={kind:"choice",title:"Choose setup method",description:"Select how you want to connect Google Cloud logs.",options:[{id:"service-account",label:"Service account",description:"Let Sazabi set up the log sink, Pub/Sub topic, and pull subscription automatically.",flow:{kind:"multi-step",steps:[{id:"prepare",title:"Prepare access",description:"Create a service account key with permissions for log forwarding.",notes:[{text:"Sazabi turns on the required APIs and sets up the log pipeline in your GCP project automatically."}],actions:[{kind:"instruction",instruction:"Grant the service account the following roles on the target GCP project(s).",payloads:[{kind:"copyable-list",items:[{value:"roles/serviceusage.serviceUsageAdmin"},{value:"roles/logging.configWriter"},{value:"roles/pubsub.admin"},{value:"roles/browser"}]},{kind:"external-link",label:"Enable the Service Usage API",href:"https://console.cloud.google.com/apis/library/serviceusage.googleapis.com"}],notes:[{text:'New or auto-created projects (for example a `gen-lang-client-...` project from Google AI Studio) may also need the Service Usage API enabled first. Sazabi uses that API to turn on the others, but it cannot enable itself. If you hit a "Service Usage API has not been used / is disabled" error, enable it on the project, wait about a minute, then retry.'}]},{kind:"instruction",instruction:"To create the key: go to [Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts) in the Google Cloud Console, select (or create) the service account, open **Keys**, then choose **Add key → Create new key → JSON**. Download the file — you'll paste its contents in the next step. Alternatively, use `gcloud iam service-accounts keys create sazabi-key.json --iam-account=YOUR_SERVICE_ACCOUNT_EMAIL`.",payloads:[{kind:"external-link",label:"Open service accounts in GCP Console",href:"https://console.cloud.google.com/iam-admin/serviceaccounts"}]}]},{id:"credentials",title:"Enter service account key",actions:[{id:"key",kind:"secret",label:"Service account key (JSON)",instruction:"Paste your service account key JSON below.",placeholder:'{"type": "service_account", "project_id": "...", ...}'}]}],submit:{actions:[{kind:"validate",action:"validate",input:{serviceAccountKey:"$key"},resultAs:"validateKey"},{kind:"preflight",action:"preflight",input:{serviceAccountKey:"$key"}}],metadata:{serviceAccountKey:"$key"},displayName:"GCP $validateKey.projectId",button:Ue}}},{id:"connectionless",label:"Your own collector",description:"Configure the sink, Pub/Sub topic, and collector yourself.",flow:{kind:"connectionless"}}],docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/gcp"},Mv={content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:[{field:"displayName",header:"Name"},{field:"projectId",header:"Project ID",width:"w-48",cell:"muted"}],searchPlaceholder:"Search projects...",searchFields:["displayName","projectId"],dedupeByConfigField:"gcpProjectId",emptyState:{noMatches:"No projects found.",allConfigured:"All accessible projects already have log streams configured."},toStreamItem:{displayName:"$item.displayName",config:{gcpProjectId:"$item.projectId",gcpProjectName:"$item.displayName"}}}},Ev={groups:[{id:"prepare",section:"config",title:"Prepare GCP pipeline",description:"Create a Cloud Logging sink, Pub/Sub topic, and collector subscription.",notes:[{variant:"requirement",text:"Required GCP permissions: the person performing these steps needs a role that grants `logging.sinks.create` (e.g. `roles/logging.configWriter`) and `pubsub.topics.setIamPolicy` (e.g. `roles/pubsub.admin`)."}],actions:[{instruction:"Create a Pub/Sub topic and subscription in your GCP project (e.g. `sazabi-logs` and `sazabi-logs-sub`)."},{instruction:"Create a Cloud Logging sink that routes logs to the Pub/Sub topic. Grant the sink's service account the `roles/pubsub.publisher` role on the topic."},{instruction:"Deploy an OpenTelemetry Collector (e.g. on a GCE instance, GKE pod, or Cloud Run service) using the `opentelemetry-collector-contrib` distribution."},{instruction:"Ensure the collector's service account has the `roles/pubsub.subscriber` IAM role on the subscription."}]},{id:"collector",section:"config",title:"Configure collector",notes:[{variant:"requirement",text:"The receiver requires the `googlecloudlogentry_encoding` encoding extension."}],actions:[{instruction:"Use a `googlecloudpubsub` receiver and `otlp_http` exporter.",payloads:[{kind:"code",label:"Example collector configuration",language:"yaml",copyLabel:"Collector configuration",value:`extensions:
6856
+ tls.verify on`}]}]}]},{id:"restart",section:"verify",title:"Restart and verify",actions:[{instruction:"Restart Fluent Bit so it picks up the updated output configuration, then trigger some log activity.",notes:[{text:"If logs do not appear after restart, check the Fluent Bit process logs for TLS, DNS, or authorization errors."}]}]}]}});var J_;var B_=d(()=>{q_();J_={id:"fluent_bit",name:"Fluent Bit",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual agent setup is not exercised by automated lifecycle tests yet.",intake:[{id:"fluent-bit",label:"Fluent Bit",transform:"otlp-passthrough"}],subtitle:"Forward logs from your Kubernetes cluster or any infrastructure to Sazabi using the Fluent Bit agent.",features:["Kubernetes DaemonSet","Container log collection","Multi-pipeline routing","Low resource footprint"],evidenceHints:["fluent-bit.conf, parsers.conf, Helm values, or Kubernetes DaemonSets","Fluent Bit outputs already shipping container logs","README/docs naming Fluent Bit as the log forwarder"],setupSkill:H,dashboard:{iconKey:"fluent-bit",intakeSourceId:"fluent-bit"}}});var Nv,Rv,xv;var H_=d(()=>{St();Nv={kind:"multi-step",steps:[{id:"prepare",title:"Create token",actions:[{kind:"instruction",instruction:"Create a read-only organization token from the CLI or the Fly.io dashboard.",payloads:[{kind:"options",options:[{id:"cli",label:"CLI",payloads:[{kind:"code",language:"bash",copyLabel:"flyctl read-only token command",value:"flyctl tokens create readonly -o <org-slug>"}]},{id:"dashboard",label:"Dashboard",payloads:[{kind:"external-link",label:"Open the Fly.io dashboard",href:"https://fly.io/dashboard",description:"Open the org's Tokens tab and create a read-only token."}]}]}]}]},{id:"credentials",title:"Enter credentials",actions:[{id:"token",kind:"secret",label:"API token",instruction:"Enter your Fly.io API token below.",placeholder:"FlyV1 ..."},{id:"orgSlug",kind:"text",label:"Organization slug",instruction:"Enter your organization slug below.",placeholder:"personal"}]}],submit:{actions:[{kind:"validate",action:"validate",input:{dataSourceType:"fly_io",metadata:{apiToken:"$token",organizationSlug:"$orgSlug"}}}],metadata:{apiToken:"$token",organizationSlug:"$orgSlug"},button:Ue},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/fly-io"},Rv={groups:[{id:"shipper",section:"config",title:"Run a log shipper",description:"Fly.io has no managed log-drain API, so you run a log shipper inside your Fly organization and point it at Sazabi.",notes:[{text:"The shipper reads Fly's internal NATS log stream, so it must run in the **same Fly organization** as the apps you want to monitor. The shipper is required either way — to also let Sazabi discover and verify your apps from a read-only token, connect your Fly.io account instead."}],actions:[{instruction:"Pick a log-shipper option — you run **one**, not both. **Option A — fly-log-shipper (simplest):** launch the stock [superfly/fly-log-shipper](https://github.com/superfly/fly-log-shipper) image in your org and enable its generic `http` sink with the two secrets below; Sazabi parses Fly's native JSON event format directly. **Option B — dedicated OTLP shipper:** for per-app keys and richer OTLP resource attributes, build a Vector app that wraps events in an OTLP `resourceLogs` envelope and POSTs to the OTLP endpoint below."}]},{id:"endpoint",section:"config",title:"Set the shipper secrets",actions:[{instruction:"Set the fly-log-shipper secrets (Option A): `HTTP_URL` is your intake URL (above); `HTTP_TOKEN` is the key below.",payloads:[{kind:"copyable",label:"`HTTP_TOKEN`",value:"${context.publicKey}",description:"Your Sazabi public key, sent as a bearer token. Paste the raw key with no `Bearer ` prefix."},{kind:"code",label:"Set both secrets on the shipper app",language:"bash",value:'fly secrets set -a <log-shipper-app> \\\n HTTP_URL="https://${context.ingestHost}/fly-log-shipper" \\\n HTTP_TOKEN="${context.publicKey}"'}]},{instruction:"If you chose the dedicated OTLP shipper (Option B), POST OTLP `resourceLogs` to the endpoint below — with the same public key as a bearer token — instead of setting the two secrets above.",payloads:[{kind:"showIngestUrl",label:"OTLP endpoint (Option B)",pathSuffix:"/v1/logs"}]}]},{id:"verify",section:"verify",title:"Deploy and verify",actions:[{instruction:"Deploy the shipper, then trigger activity — deploy an app or hit a deployed route. Logs appear in Sazabi within a few minutes."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/fly-io"},xv={content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:[{field:"name",header:"Name"}],searchPlaceholder:"Search apps...",searchFields:["name"],dedupeByConfigField:"appName",emptyState:{noMatches:"No apps found.",allConfigured:"All apps already have log streams configured."},toStreamItem:{displayName:"$item.name",config:{appName:"$item.name"}}}}});var l8,u8,W_;var F_=d(()=>{H_();l8=["apiToken"],u8={id:"fly-io",label:"Fly.io",transform:"otlp-with-fly-log-shipper"},W_={id:"fly_io",name:"Fly.io",searchAliases:["fly","flyio"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:l8,intake:[u8],subtitle:"Forward your Fly.io application logs directly to Sazabi for global monitoring.",features:["Log shipping","Multi-region logs","Machine monitoring"],evidenceHints:["fly.toml or .fly/ app configuration","FLY_* environment variables or scripts that run flyctl/fly deploy","README/docs naming Fly.io as the deployment host"],setupSkill:H,dashboard:{iconKey:"fly-io",intakeSourceId:"fly-io",streamSelectorLayout:"sidepanel",actions:{submit:{validate:{procedure:"dataSources.validateConnection"}},list:{list:{kind:"source-action",actionId:"list-apps",itemsField:"apps"}}}}}});var Uv,Mv,Ev;var Z_=d(()=>{St();Uv={kind:"choice",title:"Choose setup method",description:"Select how you want to connect Google Cloud logs.",options:[{id:"service-account",label:"Service account",description:"Let Sazabi set up the log sink, Pub/Sub topic, and pull subscription automatically.",flow:{kind:"multi-step",steps:[{id:"prepare",title:"Prepare access",description:"Create a service account key with permissions for log forwarding.",notes:[{text:"Sazabi turns on the required APIs and sets up the log pipeline in your GCP project automatically."}],actions:[{kind:"instruction",instruction:"Grant the service account the following roles on the target GCP project(s).",payloads:[{kind:"copyable-list",items:[{value:"roles/serviceusage.serviceUsageAdmin"},{value:"roles/logging.configWriter"},{value:"roles/pubsub.admin"},{value:"roles/browser"}]},{kind:"external-link",label:"Enable the Service Usage API",href:"https://console.cloud.google.com/apis/library/serviceusage.googleapis.com"}],notes:[{text:'New or auto-created projects (for example a `gen-lang-client-...` project from Google AI Studio) may also need the Service Usage API enabled first. Sazabi uses that API to turn on the others, but it cannot enable itself. If you hit a "Service Usage API has not been used / is disabled" error, enable it on the project, wait about a minute, then retry.'}]},{kind:"instruction",instruction:"To create the key: go to [Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts) in the Google Cloud Console, select (or create) the service account, open **Keys**, then choose **Add key → Create new key → JSON**. Download the file — you'll paste its contents in the next step. Alternatively, use `gcloud iam service-accounts keys create sazabi-key.json --iam-account=YOUR_SERVICE_ACCOUNT_EMAIL`.",payloads:[{kind:"external-link",label:"Open service accounts in GCP Console",href:"https://console.cloud.google.com/iam-admin/serviceaccounts"}]}]},{id:"credentials",title:"Enter service account key",actions:[{id:"key",kind:"secret",label:"Service account key (JSON)",instruction:"Paste your service account key JSON below.",placeholder:'{"type": "service_account", "project_id": "...", ...}'}]}],submit:{actions:[{kind:"validate",action:"validate",input:{serviceAccountKey:"$key"},resultAs:"validateKey"},{kind:"preflight",action:"preflight",input:{serviceAccountKey:"$key"}}],metadata:{serviceAccountKey:"$key"},displayName:"GCP $validateKey.projectId",button:Ue}}},{id:"connectionless",label:"Your own collector",description:"Configure the sink, Pub/Sub topic, and collector yourself.",flow:{kind:"connectionless"}}],docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/gcp"},Mv={content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:[{field:"displayName",header:"Name"},{field:"projectId",header:"Project ID",width:"w-48",cell:"muted"}],searchPlaceholder:"Search projects...",searchFields:["displayName","projectId"],dedupeByConfigField:"gcpProjectId",emptyState:{noMatches:"No projects found.",allConfigured:"All accessible projects already have log streams configured."},toStreamItem:{displayName:"$item.displayName",config:{gcpProjectId:"$item.projectId",gcpProjectName:"$item.displayName"}}}},Ev={groups:[{id:"prepare",section:"config",title:"Prepare GCP pipeline",description:"Create a Cloud Logging sink, Pub/Sub topic, and collector subscription.",notes:[{variant:"requirement",text:"Required GCP permissions: the person performing these steps needs a role that grants `logging.sinks.create` (e.g. `roles/logging.configWriter`) and `pubsub.topics.setIamPolicy` (e.g. `roles/pubsub.admin`)."}],actions:[{instruction:"Create a Pub/Sub topic and subscription in your GCP project (e.g. `sazabi-logs` and `sazabi-logs-sub`)."},{instruction:"Create a Cloud Logging sink that routes logs to the Pub/Sub topic. Grant the sink's service account the `roles/pubsub.publisher` role on the topic."},{instruction:"Deploy an OpenTelemetry Collector (e.g. on a GCE instance, GKE pod, or Cloud Run service) using the `opentelemetry-collector-contrib` distribution."},{instruction:"Ensure the collector's service account has the `roles/pubsub.subscriber` IAM role on the subscription."}]},{id:"collector",section:"config",title:"Configure collector",notes:[{variant:"requirement",text:"The receiver requires the `googlecloudlogentry_encoding` encoding extension."}],actions:[{instruction:"Use a `googlecloudpubsub` receiver and `otlp_http` exporter.",payloads:[{kind:"code",label:"Example collector configuration",language:"yaml",copyLabel:"Collector configuration",value:`extensions:
6857
6857
  googlecloudlogentry_encoding:
6858
6858
 
6859
6859
  receivers:
@@ -6871,7 +6871,7 @@ service:
6871
6871
  pipelines:
6872
6872
  logs:
6873
6873
  receivers: [googlecloudpubsub]
6874
- exporters: [otlp_http]`}]}]},{id:"run",section:"verify",title:"Run and verify",actions:[{instruction:"Deploy the collector, then write a test log entry in the project and check for delivery errors on the collector and Pub/Sub subscription."}]}]}});var d8,g8,X_;var Y_=d(()=>{Z_();d8=["serviceAccountKey"],g8={id:"gcp",label:"Google Cloud Platform",subdomain:"gcp",transform:"gcp-pubsub-push"},X_={id:"gcp",name:"GCP",searchAliases:["google cloud","google cloud platform","gcloud"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["pull"],lifecycleEligible:!0,sensitiveFields:d8,intake:[g8],subtitle:"Connect your GCP logs to Sazabi for AI-powered observability. Automatically provision log sinks with a service account, or run your own collector.",features:["Log forwarding","Real-time streaming","Log sink support"],evidenceHints:["Google Cloud Run, GKE, Cloud Functions, Pub/Sub, or Cloud Logging resources","gcloud scripts, GOOGLE_CLOUD_PROJECT, GCLOUD_PROJECT, or Terraform google provider","README/docs naming Google Cloud as the runtime or log provider"],setupSkill:H,dashboard:{iconKey:"gcp",intakeSourceId:"gcp",streamSelectorLayout:"sidepanel",actions:{submit:{validate:{kind:"source-action",actionId:"validate-service-account-key"},preflight:{kind:"source-action",actionId:"run-preflight-checks",normalize:"preflight"}},list:{list:{kind:"source-action",actionId:"list-projects",itemsField:"projects"}}}}}});var Kv;var Q_=d(()=>{Kv={perStreamInstructions:!0,groups:[{id:"copy-config",section:"config",title:"Copy Alloy pipeline",actions:[{instruction:"Add Sazabi as an OTLP HTTP exporter in your Alloy deployment.",payloads:[{kind:"code-tabs",label:"Alloy configuration",description:"Choose the snippet format that matches how you deploy Alloy.",tabs:[{id:"river",label:"`config.alloy`",language:"hcl",copyLabel:"Alloy config",value:`otelcol.receiver.otlp "default" {
6874
+ exporters: [otlp_http]`}]}]},{id:"run",section:"verify",title:"Run and verify",actions:[{instruction:"Deploy the collector, then write a test log entry in the project and check for delivery errors on the collector and Pub/Sub subscription."}]}]}});var d8,g8,X_;var Y_=d(()=>{Z_();d8=["serviceAccountKey"],g8={id:"gcp",label:"Google Cloud Platform",transform:"gcp-pubsub-push"},X_={id:"gcp",name:"GCP",searchAliases:["google cloud","google cloud platform","gcloud"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["pull"],lifecycleEligible:!0,sensitiveFields:d8,intake:[g8],subtitle:"Connect your GCP logs to Sazabi for AI-powered observability. Automatically provision log sinks with a service account, or run your own collector.",features:["Log forwarding","Real-time streaming","Log sink support"],evidenceHints:["Google Cloud Run, GKE, Cloud Functions, Pub/Sub, or Cloud Logging resources","gcloud scripts, GOOGLE_CLOUD_PROJECT, GCLOUD_PROJECT, or Terraform google provider","README/docs naming Google Cloud as the runtime or log provider"],setupSkill:H,dashboard:{iconKey:"gcp",intakeSourceId:"gcp",streamSelectorLayout:"sidepanel",actions:{submit:{validate:{kind:"source-action",actionId:"validate-service-account-key"},preflight:{kind:"source-action",actionId:"run-preflight-checks",normalize:"preflight"}},list:{list:{kind:"source-action",actionId:"list-projects",itemsField:"projects"}}}}}});var Kv;var Q_=d(()=>{Kv={perStreamInstructions:!0,groups:[{id:"copy-config",section:"config",title:"Copy Alloy pipeline",actions:[{instruction:"Add Sazabi as an OTLP HTTP exporter in your Alloy deployment.",payloads:[{kind:"code-tabs",label:"Alloy configuration",description:"Choose the snippet format that matches how you deploy Alloy.",tabs:[{id:"river",label:"`config.alloy`",language:"hcl",copyLabel:"Alloy config",value:`otelcol.receiver.otlp "default" {
6875
6875
  grpc {}
6876
6876
  http {}
6877
6877
 
@@ -6916,7 +6916,7 @@ otelcol.exporter.otlphttp "sazabi" {
6916
6916
  client {
6917
6917
  endpoint = "https://\${context.ingestHost}"
6918
6918
  }
6919
- }`}]}]}]},{id:"wire-receivers",section:"config",title:"Wire receivers",actions:[{instruction:"Replace `otelcol.receiver.otlp` with the OpenTelemetry receiver(s) that match your sources, such as `otelcol.receiver.filelog` for log files or `otelcol.receiver.jaeger` for Jaeger traces."},{instruction:"Ensure each upstream `otelcol.*` component lists `otelcol.processor.batch.default.input` in its `output` block to ship data to Sazabi."}]}]}});var V_;var ej=d(()=>{Q_();V_={id:"grafana_alloy",name:"Grafana Alloy",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual agent setup is not exercised by automated lifecycle tests yet.",intake:[{id:"grafana-alloy",label:"Grafana Alloy",subdomain:"grafana-alloy",transform:"otlp-passthrough"}],subtitle:"Forward logs and traces from your infrastructure to Sazabi using Grafana Alloy.",features:["Kubernetes DaemonSet","OpenTelemetry native","Flexible River pipeline","Logs and traces"],evidenceHints:["config.alloy, Grafana Alloy Helm values, or River pipeline config","Alloy components that collect Kubernetes, Docker, logs, or traces","README/docs naming Grafana Alloy or Grafana Agent for telemetry forwarding"],setupSkill:H,dashboard:{iconKey:"grafana-alloy",intakeSourceId:"grafana-alloy"}}});var Gv;var tj=d(()=>{St();Gv={groups:[{id:"instrument",section:"config",title:"Instrument the host application",description:"Configure the application that serves your Inngest functions to export OpenTelemetry data.",actions:[...cl("host application")]},{id:"redeploy",section:"verify",title:"Redeploy and verify",actions:[{instruction:"Redeploy or restart the application that serves your Inngest functions, then invoke a function to generate fresh telemetry."}]}]}});var nj;var oj=d(()=>{tj();nj={id:"inngest",name:"Inngest",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual SDK setup is not exercised by automated lifecycle tests yet.",intake:[{id:"inngest",label:"Inngest",subdomain:"inngest",transform:"otlp-passthrough"}],subtitle:"Forward your Inngest function logs directly to Sazabi for workflow observability.",features:["Function logs","Event tracing","Step monitoring"],evidenceHints:["inngest package imports, inngest/client files, or serve handlers","INNGEST_* environment variables or functions under inngest/","README/docs naming Inngest for background jobs, workflows, or event handling"],setupSkill:H,dashboard:{iconKey:"inngest",intakeSourceId:"inngest"}}});var y8,qv;var ij=d(()=>{y8={instruction:"Set the following environment variables in your application environment so they are present when the process starts — `OTEL_EXPORTER_OTLP_ENDPOINT` is your intake URL (above).",payloads:[{kind:"copyable",label:"`OTEL_EXPORTER_OTLP_PROTOCOL`",value:"http/protobuf",copyLabel:"OTLP protocol"}]},qv={groups:[{id:"install-initialize",section:"config",title:"Install and initialize OpenInference",description:"LangChain doesn't send OpenTelemetry traces on its own; OpenInference instruments it.",actions:[{instruction:"Install OpenInference for your LangChain runtime, then run the init snippet once at startup before importing LangChain.",payloads:[{kind:"options",options:[{id:"python",label:"Python",description:"Install OpenInference and initialize tracing before importing LangChain.",payloads:[{kind:"code",label:"Python install command",language:"bash",copyLabel:"Python install command",value:"pip install openinference-instrumentation-langchain \\\n opentelemetry-sdk \\\n opentelemetry-exporter-otlp-proto-http"},{kind:"code",label:"Python init snippet",language:"python",copyLabel:"Python init snippet",value:`from opentelemetry import trace
6919
+ }`}]}]}]},{id:"wire-receivers",section:"config",title:"Wire receivers",actions:[{instruction:"Replace `otelcol.receiver.otlp` with the OpenTelemetry receiver(s) that match your sources, such as `otelcol.receiver.filelog` for log files or `otelcol.receiver.jaeger` for Jaeger traces."},{instruction:"Ensure each upstream `otelcol.*` component lists `otelcol.processor.batch.default.input` in its `output` block to ship data to Sazabi."}]}]}});var V_;var ej=d(()=>{Q_();V_={id:"grafana_alloy",name:"Grafana Alloy",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual agent setup is not exercised by automated lifecycle tests yet.",intake:[{id:"grafana-alloy",label:"Grafana Alloy",transform:"otlp-passthrough"}],subtitle:"Forward logs and traces from your infrastructure to Sazabi using Grafana Alloy.",features:["Kubernetes DaemonSet","OpenTelemetry native","Flexible River pipeline","Logs and traces"],evidenceHints:["config.alloy, Grafana Alloy Helm values, or River pipeline config","Alloy components that collect Kubernetes, Docker, logs, or traces","README/docs naming Grafana Alloy or Grafana Agent for telemetry forwarding"],setupSkill:H,dashboard:{iconKey:"grafana-alloy",intakeSourceId:"grafana-alloy"}}});var Gv;var tj=d(()=>{St();Gv={groups:[{id:"instrument",section:"config",title:"Instrument the host application",description:"Configure the application that serves your Inngest functions to export OpenTelemetry data.",actions:[...cl("host application")]},{id:"redeploy",section:"verify",title:"Redeploy and verify",actions:[{instruction:"Redeploy or restart the application that serves your Inngest functions, then invoke a function to generate fresh telemetry."}]}]}});var nj;var oj=d(()=>{tj();nj={id:"inngest",name:"Inngest",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual SDK setup is not exercised by automated lifecycle tests yet.",intake:[{id:"inngest",label:"Inngest",transform:"otlp-passthrough"}],subtitle:"Forward your Inngest function logs directly to Sazabi for workflow observability.",features:["Function logs","Event tracing","Step monitoring"],evidenceHints:["inngest package imports, inngest/client files, or serve handlers","INNGEST_* environment variables or functions under inngest/","README/docs naming Inngest for background jobs, workflows, or event handling"],setupSkill:H,dashboard:{iconKey:"inngest",intakeSourceId:"inngest"}}});var y8,qv;var ij=d(()=>{y8={instruction:"Set the following environment variables in your application environment so they are present when the process starts — `OTEL_EXPORTER_OTLP_ENDPOINT` is your intake URL (above).",payloads:[{kind:"copyable",label:"`OTEL_EXPORTER_OTLP_PROTOCOL`",value:"http/protobuf",copyLabel:"OTLP protocol"}]},qv={groups:[{id:"install-initialize",section:"config",title:"Install and initialize OpenInference",description:"LangChain doesn't send OpenTelemetry traces on its own; OpenInference instruments it.",actions:[{instruction:"Install OpenInference for your LangChain runtime, then run the init snippet once at startup before importing LangChain.",payloads:[{kind:"options",options:[{id:"python",label:"Python",description:"Install OpenInference and initialize tracing before importing LangChain.",payloads:[{kind:"code",label:"Python install command",language:"bash",copyLabel:"Python install command",value:"pip install openinference-instrumentation-langchain \\\n opentelemetry-sdk \\\n opentelemetry-exporter-otlp-proto-http"},{kind:"code",label:"Python init snippet",language:"python",copyLabel:"Python init snippet",value:`from opentelemetry import trace
6920
6920
  from opentelemetry.sdk.resources import Resource
6921
6921
  from opentelemetry.sdk.trace import TracerProvider
6922
6922
  from opentelemetry.sdk.trace.export import BatchSpanProcessor
@@ -6941,7 +6941,7 @@ provider.register();
6941
6941
 
6942
6942
  // LangChain.js has no traditional auto-instrumentable module structure, so the
6943
6943
  // callbacks manager must be wired in by hand.
6944
- new LangChainInstrumentation().manuallyInstrument(CallbackManagerModule);`}],notes:[{text:"LangChain.js has no module structure that OpenInference can auto-instrument, so you wire in the callbacks manager by hand."}]}]}]}]},{id:"environment",section:"config",title:"Set OTLP environment",description:"The OpenTelemetry SDK reads these variables automatically.",actions:[y8]},{id:"verify",section:"verify",title:"Run and verify",actions:[{instruction:"Run a chain or agent invocation, then confirm traces arrive in Sazabi within a few minutes."}]}]}});var rj;var aj=d(()=>{ij();rj={id:"langchain",name:"LangChain",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual SDK setup is not exercised by automated lifecycle tests yet.",intake:[{id:"langchain",label:"LangChain",subdomain:"langchain",transform:"otlp-passthrough"}],subtitle:"Forward LangChain traces to Sazabi for end-to-end LLM observability.",features:["Chain tracing","Tool & agent traces","LLM call traces"],evidenceHints:["langchain packages in Python or JavaScript dependencies","LANGCHAIN_* environment variables or LangSmith tracing configuration","Agent, chain, retriever, or tool code built on LangChain"],setupSkill:H,dashboard:{iconKey:"langchain",intakeSourceId:"langchain"}}});var Jv;var cj=d(()=>{Jv={groups:[{id:"environment",section:"config",title:"Set intake URL",actions:[{instruction:"Set `SAZABI_INTAKE_URL` to your intake URL (above) in the application that initializes Mastra."}]},{id:"configure",section:"config",title:"Configure Mastra",actions:[{instruction:"Add Sazabi as a custom OTEL exporter in your Mastra observability config.",payloads:[{kind:"code",label:"Configuration",language:"typescript",copyLabel:"TypeScript code",value:`// src/mastra/index.ts
6944
+ new LangChainInstrumentation().manuallyInstrument(CallbackManagerModule);`}],notes:[{text:"LangChain.js has no module structure that OpenInference can auto-instrument, so you wire in the callbacks manager by hand."}]}]}]}]},{id:"environment",section:"config",title:"Set OTLP environment",description:"The OpenTelemetry SDK reads these variables automatically.",actions:[y8]},{id:"verify",section:"verify",title:"Run and verify",actions:[{instruction:"Run a chain or agent invocation, then confirm traces arrive in Sazabi within a few minutes."}]}]}});var rj;var aj=d(()=>{ij();rj={id:"langchain",name:"LangChain",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual SDK setup is not exercised by automated lifecycle tests yet.",intake:[{id:"langchain",label:"LangChain",transform:"otlp-passthrough"}],subtitle:"Forward LangChain traces to Sazabi for end-to-end LLM observability.",features:["Chain tracing","Tool & agent traces","LLM call traces"],evidenceHints:["langchain packages in Python or JavaScript dependencies","LANGCHAIN_* environment variables or LangSmith tracing configuration","Agent, chain, retriever, or tool code built on LangChain"],setupSkill:H,dashboard:{iconKey:"langchain",intakeSourceId:"langchain"}}});var Jv;var cj=d(()=>{Jv={groups:[{id:"environment",section:"config",title:"Set intake URL",actions:[{instruction:"Set `SAZABI_INTAKE_URL` to your intake URL (above) in the application that initializes Mastra."}]},{id:"configure",section:"config",title:"Configure Mastra",actions:[{instruction:"Add Sazabi as a custom OTEL exporter in your Mastra observability config.",payloads:[{kind:"code",label:"Configuration",language:"typescript",copyLabel:"TypeScript code",value:`// src/mastra/index.ts
6945
6945
  import { Mastra } from "@mastra/core";
6946
6946
  import { OtelExporter } from "@mastra/otel-exporter";
6947
6947
  import { Observability } from "@mastra/observability";
@@ -6969,7 +6969,7 @@ export const mastra = new Mastra({
6969
6969
 
6970
6970
  // Use your Mastra instance
6971
6971
  const agent = mastra.getAgent("my-agent");
6972
- 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 sj;var hj=d(()=>{cj();sj={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",subdomain:"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:H,dashboard:{iconKey:"mastra",intakeSourceId:"mastra"}}});var Bv;var lj=d(()=>{Bv={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 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 b8,uj;var dj=d(()=>{lj();b8=[],uj={id:"neon",name:"Neon",capabilities:["connectionless"],auth:[],delivery:["push"],sensitiveFields:b8,lifecycleSkipReason:"Manual OTLP setup is not exercised by automated lifecycle tests yet.",intake:[{id:"neon",label:"Neon",subdomain:"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:H,dashboard:{iconKey:"neon",intakeSourceId:"neon"}}});var Hv;var gj=d(()=>{Hv={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 yj;var bj=d(()=>{gj();yj={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",subdomain:"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:H,dashboard:{iconKey:"netlify",intakeSourceId:"netlify"}}});var Wv;var mj=d(()=>{Wv={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 pj;var wj=d(()=>{mj();pj={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",subdomain:"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:H,dashboard:{iconKey:"openrouter",intakeSourceId:"openrouter"}}});var Fv;var fj=d(()=>{Fv={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 m8,vj;var kj=d(()=>{fj();m8={id:"otel-trace",label:"OpenTelemetry Traces",subdomain:"otel-trace",aliases:["mastra","otlp-trace","otlp-traces","otel-traces"],transform:"otlp-traces-only"},vj={id:"otel",name:"OpenTelemetry",searchAliases:["otel","open telemetry"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"otel",label:"OpenTelemetry",subdomain:"otel",aliases:["gcl","otlp"],transform:"otlp-passthrough"},m8],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:H,dashboard:{slug:"opentelemetry",iconKey:"opentelemetry",intakeSourceId:"otel"}}});var Zv;var Sj=d(()=>{Zv={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:
6972
+ 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 sj;var hj=d(()=>{cj();sj={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:H,dashboard:{iconKey:"mastra",intakeSourceId:"mastra"}}});var Bv;var lj=d(()=>{Bv={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 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 b8,uj;var dj=d(()=>{lj();b8=[],uj={id:"neon",name:"Neon",capabilities:["connectionless"],auth:[],delivery:["push"],sensitiveFields:b8,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:H,dashboard:{iconKey:"neon",intakeSourceId:"neon"}}});var Hv;var gj=d(()=>{Hv={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 yj;var bj=d(()=>{gj();yj={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:H,dashboard:{iconKey:"netlify",intakeSourceId:"netlify"}}});var Wv;var mj=d(()=>{Wv={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 pj;var wj=d(()=>{mj();pj={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:H,dashboard:{iconKey:"openrouter",intakeSourceId:"openrouter"}}});var Fv;var fj=d(()=>{Fv={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 m8,vj;var kj=d(()=>{fj();m8={id:"otel-trace",label:"OpenTelemetry Traces",aliases:["mastra","otlp-trace","otlp-traces","otel-traces"],transform:"otlp-traces-only"},vj={id:"otel",name:"OpenTelemetry",searchAliases:["otel","open telemetry"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"otel",label:"OpenTelemetry",aliases:["gcl","otlp"],transform:"otlp-passthrough"},m8],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:H,dashboard:{slug:"opentelemetry",iconKey:"opentelemetry",intakeSourceId:"otel"}}});var Zv;var Sj=d(()=>{Zv={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:
6973
6973
  otlphttp/sazabi:
6974
6974
  endpoint: "https://\${context.ingestHost}"
6975
6975
 
@@ -6995,7 +6995,7 @@ service:
6995
6995
  traces:
6996
6996
  receivers: [otlp]
6997
6997
  processors: [batch]
6998
- 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 Pj;var Ij=d(()=>{Sj();Pj={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",subdomain:"otel-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:H,dashboard:{iconKey:"otel-collector",intakeSourceId:"otel-collector"}}});var Xv;var $j=d(()=>{Xv={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 Oj;var Aj=d(()=>{$j();Oj={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",subdomain:"otel-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:H,dashboard:{slug:"opentelemetry-metrics",iconKey:"opentelemetry-metrics",intakeSourceId:"otel-metrics"}}});var Yv,Qv,Vv;var Tj=d(()=>{St();Yv={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:Ue},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/plain"},Qv={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"},Vv={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 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 p8,w8,Lj;var Dj=d(()=>{Tj();p8=["plainApiKey"],w8={id:"plain",label:"Plain",subdomain:"plain",transform:"plain-webhook"},Lj={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:p8,intake:[w8],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:H,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 ek;var Cj=d(()=>{ek={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}
6998
+ 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 Pj;var Ij=d(()=>{Sj();Pj={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:H,dashboard:{iconKey:"otel-collector",intakeSourceId:"otel-collector"}}});var Xv;var $j=d(()=>{Xv={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 Oj;var Aj=d(()=>{$j();Oj={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:H,dashboard:{slug:"opentelemetry-metrics",iconKey:"opentelemetry-metrics",intakeSourceId:"otel-metrics"}}});var Yv,Qv,Vv;var Tj=d(()=>{St();Yv={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:Ue},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/plain"},Qv={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"},Vv={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 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 p8,w8,Lj;var Dj=d(()=>{Tj();p8=["plainApiKey"],w8={id:"plain",label:"Plain",transform:"plain-webhook"},Lj={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:p8,intake:[w8],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:H,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 ek;var Cj=d(()=>{ek={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}
6999
6999
  OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
7000
7000
  OTEL_SERVICE_NAME=$PORTER_APP_SERVICE_NAME
7001
7001
  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
@@ -7029,10 +7029,10 @@ try {
7029
7029
  });
7030
7030
  } catch (err) {
7031
7031
  console.error("OpenTelemetry initialization failed", err);
7032
- }`,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 zj;var _j=d(()=>{Cj();zj={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",subdomain:"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:H,dashboard:{iconKey:"porter",intakeSourceId:"porter"}}});var tk,f8,nk,ok;var jj=d(()=>{St();tk={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:Ue},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/posthog"},f8=[{field:"name",header:"Project"},{field:"organizationName",header:"Organization",width:"w-48",transform:"fallback: - "}],nk={content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:f8,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"}}}},ok={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:`{
7032
+ }`,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 zj;var _j=d(()=>{Cj();zj={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:H,dashboard:{iconKey:"porter",intakeSourceId:"porter"}}});var tk,f8,nk,ok;var jj=d(()=>{St();tk={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:Ue},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/posthog"},f8=[{field:"name",header:"Project"},{field:"organizationName",header:"Organization",width:"w-48",transform:"fallback: - "}],nk={content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:f8,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"}}}},ok={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:`{
7033
7033
  "event": "{event}",
7034
7034
  "person": "{person}"
7035
- }`}]}]},{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 v8,k8,Nj;var Rj=d(()=>{jj();v8=["posthogPersonalApiKey"],k8={id:"posthog",label:"PostHog",subdomain:"posthog",transform:"posthog-cdp"},Nj={id:"posthog",name:"PostHog",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:v8,intake:[k8],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:H,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 ik;var xj=d(()=>{ik={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";
7035
+ }`}]}]},{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 v8,k8,Nj;var Rj=d(()=>{jj();v8=["posthogPersonalApiKey"],k8={id:"posthog",label:"PostHog",transform:"posthog-cdp"},Nj={id:"posthog",name:"PostHog",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:v8,intake:[k8],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:H,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 ik;var xj=d(()=>{ik={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";
7036
7036
 
7037
7037
  posthog.init("<your phc_* project token>", {
7038
7038
  api_host: "/ingest",
@@ -7073,7 +7073,7 @@ const config: NextConfig = {
7073
7073
  },
7074
7074
  };
7075
7075
 
7076
- export default config;`}]}]}]}});var S8,Uj;var Mj=d(()=>{xj();S8=[],Uj={id:"posthog_sdk",name:"PostHog SDK",searchAliases:["posthog","post hog"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"posthog-sdk",label:"PostHog SDK",subdomain:"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:S8,setupSkill:H,dashboard:{iconKey:"posthog",intakeSourceId:"posthog-sdk"}}});var rk;var Ej=d(()=>{rk={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:
7076
+ export default config;`}]}]}]}});var S8,Uj;var Mj=d(()=>{xj();S8=[],Uj={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:S8,setupSkill:H,dashboard:{iconKey:"posthog",intakeSourceId:"posthog-sdk"}}});var rk;var Ej=d(()=>{rk={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:
7077
7077
  prometheus:
7078
7078
  config:
7079
7079
  scrape_configs:
@@ -7092,14 +7092,14 @@ service:
7092
7092
  pipelines:
7093
7093
  metrics:
7094
7094
  receivers: [prometheus]
7095
- exporters: [otlphttp/sazabi]`}]}]},{id:"restart",section:"verify",title:"Restart and verify",actions:[{instruction:"Restart or redeploy the Collector so the new metrics pipeline is loaded."},{instruction:"If metrics do not appear after restart, check the Collector logs for TLS, DNS, or authorization errors, and confirm the exporter posts to `/v1/metrics` with a valid Bearer public key."}]}]}});var Kj;var Gj=d(()=>{Ej();Kj={id:"prometheus",name:"Prometheus",capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"prometheus",label:"Prometheus",subdomain:"prometheus",transform:"otlp-metrics-as-logs"}],lifecycleSkipReason:"Manual agent setup is not exercised by automated lifecycle tests yet.",subtitle:"Forward Prometheus metrics to Sazabi as searchable log records via the OpenTelemetry Collector.",features:["Metrics as log records","OpenTelemetry Collector export","Labels preserved as attributes","No dashboards to maintain"],searchAliases:["prom","promql","prometheus operator","otel collector prometheus"],evidenceHints:["prometheus.yml scrape_configs or an existing Prometheus server","ServiceMonitor / PodMonitor CRDs or prometheus-operator / kube-prometheus-stack","/metrics scrape endpoints forwarded through an OpenTelemetry Collector"],setupSkill:H,dashboard:{slug:"prometheus",iconKey:"prometheus",intakeSourceId:"prometheus"}}});var P8,ak;var qj=d(()=>{P8={instruction:"Add these variables in the Railway service Variables page — `OTEL_EXPORTER_OTLP_ENDPOINT` is your intake URL (above).",payloads:[{kind:"code",label:"Railway Raw Editor variables",description:"Railway fills in the `${{...}}` references from its own service and deployment metadata.",language:"bash",value:"OTEL_EXPORTER_OTLP_ENDPOINT=https://${context.ingestHost}\nOTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf\nOTEL_SERVICE_NAME=${{RAILWAY_SERVICE_NAME}}\nOTEL_RESOURCE_ATTRIBUTES=deployment.environment=${{RAILWAY_ENVIRONMENT_NAME}},service.version=${{RAILWAY_GIT_COMMIT_SHA}},railway.project.name=${{RAILWAY_PROJECT_NAME}},railway.deployment.id=${{RAILWAY_DEPLOYMENT_ID}}",copyLabel:"Railway environment variables"},{kind:"copyable",label:"`OTEL_EXPORTER_OTLP_PROTOCOL`",value:"http/protobuf",copyLabel:"OTLP protocol"},{kind:"copyable",label:"`OTEL_SERVICE_NAME`",value:"${{RAILWAY_SERVICE_NAME}}",copyLabel:"OTEL service name"},{kind:"copyable",label:"`OTEL_RESOURCE_ATTRIBUTES`",value:"deployment.environment=${{RAILWAY_ENVIRONMENT_NAME}},service.version=${{RAILWAY_GIT_COMMIT_SHA}},railway.project.name=${{RAILWAY_PROJECT_NAME}},railway.deployment.id=${{RAILWAY_DEPLOYMENT_ID}}",copyLabel:"OTEL resource attributes"}]},ak={groups:[{id:"prepare",section:"config",title:"Prepare service",actions:[{instruction:"Set up each Railway service you want to monitor so the application sends OpenTelemetry data directly to Sazabi.",payloads:[{kind:"external-link",label:"Open Railway dashboard",href:"https://railway.com/dashboard"}],notes:[{text:"Railway has no managed external OTLP drain. If you cannot add the SDK, run a log forwarder such as Vector or Fluent Bit as its own Railway service and point it at the same OTLP endpoint."}]}]},{id:"environment",section:"config",title:"Set Railway variables",actions:[P8]},{id:"bootstrap",section:"config",title:"Bootstrap the runtime",actions:[{instruction:"Install the OpenTelemetry packages for your runtime and load auto-instrumentation at startup.",payloads:[{kind:"code-tabs",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
7095
+ exporters: [otlphttp/sazabi]`}]}]},{id:"restart",section:"verify",title:"Restart and verify",actions:[{instruction:"Restart or redeploy the Collector so the new metrics pipeline is loaded."},{instruction:"If metrics do not appear after restart, check the Collector logs for TLS, DNS, or authorization errors, and confirm the exporter posts to `/v1/metrics` with a valid Bearer public key."}]}]}});var Kj;var Gj=d(()=>{Ej();Kj={id:"prometheus",name:"Prometheus",capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"prometheus",label:"Prometheus",transform:"otlp-metrics-as-logs"}],lifecycleSkipReason:"Manual agent setup is not exercised by automated lifecycle tests yet.",subtitle:"Forward Prometheus metrics to Sazabi as searchable log records via the OpenTelemetry Collector.",features:["Metrics as log records","OpenTelemetry Collector export","Labels preserved as attributes","No dashboards to maintain"],searchAliases:["prom","promql","prometheus operator","otel collector prometheus"],evidenceHints:["prometheus.yml scrape_configs or an existing Prometheus server","ServiceMonitor / PodMonitor CRDs or prometheus-operator / kube-prometheus-stack","/metrics scrape endpoints forwarded through an OpenTelemetry Collector"],setupSkill:H,dashboard:{slug:"prometheus",iconKey:"prometheus",intakeSourceId:"prometheus"}}});var P8,ak;var qj=d(()=>{P8={instruction:"Add these variables in the Railway service Variables page — `OTEL_EXPORTER_OTLP_ENDPOINT` is your intake URL (above).",payloads:[{kind:"code",label:"Railway Raw Editor variables",description:"Railway fills in the `${{...}}` references from its own service and deployment metadata.",language:"bash",value:"OTEL_EXPORTER_OTLP_ENDPOINT=https://${context.ingestHost}\nOTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf\nOTEL_SERVICE_NAME=${{RAILWAY_SERVICE_NAME}}\nOTEL_RESOURCE_ATTRIBUTES=deployment.environment=${{RAILWAY_ENVIRONMENT_NAME}},service.version=${{RAILWAY_GIT_COMMIT_SHA}},railway.project.name=${{RAILWAY_PROJECT_NAME}},railway.deployment.id=${{RAILWAY_DEPLOYMENT_ID}}",copyLabel:"Railway environment variables"},{kind:"copyable",label:"`OTEL_EXPORTER_OTLP_PROTOCOL`",value:"http/protobuf",copyLabel:"OTLP protocol"},{kind:"copyable",label:"`OTEL_SERVICE_NAME`",value:"${{RAILWAY_SERVICE_NAME}}",copyLabel:"OTEL service name"},{kind:"copyable",label:"`OTEL_RESOURCE_ATTRIBUTES`",value:"deployment.environment=${{RAILWAY_ENVIRONMENT_NAME}},service.version=${{RAILWAY_GIT_COMMIT_SHA}},railway.project.name=${{RAILWAY_PROJECT_NAME}},railway.deployment.id=${{RAILWAY_DEPLOYMENT_ID}}",copyLabel:"OTEL resource attributes"}]},ak={groups:[{id:"prepare",section:"config",title:"Prepare service",actions:[{instruction:"Set up each Railway service you want to monitor so the application sends OpenTelemetry data directly to Sazabi.",payloads:[{kind:"external-link",label:"Open Railway dashboard",href:"https://railway.com/dashboard"}],notes:[{text:"Railway has no managed external OTLP drain. If you cannot add the SDK, run a log forwarder such as Vector or Fluent Bit as its own Railway service and point it at the same OTLP endpoint."}]}]},{id:"environment",section:"config",title:"Set Railway variables",actions:[P8]},{id:"bootstrap",section:"config",title:"Bootstrap the runtime",actions:[{instruction:"Install the OpenTelemetry packages for your runtime and load auto-instrumentation at startup.",payloads:[{kind:"code-tabs",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
7096
7096
 
7097
7097
  # Railway variable or start-command prefix:
7098
7098
  NODE_OPTIONS="--require @opentelemetry/auto-instrumentations-node/register"`,copyLabel:"Node.js OpenTelemetry bootstrap"},{id:"python",label:"Python",language:"bash",value:`pip install opentelemetry-distro opentelemetry-exporter-otlp-proto-http
7099
7099
  opentelemetry-bootstrap -a install
7100
7100
 
7101
7101
  # Railway start command example:
7102
- opentelemetry-instrument python app.py`,copyLabel:"Python OpenTelemetry bootstrap"}]}]}]},{id:"deploy",section:"verify",title:"Redeploy and verify",actions:[{instruction:"Review and deploy the staged variable change set when prompted, then send some traffic to the service.",notes:[{text:"If nothing appears, check the Railway deployment logs for OpenTelemetry exporter errors and confirm your app is sending through OpenTelemetry, not only to stdout."}]}]}]}});var Jj;var Bj=d(()=>{qj();Jj={id:"railway",name:"Railway",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual drain setup is not exercised by automated lifecycle tests yet.",intake:[{id:"railway",label:"Railway",subdomain:"railway",transform:"otlp-passthrough"}],subtitle:"Forward your Railway deployment logs directly to Sazabi for real-time monitoring.",features:["Log drains","Deployment logs","Service monitoring"],evidenceHints:["railway.json, railway.toml, or Railway deploy scripts","RAILWAY_* environment variables","README/docs naming Railway as the deploy host"],setupSkill:H,dashboard:{iconKey:"railway",intakeSourceId:"railway"}}});var ck,sk,hk;var Hj=d(()=>{St();ck={kind:"multi-step",steps:[{id:"credentials",title:"Enter API key",actions:[{kind:"instruction",instruction:"Create an API key in your [Render dashboard](https://dashboard.render.com/settings#api-keys)."},{id:"token",kind:"secret",label:"API key",instruction:"Enter your Render API key below.",placeholder:"rnd_..."}]},{id:"workspace",title:"Choose workspace",actions:[{id:"workspace",kind:"select",label:"Workspace",instruction:"Select the Render workspace whose services Sazabi should list.",placeholder:"Select a workspace",optionsAction:"options",optionsInput:{token:"$token"},optionValueField:"id",optionLabelField:"name",optionDescriptionField:"type"}]}],submit:{metadata:{apiToken:"$token",ownerId:"$workspace.id",ownerName:"$workspace.name"},displayName:"$workspace.name",button:Ue}},sk={groups:[{id:"open-log-streams",section:"config",title:"Open Log Streams",actions:[{instruction:"In your [Render dashboard](https://dashboard.render.com), open the workspace you want to forward, then go to **Workspace Settings > Log Streams** and add a log stream.",notes:[{text:"This log stream is **workspace-wide** — Render sends logs from every service in the workspace. To pick individual services instead, connect your Render account and Sazabi sets up a per-service log stream for each one."}]}]},{id:"endpoint",section:"config",title:"Set endpoint and token",actions:[{instruction:"Paste the endpoint and token (above) into the log stream form."}]},{id:"verify",section:"verify",title:"Save and verify",actions:[{instruction:"Save the log stream, then trigger activity — deploy a service or hit an application route. Logs appear in Sazabi within a few minutes."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/render"},hk={content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:[{field:"name",header:"Name"},{field:"type",header:"Type",width:"w-40",cell:"badge"}],searchPlaceholder:"Search services...",searchFields:["name"],dedupeByConfigField:"serviceId",emptyState:{noMatches:"No services found.",allConfigured:"All services already have log streams configured."},toStreamItem:{displayName:"$item.name",config:{serviceId:"$item.id",serviceName:"$item.name",serviceType:"$item.type"}}}}});var I8,$8,Wj;var Fj=d(()=>{Hj();I8=["apiToken"],$8={id:"render-syslog",label:"Render",subdomain:"render-syslog",transform:"otlp-key-stripping-logs"},Wj={id:"render",name:"Render",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:I8,intake:[$8],subtitle:"Forward your Render service logs directly to Sazabi for real-time monitoring.",features:["Log forwarding","Service monitoring","Environment filtering"],evidenceHints:["render.yaml or Render blueprint files","README/docs naming Render as the deploy host","Services, workers, or cron jobs deployed to Render"],setupSkill:H,dashboard:{iconKey:"render",intakeSourceId:"render-syslog",streamSelectorLayout:"sidepanel",connectionMetadataSection:{title:"Render details",description:"The Render workspace linked to this connection.",fields:[{key:"ownerId",label:"Workspace ID",description:"Render workspace linked to this connection."}]},actions:{list:{options:{procedure:"render.listWorkspaces",itemsField:"workspaces",sensitiveInputFields:["token"]},list:{procedure:"render.listServices",itemsField:"services"}}}}}});var lk;var Zj=d(()=>{lk={groups:[{id:"environment",section:"config",title:"Set your Respan base URL",actions:[{instruction:"Set `RESPAN_BASE_URL` to your intake URL (above) in the app you want to trace."}]},{id:"install",section:"config",title:"Install the Respan SDK",actions:[{instruction:"Install the Respan SDK in the app you want to trace.",payloads:[{kind:"code",label:"Install",language:"bash",copyLabel:"Install command",value:`# Python
7102
+ opentelemetry-instrument python app.py`,copyLabel:"Python OpenTelemetry bootstrap"}]}]}]},{id:"deploy",section:"verify",title:"Redeploy and verify",actions:[{instruction:"Review and deploy the staged variable change set when prompted, then send some traffic to the service.",notes:[{text:"If nothing appears, check the Railway deployment logs for OpenTelemetry exporter errors and confirm your app is sending through OpenTelemetry, not only to stdout."}]}]}]}});var Jj;var Bj=d(()=>{qj();Jj={id:"railway",name:"Railway",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual drain setup is not exercised by automated lifecycle tests yet.",intake:[{id:"railway",label:"Railway",transform:"otlp-passthrough"}],subtitle:"Forward your Railway deployment logs directly to Sazabi for real-time monitoring.",features:["Log drains","Deployment logs","Service monitoring"],evidenceHints:["railway.json, railway.toml, or Railway deploy scripts","RAILWAY_* environment variables","README/docs naming Railway as the deploy host"],setupSkill:H,dashboard:{iconKey:"railway",intakeSourceId:"railway"}}});var ck,sk,hk;var Hj=d(()=>{St();ck={kind:"multi-step",steps:[{id:"credentials",title:"Enter API key",actions:[{kind:"instruction",instruction:"Create an API key in your [Render dashboard](https://dashboard.render.com/settings#api-keys)."},{id:"token",kind:"secret",label:"API key",instruction:"Enter your Render API key below.",placeholder:"rnd_..."}]},{id:"workspace",title:"Choose workspace",actions:[{id:"workspace",kind:"select",label:"Workspace",instruction:"Select the Render workspace whose services Sazabi should list.",placeholder:"Select a workspace",optionsAction:"options",optionsInput:{token:"$token"},optionValueField:"id",optionLabelField:"name",optionDescriptionField:"type"}]}],submit:{metadata:{apiToken:"$token",ownerId:"$workspace.id",ownerName:"$workspace.name"},displayName:"$workspace.name",button:Ue}},sk={groups:[{id:"open-log-streams",section:"config",title:"Open Log Streams",actions:[{instruction:"In your [Render dashboard](https://dashboard.render.com), open the workspace you want to forward, then go to **Workspace Settings > Log Streams** and add a log stream.",notes:[{text:"This log stream is **workspace-wide** — Render sends logs from every service in the workspace. To pick individual services instead, connect your Render account and Sazabi sets up a per-service log stream for each one."}]}]},{id:"endpoint",section:"config",title:"Set endpoint and token",actions:[{instruction:"Paste the endpoint and token (above) into the log stream form."}]},{id:"verify",section:"verify",title:"Save and verify",actions:[{instruction:"Save the log stream, then trigger activity — deploy a service or hit an application route. Logs appear in Sazabi within a few minutes."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/render"},hk={content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:[{field:"name",header:"Name"},{field:"type",header:"Type",width:"w-40",cell:"badge"}],searchPlaceholder:"Search services...",searchFields:["name"],dedupeByConfigField:"serviceId",emptyState:{noMatches:"No services found.",allConfigured:"All services already have log streams configured."},toStreamItem:{displayName:"$item.name",config:{serviceId:"$item.id",serviceName:"$item.name",serviceType:"$item.type"}}}}});var I8,$8,Wj;var Fj=d(()=>{Hj();I8=["apiToken"],$8={id:"render-syslog",label:"Render",transform:"otlp-key-stripping-logs"},Wj={id:"render",name:"Render",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:I8,intake:[$8],subtitle:"Forward your Render service logs directly to Sazabi for real-time monitoring.",features:["Log forwarding","Service monitoring","Environment filtering"],evidenceHints:["render.yaml or Render blueprint files","README/docs naming Render as the deploy host","Services, workers, or cron jobs deployed to Render"],setupSkill:H,dashboard:{iconKey:"render",intakeSourceId:"render-syslog",streamSelectorLayout:"sidepanel",connectionMetadataSection:{title:"Render details",description:"The Render workspace linked to this connection.",fields:[{key:"ownerId",label:"Workspace ID",description:"Render workspace linked to this connection."}]},actions:{list:{options:{procedure:"render.listWorkspaces",itemsField:"workspaces",sensitiveInputFields:["token"]},list:{procedure:"render.listServices",itemsField:"services"}}}}}});var lk;var Zj=d(()=>{lk={groups:[{id:"environment",section:"config",title:"Set your Respan base URL",actions:[{instruction:"Set `RESPAN_BASE_URL` to your intake URL (above) in the app you want to trace."}]},{id:"install",section:"config",title:"Install the Respan SDK",actions:[{instruction:"Install the Respan SDK in the app you want to trace.",payloads:[{kind:"code",label:"Install",language:"bash",copyLabel:"Install command",value:`# Python
7103
7103
  pip install respan-ai
7104
7104
 
7105
7105
  # TypeScript
@@ -7118,7 +7118,7 @@ const respan = new Respan({
7118
7118
  });
7119
7119
  await respan.initialize();
7120
7120
 
7121
- // 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 Xj;var Yj=d(()=>{Zj();Xj={id:"respan",name:"Respan",capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"respan",label:"Respan",subdomain:"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:H,dashboard:{iconKey:"respan",intakeSourceId:"respan"}}});var uk;var Qj=d(()=>{uk={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";
7121
+ // 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 Xj;var Yj=d(()=>{Zj();Xj={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:H,dashboard:{iconKey:"respan",intakeSourceId:"respan"}}});var uk;var Qj=d(()=>{uk={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";
7122
7122
 
7123
7123
  Sentry.init({
7124
7124
  dsn: "https://sazabi@\${context.ingestHost}/0",
@@ -7162,7 +7162,7 @@ sentry_sdk.init(
7162
7162
  dsn=SENTRY_DSN,
7163
7163
  enable_logs=True,
7164
7164
  before_send=_forward_to_sazabi,
7165
- )`}],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 Vj;var eN=d(()=>{Qj();Vj={id:"sentry",name:"Sentry SDK",searchAliases:["sentry"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"sentry-dsn",label:"Sentry SDK",subdomain:"sentry-dsn",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:H,dashboard:{iconKey:"sentry",intakeSourceId:"sentry-dsn"}}});var dk,gk;var tN=d(()=>{St();dk={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 with **Organization: Read & Write** (`org:write`), **Project: Read**, and **Issue & Event: Read**.",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 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:Ue},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/sentry"},gk={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 O8,A8,nN;var oN=d(()=>{tN();O8=["sentryAuthToken"],A8={id:"sentry-platform",label:"Sentry Platform",subdomain:"sentry-platform",transform:"sentry-platform-webhook"},nN={id:"sentry_platform",name:"Sentry",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],streamCardinality:"single",sensitiveFields:O8,intake:[A8],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:H,dashboard:{iconKey:"sentry",intakeSourceId:"sentry-platform",actions:{submit:{validate:{kind:"source-action",actionId:"validate",sensitiveInputFields:["token"]}}}}}});var yk;var iN=d(()=>{yk={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 rN;var aN=d(()=>{iN();rN={id:"supabase",name:"Supabase",capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"supabase",label:"Supabase",subdomain:"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:H,dashboard:{iconKey:"supabase",intakeSourceId:"supabase"}}});var bk;var cN=d(()=>{St();bk={groups:[{id:"instrument",section:"config",title:"Instrument workers",description:"Set up each Temporal worker runtime to send OpenTelemetry data.",actions:[...cl("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 sN;var hN=d(()=>{cN();sN={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",subdomain:"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:H,dashboard:{iconKey:"temporal",intakeSourceId:"temporal"}}});var mk;var lN=d(()=>{mk={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";
7165
+ )`}],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 Vj;var eN=d(()=>{Qj();Vj={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:H,dashboard:{iconKey:"sentry",intakeSourceId:"sentry-dsn"}}});var dk,gk;var tN=d(()=>{St();dk={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 with **Organization: Read & Write** (`org:write`), **Project: Read**, and **Issue & Event: Read**.",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 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:Ue},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/sentry"},gk={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 O8,A8,nN;var oN=d(()=>{tN();O8=["sentryAuthToken"],A8={id:"sentry-platform",label:"Sentry Platform",transform:"sentry-platform-webhook"},nN={id:"sentry_platform",name:"Sentry",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],streamCardinality:"single",sensitiveFields:O8,intake:[A8],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:H,dashboard:{iconKey:"sentry",intakeSourceId:"sentry-platform",actions:{submit:{validate:{kind:"source-action",actionId:"validate",sensitiveInputFields:["token"]}}}}}});var yk;var iN=d(()=>{yk={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 rN;var aN=d(()=>{iN();rN={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:H,dashboard:{iconKey:"supabase",intakeSourceId:"supabase"}}});var bk;var cN=d(()=>{St();bk={groups:[{id:"instrument",section:"config",title:"Instrument workers",description:"Set up each Temporal worker runtime to send OpenTelemetry data.",actions:[...cl("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 sN;var hN=d(()=>{cN();sN={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:H,dashboard:{iconKey:"temporal",intakeSourceId:"temporal"}}});var mk;var lN=d(()=>{mk={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";
7166
7166
  import { defineConfig } from "@trigger.dev/sdk";
7167
7167
 
7168
7168
  export default defineConfig({
@@ -7175,7 +7175,7 @@ export default defineConfig({
7175
7175
  ],
7176
7176
  },
7177
7177
  });
7178
- `,copyLabel:"Trigger.dev config snippet"}],notes:[{text:"Trigger.dev reserves `OTEL_*` environment variables for its own internal telemetry, so do not use them for this integration."}]}]},{id:"redeploy",section:"verify",title:"Redeploy and verify",actions:[{instruction:"Redeploy Trigger.dev so it picks up the new log exporter, then run a task to confirm its logs arrive in Sazabi.",notes:[{text:"This source stores logs only — trace exporters, metrics exporters, alert webhooks, and management API polling are intentionally out of scope. Use `telemetry.logExporters`; do not configure this source through `telemetry.exporters`, Trigger.dev alert webhooks, or management API polling."}]}]}]}});var uN;var dN=d(()=>{lN();uN={id:"trigger_dev",name:"Trigger.dev",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual trigger.config.ts setup is not exercised by automated lifecycle tests yet.",intake:[{id:"trigger-dev",label:"Trigger.dev",subdomain:"trigger-dev",transform:"otlp-passthrough"}],subtitle:"Stream your Trigger.dev job logs directly to Sazabi for background job monitoring.",features:["Task logs","Run failure logs","Background job monitoring"],evidenceHints:["trigger.config.ts/js or @trigger.dev packages","TRIGGER_* environment variables or tasks under trigger/ or src/trigger","README/docs naming Trigger.dev for background jobs"],setupSkill:H,dashboard:{iconKey:"trigger-dev",intakeSourceId:"trigger-dev"}}});var pk;var gN=d(()=>{pk={perStreamInstructions:!0,groups:[{id:"copy-config",section:"config",title:"Copy logs pipeline",notes:[{variant:"requirement",text:"Vector 0.51.0 or later is required for the `otlp` encoding codec."}],actions:[{instruction:"Add a remap transform and OpenTelemetry sink to your Vector config.",payloads:[{kind:"code-tabs",label:"Vector configuration",description:"Choose the snippet format that matches how you deploy Vector.",tabs:[{id:"yaml",label:"`vector.yaml`",language:"yaml",copyLabel:"Vector YAML config",value:`transforms:
7178
+ `,copyLabel:"Trigger.dev config snippet"}],notes:[{text:"Trigger.dev reserves `OTEL_*` environment variables for its own internal telemetry, so do not use them for this integration."}]}]},{id:"redeploy",section:"verify",title:"Redeploy and verify",actions:[{instruction:"Redeploy Trigger.dev so it picks up the new log exporter, then run a task to confirm its logs arrive in Sazabi.",notes:[{text:"This source stores logs only — trace exporters, metrics exporters, alert webhooks, and management API polling are intentionally out of scope. Use `telemetry.logExporters`; do not configure this source through `telemetry.exporters`, Trigger.dev alert webhooks, or management API polling."}]}]}]}});var uN;var dN=d(()=>{lN();uN={id:"trigger_dev",name:"Trigger.dev",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual trigger.config.ts setup is not exercised by automated lifecycle tests yet.",intake:[{id:"trigger-dev",label:"Trigger.dev",transform:"otlp-passthrough"}],subtitle:"Stream your Trigger.dev job logs directly to Sazabi for background job monitoring.",features:["Task logs","Run failure logs","Background job monitoring"],evidenceHints:["trigger.config.ts/js or @trigger.dev packages","TRIGGER_* environment variables or tasks under trigger/ or src/trigger","README/docs naming Trigger.dev for background jobs"],setupSkill:H,dashboard:{iconKey:"trigger-dev",intakeSourceId:"trigger-dev"}}});var pk;var gN=d(()=>{pk={perStreamInstructions:!0,groups:[{id:"copy-config",section:"config",title:"Copy logs pipeline",notes:[{variant:"requirement",text:"Vector 0.51.0 or later is required for the `otlp` encoding codec."}],actions:[{instruction:"Add a remap transform and OpenTelemetry sink to your Vector config.",payloads:[{kind:"code-tabs",label:"Vector configuration",description:"Choose the snippet format that matches how you deploy Vector.",tabs:[{id:"yaml",label:"`vector.yaml`",language:"yaml",copyLabel:"Vector YAML config",value:`transforms:
7179
7179
  sazabi_logs_otlp:
7180
7180
  type: remap
7181
7181
  inputs: ["*"] # replace with explicit source/transform IDs
@@ -7249,10 +7249,10 @@ sinks:
7249
7249
  uri: "https://\${context.ingestHost}/v1/logs"
7250
7250
  method: post
7251
7251
  encoding:
7252
- 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 yN;var bN=d(()=>{gN();yN={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",subdomain:"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:H,dashboard:{iconKey:"vector",intakeSourceId:"vector"}}});var fk,vk,wk,kk;var mN=d(()=>{St();fk={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:Ue}},vk={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"},wk=[{field:"name",header:"Project"},{field:"framework",header:"Framework",width:"w-32",cell:"badge",transform:"fallback:Unspecified"}],kk={content:{kind:"tabs",tabs:[{id:"logs",label:"Logs",content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:wk,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:wk,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:wk,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 T8,L8,D8,pN;var wN=d(()=>{mN();T8=["vercelApiToken"],L8={id:"vercel",label:"Vercel",subdomain:"vercel",transform:"vercel-drain"},D8={id:"vercel-analytics",label:"Vercel Analytics",subdomain:"vercel-analytics",transform:"vercel-analytics-drain"},pN={id:"vercel",name:"Vercel",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:T8,intake:[L8,D8],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:H,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 Sk;var fN=d(()=>{Sk={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 \\
7252
+ 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 yN;var bN=d(()=>{gN();yN={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:H,dashboard:{iconKey:"vector",intakeSourceId:"vector"}}});var fk,vk,wk,kk;var mN=d(()=>{St();fk={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:Ue}},vk={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"},wk=[{field:"name",header:"Project"},{field:"framework",header:"Framework",width:"w-32",cell:"badge",transform:"fallback:Unspecified"}],kk={content:{kind:"tabs",tabs:[{id:"logs",label:"Logs",content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:wk,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:wk,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:wk,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 T8,L8,D8,pN;var wN=d(()=>{mN();T8=["vercelApiToken"],L8={id:"vercel",label:"Vercel",transform:"vercel-drain"},D8={id:"vercel-analytics",label:"Vercel Analytics",transform:"vercel-analytics-drain"},pN={id:"vercel",name:"Vercel",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:T8,intake:[L8,D8],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:H,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 Sk;var fN=d(()=>{Sk={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 \\
7253
7253
  https://\${context.ingestHost}/test \\
7254
7254
  -H 'content-type: application/json' \\
7255
- -d '{"event":"hello.world","level":"info","message":"first webhook event"}'`}]}]}]}});var vN;var kN=d(()=>{fN();vN={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",subdomain:"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:H,dashboard:{slug:"webhook-events",iconKey:"webhook-events",intakeSourceId:"webhook-events"}}});var sl,SN,GCe,qCe,Ni,JCe,BCe,C8,z8,_8,HCe;var PN=d(()=>{w_();k_();I_();A_();D_();__();R_();M_();G_();B_();F_();Y_();ej();oj();aj();hj();dj();bj();wj();kj();Ij();Aj();Dj();_j();Rj();Mj();Gj();Bj();Fj();Yj();eN();oN();aN();hN();dN();bN();wN();kN();sl=[p_,v_,P_,O_,L_,z_,N_,U_,K_,J_,W_,X_,V_,nj,rj,sj,uj,yj,pj,vj,Pj,Oj,Lj,zj,Nj,Uj,Kj,Jj,Wj,Xj,nN,Vj,rN,sN,uN,yN,pN,vN],SN=sl,GCe=Object.fromEntries(SN.map((e)=>[e.id,e.sensitiveFields??[]])),qCe=Object.fromEntries(SN.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]]}))),Ni=["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"],JCe=sl.map((e)=>({id:e.id,name:e.name,capabilities:e.capabilities})),BCe=Object.fromEntries(sl.map((e)=>[e.id,{name:e.name,setupSkill:e.setupSkill}])),C8={cloudflare:yv,cloudwatch:kv,convex:Iv,digital_ocean:Lv,fly_io:Nv,gcp:Uv,plain:Yv,posthog:tk,render:ck,sentry_platform:dk,vercel:fk},z8={cloudflare:bv,cloudwatch:Sv,convex:Ov,digital_ocean:Cv,fly_io:xv,gcp:Mv,plain:Vv,posthog:nk,render:hk,vercel:kk},_8={cloudflare:mv,cloudflare_workers:pv,cloudwatch:Pv,convex:$v,datadog:Av,daytona:Tv,digital_ocean:Dv,fluent_bit:jv,fly_io:Rv,grafana_alloy:Kv,e2b:zv,elastic_cloud:_v,gcp:Ev,inngest:Gv,langchain:qv,mastra:Jv,neon:Bv,netlify:Hv,openrouter:Wv,otel:Fv,otel_collector:Zv,otel_metrics:Xv,plain:Qv,posthog:ok,posthog_sdk:ik,porter:ek,prometheus:rk,railway:ak,render:sk,respan:lk,sentry:uk,sentry_platform:gk,supabase:yk,temporal:bk,trigger_dev:mk,vector:pk,vercel:vk,webhook_events:Sk},HCe=sl.map((e)=>({sourceId:e.id,name:e.name,capabilities:e.capabilities,setupAuthModes:e.auth,deliveryModes:e.delivery,hasDashboardMetadata:Boolean(e.dashboard),hasManagedFlow:Boolean(C8[e.id]),hasConnectionlessFlow:Boolean(_8[e.id]),hasStreamSelector:Boolean(z8[e.id]),lifecycleEligible:e.lifecycleEligible??!1,lifecycleSkipReason:e.lifecycleSkipReason}))});var IN=d(()=>{PN()});var Pk=d(()=>{b_();IN()});var $N,Ik,j8,hl,N8,ON,$k,Wa,Fa,AN,TN,LN,ll,DN,CN,Ri,zN,_N,xi,jN,NN,ul,RN,xN,dl,UN,MN,gl,EN,KN,yl,GN,qN,bl,JN,BN,ml,HN,WN,pl,FN,ZN,wl,R8;var Ok=d(()=>{Pk();me();Ce();$N=Ni,Ik=a.enum($N),j8=a.enum(["pending","provisioning","active","error"]),hl=a.enum(["managed","connectionless"]),N8=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.")}),ON=a.object({id:a.string().describe("Data source type identifier."),name:a.string().describe("Human-readable display name."),modes:a.array(hl).describe("Setup modes this source supports. `managed` sources take vendor credentials; `connectionless` sources mint a keyed intake endpoint."),metadataFields:a.array(N8).describe("Fields required in the metadata object when creating a managed instance. Empty for connectionless-only sources."),setupSkill:a.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),$k=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 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`.")}),Wa=a.object({id:a.string().uuid(),instanceId:a.string().uuid().describe("Root instance ID. Every stream roots on exactly one data source instance."),displayName:a.string(),config:a.record(a.string(),a.unknown()),status:j8,errorMessage:a.string().nullable(),enabled:a.boolean().describe("Whether the stream is currently ingesting. Independent of provisioning status: a paused stream stays configured but stops accepting new data."),createdAt:a.string().datetime(),endpointCards:a.array($k).optional().describe("Server-computed endpoint card(s) for this stream's delivery key — where to point the sender. Present only for streams that carry their own intake key.")}),Fa=a.object({id:a.string().uuid(),dataSourceType:Ik,mode:hl,name:a.string().nullable().describe("Display name. For connectionless instances this falls back to the stream's name when no explicit name is set."),streamCount:a.number().int(),createdAt:a.string().datetime()}),AN=Fa.extend({streams:a.array(Wa).describe("The instance's live streams, newest first.")}),TN=a.object({}),LN=a.object({types:a.array(ON)}),ll=I({operationId:"dataSources.listTypes",description:"List all supported data source types with their setup modes and metadata requirements.",backend:"api",route:{method:"GET",path:"/data-sources/types",tags:["Data Sources"]},input:TN,output:LN,pagination:"none",async:"sync"}),DN=a.object({projectId:a.string().uuid().optional().describe("Project to list instances for. Auto-filled from SDK context when omitted."),dataSourceType:Ik.optional().describe("Filter instances by data source type.")}),CN=a.object({instances:a.array(Fa)}),Ri=I({operationId:"dataSources.listInstances",description:"List data source instances within one project.",backend:"api",route:{method:"GET",path:"/data-sources/instances",tags:["Data Sources"]},input:DN,output:CN,pagination:"none",async:"sync"}),zN=a.object({projectId:a.string().uuid().optional().describe("Project to create the instance in. Auto-filled from SDK context when omitted."),dataSourceType:Ik.describe("Data source type identifier."),mode:hl.optional().describe("Setup mode. Defaults to `managed` when metadata is provided, otherwise `connectionless`. Must be a mode the source supports (see `modes` on the type catalog)."),name:a.string().optional().describe("Optional human-readable name for this instance."),metadata:a.record(a.string(),a.unknown()).optional().describe("Vendor credentials and configuration for managed setup. Fields vary by data source type (see `metadataFields` on the type catalog). Required for managed mode; must be omitted for connectionless mode.")}),_N=a.object({instance:Fa.describe("The created instance."),streamId:a.string().uuid().optional().describe("ID of the stream created alongside the instance. Present for connectionless instances (which always mint their keyed stream) and for managed sources that auto-provision a default stream."),publicKey:a.string().optional().describe("Intake key minted for the instance. Store this securely — it is only shown once. Present for connectionless instances and for managed sources that ingest through a Sazabi endpoint."),endpointCards:a.array($k).optional().describe("Server-computed endpoint card(s) for the minted key — where to point the sender. Present for connectionless instances.")}),xi=I({operationId:"dataSources.createInstance",description:"Create a data source instance. Managed mode takes vendor credentials in `metadata`, validates them, and provisions delivery behind the instance. Connectionless mode mints the instance plus a keyed stream and returns the intake key and endpoint card(s) to point the sender at.",backend:"api",route:{method:"POST",path:"/data-sources/instances",successStatus:201,tags:["Data Sources"]},input:zN,output:_N,pagination:"none",async:"sync"}),jN=a.object({instanceId:a.string().uuid().describe("Instance ID to fetch.")}),NN=a.object({instance:AN}),ul=I({operationId:"dataSources.getInstance",description:"Get one data source instance by ID, including its streams and their endpoint card(s).",backend:"api",route:{method:"GET",path:"/data-sources/instances/{instanceId}",tags:["Data Sources"]},input:jN,output:NN,pagination:"none",async:"sync"}),RN=a.object({instanceId:a.string().uuid().describe("Instance ID to update."),name:a.string().min(1).optional().describe("New display name for the instance."),enabled:a.boolean().optional().describe("Pause (`false`) or resume (`true`) ingestion for all of the instance's streams. Reversible; never deletes anything.")}),xN=a.object({instance:Fa}),dl=I({operationId:"dataSources.updateInstance",description:"Update a data source instance: rename it and/or pause or resume ingestion across its streams.",backend:"api",route:{method:"PATCH",path:"/data-sources/instances/{instanceId}",tags:["Data Sources"]},input:RN,output:xN,pagination:"none",async:"sync"}),UN=a.object({instanceId:a.string().uuid().describe("Instance ID to delete.")}),MN=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.")}),gl=I({operationId:"dataSources.deleteInstance",description:"Delete a data source instance. Tombstones the instance and its streams, deactivates their intake keys (already-ingested data is preserved with its attribution), and runs vendor-side cleanup for managed instances when the source supports it.",backend:"api",route:{method:"DELETE",path:"/data-sources/instances/{instanceId}",successStatus:200,tags:["Data Sources"]},input:UN,output:MN,pagination:"none",async:"sync"}),EN=a.object({instanceId:a.string().uuid().describe("Instance ID to list streams for."),enabled:a.boolean().optional().describe("Optional filter on stream ingestion state. Omit to list all streams; pass true for only enabled streams or false for only paused streams.")}),KN=a.object({streams:a.array(Wa)}),yl=I({operationId:"dataSources.listStreams",description:"List the streams that belong to a data source instance.",backend:"api",route:{method:"GET",path:"/data-sources/instances/{instanceId}/streams",tags:["Data Sources"]},input:EN,output:KN,pagination:"none",async:"sync"}),GN=a.object({instanceId:a.string().uuid().describe("Instance ID to create the stream under."),displayName:a.string().min(1).describe("Resource name, e.g. service or app name."),config:a.record(a.string(),a.unknown()).optional().describe("Platform-specific stream configuration.")}),qN=a.object({streamId:a.string().uuid().describe("ID of the created stream.")}),bl=I({operationId:"dataSources.createStream",description:"Create a new stream under a managed data source instance. Triggers async provisioning; poll the stream to track it. Connectionless instances are single-stream — create another instance instead.",backend:"api",route:{method:"POST",path:"/data-sources/instances/{instanceId}/streams",successStatus:201,tags:["Data Sources"]},input:GN,output:qN,pagination:"none",async:"sync"}),JN=a.object({streamId:a.string().uuid().describe("Stream ID to fetch.")}),BN=a.object({stream:Wa}),ml=I({operationId:"dataSources.getStream",description:"Get one data source stream by ID. Use to poll provisioning status.",backend:"api",route:{method:"GET",path:"/data-sources/streams/{streamId}",tags:["Data Sources"]},input:JN,output:BN,pagination:"none",async:"sync"}),HN=a.object({streamId:a.string().uuid().describe("Stream ID to update."),displayName:a.string().min(1).optional().describe("New display name for the stream."),enabled:a.boolean().optional().describe("Pause (`false`) or resume (`true`) ingestion for this stream. Reversible; never deletes anything.")}),WN=a.object({stream:Wa}),pl=I({operationId:"dataSources.updateStream",description:"Update a data source stream: rename it and/or pause or resume its ingestion.",backend:"api",route:{method:"PATCH",path:"/data-sources/streams/{streamId}",tags:["Data Sources"]},input:HN,output:WN,pagination:"none",async:"sync"}),FN=a.object({streamId:a.string().uuid().describe("Stream ID to delete.")}),ZN=a.object({success:a.boolean()}),wl=I({operationId:"dataSources.deleteStream",description:"Delete a data source stream. Tombstones the stream and deactivates its intake key. Deleting a connectionless instance's only stream tombstones the instance too.",backend:"api",route:{method:"DELETE",path:"/data-sources/streams/{streamId}",successStatus:204,tags:["Data Sources"]},input:FN,output:ZN,pagination:"none",async:"sync"}),R8={listTypes:ll.contract,listInstances:Ri.contract,createInstance:xi.contract,getInstance:ul.contract,updateInstance:dl.contract,deleteInstance:gl.contract,listStreams:yl.contract,createStream:bl.contract,getStream:ml.contract,updateStream:pl.contract,deleteStream:wl.contract}});var x8,Ak,U8,M8,E8,K8,G8,XN,q8,J8,YN,B8,H8,QN,W8,F8,VN;var e1=d(()=>{me();Ce();x8=["slack","github","linear","pagerduty","victorops","rootly","incident_io","webhook","teams","bitbucket","jira"],Ak=a.enum(x8),U8=a.enum(["oauth","app_installation","api_key"]),M8=a.enum(["alert_routing","inbound_webhooks","messaging","code_search","health_check"]),E8=a.enum(["pending","connected","error","revoked"]),K8=a.enum(["healthy","unhealthy","unknown"]),G8=a.object({id:Ak.describe("Integration provider identifier."),name:a.string().describe("Human-readable display name."),description:a.string().describe("Short description of the provider."),authType:U8.describe("Auth flow used to connect this provider."),capabilities:a.array(M8).describe("Capabilities the provider exposes once connected."),connectionCount:a.number().int().describe("Number of active connections for this provider in the organization, including error-status connections that need attention.")}),XN=a.object({id:a.string().uuid(),provider:Ak,displayName:a.string().nullable(),status:E8,isActive:a.boolean().describe("Whether this connection counts as connected (status 'connected' or 'error'). An error-status connection is the organization's connection — broken, not absent."),needsAttention:a.boolean().describe("Whether the connection should surface a reconnect prompt (status 'error' or health status 'unhealthy')."),metadata:a.record(a.string(),a.unknown()).describe("Non-secret provider metadata (e.g. workspace/team names)."),healthStatus:K8,healthMessage:a.string().nullable(),healthCheckedAt:a.string().datetime().nullable(),healthConsecutiveFailures:a.number().int(),connectedBy:a.string().nullable(),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),q8=a.object({organizationId:a.string().min(1).optional().describe("Organization to list providers for. Auto-filled from CLI and SDK context when omitted.")}),J8=a.object({providers:a.array(G8)}),YN=I({operationId:"integrations.listProviders",description:"List supported integration providers and how many connections the organization has for each.",backend:"api",route:{method:"GET",path:"/integrations/providers",tags:["Integrations"]},input:q8,output:J8,pagination:"none",async:"sync"}),B8=a.object({organizationId:a.string().min(1).optional().describe("Organization to list connections for. Auto-filled from CLI and SDK context when omitted."),provider:Ak.optional().describe("Filter connections by provider.")}),H8=a.object({connections:a.array(XN)}),QN=I({operationId:"integrations.listConnections",description:"List integration connections and their connection state for the organization.",backend:"api",route:{method:"GET",path:"/integrations/connections",tags:["Integrations"]},input:B8,output:H8,pagination:"none",async:"sync"}),W8=a.object({organizationId:a.string().min(1).optional().describe("Organization the connection belongs to. Auto-filled from CLI and SDK context when omitted."),connectionId:a.string().uuid().describe("Connection ID to fetch.")}),F8=a.object({connection:XN}),VN=I({operationId:"integrations.getConnection",description:"Get one integration connection by ID (non-secret config only).",backend:"api",route:{method:"GET",path:"/integrations/connections/{connectionId}",tags:["Integrations"]},input:W8,output:F8,pagination:"none",async:"sync"})});var on,Z8,X8,t1,fl,vl,n1,Tk,o1,Lk,i1,r1,Y8,Q8,a1,c1,s1,h1,l1,u1,d1,g1,y1,b1,m1,p1,w1,f1,v1,Ui,kl,Sl,Pl,Il,$l,Ol,Al,Tl,Ll,Dl,V8;var Dk=d(()=>{me();Ce();on=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),description:a.string().nullable(),status:a.enum(["open","resolved","ignored"]),severity:a.enum(["low","medium","high","critical"]),statusComponentId:a.string().uuid().nullable(),createdAt:a.string().datetime(),resolvedAt:a.string().datetime().nullable(),mutedAt:a.string().datetime().nullable(),muteHitCount:a.number().int().nonnegative(),lastActivityAt:a.string().datetime().nullable(),lastDeliveredAt:a.string().datetime().nullable(),locked:a.boolean(),redacted:a.boolean()}),Z8=a.object({channelId:a.string().nullable(),channelName:a.string().nullable(),threadTs:a.string().nullable(),permalink:a.string().nullable(),workspaceName:a.string().nullable()}),X8=on.extend({slackChannels:a.array(Z8)}),t1=on.extend({delivery:a.record(a.string(),a.unknown()).nullable().optional()}),fl=a.object({projectId:a.string().uuid().optional().describe("Project to create the issue in. Auto-filled from CLI and SDK context when omitted."),name:a.string().trim().min(1).optional().describe("Stable issue name for indexing and mute matching. When omitted, the name is derived from contentMdx."),contentMdx:a.string().trim().min(1,"contentMdx cannot be empty").describe("Safe Sazabi MDX document for the issue body (impact, root cause, remediation, evidence)."),severity:a.enum(["low","medium","high","critical"]).default("medium").describe("Issue severity used for prioritization and triage."),statusComponentId:a.string().uuid().optional().describe("Optional status component ID to link to the issue."),statusStartedAt:a.string().datetime({offset:!0}).optional().describe("Optional ISO timestamp for when the linked status-page incident began.")}),vl=fl.superRefine((e,t)=>{if(e.statusStartedAt&&!e.statusComponentId)t.addIssue({code:"custom",path:["statusStartedAt"],message:"statusStartedAt requires statusComponentId."})}),n1=a.object({issue:on,duplicateIssueId:a.string().uuid().optional().describe("Present when creation reused an existing open issue instead of creating a new one.")}),Tk=a.object({projectId:a.string().uuid().optional().describe("Project to list issues for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of issues to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:a.enum(["open","resolved","ignored"]).optional().describe("Filter by issue status."),severity:a.enum(["low","medium","high","critical"]).optional().describe("Filter by severity."),statusComponentId:a.string().uuid().optional().describe("Filter by status component ID.")}),o1=a.object({issues:a.array(on),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Lk=Tk.extend({name:a.string().trim().optional().describe("Case-insensitive partial match on issue name."),includeDeliveryMetadata:a.union([a.boolean(),a.stringbool()]).default(!1).describe("When true, include raw delivery metadata in each issue.")}),i1=a.object({issues:a.array(t1),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),r1=Lk.omit({limit:!0,cursor:!0,includeDeliveryMetadata:!0}),Y8=a.object({open:a.number().int().nonnegative(),resolved:a.number().int().nonnegative(),ignored:a.number().int().nonnegative()}),Q8=a.object({low:a.number().int().nonnegative(),medium:a.number().int().nonnegative(),high:a.number().int().nonnegative(),critical:a.number().int().nonnegative()}),a1=a.object({total:a.number().int().nonnegative(),byStatus:Y8,bySeverity:Q8,filters:a.object({name:a.string().nullable(),status:a.enum(["open","resolved","ignored"]).nullable(),severity:a.enum(["low","medium","high","critical"]).nullable(),statusComponentId:a.string().uuid().nullable()})}),c1=a.object({issueId:a.string().uuid().describe("Issue ID to retrieve.")}),s1=a.object({issue:X8}),h1=a.object({issueId:a.string().uuid().describe("Issue ID to resolve."),statusResolvedAt:a.string().datetime({offset:!0}).optional().describe("Optional ISO timestamp for when the linked status-page incident ended.")}),l1=a.object({issue:on}),u1=a.object({issueId:a.string().uuid().describe("Issue ID to ignore.")}),d1=a.object({issue:on}),g1=a.object({issueId:a.string().uuid().describe("Issue ID to reopen.")}),y1=a.object({issue:on}),b1=a.object({issueId:a.string().uuid().describe("Issue ID to reassign and reopen."),targetComponentId:a.string().uuid().describe("Active canonical component that will own the reopened issue.")}),m1=a.object({issue:on,sourceComponentId:a.string().uuid(),targetComponentId:a.string().uuid()}),p1=a.object({issueId:a.string().uuid().describe("Issue ID to mute.")}),w1=a.object({issue:on}),f1=a.object({issueId:a.string().uuid().describe("Issue ID to unmute.")}),v1=a.object({issue:on}),Ui=I({operationId:"issues.create",description:"Create an issue in a project, returning an existing open issue when root-cause deduplication finds a match.",backend:"api",route:{method:"POST",path:"/issues",tags:["Issues"],successStatus:201},input:vl,output:n1,pagination:"none",async:"sync"}),kl=I({operationId:"issues.list",description:"List issues in a project, optionally filtered by status and severity.",backend:"api",route:{method:"GET",path:"/issues",tags:["Issues"]},input:Tk,output:o1,pagination:"cursor",async:"sync"}),Sl=I({operationId:"issues.search",description:"Search issues in a project by name, status, and severity.",backend:"api",route:{method:"GET",path:"/issues/search",tags:["Issues"]},input:Lk,output:i1,pagination:"cursor",async:"sync"}),Pl=I({operationId:"issues.count",description:"Count issues in a project with status and severity breakdowns.",backend:"api",route:{method:"GET",path:"/issues/count",tags:["Issues"]},input:r1,output:a1,pagination:"none",async:"sync"}),Il=I({operationId:"issues.get",description:"Get a single issue by ID.",backend:"api",route:{method:"GET",path:"/issues/{issueId}",tags:["Issues"]},input:c1,output:s1,pagination:"none",async:"sync"}),$l=I({operationId:"issues.resolve",description:"Resolve an open issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/resolve",tags:["Issues"]},input:h1,output:l1,pagination:"none",async:"sync"}),Ol=I({operationId:"issues.ignore",description:"Ignore an open issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/ignore",tags:["Issues"]},input:u1,output:d1,pagination:"none",async:"sync"}),Al=I({operationId:"issues.reopen",description:"Reopen a resolved or ignored issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/reopen",tags:["Issues"]},input:g1,output:y1,pagination:"none",async:"sync"}),Tl=I({operationId:"issues.reassignAndReopen",description:"Atomically reassign a resolved or ignored issue to an active component and reopen it.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/reassign-and-reopen",tags:["Issues"]},input:b1,output:m1,pagination:"none",async:"sync"}),Ll=I({operationId:"issues.mute",description:"Mute an issue, suppressing future re-fires without changing status.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/mute",tags:["Issues"]},input:p1,output:w1,pagination:"none",async:"sync"}),Dl=I({operationId:"issues.unmute",description:"Unmute an issue, preserving its current status.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/unmute",tags:["Issues"]},input:f1,output:v1,pagination:"none",async:"sync"}),V8={count:Pl.contract,create:Ui.contract,list:kl.contract,search:Sl.contract,get:Il.contract,resolve:$l.contract,ignore:Ol.contract,reopen:Al.contract,reassignAndReopen:Tl.contract,mute:Ll.contract,unmute:Dl.contract}});var Ck,k1,Cl,zl,S1,P1,I1,$1,_l,zk,O1,A1,T1,L1,D1,C1,z1,_1,j1,N1,R1,x1,Mi,Ei,Ki,Gi,qi,jl,Nl,Rl,xl,Ul,e5,t5;var _k=d(()=>{me();Ce();Ck=/^[a-zA-Z0-9\s\-_]+$/,k1=a.object({id:a.string().uuid(),name:a.string(),expiresAt:a.string().datetime().nullable(),lastUsedAt:a.string().datetime().nullable(),createdAt:a.string().datetime()}),Cl=k1.extend({projectId:a.string().uuid(),dataSourceConnectionId:a.string().uuid().nullable().describe("Linked data source connection ID when this key is scoped to one data source."),deactivatedAt:a.string().datetime().nullable().describe("Timestamp when this public key was deactivated.")}),zl=k1.extend({projectId:a.string().uuid().nullable()}),S1=a.object({projectId:a.string().uuid().optional().describe("Project to list keys for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of keys to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),P1=a.object({publicKeys:a.array(Cl),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),I1=a.object({secretKeys:a.array(zl),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),$1=a.object({projectId:a.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted."),keyId:a.string().uuid().describe("Key ID to fetch.")}),_l=a.object({publicKey:Cl}),zk=a.object({secretKey:zl}),O1=a.object({publicKey:Cl.extend({value:a.string()})}),A1=a.object({projectId:a.string().uuid().optional().describe("Project to ensure the log forwarding key for. Auto-filled from CLI and SDK context when omitted.")}),T1=a.object({secretKey:zl.extend({value:a.string()})}),L1=a.object({projectId:a.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted."),keyId:a.string().uuid().describe("Key ID to update."),name:a.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(Ck,"Name can only contain letters, numbers, spaces, hyphens, and underscores").optional().describe("New human-readable name for the key."),expiresAt:a.string().datetime().nullable().optional().describe("New expiration timestamp for the key, or null to clear it.")}),D1=a.object({params:a.object({keyId:a.string().uuid().describe("Public key ID to deactivate.")}),query:a.object({projectId:a.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted.")})}).transform(({params:e,query:t})=>({...t,...e})),C1=_l,z1=a.void(),_1=a.object({limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of keys to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),j1=a.object({keyId:a.string().uuid().describe("Key ID to fetch.")}),N1=a.object({projectId:a.string().uuid().optional().describe("Project to scope this key to. When set, the key can only access resources within this project. Omit for organization-wide access."),name:a.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(Ck,"Name can only contain letters, numbers, spaces, hyphens, and underscores").describe("Human-readable name for the key."),expiresAt:a.string().datetime().optional().describe("Optional expiration timestamp for the key.")}),R1=a.object({keyId:a.string().uuid().describe("Key ID to update."),name:a.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(Ck,"Name can only contain letters, numbers, spaces, hyphens, and underscores").optional().describe("New human-readable name for the key."),expiresAt:a.string().datetime().nullable().optional().describe("New expiration timestamp for the key, or null to clear it.")}),x1=a.object({params:a.object({keyId:a.string().uuid().describe("Key ID to delete.")})}).transform(({params:e})=>({...e})),Mi=I({operationId:"publicKeys.list",description:"List public keys within one project.",backend:"api",route:{method:"GET",path:"/public-keys",tags:["Public Keys"]},input:S1,output:P1,pagination:"cursor",async:"sync",examples:[{name:"list-public-keys",input:{projectId:"11111111-1111-4111-8111-111111111111",limit:25},output:{publicKeys:[{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}],nextCursor:null}}]}),Ei=I({operationId:"publicKeys.get",description:"Get one public key within one project.",backend:"api",route:{method:"GET",path:"/public-keys/{keyId}",tags:["Public Keys"]},input:$1,output:_l,pagination:"none",async:"sync",examples:[{name:"get-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111",keyId:"22222222-2222-4222-8222-222222222222"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Ki=I({operationId:"publicKeys.ensureLogForwarding",description:"Ensure a reusable project-scoped public key exists for CLI log forwarding.",backend:"api",route:{method:"POST",path:"/public-keys/log-forwarding/ensure",tags:["Public Keys"]},input:A1,output:O1,pagination:"none",async:"sync",examples:[{name:"ensure-log-forwarding-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"sazabi-cli-forward",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z",value:"sazabi_public_example"}}}]}),Gi=I({operationId:"publicKeys.update",description:"Update one public key within one project.",backend:"api",route:{method:"PATCH",path:"/public-keys/{keyId}",tags:["Public Keys"]},input:L1,output:_l,pagination:"none",async:"sync",examples:[{name:"rename-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111",keyId:"22222222-2222-4222-8222-222222222222",name:"Updated CLI forwarder"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"Updated CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),qi=I({operationId:"publicKeys.deactivate",description:"Deactivate one public key within one project. Recently validated requests may continue to authenticate for a short period after deactivation.",backend:"api",route:{method:"POST",path:"/public-keys/{keyId}/deactivate",tags:["Public Keys"],inputStructure:"detailed"},input:D1,output:C1,pagination:"none",async:"sync"}),jl=I({operationId:"secretKeys.list",description:"List secret keys within the organization.",backend:"api",route:{method:"GET",path:"/secret-keys",tags:["Secret Keys"]},input:_1,output:I1,pagination:"cursor",async:"sync",examples:[{name:"list-secret-keys",input:{limit:25},output:{secretKeys:[{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}],nextCursor:null}}]}),Nl=I({operationId:"secretKeys.get",description:"Get one secret key within the organization.",backend:"api",route:{method:"GET",path:"/secret-keys/{keyId}",tags:["Secret Keys"]},input:j1,output:zk,pagination:"none",async:"sync",examples:[{name:"get-secret-key",input:{keyId:"33333333-3333-4333-8333-333333333333"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Rl=I({operationId:"secretKeys.create",description:"Create one secret key within the organization.",backend:"api",route:{method:"POST",path:"/secret-keys",successStatus:201,tags:["Secret Keys"]},input:N1,output:T1,pagination:"none",async:"sync",examples:[{name:"create-secret-key",input:{name:"CI agent"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z",value:"sazabi_secret_example"}}}]}),xl=I({operationId:"secretKeys.update",description:"Update one secret key within the organization.",backend:"api",route:{method:"PATCH",path:"/secret-keys/{keyId}",tags:["Secret Keys"]},input:R1,output:zk,pagination:"none",async:"sync",examples:[{name:"rename-secret-key",input:{keyId:"33333333-3333-4333-8333-333333333333",name:"Updated CI agent"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"Updated CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Ul=I({operationId:"secretKeys.delete",description:"Delete one secret key within the organization.",backend:"api",route:{method:"DELETE",path:"/secret-keys/{keyId}",successStatus:204,tags:["Secret Keys"],inputStructure:"detailed"},input:x1,output:z1,pagination:"none",async:"sync"}),e5={list:Mi.contract,get:Ei.contract,ensureLogForwarding:Ki.contract,update:Gi.contract,deactivate:qi.contract},t5={list:jl.contract,get:Nl.contract,create:Rl.contract,update:xl.contract,delete:Ul.contract}});var jk,U1,Nk,Za,n5,o5,i5,r5,a5,c5,s5,h5,l5,u5,Rk,xk,Uk,Mk,Ek,o_e;var M1=d(()=>{me();Ce();jk=a.string().uuid().describe("Log match expression ID."),U1=a.string().min(1).max(200).describe("Human-readable expression name."),Nk=a.string().min(1).max(8192).describe("CEL expression evaluated against ingested log events."),Za=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),expression:Nk,enabled:a.boolean(),compiledVersion:a.number().int(),linkedAutomationIds:a.array(a.string().uuid()).optional().describe("Automations bound to this expression. Included on list/get when available."),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),n5=a.object({projectId:a.string().uuid().optional().describe("Project to list expressions for. Auto-filled from CLI and SDK context when omitted.")}),o5=a.object({expressions:a.array(Za)}),i5=a.object({expressionId:jk,projectId:a.string().uuid().optional().describe("Project that owns the expression. Auto-filled from CLI and SDK context when omitted.")}),r5=a.object({expression:Za}),a5=a.object({projectId:a.string().uuid().optional().describe("Project to create the expression in. Auto-filled from CLI and SDK context when omitted."),name:U1,expression:Nk,enabled:a.boolean().optional().describe("Whether the expression starts enabled. Defaults to true.")}),c5=a.object({expression:Za}),s5=a.object({expressionId:jk,projectId:a.string().uuid().optional().describe("Project that owns the expression. Auto-filled from CLI and SDK context when omitted."),name:U1.optional(),expression:Nk.optional(),enabled:a.boolean().optional().describe("Whether the expression is enabled.")}),h5=a.object({expression:Za}),l5=a.object({expressionId:jk,projectId:a.string().uuid().optional().describe("Project that owns the expression. Auto-filled from CLI and SDK context when omitted.")}),u5=a.object({expression:Za}),Rk=I({operationId:"logMatchExpressions.list",description:"List CEL log-match expressions in a project.",backend:"api",route:{method:"GET",path:"/log-match-expressions",tags:["Log match expressions"]},input:n5,output:o5,pagination:"none",async:"sync"}),xk=I({operationId:"logMatchExpressions.get",description:"Get a single log-match expression by ID.",backend:"api",route:{method:"GET",path:"/log-match-expressions/{expressionId}",tags:["Log match expressions"]},input:i5,output:r5,pagination:"none",async:"sync"}),Uk=I({operationId:"logMatchExpressions.create",description:"Create a CEL log-match expression for a project.",backend:"api",route:{method:"POST",path:"/log-match-expressions",successStatus:201,tags:["Log match expressions"]},input:a5,output:c5,pagination:"none",async:"sync"}),Mk=I({operationId:"logMatchExpressions.update",description:"Update a log-match expression's name, CEL body, or enabled state.",backend:"api",route:{method:"PATCH",path:"/log-match-expressions/{expressionId}",tags:["Log match expressions"]},input:s5,output:h5,pagination:"none",async:"sync"}),Ek=I({operationId:"logMatchExpressions.disable",description:"Disable a log-match expression so it stops matching logs.",backend:"api",route:{method:"POST",path:"/log-match-expressions/{expressionId}/disable",tags:["Log match expressions"]},input:l5,output:u5,pagination:"none",async:"sync"}),o_e={list:Rk.contract,get:xk.contract,create:Uk.contract,update:Mk.contract,disable:Ek.contract}});var E1,K1,G1,q1,J1,B1,H1,Xa,W1,F1,Z1,Kk,X1,Y1,Q1,V1,e4,t4,n4,o4,i4,r4,d5,a4,c4,Ji,Bi,Hi,Wi,Fi,Ml,g5;var Gk=d(()=>{me();Ce();E1=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)"),K1=a.enum(["any","all","phrase"]).describe("Search mode: 'any' (match any token), 'all' (match all tokens), 'phrase' (exact phrase match)"),G1=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:K1.optional().default("all").describe("Token matching mode")}),q1=a.object({field:a.string().describe("Field name to filter on"),op:E1.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"]})}),J1=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")}),B1=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")}),H1=a.object({projectId:a.string().uuid().optional().describe("Project to query logs for. Auto-filled from CLI and SDK context when omitted."),search:G1.optional().describe("Full-text search configuration"),filters:a.array(q1).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:J1.optional().describe("Sort configuration (defaults to timestamp desc)"),pagination:B1.optional().describe("Pagination configuration")}),Xa=a.enum(["clickhouse","better-stack","datadog","gcp","axiom","cloudwatch","sentry","posthog","mezmo"]),W1=a.enum(["native","external"]),F1=a.object({projectId:a.string().uuid().optional().describe("Project to inspect. Auto-filled from CLI and SDK context when omitted.")}),Z1=a.object({backend:a.object({id:Xa,name:a.string(),kind:W1}).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"),observedServiceNames:a.array(a.string()).describe("Recently observed service names for this project"),observedAttributeKeys:a.array(a.string()).describe("Recently observed log attribute keys for this project"),schemaContext:a.record(a.string(),a.any()).optional().describe("Backend-specific schema guidance and examples")}),Kk=a.enum(["1m","5m","15m","1h"]),X1=a.enum(["service_name","severity_text","environment"]),Y1=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:Kk.optional().describe("Aggregation bucket size for the volume series"),groupBy:X1.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"]}),Q1=a.object({total:a.number().nonnegative(),startDate:a.string().datetime({offset:!0}),endDate:a.string().datetime({offset:!0}),interval:Kk,series:a.array(a.object({group:a.string(),total:a.number().nonnegative(),points:a.array(a.object({bucket:a.string(),count:a.number().nonnegative()}))}))}),V1=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"]}),e4=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()}),t4=a.object({patterns:a.array(e4),meta:a.object({backendId:Xa,count:a.number().int().nonnegative(),took:a.number().nonnegative()})}),n4=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")}),o4=a.object({result:a.string().describe("Backend-formatted query result"),format:a.literal("text"),meta:a.object({backendId:Xa,took:a.number().nonnegative(),truncated:a.boolean()})}),i4=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 must be at least 1 character long.").max(4000,"Query must be at most 4000 characters").describe("Natural-language logs question. Examples: 'api request failures in the last day', 'timeouts in intake', 'top ERROR patterns for public-api'.")}),r4=a.object({answer:a.string().describe("Evidence-backed natural-language answer to the logs question"),steps:a.number().int().nonnegative().describe("Number of nested model steps used"),toolCalls:a.number().int().nonnegative().describe("Number of nested tool calls used"),compacted:a.boolean().describe("Whether nested messages were compacted during the search"),meta:a.object({backendId:Xa,took:a.number().nonnegative(),modelProvider:a.string().optional(),modelId:a.string().optional()})}),d5=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")}),a4=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")}),c4=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:a4.describe("Query execution metadata")}),Ji=I({operationId:"logs.query",description:"Query logs within one project.",backend:"api",route:{method:"POST",path:"/logs/query",tags:["Logs"]},input:H1,output:c4,pagination:"cursor",async:"sync"}),Bi=I({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:F1,output:Z1,pagination:"none",async:"sync"}),Hi=I({operationId:"logs.volume",description:"Query pre-aggregated log volume for one project.",backend:"api",route:{method:"POST",path:"/logs/volume",tags:["Logs"]},input:Y1,output:Q1,pagination:"none",async:"sync"}),Wi=I({operationId:"logs.patterns",description:"Query normalized log patterns for discovery workflows.",backend:"api",route:{method:"POST",path:"/logs/patterns",tags:["Logs"]},input:V1,output:t4,pagination:"none",async:"sync"}),Fi=I({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:n4,output:o4,pagination:"none",async:"sync"}),Ml=I({operationId:"logs.searchNatural",summary:"Natural Language Log Search",description:"Search project logs by asking a natural-language question. Experimental.",backend:"api",route:{method:"POST",path:"/logs/search-natural",tags:["Logs"]},input:i4,output:r4,pagination:"none",async:"sync"}),g5={query:Ji.contract,schema:Bi.contract,volume:Hi.contract,patterns:Wi.contract,nativeQuery:Fi.contract,searchNatural:Ml.contract}});var s4=d(()=>{al()});var qk=d(()=>{s4()});var l4=()=>{};var Jk,Bk,El,y5,b5,Zi,Kl,u4,d4,Hk,g4,y4,m5,b4,Wk,p5,w5,f5,v5,k5,S5,P5,I5,$5,O5,A5,T5,L5,Fk,m4,p4,D5,Zk;var Gl=d(()=>{me();Jk=["streamable-http","sse"],Bk=["none","headers","oauth","aws-sigv4"],El=["none","client_secret_basic","client_secret_post"],y5=["preset","custom"],b5=["configured","authorizing","connected","error"],Zi=["enabled","disabled","custom-only"],Kl=["enabled","write_blocked","disabled"],u4=a.enum(Jk),d4=a.enum(Bk),Hk=a.enum(El),g4=a.enum(y5),y4=a.enum(b5),m5=a.enum(Zi),b4=a.enum(Kl),Wk=a.object({id:a.string().min(1),name:a.string().min(1),value:a.string().min(1)}),p5=a.object({id:a.string().min(1),name:a.string().min(1),maskedValue:a.string().min(1)}),w5=a.object({authMode:a.literal("none")}),f5=a.object({tokenUrl:a.string().url(),clientId:a.string().min(1),clientSecret:a.string().min(1).optional(),tokenEndpointAuthMethod:Hk.optional(),refreshToken:a.string().min(1),headerName:a.string().min(1).default("Authorization"),headerValuePrefix:a.string().default("Bearer "),expiresAt:a.string().datetime().optional()}),v5=a.object({authMode:a.literal("headers"),headers:a.array(Wk),refreshCredentials:f5.optional()}),k5=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")}),S5=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(),P5=a.object({accessToken:a.string().min(1),refreshToken:a.string().min(1).optional(),tokenType:a.string().min(1).optional(),scope:S5,expiresAt:a.string().datetime().optional()}).transform(({scope:e,...t})=>{return e===void 0?t:{...t,scope:e}}),I5=a.object({authMode:a.literal("oauth"),providerId:a.string().min(1),tokens:P5,headers:a.array(Wk).optional()}),$5=a.discriminatedUnion("authMode",[w5,v5,I5,k5]),O5=a.string().min(1).regex(/^enc:v1:/,"Encrypted auth config must use enc:v1 format."),A5=a.object({codeVerifier:a.string().min(1),clientId:a.string().min(1),clientSecret:a.string().min(1).optional(),tokenEndpointAuthMethod:Hk.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()}),T5=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()),L5=a.object({supportsOAuth:a.boolean().default(!1),supportsCustomHeaders:a.boolean().default(!0),supportsToolDiscovery:a.boolean().default(!0),readOnlyToolNames:a.array(a.string()).default([])}),Fk=a.object({name:a.string().min(1),title:a.string().min(1),description:a.string().min(1),inputSchema:T5,annotations:a.record(a.string(),a.unknown()).default({}),availability:b4,isReadOnly:a.boolean()}),m4=a.object({discoveredAt:a.string().datetime(),tools:a.array(Fk)}),p4=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()})}),D5=a.object({id:a.string().uuid(),organizationId:a.string().min(1),projectId:a.string().uuid(),providerId:a.string().min(1),source:g4,displayName:a.string().min(1),connectionKey:a.string().min(1),serverUrl:a.string().url(),transport:u4,authMode:d4,installStatus:y4,installedByUserId:a.string().nullable(),connectedAt:a.string().datetime().nullable(),toolSnapshot:m4.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()}),Zk=p4});var Yk=q((b_e,Bl)=>{var w4,f4,v4,k4,S4,P4,I4,$4,O4,A4,T4,L4,D4,ql,Xk,C4,z4,_4,Xi,j4,N4,R4,x4,U4,M4,E4,K4,G4,Jl,q4,J4,B4;(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(i){e(n(t,n(i)))});else if(typeof Bl==="object"&&typeof b_e==="object")e(n(t,n(b_e)));else e(n(t));function n(i,o){if(i!==t)if(typeof Object.create==="function")Object.defineProperty(i,"__esModule",{value:!0});else i.__esModule=!0;return function(r,c){return i[r]=o?o(r,c):c}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,c){r.__proto__=c}||function(r,c){for(var s in c)if(Object.prototype.hasOwnProperty.call(c,s))r[s]=c[s]};w4=function(r,c){if(typeof c!=="function"&&c!==null)throw TypeError("Class extends value "+String(c)+" is not a constructor or null");t(r,c);function s(){this.constructor=r}r.prototype=c===null?Object.create(c):(s.prototype=c.prototype,new s)},f4=Object.assign||function(r){for(var c,s=1,h=arguments.length;s<h;s++){c=arguments[s];for(var l in c)if(Object.prototype.hasOwnProperty.call(c,l))r[l]=c[l]}return r},v4=function(r,c){var s={};for(var h in r)if(Object.prototype.hasOwnProperty.call(r,h)&&c.indexOf(h)<0)s[h]=r[h];if(r!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var l=0,h=Object.getOwnPropertySymbols(r);l<h.length;l++)if(c.indexOf(h[l])<0&&Object.prototype.propertyIsEnumerable.call(r,h[l]))s[h[l]]=r[h[l]]}return s},k4=function(r,c,s,h){var l=arguments.length,u=l<3?c:h===null?h=Object.getOwnPropertyDescriptor(c,s):h,g;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")u=Reflect.decorate(r,c,s,h);else for(var y=r.length-1;y>=0;y--)if(g=r[y])u=(l<3?g(u):l>3?g(c,s,u):g(c,s))||u;return l>3&&u&&Object.defineProperty(c,s,u),u},S4=function(r,c){return function(s,h){c(s,h,r)}},P4=function(r,c,s,h,l,u){function g(we){if(we!==void 0&&typeof we!=="function")throw TypeError("Function expected");return we}var y=h.kind,b=y==="getter"?"get":y==="setter"?"set":"value",w=!c&&r?h.static?r:r.prototype:null,v=c||(w?Object.getOwnPropertyDescriptor(w,h.name):{}),P,T=!1;for(var x=s.length-1;x>=0;x--){var j={};for(var Z in h)j[Z]=Z==="access"?{}:h[Z];for(var Z in h.access)j.access[Z]=h.access[Z];j.addInitializer=function(we){if(T)throw TypeError("Cannot add initializers after decoration has completed");u.push(g(we||null))};var U=(0,s[x])(y==="accessor"?{get:v.get,set:v.set}:v[b],j);if(y==="accessor"){if(U===void 0)continue;if(U===null||typeof U!=="object")throw TypeError("Object expected");if(P=g(U.get))v.get=P;if(P=g(U.set))v.set=P;if(P=g(U.init))l.unshift(P)}else if(P=g(U))if(y==="field")l.unshift(P);else v[b]=P}if(w)Object.defineProperty(w,h.name,v);T=!0},I4=function(r,c,s){var h=arguments.length>2;for(var l=0;l<c.length;l++)s=h?c[l].call(r,s):c[l].call(r);return h?s:void 0},$4=function(r){return typeof r==="symbol"?r:"".concat(r)},O4=function(r,c,s){if(typeof c==="symbol")c=c.description?"[".concat(c.description,"]"):"";return Object.defineProperty(r,"name",{configurable:!0,value:s?"".concat(s," ",c):c})},A4=function(r,c){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(r,c)},T4=function(r,c,s,h){function l(u){return u instanceof s?u:new s(function(g){g(u)})}return new(s||(s=Promise))(function(u,g){function y(v){try{w(h.next(v))}catch(P){g(P)}}function b(v){try{w(h.throw(v))}catch(P){g(P)}}function w(v){v.done?u(v.value):l(v.value).then(y,b)}w((h=h.apply(r,c||[])).next())})},L4=function(r,c){var s={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},h,l,u,g=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return g.next=y(0),g.throw=y(1),g.return=y(2),typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this}),g;function y(w){return function(v){return b([w,v])}}function b(w){if(h)throw TypeError("Generator is already executing.");while(g&&(g=0,w[0]&&(s=0)),s)try{if(h=1,l&&(u=w[0]&2?l.return:w[0]?l.throw||((u=l.return)&&u.call(l),0):l.next)&&!(u=u.call(l,w[1])).done)return u;if(l=0,u)w=[w[0]&2,u.value];switch(w[0]){case 0:case 1:u=w;break;case 4:return s.label++,{value:w[1],done:!1};case 5:s.label++,l=w[1],w=[0];continue;case 7:w=s.ops.pop(),s.trys.pop();continue;default:if((u=s.trys,!(u=u.length>0&&u[u.length-1]))&&(w[0]===6||w[0]===2)){s=0;continue}if(w[0]===3&&(!u||w[1]>u[0]&&w[1]<u[3])){s.label=w[1];break}if(w[0]===6&&s.label<u[1]){s.label=u[1],u=w;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(w);break}if(u[2])s.ops.pop();s.trys.pop();continue}w=c.call(r,s)}catch(v){w=[6,v],l=0}finally{h=u=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}},D4=function(r,c){for(var s in r)if(s!=="default"&&!Object.prototype.hasOwnProperty.call(c,s))Jl(c,r,s)},Jl=Object.create?function(r,c,s,h){if(h===void 0)h=s;var l=Object.getOwnPropertyDescriptor(c,s);if(!l||("get"in l?!c.__esModule:l.writable||l.configurable))l={enumerable:!0,get:function(){return c[s]}};Object.defineProperty(r,h,l)}:function(r,c,s,h){if(h===void 0)h=s;r[h]=c[s]},ql=function(r){var c=typeof Symbol==="function"&&Symbol.iterator,s=c&&r[c],h=0;if(s)return s.call(r);if(r&&typeof r.length==="number")return{next:function(){if(r&&h>=r.length)r=void 0;return{value:r&&r[h++],done:!r}}};throw TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")},Xk=function(r,c){var s=typeof Symbol==="function"&&r[Symbol.iterator];if(!s)return r;var h=s.call(r),l,u=[],g;try{while((c===void 0||c-- >0)&&!(l=h.next()).done)u.push(l.value)}catch(y){g={error:y}}finally{try{if(l&&!l.done&&(s=h.return))s.call(h)}finally{if(g)throw g.error}}return u},C4=function(){for(var r=[],c=0;c<arguments.length;c++)r=r.concat(Xk(arguments[c]));return r},z4=function(){for(var r=0,c=0,s=arguments.length;c<s;c++)r+=arguments[c].length;for(var h=Array(r),l=0,c=0;c<s;c++)for(var u=arguments[c],g=0,y=u.length;g<y;g++,l++)h[l]=u[g];return h},_4=function(r,c,s){if(s||arguments.length===2){for(var h=0,l=c.length,u;h<l;h++)if(u||!(h in c)){if(!u)u=Array.prototype.slice.call(c,0,h);u[h]=c[h]}}return r.concat(u||Array.prototype.slice.call(c))},Xi=function(r){return this instanceof Xi?(this.v=r,this):new Xi(r)},j4=function(r,c,s){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var h=s.apply(r,c||[]),l,u=[];return l=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),y("next"),y("throw"),y("return",g),l[Symbol.asyncIterator]=function(){return this},l;function g(x){return function(j){return Promise.resolve(j).then(x,P)}}function y(x,j){if(h[x]){if(l[x]=function(Z){return new Promise(function(U,we){u.push([x,Z,U,we])>1||b(x,Z)})},j)l[x]=j(l[x])}}function b(x,j){try{w(h[x](j))}catch(Z){T(u[0][3],Z)}}function w(x){x.value instanceof Xi?Promise.resolve(x.value.v).then(v,P):T(u[0][2],x)}function v(x){b("next",x)}function P(x){b("throw",x)}function T(x,j){if(x(j),u.shift(),u.length)b(u[0][0],u[0][1])}},N4=function(r){var c,s;return c={},h("next"),h("throw",function(l){throw l}),h("return"),c[Symbol.iterator]=function(){return this},c;function h(l,u){c[l]=r[l]?function(g){return(s=!s)?{value:Xi(r[l](g)),done:!1}:u?u(g):g}:u}},R4=function(r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var c=r[Symbol.asyncIterator],s;return c?c.call(r):(r=typeof ql==="function"?ql(r):r[Symbol.iterator](),s={},h("next"),h("throw"),h("return"),s[Symbol.asyncIterator]=function(){return this},s);function h(u){s[u]=r[u]&&function(g){return new Promise(function(y,b){g=r[u](g),l(y,b,g.done,g.value)})}}function l(u,g,y,b){Promise.resolve(b).then(function(w){u({value:w,done:y})},g)}},x4=function(r,c){if(Object.defineProperty)Object.defineProperty(r,"raw",{value:c});else r.raw=c;return r};var n=Object.create?function(r,c){Object.defineProperty(r,"default",{enumerable:!0,value:c})}:function(r,c){r.default=c},i=function(r){return i=Object.getOwnPropertyNames||function(c){var s=[];for(var h in c)if(Object.prototype.hasOwnProperty.call(c,h))s[s.length]=h;return s},i(r)};U4=function(r){if(r&&r.__esModule)return r;var c={};if(r!=null){for(var s=i(r),h=0;h<s.length;h++)if(s[h]!=="default")Jl(c,r,s[h])}return n(c,r),c},M4=function(r){return r&&r.__esModule?r:{default:r}},E4=function(r,c,s,h){if(s==="a"&&!h)throw TypeError("Private accessor was defined without a getter");if(typeof c==="function"?r!==c||!h:!c.has(r))throw TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?h:s==="a"?h.call(r):h?h.value:c.get(r)},K4=function(r,c,s,h,l){if(h==="m")throw TypeError("Private method is not writable");if(h==="a"&&!l)throw TypeError("Private accessor was defined without a setter");if(typeof c==="function"?r!==c||!l:!c.has(r))throw TypeError("Cannot write private member to an object whose class did not declare it");return h==="a"?l.call(r,s):l?l.value=s:c.set(r,s),s},G4=function(r,c){if(c===null||typeof c!=="object"&&typeof c!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof r==="function"?c===r:r.has(c)},q4=function(r,c,s){if(c!==null&&c!==void 0){if(typeof c!=="object"&&typeof c!=="function")throw TypeError("Object expected.");var h,l;if(s){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");h=c[Symbol.asyncDispose]}if(h===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(h=c[Symbol.dispose],s)l=h}if(typeof h!=="function")throw TypeError("Object not disposable.");if(l)h=function(){try{l.call(this)}catch(u){return Promise.reject(u)}};r.stack.push({value:c,dispose:h,async:s})}else if(s)r.stack.push({async:!0});return c};var o=typeof SuppressedError==="function"?SuppressedError:function(r,c,s){var h=Error(s);return h.name="SuppressedError",h.error=r,h.suppressed=c,h};J4=function(r){function c(u){r.error=r.hasError?new o(u,r.error,"An error was suppressed during disposal."):u,r.hasError=!0}var s,h=0;function l(){while(s=r.stack.pop())try{if(!s.async&&h===1)return h=0,r.stack.push(s),Promise.resolve().then(l);if(s.dispose){var u=s.dispose.call(s.value);if(s.async)return h|=2,Promise.resolve(u).then(l,function(g){return c(g),l()})}else h|=1}catch(g){c(g)}if(h===1)return r.hasError?Promise.reject(r.error):Promise.resolve();if(r.hasError)throw r.error}return l()},B4=function(r,c){if(typeof r==="string"&&/^\.\.?\//.test(r))return r.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(s,h,l,u,g){return h?c?".jsx":".js":l&&(!u||!g)?s:l+u+"."+g.toLowerCase()+"js"});return r},e("__extends",w4),e("__assign",f4),e("__rest",v4),e("__decorate",k4),e("__param",S4),e("__esDecorate",P4),e("__runInitializers",I4),e("__propKey",$4),e("__setFunctionName",O4),e("__metadata",A4),e("__awaiter",T4),e("__generator",L4),e("__exportStar",D4),e("__createBinding",Jl),e("__values",ql),e("__read",Xk),e("__spread",C4),e("__spreadArrays",z4),e("__spreadArray",_4),e("__await",Xi),e("__asyncGenerator",j4),e("__asyncDelegator",N4),e("__asyncValues",R4),e("__makeTemplateObject",x4),e("__importStar",U4),e("__importDefault",M4),e("__classPrivateFieldGet",E4),e("__classPrivateFieldSet",K4),e("__classPrivateFieldIn",G4),e("__addDisposableResource",q4),e("__disposeResources",J4),e("__rewriteRelativeImportExtension",B4)})});var Qk=q((H4)=>{Object.defineProperty(H4,"__esModule",{value:!0});H4.MAX_HASHABLE_LENGTH=H4.INIT=H4.KEY=H4.DIGEST_LENGTH=H4.BLOCK_SIZE=void 0;H4.BLOCK_SIZE=64;H4.DIGEST_LENGTH=32;H4.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]);H4.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];H4.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1});var X4=q((F4)=>{Object.defineProperty(F4,"__esModule",{value:!0});F4.RawSha256=void 0;var Bt=Qk(),N5=function(){function e(){this.state=Int32Array.from(Bt.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,i=t.byteLength;if(this.bytesHashed+=i,this.bytesHashed*8>Bt.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");while(i>0)if(this.buffer[this.bufferLength++]=t[n++],i--,this.bufferLength===Bt.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),i=this.bufferLength;if(n.setUint8(this.bufferLength++,128),i%Bt.BLOCK_SIZE>=Bt.BLOCK_SIZE-8){for(var o=this.bufferLength;o<Bt.BLOCK_SIZE;o++)n.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(var o=this.bufferLength;o<Bt.BLOCK_SIZE-8;o++)n.setUint8(o,0);n.setUint32(Bt.BLOCK_SIZE-8,Math.floor(t/4294967296),!0),n.setUint32(Bt.BLOCK_SIZE-4,t),this.hashBuffer(),this.finished=!0}var r=new Uint8Array(Bt.DIGEST_LENGTH);for(var o=0;o<8;o++)r[o*4]=this.state[o]>>>24&255,r[o*4+1]=this.state[o]>>>16&255,r[o*4+2]=this.state[o]>>>8&255,r[o*4+3]=this.state[o]>>>0&255;return r},e.prototype.hashBuffer=function(){var t=this,n=t.buffer,i=t.state,o=i[0],r=i[1],c=i[2],s=i[3],h=i[4],l=i[5],u=i[6],g=i[7];for(var y=0;y<Bt.BLOCK_SIZE;y++){if(y<16)this.temp[y]=(n[y*4]&255)<<24|(n[y*4+1]&255)<<16|(n[y*4+2]&255)<<8|n[y*4+3]&255;else{var b=this.temp[y-2],w=(b>>>17|b<<15)^(b>>>19|b<<13)^b>>>10;b=this.temp[y-15];var v=(b>>>7|b<<25)^(b>>>18|b<<14)^b>>>3;this.temp[y]=(w+this.temp[y-7]|0)+(v+this.temp[y-16]|0)}var P=(((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&l^~h&u)|0)+(g+(Bt.KEY[y]+this.temp[y]|0)|0)|0,T=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&r^o&c^r&c)|0;g=u,u=l,l=h,h=s+P|0,s=c,c=r,r=o,o=P+T|0}i[0]+=o,i[1]+=r,i[2]+=c,i[3]+=s,i[4]+=h,i[5]+=l,i[6]+=u,i[7]+=g},e}();F4.RawSha256=N5});var V4=q((w_e,Q4)=>{var{defineProperty:Hl,getOwnPropertyDescriptor:R5,getOwnPropertyNames:x5}=Object,U5=Object.prototype.hasOwnProperty,M5=(e,t)=>Hl(e,"name",{value:t,configurable:!0}),E5=(e,t)=>{for(var n in t)Hl(e,n,{get:t[n],enumerable:!0})},K5=(e,t,n,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of x5(t))if(!U5.call(e,o)&&o!==n)Hl(e,o,{get:()=>t[o],enumerable:!(i=R5(t,o))||i.enumerable})}return e},G5=(e)=>K5(Hl({},"__esModule",{value:!0}),e),Y4={};E5(Y4,{isArrayBuffer:()=>q5});Q4.exports=G5(Y4);var q5=M5((e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]","isArrayBuffer")});var oR=q((f_e,nR)=>{var{defineProperty:Wl,getOwnPropertyDescriptor:J5,getOwnPropertyNames:B5}=Object,H5=Object.prototype.hasOwnProperty,eR=(e,t)=>Wl(e,"name",{value:t,configurable:!0}),W5=(e,t)=>{for(var n in t)Wl(e,n,{get:t[n],enumerable:!0})},F5=(e,t,n,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of B5(t))if(!H5.call(e,o)&&o!==n)Wl(e,o,{get:()=>t[o],enumerable:!(i=J5(t,o))||i.enumerable})}return e},Z5=(e)=>F5(Wl({},"__esModule",{value:!0}),e),tR={};W5(tR,{fromArrayBuffer:()=>Y5,fromString:()=>Q5});nR.exports=Z5(tR);var X5=V4(),Vk=pO("buffer"),Y5=eR((e,t=0,n=e.byteLength-t)=>{if(!(0,X5.isArrayBuffer)(e))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return Vk.Buffer.from(e,t,n)},"fromArrayBuffer"),Q5=eR((e,t)=>{if(typeof e!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?Vk.Buffer.from(e,t):Vk.Buffer.from(e)},"fromString")});var sR=q((v_e,cR)=>{var{defineProperty:Fl,getOwnPropertyDescriptor:V5,getOwnPropertyNames:e7}=Object,t7=Object.prototype.hasOwnProperty,eS=(e,t)=>Fl(e,"name",{value:t,configurable:!0}),n7=(e,t)=>{for(var n in t)Fl(e,n,{get:t[n],enumerable:!0})},o7=(e,t,n,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of e7(t))if(!t7.call(e,o)&&o!==n)Fl(e,o,{get:()=>t[o],enumerable:!(i=V5(t,o))||i.enumerable})}return e},i7=(e)=>o7(Fl({},"__esModule",{value:!0}),e),iR={};n7(iR,{fromUtf8:()=>aR,toUint8Array:()=>r7,toUtf8:()=>a7});cR.exports=i7(iR);var rR=oR(),aR=eS((e)=>{let t=(0,rR.fromString)(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),r7=eS((e)=>{if(typeof e==="string")return aR(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)},"toUint8Array"),a7=eS((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,rR.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength).toString("utf8")},"toUtf8")});var uR=q((hR)=>{Object.defineProperty(hR,"__esModule",{value:!0});hR.convertToBuffer=void 0;var c7=sR(),s7=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:c7.fromUtf8;function h7(e){if(e instanceof Uint8Array)return e;if(typeof e==="string")return s7(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)}hR.convertToBuffer=h7});var yR=q((dR)=>{Object.defineProperty(dR,"__esModule",{value:!0});dR.isEmptyData=void 0;function l7(e){if(typeof e==="string")return e.length===0;return e.byteLength===0}dR.isEmptyData=l7});var pR=q((bR)=>{Object.defineProperty(bR,"__esModule",{value:!0});bR.numToUint8=void 0;function u7(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}bR.numToUint8=u7});var vR=q((wR)=>{Object.defineProperty(wR,"__esModule",{value:!0});wR.uint32ArrayFrom=void 0;function d7(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)}wR.uint32ArrayFrom=d7});var kR=q((Yi)=>{Object.defineProperty(Yi,"__esModule",{value:!0});Yi.uint32ArrayFrom=Yi.numToUint8=Yi.isEmptyData=Yi.convertToBuffer=void 0;var g7=uR();Object.defineProperty(Yi,"convertToBuffer",{enumerable:!0,get:function(){return g7.convertToBuffer}});var y7=yR();Object.defineProperty(Yi,"isEmptyData",{enumerable:!0,get:function(){return y7.isEmptyData}});var b7=pR();Object.defineProperty(Yi,"numToUint8",{enumerable:!0,get:function(){return b7.numToUint8}});var m7=vR();Object.defineProperty(Yi,"uint32ArrayFrom",{enumerable:!0,get:function(){return m7.uint32ArrayFrom}})});var $R=q((PR)=>{Object.defineProperty(PR,"__esModule",{value:!0});PR.Sha256=void 0;var SR=Yk(),Xl=Qk(),Zl=X4(),tS=kR(),w7=function(){function e(t){this.secret=t,this.hash=new Zl.RawSha256,this.reset()}return e.prototype.update=function(t){if((0,tS.isEmptyData)(t)||this.error)return;try{this.hash.update((0,tS.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 SR.__awaiter(this,void 0,void 0,function(){return SR.__generator(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Zl.RawSha256,this.secret){this.outer=new Zl.RawSha256;var t=f7(this.secret),n=new Uint8Array(Xl.BLOCK_SIZE);n.set(t);for(var i=0;i<Xl.BLOCK_SIZE;i++)t[i]^=54,n[i]^=92;this.hash.update(t),this.outer.update(n);for(var i=0;i<t.byteLength;i++)t[i]=0}},e}();PR.Sha256=w7;function f7(e){var t=(0,tS.convertToBuffer)(e);if(t.byteLength>Xl.BLOCK_SIZE){var n=new Zl.RawSha256;n.update(t),t=n.digest()}var i=new Uint8Array(Xl.BLOCK_SIZE);return i.set(t),i}});var OR=q((nS)=>{Object.defineProperty(nS,"__esModule",{value:!0});var v7=Yk();v7.__exportStar($R(),nS)});var Yl=()=>{};var AR="io.modelcontextprotocol/related-task",Vl="2.0",Be,TR,LR,z_e,k7,S7,oS,_t,eu,et,Ht,Wt,tt,tu,P7,I7,DR,Ya,CR,zR,__e,iS,$7,rS,O7,Qa,Qi,_R,A7,T7,L7,D7,C7,z7,_7,j7,jR,N7,aS,R7,x7,cS,U7,Va,ec,M7,tc,nu,E7,sS,hS,lS,uS,j_e,dS,gS,yS,K7,NR,RR,bS,xR,nc,Vi,UR,G7,q7,MR,J7,ER,mS,B7,H7,KR,GR,W7,F7,Z7,X7,Y7,Q7,V7,e2,t2,qR,n2,o2,pS,wS,fS,i2,r2,a2,vS,c2,JR,BR,s2,h2,HR,l2,WR,ou,N_e,u2,d2,FR,g2,ZR,y2,b2,m2,p2,w2,f2,v2,k2,S2,Ql,P2,I2,XR,YR,QR,$2,O2,A2,T2,L2,D2,C2,z2,_2,j2,N2,R2,x2,U2,M2,VR,E2,K2,ex,G2,q2,J2,B2,tx,H2,W2,F2,Z2,R_e,x_e,U_e,M_e,E_e,K_e;var Eo=d(()=>{qk();Be=rl((e)=>e!==null&&(typeof e==="object"||typeof e==="function")),TR=De([k(),be().int()]),LR=k(),z_e=Ke({ttl:be().optional(),pollInterval:be().optional()}),k7=B({ttl:be().optional()}),S7=B({taskId:k()}),oS=Ke({progressToken:TR.optional(),[AR]:S7.optional()}),_t=B({_meta:oS.optional()}),eu=_t.extend({task:k7.optional()}),et=B({method:k(),params:_t.loose().optional()}),Ht=B({_meta:oS.optional()}),Wt=B({method:k(),params:Ht.loose().optional()}),tt=Ke({_meta:oS.optional()}),tu=De([k(),be().int()]),P7=B({jsonrpc:Y(Vl),id:tu,...et.shape}).strict(),I7=B({jsonrpc:Y(Vl),...Wt.shape}).strict(),DR=B({jsonrpc:Y(Vl),id:tu,result:tt}).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"})(Ya||(Ya={}));CR=B({jsonrpc:Y(Vl),id:tu.optional(),error:B({code:be().int(),message:k(),data:Le().optional()})}).strict(),zR=De([P7,I7,DR,CR]),__e=De([DR,CR]),iS=tt.strict(),$7=Ht.extend({requestId:tu.optional(),reason:k().optional()}),rS=Wt.extend({method:Y("notifications/cancelled"),params:$7}),O7=B({src:k(),mimeType:k().optional(),sizes:J(k()).optional(),theme:Ve(["light","dark"]).optional()}),Qa=B({icons:J(O7).optional()}),Qi=B({name:k(),title:k().optional()}),_R=Qi.extend({...Qi.shape,...Qa.shape,version:k(),websiteUrl:k().optional(),description:k().optional()}),A7=ji(B({applyDefaults:$e().optional()}),Oe(k(),Le())),T7=Ja((e)=>{if(e&&typeof e==="object"&&!Array.isArray(e)){if(Object.keys(e).length===0)return{form:{}}}return e},ji(B({form:A7.optional(),url:Be.optional()}),Oe(k(),Le()).optional())),L7=Ke({list:Be.optional(),cancel:Be.optional(),requests:Ke({sampling:Ke({createMessage:Be.optional()}).optional(),elicitation:Ke({create:Be.optional()}).optional()}).optional()}),D7=Ke({list:Be.optional(),cancel:Be.optional(),requests:Ke({tools:Ke({call:Be.optional()}).optional()}).optional()}),C7=B({experimental:Oe(k(),Be).optional(),sampling:B({context:Be.optional(),tools:Be.optional()}).optional(),elicitation:T7.optional(),roots:B({listChanged:$e().optional()}).optional(),tasks:L7.optional(),extensions:Oe(k(),Be).optional()}),z7=_t.extend({protocolVersion:k(),capabilities:C7,clientInfo:_R}),_7=et.extend({method:Y("initialize"),params:z7}),j7=B({experimental:Oe(k(),Be).optional(),logging:Be.optional(),completions:Be.optional(),prompts:B({listChanged:$e().optional()}).optional(),resources:B({subscribe:$e().optional(),listChanged:$e().optional()}).optional(),tools:B({listChanged:$e().optional()}).optional(),tasks:D7.optional(),extensions:Oe(k(),Be).optional()}),jR=tt.extend({protocolVersion:k(),capabilities:j7,serverInfo:_R,instructions:k().optional()}),N7=Wt.extend({method:Y("notifications/initialized"),params:Ht.optional()}),aS=et.extend({method:Y("ping"),params:_t.optional()}),R7=B({progress:be(),total:je(be()),message:je(k())}),x7=B({...Ht.shape,...R7.shape,progressToken:TR}),cS=Wt.extend({method:Y("notifications/progress"),params:x7}),U7=_t.extend({cursor:LR.optional()}),Va=et.extend({params:U7.optional()}),ec=tt.extend({nextCursor:LR.optional()}),M7=Ve(["working","input_required","completed","failed","cancelled"]),tc=B({taskId:k(),status:M7,ttl:De([be(),xa()]),createdAt:k(),lastUpdatedAt:k(),pollInterval:je(be()),statusMessage:je(k())}),nu=tt.extend({task:tc}),E7=Ht.merge(tc),sS=Wt.extend({method:Y("notifications/tasks/status"),params:E7}),hS=et.extend({method:Y("tasks/get"),params:_t.extend({taskId:k()})}),lS=tt.merge(tc),uS=et.extend({method:Y("tasks/result"),params:_t.extend({taskId:k()})}),j_e=tt.loose(),dS=Va.extend({method:Y("tasks/list")}),gS=ec.extend({tasks:J(tc)}),yS=et.extend({method:Y("tasks/cancel"),params:_t.extend({taskId:k()})}),K7=tt.merge(tc),NR=B({uri:k(),mimeType:je(k()),_meta:Oe(k(),Le()).optional()}),RR=NR.extend({text:k()}),bS=k().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),xR=NR.extend({blob:bS}),nc=Ve(["user","assistant"]),Vi=B({audience:J(nc).optional(),priority:be().min(0).max(1).optional(),lastModified:so.datetime({offset:!0}).optional()}),UR=B({...Qi.shape,...Qa.shape,uri:k(),description:je(k()),mimeType:je(k()),size:je(be()),annotations:Vi.optional(),_meta:je(Ke({}))}),G7=B({...Qi.shape,...Qa.shape,uriTemplate:k(),description:je(k()),mimeType:je(k()),annotations:Vi.optional(),_meta:je(Ke({}))}),q7=Va.extend({method:Y("resources/list")}),MR=ec.extend({resources:J(UR)}),J7=Va.extend({method:Y("resources/templates/list")}),ER=ec.extend({resourceTemplates:J(G7)}),mS=_t.extend({uri:k()}),B7=mS,H7=et.extend({method:Y("resources/read"),params:B7}),KR=tt.extend({contents:J(De([RR,xR]))}),GR=Wt.extend({method:Y("notifications/resources/list_changed"),params:Ht.optional()}),W7=mS,F7=et.extend({method:Y("resources/subscribe"),params:W7}),Z7=mS,X7=et.extend({method:Y("resources/unsubscribe"),params:Z7}),Y7=Ht.extend({uri:k()}),Q7=Wt.extend({method:Y("notifications/resources/updated"),params:Y7}),V7=B({name:k(),description:je(k()),required:je($e())}),e2=B({...Qi.shape,...Qa.shape,description:je(k()),arguments:je(J(V7)),_meta:je(Ke({}))}),t2=Va.extend({method:Y("prompts/list")}),qR=ec.extend({prompts:J(e2)}),n2=_t.extend({name:k(),arguments:Oe(k(),k()).optional()}),o2=et.extend({method:Y("prompts/get"),params:n2}),pS=B({type:Y("text"),text:k(),annotations:Vi.optional(),_meta:Oe(k(),Le()).optional()}),wS=B({type:Y("image"),data:bS,mimeType:k(),annotations:Vi.optional(),_meta:Oe(k(),Le()).optional()}),fS=B({type:Y("audio"),data:bS,mimeType:k(),annotations:Vi.optional(),_meta:Oe(k(),Le()).optional()}),i2=B({type:Y("tool_use"),name:k(),id:k(),input:Oe(k(),Le()),_meta:Oe(k(),Le()).optional()}),r2=B({type:Y("resource"),resource:De([RR,xR]),annotations:Vi.optional(),_meta:Oe(k(),Le()).optional()}),a2=UR.extend({type:Y("resource_link")}),vS=De([pS,wS,fS,a2,r2]),c2=B({role:nc,content:vS}),JR=tt.extend({description:k().optional(),messages:J(c2)}),BR=Wt.extend({method:Y("notifications/prompts/list_changed"),params:Ht.optional()}),s2=B({title:k().optional(),readOnlyHint:$e().optional(),destructiveHint:$e().optional(),idempotentHint:$e().optional(),openWorldHint:$e().optional()}),h2=B({taskSupport:Ve(["required","optional","forbidden"]).optional()}),HR=B({...Qi.shape,...Qa.shape,description:k().optional(),inputSchema:B({type:Y("object"),properties:Oe(k(),Be).optional(),required:J(k()).optional()}).catchall(Le()),outputSchema:B({type:Y("object"),properties:Oe(k(),Be).optional(),required:J(k()).optional()}).catchall(Le()).optional(),annotations:s2.optional(),execution:h2.optional(),_meta:Oe(k(),Le()).optional()}),l2=Va.extend({method:Y("tools/list")}),WR=ec.extend({tools:J(HR)}),ou=tt.extend({content:J(vS).default([]),structuredContent:Oe(k(),Le()).optional(),isError:$e().optional()}),N_e=ou.or(tt.extend({toolResult:Le()})),u2=eu.extend({name:k(),arguments:Oe(k(),Le()).optional()}),d2=et.extend({method:Y("tools/call"),params:u2}),FR=Wt.extend({method:Y("notifications/tools/list_changed"),params:Ht.optional()}),g2=B({autoRefresh:$e().default(!0),debounceMs:be().int().nonnegative().default(300)}),ZR=Ve(["debug","info","notice","warning","error","critical","alert","emergency"]),y2=_t.extend({level:ZR}),b2=et.extend({method:Y("logging/setLevel"),params:y2}),m2=Ht.extend({level:ZR,logger:k().optional(),data:Le()}),p2=Wt.extend({method:Y("notifications/message"),params:m2}),w2=B({name:k().optional()}),f2=B({hints:J(w2).optional(),costPriority:be().min(0).max(1).optional(),speedPriority:be().min(0).max(1).optional(),intelligencePriority:be().min(0).max(1).optional()}),v2=B({mode:Ve(["auto","required","none"]).optional()}),k2=B({type:Y("tool_result"),toolUseId:k().describe("The unique identifier for the corresponding tool call."),content:J(vS).default([]),structuredContent:B({}).loose().optional(),isError:$e().optional(),_meta:Oe(k(),Le()).optional()}),S2=Ka("type",[pS,wS,fS]),Ql=Ka("type",[pS,wS,fS,i2,k2]),P2=B({role:nc,content:De([Ql,J(Ql)]),_meta:Oe(k(),Le()).optional()}),I2=eu.extend({messages:J(P2),modelPreferences:f2.optional(),systemPrompt:k().optional(),includeContext:Ve(["none","thisServer","allServers"]).optional(),temperature:be().optional(),maxTokens:be().int(),stopSequences:J(k()).optional(),metadata:Be.optional(),tools:J(HR).optional(),toolChoice:v2.optional()}),XR=et.extend({method:Y("sampling/createMessage"),params:I2}),YR=tt.extend({model:k(),stopReason:je(Ve(["endTurn","stopSequence","maxTokens"]).or(k())),role:nc,content:S2}),QR=tt.extend({model:k(),stopReason:je(Ve(["endTurn","stopSequence","maxTokens","toolUse"]).or(k())),role:nc,content:De([Ql,J(Ql)])}),$2=B({type:Y("boolean"),title:k().optional(),description:k().optional(),default:$e().optional()}),O2=B({type:Y("string"),title:k().optional(),description:k().optional(),minLength:be().optional(),maxLength:be().optional(),format:Ve(["email","uri","date","date-time"]).optional(),default:k().optional()}),A2=B({type:Ve(["number","integer"]),title:k().optional(),description:k().optional(),minimum:be().optional(),maximum:be().optional(),default:be().optional()}),T2=B({type:Y("string"),title:k().optional(),description:k().optional(),enum:J(k()),default:k().optional()}),L2=B({type:Y("string"),title:k().optional(),description:k().optional(),oneOf:J(B({const:k(),title:k()})),default:k().optional()}),D2=B({type:Y("string"),title:k().optional(),description:k().optional(),enum:J(k()),enumNames:J(k()).optional(),default:k().optional()}),C2=De([T2,L2]),z2=B({type:Y("array"),title:k().optional(),description:k().optional(),minItems:be().optional(),maxItems:be().optional(),items:B({type:Y("string"),enum:J(k())}),default:J(k()).optional()}),_2=B({type:Y("array"),title:k().optional(),description:k().optional(),minItems:be().optional(),maxItems:be().optional(),items:B({anyOf:J(B({const:k(),title:k()}))}),default:J(k()).optional()}),j2=De([z2,_2]),N2=De([D2,C2,j2]),R2=De([N2,$2,O2,A2]),x2=eu.extend({mode:Y("form").optional(),message:k(),requestedSchema:B({type:Y("object"),properties:Oe(k(),R2),required:J(k()).optional()})}),U2=eu.extend({mode:Y("url"),message:k(),elicitationId:k(),url:k().url()}),M2=De([x2,U2]),VR=et.extend({method:Y("elicitation/create"),params:M2}),E2=Ht.extend({elicitationId:k()}),K2=Wt.extend({method:Y("notifications/elicitation/complete"),params:E2}),ex=tt.extend({action:Ve(["accept","decline","cancel"]),content:Ja((e)=>e===null?void 0:e,Oe(k(),De([k(),be(),$e(),J(k())])).optional())}),G2=B({type:Y("ref/resource"),uri:k()}),q2=B({type:Y("ref/prompt"),name:k()}),J2=_t.extend({ref:De([q2,G2]),argument:B({name:k(),value:k()}),context:B({arguments:Oe(k(),k()).optional()}).optional()}),B2=et.extend({method:Y("completion/complete"),params:J2}),tx=tt.extend({completion:Ke({values:J(k()).max(100),total:je(be().int()),hasMore:je($e())})}),H2=B({uri:k().startsWith("file://"),name:k().optional(),_meta:Oe(k(),Le()).optional()}),W2=et.extend({method:Y("roots/list"),params:_t.optional()}),F2=tt.extend({roots:J(H2)}),Z2=Wt.extend({method:Y("notifications/roots/list_changed"),params:Ht.optional()}),R_e=De([aS,_7,B2,b2,o2,t2,q7,J7,H7,F7,X7,d2,l2,hS,uS,dS,yS]),x_e=De([rS,cS,N7,Z2,sS]),U_e=De([iS,YR,QR,ex,F2,lS,gS,nu]),M_e=De([aS,XR,VR,W2,hS,uS,dS,yS]),E_e=De([rS,cS,p2,Q7,GR,FR,BR,sS,K2]),K_e=De([iS,jR,tx,JR,qR,MR,ER,KR,ou,WR,lS,gS,nu])});var X2;var iu=d(()=>{X2=Symbol("Let zodToJsonSchema decide on which parser to use")});var kS=d(()=>{iu()});var Ft=()=>{};var SS=d(()=>{qe()});var PS=()=>{};var ru=d(()=>{qe()});var IS=d(()=>{qe()});var $S=()=>{};var OS=d(()=>{qe()});var AS=d(()=>{qe();Ft()});var TS=d(()=>{qe()});var vje;var au=d(()=>{vje=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});var cu=d(()=>{qe();au();ru();Ft()});var LS=d(()=>{qe();cu();Ft()});var DS=d(()=>{Ft()});var su=d(()=>{qe()});var CS=d(()=>{qe();su()});var zS=()=>{};var _S=d(()=>{qe()});var jS=d(()=>{qe();Ft()});var NS=d(()=>{qe()});var RS=d(()=>{qe()});var xS=d(()=>{qe()});var US=d(()=>{qe()});var MS=d(()=>{Ft()});var ES=d(()=>{Ft()});var KS=d(()=>{qe()});var GS=d(()=>{Ft();SS();PS();ru();IS();$S();OS();AS();TS();LS();DS();CS();zS();_S();jS();NS();RS();cu();xS();au();US();MS();su();ES();KS()});var qe=d(()=>{iu();GS();Ft()});var nx=()=>{};var qS=d(()=>{qe();kS();Ft()});var ox=d(()=>{qS();iu();kS();qe();nx();Ft();SS();PS();ru();IS();$S();OS();AS();TS();LS();DS();CS();zS();_S();jS();NS();RS();KS();cu();xS();au();US();MS();su();ES();GS();qS()});var rx=d(()=>{Yl();ox()});var cx=d(()=>{Yl();Eo();rx()});var rc=q((lx)=>{Object.defineProperty(lx,"__esModule",{value:!0});lx.regexpCode=lx.getEsmExportName=lx.getProperty=lx.safeStringify=lx.stringify=lx.strConcat=lx.addCodeArg=lx.str=lx._=lx.nil=lx._Code=lx.Name=lx.IDENTIFIER=lx._CodeOrName=void 0;class hu{}lx._CodeOrName=hu;lx.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class er extends hu{constructor(e){super();if(!lx.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}}}lx.Name=er;class rn extends hu{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 er)t[n.str]=(t[n.str]||0)+1;return t},{})}}lx._Code=rn;lx.nil=new rn("");function sx(e,...t){let n=[e[0]],i=0;while(i<t.length)BS(n,t[i]),n.push(e[++i]);return new rn(n)}lx._=sx;var JS=new rn("+");function hx(e,...t){let n=[ic(e[0])],i=0;while(i<t.length)n.push(JS),BS(n,t[i]),n.push(JS,ic(e[++i]));return aee(n),new rn(n)}lx.str=hx;function BS(e,t){if(t instanceof rn)e.push(...t._items);else if(t instanceof er)e.push(t);else e.push(hee(t))}lx.addCodeArg=BS;function aee(e){let t=1;while(t<e.length-1){if(e[t]===JS){let n=cee(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function cee(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof er||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 er))return`"${e}${t.slice(1)}`;return}function see(e,t){return t.emptyStr()?e:e.emptyStr()?t:hx`${e}${t}`}lx.strConcat=see;function hee(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ic(Array.isArray(e)?e.join(","):e)}function lee(e){return new rn(ic(e))}lx.stringify=lee;function ic(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}lx.safeStringify=ic;function uee(e){return typeof e=="string"&&lx.IDENTIFIER.test(e)?new rn(`.${e}`):sx`[${e}]`}lx.getProperty=uee;function dee(e){if(typeof e=="string"&&lx.IDENTIFIER.test(e))return new rn(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}lx.getEsmExportName=dee;function gee(e){return new rn(e.toString())}lx.regexpCode=gee});var ZS=q((yx)=>{Object.defineProperty(yx,"__esModule",{value:!0});yx.ValueScope=yx.ValueScopeName=yx.Scope=yx.varKinds=yx.UsedValueState=void 0;var Pt=rc();class dx extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var uu;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(uu||(yx.UsedValueState=uu={}));yx.varKinds={const:new Pt.Name("const"),let:new Pt.Name("let"),var:new Pt.Name("var")};class WS{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Pt.Name?e:this.name(e)}name(e){return new Pt.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}}}yx.Scope=WS;class FS extends Pt.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=Pt._`.${new Pt.Name(t)}[${n}]`}}yx.ValueScopeName=FS;var Oee=Pt._`\n`;class gx extends WS{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Oee:Pt.nil}}get(){return this._scope}name(e){return new FS(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,r=(n=t.key)!==null&&n!==void 0?n:t.ref,c=this._values[o];if(c){let l=c.get(r);if(l)return l}else c=this._values[o]=new Map;c.set(r,i);let s=this._scope[o]||(this._scope[o]=[]),h=s.length;return s[h]=t.ref,i.setValue(t,{property:o,itemIndex:h}),i}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 Pt._`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,(i)=>{if(i.value===void 0)throw Error(`CodeGen: name "${i}" has no value`);return i.value.code},t,n)}_reduceValues(e,t,n={},i){let o=Pt.nil;for(let r in e){let c=e[r];if(!c)continue;let s=n[r]=n[r]||new Map;c.forEach((h)=>{if(s.has(h))return;s.set(h,uu.Started);let l=t(h);if(l){let u=this.opts.es5?yx.varKinds.var:yx.varKinds.const;o=Pt._`${o}${u} ${h} = ${l};${this.opts._n}`}else if(l=i===null||i===void 0?void 0:i(h))o=Pt._`${o}${l}${this.opts._n}`;else throw new dx(h);s.set(h,uu.Completed)})}return o}}yx.ValueScope=gx});var ye=q((It)=>{Object.defineProperty(It,"__esModule",{value:!0});It.or=It.and=It.not=It.CodeGen=It.operators=It.varKinds=It.ValueScopeName=It.ValueScope=It.Scope=It.Name=It.regexpCode=It.stringify=It.getProperty=It.nil=It.strConcat=It.str=It._=void 0;var pe=rc(),an=ZS(),ho=rc();Object.defineProperty(It,"_",{enumerable:!0,get:function(){return ho._}});Object.defineProperty(It,"str",{enumerable:!0,get:function(){return ho.str}});Object.defineProperty(It,"strConcat",{enumerable:!0,get:function(){return ho.strConcat}});Object.defineProperty(It,"nil",{enumerable:!0,get:function(){return ho.nil}});Object.defineProperty(It,"getProperty",{enumerable:!0,get:function(){return ho.getProperty}});Object.defineProperty(It,"stringify",{enumerable:!0,get:function(){return ho.stringify}});Object.defineProperty(It,"regexpCode",{enumerable:!0,get:function(){return ho.regexpCode}});Object.defineProperty(It,"Name",{enumerable:!0,get:function(){return ho.Name}});var pu=ZS();Object.defineProperty(It,"Scope",{enumerable:!0,get:function(){return pu.Scope}});Object.defineProperty(It,"ValueScope",{enumerable:!0,get:function(){return pu.ValueScope}});Object.defineProperty(It,"ValueScopeName",{enumerable:!0,get:function(){return pu.ValueScopeName}});Object.defineProperty(It,"varKinds",{enumerable:!0,get:function(){return pu.varKinds}});It.operators={GT:new pe._Code(">"),GTE:new pe._Code(">="),LT:new pe._Code("<"),LTE:new pe._Code("<="),EQ:new pe._Code("==="),NEQ:new pe._Code("!=="),NOT:new pe._Code("!"),OR:new pe._Code("||"),AND:new pe._Code("&&"),ADD:new pe._Code("+")};class lo{optimizeNodes(){return this}optimizeNames(e,t){return this}}class mx extends lo{constructor(e,t,n){super();this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?an.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=nr(this.rhs,e,t);return this}get names(){return this.rhs instanceof pe._CodeOrName?this.rhs.names:{}}}class QS extends lo{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 pe.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=nr(this.rhs,e,t),this}get names(){let e=this.lhs instanceof pe.Name?{}:{...this.lhs.names};return mu(e,this.rhs)}}class px extends QS{constructor(e,t,n,i){super(e,n,i);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class wx extends lo{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class fx extends lo{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class vx extends lo{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class kx extends lo{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=nr(this.code,e,t),this}get names(){return this.code instanceof pe._CodeOrName?this.code.names:{}}}class wu extends lo{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,i=n.length;while(i--){let o=n[i];if(o.optimizeNames(e,t))continue;Dee(e,o.names),n.splice(i,1)}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Ko(e,t.names),{})}}class uo extends wu{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Sx extends wu{}class ac extends uo{}ac.kind="else";class xn extends uo{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 ac(n):n}if(t){if(e===!1)return t instanceof xn?t:t.nodes;if(this.nodes.length)return this;return new xn(Ax(e),t instanceof xn?[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=nr(this.condition,e,t),this}get names(){let e=super.names;if(mu(e,this.condition),this.else)Ko(e,this.else.names);return e}}xn.kind="if";class tr extends uo{}tr.kind="for";class Px extends tr{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=nr(this.iteration,e,t),this}get names(){return Ko(super.names,this.iteration.names)}}class Ix extends tr{constructor(e,t,n,i){super();this.varKind=e,this.name=t,this.from=n,this.to=i}render(e){let t=e.es5?an.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${t} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=mu(super.names,this.from);return mu(e,this.to)}}class XS extends tr{constructor(e,t,n,i){super();this.loop=e,this.varKind=t,this.name=n,this.iterable=i}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=nr(this.iterable,e,t),this}get names(){return Ko(super.names,this.iterable.names)}}class du extends uo{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)}}du.kind="func";class gu extends wu{render(e){return"return "+super.render(e)}}gu.kind="return";class $x extends uo{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,i;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(i=this.finally)===null||i===void 0||i.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)Ko(e,this.catch.names);if(this.finally)Ko(e,this.finally.names);return e}}class yu extends uo{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}yu.kind="catch";class bu extends uo{render(e){return"finally"+super.render(e)}}bu.kind="finally";class Ox{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
7255
+ -d '{"event":"hello.world","level":"info","message":"first webhook event"}'`}]}]}]}});var vN;var kN=d(()=>{fN();vN={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:H,dashboard:{slug:"webhook-events",iconKey:"webhook-events",intakeSourceId:"webhook-events"}}});var sl,SN,GCe,qCe,Ni,JCe,BCe,C8,z8,_8,HCe;var PN=d(()=>{w_();k_();I_();A_();D_();__();R_();M_();G_();B_();F_();Y_();ej();oj();aj();hj();dj();bj();wj();kj();Ij();Aj();Dj();_j();Rj();Mj();Gj();Bj();Fj();Yj();eN();oN();aN();hN();dN();bN();wN();kN();sl=[p_,v_,P_,O_,L_,z_,N_,U_,K_,J_,W_,X_,V_,nj,rj,sj,uj,yj,pj,vj,Pj,Oj,Lj,zj,Nj,Uj,Kj,Jj,Wj,Xj,nN,Vj,rN,sN,uN,yN,pN,vN],SN=sl,GCe=Object.fromEntries(SN.map((e)=>[e.id,e.sensitiveFields??[]])),qCe=Object.fromEntries(SN.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]]}))),Ni=["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"],JCe=sl.map((e)=>({id:e.id,name:e.name,capabilities:e.capabilities})),BCe=Object.fromEntries(sl.map((e)=>[e.id,{name:e.name,setupSkill:e.setupSkill}])),C8={cloudflare:yv,cloudwatch:kv,convex:Iv,digital_ocean:Lv,fly_io:Nv,gcp:Uv,plain:Yv,posthog:tk,render:ck,sentry_platform:dk,vercel:fk},z8={cloudflare:bv,cloudwatch:Sv,convex:Ov,digital_ocean:Cv,fly_io:xv,gcp:Mv,plain:Vv,posthog:nk,render:hk,vercel:kk},_8={cloudflare:mv,cloudflare_workers:pv,cloudwatch:Pv,convex:$v,datadog:Av,daytona:Tv,digital_ocean:Dv,fluent_bit:jv,fly_io:Rv,grafana_alloy:Kv,e2b:zv,elastic_cloud:_v,gcp:Ev,inngest:Gv,langchain:qv,mastra:Jv,neon:Bv,netlify:Hv,openrouter:Wv,otel:Fv,otel_collector:Zv,otel_metrics:Xv,plain:Qv,posthog:ok,posthog_sdk:ik,porter:ek,prometheus:rk,railway:ak,render:sk,respan:lk,sentry:uk,sentry_platform:gk,supabase:yk,temporal:bk,trigger_dev:mk,vector:pk,vercel:vk,webhook_events:Sk},HCe=sl.map((e)=>({sourceId:e.id,name:e.name,capabilities:e.capabilities,setupAuthModes:e.auth,deliveryModes:e.delivery,hasDashboardMetadata:Boolean(e.dashboard),hasManagedFlow:Boolean(C8[e.id]),hasConnectionlessFlow:Boolean(_8[e.id]),hasStreamSelector:Boolean(z8[e.id]),lifecycleEligible:e.lifecycleEligible??!1,lifecycleSkipReason:e.lifecycleSkipReason}))});var IN=d(()=>{PN()});var Pk=d(()=>{b_();IN()});var $N,Ik,j8,hl,N8,ON,$k,Wa,Fa,AN,TN,LN,ll,DN,CN,Ri,zN,_N,xi,jN,NN,ul,RN,xN,dl,UN,MN,gl,EN,KN,yl,GN,qN,bl,JN,BN,ml,HN,WN,pl,FN,ZN,wl,R8;var Ok=d(()=>{Pk();me();Ce();$N=Ni,Ik=a.enum($N),j8=a.enum(["pending","provisioning","active","error"]),hl=a.enum(["managed","connectionless"]),N8=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.")}),ON=a.object({id:a.string().describe("Data source type identifier."),name:a.string().describe("Human-readable display name."),modes:a.array(hl).describe("Setup modes this source supports. `managed` sources take vendor credentials; `connectionless` sources mint a keyed intake endpoint."),metadataFields:a.array(N8).describe("Fields required in the metadata object when creating a managed instance. Empty for connectionless-only sources."),setupSkill:a.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),$k=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 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`.")}),Wa=a.object({id:a.string().uuid(),instanceId:a.string().uuid().describe("Root instance ID. Every stream roots on exactly one data source instance."),displayName:a.string(),config:a.record(a.string(),a.unknown()),status:j8,errorMessage:a.string().nullable(),enabled:a.boolean().describe("Whether the stream is currently ingesting. Independent of provisioning status: a paused stream stays configured but stops accepting new data."),createdAt:a.string().datetime(),endpointCards:a.array($k).optional().describe("Server-computed endpoint card(s) for this stream's delivery key — where to point the sender. Present only for streams that carry their own intake key.")}),Fa=a.object({id:a.string().uuid(),dataSourceType:Ik,mode:hl,name:a.string().nullable().describe("Display name. For connectionless instances this falls back to the stream's name when no explicit name is set."),streamCount:a.number().int(),createdAt:a.string().datetime()}),AN=Fa.extend({streams:a.array(Wa).describe("The instance's live streams, newest first.")}),TN=a.object({}),LN=a.object({types:a.array(ON)}),ll=I({operationId:"dataSources.listTypes",description:"List all supported data source types with their setup modes and metadata requirements.",backend:"api",route:{method:"GET",path:"/data-sources/types",tags:["Data Sources"]},input:TN,output:LN,pagination:"none",async:"sync"}),DN=a.object({projectId:a.string().uuid().optional().describe("Project to list instances for. Auto-filled from SDK context when omitted."),dataSourceType:Ik.optional().describe("Filter instances by data source type.")}),CN=a.object({instances:a.array(Fa)}),Ri=I({operationId:"dataSources.listInstances",description:"List data source instances within one project.",backend:"api",route:{method:"GET",path:"/data-sources/instances",tags:["Data Sources"]},input:DN,output:CN,pagination:"none",async:"sync"}),zN=a.object({projectId:a.string().uuid().optional().describe("Project to create the instance in. Auto-filled from SDK context when omitted."),dataSourceType:Ik.describe("Data source type identifier."),mode:hl.optional().describe("Setup mode. Defaults to `managed` when metadata is provided, otherwise `connectionless`. Must be a mode the source supports (see `modes` on the type catalog)."),name:a.string().optional().describe("Optional human-readable name for this instance."),metadata:a.record(a.string(),a.unknown()).optional().describe("Vendor credentials and configuration for managed setup. Fields vary by data source type (see `metadataFields` on the type catalog). Required for managed mode; must be omitted for connectionless mode.")}),_N=a.object({instance:Fa.describe("The created instance."),streamId:a.string().uuid().optional().describe("ID of the stream created alongside the instance. Present for connectionless instances (which always mint their keyed stream) and for managed sources that auto-provision a default stream."),publicKey:a.string().optional().describe("Intake key minted for the instance. Store this securely — it is only shown once. Present for connectionless instances and for managed sources that ingest through a Sazabi endpoint."),endpointCards:a.array($k).optional().describe("Server-computed endpoint card(s) for the minted key — where to point the sender. Present for connectionless instances.")}),xi=I({operationId:"dataSources.createInstance",description:"Create a data source instance. Managed mode takes vendor credentials in `metadata`, validates them, and provisions delivery behind the instance. Connectionless mode mints the instance plus a keyed stream and returns the intake key and endpoint card(s) to point the sender at.",backend:"api",route:{method:"POST",path:"/data-sources/instances",successStatus:201,tags:["Data Sources"]},input:zN,output:_N,pagination:"none",async:"sync"}),jN=a.object({instanceId:a.string().uuid().describe("Instance ID to fetch.")}),NN=a.object({instance:AN}),ul=I({operationId:"dataSources.getInstance",description:"Get one data source instance by ID, including its streams and their endpoint card(s).",backend:"api",route:{method:"GET",path:"/data-sources/instances/{instanceId}",tags:["Data Sources"]},input:jN,output:NN,pagination:"none",async:"sync"}),RN=a.object({instanceId:a.string().uuid().describe("Instance ID to update."),name:a.string().min(1).optional().describe("New display name for the instance."),enabled:a.boolean().optional().describe("Pause (`false`) or resume (`true`) ingestion for all of the instance's streams. Reversible; never deletes anything.")}),xN=a.object({instance:Fa}),dl=I({operationId:"dataSources.updateInstance",description:"Update a data source instance: rename it and/or pause or resume ingestion across its streams.",backend:"api",route:{method:"PATCH",path:"/data-sources/instances/{instanceId}",tags:["Data Sources"]},input:RN,output:xN,pagination:"none",async:"sync"}),UN=a.object({instanceId:a.string().uuid().describe("Instance ID to delete.")}),MN=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.")}),gl=I({operationId:"dataSources.deleteInstance",description:"Delete a data source instance. Tombstones the instance and its streams, deactivates their intake keys (already-ingested data is preserved with its attribution), and runs vendor-side cleanup for managed instances when the source supports it.",backend:"api",route:{method:"DELETE",path:"/data-sources/instances/{instanceId}",successStatus:200,tags:["Data Sources"]},input:UN,output:MN,pagination:"none",async:"sync"}),EN=a.object({instanceId:a.string().uuid().describe("Instance ID to list streams for."),enabled:a.boolean().optional().describe("Optional filter on stream ingestion state. Omit to list all streams; pass true for only enabled streams or false for only paused streams.")}),KN=a.object({streams:a.array(Wa)}),yl=I({operationId:"dataSources.listStreams",description:"List the streams that belong to a data source instance.",backend:"api",route:{method:"GET",path:"/data-sources/instances/{instanceId}/streams",tags:["Data Sources"]},input:EN,output:KN,pagination:"none",async:"sync"}),GN=a.object({instanceId:a.string().uuid().describe("Instance ID to create the stream under."),displayName:a.string().min(1).describe("Resource name, e.g. service or app name."),config:a.record(a.string(),a.unknown()).optional().describe("Platform-specific stream configuration.")}),qN=a.object({streamId:a.string().uuid().describe("ID of the created stream.")}),bl=I({operationId:"dataSources.createStream",description:"Create a new stream under a managed data source instance. Triggers async provisioning; poll the stream to track it. Connectionless instances are single-stream — create another instance instead.",backend:"api",route:{method:"POST",path:"/data-sources/instances/{instanceId}/streams",successStatus:201,tags:["Data Sources"]},input:GN,output:qN,pagination:"none",async:"sync"}),JN=a.object({streamId:a.string().uuid().describe("Stream ID to fetch.")}),BN=a.object({stream:Wa}),ml=I({operationId:"dataSources.getStream",description:"Get one data source stream by ID. Use to poll provisioning status.",backend:"api",route:{method:"GET",path:"/data-sources/streams/{streamId}",tags:["Data Sources"]},input:JN,output:BN,pagination:"none",async:"sync"}),HN=a.object({streamId:a.string().uuid().describe("Stream ID to update."),displayName:a.string().min(1).optional().describe("New display name for the stream."),enabled:a.boolean().optional().describe("Pause (`false`) or resume (`true`) ingestion for this stream. Reversible; never deletes anything.")}),WN=a.object({stream:Wa}),pl=I({operationId:"dataSources.updateStream",description:"Update a data source stream: rename it and/or pause or resume its ingestion.",backend:"api",route:{method:"PATCH",path:"/data-sources/streams/{streamId}",tags:["Data Sources"]},input:HN,output:WN,pagination:"none",async:"sync"}),FN=a.object({streamId:a.string().uuid().describe("Stream ID to delete.")}),ZN=a.object({success:a.boolean()}),wl=I({operationId:"dataSources.deleteStream",description:"Delete a data source stream. Tombstones the stream and deactivates its intake key. Deleting a connectionless instance's only stream tombstones the instance too.",backend:"api",route:{method:"DELETE",path:"/data-sources/streams/{streamId}",successStatus:204,tags:["Data Sources"]},input:FN,output:ZN,pagination:"none",async:"sync"}),R8={listTypes:ll.contract,listInstances:Ri.contract,createInstance:xi.contract,getInstance:ul.contract,updateInstance:dl.contract,deleteInstance:gl.contract,listStreams:yl.contract,createStream:bl.contract,getStream:ml.contract,updateStream:pl.contract,deleteStream:wl.contract}});var x8,Ak,U8,M8,E8,K8,G8,XN,q8,J8,YN,B8,H8,QN,W8,F8,VN;var e1=d(()=>{me();Ce();x8=["slack","github","linear","pagerduty","victorops","rootly","incident_io","webhook","teams","bitbucket","jira"],Ak=a.enum(x8),U8=a.enum(["oauth","app_installation","api_key"]),M8=a.enum(["alert_routing","inbound_webhooks","messaging","code_search","health_check"]),E8=a.enum(["pending","connected","error","revoked"]),K8=a.enum(["healthy","unhealthy","unknown"]),G8=a.object({id:Ak.describe("Integration provider identifier."),name:a.string().describe("Human-readable display name."),description:a.string().describe("Short description of the provider."),authType:U8.describe("Auth flow used to connect this provider."),capabilities:a.array(M8).describe("Capabilities the provider exposes once connected."),connectionCount:a.number().int().describe("Number of active connections for this provider in the organization, including error-status connections that need attention.")}),XN=a.object({id:a.string().uuid(),provider:Ak,displayName:a.string().nullable(),status:E8,isActive:a.boolean().describe("Whether this connection counts as connected (status 'connected' or 'error'). An error-status connection is the organization's connection — broken, not absent."),needsAttention:a.boolean().describe("Whether the connection should surface a reconnect prompt (status 'error' or health status 'unhealthy')."),metadata:a.record(a.string(),a.unknown()).describe("Non-secret provider metadata (e.g. workspace/team names)."),healthStatus:K8,healthMessage:a.string().nullable(),healthCheckedAt:a.string().datetime().nullable(),healthConsecutiveFailures:a.number().int(),connectedBy:a.string().nullable(),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),q8=a.object({organizationId:a.string().min(1).optional().describe("Organization to list providers for. Auto-filled from CLI and SDK context when omitted.")}),J8=a.object({providers:a.array(G8)}),YN=I({operationId:"integrations.listProviders",description:"List supported integration providers and how many connections the organization has for each.",backend:"api",route:{method:"GET",path:"/integrations/providers",tags:["Integrations"]},input:q8,output:J8,pagination:"none",async:"sync"}),B8=a.object({organizationId:a.string().min(1).optional().describe("Organization to list connections for. Auto-filled from CLI and SDK context when omitted."),provider:Ak.optional().describe("Filter connections by provider.")}),H8=a.object({connections:a.array(XN)}),QN=I({operationId:"integrations.listConnections",description:"List integration connections and their connection state for the organization.",backend:"api",route:{method:"GET",path:"/integrations/connections",tags:["Integrations"]},input:B8,output:H8,pagination:"none",async:"sync"}),W8=a.object({organizationId:a.string().min(1).optional().describe("Organization the connection belongs to. Auto-filled from CLI and SDK context when omitted."),connectionId:a.string().uuid().describe("Connection ID to fetch.")}),F8=a.object({connection:XN}),VN=I({operationId:"integrations.getConnection",description:"Get one integration connection by ID (non-secret config only).",backend:"api",route:{method:"GET",path:"/integrations/connections/{connectionId}",tags:["Integrations"]},input:W8,output:F8,pagination:"none",async:"sync"})});var on,Z8,X8,t1,fl,vl,n1,Tk,o1,Lk,i1,r1,Y8,Q8,a1,c1,s1,h1,l1,u1,d1,g1,y1,b1,m1,p1,w1,f1,v1,Ui,kl,Sl,Pl,Il,$l,Ol,Al,Tl,Ll,Dl,V8;var Dk=d(()=>{me();Ce();on=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),description:a.string().nullable(),status:a.enum(["open","resolved","ignored"]),severity:a.enum(["low","medium","high","critical"]),statusComponentId:a.string().uuid().nullable(),createdAt:a.string().datetime(),resolvedAt:a.string().datetime().nullable(),mutedAt:a.string().datetime().nullable(),muteHitCount:a.number().int().nonnegative(),lastActivityAt:a.string().datetime().nullable(),lastDeliveredAt:a.string().datetime().nullable(),locked:a.boolean(),redacted:a.boolean()}),Z8=a.object({channelId:a.string().nullable(),channelName:a.string().nullable(),threadTs:a.string().nullable(),permalink:a.string().nullable(),workspaceName:a.string().nullable()}),X8=on.extend({slackChannels:a.array(Z8)}),t1=on.extend({delivery:a.record(a.string(),a.unknown()).nullable().optional()}),fl=a.object({projectId:a.string().uuid().optional().describe("Project to create the issue in. Auto-filled from CLI and SDK context when omitted."),name:a.string().trim().min(1).optional().describe("Stable issue name for indexing and mute matching. When omitted, the name is derived from contentMdx."),contentMdx:a.string().trim().min(1,"contentMdx cannot be empty").describe("Safe Sazabi MDX document for the issue body (impact, root cause, remediation, evidence)."),severity:a.enum(["low","medium","high","critical"]).default("medium").describe("Issue severity used for prioritization and triage."),statusComponentId:a.string().uuid().optional().describe("Optional status component ID to link to the issue."),statusStartedAt:a.string().datetime({offset:!0}).optional().describe("Optional ISO timestamp for when the linked status-page incident began.")}),vl=fl.superRefine((e,t)=>{if(e.statusStartedAt&&!e.statusComponentId)t.addIssue({code:"custom",path:["statusStartedAt"],message:"statusStartedAt requires statusComponentId."})}),n1=a.object({issue:on,duplicateIssueId:a.string().uuid().optional().describe("Present when creation reused an existing open issue instead of creating a new one.")}),Tk=a.object({projectId:a.string().uuid().optional().describe("Project to list issues for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of issues to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:a.enum(["open","resolved","ignored"]).optional().describe("Filter by issue status."),severity:a.enum(["low","medium","high","critical"]).optional().describe("Filter by severity."),statusComponentId:a.string().uuid().optional().describe("Filter by status component ID.")}),o1=a.object({issues:a.array(on),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Lk=Tk.extend({name:a.string().trim().optional().describe("Case-insensitive partial match on issue name."),includeDeliveryMetadata:a.union([a.boolean(),a.stringbool()]).default(!1).describe("When true, include raw delivery metadata in each issue.")}),i1=a.object({issues:a.array(t1),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),r1=Lk.omit({limit:!0,cursor:!0,includeDeliveryMetadata:!0}),Y8=a.object({open:a.number().int().nonnegative(),resolved:a.number().int().nonnegative(),ignored:a.number().int().nonnegative()}),Q8=a.object({low:a.number().int().nonnegative(),medium:a.number().int().nonnegative(),high:a.number().int().nonnegative(),critical:a.number().int().nonnegative()}),a1=a.object({total:a.number().int().nonnegative(),byStatus:Y8,bySeverity:Q8,filters:a.object({name:a.string().nullable(),status:a.enum(["open","resolved","ignored"]).nullable(),severity:a.enum(["low","medium","high","critical"]).nullable(),statusComponentId:a.string().uuid().nullable()})}),c1=a.object({issueId:a.string().uuid().describe("Issue ID to retrieve.")}),s1=a.object({issue:X8}),h1=a.object({issueId:a.string().uuid().describe("Issue ID to resolve."),statusResolvedAt:a.string().datetime({offset:!0}).optional().describe("Optional ISO timestamp for when the linked status-page incident ended.")}),l1=a.object({issue:on}),u1=a.object({issueId:a.string().uuid().describe("Issue ID to ignore.")}),d1=a.object({issue:on}),g1=a.object({issueId:a.string().uuid().describe("Issue ID to reopen.")}),y1=a.object({issue:on}),b1=a.object({issueId:a.string().uuid().describe("Issue ID to reassign and reopen."),targetComponentId:a.string().uuid().describe("Active canonical component that will own the reopened issue.")}),m1=a.object({issue:on,sourceComponentId:a.string().uuid(),targetComponentId:a.string().uuid()}),p1=a.object({issueId:a.string().uuid().describe("Issue ID to mute.")}),w1=a.object({issue:on}),f1=a.object({issueId:a.string().uuid().describe("Issue ID to unmute.")}),v1=a.object({issue:on}),Ui=I({operationId:"issues.create",description:"Create an issue in a project, returning an existing open issue when root-cause deduplication finds a match.",backend:"api",route:{method:"POST",path:"/issues",tags:["Issues"],successStatus:201},input:vl,output:n1,pagination:"none",async:"sync"}),kl=I({operationId:"issues.list",description:"List issues in a project, optionally filtered by status and severity.",backend:"api",route:{method:"GET",path:"/issues",tags:["Issues"]},input:Tk,output:o1,pagination:"cursor",async:"sync"}),Sl=I({operationId:"issues.search",description:"Search issues in a project by name, status, and severity.",backend:"api",route:{method:"GET",path:"/issues/search",tags:["Issues"]},input:Lk,output:i1,pagination:"cursor",async:"sync"}),Pl=I({operationId:"issues.count",description:"Count issues in a project with status and severity breakdowns.",backend:"api",route:{method:"GET",path:"/issues/count",tags:["Issues"]},input:r1,output:a1,pagination:"none",async:"sync"}),Il=I({operationId:"issues.get",description:"Get a single issue by ID.",backend:"api",route:{method:"GET",path:"/issues/{issueId}",tags:["Issues"]},input:c1,output:s1,pagination:"none",async:"sync"}),$l=I({operationId:"issues.resolve",description:"Resolve an open issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/resolve",tags:["Issues"]},input:h1,output:l1,pagination:"none",async:"sync"}),Ol=I({operationId:"issues.ignore",description:"Ignore an open issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/ignore",tags:["Issues"]},input:u1,output:d1,pagination:"none",async:"sync"}),Al=I({operationId:"issues.reopen",description:"Reopen a resolved or ignored issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/reopen",tags:["Issues"]},input:g1,output:y1,pagination:"none",async:"sync"}),Tl=I({operationId:"issues.reassignAndReopen",description:"Atomically reassign a resolved or ignored issue to an active component and reopen it.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/reassign-and-reopen",tags:["Issues"]},input:b1,output:m1,pagination:"none",async:"sync"}),Ll=I({operationId:"issues.mute",description:"Mute an issue, suppressing future re-fires without changing status.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/mute",tags:["Issues"]},input:p1,output:w1,pagination:"none",async:"sync"}),Dl=I({operationId:"issues.unmute",description:"Unmute an issue, preserving its current status.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/unmute",tags:["Issues"]},input:f1,output:v1,pagination:"none",async:"sync"}),V8={count:Pl.contract,create:Ui.contract,list:kl.contract,search:Sl.contract,get:Il.contract,resolve:$l.contract,ignore:Ol.contract,reopen:Al.contract,reassignAndReopen:Tl.contract,mute:Ll.contract,unmute:Dl.contract}});var Ck,k1,Cl,zl,S1,P1,I1,$1,_l,zk,O1,A1,T1,L1,D1,C1,z1,_1,j1,N1,R1,x1,Mi,Ei,Ki,Gi,qi,jl,Nl,Rl,xl,Ul,e5,t5;var _k=d(()=>{me();Ce();Ck=/^[a-zA-Z0-9\s\-_]+$/,k1=a.object({id:a.string().uuid(),name:a.string(),expiresAt:a.string().datetime().nullable(),lastUsedAt:a.string().datetime().nullable(),createdAt:a.string().datetime()}),Cl=k1.extend({projectId:a.string().uuid(),dataSourceConnectionId:a.string().uuid().nullable().describe("Linked data source connection ID when this key is scoped to one data source."),deactivatedAt:a.string().datetime().nullable().describe("Timestamp when this public key was deactivated.")}),zl=k1.extend({projectId:a.string().uuid().nullable()}),S1=a.object({projectId:a.string().uuid().optional().describe("Project to list keys for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of keys to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),P1=a.object({publicKeys:a.array(Cl),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),I1=a.object({secretKeys:a.array(zl),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),$1=a.object({projectId:a.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted."),keyId:a.string().uuid().describe("Key ID to fetch.")}),_l=a.object({publicKey:Cl}),zk=a.object({secretKey:zl}),O1=a.object({publicKey:Cl.extend({value:a.string()})}),A1=a.object({projectId:a.string().uuid().optional().describe("Project to ensure the log forwarding key for. Auto-filled from CLI and SDK context when omitted.")}),T1=a.object({secretKey:zl.extend({value:a.string()})}),L1=a.object({projectId:a.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted."),keyId:a.string().uuid().describe("Key ID to update."),name:a.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(Ck,"Name can only contain letters, numbers, spaces, hyphens, and underscores").optional().describe("New human-readable name for the key."),expiresAt:a.string().datetime().nullable().optional().describe("New expiration timestamp for the key, or null to clear it.")}),D1=a.object({params:a.object({keyId:a.string().uuid().describe("Public key ID to deactivate.")}),query:a.object({projectId:a.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted.")})}).transform(({params:e,query:t})=>({...t,...e})),C1=_l,z1=a.void(),_1=a.object({limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of keys to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),j1=a.object({keyId:a.string().uuid().describe("Key ID to fetch.")}),N1=a.object({projectId:a.string().uuid().optional().describe("Project to scope this key to. When set, the key can only access resources within this project. Omit for organization-wide access."),name:a.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(Ck,"Name can only contain letters, numbers, spaces, hyphens, and underscores").describe("Human-readable name for the key."),expiresAt:a.string().datetime().optional().describe("Optional expiration timestamp for the key.")}),R1=a.object({keyId:a.string().uuid().describe("Key ID to update."),name:a.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(Ck,"Name can only contain letters, numbers, spaces, hyphens, and underscores").optional().describe("New human-readable name for the key."),expiresAt:a.string().datetime().nullable().optional().describe("New expiration timestamp for the key, or null to clear it.")}),x1=a.object({params:a.object({keyId:a.string().uuid().describe("Key ID to delete.")})}).transform(({params:e})=>({...e})),Mi=I({operationId:"publicKeys.list",description:"List public keys within one project.",backend:"api",route:{method:"GET",path:"/public-keys",tags:["Public Keys"]},input:S1,output:P1,pagination:"cursor",async:"sync",examples:[{name:"list-public-keys",input:{projectId:"11111111-1111-4111-8111-111111111111",limit:25},output:{publicKeys:[{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}],nextCursor:null}}]}),Ei=I({operationId:"publicKeys.get",description:"Get one public key within one project.",backend:"api",route:{method:"GET",path:"/public-keys/{keyId}",tags:["Public Keys"]},input:$1,output:_l,pagination:"none",async:"sync",examples:[{name:"get-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111",keyId:"22222222-2222-4222-8222-222222222222"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Ki=I({operationId:"publicKeys.ensureLogForwarding",description:"Ensure a reusable project-scoped public key exists for CLI log forwarding.",backend:"api",route:{method:"POST",path:"/public-keys/log-forwarding/ensure",tags:["Public Keys"]},input:A1,output:O1,pagination:"none",async:"sync",examples:[{name:"ensure-log-forwarding-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"sazabi-cli-forward",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z",value:"sazabi_public_example"}}}]}),Gi=I({operationId:"publicKeys.update",description:"Update one public key within one project.",backend:"api",route:{method:"PATCH",path:"/public-keys/{keyId}",tags:["Public Keys"]},input:L1,output:_l,pagination:"none",async:"sync",examples:[{name:"rename-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111",keyId:"22222222-2222-4222-8222-222222222222",name:"Updated CLI forwarder"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"Updated CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),qi=I({operationId:"publicKeys.deactivate",description:"Deactivate one public key within one project. Recently validated requests may continue to authenticate for a short period after deactivation.",backend:"api",route:{method:"POST",path:"/public-keys/{keyId}/deactivate",tags:["Public Keys"],inputStructure:"detailed"},input:D1,output:C1,pagination:"none",async:"sync"}),jl=I({operationId:"secretKeys.list",description:"List secret keys within the organization.",backend:"api",route:{method:"GET",path:"/secret-keys",tags:["Secret Keys"]},input:_1,output:I1,pagination:"cursor",async:"sync",examples:[{name:"list-secret-keys",input:{limit:25},output:{secretKeys:[{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}],nextCursor:null}}]}),Nl=I({operationId:"secretKeys.get",description:"Get one secret key within the organization.",backend:"api",route:{method:"GET",path:"/secret-keys/{keyId}",tags:["Secret Keys"]},input:j1,output:zk,pagination:"none",async:"sync",examples:[{name:"get-secret-key",input:{keyId:"33333333-3333-4333-8333-333333333333"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Rl=I({operationId:"secretKeys.create",description:"Create one secret key within the organization.",backend:"api",route:{method:"POST",path:"/secret-keys",successStatus:201,tags:["Secret Keys"]},input:N1,output:T1,pagination:"none",async:"sync",examples:[{name:"create-secret-key",input:{name:"CI agent"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z",value:"sazabi_secret_example"}}}]}),xl=I({operationId:"secretKeys.update",description:"Update one secret key within the organization.",backend:"api",route:{method:"PATCH",path:"/secret-keys/{keyId}",tags:["Secret Keys"]},input:R1,output:zk,pagination:"none",async:"sync",examples:[{name:"rename-secret-key",input:{keyId:"33333333-3333-4333-8333-333333333333",name:"Updated CI agent"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"Updated CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Ul=I({operationId:"secretKeys.delete",description:"Delete one secret key within the organization.",backend:"api",route:{method:"DELETE",path:"/secret-keys/{keyId}",successStatus:204,tags:["Secret Keys"],inputStructure:"detailed"},input:x1,output:z1,pagination:"none",async:"sync"}),e5={list:Mi.contract,get:Ei.contract,ensureLogForwarding:Ki.contract,update:Gi.contract,deactivate:qi.contract},t5={list:jl.contract,get:Nl.contract,create:Rl.contract,update:xl.contract,delete:Ul.contract}});var jk,U1,Nk,Za,n5,o5,i5,r5,a5,c5,s5,h5,l5,u5,Rk,xk,Uk,Mk,Ek,o_e;var M1=d(()=>{me();Ce();jk=a.string().uuid().describe("Log match expression ID."),U1=a.string().min(1).max(200).describe("Human-readable expression name."),Nk=a.string().min(1).max(8192).describe("CEL expression evaluated against ingested log events."),Za=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),expression:Nk,enabled:a.boolean(),compiledVersion:a.number().int(),linkedAutomationIds:a.array(a.string().uuid()).optional().describe("Automations bound to this expression. Included on list/get when available."),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),n5=a.object({projectId:a.string().uuid().optional().describe("Project to list expressions for. Auto-filled from CLI and SDK context when omitted.")}),o5=a.object({expressions:a.array(Za)}),i5=a.object({expressionId:jk,projectId:a.string().uuid().optional().describe("Project that owns the expression. Auto-filled from CLI and SDK context when omitted.")}),r5=a.object({expression:Za}),a5=a.object({projectId:a.string().uuid().optional().describe("Project to create the expression in. Auto-filled from CLI and SDK context when omitted."),name:U1,expression:Nk,enabled:a.boolean().optional().describe("Whether the expression starts enabled. Defaults to true.")}),c5=a.object({expression:Za}),s5=a.object({expressionId:jk,projectId:a.string().uuid().optional().describe("Project that owns the expression. Auto-filled from CLI and SDK context when omitted."),name:U1.optional(),expression:Nk.optional(),enabled:a.boolean().optional().describe("Whether the expression is enabled.")}),h5=a.object({expression:Za}),l5=a.object({expressionId:jk,projectId:a.string().uuid().optional().describe("Project that owns the expression. Auto-filled from CLI and SDK context when omitted.")}),u5=a.object({expression:Za}),Rk=I({operationId:"logMatchExpressions.list",description:"List CEL log-match expressions in a project.",backend:"api",route:{method:"GET",path:"/log-match-expressions",tags:["Log match expressions"]},input:n5,output:o5,pagination:"none",async:"sync"}),xk=I({operationId:"logMatchExpressions.get",description:"Get a single log-match expression by ID.",backend:"api",route:{method:"GET",path:"/log-match-expressions/{expressionId}",tags:["Log match expressions"]},input:i5,output:r5,pagination:"none",async:"sync"}),Uk=I({operationId:"logMatchExpressions.create",description:"Create a CEL log-match expression for a project.",backend:"api",route:{method:"POST",path:"/log-match-expressions",successStatus:201,tags:["Log match expressions"]},input:a5,output:c5,pagination:"none",async:"sync"}),Mk=I({operationId:"logMatchExpressions.update",description:"Update a log-match expression's name, CEL body, or enabled state.",backend:"api",route:{method:"PATCH",path:"/log-match-expressions/{expressionId}",tags:["Log match expressions"]},input:s5,output:h5,pagination:"none",async:"sync"}),Ek=I({operationId:"logMatchExpressions.disable",description:"Disable a log-match expression so it stops matching logs.",backend:"api",route:{method:"POST",path:"/log-match-expressions/{expressionId}/disable",tags:["Log match expressions"]},input:l5,output:u5,pagination:"none",async:"sync"}),o_e={list:Rk.contract,get:xk.contract,create:Uk.contract,update:Mk.contract,disable:Ek.contract}});var E1,K1,G1,q1,J1,B1,H1,Xa,W1,F1,Z1,Kk,X1,Y1,Q1,V1,e4,t4,n4,o4,i4,r4,d5,a4,c4,Ji,Bi,Hi,Wi,Fi,Ml,g5;var Gk=d(()=>{me();Ce();E1=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)"),K1=a.enum(["any","all","phrase"]).describe("Search mode: 'any' (match any token), 'all' (match all tokens), 'phrase' (exact phrase match)"),G1=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:K1.optional().default("all").describe("Token matching mode")}),q1=a.object({field:a.string().describe("Field name to filter on"),op:E1.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"]})}),J1=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")}),B1=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")}),H1=a.object({projectId:a.string().uuid().optional().describe("Project to query logs for. Auto-filled from CLI and SDK context when omitted."),search:G1.optional().describe("Full-text search configuration"),filters:a.array(q1).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:J1.optional().describe("Sort configuration (defaults to timestamp desc)"),pagination:B1.optional().describe("Pagination configuration")}),Xa=a.enum(["clickhouse","better-stack","datadog","gcp","axiom","cloudwatch","sentry","posthog","mezmo"]),W1=a.enum(["native","external"]),F1=a.object({projectId:a.string().uuid().optional().describe("Project to inspect. Auto-filled from CLI and SDK context when omitted.")}),Z1=a.object({backend:a.object({id:Xa,name:a.string(),kind:W1}).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"),observedServiceNames:a.array(a.string()).describe("Recently observed service names for this project"),observedAttributeKeys:a.array(a.string()).describe("Recently observed log attribute keys for this project"),schemaContext:a.record(a.string(),a.any()).optional().describe("Backend-specific schema guidance and examples")}),Kk=a.enum(["1m","5m","15m","1h"]),X1=a.enum(["service_name","severity_text","environment"]),Y1=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:Kk.optional().describe("Aggregation bucket size for the volume series"),groupBy:X1.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"]}),Q1=a.object({total:a.number().nonnegative(),startDate:a.string().datetime({offset:!0}),endDate:a.string().datetime({offset:!0}),interval:Kk,series:a.array(a.object({group:a.string(),total:a.number().nonnegative(),points:a.array(a.object({bucket:a.string(),count:a.number().nonnegative()}))}))}),V1=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"]}),e4=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()}),t4=a.object({patterns:a.array(e4),meta:a.object({backendId:Xa,count:a.number().int().nonnegative(),took:a.number().nonnegative()})}),n4=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")}),o4=a.object({result:a.string().describe("Backend-formatted query result"),format:a.literal("text"),meta:a.object({backendId:Xa,took:a.number().nonnegative(),truncated:a.boolean()})}),i4=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 must be at least 1 character long.").max(4000,"Query must be at most 4000 characters").describe("Natural-language logs question. Examples: 'api request failures in the last day', 'timeouts in intake', 'top ERROR patterns for public-api'.")}),r4=a.object({answer:a.string().describe("Evidence-backed natural-language answer to the logs question"),steps:a.number().int().nonnegative().describe("Number of nested model steps used"),toolCalls:a.number().int().nonnegative().describe("Number of nested tool calls used"),compacted:a.boolean().describe("Whether nested messages were compacted during the search"),meta:a.object({backendId:Xa,took:a.number().nonnegative(),modelProvider:a.string().optional(),modelId:a.string().optional()})}),d5=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")}),a4=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")}),c4=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:a4.describe("Query execution metadata")}),Ji=I({operationId:"logs.query",description:"Query logs within one project.",backend:"api",route:{method:"POST",path:"/logs/query",tags:["Logs"]},input:H1,output:c4,pagination:"cursor",async:"sync"}),Bi=I({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:F1,output:Z1,pagination:"none",async:"sync"}),Hi=I({operationId:"logs.volume",description:"Query pre-aggregated log volume for one project.",backend:"api",route:{method:"POST",path:"/logs/volume",tags:["Logs"]},input:Y1,output:Q1,pagination:"none",async:"sync"}),Wi=I({operationId:"logs.patterns",description:"Query normalized log patterns for discovery workflows.",backend:"api",route:{method:"POST",path:"/logs/patterns",tags:["Logs"]},input:V1,output:t4,pagination:"none",async:"sync"}),Fi=I({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:n4,output:o4,pagination:"none",async:"sync"}),Ml=I({operationId:"logs.searchNatural",summary:"Natural Language Log Search",description:"Search project logs by asking a natural-language question. Experimental.",backend:"api",route:{method:"POST",path:"/logs/search-natural",tags:["Logs"]},input:i4,output:r4,pagination:"none",async:"sync"}),g5={query:Ji.contract,schema:Bi.contract,volume:Hi.contract,patterns:Wi.contract,nativeQuery:Fi.contract,searchNatural:Ml.contract}});var s4=d(()=>{al()});var qk=d(()=>{s4()});var l4=()=>{};var Jk,Bk,El,y5,b5,Zi,Kl,u4,d4,Hk,g4,y4,m5,b4,Wk,p5,w5,f5,v5,k5,S5,P5,I5,$5,O5,A5,T5,L5,Fk,m4,p4,D5,Zk;var Gl=d(()=>{me();Jk=["streamable-http","sse"],Bk=["none","headers","oauth","aws-sigv4"],El=["none","client_secret_basic","client_secret_post"],y5=["preset","custom"],b5=["configured","authorizing","connected","error"],Zi=["enabled","disabled","custom-only"],Kl=["enabled","write_blocked","disabled"],u4=a.enum(Jk),d4=a.enum(Bk),Hk=a.enum(El),g4=a.enum(y5),y4=a.enum(b5),m5=a.enum(Zi),b4=a.enum(Kl),Wk=a.object({id:a.string().min(1),name:a.string().min(1),value:a.string().min(1)}),p5=a.object({id:a.string().min(1),name:a.string().min(1),maskedValue:a.string().min(1)}),w5=a.object({authMode:a.literal("none")}),f5=a.object({tokenUrl:a.string().url(),clientId:a.string().min(1),clientSecret:a.string().min(1).optional(),tokenEndpointAuthMethod:Hk.optional(),refreshToken:a.string().min(1),headerName:a.string().min(1).default("Authorization"),headerValuePrefix:a.string().default("Bearer "),expiresAt:a.string().datetime().optional()}),v5=a.object({authMode:a.literal("headers"),headers:a.array(Wk),refreshCredentials:f5.optional()}),k5=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")}),S5=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(),P5=a.object({accessToken:a.string().min(1),refreshToken:a.string().min(1).optional(),tokenType:a.string().min(1).optional(),scope:S5,expiresAt:a.string().datetime().optional()}).transform(({scope:e,...t})=>{return e===void 0?t:{...t,scope:e}}),I5=a.object({authMode:a.literal("oauth"),providerId:a.string().min(1),tokens:P5,headers:a.array(Wk).optional()}),$5=a.discriminatedUnion("authMode",[w5,v5,I5,k5]),O5=a.string().min(1).regex(/^enc:v1:/,"Encrypted auth config must use enc:v1 format."),A5=a.object({codeVerifier:a.string().min(1),clientId:a.string().min(1),clientSecret:a.string().min(1).optional(),tokenEndpointAuthMethod:Hk.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()}),T5=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()),L5=a.object({supportsOAuth:a.boolean().default(!1),supportsCustomHeaders:a.boolean().default(!0),supportsToolDiscovery:a.boolean().default(!0),readOnlyToolNames:a.array(a.string()).default([])}),Fk=a.object({name:a.string().min(1),title:a.string().min(1),description:a.string().min(1),inputSchema:T5,annotations:a.record(a.string(),a.unknown()).default({}),availability:b4,isReadOnly:a.boolean()}),m4=a.object({discoveredAt:a.string().datetime(),tools:a.array(Fk)}),p4=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()})}),D5=a.object({id:a.string().uuid(),organizationId:a.string().min(1),projectId:a.string().uuid(),providerId:a.string().min(1),source:g4,displayName:a.string().min(1),connectionKey:a.string().min(1),serverUrl:a.string().url(),transport:u4,authMode:d4,installStatus:y4,installedByUserId:a.string().nullable(),connectedAt:a.string().datetime().nullable(),toolSnapshot:m4.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()}),Zk=p4});var Yk=q((b_e,Bl)=>{var w4,f4,v4,k4,S4,P4,I4,$4,O4,A4,T4,L4,D4,ql,Xk,C4,z4,_4,Xi,j4,N4,R4,x4,U4,M4,E4,K4,G4,Jl,q4,J4,B4;(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(i){e(n(t,n(i)))});else if(typeof Bl==="object"&&typeof b_e==="object")e(n(t,n(b_e)));else e(n(t));function n(i,o){if(i!==t)if(typeof Object.create==="function")Object.defineProperty(i,"__esModule",{value:!0});else i.__esModule=!0;return function(r,c){return i[r]=o?o(r,c):c}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,c){r.__proto__=c}||function(r,c){for(var s in c)if(Object.prototype.hasOwnProperty.call(c,s))r[s]=c[s]};w4=function(r,c){if(typeof c!=="function"&&c!==null)throw TypeError("Class extends value "+String(c)+" is not a constructor or null");t(r,c);function s(){this.constructor=r}r.prototype=c===null?Object.create(c):(s.prototype=c.prototype,new s)},f4=Object.assign||function(r){for(var c,s=1,h=arguments.length;s<h;s++){c=arguments[s];for(var l in c)if(Object.prototype.hasOwnProperty.call(c,l))r[l]=c[l]}return r},v4=function(r,c){var s={};for(var h in r)if(Object.prototype.hasOwnProperty.call(r,h)&&c.indexOf(h)<0)s[h]=r[h];if(r!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var l=0,h=Object.getOwnPropertySymbols(r);l<h.length;l++)if(c.indexOf(h[l])<0&&Object.prototype.propertyIsEnumerable.call(r,h[l]))s[h[l]]=r[h[l]]}return s},k4=function(r,c,s,h){var l=arguments.length,u=l<3?c:h===null?h=Object.getOwnPropertyDescriptor(c,s):h,g;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")u=Reflect.decorate(r,c,s,h);else for(var y=r.length-1;y>=0;y--)if(g=r[y])u=(l<3?g(u):l>3?g(c,s,u):g(c,s))||u;return l>3&&u&&Object.defineProperty(c,s,u),u},S4=function(r,c){return function(s,h){c(s,h,r)}},P4=function(r,c,s,h,l,u){function g(we){if(we!==void 0&&typeof we!=="function")throw TypeError("Function expected");return we}var y=h.kind,b=y==="getter"?"get":y==="setter"?"set":"value",w=!c&&r?h.static?r:r.prototype:null,v=c||(w?Object.getOwnPropertyDescriptor(w,h.name):{}),P,T=!1;for(var x=s.length-1;x>=0;x--){var j={};for(var Z in h)j[Z]=Z==="access"?{}:h[Z];for(var Z in h.access)j.access[Z]=h.access[Z];j.addInitializer=function(we){if(T)throw TypeError("Cannot add initializers after decoration has completed");u.push(g(we||null))};var U=(0,s[x])(y==="accessor"?{get:v.get,set:v.set}:v[b],j);if(y==="accessor"){if(U===void 0)continue;if(U===null||typeof U!=="object")throw TypeError("Object expected");if(P=g(U.get))v.get=P;if(P=g(U.set))v.set=P;if(P=g(U.init))l.unshift(P)}else if(P=g(U))if(y==="field")l.unshift(P);else v[b]=P}if(w)Object.defineProperty(w,h.name,v);T=!0},I4=function(r,c,s){var h=arguments.length>2;for(var l=0;l<c.length;l++)s=h?c[l].call(r,s):c[l].call(r);return h?s:void 0},$4=function(r){return typeof r==="symbol"?r:"".concat(r)},O4=function(r,c,s){if(typeof c==="symbol")c=c.description?"[".concat(c.description,"]"):"";return Object.defineProperty(r,"name",{configurable:!0,value:s?"".concat(s," ",c):c})},A4=function(r,c){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(r,c)},T4=function(r,c,s,h){function l(u){return u instanceof s?u:new s(function(g){g(u)})}return new(s||(s=Promise))(function(u,g){function y(v){try{w(h.next(v))}catch(P){g(P)}}function b(v){try{w(h.throw(v))}catch(P){g(P)}}function w(v){v.done?u(v.value):l(v.value).then(y,b)}w((h=h.apply(r,c||[])).next())})},L4=function(r,c){var s={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},h,l,u,g=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return g.next=y(0),g.throw=y(1),g.return=y(2),typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this}),g;function y(w){return function(v){return b([w,v])}}function b(w){if(h)throw TypeError("Generator is already executing.");while(g&&(g=0,w[0]&&(s=0)),s)try{if(h=1,l&&(u=w[0]&2?l.return:w[0]?l.throw||((u=l.return)&&u.call(l),0):l.next)&&!(u=u.call(l,w[1])).done)return u;if(l=0,u)w=[w[0]&2,u.value];switch(w[0]){case 0:case 1:u=w;break;case 4:return s.label++,{value:w[1],done:!1};case 5:s.label++,l=w[1],w=[0];continue;case 7:w=s.ops.pop(),s.trys.pop();continue;default:if((u=s.trys,!(u=u.length>0&&u[u.length-1]))&&(w[0]===6||w[0]===2)){s=0;continue}if(w[0]===3&&(!u||w[1]>u[0]&&w[1]<u[3])){s.label=w[1];break}if(w[0]===6&&s.label<u[1]){s.label=u[1],u=w;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(w);break}if(u[2])s.ops.pop();s.trys.pop();continue}w=c.call(r,s)}catch(v){w=[6,v],l=0}finally{h=u=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}},D4=function(r,c){for(var s in r)if(s!=="default"&&!Object.prototype.hasOwnProperty.call(c,s))Jl(c,r,s)},Jl=Object.create?function(r,c,s,h){if(h===void 0)h=s;var l=Object.getOwnPropertyDescriptor(c,s);if(!l||("get"in l?!c.__esModule:l.writable||l.configurable))l={enumerable:!0,get:function(){return c[s]}};Object.defineProperty(r,h,l)}:function(r,c,s,h){if(h===void 0)h=s;r[h]=c[s]},ql=function(r){var c=typeof Symbol==="function"&&Symbol.iterator,s=c&&r[c],h=0;if(s)return s.call(r);if(r&&typeof r.length==="number")return{next:function(){if(r&&h>=r.length)r=void 0;return{value:r&&r[h++],done:!r}}};throw TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")},Xk=function(r,c){var s=typeof Symbol==="function"&&r[Symbol.iterator];if(!s)return r;var h=s.call(r),l,u=[],g;try{while((c===void 0||c-- >0)&&!(l=h.next()).done)u.push(l.value)}catch(y){g={error:y}}finally{try{if(l&&!l.done&&(s=h.return))s.call(h)}finally{if(g)throw g.error}}return u},C4=function(){for(var r=[],c=0;c<arguments.length;c++)r=r.concat(Xk(arguments[c]));return r},z4=function(){for(var r=0,c=0,s=arguments.length;c<s;c++)r+=arguments[c].length;for(var h=Array(r),l=0,c=0;c<s;c++)for(var u=arguments[c],g=0,y=u.length;g<y;g++,l++)h[l]=u[g];return h},_4=function(r,c,s){if(s||arguments.length===2){for(var h=0,l=c.length,u;h<l;h++)if(u||!(h in c)){if(!u)u=Array.prototype.slice.call(c,0,h);u[h]=c[h]}}return r.concat(u||Array.prototype.slice.call(c))},Xi=function(r){return this instanceof Xi?(this.v=r,this):new Xi(r)},j4=function(r,c,s){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var h=s.apply(r,c||[]),l,u=[];return l=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),y("next"),y("throw"),y("return",g),l[Symbol.asyncIterator]=function(){return this},l;function g(x){return function(j){return Promise.resolve(j).then(x,P)}}function y(x,j){if(h[x]){if(l[x]=function(Z){return new Promise(function(U,we){u.push([x,Z,U,we])>1||b(x,Z)})},j)l[x]=j(l[x])}}function b(x,j){try{w(h[x](j))}catch(Z){T(u[0][3],Z)}}function w(x){x.value instanceof Xi?Promise.resolve(x.value.v).then(v,P):T(u[0][2],x)}function v(x){b("next",x)}function P(x){b("throw",x)}function T(x,j){if(x(j),u.shift(),u.length)b(u[0][0],u[0][1])}},N4=function(r){var c,s;return c={},h("next"),h("throw",function(l){throw l}),h("return"),c[Symbol.iterator]=function(){return this},c;function h(l,u){c[l]=r[l]?function(g){return(s=!s)?{value:Xi(r[l](g)),done:!1}:u?u(g):g}:u}},R4=function(r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var c=r[Symbol.asyncIterator],s;return c?c.call(r):(r=typeof ql==="function"?ql(r):r[Symbol.iterator](),s={},h("next"),h("throw"),h("return"),s[Symbol.asyncIterator]=function(){return this},s);function h(u){s[u]=r[u]&&function(g){return new Promise(function(y,b){g=r[u](g),l(y,b,g.done,g.value)})}}function l(u,g,y,b){Promise.resolve(b).then(function(w){u({value:w,done:y})},g)}},x4=function(r,c){if(Object.defineProperty)Object.defineProperty(r,"raw",{value:c});else r.raw=c;return r};var n=Object.create?function(r,c){Object.defineProperty(r,"default",{enumerable:!0,value:c})}:function(r,c){r.default=c},i=function(r){return i=Object.getOwnPropertyNames||function(c){var s=[];for(var h in c)if(Object.prototype.hasOwnProperty.call(c,h))s[s.length]=h;return s},i(r)};U4=function(r){if(r&&r.__esModule)return r;var c={};if(r!=null){for(var s=i(r),h=0;h<s.length;h++)if(s[h]!=="default")Jl(c,r,s[h])}return n(c,r),c},M4=function(r){return r&&r.__esModule?r:{default:r}},E4=function(r,c,s,h){if(s==="a"&&!h)throw TypeError("Private accessor was defined without a getter");if(typeof c==="function"?r!==c||!h:!c.has(r))throw TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?h:s==="a"?h.call(r):h?h.value:c.get(r)},K4=function(r,c,s,h,l){if(h==="m")throw TypeError("Private method is not writable");if(h==="a"&&!l)throw TypeError("Private accessor was defined without a setter");if(typeof c==="function"?r!==c||!l:!c.has(r))throw TypeError("Cannot write private member to an object whose class did not declare it");return h==="a"?l.call(r,s):l?l.value=s:c.set(r,s),s},G4=function(r,c){if(c===null||typeof c!=="object"&&typeof c!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof r==="function"?c===r:r.has(c)},q4=function(r,c,s){if(c!==null&&c!==void 0){if(typeof c!=="object"&&typeof c!=="function")throw TypeError("Object expected.");var h,l;if(s){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");h=c[Symbol.asyncDispose]}if(h===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(h=c[Symbol.dispose],s)l=h}if(typeof h!=="function")throw TypeError("Object not disposable.");if(l)h=function(){try{l.call(this)}catch(u){return Promise.reject(u)}};r.stack.push({value:c,dispose:h,async:s})}else if(s)r.stack.push({async:!0});return c};var o=typeof SuppressedError==="function"?SuppressedError:function(r,c,s){var h=Error(s);return h.name="SuppressedError",h.error=r,h.suppressed=c,h};J4=function(r){function c(u){r.error=r.hasError?new o(u,r.error,"An error was suppressed during disposal."):u,r.hasError=!0}var s,h=0;function l(){while(s=r.stack.pop())try{if(!s.async&&h===1)return h=0,r.stack.push(s),Promise.resolve().then(l);if(s.dispose){var u=s.dispose.call(s.value);if(s.async)return h|=2,Promise.resolve(u).then(l,function(g){return c(g),l()})}else h|=1}catch(g){c(g)}if(h===1)return r.hasError?Promise.reject(r.error):Promise.resolve();if(r.hasError)throw r.error}return l()},B4=function(r,c){if(typeof r==="string"&&/^\.\.?\//.test(r))return r.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(s,h,l,u,g){return h?c?".jsx":".js":l&&(!u||!g)?s:l+u+"."+g.toLowerCase()+"js"});return r},e("__extends",w4),e("__assign",f4),e("__rest",v4),e("__decorate",k4),e("__param",S4),e("__esDecorate",P4),e("__runInitializers",I4),e("__propKey",$4),e("__setFunctionName",O4),e("__metadata",A4),e("__awaiter",T4),e("__generator",L4),e("__exportStar",D4),e("__createBinding",Jl),e("__values",ql),e("__read",Xk),e("__spread",C4),e("__spreadArrays",z4),e("__spreadArray",_4),e("__await",Xi),e("__asyncGenerator",j4),e("__asyncDelegator",N4),e("__asyncValues",R4),e("__makeTemplateObject",x4),e("__importStar",U4),e("__importDefault",M4),e("__classPrivateFieldGet",E4),e("__classPrivateFieldSet",K4),e("__classPrivateFieldIn",G4),e("__addDisposableResource",q4),e("__disposeResources",J4),e("__rewriteRelativeImportExtension",B4)})});var Qk=q((H4)=>{Object.defineProperty(H4,"__esModule",{value:!0});H4.MAX_HASHABLE_LENGTH=H4.INIT=H4.KEY=H4.DIGEST_LENGTH=H4.BLOCK_SIZE=void 0;H4.BLOCK_SIZE=64;H4.DIGEST_LENGTH=32;H4.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]);H4.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];H4.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1});var X4=q((F4)=>{Object.defineProperty(F4,"__esModule",{value:!0});F4.RawSha256=void 0;var Bt=Qk(),N5=function(){function e(){this.state=Int32Array.from(Bt.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,i=t.byteLength;if(this.bytesHashed+=i,this.bytesHashed*8>Bt.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");while(i>0)if(this.buffer[this.bufferLength++]=t[n++],i--,this.bufferLength===Bt.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),i=this.bufferLength;if(n.setUint8(this.bufferLength++,128),i%Bt.BLOCK_SIZE>=Bt.BLOCK_SIZE-8){for(var o=this.bufferLength;o<Bt.BLOCK_SIZE;o++)n.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(var o=this.bufferLength;o<Bt.BLOCK_SIZE-8;o++)n.setUint8(o,0);n.setUint32(Bt.BLOCK_SIZE-8,Math.floor(t/4294967296),!0),n.setUint32(Bt.BLOCK_SIZE-4,t),this.hashBuffer(),this.finished=!0}var r=new Uint8Array(Bt.DIGEST_LENGTH);for(var o=0;o<8;o++)r[o*4]=this.state[o]>>>24&255,r[o*4+1]=this.state[o]>>>16&255,r[o*4+2]=this.state[o]>>>8&255,r[o*4+3]=this.state[o]>>>0&255;return r},e.prototype.hashBuffer=function(){var t=this,n=t.buffer,i=t.state,o=i[0],r=i[1],c=i[2],s=i[3],h=i[4],l=i[5],u=i[6],g=i[7];for(var y=0;y<Bt.BLOCK_SIZE;y++){if(y<16)this.temp[y]=(n[y*4]&255)<<24|(n[y*4+1]&255)<<16|(n[y*4+2]&255)<<8|n[y*4+3]&255;else{var b=this.temp[y-2],w=(b>>>17|b<<15)^(b>>>19|b<<13)^b>>>10;b=this.temp[y-15];var v=(b>>>7|b<<25)^(b>>>18|b<<14)^b>>>3;this.temp[y]=(w+this.temp[y-7]|0)+(v+this.temp[y-16]|0)}var P=(((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&l^~h&u)|0)+(g+(Bt.KEY[y]+this.temp[y]|0)|0)|0,T=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&r^o&c^r&c)|0;g=u,u=l,l=h,h=s+P|0,s=c,c=r,r=o,o=P+T|0}i[0]+=o,i[1]+=r,i[2]+=c,i[3]+=s,i[4]+=h,i[5]+=l,i[6]+=u,i[7]+=g},e}();F4.RawSha256=N5});var V4=q((w_e,Q4)=>{var{defineProperty:Hl,getOwnPropertyDescriptor:R5,getOwnPropertyNames:x5}=Object,U5=Object.prototype.hasOwnProperty,M5=(e,t)=>Hl(e,"name",{value:t,configurable:!0}),E5=(e,t)=>{for(var n in t)Hl(e,n,{get:t[n],enumerable:!0})},K5=(e,t,n,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of x5(t))if(!U5.call(e,o)&&o!==n)Hl(e,o,{get:()=>t[o],enumerable:!(i=R5(t,o))||i.enumerable})}return e},G5=(e)=>K5(Hl({},"__esModule",{value:!0}),e),Y4={};E5(Y4,{isArrayBuffer:()=>q5});Q4.exports=G5(Y4);var q5=M5((e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]","isArrayBuffer")});var oR=q((f_e,nR)=>{var{defineProperty:Wl,getOwnPropertyDescriptor:J5,getOwnPropertyNames:B5}=Object,H5=Object.prototype.hasOwnProperty,eR=(e,t)=>Wl(e,"name",{value:t,configurable:!0}),W5=(e,t)=>{for(var n in t)Wl(e,n,{get:t[n],enumerable:!0})},F5=(e,t,n,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of B5(t))if(!H5.call(e,o)&&o!==n)Wl(e,o,{get:()=>t[o],enumerable:!(i=J5(t,o))||i.enumerable})}return e},Z5=(e)=>F5(Wl({},"__esModule",{value:!0}),e),tR={};W5(tR,{fromArrayBuffer:()=>Y5,fromString:()=>Q5});nR.exports=Z5(tR);var X5=V4(),Vk=pO("buffer"),Y5=eR((e,t=0,n=e.byteLength-t)=>{if(!(0,X5.isArrayBuffer)(e))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return Vk.Buffer.from(e,t,n)},"fromArrayBuffer"),Q5=eR((e,t)=>{if(typeof e!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?Vk.Buffer.from(e,t):Vk.Buffer.from(e)},"fromString")});var sR=q((v_e,cR)=>{var{defineProperty:Fl,getOwnPropertyDescriptor:V5,getOwnPropertyNames:e7}=Object,t7=Object.prototype.hasOwnProperty,eS=(e,t)=>Fl(e,"name",{value:t,configurable:!0}),n7=(e,t)=>{for(var n in t)Fl(e,n,{get:t[n],enumerable:!0})},o7=(e,t,n,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of e7(t))if(!t7.call(e,o)&&o!==n)Fl(e,o,{get:()=>t[o],enumerable:!(i=V5(t,o))||i.enumerable})}return e},i7=(e)=>o7(Fl({},"__esModule",{value:!0}),e),iR={};n7(iR,{fromUtf8:()=>aR,toUint8Array:()=>r7,toUtf8:()=>a7});cR.exports=i7(iR);var rR=oR(),aR=eS((e)=>{let t=(0,rR.fromString)(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),r7=eS((e)=>{if(typeof e==="string")return aR(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)},"toUint8Array"),a7=eS((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,rR.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength).toString("utf8")},"toUtf8")});var uR=q((hR)=>{Object.defineProperty(hR,"__esModule",{value:!0});hR.convertToBuffer=void 0;var c7=sR(),s7=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:c7.fromUtf8;function h7(e){if(e instanceof Uint8Array)return e;if(typeof e==="string")return s7(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)}hR.convertToBuffer=h7});var yR=q((dR)=>{Object.defineProperty(dR,"__esModule",{value:!0});dR.isEmptyData=void 0;function l7(e){if(typeof e==="string")return e.length===0;return e.byteLength===0}dR.isEmptyData=l7});var pR=q((bR)=>{Object.defineProperty(bR,"__esModule",{value:!0});bR.numToUint8=void 0;function u7(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}bR.numToUint8=u7});var vR=q((wR)=>{Object.defineProperty(wR,"__esModule",{value:!0});wR.uint32ArrayFrom=void 0;function d7(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)}wR.uint32ArrayFrom=d7});var kR=q((Yi)=>{Object.defineProperty(Yi,"__esModule",{value:!0});Yi.uint32ArrayFrom=Yi.numToUint8=Yi.isEmptyData=Yi.convertToBuffer=void 0;var g7=uR();Object.defineProperty(Yi,"convertToBuffer",{enumerable:!0,get:function(){return g7.convertToBuffer}});var y7=yR();Object.defineProperty(Yi,"isEmptyData",{enumerable:!0,get:function(){return y7.isEmptyData}});var b7=pR();Object.defineProperty(Yi,"numToUint8",{enumerable:!0,get:function(){return b7.numToUint8}});var m7=vR();Object.defineProperty(Yi,"uint32ArrayFrom",{enumerable:!0,get:function(){return m7.uint32ArrayFrom}})});var $R=q((PR)=>{Object.defineProperty(PR,"__esModule",{value:!0});PR.Sha256=void 0;var SR=Yk(),Xl=Qk(),Zl=X4(),tS=kR(),w7=function(){function e(t){this.secret=t,this.hash=new Zl.RawSha256,this.reset()}return e.prototype.update=function(t){if((0,tS.isEmptyData)(t)||this.error)return;try{this.hash.update((0,tS.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 SR.__awaiter(this,void 0,void 0,function(){return SR.__generator(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Zl.RawSha256,this.secret){this.outer=new Zl.RawSha256;var t=f7(this.secret),n=new Uint8Array(Xl.BLOCK_SIZE);n.set(t);for(var i=0;i<Xl.BLOCK_SIZE;i++)t[i]^=54,n[i]^=92;this.hash.update(t),this.outer.update(n);for(var i=0;i<t.byteLength;i++)t[i]=0}},e}();PR.Sha256=w7;function f7(e){var t=(0,tS.convertToBuffer)(e);if(t.byteLength>Xl.BLOCK_SIZE){var n=new Zl.RawSha256;n.update(t),t=n.digest()}var i=new Uint8Array(Xl.BLOCK_SIZE);return i.set(t),i}});var OR=q((nS)=>{Object.defineProperty(nS,"__esModule",{value:!0});var v7=Yk();v7.__exportStar($R(),nS)});var Yl=()=>{};var AR="io.modelcontextprotocol/related-task",Vl="2.0",Be,TR,LR,z_e,k7,S7,oS,_t,eu,et,Ht,Wt,tt,tu,P7,I7,DR,Ya,CR,zR,__e,iS,$7,rS,O7,Qa,Qi,_R,A7,T7,L7,D7,C7,z7,_7,j7,jR,N7,aS,R7,x7,cS,U7,Va,ec,M7,tc,nu,E7,sS,hS,lS,uS,j_e,dS,gS,yS,K7,NR,RR,bS,xR,nc,Vi,UR,G7,q7,MR,J7,ER,mS,B7,H7,KR,GR,W7,F7,Z7,X7,Y7,Q7,V7,e2,t2,qR,n2,o2,pS,wS,fS,i2,r2,a2,vS,c2,JR,BR,s2,h2,HR,l2,WR,ou,N_e,u2,d2,FR,g2,ZR,y2,b2,m2,p2,w2,f2,v2,k2,S2,Ql,P2,I2,XR,YR,QR,$2,O2,A2,T2,L2,D2,C2,z2,_2,j2,N2,R2,x2,U2,M2,VR,E2,K2,ex,G2,q2,J2,B2,tx,H2,W2,F2,Z2,R_e,x_e,U_e,M_e,E_e,K_e;var Eo=d(()=>{qk();Be=rl((e)=>e!==null&&(typeof e==="object"||typeof e==="function")),TR=De([k(),be().int()]),LR=k(),z_e=Ke({ttl:be().optional(),pollInterval:be().optional()}),k7=B({ttl:be().optional()}),S7=B({taskId:k()}),oS=Ke({progressToken:TR.optional(),[AR]:S7.optional()}),_t=B({_meta:oS.optional()}),eu=_t.extend({task:k7.optional()}),et=B({method:k(),params:_t.loose().optional()}),Ht=B({_meta:oS.optional()}),Wt=B({method:k(),params:Ht.loose().optional()}),tt=Ke({_meta:oS.optional()}),tu=De([k(),be().int()]),P7=B({jsonrpc:Y(Vl),id:tu,...et.shape}).strict(),I7=B({jsonrpc:Y(Vl),...Wt.shape}).strict(),DR=B({jsonrpc:Y(Vl),id:tu,result:tt}).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"})(Ya||(Ya={}));CR=B({jsonrpc:Y(Vl),id:tu.optional(),error:B({code:be().int(),message:k(),data:Le().optional()})}).strict(),zR=De([P7,I7,DR,CR]),__e=De([DR,CR]),iS=tt.strict(),$7=Ht.extend({requestId:tu.optional(),reason:k().optional()}),rS=Wt.extend({method:Y("notifications/cancelled"),params:$7}),O7=B({src:k(),mimeType:k().optional(),sizes:J(k()).optional(),theme:Ve(["light","dark"]).optional()}),Qa=B({icons:J(O7).optional()}),Qi=B({name:k(),title:k().optional()}),_R=Qi.extend({...Qi.shape,...Qa.shape,version:k(),websiteUrl:k().optional(),description:k().optional()}),A7=ji(B({applyDefaults:$e().optional()}),Oe(k(),Le())),T7=Ja((e)=>{if(e&&typeof e==="object"&&!Array.isArray(e)){if(Object.keys(e).length===0)return{form:{}}}return e},ji(B({form:A7.optional(),url:Be.optional()}),Oe(k(),Le()).optional())),L7=Ke({list:Be.optional(),cancel:Be.optional(),requests:Ke({sampling:Ke({createMessage:Be.optional()}).optional(),elicitation:Ke({create:Be.optional()}).optional()}).optional()}),D7=Ke({list:Be.optional(),cancel:Be.optional(),requests:Ke({tools:Ke({call:Be.optional()}).optional()}).optional()}),C7=B({experimental:Oe(k(),Be).optional(),sampling:B({context:Be.optional(),tools:Be.optional()}).optional(),elicitation:T7.optional(),roots:B({listChanged:$e().optional()}).optional(),tasks:L7.optional(),extensions:Oe(k(),Be).optional()}),z7=_t.extend({protocolVersion:k(),capabilities:C7,clientInfo:_R}),_7=et.extend({method:Y("initialize"),params:z7}),j7=B({experimental:Oe(k(),Be).optional(),logging:Be.optional(),completions:Be.optional(),prompts:B({listChanged:$e().optional()}).optional(),resources:B({subscribe:$e().optional(),listChanged:$e().optional()}).optional(),tools:B({listChanged:$e().optional()}).optional(),tasks:D7.optional(),extensions:Oe(k(),Be).optional()}),jR=tt.extend({protocolVersion:k(),capabilities:j7,serverInfo:_R,instructions:k().optional()}),N7=Wt.extend({method:Y("notifications/initialized"),params:Ht.optional()}),aS=et.extend({method:Y("ping"),params:_t.optional()}),R7=B({progress:be(),total:je(be()),message:je(k())}),x7=B({...Ht.shape,...R7.shape,progressToken:TR}),cS=Wt.extend({method:Y("notifications/progress"),params:x7}),U7=_t.extend({cursor:LR.optional()}),Va=et.extend({params:U7.optional()}),ec=tt.extend({nextCursor:LR.optional()}),M7=Ve(["working","input_required","completed","failed","cancelled"]),tc=B({taskId:k(),status:M7,ttl:De([be(),xa()]),createdAt:k(),lastUpdatedAt:k(),pollInterval:je(be()),statusMessage:je(k())}),nu=tt.extend({task:tc}),E7=Ht.merge(tc),sS=Wt.extend({method:Y("notifications/tasks/status"),params:E7}),hS=et.extend({method:Y("tasks/get"),params:_t.extend({taskId:k()})}),lS=tt.merge(tc),uS=et.extend({method:Y("tasks/result"),params:_t.extend({taskId:k()})}),j_e=tt.loose(),dS=Va.extend({method:Y("tasks/list")}),gS=ec.extend({tasks:J(tc)}),yS=et.extend({method:Y("tasks/cancel"),params:_t.extend({taskId:k()})}),K7=tt.merge(tc),NR=B({uri:k(),mimeType:je(k()),_meta:Oe(k(),Le()).optional()}),RR=NR.extend({text:k()}),bS=k().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),xR=NR.extend({blob:bS}),nc=Ve(["user","assistant"]),Vi=B({audience:J(nc).optional(),priority:be().min(0).max(1).optional(),lastModified:so.datetime({offset:!0}).optional()}),UR=B({...Qi.shape,...Qa.shape,uri:k(),description:je(k()),mimeType:je(k()),size:je(be()),annotations:Vi.optional(),_meta:je(Ke({}))}),G7=B({...Qi.shape,...Qa.shape,uriTemplate:k(),description:je(k()),mimeType:je(k()),annotations:Vi.optional(),_meta:je(Ke({}))}),q7=Va.extend({method:Y("resources/list")}),MR=ec.extend({resources:J(UR)}),J7=Va.extend({method:Y("resources/templates/list")}),ER=ec.extend({resourceTemplates:J(G7)}),mS=_t.extend({uri:k()}),B7=mS,H7=et.extend({method:Y("resources/read"),params:B7}),KR=tt.extend({contents:J(De([RR,xR]))}),GR=Wt.extend({method:Y("notifications/resources/list_changed"),params:Ht.optional()}),W7=mS,F7=et.extend({method:Y("resources/subscribe"),params:W7}),Z7=mS,X7=et.extend({method:Y("resources/unsubscribe"),params:Z7}),Y7=Ht.extend({uri:k()}),Q7=Wt.extend({method:Y("notifications/resources/updated"),params:Y7}),V7=B({name:k(),description:je(k()),required:je($e())}),e2=B({...Qi.shape,...Qa.shape,description:je(k()),arguments:je(J(V7)),_meta:je(Ke({}))}),t2=Va.extend({method:Y("prompts/list")}),qR=ec.extend({prompts:J(e2)}),n2=_t.extend({name:k(),arguments:Oe(k(),k()).optional()}),o2=et.extend({method:Y("prompts/get"),params:n2}),pS=B({type:Y("text"),text:k(),annotations:Vi.optional(),_meta:Oe(k(),Le()).optional()}),wS=B({type:Y("image"),data:bS,mimeType:k(),annotations:Vi.optional(),_meta:Oe(k(),Le()).optional()}),fS=B({type:Y("audio"),data:bS,mimeType:k(),annotations:Vi.optional(),_meta:Oe(k(),Le()).optional()}),i2=B({type:Y("tool_use"),name:k(),id:k(),input:Oe(k(),Le()),_meta:Oe(k(),Le()).optional()}),r2=B({type:Y("resource"),resource:De([RR,xR]),annotations:Vi.optional(),_meta:Oe(k(),Le()).optional()}),a2=UR.extend({type:Y("resource_link")}),vS=De([pS,wS,fS,a2,r2]),c2=B({role:nc,content:vS}),JR=tt.extend({description:k().optional(),messages:J(c2)}),BR=Wt.extend({method:Y("notifications/prompts/list_changed"),params:Ht.optional()}),s2=B({title:k().optional(),readOnlyHint:$e().optional(),destructiveHint:$e().optional(),idempotentHint:$e().optional(),openWorldHint:$e().optional()}),h2=B({taskSupport:Ve(["required","optional","forbidden"]).optional()}),HR=B({...Qi.shape,...Qa.shape,description:k().optional(),inputSchema:B({type:Y("object"),properties:Oe(k(),Be).optional(),required:J(k()).optional()}).catchall(Le()),outputSchema:B({type:Y("object"),properties:Oe(k(),Be).optional(),required:J(k()).optional()}).catchall(Le()).optional(),annotations:s2.optional(),execution:h2.optional(),_meta:Oe(k(),Le()).optional()}),l2=Va.extend({method:Y("tools/list")}),WR=ec.extend({tools:J(HR)}),ou=tt.extend({content:J(vS).default([]),structuredContent:Oe(k(),Le()).optional(),isError:$e().optional()}),N_e=ou.or(tt.extend({toolResult:Le()})),u2=eu.extend({name:k(),arguments:Oe(k(),Le()).optional()}),d2=et.extend({method:Y("tools/call"),params:u2}),FR=Wt.extend({method:Y("notifications/tools/list_changed"),params:Ht.optional()}),g2=B({autoRefresh:$e().default(!0),debounceMs:be().int().nonnegative().default(300)}),ZR=Ve(["debug","info","notice","warning","error","critical","alert","emergency"]),y2=_t.extend({level:ZR}),b2=et.extend({method:Y("logging/setLevel"),params:y2}),m2=Ht.extend({level:ZR,logger:k().optional(),data:Le()}),p2=Wt.extend({method:Y("notifications/message"),params:m2}),w2=B({name:k().optional()}),f2=B({hints:J(w2).optional(),costPriority:be().min(0).max(1).optional(),speedPriority:be().min(0).max(1).optional(),intelligencePriority:be().min(0).max(1).optional()}),v2=B({mode:Ve(["auto","required","none"]).optional()}),k2=B({type:Y("tool_result"),toolUseId:k().describe("The unique identifier for the corresponding tool call."),content:J(vS).default([]),structuredContent:B({}).loose().optional(),isError:$e().optional(),_meta:Oe(k(),Le()).optional()}),S2=Ka("type",[pS,wS,fS]),Ql=Ka("type",[pS,wS,fS,i2,k2]),P2=B({role:nc,content:De([Ql,J(Ql)]),_meta:Oe(k(),Le()).optional()}),I2=eu.extend({messages:J(P2),modelPreferences:f2.optional(),systemPrompt:k().optional(),includeContext:Ve(["none","thisServer","allServers"]).optional(),temperature:be().optional(),maxTokens:be().int(),stopSequences:J(k()).optional(),metadata:Be.optional(),tools:J(HR).optional(),toolChoice:v2.optional()}),XR=et.extend({method:Y("sampling/createMessage"),params:I2}),YR=tt.extend({model:k(),stopReason:je(Ve(["endTurn","stopSequence","maxTokens"]).or(k())),role:nc,content:S2}),QR=tt.extend({model:k(),stopReason:je(Ve(["endTurn","stopSequence","maxTokens","toolUse"]).or(k())),role:nc,content:De([Ql,J(Ql)])}),$2=B({type:Y("boolean"),title:k().optional(),description:k().optional(),default:$e().optional()}),O2=B({type:Y("string"),title:k().optional(),description:k().optional(),minLength:be().optional(),maxLength:be().optional(),format:Ve(["email","uri","date","date-time"]).optional(),default:k().optional()}),A2=B({type:Ve(["number","integer"]),title:k().optional(),description:k().optional(),minimum:be().optional(),maximum:be().optional(),default:be().optional()}),T2=B({type:Y("string"),title:k().optional(),description:k().optional(),enum:J(k()),default:k().optional()}),L2=B({type:Y("string"),title:k().optional(),description:k().optional(),oneOf:J(B({const:k(),title:k()})),default:k().optional()}),D2=B({type:Y("string"),title:k().optional(),description:k().optional(),enum:J(k()),enumNames:J(k()).optional(),default:k().optional()}),C2=De([T2,L2]),z2=B({type:Y("array"),title:k().optional(),description:k().optional(),minItems:be().optional(),maxItems:be().optional(),items:B({type:Y("string"),enum:J(k())}),default:J(k()).optional()}),_2=B({type:Y("array"),title:k().optional(),description:k().optional(),minItems:be().optional(),maxItems:be().optional(),items:B({anyOf:J(B({const:k(),title:k()}))}),default:J(k()).optional()}),j2=De([z2,_2]),N2=De([D2,C2,j2]),R2=De([N2,$2,O2,A2]),x2=eu.extend({mode:Y("form").optional(),message:k(),requestedSchema:B({type:Y("object"),properties:Oe(k(),R2),required:J(k()).optional()})}),U2=eu.extend({mode:Y("url"),message:k(),elicitationId:k(),url:k().url()}),M2=De([x2,U2]),VR=et.extend({method:Y("elicitation/create"),params:M2}),E2=Ht.extend({elicitationId:k()}),K2=Wt.extend({method:Y("notifications/elicitation/complete"),params:E2}),ex=tt.extend({action:Ve(["accept","decline","cancel"]),content:Ja((e)=>e===null?void 0:e,Oe(k(),De([k(),be(),$e(),J(k())])).optional())}),G2=B({type:Y("ref/resource"),uri:k()}),q2=B({type:Y("ref/prompt"),name:k()}),J2=_t.extend({ref:De([q2,G2]),argument:B({name:k(),value:k()}),context:B({arguments:Oe(k(),k()).optional()}).optional()}),B2=et.extend({method:Y("completion/complete"),params:J2}),tx=tt.extend({completion:Ke({values:J(k()).max(100),total:je(be().int()),hasMore:je($e())})}),H2=B({uri:k().startsWith("file://"),name:k().optional(),_meta:Oe(k(),Le()).optional()}),W2=et.extend({method:Y("roots/list"),params:_t.optional()}),F2=tt.extend({roots:J(H2)}),Z2=Wt.extend({method:Y("notifications/roots/list_changed"),params:Ht.optional()}),R_e=De([aS,_7,B2,b2,o2,t2,q7,J7,H7,F7,X7,d2,l2,hS,uS,dS,yS]),x_e=De([rS,cS,N7,Z2,sS]),U_e=De([iS,YR,QR,ex,F2,lS,gS,nu]),M_e=De([aS,XR,VR,W2,hS,uS,dS,yS]),E_e=De([rS,cS,p2,Q7,GR,FR,BR,sS,K2]),K_e=De([iS,jR,tx,JR,qR,MR,ER,KR,ou,WR,lS,gS,nu])});var X2;var iu=d(()=>{X2=Symbol("Let zodToJsonSchema decide on which parser to use")});var kS=d(()=>{iu()});var Ft=()=>{};var SS=d(()=>{qe()});var PS=()=>{};var ru=d(()=>{qe()});var IS=d(()=>{qe()});var $S=()=>{};var OS=d(()=>{qe()});var AS=d(()=>{qe();Ft()});var TS=d(()=>{qe()});var vje;var au=d(()=>{vje=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});var cu=d(()=>{qe();au();ru();Ft()});var LS=d(()=>{qe();cu();Ft()});var DS=d(()=>{Ft()});var su=d(()=>{qe()});var CS=d(()=>{qe();su()});var zS=()=>{};var _S=d(()=>{qe()});var jS=d(()=>{qe();Ft()});var NS=d(()=>{qe()});var RS=d(()=>{qe()});var xS=d(()=>{qe()});var US=d(()=>{qe()});var MS=d(()=>{Ft()});var ES=d(()=>{Ft()});var KS=d(()=>{qe()});var GS=d(()=>{Ft();SS();PS();ru();IS();$S();OS();AS();TS();LS();DS();CS();zS();_S();jS();NS();RS();cu();xS();au();US();MS();su();ES();KS()});var qe=d(()=>{iu();GS();Ft()});var nx=()=>{};var qS=d(()=>{qe();kS();Ft()});var ox=d(()=>{qS();iu();kS();qe();nx();Ft();SS();PS();ru();IS();$S();OS();AS();TS();LS();DS();CS();zS();_S();jS();NS();RS();KS();cu();xS();au();US();MS();su();ES();GS();qS()});var rx=d(()=>{Yl();ox()});var cx=d(()=>{Yl();Eo();rx()});var rc=q((lx)=>{Object.defineProperty(lx,"__esModule",{value:!0});lx.regexpCode=lx.getEsmExportName=lx.getProperty=lx.safeStringify=lx.stringify=lx.strConcat=lx.addCodeArg=lx.str=lx._=lx.nil=lx._Code=lx.Name=lx.IDENTIFIER=lx._CodeOrName=void 0;class hu{}lx._CodeOrName=hu;lx.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class er extends hu{constructor(e){super();if(!lx.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}}}lx.Name=er;class rn extends hu{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 er)t[n.str]=(t[n.str]||0)+1;return t},{})}}lx._Code=rn;lx.nil=new rn("");function sx(e,...t){let n=[e[0]],i=0;while(i<t.length)BS(n,t[i]),n.push(e[++i]);return new rn(n)}lx._=sx;var JS=new rn("+");function hx(e,...t){let n=[ic(e[0])],i=0;while(i<t.length)n.push(JS),BS(n,t[i]),n.push(JS,ic(e[++i]));return aee(n),new rn(n)}lx.str=hx;function BS(e,t){if(t instanceof rn)e.push(...t._items);else if(t instanceof er)e.push(t);else e.push(hee(t))}lx.addCodeArg=BS;function aee(e){let t=1;while(t<e.length-1){if(e[t]===JS){let n=cee(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function cee(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof er||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 er))return`"${e}${t.slice(1)}`;return}function see(e,t){return t.emptyStr()?e:e.emptyStr()?t:hx`${e}${t}`}lx.strConcat=see;function hee(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ic(Array.isArray(e)?e.join(","):e)}function lee(e){return new rn(ic(e))}lx.stringify=lee;function ic(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}lx.safeStringify=ic;function uee(e){return typeof e=="string"&&lx.IDENTIFIER.test(e)?new rn(`.${e}`):sx`[${e}]`}lx.getProperty=uee;function dee(e){if(typeof e=="string"&&lx.IDENTIFIER.test(e))return new rn(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}lx.getEsmExportName=dee;function gee(e){return new rn(e.toString())}lx.regexpCode=gee});var ZS=q((yx)=>{Object.defineProperty(yx,"__esModule",{value:!0});yx.ValueScope=yx.ValueScopeName=yx.Scope=yx.varKinds=yx.UsedValueState=void 0;var Pt=rc();class dx extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var uu;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(uu||(yx.UsedValueState=uu={}));yx.varKinds={const:new Pt.Name("const"),let:new Pt.Name("let"),var:new Pt.Name("var")};class WS{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Pt.Name?e:this.name(e)}name(e){return new Pt.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}}}yx.Scope=WS;class FS extends Pt.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=Pt._`.${new Pt.Name(t)}[${n}]`}}yx.ValueScopeName=FS;var Oee=Pt._`\n`;class gx extends WS{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Oee:Pt.nil}}get(){return this._scope}name(e){return new FS(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,r=(n=t.key)!==null&&n!==void 0?n:t.ref,c=this._values[o];if(c){let l=c.get(r);if(l)return l}else c=this._values[o]=new Map;c.set(r,i);let s=this._scope[o]||(this._scope[o]=[]),h=s.length;return s[h]=t.ref,i.setValue(t,{property:o,itemIndex:h}),i}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 Pt._`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,(i)=>{if(i.value===void 0)throw Error(`CodeGen: name "${i}" has no value`);return i.value.code},t,n)}_reduceValues(e,t,n={},i){let o=Pt.nil;for(let r in e){let c=e[r];if(!c)continue;let s=n[r]=n[r]||new Map;c.forEach((h)=>{if(s.has(h))return;s.set(h,uu.Started);let l=t(h);if(l){let u=this.opts.es5?yx.varKinds.var:yx.varKinds.const;o=Pt._`${o}${u} ${h} = ${l};${this.opts._n}`}else if(l=i===null||i===void 0?void 0:i(h))o=Pt._`${o}${l}${this.opts._n}`;else throw new dx(h);s.set(h,uu.Completed)})}return o}}yx.ValueScope=gx});var ye=q((It)=>{Object.defineProperty(It,"__esModule",{value:!0});It.or=It.and=It.not=It.CodeGen=It.operators=It.varKinds=It.ValueScopeName=It.ValueScope=It.Scope=It.Name=It.regexpCode=It.stringify=It.getProperty=It.nil=It.strConcat=It.str=It._=void 0;var pe=rc(),an=ZS(),ho=rc();Object.defineProperty(It,"_",{enumerable:!0,get:function(){return ho._}});Object.defineProperty(It,"str",{enumerable:!0,get:function(){return ho.str}});Object.defineProperty(It,"strConcat",{enumerable:!0,get:function(){return ho.strConcat}});Object.defineProperty(It,"nil",{enumerable:!0,get:function(){return ho.nil}});Object.defineProperty(It,"getProperty",{enumerable:!0,get:function(){return ho.getProperty}});Object.defineProperty(It,"stringify",{enumerable:!0,get:function(){return ho.stringify}});Object.defineProperty(It,"regexpCode",{enumerable:!0,get:function(){return ho.regexpCode}});Object.defineProperty(It,"Name",{enumerable:!0,get:function(){return ho.Name}});var pu=ZS();Object.defineProperty(It,"Scope",{enumerable:!0,get:function(){return pu.Scope}});Object.defineProperty(It,"ValueScope",{enumerable:!0,get:function(){return pu.ValueScope}});Object.defineProperty(It,"ValueScopeName",{enumerable:!0,get:function(){return pu.ValueScopeName}});Object.defineProperty(It,"varKinds",{enumerable:!0,get:function(){return pu.varKinds}});It.operators={GT:new pe._Code(">"),GTE:new pe._Code(">="),LT:new pe._Code("<"),LTE:new pe._Code("<="),EQ:new pe._Code("==="),NEQ:new pe._Code("!=="),NOT:new pe._Code("!"),OR:new pe._Code("||"),AND:new pe._Code("&&"),ADD:new pe._Code("+")};class lo{optimizeNodes(){return this}optimizeNames(e,t){return this}}class mx extends lo{constructor(e,t,n){super();this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?an.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=nr(this.rhs,e,t);return this}get names(){return this.rhs instanceof pe._CodeOrName?this.rhs.names:{}}}class QS extends lo{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 pe.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=nr(this.rhs,e,t),this}get names(){let e=this.lhs instanceof pe.Name?{}:{...this.lhs.names};return mu(e,this.rhs)}}class px extends QS{constructor(e,t,n,i){super(e,n,i);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class wx extends lo{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class fx extends lo{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class vx extends lo{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class kx extends lo{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=nr(this.code,e,t),this}get names(){return this.code instanceof pe._CodeOrName?this.code.names:{}}}class wu extends lo{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,i=n.length;while(i--){let o=n[i];if(o.optimizeNames(e,t))continue;Dee(e,o.names),n.splice(i,1)}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Ko(e,t.names),{})}}class uo extends wu{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Sx extends wu{}class ac extends uo{}ac.kind="else";class xn extends uo{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 ac(n):n}if(t){if(e===!1)return t instanceof xn?t:t.nodes;if(this.nodes.length)return this;return new xn(Ax(e),t instanceof xn?[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=nr(this.condition,e,t),this}get names(){let e=super.names;if(mu(e,this.condition),this.else)Ko(e,this.else.names);return e}}xn.kind="if";class tr extends uo{}tr.kind="for";class Px extends tr{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=nr(this.iteration,e,t),this}get names(){return Ko(super.names,this.iteration.names)}}class Ix extends tr{constructor(e,t,n,i){super();this.varKind=e,this.name=t,this.from=n,this.to=i}render(e){let t=e.es5?an.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${t} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=mu(super.names,this.from);return mu(e,this.to)}}class XS extends tr{constructor(e,t,n,i){super();this.loop=e,this.varKind=t,this.name=n,this.iterable=i}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=nr(this.iterable,e,t),this}get names(){return Ko(super.names,this.iterable.names)}}class du extends uo{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)}}du.kind="func";class gu extends wu{render(e){return"return "+super.render(e)}}gu.kind="return";class $x extends uo{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,i;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(i=this.finally)===null||i===void 0||i.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)Ko(e,this.catch.names);if(this.finally)Ko(e,this.finally.names);return e}}class yu extends uo{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}yu.kind="catch";class bu extends uo{render(e){return"finally"+super.render(e)}}bu.kind="finally";class Ox{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
7256
7256
  `:""},this._extScope=e,this._scope=new an.Scope({parent:e}),this._nodes=[new Sx]}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,i){let o=this._scope.toName(t);if(n!==void 0&&i)this._constants[o.str]=n;return this._leafNode(new mx(e,o,n)),o}const(e,t,n){return this._def(an.varKinds.const,e,t,n)}let(e,t,n){return this._def(an.varKinds.let,e,t,n)}var(e,t,n){return this._def(an.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new QS(e,t,n))}add(e,t){return this._leafNode(new px(e,It.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==pe.nil)this._leafNode(new kx(e));return this}object(...e){let t=["{"];for(let[n,i]of e){if(t.length>1)t.push(",");if(t.push(n),n!==i||this.opts.es5)t.push(":"),(0,pe.addCodeArg)(t,i)}return t.push("}"),new pe._Code(t)}if(e,t,n){if(this._blockNode(new xn(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 xn(e))}else(){return this._elseNode(new ac)}endIf(){return this._endBlockNode(xn,ac)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new Px(e),t)}forRange(e,t,n,i,o=this.opts.es5?an.varKinds.var:an.varKinds.let){let r=this._scope.toName(e);return this._for(new Ix(o,r,t,n),()=>i(r))}forOf(e,t,n,i=an.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let r=t instanceof pe.Name?t:this.var("_arr",t);return this.forRange("_i",0,pe._`${r}.length`,(c)=>{this.var(o,pe._`${r}[${c}]`),n(o)})}return this._for(new XS("of",i,o,t),()=>n(o))}forIn(e,t,n,i=this.opts.es5?an.varKinds.var:an.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,pe._`Object.keys(${t})`,n);let o=this._scope.toName(e);return this._for(new XS("in",i,o,t),()=>n(o))}endFor(){return this._endBlockNode(tr)}label(e){return this._leafNode(new wx(e))}break(e){return this._leafNode(new fx(e))}return(e){let t=new gu;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(gu)}try(e,t,n){if(!t&&!n)throw Error('CodeGen: "try" without "catch" and "finally"');let i=new $x;if(this._blockNode(i),this.code(e),t){let o=this.name("e");this._currNode=i.catch=new yu(o),t(o)}if(n)this._currNode=i.finally=new bu,this.code(n);return this._endBlockNode(yu,bu)}throw(e){return this._leafNode(new vx(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=pe.nil,n,i){if(this._blockNode(new du(e,t,n)),i)this.code(i).endFunc();return this}endFunc(){return this._endBlockNode(du)}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 xn))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}}It.CodeGen=Ox;function Ko(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function mu(e,t){return t instanceof pe._CodeOrName?Ko(e,t.names):e}function nr(e,t,n){if(e instanceof pe.Name)return i(e);if(!o(e))return e;return new pe._Code(e._items.reduce((r,c)=>{if(c instanceof pe.Name)c=i(c);if(c instanceof pe._Code)r.push(...c._items);else r.push(c);return r},[]));function i(r){let c=n[r.str];if(c===void 0||t[r.str]!==1)return r;return delete t[r.str],c}function o(r){return r instanceof pe._Code&&r._items.some((c)=>c instanceof pe.Name&&t[c.str]===1&&n[c.str]!==void 0)}}function Dee(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function Ax(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:pe._`!${YS(e)}`}It.not=Ax;var Cee=Tx(It.operators.AND);function zee(...e){return e.reduce(Cee)}It.and=zee;var _ee=Tx(It.operators.OR);function jee(...e){return e.reduce(_ee)}It.or=jee;function Tx(e){return(t,n)=>t===pe.nil?n:n===pe.nil?t:pe._`${YS(t)} ${e} ${YS(n)}`}function YS(e){return e instanceof pe.Name?e:pe._`(${e})`}});var fe=q((xx)=>{Object.defineProperty(xx,"__esModule",{value:!0});xx.checkStrictMode=xx.getErrorPath=xx.Type=xx.useFunc=xx.setEvaluated=xx.evaluatedPropsToName=xx.mergeEvaluated=xx.eachItem=xx.unescapeJsonPointer=xx.escapeJsonPointer=xx.escapeFragment=xx.unescapeFragment=xx.schemaRefOrVal=xx.schemaHasRulesButRef=xx.schemaHasRules=xx.checkUnknownRules=xx.alwaysValidSchema=xx.toHash=void 0;var Ne=ye(),Uee=rc();function Mee(e){let t={};for(let n of e)t[n]=!0;return t}xx.toHash=Mee;function Eee(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return zx(e,t),!_x(t,e.self.RULES.all)}xx.alwaysValidSchema=Eee;function zx(e,t=e.schema){let{opts:n,self:i}=e;if(!n.strictSchema)return;if(typeof t==="boolean")return;let o=i.RULES.keywords;for(let r in t)if(!o[r])Rx(e,`unknown keyword: "${r}"`)}xx.checkUnknownRules=zx;function _x(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(t[n])return!0;return!1}xx.schemaHasRules=_x;function Kee(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}xx.schemaHasRulesButRef=Kee;function Gee({topSchemaRef:e,schemaPath:t},n,i,o){if(!o){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return Ne._`${n}`}return Ne._`${e}${t}${(0,Ne.getProperty)(i)}`}xx.schemaRefOrVal=Gee;function qee(e){return jx(decodeURIComponent(e))}xx.unescapeFragment=qee;function Jee(e){return encodeURIComponent(eP(e))}xx.escapeFragment=Jee;function eP(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}xx.escapeJsonPointer=eP;function jx(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}xx.unescapeJsonPointer=jx;function Bee(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}xx.eachItem=Bee;function Dx({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:i}){return(o,r,c,s)=>{let h=c===void 0?r:c instanceof Ne.Name?(r instanceof Ne.Name?e(o,r,c):t(o,r,c),c):r instanceof Ne.Name?(t(o,c,r),r):n(r,c);return s===Ne.Name&&!(h instanceof Ne.Name)?i(o,h):h}}xx.mergeEvaluated={props:Dx({mergeNames:(e,t,n)=>e.if(Ne._`${n} !== true && ${t} !== undefined`,()=>{e.if(Ne._`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,Ne._`${n} || {}`).code(Ne._`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if(Ne._`${n} !== true`,()=>{if(t===!0)e.assign(n,!0);else e.assign(n,Ne._`${n} || {}`),tP(e,n,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Nx}),items:Dx({mergeNames:(e,t,n)=>e.if(Ne._`${n} !== true && ${t} !== undefined`,()=>e.assign(n,Ne._`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if(Ne._`${n} !== true`,()=>e.assign(n,t===!0?!0:Ne._`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Nx(e,t){if(t===!0)return e.var("props",!0);let n=e.var("props",Ne._`{}`);if(t!==void 0)tP(e,n,t);return n}xx.evaluatedPropsToName=Nx;function tP(e,t,n){Object.keys(n).forEach((i)=>e.assign(Ne._`${t}${(0,Ne.getProperty)(i)}`,!0))}xx.setEvaluated=tP;var Cx={};function Hee(e,t){return e.scopeValue("func",{ref:t,code:Cx[t.code]||(Cx[t.code]=new Uee._Code(t.code))})}xx.useFunc=Hee;var VS;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(VS||(xx.Type=VS={}));function Wee(e,t,n){if(e instanceof Ne.Name){let i=t===VS.Num;return n?i?Ne._`"[" + ${e} + "]"`:Ne._`"['" + ${e} + "']"`:i?Ne._`"/" + ${e}`:Ne._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,Ne.getProperty)(e).toString():"/"+eP(e)}xx.getErrorPath=Wee;function Rx(e,t,n=e.opts.strictSchema){if(!n)return;if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}xx.checkStrictMode=Rx});var Un=q((Mx)=>{Object.defineProperty(Mx,"__esModule",{value:!0});var ut=ye(),ute={data:new ut.Name("data"),valCxt:new ut.Name("valCxt"),instancePath:new ut.Name("instancePath"),parentData:new ut.Name("parentData"),parentDataProperty:new ut.Name("parentDataProperty"),rootData:new ut.Name("rootData"),dynamicAnchors:new ut.Name("dynamicAnchors"),vErrors:new ut.Name("vErrors"),errors:new ut.Name("errors"),this:new ut.Name("this"),self:new ut.Name("self"),scope:new ut.Name("scope"),json:new ut.Name("json"),jsonPos:new ut.Name("jsonPos"),jsonLen:new ut.Name("jsonLen"),jsonPart:new ut.Name("jsonPart")};Mx.default=ute});var cc=q((qx)=>{Object.defineProperty(qx,"__esModule",{value:!0});qx.extendErrors=qx.resetErrorsCount=qx.reportExtraError=qx.reportError=qx.keyword$DataError=qx.keywordError=void 0;var ve=ye(),vu=fe(),mt=Un();qx.keywordError={message:({keyword:e})=>ve.str`must pass "${e}" keyword validation`};qx.keyword$DataError={message:({keyword:e,schemaType:t})=>t?ve.str`"${e}" keyword must be ${t} ($data)`:ve.str`"${e}" keyword is invalid ($data)`};function gte(e,t=qx.keywordError,n,i){let{it:o}=e,{gen:r,compositeRule:c,allErrors:s}=o,h=Gx(e,t,n);if(i!==null&&i!==void 0?i:c||s)Ex(r,h);else Kx(o,ve._`[${h}]`)}qx.reportError=gte;function yte(e,t=qx.keywordError,n){let{it:i}=e,{gen:o,compositeRule:r,allErrors:c}=i,s=Gx(e,t,n);if(Ex(o,s),!(r||c))Kx(i,mt.default.vErrors)}qx.reportExtraError=yte;function bte(e,t){e.assign(mt.default.errors,t),e.if(ve._`${mt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(ve._`${mt.default.vErrors}.length`,t),()=>e.assign(mt.default.vErrors,null)))}qx.resetErrorsCount=bte;function mte({gen:e,keyword:t,schemaValue:n,data:i,errsCount:o,it:r}){if(o===void 0)throw Error("ajv implementation error");let c=e.name("err");e.forRange("i",o,mt.default.errors,(s)=>{if(e.const(c,ve._`${mt.default.vErrors}[${s}]`),e.if(ve._`${c}.instancePath === undefined`,()=>e.assign(ve._`${c}.instancePath`,(0,ve.strConcat)(mt.default.instancePath,r.errorPath))),e.assign(ve._`${c}.schemaPath`,ve.str`${r.errSchemaPath}/${t}`),r.opts.verbose)e.assign(ve._`${c}.schema`,n),e.assign(ve._`${c}.data`,i)})}qx.extendErrors=mte;function Ex(e,t){let n=e.const("err",t);e.if(ve._`${mt.default.vErrors} === null`,()=>e.assign(mt.default.vErrors,ve._`[${n}]`),ve._`${mt.default.vErrors}.push(${n})`),e.code(ve._`${mt.default.errors}++`)}function Kx(e,t){let{gen:n,validateName:i,schemaEnv:o}=e;if(o.$async)n.throw(ve._`new ${e.ValidationError}(${t})`);else n.assign(ve._`${i}.errors`,t),n.return(!1)}var Go={keyword:new ve.Name("keyword"),schemaPath:new ve.Name("schemaPath"),params:new ve.Name("params"),propertyName:new ve.Name("propertyName"),message:new ve.Name("message"),schema:new ve.Name("schema"),parentSchema:new ve.Name("parentSchema")};function Gx(e,t,n){let{createErrors:i}=e.it;if(i===!1)return ve._`{}`;return pte(e,t,n)}function pte(e,t,n={}){let{gen:i,it:o}=e,r=[wte(o,n),fte(e,n)];return vte(e,t,r),i.object(...r)}function wte({errorPath:e},{instancePath:t}){let n=t?ve.str`${e}${(0,vu.getErrorPath)(t,vu.Type.Str)}`:e;return[mt.default.instancePath,(0,ve.strConcat)(mt.default.instancePath,n)]}function fte({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:i}){let o=i?t:ve.str`${t}/${e}`;if(n)o=ve.str`${o}${(0,vu.getErrorPath)(n,vu.Type.Str)}`;return[Go.schemaPath,o]}function vte(e,{params:t,message:n},i){let{keyword:o,data:r,schemaValue:c,it:s}=e,{opts:h,propertyName:l,topSchemaRef:u,schemaPath:g}=s;if(i.push([Go.keyword,o],[Go.params,typeof t=="function"?t(e):t||ve._`{}`]),h.messages)i.push([Go.message,typeof n=="function"?n(e):n]);if(h.verbose)i.push([Go.schema,c],[Go.parentSchema,ve._`${u}${g}`],[mt.default.data,r]);if(l)i.push([Go.propertyName,l])}});var Fx=q((Hx)=>{Object.defineProperty(Hx,"__esModule",{value:!0});Hx.boolOrEmptySchema=Hx.topBoolOrEmptySchema=void 0;var $te=cc(),Ote=ye(),Ate=Un(),Tte={message:"boolean schema is false"};function Lte(e){let{gen:t,schema:n,validateName:i}=e;if(n===!1)Bx(e,!1);else if(typeof n=="object"&&n.$async===!0)t.return(Ate.default.data);else t.assign(Ote._`${i}.errors`,null),t.return(!0)}Hx.topBoolOrEmptySchema=Lte;function Dte(e,t){let{gen:n,schema:i}=e;if(i===!1)n.var(t,!1),Bx(e);else n.var(t,!0)}Hx.boolOrEmptySchema=Dte;function Bx(e,t){let{gen:n,data:i}=e,o={gen:n,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,$te.reportError)(o,Tte,void 0,t)}});var oP=q((Zx)=>{Object.defineProperty(Zx,"__esModule",{value:!0});Zx.getRules=Zx.isJSONType=void 0;var zte=["string","number","integer","boolean","null","object","array"],_te=new Set(zte);function jte(e){return typeof e=="string"&&_te.has(e)}Zx.isJSONType=jte;function Nte(){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:{}}}Zx.getRules=Nte});var iP=q((Vx)=>{Object.defineProperty(Vx,"__esModule",{value:!0});Vx.shouldUseRule=Vx.shouldUseGroup=Vx.schemaHasRulesForType=void 0;function xte({schema:e,self:t},n){let i=t.RULES.types[n];return i&&i!==!0&&Yx(e,i)}Vx.schemaHasRulesForType=xte;function Yx(e,t){return t.rules.some((n)=>Qx(e,n))}Vx.shouldUseGroup=Yx;function Qx(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some((i)=>e[i]!==void 0))}Vx.shouldUseRule=Qx});var sc=q((iU)=>{Object.defineProperty(iU,"__esModule",{value:!0});iU.reportTypeError=iU.checkDataTypes=iU.checkDataType=iU.coerceAndCheckDataType=iU.getJSONTypes=iU.getSchemaTypes=iU.DataType=void 0;var Ete=oP(),Kte=iP(),Gte=cc(),de=ye(),tU=fe(),or;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(or||(iU.DataType=or={}));function qte(e){let t=nU(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}iU.getSchemaTypes=qte;function nU(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(Ete.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}iU.getJSONTypes=nU;function Jte(e,t){let{gen:n,data:i,opts:o}=e,r=Bte(t,o.coerceTypes),c=t.length>0&&!(r.length===0&&t.length===1&&(0,Kte.schemaHasRulesForType)(e,t[0]));if(c){let s=aP(t,i,o.strictNumbers,or.Wrong);n.if(s,()=>{if(r.length)Hte(e,t,r);else cP(e)})}return c}iU.coerceAndCheckDataType=Jte;var oU=new Set(["string","number","integer","boolean","null"]);function Bte(e,t){return t?e.filter((n)=>oU.has(n)||t==="array"&&n==="array"):[]}function Hte(e,t,n){let{gen:i,data:o,opts:r}=e,c=i.let("dataType",de._`typeof ${o}`),s=i.let("coerced",de._`undefined`);if(r.coerceTypes==="array")i.if(de._`${c} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>i.assign(o,de._`${o}[0]`).assign(c,de._`typeof ${o}`).if(aP(t,o,r.strictNumbers),()=>i.assign(s,o)));i.if(de._`${s} !== undefined`);for(let l of n)if(oU.has(l)||l==="array"&&r.coerceTypes==="array")h(l);i.else(),cP(e),i.endIf(),i.if(de._`${s} !== undefined`,()=>{i.assign(o,s),Wte(e,s)});function h(l){switch(l){case"string":i.elseIf(de._`${c} == "number" || ${c} == "boolean"`).assign(s,de._`"" + ${o}`).elseIf(de._`${o} === null`).assign(s,de._`""`);return;case"number":i.elseIf(de._`${c} == "boolean" || ${o} === null
7257
7257
  || (${c} == "string" && ${o} && ${o} == +${o})`).assign(s,de._`+${o}`);return;case"integer":i.elseIf(de._`${c} === "boolean" || ${o} === null
7258
7258
  || (${c} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(s,de._`+${o}`);return;case"boolean":i.elseIf(de._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(s,!1).elseIf(de._`${o} === "true" || ${o} === 1`).assign(s,!0);return;case"null":i.elseIf(de._`${o} === "" || ${o} === 0 || ${o} === false`),i.assign(s,null);return;case"array":i.elseIf(de._`${c} === "string" || ${c} === "number"
@@ -8393,7 +8393,7 @@ Connect 1Password so Sazabi agents can work with your vaults and secrets through
8393
8393
  1Password does not yet offer a hosted MCP endpoint Sazabi can connect to, so this connector is listed but not yet connectable from settings. Use the 1Password CLI sandbox preset for agent access today.
8394
8394
  `.trim()});import{dirname as Fse,resolve as Zse}from"node:path";import{fileURLToPath as Xse}from"node:url";var Yse,EE,KE,Qse,GE,Vse,ehe,the,qE;var ZP=d(()=>{me();Gl();Yse=Zse(Fse(Xse(import.meta.url)),"../../../skills"),EE=["airbyte","atlassian","attio","autumn","aws","axiom","better-stack","braintrust","calendly","cekura","checkly","clay","clerk","cloudflare","composio","context-dev","custom","datadog","deepwiki","elastic-cloud","exa","gcp","google-drive","grafana","granola","happenstance","honeycomb","incident-io","intercom","langfuse","langsmith","linear","logfire","mercury","neon","notion","onepassword","paper","plug","posthog","plain","planetscale","pylon","railway","render","rentahuman","resend","respan","salesforce","sentry","signoz","slack","stripe","supabase","superhuman","the-context-company","vercel","x"],KE=a.enum(EE),Qse=a.object({readOnlyToolNames:a.array(a.string()).optional(),blockedToolNames:a.array(a.string()).optional(),defaultUnavailableReason:a.enum(Kl).optional(),allowWriteTools:a.boolean().optional()}),GE=a.object({registrationEndpoint:a.string().url(),tokenEndpointAuthMethod:a.enum(El).optional(),includeScopesInRegistration:a.boolean().optional()}),Vse=a.object({providerConfigKey:a.string().min(1),callbackPathSegment:a.string().min(1),authorizationUrl:a.string().url().optional(),tokenUrl:a.string().url().optional(),resourceUrl:a.string().url().optional(),useServerUrlAsResource:a.boolean().optional(),omitScopeFromAuthorizationUrl:a.boolean().optional(),authorizationUrlParams:a.record(a.string(),a.string()).optional(),dynamicClientRegistration:GE.optional()}),ehe=a.object({label:a.string().min(1),serverUrl:a.string().url(),authorizationUrl:a.string().url().optional(),tokenUrl:a.string().url().optional(),resourceUrl:a.string().url().optional(),dynamicClientRegistration:GE.optional()}),the=a.object({id:a.string().min(1),title:a.string().min(1),description:a.string().optional(),body:a.string().min(1),fieldKeys:a.array(a.string().min(1)).optional(),imageKeys:a.array(a.string().min(1)).optional()}),qE=a.object({id:a.string().min(1),label:a.string().min(1),iconKey:KE,defaultServerUrl:a.string().url().nullable(),serverUrlPathSuffixMaxSegments:a.number().int().positive().optional(),transport:a.enum(Jk),authMode:a.enum(Bk),availability:a.enum(Zi),oauth:Vse.optional(),regions:a.array(ehe).optional(),capabilityOverrides:Qse.optional(),helpText:a.string().optional(),setupGroups:a.array(the).optional(),evidenceHints:a.array(a.string().min(1)).optional(),skill:a.string().min(1).optional(),setupSkill:a.string().min(1).optional(),scopesUserSelectable:a.boolean().optional()})});var D=(e)=>{return{...qE.parse(e),...e.getAvailableScopes?{getAvailableScopes:e.getAvailableScopes}:{},...e.getUrlConfiguration?{getUrlConfiguration:e.getUrlConfiguration}:{},...e.validateCredentials?{validateCredentials:e.validateCredentials}:{},...e.normalizeHeaders?{normalizeHeaders:e.normalizeHeaders}:{}}};var ee=d(()=>{ZP()});var JE;var BE=d(()=>{ee();JE=D({id:"airbyte",label:"Airbyte",iconKey:"airbyte",defaultServerUrl:"https://mcp.airbyte.ai/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"airbyte",callbackPathSegment:"airbyte",authorizationUrl:"https://mcp.airbyte.ai/authorize",tokenUrl:"https://mcp.airbyte.ai/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.airbyte.ai/register",tokenEndpointAuthMethod:"client_secret_post"}},getAvailableScopes:async()=>[],scopesUserSelectable:!1,capabilityOverrides:{defaultUnavailableReason:"write_blocked"},evidenceHints:["Airbyte Agent Engine usage (mcp.airbyte.ai) or embedded agent connectors","AIRBYTE_* environment variables or Airbyte agent/connector client code","README/docs naming Airbyte for agent connectors to CRM, support, or analytics platforms"],helpText:"Give agents authenticated access to your connected third-party platforms (CRM, support, analytics, and more) to read and write records on your behalf.",skill:"airbyte",setupSkill:"airbyte-setup"})});var HE;var WE=d(()=>{ee();HE=D({id:"atlassian",label:"Atlassian",iconKey:"atlassian",defaultServerUrl:"https://mcp.atlassian.com/v1/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"atlassian",callbackPathSegment:"atlassian",authorizationUrl:"https://mcp.atlassian.com/v1/authorize",tokenUrl:"https://cf.mcp.atlassian.com/v1/token",dynamicClientRegistration:{registrationEndpoint:"https://cf.mcp.atlassian.com/v1/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["atlassian.com, Jira, Confluence, Jira Service Management, Compass, or Bitbucket links","Jira or Confluence project keys, issue keys, or workspace documentation","ATLASSIAN_* environment variables or scripts that call Atlassian APIs"],helpText:"Search and manage Jira, Confluence, Jira Service Management, Compass, and Bitbucket.",skill:"atlassian",setupSkill:"atlassian-setup"})});var FE;var ZE=d(()=>{ee();FE=D({id:"attio",label:"Attio",iconKey:"attio",defaultServerUrl:"https://mcp.attio.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"attio",callbackPathSegment:"attio",authorizationUrl:"https://app.attio.com/oidc/authorize",tokenUrl:"https://app.attio.com/oidc/token",dynamicClientRegistration:{registrationEndpoint:"https://app.attio.com/oauth/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"mcp",label:"MCP access",description:"Read and manage Attio CRM records, lists, tasks, notes, and meetings."},{value:"openid",required:!0},{value:"offline_access",required:!0}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["attio.com links, Attio workspace docs, or ATTIO_* environment variables","CRM account/contact workflows that reference Attio objects, lists, or tasks","README/docs naming Attio as the CRM or customer system of record"],helpText:"Search and manage Attio CRM records, lists, tasks, notes, and meetings.",skill:"attio",setupSkill:"attio-setup"})});var XE;var YE=d(()=>{ee();XE=D({id:"autumn",label:"Autumn",iconKey:"autumn",defaultServerUrl:"https://mcp.useautumn.com/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["useautumn.com / autumn-js SDK usage, AUTUMN_SECRET_KEY (am_sk_) environment variables, or an api.useautumn.com base URL","Autumn billing/pricing calls such as attach, check, track, or entitlement gating in code","README/docs naming Autumn for pricing, plans, features, credits, or usage-based billing on top of Stripe"],helpText:"Manage Autumn billing and pricing — customers, plans, features, balances, usage, and subscriptions — using an Autumn secret key.",setupGroups:[{id:"api-key",title:"Create an Autumn secret key",description:"Copy the Autumn secret key Sazabi will send to Autumn's hosted MCP endpoint.",body:"In the [Autumn dashboard](https://app.useautumn.com), open **Developer > API Keys** and copy a secret key (`am_sk_...`). Use a sandbox key to explore and a production key for live billing data. Sazabi stores it securely and sends it as `Authorization: Bearer <key>` to Autumn's MCP endpoint.",fieldKeys:["apiKey"]}],validateCredentials:DE,normalizeHeaders:TE})});var XP,H6e,QE;var YP=d(()=>{ee();XP=[{value:"us-east-1",label:"US East (N. Virginia) — us-east-1"},{value:"eu-central-1",label:"Europe (Frankfurt) — eu-central-1"}],H6e=new Set(XP.map((e)=>e.value)),QE=D({id:"aws",label:"AWS",iconKey:"aws",defaultServerUrl:"https://aws-mcp.us-east-1.api.aws/mcp",transport:"streamable-http",authMode:"aws-sigv4",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["AWS SDK usage, aws-cli, or AWS_* environment variables in code or config","CloudFormation/CDK/Terraform AWS resources, ECS/Lambda/S3/CloudWatch usage","README/runbooks naming AWS as the cloud platform"],helpText:"Query the AWS-managed AWS MCP server (AWS documentation and AWS API operations) using AWS IAM credentials. Sazabi signs each request with SigV4, so no local proxy is required.",setupGroups:[{id:"iam-credentials",title:"Create scoped IAM credentials",description:"Provide IAM credentials whose permissions match exactly what the agent should be able to do.",body:"In the AWS Console, create an IAM user or role with only the permissions Sazabi should use (for example read-only access via `ReadOnlyAccess`, or a scoped custom policy), then generate an access key. Paste the **Access key ID** and **Secret access key** below. For temporary credentials from an assumed role, also paste the **Session token**. Prefer short-lived, least-privilege credentials.",fieldKeys:["accessKeyId","secretAccessKey","sessionToken"]},{id:"region",title:"Choose the AWS region",description:"The AWS MCP server is region-scoped; pick the region to target.",body:"Select the region where AWS hosts the AWS MCP endpoint. AWS currently offers the AWS MCP server in **US East (N. Virginia) — us-east-1** and **Europe (Frankfurt) — eu-central-1** only. Sazabi builds the `https://aws-mcp.<region>.api.aws/mcp` server URL from your choice and scopes SigV4 signing to it. This is the endpoint region, not the AWS region your API operations target.",fieldKeys:["region"]}]})});var VE;var eK=d(()=>{ee();VE=D({id:"axiom",label:"Axiom",iconKey:"axiom",defaultServerUrl:"https://mcp.axiom.co/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"axiom",callbackPathSegment:"axiom",authorizationUrl:"https://mcp.axiom.co/authorize",tokenUrl:"https://mcp.axiom.co/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.axiom.co/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Axiom datasets, APL queries, AXIOM_* environment variables, or axiom CLI usage","Log drains or dashboards documented in Axiom","README/docs naming Axiom as a log or event analytics backend"],helpText:"Query Axiom datasets and logs with APL to investigate production events and incidents."})});var tK;var nK=d(()=>{ee();tK=D({id:"better-stack",label:"Better Stack",iconKey:"better-stack",defaultServerUrl:"https://mcp.betterstack.com",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"better-stack",callbackPathSegment:"better-stack",authorizationUrl:"https://betterstack.com/oauth/authorize",tokenUrl:"https://betterstack.com/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://betterstack.com/oauth/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"read",label:"Read",description:"Read Better Stack incidents, monitors, log sources, and telemetry."},{value:"write",label:"Write",description:"Acknowledge, resolve, and manage Better Stack incidents."}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Better Stack / Better Uptime monitors, heartbeats, or status pages","BETTERSTACK_* or LOGTAIL_* environment variables, or Logtail/Better Stack log drains","README/docs naming Better Stack for uptime monitoring, incidents, or log management"],helpText:"Browse Better Stack incidents, monitors, and log sources, and build telemetry queries to investigate production issues."})});var oK;var iK=d(()=>{ee();oK=D({id:"braintrust",label:"Braintrust",iconKey:"braintrust",defaultServerUrl:"https://api.braintrust.dev/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["braintrust or autoevals packages, or BRAINTRUST_API_KEY environment variables","Braintrust eval/logging/tracing usage in code or CI (e.g. braintrust eval)","README/docs naming Braintrust for LLM evals, prompt/experiment tracking, or observability"],helpText:"Query Braintrust experiments, datasets, prompts, and logs using a Braintrust API key.",setupGroups:[{id:"api-key",title:"Create a Braintrust API key",description:"Generate the Braintrust API key the hosted MCP server will use.",body:"In Braintrust, go to **Settings > API keys** (https://www.braintrust.dev/app/settings/api-keys) and create an API key. Copy the generated key. The hosted MCP server lives at `https://api.braintrust.dev/mcp` (use `https://api-eu.braintrust.dev/mcp` if your data lives in the EU data plane).",fieldKeys:["apiKey"]}],validateCredentials:gE,normalizeHeaders:dE})});var rK;var aK=d(()=>{ee();rK=D({id:"calendly",label:"Calendly",iconKey:"calendly",defaultServerUrl:"https://mcp.calendly.com",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"calendly",callbackPathSegment:"calendly",authorizationUrl:"https://calendly.com/oauth/authorize",tokenUrl:"https://calendly.com/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://calendly.com/oauth/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["calendly.com scheduling links or Calendly webhook handlers","CALENDLY_* environment variables or API integrations","README/docs naming Calendly for customer calls, interviews, or demos"],helpText:"Check availability, create scheduling links, and manage meetings in Calendly."})});var cK;var sK=d(()=>{ee();cK=D({id:"cekura",label:"Cekura",iconKey:"cekura",defaultServerUrl:"https://api.cekura.ai/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",evidenceHints:["Cekura workflow tests, monitor configs, or CEKURA_* environment variables","Agent evaluation or production monitor docs naming Cekura","Synthetic user-flow tests for AI agents"],helpText:"Test, monitor, and evaluate AI agent workflows with Cekura.",setupGroups:[{id:"api-key",title:"Create an API key",description:"Create or copy the API key Sazabi will send to Cekura's hosted MCP endpoint.",body:"Create or copy a project-scoped Cekura [API key](https://dashboard.cekura.ai/settings/org/api-key) when possible, then paste it below.",fieldKeys:["apiKey"]}],validateCredentials:UE})});var hK;var lK=d(()=>{ee();hK=D({id:"checkly",label:"Checkly MCP",iconKey:"checkly",defaultServerUrl:"https://api.checklyhq.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"disabled",oauth:{providerConfigKey:"checkly",callbackPathSegment:"checkly"},getAvailableScopes:async()=>[{value:"checkly:account:read"},{value:"checkly:account:invite"},{value:"checkly:checks:read"},{value:"checkly:checks:run"},{value:"checkly:incidents:read"},{value:"checkly:incidents:write"},{value:"checkly:environment-variables:read"},{value:"checkly:environment-variables:write"},{value:"checkly:status-pages:read"},{value:"checkly:rca:read"},{value:"checkly:rca:run"},{value:"checkly:test-sessions:read"},{value:"checkly:assets:read"}],scopesUserSelectable:!1,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["checkly.config.ts/js, __checks__ directories, @checkly/cli, or CHECKLY_* environment variables","README/docs naming Checkly for synthetic monitoring, API checks, or browser checks","Runbooks that inspect Checkly check results, test sessions, RCA, status pages, or incidents"],helpText:"Query Checkly synthetic monitoring (checks, check results, test sessions, RCA, status pages, and incidents) over Checkly's official OAuth MCP server. Disabled until Sazabi has a Checkly-approved OAuth client, because Checkly rejects Dynamic Client Registration."})});var uK;var dK=d(()=>{ee();uK=D({id:"circleback",label:"Circleback",iconKey:"plug",defaultServerUrl:"https://circleback.ai/api/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"circleback",callbackPathSegment:"circleback",authorizationUrl:"https://circleback.ai/api/oauth/authorize",tokenUrl:"https://circleback.ai/api/oauth/access-token",dynamicClientRegistration:{registrationEndpoint:"https://circleback.ai/api/oauth/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["circleback.ai meeting links, Circleback notes exports, or CIRCLEBACK_* environment variables","Incident, customer-call, or product-feedback docs naming Circleback","Operational runbooks that refer to meeting notes or transcripts in Circleback"],helpText:"Search Circleback meeting notes, transcripts, action items, and calendar/email context."})});var gK;var yK=d(()=>{ee();gK=D({id:"clay",label:"Clay",iconKey:"clay",defaultServerUrl:"https://mcp.clay.earth/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"clay",callbackPathSegment:"clay",authorizationUrl:"https://mcp.clay.earth/authorize",tokenUrl:"https://mcp.clay.earth/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.clay.earth/register",tokenEndpointAuthMethod:"client_secret_post"}},getAvailableScopes:async()=>[{value:"openid",required:!0},{value:"read",label:"Read access",description:"Read Clay contacts, interactions, notes, and workspace workflows."},{value:"write",label:"Write access",description:"Create and update Clay records and workspace workflows."}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Clay workflow URLs, clay.earth links, or CLAY_* environment variables","Outbound enrichment, lead routing, or contact workflow docs naming Clay","Code or scripts that sync contacts, notes, or workspace workflows with Clay"],helpText:"Search Clay contacts, interactions, notes, and workspace workflows."})});var bK;var mK=d(()=>{ee();bK=D({id:"clerk",label:"Clerk",iconKey:"clerk",defaultServerUrl:"https://mcp.clerk.com/mcp",transport:"streamable-http",authMode:"none",availability:"enabled",capabilityOverrides:{readOnlyToolNames:["list_clerk_sdk_snippets","clerk_sdk_snippet"]},evidenceHints:["@clerk/* SDK imports, CLERK_SECRET_KEY / CLERK_PUBLISHABLE_KEY environment variables, or clerk.com URLs","Authentication, session, or organization/user management logic built on Clerk","README/docs naming Clerk for auth, sign-in flows, or user management"],helpText:"Search Clerk's public documentation and SDK implementation snippets via Clerk's hosted MCP server."})});var pK;var wK=d(()=>{ee();pK=D({id:"cloudflare",label:"Cloudflare",iconKey:"cloudflare",defaultServerUrl:"https://mcp.cloudflare.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"cloudflare",callbackPathSegment:"cloudflare",authorizationUrl:"https://mcp.cloudflare.com/authorize",tokenUrl:"https://mcp.cloudflare.com/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.cloudflare.com/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[],scopesUserSelectable:!1,regions:[{label:"Cloudflare API (all products, account-scoped)",serverUrl:"https://mcp.cloudflare.com/mcp"},{label:"Observability (Workers logs & analytics)",serverUrl:"https://observability.mcp.cloudflare.com/mcp",authorizationUrl:"https://observability.mcp.cloudflare.com/oauth/authorize",tokenUrl:"https://observability.mcp.cloudflare.com/token",dynamicClientRegistration:{registrationEndpoint:"https://observability.mcp.cloudflare.com/register",tokenEndpointAuthMethod:"none"}},{label:"Workers Bindings (D1, R2, KV, Workers)",serverUrl:"https://bindings.mcp.cloudflare.com/mcp",authorizationUrl:"https://bindings.mcp.cloudflare.com/oauth/authorize",tokenUrl:"https://bindings.mcp.cloudflare.com/token",dynamicClientRegistration:{registrationEndpoint:"https://bindings.mcp.cloudflare.com/register",tokenEndpointAuthMethod:"none"}},{label:"Workers Builds (CI/CD builds)",serverUrl:"https://builds.mcp.cloudflare.com/mcp",authorizationUrl:"https://builds.mcp.cloudflare.com/oauth/authorize",tokenUrl:"https://builds.mcp.cloudflare.com/token",dynamicClientRegistration:{registrationEndpoint:"https://builds.mcp.cloudflare.com/register",tokenEndpointAuthMethod:"none"}},{label:"Radar (Internet traffic insights)",serverUrl:"https://radar.mcp.cloudflare.com/mcp",authorizationUrl:"https://radar.mcp.cloudflare.com/oauth/authorize",tokenUrl:"https://radar.mcp.cloudflare.com/token",dynamicClientRegistration:{registrationEndpoint:"https://radar.mcp.cloudflare.com/register",tokenEndpointAuthMethod:"none"}}],capabilityOverrides:{allowWriteTools:!0},evidenceHints:["wrangler.toml / wrangler.jsonc, @cloudflare/* packages, or CLOUDFLARE_* environment variables","Cloudflare Workers, Pages, R2, D1, KV, or Durable Objects usage in code or config","README/runbooks naming Cloudflare as the CDN, edge, or Workers platform"],helpText:"Query Cloudflare Workers observability logs and analytics, bindings (D1, R2, KV), builds, and Radar insights."})});var fK;var vK=d(()=>{ee();fK=D({id:"cloudflare-api-token",label:"Cloudflare (API token)",iconKey:"cloudflare",defaultServerUrl:"https://mcp.cloudflare.com/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["wrangler.toml / wrangler.jsonc, @cloudflare/* packages, or CLOUDFLARE_* environment variables","Cloudflare Workers, Pages, R2, D1, KV, or Durable Objects usage in code or config","README/runbooks naming Cloudflare as the CDN, edge, or Workers platform"],helpText:"Query the Cloudflare API MCP server (Workers, DNS, zones, and more) using a Cloudflare API token instead of OAuth.",setupGroups:[{id:"api-token",title:"Create a Cloudflare API token",description:"Mint an API token scoped to exactly the products and permissions Sazabi should access.",imageKeys:["mcp.cloudflare-api-token.create-token"],body:"In the Cloudflare dashboard, go to **My Profile > API Tokens > Create Token**. Use a template or **Create Custom Token**, grant the permissions you want the agent to use (for example Workers Observability, DNS, or Account read), then copy the generated `cfut_...` token. Tokens with **Client IP Address Filtering** enabled are not supported by the hosted MCP server.",fieldKeys:["apiToken"]}],validateCredentials:cE,normalizeHeaders:aE})});var kK;var SK=d(()=>{ee();kK=D({id:"composio",label:"Composio",iconKey:"composio",defaultServerUrl:"https://connect.composio.dev/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Composio MCP, COMPOSIO_API_KEY, or Composio SDK usage","connect.composio.dev/mcp in MCP client configuration","README/docs naming Composio integrations, toolkits, or connected apps"],helpText:"Connect to Composio's hosted MCP server and use tools from your configured toolkit with a Composio API key.",setupGroups:[{id:"api-key",title:"Create an API key",description:"Create or copy the Composio API key Sazabi will send to Composio's hosted MCP endpoint.",body:"Create or copy an API key from the [Composio dashboard](https://app.composio.dev/settings) and paste it below. Sazabi stores it securely and sends it as the `x-consumer-api-key` header to Composio's Connect MCP endpoint.",fieldKeys:["apiKey"]}],validateCredentials:PE,normalizeHeaders:SE})});var PK;var IK=d(()=>{ee();PK=D({id:"context-dev",label:"Context.dev",iconKey:"context-dev",defaultServerUrl:"https://context-dev.stlmcp.com",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Context.dev SDK usage (context.dev on npm/PyPI/RubyGems), CONTEXT_DEV_API_KEY environment variables, or ctxt_secret_ API keys","context.dev-mcp usage or a context-dev.stlmcp.com server URL in MCP client config","README/docs naming Context.dev for brand intelligence, web scraping/crawling, or website change monitors"],helpText:"Resolve brand data, scrape and crawl websites into LLM-ready Markdown, extract structured data, and manage website-change monitors with Context.dev's hosted MCP server using your Context.dev API key.",setupGroups:[{id:"api-key",title:"Create an API key",description:"Create or copy the Context.dev API key Sazabi will send to Context.dev's hosted MCP endpoint.",body:"Create or copy an API key (`ctxt_secret_...`) from your [Context.dev dashboard](https://context.dev), then paste it below. Sazabi stores it securely and sends it as the `x-context-dev-api-key` header to Context.dev's MCP endpoint.",fieldKeys:["apiKey"]}],validateCredentials:AE,normalizeHeaders:OE,skill:"context-dev",setupSkill:"context-dev-setup"})});var $K;var OK=d(()=>{ee();$K=D({id:"custom",label:"Custom",iconKey:"plug",defaultServerUrl:null,transport:"streamable-http",authMode:"headers",availability:"custom-only",capabilityOverrides:{allowWriteTools:!0},helpText:"Connect any MCP server."})});var AK;var TK=d(()=>{ee();AK=D({id:"datadog",label:"Datadog",iconKey:"datadog",defaultServerUrl:"https://mcp.datadoghq.com/api/unstable/mcp-server/mcp?toolsets=core",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Datadog config, DD_* environment variables, or @datadog packages","datadog-agent, dd-trace, monitors, dashboards, or incident docs","README/docs naming Datadog for logs, metrics, traces, APM, or incidents"],helpText:"Browse Datadog metrics, logs, traces, and incidents using your Datadog site URL, API key, and Application Key.",setupGroups:[{id:"site",title:"Find your Datadog site",description:"Use the Datadog site URL for the region where your account lives.",body:"Copy the Datadog site URL from the top of your browser, such as `https://app.datadoghq.com` or `https://us3.datadoghq.com`. Sazabi uses this to build the matching hosted MCP endpoint.",fieldKeys:["siteUrl"]},{id:"keys",title:"Create API credentials",description:"Create or copy the two Datadog keys Sazabi needs for hosted MCP.",imageKeys:["mcp.datadog.api-keys-settings","mcp.datadog.application-keys-settings"],body:"In Datadog, go to **Organization Settings > Access > API Keys** to create or copy your API key. Then go to **Organization Settings > Access > Application Keys** to create or copy your Application Key.",fieldKeys:["apiKey","applicationKey"]}],validateCredentials:rE,normalizeHeaders:oE})});var LK;var DK=d(()=>{ee();LK=D({id:"deepwiki",label:"DeepWiki",iconKey:"deepwiki",defaultServerUrl:"https://mcp.deepwiki.com/mcp",transport:"streamable-http",authMode:"none",availability:"enabled",capabilityOverrides:{readOnlyToolNames:["read_wiki_structure","read_wiki_contents","ask_question"]},evidenceHints:["Questions about how a public GitHub repository or open-source dependency works","deepwiki.com URLs or references to DeepWiki-generated documentation","Investigations needing up-to-date docs/architecture for a third-party OSS project"],helpText:"Query public GitHub repository documentation and ask questions about open-source code via DeepWiki's hosted MCP server."})});var CK;var zK=d(()=>{ee();CK=D({id:"elastic-cloud",label:"Elastic Cloud",iconKey:"elastic-cloud",defaultServerUrl:null,transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Elasticsearch, Kibana, Elastic Agent, Beats, or Logstash config","ELASTIC_* environment variables or elasticsearch client packages","README/docs naming Elastic Cloud, Elasticsearch, or Kibana"],helpText:"Search Elasticsearch indices and query Elastic Agent Builder tools using your Kibana MCP endpoint and an Elastic API key.",setupGroups:[{id:"deployment",title:"Open Kibana",description:"Find the Kibana URL for the Elastic deployment you want to connect.",body:"Go to [Elastic Cloud deployments](https://cloud.elastic.co/deployments), open the deployment you want to connect, then open Kibana and copy the Kibana base URL from the browser. If your Kibana URL contains `/s/<space>/`, keep that space value for the connect step.",fieldKeys:["kibanaUrl","kibanaSpace"]},{id:"api-key",title:"Create an API key",description:"Create the Elastic API key that the hosted MCP server will use.",body:"In Kibana, create an API key with the Agent Builder and index read privileges required by Elastic's MCP server, then copy the generated key.",fieldKeys:["apiKey"]}],validateCredentials:iE,normalizeHeaders:nE})});var _K;var jK=d(()=>{ee();_K=D({id:"exa",label:"Exa",iconKey:"exa",defaultServerUrl:"https://mcp.exa.ai/mcp?tools=web_search_exa,web_fetch_exa,web_search_advanced_exa,agent_tools",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Exa search, EXA_API_KEY environment variables, or the exa-js / exa-py SDK","exa-mcp-server usage or a mcp.exa.ai server URL in MCP client config","README/docs naming Exa for web search, crawling, or research"],helpText:"Search the web, research companies, crawl pages, and run deep research with Exa's hosted MCP server using your Exa API key.",setupGroups:[{id:"api-key",title:"Create an API key",description:"Create or copy the Exa API key Sazabi will send to Exa's hosted MCP endpoint.",body:"Create or copy an API key from the [Exa dashboard](https://dashboard.exa.ai/api-keys), then paste it below. Sazabi stores it securely and sends it as the `x-api-key` header to Exa's MCP endpoint.",fieldKeys:["apiKey"]}],validateCredentials:kE,normalizeHeaders:vE,skill:"exa",setupSkill:"exa-setup"})});var NK;var RK=d(()=>{ee();NK=D({id:"gcp",label:"Google Cloud (GCP)",iconKey:"gcp",defaultServerUrl:"https://logging.googleapis.com/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["GOOGLE_APPLICATION_CREDENTIALS, GCLOUD_PROJECT, or GOOGLE_CLOUD_PROJECT environment variables","gcloud config, app.yaml, cloudbuild.yaml, or @google-cloud/* packages","README/docs naming Google Cloud, GCP, Cloud Logging, Cloud Monitoring, BigQuery, Cloud Run, or GKE"],helpText:"Query Google Cloud (Cloud Logging, Monitoring, BigQuery, and more) using a Google OAuth 2.0 Bearer access token.",setupGroups:[{id:"server-url",title:"Choose the Google Cloud MCP endpoint",description:"Google exposes a separate remote MCP server per product at https://SERVICE.googleapis.com/mcp.",body:"Sazabi defaults to Cloud Logging (`https://logging.googleapis.com/mcp`). To use a different product, replace the server URL with its endpoint, such as `https://monitoring.googleapis.com/mcp` (Cloud Monitoring) or `https://bigquery.googleapis.com/mcp` (BigQuery). See the [supported products list](https://docs.cloud.google.com/mcp/supported-products)."},{id:"access-token",title:"Create a Google OAuth 2.0 access token",description:"Generate a Google access token scoped by IAM to the resources Sazabi should read.",body:"The hosted servers authenticate with a Google OAuth 2.0 Bearer access token. For a non-interactive token, install the [gcloud CLI](https://docs.cloud.google.com/mcp/authenticate-mcp), configure Application Default Credentials (a user login, service-account key, or impersonation), then run `gcloud auth application-default print-access-token` and copy the token. Paste the raw token into Sazabi — Sazabi adds the `Bearer ` prefix and sends it in the `Authorization` header. Google access tokens are short-lived, so refresh the token when it expires.",fieldKeys:["accessToken"]}],validateCredentials:xE,normalizeHeaders:RE})});var xK;var UK=d(()=>{ee();xK=D({id:"google-drive",label:"Google Drive",iconKey:"google-drive",defaultServerUrl:"https://drivemcp.googleapis.com/mcp/v1",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"google-drive",callbackPathSegment:"google-drive",authorizationUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",authorizationUrlParams:{access_type:"offline",prompt:"consent"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"https://www.googleapis.com/auth/drive.readonly",label:"Drive read",description:"Read files and metadata in the user's Google Drive through the hosted MCP server."}],setupGroups:[{id:"google-cloud-oauth-client",title:"Create an OAuth client in Google Cloud",description:"The Google Drive MCP server does not support automatic client registration. An admin must create an OAuth client in a Google Cloud project and provide its credentials to Sazabi.",body:["1. In the Google Cloud console, open **APIs & Services → OAuth consent screen** and configure the consent screen with the Drive scopes.","2. Under **APIs & Services → Credentials**, create an **OAuth client ID** of type **Web application**.","3. Add the Sazabi Google Drive MCP callback URL shown on this page as an **Authorized redirect URI**.","4. Enable both the **Google Drive API** and the **Google Drive MCP API** (`drivemcp.googleapis.com`) for the project. Both are required for the hosted MCP server to be reachable.","5. Provide the generated **Client ID** and **Client Secret** to your Sazabi deployment configuration."].join(`
8395
8395
  `)}],evidenceHints:["drive.google.com / docs.google.com links, or Google Drive file IDs in runbooks","googleapis / google-auth-library packages, or GOOGLE_* / GDRIVE_* environment variables","README/runbooks naming Google Drive as a document or asset store"],helpText:"Search and read files and metadata in a Google Drive through Google's hosted MCP server."})});var MK;var EK=d(()=>{ee();MK=D({id:"grafana",label:"Grafana Cloud",iconKey:"grafana",defaultServerUrl:"https://mcp.grafana.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"grafana",callbackPathSegment:"grafana",authorizationUrl:"https://mcp.grafana.com/mcp/oauth/authorize",tokenUrl:"https://mcp.grafana.com/mcp/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.grafana.com/mcp/oauth/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"grafana:read",label:"Read",description:"Read Grafana dashboards, panels, metrics, logs, traces, alerts, and incidents."},{value:"grafana:write",label:"Write",description:"Create and modify Grafana resources. Write tools require explicit approval per your organization's tool policy."}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["grafana.net / grafana.com links, Grafana dashboards, or GRAFANA_* environment variables","Prometheus, Loki, Tempo, or Mimir data sources wired into Grafana","README/runbooks naming Grafana for dashboards, metrics, logs, traces, or alerts"],helpText:"Browse Grafana dashboards, metrics, logs, traces, and alerts across your Grafana Cloud stack."})});var KK;var GK=d(()=>{ee();KK=D({id:"granola",label:"Granola",iconKey:"granola",defaultServerUrl:"https://mcp.granola.ai/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"granola",callbackPathSegment:"granola",authorizationUrl:"https://mcp-auth.granola.ai/oauth2/authorize",tokenUrl:"https://mcp-auth.granola.ai/oauth2/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp-auth.granola.ai/oauth2/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["granola.ai meeting links, Granola notes exports, or GRANOLA_* environment variables","Incident, customer-call, or product-feedback docs naming Granola","Operational runbooks that refer to meeting notes or transcripts in Granola"],helpText:"Search and browse Granola meeting notes, transcripts, and folders."})});var qK;var JK=d(()=>{ee();qK=D({id:"happenstance",label:"Happenstance",iconKey:"happenstance",defaultServerUrl:"https://happenstance.ai/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"happenstance",callbackPathSegment:"happenstance",authorizationUrl:"https://happenstance.ai/oauth/authorize",tokenUrl:"https://clerk.happenstance.ai/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://clerk.happenstance.ai/oauth/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"profile",label:"Profile",description:"Read your Happenstance profile."},{value:"email",label:"Email",description:"Read the email associated with your Happenstance account."},{value:"offline_access",label:"Offline access",description:"Keep the connection alive by refreshing access without re-authentication."}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["happenstance.ai links or references to a Happenstance network/graph","HAPPENSTANCE_* environment variables or scripts calling Happenstance APIs","Docs naming Happenstance as the people/relationship search tool"],helpText:"Search your Happenstance network to find and get introduced to people."})});var BK;var HK=d(()=>{ee();BK=D({id:"honeycomb",label:"Honeycomb",iconKey:"honeycomb",defaultServerUrl:"https://mcp.honeycomb.io/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"honeycomb",callbackPathSegment:"honeycomb",authorizationUrl:"https://ui.honeycomb.io/oauth/authorize",tokenUrl:"https://ui.honeycomb.io/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://ui.honeycomb.io/oauth/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"mcp:read",label:"Read",description:"Query Honeycomb environments, datasets, columns, boards, triggers, SLOs, and run queries."},{value:"mcp:write",label:"Write",description:"Create and update Honeycomb boards, triggers, and other resources."}],scopesUserSelectable:!1,regions:[{label:"United States (US)",serverUrl:"https://mcp.honeycomb.io/mcp"},{label:"Europe (EU)",serverUrl:"https://mcp.eu1.honeycomb.io/mcp",authorizationUrl:"https://ui.eu1.honeycomb.io/oauth/authorize",tokenUrl:"https://ui.eu1.honeycomb.io/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://ui.eu1.honeycomb.io/oauth/register",tokenEndpointAuthMethod:"none"}}],capabilityOverrides:{allowWriteTools:!0},evidenceHints:["honeycomb.io URLs, HONEYCOMB_API_KEY / HONEYCOMB_DATASET environment variables, or honeycomb:// dataset URIs","libhoney, @honeycombio packages, or OpenTelemetry exporters pointed at api.honeycomb.io / api.eu1.honeycomb.io","README/runbooks naming Honeycomb as the observability or tracing provider"],helpText:"Query Honeycomb environments, datasets, columns, boards, triggers, and run queries."})});var WK;var FK=d(()=>{ee();WK=D({id:"incident-io",label:"incident.io",iconKey:"incident-io",defaultServerUrl:"https://mcp.incident.io/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"incident-io",callbackPathSegment:"incident-io",authorizationUrl:"https://app.incident.io/auth/plugin/authorize",tokenUrl:"https://app.incident.io/auth/plugin/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.incident.io/mcp/oauth/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["incident.io alert-source URLs, escalation docs, or incident IDs","INCIDENT_IO_* environment variables or webhooks into incident.io","README/runbooks naming incident.io for incidents, alerts, or on-call"],helpText:"Browse incidents, alerts, and on-call.",skill:"incident-io",setupSkill:"incident-io-setup"})});var ZK;var XK=d(()=>{ee();ZK=D({id:"intercom",label:"Intercom",iconKey:"intercom",defaultServerUrl:"https://mcp.intercom.com/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Intercom config, INTERCOM_* environment variables, or intercom-client packages","Support inbox, conversations, help center, or customer messaging docs naming Intercom","README/docs naming Intercom for support threads or customer conversations"],helpText:"Read Intercom support conversations, contacts, and help center content using an Intercom API access token. US-hosted Intercom workspaces only.",setupGroups:[{id:"developer-app",title:"Open Intercom developer settings",description:"Use an Intercom app with an access token for the workspace you want to connect.",body:"In Intercom, go to **Settings > Integrations > Developer Hub**, open (or create) an app for your workspace, and confirm it has the permissions you want agents to use. The hosted MCP server lives at `https://mcp.intercom.com/mcp` and currently supports US-hosted Intercom workspaces only."},{id:"access-token",title:"Copy your access token",description:"Copy the Intercom API access token the hosted MCP server will use.",body:"From your Intercom app's **Authentication** section, copy the access token. Paste the raw token into Sazabi — Sazabi adds the `Bearer ` prefix and sends it in the `Authorization` header.",fieldKeys:["accessToken"]}],validateCredentials:bE,normalizeHeaders:yE})});var YK;var QK=d(()=>{ee();YK=D({id:"langfuse",label:"Langfuse",iconKey:"langfuse",defaultServerUrl:"https://us.cloud.langfuse.com/api/public/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",regions:[{label:"United States (US)",serverUrl:"https://us.cloud.langfuse.com/api/public/mcp"},{label:"Europe (EU)",serverUrl:"https://cloud.langfuse.com/api/public/mcp"},{label:"Asia Pacific (JP)",serverUrl:"https://jp.cloud.langfuse.com/api/public/mcp"}],capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Langfuse SDK usage (langfuse, langfuse-langchain) or @langfuse packages","LANGFUSE_PUBLIC_KEY / LANGFUSE_SECRET_KEY / LANGFUSE_HOST environment variables","README/docs naming Langfuse as the LLM tracing, evaluation, or observability provider"],helpText:"Query Langfuse traces, observations, metrics, scores, comments, and prompts using project API keys.",setupGroups:[{id:"region",title:"Pick your Langfuse Cloud region",description:"Select the Langfuse Cloud region that hosts your project (or use the custom connector for a self-hosted deployment).",body:"Langfuse Cloud is region-scoped: US (`https://us.cloud.langfuse.com`), EU (`https://cloud.langfuse.com`), or JP (`https://jp.cloud.langfuse.com`). Choose the region matching your Langfuse account; the hosted MCP server lives at `/api/public/mcp` on that host."},{id:"api-keys",title:"Create project API keys",description:"Generate the Langfuse project API key pair the hosted MCP server will use.",body:"In Langfuse, open **Project settings → API keys** and create a new key pair. Copy the Public key (`pk-lf-...`) and Secret key (`sk-lf-...`). Sazabi combines them into an HTTP Basic `Authorization` header (`Basic base64(publicKey:secretKey)`) and sends it to the MCP server. Paste the combined `Authorization` value into Sazabi.",fieldKeys:["authorization"]}],validateCredentials:CE,normalizeHeaders:LE})});var VK;var eG=d(()=>{ee();VK=D({id:"langsmith",label:"LangSmith",iconKey:"langsmith",defaultServerUrl:"https://api.smith.langchain.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"langsmith",callbackPathSegment:"langsmith",authorizationUrl:"https://api.smith.langchain.com/oauth/authorize",tokenUrl:"https://api.smith.langchain.com/oauth/token",resourceUrl:"https://api.smith.langchain.com/mcp",dynamicClientRegistration:{registrationEndpoint:"https://api.smith.langchain.com/oauth/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[],scopesUserSelectable:!1,regions:[{label:"GCP United States (US)",serverUrl:"https://api.smith.langchain.com/mcp"},{label:"GCP Europe (EU)",serverUrl:"https://eu.api.smith.langchain.com/mcp",authorizationUrl:"https://eu.api.smith.langchain.com/oauth/authorize",tokenUrl:"https://eu.api.smith.langchain.com/oauth/token",resourceUrl:"https://eu.api.smith.langchain.com/mcp",dynamicClientRegistration:{registrationEndpoint:"https://eu.api.smith.langchain.com/oauth/register",tokenEndpointAuthMethod:"none"}},{label:"GCP Asia Pacific (APAC)",serverUrl:"https://apac.api.smith.langchain.com/mcp",authorizationUrl:"https://apac.api.smith.langchain.com/oauth/authorize",tokenUrl:"https://apac.api.smith.langchain.com/oauth/token",resourceUrl:"https://apac.api.smith.langchain.com/mcp",dynamicClientRegistration:{registrationEndpoint:"https://apac.api.smith.langchain.com/oauth/register",tokenEndpointAuthMethod:"none"}},{label:"AWS United States (US)",serverUrl:"https://aws.api.smith.langchain.com/mcp",authorizationUrl:"https://aws.api.smith.langchain.com/oauth/authorize",tokenUrl:"https://aws.api.smith.langchain.com/oauth/token",resourceUrl:"https://aws.api.smith.langchain.com/mcp",dynamicClientRegistration:{registrationEndpoint:"https://aws.api.smith.langchain.com/oauth/register",tokenEndpointAuthMethod:"none"}}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["LANGSMITH_* or LANGCHAIN_* environment variables, or langsmith SDK usage","LangSmith tracing projects, runs, datasets, or evaluations","README/docs naming LangSmith for LLM tracing, evals, or observability"],helpText:"Query LangSmith tracing projects, runs, datasets, and evaluations to investigate LLM application behavior."})});var tG;var nG=d(()=>{ee();tG=D({id:"linear",label:"Linear",iconKey:"linear",defaultServerUrl:"https://mcp.linear.app/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"linear",callbackPathSegment:"linear",authorizationUrl:"https://mcp.linear.app/authorize",tokenUrl:"https://mcp.linear.app/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.linear.app/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"read",label:"Read",description:"Read Linear issues, projects, teams, comments, and related data."},{value:"write",label:"Write",description:"Create and update Linear issues, comments, and project data."}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},skill:"linear",setupSkill:"linear-setup",evidenceHints:["linear.app URLs, Linear issue keys, or team/project IDs in docs","LINEAR_* environment variables or scripts that call Linear APIs","README/runbooks naming Linear as the issue tracker or planning system"],helpText:"Browse and manage Linear issues and projects."})});var oG;var iG=d(()=>{ee();oG=D({id:"logfire",label:"Pydantic Logfire",iconKey:"logfire",defaultServerUrl:"https://logfire-us.pydantic.dev/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"logfire",callbackPathSegment:"logfire",authorizationUrl:"https://logfire-us.pydantic.dev/api/oauth/authorize",tokenUrl:"https://logfire-us.pydantic.dev/api/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://logfire-us.pydantic.dev/api/oauth/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"openid",required:!0},{value:"organization:read_channel"},{value:"project:read"},{value:"project:read_alert"},{value:"project:read_dashboard"},{value:"project:read_variables"}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Pydantic Logfire config, LOGFIRE_* environment variables, or logfire SDK packages","Python/Pydantic observability docs naming Logfire","Alerts, dashboards, or traces hosted in Logfire"],helpText:"Query Pydantic Logfire traces, metrics, and exceptions, and browse projects, alerts, dashboards, and schedules."})});var rG;var aG=d(()=>{ee();rG=D({id:"mercury",label:"Mercury",iconKey:"mercury",defaultServerUrl:"https://mcp.mercury.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"mercury",callbackPathSegment:"mercury",authorizationUrl:"https://mcp.mercury.com/authorize",tokenUrl:"https://mcp.mercury.com/token",resourceUrl:"https://mcp.mercury.com/mcp",omitScopeFromAuthorizationUrl:!0,dynamicClientRegistration:{registrationEndpoint:"https://mcp.mercury.com/register",tokenEndpointAuthMethod:"client_secret_basic",includeScopesInRegistration:!0}},getAvailableScopes:async()=>[{value:"read",label:"Read access",description:"Read Mercury accounts, cards, recipients, transactions, treasury, and organization data."}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!1},skill:"mercury",setupSkill:"mercury-setup",evidenceHints:["Mercury dashboard links, mercury.com references, or Mercury API usage","MERCURY_* environment variables or docs mentioning Mercury banking","Treasury, card, account, recipient, or transaction workflows backed by Mercury"],helpText:"Search Mercury banking data including accounts, cards, recipients, transactions, treasury, and organization records."})});var cG;var sG=d(()=>{ee();cG=D({id:"neon",label:"Neon",iconKey:"neon",defaultServerUrl:"https://mcp.neon.tech/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"neon",callbackPathSegment:"neon",authorizationUrl:"https://mcp.neon.tech/api/authorize",tokenUrl:"https://mcp.neon.tech/api/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.neon.tech/api/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"read",label:"Read",description:"Read Neon projects, branches, databases, and run queries."},{value:"write",label:"Write",description:"Create and modify Neon projects, branches, and databases."},{value:"*",label:"Full access",description:"All access - read and manage every Neon resource the connected account can reach."}],getUrlConfiguration:async()=>({docsUrl:"https://neon.com/docs/ai/neon-mcp-server",instructions:"Start with https://mcp.neon.tech/mcp. To narrow access, append query params such as `?readonly=true`, `&projectId=<id>`, and/or `&category=<groups>`, then copy the resulting Server URL.",defaultServerUrl:"https://mcp.neon.tech/mcp",imageKeys:["mcp.neon.projects-console","mcp.neon.project-settings-details"],optional:!0}),capabilityOverrides:{allowWriteTools:!0},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"],helpText:"Manage Neon projects, branches, databases, and run SQL queries."})});var hG;var lG=d(()=>{ee();hG=D({id:"notion",label:"Notion",iconKey:"notion",defaultServerUrl:"https://mcp.notion.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"notion",callbackPathSegment:"notion",authorizationUrl:"https://mcp.notion.com/authorize",tokenUrl:"https://mcp.notion.com/token",resourceUrl:"https://mcp.notion.com/mcp",dynamicClientRegistration:{registrationEndpoint:"https://mcp.notion.com/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"default",label:"Default",description:"Access Notion pages, databases, and workspace content via MCP."}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},skill:"notion",setupSkill:"notion-setup",evidenceHints:["notion.so URLs, Notion page IDs, or database IDs in docs","NOTION_* environment variables or scripts that call Notion APIs","README/runbooks naming Notion as the wiki or knowledge base"],helpText:"Browse and manage Notion pages, databases, and workspace content."})});var uG;var dG=d(()=>{ee();uG=D({id:"1password",label:"1Password",iconKey:"onepassword",defaultServerUrl:"https://developer.1password.com/get-started/secure-ai-access",transport:"streamable-http",authMode:"none",availability:"disabled",getUrlConfiguration:async()=>null,evidenceHints:["1Password service-account tokens (ops_...), op CLI usage, or OP_SERVICE_ACCOUNT_TOKEN","1password.com / *.1password.com references, or op:// secret references","README/docs naming 1Password as the secrets manager or vault"],helpText:"Access 1Password via its documented secure AI access options. A general-purpose hosted MCP server is not available today; use the 1Password CLI (op) sandbox preset instead."})});var gG;var yG=d(()=>{ee();gG=D({id:"paper",label:"Paper MCP",iconKey:"paper",defaultServerUrl:"http://127.0.0.1:29979/mcp",transport:"streamable-http",authMode:"none",availability:"disabled",getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["paper.design URLs, Paper Desktop app references, or PAPER_* environment variables","Design files, component libraries, or design-system docs naming Paper","HTML-to-PDF slide or presentation workflows that reference Paper"],helpText:"Read and write Paper design files, including nodes, selections, text content, and design-system elements."})});var bG;var mG=d(()=>{ee();bG=D({id:"plain",label:"Plain",iconKey:"plain",defaultServerUrl:"https://mcp.plain.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"plain",callbackPathSegment:"plain",authorizationUrl:"https://signin.auth.plain.com/oauth2/authorize",tokenUrl:"https://signin.auth.plain.com/oauth2/token",dynamicClientRegistration:{registrationEndpoint:"https://signin.auth.plain.com/oauth2/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"openid",required:!0},{value:"offline_access",required:!0}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["plain.com links, Plain customer/thread IDs, or PLAIN_* environment variables","Support inbox, customer thread, or tenant docs naming Plain","Code or scripts syncing customers, tenants, or support threads with Plain"],helpText:"Search and manage Plain support threads, customers, and tenants.",skill:"plain",setupSkill:"plain-setup"})});var pG;var wG=d(()=>{ee();pG=D({id:"planetscale",label:"PlanetScale",iconKey:"planetscale",defaultServerUrl:"https://mcp.pscale.dev/mcp/planetscale",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"planetscale",callbackPathSegment:"planetscale",authorizationUrl:"https://app.planetscale.com/oauth/authorize",tokenUrl:"https://auth.planetscale.com/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://auth.planetscale.com/oauth/registration",tokenEndpointAuthMethod:"client_secret_basic"}},getAvailableScopes:async()=>[{value:"read_databases"},{value:"read_user"},{value:"read_organization"},{value:"write_databases"},{value:"write_organization"}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["PlanetScale connection strings, pscale CLI config, or planetscale.com links","PLANETSCALE_* or DATABASE_URL values documented as PlanetScale","README/docs naming PlanetScale for MySQL, branching, or schema changes"],helpText:"Query PlanetScale databases, inspect schema, and browse Insights data.",skill:"planetscale",setupSkill:"planetscale-setup"})});var fG;var vG=d(()=>{ee();fG=D({id:"posthog",label:"PostHog",iconKey:"posthog",defaultServerUrl:"https://mcp.posthog.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"posthog",callbackPathSegment:"posthog",authorizationUrl:"https://oauth.posthog.com/oauth/authorize/",tokenUrl:"https://oauth.posthog.com/oauth/token/",dynamicClientRegistration:{registrationEndpoint:"https://oauth.posthog.com/oauth/register/",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"query:read"},{value:"insight:read"},{value:"insight:write"},{value:"feature_flag:read"},{value:"feature_flag:write"},{value:"experiment:read"},{value:"experiment:write"},{value:"dashboard:read"},{value:"dashboard:write"},{value:"event_definition:read"},{value:"event_definition:write"},{value:"person:read"},{value:"user:read"},{value:"user:write"},{value:"organization:read"},{value:"project:read"},{value:"project:write"},{value:"survey:read"},{value:"survey:write"},{value:"error_tracking:read"},{value:"logs:read"},{value:"tracing:read"}],getUrlConfiguration:async()=>({docsUrl:"https://posthog.com/docs/model-context-protocol/faq",instructions:"Add ?features=<groups> or ?tools=<names> to limit which tools are exposed (e.g. https://mcp.posthog.com/mcp?features=flags,workspace), then copy the Server URL.",defaultServerUrl:"https://mcp.posthog.com/mcp",imageKeys:["mcp.posthog.settings-page"],optional:!0}),capabilityOverrides:{allowWriteTools:!0},evidenceHints:["posthog-js, posthog-node, POSTHOG_* or NEXT_PUBLIC_POSTHOG_* environment variables","Feature flag, experiment, session replay, or product analytics code using PostHog","README/docs naming PostHog for analytics, flags, experiments, logs, or tracing"],helpText:"Query PostHog analytics, feature flags, and experiments.",skill:"posthog",setupSkill:"posthog-setup"})});var kG;var SG=d(()=>{ee();kG=D({id:"pylon",label:"Pylon",iconKey:"pylon",defaultServerUrl:"https://mcp.usepylon.com",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"pylon",callbackPathSegment:"pylon",authorizationUrl:"https://o.auth.usepylon.com/oauth2/authorize",tokenUrl:"https://o.auth.usepylon.com/oauth2/token",dynamicClientRegistration:{registrationEndpoint:"https://o.auth.usepylon.com/oauth2/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"openid",required:!0},{value:"offline_access",required:!0}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["usepylon.com links, Pylon issue/account IDs, or PYLON_* environment variables","Customer support workflows or account runbooks naming Pylon","Code or scripts syncing support issues, accounts, or contacts with Pylon"],helpText:"Search and manage Pylon support issues, accounts, and contacts.",skill:"pylon",setupSkill:"pylon-setup"})});var PG;var IG=d(()=>{ee();PG=D({id:"railway",label:"Railway",iconKey:"railway",defaultServerUrl:"https://mcp.railway.com",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"railway",callbackPathSegment:"railway",authorizationUrl:"https://backboard.railway.com/oauth/auth",tokenUrl:"https://backboard.railway.com/oauth/token",resourceUrl:"https://mcp.railway.com",dynamicClientRegistration:{registrationEndpoint:"https://backboard.railway.com/oauth/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"openid",required:!0},{value:"profile",required:!0},{value:"email",required:!0},{value:"offline_access",required:!0},{value:"workspace:member",label:"Workspace access",description:"Read and manage Railway projects, services, deployments, variables, and logs in the workspaces the connected account belongs to."}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},skill:"railway",setupSkill:"railway-setup",evidenceHints:["railway.app / railway.com links, RAILWAY_* environment variables, or a railway.json/railway.toml in the repo","Deploy workflows or runbooks naming Railway as the hosting/PaaS provider","Railway project/service/environment IDs referenced in docs or CI"],helpText:"Manage Railway projects, services, deployments, variables, and logs."})});var $G;var OG=d(()=>{ee();$G=D({id:"render",label:"Render",iconKey:"render",defaultServerUrl:"https://mcp.render.com/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["render.com links, RENDER_* environment variables, or a render.yaml in the repo","Deploy workflows or runbooks naming Render as the hosting/PaaS provider","Render service/deploy IDs referenced in docs or CI"],helpText:"Manage Render services, deploys, environment variables, logs, and metrics.",setupGroups:[{id:"api-key",title:"Create an API key",description:"Create or copy the Render API key Sazabi will send to Render's hosted MCP endpoint.",body:"Create a Render [API key](https://dashboard.render.com/settings/api-keys) in **Account Settings > API Keys**, then paste it below.",fieldKeys:["apiKey"]}],validateCredentials:pE,normalizeHeaders:mE})});var AG;var TG=d(()=>{ee();AG=D({id:"rentahuman",label:"RentAHuman",iconKey:"rentahuman",defaultServerUrl:"https://rentahuman.ai/api/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["rentahuman.ai, RENTAHUMAN_API_KEY environment variables, or RentAHuman API keys","rentahuman-mcp usage or a rentahuman.ai/api/mcp server URL in MCP client config","README/docs naming RentAHuman for hiring humans or human-in-the-loop work"],helpText:"Hire and coordinate human workers for real-world tasks with RentAHuman's hosted MCP server using an API key.",setupGroups:[{id:"api-key",title:"Create an API key",description:"Create or copy the RentAHuman API key Sazabi will send to its hosted MCP endpoint.",body:"Create or copy an API key from the [RentAHuman API keys page](https://rentahuman.ai/account/api-keys), then paste it below. Sazabi stores it securely and sends it as the `X-API-Key` header.",fieldKeys:["apiKey"]}],validateCredentials:$E,normalizeHeaders:IE,skill:"rentahuman",setupSkill:"rentahuman-setup"})});var LG;var DG=d(()=>{ee();LG=D({id:"resend",label:"Resend",iconKey:"resend",defaultServerUrl:"https://mcp.resend.com/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Resend email API usage, RESEND_API_KEY environment variables, or the resend SDK","resend-mcp usage or a mcp.resend.com server URL in MCP client config","README/docs naming Resend for transactional or marketing email"],helpText:"Send transactional emails and manage domains, contacts, and audiences with Resend's hosted MCP server using your Resend API key.",setupGroups:[{id:"api-key",title:"Create an API key",description:"Create or copy the Resend API key Sazabi will send to Resend's hosted MCP endpoint.",body:"Create or copy an API key from the [Resend dashboard](https://resend.com/api-keys), then paste it below. Sazabi stores it securely and sends it as the `Authorization: Bearer` token to Resend's MCP endpoint (`https://mcp.resend.com/mcp`).",fieldKeys:["apiKey"]}],validateCredentials:_E,normalizeHeaders:zE,skill:"resend",setupSkill:"resend-setup"})});var CG;var zG=d(()=>{ee();CG=D({id:"respan",label:"Respan",iconKey:"respan",defaultServerUrl:"https://mcp.respan.ai/api/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Respan / Keywords AI observability usage, RESPAN_API_KEY environment variables, or the respan-ai / keywordsai SDK","respan-mcp usage or a mcp.respan.ai server URL in MCP client config","README/docs naming Respan or Keywords AI for LLM logs, traces, or prompt management"],helpText:"Query LLM request logs, traces, prompts, and customer data from your Respan account using Respan's hosted MCP server and your Respan API key.",setupGroups:[{id:"api-key",title:"Create an API key",description:"Create or copy the Respan API key Sazabi will send to Respan's hosted MCP endpoint.",body:"Create or copy an API key from the [Respan dashboard](https://platform.respan.ai/platform/api/api-keys), then paste it below. Sazabi stores it securely and sends it as the `Authorization: Bearer` token to Respan's MCP endpoint (`https://mcp.respan.ai/api/mcp`).",fieldKeys:["apiKey"]}],validateCredentials:NE,normalizeHeaders:jE,skill:"respan",setupSkill:"respan-setup"})});var _G;var jG=d(()=>{ee();_G=D({id:"salesforce",label:"Salesforce",iconKey:"salesforce",defaultServerUrl:"https://api.salesforce.com/platform/mcp/v1/platform/sobject-all",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"salesforce",callbackPathSegment:"salesforce",authorizationUrl:"https://login.salesforce.com/services/oauth2/authorize",tokenUrl:"https://login.salesforce.com/services/oauth2/token"},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"mcp_api",label:"MCP API access",description:"Access Salesforce data and metadata (sObjects, Apex invocable actions, Flows) through the hosted MCP server. Salesforce hosted MCP External Client Apps require the MCP-specific `mcp_api` scope."},{value:"refresh_token",label:"Offline access",description:"Refresh the access token without requiring the user to re-authenticate.",required:!0}],capabilityOverrides:{allowWriteTools:!0},setupGroups:[{id:"external-client-app",title:"Register an External Client App in Salesforce",description:"Salesforce hosted MCP servers do not support automatic client registration. An admin must create an External Client App (ECA) in the org and enable it for the hosted MCP server.",body:["1. In Salesforce Setup, open **App Manager** and create a new **External Client App**.","2. Enable OAuth, add the **mcp_api** and **refresh_token (offline access)** scopes, and require PKCE.","3. Set the callback URL to the Sazabi Salesforce MCP callback URL shown on this page.","4. Enable the app for your hosted MCP server under **Setup → MCP Servers**.","5. Provide the generated **Consumer Key (Client ID)** and **Consumer Secret (Client Secret)** to your Sazabi deployment configuration."].join(`
8396
- `)}],evidenceHints:["force.com / my.salesforce.com URLs, SALESFORCE_* or SFDC_* environment variables, or sf/sfdx CLI usage","jsforce, simple-salesforce, or @salesforce packages","README/runbooks naming Salesforce as the CRM or system of record"],helpText:"Query Salesforce data and metadata, and run Apex invocable actions and Flows exposed by a hosted MCP server."})});var NG;var RG=d(()=>{ee();NG=D({id:"sentry",label:"Sentry",iconKey:"sentry",defaultServerUrl:"https://mcp.sentry.dev/mcp",serverUrlPathSuffixMaxSegments:2,transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"sentry",callbackPathSegment:"sentry",authorizationUrl:"https://mcp.sentry.dev/oauth/authorize",tokenUrl:"https://mcp.sentry.dev/oauth/token",useServerUrlAsResource:!0,dynamicClientRegistration:{registrationEndpoint:"https://mcp.sentry.dev/oauth/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"org:read"},{value:"project:write"},{value:"team:write"},{value:"event:write"}],getUrlConfiguration:async()=>({docsUrl:"https://mcp.sentry.dev/",instructions:"Copy `https://mcp.sentry.dev/mcp` for broad access. To scope this connection to one organization or project, copy a path-scoped URL such as `https://mcp.sentry.dev/mcp/your-org` or `https://mcp.sentry.dev/mcp/your-org/your-project`.",defaultServerUrl:"https://mcp.sentry.dev/mcp",imageKeys:["mcp.sentry.url-configuration-page"],optional:!0}),capabilityOverrides:{allowWriteTools:!0},evidenceHints:["@sentry packages, sentry.properties, SENTRY_* environment variables, or sentry-cli usage","Sentry.init calls, release/deploy automation, or Sentry alert docs","README/docs naming Sentry as the error tracking provider"],helpText:"Browse Sentry organizations, teams, projects, and events."})});var xG;var UG=d(()=>{ee();xG=D({id:"signoz",label:"SigNoz",iconKey:"signoz",defaultServerUrl:"https://mcp.us.signoz.cloud/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["SigNoz config, SIGNOZ_* environment variables, or signoz.io links","OpenTelemetry Collector exporting to SigNoz, or a signoz docker-compose / self-hosted deployment","README/docs naming SigNoz for metrics, logs, traces, alerts, or dashboards"],helpText:"Query SigNoz metrics, logs, traces, alerts, and dashboards to investigate production issues.",setupGroups:[{id:"instance",title:"Find your SigNoz instance",description:"Point Sazabi at the SigNoz instance whose telemetry you want to query.",body:"For SigNoz Cloud, use the regional MCP endpoint for your account, such as `https://mcp.us.signoz.cloud/mcp` (replace the region as needed). For self-hosted SigNoz, use your instance's MCP endpoint and set the SigNoz base URL below so the server knows which instance to target.",fieldKeys:["signozUrl"]},{id:"api-key",title:"Create an API key",description:"Create or copy the SigNoz API key Sazabi will send to SigNoz's MCP endpoint.",body:"In SigNoz, go to **Settings > API Keys** and create or copy an API key. Alert, dashboard, and notification-channel tools require an admin-level key. Paste it below.",fieldKeys:["apiKey"]}],validateCredentials:fE,normalizeHeaders:wE})});var MG;var EG=d(()=>{ee();MG=D({id:"stripe",label:"Stripe MCP",iconKey:"stripe",defaultServerUrl:"https://mcp.stripe.com",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"stripe",callbackPathSegment:"stripe",authorizationUrl:"https://access.stripe.com/mcp/oauth2/authorize",tokenUrl:"https://access.stripe.com/mcp/oauth2/token",resourceUrl:"https://mcp.stripe.com",dynamicClientRegistration:{registrationEndpoint:"https://access.stripe.com/mcp/oauth2/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"mcp",label:"MCP access",description:"Access the Stripe MCP server tools for the connected account.",required:!0}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Stripe dashboard URLs, `sk_`/`rk_`/`pk_` API keys, or Stripe object IDs (cus_, pi_, ch_)","STRIPE_* environment variables or code that imports the `stripe` SDK","README/runbooks naming Stripe for billing, payments, or subscriptions"],helpText:"Query and manage Stripe payments, customers, and billing."})});var KG;var GG=d(()=>{ee();KG=D({id:"supabase",label:"Supabase",iconKey:"supabase",defaultServerUrl:"https://mcp.supabase.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"supabase",callbackPathSegment:"supabase",authorizationUrl:"https://api.supabase.com/v1/oauth/authorize",tokenUrl:"https://api.supabase.com/v1/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://api.supabase.com/platform/oauth/apps/register",tokenEndpointAuthMethod:"client_secret_post"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"analytics:read"},{value:"auth:read"},{value:"auth:write"},{value:"database:read"},{value:"database:write"},{value:"domains:read"},{value:"domains:write"},{value:"edge_functions:read"},{value:"edge_functions:write"},{value:"environment:read"},{value:"environment:write"},{value:"organizations:read"},{value:"projects:read"},{value:"projects:write"},{value:"rest:read"},{value:"rest:write"},{value:"secrets:read"},{value:"secrets:write"},{value:"storage:read"}],getUrlConfiguration:async()=>({docsUrl:"https://supabase.com/docs/guides/getting-started/mcp#step-2-configure-your-ai-tool",instructions:"Choose your project and options in the Supabase configuration panel, then copy the generated Server URL.",defaultServerUrl:"https://mcp.supabase.com/mcp",optional:!0}),capabilityOverrides:{allowWriteTools:!0},evidenceHints:["supabase/ directory, supabase/config.toml, or @supabase packages","SUPABASE_* or NEXT_PUBLIC_SUPABASE_* environment variables","README/docs naming Supabase for Postgres, Auth, Storage, or Edge Functions"],helpText:"Manage Supabase organizations, projects, databases, and run SQL.",skill:"supabase",setupSkill:"supabase-setup"})});var qG;var JG=d(()=>{ee();qG=D({id:"superhuman",label:"Superhuman",iconKey:"superhuman",defaultServerUrl:"https://mcp.mail.superhuman.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"superhuman",callbackPathSegment:"superhuman",authorizationUrl:"https://mcp.auth.mail.superhuman.com/oauth2/authorize",tokenUrl:"https://mcp.auth.mail.superhuman.com/oauth2/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.auth.mail.superhuman.com/oauth2/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"email",required:!0},{value:"offline_access",required:!0},{value:"openid",required:!0},{value:"profile",required:!0}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Superhuman mail links, SUPERHUMAN_* environment variables, or support workflows naming Superhuman","Customer communication runbooks that depend on email search or drafting","Docs naming Superhuman Mail for sales, support, or founder-led customer comms"],helpText:"Search, draft, send, and triage emails in Superhuman Mail."})});var BG;var HG=d(()=>{ee();BG=D({id:"the-context-company",label:"The Context Company",iconKey:"the-context-company",defaultServerUrl:"https://api.thecontext.company/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!1},evidenceHints:["The Context Company, context company, or context observability references","insight_search, get_agent_runs, or get_agent_sessions tool usage","THE_CONTEXT_COMPANY_API_KEY or api.thecontext.company in MCP configuration"],helpText:"Query agent insights, runs, and sessions through The Context Company's read-only hosted MCP server.",setupGroups:[{id:"api-key",title:"Create a read-only API key",description:"Create the API key The Context Company's hosted MCP server will use.",body:"Create a read-only API key in [The Context Company](https://docs.thecontext.company/access-data/mcp), then paste the raw key below. Sazabi sends it as `Authorization: Bearer <key>` to `https://api.thecontext.company/mcp`.",fieldKeys:["apiKey"]}],validateCredentials:lE,normalizeHeaders:hE,skill:"the-context-company",setupSkill:"the-context-company-setup"})});var WG;var FG=d(()=>{ee();WG=D({id:"vercel",label:"Vercel",iconKey:"vercel",defaultServerUrl:"https://mcp.vercel.com",transport:"streamable-http",authMode:"oauth",availability:"disabled",oauth:{providerConfigKey:"vercel",callbackPathSegment:"vercel",authorizationUrl:"https://vercel.com/oauth/authorize",tokenUrl:"https://vercel.com/api/login/oauth/token",resourceUrl:"https://mcp.vercel.com",dynamicClientRegistration:{registrationEndpoint:"https://vercel.com/api/login/oauth/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"openid",required:!0},{value:"offline_access",required:!0}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["vercel.com links, VERCEL_* environment variables, or a vercel.json in the repo","Deploy workflows or runbooks naming Vercel as the frontend/hosting provider","Vercel project/deployment IDs or preview URLs referenced in docs or CI"],helpText:"Manage Vercel projects, deployments, and access Vercel platform documentation."})});var ZG;var XG=d(()=>{ee();ZG=D({id:"x",label:"X",iconKey:"x",defaultServerUrl:"https://api.x.com/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{readOnlyToolNames:["search_news","get_news","get_trends_by_woeid","get_posts_by_ids","get_posts_counts_recent","search_posts_all","get_posts_by_id","get_posts_liking_users","get_posts_quoted_posts","get_posts_reposted_by","get_users_by_usernames","get_users_by_username","get_users_me","search_users","get_users_by_id","get_users_bookmarks","get_users_bookmark_folders","get_users_bookmarks_by_folder_id","get_users_mentions","get_users_timeline","get_users_posts"]},evidenceHints:["X (Twitter) API usage, X_BEARER_TOKEN, or TWITTER_* environment variables","twitter-api-v2, tweepy, or other X/Twitter API client packages","README/docs naming the X API, X Developer Platform, or tweet automation"],helpText:"Search X posts and access real-time X data using an X API OAuth 2.0 Bearer token.",setupGroups:[{id:"developer-app",title:"Open the X Developer Portal",description:"Use an X developer project/app with access to the X API v2.",body:"Go to the [X Developer Portal](https://developer.x.com/en/portal/dashboard), open the project and app you want Sazabi to use, and confirm the app has access to the API tiers you need. The hosted MCP server lives at `https://api.x.com/mcp`."},{id:"bearer-token",title:"Create an OAuth 2.0 Bearer token",description:"Generate the OAuth 2.0 access token the hosted MCP server will use.",body:"In your app's **Keys and tokens**, generate an OAuth 2.0 access token and copy it. Paste the raw token into Sazabi — Sazabi adds the `Bearer ` prefix and sends it in the `Authorization` header.",fieldKeys:["accessToken"]}],validateCredentials:uE,normalizeHeaders:sE,skill:"x",setupSkill:"x-setup"})});var YG,yKe;var QG=d(()=>{BE();WE();ZE();YE();YP();YP();eK();nK();iK();aK();sK();lK();dK();yK();mK();wK();vK();SK();IK();OK();TK();DK();zK();jK();RK();UK();EK();GK();JK();HK();FK();XK();QK();eG();nG();iG();aG();sG();lG();dG();yG();mG();wG();vG();SG();IG();OG();TG();DG();zG();jG();RG();UG();EG();GG();JG();HG();FG();XG();YG=[KG,AK,LK,JE,HE,FE,XE,QE,VE,tK,oK,rK,cK,hK,gK,bK,pK,fK,uK,kK,PK,CK,_K,NK,xK,MK,KK,qK,BK,WK,ZK,YK,VK,tG,oG,rG,cG,hG,uG,gG,bG,pG,fG,kG,PG,AG,$G,LG,CG,_G,NG,xG,MG,qG,BG,WG,ZG,$K],yKe=new Map(YG.map((e)=>[e.id,e]))});var VG=()=>{};var eq=()=>{};var tq=()=>{};var nq=()=>{};var oq=()=>{};var iq=()=>{};var rq=()=>{};var aq=()=>{};var cq=()=>{};var sq=()=>{};var hq=()=>{};var lq=()=>{};var uq=()=>{};var dq=()=>{};var gq=()=>{};var yq=()=>{};var bq=()=>{};var mq=()=>{};var pq=()=>{};var wq=()=>{};var fq=()=>{};var vq=()=>{};var kq=()=>{};var Sq=()=>{};var Pq=()=>{};var Iq=()=>{};var $q=()=>{};var Oq=()=>{};var Aq=()=>{};var Tq=()=>{};var Lq=()=>{};var Dq=()=>{};var Cq=()=>{};var zq=()=>{};var _q=()=>{};var jq=()=>{};var Nq=()=>{};var Rq=()=>{};var xq=()=>{};var Uq=()=>{};var Mq=d(()=>{VG();eq();tq();nq();oq();iq();rq();aq();cq();sq();hq();lq();uq();dq();gq();yq();bq();mq();pq();wq();fq();vq();kq();Sq();Pq();Iq();$q();Oq();Aq();Tq();Lq();Dq();Cq();zq();_q();jq();Nq();Rq();xq();Uq()});var Eq=()=>{};var Kq=()=>{};var Gq=d(()=>{l4();Gl();tE();ME();QG();ZP();Mq();Eq();Kq()});var qq,rhe,Jq,ahe,Bq,che,Hq,Wq,od,Fq,Zq,Xq,gr,Yq,Qq,yr,Vq,eJ,br,tJ,she,nJ,id,hhe;var QP=d(()=>{Gq();me();Ce();qq=["configured","authorizing","connected","error"],rhe=a.enum(qq),Jq=["preset","custom"],ahe=a.enum(Jq),Bq=["streamable-http","sse"],che=a.enum(Bq),Hq=["none","headers","oauth","aws-sigv4"],Wq=a.enum(Hq),od=a.object({connectionId:a.string().uuid().describe("Connection ID."),connectionKey:a.string().describe("Stable key used to reference this connector in tool calls."),providerId:a.string().describe('Provider identifier, e.g. "linear".'),displayName:a.string().describe("Human-readable connector name."),source:ahe.describe("Whether the connector is a built-in preset or a custom server."),installStatus:rhe.describe("Current connection lifecycle status."),authMode:Wq.describe("Authentication mode."),transport:che.describe("Transport protocol."),serverUrl:a.string().describe("MCP server URL."),readOnly:a.boolean().describe("Whether the connector is restricted to read-only tools."),management:Zk.describe("Lifecycle owner and supported connector mutations."),enabledToolCount:a.number().int().nonnegative().describe("Number of tools enabled and available for this connector."),connectedAt:a.string().datetime().nullable().describe("When the connector last became connected, if ever."),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),Fq=a.object({name:a.string().describe("Tool name as invoked."),title:a.string().describe("Human-readable tool title."),description:a.string().describe("Tool description."),isReadOnly:a.boolean().describe("Whether the tool is considered read-only."),enabled:a.boolean().describe("Whether the tool is enabled and available given the connector config.")}),Zq=a.object({projectId:a.string().uuid().optional().describe("Project to list connectors for. Auto-filled from SDK context when omitted."),connectedOnly:a.boolean().optional().describe("When true, only return connectors that are connected.")}),Xq=a.object({connectors:a.array(od)}),gr=I({operationId:"mcpConnectors.list",description:"List configured MCP connectors within one project with provider, status, and enabled-tool count.",backend:"api",route:{method:"GET",path:"/mcp-connectors",tags:["MCP Connectors"]},input:Zq,output:Xq,pagination:"none",async:"sync"}),Yq=a.object({connectionId:a.string().uuid().describe("Connection ID to fetch."),projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted.")}),Qq=a.object({connector:od}),yr=I({operationId:"mcpConnectors.get",description:"Get one configured MCP connector by connection ID.",backend:"api",route:{method:"GET",path:"/mcp-connectors/{connectionId}",tags:["MCP Connectors"]},input:Yq,output:Qq,pagination:"none",async:"sync"}),Vq=a.object({connectionId:a.string().uuid().describe("Connection ID to inspect."),projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted.")}),eJ=a.object({connector:od,tools:a.array(Fq)}),br=I({operationId:"mcpConnectors.details",description:"Inspect one MCP connector's tool surface, including each tool's name, description, and read-only status.",backend:"api",route:{method:"GET",path:"/mcp-connectors/{connectionId}/details",tags:["MCP Connectors"]},input:Vq,output:eJ,pagination:"none",async:"sync"}),tJ=a.object({providerId:a.string().describe('Provider identifier, e.g. "linear".'),label:a.string().describe("Human-readable provider name."),authMode:Wq.describe("Authentication mode."),availability:a.enum(Zi).describe("Whether the provider is enabled or coming soon."),setupSkill:a.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),she=a.object({}),nJ=a.object({providers:a.array(tJ)}),id=I({operationId:"mcpConnectors.listProviders",description:"List all supported MCP connector providers with their auth mode and setup skill.",backend:"api",route:{method:"GET",path:"/mcp-connectors/providers",tags:["MCP Connectors"]},input:she,output:nJ,pagination:"none",async:"sync"}),hhe={list:gr.contract,get:yr.contract,details:br.contract,listProviders:id.contract}});var mr,lhe,uhe,dhe,ghe,yhe,bhe,mhe,VP,EBe;var rd=d(()=>{me();Ce();mr=a.enum(["admin","member"]),lhe=a.object({id:a.string().min(1),name:a.string(),slug:a.string(),logo:a.string().nullable().optional(),role:mr}),uhe=a.object({id:a.string().min(1),name:a.string().nullable(),email:a.string().email()}),dhe=a.object({credentialType:a.literal("user"),user:uhe,activeOrganizationId:a.string().min(1).nullable(),organizations:a.array(lhe).describe("Organizations the user belongs to, including membership role.")}),ghe=a.object({credentialType:a.literal("secret"),organization:a.object({id:a.string().min(1),name:a.string(),slug:a.string(),logo:a.string().nullable().optional()}),keyName:a.string()}),yhe=a.object({credentialType:a.literal("partner"),superorganization:a.object({id:a.string().uuid(),name:a.string()})}),bhe=a.object({}),mhe=a.discriminatedUnion("credentialType",[dhe,ghe,yhe]),VP=I({operationId:"me.get",description:"Return the identity and available context for the current credential.",backend:"api",route:{method:"GET",path:"/me",tags:["Auth"]},input:bhe,output:mhe,pagination:"none",async:"sync"}),EBe=VP.contract});var oJ,phe,whe,fhe,vhe,khe,She,eI,tI,nI,BBe;var iJ=d(()=>{me();Ce();rd();oJ=a.object({membershipId:a.string().min(1).describe("Organization membership record ID."),userId:a.string().min(1).describe("User ID for the organization member."),name:a.string().nullable().describe("Display name for the member, when available."),email:a.string().email().describe("Email address for the member."),imageUrl:a.string().nullable().describe("Profile image URL for the member, when available."),role:mr.describe("Organization role."),createdAt:a.string().datetime().describe("When the membership was created.")}),phe=a.object({organizationId:a.string().min(1).optional().describe("Organization to list members for. Auto-filled from CLI and SDK context when omitted.")}),whe=a.object({members:a.array(oJ).describe("Members visible within the selected organization.")}),fhe=a.object({organizationId:a.string().min(1).optional().describe("Organization containing the member. Auto-filled from CLI and SDK context when omitted."),userId:a.string().min(1).describe("User ID of the member to update."),role:mr.describe("Role to assign.")}),vhe=a.object({member:oJ.describe("Updated organization member.")}),khe=a.object({params:a.object({userId:a.string().min(1).describe("User ID of the member to remove.")}),query:a.object({organizationId:a.string().min(1).optional().describe("Organization containing the member. Auto-filled from CLI and SDK context when omitted.")})}).transform(({params:e,query:t})=>({...t,...e})),She=a.object({removedUserId:a.string().min(1).describe("User ID removed from the organization.")}),eI=I({operationId:"members.list",description:"List members in an organization.",backend:"api",route:{method:"GET",path:"/members",tags:["Members"]},input:phe,output:whe,pagination:"none",async:"sync",examples:[{name:"organization-members",input:{organizationId:"organization-123"},output:{members:[{membershipId:"membership-123",userId:"user-123",name:"Alex Admin",email:"alex@example.com",imageUrl:null,role:"admin",createdAt:"2026-01-01T00:00:00.000Z"}]}}]}),tI=I({operationId:"members.updateRole",description:"Update a member's organization role.",backend:"api",route:{method:"PATCH",path:"/members/{userId}/role",tags:["Members"]},input:fhe,output:vhe,pagination:"none",async:"sync",examples:[{name:"promote-member",input:{organizationId:"organization-123",userId:"user-456",role:"admin"},output:{member:{membershipId:"membership-456",userId:"user-456",name:"Mina Member",email:"mina@example.com",imageUrl:null,role:"admin",createdAt:"2026-01-01T00:00:00.000Z"}}}]}),nI=I({operationId:"members.remove",description:"Remove a member from an organization.",backend:"api",route:{method:"DELETE",path:"/members/{userId}",tags:["Members"],inputStructure:"detailed"},input:khe,output:She,pagination:"none",async:"sync"}),BBe={list:eI.contract,updateRole:tI.contract,remove:nI.contract}});var aJ,cJ,ad,sJ,cd,rJ=4194304,oI,iI,Phe=(e)=>{let t=e.split(",").map((i)=>i.trim()).filter(Boolean),n=a.array(ad).safeParse(t);if(!n.success)throw Error("Kind filter must be a comma-separated list of note, runbook, or change.");return n.data},zc,rI,aI,hJ,lJ,uJ,dJ,gJ,yJ,bJ,mJ,pJ,wJ,fJ,vJ,pr,wr,fr,vr,kr,Ihe;var cI=d(()=>{me();Ce();aJ=["note","runbook"],cJ=["note","runbook","change"],ad=a.enum(cJ),sJ=a.enum(aJ),cd=a.string().min(1).max(512).refine((e)=>!e.startsWith("/"),{message:"Path must be relative without a leading slash."}).describe("Relative memory path, for example AGENTS.md or notes/architecture.md."),oI=a.string().min(1).refine((e)=>new TextEncoder().encode(e).length<=rJ,{message:`Memory body must be at most ${rJ} bytes (4 MiB).`}).describe("Document body stored in project memory."),iI=a.string().regex(/^(\d+)(s|m|h|d)$/u,"Duration must use s, m, h, or d units, for example 7d or 30m.").describe("Relative time window, for example 7d or 30m."),zc=a.string().min(1).transform(Phe).describe("Comma-separated kinds, for example note,runbook."),rI=a.object({id:a.string().uuid(),projectId:a.string().uuid(),kind:ad,managed:a.boolean(),path:a.string().nullable(),title:a.string().nullable(),contentHash:a.string(),attrs:a.record(a.string(),a.unknown()),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),aI=rI.extend({body:oI}),hJ=a.object({projectId:a.string().uuid().optional().describe("Project that owns the document. Auto-filled from CLI and SDK context when omitted."),path:cd.describe("Relative path for the curated document."),body:oI,kind:sJ.default("note").describe("Curated document kind. Only note and runbook may be written through the API."),title:a.string().max(500).optional().describe("Optional display title. Defaults to the path basename.")}),lJ=a.object({document:aI}),uJ=a.object({projectId:a.string().uuid().optional().describe("Project that owns the document. Auto-filled from CLI and SDK context when omitted."),id:a.string().uuid().optional().describe("Document id."),path:cd.optional().describe("Relative curated path.")}).superRefine((e,t)=>{let n=e.id!==void 0,i=e.path!==void 0;if(n===i)t.addIssue({code:"custom",message:"Provide exactly one of id or path."})}),dJ=a.object({document:aI}),gJ=a.object({projectId:a.string().uuid().optional().describe("Project to list memory for. Auto-filled from CLI and SDK context when omitted."),kind:zc.optional(),since:iI.optional().describe("Only return documents updated within this window, for example 7d."),service:a.string().min(1).optional().describe("Filter to documents whose attrs.services contains this value."),pathPrefix:a.string().min(1).optional().describe("Filter to paths starting with this prefix."),managed:a.coerce.boolean().optional(),cursor:a.string().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of documents to return per page.")}),yJ=a.object({documents:a.array(rI),nextCursor:a.string().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),bJ=a.object({documentId:a.string().uuid(),kind:ad,managed:a.boolean(),path:a.string().nullable(),title:a.string().nullable(),snippet:a.string(),score:a.number()}),mJ=a.object({calibrated:a.literal(!0),minScoreThreshold:a.number(),queryTerms:a.array(a.string()),message:a.string()}),pJ=a.object({projectId:a.string().uuid().optional().describe("Project to search memory for. Auto-filled from CLI and SDK context when omitted."),query:a.string().trim().min(1).max(500).describe("Natural-language search query."),kind:zc.optional(),since:iI.optional(),service:a.string().min(1).optional(),pathPrefix:a.string().min(1).optional(),managed:a.coerce.boolean().optional(),limit:a.coerce.number().int().min(1).max(50).default(10).describe("Maximum ranked search hits to return.")}),wJ=a.object({hits:a.array(bJ),emptyVerdict:mJ.nullable()}),fJ=a.object({projectId:a.string().uuid().optional().describe("Project that owns the document. Auto-filled from CLI and SDK context when omitted."),id:a.string().uuid().optional().describe("Document id."),path:cd.optional()}).superRefine((e,t)=>{let n=e.id!==void 0,i=e.path!==void 0;if(n===i)t.addIssue({code:"custom",message:"Provide exactly one of id or path."})}),vJ=a.object({deleted:a.boolean()}),pr=I({operationId:"memory.put",description:"Create or replace a curated project memory document. Embeds on success.",backend:"api",route:{method:"PUT",path:"/memory",tags:["Memory"]},input:hJ,output:lJ,pagination:"none",async:"sync"}),wr=I({operationId:"memory.get",description:"Get one project memory document by id or path.",backend:"api",route:{method:"GET",path:"/memory/document",tags:["Memory"]},input:uJ,output:dJ,pagination:"none",async:"sync"}),fr=I({operationId:"memory.list",description:"List project memory catalog rows without embedding search.",backend:"api",route:{method:"GET",path:"/memory",tags:["Memory"]},input:gJ,output:yJ,pagination:"cursor",async:"sync"}),vr=I({operationId:"memory.search",description:"Hybrid semantic and keyword search over project memory documents.",backend:"api",route:{method:"POST",path:"/memory/search",tags:["Memory"]},input:pJ,output:wJ,pagination:"none",async:"sync"}),kr=I({operationId:"memory.delete",description:"Soft-delete a curated project memory document by id or path.",backend:"api",route:{method:"DELETE",path:"/memory/document",successStatus:204,tags:["Memory"]},input:fJ,output:vJ,pagination:"none",async:"sync"}),Ihe={put:pr.contract,get:wr.contract,list:fr.contract,search:vr.contract,delete:kr.contract}});var kJ,SJ,$he,Ohe,Ahe,The,Lhe,_c,Dhe,Che,zhe,sI,hI,lI,uI,QBe;var sd=d(()=>{me();Ce();kJ=a.enum(["processing","completed","aborted","error"]),SJ=a.object({id:a.string().uuid(),threadId:a.string().uuid(),userMessageId:a.string().uuid().nullable(),assistantMessageId:a.string().uuid().nullable(),parentRunId:a.string().uuid().nullable(),workflowRunId:a.string().nullable(),status:kJ,source:a.enum(["app","api","mcp","slack","teams","linear","github","agent","cli"]),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),completedAt:a.string().datetime().nullable()}),$he=a.object({projectId:a.string().uuid().optional().describe("Project ID to list runs for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of runs to return per page."),cursor:a.string().datetime().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),Ohe=a.object({runs:a.array(SJ),nextCursor:a.string().datetime().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Ahe=a.object({threadId:a.string().uuid().describe("Thread ID to list runs for."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of runs to return per page."),cursor:a.string().datetime().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),The=a.object({runs:a.array(SJ),nextCursor:a.string().datetime().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Lhe=a.object({runId:a.string().uuid().describe("Run ID returned by a deferred operation.")}),_c=a.object({completed:a.boolean().describe("Whether the run has reached a terminal status."),threadId:a.string().uuid().describe("Thread ID associated with the run."),runId:a.string().uuid().describe("Run ID for subsequent polling."),messageId:a.string().uuid().optional().describe("ID of the user message that triggered this run."),status:kJ.describe("Current run lifecycle status."),response:a.string().nullable().describe("Assistant response text when the run has completed.")}),Dhe=_c.describe("Current run state and, when complete, the assistant response."),Che=a.object({runId:a.string().uuid().describe("Run ID of the in-flight run to request cancellation for.")}),zhe=a.object({success:a.literal(!0).describe("Always true when the cancellation request was accepted.")}),sI=I({operationId:"runs.list",description:"List deferred runs within one project.",backend:"api",route:{method:"GET",path:"/runs",tags:["Runs"]},input:$he,output:Ohe,pagination:"cursor",async:"sync"}),hI=I({operationId:"runs.listForThread",summary:"List Runs for a Thread",description:"List deferred runs for one thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/runs",tags:["Runs"]},input:Ahe,output:The,pagination:"cursor",async:"sync"}),lI=I({operationId:"runs.get",description:"Get the current result for a deferred run by run ID.",backend:"api",route:{method:"GET",path:"/runs/{runId}",tags:["Runs"]},input:Lhe,output:Dhe,pagination:"none",async:"sync",examples:[{name:"processing-run",input:{runId:"33333333-3333-4333-8333-333333333333"},output:{completed:!1,threadId:"22222222-2222-4222-8222-222222222222",runId:"33333333-3333-4333-8333-333333333333",status:"processing",response:null}}]}),uI=I({operationId:"runs.cancel",description:"Request cancellation of an in-flight run. Idempotent and best-effort: returns success even when the run has already reached a terminal status.",backend:"api",route:{method:"POST",path:"/runs/{runId}/cancel",tags:["Runs"]},input:Che,output:zhe,pagination:"none",async:"sync",examples:[{name:"cancel-processing-run",input:{runId:"33333333-3333-4333-8333-333333333333"},output:{success:!0}}]}),QBe={list:sI.contract,listForThread:hI.contract,get:lI.contract,cancel:uI.contract}});var hd=(e,t,n)=>{let i=t?20000:1e4;if(e.length>i)n.addIssue({code:"too_big",maximum:i,type:"string",inclusive:!0,message:`Message cannot exceed ${i} characters`,origin:"string",path:["message"]})},ld=(e,t,n)=>{if(e&&!t)n.addIssue({code:"custom",message:"ambientServiceRun requires an automationId",path:["ambientServiceRun"]})};var PJ,jc,_he,jhe,Nhe,Rhe,xhe,Uhe,Mhe,Ehe,Khe,dI,Ghe,qhe,Jhe,Bhe,Hhe,Whe,Fhe,Zhe,Xhe,Yhe,Qhe,Vhe,gI,yI,bI,mI,pI,wI,IJ,ele,tle,nle,ole,$J,ile,rle,ale,cle,sle,hle,Fo="22222222-2222-4222-8222-222222222222",OJ="11111111-1111-4111-8111-111111111111",lle="44444444-4444-4444-8444-444444444444",AJ="55555555-5555-4555-8555-555555555555",fI,vI,kI,SI,PI,rHe;var II=d(()=>{me();Ce();sd();PJ=a.enum(["slack","teams","linear","github","app","mcp","agent","api","cli"]),jc=a.object({id:a.string().uuid(),projectId:a.string().uuid(),title:a.string().nullable(),status:a.enum(["regular","archived"]),source:PJ.nullable(),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),_he=a.object({type:a.literal("message"),message:a.string()}),jhe=a.object({type:a.literal("reasoning"),reasoning:a.string(),status:a.enum(["in_progress","complete"]).optional()}),Nhe=a.object({type:a.literal("tool_call"),name:a.string(),params:a.any().optional(),result:a.any().optional(),status:a.enum(["in_progress","success","error","unknown"]).optional(),toolCallId:a.string().optional(),durationMs:a.number().nonnegative().optional()}),Rhe=a.object({type:a.literal("artifact"),name:a.enum(["timeseries","table","log_detail","integration_required","alert_card","issue_card","mdx"]),data:a.any(),toolCallId:a.string().optional()}),xhe=a.object({type:a.literal("fork"),sourceThreadId:a.string(),sourceMessageId:a.string(),sourceThreadTitle:a.string().nullable()}),Uhe=a.object({type:a.literal("summary"),summary:a.string()}),Mhe=a.object({type:a.literal("slack_context"),channelId:a.string(),isTruncated:a.boolean().optional(),messages:a.array(a.object({timestamp:a.string(),slackUserId:a.string().optional(),displayName:a.string(),text:a.string(),isBot:a.boolean(),files:a.array(a.object({name:a.string(),mimetype:a.string(),size:a.number().optional(),attachmentId:a.string().uuid().optional(),ingestionStatus:a.enum(["attached","unsupported","oversized","skipped","unavailable"]).optional()})).optional()}))}),Ehe=a.object({type:a.literal("teams_context"),conversationId:a.string(),isTruncated:a.boolean().optional(),messages:a.array(a.object({activityId:a.string().optional(),displayName:a.string(),text:a.string(),isBot:a.boolean(),createdDateTime:a.string().optional()}))}),Khe=a.union([_he,jhe,Nhe,Rhe,xhe,Uhe,Mhe,Ehe]),dI=a.object({id:a.string().uuid(),role:a.enum(["user","assistant"]),content:a.array(Khe),source:PJ,createdAt:a.string().datetime()}),Ghe=a.object({projectId:a.string().uuid().optional().describe("Project to list threads for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of threads to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:a.enum(["regular","archived"]).optional().describe("Filter by thread status. 'regular' returns active threads, 'archived' returns archived threads.")}),qhe=a.object({threads:a.array(jc).describe("The page of threads matching the query."),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Jhe=a.object({threadId:a.string().uuid().describe("Thread ID returned by threads.list or threads.create.")}),Bhe=a.object({thread:jc.describe("The requested thread."),messages:a.array(dI).describe("Messages currently stored on the thread in chronological order.")}),Hhe=a.object({projectId:a.string().uuid().optional().describe("Project to create the thread in. Auto-filled from CLI and SDK context when omitted."),message:a.string().min(1,"Message cannot be empty").describe("Initial user message that starts the thread."),wait:a.boolean().default(!0).describe("Whether the server should wait for the agent run before responding."),timeoutSeconds:a.coerce.number().int().min(1).max(20).default(20).describe("Maximum seconds to wait when wait is true before handing off to polling."),automationId:a.string().uuid().optional().describe("Internal automation context. Set by the Sazabi CLI when an automation script starts an agent run."),ambientServiceRun:a.literal(!0).optional().describe("Internal marker for scheduler-originated ambient service work. Honored only for system secret-key requests with matching automation context.")}).superRefine((e,t)=>{hd(e.message,e.automationId,t),ld(e.ambientServiceRun,e.automationId,t)}),Whe=_c.describe("Deferred run result for creating a thread."),Fhe=a.object({threadId:a.string().uuid().describe("Thread ID whose current processing status should be returned.")}),Zhe=a.object({status:a.enum(["idle","processing"]),lastRunStatus:a.enum(["error"]).nullable()}),Xhe=a.object({threadId:a.string().uuid().describe("Thread ID whose active run should be stopped.")}),Yhe=a.object({success:a.literal(!0).describe("Always true when the stop request was accepted.")}),Qhe=a.object({threadId:a.string().uuid().describe("Thread ID of the thread to update."),status:a.enum(["regular","archived"]).describe("New status for the thread. 'archived' hides the thread from the sidebar.")}),Vhe=a.object({thread:jc.describe("The updated thread.")}),gI=I({operationId:"threads.list",description:"List threads in a project, optionally filtered by status.",backend:"api",route:{method:"GET",path:"/threads",tags:["Threads"]},input:Ghe,output:qhe,pagination:"cursor",async:"sync",examples:[{name:"active-threads",input:{projectId:"11111111-1111-4111-8111-111111111111",status:"regular",limit:10},output:{threads:[{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",title:"API returning 500s",status:"regular",source:"api",createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:05:00.000Z"}],nextCursor:null}}]}),yI=I({operationId:"threads.get",description:"Get a thread and its messages.",backend:"api",route:{method:"GET",path:"/threads/{threadId}",tags:["Threads"]},input:Jhe,output:Bhe,pagination:"none",async:"sync"}),bI=I({operationId:"threads.getStatus",description:"Get the current processing status for a thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/status",tags:["Threads"]},input:Fhe,output:Zhe,pagination:"none",async:"sync",examples:[{name:"processing-thread",input:{threadId:"22222222-2222-4222-8222-222222222222"},output:{status:"processing",lastRunStatus:null}}]}),mI=I({operationId:"threads.stop",description:"Stop a thread's in-flight run. Idempotent and best-effort: returns success even when the thread has no active run.",backend:"api",route:{method:"POST",path:"/threads/{threadId}/stop",tags:["Threads"]},input:Xhe,output:Yhe,pagination:"none",async:"sync",examples:[{name:"stop-processing-thread",input:{threadId:"22222222-2222-4222-8222-222222222222"},output:{success:!0}}]}),pI=I({operationId:"threads.create",description:"Create a thread with an initial message and optionally wait for the agent response.",backend:"api",route:{method:"POST",path:"/threads",tags:["Threads"],successStatus:201},input:Hhe,output:Whe,pagination:"none",async:"deferred",examples:[{name:"async-handoff",input:{projectId:"11111111-1111-4111-8111-111111111111",message:"Investigate elevated 500s in production.",wait:!1,timeoutSeconds:20},output:{completed:!1,threadId:"22222222-2222-4222-8222-222222222222",runId:"33333333-3333-4333-8333-333333333333",status:"processing",response:null}}]}),wI=I({operationId:"threads.update",description:"Update a thread's status.",backend:"api",route:{method:"PATCH",path:"/threads/{threadId}",tags:["Threads"]},input:Qhe,output:Vhe,pagination:"none",async:"sync",examples:[{name:"archive-thread",input:{threadId:"22222222-2222-4222-8222-222222222222",status:"archived"},output:{thread:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",title:"API returning 500s",status:"archived",source:"api",createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:10:00.000Z"}}}]}),IJ=a.enum(["private","organization"]),ele=a.object({threadId:a.string().uuid().describe("Thread ID of the source thread to fork."),messageId:a.string().uuid().describe("Message ID in the source thread to fork from. The new thread copies messages up to and including this message.")}),tle=a.object({thread:jc.describe("The newly created forked thread.")}),nle=a.object({threadId:a.string().uuid().describe("Thread ID of the thread to update."),visibility:IJ.describe("New visibility. 'private' restricts the thread to its owner; 'organization' shares it with the organization.")}),ole=a.object({thread:jc.describe("The updated thread."),visibility:IJ.describe("The thread's resulting visibility.")}),$J=a.object({shareId:a.string().uuid().describe("Unique identifier for the snapshot."),threadId:a.string().uuid().describe("Thread the snapshot was taken from."),url:a.string().describe("Public read-only URL for the snapshot."),createdAt:a.string().datetime()}),ile=a.object({threadId:a.string().uuid().describe("Thread ID to create a public read-only snapshot for.")}),rle=a.object({share:$J.describe("The created share link.")}),ale=a.object({threadId:a.string().uuid().describe("Thread ID the snapshot belongs to."),shareId:a.string().uuid().describe("Snapshot ID to revoke.")}),cle=a.void(),sle=a.object({threadId:a.string().uuid().describe("Thread ID to list public snapshots for.")}),hle=a.object({shares:a.array($J).describe("Active share links for the thread.")}),fI=I({operationId:"threads.fork",description:"Fork a thread from a specific message, creating a new thread that copies messages up to that point.",backend:"api",route:{method:"POST",path:"/threads/{threadId}/fork",tags:["Threads"],successStatus:201},input:ele,output:tle,pagination:"none",async:"sync",examples:[{name:"fork-from-message",input:{threadId:Fo,messageId:lle},output:{thread:{id:"66666666-6666-4666-8666-666666666666",projectId:OJ,title:"API returning 500s (fork)",status:"regular",source:"api",createdAt:"2026-01-01T00:20:00.000Z",updatedAt:"2026-01-01T00:20:00.000Z"}}}]}),vI=I({operationId:"threads.setVisibility",description:"Set a thread's visibility to private or organization.",backend:"api",route:{method:"PATCH",path:"/threads/{threadId}/visibility",tags:["Threads"]},input:nle,output:ole,pagination:"none",async:"sync",examples:[{name:"make-private",input:{threadId:Fo,visibility:"private"},output:{thread:{id:Fo,projectId:OJ,title:"API returning 500s",status:"regular",source:"api",createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:30:00.000Z"},visibility:"private"}}]}),kI=I({operationId:"threads.createShareLink",description:"Create a public read-only share link for a thread's current messages.",backend:"api",route:{method:"POST",path:"/threads/{threadId}/share",tags:["Threads"],successStatus:201},input:ile,output:rle,pagination:"none",async:"sync",examples:[{name:"create-share-link",input:{threadId:Fo},output:{share:{shareId:AJ,threadId:Fo,url:"https://app.sazabi.com/share/55555555-5555-4555-8555-555555555555",createdAt:"2026-01-01T00:40:00.000Z"}}}]}),SI=I({operationId:"threads.listShareLinks",description:"List active public share links for a thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/share",tags:["Threads"]},input:sle,output:hle,pagination:"none",async:"sync",examples:[{name:"list-share-links",input:{threadId:Fo},output:{shares:[{shareId:AJ,threadId:Fo,url:"https://app.sazabi.com/share/55555555-5555-4555-8555-555555555555",createdAt:"2026-01-01T00:40:00.000Z"}]}}]}),PI=I({operationId:"threads.revokeShareLink",description:"Revoke a public share link for a thread.",backend:"api",route:{method:"DELETE",path:"/threads/{threadId}/share/{shareId}",successStatus:204,tags:["Threads"]},input:ale,output:cle,pagination:"none",async:"sync"}),rHe={list:gI.contract,get:yI.contract,getStatus:bI.contract,stop:mI.contract,create:pI.contract,update:wI.contract,fork:fI.contract,setVisibility:vI.contract,createShareLink:kI.contract,listShareLinks:SI.contract,revokeShareLink:PI.contract}});var ule,dle,gle,yle,TJ,LJ;var DJ=d(()=>{me();Ce();sd();II();ule=a.object({threadId:a.string().uuid().describe("Thread ID to list messages for."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of messages to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),dle=a.object({messages:a.array(dI),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),gle=a.object({threadId:a.string().uuid().describe("Thread ID to append the message to."),message:a.string().min(1,"Message cannot be empty").describe("Message body to append to the thread."),wait:a.boolean().default(!0).describe("Whether the server should wait for the appended message run before responding."),timeoutSeconds:a.coerce.number().int().min(1).max(20).default(20).describe("Maximum seconds to wait when wait is true before handing off to polling."),automationId:a.string().uuid().optional().describe("Internal automation context. Set by the Sazabi CLI when an automation script starts an agent run."),ambientServiceRun:a.literal(!0).optional().describe("Internal marker for scheduler-originated ambient service work. Honored only for system secret-key requests with matching automation context.")}).superRefine((e,t)=>{hd(e.message,e.automationId,t),ld(e.ambientServiceRun,e.automationId,t)}),yle=_c.describe("Deferred run result for appending a message to an existing thread."),TJ=I({operationId:"messages.list",description:"List messages in a thread with cursor pagination.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/messages",tags:["Messages"]},input:ule,output:dle,pagination:"cursor",async:"sync",examples:[{name:"thread-messages",input:{threadId:"22222222-2222-4222-8222-222222222222",limit:2},output:{messages:[{id:"33333333-3333-4333-8333-333333333333",role:"user",content:[{type:"message",message:"What changed in the intake pipeline?"}],source:"api",createdAt:"2026-01-01T00:00:00.000Z"}],nextCursor:null}}]}),LJ=I({operationId:"messages.append",description:"Append a user message to an existing thread and trigger a deferred run.",backend:"api",route:{method:"POST",path:"/threads/{threadId}/messages",successStatus:201,tags:["Messages"]},input:gle,output:yle,pagination:"none",async:"deferred",examples:[{name:"append-processing",input:{threadId:"22222222-2222-4222-8222-222222222222",message:"Follow up on the intake backlog.",wait:!1,timeoutSeconds:20},output:{completed:!1,threadId:"22222222-2222-4222-8222-222222222222",runId:"33333333-3333-4333-8333-333333333333",status:"processing",response:null}}]})});var jt,zJ,$I,Sr,_J,ud,po,jJ,CJ;var Nc=d(()=>{me();jt={IN_APP:"in_app",SLACK:"slack",SLACK_CHANNEL:"slack_channel",TEAMS_CHANNEL:"teams_channel",EMAIL:"email",SMS:"sms",INCIDENT_IO:"incident_io",PAGERDUTY:"pagerduty",ROOTLY:"rootly",WEBHOOK:"webhook"},zJ=[jt.IN_APP,jt.SLACK,jt.EMAIL,jt.SMS],$I=[jt.SLACK_CHANNEL,jt.TEAMS_CHANNEL,jt.INCIDENT_IO,jt.PAGERDUTY,jt.ROOTLY,jt.WEBHOOK],Sr=Object.values(jt),_J=[...Sr,"victorops"],ud=a.enum(Sr),po=a.enum($I),jJ=[{channel:"in_app",name:"In-app",description:"Show notifications in your Sazabi notification feed.",scope:"personal",destinationManagement:"none",personalSettingsPath:"/settings/notifications"},{channel:"email",name:"Email",description:"Send notifications to your account email address.",scope:"personal",destinationManagement:"none",personalSettingsPath:"/settings/notifications"},{channel:"sms",name:"SMS",description:"Send notifications to your verified phone number.",scope:"personal",destinationManagement:"none",personalSettingsPath:"/settings/account?phone-number=add"},{channel:"slack",name:"Slack DMs",description:"Send personal notifications by Slack DM.",scope:"personal",destinationManagement:"none",personalSettingsPath:"/settings/connected-accounts/slack"},{channel:"slack_channel",name:"Slack",description:"Post this project's alerts to selected Slack channels.",scope:"project",destinationManagement:"slack_channels",projectIntegrationPath:"slack"},{channel:"teams_channel",name:"Microsoft Teams",description:"Post this project's alerts to selected Microsoft Teams channels.",scope:"project",destinationManagement:"teams_channels",projectIntegrationPath:"teams"},{channel:"incident_io",name:"incident.io",description:"Route this project's alerts to incident.io.",scope:"project",destinationManagement:"integration_connections",projectIntegrationPath:"incident-io"},{channel:"pagerduty",name:"PagerDuty",description:"Route this project's alerts to PagerDuty.",scope:"project",destinationManagement:"integration_connections",projectIntegrationPath:"pagerduty"},{channel:"rootly",name:"Rootly",description:"Route this project's alerts to Rootly.",scope:"project",destinationManagement:"integration_connections",projectIntegrationPath:"rootly"},{channel:"webhook",name:"Webhooks",description:"Send this project's alerts to configured HTTPS endpoints.",scope:"project",destinationManagement:"webhook_endpoints",projectSettingsPath:"webhooks"}],CJ=new Set(jJ.map(({channel:e})=>e));if(CJ.size!==Sr.length||Sr.some((e)=>!CJ.has(e)))throw Error("Notification channel definitions must represent every channel")});var NJ,ble=(e,t)=>e.value===t.value&&e.label===t.label&&e.scope===t.scope&&e.role===t.role&&e.defaultOff===t.defaultOff&&(e.deliveryConditions??[]).join(",")===(t.deliveryConditions??[]).join(","),wt=(e)=>{for(let t of Object.values(e)){let n=NJ.get(t.value);if(n&&!ble(n,t))throw Error(`Notification type registered twice with conflicting definitions: ${t.value}`);if(t.role!==void 0&&t.scope!=="org")throw Error(`Notification type role restrictions require org scope: ${t.value}`);if(t.label.trim().length===0)throw Error(`Notification type needs a display label: ${t.value}`);NJ.set(t.value,t)}return e};var Kn=d(()=>{NJ=new Map});var RJ;var xJ=d(()=>{Kn();RJ=wt({AUTOMATION_FINISHED:{value:"automation_finished",label:"Automation completed",scope:"project",defaultOff:!0},AUTOMATION_RUN_FAILED:{value:"automation_run_failed",label:"Automation run failed",scope:"project"}})});var UJ;var MJ=d(()=>{Kn();UJ=wt({BILLING_PLAN_UPGRADE_APPLIED:{value:"billing_plan_upgrade_applied",label:"Billing upgrade applied",scope:"org",role:"admin"},BILLING_PLAN_DOWNGRADE_SCHEDULED:{value:"billing_plan_downgrade_scheduled",label:"Billing downgrade scheduled",scope:"org",role:"admin"},BILLING_PLAN_DOWNGRADE_APPLIED:{value:"billing_plan_downgrade_applied",label:"Billing downgrade applied",scope:"org",role:"admin"},BILLING_CREDIT_BALANCE_LOW:{value:"billing_credit_balance_low",label:"Billing credits low",scope:"org",role:"admin"},BILLING_CREDIT_BALANCE_DEPLETED:{value:"billing_credit_balance_depleted",label:"Billing credits depleted",scope:"org",role:"admin"},BILLING_AUTO_TOP_UP_SETTINGS_CHANGED:{value:"billing_auto_top_up_settings_changed",label:"Billing auto top-up changed",scope:"org",role:"admin"},BILLING_AUTO_TOP_UP_FAILED:{value:"billing_auto_top_up_failed",label:"Billing auto top-up failed",scope:"org",role:"admin"},BILLING_INVOICE_PAID:{value:"billing_invoice_paid",label:"Billing invoice paid",scope:"org",role:"admin"},BILLING_NEGATIVE_BALANCE_COLLECTED:{value:"billing_negative_balance_collected",label:"Billing outstanding balance charged",scope:"org",role:"admin"},BILLING_NEGATIVE_BALANCE_COLLECTION_FAILED:{value:"billing_negative_balance_collection_failed",label:"Billing outstanding balance charge failed",scope:"org",role:"admin"}})});var EJ;var KJ=d(()=>{Kn();EJ=wt({INTEGRATION_CONNECTED:{value:"integration_connected",label:"Integration connected",scope:"org",defaultOff:!0},INTEGRATION_DISCONNECTED:{value:"integration_disconnected",label:"Integration disconnected",scope:"org"}})});var GJ;var qJ=d(()=>{Kn();GJ=wt({ISSUE_TRIGGERED:{value:"issue_triggered",label:"Issue triggered",scope:"project",deliveryConditions:["component","severity"]},ISSUE_RESOLVED:{value:"issue_resolved",label:"Issue resolved",scope:"project",deliveryConditions:["component","severity"]},ISSUE_IGNORED:{value:"issue_ignored",label:"Issue ignored",scope:"project",deliveryConditions:["component","severity"]}})});var JJ;var BJ=d(()=>{Kn();JJ=wt({PROJECT_CREATED:{value:"project_created",label:"Project created",scope:"org",defaultOff:!0},PROJECT_DELETED:{value:"project_deleted",label:"Project deleted",scope:"org",defaultOff:!0},MEMBER_INVITED:{value:"member_invited",label:"Member invited",scope:"org",defaultOff:!0},USER_REMOVED:{value:"user_removed",label:"Member removed",scope:"org",defaultOff:!0},MCP_CONNECTOR_ADDED:{value:"mcp_connector_added",label:"MCP connector added",scope:"org",defaultOff:!0},MCP_CONNECTOR_REMOVED:{value:"mcp_connector_removed",label:"MCP connector removed",scope:"org",defaultOff:!0},SECRET_KEY_CREATED:{value:"secret_key_created",label:"Secret key created",scope:"org",defaultOff:!0},SECRET_KEY_DELETED:{value:"secret_key_deleted",label:"Secret key deleted",scope:"org",defaultOff:!0}})});var HJ;var WJ=d(()=>{Kn();HJ=wt({SANDBOX_CREATED:{value:"sandbox_created",label:"Sandbox connected",scope:"project",defaultOff:!0},SANDBOX_DELETED:{value:"sandbox_deleted",label:"Sandbox disconnected",scope:"project",defaultOff:!0},DATA_SOURCE_CONNECTED:{value:"data_source_connected",label:"Data source connected",scope:"project",defaultOff:!0},DATA_SOURCE_DISCONNECTED:{value:"data_source_disconnected",label:"Data source disconnected",scope:"project"},GITHUB_CONNECTED:{value:"github_connected",label:"GitHub connected",scope:"project",defaultOff:!0},GITHUB_DISCONNECTED:{value:"github_disconnected",label:"GitHub disconnected",scope:"project"},CODE_REPO_CONNECTED:{value:"code_repo_connected",label:"Code repository connected",scope:"project",defaultOff:!0},CODE_REPO_DISCONNECTED:{value:"code_repo_disconnected",label:"Code repository disconnected",scope:"project"},PUBLIC_KEY_DEACTIVATED:{value:"public_key_deactivated",label:"Public key deactivated",scope:"project"}})});var FJ;var ZJ=d(()=>{Kn();FJ=wt({SECURITY_ALERT:{value:"security_alert",label:"Security alert",scope:"org",role:"admin"}})});var OI,rt,ple,AI=(e)=>{let t=ple.get(e)?.label;if(t)return t;let n=e.replace(/_/g," ").trim();return n?n.charAt(0).toUpperCase()+n.slice(1):e};var Rc=d(()=>{xJ();MJ();KJ();qJ();BJ();WJ();ZJ();Kn();OI={...FJ,...JJ,...EJ,...RJ,...GJ,...HJ,...UJ},rt=Object.fromEntries(Object.entries(OI).map(([e,t])=>[e,t.value])),ple=new Map(Object.values(OI).map((e)=>[e.value,e]))});var TI,YJ,EHe,In,KHe;var xc=d(()=>{Rc();Nc();Nc();TI=Object.values(rt),YJ=[rt.BILLING_PLAN_UPGRADE_APPLIED,rt.BILLING_PLAN_DOWNGRADE_SCHEDULED,rt.BILLING_PLAN_DOWNGRADE_APPLIED,rt.BILLING_CREDIT_BALANCE_LOW,rt.BILLING_CREDIT_BALANCE_DEPLETED,rt.BILLING_AUTO_TOP_UP_SETTINGS_CHANGED,rt.BILLING_AUTO_TOP_UP_FAILED,rt.BILLING_INVOICE_PAID,rt.BILLING_NEGATIVE_BALANCE_COLLECTED,rt.BILLING_NEGATIVE_BALANCE_COLLECTION_FAILED],EHe=new Set(YJ),In=[rt.ISSUE_TRIGGERED,rt.ISSUE_RESOLVED,rt.ISSUE_IGNORED,rt.AUTOMATION_RUN_FAILED],KHe=new Set(In)});var dd;var QJ=d(()=>{Nc();me();xc();dd=a.enum(TI)});var fle;var VJ=d(()=>{Rc();xc();fle=In.map((e)=>({notificationType:e,label:AI(e)}))});var eB=d(()=>{Rc();xc()});var LI=d(()=>{Nc();Rc();xc();QJ();VJ();eB()});var kle,Sle,Ple,Ile,$le,Ole,Ale,DI,TWe;var tB=d(()=>{LI();me();Ce();kle=a.enum(["ready","missing","degraded","unavailable"]),Sle=a.object({id:a.string(),label:a.string(),status:a.enum(["active","inactive","degraded"]),statusLabel:a.string()}),Ple=a.object({channel:ud,name:a.string(),description:a.string(),scope:a.enum(["personal","project"]),enabled:a.boolean().nullable(),preferenceId:a.string().nullable(),prerequisite:a.object({status:kle,statusLabel:a.string(),message:a.string()}),action:a.object({label:a.string(),href:a.string()}).nullable(),destinations:a.array(Sle),destinationManagement:a.enum(["none","slack_channels","teams_channels","integration_connections","webhook_endpoints"]),canCreateDestinations:a.boolean(),supportedNotificationTypes:a.array(dd)}),Ile=a.object({channel:po,enabled:a.boolean(),preferenceId:a.string().nullable()}),$le=a.object({channel:po,notificationType:dd,enabled:a.boolean(),preferenceId:a.string()}),Ole=a.object({projectId:a.string().uuid().optional().describe("Project to inspect. Auto-filled from CLI and SDK context when omitted.")}),Ale=a.object({channelCards:a.array(Ple).length(10),channels:a.array(Ile),notificationTypePreferences:a.array($le),issueNotificationMinSeverity:a.enum(["low","medium","high","critical"])}),DI=I({operationId:"notificationChannels.getProject",summary:"List Project Notification Channels",description:"List a project's notification channels with preferences, prerequisites, connection state, configured destinations, and supported notification types.",backend:"api",route:{method:"GET",path:"/notification-channels",tags:["Notification channels"]},input:Ole,output:Ale,pagination:"none",async:"sync"}),TWe={getProject:DI.contract}});var nB,zI,oB,_I,_We,jWe,jI,NI=(e,t)=>{if(e.componentId&&"componentIds"in e.condition&&e.condition.componentIds?.length)t.addIssue({code:"custom",path:["condition","componentIds"],message:"Use componentId instead of legacy condition.componentIds."})},NWe,iB,CI,RI,Uc,rB,Tle,Lle,Dle,Cle,zle,_le,jle,Nle,Rle,xI,UI,MI,EI,KI,RWe;var aB=d(()=>{LI();me();Ce();nB=a.enum(["low","medium","high","critical"]),zI=a.object({severities:a.array(nB).min(1).optional()}).strict(),oB=a.object({componentIds:a.array(a.string().uuid()).min(1).max(1).optional(),severities:a.array(nB).min(1).optional()}).strict(),_I=a.object({channel:po,destinationKey:a.string().min(1)}),_We=a.object({destinations:a.array(_I).min(1),notificationTypes:a.array(a.enum(In)).min(1),componentId:a.string().uuid().optional().describe("Stable component registry ID matched by this rule."),includeDescendants:a.boolean().default(!1).describe("Whether the rule also matches descendant components."),condition:zI}),jWe=a.object({destinations:a.array(_I).min(1),notificationTypes:a.array(a.enum(In)).min(1),condition:oB}),jI=a.object({destinations:a.array(_I).min(1),notificationTypes:a.array(a.enum(In)).min(1),componentId:a.string().uuid().optional().describe("Stable component registry ID matched by this rule."),includeDescendants:a.boolean().default(!1).describe("Whether the rule also matches descendant components."),condition:a.union([zI,oB])}),NWe=jI.superRefine(NI),iB=a.object({id:a.string(),channel:po,destinationKey:a.string(),displayName:a.string()}),CI=a.object({id:a.string().uuid(),label:a.string(),lifecycle:a.enum(["active","retired","merged"])}),RI=a.object({id:a.string().uuid(),projectId:a.string().uuid(),notificationTypes:a.array(a.enum(In)),destinations:a.array(iB),condition:zI,component:CI.nullable(),componentId:a.string().uuid().nullable(),includeDescendants:a.boolean(),suspendedAt:a.string().datetime().nullable(),suspensionReason:a.string().nullable(),components:a.array(CI).max(1),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),Uc=a.object({projectId:a.string().uuid().optional().describe("Project whose notification delivery rules are being managed.")}),rB=a.string().uuid().describe("Logical notification delivery rule ID."),Tle=Uc,Lle=a.object({rules:a.array(RI)}),Dle=a.object({destinations:a.array(iB),notificationTypes:a.array(a.object({notificationType:a.enum(In),label:a.string(),conditions:a.array(a.enum(["component","severity"]))})),components:a.array(CI)}),Cle=Uc.extend(jI.shape).superRefine(NI),zle=RI,_le=Uc.extend({...jI.shape,ruleId:rB}).superRefine(NI),jle=RI,Nle=Uc.extend({ruleId:rB}),Rle=a.object({removed:a.boolean()}),xI=I({operationId:"notificationDeliveryRules.list",description:"List the positive delivery rules for a project.",backend:"api",route:{method:"GET",path:"/notification-delivery-rules",tags:["Notification delivery rules"]},input:Tle,output:Lle,pagination:"none",async:"sync"}),UI=I({operationId:"notificationDeliveryRules.options",description:"List available destinations, events, and conditions for project delivery rules.",backend:"api",route:{method:"GET",path:"/notification-delivery-rules/options",tags:["Notification delivery rules"]},input:Uc,output:Dle,pagination:"none",async:"sync"}),MI=I({operationId:"notificationDeliveryRules.create",description:"Create a positive project notification delivery rule.",backend:"api",route:{method:"POST",path:"/notification-delivery-rules",tags:["Notification delivery rules"]},input:Cle,output:zle,pagination:"none",async:"sync"}),EI=I({operationId:"notificationDeliveryRules.update",description:"Replace a positive delivery rule atomically.",backend:"api",route:{method:"PUT",path:"/notification-delivery-rules/{ruleId}",tags:["Notification delivery rules"]},input:_le,output:jle,pagination:"none",async:"sync"}),KI=I({operationId:"notificationDeliveryRules.delete",description:"Delete a positive delivery rule without deleting its reusable destinations.",backend:"api",route:{method:"DELETE",path:"/notification-delivery-rules/{ruleId}",tags:["Notification delivery rules"]},input:Nle,output:Rle,pagination:"none",async:"sync"}),RWe={list:xI.contract,options:UI.contract,create:MI.contract,update:EI.contract,delete:KI.contract}});var GI,xle,Ule,Mle,Ele,Kle,Gle,qI,qle,Jle,JI,Ble,Hle,BI,Wle,Fle,HI,Zle,Xle,WI,EWe;var cB=d(()=>{me();Ce();GI=a.enum(["accept-invite","create-organization","billing","configure-project","connect-github-account","install-github-app","configure-code-search","install-slack-app","configure-slack-notifications","trigger-issue","confirm-issue","finish"]),xle=a.enum(["needs-onboarding","blocked","ready"]),Ule=a.enum(["incomplete","complete","skipped"]),Mle=a.object({invitationId:a.string(),organizationId:a.string(),organizationName:a.string(),organizationSlug:a.string(),organizationImageUrl:a.string().nullable(),inviterName:a.string().nullable()}),Ele=a.object({gate:xle,canonicalStep:GI.nullable(),organizationId:a.string().nullable(),projectId:a.string().nullable(),completionByStep:a.record(GI,Ule),githubSkipped:a.boolean(),githubAppSkipped:a.boolean(),slackSkipped:a.boolean(),sampleIssueId:a.string().nullable(),actorRole:a.enum(["admin","member"]).nullable(),requiredStep:a.union([GI,a.literal("select-organization")]).nullable(),isCompleted:a.boolean(),onboardingRecommendationsThreadId:a.string().nullable(),hasOrganizations:a.boolean(),hasPaidBillingSubscription:a.boolean(),billingStepEnabled:a.boolean(),pendingInvitations:a.array(Mle)}),Kle=a.object({}),Gle=a.object({onboarding:Ele}),qI=I({operationId:"onboarding.getState",description:"Read onboarding progress for the authenticated user.",backend:"api",route:{method:"GET",path:"/onboarding/state",tags:["Onboarding"]},input:Kle,output:Gle,pagination:"none",async:"sync"}),qle=a.object({integration:a.enum(["github","slack"]).describe("Integration onboarding step to skip.")}),Jle=a.object({skipped:a.literal(!0)}),JI=I({operationId:"onboarding.skipIntegration",description:"Skip a GitHub or Slack integration step during onboarding.",backend:"api",route:{method:"POST",path:"/onboarding/skip-integration",tags:["Onboarding"]},input:qle,output:Jle,pagination:"none",async:"sync"}),Ble=a.object({}),Hle=a.object({skipped:a.literal(!0)}),BI=I({operationId:"onboarding.skipGithubAppInstallation",summary:"Skip GitHub App Installation",description:"Skip GitHub App installation during onboarding.",backend:"api",route:{method:"POST",path:"/onboarding/skip-github-app",tags:["Onboarding"]},input:Ble,output:Hle,pagination:"none",async:"sync"}),Wle=a.object({}),Fle=a.object({skipped:a.literal(!0)}),HI=I({operationId:"onboarding.skipSampleIssue",summary:"Skip Test Issue",description:"Skip the optional test issue during onboarding.",backend:"api",route:{method:"POST",path:"/onboarding/skip-sample-issue",tags:["Onboarding"]},input:Wle,output:Fle,pagination:"none",async:"sync"}),Zle=a.object({projectId:a.string().uuid().describe("Project that completed onboarding.")}),Xle=a.object({completed:a.boolean()}),WI=I({operationId:"onboarding.finish",description:"Mark onboarding complete when all prerequisites are satisfied.",backend:"api",route:{method:"POST",path:"/onboarding/finish",tags:["Onboarding"]},input:Zle,output:Xle,pagination:"none",async:"sync"}),EWe={getState:qI.contract,skipIntegration:JI.contract,skipGithubAppInstallation:BI.contract,skipSampleIssue:HI.contract,finish:WI.contract}});var gd,Yle,Qle,Vle,eue,tue,nue,oue,iue,rue,aue,FI,ZI,XI,YI,BWe;var sB=d(()=>{me();Ce();rd();gd=a.object({id:a.string().min(1),name:a.string(),slug:a.string(),logo:a.string().nullable().optional()}),Yle=gd.extend({role:mr.optional()}),Qle=a.object({}),Vle=a.object({organizations:a.array(Yle).describe("Organizations available to the current credential.")}),eue=a.object({organizationId:a.string().min(1).describe("Organization ID to fetch.")}),tue=a.object({organization:gd}),nue=a.object({organizationId:a.string().min(1).describe("Organization ID to update. SDK and CLI callers can auto-fill this before dispatch."),name:a.string().trim().min(1).max(100).describe("New organization name.")}),oue=a.object({organization:gd.describe("Updated organization.")}),iue=a.string().trim().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(/^[\p{L}\p{N} _-]+$/u,"Name can only contain letters, numbers, spaces, hyphens, and underscores"),rue=a.object({name:iue.describe("Organization display name.")}),aue=a.object({organization:gd}),FI=I({operationId:"organizations.create",description:"Create an organization for the authenticated user.",backend:"api",route:{method:"POST",path:"/organizations",tags:["Organizations"],successStatus:201},input:rue,output:aue,pagination:"none",async:"sync"}),ZI=I({operationId:"organizations.list",description:"List organizations available to the current credential.",backend:"api",route:{method:"GET",path:"/organizations",tags:["Organizations"]},input:Qle,output:Vle,pagination:"none",async:"sync"}),XI=I({operationId:"organizations.get",description:"Get one organization by ID.",backend:"api",route:{method:"GET",path:"/organizations/{organizationId}",tags:["Organizations"]},input:eue,output:tue,pagination:"none",async:"sync"}),YI=I({operationId:"organizations.update",description:"Update one organization.",backend:"api",route:{method:"PATCH",path:"/organizations/{organizationId}",tags:["Organizations"]},input:nue,output:oue,pagination:"none",async:"sync",examples:[{name:"rename-organization",input:{organizationId:"organization-123",name:"Observed Platform"},output:{organization:{id:"organization-123",name:"Observed Platform",slug:"acme",logo:null}}}]}),BWe={list:ZI.contract,get:XI.contract,create:FI.contract,update:YI.contract}});var Pr,Mc,hB,lB,uB,dB,gB,yB,bB,yd,bd,md,mB,pB,pd,wB,fB,wd,cue;var QI=d(()=>{me();Ce();Pr=a.enum(["us-east-1","us-east-2","us-west-1","us-west-2","eu-central-1","eu-central-2","eu-north-1","eu-south-1","eu-south-2","eu-west-1","eu-west-2","eu-west-3"]),Mc=a.object({id:a.string().uuid(),organizationId:a.string().min(1),name:a.string(),region:Pr}),hB=a.object({organizationId:a.string().min(1).optional().describe("Organization to list projects for. Auto-filled from CLI and SDK context when omitted.")}),lB=a.object({projects:a.array(Mc).describe("Projects visible within the selected organization.")}),uB=a.object({projectId:a.string().uuid().describe("Project ID to fetch.")}),dB=a.string().trim().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(/^[\p{L}\p{N} _-]+$/u,"Name can only contain letters, numbers, spaces, hyphens, and underscores"),gB=a.object({organizationId:a.string().min(1).optional().describe("Organization to create the project under. Auto-filled from CLI and SDK context when omitted."),name:dB.describe("Project name."),region:Pr.optional().default("us-west-2").describe("AWS region where the new project should be created.")}),yB=a.object({project:Mc}),bB=a.object({project:Mc}),yd=I({operationId:"projects.list",description:"List projects in an organization.",backend:"api",route:{method:"GET",path:"/projects",tags:["Projects"]},input:hB,output:lB,pagination:"none",async:"sync"}),bd=I({operationId:"projects.get",description:"Get one project by ID.",backend:"api",route:{method:"GET",path:"/projects/{projectId}",tags:["Projects"]},input:uB,output:bB,pagination:"none",async:"sync"}),md=I({operationId:"projects.create",description:"Create one project in an organization.",backend:"api",route:{method:"POST",path:"/projects",successStatus:201,tags:["Projects"]},input:gB,output:yB,pagination:"none",async:"sync"}),mB=a.object({projectId:a.string().uuid().describe("Project ID to update."),name:dB.optional().describe("New project name.")}),pB=a.object({project:Mc}),pd=I({operationId:"projects.update",description:"Update (rename) one project by ID. User credentials require the `settings:write` organization permission (admin or owner role).",backend:"api",route:{method:"PATCH",path:"/projects/{projectId}",tags:["Projects"]},input:mB,output:pB,pagination:"none",async:"sync"}),wB=a.object({projectId:a.string().uuid().describe("Project ID to delete.")}),fB=a.void(),wd=I({operationId:"projects.delete",description:"Delete one project by ID. User credentials require the `settings:write` organization permission (admin or owner role).",backend:"api",route:{method:"DELETE",path:"/projects/{projectId}",successStatus:204,tags:["Projects"]},input:wB,output:fB,pagination:"none",async:"sync"}),cue={list:yd.contract,get:bd.contract,create:md.contract,update:pd.contract,delete:wd.contract}});var vB,sue,hue,lue,uue,due,VI,QWe;var kB=d(()=>{me();Ce();vB=a.enum(["open","merged","closed"]),sue=a.enum(["review_required","approved","changes_requested"]),hue=a.enum(["passing","failing","pending"]),lue=a.object({id:a.string().uuid(),projectId:a.string().uuid(),repositoryFullName:a.string(),pullRequestId:a.string().describe("Provider-native pull request identifier (GitHub PR number or Bitbucket PR id), serialized as a string."),githubPullRequestId:a.number().int().describe("Deprecated: use pullRequestId. Numeric form of the provider-native pull request identifier; kept for backward compatibility."),title:a.string().nullable(),url:a.string().nullable(),status:vB.nullable(),reviewState:sue.nullable(),checksState:hue.nullable(),requestedByUserId:a.string().nullable(),authorLogin:a.string().nullable().describe("Forge login that authored the pull request (often the Sazabi app identity)."),githubAuthorLogin:a.string().nullable().describe("Deprecated: use authorLogin. Kept for backward compatibility."),threadId:a.string().uuid().nullable(),runId:a.string().uuid().nullable(),createdAt:a.string().datetime(),mergedAt:a.string().datetime().nullable(),closedAt:a.string().datetime().nullable()}),uue=a.object({projectId:a.string().uuid().optional().describe("Project to list pull requests for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of pull requests to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:vB.optional().describe("Filter by pull request status (open, merged, or closed)."),repositoryFullName:a.string().trim().optional().describe("Filter by repository full name, for example owner/repo. Case-insensitive."),requestedByUserId:a.string().trim().optional().describe("Filter by the Sazabi user who requested the pull request. Pass 'me' to filter to the authenticated user.")}),due=a.object({pullRequests:a.array(lue),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),VI=I({operationId:"pullRequests.list",description:"List pull requests that Sazabi opened, optionally filtered by status, repository, and requesting user.",backend:"api",route:{method:"GET",path:"/pull-requests",tags:["Pull Requests"]},input:uue,output:due,pagination:"cursor",async:"sync"}),QWe={list:VI.contract}});var SB,PB,IB,$B,OB,Ec;var e$=d(()=>{me();Ce();SB=a.enum(["data_source","mcp_connector","sandbox_cli","integration"]),PB=a.enum(["connected","recommended"]),IB=a.object({kind:SB.describe("What the recommendation targets: a data source, MCP connector, sandbox CLI, or integration."),targetId:a.string().describe("Exact catalog id for the kind (data source type, MCP provider id, sandbox CLI preset type, or integration provider id)."),status:PB.describe("Resolved live against current connections: connected (already set up) or recommended (suggested, not yet connected)."),roiScore:a.number().int().min(0).max(100).describe("Intrinsic ROI score, 0–100 — a normalized blend of how valuable, how easy to connect, and how proven the item is. A pure function of the item; computed live on read, never stored."),priority:a.number().int().min(1).describe("1-based rank within this list, sorted by roiScore (best first). Items are already returned in priority order; the field lets consumers recover the rank without trusting array position.")}),$B=a.object({projectId:a.string().uuid().optional().describe("Project to list recommendations for. Auto-filled from CLI and SDK context when omitted.")}),OB=a.object({recommendations:a.array(IB).describe("The project's configuration recommendations, deduped by (kind, targetId), with status resolved live and each item's ROI score. Returned in priority order (highest roiScore first).")}),Ec=I({operationId:"recommendations.list",description:"List a project's configuration recommendations (data sources, MCP connectors, sandbox CLIs, and integrations) with each item's live connection status.",backend:"api",route:{method:"GET",path:"/recommendations",tags:["Recommendations"]},input:$B,output:OB,pagination:"none",async:"sync"})});var AB,gue,TB,fd,LB,DB,CB,zB,Ir,_B,jB,NB,vd,yue;var t$=d(()=>{me();Ce();AB=a.object({type:a.string().describe("Preset type identifier."),label:a.string().describe("Human-readable display name."),executableNames:a.array(a.string()).describe("CLI binary names installed by this preset."),envVarKeys:a.array(a.string()).describe("Environment variables required for authentication."),setupSkill:a.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),gue=a.object({}),TB=a.object({types:a.array(AB)}),fd=I({operationId:"sandboxPresets.listTypes",description:"List all supported sandbox CLI types with their environment variable requirements and setup skills.",backend:"api",route:{method:"GET",path:"/sandbox-presets/types",tags:["Sandbox Presets"]},input:gue,output:TB,pagination:"none",async:"sync"}),LB=a.enum(["github_app","personal_access_token","stored_credentials"]),DB=a.object({presetType:a.string().describe("Preset type identifier."),credentialSource:LB.describe("Authoritative credential source for the preset."),isSystemManaged:a.boolean().describe("Whether the connection follows an integration lifecycle."),fallbackConfigured:a.boolean().describe("Whether user-provided fallback credentials are stored for this preset."),envVarKeys:a.array(a.string()).describe("Stored environment variable names. Secret values are omitted.")}),CB=a.object({projectId:a.string().uuid().optional().describe("Project to inspect. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted.")}),zB=a.object({connections:a.array(DB)}),Ir=I({operationId:"sandboxPresets.listConnections",description:"List a project's stored and integration-backed sandbox CLI connections without returning secret values.",backend:"api",route:{method:"GET",path:"/sandbox-presets/connections",tags:["Sandbox Presets"]},input:CB,output:zB,pagination:"none",async:"sync"}),_B=a.object({key:a.string().min(1).max(256).regex(/^[A-Za-z_][A-Za-z0-9_]*$/,"Environment variable keys must match /^[A-Za-z_][A-Za-z0-9_]*$/.").describe("Environment variable name (e.g. KUBECONFIG_CONTENTS)."),value:a.string().max(10240).describe("Secret value. Encrypted at rest; never returned by any API response.")}),jB=a.object({projectId:a.string().uuid().optional().describe("Project to configure. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted."),presetType:a.string().min(1).describe("Preset type identifier (e.g. kubectl, aws, github)."),environmentVariables:a.array(_B).max(100).describe("Full set of env vars for this preset. Replaces any previously stored values for the preset.")}),NB=a.object({projectId:a.string().uuid().describe("Project the preset was written to."),presetType:a.string().describe("Preset type that was upserted."),envVarKeys:a.array(a.string()).describe("Env var key names now stored for this preset. Values are never returned.")}),vd=I({operationId:"sandboxPresets.upsertPreset",summary:"Upsert CLI Connection",description:"Set or replace a project's sandbox CLI connection environment variables (e.g. the kubectl CLI's KUBECONFIG_CONTENTS). Values are encrypted server-side and never returned. Requires a secret key scoped to the target project's organization.",backend:"api",route:{method:"POST",path:"/sandbox-presets/config",successStatus:200,tags:["Sandbox Presets"]},input:jB,output:NB,pagination:"none",async:"sync"}),yue={listConnections:Ir.contract,listTypes:fd.contract,upsertPreset:vd.contract}});var kd,RB=1048576,n$,xB,o$,bue,mue,pue,wue,fue,vue,kue,Sue,Pue,Iue,i$,r$,a$,c$,s$,sFe;var UB=d(()=>{me();Ce();kd=a.string().min(1).max(64).regex(/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/,"Name must start with a letter or digit and contain only letters, digits, underscores, and hyphens (max 64 characters).").describe("Script name. Must be unique within the project among non-deleted scripts."),n$=a.string().min(1).refine((e)=>new TextEncoder().encode(e).length<=RB,{message:`Script content must be at most ${RB} bytes (1 MiB).`}).describe("Bash script body materialized as /home/sazabi/scripts/<name>.sh in the sandbox."),xB=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),description:a.string().nullable(),contentHash:a.string().describe("sha256 hex digest of the script content."),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),o$=xB.extend({content:n$}),bue=a.object({projectId:a.string().uuid().optional().describe("Project to list scripts for. Auto-filled from CLI and SDK context when omitted."),search:a.string().optional().describe("Case-insensitive partial match on script name."),cursor:a.string().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of scripts to return per page.")}),mue=a.object({scripts:a.array(xB),nextCursor:a.string().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),pue=a.object({name:kd.describe("Script name to fetch."),projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted.")}),wue=a.object({script:o$}),fue=a.object({projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted."),name:kd.describe("Script name. Must be unique within the project among non-deleted scripts."),content:n$,description:a.string().max(500).nullable().optional().describe("Optional human-readable description.")}),vue=a.object({script:o$}),kue=a.object({name:kd.describe("Script to update."),projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted."),content:n$.optional().describe("New script body. Omit to leave content unchanged."),description:a.string().max(500).nullable().optional().describe("New description, or null to clear it. Omit to leave unchanged.")}),Sue=a.object({script:o$}),Pue=a.object({name:kd.describe("Script to delete."),projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted.")}),Iue=a.object({deleted:a.boolean()}),i$=I({operationId:"scripts.list",description:"List durable bash scripts stored for a project.",backend:"api",route:{method:"GET",path:"/scripts",tags:["Scripts"]},input:bue,output:mue,pagination:"cursor",async:"sync"}),r$=I({operationId:"scripts.get",description:"Get a single project script by name, including its body.",backend:"api",route:{method:"GET",path:"/scripts/{name}",tags:["Scripts"]},input:pue,output:wue,pagination:"none",async:"sync"}),a$=I({operationId:"scripts.create",description:"Create a durable bash script for a project.",backend:"api",route:{method:"POST",path:"/scripts",successStatus:201,tags:["Scripts"]},input:fue,output:vue,pagination:"none",async:"sync"}),c$=I({operationId:"scripts.update",description:"Update a project script's body and/or description.",backend:"api",route:{method:"PATCH",path:"/scripts/{name}",tags:["Scripts"]},input:kue,output:Sue,pagination:"none",async:"sync"}),s$=I({operationId:"scripts.delete",description:"Soft-delete a project script by name.",backend:"api",route:{method:"DELETE",path:"/scripts/{name}",successStatus:204,tags:["Scripts"]},input:Pue,output:Iue,pagination:"none",async:"sync"}),sFe={list:i$.contract,get:r$.contract,create:a$.contract,update:c$.contract,delete:s$.contract}});var h$,MB,EB,KB,GB,$r,Or,$ue;var l$=d(()=>{me();Ce();h$=a.object({projectId:a.string().uuid().optional().describe("Project to search within. Auto-filled from CLI and SDK context when omitted."),query:a.string().trim().min(1,"Query must be at least 1 character").max(500,"Query must be at most 500 characters"),limit:a.coerce.number().min(1).max(100).default(20).describe("Maximum number of search results to return."),page:a.coerce.number().min(1).default(1).describe("One-based page number.")}),MB=h$.extend({status:a.enum(["regular","archived"]).optional().describe("Optional thread status filter.")}),EB=h$.extend({threadId:a.string().uuid().optional().describe("Optional thread restriction for message search."),role:a.enum(["user","assistant"]).optional().describe("Optional message role filter.")}),KB=a.object({threads:a.array(a.object({id:a.string().uuid(),projectId:a.string().uuid().optional(),title:a.string(),status:a.enum(["regular","archived"]),labels:a.array(a.string()),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),highlights:a.array(a.string()),score:a.number().optional()})),pagination:a.object({page:a.number(),limit:a.number(),totalResults:a.number(),totalPages:a.number()}).describe("Page-based pagination metadata for the current search result.")}),GB=a.object({messages:a.array(a.object({id:a.string().uuid(),threadId:a.string().uuid(),threadTitle:a.string(),role:a.enum(["user","assistant"]),content:a.string(),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),highlights:a.array(a.string()),score:a.number().optional()})),pagination:a.object({page:a.number(),limit:a.number(),totalResults:a.number(),totalPages:a.number()}).describe("Page-based pagination metadata for the current search result.")}),$r=I({operationId:"search.threads",description:"Search threads within one project.",backend:"api",route:{method:"GET",path:"/search/threads",tags:["Search"]},input:MB,output:KB,pagination:"page",async:"sync",examples:[{name:"search-open-incidents",input:{projectId:"11111111-1111-4111-8111-111111111111",query:"payment timeout",status:"regular",limit:10,page:1},output:{threads:[{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",title:"Payment timeout in us-west-2",status:"regular",labels:["payments","timeout"],createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-02T00:00:00.000Z",highlights:["payment timeout"],score:123.45}],pagination:{page:1,limit:10,totalResults:1,totalPages:1}}}]}),Or=I({operationId:"search.messages",description:"Search messages within one project.",backend:"api",route:{method:"GET",path:"/search/messages",tags:["Search"]},input:EB,output:GB,pagination:"page",async:"sync",examples:[{name:"search-assistant-messages",input:{projectId:"11111111-1111-4111-8111-111111111111",query:"rollback",role:"assistant",limit:10,page:1},output:{messages:[{id:"33333333-3333-4333-8333-333333333333",threadId:"22222222-2222-4222-8222-222222222222",threadTitle:"Deployment rollback guidance",role:"assistant",content:"Rollback the ingestion deployment and confirm queue depth.",createdAt:"2026-01-02T00:00:00.000Z",updatedAt:"2026-01-02T00:00:00.000Z",highlights:["Rollback the ingestion deployment"],score:98.76}],pagination:{page:1,limit:10,totalResults:1,totalPages:1}}}]}),$ue={threads:$r.contract,messages:Or.contract}});var Gc,JB,BB,HB,WB,FB,ZB,XB,YB,QB,Oue,y$,VB,Sd,Pd,Ar,Id,$d,eH,tH,Tr,u$,Aue,nH,oH,iH,Tue,rH,aH,cH,b$,sH,hH,lH,Od,Ad,Td,Ld,qc,uH,d$,dH,Jc,m$,gH,yH,Lue,Due,p$,bH,mH,pH,wH,fH,vH,kH,w$,Dd,Cd,zd,_d,f$,SH,g$,Kc,v$,Cue,jd,PH,IH,$H,OH,qB,AH,TH,LH,Nd,Rd,DH,k$,CH,zH,_H,jH,NH,xd,Ud,zue;var S$=d(()=>{me();Ce();Gc=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),description:a.string().nullable(),origin:a.enum(["user_declared","code_detected","log_observed"]),lifecycle:a.enum(["active","retired","merged"]),observationState:a.enum(["observed","stale","unobserved"]),registryRevision:a.number().int().nonnegative(),canonicalComponentId:a.string().uuid(),mergedIntoComponentId:a.string().uuid().nullable(),currentStatus:a.enum(["operational","degraded","outage"]).describe("Current health status of this component."),firstSeenAt:a.string().datetime(),lastSeenAt:a.string().datetime(),deletedAt:a.string().datetime().nullable().describe("Timestamp when this component was retired, if any."),retiredAt:a.string().datetime().nullable(),retirementReason:a.string().nullable(),legacyStateUnknown:a.boolean().describe("True only for migration-era inactive rows whose retirement authority is unknown.")}),JB=a.object({projectId:a.string().uuid().optional().describe("Project to list status components for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of components to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),includeDeleted:a.union([a.boolean(),a.stringbool()]).default(!1).describe("When true, include retired and merged components.")}),BB=a.object({statusComponents:a.array(Gc),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),HB=a.object({componentId:a.string().uuid().describe("Status component ID to retrieve.")}),WB=a.object({statusComponent:Gc}),FB=a.object({projectId:a.string().uuid().optional().describe("Project to register the status component in. Auto-filled from CLI and SDK context when omitted."),name:a.string().trim().min(1,"Name is required").describe("Evidence-backed component name to register."),description:a.string().trim().min(1,"Description cannot be empty").optional().describe("Optional component description."),requestId:a.string().uuid().optional().describe("Project-scoped idempotency key. Reuse only for an identical registration request.")}),ZB=a.object({statusComponent:Gc}),XB=a.object({componentId:a.string().uuid().describe("Active component ID to rename."),name:a.string().trim().min(1,"Name is required"),requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact rename."),reason:a.string().trim().min(1,"Reason cannot be empty").describe("Customer-visible audit reason for renaming the component.")}),YB=a.object({statusComponent:Gc}),QB=a.object({componentId:a.string().uuid().describe("Status component ID to deregister."),reason:a.string().trim().min(1,"Reason cannot be empty").optional().describe("Optional reason for audit logging.")}),Oue=a.object({openIssueIds:a.array(a.string().uuid()),activeComponentIssueIds:a.array(a.string().uuid()),automationBindingIds:a.array(a.string().uuid()),notificationRuleIds:a.array(a.string().uuid()),dataSourceMappingIds:a.array(a.string().uuid()),observationIds:a.array(a.string().uuid()),relationshipIds:a.array(a.string().uuid()),recommendationScopeIds:a.array(a.string().uuid()),externalIncidentIds:a.array(a.string().uuid()),authorizedDeliveryIds:a.array(a.string().uuid()),authorizedAutomationRunIds:a.array(a.string().uuid())}),y$=a.object({requestedComponentId:a.string().uuid(),canonicalComponentId:a.string().uuid(),canonicalComponentName:a.string(),lifecycle:a.enum(["active","retired"]),affectedComponentIds:a.array(a.string().uuid()),componentRevisions:a.record(a.string().uuid(),a.number().int().nonnegative()),requiresCanonicalGroupConfirmation:a.boolean(),recommendationScopeEnabled:a.literal(!1),dependents:Oue,counts:a.record(a.string(),a.number().int().nonnegative())}),VB=a.discriminatedUnion("status",[a.object({status:a.literal("observation_withdrawn"),componentId:a.string().uuid(),sourceType:a.literal("secret_key"),withdrawn:a.boolean()}),a.object({status:a.literal("retirement_confirmation_required"),preview:y$})]),Sd=I({operationId:"statusComponents.list",description:"List status page components in a project.",backend:"api",route:{method:"GET",path:"/status-components",tags:["Status Components"]},input:JB,output:BB,pagination:"cursor",async:"sync"}),Pd=I({operationId:"statusComponents.get",description:"Get a single status component by ID.",backend:"api",route:{method:"GET",path:"/status-components/{componentId}",tags:["Status Components"]},input:HB,output:WB,pagination:"none",async:"sync"}),Ar=I({operationId:"statusComponents.register",description:"Register a status page component in a project, or refresh an existing active component with the same name.",backend:"api",route:{method:"POST",path:"/status-components",tags:["Status Components"]},input:FB,output:ZB,pagination:"none",async:"sync"}),Id=I({operationId:"statusComponents.deregister",description:"Withdraw this credential's component observation, or return a retirement preview for a human caller.",backend:"api",route:{method:"POST",path:"/status-components/{componentId}/deregister",tags:["Status Components"]},input:QB,output:VB,pagination:"none",async:"sync"}),$d=I({operationId:"statusComponents.rename",description:"Rename an active component while reserving its previous exact name as an alias.",backend:"api",route:{method:"POST",path:"/status-components/{componentId}/rename",tags:["Status Components"]},input:XB,output:YB,pagination:"none",async:"sync"}),eH=a.object({componentId:a.string().uuid().describe("Component or merged-source ID whose canonical group to retire.")}),tH=a.object({preview:y$}),Tr=a.record(a.string().uuid(),a.number().int().nonnegative()),u$=a.object({id:a.string().uuid(),rowRevision:a.number().int().nonnegative()}),Aue=a.object({notificationRules:a.array(u$),automationBindings:a.array(u$),relationships:a.array(u$)}),nH=a.object({componentId:a.string().uuid().describe("Component or merged-source ID confirmed by the preview."),requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact retirement."),reason:a.string().trim().min(1,"Reason cannot be empty").describe("Customer-visible audit reason for retiring the component."),componentRevisions:Tr.describe("Exact canonical-group revisions returned by retirementPreview."),confirmCanonicalGroup:a.boolean().default(!1).describe("Explicitly confirm retiring the complete canonical group when the request used a merged source.")}),oH=a.object({operationId:a.string().uuid(),status:a.enum(["committed","complete","followup_failed"]),requestedComponentId:a.string().uuid(),canonicalComponentId:a.string().uuid(),affectedComponentIds:a.array(a.string().uuid()),counts:a.record(a.string(),a.number().int().nonnegative()),authorizedDeliveryIds:a.array(a.string().uuid()),authorizedAutomationRunIds:a.array(a.string().uuid()),manualExternalIncidentIds:a.array(a.string().uuid()),issueAutomationSuppressions:a.number().int().nonnegative(),outboxEffectCount:a.number().int().nonnegative(),manifest:Aue,followups:a.record(a.string(),a.unknown()).optional()}),iH=a.object({result:oH}),Tue=a.object({notificationRuleIds:a.array(a.string().uuid()),automationBindingIds:a.array(a.string().uuid()),recommendationScopeIds:a.array(a.string().uuid()),relationshipIds:a.array(a.string().uuid())}),rH=a.object({componentId:a.string().uuid().describe("Retired component or merged-source ID to inspect."),retirementOperationId:a.string().uuid().optional().describe("Optional retirement operation to verify; defaults to the component's current retirement.")}),aH=a.object({requestedComponentId:a.string().uuid(),canonicalComponentId:a.string().uuid(),canonicalComponentName:a.string(),retirementOperationId:a.string().uuid(),affectedComponentIds:a.array(a.string().uuid()),componentRevisions:Tr,eligible:Tue}),cH=a.object({preview:aH}),b$=a.object({notificationRuleIds:a.array(a.string().uuid()).default([]),automationBindingIds:a.array(a.string().uuid()).default([]),recommendationScopeIds:a.array(a.string().uuid()).default([]),relationshipIds:a.array(a.string().uuid()).default([])}),sH=a.object({componentId:a.string().uuid().describe("Retired component or merged-source ID confirmed by preview."),retirementOperationId:a.string().uuid().describe("Retirement operation whose unchanged dependents may be restored."),requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact restoration."),reason:a.string().trim().min(1,"Reason cannot be empty").describe("Customer-visible audit reason for restoring the component."),componentRevisions:Tr.describe("Exact canonical-group revisions returned by restorationPreview."),selections:b$.default({notificationRuleIds:[],automationBindingIds:[],recommendationScopeIds:[],relationshipIds:[]}).describe("Only these still-eligible dependents are restored; omitted selections restore none.")}),hH=a.object({operationId:a.string().uuid(),status:a.literal("complete"),requestedComponentId:a.string().uuid(),canonicalComponentId:a.string().uuid(),affectedComponentIds:a.array(a.string().uuid()),restored:b$}),lH=a.object({result:hH}),Od=I({operationId:"statusComponents.retirementPreview",description:"Preview every synchronous and follow-up consequence of retiring a canonical component group.",backend:"api",route:{method:"POST",path:"/status-components/{componentId}/retirement/preview",tags:["Status Components"]},input:eH,output:tH,pagination:"none",async:"sync"}),Ad=I({operationId:"statusComponents.retire",description:"Atomically retire a confirmed canonical component group and durably enqueue lifecycle follow-ups.",backend:"api",route:{method:"POST",path:"/status-components/{componentId}/retire",tags:["Status Components"]},input:nH,output:iH,pagination:"none",async:"sync"}),Td=I({operationId:"statusComponents.restorationPreview",description:"Preview unchanged retirement-owned dependents that remain eligible for explicit restoration.",backend:"api",route:{method:"POST",path:"/status-components/{componentId}/restoration/preview",tags:["Status Components"]},input:rH,output:cH,pagination:"none",async:"sync"}),Ld=I({operationId:"statusComponents.restore",description:"Restore a retired canonical component and only the explicitly selected eligible dependents.",backend:"api",route:{method:"POST",path:"/status-components/{componentId}/restore",tags:["Status Components"]},input:sH,output:lH,pagination:"none",async:"sync"}),qc=a.enum(["part_of","depends_on"]).describe("Relationship semantics: part_of is an acyclic child-to-parent edge; depends_on may be cyclic."),uH=a.enum(["observed","stale","unobserved"]),d$=a.object({originalComponentId:a.string().uuid(),effectiveComponentId:a.string().uuid(),name:a.string(),lifecycle:a.enum(["active","retired","merged"]),observationState:uH}),dH=a.object({id:a.string().uuid(),source:d$,target:d$,relationshipType:qc,createdAt:a.string().datetime(),endedAt:a.string().datetime().nullable(),endReason:a.string().nullable(),rowRevision:a.number().int().nonnegative()}),Jc=a.object({projectId:a.string().uuid().optional().describe("Project containing the component topology. Auto-filled from CLI and SDK context when omitted.")}),m$=a.object({sourceComponentId:a.string().uuid().describe("Child or dependency-source component ID."),targetComponentId:a.string().uuid().describe("Parent or dependency-target component ID."),relationshipType:qc}),gH=Jc.extend({includeHistorical:a.union([a.boolean(),a.stringbool()]).default(!1).describe("Include historically ended relationships.")}),yH=a.object({relationships:a.array(dH)}),Lue=a.object({ruleId:a.string().uuid(),ruleGroupId:a.string().uuid().nullable(),ownerComponentId:a.string().uuid(),destinationIds:a.array(a.string().uuid()),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),Due=a.object({bindingId:a.string().uuid(),automationId:a.string().uuid(),ownerComponentId:a.string().uuid(),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),p$=a.object({notificationRules:a.array(Lue),automationBindings:a.array(Due)}),bH=m$.extend({action:a.enum(["add","remove"]),organizationId:a.string(),projectId:a.string().uuid(),relationshipId:a.string().uuid().nullable(),componentRevisions:a.record(a.string().uuid(),a.number().int().nonnegative()),policyImpact:p$,confirmationRequired:a.boolean()}),mH=Jc.merge(m$).extend({action:a.enum(["add","remove"]).describe("Topology mutation to preview without changing the graph.")}),pH=a.object({preview:bH}),wH=Jc.merge(m$).extend({requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact mutation."),reason:a.string().trim().min(1,"Reason cannot be empty"),componentRevisions:a.record(a.string().uuid(),a.number().int().nonnegative()),confirmPolicyImpact:a.boolean().default(!1).describe("Confirm the descendant-scoped notification and automation changes shown by preview.")}),fH=wH,vH=wH,kH=a.object({action:a.enum(["add","remove"]),relationshipId:a.string().uuid(),sourceComponentId:a.string().uuid(),targetComponentId:a.string().uuid(),relationshipType:qc,policyImpact:p$}),w$=a.object({result:kH}),Dd=I({operationId:"statusComponents.relationships.list",description:"List active or historical component topology edges.",backend:"api",route:{method:"GET",path:"/status-components/relationships",tags:["Status Components"]},input:gH,output:yH,pagination:"none",async:"sync"}),Cd=I({operationId:"statusComponents.relationships.preview",description:"Preview descendant-scoped notification and automation impact for a topology change.",backend:"api",route:{method:"POST",path:"/status-components/relationships/preview",tags:["Status Components"]},input:mH,output:pH,pagination:"none",async:"sync"}),zd=I({operationId:"statusComponents.relationships.add",description:"Add a confirmed, tenant-safe component topology edge.",backend:"api",route:{method:"POST",path:"/status-components/relationships",tags:["Status Components"]},input:fH,output:w$,pagination:"none",async:"sync"}),_d=I({operationId:"statusComponents.relationships.remove",description:"Historically end a confirmed component topology edge.",backend:"api",route:{method:"POST",path:"/status-components/relationships/remove",tags:["Status Components"]},input:vH,output:w$,pagination:"none",async:"sync"}),f$=a.enum(["suspend","move"]),SH=a.object({disposition:f$,beforeComponentIds:a.array(a.string().uuid()).describe("Exact effective component set returned by mergePreview."),afterComponentIds:a.array(a.string().uuid()).describe("Exact effective component set that ownership would have on the target.")}),g$=a.object({kind:a.enum(["notification_rule","automation_binding"]),policyId:a.string().uuid(),sourceRowRevision:a.number().int().nonnegative(),sourceComponentId:a.string().uuid(),equivalentPolicyId:a.string().uuid().nullable(),equivalent:a.boolean(),defaultDisposition:a.enum(["deduplicate","suspend"]),allowedDispositions:a.array(f$),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),Kc=a.object({kind:a.enum(["notification_rule","automation_binding"]),policyId:a.string().uuid(),ownerComponentId:a.string().uuid(),rowRevision:a.number().int().nonnegative(),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),v$=a.object({relationshipId:a.string().uuid(),action:a.enum(["rewire","close_self","close_duplicate"]),relationshipType:qc,beforeSourceComponentId:a.string().uuid(),beforeTargetComponentId:a.string().uuid(),afterSourceComponentId:a.string().uuid(),afterTargetComponentId:a.string().uuid(),survivingRelationshipId:a.string().uuid().nullable(),beforeRowRevision:a.number().int().nonnegative(),afterRowRevision:a.number().int().nonnegative().nullable()}),Cue=a.object({openIssueIds:a.array(a.string().uuid()),componentIssueIds:a.array(a.string().uuid()),observationIds:a.array(a.string().uuid()),dataSourceMappingIds:a.array(a.string().uuid()),nameIds:a.array(a.string().uuid()),relationshipIds:a.array(a.string().uuid()),recommendationScopeIds:a.array(a.string().uuid())}),jd=a.object({sourceComponentId:a.string().uuid().describe("Active or retired component whose independent grain is removed."),targetComponentId:a.string().uuid().describe("Active terminal component that becomes the canonical target.")}),PH=Jc.merge(jd),IH=jd.extend({organizationId:a.string(),projectId:a.string().uuid(),sourceGroupComponentIds:a.array(a.string().uuid()),targetGroupComponentIds:a.array(a.string().uuid()),affectedComponentIds:a.array(a.string().uuid()),componentRevisions:Tr,inventory:Cue,notificationPolicies:a.array(g$),automationBindings:a.array(g$),notificationScopeChanges:a.array(Kc),automationScopeChanges:a.array(Kc),relationshipChanges:a.array(v$),recommendationScopeEnabled:a.literal(!1),dependentCount:a.number().int().nonnegative(),ordinaryTransactionLimit:a.number().int().positive(),operatorAssistanceRequired:a.boolean(),confirmationRequired:a.boolean()}),$H=a.object({preview:IH}),OH=Jc.merge(jd).extend({requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact consolidation."),reason:a.string().trim().min(1,"Reason cannot be empty").describe("Customer-visible audit reason for consolidation."),componentRevisions:Tr.describe("Exact canonical-group revisions returned by mergePreview."),policyDispositions:a.record(a.string().uuid(),SH).describe("Exactly one disposition for every non-equivalent source policy; each repeats the previewed effective sets."),confirmPolicyImpact:a.boolean().default(!1).describe("Explicitly acknowledge every before/after policy scope change shown by mergePreview.")}),qB=a.object({policyId:a.string().uuid(),action:a.enum(["deduplicated","suspended","moved"]),equivalentPolicyId:a.string().uuid().nullable(),beforeRowRevision:a.number().int().nonnegative(),afterRowRevision:a.number().int().nonnegative(),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),AH=a.object({componentRevisions:Tr,redirectedComponentIds:a.array(a.string().uuid()),dataSourceMappingIds:a.array(a.string().uuid()),movedAliasIds:a.array(a.string().uuid()),historicalDisplayIds:a.array(a.string().uuid()),relationshipChanges:a.array(v$),notificationPolicies:a.array(qB),automationBindings:a.array(qB),notificationScopeChanges:a.array(Kc),automationScopeChanges:a.array(Kc),recommendationScopeIds:a.array(a.string().uuid())}),TH=jd.extend({operationId:a.string().uuid(),status:a.literal("complete"),affectedComponentIds:a.array(a.string().uuid()),manifest:AH}),LH=a.object({result:TH}),Nd=I({operationId:"statusComponents.mergePreview",description:"Preview one-hop redirects, historical preservation, operational rebinding, topology contraction, and policy dispositions for component consolidation.",backend:"api",route:{method:"POST",path:"/status-components/merge/preview",tags:["Status Components"]},input:PH,output:$H,pagination:"none",async:"sync"}),Rd=I({operationId:"statusComponents.merge",description:"Consolidate a source into an active terminal target without rewriting historical issue or observation attribution.",backend:"api",route:{method:"POST",path:"/status-components/merge",tags:["Status Components"]},input:OH,output:LH,pagination:"none",async:"sync"}),DH=a.enum(["degraded","outage"]).describe("Severity of a status-page incident. 'outage' marks the component down; 'degraded' marks partial impact."),k$=a.object({id:a.string().uuid(),componentId:a.string().uuid(),projectId:a.string().uuid(),severity:DH,summary:a.string().describe("Human-readable summary of the status-page issue."),startedAt:a.string().datetime().describe("When the incident began affecting the component."),resolvedAt:a.string().datetime().nullable().describe("When the incident was resolved, or null while ongoing.")}),CH=a.object({projectId:a.string().uuid().optional().describe("Project to list status-page issues for. Auto-filled from CLI and SDK context when omitted."),componentId:a.string().uuid().optional().describe("Restrict results to a single component."),activeOnly:a.union([a.boolean(),a.stringbool()]).default(!1).describe("When true, return only unresolved (ongoing) issues."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of issues to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),zH=a.object({incidents:a.array(k$),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),_H=a.object({timestamp:a.string().datetime(),status:a.enum(["operational","degraded","outage","unknown"]).describe("Worst component status observed during this timeline bucket.")}),jH=a.object({componentId:a.string().uuid().describe("Status component to build the timeline for."),windowStart:a.string().datetime({offset:!0}).optional().describe("Start of the timeline window. Defaults to 7 days before windowEnd."),windowEnd:a.string().datetime({offset:!0}).optional().describe("End of the timeline window. Defaults to now.")}),NH=a.object({componentId:a.string().uuid(),windowStart:a.string().datetime(),windowEnd:a.string().datetime(),timeline:a.array(_H),incidents:a.array(k$)}),xd=I({operationId:"statusComponents.incidents.list",description:"List status-page issues in a project.",backend:"api",route:{method:"GET",path:"/status-incidents",tags:["Status Components"]},input:CH,output:zH,pagination:"cursor",async:"sync"}),Ud=I({operationId:"statusComponents.timeline",description:"Get the dense status timeline and incidents for a component over a time window.",backend:"api",route:{method:"GET",path:"/status-components/{componentId}/timeline",tags:["Status Components"]},input:jH,output:NH,pagination:"none",async:"sync"}),zue={list:Sd.contract,get:Pd.contract,register:Ar.contract,deregister:Id.contract,rename:$d.contract,retirementPreview:Od.contract,retire:Ad.contract,restorationPreview:Td.contract,restore:Ld.contract,mergePreview:Nd.contract,merge:Rd.contract,relationships:{list:Dd.contract,preview:Cd.contract,add:zd.contract,remove:_d.contract},incidents:{list:xd.contract},timeline:Ud.contract}});var RH;var xH=d(()=>{RH=["onboarding","setup"]});var UH,MH,EH,KH,Bc;var P$=d(()=>{xH();me();Ce();UH=a.enum(RH),MH=a.object({id:a.string().describe("Unique task identifier (e.g. install_github_app)."),label:a.string().describe("Short human-readable task name."),description:a.string().describe("Explanation of what needs to be completed to satisfy this task."),instructions:a.string().describe("Step-by-step instructions for completing this task."),completed:a.boolean().describe("Whether the task has been completed."),completedAt:a.string().datetime().nullable().describe("ISO 8601 timestamp of when the task was completed, or null."),category:UH.describe("Task category: onboarding (core setup steps) or setup (additional configuration).")}),EH=a.object({projectId:a.string().uuid().optional().describe("Project to list tasks for. Auto-filled from CLI and SDK context when omitted.")}),KH=a.object({tasks:a.array(MH).describe("All onboarding and setup tasks with their current completion status.")}),Bc=I({operationId:"tasks.list",description:"List all onboarding and setup tasks for a project, including their current completion status and a description of what is required to complete each task.",backend:"api",route:{method:"GET",path:"/tasks",tags:["Tasks"]},input:EH,output:KH,pagination:"none",async:"sync"})});var I$;var GH=d(()=>{fD();kD();Ok();e1();Dk();_k();M1();Gk();QP();rd();iJ();cI();DJ();tB();aB();cB();sB();QI();kB();e$();sd();t$();UB();l$();S$();P$();II();I$={me:VP.contract,automations:{list:tv.contract,get:nv.contract,create:ov.contract,update:iv.contract,enable:rv.contract,disable:av.contract,runs:{list:cv.contract,get:sv.contract,logs:hv.contract}},logs:{query:Ji.contract,schema:Bi.contract,volume:Hi.contract,patterns:Wi.contract,nativeQuery:Fi.contract,searchNatural:Ml.contract},dataSources:{listTypes:ll.contract,listInstances:Ri.contract,createInstance:xi.contract,getInstance:ul.contract,updateInstance:dl.contract,deleteInstance:gl.contract,listStreams:yl.contract,createStream:bl.contract,getStream:ml.contract,updateStream:pl.contract,deleteStream:wl.contract},integrations:{listProviders:YN.contract,listConnections:QN.contract,getConnection:VN.contract},notificationChannels:{getProject:DI.contract},notificationDeliveryRules:{list:xI.contract,options:UI.contract,create:MI.contract,update:EI.contract,delete:KI.contract},mcpConnectors:{listProviders:id.contract,list:gr.contract,get:yr.contract,details:br.contract},sandboxPresets:{listConnections:Ir.contract,listTypes:fd.contract,upsertPreset:vd.contract},scripts:{list:i$.contract,get:r$.contract,create:a$.contract,update:c$.contract,delete:s$.contract},logMatchExpressions:{list:Rk.contract,get:xk.contract,create:Uk.contract,update:Mk.contract,disable:Ek.contract},memory:{put:pr.contract,get:wr.contract,list:fr.contract,search:vr.contract,delete:kr.contract},onboarding:{getState:qI.contract,skipIntegration:JI.contract,skipGithubAppInstallation:BI.contract,skipSampleIssue:HI.contract,finish:WI.contract},organizations:{list:ZI.contract,get:XI.contract,create:FI.contract,update:YI.contract},members:{list:eI.contract,updateRole:tI.contract,remove:nI.contract},publicKeys:{list:Mi.contract,get:Ei.contract,ensureLogForwarding:Ki.contract,update:Gi.contract,deactivate:qi.contract},secretKeys:{list:jl.contract,get:Nl.contract,create:Rl.contract,update:xl.contract,delete:Ul.contract},projects:{list:yd.contract,get:bd.contract,create:md.contract,update:pd.contract,delete:wd.contract},search:{threads:$r.contract,messages:Or.contract},messages:{list:TJ.contract,append:LJ.contract},threads:{list:gI.contract,get:yI.contract,getStatus:bI.contract,stop:mI.contract,create:pI.contract,update:wI.contract,fork:fI.contract,setVisibility:vI.contract,createShareLink:kI.contract,listShareLinks:SI.contract,revokeShareLink:PI.contract},runs:{list:sI.contract,listForThread:hI.contract,get:lI.contract,cancel:uI.contract},pullRequests:{list:VI.contract},issues:{count:Pl.contract,create:Ui.contract,list:kl.contract,search:Sl.contract,get:Il.contract,resolve:$l.contract,ignore:Ol.contract,reopen:Al.contract,reassignAndReopen:Tl.contract,mute:Ll.contract,unmute:Dl.contract},billing:{getSummary:lv.contract,getUsage:uv.contract,listTransactions:dv.contract},tasks:{list:Bc.contract},recommendations:{list:Ec.contract},statusComponents:{list:Sd.contract,get:Pd.contract,register:Ar.contract,deregister:Id.contract,rename:$d.contract,retirementPreview:Od.contract,retire:Ad.contract,restorationPreview:Td.contract,restore:Ld.contract,mergePreview:Nd.contract,merge:Rd.contract,relationships:{list:Dd.contract,preview:Cd.contract,add:zd.contract,remove:_d.contract},incidents:{list:xd.contract},timeline:Ud.contract}}});var Lr=d(()=>{gD();GH();Ok();Dk();_k();Gk();QP();cI();QI();e$();t$();l$();S$();P$()});var _ue="https://api.sazabi.com",jue="x-sazabi-client-source",JH=(e)=>{return{streamRun:async(t)=>{return qH({options:e,path:`/runs/${encodeURIComponent(t.runId)}/stream`,cursor:t.cursor,signal:t.signal})},streamThread:async(t)=>{return qH({options:e,path:`/threads/${encodeURIComponent(t.threadId)}/stream`,cursor:t.cursor,signal:t.signal})}}},qH=async(e)=>{let t=e.options.fetch??globalThis.fetch;if(!t)throw Error("Fetch transport is not available in this runtime.");let n=await e.options.credentialProvider.getToken(),i=Nue(e.options.apiBaseUrl,e.path,e.cursor);return xue({url:i,token:n,clientSource:e.options.clientSource,initialCursor:e.cursor,signal:e.signal,fetch:t})},Nue=(e,t,n)=>{let i=Rue(e??_ue),o=new URL(`${i}${t}`);if(n)o.searchParams.set(Xf,n);return o.toString()},Rue=(e)=>{let t=e.replace(/\/+$/,"");return t.endsWith("/v1")?t:`${t}/v1`},xue=async(e)=>{let t=[],n=[],i=!1,o=!1,r,c=e.initialCursor,s=new AbortController,h=(v)=>{if(i)return;i=!0,r=v;while(n.length>0)n.shift()?.({value:void 0,done:!0})},l=(v)=>{let P=n.shift();if(P){P({value:v,done:!1});return}t.push(v)},u=(v)=>{if(v.event===Qf){let T=Gue(v.data);if(T!==void 0)c=T;return}if(v.data===Vf){o=!0,s.abort(),h();return}let P=que(v.data);if(P)l(P)},g=()=>{o=!0,s.abort(),h()};if(e.signal)if(e.signal.aborted)o=!0,s.abort();else e.signal.addEventListener("abort",g,{once:!0});let y={[Symbol.asyncIterator](){return y},get cursor(){return c},next:async()=>{if(t.length>0)return{value:t.shift(),done:!1};if(i){if(r)throw r;return{value:void 0,done:!0}}return new Promise((v)=>{n.push(v)}).then((v)=>{if(v.done&&r)throw r;return v})},return:async()=>{return o=!0,s.abort(),h(),{value:void 0,done:!0}},throw:async(v)=>{throw o=!0,s.abort(),h(v instanceof Error?v:Error(String(v))),v},close:async()=>{o=!0,s.abort(),h()}};if(o)return h(),y;let b=await e.fetch(e.url,{method:Yf,headers:Uue(e.token,e.clientSource),signal:s.signal});if(await Mue(b))h();else Eue(b,u).then(()=>h()).catch((v)=>{if(Bue(v)||o||e.signal?.aborted){h();return}h(Hue(v))});return y},Uue=(e,t)=>{return{accept:"text/event-stream",authorization:`Bearer ${e}`,...t?{[jue]:t}:{}}},Mue=async(e)=>{if(e.status===204)return!0;if(e.ok&&e.body)return!1;let t=await Jue(e);if(e.status===401)throw Error("Authentication failed. Check your credential.");if(e.status===403)throw Error(`Forbidden (403): ${t||"Credential may not have access to this resource"}`);if(e.status===404)throw Error(`Not found (404): ${t||"Run or thread not found"}`);if(e.status===400)throw Error(`Invalid stream cursor (400): ${t||"The provided cursor was rejected"}`);if(e.status>=400&&e.status<500&&e.status!==429)throw Error(`Client error (${e.status}): ${t}`);if(!e.body)throw Error("Agent stream response did not include a body.");throw Error(e.status===429?`Rate limited (429): ${t}`:`Server error (${e.status}): ${t}`)},Eue=async(e,t)=>{let n=e.body?.getReader();if(!n)throw Error("Agent stream response did not include a body.");let i=new TextDecoder,o="",r=Kue(t);try{while(!0){let c=await n.read();if(c.done)break;o+=i.decode(c.value,{stream:!0});let s=o.split(/\r\n|\r|\n/);o=s.pop()??"";for(let h of s)r.line(h)}if(o+=i.decode(),o)for(let c of o.split(/\r\n|\r|\n/))r.line(c);r.flush()}finally{n.releaseLock()}},Kue=(e)=>{let t="message",n=[],i=()=>{t="message",n=[]},o=()=>{if(n.length===0){i();return}e({event:t,data:n.join(`
8396
+ `)}],evidenceHints:["force.com / my.salesforce.com URLs, SALESFORCE_* or SFDC_* environment variables, or sf/sfdx CLI usage","jsforce, simple-salesforce, or @salesforce packages","README/runbooks naming Salesforce as the CRM or system of record"],helpText:"Query Salesforce data and metadata, and run Apex invocable actions and Flows exposed by a hosted MCP server."})});var NG;var RG=d(()=>{ee();NG=D({id:"sentry",label:"Sentry",iconKey:"sentry",defaultServerUrl:"https://mcp.sentry.dev/mcp",serverUrlPathSuffixMaxSegments:2,transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"sentry",callbackPathSegment:"sentry",authorizationUrl:"https://mcp.sentry.dev/oauth/authorize",tokenUrl:"https://mcp.sentry.dev/oauth/token",useServerUrlAsResource:!0,dynamicClientRegistration:{registrationEndpoint:"https://mcp.sentry.dev/oauth/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"org:read"},{value:"project:write"},{value:"team:write"},{value:"event:write"}],getUrlConfiguration:async()=>({docsUrl:"https://mcp.sentry.dev/",instructions:"Copy `https://mcp.sentry.dev/mcp` for broad access. To scope this connection to one organization or project, copy a path-scoped URL such as `https://mcp.sentry.dev/mcp/your-org` or `https://mcp.sentry.dev/mcp/your-org/your-project`.",defaultServerUrl:"https://mcp.sentry.dev/mcp",imageKeys:["mcp.sentry.url-configuration-page"],optional:!0}),capabilityOverrides:{allowWriteTools:!0},evidenceHints:["@sentry packages, sentry.properties, SENTRY_* environment variables, or sentry-cli usage","Sentry.init calls, release/deploy automation, or Sentry alert docs","README/docs naming Sentry as the error tracking provider"],helpText:"Browse Sentry organizations, teams, projects, and events."})});var xG;var UG=d(()=>{ee();xG=D({id:"signoz",label:"SigNoz",iconKey:"signoz",defaultServerUrl:"https://mcp.us.signoz.cloud/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!0},evidenceHints:["SigNoz config, SIGNOZ_* environment variables, or signoz.io links","OpenTelemetry Collector exporting to SigNoz, or a signoz docker-compose / self-hosted deployment","README/docs naming SigNoz for metrics, logs, traces, alerts, or dashboards"],helpText:"Query SigNoz metrics, logs, traces, alerts, and dashboards to investigate production issues.",setupGroups:[{id:"instance",title:"Find your SigNoz instance",description:"Point Sazabi at the SigNoz instance whose telemetry you want to query.",body:"For SigNoz Cloud, use the regional MCP endpoint for your account, such as `https://mcp.us.signoz.cloud/mcp` (replace the region as needed). For self-hosted SigNoz, use your instance's MCP endpoint and set the SigNoz base URL below so the server knows which instance to target.",fieldKeys:["signozUrl"]},{id:"api-key",title:"Create an API key",description:"Create or copy the SigNoz API key Sazabi will send to SigNoz's MCP endpoint.",body:"In SigNoz, go to **Settings > API Keys** and create or copy an API key. Alert, dashboard, and notification-channel tools require an admin-level key. Paste it below.",fieldKeys:["apiKey"]}],validateCredentials:fE,normalizeHeaders:wE})});var MG;var EG=d(()=>{ee();MG=D({id:"stripe",label:"Stripe MCP",iconKey:"stripe",defaultServerUrl:"https://mcp.stripe.com",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"stripe",callbackPathSegment:"stripe",authorizationUrl:"https://access.stripe.com/mcp/oauth2/authorize",tokenUrl:"https://access.stripe.com/mcp/oauth2/token",resourceUrl:"https://mcp.stripe.com",dynamicClientRegistration:{registrationEndpoint:"https://access.stripe.com/mcp/oauth2/register",tokenEndpointAuthMethod:"none"}},getAvailableScopes:async()=>[{value:"mcp",label:"MCP access",description:"Access the Stripe MCP server tools for the connected account.",required:!0}],scopesUserSelectable:!1,getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Stripe dashboard URLs, `sk_`/`rk_`/`pk_` API keys, or Stripe object IDs (cus_, pi_, ch_)","STRIPE_* environment variables or code that imports the `stripe` SDK","README/runbooks naming Stripe for billing, payments, or subscriptions"],helpText:"Query and manage Stripe payments, customers, and billing."})});var KG;var GG=d(()=>{ee();KG=D({id:"supabase",label:"Supabase",iconKey:"supabase",defaultServerUrl:"https://mcp.supabase.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"supabase",callbackPathSegment:"supabase",authorizationUrl:"https://api.supabase.com/v1/oauth/authorize",tokenUrl:"https://api.supabase.com/v1/oauth/token",dynamicClientRegistration:{registrationEndpoint:"https://api.supabase.com/platform/oauth/apps/register",tokenEndpointAuthMethod:"client_secret_post"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"analytics:read"},{value:"auth:read"},{value:"auth:write"},{value:"database:read"},{value:"database:write"},{value:"domains:read"},{value:"domains:write"},{value:"edge_functions:read"},{value:"edge_functions:write"},{value:"environment:read"},{value:"environment:write"},{value:"organizations:read"},{value:"projects:read"},{value:"projects:write"},{value:"rest:read"},{value:"rest:write"},{value:"secrets:read"},{value:"secrets:write"},{value:"storage:read"}],getUrlConfiguration:async()=>({docsUrl:"https://supabase.com/docs/guides/getting-started/mcp#step-2-configure-your-ai-tool",instructions:"Choose your project and options in the Supabase configuration panel, then copy the generated Server URL.",defaultServerUrl:"https://mcp.supabase.com/mcp",optional:!0}),capabilityOverrides:{allowWriteTools:!0},evidenceHints:["supabase/ directory, supabase/config.toml, or @supabase packages","SUPABASE_* or NEXT_PUBLIC_SUPABASE_* environment variables","README/docs naming Supabase for Postgres, Auth, Storage, or Edge Functions"],helpText:"Manage Supabase organizations, projects, databases, and run SQL.",skill:"supabase",setupSkill:"supabase-setup"})});var qG;var JG=d(()=>{ee();qG=D({id:"superhuman",label:"Superhuman",iconKey:"superhuman",defaultServerUrl:"https://mcp.mail.superhuman.com/mcp",transport:"streamable-http",authMode:"oauth",availability:"enabled",oauth:{providerConfigKey:"superhuman",callbackPathSegment:"superhuman",authorizationUrl:"https://mcp.auth.mail.superhuman.com/oauth2/authorize",tokenUrl:"https://mcp.auth.mail.superhuman.com/oauth2/token",dynamicClientRegistration:{registrationEndpoint:"https://mcp.auth.mail.superhuman.com/oauth2/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"email",required:!0},{value:"offline_access",required:!0},{value:"openid",required:!0},{value:"profile",required:!0}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["Superhuman mail links, SUPERHUMAN_* environment variables, or support workflows naming Superhuman","Customer communication runbooks that depend on email search or drafting","Docs naming Superhuman Mail for sales, support, or founder-led customer comms"],helpText:"Search, draft, send, and triage emails in Superhuman Mail."})});var BG;var HG=d(()=>{ee();BG=D({id:"the-context-company",label:"The Context Company",iconKey:"the-context-company",defaultServerUrl:"https://api.thecontext.company/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{allowWriteTools:!1},evidenceHints:["The Context Company, context company, or context observability references","insight_search, get_agent_runs, or get_agent_sessions tool usage","THE_CONTEXT_COMPANY_API_KEY or api.thecontext.company in MCP configuration"],helpText:"Query agent insights, runs, and sessions through The Context Company's read-only hosted MCP server.",setupGroups:[{id:"api-key",title:"Create a read-only API key",description:"Create the API key The Context Company's hosted MCP server will use.",body:"Create a read-only API key in [The Context Company](https://docs.thecontext.company/access-data/mcp), then paste the raw key below. Sazabi sends it as `Authorization: Bearer <key>` to `https://api.thecontext.company/mcp`.",fieldKeys:["apiKey"]}],validateCredentials:lE,normalizeHeaders:hE,skill:"the-context-company",setupSkill:"the-context-company-setup"})});var WG;var FG=d(()=>{ee();WG=D({id:"vercel",label:"Vercel",iconKey:"vercel",defaultServerUrl:"https://mcp.vercel.com",transport:"streamable-http",authMode:"oauth",availability:"disabled",oauth:{providerConfigKey:"vercel",callbackPathSegment:"vercel",authorizationUrl:"https://vercel.com/oauth/authorize",tokenUrl:"https://vercel.com/api/login/oauth/token",resourceUrl:"https://mcp.vercel.com",dynamicClientRegistration:{registrationEndpoint:"https://vercel.com/api/login/oauth/register",tokenEndpointAuthMethod:"none"}},scopesUserSelectable:!1,getAvailableScopes:async()=>[{value:"openid",required:!0},{value:"offline_access",required:!0}],getUrlConfiguration:async()=>null,capabilityOverrides:{allowWriteTools:!0},evidenceHints:["vercel.com links, VERCEL_* environment variables, or a vercel.json in the repo","Deploy workflows or runbooks naming Vercel as the frontend/hosting provider","Vercel project/deployment IDs or preview URLs referenced in docs or CI"],helpText:"Manage Vercel projects, deployments, and access Vercel platform documentation."})});var ZG;var XG=d(()=>{ee();ZG=D({id:"x",label:"X",iconKey:"x",defaultServerUrl:"https://api.x.com/mcp",transport:"streamable-http",authMode:"headers",availability:"enabled",capabilityOverrides:{readOnlyToolNames:["search_news","get_news","get_trends_by_woeid","get_posts_by_ids","get_posts_counts_recent","search_posts_all","get_posts_by_id","get_posts_liking_users","get_posts_quoted_posts","get_posts_reposted_by","get_users_by_usernames","get_users_by_username","get_users_me","search_users","get_users_by_id","get_users_bookmarks","get_users_bookmark_folders","get_users_bookmarks_by_folder_id","get_users_mentions","get_users_timeline","get_users_posts"]},evidenceHints:["X (Twitter) API usage, X_BEARER_TOKEN, or TWITTER_* environment variables","twitter-api-v2, tweepy, or other X/Twitter API client packages","README/docs naming the X API, X Developer Platform, or tweet automation"],helpText:"Search X posts and access real-time X data using an X API OAuth 2.0 Bearer token.",setupGroups:[{id:"developer-app",title:"Open the X Developer Portal",description:"Use an X developer project/app with access to the X API v2.",body:"Go to the [X Developer Portal](https://developer.x.com/en/portal/dashboard), open the project and app you want Sazabi to use, and confirm the app has access to the API tiers you need. The hosted MCP server lives at `https://api.x.com/mcp`."},{id:"bearer-token",title:"Create an OAuth 2.0 Bearer token",description:"Generate the OAuth 2.0 access token the hosted MCP server will use.",body:"In your app's **Keys and tokens**, generate an OAuth 2.0 access token and copy it. Paste the raw token into Sazabi — Sazabi adds the `Bearer ` prefix and sends it in the `Authorization` header.",fieldKeys:["accessToken"]}],validateCredentials:uE,normalizeHeaders:sE,skill:"x",setupSkill:"x-setup"})});var YG,yKe;var QG=d(()=>{BE();WE();ZE();YE();YP();YP();eK();nK();iK();aK();sK();lK();dK();yK();mK();wK();vK();SK();IK();OK();TK();DK();zK();jK();RK();UK();EK();GK();JK();HK();FK();XK();QK();eG();nG();iG();aG();sG();lG();dG();yG();mG();wG();vG();SG();IG();OG();TG();DG();zG();jG();RG();UG();EG();GG();JG();HG();FG();XG();YG=[KG,AK,LK,JE,HE,FE,XE,QE,VE,tK,oK,rK,cK,hK,gK,bK,pK,fK,uK,kK,PK,CK,_K,NK,xK,MK,KK,qK,BK,WK,ZK,YK,VK,tG,oG,rG,cG,hG,uG,gG,bG,pG,fG,kG,PG,AG,$G,LG,CG,_G,NG,xG,MG,qG,BG,WG,ZG,$K],yKe=new Map(YG.map((e)=>[e.id,e]))});var VG=()=>{};var eq=()=>{};var tq=()=>{};var nq=()=>{};var oq=()=>{};var iq=()=>{};var rq=()=>{};var aq=()=>{};var cq=()=>{};var sq=()=>{};var hq=()=>{};var lq=()=>{};var uq=()=>{};var dq=()=>{};var gq=()=>{};var yq=()=>{};var bq=()=>{};var mq=()=>{};var pq=()=>{};var wq=()=>{};var fq=()=>{};var vq=()=>{};var kq=()=>{};var Sq=()=>{};var Pq=()=>{};var Iq=()=>{};var $q=()=>{};var Oq=()=>{};var Aq=()=>{};var Tq=()=>{};var Lq=()=>{};var Dq=()=>{};var Cq=()=>{};var zq=()=>{};var _q=()=>{};var jq=()=>{};var Nq=()=>{};var Rq=()=>{};var xq=()=>{};var Uq=()=>{};var Mq=d(()=>{VG();eq();tq();nq();oq();iq();rq();aq();cq();sq();hq();lq();uq();dq();gq();yq();bq();mq();pq();wq();fq();vq();kq();Sq();Pq();Iq();$q();Oq();Aq();Tq();Lq();Dq();Cq();zq();_q();jq();Nq();Rq();xq();Uq()});var Eq=()=>{};var Kq=()=>{};var Gq=d(()=>{l4();Gl();tE();ME();QG();ZP();Mq();Eq();Kq()});var qq,rhe,Jq,ahe,Bq,che,Hq,Wq,od,Fq,Zq,Xq,gr,Yq,Qq,yr,Vq,eJ,br,tJ,she,nJ,id,hhe;var QP=d(()=>{Gq();me();Ce();qq=["configured","authorizing","connected","error"],rhe=a.enum(qq),Jq=["preset","custom"],ahe=a.enum(Jq),Bq=["streamable-http","sse"],che=a.enum(Bq),Hq=["none","headers","oauth","aws-sigv4"],Wq=a.enum(Hq),od=a.object({connectionId:a.string().uuid().describe("Connection ID."),connectionKey:a.string().describe("Stable key used to reference this connector in tool calls."),providerId:a.string().describe('Provider identifier, e.g. "linear".'),displayName:a.string().describe("Human-readable connector name."),source:ahe.describe("Whether the connector is a built-in preset or a custom server."),installStatus:rhe.describe("Current connection lifecycle status."),authMode:Wq.describe("Authentication mode."),transport:che.describe("Transport protocol."),serverUrl:a.string().describe("MCP server URL."),readOnly:a.boolean().describe("Whether the connector is restricted to read-only tools."),management:Zk.describe("Lifecycle owner and supported connector mutations."),enabledToolCount:a.number().int().nonnegative().describe("Number of tools enabled and available for this connector."),connectedAt:a.string().datetime().nullable().describe("When the connector last became connected, if ever."),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),Fq=a.object({name:a.string().describe("Tool name as invoked."),title:a.string().describe("Human-readable tool title."),description:a.string().describe("Tool description."),isReadOnly:a.boolean().describe("Whether the tool is considered read-only."),enabled:a.boolean().describe("Whether the tool is enabled and available given the connector config.")}),Zq=a.object({projectId:a.string().uuid().optional().describe("Project to list connectors for. Auto-filled from SDK context when omitted."),connectedOnly:a.boolean().optional().describe("When true, only return connectors that are connected.")}),Xq=a.object({connectors:a.array(od)}),gr=I({operationId:"mcpConnectors.list",description:"List configured MCP connectors within one project with provider, status, and enabled-tool count.",backend:"api",route:{method:"GET",path:"/mcp-connectors",tags:["MCP Connectors"]},input:Zq,output:Xq,pagination:"none",async:"sync"}),Yq=a.object({connectionId:a.string().uuid().describe("Connection ID to fetch."),projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted.")}),Qq=a.object({connector:od}),yr=I({operationId:"mcpConnectors.get",description:"Get one configured MCP connector by connection ID.",backend:"api",route:{method:"GET",path:"/mcp-connectors/{connectionId}",tags:["MCP Connectors"]},input:Yq,output:Qq,pagination:"none",async:"sync"}),Vq=a.object({connectionId:a.string().uuid().describe("Connection ID to inspect."),projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted.")}),eJ=a.object({connector:od,tools:a.array(Fq)}),br=I({operationId:"mcpConnectors.details",description:"Inspect one MCP connector's tool surface, including each tool's name, description, and read-only status.",backend:"api",route:{method:"GET",path:"/mcp-connectors/{connectionId}/details",tags:["MCP Connectors"]},input:Vq,output:eJ,pagination:"none",async:"sync"}),tJ=a.object({providerId:a.string().describe('Provider identifier, e.g. "linear".'),label:a.string().describe("Human-readable provider name."),authMode:Wq.describe("Authentication mode."),availability:a.enum(Zi).describe("Whether the provider is enabled or coming soon."),setupSkill:a.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),she=a.object({}),nJ=a.object({providers:a.array(tJ)}),id=I({operationId:"mcpConnectors.listProviders",description:"List all supported MCP connector providers with their auth mode and setup skill.",backend:"api",route:{method:"GET",path:"/mcp-connectors/providers",tags:["MCP Connectors"]},input:she,output:nJ,pagination:"none",async:"sync"}),hhe={list:gr.contract,get:yr.contract,details:br.contract,listProviders:id.contract}});var mr,lhe,uhe,dhe,ghe,yhe,bhe,mhe,VP,EBe;var rd=d(()=>{me();Ce();mr=a.enum(["admin","member"]),lhe=a.object({id:a.string().min(1),name:a.string(),slug:a.string(),logo:a.string().nullable().optional(),role:mr}),uhe=a.object({id:a.string().min(1),name:a.string().nullable(),email:a.string().email()}),dhe=a.object({credentialType:a.literal("user"),user:uhe,activeOrganizationId:a.string().min(1).nullable(),organizations:a.array(lhe).describe("Organizations the user belongs to, including membership role.")}),ghe=a.object({credentialType:a.literal("secret"),organization:a.object({id:a.string().min(1),name:a.string(),slug:a.string(),logo:a.string().nullable().optional()}),keyName:a.string()}),yhe=a.object({credentialType:a.literal("partner"),superorganization:a.object({id:a.string().uuid(),name:a.string()})}),bhe=a.object({}),mhe=a.discriminatedUnion("credentialType",[dhe,ghe,yhe]),VP=I({operationId:"me.get",description:"Return the identity and available context for the current credential.",backend:"api",route:{method:"GET",path:"/me",tags:["Auth"]},input:bhe,output:mhe,pagination:"none",async:"sync"}),EBe=VP.contract});var oJ,phe,whe,fhe,vhe,khe,She,eI,tI,nI,BBe;var iJ=d(()=>{me();Ce();rd();oJ=a.object({membershipId:a.string().min(1).describe("Organization membership record ID."),userId:a.string().min(1).describe("User ID for the organization member."),name:a.string().nullable().describe("Display name for the member, when available."),email:a.string().email().describe("Email address for the member."),imageUrl:a.string().nullable().describe("Profile image URL for the member, when available."),role:mr.describe("Organization role."),createdAt:a.string().datetime().describe("When the membership was created.")}),phe=a.object({organizationId:a.string().min(1).optional().describe("Organization to list members for. Auto-filled from CLI and SDK context when omitted.")}),whe=a.object({members:a.array(oJ).describe("Members visible within the selected organization.")}),fhe=a.object({organizationId:a.string().min(1).optional().describe("Organization containing the member. Auto-filled from CLI and SDK context when omitted."),userId:a.string().min(1).describe("User ID of the member to update."),role:mr.describe("Role to assign.")}),vhe=a.object({member:oJ.describe("Updated organization member.")}),khe=a.object({params:a.object({userId:a.string().min(1).describe("User ID of the member to remove.")}),query:a.object({organizationId:a.string().min(1).optional().describe("Organization containing the member. Auto-filled from CLI and SDK context when omitted.")})}).transform(({params:e,query:t})=>({...t,...e})),She=a.object({removedUserId:a.string().min(1).describe("User ID removed from the organization.")}),eI=I({operationId:"members.list",description:"List members in an organization.",backend:"api",route:{method:"GET",path:"/members",tags:["Members"]},input:phe,output:whe,pagination:"none",async:"sync",examples:[{name:"organization-members",input:{organizationId:"organization-123"},output:{members:[{membershipId:"membership-123",userId:"user-123",name:"Alex Admin",email:"alex@example.com",imageUrl:null,role:"admin",createdAt:"2026-01-01T00:00:00.000Z"}]}}]}),tI=I({operationId:"members.updateRole",description:"Update a member's organization role.",backend:"api",route:{method:"PATCH",path:"/members/{userId}/role",tags:["Members"]},input:fhe,output:vhe,pagination:"none",async:"sync",examples:[{name:"promote-member",input:{organizationId:"organization-123",userId:"user-456",role:"admin"},output:{member:{membershipId:"membership-456",userId:"user-456",name:"Mina Member",email:"mina@example.com",imageUrl:null,role:"admin",createdAt:"2026-01-01T00:00:00.000Z"}}}]}),nI=I({operationId:"members.remove",description:"Remove a member from an organization.",backend:"api",route:{method:"DELETE",path:"/members/{userId}",tags:["Members"],inputStructure:"detailed"},input:khe,output:She,pagination:"none",async:"sync"}),BBe={list:eI.contract,updateRole:tI.contract,remove:nI.contract}});var aJ,cJ,ad,sJ,cd,rJ=4194304,oI,iI,Phe=(e)=>{let t=e.split(",").map((i)=>i.trim()).filter(Boolean),n=a.array(ad).safeParse(t);if(!n.success)throw Error("Kind filter must be a comma-separated list of note, runbook, or change.");return n.data},zc,rI,aI,hJ,lJ,uJ,dJ,gJ,yJ,bJ,mJ,pJ,wJ,fJ,vJ,pr,wr,fr,vr,kr,Ihe;var cI=d(()=>{me();Ce();aJ=["note","runbook"],cJ=["note","runbook","change"],ad=a.enum(cJ),sJ=a.enum(aJ),cd=a.string().min(1).max(512).refine((e)=>!e.startsWith("/"),{message:"Path must be relative without a leading slash."}).describe("Relative memory path, for example AGENTS.md or notes/architecture.md."),oI=a.string().min(1).refine((e)=>new TextEncoder().encode(e).length<=rJ,{message:`Memory body must be at most ${rJ} bytes (4 MiB).`}).describe("Document body stored in project memory."),iI=a.string().regex(/^(\d+)(s|m|h|d)$/u,"Duration must use s, m, h, or d units, for example 7d or 30m.").describe("Relative time window, for example 7d or 30m."),zc=a.string().min(1).transform(Phe).describe("Comma-separated kinds, for example note,runbook."),rI=a.object({id:a.string().uuid(),projectId:a.string().uuid(),kind:ad,managed:a.boolean(),path:a.string().nullable(),title:a.string().nullable(),contentHash:a.string(),attrs:a.record(a.string(),a.unknown()),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),aI=rI.extend({body:oI}),hJ=a.object({projectId:a.string().uuid().optional().describe("Project that owns the document. Auto-filled from CLI and SDK context when omitted."),path:cd.describe("Relative path for the curated document."),body:oI,kind:sJ.default("note").describe("Curated document kind. Only note and runbook may be written through the API."),title:a.string().max(500).optional().describe("Optional display title. Defaults to the path basename.")}),lJ=a.object({document:aI}),uJ=a.object({projectId:a.string().uuid().optional().describe("Project that owns the document. Auto-filled from CLI and SDK context when omitted."),id:a.string().uuid().optional().describe("Document id."),path:cd.optional().describe("Relative curated path.")}).superRefine((e,t)=>{let n=e.id!==void 0,i=e.path!==void 0;if(n===i)t.addIssue({code:"custom",message:"Provide exactly one of id or path."})}),dJ=a.object({document:aI}),gJ=a.object({projectId:a.string().uuid().optional().describe("Project to list memory for. Auto-filled from CLI and SDK context when omitted."),kind:zc.optional(),since:iI.optional().describe("Only return documents updated within this window, for example 7d."),service:a.string().min(1).optional().describe("Filter to documents whose attrs.services contains this value."),pathPrefix:a.string().min(1).optional().describe("Filter to paths starting with this prefix."),managed:a.coerce.boolean().optional(),cursor:a.string().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of documents to return per page.")}),yJ=a.object({documents:a.array(rI),nextCursor:a.string().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),bJ=a.object({documentId:a.string().uuid(),kind:ad,managed:a.boolean(),path:a.string().nullable(),title:a.string().nullable(),snippet:a.string(),score:a.number()}),mJ=a.object({calibrated:a.literal(!0),minScoreThreshold:a.number(),queryTerms:a.array(a.string()),message:a.string()}),pJ=a.object({projectId:a.string().uuid().optional().describe("Project to search memory for. Auto-filled from CLI and SDK context when omitted."),query:a.string().trim().min(1).max(500).describe("Natural-language search query."),kind:zc.optional(),since:iI.optional(),service:a.string().min(1).optional(),pathPrefix:a.string().min(1).optional(),managed:a.coerce.boolean().optional(),limit:a.coerce.number().int().min(1).max(50).default(10).describe("Maximum ranked search hits to return.")}),wJ=a.object({hits:a.array(bJ),emptyVerdict:mJ.nullable()}),fJ=a.object({projectId:a.string().uuid().optional().describe("Project that owns the document. Auto-filled from CLI and SDK context when omitted."),id:a.string().uuid().optional().describe("Document id."),path:cd.optional()}).superRefine((e,t)=>{let n=e.id!==void 0,i=e.path!==void 0;if(n===i)t.addIssue({code:"custom",message:"Provide exactly one of id or path."})}),vJ=a.object({deleted:a.boolean()}),pr=I({operationId:"memory.put",description:"Create or replace a curated project memory document. Embeds on success.",backend:"api",route:{method:"PUT",path:"/memory",tags:["Memory"]},input:hJ,output:lJ,pagination:"none",async:"sync"}),wr=I({operationId:"memory.get",description:"Get one project memory document by id or path.",backend:"api",route:{method:"GET",path:"/memory/document",tags:["Memory"]},input:uJ,output:dJ,pagination:"none",async:"sync"}),fr=I({operationId:"memory.list",description:"List project memory catalog rows without embedding search.",backend:"api",route:{method:"GET",path:"/memory",tags:["Memory"]},input:gJ,output:yJ,pagination:"cursor",async:"sync"}),vr=I({operationId:"memory.search",description:"Hybrid semantic and keyword search over project memory documents.",backend:"api",route:{method:"POST",path:"/memory/search",tags:["Memory"]},input:pJ,output:wJ,pagination:"none",async:"sync"}),kr=I({operationId:"memory.delete",description:"Soft-delete a curated project memory document by id or path.",backend:"api",route:{method:"DELETE",path:"/memory/document",successStatus:204,tags:["Memory"]},input:fJ,output:vJ,pagination:"none",async:"sync"}),Ihe={put:pr.contract,get:wr.contract,list:fr.contract,search:vr.contract,delete:kr.contract}});var kJ,SJ,$he,Ohe,Ahe,The,Lhe,_c,Dhe,Che,zhe,sI,hI,lI,uI,QBe;var sd=d(()=>{me();Ce();kJ=a.enum(["processing","completed","aborted","error"]),SJ=a.object({id:a.string().uuid(),threadId:a.string().uuid(),userMessageId:a.string().uuid().nullable(),assistantMessageId:a.string().uuid().nullable(),parentRunId:a.string().uuid().nullable(),workflowRunId:a.string().nullable(),status:kJ,source:a.enum(["app","api","mcp","slack","teams","linear","github","agent","cli"]),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),completedAt:a.string().datetime().nullable()}),$he=a.object({projectId:a.string().uuid().optional().describe("Project ID to list runs for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of runs to return per page."),cursor:a.string().datetime().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),Ohe=a.object({runs:a.array(SJ),nextCursor:a.string().datetime().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Ahe=a.object({threadId:a.string().uuid().describe("Thread ID to list runs for."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of runs to return per page."),cursor:a.string().datetime().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),The=a.object({runs:a.array(SJ),nextCursor:a.string().datetime().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Lhe=a.object({runId:a.string().uuid().describe("Run ID returned by a deferred operation.")}),_c=a.object({completed:a.boolean().describe("Whether the run has reached a terminal status."),threadId:a.string().uuid().describe("Thread ID associated with the run."),runId:a.string().uuid().describe("Run ID for subsequent polling."),messageId:a.string().uuid().optional().describe("ID of the user message that triggered this run."),status:kJ.describe("Current run lifecycle status."),response:a.string().nullable().describe("Assistant response text when the run has completed.")}),Dhe=_c.describe("Current run state and, when complete, the assistant response."),Che=a.object({runId:a.string().uuid().describe("Run ID of the in-flight run to request cancellation for.")}),zhe=a.object({success:a.literal(!0).describe("Always true when the cancellation request was accepted.")}),sI=I({operationId:"runs.list",description:"List deferred runs within one project.",backend:"api",route:{method:"GET",path:"/runs",tags:["Runs"]},input:$he,output:Ohe,pagination:"cursor",async:"sync"}),hI=I({operationId:"runs.listForThread",summary:"List Runs for a Thread",description:"List deferred runs for one thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/runs",tags:["Runs"]},input:Ahe,output:The,pagination:"cursor",async:"sync"}),lI=I({operationId:"runs.get",description:"Get the current result for a deferred run by run ID.",backend:"api",route:{method:"GET",path:"/runs/{runId}",tags:["Runs"]},input:Lhe,output:Dhe,pagination:"none",async:"sync",examples:[{name:"processing-run",input:{runId:"33333333-3333-4333-8333-333333333333"},output:{completed:!1,threadId:"22222222-2222-4222-8222-222222222222",runId:"33333333-3333-4333-8333-333333333333",status:"processing",response:null}}]}),uI=I({operationId:"runs.cancel",description:"Request cancellation of an in-flight run. Idempotent and best-effort: returns success even when the run has already reached a terminal status.",backend:"api",route:{method:"POST",path:"/runs/{runId}/cancel",tags:["Runs"]},input:Che,output:zhe,pagination:"none",async:"sync",examples:[{name:"cancel-processing-run",input:{runId:"33333333-3333-4333-8333-333333333333"},output:{success:!0}}]}),QBe={list:sI.contract,listForThread:hI.contract,get:lI.contract,cancel:uI.contract}});var hd=(e,t,n)=>{let i=t?20000:1e4;if(e.length>i)n.addIssue({code:"too_big",maximum:i,type:"string",inclusive:!0,message:`Message cannot exceed ${i} characters`,origin:"string",path:["message"]})},ld=(e,t,n)=>{if(e&&!t)n.addIssue({code:"custom",message:"ambientServiceRun requires an automationId",path:["ambientServiceRun"]})};var PJ,jc,_he,jhe,Nhe,Rhe,xhe,Uhe,Mhe,Ehe,Khe,dI,Ghe,qhe,Jhe,Bhe,Hhe,Whe,Fhe,Zhe,Xhe,Yhe,Qhe,Vhe,gI,yI,bI,mI,pI,wI,IJ,ele,tle,nle,ole,$J,ile,rle,ale,cle,sle,hle,Fo="22222222-2222-4222-8222-222222222222",OJ="11111111-1111-4111-8111-111111111111",lle="44444444-4444-4444-8444-444444444444",AJ="55555555-5555-4555-8555-555555555555",fI,vI,kI,SI,PI,rHe;var II=d(()=>{me();Ce();sd();PJ=a.enum(["slack","teams","linear","github","app","mcp","agent","api","cli"]),jc=a.object({id:a.string().uuid(),projectId:a.string().uuid(),title:a.string().nullable(),status:a.enum(["regular","archived"]),source:PJ.nullable(),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),_he=a.object({type:a.literal("message"),message:a.string()}),jhe=a.object({type:a.literal("reasoning"),reasoning:a.string(),status:a.enum(["in_progress","complete"]).optional()}),Nhe=a.object({type:a.literal("tool_call"),name:a.string(),params:a.any().optional(),result:a.any().optional(),status:a.enum(["in_progress","success","error","unknown"]).optional(),toolCallId:a.string().optional(),durationMs:a.number().nonnegative().optional()}),Rhe=a.object({type:a.literal("artifact"),name:a.enum(["timeseries","table","log_detail","integration_required","alert_card","issue_card","mdx"]),data:a.any(),toolCallId:a.string().optional()}),xhe=a.object({type:a.literal("fork"),sourceThreadId:a.string(),sourceMessageId:a.string(),sourceThreadTitle:a.string().nullable()}),Uhe=a.object({type:a.literal("summary"),summary:a.string()}),Mhe=a.object({type:a.literal("slack_context"),channelId:a.string(),isTruncated:a.boolean().optional(),messages:a.array(a.object({timestamp:a.string(),slackUserId:a.string().optional(),displayName:a.string(),text:a.string(),isBot:a.boolean(),files:a.array(a.object({name:a.string(),mimetype:a.string(),size:a.number().optional(),attachmentId:a.string().uuid().optional(),ingestionStatus:a.enum(["attached","unsupported","oversized","skipped","unavailable"]).optional()})).optional()}))}),Ehe=a.object({type:a.literal("teams_context"),conversationId:a.string(),isTruncated:a.boolean().optional(),messages:a.array(a.object({activityId:a.string().optional(),displayName:a.string(),text:a.string(),isBot:a.boolean(),createdDateTime:a.string().optional()}))}),Khe=a.union([_he,jhe,Nhe,Rhe,xhe,Uhe,Mhe,Ehe]),dI=a.object({id:a.string().uuid(),role:a.enum(["user","assistant"]),content:a.array(Khe),source:PJ,createdAt:a.string().datetime()}),Ghe=a.object({projectId:a.string().uuid().optional().describe("Project to list threads for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of threads to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:a.enum(["regular","archived"]).optional().describe("Filter by thread status. 'regular' returns active threads, 'archived' returns archived threads.")}),qhe=a.object({threads:a.array(jc).describe("The page of threads matching the query."),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Jhe=a.object({threadId:a.string().uuid().describe("Thread ID returned by threads.list or threads.create.")}),Bhe=a.object({thread:jc.describe("The requested thread."),messages:a.array(dI).describe("Messages currently stored on the thread in chronological order.")}),Hhe=a.object({projectId:a.string().uuid().optional().describe("Project to create the thread in. Auto-filled from CLI and SDK context when omitted."),message:a.string().min(1,"Message cannot be empty").describe("Initial user message that starts the thread."),wait:a.boolean().default(!0).describe("Whether the server should wait for the agent run before responding."),timeoutSeconds:a.coerce.number().int().min(1).max(20).default(20).describe("Maximum seconds to wait when wait is true before handing off to polling."),automationId:a.string().uuid().optional().describe("Internal automation context. Set by the Sazabi CLI when an automation script starts an agent run."),ambientServiceRun:a.literal(!0).optional().describe("Internal marker for scheduler-originated ambient service work. Honored only for system secret-key requests with matching automation context.")}).superRefine((e,t)=>{hd(e.message,e.automationId,t),ld(e.ambientServiceRun,e.automationId,t)}),Whe=_c.describe("Deferred run result for creating a thread."),Fhe=a.object({threadId:a.string().uuid().describe("Thread ID whose current processing status should be returned.")}),Zhe=a.object({status:a.enum(["idle","processing"]),lastRunStatus:a.enum(["error"]).nullable()}),Xhe=a.object({threadId:a.string().uuid().describe("Thread ID whose active run should be stopped.")}),Yhe=a.object({success:a.literal(!0).describe("Always true when the stop request was accepted.")}),Qhe=a.object({threadId:a.string().uuid().describe("Thread ID of the thread to update."),status:a.enum(["regular","archived"]).describe("New status for the thread. 'archived' hides the thread from the sidebar.")}),Vhe=a.object({thread:jc.describe("The updated thread.")}),gI=I({operationId:"threads.list",description:"List threads in a project, optionally filtered by status.",backend:"api",route:{method:"GET",path:"/threads",tags:["Threads"]},input:Ghe,output:qhe,pagination:"cursor",async:"sync",examples:[{name:"active-threads",input:{projectId:"11111111-1111-4111-8111-111111111111",status:"regular",limit:10},output:{threads:[{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",title:"API returning 500s",status:"regular",source:"api",createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:05:00.000Z"}],nextCursor:null}}]}),yI=I({operationId:"threads.get",description:"Get a thread and its messages.",backend:"api",route:{method:"GET",path:"/threads/{threadId}",tags:["Threads"]},input:Jhe,output:Bhe,pagination:"none",async:"sync"}),bI=I({operationId:"threads.getStatus",description:"Get the current processing status for a thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/status",tags:["Threads"]},input:Fhe,output:Zhe,pagination:"none",async:"sync",examples:[{name:"processing-thread",input:{threadId:"22222222-2222-4222-8222-222222222222"},output:{status:"processing",lastRunStatus:null}}]}),mI=I({operationId:"threads.stop",description:"Stop a thread's in-flight run. Idempotent and best-effort: returns success even when the thread has no active run.",backend:"api",route:{method:"POST",path:"/threads/{threadId}/stop",tags:["Threads"]},input:Xhe,output:Yhe,pagination:"none",async:"sync",examples:[{name:"stop-processing-thread",input:{threadId:"22222222-2222-4222-8222-222222222222"},output:{success:!0}}]}),pI=I({operationId:"threads.create",description:"Create a thread with an initial message and optionally wait for the agent response.",backend:"api",route:{method:"POST",path:"/threads",tags:["Threads"],successStatus:201},input:Hhe,output:Whe,pagination:"none",async:"deferred",examples:[{name:"async-handoff",input:{projectId:"11111111-1111-4111-8111-111111111111",message:"Investigate elevated 500s in production.",wait:!1,timeoutSeconds:20},output:{completed:!1,threadId:"22222222-2222-4222-8222-222222222222",runId:"33333333-3333-4333-8333-333333333333",status:"processing",response:null}}]}),wI=I({operationId:"threads.update",description:"Update a thread's status.",backend:"api",route:{method:"PATCH",path:"/threads/{threadId}",tags:["Threads"]},input:Qhe,output:Vhe,pagination:"none",async:"sync",examples:[{name:"archive-thread",input:{threadId:"22222222-2222-4222-8222-222222222222",status:"archived"},output:{thread:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",title:"API returning 500s",status:"archived",source:"api",createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:10:00.000Z"}}}]}),IJ=a.enum(["private","organization"]),ele=a.object({threadId:a.string().uuid().describe("Thread ID of the source thread to fork."),messageId:a.string().uuid().describe("Message ID in the source thread to fork from. The new thread copies messages up to and including this message.")}),tle=a.object({thread:jc.describe("The newly created forked thread.")}),nle=a.object({threadId:a.string().uuid().describe("Thread ID of the thread to update."),visibility:IJ.describe("New visibility. 'private' restricts the thread to its owner; 'organization' shares it with the organization.")}),ole=a.object({thread:jc.describe("The updated thread."),visibility:IJ.describe("The thread's resulting visibility.")}),$J=a.object({shareId:a.string().uuid().describe("Unique identifier for the snapshot."),threadId:a.string().uuid().describe("Thread the snapshot was taken from."),url:a.string().describe("Public read-only URL for the snapshot."),createdAt:a.string().datetime()}),ile=a.object({threadId:a.string().uuid().describe("Thread ID to create a public read-only snapshot for.")}),rle=a.object({share:$J.describe("The created share link.")}),ale=a.object({threadId:a.string().uuid().describe("Thread ID the snapshot belongs to."),shareId:a.string().uuid().describe("Snapshot ID to revoke.")}),cle=a.void(),sle=a.object({threadId:a.string().uuid().describe("Thread ID to list public snapshots for.")}),hle=a.object({shares:a.array($J).describe("Active share links for the thread.")}),fI=I({operationId:"threads.fork",description:"Fork a thread from a specific message, creating a new thread that copies messages up to that point.",backend:"api",route:{method:"POST",path:"/threads/{threadId}/fork",tags:["Threads"],successStatus:201},input:ele,output:tle,pagination:"none",async:"sync",examples:[{name:"fork-from-message",input:{threadId:Fo,messageId:lle},output:{thread:{id:"66666666-6666-4666-8666-666666666666",projectId:OJ,title:"API returning 500s (fork)",status:"regular",source:"api",createdAt:"2026-01-01T00:20:00.000Z",updatedAt:"2026-01-01T00:20:00.000Z"}}}]}),vI=I({operationId:"threads.setVisibility",description:"Set a thread's visibility to private or organization.",backend:"api",route:{method:"PATCH",path:"/threads/{threadId}/visibility",tags:["Threads"]},input:nle,output:ole,pagination:"none",async:"sync",examples:[{name:"make-private",input:{threadId:Fo,visibility:"private"},output:{thread:{id:Fo,projectId:OJ,title:"API returning 500s",status:"regular",source:"api",createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:30:00.000Z"},visibility:"private"}}]}),kI=I({operationId:"threads.createShareLink",description:"Create a public read-only share link for a thread's current messages.",backend:"api",route:{method:"POST",path:"/threads/{threadId}/share",tags:["Threads"],successStatus:201},input:ile,output:rle,pagination:"none",async:"sync",examples:[{name:"create-share-link",input:{threadId:Fo},output:{share:{shareId:AJ,threadId:Fo,url:"https://app.sazabi.com/share/55555555-5555-4555-8555-555555555555",createdAt:"2026-01-01T00:40:00.000Z"}}}]}),SI=I({operationId:"threads.listShareLinks",description:"List active public share links for a thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/share",tags:["Threads"]},input:sle,output:hle,pagination:"none",async:"sync",examples:[{name:"list-share-links",input:{threadId:Fo},output:{shares:[{shareId:AJ,threadId:Fo,url:"https://app.sazabi.com/share/55555555-5555-4555-8555-555555555555",createdAt:"2026-01-01T00:40:00.000Z"}]}}]}),PI=I({operationId:"threads.revokeShareLink",description:"Revoke a public share link for a thread.",backend:"api",route:{method:"DELETE",path:"/threads/{threadId}/share/{shareId}",successStatus:204,tags:["Threads"]},input:ale,output:cle,pagination:"none",async:"sync"}),rHe={list:gI.contract,get:yI.contract,getStatus:bI.contract,stop:mI.contract,create:pI.contract,update:wI.contract,fork:fI.contract,setVisibility:vI.contract,createShareLink:kI.contract,listShareLinks:SI.contract,revokeShareLink:PI.contract}});var ule,dle,gle,yle,TJ,LJ;var DJ=d(()=>{me();Ce();sd();II();ule=a.object({threadId:a.string().uuid().describe("Thread ID to list messages for."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of messages to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),dle=a.object({messages:a.array(dI),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),gle=a.object({threadId:a.string().uuid().describe("Thread ID to append the message to."),message:a.string().min(1,"Message cannot be empty").describe("Message body to append to the thread."),wait:a.boolean().default(!0).describe("Whether the server should wait for the appended message run before responding."),timeoutSeconds:a.coerce.number().int().min(1).max(20).default(20).describe("Maximum seconds to wait when wait is true before handing off to polling."),automationId:a.string().uuid().optional().describe("Internal automation context. Set by the Sazabi CLI when an automation script starts an agent run."),ambientServiceRun:a.literal(!0).optional().describe("Internal marker for scheduler-originated ambient service work. Honored only for system secret-key requests with matching automation context.")}).superRefine((e,t)=>{hd(e.message,e.automationId,t),ld(e.ambientServiceRun,e.automationId,t)}),yle=_c.describe("Deferred run result for appending a message to an existing thread."),TJ=I({operationId:"messages.list",description:"List messages in a thread with cursor pagination.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/messages",tags:["Messages"]},input:ule,output:dle,pagination:"cursor",async:"sync",examples:[{name:"thread-messages",input:{threadId:"22222222-2222-4222-8222-222222222222",limit:2},output:{messages:[{id:"33333333-3333-4333-8333-333333333333",role:"user",content:[{type:"message",message:"What changed in the intake pipeline?"}],source:"api",createdAt:"2026-01-01T00:00:00.000Z"}],nextCursor:null}}]}),LJ=I({operationId:"messages.append",description:"Append a user message to an existing thread and trigger a deferred run.",backend:"api",route:{method:"POST",path:"/threads/{threadId}/messages",successStatus:201,tags:["Messages"]},input:gle,output:yle,pagination:"none",async:"deferred",examples:[{name:"append-processing",input:{threadId:"22222222-2222-4222-8222-222222222222",message:"Follow up on the intake backlog.",wait:!1,timeoutSeconds:20},output:{completed:!1,threadId:"22222222-2222-4222-8222-222222222222",runId:"33333333-3333-4333-8333-333333333333",status:"processing",response:null}}]})});var jt,zJ,$I,Sr,_J,ud,po,jJ,CJ;var Nc=d(()=>{me();jt={IN_APP:"in_app",SLACK:"slack",SLACK_CHANNEL:"slack_channel",TEAMS_CHANNEL:"teams_channel",EMAIL:"email",SMS:"sms",INCIDENT_IO:"incident_io",PAGERDUTY:"pagerduty",ROOTLY:"rootly",WEBHOOK:"webhook"},zJ=[jt.IN_APP,jt.SLACK,jt.EMAIL,jt.SMS],$I=[jt.SLACK_CHANNEL,jt.TEAMS_CHANNEL,jt.INCIDENT_IO,jt.PAGERDUTY,jt.ROOTLY,jt.WEBHOOK],Sr=Object.values(jt),_J=[...Sr,"victorops"],ud=a.enum(Sr),po=a.enum($I),jJ=[{channel:"in_app",name:"In-app",description:"Show notifications in your Sazabi notification feed.",scope:"personal",destinationManagement:"none",personalSettingsPath:"/settings/notifications"},{channel:"email",name:"Email",description:"Send notifications to your account email address.",scope:"personal",destinationManagement:"none",personalSettingsPath:"/settings/notifications"},{channel:"sms",name:"SMS",description:"Send notifications to your verified phone number.",scope:"personal",destinationManagement:"none",personalSettingsPath:"/settings/account?phone-number=add"},{channel:"slack",name:"Slack DMs",description:"Send personal notifications by Slack DM.",scope:"personal",destinationManagement:"none",personalSettingsPath:"/settings/connected-accounts/slack"},{channel:"slack_channel",name:"Slack",description:"Post this project's alerts to selected Slack channels.",scope:"project",destinationManagement:"slack_channels",projectIntegrationPath:"slack"},{channel:"teams_channel",name:"Microsoft Teams",description:"Post this project's alerts to selected Microsoft Teams channels.",scope:"project",destinationManagement:"teams_channels",projectIntegrationPath:"teams"},{channel:"incident_io",name:"incident.io",description:"Route this project's alerts to incident.io.",scope:"project",destinationManagement:"integration_connections",projectIntegrationPath:"incident-io"},{channel:"pagerduty",name:"PagerDuty",description:"Route this project's alerts to PagerDuty.",scope:"project",destinationManagement:"integration_connections",projectIntegrationPath:"pagerduty"},{channel:"rootly",name:"Rootly",description:"Route this project's alerts to Rootly.",scope:"project",destinationManagement:"integration_connections",projectIntegrationPath:"rootly"},{channel:"webhook",name:"Webhooks",description:"Send this project's alerts to configured HTTPS endpoints.",scope:"project",destinationManagement:"webhook_endpoints",projectSettingsPath:"webhooks"}],CJ=new Set(jJ.map(({channel:e})=>e));if(CJ.size!==Sr.length||Sr.some((e)=>!CJ.has(e)))throw Error("Notification channel definitions must represent every channel")});var NJ,ble=(e,t)=>e.value===t.value&&e.label===t.label&&e.scope===t.scope&&e.role===t.role&&e.defaultOff===t.defaultOff&&(e.deliveryConditions??[]).join(",")===(t.deliveryConditions??[]).join(","),wt=(e)=>{for(let t of Object.values(e)){let n=NJ.get(t.value);if(n&&!ble(n,t))throw Error(`Notification type registered twice with conflicting definitions: ${t.value}`);if(t.role!==void 0&&t.scope!=="org")throw Error(`Notification type role restrictions require org scope: ${t.value}`);if(t.label.trim().length===0)throw Error(`Notification type needs a display label: ${t.value}`);NJ.set(t.value,t)}return e};var Kn=d(()=>{NJ=new Map});var RJ;var xJ=d(()=>{Kn();RJ=wt({AUTOMATION_FINISHED:{value:"automation_finished",label:"Automation completed",scope:"project",defaultOff:!0},AUTOMATION_RUN_FAILED:{value:"automation_run_failed",label:"Automation run failed",scope:"project"}})});var UJ;var MJ=d(()=>{Kn();UJ=wt({BILLING_PLAN_UPGRADE_APPLIED:{value:"billing_plan_upgrade_applied",label:"Billing upgrade applied",scope:"org",role:"admin"},BILLING_PLAN_DOWNGRADE_SCHEDULED:{value:"billing_plan_downgrade_scheduled",label:"Billing downgrade scheduled",scope:"org",role:"admin"},BILLING_PLAN_DOWNGRADE_APPLIED:{value:"billing_plan_downgrade_applied",label:"Billing downgrade applied",scope:"org",role:"admin"},BILLING_CREDIT_BALANCE_LOW:{value:"billing_credit_balance_low",label:"Billing credits low",scope:"org",role:"admin"},BILLING_CREDIT_BALANCE_DEPLETED:{value:"billing_credit_balance_depleted",label:"Billing credits depleted",scope:"org",role:"admin"},BILLING_AUTO_TOP_UP_SETTINGS_CHANGED:{value:"billing_auto_top_up_settings_changed",label:"Billing auto top-up changed",scope:"org",role:"admin"},BILLING_AUTO_TOP_UP_FAILED:{value:"billing_auto_top_up_failed",label:"Billing auto top-up failed",scope:"org",role:"admin"},BILLING_INVOICE_PAID:{value:"billing_invoice_paid",label:"Billing invoice paid",scope:"org",role:"admin"},BILLING_NEGATIVE_BALANCE_COLLECTED:{value:"billing_negative_balance_collected",label:"Billing outstanding balance charged",scope:"org",role:"admin"},BILLING_NEGATIVE_BALANCE_COLLECTION_FAILED:{value:"billing_negative_balance_collection_failed",label:"Billing outstanding balance charge failed",scope:"org",role:"admin"}})});var EJ;var KJ=d(()=>{Kn();EJ=wt({INTEGRATION_CONNECTED:{value:"integration_connected",label:"Integration connected",scope:"org",defaultOff:!0},INTEGRATION_DISCONNECTED:{value:"integration_disconnected",label:"Integration disconnected",scope:"org"}})});var GJ;var qJ=d(()=>{Kn();GJ=wt({ISSUE_TRIGGERED:{value:"issue_triggered",label:"Issue triggered",scope:"project",deliveryConditions:["component","severity"]},ISSUE_RESOLVED:{value:"issue_resolved",label:"Issue resolved",scope:"project",deliveryConditions:["component","severity"]},ISSUE_IGNORED:{value:"issue_ignored",label:"Issue ignored",scope:"project",deliveryConditions:["component","severity"]}})});var JJ;var BJ=d(()=>{Kn();JJ=wt({PROJECT_CREATED:{value:"project_created",label:"Project created",scope:"org",defaultOff:!0},PROJECT_DELETED:{value:"project_deleted",label:"Project deleted",scope:"org",defaultOff:!0},MEMBER_INVITED:{value:"member_invited",label:"Member invited",scope:"org",defaultOff:!0},USER_REMOVED:{value:"user_removed",label:"Member removed",scope:"org",defaultOff:!0},MCP_CONNECTOR_ADDED:{value:"mcp_connector_added",label:"MCP connector added",scope:"org",defaultOff:!0},MCP_CONNECTOR_REMOVED:{value:"mcp_connector_removed",label:"MCP connector removed",scope:"org",defaultOff:!0},SECRET_KEY_CREATED:{value:"secret_key_created",label:"Secret key created",scope:"org",defaultOff:!0},SECRET_KEY_DELETED:{value:"secret_key_deleted",label:"Secret key deleted",scope:"org",defaultOff:!0}})});var HJ;var WJ=d(()=>{Kn();HJ=wt({SANDBOX_CREATED:{value:"sandbox_created",label:"Sandbox connected",scope:"project",defaultOff:!0},SANDBOX_DELETED:{value:"sandbox_deleted",label:"Sandbox disconnected",scope:"project",defaultOff:!0},DATA_SOURCE_CONNECTED:{value:"data_source_connected",label:"Data source connected",scope:"project",defaultOff:!0},DATA_SOURCE_DISCONNECTED:{value:"data_source_disconnected",label:"Data source disconnected",scope:"project"},GITHUB_CONNECTED:{value:"github_connected",label:"GitHub connected",scope:"project",defaultOff:!0},GITHUB_DISCONNECTED:{value:"github_disconnected",label:"GitHub disconnected",scope:"project"},CODE_REPO_CONNECTED:{value:"code_repo_connected",label:"Code repository connected",scope:"project",defaultOff:!0},CODE_REPO_DISCONNECTED:{value:"code_repo_disconnected",label:"Code repository disconnected",scope:"project"},PUBLIC_KEY_DEACTIVATED:{value:"public_key_deactivated",label:"Public key deactivated",scope:"project"}})});var FJ;var ZJ=d(()=>{Kn();FJ=wt({SECURITY_ALERT:{value:"security_alert",label:"Security alert",scope:"org",role:"admin"}})});var OI,rt,ple,AI=(e)=>{let t=ple.get(e)?.label;if(t)return t;let n=e.replace(/_/g," ").trim();return n?n.charAt(0).toUpperCase()+n.slice(1):e};var Rc=d(()=>{xJ();MJ();KJ();qJ();BJ();WJ();ZJ();Kn();OI={...FJ,...JJ,...EJ,...RJ,...GJ,...HJ,...UJ},rt=Object.fromEntries(Object.entries(OI).map(([e,t])=>[e,t.value])),ple=new Map(Object.values(OI).map((e)=>[e.value,e]))});var TI,YJ,EHe,In,KHe;var xc=d(()=>{Rc();Nc();Nc();TI=Object.values(rt),YJ=[rt.BILLING_PLAN_UPGRADE_APPLIED,rt.BILLING_PLAN_DOWNGRADE_SCHEDULED,rt.BILLING_PLAN_DOWNGRADE_APPLIED,rt.BILLING_CREDIT_BALANCE_LOW,rt.BILLING_CREDIT_BALANCE_DEPLETED,rt.BILLING_AUTO_TOP_UP_SETTINGS_CHANGED,rt.BILLING_AUTO_TOP_UP_FAILED,rt.BILLING_INVOICE_PAID,rt.BILLING_NEGATIVE_BALANCE_COLLECTED,rt.BILLING_NEGATIVE_BALANCE_COLLECTION_FAILED],EHe=new Set(YJ),In=[rt.ISSUE_TRIGGERED,rt.ISSUE_RESOLVED,rt.ISSUE_IGNORED,rt.AUTOMATION_RUN_FAILED],KHe=new Set(In)});var dd;var QJ=d(()=>{Nc();me();xc();dd=a.enum(TI)});var fle;var VJ=d(()=>{Rc();xc();fle=In.map((e)=>({notificationType:e,label:AI(e)}))});var eB=d(()=>{Rc();xc()});var LI=d(()=>{Nc();Rc();xc();QJ();VJ();eB()});var kle,Sle,Ple,Ile,$le,Ole,Ale,DI,TWe;var tB=d(()=>{LI();me();Ce();kle=a.enum(["ready","missing","degraded","unavailable"]),Sle=a.object({id:a.string(),label:a.string(),status:a.enum(["active","inactive","degraded"]),statusLabel:a.string()}),Ple=a.object({channel:ud,name:a.string(),description:a.string(),scope:a.enum(["personal","project"]),enabled:a.boolean().nullable(),preferenceId:a.string().nullable(),prerequisite:a.object({status:kle,statusLabel:a.string(),message:a.string()}),action:a.object({label:a.string(),href:a.string()}).nullable(),destinations:a.array(Sle),destinationManagement:a.enum(["none","slack_channels","teams_channels","integration_connections","webhook_endpoints"]),canCreateDestinations:a.boolean(),supportedNotificationTypes:a.array(dd)}),Ile=a.object({channel:po,enabled:a.boolean(),preferenceId:a.string().nullable()}),$le=a.object({channel:po,notificationType:dd,enabled:a.boolean(),preferenceId:a.string()}),Ole=a.object({projectId:a.string().uuid().optional().describe("Project to inspect. Auto-filled from CLI and SDK context when omitted.")}),Ale=a.object({channelCards:a.array(Ple).length(10),channels:a.array(Ile),notificationTypePreferences:a.array($le),issueNotificationMinSeverity:a.enum(["low","medium","high","critical"])}),DI=I({operationId:"notificationChannels.getProject",summary:"List Project Notification Channels",description:"List a project's notification channels with preferences, prerequisites, connection state, configured destinations, and supported notification types.",backend:"api",route:{method:"GET",path:"/notification-channels",tags:["Notification channels"]},input:Ole,output:Ale,pagination:"none",async:"sync"}),TWe={getProject:DI.contract}});var nB,zI,oB,_I,_We,jWe,jI,NI=(e,t)=>{if((e.componentIds?.length||e.componentId)&&"componentIds"in e.condition&&e.condition.componentIds?.length)t.addIssue({code:"custom",path:["condition","componentIds"],message:"Use componentIds instead of legacy condition.componentIds."});if(e.componentIds?.length&&e.componentId)t.addIssue({code:"custom",path:["componentId"],message:"Use componentIds instead of componentId."})},NWe,iB,CI,RI,Uc,rB,Tle,Lle,Dle,Cle,zle,_le,jle,Nle,Rle,xI,UI,MI,EI,KI,RWe;var aB=d(()=>{LI();me();Ce();nB=a.enum(["low","medium","high","critical"]),zI=a.object({severities:a.array(nB).min(1).optional()}).strict(),oB=a.object({componentIds:a.array(a.string().uuid()).min(1).optional(),severities:a.array(nB).min(1).optional()}).strict(),_I=a.object({channel:po,destinationKey:a.string().min(1)}),_We=a.object({destinations:a.array(_I).min(1),notificationTypes:a.array(a.enum(In)).min(1),componentIds:a.array(a.string().uuid()).min(1).optional().describe("Stable component registry IDs matched by this rule."),includeDescendants:a.boolean().default(!1).describe("Whether the rule also matches descendant components."),condition:zI}),jWe=a.object({destinations:a.array(_I).min(1),notificationTypes:a.array(a.enum(In)).min(1),condition:oB}),jI=a.object({destinations:a.array(_I).min(1),notificationTypes:a.array(a.enum(In)).min(1),componentIds:a.array(a.string().uuid()).min(1).optional().describe("Stable component registry IDs matched by this rule."),componentId:a.string().uuid().optional().describe("Deprecated single-component compatibility input."),includeDescendants:a.boolean().default(!1).describe("Whether the rule also matches descendant components."),condition:a.union([zI,oB])}),NWe=jI.superRefine(NI),iB=a.object({id:a.string(),channel:po,destinationKey:a.string(),displayName:a.string()}),CI=a.object({id:a.string().uuid(),label:a.string(),lifecycle:a.enum(["active","retired","merged"])}),RI=a.object({id:a.string().uuid(),projectId:a.string().uuid(),notificationTypes:a.array(a.enum(In)),destinations:a.array(iB),condition:zI,component:CI.nullable(),componentId:a.string().uuid().nullable(),includeDescendants:a.boolean(),suspendedAt:a.string().datetime().nullable(),suspensionReason:a.string().nullable(),components:a.array(CI),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),Uc=a.object({projectId:a.string().uuid().optional().describe("Project whose notification delivery rules are being managed.")}),rB=a.string().uuid().describe("Logical notification delivery rule ID."),Tle=Uc,Lle=a.object({rules:a.array(RI)}),Dle=a.object({destinations:a.array(iB),notificationTypes:a.array(a.object({notificationType:a.enum(In),label:a.string(),conditions:a.array(a.enum(["component","severity"]))})),components:a.array(CI)}),Cle=Uc.extend(jI.shape).superRefine(NI),zle=RI,_le=Uc.extend({...jI.shape,ruleId:rB}).superRefine(NI),jle=RI,Nle=Uc.extend({ruleId:rB}),Rle=a.object({removed:a.boolean()}),xI=I({operationId:"notificationDeliveryRules.list",description:"List the positive delivery rules for a project.",backend:"api",route:{method:"GET",path:"/notification-delivery-rules",tags:["Notification delivery rules"]},input:Tle,output:Lle,pagination:"none",async:"sync"}),UI=I({operationId:"notificationDeliveryRules.options",description:"List available destinations, events, and conditions for project delivery rules.",backend:"api",route:{method:"GET",path:"/notification-delivery-rules/options",tags:["Notification delivery rules"]},input:Uc,output:Dle,pagination:"none",async:"sync"}),MI=I({operationId:"notificationDeliveryRules.create",description:"Create a positive project notification delivery rule.",backend:"api",route:{method:"POST",path:"/notification-delivery-rules",tags:["Notification delivery rules"]},input:Cle,output:zle,pagination:"none",async:"sync"}),EI=I({operationId:"notificationDeliveryRules.update",description:"Replace a positive delivery rule atomically.",backend:"api",route:{method:"PUT",path:"/notification-delivery-rules/{ruleId}",tags:["Notification delivery rules"]},input:_le,output:jle,pagination:"none",async:"sync"}),KI=I({operationId:"notificationDeliveryRules.delete",description:"Delete a positive delivery rule without deleting its reusable destinations.",backend:"api",route:{method:"DELETE",path:"/notification-delivery-rules/{ruleId}",tags:["Notification delivery rules"]},input:Nle,output:Rle,pagination:"none",async:"sync"}),RWe={list:xI.contract,options:UI.contract,create:MI.contract,update:EI.contract,delete:KI.contract}});var GI,xle,Ule,Mle,Ele,Kle,Gle,qI,qle,Jle,JI,Ble,Hle,BI,Wle,Fle,HI,Zle,Xle,WI,EWe;var cB=d(()=>{me();Ce();GI=a.enum(["accept-invite","create-organization","billing","configure-project","connect-github-account","install-github-app","configure-code-search","install-slack-app","configure-slack-notifications","trigger-issue","confirm-issue","finish"]),xle=a.enum(["needs-onboarding","blocked","ready"]),Ule=a.enum(["incomplete","complete","skipped"]),Mle=a.object({invitationId:a.string(),organizationId:a.string(),organizationName:a.string(),organizationSlug:a.string(),organizationImageUrl:a.string().nullable(),inviterName:a.string().nullable()}),Ele=a.object({gate:xle,canonicalStep:GI.nullable(),organizationId:a.string().nullable(),projectId:a.string().nullable(),completionByStep:a.record(GI,Ule),githubSkipped:a.boolean(),githubAppSkipped:a.boolean(),slackSkipped:a.boolean(),sampleIssueId:a.string().nullable(),actorRole:a.enum(["admin","member"]).nullable(),requiredStep:a.union([GI,a.literal("select-organization")]).nullable(),isCompleted:a.boolean(),onboardingRecommendationsThreadId:a.string().nullable(),hasOrganizations:a.boolean(),hasPaidBillingSubscription:a.boolean(),billingStepEnabled:a.boolean(),pendingInvitations:a.array(Mle)}),Kle=a.object({}),Gle=a.object({onboarding:Ele}),qI=I({operationId:"onboarding.getState",description:"Read onboarding progress for the authenticated user.",backend:"api",route:{method:"GET",path:"/onboarding/state",tags:["Onboarding"]},input:Kle,output:Gle,pagination:"none",async:"sync"}),qle=a.object({integration:a.enum(["github","slack"]).describe("Integration onboarding step to skip.")}),Jle=a.object({skipped:a.literal(!0)}),JI=I({operationId:"onboarding.skipIntegration",description:"Skip a GitHub or Slack integration step during onboarding.",backend:"api",route:{method:"POST",path:"/onboarding/skip-integration",tags:["Onboarding"]},input:qle,output:Jle,pagination:"none",async:"sync"}),Ble=a.object({}),Hle=a.object({skipped:a.literal(!0)}),BI=I({operationId:"onboarding.skipGithubAppInstallation",summary:"Skip GitHub App Installation",description:"Skip GitHub App installation during onboarding.",backend:"api",route:{method:"POST",path:"/onboarding/skip-github-app",tags:["Onboarding"]},input:Ble,output:Hle,pagination:"none",async:"sync"}),Wle=a.object({}),Fle=a.object({skipped:a.literal(!0)}),HI=I({operationId:"onboarding.skipSampleIssue",summary:"Skip Test Issue",description:"Skip the optional test issue during onboarding.",backend:"api",route:{method:"POST",path:"/onboarding/skip-sample-issue",tags:["Onboarding"]},input:Wle,output:Fle,pagination:"none",async:"sync"}),Zle=a.object({projectId:a.string().uuid().describe("Project that completed onboarding.")}),Xle=a.object({completed:a.boolean()}),WI=I({operationId:"onboarding.finish",description:"Mark onboarding complete when all prerequisites are satisfied.",backend:"api",route:{method:"POST",path:"/onboarding/finish",tags:["Onboarding"]},input:Zle,output:Xle,pagination:"none",async:"sync"}),EWe={getState:qI.contract,skipIntegration:JI.contract,skipGithubAppInstallation:BI.contract,skipSampleIssue:HI.contract,finish:WI.contract}});var gd,Yle,Qle,Vle,eue,tue,nue,oue,iue,rue,aue,FI,ZI,XI,YI,BWe;var sB=d(()=>{me();Ce();rd();gd=a.object({id:a.string().min(1),name:a.string(),slug:a.string(),logo:a.string().nullable().optional()}),Yle=gd.extend({role:mr.optional()}),Qle=a.object({}),Vle=a.object({organizations:a.array(Yle).describe("Organizations available to the current credential.")}),eue=a.object({organizationId:a.string().min(1).describe("Organization ID to fetch.")}),tue=a.object({organization:gd}),nue=a.object({organizationId:a.string().min(1).describe("Organization ID to update. SDK and CLI callers can auto-fill this before dispatch."),name:a.string().trim().min(1).max(100).describe("New organization name.")}),oue=a.object({organization:gd.describe("Updated organization.")}),iue=a.string().trim().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(/^[\p{L}\p{N} _-]+$/u,"Name can only contain letters, numbers, spaces, hyphens, and underscores"),rue=a.object({name:iue.describe("Organization display name.")}),aue=a.object({organization:gd}),FI=I({operationId:"organizations.create",description:"Create an organization for the authenticated user.",backend:"api",route:{method:"POST",path:"/organizations",tags:["Organizations"],successStatus:201},input:rue,output:aue,pagination:"none",async:"sync"}),ZI=I({operationId:"organizations.list",description:"List organizations available to the current credential.",backend:"api",route:{method:"GET",path:"/organizations",tags:["Organizations"]},input:Qle,output:Vle,pagination:"none",async:"sync"}),XI=I({operationId:"organizations.get",description:"Get one organization by ID.",backend:"api",route:{method:"GET",path:"/organizations/{organizationId}",tags:["Organizations"]},input:eue,output:tue,pagination:"none",async:"sync"}),YI=I({operationId:"organizations.update",description:"Update one organization.",backend:"api",route:{method:"PATCH",path:"/organizations/{organizationId}",tags:["Organizations"]},input:nue,output:oue,pagination:"none",async:"sync",examples:[{name:"rename-organization",input:{organizationId:"organization-123",name:"Observed Platform"},output:{organization:{id:"organization-123",name:"Observed Platform",slug:"acme",logo:null}}}]}),BWe={list:ZI.contract,get:XI.contract,create:FI.contract,update:YI.contract}});var Pr,Mc,hB,lB,uB,dB,gB,yB,bB,yd,bd,md,mB,pB,pd,wB,fB,wd,cue;var QI=d(()=>{me();Ce();Pr=a.enum(["us-east-1","us-east-2","us-west-1","us-west-2","eu-central-1","eu-central-2","eu-north-1","eu-south-1","eu-south-2","eu-west-1","eu-west-2","eu-west-3"]),Mc=a.object({id:a.string().uuid(),organizationId:a.string().min(1),name:a.string(),region:Pr}),hB=a.object({organizationId:a.string().min(1).optional().describe("Organization to list projects for. Auto-filled from CLI and SDK context when omitted.")}),lB=a.object({projects:a.array(Mc).describe("Projects visible within the selected organization.")}),uB=a.object({projectId:a.string().uuid().describe("Project ID to fetch.")}),dB=a.string().trim().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(/^[\p{L}\p{N} _-]+$/u,"Name can only contain letters, numbers, spaces, hyphens, and underscores"),gB=a.object({organizationId:a.string().min(1).optional().describe("Organization to create the project under. Auto-filled from CLI and SDK context when omitted."),name:dB.describe("Project name."),region:Pr.optional().default("us-west-2").describe("AWS region where the new project should be created.")}),yB=a.object({project:Mc}),bB=a.object({project:Mc}),yd=I({operationId:"projects.list",description:"List projects in an organization.",backend:"api",route:{method:"GET",path:"/projects",tags:["Projects"]},input:hB,output:lB,pagination:"none",async:"sync"}),bd=I({operationId:"projects.get",description:"Get one project by ID.",backend:"api",route:{method:"GET",path:"/projects/{projectId}",tags:["Projects"]},input:uB,output:bB,pagination:"none",async:"sync"}),md=I({operationId:"projects.create",description:"Create one project in an organization.",backend:"api",route:{method:"POST",path:"/projects",successStatus:201,tags:["Projects"]},input:gB,output:yB,pagination:"none",async:"sync"}),mB=a.object({projectId:a.string().uuid().describe("Project ID to update."),name:dB.optional().describe("New project name.")}),pB=a.object({project:Mc}),pd=I({operationId:"projects.update",description:"Update (rename) one project by ID. User credentials require the `settings:write` organization permission (admin or owner role).",backend:"api",route:{method:"PATCH",path:"/projects/{projectId}",tags:["Projects"]},input:mB,output:pB,pagination:"none",async:"sync"}),wB=a.object({projectId:a.string().uuid().describe("Project ID to delete.")}),fB=a.void(),wd=I({operationId:"projects.delete",description:"Delete one project by ID. User credentials require the `settings:write` organization permission (admin or owner role).",backend:"api",route:{method:"DELETE",path:"/projects/{projectId}",successStatus:204,tags:["Projects"]},input:wB,output:fB,pagination:"none",async:"sync"}),cue={list:yd.contract,get:bd.contract,create:md.contract,update:pd.contract,delete:wd.contract}});var vB,sue,hue,lue,uue,due,VI,QWe;var kB=d(()=>{me();Ce();vB=a.enum(["open","merged","closed"]),sue=a.enum(["review_required","approved","changes_requested"]),hue=a.enum(["passing","failing","pending"]),lue=a.object({id:a.string().uuid(),projectId:a.string().uuid(),repositoryFullName:a.string(),pullRequestId:a.string().describe("Provider-native pull request identifier (GitHub PR number or Bitbucket PR id), serialized as a string."),githubPullRequestId:a.number().int().describe("Deprecated: use pullRequestId. Numeric form of the provider-native pull request identifier; kept for backward compatibility."),title:a.string().nullable(),url:a.string().nullable(),status:vB.nullable(),reviewState:sue.nullable(),checksState:hue.nullable(),requestedByUserId:a.string().nullable(),authorLogin:a.string().nullable().describe("Forge login that authored the pull request (often the Sazabi app identity)."),githubAuthorLogin:a.string().nullable().describe("Deprecated: use authorLogin. Kept for backward compatibility."),threadId:a.string().uuid().nullable(),runId:a.string().uuid().nullable(),createdAt:a.string().datetime(),mergedAt:a.string().datetime().nullable(),closedAt:a.string().datetime().nullable()}),uue=a.object({projectId:a.string().uuid().optional().describe("Project to list pull requests for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of pull requests to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:vB.optional().describe("Filter by pull request status (open, merged, or closed)."),repositoryFullName:a.string().trim().optional().describe("Filter by repository full name, for example owner/repo. Case-insensitive."),requestedByUserId:a.string().trim().optional().describe("Filter by the Sazabi user who requested the pull request. Pass 'me' to filter to the authenticated user.")}),due=a.object({pullRequests:a.array(lue),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),VI=I({operationId:"pullRequests.list",description:"List pull requests that Sazabi opened, optionally filtered by status, repository, and requesting user.",backend:"api",route:{method:"GET",path:"/pull-requests",tags:["Pull Requests"]},input:uue,output:due,pagination:"cursor",async:"sync"}),QWe={list:VI.contract}});var SB,PB,IB,$B,OB,Ec;var e$=d(()=>{me();Ce();SB=a.enum(["data_source","mcp_connector","sandbox_cli","integration"]),PB=a.enum(["connected","recommended"]),IB=a.object({kind:SB.describe("What the recommendation targets: a data source, MCP connector, sandbox CLI, or integration."),targetId:a.string().describe("Exact catalog id for the kind (data source type, MCP provider id, sandbox CLI preset type, or integration provider id)."),status:PB.describe("Resolved live against current connections: connected (already set up) or recommended (suggested, not yet connected)."),roiScore:a.number().int().min(0).max(100).describe("Intrinsic ROI score, 0–100 — a normalized blend of how valuable, how easy to connect, and how proven the item is. A pure function of the item; computed live on read, never stored."),priority:a.number().int().min(1).describe("1-based rank within this list, sorted by roiScore (best first). Items are already returned in priority order; the field lets consumers recover the rank without trusting array position.")}),$B=a.object({projectId:a.string().uuid().optional().describe("Project to list recommendations for. Auto-filled from CLI and SDK context when omitted.")}),OB=a.object({recommendations:a.array(IB).describe("The project's configuration recommendations, deduped by (kind, targetId), with status resolved live and each item's ROI score. Returned in priority order (highest roiScore first).")}),Ec=I({operationId:"recommendations.list",description:"List a project's configuration recommendations (data sources, MCP connectors, sandbox CLIs, and integrations) with each item's live connection status.",backend:"api",route:{method:"GET",path:"/recommendations",tags:["Recommendations"]},input:$B,output:OB,pagination:"none",async:"sync"})});var AB,gue,TB,fd,LB,DB,CB,zB,Ir,_B,jB,NB,vd,yue;var t$=d(()=>{me();Ce();AB=a.object({type:a.string().describe("Preset type identifier."),label:a.string().describe("Human-readable display name."),executableNames:a.array(a.string()).describe("CLI binary names installed by this preset."),envVarKeys:a.array(a.string()).describe("Environment variables required for authentication."),setupSkill:a.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),gue=a.object({}),TB=a.object({types:a.array(AB)}),fd=I({operationId:"sandboxPresets.listTypes",description:"List all supported sandbox CLI types with their environment variable requirements and setup skills.",backend:"api",route:{method:"GET",path:"/sandbox-presets/types",tags:["Sandbox Presets"]},input:gue,output:TB,pagination:"none",async:"sync"}),LB=a.enum(["github_app","personal_access_token","stored_credentials"]),DB=a.object({presetType:a.string().describe("Preset type identifier."),credentialSource:LB.describe("Authoritative credential source for the preset."),isSystemManaged:a.boolean().describe("Whether the connection follows an integration lifecycle."),fallbackConfigured:a.boolean().describe("Whether user-provided fallback credentials are stored for this preset."),envVarKeys:a.array(a.string()).describe("Stored environment variable names. Secret values are omitted.")}),CB=a.object({projectId:a.string().uuid().optional().describe("Project to inspect. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted.")}),zB=a.object({connections:a.array(DB)}),Ir=I({operationId:"sandboxPresets.listConnections",description:"List a project's stored and integration-backed sandbox CLI connections without returning secret values.",backend:"api",route:{method:"GET",path:"/sandbox-presets/connections",tags:["Sandbox Presets"]},input:CB,output:zB,pagination:"none",async:"sync"}),_B=a.object({key:a.string().min(1).max(256).regex(/^[A-Za-z_][A-Za-z0-9_]*$/,"Environment variable keys must match /^[A-Za-z_][A-Za-z0-9_]*$/.").describe("Environment variable name (e.g. KUBECONFIG_CONTENTS)."),value:a.string().max(10240).describe("Secret value. Encrypted at rest; never returned by any API response.")}),jB=a.object({projectId:a.string().uuid().optional().describe("Project to configure. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted."),presetType:a.string().min(1).describe("Preset type identifier (e.g. kubectl, aws, github)."),environmentVariables:a.array(_B).max(100).describe("Full set of env vars for this preset. Replaces any previously stored values for the preset.")}),NB=a.object({projectId:a.string().uuid().describe("Project the preset was written to."),presetType:a.string().describe("Preset type that was upserted."),envVarKeys:a.array(a.string()).describe("Env var key names now stored for this preset. Values are never returned.")}),vd=I({operationId:"sandboxPresets.upsertPreset",summary:"Upsert CLI Connection",description:"Set or replace a project's sandbox CLI connection environment variables (e.g. the kubectl CLI's KUBECONFIG_CONTENTS). Values are encrypted server-side and never returned. Requires a secret key scoped to the target project's organization.",backend:"api",route:{method:"POST",path:"/sandbox-presets/config",successStatus:200,tags:["Sandbox Presets"]},input:jB,output:NB,pagination:"none",async:"sync"}),yue={listConnections:Ir.contract,listTypes:fd.contract,upsertPreset:vd.contract}});var kd,RB=1048576,n$,xB,o$,bue,mue,pue,wue,fue,vue,kue,Sue,Pue,Iue,i$,r$,a$,c$,s$,sFe;var UB=d(()=>{me();Ce();kd=a.string().min(1).max(64).regex(/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/,"Name must start with a letter or digit and contain only letters, digits, underscores, and hyphens (max 64 characters).").describe("Script name. Must be unique within the project among non-deleted scripts."),n$=a.string().min(1).refine((e)=>new TextEncoder().encode(e).length<=RB,{message:`Script content must be at most ${RB} bytes (1 MiB).`}).describe("Bash script body materialized as /home/sazabi/scripts/<name>.sh in the sandbox."),xB=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),description:a.string().nullable(),contentHash:a.string().describe("sha256 hex digest of the script content."),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),o$=xB.extend({content:n$}),bue=a.object({projectId:a.string().uuid().optional().describe("Project to list scripts for. Auto-filled from CLI and SDK context when omitted."),search:a.string().optional().describe("Case-insensitive partial match on script name."),cursor:a.string().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of scripts to return per page.")}),mue=a.object({scripts:a.array(xB),nextCursor:a.string().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),pue=a.object({name:kd.describe("Script name to fetch."),projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted.")}),wue=a.object({script:o$}),fue=a.object({projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted."),name:kd.describe("Script name. Must be unique within the project among non-deleted scripts."),content:n$,description:a.string().max(500).nullable().optional().describe("Optional human-readable description.")}),vue=a.object({script:o$}),kue=a.object({name:kd.describe("Script to update."),projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted."),content:n$.optional().describe("New script body. Omit to leave content unchanged."),description:a.string().max(500).nullable().optional().describe("New description, or null to clear it. Omit to leave unchanged.")}),Sue=a.object({script:o$}),Pue=a.object({name:kd.describe("Script to delete."),projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted.")}),Iue=a.object({deleted:a.boolean()}),i$=I({operationId:"scripts.list",description:"List durable bash scripts stored for a project.",backend:"api",route:{method:"GET",path:"/scripts",tags:["Scripts"]},input:bue,output:mue,pagination:"cursor",async:"sync"}),r$=I({operationId:"scripts.get",description:"Get a single project script by name, including its body.",backend:"api",route:{method:"GET",path:"/scripts/{name}",tags:["Scripts"]},input:pue,output:wue,pagination:"none",async:"sync"}),a$=I({operationId:"scripts.create",description:"Create a durable bash script for a project.",backend:"api",route:{method:"POST",path:"/scripts",successStatus:201,tags:["Scripts"]},input:fue,output:vue,pagination:"none",async:"sync"}),c$=I({operationId:"scripts.update",description:"Update a project script's body and/or description.",backend:"api",route:{method:"PATCH",path:"/scripts/{name}",tags:["Scripts"]},input:kue,output:Sue,pagination:"none",async:"sync"}),s$=I({operationId:"scripts.delete",description:"Soft-delete a project script by name.",backend:"api",route:{method:"DELETE",path:"/scripts/{name}",successStatus:204,tags:["Scripts"]},input:Pue,output:Iue,pagination:"none",async:"sync"}),sFe={list:i$.contract,get:r$.contract,create:a$.contract,update:c$.contract,delete:s$.contract}});var h$,MB,EB,KB,GB,$r,Or,$ue;var l$=d(()=>{me();Ce();h$=a.object({projectId:a.string().uuid().optional().describe("Project to search within. Auto-filled from CLI and SDK context when omitted."),query:a.string().trim().min(1,"Query must be at least 1 character").max(500,"Query must be at most 500 characters"),limit:a.coerce.number().min(1).max(100).default(20).describe("Maximum number of search results to return."),page:a.coerce.number().min(1).default(1).describe("One-based page number.")}),MB=h$.extend({status:a.enum(["regular","archived"]).optional().describe("Optional thread status filter.")}),EB=h$.extend({threadId:a.string().uuid().optional().describe("Optional thread restriction for message search."),role:a.enum(["user","assistant"]).optional().describe("Optional message role filter.")}),KB=a.object({threads:a.array(a.object({id:a.string().uuid(),projectId:a.string().uuid().optional(),title:a.string(),status:a.enum(["regular","archived"]),labels:a.array(a.string()),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),highlights:a.array(a.string()),score:a.number().optional()})),pagination:a.object({page:a.number(),limit:a.number(),totalResults:a.number(),totalPages:a.number()}).describe("Page-based pagination metadata for the current search result.")}),GB=a.object({messages:a.array(a.object({id:a.string().uuid(),threadId:a.string().uuid(),threadTitle:a.string(),role:a.enum(["user","assistant"]),content:a.string(),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),highlights:a.array(a.string()),score:a.number().optional()})),pagination:a.object({page:a.number(),limit:a.number(),totalResults:a.number(),totalPages:a.number()}).describe("Page-based pagination metadata for the current search result.")}),$r=I({operationId:"search.threads",description:"Search threads within one project.",backend:"api",route:{method:"GET",path:"/search/threads",tags:["Search"]},input:MB,output:KB,pagination:"page",async:"sync",examples:[{name:"search-open-incidents",input:{projectId:"11111111-1111-4111-8111-111111111111",query:"payment timeout",status:"regular",limit:10,page:1},output:{threads:[{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",title:"Payment timeout in us-west-2",status:"regular",labels:["payments","timeout"],createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-02T00:00:00.000Z",highlights:["payment timeout"],score:123.45}],pagination:{page:1,limit:10,totalResults:1,totalPages:1}}}]}),Or=I({operationId:"search.messages",description:"Search messages within one project.",backend:"api",route:{method:"GET",path:"/search/messages",tags:["Search"]},input:EB,output:GB,pagination:"page",async:"sync",examples:[{name:"search-assistant-messages",input:{projectId:"11111111-1111-4111-8111-111111111111",query:"rollback",role:"assistant",limit:10,page:1},output:{messages:[{id:"33333333-3333-4333-8333-333333333333",threadId:"22222222-2222-4222-8222-222222222222",threadTitle:"Deployment rollback guidance",role:"assistant",content:"Rollback the ingestion deployment and confirm queue depth.",createdAt:"2026-01-02T00:00:00.000Z",updatedAt:"2026-01-02T00:00:00.000Z",highlights:["Rollback the ingestion deployment"],score:98.76}],pagination:{page:1,limit:10,totalResults:1,totalPages:1}}}]}),$ue={threads:$r.contract,messages:Or.contract}});var Gc,JB,BB,HB,WB,FB,ZB,XB,YB,QB,Oue,y$,VB,Sd,Pd,Ar,Id,$d,eH,tH,Tr,u$,Aue,nH,oH,iH,Tue,rH,aH,cH,b$,sH,hH,lH,Od,Ad,Td,Ld,qc,uH,d$,dH,Jc,m$,gH,yH,Lue,Due,p$,bH,mH,pH,wH,fH,vH,kH,w$,Dd,Cd,zd,_d,f$,SH,g$,Kc,v$,Cue,jd,PH,IH,$H,OH,qB,AH,TH,LH,Nd,Rd,DH,k$,CH,zH,_H,jH,NH,xd,Ud,zue;var S$=d(()=>{me();Ce();Gc=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),description:a.string().nullable(),origin:a.enum(["user_declared","code_detected","log_observed"]),lifecycle:a.enum(["active","retired","merged"]),observationState:a.enum(["observed","stale","unobserved"]),registryRevision:a.number().int().nonnegative(),canonicalComponentId:a.string().uuid(),mergedIntoComponentId:a.string().uuid().nullable(),currentStatus:a.enum(["operational","degraded","outage"]).describe("Current health status of this component."),firstSeenAt:a.string().datetime(),lastSeenAt:a.string().datetime(),deletedAt:a.string().datetime().nullable().describe("Timestamp when this component was retired, if any."),retiredAt:a.string().datetime().nullable(),retirementReason:a.string().nullable(),legacyStateUnknown:a.boolean().describe("True only for migration-era inactive rows whose retirement authority is unknown.")}),JB=a.object({projectId:a.string().uuid().optional().describe("Project to list status components for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of components to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),includeDeleted:a.union([a.boolean(),a.stringbool()]).default(!1).describe("When true, include retired and merged components.")}),BB=a.object({statusComponents:a.array(Gc),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),HB=a.object({componentId:a.string().uuid().describe("Status component ID to retrieve.")}),WB=a.object({statusComponent:Gc}),FB=a.object({projectId:a.string().uuid().optional().describe("Project to register the status component in. Auto-filled from CLI and SDK context when omitted."),name:a.string().trim().min(1,"Name is required").describe("Evidence-backed component name to register."),description:a.string().trim().min(1,"Description cannot be empty").optional().describe("Optional component description."),requestId:a.string().uuid().optional().describe("Project-scoped idempotency key. Reuse only for an identical registration request.")}),ZB=a.object({statusComponent:Gc}),XB=a.object({componentId:a.string().uuid().describe("Active component ID to rename."),name:a.string().trim().min(1,"Name is required"),requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact rename."),reason:a.string().trim().min(1,"Reason cannot be empty").describe("Customer-visible audit reason for renaming the component.")}),YB=a.object({statusComponent:Gc}),QB=a.object({componentId:a.string().uuid().describe("Status component ID to deregister."),reason:a.string().trim().min(1,"Reason cannot be empty").optional().describe("Optional reason for audit logging.")}),Oue=a.object({openIssueIds:a.array(a.string().uuid()),activeComponentIssueIds:a.array(a.string().uuid()),automationBindingIds:a.array(a.string().uuid()),notificationRuleIds:a.array(a.string().uuid()),dataSourceMappingIds:a.array(a.string().uuid()),observationIds:a.array(a.string().uuid()),relationshipIds:a.array(a.string().uuid()),recommendationScopeIds:a.array(a.string().uuid()),externalIncidentIds:a.array(a.string().uuid()),authorizedDeliveryIds:a.array(a.string().uuid()),authorizedAutomationRunIds:a.array(a.string().uuid())}),y$=a.object({requestedComponentId:a.string().uuid(),canonicalComponentId:a.string().uuid(),canonicalComponentName:a.string(),lifecycle:a.enum(["active","retired"]),affectedComponentIds:a.array(a.string().uuid()),componentRevisions:a.record(a.string().uuid(),a.number().int().nonnegative()),requiresCanonicalGroupConfirmation:a.boolean(),recommendationScopeEnabled:a.literal(!1),dependents:Oue,counts:a.record(a.string(),a.number().int().nonnegative())}),VB=a.discriminatedUnion("status",[a.object({status:a.literal("observation_withdrawn"),componentId:a.string().uuid(),sourceType:a.literal("secret_key"),withdrawn:a.boolean()}),a.object({status:a.literal("retirement_confirmation_required"),preview:y$})]),Sd=I({operationId:"statusComponents.list",description:"List status page components in a project.",backend:"api",route:{method:"GET",path:"/status-components",tags:["Status Components"]},input:JB,output:BB,pagination:"cursor",async:"sync"}),Pd=I({operationId:"statusComponents.get",description:"Get a single status component by ID.",backend:"api",route:{method:"GET",path:"/status-components/{componentId}",tags:["Status Components"]},input:HB,output:WB,pagination:"none",async:"sync"}),Ar=I({operationId:"statusComponents.register",description:"Register a status page component in a project, or refresh an existing active component with the same name.",backend:"api",route:{method:"POST",path:"/status-components",tags:["Status Components"]},input:FB,output:ZB,pagination:"none",async:"sync"}),Id=I({operationId:"statusComponents.deregister",description:"Withdraw this credential's component observation, or return a retirement preview for a human caller.",backend:"api",route:{method:"POST",path:"/status-components/{componentId}/deregister",tags:["Status Components"]},input:QB,output:VB,pagination:"none",async:"sync"}),$d=I({operationId:"statusComponents.rename",description:"Rename an active component while reserving its previous exact name as an alias.",backend:"api",route:{method:"POST",path:"/status-components/{componentId}/rename",tags:["Status Components"]},input:XB,output:YB,pagination:"none",async:"sync"}),eH=a.object({componentId:a.string().uuid().describe("Component or merged-source ID whose canonical group to retire.")}),tH=a.object({preview:y$}),Tr=a.record(a.string().uuid(),a.number().int().nonnegative()),u$=a.object({id:a.string().uuid(),rowRevision:a.number().int().nonnegative()}),Aue=a.object({notificationRules:a.array(u$),automationBindings:a.array(u$),relationships:a.array(u$)}),nH=a.object({componentId:a.string().uuid().describe("Component or merged-source ID confirmed by the preview."),requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact retirement."),reason:a.string().trim().min(1,"Reason cannot be empty").describe("Customer-visible audit reason for retiring the component."),componentRevisions:Tr.describe("Exact canonical-group revisions returned by retirementPreview."),confirmCanonicalGroup:a.boolean().default(!1).describe("Explicitly confirm retiring the complete canonical group when the request used a merged source.")}),oH=a.object({operationId:a.string().uuid(),status:a.enum(["committed","complete","followup_failed"]),requestedComponentId:a.string().uuid(),canonicalComponentId:a.string().uuid(),affectedComponentIds:a.array(a.string().uuid()),counts:a.record(a.string(),a.number().int().nonnegative()),authorizedDeliveryIds:a.array(a.string().uuid()),authorizedAutomationRunIds:a.array(a.string().uuid()),manualExternalIncidentIds:a.array(a.string().uuid()),issueAutomationSuppressions:a.number().int().nonnegative(),outboxEffectCount:a.number().int().nonnegative(),manifest:Aue,followups:a.record(a.string(),a.unknown()).optional()}),iH=a.object({result:oH}),Tue=a.object({notificationRuleIds:a.array(a.string().uuid()),automationBindingIds:a.array(a.string().uuid()),recommendationScopeIds:a.array(a.string().uuid()),relationshipIds:a.array(a.string().uuid())}),rH=a.object({componentId:a.string().uuid().describe("Retired component or merged-source ID to inspect."),retirementOperationId:a.string().uuid().optional().describe("Optional retirement operation to verify; defaults to the component's current retirement.")}),aH=a.object({requestedComponentId:a.string().uuid(),canonicalComponentId:a.string().uuid(),canonicalComponentName:a.string(),retirementOperationId:a.string().uuid(),affectedComponentIds:a.array(a.string().uuid()),componentRevisions:Tr,eligible:Tue}),cH=a.object({preview:aH}),b$=a.object({notificationRuleIds:a.array(a.string().uuid()).default([]),automationBindingIds:a.array(a.string().uuid()).default([]),recommendationScopeIds:a.array(a.string().uuid()).default([]),relationshipIds:a.array(a.string().uuid()).default([])}),sH=a.object({componentId:a.string().uuid().describe("Retired component or merged-source ID confirmed by preview."),retirementOperationId:a.string().uuid().describe("Retirement operation whose unchanged dependents may be restored."),requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact restoration."),reason:a.string().trim().min(1,"Reason cannot be empty").describe("Customer-visible audit reason for restoring the component."),componentRevisions:Tr.describe("Exact canonical-group revisions returned by restorationPreview."),selections:b$.default({notificationRuleIds:[],automationBindingIds:[],recommendationScopeIds:[],relationshipIds:[]}).describe("Only these still-eligible dependents are restored; omitted selections restore none.")}),hH=a.object({operationId:a.string().uuid(),status:a.literal("complete"),requestedComponentId:a.string().uuid(),canonicalComponentId:a.string().uuid(),affectedComponentIds:a.array(a.string().uuid()),restored:b$}),lH=a.object({result:hH}),Od=I({operationId:"statusComponents.retirementPreview",description:"Preview every synchronous and follow-up consequence of retiring a canonical component group.",backend:"api",route:{method:"POST",path:"/status-components/{componentId}/retirement/preview",tags:["Status Components"]},input:eH,output:tH,pagination:"none",async:"sync"}),Ad=I({operationId:"statusComponents.retire",description:"Atomically retire a confirmed canonical component group and durably enqueue lifecycle follow-ups.",backend:"api",route:{method:"POST",path:"/status-components/{componentId}/retire",tags:["Status Components"]},input:nH,output:iH,pagination:"none",async:"sync"}),Td=I({operationId:"statusComponents.restorationPreview",description:"Preview unchanged retirement-owned dependents that remain eligible for explicit restoration.",backend:"api",route:{method:"POST",path:"/status-components/{componentId}/restoration/preview",tags:["Status Components"]},input:rH,output:cH,pagination:"none",async:"sync"}),Ld=I({operationId:"statusComponents.restore",description:"Restore a retired canonical component and only the explicitly selected eligible dependents.",backend:"api",route:{method:"POST",path:"/status-components/{componentId}/restore",tags:["Status Components"]},input:sH,output:lH,pagination:"none",async:"sync"}),qc=a.enum(["part_of","depends_on"]).describe("Relationship semantics: part_of is an acyclic child-to-parent edge; depends_on may be cyclic."),uH=a.enum(["observed","stale","unobserved"]),d$=a.object({originalComponentId:a.string().uuid(),effectiveComponentId:a.string().uuid(),name:a.string(),lifecycle:a.enum(["active","retired","merged"]),observationState:uH}),dH=a.object({id:a.string().uuid(),source:d$,target:d$,relationshipType:qc,createdAt:a.string().datetime(),endedAt:a.string().datetime().nullable(),endReason:a.string().nullable(),rowRevision:a.number().int().nonnegative()}),Jc=a.object({projectId:a.string().uuid().optional().describe("Project containing the component topology. Auto-filled from CLI and SDK context when omitted.")}),m$=a.object({sourceComponentId:a.string().uuid().describe("Child or dependency-source component ID."),targetComponentId:a.string().uuid().describe("Parent or dependency-target component ID."),relationshipType:qc}),gH=Jc.extend({includeHistorical:a.union([a.boolean(),a.stringbool()]).default(!1).describe("Include historically ended relationships.")}),yH=a.object({relationships:a.array(dH)}),Lue=a.object({ruleId:a.string().uuid(),ruleGroupId:a.string().uuid().nullable(),ownerComponentId:a.string().uuid(),destinationIds:a.array(a.string().uuid()),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),Due=a.object({bindingId:a.string().uuid(),automationId:a.string().uuid(),ownerComponentId:a.string().uuid(),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),p$=a.object({notificationRules:a.array(Lue),automationBindings:a.array(Due)}),bH=m$.extend({action:a.enum(["add","remove"]),organizationId:a.string(),projectId:a.string().uuid(),relationshipId:a.string().uuid().nullable(),componentRevisions:a.record(a.string().uuid(),a.number().int().nonnegative()),policyImpact:p$,confirmationRequired:a.boolean()}),mH=Jc.merge(m$).extend({action:a.enum(["add","remove"]).describe("Topology mutation to preview without changing the graph.")}),pH=a.object({preview:bH}),wH=Jc.merge(m$).extend({requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact mutation."),reason:a.string().trim().min(1,"Reason cannot be empty"),componentRevisions:a.record(a.string().uuid(),a.number().int().nonnegative()),confirmPolicyImpact:a.boolean().default(!1).describe("Confirm the descendant-scoped notification and automation changes shown by preview.")}),fH=wH,vH=wH,kH=a.object({action:a.enum(["add","remove"]),relationshipId:a.string().uuid(),sourceComponentId:a.string().uuid(),targetComponentId:a.string().uuid(),relationshipType:qc,policyImpact:p$}),w$=a.object({result:kH}),Dd=I({operationId:"statusComponents.relationships.list",description:"List active or historical component topology edges.",backend:"api",route:{method:"GET",path:"/status-components/relationships",tags:["Status Components"]},input:gH,output:yH,pagination:"none",async:"sync"}),Cd=I({operationId:"statusComponents.relationships.preview",description:"Preview descendant-scoped notification and automation impact for a topology change.",backend:"api",route:{method:"POST",path:"/status-components/relationships/preview",tags:["Status Components"]},input:mH,output:pH,pagination:"none",async:"sync"}),zd=I({operationId:"statusComponents.relationships.add",description:"Add a confirmed, tenant-safe component topology edge.",backend:"api",route:{method:"POST",path:"/status-components/relationships",tags:["Status Components"]},input:fH,output:w$,pagination:"none",async:"sync"}),_d=I({operationId:"statusComponents.relationships.remove",description:"Historically end a confirmed component topology edge.",backend:"api",route:{method:"POST",path:"/status-components/relationships/remove",tags:["Status Components"]},input:vH,output:w$,pagination:"none",async:"sync"}),f$=a.enum(["suspend","move"]),SH=a.object({disposition:f$,beforeComponentIds:a.array(a.string().uuid()).describe("Exact effective component set returned by mergePreview."),afterComponentIds:a.array(a.string().uuid()).describe("Exact effective component set that ownership would have on the target.")}),g$=a.object({kind:a.enum(["notification_rule","automation_binding"]),policyId:a.string().uuid(),sourceRowRevision:a.number().int().nonnegative(),sourceComponentId:a.string().uuid(),equivalentPolicyId:a.string().uuid().nullable(),equivalent:a.boolean(),defaultDisposition:a.enum(["deduplicate","suspend"]),allowedDispositions:a.array(f$),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),Kc=a.object({kind:a.enum(["notification_rule","automation_binding"]),policyId:a.string().uuid(),ownerComponentId:a.string().uuid(),rowRevision:a.number().int().nonnegative(),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),v$=a.object({relationshipId:a.string().uuid(),action:a.enum(["rewire","close_self","close_duplicate"]),relationshipType:qc,beforeSourceComponentId:a.string().uuid(),beforeTargetComponentId:a.string().uuid(),afterSourceComponentId:a.string().uuid(),afterTargetComponentId:a.string().uuid(),survivingRelationshipId:a.string().uuid().nullable(),beforeRowRevision:a.number().int().nonnegative(),afterRowRevision:a.number().int().nonnegative().nullable()}),Cue=a.object({openIssueIds:a.array(a.string().uuid()),componentIssueIds:a.array(a.string().uuid()),observationIds:a.array(a.string().uuid()),dataSourceMappingIds:a.array(a.string().uuid()),nameIds:a.array(a.string().uuid()),relationshipIds:a.array(a.string().uuid()),recommendationScopeIds:a.array(a.string().uuid())}),jd=a.object({sourceComponentId:a.string().uuid().describe("Active or retired component whose independent grain is removed."),targetComponentId:a.string().uuid().describe("Active terminal component that becomes the canonical target.")}),PH=Jc.merge(jd),IH=jd.extend({organizationId:a.string(),projectId:a.string().uuid(),sourceGroupComponentIds:a.array(a.string().uuid()),targetGroupComponentIds:a.array(a.string().uuid()),affectedComponentIds:a.array(a.string().uuid()),componentRevisions:Tr,inventory:Cue,notificationPolicies:a.array(g$),automationBindings:a.array(g$),notificationScopeChanges:a.array(Kc),automationScopeChanges:a.array(Kc),relationshipChanges:a.array(v$),recommendationScopeEnabled:a.literal(!1),dependentCount:a.number().int().nonnegative(),ordinaryTransactionLimit:a.number().int().positive(),operatorAssistanceRequired:a.boolean(),confirmationRequired:a.boolean()}),$H=a.object({preview:IH}),OH=Jc.merge(jd).extend({requestId:a.string().uuid().describe("Project-scoped idempotency key for this exact consolidation."),reason:a.string().trim().min(1,"Reason cannot be empty").describe("Customer-visible audit reason for consolidation."),componentRevisions:Tr.describe("Exact canonical-group revisions returned by mergePreview."),policyDispositions:a.record(a.string().uuid(),SH).describe("Exactly one disposition for every non-equivalent source policy; each repeats the previewed effective sets."),confirmPolicyImpact:a.boolean().default(!1).describe("Explicitly acknowledge every before/after policy scope change shown by mergePreview.")}),qB=a.object({policyId:a.string().uuid(),action:a.enum(["deduplicated","suspended","moved"]),equivalentPolicyId:a.string().uuid().nullable(),beforeRowRevision:a.number().int().nonnegative(),afterRowRevision:a.number().int().nonnegative(),beforeComponentIds:a.array(a.string().uuid()),afterComponentIds:a.array(a.string().uuid())}),AH=a.object({componentRevisions:Tr,redirectedComponentIds:a.array(a.string().uuid()),dataSourceMappingIds:a.array(a.string().uuid()),movedAliasIds:a.array(a.string().uuid()),historicalDisplayIds:a.array(a.string().uuid()),relationshipChanges:a.array(v$),notificationPolicies:a.array(qB),automationBindings:a.array(qB),notificationScopeChanges:a.array(Kc),automationScopeChanges:a.array(Kc),recommendationScopeIds:a.array(a.string().uuid())}),TH=jd.extend({operationId:a.string().uuid(),status:a.literal("complete"),affectedComponentIds:a.array(a.string().uuid()),manifest:AH}),LH=a.object({result:TH}),Nd=I({operationId:"statusComponents.mergePreview",description:"Preview one-hop redirects, historical preservation, operational rebinding, topology contraction, and policy dispositions for component consolidation.",backend:"api",route:{method:"POST",path:"/status-components/merge/preview",tags:["Status Components"]},input:PH,output:$H,pagination:"none",async:"sync"}),Rd=I({operationId:"statusComponents.merge",description:"Consolidate a source into an active terminal target without rewriting historical issue or observation attribution.",backend:"api",route:{method:"POST",path:"/status-components/merge",tags:["Status Components"]},input:OH,output:LH,pagination:"none",async:"sync"}),DH=a.enum(["degraded","outage"]).describe("Severity of a status-page incident. 'outage' marks the component down; 'degraded' marks partial impact."),k$=a.object({id:a.string().uuid(),componentId:a.string().uuid(),projectId:a.string().uuid(),severity:DH,summary:a.string().describe("Human-readable summary of the status-page issue."),startedAt:a.string().datetime().describe("When the incident began affecting the component."),resolvedAt:a.string().datetime().nullable().describe("When the incident was resolved, or null while ongoing.")}),CH=a.object({projectId:a.string().uuid().optional().describe("Project to list status-page issues for. Auto-filled from CLI and SDK context when omitted."),componentId:a.string().uuid().optional().describe("Restrict results to a single component."),activeOnly:a.union([a.boolean(),a.stringbool()]).default(!1).describe("When true, return only unresolved (ongoing) issues."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of issues to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),zH=a.object({incidents:a.array(k$),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),_H=a.object({timestamp:a.string().datetime(),status:a.enum(["operational","degraded","outage","unknown"]).describe("Worst component status observed during this timeline bucket.")}),jH=a.object({componentId:a.string().uuid().describe("Status component to build the timeline for."),windowStart:a.string().datetime({offset:!0}).optional().describe("Start of the timeline window. Defaults to 7 days before windowEnd."),windowEnd:a.string().datetime({offset:!0}).optional().describe("End of the timeline window. Defaults to now.")}),NH=a.object({componentId:a.string().uuid(),windowStart:a.string().datetime(),windowEnd:a.string().datetime(),timeline:a.array(_H),incidents:a.array(k$)}),xd=I({operationId:"statusComponents.incidents.list",description:"List status-page issues in a project.",backend:"api",route:{method:"GET",path:"/status-incidents",tags:["Status Components"]},input:CH,output:zH,pagination:"cursor",async:"sync"}),Ud=I({operationId:"statusComponents.timeline",description:"Get the dense status timeline and incidents for a component over a time window.",backend:"api",route:{method:"GET",path:"/status-components/{componentId}/timeline",tags:["Status Components"]},input:jH,output:NH,pagination:"none",async:"sync"}),zue={list:Sd.contract,get:Pd.contract,register:Ar.contract,deregister:Id.contract,rename:$d.contract,retirementPreview:Od.contract,retire:Ad.contract,restorationPreview:Td.contract,restore:Ld.contract,mergePreview:Nd.contract,merge:Rd.contract,relationships:{list:Dd.contract,preview:Cd.contract,add:zd.contract,remove:_d.contract},incidents:{list:xd.contract},timeline:Ud.contract}});var RH;var xH=d(()=>{RH=["onboarding","setup"]});var UH,MH,EH,KH,Bc;var P$=d(()=>{xH();me();Ce();UH=a.enum(RH),MH=a.object({id:a.string().describe("Unique task identifier (e.g. install_github_app)."),label:a.string().describe("Short human-readable task name."),description:a.string().describe("Explanation of what needs to be completed to satisfy this task."),instructions:a.string().describe("Step-by-step instructions for completing this task."),completed:a.boolean().describe("Whether the task has been completed."),completedAt:a.string().datetime().nullable().describe("ISO 8601 timestamp of when the task was completed, or null."),category:UH.describe("Task category: onboarding (core setup steps) or setup (additional configuration).")}),EH=a.object({projectId:a.string().uuid().optional().describe("Project to list tasks for. Auto-filled from CLI and SDK context when omitted.")}),KH=a.object({tasks:a.array(MH).describe("All onboarding and setup tasks with their current completion status.")}),Bc=I({operationId:"tasks.list",description:"List all onboarding and setup tasks for a project, including their current completion status and a description of what is required to complete each task.",backend:"api",route:{method:"GET",path:"/tasks",tags:["Tasks"]},input:EH,output:KH,pagination:"none",async:"sync"})});var I$;var GH=d(()=>{fD();kD();Ok();e1();Dk();_k();M1();Gk();QP();rd();iJ();cI();DJ();tB();aB();cB();sB();QI();kB();e$();sd();t$();UB();l$();S$();P$();II();I$={me:VP.contract,automations:{list:tv.contract,get:nv.contract,create:ov.contract,update:iv.contract,enable:rv.contract,disable:av.contract,runs:{list:cv.contract,get:sv.contract,logs:hv.contract}},logs:{query:Ji.contract,schema:Bi.contract,volume:Hi.contract,patterns:Wi.contract,nativeQuery:Fi.contract,searchNatural:Ml.contract},dataSources:{listTypes:ll.contract,listInstances:Ri.contract,createInstance:xi.contract,getInstance:ul.contract,updateInstance:dl.contract,deleteInstance:gl.contract,listStreams:yl.contract,createStream:bl.contract,getStream:ml.contract,updateStream:pl.contract,deleteStream:wl.contract},integrations:{listProviders:YN.contract,listConnections:QN.contract,getConnection:VN.contract},notificationChannels:{getProject:DI.contract},notificationDeliveryRules:{list:xI.contract,options:UI.contract,create:MI.contract,update:EI.contract,delete:KI.contract},mcpConnectors:{listProviders:id.contract,list:gr.contract,get:yr.contract,details:br.contract},sandboxPresets:{listConnections:Ir.contract,listTypes:fd.contract,upsertPreset:vd.contract},scripts:{list:i$.contract,get:r$.contract,create:a$.contract,update:c$.contract,delete:s$.contract},logMatchExpressions:{list:Rk.contract,get:xk.contract,create:Uk.contract,update:Mk.contract,disable:Ek.contract},memory:{put:pr.contract,get:wr.contract,list:fr.contract,search:vr.contract,delete:kr.contract},onboarding:{getState:qI.contract,skipIntegration:JI.contract,skipGithubAppInstallation:BI.contract,skipSampleIssue:HI.contract,finish:WI.contract},organizations:{list:ZI.contract,get:XI.contract,create:FI.contract,update:YI.contract},members:{list:eI.contract,updateRole:tI.contract,remove:nI.contract},publicKeys:{list:Mi.contract,get:Ei.contract,ensureLogForwarding:Ki.contract,update:Gi.contract,deactivate:qi.contract},secretKeys:{list:jl.contract,get:Nl.contract,create:Rl.contract,update:xl.contract,delete:Ul.contract},projects:{list:yd.contract,get:bd.contract,create:md.contract,update:pd.contract,delete:wd.contract},search:{threads:$r.contract,messages:Or.contract},messages:{list:TJ.contract,append:LJ.contract},threads:{list:gI.contract,get:yI.contract,getStatus:bI.contract,stop:mI.contract,create:pI.contract,update:wI.contract,fork:fI.contract,setVisibility:vI.contract,createShareLink:kI.contract,listShareLinks:SI.contract,revokeShareLink:PI.contract},runs:{list:sI.contract,listForThread:hI.contract,get:lI.contract,cancel:uI.contract},pullRequests:{list:VI.contract},issues:{count:Pl.contract,create:Ui.contract,list:kl.contract,search:Sl.contract,get:Il.contract,resolve:$l.contract,ignore:Ol.contract,reopen:Al.contract,reassignAndReopen:Tl.contract,mute:Ll.contract,unmute:Dl.contract},billing:{getSummary:lv.contract,getUsage:uv.contract,listTransactions:dv.contract},tasks:{list:Bc.contract},recommendations:{list:Ec.contract},statusComponents:{list:Sd.contract,get:Pd.contract,register:Ar.contract,deregister:Id.contract,rename:$d.contract,retirementPreview:Od.contract,retire:Ad.contract,restorationPreview:Td.contract,restore:Ld.contract,mergePreview:Nd.contract,merge:Rd.contract,relationships:{list:Dd.contract,preview:Cd.contract,add:zd.contract,remove:_d.contract},incidents:{list:xd.contract},timeline:Ud.contract}}});var Lr=d(()=>{gD();GH();Ok();Dk();_k();Gk();QP();cI();QI();e$();t$();l$();S$();P$()});var _ue="https://api.sazabi.com",jue="x-sazabi-client-source",JH=(e)=>{return{streamRun:async(t)=>{return qH({options:e,path:`/runs/${encodeURIComponent(t.runId)}/stream`,cursor:t.cursor,signal:t.signal})},streamThread:async(t)=>{return qH({options:e,path:`/threads/${encodeURIComponent(t.threadId)}/stream`,cursor:t.cursor,signal:t.signal})}}},qH=async(e)=>{let t=e.options.fetch??globalThis.fetch;if(!t)throw Error("Fetch transport is not available in this runtime.");let n=await e.options.credentialProvider.getToken(),i=Nue(e.options.apiBaseUrl,e.path,e.cursor);return xue({url:i,token:n,clientSource:e.options.clientSource,initialCursor:e.cursor,signal:e.signal,fetch:t})},Nue=(e,t,n)=>{let i=Rue(e??_ue),o=new URL(`${i}${t}`);if(n)o.searchParams.set(Xf,n);return o.toString()},Rue=(e)=>{let t=e.replace(/\/+$/,"");return t.endsWith("/v1")?t:`${t}/v1`},xue=async(e)=>{let t=[],n=[],i=!1,o=!1,r,c=e.initialCursor,s=new AbortController,h=(v)=>{if(i)return;i=!0,r=v;while(n.length>0)n.shift()?.({value:void 0,done:!0})},l=(v)=>{let P=n.shift();if(P){P({value:v,done:!1});return}t.push(v)},u=(v)=>{if(v.event===Qf){let T=Gue(v.data);if(T!==void 0)c=T;return}if(v.data===Vf){o=!0,s.abort(),h();return}let P=que(v.data);if(P)l(P)},g=()=>{o=!0,s.abort(),h()};if(e.signal)if(e.signal.aborted)o=!0,s.abort();else e.signal.addEventListener("abort",g,{once:!0});let y={[Symbol.asyncIterator](){return y},get cursor(){return c},next:async()=>{if(t.length>0)return{value:t.shift(),done:!1};if(i){if(r)throw r;return{value:void 0,done:!0}}return new Promise((v)=>{n.push(v)}).then((v)=>{if(v.done&&r)throw r;return v})},return:async()=>{return o=!0,s.abort(),h(),{value:void 0,done:!0}},throw:async(v)=>{throw o=!0,s.abort(),h(v instanceof Error?v:Error(String(v))),v},close:async()=>{o=!0,s.abort(),h()}};if(o)return h(),y;let b=await e.fetch(e.url,{method:Yf,headers:Uue(e.token,e.clientSource),signal:s.signal});if(await Mue(b))h();else Eue(b,u).then(()=>h()).catch((v)=>{if(Bue(v)||o||e.signal?.aborted){h();return}h(Hue(v))});return y},Uue=(e,t)=>{return{accept:"text/event-stream",authorization:`Bearer ${e}`,...t?{[jue]:t}:{}}},Mue=async(e)=>{if(e.status===204)return!0;if(e.ok&&e.body)return!1;let t=await Jue(e);if(e.status===401)throw Error("Authentication failed. Check your credential.");if(e.status===403)throw Error(`Forbidden (403): ${t||"Credential may not have access to this resource"}`);if(e.status===404)throw Error(`Not found (404): ${t||"Run or thread not found"}`);if(e.status===400)throw Error(`Invalid stream cursor (400): ${t||"The provided cursor was rejected"}`);if(e.status>=400&&e.status<500&&e.status!==429)throw Error(`Client error (${e.status}): ${t}`);if(!e.body)throw Error("Agent stream response did not include a body.");throw Error(e.status===429?`Rate limited (429): ${t}`:`Server error (${e.status}): ${t}`)},Eue=async(e,t)=>{let n=e.body?.getReader();if(!n)throw Error("Agent stream response did not include a body.");let i=new TextDecoder,o="",r=Kue(t);try{while(!0){let c=await n.read();if(c.done)break;o+=i.decode(c.value,{stream:!0});let s=o.split(/\r\n|\r|\n/);o=s.pop()??"";for(let h of s)r.line(h)}if(o+=i.decode(),o)for(let c of o.split(/\r\n|\r|\n/))r.line(c);r.flush()}finally{n.releaseLock()}},Kue=(e)=>{let t="message",n=[],i=()=>{t="message",n=[]},o=()=>{if(n.length===0){i();return}e({event:t,data:n.join(`
8397
8397
  `)}),i()};return{line:(r)=>{if(r===""){o();return}if(r.startsWith(":"))return;let c=r.indexOf(":"),s=c===-1?r:r.slice(0,c),h=c===-1?"":r.slice(c+1),l=h.startsWith(" ")?h.slice(1):h;if(s==="event"){t=l||"message";return}if(s==="data")n.push(l)},flush:o}},Gue=(e)=>{try{let t=Zf.safeParse(JSON.parse(e));return t.success?t.data.streamNextOffset:void 0}catch{return}},que=(e)=>{try{let t=Ff.safeParse(JSON.parse(e));return t.success?t.data:void 0}catch{return}},Jue=async(e)=>{try{return await e.text()}catch{return""}},Bue=(e)=>{return e instanceof Error&&e.name==="AbortError"},Hue=(e)=>{return e instanceof Error?e:Error(String(e))};var BH=d(()=>{Lr()});var $$,O$,A$,HH;var WH=d(()=>{me();$$=a.object({severities:a.array(a.string()).optional().describe("Limit results to the listed severities."),services:a.array(a.string()).optional().describe("Limit results to the listed service names."),environments:a.array(a.string()).optional().describe("Limit results to the listed deployment environments."),searchTerm:a.string().optional().describe("Case-insensitive substring match against the log body."),traceId:a.string().optional().describe("Limit results to one trace ID."),attributes:a.record(a.string(),a.string()).optional().describe("Limit results to logs whose attributes contain every listed key with an exactly equal value.")}),O$=a.object({service:a.string(),namespace:a.string(),environment:a.string(),host:a.string(),container:a.string(),pod:a.string()}),A$=a.object({id:a.string(),timestamp:a.string().datetime(),severity:a.string(),body:a.string(),service:a.string(),traceId:a.string(),spanId:a.string(),attributes:a.record(a.string(),a.string()),resource:O$}),HH=a.object({type:a.literal("logs"),timestamp:a.string().datetime(),data:a.array(A$)})});var Wue="https://{region}.intake.sazabi.com",Fue="https://{region}.tail.sazabi.com",XH=500,Zue=5000,YH="sazabi.public_key",Xue="x-sazabi-internal-log-forwarding-secret",Yue="x-sazabi-internal-log-forwarding-source",Que=(e)=>{return e.startsWith("[")&&e.endsWith("]")?e.slice(1,-1):e},QH=(e)=>{let t=Que(e);return t==="localhost"||t==="127.0.0.1"||t==="::1"},Vue,ede,tde,VH=(e)=>{let t=new Map;return{tail:async(n)=>{let i=await gde(e.credentialProvider,n.projectId,"logs.tail"),o=await yde(e,t,i,n.region,"logs.tail"),r=ide({projectId:i,region:o,filters:n.filters,apiBaseUrl:e.apiBaseUrl,tailBaseUrl:e.tailBaseUrl}),c=await e.credentialProvider.getToken(),s=e.fetch??globalThis.fetch;if(!s)throw Error("Fetch transport is not available in this runtime.");return mde({token:c,url:r,signal:n.signal,fetch:s})},forward:async(n)=>{let i=await bde(e,t,n.projectId??await e.credentialProvider.getProjectId?.(),n.region,"logs.forward"),o=sde(i,e.intakeBaseUrl),r=e.fetch??globalThis.fetch,c=lde(n.logs,n.publicKey),s=Ide(c);return await Pde(r,o,c,dde(n.sazabiInternalForwarding)),{forwardedCount:s,failedCount:0}}}},nde="3010",ode,ide=(e)=>{let t=(e.tailBaseUrl??rde({region:e.region,apiBaseUrl:e.apiBaseUrl})).replace("{region}",e.region),n=ade(t);n.searchParams.set("projectId",e.projectId);let i=cde(e.filters);if(i)n.searchParams.set("filters",i);return n.toString()},rde=(e)=>{if(e.apiBaseUrl)try{let t=new URL(e.apiBaseUrl).hostname;if(t.endsWith(".sazabi.dev")){let n=t.includes(".staging.")?"staging.sazabi.dev":"development.sazabi.dev";return`https://${e.region}.tail.${n}`}}catch{}return Fue.replace("{region}",e.region)},ade=(e)=>{let t=(()=>{try{return new URL(e)}catch{return null}})();if(!t)throw Error(`Invalid tail base URL: ${e}`);if(QH(t.hostname)){if(t.protocol="http:",!t.port||ode.has(t.port))t.port=nde;return t.pathname="/v1/tail",t.search="",t.hash="",t}if(t.protocol==="ws:"||t.protocol==="wss:")t.protocol=t.protocol==="wss:"?"https:":"http:";if(t.protocol!=="http:"&&t.protocol!=="https:")throw Error(`Invalid tail base URL protocol: ${t.protocol}. Expected http:, https:, ws:, or wss:.`);return t.pathname="/v1/tail",t.search="",t.hash="",t},cde=(e)=>{if(!e)return;let t=Object.entries(e).filter(([,n])=>n!==void 0&&(!Array.isArray(n)||n.length>0)&&(typeof n!=="object"||Array.isArray(n)||n===null||Object.keys(n).length>0)&&n!=="");if(t.length===0)return;return JSON.stringify(Object.fromEntries(t))},sde=(e,t)=>{let n=(t??Wue).replace("{region}",e),i=n.endsWith("/")?n.slice(0,-1):n,o=hde(i);if(o)return o;let r=i.match(/^https:\/\/([a-z0-9-]+)\.intake\.([a-z0-9.]+)$/);return`${r?`https://otlp.${r[1]}.intake.${r[2]}`:i}/v1/logs`},hde=(e)=>{let t=(()=>{try{return new URL(e)}catch{return null}})();if(!t)return;if(!QH(t.hostname))return;return t.pathname="/adapters/otlp",t.toString()},lde=(e,t)=>{let n=e.resourceLogs;if(!n||n.length===0)return{...e,resourceLogs:[{resource:{attributes:[eW(t)]},scopeLogs:[]}]};return{...e,resourceLogs:n.map((i)=>({...i,resource:{...i.resource,attributes:ude(i.resource?.attributes,t)}}))}},ude=(e,t)=>{return[...(e??[]).filter((i)=>i?.key!==YH),eW(t)]},eW=(e)=>({key:YH,value:{stringValue:e}}),dde=(e)=>{if(!e?.secret)return{};return{[Xue]:e.secret,...e.source?{[Yue]:e.source}:{}}},gde=async(e,t,n)=>{let i=t??await e.getProjectId?.();if(i)return i;throw oW(n,"Project ID is required",["projectId"])},yde=async(e,t,n,i,o)=>{return i??await tW(e,t,n)},bde=async(e,t,n,i,o)=>{if(i)return i;if(!n)throw oW(o,"Project ID is required",["projectId"]);return tW(e,t,n)},tW=async(e,t,n)=>{let i=t.get(n);if(i)return i;let o=e.raw.projects.get({projectId:n}).then((r)=>r.project.region);t.set(n,o);try{return await o}catch(r){throw t.delete(n),r}},mde=async(e)=>{let t=[],n=[],i=!1,o=!1,r,c=0,s,h,l=(P)=>{if(i)return;i=!0,r=P;while(n.length>0){let T=n.shift();if(T)T({value:void 0,done:!0})}},u=(P)=>{let T=n.shift();if(T){T({value:P,done:!1});return}t.push(P)},g=()=>{h?.abort()},y=(P)=>{if(P.event!=="log"){if(P.id)s=P.id;return}let T=kde(P.data);for(let x of T)u(x);if(P.id)s=P.id},b=async(P)=>{let T=!1;while(!i&&!o){let x=new AbortController,j=()=>x.abort();h=x;let Z=!1;e.signal?.addEventListener("abort",j,{once:!0});try{let U=await e.fetch(pde(e.url,s),{method:"GET",headers:{accept:"text/event-stream",authorization:`Bearer ${e.token}`},signal:x.signal});await wde(U),c=0,T=!0,P(),await fde(U,y),Z=!0}catch(U){if(ZH(U)||e.signal?.aborted)break;let we=FH(U);if(!T||Sde(we))throw we;Z=!0}finally{if(e.signal?.removeEventListener("abort",j),h===x)h=void 0}if(i||o||e.signal?.aborted)break;if(!Z)continue;c+=1,await nW(Math.min(XH*2**(c-1),Zue),e.signal)}};if(e.signal?.addEventListener("abort",()=>{o=!0,g(),l()},{once:!0}),e.signal?.aborted)o=!0,g(),l();await new Promise((P,T)=>{let x=!1;b(()=>{if(!x)x=!0,P()}).catch((Z)=>{let U=FH(Z);if(!x){x=!0,T(U);return}if(!ZH(Z))l(U)})});let v={[Symbol.asyncIterator](){return v},next:async()=>{if(t.length>0)return{value:t.shift(),done:!1};if(i){if(r)throw r;return{value:void 0,done:!0}}return new Promise((P)=>{n.push(P)}).then((P)=>{if(P.done&&r)throw r;return P})},return:async()=>{return o=!0,g(),l(),{value:void 0,done:!0}},throw:async(P)=>{throw o=!0,g(),l(P instanceof Error?P:Error(String(P))),P}};return v},pde=(e,t)=>{if(!t)return e;let n=new URL(e);return n.searchParams.set("cursor",t),n.toString()},wde=async(e)=>{if(e.ok&&e.body)return;let t=await e.text();if(e.status===401)throw Error("Authentication failed. Check your credential.");if(e.status===403){if(/not served by this region/i.test(t))throw Error(`Wrong region (403): ${t||"Project is not served by this region"}`);throw Error(`Forbidden (403): ${t||"Credential may not have access to this project"}`)}if(e.status>=400&&e.status<500&&e.status!==429)throw Error(`Client error (${e.status}): ${t}`);if(!e.body)throw Error("Tail stream response did not include a body.");throw Error(e.status===429?`Rate limited (429): ${t}`:`Server error (${e.status}): ${t}`)},fde=async(e,t)=>{let n=e.body?.getReader();if(!n)throw Error("Tail stream response did not include a body.");let i=new TextDecoder,o="",r=vde(t);try{while(!0){let c=await n.read();if(c.done)break;o+=i.decode(c.value,{stream:!0});let s=o.split(/\r\n|\r|\n/);o=s.pop()??"";for(let h of s)r.line(h)}if(o+=i.decode(),o){let c=o.split(/\r\n|\r|\n/);for(let s of c)r.line(s)}r.flush()}finally{n.releaseLock()}},vde=(e)=>{let t="message",n,i=[],o=()=>{t="message",n=void 0,i=[]},r=()=>{if(i.length===0&&!n){o();return}e({event:t,data:i.join(`
8398
8398
  `),...n?{id:n}:{}}),o()};return{line:(c)=>{if(c===""){r();return}if(c.startsWith(":"))return;let s=c.indexOf(":"),h=s===-1?c:c.slice(0,s),l=s===-1?"":c.slice(s+1),u=l.startsWith(" ")?l.slice(1):l;if(h==="event"){t=u||"message";return}if(h==="data"){i.push(u);return}if(h==="id"&&!u.includes("\x00"))n=u},flush:r}},kde=(e)=>{try{let t=HH.safeParse(JSON.parse(e));if(!t.success)return[];return t.data.data}catch{return[]}},FH=(e)=>{return e instanceof Error?e:Error(String(e))},ZH=(e)=>{return e instanceof Error&&e.name==="AbortError"},Sde=(e)=>{return e.message.startsWith("Authentication failed")||e.message.startsWith("Forbidden (")||e.message.startsWith("Wrong region (")||e.message.startsWith("Client error (")},Pde=async(e,t,n,i={},o=3,r=1e4)=>{let c;for(let s=0;s<=o;s+=1){let h=new AbortController,l=globalThis.setTimeout(()=>h.abort(),r);try{let u=await e(t,{method:"POST",headers:{"content-type":"application/json",...i},body:JSON.stringify(n),signal:h.signal});if(u.ok)return;let g=await u.text();if(u.status===401||u.status===403)throw Error("Authentication failed. Check your public key.");if(u.status>=400&&u.status<500&&u.status!==429)throw Error(`Client error (${u.status}): ${g}`);c=Error(u.status===429?`Rate limited (429): ${g}`:`Server error (${u.status}): ${g}`)}catch(u){let g=u instanceof Error?u.message:String(u);if(g.startsWith("Authentication failed")||g.startsWith("Client error ("))throw u instanceof Error?u:Error(g);c=u instanceof Error&&u.name==="AbortError"?Error("Request timed out"):u instanceof Error?u:Error(String(u))}finally{globalThis.clearTimeout(l)}if(s<o)await nW(XH*2**s)}throw Error(`Failed after ${o+1} attempts: ${c?.message??"Unknown error"}`)},Ide=(e)=>{return e.resourceLogs?.reduce((t,n)=>t+(n.scopeLogs?.reduce((i,o)=>i+(o.logRecords?.length??0),0)??0),0)??0},nW=async(e,t)=>{if(t?.aborted)return;await new Promise((n)=>{let i=globalThis.setTimeout(n,e);t?.addEventListener("abort",()=>{globalThis.clearTimeout(i),n()},{once:!0})})},oW=(e,t,n)=>{return new Ye("BAD_REQUEST",{message:t,data:{operationId:e,missingContext:n}})};var T$=d(()=>{oi();WH();me();Vue=a.object({projectId:a.string().uuid().optional().describe("Project to tail logs for. Auto-filled from CLI and SDK context when omitted."),filters:$$.optional().describe("Optional filters applied by the tail SSE service.")}),ede=a.object({publicKey:a.string().min(1).describe("Public key for intake auth. Create or list one via the public key endpoints."),logs:a.custom((e)=>typeof e==="object"&&e!==null).describe("OTLP logs export request payload to send to the intake service.")}),tde=a.object({forwardedCount:a.number().int().nonnegative().describe("Number of log records accepted by the intake request."),failedCount:a.number().int().nonnegative().describe("Number of log records rejected by the intake request.")}),ode=new Set(["15006","3010"])});var L$="https://api.sazabi.com",rW="https://api.platform.sazabi.com",aW="sazabi-cli",$de="urn:ietf:params:oauth:grant-type:device_code",cW=(e)=>{let t=xg(new Xg(I$,{url:Ode(e.apiBaseUrl??L$),headers:async()=>{let o=new Headers({authorization:`Bearer ${await e.credentialProvider.getToken()}`});if(e.clientSource)o.set("x-sazabi-client-source",e.clientSource);return o},fetch:e.fetch,customErrorResponseBodyDecoder:(o,r)=>{let c=_de(o);if(!c)return null;return new Ye(c.code,{message:c.message,status:r.status,data:{operationId:c.operationId,missingContext:c.missingContext}})}})),n=VH({raw:t,credentialProvider:e.credentialProvider,fetch:e.fetch,apiBaseUrl:e.apiBaseUrl??L$,intakeBaseUrl:e.intakeBaseUrl,tailBaseUrl:e.tailBaseUrl}),i=JH({credentialProvider:e.credentialProvider,fetch:e.fetch,apiBaseUrl:e.apiBaseUrl??L$,clientSource:e.clientSource});return{raw:t,me:async()=>t.me({}),automations:{list:async(o={})=>t.automations.list(await ie(e.credentialProvider,o,"automations.list")),get:async(o)=>t.automations.get(await ie(e.credentialProvider,o,"automations.get")),create:async(o)=>t.automations.create(await ie(e.credentialProvider,o,"automations.create")),update:async(o)=>t.automations.update(await ie(e.credentialProvider,o,"automations.update")),enable:async(o)=>t.automations.enable(await ie(e.credentialProvider,o,"automations.enable")),disable:async(o)=>t.automations.disable(await ie(e.credentialProvider,o,"automations.disable")),runs:{list:async(o)=>t.automations.runs.list(await ie(e.credentialProvider,o,"automations.runs.list")),get:async(o)=>t.automations.runs.get(await ie(e.credentialProvider,o,"automations.runs.get")),logs:async(o)=>t.automations.runs.logs(await ie(e.credentialProvider,o,"automations.runs.logs"))}},logs:{...n,query:async(o={})=>t.logs.query(await ie(e.credentialProvider,o,Ji.operationId)),schema:async(o={})=>t.logs.schema(await ie(e.credentialProvider,o,Bi.operationId)),volume:async(o)=>t.logs.volume(await ie(e.credentialProvider,o,Hi.operationId)),patterns:async(o={})=>t.logs.patterns(await ie(e.credentialProvider,o,Wi.operationId)),nativeQuery:async(o)=>t.logs.nativeQuery(await ie(e.credentialProvider,o,Fi.operationId))},organizations:{list:async()=>t.organizations.list({}),get:async(o)=>t.organizations.get(o),update:async(o)=>t.organizations.update(await Tde(e.credentialProvider,o))},members:{list:async(o={})=>t.members.list(await dn(e.credentialProvider,o)),updateRole:async(o)=>t.members.updateRole(await dn(e.credentialProvider,o)),remove:async(o)=>{let r=await dn(e.credentialProvider,o);return t.members.remove({params:{userId:r.userId},query:{organizationId:r.organizationId}})}},publicKeys:{list:async(o={})=>t.publicKeys.list(await ie(e.credentialProvider,o,Mi.operationId)),get:async(o)=>t.publicKeys.get(await ie(e.credentialProvider,o,Ei.operationId)),ensureLogForwarding:async(o={})=>t.publicKeys.ensureLogForwarding(await ie(e.credentialProvider,o,Ki.operationId)),update:async(o)=>t.publicKeys.update(await ie(e.credentialProvider,o,Gi.operationId)),deactivate:async(o)=>{let r=await ie(e.credentialProvider,o,qi.operationId);return t.publicKeys.deactivate({params:{keyId:r.keyId},query:{projectId:r.projectId}})}},secretKeys:{list:async(o={})=>t.secretKeys.list(o),get:async(o)=>t.secretKeys.get(o),create:async(o)=>t.secretKeys.create(o),update:async(o)=>t.secretKeys.update(o),delete:async(o)=>{await t.secretKeys.delete({params:{keyId:o.keyId}})}},search:{threads:async(o)=>t.search.threads(await ie(e.credentialProvider,o,$r.operationId)),messages:async(o)=>t.search.messages(await ie(e.credentialProvider,o,Or.operationId))},projects:{list:async(o={})=>t.projects.list(await Ade(e.credentialProvider,o)),get:async(o)=>t.projects.get(o),create:async(o)=>t.projects.create(await dn(e.credentialProvider,o))},messages:{list:async(o)=>t.messages.list(o),append:async(o)=>iW(t,await t.messages.append(zde(o)))},threads:{list:async(o={})=>t.threads.list(await Lde(e.credentialProvider,o)),get:async(o)=>t.threads.get(o),getStatus:async(o)=>t.threads.getStatus(o),stop:async(o)=>t.threads.stop(o),create:async(o)=>iW(t,await t.threads.create(await Cde(e.credentialProvider,o))),update:async(o)=>t.threads.update(o),fork:async(o)=>t.threads.fork(o),setVisibility:async(o)=>t.threads.setVisibility(o),createShareLink:async(o)=>t.threads.createShareLink(o),listShareLinks:async(o)=>t.threads.listShareLinks(o),revokeShareLink:async(o)=>t.threads.revokeShareLink(o),stream:async(o)=>i.streamThread(o)},runs:{list:async(o={})=>t.runs.list(await Dde(e.credentialProvider,o)),listForThread:async(o)=>t.runs.listForThread(o),get:async(o)=>t.runs.get(o),cancel:async(o)=>t.runs.cancel(o),stream:async(o)=>i.streamRun(o)},dataSources:{listTypes:async()=>t.dataSources.listTypes({}),instances:{list:async(o={})=>t.dataSources.listInstances(await ie(e.credentialProvider,o,Ri.operationId)),get:async(o)=>t.dataSources.getInstance(o),create:async(o)=>t.dataSources.createInstance(await ie(e.credentialProvider,o,xi.operationId)),update:async(o)=>t.dataSources.updateInstance(o),delete:async(o)=>t.dataSources.deleteInstance(o)},streams:{list:async(o)=>t.dataSources.listStreams(o),get:async(o)=>t.dataSources.getStream(o),create:async(o)=>t.dataSources.createStream(o),update:async(o)=>t.dataSources.updateStream(o),delete:async(o)=>t.dataSources.deleteStream(o)}},integrations:{listProviders:async(o={})=>t.integrations.listProviders(await dn(e.credentialProvider,o)),listConnections:async(o={})=>t.integrations.listConnections(await dn(e.credentialProvider,o)),getConnection:async(o)=>t.integrations.getConnection(await dn(e.credentialProvider,o))},mcpConnectors:{list:async(o={})=>t.mcpConnectors.list(await ie(e.credentialProvider,o,gr.operationId)),get:async(o)=>t.mcpConnectors.get(await ie(e.credentialProvider,o,yr.operationId)),details:async(o)=>t.mcpConnectors.details(await ie(e.credentialProvider,o,br.operationId)),listProviders:async()=>t.mcpConnectors.listProviders({})},sandboxPresets:{listConnections:async(o={})=>t.sandboxPresets.listConnections(await ie(e.credentialProvider,o,Ir.operationId)),listTypes:async()=>t.sandboxPresets.listTypes({})},memory:{list:async(o={})=>t.memory.list(await ie(e.credentialProvider,o,fr.operationId)),get:async(o)=>t.memory.get(await ie(e.credentialProvider,o,wr.operationId)),put:async(o)=>t.memory.put(await ie(e.credentialProvider,o,pr.operationId)),search:async(o)=>t.memory.search(await ie(e.credentialProvider,o,vr.operationId)),delete:async(o)=>t.memory.delete(await ie(e.credentialProvider,o,kr.operationId))},logMatchExpressions:{list:async(o={})=>t.logMatchExpressions.list(await ie(e.credentialProvider,o,"logMatchExpressions.list")),get:async(o)=>t.logMatchExpressions.get(await ie(e.credentialProvider,o,"logMatchExpressions.get")),create:async(o)=>t.logMatchExpressions.create(await ie(e.credentialProvider,o,"logMatchExpressions.create")),update:async(o)=>t.logMatchExpressions.update(await ie(e.credentialProvider,o,"logMatchExpressions.update")),disable:async(o)=>t.logMatchExpressions.disable(await ie(e.credentialProvider,o,"logMatchExpressions.disable"))},scripts:{list:async(o={})=>t.scripts.list(await ie(e.credentialProvider,o,"scripts.list")),get:async(o)=>t.scripts.get(await ie(e.credentialProvider,o,"scripts.get")),create:async(o)=>t.scripts.create(await ie(e.credentialProvider,o,"scripts.create")),update:async(o)=>t.scripts.update(await ie(e.credentialProvider,o,"scripts.update")),delete:async(o)=>t.scripts.delete(await ie(e.credentialProvider,o,"scripts.delete"))},issues:{count:async(o={})=>t.issues.count(await ie(e.credentialProvider,o,"issues.count")),create:async(o)=>t.issues.create(await ie(e.credentialProvider,o,Ui.operationId)),list:async(o={})=>t.issues.list(await ie(e.credentialProvider,o,"issues.list")),search:async(o={})=>t.issues.search(await ie(e.credentialProvider,o,"issues.search")),get:async(o)=>t.issues.get(o),resolve:async(o)=>t.issues.resolve(o),ignore:async(o)=>t.issues.ignore(o),reopen:async(o)=>t.issues.reopen(o),mute:async(o)=>t.issues.mute(o),unmute:async(o)=>t.issues.unmute(o)},pullRequests:{list:async(o={})=>t.pullRequests.list(await ie(e.credentialProvider,o,"pullRequests.list"))},statusComponents:{list:async(o={})=>t.statusComponents.list(await ie(e.credentialProvider,o,"statusComponents.list")),get:async(o)=>t.statusComponents.get(o),register:async(o)=>t.statusComponents.register(await ie(e.credentialProvider,o,Ar.operationId)),deregister:async(o)=>t.statusComponents.deregister({componentId:o.componentId,...o.reason!==void 0?{reason:o.reason}:{}}),rename:async(o)=>t.statusComponents.rename(o),retirementPreview:async(o)=>t.statusComponents.retirementPreview(o),retire:async(o)=>t.statusComponents.retire(o),restorationPreview:async(o)=>t.statusComponents.restorationPreview(o),restore:async(o)=>t.statusComponents.restore(o),mergePreview:async(o)=>t.statusComponents.mergePreview(await ie(e.credentialProvider,o,"statusComponents.mergePreview")),merge:async(o)=>t.statusComponents.merge(await ie(e.credentialProvider,o,"statusComponents.merge")),relationships:{list:async(o={})=>t.statusComponents.relationships.list(await ie(e.credentialProvider,o,"statusComponents.relationships.list")),preview:async(o)=>t.statusComponents.relationships.preview(await ie(e.credentialProvider,o,"statusComponents.relationships.preview")),add:async(o)=>t.statusComponents.relationships.add(await ie(e.credentialProvider,o,"statusComponents.relationships.add")),remove:async(o)=>t.statusComponents.relationships.remove(await ie(e.credentialProvider,o,"statusComponents.relationships.remove"))},incidents:{list:async(o={})=>t.statusComponents.incidents.list(await ie(e.credentialProvider,o,"statusComponents.incidents.list"))},timeline:async(o)=>t.statusComponents.timeline(o)},billing:{getSummary:async(o={})=>t.billing.getSummary(await dn(e.credentialProvider,o)),getUsage:async(o={})=>t.billing.getUsage(await dn(e.credentialProvider,o)),listTransactions:async(o={})=>t.billing.listTransactions(await dn(e.credentialProvider,o))},tasks:{list:async(o={})=>t.tasks.list(await ie(e.credentialProvider,o,Bc.operationId))},recommendations:{list:async(o={})=>t.recommendations.list(await ie(e.credentialProvider,o,Ec.operationId))}}},C$=async(e={})=>{let t=await lW(e.fetch)(sW(e.apiBaseUrl??rW,"/device/code"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({client_id:e.clientId??aW,...e.scope?{scope:e.scope}:{}})}),n=await t.json();if(!t.ok)throw jde(n,t.status);let i=n;return{deviceCode:Dr(i.device_code,"device_code"),userCode:Dr(i.user_code,"user_code"),verificationUri:Dr(i.verification_uri,"verification_uri"),verificationUriComplete:Dr(i.verification_uri_complete,"verification_uri_complete"),expiresIn:D$(i.expires_in,"expires_in"),interval:D$(i.interval,"interval")}},z$=async(e)=>{let t=await lW(e.fetch)(sW(e.apiBaseUrl??rW,"/device/token"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({grant_type:$de,device_code:e.deviceCode,client_id:e.clientId??aW})}),n=await t.json();if(t.ok){let o=n;return{status:"authorized",accessToken:Dr(o.access_token,"access_token"),tokenType:Dr(o.token_type,"token_type"),expiresIn:D$(o.expires_in,"expires_in"),scope:typeof o.scope==="string"?o.scope:""}}let i=hW(n);if(!i)throw Error(`Device authorization failed with status ${t.status}`);if(i.error==="authorization_pending")return{status:"pending"};if(i.error==="slow_down")return{status:"pending",interval:10};if(i.error==="access_denied")return{status:"denied",message:i.errorDescription};if(i.error==="expired_token"||i.error==="invalid_grant")return{status:"expired",message:i.errorDescription};throw Error(i.errorDescription)},Ode=(e)=>{let t=e.replace(/\/+$/,"");return t.endsWith("/v1")?t:`${t}/v1`},sW=(e,t)=>{return`${e.replace(/\/+$/,"")}/api/auth${t}`},Ade=async(e,t)=>{return dn(e,t)},dn=async(e,t)=>{let n=t.organizationId??await e.getOrganizationId?.();return n?{...t,organizationId:n}:t},Tde=async(e,t)=>{let n=t.organizationId??await e.getOrganizationId?.();if(!n)throw new Ye("BAD_REQUEST",{message:"Organization ID is required",data:{operationId:"organizations.update",missingContext:["organizationId"]},status:400});return{...t,organizationId:n}},ie=async(e,t,n)=>{let i=t.projectId??await e.getProjectId?.();if(!i)throw new Ye("BAD_REQUEST",{message:"Project ID is required",data:{operationId:n,missingContext:["projectId"]},status:400});return{...t,projectId:i}},Lde=async(e,t)=>{let n=t.projectId??await e.getProjectId?.();return n?{...t,projectId:n}:t},Dde=async(e,t)=>{let n=t.projectId??await e.getProjectId?.();return n?{...t,projectId:n}:t},Cde=async(e,t)=>{let n=t.projectId??await e.getProjectId?.();return n?{...t,projectId:n}:t},zde=(e)=>{return{threadId:e.threadId,message:e.message,wait:e.wait??!0,timeoutSeconds:e.timeoutSeconds??20,...e.automationId!==void 0?{automationId:e.automationId}:{}}},_de=(e)=>{if(!e||typeof e!=="object")return null;let t=e;if(typeof t.code!=="string"||typeof t.message!=="string"||typeof t.operationId!=="string")return null;return{code:t.code,message:t.message,operationId:t.operationId,missingContext:Array.isArray(t.missingContext)?t.missingContext.filter((n)=>typeof n==="string"):[]}},hW=(e)=>{if(!e||typeof e!=="object")return null;let t=e;if(typeof t.error!=="string"||typeof t.error_description!=="string")return null;return{error:t.error,errorDescription:t.error_description}},jde=(e,t)=>{let n=hW(e);return Error(n?.errorDescription??`Device authorization failed with status ${t}`)},lW=(e)=>{return e??globalThis.fetch},iW=(e,t)=>({result:t,poll:()=>e.runs.get({runId:t.runId}),waitForCompletion:async(n={})=>Nde(e,t,n)}),Nde=async(e,t,n)=>{if(t.completed)return t;let i=n.intervalMs??2000,o=Date.now(),r=t;while(!r.completed){if(n.timeoutMs!==void 0&&Date.now()-o>=n.timeoutMs)return r;await Rde(i),r=await e.runs.get({runId:r.runId})}return r},Rde=async(e)=>{await new Promise((t)=>globalThis.setTimeout(t,e))},Dr=(e,t)=>{if(typeof e==="string")return e;throw Error(`Expected '${t}' to be a string.`)},D$=(e,t)=>{if(typeof e==="number")return e;throw Error(`Expected '${t}' to be a number.`)};var _$=d(()=>{oi();lA();Lr();BH();T$();T$()});var We=(e)=>({success:!0,value:e}),Me=(e,t,n)=>({success:!1,error:e,...t!==void 0&&{statusCode:t},...n!==void 0&&{errorPayload:n}}),f=(e,t,n)=>{if(!e.success){let i=`${t}: ${e.error}`;if(n)return m(e.errorPayload??i);return p(i)}return e.value};var re=d(()=>{te()});var xde="https://api.sazabi.com",L=async(e)=>{try{return We(await e())}catch(t){let n=Ude(t),i=Mde(t),o=t instanceof Error?t.message:String(t);return Me(o,i,n)}},Ude=(e)=>{if(!e||typeof e!=="object")return;let t=e;if(typeof t.code!=="string"||typeof t.message!=="string"||!t.data||typeof t.data!=="object")return;let n=t.data;if(typeof n.operationId!=="string")return;return{code:t.code,message:t.message,operationId:n.operationId,missingContext:Array.isArray(n.missingContext)?n.missingContext.filter((i)=>typeof i==="string"):[]}},Mde=(e)=>{if(!e||typeof e!=="object")return;let t=e;return typeof t.status==="number"?t.status:void 0},Gn=(e)=>{let t=cW({apiBaseUrl:e.baseUrl??xde,clientSource:"cli",credentialProvider:{getToken:()=>e.token,getOrganizationId:()=>e.organizationId,getProjectId:()=>e.projectId},intakeBaseUrl:e.intakeBaseUrl,tailBaseUrl:e.tailBaseUrl});return{me:()=>L(()=>t.me()),automations:{list:(n={})=>L(()=>t.automations.list(n)),get:(n)=>L(()=>t.automations.get({automationId:n})),create:(n)=>L(()=>t.automations.create(n)),update:(n)=>L(()=>t.automations.update(n)),enable:(n)=>L(()=>t.automations.enable({automationId:n})),disable:(n)=>L(()=>t.automations.disable({automationId:n})),runs:{list:(n,i={})=>L(()=>t.automations.runs.list({automationId:n,...i})),get:(n,i)=>L(()=>t.automations.runs.get({automationId:n,runId:i})),logs:(n,i)=>L(()=>t.automations.runs.logs({automationId:n,runId:i}))}},logs:{tail:(n)=>L(()=>t.logs.tail(n)),forward:(n)=>L(()=>t.logs.forward(n)),query:(n={})=>L(()=>t.logs.query(n)),schema:(n={})=>L(()=>t.logs.schema(n)),volume:(n)=>L(()=>t.logs.volume(n)),patterns:(n={})=>L(()=>t.logs.patterns(n)),nativeQuery:(n)=>L(()=>t.logs.nativeQuery(n))},organizations:{list:()=>L(()=>t.organizations.list()),get:(n)=>L(()=>t.organizations.get({organizationId:n})),rename:(n,i)=>L(()=>t.organizations.update({organizationId:i,name:n}))},members:{list:(n={})=>L(()=>t.members.list(n)),updateRole:(n,i,o)=>L(()=>t.members.updateRole({organizationId:o,userId:n,role:i})),remove:(n,i)=>L(()=>t.members.remove({organizationId:i,userId:n}))},projects:{list:(n={})=>L(()=>t.projects.list(n)),get:(n)=>L(()=>t.projects.get({projectId:n})),create:(n)=>L(()=>t.projects.create(n))},threads:{list:(n={})=>L(()=>t.threads.list(n)),get:(n)=>L(()=>t.threads.get({threadId:n})),create:(n)=>L(()=>t.threads.create(n)),getStatus:(n)=>L(()=>t.threads.getStatus({threadId:n})),update:(n,i)=>L(()=>t.threads.update({threadId:n,status:i})),fork:(n,i)=>L(()=>t.threads.fork({threadId:n,messageId:i})),setVisibility:(n,i)=>L(()=>t.threads.setVisibility({threadId:n,visibility:i})),createShareLink:(n)=>L(()=>t.threads.createShareLink({threadId:n})),listShareLinks:(n)=>L(()=>t.threads.listShareLinks({threadId:n})),revokeShareLink:(n,i)=>L(()=>t.threads.revokeShareLink({threadId:n,shareId:i})),stop:(n)=>L(()=>t.threads.stop({threadId:n})),stream:(n)=>L(()=>t.threads.stream(n))},messages:{list:(n,i={})=>L(()=>t.messages.list({threadId:n,...i})),append:(n,i,o,r,c,s)=>L(()=>t.messages.append({threadId:n,message:i,wait:o,timeoutSeconds:r,...c!==void 0?{automationId:c}:{},...s?{ambientServiceRun:s}:{}}))},runs:{get:(n)=>L(()=>t.runs.get({runId:n})),cancel:(n)=>L(()=>t.runs.cancel({runId:n})),stream:(n)=>L(()=>t.runs.stream(n))},search:{threads:(n)=>L(()=>t.search.threads(n)),messages:(n)=>L(()=>t.search.messages(n))},publicKeys:{list:(n)=>L(()=>t.publicKeys.list(n)),get:(n,i)=>L(()=>t.publicKeys.get(i?{keyId:n,projectId:i}:{keyId:n})),ensureLogForwarding:(n)=>L(()=>t.publicKeys.ensureLogForwarding(n)),update:(n)=>L(()=>t.publicKeys.update(n)),deactivate:(n)=>L(()=>t.publicKeys.deactivate(n))},secretKeys:{list:(n)=>L(()=>t.secretKeys.list(n)),get:(n)=>L(()=>t.secretKeys.get({keyId:n})),create:(n)=>L(()=>t.secretKeys.create(n)),update:(n)=>L(()=>t.secretKeys.update(n)),delete:(n)=>L(()=>t.secretKeys.delete(n))},issues:{count:(n={})=>L(()=>t.issues.count(n)),create:(n)=>L(()=>t.issues.create(n)),list:(n={})=>L(()=>t.issues.list(n)),search:(n={})=>L(()=>t.issues.search(n)),get:(n)=>L(()=>t.issues.get({issueId:n})),resolve:(n)=>L(()=>t.issues.resolve({issueId:n})),ignore:(n)=>L(()=>t.issues.ignore({issueId:n})),reopen:(n)=>L(()=>t.issues.reopen({issueId:n})),mute:(n)=>L(()=>t.issues.mute({issueId:n})),unmute:(n)=>L(()=>t.issues.unmute({issueId:n}))},pullRequests:{list:(n={})=>L(()=>t.pullRequests.list(n))},statusComponents:{list:(n={})=>L(()=>t.statusComponents.list(n)),get:(n)=>L(()=>t.statusComponents.get({componentId:n})),register:(n)=>L(()=>t.statusComponents.register(n)),deregister:(n,i)=>L(()=>t.statusComponents.deregister({componentId:n,...i!==void 0?{reason:i}:{}})),rename:(n)=>L(()=>t.statusComponents.rename(n)),retirementPreview:(n)=>L(()=>t.statusComponents.retirementPreview(n)),retire:(n)=>L(()=>t.statusComponents.retire(n)),restorationPreview:(n)=>L(()=>t.statusComponents.restorationPreview(n)),restore:(n)=>L(()=>t.statusComponents.restore(n)),mergePreview:(n)=>L(()=>t.statusComponents.mergePreview(n)),merge:(n)=>L(()=>t.statusComponents.merge(n)),relationships:{list:(n={})=>L(()=>t.statusComponents.relationships.list(n)),preview:(n)=>L(()=>t.statusComponents.relationships.preview(n)),add:(n)=>L(()=>t.statusComponents.relationships.add(n)),remove:(n)=>L(()=>t.statusComponents.relationships.remove(n))},incidents:{list:(n={})=>L(()=>t.statusComponents.incidents.list(n))},timeline:(n)=>L(()=>t.statusComponents.timeline(n))},billing:{getSummary:(n={})=>L(()=>t.billing.getSummary(n)),getUsage:(n={})=>L(()=>t.billing.getUsage(n)),listTransactions:(n={})=>L(()=>t.billing.listTransactions(n))},tasks:{list:(n={})=>L(()=>t.tasks.list(n))},recommendations:{list:(n={})=>L(()=>t.recommendations.list(n))},dataSources:{listTypes:()=>L(()=>t.dataSources.listTypes()),instances:{list:(n)=>L(()=>t.dataSources.instances.list(n)),get:(n)=>L(()=>t.dataSources.instances.get({instanceId:n})),create:(n)=>L(()=>t.dataSources.instances.create(n)),update:(n)=>L(()=>t.dataSources.instances.update(n)),delete:(n)=>L(()=>t.dataSources.instances.delete({instanceId:n}))},streams:{list:(n)=>L(()=>t.dataSources.streams.list({instanceId:n})),get:(n)=>L(()=>t.dataSources.streams.get({streamId:n})),create:(n)=>L(()=>t.dataSources.streams.create(n)),update:(n)=>L(()=>t.dataSources.streams.update(n)),delete:(n)=>L(()=>t.dataSources.streams.delete({streamId:n}))}},integrations:{listProviders:()=>L(()=>t.integrations.listProviders()),listConnections:(n)=>L(()=>t.integrations.listConnections(n)),getConnection:(n)=>L(()=>t.integrations.getConnection({connectionId:n}))},mcpConnectors:{list:(n)=>L(()=>t.mcpConnectors.list(n)),get:(n)=>L(()=>t.mcpConnectors.get(n)),details:(n)=>L(()=>t.mcpConnectors.details(n)),listProviders:()=>L(()=>t.mcpConnectors.listProviders())},sandboxPresets:{listTypes:()=>L(()=>t.sandboxPresets.listTypes())},memory:{list:(n={})=>L(()=>t.memory.list(n)),get:(n)=>L(()=>t.memory.get(n)),search:(n)=>L(()=>t.memory.search(n)),put:(n)=>L(()=>t.memory.put({kind:"note",...n})),delete:(n)=>L(()=>t.memory.delete(n))},logMatchExpressions:{list:(n={})=>L(()=>t.logMatchExpressions.list(n)),get:(n)=>L(()=>t.logMatchExpressions.get({expressionId:n})),create:(n)=>L(()=>t.logMatchExpressions.create(n)),update:(n,i={})=>L(()=>t.logMatchExpressions.update({expressionId:n,...i})),disable:(n)=>L(()=>t.logMatchExpressions.disable({expressionId:n}))},scripts:{list:(n={})=>L(()=>t.scripts.list(n)),get:(n)=>L(()=>t.scripts.get({name:n})),create:(n)=>L(()=>t.scripts.create(n)),update:(n,i={})=>L(()=>t.scripts.update({name:n,...i})),delete:(n)=>L(()=>t.scripts.delete({name:n}))}}};var Hc=d(()=>{_$();re()});var uW;var dW=d(()=>{uW={version:2,activeProfile:"default",profiles:{default:{}}}});import*as qn from"node:fs";import*as gW from"node:os";import*as R$ from"node:path";var dt=(e)=>{if(e===void 0||e===null)return;if(typeof e==="string")return e.length>0?e:void 0;return},j$,Cr,Ede=()=>{if(!qn.existsSync(j$))qn.mkdirSync(j$,{recursive:!0,mode:448})},N$,yW=(e)=>{N$=e},bW=(e)=>({token:dt(e.token),activeOrganizationId:dt(e.activeOrganizationId??e.organizationId),organizationName:dt(e.organizationName),activeProjectId:dt(e.activeProjectId??e.defaultProjectId),apiBaseUrl:dt(e.apiBaseUrl),authBaseUrl:dt(e.authBaseUrl),webBaseUrl:dt(e.webBaseUrl),intakeBaseUrl:dt(e.intakeBaseUrl),tailBaseUrl:dt(e.tailBaseUrl),apiDomain:dt(e.apiDomain),webDomain:dt(e.webDomain),intakeDomain:dt(e.intakeDomain),tailDomain:dt(e.tailDomain),forwardPublicKey:dt(e.forwardPublicKey),forwardPublicKeyProjectId:dt(e.forwardPublicKeyProjectId)}),Kde=(e)=>({version:2,activeProfile:"default",profiles:{default:bW(e)}}),Gde=(e)=>{let t=dt(e.activeProfile)??"default",n=typeof e.profiles==="object"&&e.profiles!==null?e.profiles:{},i={};for(let[o,r]of Object.entries(n)){if(typeof r!=="object"||r===null)continue;i[o]=bW(r)}if(!i[t])i[t]={};return{version:2,activeProfile:t,profiles:i}},xe=()=>{try{if(!qn.existsSync(Cr))return We(uW);let e=qn.readFileSync(Cr,"utf-8"),t=JSON.parse(e),n=typeof t.version==="number"?t.version:void 0;if(n!==void 0&&n>2)return Me("Settings file requires a newer CLI version. Upgrade with 'npm install -g @sazabi/cli@latest'.");if(n===2)return We(Gde(t));let i=Kde(t),o=Ze(i);if(!o.success)return o;return We(i)}catch(e){let t=e instanceof Error?e.message:String(e);return Me(t)}},Ze=(e)=>{try{return Ede(),qn.writeFileSync(Cr,JSON.stringify(e,null,2),{encoding:"utf-8",mode:384}),We(void 0)}catch(t){let n=t instanceof Error?t.message:String(t);return Me(n)}},$n=(e,t)=>{if(t)return t;if(N$)return N$;let n=process.env.SAZABI_PROFILE?.trim();if(n)return n;return e.activeProfile??"default"},Nt=(e,t)=>{let n=$n(e,t),i=e.profiles[n];if(i)return We(i);if(n==="default")return We({});return Me(`Profile '${n}' does not exist. Run 'sazabi profiles create ${n}' first.`)},Jn=()=>{let e=xe();if(!e.success)return e;return Nt(e.value)},Rt=(e,t,n)=>{let i=$n(e,n);if(!e.profiles[i])return Me(`Profile '${i}' does not exist. Run 'sazabi profiles create ${i}' first.`);return We({...e,profiles:{...e.profiles,[i]:{...e.profiles[i],...t}}})},Bn=(e)=>{if(!e?.forwardPublicKey&&!e?.forwardPublicKeyProjectId)return{};return{forwardPublicKey:void 0,forwardPublicKeyProjectId:void 0}};var Yt=d(()=>{dW();re();j$=R$.join(gW.homedir(),".sazabi"),Cr=R$.join(j$,"settings.json")});var On=(e)=>{let{cliFlag:t,globalUrl:n,globalDomain:i,buildUrlFromDomain:o,defaultUrl:r}=e;if(t)return t;let c=process.env.SAZABI_API_URL?.trim();if(c)return c;if(n)return n;if(i)return o(i);return r},C=(e)=>{let{tokenFlag:t,organizationIdFlag:n,projectIdFlag:i,jsonMode:o}=e,r=t?.trim(),c=process.env.SAZABI_TOKEN?.trim(),s=process.env.SAZABI_ORGANIZATION_ID?.trim(),h=process.env.SAZABI_PROJECT_ID?.trim(),l=f(Jn(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",o),u=l.token?.trim(),g=(r&&r.length>0?r:void 0)||(c&&c.length>0?c:void 0)||u,y=r&&r.length>0?"flag":c&&c.length>0?"environment":"settings";if(!g||g.length===0){if(o)return m("Not authenticated. Set SAZABI_TOKEN, pass --token, run 'sazabi auth login', or run 'sazabi auth save <token>'.");return p("Not authenticated. Set SAZABI_TOKEN, pass --token, run 'sazabi auth login', or run 'sazabi auth save <token>'.")}let b,w;if(n)b=n,w="flag";else if(s&&s.length>0)b=s,w="environment";else if(l.activeOrganizationId)b=l.activeOrganizationId,w="settings";let v,P;if(i)v=i,P="flag";else if(h&&h.length>0)v=h,P="environment";else if(l.activeProjectId)v=l.activeProjectId,P="settings";return{token:g,type:"token",projectId:v,organizationId:b,tokenSource:y,organizationSource:w,projectSource:P}},U$=(e)=>{let t=f(Jn(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",e?.jsonMode);return On({cliFlag:e?.apiBaseUrlFlag,globalUrl:t.apiBaseUrl,globalDomain:t.apiDomain,buildUrlFromDomain:(n)=>`https://api.${n}`,defaultUrl:"https://api.sazabi.com"})},z=(e)=>{let t=U$({apiBaseUrlFlag:e.apiBaseUrlFlag,jsonMode:e.jsonMode});return Gn({token:e.token,baseUrl:t,organizationId:e.organizationId,projectId:e.projectId})},mW,x$,Ed=async(e)=>{let t=f(Jn(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",e.jsonMode),n=On({cliFlag:e.apiBaseUrlFlag,globalUrl:t.apiBaseUrl,globalDomain:t.apiDomain,buildUrlFromDomain:(h)=>`https://api.${h}`,defaultUrl:"https://api.sazabi.com"}),i=`${e.token}@${n}@${e.projectId??""}`,o=mW.get(i);if(o)return o;let r=x$.get(i);if(r)return r;if(!e.projectId){if(e.jsonMode)return m("Project ID is required. Run 'sazabi projects use <project-id>' or set SAZABI_PROJECT_ID.");return p("Project ID is required. Run 'sazabi projects use <project-id>' or set SAZABI_PROJECT_ID.")}let c=e.projectId,s=(async()=>{let l=await Gn({token:e.token,baseUrl:n,projectId:c}).projects.get(c),g=f(l,"Couldn't fetch project info (run 'sazabi projects list' to verify the project ID)",e.jsonMode).project;return mW.set(i,g),g})();x$.set(i,s);try{return await s}finally{x$.delete(i)}},Md=(e)=>{let t=e.trim().toLowerCase(),n=/^[a-z][a-z0-9+.-]*:\/\//.test(t)?t:`https://${t}`,i=t;try{i=new URL(n).hostname.toLowerCase()}catch{i=t.replace(/^[a-z][a-z0-9+.-]*:\/\//,"").replace(/[/?#].*$/,"").replace(/:\d+$/,"")}return`https://app.${i.replace(/^(?:app\.)+/,"")}`},zr=(e)=>{let t=(i)=>i.replace(/\/+$/,"");if(e)return t(e);let n=f(Jn(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)");if(n.webBaseUrl)return t(n.webBaseUrl);if(n.webDomain)return Md(n.webDomain);if(n.apiDomain)return Md(n.apiDomain);return"https://app.sazabi.com"},An=(e,t)=>{if(e&&e.length>0)return e;let n="No project selected. Pass --project-id, set SAZABI_PROJECT_ID, or run 'sazabi projects use <project-id>'.";if(t)return m(n);return p(n)},wo=(e,t)=>{return`${zr(t)}/projects/${e}`},Xe=(e,t,n,i)=>{let o=`${zr(n)}/projects/${e}/threads/${t}`;return i?`${o}?messageId=${encodeURIComponent(i)}`:o},pW=(e,t,n,i)=>{return Xe(e,t,n,i)},wW=(e,t,n)=>{return`${wo(e,n)}/issues/${t}`},fW=(e,t,n)=>{return`${wo(e,n)}/automations/${t}`},vW=(e,t)=>{return`${wo(e,t)}/status`},kW=(e,t,n)=>{return`${wo(e,n)}/settings/data-sources/${t}`},SW=(e,t,n)=>{return`${wo(e,n)}/settings/mcp-connectors/${t}`},PW=(e,t,n)=>{return`${wo(e,n)}/settings/sandbox/catalog/${t}`},IW=(e,t)=>{return`https://otlp.${t}.intake.${e}`};var se=d(()=>{te();Hc();re();Yt();mW=new Map,x$=new Map});var ig,FZ=(e)=>{ig.set(e.name,e)},rg=(e)=>{return ig.get(e)},ss=()=>{return Array.from(ig.values())},ZZ=(e)=>{return ig.has(e)};var hO=d(()=>{ig=new Map});async function gO(e){let t=await e.publicKeys.list({limit:20});if(!t.success)return[];return t.value.publicKeys.map((n)=>({value:n.id,description:n.name}))}async function yO(e){let t=await e.secretKeys.list({limit:20});if(!t.success)return[];return t.value.secretKeys.map((n)=>({value:n.id,description:n.name}))}async function ls(e){let t=await e.dataSources.instances.list();if(!t.success)return[];return t.value.instances.map((n)=>({value:n.id,description:n.name??n.dataSourceType}))}async function QZ(e){let t=await e.members.list();if(!t.success)return[];return t.value.members.map((n)=>({value:n.userId,description:n.name??n.email}))}var wfe=3000,ffe,VZ=async(e,t,n)=>{try{let i=ffe[e]?.[t];if(!i)return[];let o=Jn();if(!o.success)return[];let r=o.value,c=process.env.SAZABI_TOKEN?.trim()||r.token?.trim();if(!c)return[];let s=On({globalUrl:r.apiBaseUrl,globalDomain:r.apiDomain,buildUrlFromDomain:(u)=>`https://api.${u}`,defaultUrl:"https://api.sazabi.com"}),h=Gn({token:c,baseUrl:s,organizationId:r.activeOrganizationId,projectId:r.activeProjectId});return(await Promise.race([i(h),new Promise((u)=>setTimeout(()=>u([]),wfe))])).filter((u)=>u.value.startsWith(n))}catch{return[]}};var eX=d(()=>{Hc();se();Yt();ffe={threads:{get:async(e)=>{let t=await e.threads.list({limit:20});if(!t.success)return[];return t.value.threads.map((n)=>({value:n.id,description:n.title??void 0}))}},projects:{use:async(e)=>{let t=await e.projects.list();if(!t.success)return[];return t.value.projects.map((n)=>({value:n.id,description:n.name}))}},organizations:{use:async(e)=>{let t=await e.organizations.list();if(!t.success)return[];return t.value.organizations.map((n)=>({value:n.id,description:n.name}))},rename:async(e)=>{let t=await e.organizations.list();if(!t.success)return[];return t.value.organizations.map((n)=>({value:n.id,description:n.name}))}},"public-keys":{get:gO,update:gO,deactivate:gO},"secret-keys":{get:yO,update:yO,delete:yO},"data-sources":{get:ls,rename:ls,enable:ls,disable:ls,delete:ls},members:{"update-role":QZ,remove:QZ}}});var nX={};gn(nX,{parseCompletionContext:()=>Sfe,getCompletions:()=>Pfe});var vfe,kfe,Sfe=(e)=>{let t=e.length>0?e:[""],n=t.length-1,i=t[n]??"";return{words:t,currentIndex:n,partial:i}},Pfe=async(e)=>{let{words:t,currentIndex:n,partial:i}=e,o=t[n-1];if(o==="--profile")return Afe(i);let r=Ofe(t),c=Math.max(0,r.length-(t.length-n));if(c===0)return Ife(i);let s=r[0]??"",h=rg(s);if(!h)return[];if(c===1&&h.subcommands){if(i.startsWith("-"))return tX(h.options,r);return $fe(h,i)}let l=h.subcommands?r[1]:void 0,g=(l?h.subcommands?.[l]:void 0)?.options??h.options;if(i.startsWith("-"))return tX(g,r);if(o?.startsWith("--")){let y=o.slice(2);if(g?.[y]?.type==="string"){let w=`${s}:${l??""}`,v=kfe[w]?.[y]??vfe[y];if(v)return v.filter((P)=>P.startsWith(i)).map((P)=>({value:P}));return[]}}return VZ(s,l??"",i)},Ife=(e)=>{let n=ss().filter((o)=>o.name.startsWith(e)).map((o)=>({value:o.name,description:o.description})),i=[{value:"--help",description:"Show help"},{value:"--version",description:"Show version"},{value:"--profile",description:"Use a named profile"}];for(let o of i)if(o.value.startsWith(e))n.push(o);return n},$fe=(e,t)=>{if(!e.subcommands)return[];return Object.values(e.subcommands).filter((n)=>n.name.startsWith(t)).map((n)=>({value:n.name,description:n.description}))},tX=(e,t)=>{let n=t[t.length-1]??"",i=new Set(t.filter((r)=>r.startsWith("--")).map((r)=>r.replace(/=.*/,""))),o=[];if(!i.has("--help")&&"--help".startsWith(n))o.push({value:"--help",description:"Show help"});if(!i.has("--profile")&&"--profile".startsWith(n))o.push({value:"--profile",description:"Use a named profile"});if(!e)return o;for(let[r,c]of Object.entries(e)){let s=`--${r}`;if(i.has(s))continue;if(!s.startsWith(n))continue;o.push({value:s,description:c.description})}return o},Ofe=(e)=>{let t=[];for(let n=0;n<e.length;n++){let i=e[n];if(i==="--profile"&&n+1<e.length)n++;else if(i.startsWith("--profile="));else t.push(i)}return t},Afe=(e)=>{try{let t=xe();if(!t.success)return[];return Object.keys(t.value.profiles).filter((n)=>n.startsWith(e)).map((n)=>({value:n,description:n===t.value.activeProfile?"active":void 0}))}catch{return[]}};var oX=d(()=>{hO();Yt();eX();vfe={status:["regular","archived"],format:["json","text"]},kfe={"members:update-role":{role:["admin","member"]},"messages:search":{role:["user","assistant"]},"messages:list":{role:["user","assistant"]}}});te();te();te();import{parseArgs as zX}from"node:util";var O=(e,t,n={})=>{let i=zX({args:e,options:t,allowPositionals:Boolean(n.allowPositionals),strict:!1,tokens:!0}),o=Object.hasOwn(t,"json")&&i.values.json===!0,r=new Set(Object.keys(t)),c=new Set(Object.entries(t).map(([,h])=>h.short).filter((h)=>Boolean(h))),s=[];if(Array.isArray(i.tokens))for(let h of i.tokens){if(h.kind!=="option")continue;let l=h.name,u=l.length>1;if(!(r.has(l)||!u&&c.has(l))){let y=u?`--${l}`:`-${l}`;if(!s.includes(y))s.push(y)}}for(let h of Object.keys(i.values))if(!r.has(h)){let l=h.length>1?`--${h}`:`-${h}`;if(!s.includes(l))s.push(l)}if(s.length>0){let h=`Unknown option${s.length>1?"s":""}: ${s.join(", ")}. Run the command with -h for usage.`;if(o)m(h);p(h)}for(let[h,l]of Object.entries(t))if(l.type==="string"&&i.values[h]===!0){let u=h.length===1?`-${h}`:`--${h}`,g=`Option ${u} requires a value. Use '${u} <value>'.`;if(o)m(g);p(g)}for(let[h,l]of Object.entries(t)){let u=i.values[h];if(l.type==="string"&&typeof u==="string"){if(u.startsWith("--")||u.length===2&&u[0]==="-"&&/[a-zA-Z]/.test(u.charAt(1))){let b=`Option ${h.length===1?`-${h}`:`--${h}`} received "${u}" as its value. Did you forget to provide a value?`;if(o)m(b);p(b)}}}return{values:i.values,positionals:i.positionals}};var bs=(e,t)=>{if(e?.json?.type!=="boolean")throw Error(`${t} must include a boolean --json option (enforced by CommandBuilder)`)};class CO{name;description;handler;subcommands;options;examples;positionalArgs;allowNoJson=!1;constructor(e,t,n){this.name=e,this.description=t,this.handler=n}withOptions(e){return this.options=e,this}withSubcommands(e){return this.subcommands=e,this}withExamples(e){return this.examples=e,this}withPositionalArgs(e){return this.positionalArgs=e,this}build(){if(!this.handler&&!this.subcommands)throw Error(`Subcommand "${this.name}" must have either a handler or subcommands`);if(!this.allowNoJson&&this.handler)bs(this.options,`Subcommand "${this.name}"`);if(!this.allowNoJson&&this.subcommands){for(let[e,t]of Object.entries(this.subcommands))if(!t.subcommands)bs(t.options,`Subcommand "${this.name} ${e}"`)}return{name:this.name,description:this.description,handler:this.handler,subcommands:this.subcommands,options:this.options,examples:this.examples,positionalArgs:this.positionalArgs}}allowWithoutJson(){return this.allowNoJson=!0,this}}class zO{name;description;handler;subcommands;options;examples;positionalArgs;allowNoJson=!1;constructor(e,t){this.name=e,this.description=t}withHandler(e){return this.handler=e,this}withSubcommands(e){return this.subcommands=e,this}withOptions(e){return this.options=e,this}withExamples(e){return this.examples=e,this}withPositionalArgs(e){return this.positionalArgs=e,this}build(){if(!this.handler&&!this.subcommands)throw Error(`Command "${this.name}" must have either a handler or subcommands`);if(!this.allowNoJson){if(this.handler)bs(this.options,`Command "${this.name}"`);if(this.subcommands)for(let[e,t]of Object.entries(this.subcommands)){if(t.subcommands)continue;bs(t.options,`Subcommand "${this.name} ${e}"`)}}return{name:this.name,description:this.description,handler:this.handler,subcommands:this.subcommands,options:this.options,examples:this.examples,positionalArgs:this.positionalArgs}}allowWithoutJson(){return this.allowNoJson=!0,this}}var V=(e,t)=>{return new zO(e,t)},$=(e,t,n)=>{return new CO(e,t,n)};te();var ht=(e,t,n,i,o)=>{let r=Number.parseInt(e,10);if(Number.isNaN(r)||r<t||r>n){let c=`${i} must be between ${t} and ${n}.`;if(o)return m(c);return p(c)}return r},Lt=(e,t,n,i)=>{if(!t.includes(e)){let o=t.map((c)=>`"${c}"`).join(" or "),r=`${n} must be ${o}.`;if(i)return m(r);return p(r)}return e};te();se();re();var E$=(e)=>{let t=[];for(let n of e){let i=0;for(let o of n.content){if(o.type!=="artifact")continue;t.push({id:`${n.id}:${i}`,messageId:n.id,name:o.name,toolCallId:o.toolCallId??null,createdAt:n.createdAt,data:o.data}),i+=1}}return t},OW=(e)=>{let t=e.lastIndexOf(":");if(t<=0||t===e.length-1)return null;let n=e.slice(0,t),i=e.slice(t+1);if(!/^\d+$/.test(i))return null;return{messageId:n,index:Number.parseInt(i,10)}},AW=(e,t)=>{return E$(e).find((n)=>n.id===t)},M$=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),$W=(e)=>{let t=e===null||e===void 0?"":typeof e==="object"?JSON.stringify(e):String(e);if(/[",\n\r]/.test(t))return`"${t.replace(/"/g,'""')}"`;return t},qde=(e)=>{if(Array.isArray(e)&&e.every(M$))return e;if(M$(e))for(let t of["rows","data","items","points"]){let n=e[t];if(Array.isArray(n)&&n.every(M$))return n}return null},TW=(e)=>{let t=qde(e);if(!t||t.length===0)return null;let n=[];for(let o of t)for(let r of Object.keys(o))if(!n.includes(r))n.push(r);if(n.length===0)return null;let i=[n.map($W).join(",")];for(let o of t)i.push(n.map((r)=>$W(o[r])).join(","));return i.join(`
8399
8399
  `)};var Jde=100,LW=100,Bde=async(e,t,n)=>{let i=[],o;for(let r=0;r<LW;r++){let c=await e.messages.list(t,{limit:Jde,...o?{cursor:o}:{}}),s=f(c,"Couldn't get artifact (check the thread ID and try again)",n);if(i.push(...s.messages),!s.nextCursor)break;o=s.nextCursor}if(o&&!n)console.error(`Warning: reached the ${LW}-page limit; the artifact may exist beyond the scanned messages.`);return i},Hde=(e,t,n)=>{if(t)return t;let i=`--thread-id is required to locate artifact '${e}'. Usage: sazabi artifacts get <artifact-id> --thread-id <thread-id>`;if(n)m(i);else p(i);return},Wde=(e,t)=>{if(t.json){X({id:e.id,messageId:e.messageId,name:e.name,toolCallId:e.toolCallId,createdAt:e.createdAt,data:e.data});return}if(t.format==="csv"){let n=TW(e.data);if(n===null){p(`Artifact '${e.id}' (${e.name}) has no embedded rows to render as CSV. Built-in table/timeseries artifacts persist query parameters rather than result rows, so only artifacts that embed their data (such as custom artifacts) can be exported as CSV. Use --json or the default output to inspect this artifact.`);return}console.log(n);return}console.log(JSON.stringify(e.data,null,2))},DW=async(e,t)=>{if(!OW(e)){let h=`Invalid artifact ID: '${e}'. Expected format '<message-id>:<index>' (from 'sazabi artifacts list').`;if(t.json)return m(h);return p(h)}let i=Hde(e,t.threadId,t.json);if(!i)return;let o=C({tokenFlag:t.token,jsonMode:t.json}),r=z({token:o.token,projectId:o.projectId,apiBaseUrlFlag:t.apiBaseUrl}),c=await Bde(r,i,t.json),s=AW(c,e);if(!s){let h=`Artifact '${e}' not found in thread '${i}'. Run 'sazabi artifacts list --thread-id ${i}' to see available artifacts.`;if(t.json)return m(h);return p(h)}Wde(s,t)};te();se();re();var Fde={id:{label:"ID",type:{kind:"string"}},name:{label:"Type",type:{kind:"string"}},toolCallId:{label:"Tool call",type:{kind:"nullable-string",emptyLabel:"(none)"}},createdAt:{label:"Created",type:{kind:"date"}}},Zde={schema:Fde,columns:["id","name","toolCallId","createdAt"],header:"Artifacts",emptyMessage:"No artifacts found in this thread."},Xde=100,CW=100,Yde=async(e,t,n)=>{let i=[],o;for(let r=0;r<CW;r++){let c=await e.messages.list(t,{limit:Xde,...o?{cursor:o}:{}}),s=f(c,"Couldn't list artifacts (check the thread ID and try again)",n);if(i.push(...s.messages),!s.nextCursor)break;o=s.nextCursor}if(o&&!n)console.error(`Warning: reached the ${CW}-page limit; artifact list may be incomplete for this thread.`);return i},zW=async(e)=>{let t=C({tokenFlag:e.token,jsonMode:e.json}),n=z({token:t.token,projectId:t.projectId,apiBaseUrlFlag:e.apiBaseUrl}),i=await Yde(n,e.threadId,e.json),r=E$(i).map((c)=>({id:c.id,name:c.name,toolCallId:c.toolCallId,createdAt:c.createdAt}));W(Zde,r,{json:e.json})};var _W=V("artifacts","Retrieve artifacts produced in a thread").withSubcommands({list:$("list","List artifacts produced in a thread",async(e)=>{let{values:t}=O(e,{token:{type:"string"},"thread-id":{type:"string"},json:{type:"boolean"},"api-base-url":{type:"string"}}),n=t["thread-id"];if(!n){if(t.json)return m("--thread-id is required. Usage: sazabi artifacts list --thread-id <thread-id>");return p("--thread-id is required. Usage: sazabi artifacts list --thread-id <thread-id>")}await zW({threadId:n,token:t.token,json:t.json,apiBaseUrl:t["api-base-url"]})}).withOptions({token:{type:"string",description:"Override authentication token"},"thread-id":{type:"string",description:"Thread to list artifacts for (required)"},json:{type:"boolean",description:"Output as JSON"},"api-base-url":{type:"string",description:"Override API base URL"}}).withExamples(["sazabi artifacts list --thread-id <thread-id> # List artifacts in a thread","sazabi artifacts list --thread-id <thread-id> --json # Output as JSON"]).build(),get:$("get","Get a single artifact's data",async(e)=>{let{values:t,positionals:n}=O(e,{token:{type:"string"},"thread-id":{type:"string"},format:{type:"string"},json:{type:"boolean"},"api-base-url":{type:"string"}},{allowPositionals:!0}),i=n[0];if(!i){if(t.json)return m("Artifact ID is required. Usage: sazabi artifacts get <artifact-id> --thread-id <thread-id>");return p("Artifact ID is required. Usage: sazabi artifacts get <artifact-id> --thread-id <thread-id>")}if(n.length>1){let r=n.slice(1).join(", ");if(t.json)return m(`Unexpected arguments: ${r}.`);return p(`Unexpected arguments: ${r}.`)}let o;if(t.format)o=Lt(t.format,["json","csv"],"Format",t.json);await DW(i,{token:t.token,threadId:t["thread-id"],format:o,json:t.json,apiBaseUrl:t["api-base-url"]})}).withPositionalArgs("<artifact-id>").withOptions({token:{type:"string",description:"Override authentication token"},"thread-id":{type:"string",description:"Thread the artifact belongs to (required)"},format:{type:"string",description:"Output format for non-JSON mode: json (default) or csv"},json:{type:"boolean",description:"Output as JSON"},"api-base-url":{type:"string",description:"Override API base URL"}}).withExamples(["sazabi artifacts get <artifact-id> --thread-id <thread-id> # Print artifact data","sazabi artifacts get <artifact-id> --thread-id <thread-id> --format csv # Render table/timeseries as CSV","sazabi artifacts get <artifact-id> --thread-id <thread-id> --json # Output as JSON"]).build()}).withExamples(["sazabi artifacts list --thread-id <thread-id> # List artifacts in a thread","sazabi artifacts get <artifact-id> --thread-id <thread-id> # Get one artifact's data"]).build();te();_$();import{spawn as Qde}from"node:child_process";var G={token:{type:"string"},"api-base-url":{type:"string"},json:{type:"boolean"}},K={token:{type:"string",description:"Override token"},"api-base-url":{type:"string",description:"Override API base URL"},json:{type:"boolean",description:"Output as JSON"}};se();re();Yt();var _r=(e)=>{if(e==="flag")return"from flag";if(e==="environment")return"from environment";return"from settings"},Vde=async(e={})=>{let t=C({jsonMode:e.json}),n=z({token:t.token,organizationId:t.organizationId,projectId:t.projectId,apiBaseUrlFlag:e.apiBaseUrl,jsonMode:e.json}),i=f(await n.me(),"Couldn't fetch authentication details (run 'sazabi auth login' to sign in again)",e.json);if(e.json){X({credential:i,activeOrganizationId:t.organizationId,activeProjectId:t.projectId,tokenSource:t.tokenSource,organizationSource:t.organizationSource,projectSource:t.projectSource});return}if(Se("Authentication"),i.credentialType==="user"){Pe({Type:`User token (${_r(t.tokenSource)})`,User:i.user.name??i.user.email,Email:i.user.email,"Active organization":t.organizationId&&t.organizationSource?`${t.organizationId} (${_r(t.organizationSource)})`:st("(none)"),"Active project":t.projectId&&t.projectSource?`${t.projectId} (${_r(t.projectSource)})`:st("(none)"),Organizations:i.organizations.length.toString(),"Dashboard URL":zr()});return}if(i.credentialType==="secret"){Pe({Type:`Secret key (${_r(t.tokenSource)})`,Organization:i.organization.name,"Key name":i.keyName,"Active project":t.projectId&&t.projectSource?`${t.projectId} (${_r(t.projectSource)})`:st("(none)"),"Dashboard URL":zr()});return}Pe({Type:`Partner key (${_r(t.tokenSource)})`,Superorganization:i.superorganization.name,"Dashboard URL":zr()})},ege=async(e,t={})=>{let n=e.trim();if(!n){if(t.json)return m("Token is required.");return p("Token is required.")}let i=f(xe(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",t.json);await K$({token:n,options:t,cliSettings:i,status:"saved"})},jW=(e)=>{let t=process.platform,n,i;if(t==="darwin")n="open",i=[e];else if(t==="win32")n="cmd",i=["/c","start","",e];else n="xdg-open",i=[e];let o=Qde(n,i,{detached:!0,stdio:"ignore"});o.on("error",()=>{}),o.unref()},NW=(e)=>new Promise((t)=>setTimeout(t,e)),tge=async(e={})=>{let t=f(xe(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",e.json),n=$n(t),i=t.profiles[n]??{},o=G$(i,e.apiBaseUrl),r=RW(o,e.authBaseUrl??i.authBaseUrl),c;try{c=await C$({apiBaseUrl:r})}catch(y){let b=y instanceof Error?y.message:String(y);if(e.json)return m(`Failed to initiate sign-up: ${b}`);return p(`Failed to initiate sign-up: ${b}`)}let s=UW({profile:i,publicApiBaseUrl:o,authBaseUrl:r,apiBaseUrlOverride:e.apiBaseUrl,authBaseUrlOverride:e.authBaseUrl,webBaseUrlOverride:e.webBaseUrl,verificationUriComplete:c.verificationUriComplete}),h=`/login/cli?user_code=${encodeURIComponent(c.userCode)}`,l=`${s}/sign-up?returnTo=${encodeURIComponent(h)}`,u=new Date(Date.now()+c.expiresIn*1000),g=c.interval*1000;if(!e.json)le(),Se("Create a Sazabi account"),le(),yn(`Opening ${ze.info(l)}`),le(),jW(l),he("Waiting for sign-up to complete...");while(new Date<u){await NW(g);try{let y=await z$({apiBaseUrl:r,deviceCode:c.deviceCode});if(y.status==="pending"){g=(y.interval??c.interval)*1000;continue}if(y.status==="denied"){if(e.json)return m("Sign-up was denied.");return le(),p("Sign-up was denied.")}if(y.status==="expired"){if(e.json)return m("Sign-up request expired. Try again.");return le(),p("Sign-up request expired. Try again.")}await K$({token:y.accessToken,options:e,cliSettings:t,status:"authorized"});return}catch(y){let b=y instanceof Error?y.message:String(y);if(e.json)return m(`Sign-up failed: ${b}`);return le(),p(`Sign-up failed: ${b}`)}}if(e.json)return m("Sign-up request expired. Try again.");return le(),p("Sign-up request expired. Try again.")},nge=async(e={})=>{let t=f(xe(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",e.json),n=$n(t),i=t.profiles[n]??{},o=G$(i,e.apiBaseUrl),r=RW(o,e.authBaseUrl??i.authBaseUrl),c;try{c=await C$({apiBaseUrl:r})}catch(g){let y=g instanceof Error?g.message:String(g);if(e.json)return m(`Failed to initiate login: ${y}`);return p(`Failed to initiate login: ${y}`)}let s=UW({profile:i,publicApiBaseUrl:o,authBaseUrl:r,apiBaseUrlOverride:e.apiBaseUrl,authBaseUrlOverride:e.authBaseUrl,webBaseUrlOverride:e.webBaseUrl,verificationUriComplete:c.verificationUriComplete}),h=lge(c.verificationUriComplete,s),l=new Date(Date.now()+c.expiresIn*1000),u=c.interval*1000;if(!e.json)le(),Se("Sign in to Sazabi"),le(),yn("Enter this code in your browser:"),le(),yn(ze.bold(c.userCode),4),le(),yn(`Opening ${ze.info(h)}`),le(),jW(h),he("Waiting for authorization...");while(new Date<l){await NW(u);try{let g=await z$({apiBaseUrl:r,deviceCode:c.deviceCode});if(g.status==="pending"){u=(g.interval??c.interval)*1000;continue}if(g.status==="denied"){if(e.json)return m("Authorization was denied.");return le(),p("Authorization was denied.")}if(g.status==="expired"){if(e.json)return m("Authorization request expired. Try again.");return le(),p("Authorization request expired. Try again.")}await K$({token:g.accessToken,options:e,cliSettings:t,status:"authorized"});return}catch(g){let y=g instanceof Error?g.message:String(g);if(e.json)return m(`Authorization failed: ${y}`);return le(),p(`Authorization failed: ${y}`)}}if(e.json)return m("Authorization request expired. Try again.");return le(),p("Authorization request expired. Try again.")},oge=(e)=>{let t=f(xe(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",e.json),n=f(Nt(t),"Couldn't resolve profile (run 'sazabi profiles list' to see available profiles)",e.json),i=Boolean(n.token),o=f(Rt(t,{token:void 0,activeOrganizationId:void 0,organizationName:void 0,activeProjectId:void 0,...Bn(n)}),"Failed to update profile",e.json);if(f(Ze(o),"Failed to remove credentials",e.json),e.json){X({removed:i});return}if(i){Q("Signed out.");return}he("No credentials were saved.")},K$=async({token:e,options:t,cliSettings:n,status:i})=>{let o=$n(n),r=n.profiles[o]??{},c=G$(r,t.apiBaseUrl),s=z({token:e,apiBaseUrlFlag:t.apiBaseUrl,jsonMode:t.json}),h=f(await s.me(),`Couldn't resolve authenticated context at ${c} (pass --api-base-url to target a different environment)`,t.json);if(i==="authorized"&&h.credentialType!=="user"){if(t.json)return m("Expected a user session from device authorization.");return p("Expected a user session from device authorization.")}let l=n.profiles[o]?n:{...n,profiles:{...n.profiles,[o]:{}}},u=l.profiles[o],g=await ige({client:s,credential:h,currentProjectId:u.activeProjectId,jsonMode:t.json}),y=u.token!==e||u.activeOrganizationId!==g.activeOrganizationId||u.activeProjectId!==g.activeProjectId,b=f(Rt(l,{token:e,activeOrganizationId:g.activeOrganizationId,organizationName:g.activeOrganizationName,activeProjectId:g.activeProjectId,apiBaseUrl:t.apiBaseUrl??u.apiBaseUrl,authBaseUrl:t.authBaseUrl??u.authBaseUrl,webBaseUrl:t.webBaseUrl??u.webBaseUrl,...y&&Bn(u)}),"Failed to update profile",t.json);if(f(Ze(b),"Failed to save credentials",t.json),t.json){X({status:i,credential:h,activeOrganizationId:g.activeOrganizationId,activeProjectId:g.activeProjectId,projects:g.projects});return}if(le(),Q(i==="authorized"?"Signed in.":"Token saved."),le(),age({credential:h,activeOrganizationName:g.activeOrganizationName,activeProjectId:g.activeProjectId,projects:g.projects}),g.projects.length>0){le(),Se("Available projects");for(let w of g.projects){let P=w.id===g.activeProjectId?ze.success(" (active)"):"";yn(`${w.name} (${w.region})${P}`)}}},ige=async({client:e,credential:t,currentProjectId:n,jsonMode:i})=>{if(t.credentialType==="partner")return{projects:[]};let o=t.credentialType==="user"?t.activeOrganizationId??t.organizations[0]?.id:t.organization.id,r=t.credentialType==="user"?t.organizations.find((s)=>s.id===o)?.name:t.organization.name,c=o?f(await e.projects.list({organizationId:o}),"Couldn't fetch projects (check your organization access and try again)",i).projects:[];return{activeOrganizationId:o,activeOrganizationName:r,activeProjectId:rge(c,n),projects:c}},rge=(e,t)=>{if(t&&e.some((n)=>n.id===t))return t;return e[0]?.id},age=({credential:e,activeOrganizationName:t,activeProjectId:n,projects:i})=>{if(e.credentialType==="user"){Pe({Type:"User token",User:e.user.name??e.user.email,Organizations:e.organizations.length.toString(),"Active organization":t??"(none)","Active project":i.find((o)=>o.id===n)?.name??"(none)"});return}if(e.credentialType==="secret"){Pe({Type:"Secret key",Organization:e.organization.name,"Key name":e.keyName,"Active project":i.find((o)=>o.id===n)?.name??"(none)"});return}Pe({Type:"Partner key",Superorganization:e.superorganization.name})},G$=(e,t)=>{return On({cliFlag:t,globalUrl:e.apiBaseUrl,globalDomain:e.apiDomain,buildUrlFromDomain:(n)=>`https://api.${n}`,defaultUrl:"https://api.sazabi.com"})},RW=(e,t)=>{if(t)return t;try{let n=new URL(e);if(["localhost","127.0.0.1"].includes(n.hostname)&&["15005","15009"].includes(n.port))return n.port="15001",n.toString().replace(/\/$/,"");if(n.hostname==="api.sazabi.com")return n.hostname="api.platform.sazabi.com",n.toString().replace(/\/$/,"");if(n.hostname==="api.staging.sazabi.dev")return n.hostname="api.platform.staging.sazabi.dev",n.toString().replace(/\/$/,"");return n.toString().replace(/\/$/,"")}catch{return e}},xW=(e)=>e.replace(/\/+$/,""),xt=(e)=>(e?.trim().length??0)>0,cge=(e)=>{if(!xt(e))return;try{let t=new URL(e);return`${t.protocol}//${t.host}`}catch{return}},jr=(e)=>{if(!xt(e))return;try{let n=new URL(e).hostname.toLowerCase();if(["localhost","127.0.0.1"].includes(n))return"https://localhost:5173";if(["api.staging.sazabi.dev","api.platform.staging.sazabi.dev"].includes(n))return"https://app.staging.sazabi.dev";if(["api.sazabi.com","api.platform.sazabi.com"].includes(n))return"https://app.sazabi.com"}catch{return}return},sge=(e)=>{if(xt(e.webBaseUrl))return xW(e.webBaseUrl);if(xt(e.webDomain))return Md(e.webDomain);return},hge=({profile:e,publicApiBaseUrl:t})=>{if(!(xt(e.authBaseUrl)||xt(e.apiBaseUrl)||xt(e.apiDomain)))return;if(xt(e.authBaseUrl)){let i=jr(e.authBaseUrl);if(i)return i}return jr(t)},UW=({profile:e,publicApiBaseUrl:t,authBaseUrl:n,apiBaseUrlOverride:i,authBaseUrlOverride:o,webBaseUrlOverride:r,verificationUriComplete:c})=>{if(xt(r))return xW(r);let s=process.env.SAZABI_API_URL?.trim(),h=xt(o)||xt(i)||xt(s),l=cge(c);if(h){let y=xt(o)?jr(n):jr(t);if(y)return y;if(l)return l}let u=sge(e);if(u)return u;let g=hge({profile:e,publicApiBaseUrl:t});if(g)return g;if(l)return l;return"https://app.sazabi.com"},lge=(e,t)=>{if(!t)return e;try{let n=new URL(e),i=new URL(t);return n.protocol=i.protocol,n.host=i.host,n.toString()}catch{return e}},MW=V("auth","Manage authentication credentials").withSubcommands({signup:$("signup","Create a new Sazabi account via browser",async(e)=>{let{values:t,positionals:n}=O(e,{...G,"auth-base-url":{type:"string"},"web-base-url":{type:"string"}},{allowPositionals:!0});if(n.length>0){let i=n.join(", ");if(t.json)return m(`Unexpected arguments: ${i}.`);return p(`Unexpected arguments: ${i}.`)}await tge({json:t.json,apiBaseUrl:t["api-base-url"],authBaseUrl:t["auth-base-url"],webBaseUrl:t["web-base-url"]})}).withOptions({...K,"auth-base-url":{type:"string",description:"Override auth API base URL"},"web-base-url":{type:"string",description:"Override web app base URL"}}).withExamples(["sazabi auth signup # Create a new account via browser"]).build(),login:$("login","Authenticate via browser",async(e)=>{let{values:t,positionals:n}=O(e,{...G,"auth-base-url":{type:"string"},"web-base-url":{type:"string"}},{allowPositionals:!0});if(n.length>0){let i=n.join(", ");if(t.json)return m(`Unexpected arguments: ${i}.`);return p(`Unexpected arguments: ${i}.`)}await nge({json:t.json,apiBaseUrl:t["api-base-url"],authBaseUrl:t["auth-base-url"],webBaseUrl:t["web-base-url"]})}).withOptions({...K,"auth-base-url":{type:"string",description:"Override auth API base URL"},"web-base-url":{type:"string",description:"Override web app base URL"}}).withExamples(["sazabi auth login # Authenticate via browser"]).build(),save:$("save","Save an existing bearer token",async(e)=>{let{values:t,positionals:n}=O(e,{...G,"web-base-url":{type:"string"}},{allowPositionals:!0}),i=n[0];if(!i){if(t.json)return m("Token is required.");return p("Token is required.")}if(n.length>1){let o=n.slice(1).join(", ");if(t.json)return m(`Unexpected arguments: ${o}.`);return p(`Unexpected arguments: ${o}.`)}await ege(i,{json:t.json,apiBaseUrl:t["api-base-url"],webBaseUrl:t["web-base-url"]})}).withPositionalArgs("<token>").withOptions({...K,"web-base-url":{type:"string",description:"Override web app base URL"}}).withExamples(["sazabi auth save sazabi_secret_xxx # Save a secret key for future commands"]).build(),logout:$("logout","Remove saved credentials",async(e)=>{let{values:t,positionals:n}=O(e,G,{allowPositionals:!0});if(n.length>0){let i=n.join(", ");if(t.json)return m(`Unexpected arguments: ${i}.`);return p(`Unexpected arguments: ${i}.`)}oge({json:t.json})}).withOptions(K).withExamples(["sazabi auth logout # Remove saved credentials"]).build(),whoami:$("whoami","Display current authentication context",async(e)=>{let{values:t,positionals:n}=O(e,G,{allowPositionals:!0});if(n.length>0){let i=n.join(", ");if(t.json)return m(`Unexpected arguments: ${i}.`);return p(`Unexpected arguments: ${i}.`)}await Vde({json:t.json,apiBaseUrl:t["api-base-url"]})}).withOptions(K).withExamples(["sazabi auth whoami # Show current context","sazabi auth whoami --json # Output as JSON"]).build()}).withExamples(["sazabi auth signup # Create a new account via browser","sazabi auth login # Authenticate via browser","sazabi auth save sazabi_secret_xxx # Save an existing token","sazabi auth logout # Remove saved credentials","sazabi auth whoami # Show current context"]).build();te();se();re();var Wc=(e)=>({id:e.id,name:e.name,status:e.enabled?"active":"paused",source:e.source,kind:e.kind,health:e.health,cronExpression:e.cronExpression,timezone:e.timezone,timeoutSeconds:e.timeoutSeconds,successRate:e.successRate,runCount:e.runCount,failedRunCount:e.failedRunCount,lastRunStatus:e.lastRun?.status??null,lastRunAt:e.lastRun?.startedAt??null,scriptIdentifier:"scriptIdentifier"in e?e.scriptIdentifier:null,scriptId:"scriptId"in e?e.scriptId:null,scriptName:"scriptName"in e?e.scriptName:null,canToggle:"canToggle"in e?e.canToggle:null,createdAt:"createdAt"in e?e.createdAt:null,updatedAt:"updatedAt"in e?e.updatedAt:null}),KW={id:{label:"ID",type:{kind:"id"}},url:{label:"URL",type:{kind:"nullable-string"}},name:{label:"Name",type:{kind:"string"}},status:{label:"Status",type:{kind:"custom",render:(e)=>e==="active"?"Enabled":"Disabled",serialize:(e)=>e}},source:{label:"Source",type:{kind:"string"}},kind:{label:"Kind",type:{kind:"string"}},health:{label:"Health",type:{kind:"string"}},cronExpression:{label:"Cron",type:{kind:"nullable-string",emptyLabel:"(n/a)"}},timezone:{label:"Timezone",type:{kind:"string"}},timeoutSeconds:{label:"Timeout (s)",type:{kind:"custom",render:(e)=>e==null?"(none)":String(e),serialize:(e)=>e}},successRate:{label:"Success rate",type:{kind:"custom",render:(e)=>e==null?"(n/a)":`${Math.round(Number(e)*100)}%`,serialize:(e)=>e}},runCount:{label:"Runs (7d)",type:{kind:"number"}},failedRunCount:{label:"Failures (7d)",type:{kind:"number"}},lastRunStatus:{label:"Last run status",type:{kind:"nullable-string",emptyLabel:"(never)"}},lastRunAt:{label:"Last run",type:{kind:"nullable-date",emptyLabel:"(never)"}},scriptIdentifier:{label:"Script",type:{kind:"nullable-string"}},scriptId:{label:"Script ID",type:{kind:"nullable-string"}},scriptName:{label:"Script name",type:{kind:"nullable-string"}},canToggle:{label:"Can toggle",type:{kind:"custom",render:(e)=>e==null?"(n/a)":e?"yes":"no",serialize:(e)=>e}},createdAt:{label:"Created at",type:{kind:"nullable-date"}},updatedAt:{label:"Updated at",type:{kind:"nullable-date"}}},uge={schema:KW,columns:["name","status","health","cronExpression","lastRunAt"],jsonFields:["id","name","status","source","kind","health","cronExpression","timezone","timeoutSeconds","successRate","runCount","failedRunCount","lastRunStatus","lastRunAt"],header:"Automations",emptyMessage:"No automations found."},Kd={layout:"field-list",schema:KW,fields:["id","url","name","status","source","kind","health","cronExpression","timezone","timeoutSeconds","successRate","runCount","failedRunCount","lastRunStatus","lastRunAt","scriptIdentifier","scriptId","scriptName","canToggle","createdAt","updatedAt"],title:"Automation"},GW=(e)=>({id:e.id,automationRunKey:e.automationRunKey,status:e.status,scheduledAt:e.scheduledAt,dueAt:e.dueAt,startedAt:e.startedAt,completedAt:e.completedAt,durationMs:e.durationMs,exitCode:e.exitCode,errorMessage:e.errorMessage,automationId:"automationId"in e?e.automationId:null}),qW={id:{label:"ID",type:{kind:"id"}},automationId:{label:"Automation",type:{kind:"nullable-string"}},automationRunKey:{label:"Run key",type:{kind:"string"}},status:{label:"Status",type:{kind:"string"}},scheduledAt:{label:"Scheduled at",type:{kind:"nullable-date"}},dueAt:{label:"Due at",type:{kind:"nullable-date"}},startedAt:{label:"Started at",type:{kind:"date"}},completedAt:{label:"Completed at",type:{kind:"nullable-date"}},durationMs:{label:"Duration (ms)",type:{kind:"custom",render:(e)=>e==null?"(n/a)":String(e),serialize:(e)=>e}},exitCode:{label:"Exit code",type:{kind:"custom",render:(e)=>e==null?"(n/a)":String(e),serialize:(e)=>e}},errorMessage:{label:"Error",type:{kind:"nullable-string",emptyLabel:"(none)"}}},dge={schema:qW,columns:["status","startedAt","durationMs","exitCode"],jsonFields:["id","automationRunKey","status","scheduledAt","dueAt","startedAt","completedAt","durationMs","exitCode","errorMessage"],header:"Automation runs",emptyMessage:"No automation runs found."},gge={layout:"field-list",schema:qW,fields:["id","automationId","automationRunKey","status","scheduledAt","dueAt","startedAt","completedAt","durationMs","exitCode","errorMessage"],title:"Automation run"},yge=(e)=>({status:e.status,exitCode:e.exitCode,truncated:e.truncated,durationMs:e.durationMs,startedAt:e.startedAt,completedAt:e.completedAt,stdout:e.stdout,stderr:e.stderr}),bge={status:{label:"Status",type:{kind:"string"}},exitCode:{label:"Exit code",type:{kind:"custom",render:(e)=>e==null?"(n/a)":String(e),serialize:(e)=>e}},truncated:{label:"Truncated",type:{kind:"custom",render:(e)=>e?"yes":"no",serialize:(e)=>e}},durationMs:{label:"Duration (ms)",type:{kind:"custom",render:(e)=>e==null?"(n/a)":String(e),serialize:(e)=>e}},startedAt:{label:"Started at",type:{kind:"nullable-date"}},completedAt:{label:"Completed at",type:{kind:"nullable-date"}},stdout:{label:"Stdout",type:{kind:"custom",render:(e)=>e?String(e):"(empty)",serialize:(e)=>e}},stderr:{label:"Stderr",type:{kind:"custom",render:(e)=>e?String(e):"(empty)",serialize:(e)=>e}}},mge={layout:"field-list",schema:bge,fields:["status","exitCode","truncated","durationMs","startedAt","completedAt","stdout","stderr"],title:"Automation run logs"},fo=(e)=>{let t=C({tokenFlag:e.token,projectIdFlag:e.projectId,jsonMode:e.json});return{client:z({token:t.token,organizationId:t.organizationId,projectId:t.projectId,apiBaseUrlFlag:e.apiBaseUrl,jsonMode:e.json}),projectId:t.projectId}},Gd=(e,t)=>t?{...e,url:fW(t,e.id)}:e,pge=async(e)=>{let{client:t}=fo(e),n=f(await t.automations.list({search:e.search,status:e.status,source:e.source,health:e.health,sort:e.sort,limit:e.limit,cursor:e.cursor}),"Couldn't list automations (check the active project and try again)",e.json);W(uge,n.automations.map(Wc),{json:e.json,nextCursor:n.nextCursor})},wge=async(e,t)=>{let{client:n,projectId:i}=fo(t),o=f(await n.automations.get(e),"Couldn't get automation (run 'sazabi automations list' to see automation IDs)",t.json);M(Kd,Gd(Wc(o.automation),i),{json:t.json})},fge=async(e,t)=>{let n=t.scriptId!==void 0,i=t.script!==void 0,o=t.expressionId!==void 0,r=Number(n)+Number(i)+Number(o),c=(u)=>{if(t.json){m(u);return}p(u)};if(r!==1){c("Provide exactly one of --script-id, --script, or --expression-id.");return}if(o){if(t.cronExpression!==void 0||t.timezone!==void 0||t.timeoutSeconds!==void 0){c("Cron and timeout flags are not used with --expression-id log-match automations.");return}if(!t.description?.trim()){c("--description is required for log-match automations (investigation instructions).");return}}let{client:s,projectId:h}=fo(t),l=f(await s.automations.create({name:e,...t.description!==void 0?{description:t.description}:{},...t.scriptId!==void 0?{scriptId:t.scriptId}:{},...t.script!==void 0?{script:t.script}:{},...t.expressionId!==void 0?{expressionId:t.expressionId}:{},...t.cronExpression!==void 0?{cronExpression:t.cronExpression}:{},...t.timezone!==void 0?{timezone:t.timezone}:{},...t.timeoutSeconds!==void 0?{timeoutSeconds:t.timeoutSeconds}:{},...t.enabled!==void 0?{enabled:t.enabled}:{}}),o?"Couldn't create log-match automation (check the expression ID and description)":"Couldn't create automation (check the script name/ID and try again)",t.json);if(!t.json)Q(`Automation "${l.automation.name}" created.`);M(Kd,Gd(Wc(l.automation),h),{json:t.json})},vge=async(e,t)=>{if(t.name===void 0&&t.description===void 0&&t.clearDescription!==!0&&t.cronExpression===void 0&&t.timezone===void 0&&t.timeoutSeconds===void 0){if(t.json){m("Nothing to update. Provide --name, --description, --clear-description, --cron-expression, --timezone, or --timeout-seconds.");return}p("Nothing to update. Provide --name, --description, --clear-description, --cron-expression, --timezone, or --timeout-seconds.");return}if(t.description!==void 0&&t.clearDescription===!0){if(t.json){m("Use either --description or --clear-description, not both.");return}p("Use either --description or --clear-description, not both.");return}let{client:n,projectId:i}=fo(t),o=f(await n.automations.update({automationId:e,...t.name!==void 0?{name:t.name}:{},...t.clearDescription?{description:null}:t.description!==void 0?{description:t.description}:{},...t.cronExpression!==void 0?{cronExpression:t.cronExpression}:{},...t.timezone!==void 0?{timezone:t.timezone}:{},...t.timeoutSeconds!==void 0?{timeoutSeconds:t.timeoutSeconds}:{}}),"Couldn't update automation (run 'sazabi automations list' to see automation IDs)",t.json);if(!t.json)Q(`Automation "${o.automation.name}" updated.`);M(Kd,Gd(Wc(o.automation),i),{json:t.json})},JW=async(e,t,n)=>{let{client:i,projectId:o}=fo(n),r=f(t?await i.automations.enable(e):await i.automations.disable(e),t?"Failed to enable automation":"Failed to disable automation",n.json),c=Gd(Wc(r.automation),o);if(!n.json)Q(`Automation "${c.name}" is now ${t?"enabled":"disabled"}.`);M(Kd,c,{json:n.json})},kge=async(e,t)=>JW(e,!0,t),Sge=async(e,t)=>JW(e,!1,t),Pge=async(e,t)=>{let{client:n}=fo(t),i=f(await n.automations.runs.list(e,{status:t.status,limit:t.limit,cursor:t.cursor}),"Couldn't list automation runs (run 'sazabi automations list' to see automation IDs)",t.json);W(dge,i.runs.map(GW),{json:t.json,nextCursor:i.nextCursor})},Ige=async(e,t,n)=>{let{client:i}=fo(n),o=f(await i.automations.runs.get(e,t),"Couldn't get automation run (run 'sazabi automations runs list <automation-id>' to see run IDs)",n.json);M(gge,GW(o.run),{json:n.json})},$ge=async(e,t,n)=>{let{client:i}=fo(n),o=f(await i.automations.runs.logs(e,t),"Couldn't get automation run logs (run 'sazabi automations runs list <automation-id>' to see run IDs)",n.json);M(mge,yge(o.logs),{json:n.json})},Hn={...G,"project-id":{type:"string"}},Wn={...K,"project-id":{type:"string",description:"Override active project ID"}},Oge=(e,t)=>{let n=e[0];if(!n){if(t){m("Automation name is required.");return}p("Automation name is required.");return}return n},Zo=(e,t)=>{let n=e[0];if(!n){if(t){m("Automation ID is required.");return}p("Automation ID is required.");return}return n},EW=(e,t)=>{let n=e[1];if(!n){if(t){m("Run ID is required.");return}p("Run ID is required.");return}return n},BW=V("automations","Manage scheduled automations").withSubcommands({list:$("list","List automations in the active project",async(e)=>{let{values:t}=O(e,{...Hn,search:{type:"string"},status:{type:"string"},source:{type:"string"},health:{type:"string"},sort:{type:"string"},limit:{type:"string"},cursor:{type:"string"}}),n=(u)=>{if(t.json){m(u);return}p(u)},i=t.status;if(i!==void 0&&i!=="active"&&i!=="paused")return n(`Invalid --status value "${i}". Expected "active" or "paused".`);let o=t.source;if(o!==void 0&&o!=="sazabi_managed"&&o!=="custom")return n(`Invalid --source value "${o}". Expected "sazabi_managed" or "custom".`);let r=t.health,c=["healthy","failing","never_run"];if(r!==void 0&&!c.includes(r))return n(`Invalid --health value "${r}". Expected one of: ${c.join(", ")}.`);let s=t.sort,h=["name","last_run","failures","runs"];if(s!==void 0&&!h.includes(s))return n(`Invalid --sort value "${s}". Expected one of: ${h.join(", ")}.`);let l;if(t.limit!==void 0){if(l=Number(t.limit),!Number.isInteger(l)||l<1||l>100)return n(`Invalid --limit value "${t.limit}". Expected an integer between 1 and 100.`)}await pge({token:t.token,projectId:t["project-id"],json:t.json,apiBaseUrl:t["api-base-url"],search:t.search,status:i,source:o,health:r,sort:s,limit:l,cursor:t.cursor})}).withOptions({...Wn,search:{type:"string",description:"Filter by automation name (case-insensitive)"},status:{type:"string",description:"Filter by status: active or paused"},source:{type:"string",description:"Filter by source: sazabi_managed or custom"},health:{type:"string",description:"Filter by health: healthy, failing, or never_run"},sort:{type:"string",description:"Sort by: name, last_run, failures, or runs"},limit:{type:"string",description:"Maximum number of automations to return (default: 50, max: 100)"},cursor:{type:"string",description:"Pagination cursor from previous response"}}).withExamples(["sazabi automations list # List all automations","sazabi automations list --status paused # List paused automations"]).build(),get:$("get","Get one automation by ID",async(e)=>{let{values:t,positionals:n}=O(e,Hn,{allowPositionals:!0}),i=Zo(n,t.json);if(!i)return;await wge(i,{token:t.token,projectId:t["project-id"],json:t.json,apiBaseUrl:t["api-base-url"]})}).withPositionalArgs("<automation-id>").withOptions(Wn).withExamples(["sazabi automations get <automation-id> # Get one automation"]).build(),create:$("create","Create an automation",async(e)=>{let{values:t,positionals:n}=O(e,{...Hn,description:{type:"string"},"script-id":{type:"string"},script:{type:"string"},"expression-id":{type:"string"},"cron-expression":{type:"string"},timezone:{type:"string"},"timeout-seconds":{type:"string"},enabled:{type:"boolean"}},{allowPositionals:!0}),i=Oge(n,t.json);if(!i)return;let o=(c)=>{if(t.json){m(c);return}p(c)},r;if(t["timeout-seconds"]!==void 0){if(r=Number(t["timeout-seconds"]),!Number.isInteger(r)||r<1||r>3600)return o(`Invalid --timeout-seconds value "${t["timeout-seconds"]}". Expected an integer between 1 and 3600.`)}await fge(i,{token:t.token,projectId:t["project-id"],json:t.json,apiBaseUrl:t["api-base-url"],description:t.description,scriptId:t["script-id"],script:t.script,expressionId:t["expression-id"],cronExpression:t["cron-expression"],timezone:t.timezone,timeoutSeconds:r,enabled:t.enabled})}).withPositionalArgs("<name>").withOptions({...Wn,description:{type:"string",description:"Human-readable description (required for log-match automations)"},"script-id":{type:"string",description:"Project script ID to run (cron automations)"},script:{type:"string",description:"Project script name to run (cron automations)"},"expression-id":{type:"string",description:"Log-match expression ID to bind (creates a log-match investigation automation)"},"cron-expression":{type:"string",description:"Cron schedule expression"},timezone:{type:"string",description:"IANA timezone for the schedule"},"timeout-seconds":{type:"string",description:"Run timeout in seconds (1-3600)"},enabled:{type:"boolean",description:"Create the automation enabled"}}).withExamples(["sazabi automations create deploy-nightly --script health --cron-expression '0 3 * * *' # Create from a DB-backed script by name","sazabi automations create deploy-nightly --script-id <script-id> # Create by script ID",'sazabi automations create "Investigate Plain tickets" --expression-id <uuid> --description "When a new Plain ticket is created, investigate …" # Create a log-match investigation automation']).build(),update:$("update","Update an automation",async(e)=>{let{values:t,positionals:n}=O(e,{...Hn,name:{type:"string"},description:{type:"string"},"clear-description":{type:"boolean"},"cron-expression":{type:"string"},timezone:{type:"string"},"timeout-seconds":{type:"string"}},{allowPositionals:!0}),i=Zo(n,t.json);if(!i)return;let o=(c)=>{if(t.json){m(c);return}p(c)},r;if(t["timeout-seconds"]!==void 0){if(r=Number(t["timeout-seconds"]),!Number.isInteger(r)||r<1||r>3600)return o(`Invalid --timeout-seconds value "${t["timeout-seconds"]}". Expected an integer between 1 and 3600.`)}await vge(i,{token:t.token,projectId:t["project-id"],json:t.json,apiBaseUrl:t["api-base-url"],name:t.name,description:t.description,clearDescription:t["clear-description"],cronExpression:t["cron-expression"],timezone:t.timezone,timeoutSeconds:r})}).withPositionalArgs("<automation-id>").withOptions({...Wn,name:{type:"string",description:"New automation name"},description:{type:"string",description:"New human-readable description"},"clear-description":{type:"boolean",description:"Clear the automation description"},"cron-expression":{type:"string",description:"New cron schedule expression"},timezone:{type:"string",description:"New IANA timezone for the schedule"},"timeout-seconds":{type:"string",description:"New run timeout in seconds (1-3600)"}}).withExamples(["sazabi automations update <automation-id> --cron-expression '0 4 * * *' # Change the schedule"]).build(),enable:$("enable","Enable an automation",async(e)=>{let{values:t,positionals:n}=O(e,Hn,{allowPositionals:!0}),i=Zo(n,t.json);if(!i)return;await kge(i,{token:t.token,projectId:t["project-id"],json:t.json,apiBaseUrl:t["api-base-url"]})}).withPositionalArgs("<automation-id>").withOptions(Wn).withExamples(["sazabi automations enable <automation-id> # Enable an automation"]).build(),disable:$("disable","Disable an automation",async(e)=>{let{values:t,positionals:n}=O(e,Hn,{allowPositionals:!0}),i=Zo(n,t.json);if(!i)return;await Sge(i,{token:t.token,projectId:t["project-id"],json:t.json,apiBaseUrl:t["api-base-url"]})}).withPositionalArgs("<automation-id>").withOptions(Wn).withExamples(["sazabi automations disable <automation-id> # Disable an automation"]).build(),runs:$("runs","Inspect automation runs").withSubcommands({list:$("list","List runs for an automation",async(e)=>{let{values:t,positionals:n}=O(e,{...Hn,status:{type:"string"},limit:{type:"string"},cursor:{type:"string"}},{allowPositionals:!0}),i=Zo(n,t.json);if(!i)return;let o=(h)=>{if(t.json){m(h);return}p(h)},r=t.status,c=["running","succeeded","failed","timed_out","cancelled"];if(r!==void 0&&!c.includes(r))return o(`Invalid --status value "${r}". Expected one of: ${c.join(", ")}.`);let s;if(t.limit!==void 0){if(s=Number(t.limit),!Number.isInteger(s)||s<1||s>100)return o(`Invalid --limit value "${t.limit}". Expected an integer between 1 and 100.`)}await Pge(i,{token:t.token,projectId:t["project-id"],json:t.json,apiBaseUrl:t["api-base-url"],status:r,limit:s,cursor:t.cursor})}).withPositionalArgs("<automation-id>").withOptions({...Wn,status:{type:"string",description:"Filter by run status: running, succeeded, failed, timed_out, or cancelled"},limit:{type:"string",description:"Maximum number of runs to return (default: 50, max: 100)"},cursor:{type:"string",description:"Pagination cursor from previous response"}}).withExamples(["sazabi automations runs list <automation-id> # List runs for an automation","sazabi automations runs list <automation-id> --status failed # List failed runs"]).build(),get:$("get","Get one automation run by ID",async(e)=>{let{values:t,positionals:n}=O(e,Hn,{allowPositionals:!0}),i=Zo(n,t.json);if(!i)return;let o=EW(n,t.json);if(!o)return;await Ige(i,o,{token:t.token,projectId:t["project-id"],json:t.json,apiBaseUrl:t["api-base-url"]})}).withPositionalArgs("<automation-id> <run-id>").withOptions(Wn).withExamples(["sazabi automations runs get <automation-id> <run-id> # Get one automation run"]).build(),logs:$("logs","Get the captured logs for an automation run",async(e)=>{let{values:t,positionals:n}=O(e,Hn,{allowPositionals:!0}),i=Zo(n,t.json);if(!i)return;let o=EW(n,t.json);if(!o)return;await $ge(i,o,{token:t.token,projectId:t["project-id"],json:t.json,apiBaseUrl:t["api-base-url"]})}).withPositionalArgs("<automation-id> <run-id>").withOptions(Wn).withExamples(["sazabi automations runs logs <automation-id> <run-id> # Get captured logs for a run"]).build()}).withExamples(["sazabi automations runs list <automation-id> # List runs for an automation","sazabi automations runs get <automation-id> <run-id> # Get one run","sazabi automations runs logs <automation-id> <run-id> # Get captured logs for a run"]).build()}).withExamples(["sazabi automations list # List all automations","sazabi automations get <automation-id> # Get one automation","sazabi automations create deploy-nightly --script health --cron-expression '0 3 * * *' # Create from a DB-backed script by name","sazabi automations update <automation-id> --cron-expression '0 4 * * *' # Change the schedule","sazabi automations enable <automation-id> # Enable an automation","sazabi automations disable <automation-id> # Disable an automation","sazabi automations runs list <automation-id> # List runs for an automation","sazabi automations runs get <automation-id> <run-id> # Get one run","sazabi automations runs logs <automation-id> <run-id> # Get captured logs for a run"]).build();te();se();re();var q$=(e)=>{let t=e.json,n=C({tokenFlag:e.token,jsonMode:t});return{client:z({token:n.token,organizationId:n.organizationId,projectId:n.projectId,apiBaseUrlFlag:e["api-base-url"],jsonMode:t}),json:t??!1}},Age={plan:{label:"Plan",type:{kind:"string"}},status:{label:"Status",type:{kind:"string"}},currency:{label:"Currency",type:{kind:"string"}},balance:{label:"Current balance",type:{kind:"string"}},targetBalance:{label:"Target balance",type:{kind:"string"}},cycle:{label:"Cycle",type:{kind:"string"}},estimate:{label:"Est. total",type:{kind:"string"}},pendingDowngrade:{label:"Pending downgrade",type:{kind:"string"}}},Tge={layout:"field-list",schema:Age,fields:["plan","status","currency","balance","targetBalance","cycle","estimate","pendingDowngrade"]},Lge=(e)=>({plan:e.planName??"—",status:e.status,currency:e.currency??"—",balance:e.currentBalance??"—",targetBalance:e.targetCreditBalance??"—",cycle:e.currentCycle?`${e.currentCycle.startsAt.slice(0,10)} - ${e.currentCycle.endsAt.slice(0,10)}`:"—",estimate:e.currentPeriodEstimate?`${e.currentPeriodEstimate.totalAmount} ${e.currentPeriodEstimate.currency}`:"—",pendingDowngrade:e.pendingDowngrade?`${e.pendingDowngrade.planName??"—"} (effective ${e.pendingDowngrade.effectiveAt.slice(0,10)})`:"—"}),Dge=async(e)=>{let{values:t}=O(e,G),{client:n,json:i}=q$(t),o=f(await n.billing.getSummary(),"Couldn't fetch billing summary (check your organization access and try again)",i);if(!i){if(Se("Billing summary"),!o.billable&&o.nonBillableReason)Pe({"Not billable":o.nonBillableReason})}M(Tge,Lge(o),{json:i})},Cge={logs_ingested_bytes:"Log data (GB)",input_tokens:"Input tokens",output_tokens:"Output tokens"},zge=(e)=>{let t=Number.parseFloat(e);if(Number.isNaN(t))return e;return(t/1e9).toFixed(3)},_ge=(e,t)=>{if(t==="logs_ingested_bytes")return zge(e);let n=Number.parseInt(e,10);return Number.isNaN(n)?e:n.toLocaleString()},jge={dimension:{label:"Dimension",type:{kind:"string"}},total:{label:"Total quantity",type:{kind:"string"}},credits:{label:"Credits consumed",type:{kind:"string"}}},Nge={schema:jge,columns:["dimension","total","credits"],emptyMessage:"No usage recorded for this billing cycle."},Rge=async(e)=>{let{values:t}=O(e,{...G,cycle:{type:"string"}}),{client:n,json:i}=q$(t);if(t.cycle&&t.cycle!=="current"&&t.cycle!=="previous"){if(i)return m("--cycle must be 'current' or 'previous'.");p("--cycle must be 'current' or 'previous'.");return}let o=t.cycle??"current",r=f(await n.billing.getUsage({cycle:o}),"Couldn't fetch billing usage (check your organization access and try again)",i);if(!i){if(Se(`Billing usage (${o} cycle)`),r.cycle)Pe({Cycle:`${r.cycle.startsAt.slice(0,10)} - ${r.cycle.endsAt.slice(0,10)}`})}let c=r.usage.map((s)=>{let h=s.dimension;return{dimension:Cge[h]??s.dimension,total:_ge(s.totalQuantity,h),credits:s.creditsConsumed}});W(Nge,c,{json:i})},xge={occurredAt:{label:"Date",type:{kind:"date"}},type:{label:"Type",type:{kind:"string"}},delta:{label:"Credit delta",type:{kind:"string"}},balance:{label:"Balance after",type:{kind:"string"}}},Uge={schema:xge,columns:["occurredAt","type","delta","balance"],emptyMessage:"No billing transactions found."},Mge=async(e)=>{let{values:t}=O(e,{...G,limit:{type:"string"},page:{type:"string"}}),{client:n,json:i}=q$(t),o,r;if(t.limit){if(o=Number.parseInt(t.limit,10),Number.isNaN(o)||o<1||o>100){if(i)return m("--limit must be a positive integer (max 100).");p("--limit must be a positive integer (max 100).");return}}if(t.page){if(r=Number.parseInt(t.page,10),Number.isNaN(r)||r<1){if(i)return m("--page must be a positive integer.");p("--page must be a positive integer.");return}}let c=f(await n.billing.listTransactions({limit:o??10,page:r??1}),"Couldn't fetch billing transactions (check your organization access and try again)",i);if(!i)Se("Billing transactions");let s=c.items.map((h)=>({occurredAt:h.occurredAt,type:h.transactionType,delta:h.creditDelta,balance:h.balanceAfter}));if(W(Uge,s,{json:i,count:c.pagination.total}),!i&&c.pagination.hasNext){let h=(r??1)+1;Pe({"Next page":`Use --page ${h} for more results.`})}},Ege=$("summary","Show the billing summary for your organization",async(e)=>{await Dge(e)}).withOptions(K).withExamples(["sazabi billing summary # Show billing summary","sazabi billing summary --json # Output as JSON"]).build(),Kge=$("usage","Show per-dimension usage for the current or previous cycle",async(e)=>{await Rge(e)}).withOptions({...K,cycle:{type:"string",description:"Which cycle to report (current or previous)"}}).withExamples(["sazabi billing usage # Current cycle usage","sazabi billing usage --cycle previous # Previous cycle usage","sazabi billing usage --json # Output as JSON"]).build(),Gge=$("transactions","List recent credit ledger transactions",async(e)=>{await Mge(e)}).withOptions({...K,limit:{type:"string",description:"Max results per page (default 10, max 100)"},page:{type:"string",description:"Page number (1-indexed)"}}).withExamples(["sazabi billing transactions # Recent transactions","sazabi billing transactions --limit 50 # More results","sazabi billing transactions --page 2 # Next page","sazabi billing transactions --json # Output as JSON"]).build(),HW=V("billing","View billing summary, usage, and transactions").withSubcommands({summary:Ege,usage:Kge,transactions:Gge}).withExamples(["sazabi billing summary # Show billing plan and balance","sazabi billing usage # Show usage for current cycle","sazabi billing transactions # List recent transactions"]).build();te();var WW=()=>`