@sazabi/cli 0.13.18-dev.ge512b5d → 0.13.19-dev.g9245505

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 +13 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6841,7 +6841,7 @@ service:
6841
6841
  pipelines:
6842
6842
  logs:
6843
6843
  receivers: [awscloudwatch]
6844
- 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",description:"Deploy the collector and generate logs in the AWS account.",actions:[{instruction:"After the collector is running, 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 XQ,RD;var UD=g(()=>{jD();XQ=["externalId"],RD={id:"cloudwatch",name:"CloudWatch",searchAliases:["aws","amazon","amazon web services","amazon cloudwatch"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,requiresConnectionPublicKey:!0,sensitiveFields:XQ,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 fv,Iv,Ov;var ED=g(()=>{It();fv={kind:"multi-step",steps:[{id:"credentials",title:"Enter access token",description:"Enter a Convex team 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",description:"Select the Convex team whose deployments Sazabi should list.",actions:[{id:"team",kind:"select",label:"Team",instruction:"Select your team below.",placeholder:"Select a team",optionsAction:"options",optionsInput:{token:"$token"},optionValueField:"id",optionLabelField:"name",optionDescriptionField:"slug"}]}],submit:{metadata:{connectionMode:"managed",accessToken:"$token",teamId:"$team.id",teamName:"$team.name"},displayName:"$team.name",button:Ee}},Iv={groups:[{id:"open-log-streams",section:"config",title:"Open Log Streams",description:"Add a webhook log stream in the Convex dashboard.",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:"endpoint",title:"Copy webhook URL",actions:[{instruction:"Paste your Sazabi intake URL (above) into the webhook configuration.",payloads:[{kind:"copyable",label:"Webhook URL",value:"https://${context.ingestHost}"}],notes:[{text:"Your key is embedded in the hostname, so the webhook needs no custom headers."}]}]},{id:"verify",section:"verify",title:"Save and verify",description:"Confirm logs arrive in Sazabi.",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 ZQ,KD;var xD=g(()=>{ED();ZQ=["accessToken"],KD={id:"convex",name:"Convex",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:ZQ,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 Pv;var GD=g(()=>{Pv={perStreamInstructions:!0,groups:[{id:"configure",title:"Configure the Datadog Agent",actions:[{instruction:"Choose how this Datadog Agent should ship to Sazabi, then copy the Sazabi value and apply the matching config.",payloads:[{kind:"options",label:"Choose Agent configuration",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",description:"Add Sazabi as an additional endpoint without changing the Agent's root Datadog API key.",value:`# Enable logs collection if it is not already enabled.
6844
+ 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",description:"Deploy the collector and generate logs in the AWS account.",actions:[{instruction:"After the collector is running, 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 XQ,RD;var UD=g(()=>{jD();XQ=["externalId"],RD={id:"cloudwatch",name:"CloudWatch",searchAliases:["aws","amazon","amazon web services","amazon cloudwatch"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,requiresConnectionPublicKey:!0,sensitiveFields:XQ,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 fv,Iv,Ov;var ED=g(()=>{It();fv={kind:"multi-step",steps:[{id:"credentials",title:"Enter access token",description:"Enter a Convex team 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",description:"Select the Convex team whose deployments Sazabi should list.",actions:[{id:"team",kind:"select",label:"Team",instruction:"Select your team below.",placeholder:"Select a team",optionsAction:"options",optionsInput:{token:"$token"},optionValueField:"id",optionLabelField:"name",optionDescriptionField:"slug"}]}],submit:{metadata:{connectionMode:"managed",accessToken:"$token",teamId:"$team.id",teamName:"$team.name"},displayName:"$team.name",button:Ee}},Iv={groups:[{id:"open-log-streams",section:"config",title:"Open Log Streams",description:"Add a webhook log stream in the Convex dashboard.",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:"endpoint",title:"Copy webhook URL",actions:[{instruction:"Paste your Sazabi intake URL (above) into the webhook configuration.",payloads:[{kind:"copyable",label:"Webhook URL",value:"https://${context.ingestHost}"}],notes:[{text:"Your key is embedded in the hostname, so the webhook needs no custom headers."}]}]},{id:"verify",section:"verify",title:"Save and verify",description:"Confirm logs arrive in Sazabi.",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 ZQ,KD;var xD=g(()=>{ED();ZQ=["accessToken"],KD={id:"convex",name:"Convex",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:ZQ,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 Pv;var GD=g(()=>{Pv={perStreamInstructions:!0,groups:[{id:"configure",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.
6845
6845
  logs_enabled: true
6846
6846
 
6847
6847
  # Send a copy of logs to Sazabi while the primary Agent config
@@ -6854,17 +6854,17 @@ logs_config:
6854
6854
  # requires a non-empty value here to start.
6855
6855
  - api_key: any-non-empty-value
6856
6856
  Host: \${context.ingestHost}
6857
- Port: 443`}]},{id:"env-dual-ship",label:"Env vars dual-ship",description:"Keep `DD_API_KEY` pointed at Datadog and add Sazabi through environment variables.",payloads:[{kind:"copyable",label:"Intake host",value:"${context.ingestHost}",copyLabel:"Datadog intake host",description:"Use this host in `DD_LOGS_CONFIG_ADDITIONAL_ENDPOINTS`."},{kind:"code",language:"bash",copyLabel:"Datadog Agent dual-ship environment variables",description:"Add these variables without changing the Agent's existing Datadog API key.",value:`DD_LOGS_ENABLED=true
6857
+ Port: 443`}],notes:[{variant:"requirement",text:"`logs_config.additional_endpoints` requires Datadog Agent v6.18+ or v7.18+."}]},{id:"env-dual-ship",label:"Env vars dual-ship",description:"Keep `DD_API_KEY` pointed at Datadog and add Sazabi through environment variables.",payloads:[{kind:"copyable",label:"Intake host",value:"${context.ingestHost}",copyLabel:"Datadog intake host",description:"Use this host in `DD_LOGS_CONFIG_ADDITIONAL_ENDPOINTS`."},{kind:"code",language:"bash",copyLabel:"Datadog Agent dual-ship environment variables",value:`DD_LOGS_ENABLED=true
6858
6858
  DD_LOGS_CONFIG_FORCE_USE_HTTP=true
6859
- DD_LOGS_CONFIG_ADDITIONAL_ENDPOINTS='[{"api_key":"any-non-empty-value","Host":"\${context.ingestHost}","Port":443}]'`}]},{id:"env-sazabi-only",label:"Env vars Sazabi-only",description:"Use a dedicated Agent or sidecar that sends logs only to Sazabi.",payloads:[{kind:"copyable",label:"Intake URL",value:"https://${context.ingestHost}",copyLabel:"Datadog Agent intake URL",description:"Use this URL as the Agent logs intake URL."},{kind:"code",language:"bash",copyLabel:"Dedicated Datadog Agent environment variables",description:"Set the dedicated Agent's API key and logs URL to Sazabi.",value:`DD_API_KEY=any-non-empty-value
6859
+ DD_LOGS_CONFIG_ADDITIONAL_ENDPOINTS='[{"api_key":"any-non-empty-value","Host":"\${context.ingestHost}","Port":443}]'`}],notes:[{variant:"requirement",text:"`DD_LOGS_CONFIG_ADDITIONAL_ENDPOINTS` requires Datadog Agent v6.18+ or v7.18+."}]},{id:"env-sazabi-only",label:"Env vars Sazabi-only",description:"Use a dedicated Agent or sidecar that sends logs only to Sazabi.",payloads:[{kind:"copyable",label:"Intake URL",value:"https://${context.ingestHost}",copyLabel:"Datadog Agent intake URL",description:"Use this URL as the Agent logs intake URL."},{kind:"code",language:"bash",copyLabel:"Dedicated Datadog Agent environment variables",value:`DD_API_KEY=any-non-empty-value
6860
6860
  DD_LOGS_ENABLED=true
6861
6861
  DD_LOGS_CONFIG_LOGS_DD_URL=https://\${context.ingestHost}
6862
- DD_LOGS_CONFIG_FORCE_USE_HTTP=true`}]},{id:"ecs-sidecar",label:"ECS sidecar",description:"Run a dedicated Datadog Agent sidecar in ECS/Fargate for Sazabi logs.",payloads:[{kind:"copyable",label:"Intake URL",value:"https://${context.ingestHost}",copyLabel:"Datadog Agent intake URL",description:"Use this URL in the sidecar container environment."},{kind:"code",language:"bash",copyLabel:"ECS Datadog Agent sidecar environment variables",description:"Set these on the dedicated Datadog Agent sidecar container.",value:`ECS_FARGATE=true
6862
+ 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:"ecs-sidecar",label:"ECS sidecar",description:"Run a dedicated Datadog Agent sidecar in ECS/Fargate for Sazabi logs.",payloads:[{kind:"copyable",label:"Intake URL",value:"https://${context.ingestHost}",copyLabel:"Datadog Agent intake URL",description:"Use this URL in the sidecar container environment."},{kind:"code",language:"bash",copyLabel:"ECS Datadog Agent sidecar environment variables",value:`ECS_FARGATE=true
6863
6863
  DD_API_KEY=any-non-empty-value
6864
6864
  DD_LOGS_ENABLED=true
6865
6865
  DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true
6866
6866
  DD_LOGS_CONFIG_LOGS_DD_URL=https://\${context.ingestHost}
6867
- DD_LOGS_CONFIG_FORCE_USE_HTTP=true`}]}]}]}]},{id:"restart",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:"`DD_LOGS_CONFIG_ADDITIONAL_ENDPOINTS` requires Datadog Agent v6.18+ or v7.18+."},{text:"For the dedicated Agent and ECS sidecar methods, `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."},{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 JD;var BD=g(()=>{GD();JD={id:"datadog",name:"Datadog Agent",capabilities:["connectionless"],auth:[],delivery:["push"],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 Sv;var qD=g(()=>{Sv={groups:[{id:"open-settings",section:"config",title:"Open OpenTelemetry card",description:"Find the organization-level OpenTelemetry settings in Daytona.",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:"endpoint",title:"Copy OTLP values",actions:[{instruction:"Set the endpoint on the Daytona OpenTelemetry card.",payloads:[{kind:"copyable",label:"OTLP Endpoint",value:"https://${context.ingestHost}"}],notes:[{text:"The key is embedded in the URL, so no authorization header is needed."}]}]},{id:"save",section:"verify",title:"Save and verify",description:"Restart or start a sandbox so Daytona exports fresh telemetry.",actions:[{instruction:"Save the OpenTelemetry card, then restart or start a sandbox. Sandboxes begin exporting telemetry automatically on their next start with no per-sandbox change required.",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."]}]}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/daytona"}});var HD;var WD=g(()=>{qD();HD={id:"daytona",name:"Daytona",capabilities:["connectionless"],auth:[],delivery:["push"],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 $v,Tv,Av;var MD=g(()=>{It();$v={kind:"multi-step",steps:[{id:"prepare",title:"Create access token",description:"Create a DigitalOcean token with App Platform permissions.",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",description:"Enter your personal 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:{connectionMode:"managed",apiToken:"$token"},button:Ee},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/digitalocean"},Tv={docsUrl:"https://docs.sazabi.com/data/sources/endpoint/digital-ocean",groups:[{id:"open-log-forwarding",section:"config",title:"Open Log Forwarding",description:"Add a Datadog log destination to your App Platform app.",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. To add forwarding across an app in one step from a picker, connect your DigitalOcean account instead.",notes:[{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:"endpoint",title:"Copy Datadog destination values",actions:[{instruction:"Paste these into the Datadog log destination fields.",payloads:[{kind:"copyable",label:"Datadog endpoint (API URL)",value:"https://${context.ingestHost}",copyLabel:"DigitalOcean Datadog endpoint"},{kind:"copyable",label:"Datadog API key",value:"${context.publicKey}",copyLabel:"Sazabi public key",description:"App Platform requires a Datadog API key field. Paste your Sazabi public key here — the key embedded in the endpoint hostname is what actually authenticates the stream."}]}]},{id:"verify",section:"verify",title:"Save and verify",description:"Confirm logs arrive in Sazabi.",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."}]}]},Av={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 FQ,YD;var XD=g(()=>{MD();FQ=["apiToken"],YD={id:"digital_ocean",name:"DigitalOcean",searchAliases:["digital ocean","do"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:FQ,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 ZD,Cv;var FD=g(()=>{ZD=[{instruction:"Set these values in the application that creates E2B sandboxes.",payloads:[{kind:"copyable",label:"`SAZABI_INTAKE_URL`",value:"https://${context.ingestHost}/v1/logs",copyLabel:"Intake URL"}]}],Cv={kind:"choice",title:"Choose E2B SDK",description:"Pick the SDK your sandbox code runs on.",options:[{id:"typescript",label:"TypeScript",description:"Use the E2B TypeScript SDK and OpenTelemetry logs exporter.",flow:{groups:[{id:"values",title:"Copy environment variables",actions:ZD},{id:"instrument",title:"Instrument sandbox logs",actions:[{instruction:"Emit sandbox stdout and stderr through the OpenTelemetry logs SDK.",payloads:[{kind:"code",label:"TypeScript SDK integration",language:"typescript",copyLabel:"TypeScript code",value:`import { Sandbox } from '@e2b/code-interpreter'
6867
+ 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",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 JD;var BD=g(()=>{GD();JD={id:"datadog",name:"Datadog Agent",capabilities:["connectionless"],auth:[],delivery:["push"],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 Sv;var qD=g(()=>{Sv={groups:[{id:"open-settings",section:"config",title:"Open OpenTelemetry card",description:"Find the organization-level OpenTelemetry settings in Daytona.",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:"endpoint",title:"Copy OTLP values",actions:[{instruction:"Set the endpoint on the Daytona OpenTelemetry card.",payloads:[{kind:"copyable",label:"OTLP Endpoint",value:"https://${context.ingestHost}"}],notes:[{text:"The key is embedded in the URL, so no authorization header is needed."}]}]},{id:"save",section:"verify",title:"Save and verify",description:"Restart or start a sandbox so Daytona exports fresh telemetry.",actions:[{instruction:"Save the OpenTelemetry card, then restart or start a sandbox. Sandboxes begin exporting telemetry automatically on their next start with no per-sandbox change required.",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."]}]}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/daytona"}});var HD;var WD=g(()=>{qD();HD={id:"daytona",name:"Daytona",capabilities:["connectionless"],auth:[],delivery:["push"],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 $v,Tv,Av;var MD=g(()=>{It();$v={kind:"multi-step",steps:[{id:"prepare",title:"Create access token",description:"Create a DigitalOcean token with App Platform permissions.",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",description:"Enter your personal 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:{connectionMode:"managed",apiToken:"$token"},button:Ee},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/digitalocean"},Tv={docsUrl:"https://docs.sazabi.com/data/sources/endpoint/digital-ocean",groups:[{id:"open-log-forwarding",section:"config",title:"Open Log Forwarding",description:"Add a Datadog log destination to your App Platform app.",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. To add forwarding across an app in one step from a picker, connect your DigitalOcean account instead.",notes:[{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:"endpoint",title:"Copy Datadog destination values",actions:[{instruction:"Paste these into the Datadog log destination fields.",payloads:[{kind:"copyable",label:"Datadog endpoint (API URL)",value:"https://${context.ingestHost}",copyLabel:"DigitalOcean Datadog endpoint"},{kind:"copyable",label:"Datadog API key",value:"${context.publicKey}",copyLabel:"Sazabi public key",description:"App Platform requires a Datadog API key field. Paste your Sazabi public key here — the key embedded in the endpoint hostname is what actually authenticates the stream."}]}]},{id:"verify",section:"verify",title:"Save and verify",description:"Confirm logs arrive in Sazabi.",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."}]}]},Av={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 FQ,YD;var XD=g(()=>{MD();FQ=["apiToken"],YD={id:"digital_ocean",name:"DigitalOcean",searchAliases:["digital ocean","do"],capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:FQ,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 ZD,Cv;var FD=g(()=>{ZD=[{instruction:"Set these values in the application that creates E2B sandboxes.",payloads:[{kind:"copyable",label:"`SAZABI_INTAKE_URL`",value:"https://${context.ingestHost}/v1/logs",copyLabel:"Intake URL"}]}],Cv={kind:"choice",title:"Choose E2B SDK",description:"Pick the SDK your sandbox code runs on.",options:[{id:"typescript",label:"TypeScript",description:"Use the E2B TypeScript SDK and OpenTelemetry logs exporter.",flow:{groups:[{id:"values",title:"Copy environment variables",actions:ZD},{id:"instrument",title:"Instrument sandbox logs",actions:[{instruction:"Emit sandbox stdout and stderr through the OpenTelemetry logs SDK.",payloads:[{kind:"code",label:"TypeScript SDK integration",language:"typescript",copyLabel:"TypeScript code",value:`import { Sandbox } from '@e2b/code-interpreter'
6868
6868
  import { logs, SeverityNumber } from '@opentelemetry/api-logs'
6869
6869
  import { LoggerProvider, BatchLogRecordProcessor } from '@opentelemetry/sdk-logs'
6870
6870
  import { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-http'
@@ -7338,7 +7338,7 @@ const respan = new Respan({
7338
7338
  });
7339
7339
  await respan.initialize();
7340
7340
 
7341
- // 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",description:"Restart the app so it loads the new Respan configuration.",actions:[{instruction:"Redeploy or restart the service, then run an LLM or agent workload to generate a trace."}]}]}});var gN;var dN=g(()=>{uN();gN={id:"respan",name:"Respan",capabilities:["connectionless"],auth:[],delivery:["push"],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 sk;var yN=g(()=>{sk={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:"dsn",title:"Copy Sazabi DSN",actions:[{instruction:"Use this DSN in place of the Sentry project DSN for the app you want to monitor.",payloads:[{kind:"copyable",label:"Sentry DSN",value:"https://sazabi@${context.ingestHost}/0",copyLabel:"DSN"}]}]},{id:"configure",title:"Initialize SDK",description:"Pick how you want events routed, then use the matching snippet.",actions:[{instruction:"Initialize the SDK with the snippet matching how you want events routed.",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";
7341
+ // 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",description:"Restart the app so it loads the new Respan configuration.",actions:[{instruction:"Redeploy or restart the service, then run an LLM or agent workload to generate a trace."}]}]}});var gN;var dN=g(()=>{uN();gN={id:"respan",name:"Respan",capabilities:["connectionless"],auth:[],delivery:["push"],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 sk;var yN=g(()=>{sk={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:"dsn",title:"Copy Sazabi DSN",actions:[{instruction:"Use this DSN in place of the Sentry project DSN for the app you want to monitor.",payloads:[{kind:"copyable",label:"Sentry DSN",value:"https://sazabi@${context.ingestHost}/0",copyLabel:"DSN"}]}]},{id:"configure",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";
7342
7342
 
7343
7343
  Sentry.init({
7344
7344
  dsn: "https://sazabi@\${context.ingestHost}/0",
@@ -7359,12 +7359,12 @@ Sentry.init({
7359
7359
  // Fan every event out to both destinations.
7360
7360
  () => [{ dsn: SENTRY_DSN }, { dsn: SAZABI_DSN }],
7361
7361
  ),
7362
- });`}]}]}],notes:[{text:"`makeMultiplexedTransport` is part of the official Sentry JavaScript SDK. In the browser, import `makeFetchTransport` from `@sentry/browser` and pass it in place of `Sentry.makeNodeTransport`."}]}]},{id:"verify",title:"Verify telemetry",description:"Restart the app, send a test exception, and write a structured log.",actions:[{instruction:"Turn on structured logging in the SDK first. This DSN also works with other official Sentry SDKs including Go, Ruby, Java, and .NET."}]}]}},{id:"python",label:"Python",description:"Initialize `sentry_sdk` with the Sazabi DSN.",flow:{groups:[{id:"dsn",title:"Copy Sazabi DSN",actions:[{instruction:"Use this DSN in place of the Sentry project DSN for the app you want to monitor.",payloads:[{kind:"copyable",label:"Sentry DSN",value:"https://sazabi@${context.ingestHost}/0",copyLabel:"DSN"}]}]},{id:"configure",title:"Initialize SDK",description:"Pick how you want events routed, then use the matching snippet.",actions:[{instruction:"Initialize the SDK with the snippet matching how you want events routed.",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:"python",copyLabel:"Python",value:`import sentry_sdk
7362
+ });`}],notes:[{text:"`makeMultiplexedTransport` is part of the official Sentry JavaScript SDK. In the browser, import `makeFetchTransport` from `@sentry/browser` and pass it in place of `Sentry.makeNodeTransport`."}]}]}]}]},{id:"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 (`enableLogs: true`)."},{text:"This DSN also works with other official Sentry SDKs including Go, Ruby, Java, and .NET."}]}]}]}},{id:"python",label:"Python",description:"Initialize `sentry_sdk` with the Sazabi DSN.",flow:{groups:[{id:"dsn",title:"Copy Sazabi DSN",actions:[{instruction:"Use this DSN in place of the Sentry project DSN for the app you want to monitor.",payloads:[{kind:"copyable",label:"Sentry DSN",value:"https://sazabi@${context.ingestHost}/0",copyLabel:"DSN"}]}]},{id:"configure",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:"python",copyLabel:"Python",value:`import sentry_sdk
7363
7363
 
7364
7364
  sentry_sdk.init(
7365
7365
  dsn="https://sazabi@\${context.ingestHost}/0",
7366
7366
  enable_logs=True,
7367
- )`}]},{id:"multiplex",label:"Multiplex (send to both)",description:"Keeps your existing Sentry project receiving events — so its dashboards and alerting stay intact — and also streams to Sazabi. 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.",payloads:[{kind:"code",language:"python",copyLabel:"Python",value:`import sentry_sdk
7367
+ )`}]},{id:"multiplex",label:"Multiplex (send to both)",description:"Keeps your existing Sentry project receiving events — so its dashboards and alerting stay intact — and also streams to Sazabi.",payloads:[{kind:"code",language:"python",copyLabel:"Python",value:`import sentry_sdk
7368
7368
  from sentry_sdk import Client
7369
7369
 
7370
7370
  SENTRY_DSN = "<your-existing-sentry-dsn>"
@@ -7380,8 +7380,9 @@ def _forward_to_sazabi(event, hint):
7380
7380
  # Primary init keeps your Sentry project (and its alerting) working.
7381
7381
  sentry_sdk.init(
7382
7382
  dsn=SENTRY_DSN,
7383
+ enable_logs=True,
7383
7384
  before_send=_forward_to_sazabi,
7384
- )`}]}]}]}]},{id:"verify",title:"Verify telemetry",description:"Restart the app, send a test exception, and write a structured log.",actions:[{instruction:"Turn on structured logging in the SDK first. This DSN also works with other official Sentry SDKs including Go, Ruby, Java, and .NET."}]}]}}]}});var bN;var pN=g(()=>{yN();bN={id:"sentry",name:"Sentry SDK",searchAliases:["sentry"],capabilities:["connectionless"],auth:[],delivery:["push"],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 hk,lk;var mN=g(()=>{It();hk={kind:"multi-step",steps:[{id:"prepare",title:"Create token",description:"Create a Sentry user auth token with org write access.",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**. The `org:write` scope only lets Sazabi create the Internal Integration; the integration itself only receives read-level webhook events.",payloads:[{kind:"external-link",label:"Open Sentry auth token settings",href:"https://sentry.io/settings/account/api/auth-tokens/new-token/"}]},{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",description:"Enter the auth token and organization slug, then Sazabi validates them.",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:{connectionMode:"managed",sentryAuthToken:"$token",organizationSlug:"$organizationSlug"},button:Ee},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/sentry"},lk={groups:[{id:"create-integration",section:"config",title:"Create the Internal Integration",description:"Create a Sentry Internal Integration in your organization's developer settings.",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:"endpoint",title:"Set the webhook URL",actions:[{instruction:"Paste this URL into the Internal Integration's Webhook URL field.",payloads:[{kind:"copyable",label:"Webhook URL",value:"https://${context.ingestHost}"}],notes:[{text:"Your key sits inside the hostname, so the webhook needs no custom headers."}]},{instruction:"Save the integration."}]},{id:"verify",section:"verify",title:"Verify",description:"Confirm events arrive in Sazabi.",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:"**Alerts are opt-in.** 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."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/sentry-platform"}});var a9,wN;var vN=g(()=>{mN();a9=["sentryAuthToken"],wN={id:"sentry_platform",name:"Sentry",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],streamCardinality:"single",sensitiveFields:a9,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 uk;var kN=g(()=>{uk={groups:[{id:"open-form",section:"config",title:"Open log drain form",description:"Create an OTLP log drain in the Supabase project settings.",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",description:"Fill in these fields in order. Each one matches a field in the Supabase form.",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:"endpoint",title:"OTLP Endpoint",actions:[{instruction:"Paste your Sazabi intake URL (above) into the **OTLP Endpoint** field.",payloads:[{kind:"copyable",label:"OTLP Endpoint",value:"https://${context.ingestHost}/v1/logs"}]}]},{id:"delivery-fields",section:"config",title:"Finish drain fields",description:"Complete the remaining fields in the Supabase form.",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",description:"Save the drain and generate fresh Supabase logs.",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 fN;var IN=g(()=>{kN();fN={id:"supabase",name:"Supabase",capabilities:["connectionless"],auth:[],delivery:["push"],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 gk;var ON=g(()=>{It();gk={groups:[{id:"instrument",section:"config",title:"Instrument workers",description:"Set up each Temporal worker runtime to send OpenTelemetry data.",actions:[...Dh("Temporal worker")]},{id:"redeploy",section:"verify",title:"Redeploy and verify",description:"Restart your workers so the OpenTelemetry SDK picks up the new variables.",actions:[{instruction:"Redeploy or restart your Temporal workers, then run a workflow or activity to generate fresh telemetry."}]}]}});var PN;var SN=g(()=>{ON();PN={id:"temporal",name:"Temporal",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual worker setup is not exercised by automated lifecycle tests yet.",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 dk;var $N=g(()=>{dk={perStreamInstructions:!0,groups:[{id:"prepare",section:"config",title:"Prepare Trigger.dev project",description:"Install the OTLP logs exporter and decide where to set it up.",actions:[{instruction:"Install `@opentelemetry/exporter-logs-otlp-http` in the package that owns your `trigger.config.ts` file."},{instruction:"Set `telemetry.logExporters` directly in `trigger.config.ts`. Trigger.dev reserves `OTEL_*` environment variables for its own internal telemetry, so do not use them for this integration."},{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:"values",section:"endpoint",title:"Copy Sazabi values",actions:[{instruction:"Use this keyed intake URL in your Trigger.dev config.",payloads:[{kind:"copyable",label:"Sazabi log intake URL",value:"https://${context.ingestHost}/v1/logs",copyLabel:"Sazabi log intake URL"}]}]},{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";
7385
+ )`}],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",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 bN;var pN=g(()=>{yN();bN={id:"sentry",name:"Sentry SDK",searchAliases:["sentry"],capabilities:["connectionless"],auth:[],delivery:["push"],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 hk,lk;var mN=g(()=>{It();hk={kind:"multi-step",steps:[{id:"prepare",title:"Create token",description:"Create a Sentry user auth token with org write access.",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**. The `org:write` scope only lets Sazabi create the Internal Integration; the integration itself only receives read-level webhook events.",payloads:[{kind:"external-link",label:"Open Sentry auth token settings",href:"https://sentry.io/settings/account/api/auth-tokens/new-token/"}]},{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",description:"Enter the auth token and organization slug, then Sazabi validates them.",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:{connectionMode:"managed",sentryAuthToken:"$token",organizationSlug:"$organizationSlug"},button:Ee},docsUrl:"https://docs.sazabi.com/data/sources/connect-your-account/sentry"},lk={groups:[{id:"create-integration",section:"config",title:"Create the Internal Integration",description:"Create a Sentry Internal Integration in your organization's developer settings.",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:"endpoint",title:"Set the webhook URL",actions:[{instruction:"Paste this URL into the Internal Integration's Webhook URL field.",payloads:[{kind:"copyable",label:"Webhook URL",value:"https://${context.ingestHost}"}],notes:[{text:"Your key sits inside the hostname, so the webhook needs no custom headers."}]},{instruction:"Save the integration."}]},{id:"verify",section:"verify",title:"Verify",description:"Confirm events arrive in Sazabi.",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:"**Alerts are opt-in.** 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."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/sentry-platform"}});var a9,wN;var vN=g(()=>{mN();a9=["sentryAuthToken"],wN={id:"sentry_platform",name:"Sentry",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],streamCardinality:"single",sensitiveFields:a9,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 uk;var kN=g(()=>{uk={groups:[{id:"open-form",section:"config",title:"Open log drain form",description:"Create an OTLP log drain in the Supabase project settings.",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",description:"Fill in these fields in order. Each one matches a field in the Supabase form.",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:"endpoint",title:"OTLP Endpoint",actions:[{instruction:"Paste your Sazabi intake URL (above) into the **OTLP Endpoint** field.",payloads:[{kind:"copyable",label:"OTLP Endpoint",value:"https://${context.ingestHost}/v1/logs"}]}]},{id:"delivery-fields",section:"config",title:"Finish drain fields",description:"Complete the remaining fields in the Supabase form.",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",description:"Save the drain and generate fresh Supabase logs.",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 fN;var IN=g(()=>{kN();fN={id:"supabase",name:"Supabase",capabilities:["connectionless"],auth:[],delivery:["push"],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 gk;var ON=g(()=>{It();gk={groups:[{id:"instrument",section:"config",title:"Instrument workers",description:"Set up each Temporal worker runtime to send OpenTelemetry data.",actions:[...Dh("Temporal worker")]},{id:"redeploy",section:"verify",title:"Redeploy and verify",description:"Restart your workers so the OpenTelemetry SDK picks up the new variables.",actions:[{instruction:"Redeploy or restart your Temporal workers, then run a workflow or activity to generate fresh telemetry."}]}]}});var PN;var SN=g(()=>{ON();PN={id:"temporal",name:"Temporal",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual worker setup is not exercised by automated lifecycle tests yet.",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 dk;var $N=g(()=>{dk={perStreamInstructions:!0,groups:[{id:"prepare",section:"config",title:"Prepare Trigger.dev project",description:"Install the OTLP logs exporter and decide where to set it up.",actions:[{instruction:"Install `@opentelemetry/exporter-logs-otlp-http` in the package that owns your `trigger.config.ts` file."},{instruction:"Set `telemetry.logExporters` directly in `trigger.config.ts`. Trigger.dev reserves `OTEL_*` environment variables for its own internal telemetry, so do not use them for this integration."},{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:"values",section:"endpoint",title:"Copy Sazabi values",actions:[{instruction:"Use this keyed intake URL in your Trigger.dev config.",payloads:[{kind:"copyable",label:"Sazabi log intake URL",value:"https://${context.ingestHost}/v1/logs",copyLabel:"Sazabi log intake URL"}]}]},{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";
7385
7386
  import { defineConfig } from "@trigger.dev/sdk";
7386
7387
 
7387
7388
  export default defineConfig({
@@ -8552,9 +8553,9 @@ The Context Company hosts a Streamable HTTP MCP server at \`https://api.theconte
8552
8553
 
8553
8554
  - A The Context Company account
8554
8555
  - A read-only API key from the [MCP access documentation](https://docs.thecontext.company/access-data/mcp)
8555
- `.trim()});import{dirname as bre,resolve as pre}from"node:path";import{fileURLToPath as mre}from"node:url";var wre,e0,t0,vre,n0,kre,fre,Ire,o0;var GI=g(()=>{ve();ul();wre=pre(bre(mre(import.meta.url)),"../../../skills"),e0=["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"],t0=c.enum(e0),vre=c.object({readOnlyToolNames:c.array(c.string()).optional(),blockedToolNames:c.array(c.string()).optional(),defaultUnavailableReason:c.enum(ll).optional(),allowWriteTools:c.boolean().optional()}),n0=c.object({registrationEndpoint:c.string().url(),tokenEndpointAuthMethod:c.enum(hl).optional(),includeScopesInRegistration:c.boolean().optional()}),kre=c.object({providerConfigKey:c.string().min(1),callbackPathSegment:c.string().min(1),authorizationUrl:c.string().url().optional(),tokenUrl:c.string().url().optional(),resourceUrl:c.string().url().optional(),useServerUrlAsResource:c.boolean().optional(),omitScopeFromAuthorizationUrl:c.boolean().optional(),authorizationUrlParams:c.record(c.string(),c.string()).optional(),dynamicClientRegistration:n0.optional()}),fre=c.object({label:c.string().min(1),serverUrl:c.string().url(),authorizationUrl:c.string().url().optional(),tokenUrl:c.string().url().optional(),resourceUrl:c.string().url().optional(),dynamicClientRegistration:n0.optional()}),Ire=c.object({id:c.string().min(1),title:c.string().min(1),description:c.string().optional(),body:c.string().min(1),fieldKeys:c.array(c.string().min(1)).optional(),imageKeys:c.array(c.string().min(1)).optional()}),o0=c.object({id:c.string().min(1),label:c.string().min(1),iconKey:t0,defaultServerUrl:c.string().url().nullable(),serverUrlPathSuffixMaxSegments:c.number().int().positive().optional(),transport:c.enum(jk),authMode:c.enum(Rk),availability:c.enum(Mi),oauth:kre.optional(),regions:c.array(fre).optional(),capabilityOverrides:vre.optional(),helpText:c.string().optional(),setupGroups:c.array(Ire).optional(),evidenceHints:c.array(c.string().min(1)).optional(),skill:c.string().min(1).optional(),setupSkill:c.string().min(1).optional(),scopesUserSelectable:c.boolean().optional()})});var C=(e)=>{return{...o0.parse(e),...e.getAvailableScopes?{getAvailableScopes:e.getAvailableScopes}:{},...e.getUrlConfiguration?{getUrlConfiguration:e.getUrlConfiguration}:{},...e.validateCredentials?{validateCredentials:e.validateCredentials}:{},...e.normalizeHeaders?{normalizeHeaders:e.normalizeHeaders}:{}}};var F=g(()=>{GI()});var i0;var r0=g(()=>{F();i0=C({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 a0;var c0=g(()=>{F();a0=C({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 s0;var h0=g(()=>{F();s0=C({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 l0;var u0=g(()=>{F();l0=C({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:q6,normalizeHeaders:J6})});var JI,D1e,g0;var BI=g(()=>{F();JI=[{value:"us-east-1",label:"US East (N. Virginia) — us-east-1"},{value:"eu-central-1",label:"Europe (Frankfurt) — eu-central-1"}],D1e=new Set(JI.map((e)=>e.value)),g0=C({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 d0;var y0=g(()=>{F();d0=C({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 b0;var p0=g(()=>{F();b0=C({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 m0;var w0=g(()=>{F();m0=C({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:T6,normalizeHeaders:$6})});var v0;var k0=g(()=>{F();v0=C({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 f0;var I0=g(()=>{F();f0=C({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:Q6})});var O0;var P0=g(()=>{F();O0=C({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 S0;var $0=g(()=>{F();S0=C({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 T0;var A0=g(()=>{F();T0=C({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 C0;var L0=g(()=>{F();C0=C({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 D0;var z0=g(()=>{F();D0=C({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 N0;var _0=g(()=>{F();N0=C({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:f6,normalizeHeaders:k6})});var j0;var R0=g(()=>{F();j0=C({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:U6,normalizeHeaders:R6})});var U0;var E0=g(()=>{F();U0=C({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:G6,normalizeHeaders:x6,skill:"context-dev",setupSkill:"context-dev-setup"})});var K0;var x0=g(()=>{F();K0=C({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 G0;var J0=g(()=>{F();G0=C({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:v6,normalizeHeaders:m6})});var B0;var q0=g(()=>{F();B0=C({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 H0;var W0=g(()=>{F();H0=C({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:w6,normalizeHeaders:p6})});var M0;var Y0=g(()=>{F();M0=C({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:j6,normalizeHeaders:_6,skill:"exa",setupSkill:"exa-setup"})});var X0;var Z0=g(()=>{F();X0=C({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:F6,normalizeHeaders:Z6})});var F0;var Q0=g(()=>{F();F0=C({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(`
8556
- `)}],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 V0;var ex=g(()=>{F();V0=C({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 tx;var nx=g(()=>{F();tx=C({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 ox;var ix=g(()=>{F();ox=C({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 rx;var ax=g(()=>{F();rx=C({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 cx;var sx=g(()=>{F();cx=C({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 hx;var lx=g(()=>{F();hx=C({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:C6,normalizeHeaders:A6})});var ux;var gx=g(()=>{F();ux=C({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:H6,normalizeHeaders:B6})});var dx;var yx=g(()=>{F();dx=C({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 bx;var px=g(()=>{F();bx=C({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 mx;var wx=g(()=>{F();mx=C({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 vx;var kx=g(()=>{F();vx=C({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 fx;var Ix=g(()=>{F();fx=C({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 Ox;var Px=g(()=>{F();Ox=C({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 Sx;var $x=g(()=>{F();Sx=C({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 Tx;var Ax=g(()=>{F();Tx=C({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 Cx;var Lx=g(()=>{F();Cx=C({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 Dx;var zx=g(()=>{F();Dx=C({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 Nx;var _x=g(()=>{F();Nx=C({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 jx;var Rx=g(()=>{F();jx=C({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 Ux;var Ex=g(()=>{F();Ux=C({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 Kx;var xx=g(()=>{F();Kx=C({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:D6,normalizeHeaders:L6})});var Gx;var Jx=g(()=>{F();Gx=C({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:K6,normalizeHeaders:E6,skill:"rentahuman",setupSkill:"rentahuman-setup"})});var Bx;var qx=g(()=>{F();Bx=C({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:M6,normalizeHeaders:W6,skill:"resend",setupSkill:"resend-setup"})});var Hx;var Wx=g(()=>{F();Hx=C({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:X6,normalizeHeaders:Y6,skill:"respan",setupSkill:"respan-setup"})});var Mx;var Yx=g(()=>{F();Mx=C({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(`
8557
- `)}],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 Xx;var Zx=g(()=>{F();Xx=C({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 Fx;var Qx=g(()=>{F();Fx=C({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:N6,normalizeHeaders:z6})});var Vx;var eG=g(()=>{F();Vx=C({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 tG;var nG=g(()=>{F();tG=C({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 oG;var iG=g(()=>{F();oG=C({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 rG;var aG=g(()=>{F();rG=C({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:P6,normalizeHeaders:O6,skill:"the-context-company",setupSkill:"the-context-company-setup"})});var cG;var sG=g(()=>{F();cG=C({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 hG;var lG=g(()=>{F();hG=C({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:S6,normalizeHeaders:I6,skill:"x",setupSkill:"x-setup"})});var uG,VUe;var gG=g(()=>{r0();c0();h0();u0();BI();BI();y0();p0();w0();k0();I0();P0();$0();A0();L0();z0();_0();R0();E0();x0();J0();q0();W0();Y0();Z0();Q0();ex();nx();ix();ax();sx();lx();gx();yx();px();wx();kx();Ix();Px();$x();Ax();Lx();zx();_x();Rx();Ex();xx();Jx();qx();Wx();Yx();Zx();Qx();eG();nG();iG();aG();sG();lG();uG=[tG,G0,B0,i0,a0,s0,l0,g0,d0,b0,m0,v0,f0,O0,T0,C0,D0,N0,S0,j0,U0,H0,M0,X0,F0,V0,tx,ox,rx,cx,hx,ux,dx,bx,mx,vx,fx,Ox,Sx,Tx,Cx,Dx,Nx,jx,Ux,Gx,Kx,Bx,Hx,Mx,Xx,Fx,Vx,oG,rG,cG,hG,K0],VUe=new Map(uG.map((e)=>[e.id,e]))});var dG=()=>{};var yG=()=>{};var bG=()=>{};var pG=()=>{};var mG=()=>{};var wG=()=>{};var vG=()=>{};var kG=()=>{};var fG=()=>{};var IG=()=>{};var OG=()=>{};var PG=()=>{};var SG=()=>{};var $G=()=>{};var TG=()=>{};var AG=()=>{};var CG=()=>{};var LG=()=>{};var DG=()=>{};var zG=()=>{};var NG=()=>{};var _G=()=>{};var jG=()=>{};var RG=()=>{};var UG=()=>{};var EG=()=>{};var KG=()=>{};var xG=()=>{};var GG=()=>{};var JG=()=>{};var BG=()=>{};var qG=()=>{};var HG=()=>{};var WG=()=>{};var MG=()=>{};var YG=()=>{};var XG=()=>{};var ZG=()=>{};var FG=()=>{};var QG=()=>{};var VG=g(()=>{dG();yG();bG();pG();mG();wG();vG();kG();fG();IG();OG();PG();SG();$G();TG();AG();CG();LG();DG();zG();NG();_G();jG();RG();UG();EG();KG();xG();GG();JG();BG();qG();HG();WG();MG();YG();XG();ZG();FG();QG()});var eJ=()=>{};var tJ=()=>{};var nJ=g(()=>{Pj();ul();b6();V6();gG();GI();VG();eJ();tJ()});var oJ,$re,iJ,Tre,rJ,Are,aJ,cJ,$u,sJ,hJ,lJ,ur,uJ,gJ,gr,dJ,yJ,dr,bJ,Cre,pJ,Tu,Lre;var qI=g(()=>{nJ();ve();_e();oJ=["configured","authorizing","connected","error"],$re=c.enum(oJ),iJ=["preset","custom"],Tre=c.enum(iJ),rJ=["streamable-http","sse"],Are=c.enum(rJ),aJ=["none","headers","oauth","aws-sigv4"],cJ=c.enum(aJ),$u=c.object({connectionId:c.string().uuid().describe("Connection ID."),connectionKey:c.string().describe("Stable key used to reference this connector in tool calls."),providerId:c.string().describe('Provider identifier, e.g. "linear".'),displayName:c.string().describe("Human-readable connector name."),source:Tre.describe("Whether the connector is a built-in preset or a custom server."),installStatus:$re.describe("Current connection lifecycle status."),authMode:cJ.describe("Authentication mode."),transport:Are.describe("Transport protocol."),serverUrl:c.string().describe("MCP server URL."),readOnly:c.boolean().describe("Whether the connector is restricted to read-only tools."),management:xk.describe("Lifecycle owner and supported connector mutations."),enabledToolCount:c.number().int().nonnegative().describe("Number of tools enabled and available for this connector."),connectedAt:c.string().datetime().nullable().describe("When the connector last became connected, if ever."),createdAt:c.string().datetime(),updatedAt:c.string().datetime()}),sJ=c.object({name:c.string().describe("Tool name as invoked."),title:c.string().describe("Human-readable tool title."),description:c.string().describe("Tool description."),isReadOnly:c.boolean().describe("Whether the tool is considered read-only."),enabled:c.boolean().describe("Whether the tool is enabled and available given the connector config.")}),hJ=c.object({projectId:c.string().uuid().optional().describe("Project to list connectors for. Auto-filled from SDK context when omitted."),connectedOnly:c.boolean().optional().describe("When true, only return connectors that are connected.")}),lJ=c.object({connectors:c.array($u)}),ur=T({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:hJ,output:lJ,pagination:"none",async:"sync"}),uJ=c.object({connectionId:c.string().uuid().describe("Connection ID to fetch."),projectId:c.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted.")}),gJ=c.object({connector:$u}),gr=T({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:uJ,output:gJ,pagination:"none",async:"sync"}),dJ=c.object({connectionId:c.string().uuid().describe("Connection ID to inspect."),projectId:c.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted.")}),yJ=c.object({connector:$u,tools:c.array(sJ)}),dr=T({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:dJ,output:yJ,pagination:"none",async:"sync"}),bJ=c.object({providerId:c.string().describe('Provider identifier, e.g. "linear".'),label:c.string().describe("Human-readable provider name."),authMode:cJ.describe("Authentication mode."),availability:c.enum(Mi).describe("Whether the provider is enabled or coming soon."),setupSkill:c.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),Cre=c.object({}),pJ=c.object({providers:c.array(bJ)}),Tu=T({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:Cre,output:pJ,pagination:"none",async:"sync"}),Lre={list:ur.contract,get:gr.contract,details:dr.contract,listProviders:Tu.contract}});var yr,Dre,zre,Nre,_re,jre,Rre,Ure,HI,Ixe;var Au=g(()=>{ve();_e();yr=c.enum(["admin","member"]),Dre=c.object({id:c.string().min(1),name:c.string(),slug:c.string(),logo:c.string().nullable().optional(),role:yr}),zre=c.object({id:c.string().min(1),name:c.string().nullable(),email:c.string().email()}),Nre=c.object({credentialType:c.literal("user"),user:zre,activeOrganizationId:c.string().min(1).nullable(),organizations:c.array(Dre).describe("Organizations the user belongs to, including membership role.")}),_re=c.object({credentialType:c.literal("secret"),organization:c.object({id:c.string().min(1),name:c.string(),slug:c.string(),logo:c.string().nullable().optional()}),keyName:c.string()}),jre=c.object({credentialType:c.literal("partner"),superorganization:c.object({id:c.string().uuid(),name:c.string()})}),Rre=c.object({}),Ure=c.discriminatedUnion("credentialType",[Nre,_re,jre]),HI=T({operationId:"me.get",description:"Return the identity and available context for the current credential.",backend:"api",route:{method:"GET",path:"/me",tags:["Auth"]},input:Rre,output:Ure,pagination:"none",async:"sync"}),Ixe=HI.contract});var mJ,Ere,Kre,xre,Gre,Jre,Bre,WI,MI,YI,Txe;var wJ=g(()=>{ve();_e();Au();mJ=c.object({membershipId:c.string().min(1).describe("Organization membership record ID."),userId:c.string().min(1).describe("User ID for the organization member."),name:c.string().nullable().describe("Display name for the member, when available."),email:c.string().email().describe("Email address for the member."),imageUrl:c.string().nullable().describe("Profile image URL for the member, when available."),role:yr.describe("Organization role."),createdAt:c.string().datetime().describe("When the membership was created.")}),Ere=c.object({organizationId:c.string().min(1).optional().describe("Organization to list members for. Auto-filled from CLI and SDK context when omitted.")}),Kre=c.object({members:c.array(mJ).describe("Members visible within the selected organization.")}),xre=c.object({organizationId:c.string().min(1).optional().describe("Organization containing the member. Auto-filled from CLI and SDK context when omitted."),userId:c.string().min(1).describe("User ID of the member to update."),role:yr.describe("Role to assign.")}),Gre=c.object({member:mJ.describe("Updated organization member.")}),Jre=c.object({params:c.object({userId:c.string().min(1).describe("User ID of the member to remove.")}),query:c.object({organizationId:c.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})),Bre=c.object({removedUserId:c.string().min(1).describe("User ID removed from the organization.")}),WI=T({operationId:"members.list",description:"List members in an organization.",backend:"api",route:{method:"GET",path:"/members",tags:["Members"]},input:Ere,output:Kre,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"}]}}]}),MI=T({operationId:"members.updateRole",description:"Update a member's organization role.",backend:"api",route:{method:"PATCH",path:"/members/{userId}/role",tags:["Members"]},input:xre,output:Gre,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"}}}]}),YI=T({operationId:"members.remove",description:"Remove a member from an organization.",backend:"api",route:{method:"DELETE",path:"/members/{userId}",tags:["Members"],inputStructure:"detailed"},input:Jre,output:Bre,pagination:"none",async:"sync"}),Txe={list:WI.contract,updateRole:MI.contract,remove:YI.contract}});var vJ,kJ,qre,Hre,Wre,Mre,Yre,kc,Xre,Zre,Fre,XI,ZI,FI,QI,Dxe;var Cu=g(()=>{ve();_e();vJ=c.enum(["processing","completed","aborted","error"]),kJ=c.object({id:c.string().uuid(),threadId:c.string().uuid(),userMessageId:c.string().uuid().nullable(),assistantMessageId:c.string().uuid().nullable(),parentRunId:c.string().uuid().nullable(),workflowRunId:c.string().nullable(),status:vJ,source:c.enum(["app","api","mcp","slack","teams","linear","github","agent","cli"]),createdAt:c.string().datetime(),updatedAt:c.string().datetime(),completedAt:c.string().datetime().nullable()}),qre=c.object({projectId:c.string().uuid().optional().describe("Project ID to list runs for. Auto-filled from CLI and SDK context when omitted."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of runs to return per page."),cursor:c.string().datetime().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),Hre=c.object({runs:c.array(kJ),nextCursor:c.string().datetime().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Wre=c.object({threadId:c.string().uuid().describe("Thread ID to list runs for."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of runs to return per page."),cursor:c.string().datetime().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),Mre=c.object({runs:c.array(kJ),nextCursor:c.string().datetime().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Yre=c.object({runId:c.string().uuid().describe("Run ID returned by a deferred operation.")}),kc=c.object({completed:c.boolean().describe("Whether the run has reached a terminal status."),threadId:c.string().uuid().describe("Thread ID associated with the run."),runId:c.string().uuid().describe("Run ID for subsequent polling."),messageId:c.string().uuid().optional().describe("ID of the user message that triggered this run."),status:vJ.describe("Current run lifecycle status."),response:c.string().nullable().describe("Assistant response text when the run has completed.")}),Xre=kc.describe("Current run state and, when complete, the assistant response."),Zre=c.object({runId:c.string().uuid().describe("Run ID of the in-flight run to request cancellation for.")}),Fre=c.object({success:c.literal(!0).describe("Always true when the cancellation request was accepted.")}),XI=T({operationId:"runs.list",description:"List deferred runs within one project.",backend:"api",route:{method:"GET",path:"/runs",tags:["Runs"]},input:qre,output:Hre,pagination:"cursor",async:"sync"}),ZI=T({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:Wre,output:Mre,pagination:"cursor",async:"sync"}),FI=T({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:Yre,output:Xre,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}}]}),QI=T({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:Zre,output:Fre,pagination:"none",async:"sync",examples:[{name:"cancel-processing-run",input:{runId:"33333333-3333-4333-8333-333333333333"},output:{success:!0}}]}),Dxe={list:XI.contract,listForThread:ZI.contract,get:FI.contract,cancel:QI.contract}});var Lu=(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"]})},Du=(e,t,n)=>{if(e&&!t)n.addIssue({code:"custom",message:"ambientServiceRun requires an automationId",path:["ambientServiceRun"]})};var fJ,fc,Qre,Vre,eae,tae,nae,oae,iae,rae,aae,VI,cae,sae,hae,lae,uae,gae,dae,yae,bae,pae,mae,wae,eO,tO,nO,oO,iO,rO,IJ,vae,kae,fae,Iae,OJ,Oae,Pae,Sae,$ae,Tae,Aae,Jo="22222222-2222-4222-8222-222222222222",PJ="11111111-1111-4111-8111-111111111111",Cae="44444444-4444-4444-8444-444444444444",SJ="55555555-5555-4555-8555-555555555555",aO,cO,sO,hO,lO,Exe;var uO=g(()=>{ve();_e();Cu();fJ=c.enum(["slack","teams","linear","github","app","mcp","agent","api","cli"]),fc=c.object({id:c.string().uuid(),projectId:c.string().uuid(),title:c.string().nullable(),status:c.enum(["regular","archived"]),source:fJ.nullable(),createdAt:c.string().datetime(),updatedAt:c.string().datetime()}),Qre=c.object({type:c.literal("message"),message:c.string()}),Vre=c.object({type:c.literal("reasoning"),reasoning:c.string(),status:c.enum(["in_progress","complete"]).optional()}),eae=c.object({type:c.literal("tool_call"),name:c.string(),params:c.any().optional(),result:c.any().optional(),status:c.enum(["in_progress","success","error","unknown"]).optional(),toolCallId:c.string().optional(),durationMs:c.number().nonnegative().optional()}),tae=c.object({type:c.literal("artifact"),name:c.enum(["timeseries","table","log_detail","integration_required","alert_card","issue_card","mdx"]),data:c.any(),toolCallId:c.string().optional()}),nae=c.object({type:c.literal("fork"),sourceThreadId:c.string(),sourceMessageId:c.string(),sourceThreadTitle:c.string().nullable()}),oae=c.object({type:c.literal("summary"),summary:c.string()}),iae=c.object({type:c.literal("slack_context"),channelId:c.string(),isTruncated:c.boolean().optional(),messages:c.array(c.object({timestamp:c.string(),slackUserId:c.string().optional(),displayName:c.string(),text:c.string(),isBot:c.boolean(),files:c.array(c.object({name:c.string(),mimetype:c.string(),size:c.number().optional(),attachmentId:c.string().uuid().optional(),ingestionStatus:c.enum(["attached","unsupported","oversized","skipped","unavailable"]).optional()})).optional()}))}),rae=c.object({type:c.literal("teams_context"),conversationId:c.string(),isTruncated:c.boolean().optional(),messages:c.array(c.object({activityId:c.string().optional(),displayName:c.string(),text:c.string(),isBot:c.boolean(),createdDateTime:c.string().optional()}))}),aae=c.union([Qre,Vre,eae,tae,nae,oae,iae,rae]),VI=c.object({id:c.string().uuid(),role:c.enum(["user","assistant"]),content:c.array(aae),source:fJ,createdAt:c.string().datetime()}),cae=c.object({projectId:c.string().uuid().optional().describe("Project to list threads for. Auto-filled from CLI and SDK context when omitted."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of threads to return per page."),cursor:c.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:c.enum(["regular","archived"]).optional().describe("Filter by thread status. 'regular' returns active threads, 'archived' returns archived threads.")}),sae=c.object({threads:c.array(fc).describe("The page of threads matching the query."),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),hae=c.object({threadId:c.string().uuid().describe("Thread ID returned by threads.list or threads.create.")}),lae=c.object({thread:fc.describe("The requested thread."),messages:c.array(VI).describe("Messages currently stored on the thread in chronological order.")}),uae=c.object({projectId:c.string().uuid().optional().describe("Project to create the thread in. Auto-filled from CLI and SDK context when omitted."),message:c.string().min(1,"Message cannot be empty").describe("Initial user message that starts the thread."),wait:c.boolean().default(!0).describe("Whether the server should wait for the agent run before responding."),timeoutSeconds:c.coerce.number().int().min(1).max(20).default(20).describe("Maximum seconds to wait when wait is true before handing off to polling."),automationId:c.string().uuid().optional().describe("Internal automation context. Set by the Sazabi CLI when an automation script starts an agent run."),ambientServiceRun:c.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)=>{Lu(e.message,e.automationId,t),Du(e.ambientServiceRun,e.automationId,t)}),gae=kc.describe("Deferred run result for creating a thread."),dae=c.object({threadId:c.string().uuid().describe("Thread ID whose current processing status should be returned.")}),yae=c.object({status:c.enum(["idle","processing"]),lastRunStatus:c.enum(["error"]).nullable()}),bae=c.object({threadId:c.string().uuid().describe("Thread ID whose active run should be stopped.")}),pae=c.object({success:c.literal(!0).describe("Always true when the stop request was accepted.")}),mae=c.object({threadId:c.string().uuid().describe("Thread ID of the thread to update."),status:c.enum(["regular","archived"]).describe("New status for the thread. 'archived' hides the thread from the sidebar.")}),wae=c.object({thread:fc.describe("The updated thread.")}),eO=T({operationId:"threads.list",description:"List threads in a project, optionally filtered by status.",backend:"api",route:{method:"GET",path:"/threads",tags:["Threads"]},input:cae,output:sae,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}}]}),tO=T({operationId:"threads.get",description:"Get a thread and its messages.",backend:"api",route:{method:"GET",path:"/threads/{threadId}",tags:["Threads"]},input:hae,output:lae,pagination:"none",async:"sync"}),nO=T({operationId:"threads.getStatus",description:"Get the current processing status for a thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/status",tags:["Threads"]},input:dae,output:yae,pagination:"none",async:"sync",examples:[{name:"processing-thread",input:{threadId:"22222222-2222-4222-8222-222222222222"},output:{status:"processing",lastRunStatus:null}}]}),oO=T({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:bae,output:pae,pagination:"none",async:"sync",examples:[{name:"stop-processing-thread",input:{threadId:"22222222-2222-4222-8222-222222222222"},output:{success:!0}}]}),iO=T({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:uae,output:gae,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}}]}),rO=T({operationId:"threads.update",description:"Update a thread's status.",backend:"api",route:{method:"PATCH",path:"/threads/{threadId}",tags:["Threads"]},input:mae,output:wae,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=c.enum(["private","organization"]),vae=c.object({threadId:c.string().uuid().describe("Thread ID of the source thread to fork."),messageId:c.string().uuid().describe("Message ID in the source thread to fork from. The new thread copies messages up to and including this message.")}),kae=c.object({thread:fc.describe("The newly created forked thread.")}),fae=c.object({threadId:c.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.")}),Iae=c.object({thread:fc.describe("The updated thread."),visibility:IJ.describe("The thread's resulting visibility.")}),OJ=c.object({shareId:c.string().uuid().describe("Unique identifier for the snapshot."),threadId:c.string().uuid().describe("Thread the snapshot was taken from."),url:c.string().describe("Public read-only URL for the snapshot."),createdAt:c.string().datetime()}),Oae=c.object({threadId:c.string().uuid().describe("Thread ID to create a public read-only snapshot for.")}),Pae=c.object({share:OJ.describe("The created share link.")}),Sae=c.object({threadId:c.string().uuid().describe("Thread ID the snapshot belongs to."),shareId:c.string().uuid().describe("Snapshot ID to revoke.")}),$ae=c.void(),Tae=c.object({threadId:c.string().uuid().describe("Thread ID to list public snapshots for.")}),Aae=c.object({shares:c.array(OJ).describe("Active share links for the thread.")}),aO=T({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:vae,output:kae,pagination:"none",async:"sync",examples:[{name:"fork-from-message",input:{threadId:Jo,messageId:Cae},output:{thread:{id:"66666666-6666-4666-8666-666666666666",projectId:PJ,title:"API returning 500s (fork)",status:"regular",source:"api",createdAt:"2026-01-01T00:20:00.000Z",updatedAt:"2026-01-01T00:20:00.000Z"}}}]}),cO=T({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:fae,output:Iae,pagination:"none",async:"sync",examples:[{name:"make-private",input:{threadId:Jo,visibility:"private"},output:{thread:{id:Jo,projectId:PJ,title:"API returning 500s",status:"regular",source:"api",createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:30:00.000Z"},visibility:"private"}}]}),sO=T({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:Oae,output:Pae,pagination:"none",async:"sync",examples:[{name:"create-share-link",input:{threadId:Jo},output:{share:{shareId:SJ,threadId:Jo,url:"https://app.sazabi.com/share/55555555-5555-4555-8555-555555555555",createdAt:"2026-01-01T00:40:00.000Z"}}}]}),hO=T({operationId:"threads.listShareLinks",description:"List active public share links for a thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/share",tags:["Threads"]},input:Tae,output:Aae,pagination:"none",async:"sync",examples:[{name:"list-share-links",input:{threadId:Jo},output:{shares:[{shareId:SJ,threadId:Jo,url:"https://app.sazabi.com/share/55555555-5555-4555-8555-555555555555",createdAt:"2026-01-01T00:40:00.000Z"}]}}]}),lO=T({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:Sae,output:$ae,pagination:"none",async:"sync"}),Exe={list:eO.contract,get:tO.contract,getStatus:nO.contract,stop:oO.contract,create:iO.contract,update:rO.contract,fork:aO.contract,setVisibility:cO.contract,createShareLink:sO.contract,listShareLinks:hO.contract,revokeShareLink:lO.contract}});var Lae,Dae,zae,Nae,$J,TJ;var AJ=g(()=>{ve();_e();Cu();uO();Lae=c.object({threadId:c.string().uuid().describe("Thread ID to list messages for."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of messages to return per page."),cursor:c.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),Dae=c.object({messages:c.array(VI),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),zae=c.object({threadId:c.string().uuid().describe("Thread ID to append the message to."),message:c.string().min(1,"Message cannot be empty").describe("Message body to append to the thread."),wait:c.boolean().default(!0).describe("Whether the server should wait for the appended message run before responding."),timeoutSeconds:c.coerce.number().int().min(1).max(20).default(20).describe("Maximum seconds to wait when wait is true before handing off to polling."),automationId:c.string().uuid().optional().describe("Internal automation context. Set by the Sazabi CLI when an automation script starts an agent run."),ambientServiceRun:c.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)=>{Lu(e.message,e.automationId,t),Du(e.ambientServiceRun,e.automationId,t)}),Nae=kc.describe("Deferred run result for appending a message to an existing thread."),$J=T({operationId:"messages.list",description:"List messages in a thread with cursor pagination.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/messages",tags:["Messages"]},input:Lae,output:Dae,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}}]}),TJ=T({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:zae,output:Nae,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 CJ,_ae=(e,t)=>e.value===t.value&&e.label===t.label&&e.scope===t.scope&&e.role===t.role&&e.defaultOff===t.defaultOff,wt=(e)=>{for(let t of Object.values(e)){let n=CJ.get(t.value);if(n&&!_ae(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}`);CJ.set(t.value,t)}return e};var xn=g(()=>{CJ=new Map});var LJ;var DJ=g(()=>{xn();LJ=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 zJ;var NJ=g(()=>{xn();zJ=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 _J;var jJ=g(()=>{xn();_J=wt({INTEGRATION_CONNECTED:{value:"integration_connected",label:"Integration connected",scope:"org",defaultOff:!0},INTEGRATION_DISCONNECTED:{value:"integration_disconnected",label:"Integration disconnected",scope:"org"}})});var RJ;var UJ=g(()=>{xn();RJ=wt({ISSUE_TRIGGERED:{value:"issue_triggered",label:"Issue triggered",scope:"project"},ISSUE_RESOLVED:{value:"issue_resolved",label:"Issue resolved",scope:"project"},ISSUE_IGNORED:{value:"issue_ignored",label:"Issue ignored",scope:"project"}})});var EJ;var KJ=g(()=>{xn();EJ=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 xJ;var GJ=g(()=>{xn();xJ=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 JJ;var BJ=g(()=>{xn();JJ=wt({SECURITY_ALERT:{value:"security_alert",label:"Security alert",scope:"org",role:"admin"}})});var gO,it,qJ,HJ=(e)=>qJ.get(e)?.scope,dO=(e)=>{let t=qJ.get(e)?.label;if(t)return t;let n=e.replace(/_/g," ").trim();return n?n.charAt(0).toUpperCase()+n.slice(1):e},yO=(e)=>HJ(e)==="project";var Ic=g(()=>{DJ();NJ();jJ();UJ();KJ();GJ();BJ();xn();gO={...JJ,...EJ,..._J,...LJ,...RJ,...xJ,...zJ},it=Object.fromEntries(Object.entries(gO).map(([e,t])=>[e,t.value])),qJ=new Map(Object.values(gO).map((e)=>[e.value,e]))});var Oc,WJ,mGe,zu,wGe,Xt,bO,Pc,Bo,Rae;var Sc=g(()=>{Ic();Oc=Object.values(it),WJ=[it.BILLING_PLAN_UPGRADE_APPLIED,it.BILLING_PLAN_DOWNGRADE_SCHEDULED,it.BILLING_PLAN_DOWNGRADE_APPLIED,it.BILLING_CREDIT_BALANCE_LOW,it.BILLING_CREDIT_BALANCE_DEPLETED,it.BILLING_AUTO_TOP_UP_SETTINGS_CHANGED,it.BILLING_AUTO_TOP_UP_FAILED,it.BILLING_INVOICE_PAID,it.BILLING_NEGATIVE_BALANCE_COLLECTED,it.BILLING_NEGATIVE_BALANCE_COLLECTION_FAILED],mGe=new Set(WJ),zu=[it.ISSUE_TRIGGERED,it.ISSUE_RESOLVED,it.ISSUE_IGNORED,it.AUTOMATION_RUN_FAILED],wGe=new Set(zu),Xt={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"},bO=[Xt.IN_APP,Xt.SLACK,Xt.EMAIL,Xt.SMS],Pc=[Xt.SLACK_CHANNEL,Xt.TEAMS_CHANNEL,Xt.INCIDENT_IO,Xt.PAGERDUTY,Xt.ROOTLY,Xt.WEBHOOK],Bo=Object.values(Xt),Rae=[...Bo,"victorops"]});var br,Nu,qo;var MJ=g(()=>{ve();Sc();br=c.enum(Bo),Nu=c.enum(Pc),qo=c.enum(Oc)});var Uae,XJ,SGe,$Ge,TGe,YJ;var ZJ=g(()=>{Ic();Sc();Uae=zu.map((e)=>({notificationType:e,label:dO(e)})),XJ=[{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"}],SGe=new Set(bO),$Ge=new Set(Pc),TGe=Oc.filter(yO),YJ=new Set(XJ.map(({channel:e})=>e));if(YJ.size!==Bo.length||Bo.some((e)=>!YJ.has(e)))throw Error("Notification channel card definitions must represent every channel")});var FJ=g(()=>{Ic();Sc()});var pO=g(()=>{Ic();Sc();MJ();ZJ();FJ()});var xae,Gae,Jae,Bae,qae,Hae,Wae,mO,tJe;var QJ=g(()=>{pO();ve();_e();xae=c.enum(["ready","missing","degraded","unavailable"]),Gae=c.object({id:c.string(),label:c.string(),status:c.enum(["active","inactive","degraded"]),statusLabel:c.string()}),Jae=c.object({channel:br,name:c.string(),description:c.string(),scope:c.enum(["personal","project"]),enabled:c.boolean().nullable(),preferenceId:c.string().nullable(),prerequisite:c.object({status:xae,statusLabel:c.string(),message:c.string()}),action:c.object({label:c.string(),href:c.string()}).nullable(),destinations:c.array(Gae),destinationManagement:c.enum(["none","slack_channels","teams_channels","integration_connections","webhook_endpoints"]),canCreateDestinations:c.boolean(),supportedNotificationTypes:c.array(qo)}),Bae=c.object({channel:Nu,enabled:c.boolean(),preferenceId:c.string().nullable()}),qae=c.object({channel:Nu,notificationType:qo,enabled:c.boolean(),preferenceId:c.string()}),Hae=c.object({projectId:c.string().uuid().optional().describe("Project to inspect. Auto-filled from CLI and SDK context when omitted.")}),Wae=c.object({channelCards:c.array(Jae).length(10),channels:c.array(Bae),notificationTypePreferences:c.array(qae),issueNotificationMinSeverity:c.enum(["low","medium","high","critical"])}),mO=T({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:Hae,output:Wae,pagination:"none",async:"sync"}),tJe={getProject:mO.contract}});var VJ,Mae,Yae,wO,Xae,Zae,Fae,Qae,Vae,ece,tce,nce,vO,kO,fO,IO,aJe;var eB=g(()=>{pO();ve();_e();VJ=c.object({minSeverity:c.enum(["medium","high","critical"]).optional().describe("Suppress rules only: suppress deliveries whose issue severity is below this threshold."),component:c.string().min(1).max(200).optional().describe("Match the component the agent records on issue metadata (exact match).")}).strict(),Mae=c.object({id:c.string().uuid(),channel:c.string(),destinationKey:c.string(),displayName:c.string().nullable()}),Yae=c.object({channel:c.enum(["slack_channel","teams_channel"]),destinationKey:c.string().min(1).describe("The stable destination id — the Slack channel id or Microsoft Teams channel id. Must be one of the project's configured notification channels.")}),wO=c.object({id:c.string().uuid(),projectId:c.string().uuid(),channel:br.nullable().describe("Channel the rule targets; null means all channels."),notificationType:qo.nullable().describe("Notification type the rule targets; null means all types."),priority:c.number().int().describe("Route-pass evaluation order; suppress rules are unordered."),condition:VJ,outcome:c.enum(["suppress","route"]),enabled:c.boolean(),destinations:c.array(Mae),createdAt:c.string().datetime(),updatedAt:c.string().datetime()}),Xae=c.object({projectId:c.string().uuid().optional().describe("Project to inspect. Auto-filled from CLI and SDK context when omitted.")}),Zae=c.object({rules:c.array(wO)}),Fae=c.object({projectId:c.string().uuid().optional().describe("Project that owns the rule. Auto-filled from CLI and SDK context when omitted."),outcome:c.enum(["suppress","route"]).describe("suppress gates matching deliveries; route sends them to a destination subset."),channel:br.nullable().describe("Channel to target; null targets all channels (suppress rules only)."),notificationType:qo.nullable().describe("Notification type to target; null targets all types."),condition:VJ,destinations:c.array(Yae).default([]).describe("Route rules only: the destinations to select.")}),Qae=wO,Vae=c.object({projectId:c.string().uuid().optional().describe("Project that owns the rule. Auto-filled from CLI and SDK context when omitted."),ruleId:c.string().uuid().describe("The delivery rule to update."),enabled:c.boolean()}),ece=wO,tce=c.object({projectId:c.string().uuid().optional().describe("Project that owns the rule. Auto-filled from CLI and SDK context when omitted."),ruleId:c.string().uuid().describe("The delivery rule to delete.")}),nce=c.object({removed:c.boolean()}),vO=T({operationId:"notificationDeliveryRules.list",description:"List a project's notification delivery rules — delivery-side suppress and route conditions evaluated after the preference gates.",backend:"api",route:{method:"GET",path:"/notification-delivery-rules",tags:["Notification delivery rules"]},input:Xae,output:Zae,pagination:"none",async:"sync"}),kO=T({operationId:"notificationDeliveryRules.create",description:"Create a delivery rule. Suppress rules gate a channel below a severity threshold or for a component; route rules send matching notifications to a subset of the project's configured Slack and Microsoft Teams destinations.",backend:"api",route:{method:"POST",path:"/notification-delivery-rules",tags:["Notification delivery rules"]},input:Fae,output:Qae,pagination:"none",async:"sync"}),fO=T({operationId:"notificationDeliveryRules.setEnabled",description:"Enable or disable a delivery rule without deleting it.",backend:"api",route:{method:"POST",path:"/notification-delivery-rules/{ruleId}/set-enabled",tags:["Notification delivery rules"]},input:Vae,output:ece,pagination:"none",async:"sync"}),IO=T({operationId:"notificationDeliveryRules.delete",description:"Delete a delivery rule.",backend:"api",route:{method:"DELETE",path:"/notification-delivery-rules/{ruleId}",tags:["Notification delivery rules"]},input:tce,output:nce,pagination:"none",async:"sync"}),aJe={list:vO.contract,create:kO.contract,setEnabled:fO.contract,delete:IO.contract}});var OO,oce,ice,rce,ace,cce,sce,PO,hce,lce,SO,uce,gce,$O,dce,yce,TO,bce,pce,AO,lJe;var tB=g(()=>{ve();_e();OO=c.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"]),oce=c.enum(["needs-onboarding","blocked","ready"]),ice=c.enum(["incomplete","complete","skipped"]),rce=c.object({invitationId:c.string(),organizationId:c.string(),organizationName:c.string(),organizationSlug:c.string(),organizationImageUrl:c.string().nullable(),inviterName:c.string().nullable()}),ace=c.object({gate:oce,canonicalStep:OO.nullable(),organizationId:c.string().nullable(),projectId:c.string().nullable(),completionByStep:c.record(OO,ice),githubSkipped:c.boolean(),githubAppSkipped:c.boolean(),slackSkipped:c.boolean(),sampleIssueId:c.string().nullable(),actorRole:c.enum(["admin","member"]).nullable(),requiredStep:c.union([OO,c.literal("select-organization")]).nullable(),isCompleted:c.boolean(),onboardingRecommendationsThreadId:c.string().nullable(),hasOrganizations:c.boolean(),hasPaidBillingSubscription:c.boolean(),billingStepEnabled:c.boolean(),pendingInvitations:c.array(rce)}),cce=c.object({}),sce=c.object({onboarding:ace}),PO=T({operationId:"onboarding.getState",description:"Read onboarding progress for the authenticated user.",backend:"api",route:{method:"GET",path:"/onboarding/state",tags:["Onboarding"]},input:cce,output:sce,pagination:"none",async:"sync"}),hce=c.object({integration:c.enum(["github","slack"]).describe("Integration onboarding step to skip.")}),lce=c.object({skipped:c.literal(!0)}),SO=T({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:hce,output:lce,pagination:"none",async:"sync"}),uce=c.object({}),gce=c.object({skipped:c.literal(!0)}),$O=T({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:uce,output:gce,pagination:"none",async:"sync"}),dce=c.object({}),yce=c.object({skipped:c.literal(!0)}),TO=T({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:dce,output:yce,pagination:"none",async:"sync"}),bce=c.object({projectId:c.string().uuid().describe("Project that completed onboarding.")}),pce=c.object({completed:c.boolean()}),AO=T({operationId:"onboarding.finish",description:"Mark onboarding complete when all prerequisites are satisfied.",backend:"api",route:{method:"POST",path:"/onboarding/finish",tags:["Onboarding"]},input:bce,output:pce,pagination:"none",async:"sync"}),lJe={getState:PO.contract,skipIntegration:SO.contract,skipGithubAppInstallation:$O.contract,skipSampleIssue:TO.contract,finish:AO.contract}});var _u,mce,wce,vce,kce,fce,Ice,Oce,Pce,Sce,$ce,CO,LO,DO,zO,bJe;var nB=g(()=>{ve();_e();Au();_u=c.object({id:c.string().min(1),name:c.string(),slug:c.string(),logo:c.string().nullable().optional()}),mce=_u.extend({role:yr.optional()}),wce=c.object({}),vce=c.object({organizations:c.array(mce).describe("Organizations available to the current credential.")}),kce=c.object({organizationId:c.string().min(1).describe("Organization ID to fetch.")}),fce=c.object({organization:_u}),Ice=c.object({organizationId:c.string().min(1).describe("Organization ID to update. SDK and CLI callers can auto-fill this before dispatch."),name:c.string().trim().min(1).max(100).describe("New organization name.")}),Oce=c.object({organization:_u.describe("Updated organization.")}),Pce=c.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"),Sce=c.object({name:Pce.describe("Organization display name.")}),$ce=c.object({organization:_u}),CO=T({operationId:"organizations.create",description:"Create an organization for the authenticated user.",backend:"api",route:{method:"POST",path:"/organizations",tags:["Organizations"],successStatus:201},input:Sce,output:$ce,pagination:"none",async:"sync"}),LO=T({operationId:"organizations.list",description:"List organizations available to the current credential.",backend:"api",route:{method:"GET",path:"/organizations",tags:["Organizations"]},input:wce,output:vce,pagination:"none",async:"sync"}),DO=T({operationId:"organizations.get",description:"Get one organization by ID.",backend:"api",route:{method:"GET",path:"/organizations/{organizationId}",tags:["Organizations"]},input:kce,output:fce,pagination:"none",async:"sync"}),zO=T({operationId:"organizations.update",description:"Update one organization.",backend:"api",route:{method:"PATCH",path:"/organizations/{organizationId}",tags:["Organizations"]},input:Ice,output:Oce,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}}}]}),bJe={list:LO.contract,get:DO.contract,create:CO.contract,update:zO.contract}});var pr,$c,oB,iB,rB,aB,cB,sB,hB,ju,Ru,Uu,lB,uB,Eu,gB,dB,Ku,Tce;var NO=g(()=>{ve();_e();pr=c.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"]),$c=c.object({id:c.string().uuid(),organizationId:c.string().min(1),name:c.string(),region:pr}),oB=c.object({organizationId:c.string().min(1).optional().describe("Organization to list projects for. Auto-filled from CLI and SDK context when omitted.")}),iB=c.object({projects:c.array($c).describe("Projects visible within the selected organization.")}),rB=c.object({projectId:c.string().uuid().describe("Project ID to fetch.")}),aB=c.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"),cB=c.object({organizationId:c.string().min(1).optional().describe("Organization to create the project under. Auto-filled from CLI and SDK context when omitted."),name:aB.describe("Project name."),region:pr.optional().default("us-west-2").describe("AWS region where the new project should be created.")}),sB=c.object({project:$c}),hB=c.object({project:$c}),ju=T({operationId:"projects.list",description:"List projects in an organization.",backend:"api",route:{method:"GET",path:"/projects",tags:["Projects"]},input:oB,output:iB,pagination:"none",async:"sync"}),Ru=T({operationId:"projects.get",description:"Get one project by ID.",backend:"api",route:{method:"GET",path:"/projects/{projectId}",tags:["Projects"]},input:rB,output:hB,pagination:"none",async:"sync"}),Uu=T({operationId:"projects.create",description:"Create one project in an organization.",backend:"api",route:{method:"POST",path:"/projects",successStatus:201,tags:["Projects"]},input:cB,output:sB,pagination:"none",async:"sync"}),lB=c.object({projectId:c.string().uuid().describe("Project ID to update."),name:aB.optional().describe("New project name.")}),uB=c.object({project:$c}),Eu=T({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:lB,output:uB,pagination:"none",async:"sync"}),gB=c.object({projectId:c.string().uuid().describe("Project ID to delete.")}),dB=c.void(),Ku=T({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:gB,output:dB,pagination:"none",async:"sync"}),Tce={list:ju.contract,get:Ru.contract,create:Uu.contract,update:Eu.contract,delete:Ku.contract}});var yB,Ace,Cce,Lce,Dce,zce,_O,IJe;var bB=g(()=>{ve();_e();yB=c.enum(["open","merged","closed"]),Ace=c.enum(["review_required","approved","changes_requested"]),Cce=c.enum(["passing","failing","pending"]),Lce=c.object({id:c.string().uuid(),projectId:c.string().uuid(),repositoryFullName:c.string(),pullRequestId:c.string().describe("Provider-native pull request identifier (GitHub PR number or Bitbucket PR id), serialized as a string."),githubPullRequestId:c.number().int().describe("Deprecated: use pullRequestId. Numeric form of the provider-native pull request identifier; kept for backward compatibility."),title:c.string().nullable(),url:c.string().nullable(),status:yB.nullable(),reviewState:Ace.nullable(),checksState:Cce.nullable(),requestedByUserId:c.string().nullable(),authorLogin:c.string().nullable().describe("Forge login that authored the pull request (often the Sazabi app identity)."),githubAuthorLogin:c.string().nullable().describe("Deprecated: use authorLogin. Kept for backward compatibility."),threadId:c.string().uuid().nullable(),runId:c.string().uuid().nullable(),createdAt:c.string().datetime(),mergedAt:c.string().datetime().nullable(),closedAt:c.string().datetime().nullable()}),Dce=c.object({projectId:c.string().uuid().optional().describe("Project to list pull requests for. Auto-filled from CLI and SDK context when omitted."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of pull requests to return per page."),cursor:c.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:yB.optional().describe("Filter by pull request status (open, merged, or closed)."),repositoryFullName:c.string().trim().optional().describe("Filter by repository full name, for example owner/repo. Case-insensitive."),requestedByUserId:c.string().trim().optional().describe("Filter by the Sazabi user who requested the pull request. Pass 'me' to filter to the authenticated user.")}),zce=c.object({pullRequests:c.array(Lce),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),_O=T({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:Dce,output:zce,pagination:"cursor",async:"sync"}),IJe={list:_O.contract}});var pB,mB,wB,vB,kB,Tc;var jO=g(()=>{ve();_e();pB=c.enum(["data_source","mcp_connector","sandbox_cli","integration"]),mB=c.enum(["connected","recommended"]),wB=c.object({kind:pB.describe("What the recommendation targets: a data source, MCP connector, sandbox CLI, or integration."),targetId:c.string().describe("Exact catalog id for the kind (data source type, MCP provider id, sandbox CLI preset type, or integration provider id)."),status:mB.describe("Resolved live against current connections: connected (already set up) or recommended (suggested, not yet connected)."),roiScore:c.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:c.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.")}),vB=c.object({projectId:c.string().uuid().optional().describe("Project to list recommendations for. Auto-filled from CLI and SDK context when omitted.")}),kB=c.object({recommendations:c.array(wB).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).")}),Tc=T({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:vB,output:kB,pagination:"none",async:"sync"})});var fB,Nce,IB,xu,OB,PB,SB,$B,mr,TB,AB,CB,Gu,_ce;var RO=g(()=>{ve();_e();fB=c.object({type:c.string().describe("Preset type identifier."),label:c.string().describe("Human-readable display name."),executableNames:c.array(c.string()).describe("CLI binary names installed by this preset."),envVarKeys:c.array(c.string()).describe("Environment variables required for authentication."),setupSkill:c.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),Nce=c.object({}),IB=c.object({types:c.array(fB)}),xu=T({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:Nce,output:IB,pagination:"none",async:"sync"}),OB=c.enum(["github_app","personal_access_token","stored_credentials"]),PB=c.object({presetType:c.string().describe("Preset type identifier."),credentialSource:OB.describe("Authoritative credential source for the preset."),isSystemManaged:c.boolean().describe("Whether the connection follows an integration lifecycle."),fallbackConfigured:c.boolean().describe("Whether user-provided fallback credentials are stored for this preset."),envVarKeys:c.array(c.string()).describe("Stored environment variable names. Secret values are omitted.")}),SB=c.object({projectId:c.string().uuid().optional().describe("Project to inspect. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted.")}),$B=c.object({connections:c.array(PB)}),mr=T({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:SB,output:$B,pagination:"none",async:"sync"}),TB=c.object({key:c.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:c.string().max(10240).describe("Secret value. Encrypted at rest; never returned by any API response.")}),AB=c.object({projectId:c.string().uuid().optional().describe("Project to configure. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted."),presetType:c.string().min(1).describe("Preset type identifier (e.g. kubectl, aws, github)."),environmentVariables:c.array(TB).max(100).describe("Full set of env vars for this preset. Replaces any previously stored values for the preset.")}),CB=c.object({projectId:c.string().uuid().describe("Project the preset was written to."),presetType:c.string().describe("Preset type that was upserted."),envVarKeys:c.array(c.string()).describe("Env var key names now stored for this preset. Values are never returned.")}),Gu=T({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:AB,output:CB,pagination:"none",async:"sync"}),_ce={listConnections:mr.contract,listTypes:xu.contract,upsertPreset:Gu.contract}});var UO,LB,DB,zB,NB,wr,vr,jce;var EO=g(()=>{ve();_e();UO=c.object({projectId:c.string().uuid().optional().describe("Project to search within. Auto-filled from CLI and SDK context when omitted."),query:c.string().trim().min(1,"Query must be at least 1 character").max(500,"Query must be at most 500 characters"),limit:c.coerce.number().min(1).max(100).default(20).describe("Maximum number of search results to return."),page:c.coerce.number().min(1).default(1).describe("One-based page number.")}),LB=UO.extend({status:c.enum(["regular","archived"]).optional().describe("Optional thread status filter.")}),DB=UO.extend({threadId:c.string().uuid().optional().describe("Optional thread restriction for message search."),role:c.enum(["user","assistant"]).optional().describe("Optional message role filter.")}),zB=c.object({threads:c.array(c.object({id:c.string().uuid(),projectId:c.string().uuid().optional(),title:c.string(),status:c.enum(["regular","archived"]),labels:c.array(c.string()),createdAt:c.string().datetime(),updatedAt:c.string().datetime(),highlights:c.array(c.string()),score:c.number().optional()})),pagination:c.object({page:c.number(),limit:c.number(),totalResults:c.number(),totalPages:c.number()}).describe("Page-based pagination metadata for the current search result.")}),NB=c.object({messages:c.array(c.object({id:c.string().uuid(),threadId:c.string().uuid(),threadTitle:c.string(),role:c.enum(["user","assistant"]),content:c.string(),createdAt:c.string().datetime(),updatedAt:c.string().datetime(),highlights:c.array(c.string()),score:c.number().optional()})),pagination:c.object({page:c.number(),limit:c.number(),totalResults:c.number(),totalPages:c.number()}).describe("Page-based pagination metadata for the current search result.")}),wr=T({operationId:"search.threads",description:"Search threads within one project.",backend:"api",route:{method:"GET",path:"/search/threads",tags:["Search"]},input:LB,output:zB,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}}}]}),vr=T({operationId:"search.messages",description:"Search messages within one project.",backend:"api",route:{method:"GET",path:"/search/messages",tags:["Search"]},input:DB,output:NB,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}}}]}),jce={threads:wr.contract,messages:vr.contract}});var Ac,_B,jB,RB,UB,EB,KB,xB,GB,Ju,Bu,kr,qu,JB,KO,BB,qB,HB,WB,MB,Hu,Wu,Rce;var xO=g(()=>{ve();_e();Ac=c.object({id:c.string().uuid(),projectId:c.string().uuid(),name:c.string(),description:c.string().nullable(),currentStatus:c.enum(["operational","degraded","outage"]).describe("Current health status of this component."),firstSeenAt:c.string().datetime(),lastSeenAt:c.string().datetime(),deletedAt:c.string().datetime().nullable().describe("Timestamp when this component was deregistered, if any.")}),_B=c.object({projectId:c.string().uuid().optional().describe("Project to list status components for. Auto-filled from CLI and SDK context when omitted."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of components to return per page."),cursor:c.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),includeDeleted:c.union([c.boolean(),c.stringbool()]).default(!1).describe("When true, include removed components in the response.")}),jB=c.object({statusComponents:c.array(Ac),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),RB=c.object({componentId:c.string().uuid().describe("Status component ID to retrieve.")}),UB=c.object({statusComponent:Ac}),EB=c.object({projectId:c.string().uuid().optional().describe("Project to register the status component in. Auto-filled from CLI and SDK context when omitted."),name:c.string().trim().min(1,"Name is required").describe("Evidence-backed component name to register."),description:c.string().trim().min(1,"Description cannot be empty").optional().describe("Optional component description.")}),KB=c.object({statusComponent:Ac}),xB=c.object({componentId:c.string().uuid().describe("Status component ID to deregister."),reason:c.string().trim().min(1,"Reason cannot be empty").optional().describe("Optional reason for audit logging.")}),GB=c.object({statusComponent:Ac}),Ju=T({operationId:"statusComponents.list",description:"List status page components in a project.",backend:"api",route:{method:"GET",path:"/status-components",tags:["Status Components"]},input:_B,output:jB,pagination:"cursor",async:"sync"}),Bu=T({operationId:"statusComponents.get",description:"Get a single status component by ID.",backend:"api",route:{method:"GET",path:"/status-components/{componentId}",tags:["Status Components"]},input:RB,output:UB,pagination:"none",async:"sync"}),kr=T({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:EB,output:KB,pagination:"none",async:"sync"}),qu=T({operationId:"statusComponents.deregister",description:"Deregister a status page component. Deregistered components no longer appear on the status page.",backend:"api",route:{method:"POST",path:"/status-components/{componentId}/deregister",tags:["Status Components"]},input:xB,output:GB,pagination:"none",async:"sync"}),JB=c.enum(["degraded","outage"]).describe("Severity of a status-page incident. 'outage' marks the component down; 'degraded' marks partial impact."),KO=c.object({id:c.string().uuid(),componentId:c.string().uuid(),projectId:c.string().uuid(),severity:JB,summary:c.string().describe("Human-readable summary of the status-page issue."),startedAt:c.string().datetime().describe("When the incident began affecting the component."),resolvedAt:c.string().datetime().nullable().describe("When the incident was resolved, or null while ongoing.")}),BB=c.object({projectId:c.string().uuid().optional().describe("Project to list status-page issues for. Auto-filled from CLI and SDK context when omitted."),componentId:c.string().uuid().optional().describe("Restrict results to a single component."),activeOnly:c.union([c.boolean(),c.stringbool()]).default(!1).describe("When true, return only unresolved (ongoing) issues."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of issues to return per page."),cursor:c.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),qB=c.object({incidents:c.array(KO),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),HB=c.object({timestamp:c.string().datetime(),status:c.enum(["operational","degraded","outage","unknown"]).describe("Worst component status observed during this timeline bucket.")}),WB=c.object({componentId:c.string().uuid().describe("Status component to build the timeline for."),windowStart:c.string().datetime({offset:!0}).optional().describe("Start of the timeline window. Defaults to 7 days before windowEnd."),windowEnd:c.string().datetime({offset:!0}).optional().describe("End of the timeline window. Defaults to now.")}),MB=c.object({componentId:c.string().uuid(),windowStart:c.string().datetime(),windowEnd:c.string().datetime(),timeline:c.array(HB),incidents:c.array(KO)}),Hu=T({operationId:"statusComponents.incidents.list",description:"List status-page issues in a project.",backend:"api",route:{method:"GET",path:"/status-incidents",tags:["Status Components"]},input:BB,output:qB,pagination:"cursor",async:"sync"}),Wu=T({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:WB,output:MB,pagination:"none",async:"sync"}),Rce={list:Ju.contract,get:Bu.contract,register:kr.contract,deregister:qu.contract,incidents:{list:Hu.contract},timeline:Wu.contract}});var YB;var XB=g(()=>{YB=["onboarding","setup"]});var ZB,FB,QB,VB,Cc;var GO=g(()=>{XB();ve();_e();ZB=c.enum(YB),FB=c.object({id:c.string().describe("Unique task identifier (e.g. install_github_app)."),label:c.string().describe("Short human-readable task name."),description:c.string().describe("Explanation of what needs to be completed to satisfy this task."),instructions:c.string().describe("Step-by-step instructions for completing this task."),completed:c.boolean().describe("Whether the task has been completed."),completedAt:c.string().datetime().nullable().describe("ISO 8601 timestamp of when the task was completed, or null."),category:ZB.describe("Task category: onboarding (core setup steps) or setup (additional configuration).")}),QB=c.object({projectId:c.string().uuid().optional().describe("Project to list tasks for. Auto-filled from CLI and SDK context when omitted.")}),VB=c.object({tasks:c.array(FB).describe("All onboarding and setup tasks with their current completion status.")}),Cc=T({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:QB,output:VB,pagination:"none",async:"sync"})});var JO;var eq=g(()=>{zA();_A();Ok();w_();Ak();Dk();Nk();qI();Au();wJ();AJ();QJ();eB();tB();nB();NO();bB();jO();Cu();RO();EO();xO();GO();uO();JO={me:HI.contract,automations:{list:ev.contract,get:tv.contract,enable:nv.contract,disable:ov.contract,runs:{list:iv.contract,get:rv.contract,logs:av.contract}},logs:{query:Ji.contract,schema:Bi.contract,volume:qi.contract,patterns:Hi.contract,nativeQuery:Wi.contract,searchNatural:sl.contract},dataSources:{listTypes:_h.contract,listConnections:_i.contract,getConnection:jh.contract,listInstances:Rh.contract,getInstance:Uh.contract,createConnection:ji.contract,disconnectConnection:Bh.contract,listStreams:Eh.contract,listInstanceStreams:Kh.contract,createStream:xh.contract,getStream:Gh.contract,deleteStream:Jh.contract},integrations:{listProviders:b_.contract,listConnections:p_.contract,getConnection:m_.contract},notificationChannels:{getProject:mO.contract},notificationDeliveryRules:{list:vO.contract,create:kO.contract,setEnabled:fO.contract,delete:IO.contract},mcpConnectors:{listProviders:Tu.contract,list:ur.contract,get:gr.contract,details:dr.contract},sandboxPresets:{listConnections:mr.contract,listTypes:xu.contract,upsertPreset:Gu.contract},onboarding:{getState:PO.contract,skipIntegration:SO.contract,skipGithubAppInstallation:$O.contract,skipSampleIssue:TO.contract,finish:AO.contract},organizations:{list:LO.contract,get:DO.contract,create:CO.contract,update:zO.contract},members:{list:WI.contract,updateRole:MI.contract,remove:YI.contract},publicKeys:{list:Ui.contract,get:Ei.contract,ensureLogForwarding:Ki.contract,update:xi.contract,deactivate:Gi.contract},secretKeys:{list:ol.contract,get:il.contract,create:rl.contract,update:al.contract,delete:cl.contract},projects:{list:ju.contract,get:Ru.contract,create:Uu.contract,update:Eu.contract,delete:Ku.contract},search:{threads:wr.contract,messages:vr.contract},messages:{list:$J.contract,append:TJ.contract},threads:{list:eO.contract,get:tO.contract,getStatus:nO.contract,stop:oO.contract,create:iO.contract,update:rO.contract,fork:aO.contract,setVisibility:cO.contract,createShareLink:sO.contract,listShareLinks:hO.contract,revokeShareLink:lO.contract},runs:{list:XI.contract,listForThread:ZI.contract,get:FI.contract,cancel:QI.contract},pullRequests:{list:_O.contract},issues:{count:Yh.contract,create:Ri.contract,list:Wh.contract,search:Mh.contract,get:Xh.contract,resolve:Zh.contract,ignore:Fh.contract,reopen:Tk.contract,mute:Qh.contract,unmute:Vh.contract},billing:{getSummary:cv.contract,getUsage:sv.contract,listTransactions:hv.contract},tasks:{list:Cc.contract},recommendations:{list:Tc.contract},statusComponents:{list:Ju.contract,get:Bu.contract,register:kr.contract,deregister:qu.contract,incidents:{list:Hu.contract},timeline:Wu.contract}}});var Lc=g(()=>{$A();eq();Ok();Ak();Dk();Nk();qI();NO();jO();RO();EO();xO();GO()});var Uce="https://api.sazabi.com",Ece="x-sazabi-client-source",nq=(e)=>{return{streamRun:async(t)=>{return tq({options:e,path:`/runs/${encodeURIComponent(t.runId)}/stream`,cursor:t.cursor,signal:t.signal})},streamThread:async(t)=>{return tq({options:e,path:`/threads/${encodeURIComponent(t.threadId)}/stream`,cursor:t.cursor,signal:t.signal})}}},tq=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=Kce(e.options.apiBaseUrl,e.path,e.cursor);return Gce({url:i,token:n,clientSource:e.options.clientSource,initialCursor:e.cursor,signal:e.signal,fetch:t})},Kce=(e,t,n)=>{let i=xce(e??Uce),o=new URL(`${i}${t}`);if(n)o.searchParams.set(Yw,n);return o.toString()},xce=(e)=>{let t=e.replace(/\/+$/,"");return t.endsWith("/v1")?t:`${t}/v1`},Gce=async(e)=>{let t=[],n=[],i=!1,o=!1,r,a=e.initialCursor,s=new AbortController,h=(k)=>{if(i)return;i=!0,r=k;while(n.length>0)n.shift()?.({value:void 0,done:!0})},l=(k)=>{let O=n.shift();if(O){O({value:k,done:!1});return}t.push(k)},u=(k)=>{if(k.event===Zw){let A=Wce(k.data);if(A!==void 0)a=A;return}if(k.data===Fw){o=!0,s.abort(),h();return}let O=Mce(k.data);if(O)l(O)},d=()=>{o=!0,s.abort(),h()};if(e.signal)if(e.signal.aborted)o=!0,s.abort();else e.signal.addEventListener("abort",d,{once:!0});let y={[Symbol.asyncIterator](){return y},get cursor(){return a},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((k)=>{n.push(k)}).then((k)=>{if(k.done&&r)throw r;return k})},return:async()=>{return o=!0,s.abort(),h(),{value:void 0,done:!0}},throw:async(k)=>{throw o=!0,s.abort(),h(k instanceof Error?k:Error(String(k))),k},close:async()=>{o=!0,s.abort(),h()}};if(o)return h(),y;let b=await e.fetch(e.url,{method:Xw,headers:Jce(e.token,e.clientSource),signal:s.signal});if(await Bce(b))h();else qce(b,u).then(()=>h()).catch((k)=>{if(Xce(k)||o||e.signal?.aborted){h();return}h(Zce(k))});return y},Jce=(e,t)=>{return{accept:"text/event-stream",authorization:`Bearer ${e}`,...t?{[Ece]:t}:{}}},Bce=async(e)=>{if(e.status===204)return!0;if(e.ok&&e.body)return!1;let t=await Yce(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}`)},qce=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=Hce(t);try{while(!0){let a=await n.read();if(a.done)break;o+=i.decode(a.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 a of o.split(/\r\n|\r|\n/))r.line(a);r.flush()}finally{n.releaseLock()}},Hce=(e)=>{let t="message",n=[],i=()=>{t="message",n=[]},o=()=>{if(n.length===0){i();return}e({event:t,data:n.join(`
8556
+ `.trim()});import{dirname as bre,resolve as pre}from"node:path";import{fileURLToPath as mre}from"node:url";var wre,ex,tx,vre,nx,kre,fre,Ire,ox;var GI=g(()=>{ve();ul();wre=pre(bre(mre(import.meta.url)),"../../../skills"),ex=["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"],tx=c.enum(ex),vre=c.object({readOnlyToolNames:c.array(c.string()).optional(),blockedToolNames:c.array(c.string()).optional(),defaultUnavailableReason:c.enum(ll).optional(),allowWriteTools:c.boolean().optional()}),nx=c.object({registrationEndpoint:c.string().url(),tokenEndpointAuthMethod:c.enum(hl).optional(),includeScopesInRegistration:c.boolean().optional()}),kre=c.object({providerConfigKey:c.string().min(1),callbackPathSegment:c.string().min(1),authorizationUrl:c.string().url().optional(),tokenUrl:c.string().url().optional(),resourceUrl:c.string().url().optional(),useServerUrlAsResource:c.boolean().optional(),omitScopeFromAuthorizationUrl:c.boolean().optional(),authorizationUrlParams:c.record(c.string(),c.string()).optional(),dynamicClientRegistration:nx.optional()}),fre=c.object({label:c.string().min(1),serverUrl:c.string().url(),authorizationUrl:c.string().url().optional(),tokenUrl:c.string().url().optional(),resourceUrl:c.string().url().optional(),dynamicClientRegistration:nx.optional()}),Ire=c.object({id:c.string().min(1),title:c.string().min(1),description:c.string().optional(),body:c.string().min(1),fieldKeys:c.array(c.string().min(1)).optional(),imageKeys:c.array(c.string().min(1)).optional()}),ox=c.object({id:c.string().min(1),label:c.string().min(1),iconKey:tx,defaultServerUrl:c.string().url().nullable(),serverUrlPathSuffixMaxSegments:c.number().int().positive().optional(),transport:c.enum(jk),authMode:c.enum(Rk),availability:c.enum(Mi),oauth:kre.optional(),regions:c.array(fre).optional(),capabilityOverrides:vre.optional(),helpText:c.string().optional(),setupGroups:c.array(Ire).optional(),evidenceHints:c.array(c.string().min(1)).optional(),skill:c.string().min(1).optional(),setupSkill:c.string().min(1).optional(),scopesUserSelectable:c.boolean().optional()})});var C=(e)=>{return{...ox.parse(e),...e.getAvailableScopes?{getAvailableScopes:e.getAvailableScopes}:{},...e.getUrlConfiguration?{getUrlConfiguration:e.getUrlConfiguration}:{},...e.validateCredentials?{validateCredentials:e.validateCredentials}:{},...e.normalizeHeaders?{normalizeHeaders:e.normalizeHeaders}:{}}};var F=g(()=>{GI()});var ix;var rx=g(()=>{F();ix=C({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 ax;var cx=g(()=>{F();ax=C({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 sx;var hx=g(()=>{F();sx=C({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 lx;var ux=g(()=>{F();lx=C({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:q6,normalizeHeaders:J6})});var JI,D1e,gx;var BI=g(()=>{F();JI=[{value:"us-east-1",label:"US East (N. Virginia) — us-east-1"},{value:"eu-central-1",label:"Europe (Frankfurt) — eu-central-1"}],D1e=new Set(JI.map((e)=>e.value)),gx=C({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 dx;var yx=g(()=>{F();dx=C({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 bx;var px=g(()=>{F();bx=C({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 mx;var wx=g(()=>{F();mx=C({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:T6,normalizeHeaders:$6})});var vx;var kx=g(()=>{F();vx=C({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 fx;var Ix=g(()=>{F();fx=C({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:Q6})});var Ox;var Px=g(()=>{F();Ox=C({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 Sx;var $x=g(()=>{F();Sx=C({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 Tx;var Ax=g(()=>{F();Tx=C({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 Cx;var Lx=g(()=>{F();Cx=C({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 Dx;var zx=g(()=>{F();Dx=C({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 Nx;var _x=g(()=>{F();Nx=C({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:f6,normalizeHeaders:k6})});var jx;var Rx=g(()=>{F();jx=C({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:U6,normalizeHeaders:R6})});var Ux;var Ex=g(()=>{F();Ux=C({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:G6,normalizeHeaders:x6,skill:"context-dev",setupSkill:"context-dev-setup"})});var Kx;var xx=g(()=>{F();Kx=C({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 Gx;var Jx=g(()=>{F();Gx=C({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:v6,normalizeHeaders:m6})});var Bx;var qx=g(()=>{F();Bx=C({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 Hx;var Wx=g(()=>{F();Hx=C({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:w6,normalizeHeaders:p6})});var Mx;var Yx=g(()=>{F();Mx=C({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:j6,normalizeHeaders:_6,skill:"exa",setupSkill:"exa-setup"})});var Xx;var Zx=g(()=>{F();Xx=C({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:F6,normalizeHeaders:Z6})});var Fx;var Qx=g(()=>{F();Fx=C({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(`
8557
+ `)}],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 Vx;var e0=g(()=>{F();Vx=C({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 t0;var n0=g(()=>{F();t0=C({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 o0;var i0=g(()=>{F();o0=C({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 r0;var a0=g(()=>{F();r0=C({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 c0;var s0=g(()=>{F();c0=C({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 h0;var l0=g(()=>{F();h0=C({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:C6,normalizeHeaders:A6})});var u0;var g0=g(()=>{F();u0=C({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:H6,normalizeHeaders:B6})});var d0;var y0=g(()=>{F();d0=C({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 b0;var p0=g(()=>{F();b0=C({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 m0;var w0=g(()=>{F();m0=C({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 v0;var k0=g(()=>{F();v0=C({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 f0;var I0=g(()=>{F();f0=C({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 O0;var P0=g(()=>{F();O0=C({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 S0;var $0=g(()=>{F();S0=C({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 T0;var A0=g(()=>{F();T0=C({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 C0;var L0=g(()=>{F();C0=C({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 D0;var z0=g(()=>{F();D0=C({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 N0;var _0=g(()=>{F();N0=C({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 j0;var R0=g(()=>{F();j0=C({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 U0;var E0=g(()=>{F();U0=C({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 K0;var x0=g(()=>{F();K0=C({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:D6,normalizeHeaders:L6})});var G0;var J0=g(()=>{F();G0=C({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:K6,normalizeHeaders:E6,skill:"rentahuman",setupSkill:"rentahuman-setup"})});var B0;var q0=g(()=>{F();B0=C({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:M6,normalizeHeaders:W6,skill:"resend",setupSkill:"resend-setup"})});var H0;var W0=g(()=>{F();H0=C({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:X6,normalizeHeaders:Y6,skill:"respan",setupSkill:"respan-setup"})});var M0;var Y0=g(()=>{F();M0=C({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(`
8558
+ `)}],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 X0;var Z0=g(()=>{F();X0=C({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 F0;var Q0=g(()=>{F();F0=C({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:N6,normalizeHeaders:z6})});var V0;var eG=g(()=>{F();V0=C({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 tG;var nG=g(()=>{F();tG=C({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 oG;var iG=g(()=>{F();oG=C({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 rG;var aG=g(()=>{F();rG=C({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:P6,normalizeHeaders:O6,skill:"the-context-company",setupSkill:"the-context-company-setup"})});var cG;var sG=g(()=>{F();cG=C({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 hG;var lG=g(()=>{F();hG=C({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:S6,normalizeHeaders:I6,skill:"x",setupSkill:"x-setup"})});var uG,VUe;var gG=g(()=>{rx();cx();hx();ux();BI();BI();yx();px();wx();kx();Ix();Px();$x();Ax();Lx();zx();_x();Rx();Ex();xx();Jx();qx();Wx();Yx();Zx();Qx();e0();n0();i0();a0();s0();l0();g0();y0();p0();w0();k0();I0();P0();$0();A0();L0();z0();_0();R0();E0();x0();J0();q0();W0();Y0();Z0();Q0();eG();nG();iG();aG();sG();lG();uG=[tG,Gx,Bx,ix,ax,sx,lx,gx,dx,bx,mx,vx,fx,Ox,Tx,Cx,Dx,Nx,Sx,jx,Ux,Hx,Mx,Xx,Fx,Vx,t0,o0,r0,c0,h0,u0,d0,b0,m0,v0,f0,O0,S0,T0,C0,D0,N0,j0,U0,G0,K0,B0,H0,M0,X0,F0,V0,oG,rG,cG,hG,Kx],VUe=new Map(uG.map((e)=>[e.id,e]))});var dG=()=>{};var yG=()=>{};var bG=()=>{};var pG=()=>{};var mG=()=>{};var wG=()=>{};var vG=()=>{};var kG=()=>{};var fG=()=>{};var IG=()=>{};var OG=()=>{};var PG=()=>{};var SG=()=>{};var $G=()=>{};var TG=()=>{};var AG=()=>{};var CG=()=>{};var LG=()=>{};var DG=()=>{};var zG=()=>{};var NG=()=>{};var _G=()=>{};var jG=()=>{};var RG=()=>{};var UG=()=>{};var EG=()=>{};var KG=()=>{};var xG=()=>{};var GG=()=>{};var JG=()=>{};var BG=()=>{};var qG=()=>{};var HG=()=>{};var WG=()=>{};var MG=()=>{};var YG=()=>{};var XG=()=>{};var ZG=()=>{};var FG=()=>{};var QG=()=>{};var VG=g(()=>{dG();yG();bG();pG();mG();wG();vG();kG();fG();IG();OG();PG();SG();$G();TG();AG();CG();LG();DG();zG();NG();_G();jG();RG();UG();EG();KG();xG();GG();JG();BG();qG();HG();WG();MG();YG();XG();ZG();FG();QG()});var eJ=()=>{};var tJ=()=>{};var nJ=g(()=>{Pj();ul();b6();V6();gG();GI();VG();eJ();tJ()});var oJ,$re,iJ,Tre,rJ,Are,aJ,cJ,$u,sJ,hJ,lJ,ur,uJ,gJ,gr,dJ,yJ,dr,bJ,Cre,pJ,Tu,Lre;var qI=g(()=>{nJ();ve();_e();oJ=["configured","authorizing","connected","error"],$re=c.enum(oJ),iJ=["preset","custom"],Tre=c.enum(iJ),rJ=["streamable-http","sse"],Are=c.enum(rJ),aJ=["none","headers","oauth","aws-sigv4"],cJ=c.enum(aJ),$u=c.object({connectionId:c.string().uuid().describe("Connection ID."),connectionKey:c.string().describe("Stable key used to reference this connector in tool calls."),providerId:c.string().describe('Provider identifier, e.g. "linear".'),displayName:c.string().describe("Human-readable connector name."),source:Tre.describe("Whether the connector is a built-in preset or a custom server."),installStatus:$re.describe("Current connection lifecycle status."),authMode:cJ.describe("Authentication mode."),transport:Are.describe("Transport protocol."),serverUrl:c.string().describe("MCP server URL."),readOnly:c.boolean().describe("Whether the connector is restricted to read-only tools."),management:xk.describe("Lifecycle owner and supported connector mutations."),enabledToolCount:c.number().int().nonnegative().describe("Number of tools enabled and available for this connector."),connectedAt:c.string().datetime().nullable().describe("When the connector last became connected, if ever."),createdAt:c.string().datetime(),updatedAt:c.string().datetime()}),sJ=c.object({name:c.string().describe("Tool name as invoked."),title:c.string().describe("Human-readable tool title."),description:c.string().describe("Tool description."),isReadOnly:c.boolean().describe("Whether the tool is considered read-only."),enabled:c.boolean().describe("Whether the tool is enabled and available given the connector config.")}),hJ=c.object({projectId:c.string().uuid().optional().describe("Project to list connectors for. Auto-filled from SDK context when omitted."),connectedOnly:c.boolean().optional().describe("When true, only return connectors that are connected.")}),lJ=c.object({connectors:c.array($u)}),ur=T({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:hJ,output:lJ,pagination:"none",async:"sync"}),uJ=c.object({connectionId:c.string().uuid().describe("Connection ID to fetch."),projectId:c.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted.")}),gJ=c.object({connector:$u}),gr=T({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:uJ,output:gJ,pagination:"none",async:"sync"}),dJ=c.object({connectionId:c.string().uuid().describe("Connection ID to inspect."),projectId:c.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted.")}),yJ=c.object({connector:$u,tools:c.array(sJ)}),dr=T({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:dJ,output:yJ,pagination:"none",async:"sync"}),bJ=c.object({providerId:c.string().describe('Provider identifier, e.g. "linear".'),label:c.string().describe("Human-readable provider name."),authMode:cJ.describe("Authentication mode."),availability:c.enum(Mi).describe("Whether the provider is enabled or coming soon."),setupSkill:c.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),Cre=c.object({}),pJ=c.object({providers:c.array(bJ)}),Tu=T({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:Cre,output:pJ,pagination:"none",async:"sync"}),Lre={list:ur.contract,get:gr.contract,details:dr.contract,listProviders:Tu.contract}});var yr,Dre,zre,Nre,_re,jre,Rre,Ure,HI,I0e;var Au=g(()=>{ve();_e();yr=c.enum(["admin","member"]),Dre=c.object({id:c.string().min(1),name:c.string(),slug:c.string(),logo:c.string().nullable().optional(),role:yr}),zre=c.object({id:c.string().min(1),name:c.string().nullable(),email:c.string().email()}),Nre=c.object({credentialType:c.literal("user"),user:zre,activeOrganizationId:c.string().min(1).nullable(),organizations:c.array(Dre).describe("Organizations the user belongs to, including membership role.")}),_re=c.object({credentialType:c.literal("secret"),organization:c.object({id:c.string().min(1),name:c.string(),slug:c.string(),logo:c.string().nullable().optional()}),keyName:c.string()}),jre=c.object({credentialType:c.literal("partner"),superorganization:c.object({id:c.string().uuid(),name:c.string()})}),Rre=c.object({}),Ure=c.discriminatedUnion("credentialType",[Nre,_re,jre]),HI=T({operationId:"me.get",description:"Return the identity and available context for the current credential.",backend:"api",route:{method:"GET",path:"/me",tags:["Auth"]},input:Rre,output:Ure,pagination:"none",async:"sync"}),I0e=HI.contract});var mJ,Ere,Kre,xre,Gre,Jre,Bre,WI,MI,YI,T0e;var wJ=g(()=>{ve();_e();Au();mJ=c.object({membershipId:c.string().min(1).describe("Organization membership record ID."),userId:c.string().min(1).describe("User ID for the organization member."),name:c.string().nullable().describe("Display name for the member, when available."),email:c.string().email().describe("Email address for the member."),imageUrl:c.string().nullable().describe("Profile image URL for the member, when available."),role:yr.describe("Organization role."),createdAt:c.string().datetime().describe("When the membership was created.")}),Ere=c.object({organizationId:c.string().min(1).optional().describe("Organization to list members for. Auto-filled from CLI and SDK context when omitted.")}),Kre=c.object({members:c.array(mJ).describe("Members visible within the selected organization.")}),xre=c.object({organizationId:c.string().min(1).optional().describe("Organization containing the member. Auto-filled from CLI and SDK context when omitted."),userId:c.string().min(1).describe("User ID of the member to update."),role:yr.describe("Role to assign.")}),Gre=c.object({member:mJ.describe("Updated organization member.")}),Jre=c.object({params:c.object({userId:c.string().min(1).describe("User ID of the member to remove.")}),query:c.object({organizationId:c.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})),Bre=c.object({removedUserId:c.string().min(1).describe("User ID removed from the organization.")}),WI=T({operationId:"members.list",description:"List members in an organization.",backend:"api",route:{method:"GET",path:"/members",tags:["Members"]},input:Ere,output:Kre,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"}]}}]}),MI=T({operationId:"members.updateRole",description:"Update a member's organization role.",backend:"api",route:{method:"PATCH",path:"/members/{userId}/role",tags:["Members"]},input:xre,output:Gre,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"}}}]}),YI=T({operationId:"members.remove",description:"Remove a member from an organization.",backend:"api",route:{method:"DELETE",path:"/members/{userId}",tags:["Members"],inputStructure:"detailed"},input:Jre,output:Bre,pagination:"none",async:"sync"}),T0e={list:WI.contract,updateRole:MI.contract,remove:YI.contract}});var vJ,kJ,qre,Hre,Wre,Mre,Yre,kc,Xre,Zre,Fre,XI,ZI,FI,QI,D0e;var Cu=g(()=>{ve();_e();vJ=c.enum(["processing","completed","aborted","error"]),kJ=c.object({id:c.string().uuid(),threadId:c.string().uuid(),userMessageId:c.string().uuid().nullable(),assistantMessageId:c.string().uuid().nullable(),parentRunId:c.string().uuid().nullable(),workflowRunId:c.string().nullable(),status:vJ,source:c.enum(["app","api","mcp","slack","teams","linear","github","agent","cli"]),createdAt:c.string().datetime(),updatedAt:c.string().datetime(),completedAt:c.string().datetime().nullable()}),qre=c.object({projectId:c.string().uuid().optional().describe("Project ID to list runs for. Auto-filled from CLI and SDK context when omitted."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of runs to return per page."),cursor:c.string().datetime().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),Hre=c.object({runs:c.array(kJ),nextCursor:c.string().datetime().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Wre=c.object({threadId:c.string().uuid().describe("Thread ID to list runs for."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of runs to return per page."),cursor:c.string().datetime().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),Mre=c.object({runs:c.array(kJ),nextCursor:c.string().datetime().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Yre=c.object({runId:c.string().uuid().describe("Run ID returned by a deferred operation.")}),kc=c.object({completed:c.boolean().describe("Whether the run has reached a terminal status."),threadId:c.string().uuid().describe("Thread ID associated with the run."),runId:c.string().uuid().describe("Run ID for subsequent polling."),messageId:c.string().uuid().optional().describe("ID of the user message that triggered this run."),status:vJ.describe("Current run lifecycle status."),response:c.string().nullable().describe("Assistant response text when the run has completed.")}),Xre=kc.describe("Current run state and, when complete, the assistant response."),Zre=c.object({runId:c.string().uuid().describe("Run ID of the in-flight run to request cancellation for.")}),Fre=c.object({success:c.literal(!0).describe("Always true when the cancellation request was accepted.")}),XI=T({operationId:"runs.list",description:"List deferred runs within one project.",backend:"api",route:{method:"GET",path:"/runs",tags:["Runs"]},input:qre,output:Hre,pagination:"cursor",async:"sync"}),ZI=T({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:Wre,output:Mre,pagination:"cursor",async:"sync"}),FI=T({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:Yre,output:Xre,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}}]}),QI=T({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:Zre,output:Fre,pagination:"none",async:"sync",examples:[{name:"cancel-processing-run",input:{runId:"33333333-3333-4333-8333-333333333333"},output:{success:!0}}]}),D0e={list:XI.contract,listForThread:ZI.contract,get:FI.contract,cancel:QI.contract}});var Lu=(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"]})},Du=(e,t,n)=>{if(e&&!t)n.addIssue({code:"custom",message:"ambientServiceRun requires an automationId",path:["ambientServiceRun"]})};var fJ,fc,Qre,Vre,eae,tae,nae,oae,iae,rae,aae,VI,cae,sae,hae,lae,uae,gae,dae,yae,bae,pae,mae,wae,eO,tO,nO,oO,iO,rO,IJ,vae,kae,fae,Iae,OJ,Oae,Pae,Sae,$ae,Tae,Aae,Jo="22222222-2222-4222-8222-222222222222",PJ="11111111-1111-4111-8111-111111111111",Cae="44444444-4444-4444-8444-444444444444",SJ="55555555-5555-4555-8555-555555555555",aO,cO,sO,hO,lO,E0e;var uO=g(()=>{ve();_e();Cu();fJ=c.enum(["slack","teams","linear","github","app","mcp","agent","api","cli"]),fc=c.object({id:c.string().uuid(),projectId:c.string().uuid(),title:c.string().nullable(),status:c.enum(["regular","archived"]),source:fJ.nullable(),createdAt:c.string().datetime(),updatedAt:c.string().datetime()}),Qre=c.object({type:c.literal("message"),message:c.string()}),Vre=c.object({type:c.literal("reasoning"),reasoning:c.string(),status:c.enum(["in_progress","complete"]).optional()}),eae=c.object({type:c.literal("tool_call"),name:c.string(),params:c.any().optional(),result:c.any().optional(),status:c.enum(["in_progress","success","error","unknown"]).optional(),toolCallId:c.string().optional(),durationMs:c.number().nonnegative().optional()}),tae=c.object({type:c.literal("artifact"),name:c.enum(["timeseries","table","log_detail","integration_required","alert_card","issue_card","mdx"]),data:c.any(),toolCallId:c.string().optional()}),nae=c.object({type:c.literal("fork"),sourceThreadId:c.string(),sourceMessageId:c.string(),sourceThreadTitle:c.string().nullable()}),oae=c.object({type:c.literal("summary"),summary:c.string()}),iae=c.object({type:c.literal("slack_context"),channelId:c.string(),isTruncated:c.boolean().optional(),messages:c.array(c.object({timestamp:c.string(),slackUserId:c.string().optional(),displayName:c.string(),text:c.string(),isBot:c.boolean(),files:c.array(c.object({name:c.string(),mimetype:c.string(),size:c.number().optional(),attachmentId:c.string().uuid().optional(),ingestionStatus:c.enum(["attached","unsupported","oversized","skipped","unavailable"]).optional()})).optional()}))}),rae=c.object({type:c.literal("teams_context"),conversationId:c.string(),isTruncated:c.boolean().optional(),messages:c.array(c.object({activityId:c.string().optional(),displayName:c.string(),text:c.string(),isBot:c.boolean(),createdDateTime:c.string().optional()}))}),aae=c.union([Qre,Vre,eae,tae,nae,oae,iae,rae]),VI=c.object({id:c.string().uuid(),role:c.enum(["user","assistant"]),content:c.array(aae),source:fJ,createdAt:c.string().datetime()}),cae=c.object({projectId:c.string().uuid().optional().describe("Project to list threads for. Auto-filled from CLI and SDK context when omitted."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of threads to return per page."),cursor:c.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:c.enum(["regular","archived"]).optional().describe("Filter by thread status. 'regular' returns active threads, 'archived' returns archived threads.")}),sae=c.object({threads:c.array(fc).describe("The page of threads matching the query."),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),hae=c.object({threadId:c.string().uuid().describe("Thread ID returned by threads.list or threads.create.")}),lae=c.object({thread:fc.describe("The requested thread."),messages:c.array(VI).describe("Messages currently stored on the thread in chronological order.")}),uae=c.object({projectId:c.string().uuid().optional().describe("Project to create the thread in. Auto-filled from CLI and SDK context when omitted."),message:c.string().min(1,"Message cannot be empty").describe("Initial user message that starts the thread."),wait:c.boolean().default(!0).describe("Whether the server should wait for the agent run before responding."),timeoutSeconds:c.coerce.number().int().min(1).max(20).default(20).describe("Maximum seconds to wait when wait is true before handing off to polling."),automationId:c.string().uuid().optional().describe("Internal automation context. Set by the Sazabi CLI when an automation script starts an agent run."),ambientServiceRun:c.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)=>{Lu(e.message,e.automationId,t),Du(e.ambientServiceRun,e.automationId,t)}),gae=kc.describe("Deferred run result for creating a thread."),dae=c.object({threadId:c.string().uuid().describe("Thread ID whose current processing status should be returned.")}),yae=c.object({status:c.enum(["idle","processing"]),lastRunStatus:c.enum(["error"]).nullable()}),bae=c.object({threadId:c.string().uuid().describe("Thread ID whose active run should be stopped.")}),pae=c.object({success:c.literal(!0).describe("Always true when the stop request was accepted.")}),mae=c.object({threadId:c.string().uuid().describe("Thread ID of the thread to update."),status:c.enum(["regular","archived"]).describe("New status for the thread. 'archived' hides the thread from the sidebar.")}),wae=c.object({thread:fc.describe("The updated thread.")}),eO=T({operationId:"threads.list",description:"List threads in a project, optionally filtered by status.",backend:"api",route:{method:"GET",path:"/threads",tags:["Threads"]},input:cae,output:sae,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}}]}),tO=T({operationId:"threads.get",description:"Get a thread and its messages.",backend:"api",route:{method:"GET",path:"/threads/{threadId}",tags:["Threads"]},input:hae,output:lae,pagination:"none",async:"sync"}),nO=T({operationId:"threads.getStatus",description:"Get the current processing status for a thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/status",tags:["Threads"]},input:dae,output:yae,pagination:"none",async:"sync",examples:[{name:"processing-thread",input:{threadId:"22222222-2222-4222-8222-222222222222"},output:{status:"processing",lastRunStatus:null}}]}),oO=T({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:bae,output:pae,pagination:"none",async:"sync",examples:[{name:"stop-processing-thread",input:{threadId:"22222222-2222-4222-8222-222222222222"},output:{success:!0}}]}),iO=T({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:uae,output:gae,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}}]}),rO=T({operationId:"threads.update",description:"Update a thread's status.",backend:"api",route:{method:"PATCH",path:"/threads/{threadId}",tags:["Threads"]},input:mae,output:wae,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=c.enum(["private","organization"]),vae=c.object({threadId:c.string().uuid().describe("Thread ID of the source thread to fork."),messageId:c.string().uuid().describe("Message ID in the source thread to fork from. The new thread copies messages up to and including this message.")}),kae=c.object({thread:fc.describe("The newly created forked thread.")}),fae=c.object({threadId:c.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.")}),Iae=c.object({thread:fc.describe("The updated thread."),visibility:IJ.describe("The thread's resulting visibility.")}),OJ=c.object({shareId:c.string().uuid().describe("Unique identifier for the snapshot."),threadId:c.string().uuid().describe("Thread the snapshot was taken from."),url:c.string().describe("Public read-only URL for the snapshot."),createdAt:c.string().datetime()}),Oae=c.object({threadId:c.string().uuid().describe("Thread ID to create a public read-only snapshot for.")}),Pae=c.object({share:OJ.describe("The created share link.")}),Sae=c.object({threadId:c.string().uuid().describe("Thread ID the snapshot belongs to."),shareId:c.string().uuid().describe("Snapshot ID to revoke.")}),$ae=c.void(),Tae=c.object({threadId:c.string().uuid().describe("Thread ID to list public snapshots for.")}),Aae=c.object({shares:c.array(OJ).describe("Active share links for the thread.")}),aO=T({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:vae,output:kae,pagination:"none",async:"sync",examples:[{name:"fork-from-message",input:{threadId:Jo,messageId:Cae},output:{thread:{id:"66666666-6666-4666-8666-666666666666",projectId:PJ,title:"API returning 500s (fork)",status:"regular",source:"api",createdAt:"2026-01-01T00:20:00.000Z",updatedAt:"2026-01-01T00:20:00.000Z"}}}]}),cO=T({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:fae,output:Iae,pagination:"none",async:"sync",examples:[{name:"make-private",input:{threadId:Jo,visibility:"private"},output:{thread:{id:Jo,projectId:PJ,title:"API returning 500s",status:"regular",source:"api",createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:30:00.000Z"},visibility:"private"}}]}),sO=T({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:Oae,output:Pae,pagination:"none",async:"sync",examples:[{name:"create-share-link",input:{threadId:Jo},output:{share:{shareId:SJ,threadId:Jo,url:"https://app.sazabi.com/share/55555555-5555-4555-8555-555555555555",createdAt:"2026-01-01T00:40:00.000Z"}}}]}),hO=T({operationId:"threads.listShareLinks",description:"List active public share links for a thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/share",tags:["Threads"]},input:Tae,output:Aae,pagination:"none",async:"sync",examples:[{name:"list-share-links",input:{threadId:Jo},output:{shares:[{shareId:SJ,threadId:Jo,url:"https://app.sazabi.com/share/55555555-5555-4555-8555-555555555555",createdAt:"2026-01-01T00:40:00.000Z"}]}}]}),lO=T({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:Sae,output:$ae,pagination:"none",async:"sync"}),E0e={list:eO.contract,get:tO.contract,getStatus:nO.contract,stop:oO.contract,create:iO.contract,update:rO.contract,fork:aO.contract,setVisibility:cO.contract,createShareLink:sO.contract,listShareLinks:hO.contract,revokeShareLink:lO.contract}});var Lae,Dae,zae,Nae,$J,TJ;var AJ=g(()=>{ve();_e();Cu();uO();Lae=c.object({threadId:c.string().uuid().describe("Thread ID to list messages for."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of messages to return per page."),cursor:c.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),Dae=c.object({messages:c.array(VI),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),zae=c.object({threadId:c.string().uuid().describe("Thread ID to append the message to."),message:c.string().min(1,"Message cannot be empty").describe("Message body to append to the thread."),wait:c.boolean().default(!0).describe("Whether the server should wait for the appended message run before responding."),timeoutSeconds:c.coerce.number().int().min(1).max(20).default(20).describe("Maximum seconds to wait when wait is true before handing off to polling."),automationId:c.string().uuid().optional().describe("Internal automation context. Set by the Sazabi CLI when an automation script starts an agent run."),ambientServiceRun:c.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)=>{Lu(e.message,e.automationId,t),Du(e.ambientServiceRun,e.automationId,t)}),Nae=kc.describe("Deferred run result for appending a message to an existing thread."),$J=T({operationId:"messages.list",description:"List messages in a thread with cursor pagination.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/messages",tags:["Messages"]},input:Lae,output:Dae,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}}]}),TJ=T({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:zae,output:Nae,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 CJ,_ae=(e,t)=>e.value===t.value&&e.label===t.label&&e.scope===t.scope&&e.role===t.role&&e.defaultOff===t.defaultOff,wt=(e)=>{for(let t of Object.values(e)){let n=CJ.get(t.value);if(n&&!_ae(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}`);CJ.set(t.value,t)}return e};var xn=g(()=>{CJ=new Map});var LJ;var DJ=g(()=>{xn();LJ=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 zJ;var NJ=g(()=>{xn();zJ=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 _J;var jJ=g(()=>{xn();_J=wt({INTEGRATION_CONNECTED:{value:"integration_connected",label:"Integration connected",scope:"org",defaultOff:!0},INTEGRATION_DISCONNECTED:{value:"integration_disconnected",label:"Integration disconnected",scope:"org"}})});var RJ;var UJ=g(()=>{xn();RJ=wt({ISSUE_TRIGGERED:{value:"issue_triggered",label:"Issue triggered",scope:"project"},ISSUE_RESOLVED:{value:"issue_resolved",label:"Issue resolved",scope:"project"},ISSUE_IGNORED:{value:"issue_ignored",label:"Issue ignored",scope:"project"}})});var EJ;var KJ=g(()=>{xn();EJ=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 xJ;var GJ=g(()=>{xn();xJ=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 JJ;var BJ=g(()=>{xn();JJ=wt({SECURITY_ALERT:{value:"security_alert",label:"Security alert",scope:"org",role:"admin"}})});var gO,it,qJ,HJ=(e)=>qJ.get(e)?.scope,dO=(e)=>{let t=qJ.get(e)?.label;if(t)return t;let n=e.replace(/_/g," ").trim();return n?n.charAt(0).toUpperCase()+n.slice(1):e},yO=(e)=>HJ(e)==="project";var Ic=g(()=>{DJ();NJ();jJ();UJ();KJ();GJ();BJ();xn();gO={...JJ,...EJ,..._J,...LJ,...RJ,...xJ,...zJ},it=Object.fromEntries(Object.entries(gO).map(([e,t])=>[e,t.value])),qJ=new Map(Object.values(gO).map((e)=>[e.value,e]))});var Oc,WJ,mGe,zu,wGe,Xt,bO,Pc,Bo,Rae;var Sc=g(()=>{Ic();Oc=Object.values(it),WJ=[it.BILLING_PLAN_UPGRADE_APPLIED,it.BILLING_PLAN_DOWNGRADE_SCHEDULED,it.BILLING_PLAN_DOWNGRADE_APPLIED,it.BILLING_CREDIT_BALANCE_LOW,it.BILLING_CREDIT_BALANCE_DEPLETED,it.BILLING_AUTO_TOP_UP_SETTINGS_CHANGED,it.BILLING_AUTO_TOP_UP_FAILED,it.BILLING_INVOICE_PAID,it.BILLING_NEGATIVE_BALANCE_COLLECTED,it.BILLING_NEGATIVE_BALANCE_COLLECTION_FAILED],mGe=new Set(WJ),zu=[it.ISSUE_TRIGGERED,it.ISSUE_RESOLVED,it.ISSUE_IGNORED,it.AUTOMATION_RUN_FAILED],wGe=new Set(zu),Xt={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"},bO=[Xt.IN_APP,Xt.SLACK,Xt.EMAIL,Xt.SMS],Pc=[Xt.SLACK_CHANNEL,Xt.TEAMS_CHANNEL,Xt.INCIDENT_IO,Xt.PAGERDUTY,Xt.ROOTLY,Xt.WEBHOOK],Bo=Object.values(Xt),Rae=[...Bo,"victorops"]});var br,Nu,qo;var MJ=g(()=>{ve();Sc();br=c.enum(Bo),Nu=c.enum(Pc),qo=c.enum(Oc)});var Uae,XJ,SGe,$Ge,TGe,YJ;var ZJ=g(()=>{Ic();Sc();Uae=zu.map((e)=>({notificationType:e,label:dO(e)})),XJ=[{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"}],SGe=new Set(bO),$Ge=new Set(Pc),TGe=Oc.filter(yO),YJ=new Set(XJ.map(({channel:e})=>e));if(YJ.size!==Bo.length||Bo.some((e)=>!YJ.has(e)))throw Error("Notification channel card definitions must represent every channel")});var FJ=g(()=>{Ic();Sc()});var pO=g(()=>{Ic();Sc();MJ();ZJ();FJ()});var xae,Gae,Jae,Bae,qae,Hae,Wae,mO,tJe;var QJ=g(()=>{pO();ve();_e();xae=c.enum(["ready","missing","degraded","unavailable"]),Gae=c.object({id:c.string(),label:c.string(),status:c.enum(["active","inactive","degraded"]),statusLabel:c.string()}),Jae=c.object({channel:br,name:c.string(),description:c.string(),scope:c.enum(["personal","project"]),enabled:c.boolean().nullable(),preferenceId:c.string().nullable(),prerequisite:c.object({status:xae,statusLabel:c.string(),message:c.string()}),action:c.object({label:c.string(),href:c.string()}).nullable(),destinations:c.array(Gae),destinationManagement:c.enum(["none","slack_channels","teams_channels","integration_connections","webhook_endpoints"]),canCreateDestinations:c.boolean(),supportedNotificationTypes:c.array(qo)}),Bae=c.object({channel:Nu,enabled:c.boolean(),preferenceId:c.string().nullable()}),qae=c.object({channel:Nu,notificationType:qo,enabled:c.boolean(),preferenceId:c.string()}),Hae=c.object({projectId:c.string().uuid().optional().describe("Project to inspect. Auto-filled from CLI and SDK context when omitted.")}),Wae=c.object({channelCards:c.array(Jae).length(10),channels:c.array(Bae),notificationTypePreferences:c.array(qae),issueNotificationMinSeverity:c.enum(["low","medium","high","critical"])}),mO=T({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:Hae,output:Wae,pagination:"none",async:"sync"}),tJe={getProject:mO.contract}});var VJ,Mae,Yae,wO,Xae,Zae,Fae,Qae,Vae,ece,tce,nce,vO,kO,fO,IO,aJe;var eB=g(()=>{pO();ve();_e();VJ=c.object({minSeverity:c.enum(["medium","high","critical"]).optional().describe("Suppress rules only: suppress deliveries whose issue severity is below this threshold."),component:c.string().min(1).max(200).optional().describe("Match the component the agent records on issue metadata (exact match).")}).strict(),Mae=c.object({id:c.string().uuid(),channel:c.string(),destinationKey:c.string(),displayName:c.string().nullable()}),Yae=c.object({channel:c.enum(["slack_channel","teams_channel"]),destinationKey:c.string().min(1).describe("The stable destination id — the Slack channel id or Microsoft Teams channel id. Must be one of the project's configured notification channels.")}),wO=c.object({id:c.string().uuid(),projectId:c.string().uuid(),channel:br.nullable().describe("Channel the rule targets; null means all channels."),notificationType:qo.nullable().describe("Notification type the rule targets; null means all types."),priority:c.number().int().describe("Route-pass evaluation order; suppress rules are unordered."),condition:VJ,outcome:c.enum(["suppress","route"]),enabled:c.boolean(),destinations:c.array(Mae),createdAt:c.string().datetime(),updatedAt:c.string().datetime()}),Xae=c.object({projectId:c.string().uuid().optional().describe("Project to inspect. Auto-filled from CLI and SDK context when omitted.")}),Zae=c.object({rules:c.array(wO)}),Fae=c.object({projectId:c.string().uuid().optional().describe("Project that owns the rule. Auto-filled from CLI and SDK context when omitted."),outcome:c.enum(["suppress","route"]).describe("suppress gates matching deliveries; route sends them to a destination subset."),channel:br.nullable().describe("Channel to target; null targets all channels (suppress rules only)."),notificationType:qo.nullable().describe("Notification type to target; null targets all types."),condition:VJ,destinations:c.array(Yae).default([]).describe("Route rules only: the destinations to select.")}),Qae=wO,Vae=c.object({projectId:c.string().uuid().optional().describe("Project that owns the rule. Auto-filled from CLI and SDK context when omitted."),ruleId:c.string().uuid().describe("The delivery rule to update."),enabled:c.boolean()}),ece=wO,tce=c.object({projectId:c.string().uuid().optional().describe("Project that owns the rule. Auto-filled from CLI and SDK context when omitted."),ruleId:c.string().uuid().describe("The delivery rule to delete.")}),nce=c.object({removed:c.boolean()}),vO=T({operationId:"notificationDeliveryRules.list",description:"List a project's notification delivery rules — delivery-side suppress and route conditions evaluated after the preference gates.",backend:"api",route:{method:"GET",path:"/notification-delivery-rules",tags:["Notification delivery rules"]},input:Xae,output:Zae,pagination:"none",async:"sync"}),kO=T({operationId:"notificationDeliveryRules.create",description:"Create a delivery rule. Suppress rules gate a channel below a severity threshold or for a component; route rules send matching notifications to a subset of the project's configured Slack and Microsoft Teams destinations.",backend:"api",route:{method:"POST",path:"/notification-delivery-rules",tags:["Notification delivery rules"]},input:Fae,output:Qae,pagination:"none",async:"sync"}),fO=T({operationId:"notificationDeliveryRules.setEnabled",description:"Enable or disable a delivery rule without deleting it.",backend:"api",route:{method:"POST",path:"/notification-delivery-rules/{ruleId}/set-enabled",tags:["Notification delivery rules"]},input:Vae,output:ece,pagination:"none",async:"sync"}),IO=T({operationId:"notificationDeliveryRules.delete",description:"Delete a delivery rule.",backend:"api",route:{method:"DELETE",path:"/notification-delivery-rules/{ruleId}",tags:["Notification delivery rules"]},input:tce,output:nce,pagination:"none",async:"sync"}),aJe={list:vO.contract,create:kO.contract,setEnabled:fO.contract,delete:IO.contract}});var OO,oce,ice,rce,ace,cce,sce,PO,hce,lce,SO,uce,gce,$O,dce,yce,TO,bce,pce,AO,lJe;var tB=g(()=>{ve();_e();OO=c.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"]),oce=c.enum(["needs-onboarding","blocked","ready"]),ice=c.enum(["incomplete","complete","skipped"]),rce=c.object({invitationId:c.string(),organizationId:c.string(),organizationName:c.string(),organizationSlug:c.string(),organizationImageUrl:c.string().nullable(),inviterName:c.string().nullable()}),ace=c.object({gate:oce,canonicalStep:OO.nullable(),organizationId:c.string().nullable(),projectId:c.string().nullable(),completionByStep:c.record(OO,ice),githubSkipped:c.boolean(),githubAppSkipped:c.boolean(),slackSkipped:c.boolean(),sampleIssueId:c.string().nullable(),actorRole:c.enum(["admin","member"]).nullable(),requiredStep:c.union([OO,c.literal("select-organization")]).nullable(),isCompleted:c.boolean(),onboardingRecommendationsThreadId:c.string().nullable(),hasOrganizations:c.boolean(),hasPaidBillingSubscription:c.boolean(),billingStepEnabled:c.boolean(),pendingInvitations:c.array(rce)}),cce=c.object({}),sce=c.object({onboarding:ace}),PO=T({operationId:"onboarding.getState",description:"Read onboarding progress for the authenticated user.",backend:"api",route:{method:"GET",path:"/onboarding/state",tags:["Onboarding"]},input:cce,output:sce,pagination:"none",async:"sync"}),hce=c.object({integration:c.enum(["github","slack"]).describe("Integration onboarding step to skip.")}),lce=c.object({skipped:c.literal(!0)}),SO=T({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:hce,output:lce,pagination:"none",async:"sync"}),uce=c.object({}),gce=c.object({skipped:c.literal(!0)}),$O=T({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:uce,output:gce,pagination:"none",async:"sync"}),dce=c.object({}),yce=c.object({skipped:c.literal(!0)}),TO=T({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:dce,output:yce,pagination:"none",async:"sync"}),bce=c.object({projectId:c.string().uuid().describe("Project that completed onboarding.")}),pce=c.object({completed:c.boolean()}),AO=T({operationId:"onboarding.finish",description:"Mark onboarding complete when all prerequisites are satisfied.",backend:"api",route:{method:"POST",path:"/onboarding/finish",tags:["Onboarding"]},input:bce,output:pce,pagination:"none",async:"sync"}),lJe={getState:PO.contract,skipIntegration:SO.contract,skipGithubAppInstallation:$O.contract,skipSampleIssue:TO.contract,finish:AO.contract}});var _u,mce,wce,vce,kce,fce,Ice,Oce,Pce,Sce,$ce,CO,LO,DO,zO,bJe;var nB=g(()=>{ve();_e();Au();_u=c.object({id:c.string().min(1),name:c.string(),slug:c.string(),logo:c.string().nullable().optional()}),mce=_u.extend({role:yr.optional()}),wce=c.object({}),vce=c.object({organizations:c.array(mce).describe("Organizations available to the current credential.")}),kce=c.object({organizationId:c.string().min(1).describe("Organization ID to fetch.")}),fce=c.object({organization:_u}),Ice=c.object({organizationId:c.string().min(1).describe("Organization ID to update. SDK and CLI callers can auto-fill this before dispatch."),name:c.string().trim().min(1).max(100).describe("New organization name.")}),Oce=c.object({organization:_u.describe("Updated organization.")}),Pce=c.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"),Sce=c.object({name:Pce.describe("Organization display name.")}),$ce=c.object({organization:_u}),CO=T({operationId:"organizations.create",description:"Create an organization for the authenticated user.",backend:"api",route:{method:"POST",path:"/organizations",tags:["Organizations"],successStatus:201},input:Sce,output:$ce,pagination:"none",async:"sync"}),LO=T({operationId:"organizations.list",description:"List organizations available to the current credential.",backend:"api",route:{method:"GET",path:"/organizations",tags:["Organizations"]},input:wce,output:vce,pagination:"none",async:"sync"}),DO=T({operationId:"organizations.get",description:"Get one organization by ID.",backend:"api",route:{method:"GET",path:"/organizations/{organizationId}",tags:["Organizations"]},input:kce,output:fce,pagination:"none",async:"sync"}),zO=T({operationId:"organizations.update",description:"Update one organization.",backend:"api",route:{method:"PATCH",path:"/organizations/{organizationId}",tags:["Organizations"]},input:Ice,output:Oce,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}}}]}),bJe={list:LO.contract,get:DO.contract,create:CO.contract,update:zO.contract}});var pr,$c,oB,iB,rB,aB,cB,sB,hB,ju,Ru,Uu,lB,uB,Eu,gB,dB,Ku,Tce;var NO=g(()=>{ve();_e();pr=c.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"]),$c=c.object({id:c.string().uuid(),organizationId:c.string().min(1),name:c.string(),region:pr}),oB=c.object({organizationId:c.string().min(1).optional().describe("Organization to list projects for. Auto-filled from CLI and SDK context when omitted.")}),iB=c.object({projects:c.array($c).describe("Projects visible within the selected organization.")}),rB=c.object({projectId:c.string().uuid().describe("Project ID to fetch.")}),aB=c.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"),cB=c.object({organizationId:c.string().min(1).optional().describe("Organization to create the project under. Auto-filled from CLI and SDK context when omitted."),name:aB.describe("Project name."),region:pr.optional().default("us-west-2").describe("AWS region where the new project should be created.")}),sB=c.object({project:$c}),hB=c.object({project:$c}),ju=T({operationId:"projects.list",description:"List projects in an organization.",backend:"api",route:{method:"GET",path:"/projects",tags:["Projects"]},input:oB,output:iB,pagination:"none",async:"sync"}),Ru=T({operationId:"projects.get",description:"Get one project by ID.",backend:"api",route:{method:"GET",path:"/projects/{projectId}",tags:["Projects"]},input:rB,output:hB,pagination:"none",async:"sync"}),Uu=T({operationId:"projects.create",description:"Create one project in an organization.",backend:"api",route:{method:"POST",path:"/projects",successStatus:201,tags:["Projects"]},input:cB,output:sB,pagination:"none",async:"sync"}),lB=c.object({projectId:c.string().uuid().describe("Project ID to update."),name:aB.optional().describe("New project name.")}),uB=c.object({project:$c}),Eu=T({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:lB,output:uB,pagination:"none",async:"sync"}),gB=c.object({projectId:c.string().uuid().describe("Project ID to delete.")}),dB=c.void(),Ku=T({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:gB,output:dB,pagination:"none",async:"sync"}),Tce={list:ju.contract,get:Ru.contract,create:Uu.contract,update:Eu.contract,delete:Ku.contract}});var yB,Ace,Cce,Lce,Dce,zce,_O,IJe;var bB=g(()=>{ve();_e();yB=c.enum(["open","merged","closed"]),Ace=c.enum(["review_required","approved","changes_requested"]),Cce=c.enum(["passing","failing","pending"]),Lce=c.object({id:c.string().uuid(),projectId:c.string().uuid(),repositoryFullName:c.string(),pullRequestId:c.string().describe("Provider-native pull request identifier (GitHub PR number or Bitbucket PR id), serialized as a string."),githubPullRequestId:c.number().int().describe("Deprecated: use pullRequestId. Numeric form of the provider-native pull request identifier; kept for backward compatibility."),title:c.string().nullable(),url:c.string().nullable(),status:yB.nullable(),reviewState:Ace.nullable(),checksState:Cce.nullable(),requestedByUserId:c.string().nullable(),authorLogin:c.string().nullable().describe("Forge login that authored the pull request (often the Sazabi app identity)."),githubAuthorLogin:c.string().nullable().describe("Deprecated: use authorLogin. Kept for backward compatibility."),threadId:c.string().uuid().nullable(),runId:c.string().uuid().nullable(),createdAt:c.string().datetime(),mergedAt:c.string().datetime().nullable(),closedAt:c.string().datetime().nullable()}),Dce=c.object({projectId:c.string().uuid().optional().describe("Project to list pull requests for. Auto-filled from CLI and SDK context when omitted."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of pull requests to return per page."),cursor:c.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:yB.optional().describe("Filter by pull request status (open, merged, or closed)."),repositoryFullName:c.string().trim().optional().describe("Filter by repository full name, for example owner/repo. Case-insensitive."),requestedByUserId:c.string().trim().optional().describe("Filter by the Sazabi user who requested the pull request. Pass 'me' to filter to the authenticated user.")}),zce=c.object({pullRequests:c.array(Lce),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),_O=T({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:Dce,output:zce,pagination:"cursor",async:"sync"}),IJe={list:_O.contract}});var pB,mB,wB,vB,kB,Tc;var jO=g(()=>{ve();_e();pB=c.enum(["data_source","mcp_connector","sandbox_cli","integration"]),mB=c.enum(["connected","recommended"]),wB=c.object({kind:pB.describe("What the recommendation targets: a data source, MCP connector, sandbox CLI, or integration."),targetId:c.string().describe("Exact catalog id for the kind (data source type, MCP provider id, sandbox CLI preset type, or integration provider id)."),status:mB.describe("Resolved live against current connections: connected (already set up) or recommended (suggested, not yet connected)."),roiScore:c.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:c.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.")}),vB=c.object({projectId:c.string().uuid().optional().describe("Project to list recommendations for. Auto-filled from CLI and SDK context when omitted.")}),kB=c.object({recommendations:c.array(wB).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).")}),Tc=T({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:vB,output:kB,pagination:"none",async:"sync"})});var fB,Nce,IB,xu,OB,PB,SB,$B,mr,TB,AB,CB,Gu,_ce;var RO=g(()=>{ve();_e();fB=c.object({type:c.string().describe("Preset type identifier."),label:c.string().describe("Human-readable display name."),executableNames:c.array(c.string()).describe("CLI binary names installed by this preset."),envVarKeys:c.array(c.string()).describe("Environment variables required for authentication."),setupSkill:c.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),Nce=c.object({}),IB=c.object({types:c.array(fB)}),xu=T({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:Nce,output:IB,pagination:"none",async:"sync"}),OB=c.enum(["github_app","personal_access_token","stored_credentials"]),PB=c.object({presetType:c.string().describe("Preset type identifier."),credentialSource:OB.describe("Authoritative credential source for the preset."),isSystemManaged:c.boolean().describe("Whether the connection follows an integration lifecycle."),fallbackConfigured:c.boolean().describe("Whether user-provided fallback credentials are stored for this preset."),envVarKeys:c.array(c.string()).describe("Stored environment variable names. Secret values are omitted.")}),SB=c.object({projectId:c.string().uuid().optional().describe("Project to inspect. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted.")}),$B=c.object({connections:c.array(PB)}),mr=T({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:SB,output:$B,pagination:"none",async:"sync"}),TB=c.object({key:c.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:c.string().max(10240).describe("Secret value. Encrypted at rest; never returned by any API response.")}),AB=c.object({projectId:c.string().uuid().optional().describe("Project to configure. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted."),presetType:c.string().min(1).describe("Preset type identifier (e.g. kubectl, aws, github)."),environmentVariables:c.array(TB).max(100).describe("Full set of env vars for this preset. Replaces any previously stored values for the preset.")}),CB=c.object({projectId:c.string().uuid().describe("Project the preset was written to."),presetType:c.string().describe("Preset type that was upserted."),envVarKeys:c.array(c.string()).describe("Env var key names now stored for this preset. Values are never returned.")}),Gu=T({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:AB,output:CB,pagination:"none",async:"sync"}),_ce={listConnections:mr.contract,listTypes:xu.contract,upsertPreset:Gu.contract}});var UO,LB,DB,zB,NB,wr,vr,jce;var EO=g(()=>{ve();_e();UO=c.object({projectId:c.string().uuid().optional().describe("Project to search within. Auto-filled from CLI and SDK context when omitted."),query:c.string().trim().min(1,"Query must be at least 1 character").max(500,"Query must be at most 500 characters"),limit:c.coerce.number().min(1).max(100).default(20).describe("Maximum number of search results to return."),page:c.coerce.number().min(1).default(1).describe("One-based page number.")}),LB=UO.extend({status:c.enum(["regular","archived"]).optional().describe("Optional thread status filter.")}),DB=UO.extend({threadId:c.string().uuid().optional().describe("Optional thread restriction for message search."),role:c.enum(["user","assistant"]).optional().describe("Optional message role filter.")}),zB=c.object({threads:c.array(c.object({id:c.string().uuid(),projectId:c.string().uuid().optional(),title:c.string(),status:c.enum(["regular","archived"]),labels:c.array(c.string()),createdAt:c.string().datetime(),updatedAt:c.string().datetime(),highlights:c.array(c.string()),score:c.number().optional()})),pagination:c.object({page:c.number(),limit:c.number(),totalResults:c.number(),totalPages:c.number()}).describe("Page-based pagination metadata for the current search result.")}),NB=c.object({messages:c.array(c.object({id:c.string().uuid(),threadId:c.string().uuid(),threadTitle:c.string(),role:c.enum(["user","assistant"]),content:c.string(),createdAt:c.string().datetime(),updatedAt:c.string().datetime(),highlights:c.array(c.string()),score:c.number().optional()})),pagination:c.object({page:c.number(),limit:c.number(),totalResults:c.number(),totalPages:c.number()}).describe("Page-based pagination metadata for the current search result.")}),wr=T({operationId:"search.threads",description:"Search threads within one project.",backend:"api",route:{method:"GET",path:"/search/threads",tags:["Search"]},input:LB,output:zB,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}}}]}),vr=T({operationId:"search.messages",description:"Search messages within one project.",backend:"api",route:{method:"GET",path:"/search/messages",tags:["Search"]},input:DB,output:NB,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}}}]}),jce={threads:wr.contract,messages:vr.contract}});var Ac,_B,jB,RB,UB,EB,KB,xB,GB,Ju,Bu,kr,qu,JB,KO,BB,qB,HB,WB,MB,Hu,Wu,Rce;var xO=g(()=>{ve();_e();Ac=c.object({id:c.string().uuid(),projectId:c.string().uuid(),name:c.string(),description:c.string().nullable(),currentStatus:c.enum(["operational","degraded","outage"]).describe("Current health status of this component."),firstSeenAt:c.string().datetime(),lastSeenAt:c.string().datetime(),deletedAt:c.string().datetime().nullable().describe("Timestamp when this component was deregistered, if any.")}),_B=c.object({projectId:c.string().uuid().optional().describe("Project to list status components for. Auto-filled from CLI and SDK context when omitted."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of components to return per page."),cursor:c.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),includeDeleted:c.union([c.boolean(),c.stringbool()]).default(!1).describe("When true, include removed components in the response.")}),jB=c.object({statusComponents:c.array(Ac),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),RB=c.object({componentId:c.string().uuid().describe("Status component ID to retrieve.")}),UB=c.object({statusComponent:Ac}),EB=c.object({projectId:c.string().uuid().optional().describe("Project to register the status component in. Auto-filled from CLI and SDK context when omitted."),name:c.string().trim().min(1,"Name is required").describe("Evidence-backed component name to register."),description:c.string().trim().min(1,"Description cannot be empty").optional().describe("Optional component description.")}),KB=c.object({statusComponent:Ac}),xB=c.object({componentId:c.string().uuid().describe("Status component ID to deregister."),reason:c.string().trim().min(1,"Reason cannot be empty").optional().describe("Optional reason for audit logging.")}),GB=c.object({statusComponent:Ac}),Ju=T({operationId:"statusComponents.list",description:"List status page components in a project.",backend:"api",route:{method:"GET",path:"/status-components",tags:["Status Components"]},input:_B,output:jB,pagination:"cursor",async:"sync"}),Bu=T({operationId:"statusComponents.get",description:"Get a single status component by ID.",backend:"api",route:{method:"GET",path:"/status-components/{componentId}",tags:["Status Components"]},input:RB,output:UB,pagination:"none",async:"sync"}),kr=T({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:EB,output:KB,pagination:"none",async:"sync"}),qu=T({operationId:"statusComponents.deregister",description:"Deregister a status page component. Deregistered components no longer appear on the status page.",backend:"api",route:{method:"POST",path:"/status-components/{componentId}/deregister",tags:["Status Components"]},input:xB,output:GB,pagination:"none",async:"sync"}),JB=c.enum(["degraded","outage"]).describe("Severity of a status-page incident. 'outage' marks the component down; 'degraded' marks partial impact."),KO=c.object({id:c.string().uuid(),componentId:c.string().uuid(),projectId:c.string().uuid(),severity:JB,summary:c.string().describe("Human-readable summary of the status-page issue."),startedAt:c.string().datetime().describe("When the incident began affecting the component."),resolvedAt:c.string().datetime().nullable().describe("When the incident was resolved, or null while ongoing.")}),BB=c.object({projectId:c.string().uuid().optional().describe("Project to list status-page issues for. Auto-filled from CLI and SDK context when omitted."),componentId:c.string().uuid().optional().describe("Restrict results to a single component."),activeOnly:c.union([c.boolean(),c.stringbool()]).default(!1).describe("When true, return only unresolved (ongoing) issues."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of issues to return per page."),cursor:c.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),qB=c.object({incidents:c.array(KO),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),HB=c.object({timestamp:c.string().datetime(),status:c.enum(["operational","degraded","outage","unknown"]).describe("Worst component status observed during this timeline bucket.")}),WB=c.object({componentId:c.string().uuid().describe("Status component to build the timeline for."),windowStart:c.string().datetime({offset:!0}).optional().describe("Start of the timeline window. Defaults to 7 days before windowEnd."),windowEnd:c.string().datetime({offset:!0}).optional().describe("End of the timeline window. Defaults to now.")}),MB=c.object({componentId:c.string().uuid(),windowStart:c.string().datetime(),windowEnd:c.string().datetime(),timeline:c.array(HB),incidents:c.array(KO)}),Hu=T({operationId:"statusComponents.incidents.list",description:"List status-page issues in a project.",backend:"api",route:{method:"GET",path:"/status-incidents",tags:["Status Components"]},input:BB,output:qB,pagination:"cursor",async:"sync"}),Wu=T({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:WB,output:MB,pagination:"none",async:"sync"}),Rce={list:Ju.contract,get:Bu.contract,register:kr.contract,deregister:qu.contract,incidents:{list:Hu.contract},timeline:Wu.contract}});var YB;var XB=g(()=>{YB=["onboarding","setup"]});var ZB,FB,QB,VB,Cc;var GO=g(()=>{XB();ve();_e();ZB=c.enum(YB),FB=c.object({id:c.string().describe("Unique task identifier (e.g. install_github_app)."),label:c.string().describe("Short human-readable task name."),description:c.string().describe("Explanation of what needs to be completed to satisfy this task."),instructions:c.string().describe("Step-by-step instructions for completing this task."),completed:c.boolean().describe("Whether the task has been completed."),completedAt:c.string().datetime().nullable().describe("ISO 8601 timestamp of when the task was completed, or null."),category:ZB.describe("Task category: onboarding (core setup steps) or setup (additional configuration).")}),QB=c.object({projectId:c.string().uuid().optional().describe("Project to list tasks for. Auto-filled from CLI and SDK context when omitted.")}),VB=c.object({tasks:c.array(FB).describe("All onboarding and setup tasks with their current completion status.")}),Cc=T({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:QB,output:VB,pagination:"none",async:"sync"})});var JO;var eq=g(()=>{zA();_A();Ok();w_();Ak();Dk();Nk();qI();Au();wJ();AJ();QJ();eB();tB();nB();NO();bB();jO();Cu();RO();EO();xO();GO();uO();JO={me:HI.contract,automations:{list:ev.contract,get:tv.contract,enable:nv.contract,disable:ov.contract,runs:{list:iv.contract,get:rv.contract,logs:av.contract}},logs:{query:Ji.contract,schema:Bi.contract,volume:qi.contract,patterns:Hi.contract,nativeQuery:Wi.contract,searchNatural:sl.contract},dataSources:{listTypes:_h.contract,listConnections:_i.contract,getConnection:jh.contract,listInstances:Rh.contract,getInstance:Uh.contract,createConnection:ji.contract,disconnectConnection:Bh.contract,listStreams:Eh.contract,listInstanceStreams:Kh.contract,createStream:xh.contract,getStream:Gh.contract,deleteStream:Jh.contract},integrations:{listProviders:b_.contract,listConnections:p_.contract,getConnection:m_.contract},notificationChannels:{getProject:mO.contract},notificationDeliveryRules:{list:vO.contract,create:kO.contract,setEnabled:fO.contract,delete:IO.contract},mcpConnectors:{listProviders:Tu.contract,list:ur.contract,get:gr.contract,details:dr.contract},sandboxPresets:{listConnections:mr.contract,listTypes:xu.contract,upsertPreset:Gu.contract},onboarding:{getState:PO.contract,skipIntegration:SO.contract,skipGithubAppInstallation:$O.contract,skipSampleIssue:TO.contract,finish:AO.contract},organizations:{list:LO.contract,get:DO.contract,create:CO.contract,update:zO.contract},members:{list:WI.contract,updateRole:MI.contract,remove:YI.contract},publicKeys:{list:Ui.contract,get:Ei.contract,ensureLogForwarding:Ki.contract,update:xi.contract,deactivate:Gi.contract},secretKeys:{list:ol.contract,get:il.contract,create:rl.contract,update:al.contract,delete:cl.contract},projects:{list:ju.contract,get:Ru.contract,create:Uu.contract,update:Eu.contract,delete:Ku.contract},search:{threads:wr.contract,messages:vr.contract},messages:{list:$J.contract,append:TJ.contract},threads:{list:eO.contract,get:tO.contract,getStatus:nO.contract,stop:oO.contract,create:iO.contract,update:rO.contract,fork:aO.contract,setVisibility:cO.contract,createShareLink:sO.contract,listShareLinks:hO.contract,revokeShareLink:lO.contract},runs:{list:XI.contract,listForThread:ZI.contract,get:FI.contract,cancel:QI.contract},pullRequests:{list:_O.contract},issues:{count:Yh.contract,create:Ri.contract,list:Wh.contract,search:Mh.contract,get:Xh.contract,resolve:Zh.contract,ignore:Fh.contract,reopen:Tk.contract,mute:Qh.contract,unmute:Vh.contract},billing:{getSummary:cv.contract,getUsage:sv.contract,listTransactions:hv.contract},tasks:{list:Cc.contract},recommendations:{list:Tc.contract},statusComponents:{list:Ju.contract,get:Bu.contract,register:kr.contract,deregister:qu.contract,incidents:{list:Hu.contract},timeline:Wu.contract}}});var Lc=g(()=>{$A();eq();Ok();Ak();Dk();Nk();qI();NO();jO();RO();EO();xO();GO()});var Uce="https://api.sazabi.com",Ece="x-sazabi-client-source",nq=(e)=>{return{streamRun:async(t)=>{return tq({options:e,path:`/runs/${encodeURIComponent(t.runId)}/stream`,cursor:t.cursor,signal:t.signal})},streamThread:async(t)=>{return tq({options:e,path:`/threads/${encodeURIComponent(t.threadId)}/stream`,cursor:t.cursor,signal:t.signal})}}},tq=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=Kce(e.options.apiBaseUrl,e.path,e.cursor);return Gce({url:i,token:n,clientSource:e.options.clientSource,initialCursor:e.cursor,signal:e.signal,fetch:t})},Kce=(e,t,n)=>{let i=xce(e??Uce),o=new URL(`${i}${t}`);if(n)o.searchParams.set(Yw,n);return o.toString()},xce=(e)=>{let t=e.replace(/\/+$/,"");return t.endsWith("/v1")?t:`${t}/v1`},Gce=async(e)=>{let t=[],n=[],i=!1,o=!1,r,a=e.initialCursor,s=new AbortController,h=(k)=>{if(i)return;i=!0,r=k;while(n.length>0)n.shift()?.({value:void 0,done:!0})},l=(k)=>{let O=n.shift();if(O){O({value:k,done:!1});return}t.push(k)},u=(k)=>{if(k.event===Zw){let A=Wce(k.data);if(A!==void 0)a=A;return}if(k.data===Fw){o=!0,s.abort(),h();return}let O=Mce(k.data);if(O)l(O)},d=()=>{o=!0,s.abort(),h()};if(e.signal)if(e.signal.aborted)o=!0,s.abort();else e.signal.addEventListener("abort",d,{once:!0});let y={[Symbol.asyncIterator](){return y},get cursor(){return a},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((k)=>{n.push(k)}).then((k)=>{if(k.done&&r)throw r;return k})},return:async()=>{return o=!0,s.abort(),h(),{value:void 0,done:!0}},throw:async(k)=>{throw o=!0,s.abort(),h(k instanceof Error?k:Error(String(k))),k},close:async()=>{o=!0,s.abort(),h()}};if(o)return h(),y;let b=await e.fetch(e.url,{method:Xw,headers:Jce(e.token,e.clientSource),signal:s.signal});if(await Bce(b))h();else qce(b,u).then(()=>h()).catch((k)=>{if(Xce(k)||o||e.signal?.aborted){h();return}h(Zce(k))});return y},Jce=(e,t)=>{return{accept:"text/event-stream",authorization:`Bearer ${e}`,...t?{[Ece]:t}:{}}},Bce=async(e)=>{if(e.status===204)return!0;if(e.ok&&e.body)return!1;let t=await Yce(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}`)},qce=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=Hce(t);try{while(!0){let a=await n.read();if(a.done)break;o+=i.decode(a.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 a of o.split(/\r\n|\r|\n/))r.line(a);r.flush()}finally{n.releaseLock()}},Hce=(e)=>{let t="message",n=[],i=()=>{t="message",n=[]},o=()=>{if(n.length===0){i();return}e({event:t,data:n.join(`
8558
8559
  `)}),i()};return{line:(r)=>{if(r===""){o();return}if(r.startsWith(":"))return;let a=r.indexOf(":"),s=a===-1?r:r.slice(0,a),h=a===-1?"":r.slice(a+1),l=h.startsWith(" ")?h.slice(1):h;if(s==="event"){t=l||"message";return}if(s==="data")n.push(l)},flush:o}},Wce=(e)=>{try{let t=Mw.safeParse(JSON.parse(e));return t.success?t.data.streamNextOffset:void 0}catch{return}},Mce=(e)=>{try{let t=Ww.safeParse(JSON.parse(e));return t.success?t.data:void 0}catch{return}},Yce=async(e)=>{try{return await e.text()}catch{return""}},Xce=(e)=>{return e instanceof Error&&e.name==="AbortError"},Zce=(e)=>{return e instanceof Error?e:Error(String(e))};var oq=g(()=>{Lc()});var BO,qO,HO,iq;var rq=g(()=>{ve();BO=c.object({severities:c.array(c.string()).optional().describe("Limit results to the listed severities."),services:c.array(c.string()).optional().describe("Limit results to the listed service names."),environments:c.array(c.string()).optional().describe("Limit results to the listed deployment environments."),searchTerm:c.string().optional().describe("Case-insensitive substring match against the log body."),traceId:c.string().optional().describe("Limit results to one trace ID.")}),qO=c.object({service:c.string(),namespace:c.string(),environment:c.string(),host:c.string(),container:c.string(),pod:c.string()}),HO=c.object({id:c.string(),timestamp:c.string().datetime(),severity:c.string(),body:c.string(),service:c.string(),traceId:c.string(),spanId:c.string(),attributes:c.record(c.string(),c.string()),resource:qO}),iq=c.object({type:c.literal("logs"),timestamp:c.string().datetime(),data:c.array(HO)})});var Fce="https://{region}.intake.sazabi.com",Qce="https://{region}.tail.sazabi.com",sq=500,Vce=5000,hq="sazabi.public_key",ese="x-sazabi-internal-log-forwarding-secret",tse="x-sazabi-internal-log-forwarding-source",nse=(e)=>{return e.startsWith("[")&&e.endsWith("]")?e.slice(1,-1):e},lq=(e)=>{let t=nse(e);return t==="localhost"||t==="127.0.0.1"||t==="::1"},ose,ise,rse,uq=(e)=>{let t=new Map;return{tail:async(n)=>{let i=await mse(e.credentialProvider,n.projectId,"logs.tail"),o=await wse(e,t,i,n.region,"logs.tail"),r=sse({projectId:i,region:o,filters:n.filters,apiBaseUrl:e.apiBaseUrl,tailBaseUrl:e.tailBaseUrl}),a=await e.credentialProvider.getToken(),s=e.fetch??globalThis.fetch;if(!s)throw Error("Fetch transport is not available in this runtime.");return kse({token:a,url:r,signal:n.signal,fetch:s})},forward:async(n)=>{let i=await vse(e,t,n.projectId??await e.credentialProvider.getProjectId?.(),n.region,"logs.forward"),o=gse(i,e.intakeBaseUrl),r=e.fetch??globalThis.fetch,a=yse(n.logs,n.publicKey),s=Ase(a);return await Tse(r,o,a,pse(n.sazabiInternalForwarding)),{forwardedCount:s,failedCount:0}}}},ase="3010",cse,sse=(e)=>{let t=(e.tailBaseUrl??hse({region:e.region,apiBaseUrl:e.apiBaseUrl})).replace("{region}",e.region),n=lse(t);n.searchParams.set("projectId",e.projectId);let i=use(e.filters);if(i)n.searchParams.set("filters",i);return n.toString()},hse=(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 Qce.replace("{region}",e.region)},lse=(e)=>{let t=(()=>{try{return new URL(e)}catch{return null}})();if(!t)throw Error(`Invalid tail base URL: ${e}`);if(lq(t.hostname)){if(t.protocol="http:",!t.port||cse.has(t.port))t.port=ase;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},use=(e)=>{if(!e)return;let t=Object.entries(e).filter(([,n])=>n!==void 0&&(!Array.isArray(n)||n.length>0)&&n!=="");if(t.length===0)return;return JSON.stringify(Object.fromEntries(t))},gse=(e,t)=>{let n=(t??Fce).replace("{region}",e),i=n.endsWith("/")?n.slice(0,-1):n,o=dse(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`},dse=(e)=>{let t=(()=>{try{return new URL(e)}catch{return null}})();if(!t)return;if(!lq(t.hostname))return;return t.pathname="/adapters/otlp",t.toString()},yse=(e,t)=>{let n=e.resourceLogs;if(!n||n.length===0)return{...e,resourceLogs:[{resource:{attributes:[gq(t)]},scopeLogs:[]}]};return{...e,resourceLogs:n.map((i)=>({...i,resource:{...i.resource,attributes:bse(i.resource?.attributes,t)}}))}},bse=(e,t)=>{return[...(e??[]).filter((i)=>i?.key!==hq),gq(t)]},gq=(e)=>({key:hq,value:{stringValue:e}}),pse=(e)=>{if(!e?.secret)return{};return{[ese]:e.secret,...e.source?{[tse]:e.source}:{}}},mse=async(e,t,n)=>{let i=t??await e.getProjectId?.();if(i)return i;throw bq(n,"Project ID is required",["projectId"])},wse=async(e,t,n,i,o)=>{return i??await dq(e,t,n)},vse=async(e,t,n,i,o)=>{if(i)return i;if(!n)throw bq(o,"Project ID is required",["projectId"]);return dq(e,t,n)},dq=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}},kse=async(e)=>{let t=[],n=[],i=!1,o=!1,r,a=0,s,h,l=(O)=>{if(i)return;i=!0,r=O;while(n.length>0){let A=n.shift();if(A)A({value:void 0,done:!0})}},u=(O)=>{let A=n.shift();if(A){A({value:O,done:!1});return}t.push(O)},d=()=>{h?.abort()},y=(O)=>{if(O.event!=="log"){if(O.id)s=O.id;return}let A=Sse(O.data);for(let L of A)u(L);if(O.id)s=O.id},b=async(O)=>{let A=!1;while(!i&&!o){let L=new AbortController,q=()=>L.abort();h=L;let Y=!1;e.signal?.addEventListener("abort",q,{once:!0});try{let E=await e.fetch(fse(e.url,s),{method:"GET",headers:{accept:"text/event-stream",authorization:`Bearer ${e.token}`},signal:L.signal});await Ise(E),a=0,A=!0,O(),await Ose(E,y),Y=!0}catch(E){if(cq(E)||e.signal?.aborted)break;let Ue=aq(E);if(!A||$se(Ue))throw Ue;Y=!0}finally{if(e.signal?.removeEventListener("abort",q),h===L)h=void 0}if(i||o||e.signal?.aborted)break;if(!Y)continue;a+=1,await yq(Math.min(sq*2**(a-1),Vce),e.signal)}};if(e.signal?.addEventListener("abort",()=>{o=!0,d(),l()},{once:!0}),e.signal?.aborted)o=!0,d(),l();await new Promise((O,A)=>{let L=!1;b(()=>{if(!L)L=!0,O()}).catch((Y)=>{let E=aq(Y);if(!L){L=!0,A(E);return}if(!cq(Y))l(E)})});let k={[Symbol.asyncIterator](){return k},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((O)=>{n.push(O)}).then((O)=>{if(O.done&&r)throw r;return O})},return:async()=>{return o=!0,d(),l(),{value:void 0,done:!0}},throw:async(O)=>{throw o=!0,d(),l(O instanceof Error?O:Error(String(O))),O}};return k},fse=(e,t)=>{if(!t)return e;let n=new URL(e);return n.searchParams.set("cursor",t),n.toString()},Ise=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}`)},Ose=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=Pse(t);try{while(!0){let a=await n.read();if(a.done)break;o+=i.decode(a.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 a=o.split(/\r\n|\r|\n/);for(let s of a)r.line(s)}r.flush()}finally{n.releaseLock()}},Pse=(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(`
8559
8560
  `),...n?{id:n}:{}}),o()};return{line:(a)=>{if(a===""){r();return}if(a.startsWith(":"))return;let s=a.indexOf(":"),h=s===-1?a:a.slice(0,s),l=s===-1?"":a.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}},Sse=(e)=>{try{let t=iq.safeParse(JSON.parse(e));if(!t.success)return[];return t.data.data}catch{return[]}},aq=(e)=>{return e instanceof Error?e:Error(String(e))},cq=(e)=>{return e instanceof Error&&e.name==="AbortError"},$se=(e)=>{return e.message.startsWith("Authentication failed")||e.message.startsWith("Forbidden (")||e.message.startsWith("Wrong region (")||e.message.startsWith("Client error (")},Tse=async(e,t,n,i={},o=3,r=1e4)=>{let a;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 d=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}): ${d}`);a=Error(u.status===429?`Rate limited (429): ${d}`:`Server error (${u.status}): ${d}`)}catch(u){let d=u instanceof Error?u.message:String(u);if(d.startsWith("Authentication failed")||d.startsWith("Client error ("))throw u instanceof Error?u:Error(d);a=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 yq(sq*2**s)}throw Error(`Failed after ${o+1} attempts: ${a?.message??"Unknown error"}`)},Ase=(e)=>{return e.resourceLogs?.reduce((t,n)=>t+(n.scopeLogs?.reduce((i,o)=>i+(o.logRecords?.length??0),0)??0),0)??0},yq=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})})},bq=(e,t,n)=>{return new Ze("BAD_REQUEST",{message:t,data:{operationId:e,missingContext:n}})};var WO=g(()=>{ei();rq();ve();ose=c.object({projectId:c.string().uuid().optional().describe("Project to tail logs for. Auto-filled from CLI and SDK context when omitted."),filters:BO.optional().describe("Optional filters applied by the tail SSE service.")}),ise=c.object({publicKey:c.string().min(1).describe("Public key for intake auth. Create or list one via the public key endpoints."),logs:c.custom((e)=>typeof e==="object"&&e!==null).describe("OTLP logs export request payload to send to the intake service.")}),rse=c.object({forwardedCount:c.number().int().nonnegative().describe("Number of log records accepted by the intake request."),failedCount:c.number().int().nonnegative().describe("Number of log records rejected by the intake request.")}),cse=new Set(["15006","3010"])});var MO="https://api.sazabi.com",mq="https://api.platform.sazabi.com",wq="sazabi-cli",Cse="urn:ietf:params:oauth:grant-type:device_code",vq=(e)=>{let t=Rg(new Xg(JO,{url:Lse(e.apiBaseUrl??MO),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 a=Use(o);if(!a)return null;return new Ze(a.code,{message:a.message,status:r.status,data:{operationId:a.operationId,missingContext:a.missingContext}})}})),n=uq({raw:t,credentialProvider:e.credentialProvider,fetch:e.fetch,apiBaseUrl:e.apiBaseUrl??MO,intakeBaseUrl:e.intakeBaseUrl,tailBaseUrl:e.tailBaseUrl}),i=nq({credentialProvider:e.credentialProvider,fetch:e.fetch,apiBaseUrl:e.apiBaseUrl??MO,clientSource:e.clientSource});return{raw:t,me:async()=>t.me({}),automations:{list:async(o={})=>t.automations.list(await pe(e.credentialProvider,o,"automations.list")),get:async(o)=>t.automations.get(await pe(e.credentialProvider,o,"automations.get")),enable:async(o)=>t.automations.enable(await pe(e.credentialProvider,o,"automations.enable")),disable:async(o)=>t.automations.disable(await pe(e.credentialProvider,o,"automations.disable")),runs:{list:async(o)=>t.automations.runs.list(await pe(e.credentialProvider,o,"automations.runs.list")),get:async(o)=>t.automations.runs.get(await pe(e.credentialProvider,o,"automations.runs.get")),logs:async(o)=>t.automations.runs.logs(await pe(e.credentialProvider,o,"automations.runs.logs"))}},logs:{...n,query:async(o={})=>t.logs.query(await pe(e.credentialProvider,o,Ji.operationId)),schema:async(o={})=>t.logs.schema(await pe(e.credentialProvider,o,Bi.operationId)),volume:async(o)=>t.logs.volume(await pe(e.credentialProvider,o,qi.operationId)),patterns:async(o={})=>t.logs.patterns(await pe(e.credentialProvider,o,Hi.operationId)),nativeQuery:async(o)=>t.logs.nativeQuery(await pe(e.credentialProvider,o,Wi.operationId))},organizations:{list:async()=>t.organizations.list({}),get:async(o)=>t.organizations.get(o),update:async(o)=>t.organizations.update(await zse(e.credentialProvider,o))},members:{list:async(o={})=>t.members.list(await ln(e.credentialProvider,o)),updateRole:async(o)=>t.members.updateRole(await ln(e.credentialProvider,o)),remove:async(o)=>{let r=await ln(e.credentialProvider,o);return t.members.remove({params:{userId:r.userId},query:{organizationId:r.organizationId}})}},publicKeys:{list:async(o={})=>t.publicKeys.list(await pe(e.credentialProvider,o,Ui.operationId)),get:async(o)=>t.publicKeys.get(await pe(e.credentialProvider,o,Ei.operationId)),ensureLogForwarding:async(o={})=>t.publicKeys.ensureLogForwarding(await pe(e.credentialProvider,o,Ki.operationId)),update:async(o)=>t.publicKeys.update(await pe(e.credentialProvider,o,xi.operationId)),deactivate:async(o)=>{let r=await pe(e.credentialProvider,o,Gi.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 pe(e.credentialProvider,o,wr.operationId)),messages:async(o)=>t.search.messages(await pe(e.credentialProvider,o,vr.operationId))},projects:{list:async(o={})=>t.projects.list(await Dse(e.credentialProvider,o)),get:async(o)=>t.projects.get(o),create:async(o)=>t.projects.create(await ln(e.credentialProvider,o))},messages:{list:async(o)=>t.messages.list(o),append:async(o)=>pq(t,await t.messages.append(Rse(o)))},threads:{list:async(o={})=>t.threads.list(await Nse(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)=>pq(t,await t.threads.create(await jse(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 _se(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({}),connections:{list:async(o={})=>t.dataSources.listConnections(await pe(e.credentialProvider,o,_i.operationId)),get:async(o)=>t.dataSources.getConnection(o),create:async(o)=>t.dataSources.createConnection(await pe(e.credentialProvider,o,ji.operationId)),disconnect:async(o)=>t.dataSources.disconnectConnection(o)},streams:{list:async(o)=>t.dataSources.listStreams(o),get:async(o)=>t.dataSources.getStream(o),create:async(o)=>t.dataSources.createStream(o),delete:async(o)=>t.dataSources.deleteStream(o)}},integrations:{listProviders:async(o={})=>t.integrations.listProviders(await ln(e.credentialProvider,o)),listConnections:async(o={})=>t.integrations.listConnections(await ln(e.credentialProvider,o)),getConnection:async(o)=>t.integrations.getConnection(await ln(e.credentialProvider,o))},mcpConnectors:{list:async(o={})=>t.mcpConnectors.list(await pe(e.credentialProvider,o,ur.operationId)),get:async(o)=>t.mcpConnectors.get(await pe(e.credentialProvider,o,gr.operationId)),details:async(o)=>t.mcpConnectors.details(await pe(e.credentialProvider,o,dr.operationId)),listProviders:async()=>t.mcpConnectors.listProviders({})},sandboxPresets:{listConnections:async(o={})=>t.sandboxPresets.listConnections(await pe(e.credentialProvider,o,mr.operationId)),listTypes:async()=>t.sandboxPresets.listTypes({})},issues:{count:async(o={})=>t.issues.count(await pe(e.credentialProvider,o,"issues.count")),create:async(o)=>t.issues.create(await pe(e.credentialProvider,o,Ri.operationId)),list:async(o={})=>t.issues.list(await pe(e.credentialProvider,o,"issues.list")),search:async(o={})=>t.issues.search(await pe(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 pe(e.credentialProvider,o,"pullRequests.list"))},statusComponents:{list:async(o={})=>t.statusComponents.list(await pe(e.credentialProvider,o,"statusComponents.list")),get:async(o)=>t.statusComponents.get(o),register:async(o)=>t.statusComponents.register(await pe(e.credentialProvider,o,kr.operationId)),deregister:async(o)=>t.statusComponents.deregister({componentId:o.componentId,...o.reason!==void 0?{reason:o.reason}:{}}),incidents:{list:async(o={})=>t.statusComponents.incidents.list(await pe(e.credentialProvider,o,"statusComponents.incidents.list"))},timeline:async(o)=>t.statusComponents.timeline(o)},billing:{getSummary:async(o={})=>t.billing.getSummary(await ln(e.credentialProvider,o)),getUsage:async(o={})=>t.billing.getUsage(await ln(e.credentialProvider,o)),listTransactions:async(o={})=>t.billing.listTransactions(await ln(e.credentialProvider,o))},tasks:{list:async(o={})=>t.tasks.list(await pe(e.credentialProvider,o,Cc.operationId))},recommendations:{list:async(o={})=>t.recommendations.list(await pe(e.credentialProvider,o,Tc.operationId))}}},XO=async(e={})=>{let t=await Iq(e.fetch)(kq(e.apiBaseUrl??mq,"/device/code"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({client_id:e.clientId??wq,...e.scope?{scope:e.scope}:{}})}),n=await t.json();if(!t.ok)throw Ese(n,t.status);let i=n;return{deviceCode:fr(i.device_code,"device_code"),userCode:fr(i.user_code,"user_code"),verificationUri:fr(i.verification_uri,"verification_uri"),verificationUriComplete:fr(i.verification_uri_complete,"verification_uri_complete"),expiresIn:YO(i.expires_in,"expires_in"),interval:YO(i.interval,"interval")}},ZO=async(e)=>{let t=await Iq(e.fetch)(kq(e.apiBaseUrl??mq,"/device/token"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({grant_type:Cse,device_code:e.deviceCode,client_id:e.clientId??wq})}),n=await t.json();if(t.ok){let o=n;return{status:"authorized",accessToken:fr(o.access_token,"access_token"),tokenType:fr(o.token_type,"token_type"),expiresIn:YO(o.expires_in,"expires_in"),scope:typeof o.scope==="string"?o.scope:""}}let i=fq(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)},Lse=(e)=>{let t=e.replace(/\/+$/,"");return t.endsWith("/v1")?t:`${t}/v1`},kq=(e,t)=>{return`${e.replace(/\/+$/,"")}/api/auth${t}`},Dse=async(e,t)=>{return ln(e,t)},ln=async(e,t)=>{let n=t.organizationId??await e.getOrganizationId?.();return n?{...t,organizationId:n}:t},zse=async(e,t)=>{let n=t.organizationId??await e.getOrganizationId?.();if(!n)throw new Ze("BAD_REQUEST",{message:"Organization ID is required",data:{operationId:"organizations.update",missingContext:["organizationId"]},status:400});return{...t,organizationId:n}},pe=async(e,t,n)=>{let i=t.projectId??await e.getProjectId?.();if(!i)throw new Ze("BAD_REQUEST",{message:"Project ID is required",data:{operationId:n,missingContext:["projectId"]},status:400});return{...t,projectId:i}},Nse=async(e,t)=>{let n=t.projectId??await e.getProjectId?.();return n?{...t,projectId:n}:t},_se=async(e,t)=>{let n=t.projectId??await e.getProjectId?.();return n?{...t,projectId:n}:t},jse=async(e,t)=>{let n=t.projectId??await e.getProjectId?.();return n?{...t,projectId:n}:t},Rse=(e)=>{return{threadId:e.threadId,message:e.message,wait:e.wait??!0,timeoutSeconds:e.timeoutSeconds??20,...e.automationId!==void 0?{automationId:e.automationId}:{}}},Use=(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"):[]}},fq=(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}},Ese=(e,t)=>{let n=fq(e);return Error(n?.errorDescription??`Device authorization failed with status ${t}`)},Iq=(e)=>{return e??globalThis.fetch},pq=(e,t)=>({result:t,poll:()=>e.runs.get({runId:t.runId}),waitForCompletion:async(n={})=>Kse(e,t,n)}),Kse=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 xse(i),r=await e.runs.get({runId:r.runId})}return r},xse=async(e)=>{await new Promise((t)=>globalThis.setTimeout(t,e))},fr=(e,t)=>{if(typeof e==="string")return e;throw Error(`Expected '${t}' to be a string.`)},YO=(e,t)=>{if(typeof e==="number")return e;throw Error(`Expected '${t}' to be a number.`)};var FO=g(()=>{ei();OS();Lc();oq();WO();WO()});var rt=(e)=>({success:!0,value:e}),We=(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 p(e.errorPayload??i);return m(i)}return e.value};var oe=g(()=>{te()});var Gse="https://api.sazabi.com",R=async(e)=>{try{return rt(await e())}catch(t){let n=Jse(t),i=Bse(t),o=t instanceof Error?t.message:String(t);return We(o,i,n)}},Jse=(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"):[]}},Bse=(e)=>{if(!e||typeof e!=="object")return;let t=e;return typeof t.status==="number"?t.status:void 0},Gn=(e)=>{let t=vq({apiBaseUrl:e.baseUrl??Gse,clientSource:"cli",credentialProvider:{getToken:()=>e.token,getOrganizationId:()=>e.organizationId,getProjectId:()=>e.projectId},intakeBaseUrl:e.intakeBaseUrl,tailBaseUrl:e.tailBaseUrl});return{me:()=>R(()=>t.me()),automations:{list:(n={})=>R(()=>t.automations.list(n)),get:(n)=>R(()=>t.automations.get({automationId:n})),enable:(n)=>R(()=>t.automations.enable({automationId:n})),disable:(n)=>R(()=>t.automations.disable({automationId:n})),runs:{list:(n,i={})=>R(()=>t.automations.runs.list({automationId:n,...i})),get:(n,i)=>R(()=>t.automations.runs.get({automationId:n,runId:i})),logs:(n,i)=>R(()=>t.automations.runs.logs({automationId:n,runId:i}))}},logs:{tail:(n)=>R(()=>t.logs.tail(n)),forward:(n)=>R(()=>t.logs.forward(n)),query:(n={})=>R(()=>t.logs.query(n)),schema:(n={})=>R(()=>t.logs.schema(n)),volume:(n)=>R(()=>t.logs.volume(n)),patterns:(n={})=>R(()=>t.logs.patterns(n)),nativeQuery:(n)=>R(()=>t.logs.nativeQuery(n))},organizations:{list:()=>R(()=>t.organizations.list()),get:(n)=>R(()=>t.organizations.get({organizationId:n})),rename:(n,i)=>R(()=>t.organizations.update({organizationId:i,name:n}))},members:{list:(n={})=>R(()=>t.members.list(n)),updateRole:(n,i,o)=>R(()=>t.members.updateRole({organizationId:o,userId:n,role:i})),remove:(n,i)=>R(()=>t.members.remove({organizationId:i,userId:n}))},projects:{list:(n={})=>R(()=>t.projects.list(n)),get:(n)=>R(()=>t.projects.get({projectId:n})),create:(n)=>R(()=>t.projects.create(n))},threads:{list:(n={})=>R(()=>t.threads.list(n)),get:(n)=>R(()=>t.threads.get({threadId:n})),create:(n)=>R(()=>t.threads.create(n)),getStatus:(n)=>R(()=>t.threads.getStatus({threadId:n})),update:(n,i)=>R(()=>t.threads.update({threadId:n,status:i})),fork:(n,i)=>R(()=>t.threads.fork({threadId:n,messageId:i})),setVisibility:(n,i)=>R(()=>t.threads.setVisibility({threadId:n,visibility:i})),createShareLink:(n)=>R(()=>t.threads.createShareLink({threadId:n})),listShareLinks:(n)=>R(()=>t.threads.listShareLinks({threadId:n})),revokeShareLink:(n,i)=>R(()=>t.threads.revokeShareLink({threadId:n,shareId:i})),stop:(n)=>R(()=>t.threads.stop({threadId:n})),stream:(n)=>R(()=>t.threads.stream(n))},messages:{list:(n,i={})=>R(()=>t.messages.list({threadId:n,...i})),append:(n,i,o,r,a,s)=>R(()=>t.messages.append({threadId:n,message:i,wait:o,timeoutSeconds:r,...a!==void 0?{automationId:a}:{},...s?{ambientServiceRun:s}:{}}))},runs:{get:(n)=>R(()=>t.runs.get({runId:n})),cancel:(n)=>R(()=>t.runs.cancel({runId:n})),stream:(n)=>R(()=>t.runs.stream(n))},search:{threads:(n)=>R(()=>t.search.threads(n)),messages:(n)=>R(()=>t.search.messages(n))},publicKeys:{list:(n)=>R(()=>t.publicKeys.list(n)),get:(n,i)=>R(()=>t.publicKeys.get(i?{keyId:n,projectId:i}:{keyId:n})),ensureLogForwarding:(n)=>R(()=>t.publicKeys.ensureLogForwarding(n)),update:(n)=>R(()=>t.publicKeys.update(n)),deactivate:(n)=>R(()=>t.publicKeys.deactivate(n))},secretKeys:{list:(n)=>R(()=>t.secretKeys.list(n)),get:(n)=>R(()=>t.secretKeys.get({keyId:n})),create:(n)=>R(()=>t.secretKeys.create(n)),update:(n)=>R(()=>t.secretKeys.update(n)),delete:(n)=>R(()=>t.secretKeys.delete(n))},issues:{count:(n={})=>R(()=>t.issues.count(n)),create:(n)=>R(()=>t.issues.create(n)),list:(n={})=>R(()=>t.issues.list(n)),search:(n={})=>R(()=>t.issues.search(n)),get:(n)=>R(()=>t.issues.get({issueId:n})),resolve:(n)=>R(()=>t.issues.resolve({issueId:n})),ignore:(n)=>R(()=>t.issues.ignore({issueId:n})),reopen:(n)=>R(()=>t.issues.reopen({issueId:n})),mute:(n)=>R(()=>t.issues.mute({issueId:n})),unmute:(n)=>R(()=>t.issues.unmute({issueId:n}))},pullRequests:{list:(n={})=>R(()=>t.pullRequests.list(n))},statusComponents:{list:(n={})=>R(()=>t.statusComponents.list(n)),get:(n)=>R(()=>t.statusComponents.get({componentId:n})),register:(n)=>R(()=>t.statusComponents.register(n)),deregister:(n,i)=>R(()=>t.statusComponents.deregister({componentId:n,...i!==void 0?{reason:i}:{}})),incidents:{list:(n={})=>R(()=>t.statusComponents.incidents.list(n))},timeline:(n)=>R(()=>t.statusComponents.timeline(n))},billing:{getSummary:(n={})=>R(()=>t.billing.getSummary(n)),getUsage:(n={})=>R(()=>t.billing.getUsage(n)),listTransactions:(n={})=>R(()=>t.billing.listTransactions(n))},tasks:{list:(n={})=>R(()=>t.tasks.list(n))},recommendations:{list:(n={})=>R(()=>t.recommendations.list(n))},dataSources:{listTypes:()=>R(()=>t.dataSources.listTypes()),connections:{list:(n)=>R(()=>t.dataSources.connections.list(n)),get:(n)=>R(()=>t.dataSources.connections.get({connectionId:n})),create:(n)=>R(()=>t.dataSources.connections.create(n)),disconnect:(n)=>R(()=>t.dataSources.connections.disconnect({connectionId:n}))},streams:{list:(n)=>R(()=>t.dataSources.streams.list({connectionId:n})),get:(n)=>R(()=>t.dataSources.streams.get({streamId:n})),create:(n)=>R(()=>t.dataSources.streams.create(n)),delete:(n)=>R(()=>t.dataSources.streams.delete({streamId:n}))}},integrations:{listProviders:()=>R(()=>t.integrations.listProviders()),listConnections:(n)=>R(()=>t.integrations.listConnections(n)),getConnection:(n)=>R(()=>t.integrations.getConnection({connectionId:n}))},mcpConnectors:{list:(n)=>R(()=>t.mcpConnectors.list(n)),get:(n)=>R(()=>t.mcpConnectors.get(n)),details:(n)=>R(()=>t.mcpConnectors.details(n)),listProviders:()=>R(()=>t.mcpConnectors.listProviders())},sandboxPresets:{listTypes:()=>R(()=>t.sandboxPresets.listTypes())}}};var Dc=g(()=>{FO();oe()});var Oq;var Pq=g(()=>{Oq={version:2,activeProfile:"default",profiles:{default:{}}}});import*as Jn from"node:fs";import*as Sq from"node:os";import*as eP from"node:path";var gt=(e)=>{if(e===void 0||e===null)return;if(typeof e==="string")return e.length>0?e:void 0;return},QO,Ir,qse=()=>{if(!Jn.existsSync(QO))Jn.mkdirSync(QO,{recursive:!0,mode:448})},VO,$q=(e)=>{VO=e},Tq=(e)=>({token:gt(e.token),activeOrganizationId:gt(e.activeOrganizationId??e.organizationId),organizationName:gt(e.organizationName),activeProjectId:gt(e.activeProjectId??e.defaultProjectId),apiBaseUrl:gt(e.apiBaseUrl),authBaseUrl:gt(e.authBaseUrl),webBaseUrl:gt(e.webBaseUrl),intakeBaseUrl:gt(e.intakeBaseUrl),tailBaseUrl:gt(e.tailBaseUrl),apiDomain:gt(e.apiDomain),webDomain:gt(e.webDomain),intakeDomain:gt(e.intakeDomain),tailDomain:gt(e.tailDomain),forwardPublicKey:gt(e.forwardPublicKey),forwardPublicKeyProjectId:gt(e.forwardPublicKeyProjectId)}),Hse=(e)=>({version:2,activeProfile:"default",profiles:{default:Tq(e)}}),Wse=(e)=>{let t=gt(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]=Tq(r)}if(!i[t])i[t]={};return{version:2,activeProfile:t,profiles:i}},Re=()=>{try{if(!Jn.existsSync(Ir))return rt(Oq);let e=Jn.readFileSync(Ir,"utf-8"),t=JSON.parse(e),n=typeof t.version==="number"?t.version:void 0;if(n!==void 0&&n>2)return We("Settings file requires a newer CLI version. Upgrade with 'npm install -g @sazabi/cli@latest'.");if(n===2)return rt(Wse(t));let i=Hse(t),o=Ye(i);if(!o.success)return o;return rt(i)}catch(e){let t=e instanceof Error?e.message:String(e);return We(t)}},Ye=(e)=>{try{return qse(),Jn.writeFileSync(Ir,JSON.stringify(e,null,2),{encoding:"utf-8",mode:384}),rt(void 0)}catch(t){let n=t instanceof Error?t.message:String(t);return We(n)}},On=(e,t)=>{if(t)return t;if(VO)return VO;let n=process.env.SAZABI_PROFILE?.trim();if(n)return n;return e.activeProfile??"default"},Nt=(e,t)=>{let n=On(e,t),i=e.profiles[n];if(i)return rt(i);if(n==="default")return rt({});return We(`Profile '${n}' does not exist. Run 'sazabi profiles create ${n}' first.`)},Bn=()=>{let e=Re();if(!e.success)return e;return Nt(e.value)},_t=(e,t,n)=>{let i=On(e,n);if(!e.profiles[i])return We(`Profile '${i}' does not exist. Run 'sazabi profiles create ${i}' first.`);return rt({...e,profiles:{...e.profiles,[i]:{...e.profiles[i],...t}}})},qn=(e)=>{if(!e?.forwardPublicKey&&!e?.forwardPublicKeyProjectId)return{};return{forwardPublicKey:void 0,forwardPublicKeyProjectId:void 0}};var Zt=g(()=>{Pq();oe();QO=eP.join(Sq.homedir(),".sazabi"),Ir=eP.join(QO,"settings.json")});var Pn=(e)=>{let{cliFlag:t,globalUrl:n,globalDomain:i,buildUrlFromDomain:o,defaultUrl:r}=e;if(t)return t;let a=process.env.SAZABI_API_URL?.trim();if(a)return a;if(n)return n;if(i)return o(i);return r},D=(e)=>{let{tokenFlag:t,organizationIdFlag:n,projectIdFlag:i,jsonMode:o}=e,r=t?.trim(),a=process.env.SAZABI_TOKEN?.trim(),s=process.env.SAZABI_ORGANIZATION_ID?.trim(),h=process.env.SAZABI_PROJECT_ID?.trim(),l=f(Bn(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",o),u=l.token?.trim(),d=(r&&r.length>0?r:void 0)||(a&&a.length>0?a:void 0)||u,y=r&&r.length>0?"flag":a&&a.length>0?"environment":"settings";if(!d||d.length===0){if(o)return p("Not authenticated. Set SAZABI_TOKEN, pass --token, run 'sazabi auth login', or run 'sazabi auth save <token>'.");return m("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 k,O;if(i)k=i,O="flag";else if(h&&h.length>0)k=h,O="environment";else if(l.activeProjectId)k=l.activeProjectId,O="settings";return{token:d,type:"token",projectId:k,organizationId:b,tokenSource:y,organizationSource:w,projectSource:O}},nP=(e)=>{let t=f(Bn(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",e?.jsonMode);return Pn({cliFlag:e?.apiBaseUrlFlag,globalUrl:t.apiBaseUrl,globalDomain:t.apiDomain,buildUrlFromDomain:(n)=>`https://api.${n}`,defaultUrl:"https://api.sazabi.com"})},z=(e)=>{let t=nP({apiBaseUrlFlag:e.apiBaseUrlFlag,jsonMode:e.jsonMode});return Gn({token:e.token,baseUrl:t,organizationId:e.organizationId,projectId:e.projectId})},Aq,tP,Yu=async(e)=>{let t=f(Bn(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",e.jsonMode),n=Pn({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=Aq.get(i);if(o)return o;let r=tP.get(i);if(r)return r;if(!e.projectId){if(e.jsonMode)return p("Project ID is required. Run 'sazabi projects use <project-id>' or set SAZABI_PROJECT_ID.");return m("Project ID is required. Run 'sazabi projects use <project-id>' or set SAZABI_PROJECT_ID.")}let a=e.projectId,s=(async()=>{let l=await Gn({token:e.token,baseUrl:n,projectId:a}).projects.get(a),d=f(l,"Couldn't fetch project info (run 'sazabi projects list' to verify the project ID)",e.jsonMode).project;return Aq.set(i,d),d})();tP.set(i,s);try{return await s}finally{tP.delete(i)}},Mu=(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\.)+/,"")}`},Or=(e)=>{let t=(i)=>i.replace(/\/+$/,"");if(e)return t(e);let n=f(Bn(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)");if(n.webBaseUrl)return t(n.webBaseUrl);if(n.webDomain)return Mu(n.webDomain);if(n.apiDomain)return Mu(n.apiDomain);return"https://app.sazabi.com"},Sn=(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 p(n);return m(n)},yo=(e,t)=>{return`${Or(t)}/projects/${e}`},Xe=(e,t,n,i)=>{let o=`${Or(n)}/projects/${e}/threads/${t}`;return i?`${o}?messageId=${encodeURIComponent(i)}`:o},Cq=(e,t,n,i)=>{return Xe(e,t,n,i)},Lq=(e,t,n)=>{return`${yo(e,n)}/issues/${t}`},Dq=(e,t,n)=>{return`${yo(e,n)}/automations/${t}`},zq=(e,t)=>{return`${yo(e,t)}/status`},Nq=(e,t,n)=>{return`${yo(e,n)}/settings/data-sources/${t}`},_q=(e,t,n)=>{return`${yo(e,n)}/settings/mcp-connectors/${t}`},jq=(e,t,n)=>{return`${yo(e,n)}/settings/sandbox/catalog/${t}`},Rq=(e,t)=>{return`https://otlp.${t}.intake.${e}`};var he=g(()=>{te();Dc();oe();Zt();Aq=new Map,tP=new Map});var ng,WW=(e)=>{ng.set(e.name,e)},og=(e)=>{return ng.get(e)},Nc=()=>{return Array.from(ng.values())},MW=(e)=>{return ng.has(e)};var IP=g(()=>{ng=new Map});async function $P(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 TP(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 pye(e){let t=await e.dataSources.connections.list();if(!t.success)return[];return t.value.connections.map((n)=>({value:n.id,description:n.displayName??void 0}))}async function ZW(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 yye=3000,bye,FW=async(e,t,n)=>{try{let i=bye[e]?.[t];if(!i)return[];let o=Bn();if(!o.success)return[];let r=o.value,a=process.env.SAZABI_TOKEN?.trim()||r.token?.trim();if(!a)return[];let s=Pn({globalUrl:r.apiBaseUrl,globalDomain:r.apiDomain,buildUrlFromDomain:(u)=>`https://api.${u}`,defaultUrl:"https://api.sazabi.com"}),h=Gn({token:a,baseUrl:s,organizationId:r.activeOrganizationId,projectId:r.activeProjectId});return(await Promise.race([i(h),new Promise((u)=>setTimeout(()=>u([]),yye))])).filter((u)=>u.value.startsWith(n))}catch{return[]}};var QW=g(()=>{Dc();he();Zt();bye={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:$P,update:$P,deactivate:$P},"secret-keys":{get:TP,update:TP,delete:TP},"data-sources":{"get-connection":pye},members:{"update-role":ZW,remove:ZW}}});var eM={};un(eM,{parseCompletionContext:()=>vye,getCompletions:()=>kye});var mye,wye,vye=(e)=>{let t=e.length>0?e:[""],n=t.length-1,i=t[n]??"";return{words:t,currentIndex:n,partial:i}},kye=async(e)=>{let{words:t,currentIndex:n,partial:i}=e,o=t[n-1];if(o==="--profile")return Pye(i);let r=Oye(t),a=Math.max(0,r.length-(t.length-n));if(a===0)return fye(i);let s=r[0]??"",h=og(s);if(!h)return[];if(a===1&&h.subcommands){if(i.startsWith("-"))return VW(h.options,r);return Iye(h,i)}let l=h.subcommands?r[1]:void 0,d=(l?h.subcommands?.[l]:void 0)?.options??h.options;if(i.startsWith("-"))return VW(d,r);if(o?.startsWith("--")){let y=o.slice(2);if(d?.[y]?.type==="string"){let w=`${s}:${l??""}`,k=wye[w]?.[y]??mye[y];if(k)return k.filter((O)=>O.startsWith(i)).map((O)=>({value:O}));return[]}}return FW(s,l??"",i)},fye=(e)=>{let n=Nc().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},Iye=(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}))},VW=(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,a]of Object.entries(e)){let s=`--${r}`;if(i.has(s))continue;if(!s.startsWith(n))continue;o.push({value:s,description:a.description})}return o},Oye=(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},Pye=(e)=>{try{let t=Re();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 tM=g(()=>{IP();Zt();QW();mye={status:["regular","archived"],format:["json","text"]},wye={"members:update-role":{role:["admin","member"]},"messages:search":{role:["user","assistant"]},"messages:list":{role:["user","assistant"]}}});te();te();te();import{parseArgs as LM}from"node:util";var $=(e,t,n={})=>{let i=LM({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)),a=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&&a.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)p(h);m(h)}for(let[h,l]of Object.entries(t))if(l.type==="string"&&i.values[h]===!0){let u=h.length===1?`-${h}`:`--${h}`,d=`Option ${u} requires a value. Use '${u} <value>'.`;if(o)p(d);m(d)}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)p(b);m(b)}}}return{values:i.values,positionals:i.positionals}};var Kc=(e,t)=>{if(e?.json?.type!=="boolean")throw Error(`${t} must include a boolean --json option (enforced by CommandBuilder)`)};class qP{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)Kc(this.options,`Subcommand "${this.name}"`);if(!this.allowNoJson&&this.subcommands){for(let[e,t]of Object.entries(this.subcommands))if(!t.subcommands)Kc(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 HP{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)Kc(this.options,`Command "${this.name}"`);if(this.subcommands)for(let[e,t]of Object.entries(this.subcommands)){if(t.subcommands)continue;Kc(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 ne=(e,t)=>{return new HP(e,t)},S=(e,t,n)=>{return new qP(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 a=`${i} must be between ${t} and ${n}.`;if(o)return p(a);return m(a)}return r},At=(e,t,n,i)=>{if(!t.includes(e)){let o=t.map((a)=>`"${a}"`).join(" or "),r=`${n} must be ${o}.`;if(i)return p(r);return m(r)}return e};te();he();oe();var iP=(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},Eq=(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)}},Kq=(e,t)=>{return iP(e).find((n)=>n.id===t)},oP=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),Uq=(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},Mse=(e)=>{if(Array.isArray(e)&&e.every(oP))return e;if(oP(e))for(let t of["rows","data","items","points"]){let n=e[t];if(Array.isArray(n)&&n.every(oP))return n}return null},xq=(e)=>{let t=Mse(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(Uq).join(",")];for(let o of t)i.push(n.map((r)=>Uq(o[r])).join(","));return i.join(`
8560
8561
  `)};var Yse=100,Gq=100,Xse=async(e,t,n)=>{let i=[],o;for(let r=0;r<Gq;r++){let a=await e.messages.list(t,{limit:Yse,...o?{cursor:o}:{}}),s=f(a,"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 ${Gq}-page limit; the artifact may exist beyond the scanned messages.`);return i},Zse=(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)p(i);else m(i);return},Fse=(e,t)=>{if(t.json){ee({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=xq(e.data);if(n===null){m(`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))},Jq=async(e,t)=>{if(!Eq(e)){let h=`Invalid artifact ID: '${e}'. Expected format '<message-id>:<index>' (from 'sazabi artifacts list').`;if(t.json)return p(h);return m(h)}let i=Zse(e,t.threadId,t.json);if(!i)return;let o=D({tokenFlag:t.token,jsonMode:t.json}),r=z({token:o.token,projectId:o.projectId,apiBaseUrlFlag:t.apiBaseUrl}),a=await Xse(r,i,t.json),s=Kq(a,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 p(h);return m(h)}Fse(s,t)};te();he();oe();var Qse={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"}}},Vse={schema:Qse,columns:["id","name","toolCallId","createdAt"],header:"Artifacts",emptyMessage:"No artifacts found in this thread."},ehe=100,Bq=100,the=async(e,t,n)=>{let i=[],o;for(let r=0;r<Bq;r++){let a=await e.messages.list(t,{limit:ehe,...o?{cursor:o}:{}}),s=f(a,"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 ${Bq}-page limit; artifact list may be incomplete for this thread.`);return i},qq=async(e)=>{let t=D({tokenFlag:e.token,jsonMode:e.json}),n=z({token:t.token,projectId:t.projectId,apiBaseUrlFlag:e.apiBaseUrl}),i=await the(n,e.threadId,e.json),r=iP(i).map((a)=>({id:a.id,name:a.name,toolCallId:a.toolCallId,createdAt:a.createdAt}));X(Vse,r,{json:e.json})};var Hq=ne("artifacts","Retrieve artifacts produced in a thread").withSubcommands({list:S("list","List artifacts produced in a thread",async(e)=>{let{values:t}=$(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 p("--thread-id is required. Usage: sazabi artifacts list --thread-id <thread-id>");return m("--thread-id is required. Usage: sazabi artifacts list --thread-id <thread-id>")}await qq({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:S("get","Get a single artifact's data",async(e)=>{let{values:t,positionals:n}=$(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 p("Artifact ID is required. Usage: sazabi artifacts get <artifact-id> --thread-id <thread-id>");return m("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 p(`Unexpected arguments: ${r}.`);return m(`Unexpected arguments: ${r}.`)}let o;if(t.format)o=At(t.format,["json","csv"],"Format",t.json);await Jq(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();FO();import{spawn as nhe}from"node:child_process";var J={token:{type:"string"},"api-base-url":{type:"string"},json:{type:"boolean"}},B={token:{type:"string",description:"Override token"},"api-base-url":{type:"string",description:"Override API base URL"},json:{type:"boolean",description:"Output as JSON"}};he();oe();Zt();var Pr=(e)=>{if(e==="flag")return"from flag";if(e==="environment")return"from environment";return"from settings"},ohe=async(e={})=>{let t=D({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){ee({credential:i,activeOrganizationId:t.organizationId,activeProjectId:t.projectId,tokenSource:t.tokenSource,organizationSource:t.organizationSource,projectSource:t.projectSource});return}if(fe("Authentication"),i.credentialType==="user"){Pe({Type:`User token (${Pr(t.tokenSource)})`,User:i.user.name??i.user.email,Email:i.user.email,"Active organization":t.organizationId&&t.organizationSource?`${t.organizationId} (${Pr(t.organizationSource)})`:st("(none)"),"Active project":t.projectId&&t.projectSource?`${t.projectId} (${Pr(t.projectSource)})`:st("(none)"),Organizations:i.organizations.length.toString(),"Dashboard URL":Or()});return}if(i.credentialType==="secret"){Pe({Type:`Secret key (${Pr(t.tokenSource)})`,Organization:i.organization.name,"Key name":i.keyName,"Active project":t.projectId&&t.projectSource?`${t.projectId} (${Pr(t.projectSource)})`:st("(none)"),"Dashboard URL":Or()});return}Pe({Type:`Partner key (${Pr(t.tokenSource)})`,Superorganization:i.superorganization.name,"Dashboard URL":Or()})},ihe=async(e,t={})=>{let n=e.trim();if(!n){if(t.json)return p("Token is required.");return m("Token is required.")}let i=f(Re(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",t.json);await rP({token:n,options:t,cliSettings:i,status:"saved"})},Wq=(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=nhe(n,i,{detached:!0,stdio:"ignore"});o.on("error",()=>{}),o.unref()},Mq=(e)=>new Promise((t)=>setTimeout(t,e)),rhe=async(e={})=>{let t=f(Re(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",e.json),n=On(t),i=t.profiles[n]??{},o=aP(i,e.apiBaseUrl),r=Yq(o,e.authBaseUrl??i.authBaseUrl),a;try{a=await XO({apiBaseUrl:r})}catch(y){let b=y instanceof Error?y.message:String(y);if(e.json)return p(`Failed to initiate sign-up: ${b}`);return m(`Failed to initiate sign-up: ${b}`)}let s=Zq({profile:i,publicApiBaseUrl:o,authBaseUrl:r,apiBaseUrlOverride:e.apiBaseUrl,authBaseUrlOverride:e.authBaseUrl,webBaseUrlOverride:e.webBaseUrl,verificationUriComplete:a.verificationUriComplete}),h=`/login/cli?user_code=${encodeURIComponent(a.userCode)}`,l=`${s}/sign-up?returnTo=${encodeURIComponent(h)}`,u=new Date(Date.now()+a.expiresIn*1000),d=a.interval*1000;if(!e.json)ce(),fe("Create a Sazabi account"),ce(),gn(`Opening ${Ne.info(l)}`),ce(),Wq(l),de("Waiting for sign-up to complete...");while(new Date<u){await Mq(d);try{let y=await ZO({apiBaseUrl:r,deviceCode:a.deviceCode});if(y.status==="pending"){d=(y.interval??a.interval)*1000;continue}if(y.status==="denied"){if(e.json)return p("Sign-up was denied.");return ce(),m("Sign-up was denied.")}if(y.status==="expired"){if(e.json)return p("Sign-up request expired. Try again.");return ce(),m("Sign-up request expired. Try again.")}await rP({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 p(`Sign-up failed: ${b}`);return ce(),m(`Sign-up failed: ${b}`)}}if(e.json)return p("Sign-up request expired. Try again.");return ce(),m("Sign-up request expired. Try again.")},ahe=async(e={})=>{let t=f(Re(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",e.json),n=On(t),i=t.profiles[n]??{},o=aP(i,e.apiBaseUrl),r=Yq(o,e.authBaseUrl??i.authBaseUrl),a;try{a=await XO({apiBaseUrl:r})}catch(d){let y=d instanceof Error?d.message:String(d);if(e.json)return p(`Failed to initiate login: ${y}`);return m(`Failed to initiate login: ${y}`)}let s=Zq({profile:i,publicApiBaseUrl:o,authBaseUrl:r,apiBaseUrlOverride:e.apiBaseUrl,authBaseUrlOverride:e.authBaseUrl,webBaseUrlOverride:e.webBaseUrl,verificationUriComplete:a.verificationUriComplete}),h=yhe(a.verificationUriComplete,s),l=new Date(Date.now()+a.expiresIn*1000),u=a.interval*1000;if(!e.json)ce(),fe("Sign in to Sazabi"),ce(),gn("Enter this code in your browser:"),ce(),gn(Ne.bold(a.userCode),4),ce(),gn(`Opening ${Ne.info(h)}`),ce(),Wq(h),de("Waiting for authorization...");while(new Date<l){await Mq(u);try{let d=await ZO({apiBaseUrl:r,deviceCode:a.deviceCode});if(d.status==="pending"){u=(d.interval??a.interval)*1000;continue}if(d.status==="denied"){if(e.json)return p("Authorization was denied.");return ce(),m("Authorization was denied.")}if(d.status==="expired"){if(e.json)return p("Authorization request expired. Try again.");return ce(),m("Authorization request expired. Try again.")}await rP({token:d.accessToken,options:e,cliSettings:t,status:"authorized"});return}catch(d){let y=d instanceof Error?d.message:String(d);if(e.json)return p(`Authorization failed: ${y}`);return ce(),m(`Authorization failed: ${y}`)}}if(e.json)return p("Authorization request expired. Try again.");return ce(),m("Authorization request expired. Try again.")},che=(e)=>{let t=f(Re(),"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(_t(t,{token:void 0,activeOrganizationId:void 0,organizationName:void 0,activeProjectId:void 0,...qn(n)}),"Failed to update profile",e.json);if(f(Ye(o),"Failed to remove credentials",e.json),e.json){ee({removed:i});return}if(i){ae("Signed out.");return}de("No credentials were saved.")},rP=async({token:e,options:t,cliSettings:n,status:i})=>{let o=On(n),r=n.profiles[o]??{},a=aP(r,t.apiBaseUrl),s=z({token:e,apiBaseUrlFlag:t.apiBaseUrl,jsonMode:t.json}),h=f(await s.me(),`Couldn't resolve authenticated context at ${a} (pass --api-base-url to target a different environment)`,t.json);if(i==="authorized"&&h.credentialType!=="user"){if(t.json)return p("Expected a user session from device authorization.");return m("Expected a user session from device authorization.")}let l=n.profiles[o]?n:{...n,profiles:{...n.profiles,[o]:{}}},u=l.profiles[o],d=await she({client:s,credential:h,currentProjectId:u.activeProjectId,jsonMode:t.json}),y=u.token!==e||u.activeOrganizationId!==d.activeOrganizationId||u.activeProjectId!==d.activeProjectId,b=f(_t(l,{token:e,activeOrganizationId:d.activeOrganizationId,organizationName:d.activeOrganizationName,activeProjectId:d.activeProjectId,apiBaseUrl:t.apiBaseUrl??u.apiBaseUrl,authBaseUrl:t.authBaseUrl??u.authBaseUrl,webBaseUrl:t.webBaseUrl??u.webBaseUrl,...y&&qn(u)}),"Failed to update profile",t.json);if(f(Ye(b),"Failed to save credentials",t.json),t.json){ee({status:i,credential:h,activeOrganizationId:d.activeOrganizationId,activeProjectId:d.activeProjectId,projects:d.projects});return}if(ce(),ae(i==="authorized"?"Signed in.":"Token saved."),ce(),lhe({credential:h,activeOrganizationName:d.activeOrganizationName,activeProjectId:d.activeProjectId,projects:d.projects}),d.projects.length>0){ce(),fe("Available projects");for(let w of d.projects){let O=w.id===d.activeProjectId?Ne.success(" (active)"):"";gn(`${w.name} (${w.region})${O}`)}}},she=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,a=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:hhe(a,n),projects:a}},hhe=(e,t)=>{if(t&&e.some((n)=>n.id===t))return t;return e[0]?.id},lhe=({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})},aP=(e,t)=>{return Pn({cliFlag:t,globalUrl:e.apiBaseUrl,globalDomain:e.apiDomain,buildUrlFromDomain:(n)=>`https://api.${n}`,defaultUrl:"https://api.sazabi.com"})},Yq=(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}},Xq=(e)=>e.replace(/\/+$/,""),jt=(e)=>(e?.trim().length??0)>0,uhe=(e)=>{if(!jt(e))return;try{let t=new URL(e);return`${t.protocol}//${t.host}`}catch{return}},Sr=(e)=>{if(!jt(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},ghe=(e)=>{if(jt(e.webBaseUrl))return Xq(e.webBaseUrl);if(jt(e.webDomain))return Mu(e.webDomain);return},dhe=({profile:e,publicApiBaseUrl:t})=>{if(!(jt(e.authBaseUrl)||jt(e.apiBaseUrl)||jt(e.apiDomain)))return;if(jt(e.authBaseUrl)){let i=Sr(e.authBaseUrl);if(i)return i}return Sr(t)},Zq=({profile:e,publicApiBaseUrl:t,authBaseUrl:n,apiBaseUrlOverride:i,authBaseUrlOverride:o,webBaseUrlOverride:r,verificationUriComplete:a})=>{if(jt(r))return Xq(r);let s=process.env.SAZABI_API_URL?.trim(),h=jt(o)||jt(i)||jt(s),l=uhe(a);if(h){let y=jt(o)?Sr(n):Sr(t);if(y)return y;if(l)return l}let u=ghe(e);if(u)return u;let d=dhe({profile:e,publicApiBaseUrl:t});if(d)return d;if(l)return l;return"https://app.sazabi.com"},yhe=(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}},Fq=ne("auth","Manage authentication credentials").withSubcommands({signup:S("signup","Create a new Sazabi account via browser",async(e)=>{let{values:t,positionals:n}=$(e,{...J,"auth-base-url":{type:"string"},"web-base-url":{type:"string"}},{allowPositionals:!0});if(n.length>0){let i=n.join(", ");if(t.json)return p(`Unexpected arguments: ${i}.`);return m(`Unexpected arguments: ${i}.`)}await rhe({json:t.json,apiBaseUrl:t["api-base-url"],authBaseUrl:t["auth-base-url"],webBaseUrl:t["web-base-url"]})}).withOptions({...B,"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:S("login","Authenticate via browser",async(e)=>{let{values:t,positionals:n}=$(e,{...J,"auth-base-url":{type:"string"},"web-base-url":{type:"string"}},{allowPositionals:!0});if(n.length>0){let i=n.join(", ");if(t.json)return p(`Unexpected arguments: ${i}.`);return m(`Unexpected arguments: ${i}.`)}await ahe({json:t.json,apiBaseUrl:t["api-base-url"],authBaseUrl:t["auth-base-url"],webBaseUrl:t["web-base-url"]})}).withOptions({...B,"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:S("save","Save an existing bearer token",async(e)=>{let{values:t,positionals:n}=$(e,{...J,"web-base-url":{type:"string"}},{allowPositionals:!0}),i=n[0];if(!i){if(t.json)return p("Token is required.");return m("Token is required.")}if(n.length>1){let o=n.slice(1).join(", ");if(t.json)return p(`Unexpected arguments: ${o}.`);return m(`Unexpected arguments: ${o}.`)}await ihe(i,{json:t.json,apiBaseUrl:t["api-base-url"],webBaseUrl:t["web-base-url"]})}).withPositionalArgs("<token>").withOptions({...B,"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:S("logout","Remove saved credentials",async(e)=>{let{values:t,positionals:n}=$(e,J,{allowPositionals:!0});if(n.length>0){let i=n.join(", ");if(t.json)return p(`Unexpected arguments: ${i}.`);return m(`Unexpected arguments: ${i}.`)}che({json:t.json})}).withOptions(B).withExamples(["sazabi auth logout # Remove saved credentials"]).build(),whoami:S("whoami","Display current authentication context",async(e)=>{let{values:t,positionals:n}=$(e,J,{allowPositionals:!0});if(n.length>0){let i=n.join(", ");if(t.json)return p(`Unexpected arguments: ${i}.`);return m(`Unexpected arguments: ${i}.`)}await ohe({json:t.json,apiBaseUrl:t["api-base-url"]})}).withOptions(B).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();he();oe();var cP=(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,canToggle:"canToggle"in e?e.canToggle:null,createdAt:"createdAt"in e?e.createdAt:null,updatedAt:"updatedAt"in e?e.updatedAt:null}),Vq={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"}},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"}}},bhe={schema:Vq,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."},eH={layout:"field-list",schema:Vq,fields:["id","url","name","status","source","kind","health","cronExpression","timezone","timeoutSeconds","successRate","runCount","failedRunCount","lastRunStatus","lastRunAt","scriptIdentifier","canToggle","createdAt","updatedAt"],title:"Automation"},tH=(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}),nH={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)"}}},phe={schema:nH,columns:["status","startedAt","durationMs","exitCode"],jsonFields:["id","automationRunKey","status","scheduledAt","dueAt","startedAt","completedAt","durationMs","exitCode","errorMessage"],header:"Automation runs",emptyMessage:"No automation runs found."},mhe={layout:"field-list",schema:nH,fields:["id","automationId","automationRunKey","status","scheduledAt","dueAt","startedAt","completedAt","durationMs","exitCode","errorMessage"],title:"Automation run"},whe=(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}),vhe={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}}},khe={layout:"field-list",schema:vhe,fields:["status","exitCode","truncated","durationMs","startedAt","completedAt","stdout","stderr"],title:"Automation run logs"},Tr=(e)=>{let t=D({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}},oH=(e,t)=>t?{...e,url:Dq(t,e.id)}:e,fhe=async(e)=>{let{client:t}=Tr(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);X(bhe,n.automations.map(cP),{json:e.json,nextCursor:n.nextCursor})},Ihe=async(e,t)=>{let{client:n,projectId:i}=Tr(t),o=f(await n.automations.get(e),"Couldn't get automation (run 'sazabi automations list' to see automation IDs)",t.json);M(eH,oH(cP(o.automation),i),{json:t.json})},iH=async(e,t,n)=>{let{client:i,projectId:o}=Tr(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),a=oH(cP(r.automation),o);if(!n.json)ae(`Automation "${a.name}" is now ${t?"enabled":"disabled"}.`);M(eH,a,{json:n.json})},Ohe=async(e,t)=>iH(e,!0,t),Phe=async(e,t)=>iH(e,!1,t),She=async(e,t)=>{let{client:n}=Tr(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);X(phe,i.runs.map(tH),{json:t.json,nextCursor:i.nextCursor})},$he=async(e,t,n)=>{let{client:i}=Tr(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(mhe,tH(o.run),{json:n.json})},The=async(e,t,n)=>{let{client:i}=Tr(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(khe,whe(o.logs),{json:n.json})},Ho={...J,"project-id":{type:"string"}},Wo={...B,"project-id":{type:"string",description:"Override active project ID"}},$r=(e,t)=>{let n=e[0];if(!n){if(t){p("Automation ID is required.");return}m("Automation ID is required.");return}return n},Qq=(e,t)=>{let n=e[1];if(!n){if(t){p("Run ID is required.");return}m("Run ID is required.");return}return n},rH=ne("automations","Manage scheduled automations").withSubcommands({list:S("list","List automations in the active project",async(e)=>{let{values:t}=$(e,{...Ho,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){p(u);return}m(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,a=["healthy","failing","never_run"];if(r!==void 0&&!a.includes(r))return n(`Invalid --health value "${r}". Expected one of: ${a.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 fhe({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({...Wo,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:S("get","Get one automation by ID",async(e)=>{let{values:t,positionals:n}=$(e,Ho,{allowPositionals:!0}),i=$r(n,t.json);if(!i)return;await Ihe(i,{token:t.token,projectId:t["project-id"],json:t.json,apiBaseUrl:t["api-base-url"]})}).withPositionalArgs("<automation-id>").withOptions(Wo).withExamples(["sazabi automations get <automation-id> # Get one automation"]).build(),enable:S("enable","Enable an automation",async(e)=>{let{values:t,positionals:n}=$(e,Ho,{allowPositionals:!0}),i=$r(n,t.json);if(!i)return;await Ohe(i,{token:t.token,projectId:t["project-id"],json:t.json,apiBaseUrl:t["api-base-url"]})}).withPositionalArgs("<automation-id>").withOptions(Wo).withExamples(["sazabi automations enable <automation-id> # Enable an automation"]).build(),disable:S("disable","Disable an automation",async(e)=>{let{values:t,positionals:n}=$(e,Ho,{allowPositionals:!0}),i=$r(n,t.json);if(!i)return;await Phe(i,{token:t.token,projectId:t["project-id"],json:t.json,apiBaseUrl:t["api-base-url"]})}).withPositionalArgs("<automation-id>").withOptions(Wo).withExamples(["sazabi automations disable <automation-id> # Disable an automation"]).build(),runs:S("runs","Inspect automation runs").withSubcommands({list:S("list","List runs for an automation",async(e)=>{let{values:t,positionals:n}=$(e,{...Ho,status:{type:"string"},limit:{type:"string"},cursor:{type:"string"}},{allowPositionals:!0}),i=$r(n,t.json);if(!i)return;let o=(h)=>{if(t.json){p(h);return}m(h)},r=t.status,a=["running","succeeded","failed","timed_out","cancelled"];if(r!==void 0&&!a.includes(r))return o(`Invalid --status value "${r}". Expected one of: ${a.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 She(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({...Wo,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:S("get","Get one automation run by ID",async(e)=>{let{values:t,positionals:n}=$(e,Ho,{allowPositionals:!0}),i=$r(n,t.json);if(!i)return;let o=Qq(n,t.json);if(!o)return;await $he(i,o,{token:t.token,projectId:t["project-id"],json:t.json,apiBaseUrl:t["api-base-url"]})}).withPositionalArgs("<automation-id> <run-id>").withOptions(Wo).withExamples(["sazabi automations runs get <automation-id> <run-id> # Get one automation run"]).build(),logs:S("logs","Get the captured logs for an automation run",async(e)=>{let{values:t,positionals:n}=$(e,Ho,{allowPositionals:!0}),i=$r(n,t.json);if(!i)return;let o=Qq(n,t.json);if(!o)return;await The(i,o,{token:t.token,projectId:t["project-id"],json:t.json,apiBaseUrl:t["api-base-url"]})}).withPositionalArgs("<automation-id> <run-id>").withOptions(Wo).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 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();he();oe();var sP=(e)=>{let t=e.json,n=D({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}},Ahe={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"}}},Che={layout:"field-list",schema:Ahe,fields:["plan","status","currency","balance","targetBalance","cycle","estimate","pendingDowngrade"]},Lhe=(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)})`:"—"}),Dhe=async(e)=>{let{values:t}=$(e,J),{client:n,json:i}=sP(t),o=f(await n.billing.getSummary(),"Couldn't fetch billing summary (check your organization access and try again)",i);if(!i){if(fe("Billing summary"),!o.billable&&o.nonBillableReason)Pe({"Not billable":o.nonBillableReason})}M(Che,Lhe(o),{json:i})},zhe={logs_ingested_bytes:"Log data (GB)",input_tokens:"Input tokens",output_tokens:"Output tokens"},Nhe=(e)=>{let t=Number.parseFloat(e);if(Number.isNaN(t))return e;return(t/1e9).toFixed(3)},_he=(e,t)=>{if(t==="logs_ingested_bytes")return Nhe(e);let n=Number.parseInt(e,10);return Number.isNaN(n)?e:n.toLocaleString()},jhe={dimension:{label:"Dimension",type:{kind:"string"}},total:{label:"Total quantity",type:{kind:"string"}},credits:{label:"Credits consumed",type:{kind:"string"}}},Rhe={schema:jhe,columns:["dimension","total","credits"],emptyMessage:"No usage recorded for this billing cycle."},Uhe=async(e)=>{let{values:t}=$(e,{...J,cycle:{type:"string"}}),{client:n,json:i}=sP(t);if(t.cycle&&t.cycle!=="current"&&t.cycle!=="previous"){if(i)return p("--cycle must be 'current' or 'previous'.");m("--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(fe(`Billing usage (${o} cycle)`),r.cycle)Pe({Cycle:`${r.cycle.startsAt.slice(0,10)} - ${r.cycle.endsAt.slice(0,10)}`})}let a=r.usage.map((s)=>{let h=s.dimension;return{dimension:zhe[h]??s.dimension,total:_he(s.totalQuantity,h),credits:s.creditsConsumed}});X(Rhe,a,{json:i})},Ehe={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"}}},Khe={schema:Ehe,columns:["occurredAt","type","delta","balance"],emptyMessage:"No billing transactions found."},xhe=async(e)=>{let{values:t}=$(e,{...J,limit:{type:"string"},page:{type:"string"}}),{client:n,json:i}=sP(t),o,r;if(t.limit){if(o=Number.parseInt(t.limit,10),Number.isNaN(o)||o<1||o>100){if(i)return p("--limit must be a positive integer (max 100).");m("--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 p("--page must be a positive integer.");m("--page must be a positive integer.");return}}let a=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)fe("Billing transactions");let s=a.items.map((h)=>({occurredAt:h.occurredAt,type:h.transactionType,delta:h.creditDelta,balance:h.balanceAfter}));if(X(Khe,s,{json:i,count:a.pagination.total}),!i&&a.pagination.hasNext){let h=(r??1)+1;Pe({"Next page":`Use --page ${h} for more results.`})}},Ghe=S("summary","Show the billing summary for your organization",async(e)=>{await Dhe(e)}).withOptions(B).withExamples(["sazabi billing summary # Show billing summary","sazabi billing summary --json # Output as JSON"]).build(),Jhe=S("usage","Show per-dimension usage for the current or previous cycle",async(e)=>{await Uhe(e)}).withOptions({...B,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(),Bhe=S("transactions","List recent credit ledger transactions",async(e)=>{await xhe(e)}).withOptions({...B,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(),aH=ne("billing","View billing summary, usage, and transactions").withSubcommands({summary:Ghe,usage:Jhe,transactions:Bhe}).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 cH=()=>`