@sazabi/cli 0.19.0-dev.g415de7d → 0.19.0-dev.g448df4d

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 +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -8549,7 +8549,7 @@ Connect 1Password so Sazabi agents can work with your vaults and secrets through
8549
8549
 
8550
8550
  1Password does not yet offer a hosted MCP endpoint Sazabi can connect to, so this connector is listed but not yet connectable from settings. Use the 1Password CLI sandbox preset for agent access today.
8551
8551
  `.trim()});import{dirname as zhe,resolve as _he}from"node:path";import{fileURLToPath as jhe}from"node:url";var Nhe,mG,pG,xhe,wG,Rhe,Uhe,Mhe,vG;var I$=g(()=>{be();bu();Nhe=_he(zhe(jhe(import.meta.url)),"../../../skills"),mG=["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"],pG=a.enum(mG),xhe=a.object({readOnlyToolNames:a.array(a.string()).optional(),blockedToolNames:a.array(a.string()).optional(),defaultUnavailableReason:a.enum(yu).optional(),allowWriteTools:a.boolean().optional()}),wG=a.object({registrationEndpoint:a.string().url(),tokenEndpointAuthMethod:a.enum(du).optional(),includeScopesInRegistration:a.boolean().optional()}),Rhe=a.object({providerConfigKey:a.string().min(1),callbackPathSegment:a.string().min(1),authorizationUrl:a.string().url().optional(),tokenUrl:a.string().url().optional(),resourceUrl:a.string().url().optional(),useServerUrlAsResource:a.boolean().optional(),omitScopeFromAuthorizationUrl:a.boolean().optional(),authorizationUrlParams:a.record(a.string(),a.string()).optional(),dynamicClientRegistration:wG.optional()}),Uhe=a.object({label:a.string().min(1),serverUrl:a.string().url(),authorizationUrl:a.string().url().optional(),tokenUrl:a.string().url().optional(),resourceUrl:a.string().url().optional(),dynamicClientRegistration:wG.optional()}),Mhe=a.object({id:a.string().min(1),title:a.string().min(1),description:a.string().optional(),body:a.string().min(1),fieldKeys:a.array(a.string().min(1)).optional(),imageKeys:a.array(a.string().min(1)).optional()}),vG=a.object({id:a.string().min(1),label:a.string().min(1),iconKey:pG,defaultServerUrl:a.string().url().nullable(),serverUrlPathSuffixMaxSegments:a.number().int().positive().optional(),transport:a.enum(vS),authMode:a.enum(fS),availability:a.enum(oi),oauth:Rhe.optional(),regions:a.array(Uhe).optional(),capabilityOverrides:xhe.optional(),helpText:a.string().optional(),setupGroups:a.array(Mhe).optional(),evidenceHints:a.array(a.string().min(1)).optional(),skill:a.string().min(1).optional(),setupSkill:a.string().min(1).optional(),scopesUserSelectable:a.boolean().optional()})});var C=(e)=>{return{...vG.parse(e),...e.getAvailableScopes?{getAvailableScopes:e.getAvailableScopes}:{},...e.getUrlConfiguration?{getUrlConfiguration:e.getUrlConfiguration}:{},...e.validateCredentials?{validateCredentials:e.validateCredentials}:{},...e.normalizeHeaders?{normalizeHeaders:e.normalizeHeaders}:{}}};var ne=g(()=>{I$()});var fG;var kG=g(()=>{ne();fG=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 SG;var PG=g(()=>{ne();SG=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 $G;var IG=g(()=>{ne();$G=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 AG;var TG=g(()=>{ne();AG=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:aG,normalizeHeaders:rG})});var A$,YKe,OG;var T$=g(()=>{ne();A$=[{value:"us-east-1",label:"US East (N. Virginia) — us-east-1"},{value:"eu-central-1",label:"Europe (Frankfurt) — eu-central-1"}],YKe=new Set(A$.map((e)=>e.value)),OG=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 LG;var CG=g(()=>{ne();LG=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 DG;var zG=g(()=>{ne();DG=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 _G;var jG=g(()=>{ne();_G=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:Eq,normalizeHeaders:Gq})});var NG;var xG=g(()=>{ne();NG=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 RG;var UG=g(()=>{ne();RG=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:yG})});var MG;var KG=g(()=>{ne();MG=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 qG;var GG=g(()=>{ne();qG=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 EG;var JG=g(()=>{ne();EG=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 BG;var HG=g(()=>{ne();BG=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 WG;var ZG=g(()=>{ne();WG=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 XG;var FG=g(()=>{ne();XG=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:Rq,normalizeHeaders:xq})});var YG;var QG=g(()=>{ne();YG=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:Vq,normalizeHeaders:Qq})});var VG;var eE=g(()=>{ne();VG=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:oG,normalizeHeaders:nG,skill:"context-dev",setupSkill:"context-dev-setup"})});var tE;var nE=g(()=>{ne();tE=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 oE;var rE=g(()=>{ne();oE=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:Nq,normalizeHeaders:_q})});var iE;var aE=g(()=>{ne();iE=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 cE;var sE=g(()=>{ne();cE=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:jq,normalizeHeaders:zq})});var lE;var hE=g(()=>{ne();lE=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:Yq,normalizeHeaders:Fq,skill:"exa",setupSkill:"exa-setup"})});var uE;var gE=g(()=>{ne();uE=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:dG,normalizeHeaders:gG})});var dE;var yE=g(()=>{ne();dE=C({id:"google-drive",label:"Google Drive",iconKey:"google-drive",defaultServerUrl:"https://drivemcp.googleapis.com/mcp/v1",transport:"streamable-http",authMode:"oauth",availability:"disabled",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(`
8552
- `)}],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 bE;var mE=g(()=>{ne();bE=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 pE;var wE=g(()=>{ne();pE=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 vE;var fE=g(()=>{ne();vE=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 kE;var SE=g(()=>{ne();kE=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 PE;var $E=g(()=>{ne();PE=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 IE;var AE=g(()=>{ne();IE=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:Bq,normalizeHeaders:Jq})});var TE;var OE=g(()=>{ne();TE=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:cG,normalizeHeaders:iG})});var LE;var CE=g(()=>{ne();LE=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 DE;var zE=g(()=>{ne();DE=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 _E;var jE=g(()=>{ne();_E=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 NE;var xE=g(()=>{ne();NE=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 RE;var UE=g(()=>{ne();RE=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 ME;var KE=g(()=>{ne();ME=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 qE;var GE=g(()=>{ne();qE=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 EE;var JE=g(()=>{ne();EE=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 BE;var HE=g(()=>{ne();BE=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 WE;var ZE=g(()=>{ne();WE=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 XE;var FE=g(()=>{ne();XE=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"},{value:"error_tracking:write"},{value:"session_recording:read"},{value:"session_recording_playlist:read"},{value:"alert:read"},{value:"activity_log:read"},{value:"annotation:read"},{value:"cohort:read"},{value:"hog_function: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 YE;var QE=g(()=>{ne();YE=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 VE;var eJ=g(()=>{ne();VE=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 tJ;var nJ=g(()=>{ne();tJ=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:Wq,normalizeHeaders:Hq})});var oJ;var rJ=g(()=>{ne();oJ=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:tG,normalizeHeaders:eG,skill:"rentahuman",setupSkill:"rentahuman-setup"})});var iJ;var aJ=g(()=>{ne();iJ=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:lG,normalizeHeaders:sG,skill:"resend",setupSkill:"resend-setup"})});var cJ;var sJ=g(()=>{ne();cJ=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:uG,normalizeHeaders:hG,skill:"respan",setupSkill:"respan-setup"})});var lJ;var hJ=g(()=>{ne();lJ=C({id:"salesforce",label:"Salesforce",iconKey:"salesforce",defaultServerUrl:"https://api.salesforce.com/platform/mcp/v1/platform/sobject-all",transport:"streamable-http",authMode:"oauth",availability:"disabled",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(`
8552
+ `)}],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 bE;var mE=g(()=>{ne();bE=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 pE;var wE=g(()=>{ne();pE=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 vE;var fE=g(()=>{ne();vE=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 kE;var SE=g(()=>{ne();kE=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 PE;var $E=g(()=>{ne();PE=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 IE;var AE=g(()=>{ne();IE=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:Bq,normalizeHeaders:Jq})});var TE;var OE=g(()=>{ne();TE=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:cG,normalizeHeaders:iG})});var LE;var CE=g(()=>{ne();LE=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 DE;var zE=g(()=>{ne();DE=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 _E;var jE=g(()=>{ne();_E=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 NE;var xE=g(()=>{ne();NE=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 RE;var UE=g(()=>{ne();RE=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 ME;var KE=g(()=>{ne();ME=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 qE;var GE=g(()=>{ne();qE=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 EE;var JE=g(()=>{ne();EE=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 BE;var HE=g(()=>{ne();BE=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 WE;var ZE=g(()=>{ne();WE=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 XE;var FE=g(()=>{ne();XE=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",required:!0},{value:"user:write"},{value:"organization:read",required:!0},{value:"project:read",required:!0},{value:"project:write"},{value:"survey:read"},{value:"survey:write"},{value:"error_tracking:read"},{value:"logs:read"},{value:"tracing:read"},{value:"error_tracking:write"},{value:"session_recording:read"},{value:"session_recording_playlist:read"},{value:"alert:read"},{value:"activity_log:read"},{value:"annotation:read"},{value:"cohort:read"},{value:"hog_function: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 YE;var QE=g(()=>{ne();YE=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 VE;var eJ=g(()=>{ne();VE=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 tJ;var nJ=g(()=>{ne();tJ=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:Wq,normalizeHeaders:Hq})});var oJ;var rJ=g(()=>{ne();oJ=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:tG,normalizeHeaders:eG,skill:"rentahuman",setupSkill:"rentahuman-setup"})});var iJ;var aJ=g(()=>{ne();iJ=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:lG,normalizeHeaders:sG,skill:"resend",setupSkill:"resend-setup"})});var cJ;var sJ=g(()=>{ne();cJ=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:uG,normalizeHeaders:hG,skill:"respan",setupSkill:"respan-setup"})});var lJ;var hJ=g(()=>{ne();lJ=C({id:"salesforce",label:"Salesforce",iconKey:"salesforce",defaultServerUrl:"https://api.salesforce.com/platform/mcp/v1/platform/sobject-all",transport:"streamable-http",authMode:"oauth",availability:"disabled",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(`
8553
8553
  `)}],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 uJ;var gJ=g(()=>{ne();uJ=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 dJ;var yJ=g(()=>{ne();dJ=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:Xq,normalizeHeaders:Zq})});var bJ;var mJ=g(()=>{ne();bJ=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 pJ;var wJ=g(()=>{ne();pJ=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 vJ;var fJ=g(()=>{ne();vJ=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 kJ;var SJ=g(()=>{ne();kJ=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:Kq,normalizeHeaders:Mq,skill:"the-context-company",setupSkill:"the-context-company-setup"})});var PJ;var $J=g(()=>{ne();PJ=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 IJ;var AJ=g(()=>{ne();IJ=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:qq,normalizeHeaders:Uq,skill:"x",setupSkill:"x-setup"})});var TJ,vJe;var OJ=g(()=>{kG();PG();IG();TG();T$();T$();CG();zG();jG();xG();UG();KG();GG();JG();HG();ZG();FG();QG();eE();nE();rE();aE();sE();hE();gE();yE();mE();wE();fE();SE();$E();AE();OE();CE();zE();jE();xE();UE();KE();GE();JE();HE();ZE();FE();QE();eJ();nJ();rJ();aJ();sJ();hJ();gJ();yJ();mJ();wJ();fJ();SJ();$J();AJ();TJ=[pJ,oE,iE,fG,SG,$G,AG,OG,LG,DG,_G,NG,RG,MG,EG,BG,WG,XG,qG,YG,VG,cE,lE,uE,dE,bE,pE,vE,kE,PE,IE,TE,LE,DE,_E,NE,RE,ME,qE,EE,BE,WE,XE,YE,VE,oJ,tJ,iJ,cJ,lJ,uJ,dJ,bJ,vJ,kJ,PJ,IJ,tE],vJe=new Map(TJ.map((e)=>[e.id,e]))});var LJ=()=>{};var CJ=()=>{};var DJ=()=>{};var zJ=()=>{};var _J=()=>{};var jJ=()=>{};var NJ=()=>{};var xJ=()=>{};var RJ=()=>{};var UJ=()=>{};var MJ=()=>{};var KJ=()=>{};var qJ=()=>{};var GJ=()=>{};var EJ=()=>{};var JJ=()=>{};var BJ=()=>{};var HJ=()=>{};var WJ=()=>{};var ZJ=()=>{};var XJ=()=>{};var FJ=()=>{};var YJ=()=>{};var QJ=()=>{};var VJ=()=>{};var eB=()=>{};var tB=()=>{};var nB=()=>{};var oB=()=>{};var rB=()=>{};var iB=()=>{};var aB=()=>{};var cB=()=>{};var sB=()=>{};var lB=()=>{};var hB=()=>{};var uB=()=>{};var gB=()=>{};var dB=()=>{};var yB=()=>{};var bB=g(()=>{LJ();CJ();DJ();zJ();_J();jJ();NJ();xJ();RJ();UJ();MJ();KJ();qJ();GJ();EJ();JJ();BJ();HJ();WJ();ZJ();XJ();FJ();YJ();QJ();VJ();eB();tB();nB();oB();rB();iB();aB();cB();sB();lB();hB();uB();gB();dB();yB()});var mB=()=>{};var pB=()=>{};var wB=g(()=>{U4();bu();Dq();bG();OJ();I$();bB();mB();pB()});var vB,Ehe,fB,Jhe,kB,Bhe,SB,PB,Cg,$B,IB,AB,ki,TB,OB,Si,LB,CB,Pi,DB,Hhe,zB,Dg,_B,jB,NB,xB,$i,RB,UB,Ii,MB,KB,Ai,Whe;var O$=g(()=>{wB();be();Ae();vB=["configured","authorizing","connected","error"],Ehe=a.enum(vB),fB=["preset","custom"],Jhe=a.enum(fB),kB=["streamable-http","sse"],Bhe=a.enum(kB),SB=["none","headers","oauth","aws-sigv4"],PB=a.enum(SB),Cg=a.object({connectionId:a.string().uuid().describe("Connection ID."),connectionKey:a.string().describe("Stable key used to reference this connector in tool calls."),providerId:a.string().describe('Provider identifier, e.g. "linear".'),displayName:a.string().describe("Human-readable connector name."),source:Jhe.describe("Whether the connector is a built-in preset or a custom server."),installStatus:Ehe.describe("Current connection lifecycle status."),authMode:PB.describe("Authentication mode."),transport:Bhe.describe("Transport protocol."),serverUrl:a.string().describe("MCP server URL."),readOnly:a.boolean().describe("Whether the connector is restricted to read-only tools."),management:$S.describe("Lifecycle owner and supported connector mutations."),enabledToolCount:a.number().int().nonnegative().describe("Number of tools enabled and available for this connector."),connectedAt:a.string().datetime().nullable().describe("When the connector last became connected, if ever."),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),$B=a.object({name:a.string().describe("Tool name as invoked."),title:a.string().describe("Human-readable tool title."),description:a.string().describe("Tool description."),isReadOnly:a.boolean().describe("Whether the tool is considered read-only."),enabled:a.boolean().describe("Whether the tool is enabled and available given the connector config.")}),IB=a.object({projectId:a.string().uuid().optional().describe("Project to list connectors for. Auto-filled from SDK context when omitted."),connectedOnly:a.boolean().optional().describe("When true, only return connectors that are connected.")}),AB=a.object({connectors:a.array(Cg)}),ki=S({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:IB,output:AB,pagination:"none",async:"sync"}),TB=a.object({connectionId:a.string().uuid().describe("Connection ID to fetch."),projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted.")}),OB=a.object({connector:Cg}),Si=S({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:TB,output:OB,pagination:"none",async:"sync"}),LB=a.object({connectionId:a.string().uuid().describe("Connection ID to inspect."),projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted.")}),CB=a.object({connector:Cg,tools:a.array($B)}),Pi=S({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:LB,output:CB,pagination:"none",async:"sync"}),DB=a.object({providerId:a.string().describe('Provider identifier, e.g. "linear".'),label:a.string().describe("Human-readable provider name."),authMode:PB.describe("Authentication mode."),availability:a.enum(oi).describe("Whether the provider is enabled or coming soon."),setupSkill:a.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),Hhe=a.object({}),zB=a.object({providers:a.array(DB)}),Dg=S({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:Hhe,output:zB,pagination:"none",async:"sync"}),_B=a.object({connectionKey:a.string().describe("Stable key used to call this connector."),displayName:a.string().describe("Human-readable connector name."),providerId:a.string().describe('Provider identifier, e.g. "linear".'),toolCount:a.number().int().nonnegative().describe("Number of executable tools on this connector.")}),jB=a.object({connectionKey:a.string().describe("Connector that exposes this tool."),toolName:a.string().describe("Tool name as invoked."),providerId:a.string().describe('Provider identifier, e.g. "linear".'),displayName:a.string().describe("Human-readable connector name."),isReadOnly:a.boolean().describe("Whether the tool is considered read-only."),description:a.string().describe("Tool description from the stored snapshot."),score:a.number().describe("BM25 rank score. Zero when enumerating a namespace."),inputSchema:a.record(a.string(),a.unknown()).optional().describe("JSON Schema for the tool's arguments, when requested.")}),NB=a.object({projectId:a.string().uuid().optional().describe("Project to search connectors in. Auto-filled from SDK context when omitted."),query:a.string().optional().describe("Free-text query over tool names, titles, connector keys, and descriptions. Omit or empty to list connectors, or to enumerate one connector when namespace is set."),namespace:a.string().min(1).optional().describe("Restrict results to one connectionKey or providerId."),limit:a.coerce.number().int().min(1).max(100).default(10).describe("Maximum number of connectors or tool hits to return."),offset:a.coerce.number().int().min(0).default(0).describe("Number of connectors or tool hits to skip."),includeInputSchema:a.union([a.boolean(),a.stringbool()]).optional().describe("When true, tool hits include inputSchema so a caller can execute without a describe round-trip.")}),xB=a.object({kind:a.enum(["connectors","tools"]).describe("connectors when the query is empty and no namespace is set; tools otherwise."),total:a.number().int().nonnegative().describe("Total matches before limit and offset."),connectors:a.array(_B).describe("Connector index. Empty when kind is tools."),tools:a.array(jB).describe("Ranked or enumerated tool hits. Empty when kind is connectors.")}),$i=S({operationId:"mcpConnectors.search",description:"Search executable third-party MCP connector tools by free-text query. Empty query lists connectors; empty query plus namespace enumerates that connector. Hits omit input schemas unless includeInputSchema is true.",backend:"api",route:{method:"GET",path:"/mcp-connectors/tools/search",tags:["MCP Connectors"]},input:NB,output:xB,pagination:"none",async:"sync"}),RB=a.object({projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted."),connectionKey:a.string().min(1).describe("Connector key from search or mcpConnectors.list."),toolName:a.string().min(1).describe("Tool name as invoked.")}),UB=a.object({connectionKey:a.string().describe("Connector that exposes this tool."),toolName:a.string().describe("Tool name as invoked."),providerId:a.string().describe('Provider identifier, e.g. "linear".'),displayName:a.string().describe("Human-readable connector name."),title:a.string().describe("Human-readable tool title."),description:a.string().describe("Tool description from the stored snapshot."),isReadOnly:a.boolean().describe("Whether the tool is considered read-only."),inputSchema:a.record(a.string(),a.unknown()).describe("JSON Schema for the tool's arguments.")}),Ii=S({operationId:"mcpConnectors.describe",description:"Load one executable third-party MCP connector tool, including its input schema.",backend:"api",route:{method:"GET",path:"/mcp-connectors/tools/describe",tags:["MCP Connectors"]},input:RB,output:UB,pagination:"none",async:"sync"}),MB=a.object({projectId:a.string().uuid().optional().describe("Project the connector belongs to. Auto-filled from SDK context when omitted."),connectionKey:a.string().min(1).describe("Connector key from search or mcpConnectors.list."),toolName:a.string().min(1).describe("Tool name as invoked."),arguments:a.record(a.string(),a.unknown()).optional().describe("Arguments matching the tool's input schema.")}),KB=a.discriminatedUnion("ok",[a.object({ok:a.literal(!0),connectionKey:a.string().describe("Connector that ran the tool."),toolName:a.string().describe("Tool name as invoked."),result:a.unknown().describe("Vendor tool result payload."),structuredContent:a.unknown().optional().describe("Structured content from the vendor when present."),content:a.array(a.record(a.string(),a.unknown())).describe("Raw MCP content parts from the vendor."),text:a.string().nullable().describe("Concatenated text content, if any.")}),a.object({ok:a.literal(!1),code:a.enum(["TOOL_NOT_ENABLED","READ_ONLY","MCP_ERROR"]).describe("Why the tool did not run."),message:a.string().describe("Caller-facing error message.")})]),Ai=S({operationId:"mcpConnectors.call",description:"Invoke one executable third-party MCP connector tool using that connection's stored credential.",backend:"api",route:{method:"POST",path:"/mcp-connectors/tools/call",tags:["MCP Connectors"]},input:MB,output:KB,pagination:"none",async:"sync"}),Whe={list:ki.contract,get:Si.contract,details:Pi.contract,listProviders:Dg.contract,search:$i.contract,describe:Ii.contract,call:Ai.contract}});var Ti,Zhe,Xhe,Fhe,Yhe,Qhe,Vhe,eue,L$,BZe;var zg=g(()=>{be();Ae();Ti=a.enum(["admin","member"]),Zhe=a.object({id:a.string().min(1),name:a.string(),slug:a.string(),logo:a.string().nullable().optional(),role:Ti}),Xhe=a.object({id:a.string().min(1),name:a.string().nullable(),email:a.string().email()}),Fhe=a.object({credentialType:a.literal("user"),user:Xhe,activeOrganizationId:a.string().min(1).nullable(),organizations:a.array(Zhe).describe("Organizations the user belongs to, including membership role.")}),Yhe=a.object({credentialType:a.literal("secret"),organization:a.object({id:a.string().min(1),name:a.string(),slug:a.string(),logo:a.string().nullable().optional()}),keyName:a.string()}),Qhe=a.object({credentialType:a.literal("partner"),superorganization:a.object({id:a.string().uuid(),name:a.string()})}),Vhe=a.object({}),eue=a.discriminatedUnion("credentialType",[Fhe,Yhe,Qhe]),L$=S({operationId:"me.get",description:"Return the identity and available context for the current credential.",backend:"api",route:{method:"GET",path:"/me",tags:["Auth"]},input:Vhe,output:eue,pagination:"none",async:"sync"}),BZe=L$.contract});var qB,tue,nue,oue,rue,iue,aue,C$,D$,z$,FZe;var GB=g(()=>{be();Ae();zg();qB=a.object({membershipId:a.string().min(1).describe("Organization membership record ID."),userId:a.string().min(1).describe("User ID for the organization member."),name:a.string().nullable().describe("Display name for the member, when available."),email:a.string().email().describe("Email address for the member."),imageUrl:a.string().nullable().describe("Profile image URL for the member, when available."),role:Ti.describe("Organization role."),createdAt:a.string().datetime().describe("When the membership was created.")}),tue=a.object({organizationId:a.string().min(1).optional().describe("Organization to list members for. Auto-filled from CLI and SDK context when omitted.")}),nue=a.object({members:a.array(qB).describe("Members visible within the selected organization.")}),oue=a.object({organizationId:a.string().min(1).optional().describe("Organization containing the member. Auto-filled from CLI and SDK context when omitted."),userId:a.string().min(1).describe("User ID of the member to update."),role:Ti.describe("Role to assign.")}),rue=a.object({member:qB.describe("Updated organization member.")}),iue=a.object({params:a.object({userId:a.string().min(1).describe("User ID of the member to remove.")}),query:a.object({organizationId:a.string().min(1).optional().describe("Organization containing the member. Auto-filled from CLI and SDK context when omitted.")})}).transform(({params:e,query:t})=>({...t,...e})),aue=a.object({removedUserId:a.string().min(1).describe("User ID removed from the organization.")}),C$=S({operationId:"members.list",description:"List members in an organization.",backend:"api",route:{method:"GET",path:"/members",tags:["Members"]},input:tue,output:nue,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"}]}}]}),D$=S({operationId:"members.updateRole",description:"Update a member's organization role.",backend:"api",route:{method:"PATCH",path:"/members/{userId}/role",tags:["Members"]},input:oue,output:rue,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"}}}]}),z$=S({operationId:"members.remove",description:"Remove a member from an organization.",backend:"api",route:{method:"DELETE",path:"/members/{userId}",tags:["Members"],inputStructure:"detailed"},input:iue,output:aue,pagination:"none",async:"sync"}),FZe={list:C$.contract,updateRole:D$.contract,remove:z$.contract}});var JB,BB,_g,HB,jg,EB=4194304,_$,j$,cue=(e)=>{let t=e.split(",").map((r)=>r.trim()).filter(Boolean),n=a.array(_g).safeParse(t);if(!n.success)throw Error("Kind filter must be a comma-separated list of note, runbook, or change.");return n.data},Wc,N$,x$,WB,ZB,XB,FB,YB,QB,VB,eH,tH,nH,oH,rH,Oi,Li,Ci,Di,zi,sue;var R$=g(()=>{be();Ae();JB=["note","runbook"],BB=["note","runbook","change"],_g=a.enum(BB),HB=a.enum(JB),jg=a.string().min(1).max(512).refine((e)=>!e.startsWith("/"),{message:"Path must be relative without a leading slash."}).describe("Relative memory path, for example AGENTS.md or notes/architecture.md."),_$=a.string().min(1).refine((e)=>new TextEncoder().encode(e).length<=EB,{message:`Memory body must be at most ${EB} bytes (4 MiB).`}).describe("Document body stored in project memory."),j$=a.string().regex(/^(\d+)(s|m|h|d)$/u,"Duration must use s, m, h, or d units, for example 7d or 30m.").describe("Relative time window, for example 7d or 30m."),Wc=a.string().min(1).transform(cue).describe("Comma-separated kinds, for example note,runbook."),N$=a.object({id:a.string().uuid(),projectId:a.string().uuid(),kind:_g,managed:a.boolean(),path:a.string().nullable(),title:a.string().nullable(),contentHash:a.string(),attrs:a.record(a.string(),a.unknown()),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),x$=N$.extend({body:_$}),WB=a.object({projectId:a.string().uuid().optional().describe("Project that owns the document. Auto-filled from CLI and SDK context when omitted."),path:jg.describe("Relative path for the curated document."),body:_$,kind:HB.default("note").describe("Curated document kind. Only note and runbook may be written through the API."),title:a.string().max(500).optional().describe("Optional display title. Defaults to the path basename.")}),ZB=a.object({document:x$}),XB=a.object({projectId:a.string().uuid().optional().describe("Project that owns the document. Auto-filled from CLI and SDK context when omitted."),id:a.string().uuid().optional().describe("Document id."),path:jg.optional().describe("Relative curated path.")}).superRefine((e,t)=>{let n=e.id!==void 0,r=e.path!==void 0;if(n===r)t.addIssue({code:"custom",message:"Provide exactly one of id or path."})}),FB=a.object({document:x$}),YB=a.object({projectId:a.string().uuid().optional().describe("Project to list memory for. Auto-filled from CLI and SDK context when omitted."),kind:Wc.optional(),since:j$.optional().describe("Only return documents updated within this window, for example 7d."),service:a.string().min(1).optional().describe("Filter to documents whose attrs.services contains this value."),pathPrefix:a.string().min(1).optional().describe("Filter to paths starting with this prefix."),managed:a.coerce.boolean().optional(),cursor:a.string().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of documents to return per page.")}),QB=a.object({documents:a.array(N$),nextCursor:a.string().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),VB=a.object({documentId:a.string().uuid(),kind:_g,managed:a.boolean(),path:a.string().nullable(),title:a.string().nullable(),snippet:a.string(),score:a.number()}),eH=a.object({calibrated:a.literal(!0),minScoreThreshold:a.number(),queryTerms:a.array(a.string()),message:a.string()}),tH=a.object({projectId:a.string().uuid().optional().describe("Project to search memory for. Auto-filled from CLI and SDK context when omitted."),query:a.string().trim().min(1).max(500).describe("Natural-language search query."),kind:Wc.optional(),since:j$.optional(),service:a.string().min(1).optional(),pathPrefix:a.string().min(1).optional(),managed:a.coerce.boolean().optional(),limit:a.coerce.number().int().min(1).max(50).default(10).describe("Maximum ranked search hits to return.")}),nH=a.object({hits:a.array(VB),emptyVerdict:eH.nullable()}),oH=a.object({projectId:a.string().uuid().optional().describe("Project that owns the document. Auto-filled from CLI and SDK context when omitted."),id:a.string().uuid().optional().describe("Document id."),path:jg.optional()}).superRefine((e,t)=>{let n=e.id!==void 0,r=e.path!==void 0;if(n===r)t.addIssue({code:"custom",message:"Provide exactly one of id or path."})}),rH=a.object({deleted:a.boolean()}),Oi=S({operationId:"memory.put",description:"Create or replace a curated project memory document. Embeds on success.",backend:"api",route:{method:"PUT",path:"/memory",tags:["Memory"]},input:WB,output:ZB,pagination:"none",async:"sync"}),Li=S({operationId:"memory.get",description:"Get one project memory document by id or path.",backend:"api",route:{method:"GET",path:"/memory/document",tags:["Memory"]},input:XB,output:FB,pagination:"none",async:"sync"}),Ci=S({operationId:"memory.list",description:"List project memory catalog rows without embedding search.",backend:"api",route:{method:"GET",path:"/memory",tags:["Memory"]},input:YB,output:QB,pagination:"cursor",async:"sync"}),Di=S({operationId:"memory.search",description:"Hybrid semantic and keyword search over project memory documents.",backend:"api",route:{method:"POST",path:"/memory/search",tags:["Memory"]},input:tH,output:nH,pagination:"none",async:"sync"}),zi=S({operationId:"memory.delete",description:"Soft-delete a curated project memory document by id or path.",backend:"api",route:{method:"DELETE",path:"/memory/document",successStatus:204,tags:["Memory"]},input:oH,output:rH,pagination:"none",async:"sync"}),sue={put:Oi.contract,get:Li.contract,list:Ci.contract,search:Di.contract,delete:zi.contract}});var iH,aH,lue,hue,uue,gue,due,Zc,yue,bue,mue,U$,M$,K$,q$,oXe;var Ng=g(()=>{be();Ae();iH=a.enum(["processing","completed","aborted","error"]),aH=a.object({id:a.string().uuid(),threadId:a.string().uuid(),userMessageId:a.string().uuid().nullable(),assistantMessageId:a.string().uuid().nullable(),parentRunId:a.string().uuid().nullable(),workflowRunId:a.string().nullable(),status:iH,source:a.enum(["app","api","mcp","slack","teams","linear","github","agent","cli"]),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),completedAt:a.string().datetime().nullable()}),lue=a.object({projectId:a.string().uuid().optional().describe("Project ID to list runs for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of runs to return per page."),cursor:a.string().datetime().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),hue=a.object({runs:a.array(aH),nextCursor:a.string().datetime().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),uue=a.object({threadId:a.string().uuid().describe("Thread ID to list runs for."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of runs to return per page."),cursor:a.string().datetime().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),gue=a.object({runs:a.array(aH),nextCursor:a.string().datetime().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),due=a.object({runId:a.string().uuid().describe("Run ID returned by a deferred operation.")}),Zc=a.object({completed:a.boolean().describe("Whether the run has reached a terminal status."),threadId:a.string().uuid().describe("Thread ID associated with the run."),runId:a.string().uuid().describe("Run ID for subsequent polling."),messageId:a.string().uuid().optional().describe("ID of the user message that triggered this run."),status:iH.describe("Current run lifecycle status."),response:a.string().nullable().describe("Assistant response text when the run has completed.")}),yue=Zc.describe("Current run state and, when complete, the assistant response."),bue=a.object({runId:a.string().uuid().describe("Run ID of the in-flight run to request cancellation for.")}),mue=a.object({success:a.literal(!0).describe("Always true when the cancellation request was accepted.")}),U$=S({operationId:"runs.list",description:"List deferred runs within one project.",backend:"api",route:{method:"GET",path:"/runs",tags:["Runs"]},input:lue,output:hue,pagination:"cursor",async:"sync"}),M$=S({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:uue,output:gue,pagination:"cursor",async:"sync"}),K$=S({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:due,output:yue,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}}]}),q$=S({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:bue,output:mue,pagination:"none",async:"sync",examples:[{name:"cancel-processing-run",input:{runId:"33333333-3333-4333-8333-333333333333"},output:{success:!0}}]}),oXe={list:U$.contract,listForThread:M$.contract,get:K$.contract,cancel:q$.contract}});var xg=(e,t,n)=>{let r=t?20000:1e4;if(e.length>r)n.addIssue({code:"too_big",maximum:r,type:"string",inclusive:!0,message:`Message cannot exceed ${r} characters`,origin:"string",path:["message"]})},Rg=(e,t,n)=>{if(e&&!t)n.addIssue({code:"custom",message:"ambientServiceRun requires an automationId",path:["ambientServiceRun"]})};var cH,Xc,pue,wue,vue,fue,kue,Sue,Pue,$ue,Iue,G$,Aue,Tue,Oue,Lue,Cue,Due,zue,_ue,jue,Nue,xue,Rue,E$,J$,B$,H$,W$,Z$,sH,Uue,Mue,Kue,que,lH,Gue,Eue,Jue,Bue,Hue,Wue,Xo="22222222-2222-4222-8222-222222222222",hH="11111111-1111-4111-8111-111111111111",Zue="44444444-4444-4444-8444-444444444444",uH="55555555-5555-4555-8555-555555555555",X$,F$,Y$,Q$,V$,hXe;var eI=g(()=>{be();Ae();Ng();cH=a.enum(["slack","teams","linear","github","app","mcp","agent","api","cli"]),Xc=a.object({id:a.string().uuid(),projectId:a.string().uuid(),title:a.string().nullable(),status:a.enum(["regular","archived"]),source:cH.nullable(),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),pue=a.object({type:a.literal("message"),message:a.string()}),wue=a.object({type:a.literal("reasoning"),reasoning:a.string(),status:a.enum(["in_progress","complete"]).optional()}),vue=a.object({type:a.literal("tool_call"),name:a.string(),params:a.any().optional(),result:a.any().optional(),status:a.enum(["in_progress","success","error","unknown"]).optional(),toolCallId:a.string().optional(),durationMs:a.number().nonnegative().optional()}),fue=a.object({type:a.literal("artifact"),name:a.enum(["timeseries","table","log_detail","integration_required","alert_card","issue_card","mdx"]),data:a.any(),toolCallId:a.string().optional()}),kue=a.object({type:a.literal("fork"),sourceThreadId:a.string(),sourceMessageId:a.string(),sourceThreadTitle:a.string().nullable()}),Sue=a.object({type:a.literal("summary"),summary:a.string()}),Pue=a.object({type:a.literal("slack_context"),channelId:a.string(),isTruncated:a.boolean().optional(),messages:a.array(a.object({timestamp:a.string(),slackUserId:a.string().optional(),displayName:a.string(),text:a.string(),isBot:a.boolean(),files:a.array(a.object({name:a.string(),mimetype:a.string(),size:a.number().optional(),attachmentId:a.string().uuid().optional(),ingestionStatus:a.enum(["attached","unsupported","oversized","skipped","unavailable"]).optional()})).optional()}))}),$ue=a.object({type:a.literal("teams_context"),conversationId:a.string(),isTruncated:a.boolean().optional(),messages:a.array(a.object({activityId:a.string().optional(),displayName:a.string(),text:a.string(),isBot:a.boolean(),createdDateTime:a.string().optional()}))}),Iue=a.union([pue,wue,vue,fue,kue,Sue,Pue,$ue]),G$=a.object({id:a.string().uuid(),role:a.enum(["user","assistant"]),content:a.array(Iue),source:cH,createdAt:a.string().datetime()}),Aue=a.object({projectId:a.string().uuid().optional().describe("Project to list threads for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of threads to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:a.enum(["regular","archived"]).optional().describe("Filter by thread status. 'regular' returns active threads, 'archived' returns archived threads.")}),Tue=a.object({threads:a.array(Xc).describe("The page of threads matching the query."),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Oue=a.object({threadId:a.string().uuid().describe("Thread ID returned by threads.list or threads.create.")}),Lue=a.object({thread:Xc.describe("The requested thread."),messages:a.array(G$).describe("Messages currently stored on the thread in chronological order.")}),Cue=a.object({projectId:a.string().uuid().optional().describe("Project to create the thread in. Auto-filled from CLI and SDK context when omitted."),message:a.string().min(1,"Message cannot be empty").describe("Initial user message that starts the thread."),wait:a.boolean().default(!0).describe("Whether the server should wait for the agent run before responding."),timeoutSeconds:a.coerce.number().int().min(1).max(20).default(20).describe("Maximum seconds to wait when wait is true before handing off to polling."),automationId:a.string().uuid().optional().describe("Internal automation context. Set by the Sazabi CLI when an automation script starts an agent run."),ambientServiceRun:a.literal(!0).optional().describe("Internal marker for scheduler-originated ambient service work. Honored only for system secret-key requests with matching automation context.")}).superRefine((e,t)=>{xg(e.message,e.automationId,t),Rg(e.ambientServiceRun,e.automationId,t)}),Due=Zc.describe("Deferred run result for creating a thread."),zue=a.object({threadId:a.string().uuid().describe("Thread ID whose current processing status should be returned.")}),_ue=a.object({status:a.enum(["idle","processing"]),lastRunStatus:a.enum(["error"]).nullable()}),jue=a.object({threadId:a.string().uuid().describe("Thread ID whose active run should be stopped.")}),Nue=a.object({success:a.literal(!0).describe("Always true when the stop request was accepted.")}),xue=a.object({threadId:a.string().uuid().describe("Thread ID of the thread to update."),status:a.enum(["regular","archived"]).describe("New status for the thread. 'archived' hides the thread from the sidebar.")}),Rue=a.object({thread:Xc.describe("The updated thread.")}),E$=S({operationId:"threads.list",description:"List threads in a project, optionally filtered by status.",backend:"api",route:{method:"GET",path:"/threads",tags:["Threads"]},input:Aue,output:Tue,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}}]}),J$=S({operationId:"threads.get",description:"Get a thread and its messages.",backend:"api",route:{method:"GET",path:"/threads/{threadId}",tags:["Threads"]},input:Oue,output:Lue,pagination:"none",async:"sync"}),B$=S({operationId:"threads.getStatus",description:"Get the current processing status for a thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/status",tags:["Threads"]},input:zue,output:_ue,pagination:"none",async:"sync",examples:[{name:"processing-thread",input:{threadId:"22222222-2222-4222-8222-222222222222"},output:{status:"processing",lastRunStatus:null}}]}),H$=S({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:jue,output:Nue,pagination:"none",async:"sync",examples:[{name:"stop-processing-thread",input:{threadId:"22222222-2222-4222-8222-222222222222"},output:{success:!0}}]}),W$=S({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:Cue,output:Due,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}}]}),Z$=S({operationId:"threads.update",description:"Update a thread's status.",backend:"api",route:{method:"PATCH",path:"/threads/{threadId}",tags:["Threads"]},input:xue,output:Rue,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"}}}]}),sH=a.enum(["private","organization"]),Uue=a.object({threadId:a.string().uuid().describe("Thread ID of the source thread to fork."),messageId:a.string().uuid().describe("Message ID in the source thread to fork from. The new thread copies messages up to and including this message.")}),Mue=a.object({thread:Xc.describe("The newly created forked thread.")}),Kue=a.object({threadId:a.string().uuid().describe("Thread ID of the thread to update."),visibility:sH.describe("New visibility. 'private' restricts the thread to its owner; 'organization' shares it with the organization.")}),que=a.object({thread:Xc.describe("The updated thread."),visibility:sH.describe("The thread's resulting visibility.")}),lH=a.object({shareId:a.string().uuid().describe("Unique identifier for the snapshot."),threadId:a.string().uuid().describe("Thread the snapshot was taken from."),url:a.string().describe("Public read-only URL for the snapshot."),createdAt:a.string().datetime()}),Gue=a.object({threadId:a.string().uuid().describe("Thread ID to create a public read-only snapshot for.")}),Eue=a.object({share:lH.describe("The created share link.")}),Jue=a.object({threadId:a.string().uuid().describe("Thread ID the snapshot belongs to."),shareId:a.string().uuid().describe("Snapshot ID to revoke.")}),Bue=a.void(),Hue=a.object({threadId:a.string().uuid().describe("Thread ID to list public snapshots for.")}),Wue=a.object({shares:a.array(lH).describe("Active share links for the thread.")}),X$=S({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:Uue,output:Mue,pagination:"none",async:"sync",examples:[{name:"fork-from-message",input:{threadId:Xo,messageId:Zue},output:{thread:{id:"66666666-6666-4666-8666-666666666666",projectId:hH,title:"API returning 500s (fork)",status:"regular",source:"api",createdAt:"2026-01-01T00:20:00.000Z",updatedAt:"2026-01-01T00:20:00.000Z"}}}]}),F$=S({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:Kue,output:que,pagination:"none",async:"sync",examples:[{name:"make-private",input:{threadId:Xo,visibility:"private"},output:{thread:{id:Xo,projectId:hH,title:"API returning 500s",status:"regular",source:"api",createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:30:00.000Z"},visibility:"private"}}]}),Y$=S({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:Gue,output:Eue,pagination:"none",async:"sync",examples:[{name:"create-share-link",input:{threadId:Xo},output:{share:{shareId:uH,threadId:Xo,url:"https://app.sazabi.com/share/55555555-5555-4555-8555-555555555555",createdAt:"2026-01-01T00:40:00.000Z"}}}]}),Q$=S({operationId:"threads.listShareLinks",description:"List active public share links for a thread.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/share",tags:["Threads"]},input:Hue,output:Wue,pagination:"none",async:"sync",examples:[{name:"list-share-links",input:{threadId:Xo},output:{shares:[{shareId:uH,threadId:Xo,url:"https://app.sazabi.com/share/55555555-5555-4555-8555-555555555555",createdAt:"2026-01-01T00:40:00.000Z"}]}}]}),V$=S({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:Jue,output:Bue,pagination:"none",async:"sync"}),hXe={list:E$.contract,get:J$.contract,getStatus:B$.contract,stop:H$.contract,create:W$.contract,update:Z$.contract,fork:X$.contract,setVisibility:F$.contract,createShareLink:Y$.contract,listShareLinks:Q$.contract,revokeShareLink:V$.contract}});var Xue,Fue,Yue,Que,gH,dH;var yH=g(()=>{be();Ae();Ng();eI();Xue=a.object({threadId:a.string().uuid().describe("Thread ID to list messages for."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of messages to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),Fue=a.object({messages:a.array(G$),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Yue=a.object({threadId:a.string().uuid().describe("Thread ID to append the message to."),message:a.string().min(1,"Message cannot be empty").describe("Message body to append to the thread."),wait:a.boolean().default(!0).describe("Whether the server should wait for the appended message run before responding."),timeoutSeconds:a.coerce.number().int().min(1).max(20).default(20).describe("Maximum seconds to wait when wait is true before handing off to polling."),automationId:a.string().uuid().optional().describe("Internal automation context. Set by the Sazabi CLI when an automation script starts an agent run."),ambientServiceRun:a.literal(!0).optional().describe("Internal marker for scheduler-originated ambient service work. Honored only for system secret-key requests with matching automation context.")}).superRefine((e,t)=>{xg(e.message,e.automationId,t),Rg(e.ambientServiceRun,e.automationId,t)}),Que=Zc.describe("Deferred run result for appending a message to an existing thread."),gH=S({operationId:"messages.list",description:"List messages in a thread with cursor pagination.",backend:"api",route:{method:"GET",path:"/threads/{threadId}/messages",tags:["Messages"]},input:Xue,output:Fue,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}}]}),dH=S({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:Yue,output:Que,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 xt,mH,tI,_i,pH,Ug,po,wH,bH;var Fc=g(()=>{be();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"},mH=[xt.IN_APP,xt.SLACK,xt.EMAIL,xt.SMS],tI=[xt.SLACK_CHANNEL,xt.TEAMS_CHANNEL,xt.INCIDENT_IO,xt.PAGERDUTY,xt.ROOTLY,xt.WEBHOOK],_i=Object.values(xt),pH=[..._i,"victorops"],Ug=a.enum(_i),po=a.enum(tI),wH=[{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"}],bH=new Set(wH.map(({channel:e})=>e));if(bH.size!==_i.length||_i.some((e)=>!bH.has(e)))throw Error("Notification channel definitions must represent every channel")});var vH,Vue=(e,t)=>e.value===t.value&&e.label===t.label&&e.scope===t.scope&&e.role===t.role&&e.defaultOff===t.defaultOff&&(e.deliveryConditions??[]).join(",")===(t.deliveryConditions??[]).join(","),vt=(e)=>{for(let t of Object.values(e)){let n=vH.get(t.value);if(n&&!Vue(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}`);vH.set(t.value,t)}return e};var qn=g(()=>{vH=new Map});var fH;var kH=g(()=>{qn();fH=vt({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 SH;var PH=g(()=>{qn();SH=vt({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 $H;var IH=g(()=>{qn();$H=vt({INTEGRATION_CONNECTED:{value:"integration_connected",label:"Integration connected",scope:"org",defaultOff:!0},INTEGRATION_DISCONNECTED:{value:"integration_disconnected",label:"Integration disconnected",scope:"org"}})});var AH;var TH=g(()=>{qn();AH=vt({ISSUE_TRIGGERED:{value:"issue_triggered",label:"Issue triggered",scope:"project",deliveryConditions:["component","severity"]},ISSUE_RESOLVED:{value:"issue_resolved",label:"Issue resolved",scope:"project",deliveryConditions:["component","severity"]},ISSUE_IGNORED:{value:"issue_ignored",label:"Issue ignored",scope:"project",deliveryConditions:["component","severity"]}})});var OH;var LH=g(()=>{qn();OH=vt({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 CH;var DH=g(()=>{qn();CH=vt({SANDBOX_CREATED:{value:"sandbox_created",label:"Sandbox connected",scope:"project",defaultOff:!0},SANDBOX_DELETED:{value:"sandbox_deleted",label:"Sandbox disconnected",scope:"project",defaultOff:!0},LOG_SOURCE_CONNECTED:{value:"log_source_connected",label:"Log source connected",scope:"project",defaultOff:!0},LOG_SOURCE_DISCONNECTED:{value:"log_source_disconnected",label:"Log 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 zH;var _H=g(()=>{qn();zH=vt({SECURITY_ALERT:{value:"security_alert",label:"Security alert",scope:"org",role:"admin"}})});var nI,at,tge,oI=(e)=>{let t=tge.get(e)?.label;if(t)return t;let n=e.replace(/_/g," ").trim();return n?n.charAt(0).toUpperCase()+n.slice(1):e};var Yc=g(()=>{kH();PH();IH();TH();LH();DH();_H();qn();nI={...zH,...OH,...$H,...fH,...AH,...CH,...SH},at=Object.fromEntries(Object.entries(nI).map(([e,t])=>[e,t.value])),tge=new Map(Object.values(nI).map((e)=>[e.value,e]))});var rI,NH,BXe,$n,HXe;var Qc=g(()=>{Yc();Fc();Fc();rI=Object.values(at),NH=[at.BILLING_PLAN_UPGRADE_APPLIED,at.BILLING_PLAN_DOWNGRADE_SCHEDULED,at.BILLING_PLAN_DOWNGRADE_APPLIED,at.BILLING_CREDIT_BALANCE_LOW,at.BILLING_CREDIT_BALANCE_DEPLETED,at.BILLING_AUTO_TOP_UP_SETTINGS_CHANGED,at.BILLING_AUTO_TOP_UP_FAILED,at.BILLING_INVOICE_PAID,at.BILLING_NEGATIVE_BALANCE_COLLECTED,at.BILLING_NEGATIVE_BALANCE_COLLECTION_FAILED],BXe=new Set(NH),$n=[at.ISSUE_TRIGGERED,at.ISSUE_RESOLVED,at.ISSUE_IGNORED,at.AUTOMATION_RUN_FAILED],HXe=new Set($n)});var Vc,xH,RH=(e)=>typeof e==="string"&&(e in xH)?xH[e]:e,oge;var UH=g(()=>{Fc();be();Qc();Vc=a.enum(rI),xH={data_source_connected:"log_source_connected",data_source_disconnected:"log_source_disconnected"},oge=a.preprocess(RH,Vc)});var rge;var MH=g(()=>{Yc();Qc();rge=$n.map((e)=>({notificationType:e,label:oI(e)}))});var KH=g(()=>{Yc();Qc()});var iI=g(()=>{Fc();Yc();Qc();UH();MH();KH()});var age,cge,sge,lge,hge,uge,gge,aI,jFe;var qH=g(()=>{iI();be();Ae();age=a.enum(["ready","missing","degraded","unavailable"]),cge=a.object({id:a.string(),label:a.string(),status:a.enum(["active","inactive","degraded"]),statusLabel:a.string()}),sge=a.object({channel:Ug,name:a.string(),description:a.string(),scope:a.enum(["personal","project"]),enabled:a.boolean().nullable(),preferenceId:a.string().nullable(),prerequisite:a.object({status:age,statusLabel:a.string(),message:a.string()}),action:a.object({label:a.string(),href:a.string()}).nullable(),destinations:a.array(cge),destinationManagement:a.enum(["none","slack_channels","teams_channels","integration_connections","webhook_endpoints"]),canCreateDestinations:a.boolean(),supportedNotificationTypes:a.array(Vc)}),lge=a.object({channel:po,enabled:a.boolean(),preferenceId:a.string().nullable()}),hge=a.object({channel:po,notificationType:Vc,enabled:a.boolean(),preferenceId:a.string()}),uge=a.object({projectId:a.string().uuid().optional().describe("Project to inspect. Auto-filled from CLI and SDK context when omitted.")}),gge=a.object({channelCards:a.array(sge).length(10),channels:a.array(lge),notificationTypePreferences:a.array(hge),issueNotificationMinSeverity:a.enum(["low","medium","high","critical"])}),aI=S({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:uge,output:gge,pagination:"none",async:"sync"}),jFe={getProject:aI.contract}});var GH,sI,EH,lI,MFe,KFe,hI,uI=(e,t)=>{if((e.componentIds?.length||e.componentId)&&"componentIds"in e.condition&&e.condition.componentIds?.length)t.addIssue({code:"custom",path:["condition","componentIds"],message:"Use componentIds instead of legacy condition.componentIds."});if(e.componentIds?.length&&e.componentId)t.addIssue({code:"custom",path:["componentId"],message:"Use componentIds instead of componentId."})},qFe,JH,cI,gI,es,BH,dge,yge,bge,mge,pge,wge,vge,fge,kge,dI,yI,bI,mI,pI,GFe;var HH=g(()=>{iI();be();Ae();GH=a.enum(["low","medium","high","critical"]),sI=a.object({severities:a.array(GH).min(1).optional()}).strict(),EH=a.object({componentIds:a.array(a.string().uuid()).min(1).optional(),severities:a.array(GH).min(1).optional()}).strict(),lI=a.object({channel:po,destinationKey:a.string().min(1)}),MFe=a.object({destinations:a.array(lI).min(1),notificationTypes:a.array(a.enum($n)).min(1),componentIds:a.array(a.string().uuid()).min(1).optional().describe("Stable component registry IDs matched by this rule."),includeDescendants:a.boolean().default(!1).describe("Whether the rule also matches descendant components."),condition:sI}),KFe=a.object({destinations:a.array(lI).min(1),notificationTypes:a.array(a.enum($n)).min(1),condition:EH}),hI=a.object({destinations:a.array(lI).min(1),notificationTypes:a.array(a.enum($n)).min(1),componentIds:a.array(a.string().uuid()).min(1).optional().describe("Stable component registry IDs matched by this rule."),componentId:a.string().uuid().optional().describe("Deprecated single-component compatibility input."),includeDescendants:a.boolean().default(!1).describe("Whether the rule also matches descendant components."),condition:a.union([sI,EH])}),qFe=hI.superRefine(uI),JH=a.object({id:a.string(),channel:po,destinationKey:a.string(),displayName:a.string()}),cI=a.object({id:a.string().uuid(),label:a.string(),lifecycle:a.enum(["active","retired","merged"])}),gI=a.object({id:a.string().uuid(),projectId:a.string().uuid(),notificationTypes:a.array(a.enum($n)),destinations:a.array(JH),condition:sI,component:cI.nullable(),componentId:a.string().uuid().nullable(),includeDescendants:a.boolean(),suspendedAt:a.string().datetime().nullable(),suspensionReason:a.string().nullable(),components:a.array(cI),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),es=a.object({projectId:a.string().uuid().optional().describe("Project whose notification delivery rules are being managed.")}),BH=a.string().uuid().describe("Logical notification delivery rule ID."),dge=es,yge=a.object({rules:a.array(gI)}),bge=a.object({destinations:a.array(JH),notificationTypes:a.array(a.object({notificationType:a.enum($n),label:a.string(),conditions:a.array(a.enum(["component","severity"]))})),components:a.array(cI)}),mge=es.extend(hI.shape).superRefine(uI),pge=gI,wge=es.extend({...hI.shape,ruleId:BH}).superRefine(uI),vge=gI,fge=es.extend({ruleId:BH}),kge=a.object({removed:a.boolean()}),dI=S({operationId:"notificationDeliveryRules.list",description:"List the positive delivery rules for a project.",backend:"api",route:{method:"GET",path:"/notification-delivery-rules",tags:["Notification delivery rules"]},input:dge,output:yge,pagination:"none",async:"sync"}),yI=S({operationId:"notificationDeliveryRules.options",description:"List available destinations, events, and conditions for project delivery rules.",backend:"api",route:{method:"GET",path:"/notification-delivery-rules/options",tags:["Notification delivery rules"]},input:es,output:bge,pagination:"none",async:"sync"}),bI=S({operationId:"notificationDeliveryRules.create",description:"Create a positive project notification delivery rule.",backend:"api",route:{method:"POST",path:"/notification-delivery-rules",tags:["Notification delivery rules"]},input:mge,output:pge,pagination:"none",async:"sync"}),mI=S({operationId:"notificationDeliveryRules.update",description:"Replace a positive delivery rule atomically.",backend:"api",route:{method:"PUT",path:"/notification-delivery-rules/{ruleId}",tags:["Notification delivery rules"]},input:wge,output:vge,pagination:"none",async:"sync"}),pI=S({operationId:"notificationDeliveryRules.delete",description:"Delete a positive delivery rule without deleting its reusable destinations.",backend:"api",route:{method:"DELETE",path:"/notification-delivery-rules/{ruleId}",tags:["Notification delivery rules"]},input:fge,output:kge,pagination:"none",async:"sync"}),GFe={list:dI.contract,options:yI.contract,create:bI.contract,update:mI.contract,delete:pI.contract}});var wI,Sge,Pge,$ge,Ige,Age,Tge,vI,Oge,Lge,fI,Cge,Dge,kI,zge,_ge,SI,jge,Nge,PI,HFe;var WH=g(()=>{be();Ae();wI=a.enum(["accept-invite","create-organization","billing","configure-project","connect-github-account","install-github-app","configure-code-search","install-slack-app","configure-slack-notifications","trigger-issue","confirm-issue","finish"]),Sge=a.enum(["needs-onboarding","blocked","ready"]),Pge=a.enum(["incomplete","complete","skipped"]),$ge=a.object({invitationId:a.string(),organizationId:a.string(),organizationName:a.string(),organizationSlug:a.string(),organizationImageUrl:a.string().nullable(),inviterName:a.string().nullable()}),Ige=a.object({gate:Sge,canonicalStep:wI.nullable(),organizationId:a.string().nullable(),projectId:a.string().nullable(),completionByStep:a.record(wI,Pge),githubSkipped:a.boolean(),githubAppSkipped:a.boolean(),slackSkipped:a.boolean(),sampleIssueId:a.string().nullable(),actorRole:a.enum(["admin","member"]).nullable(),requiredStep:a.union([wI,a.literal("select-organization")]).nullable(),isCompleted:a.boolean(),onboardingRecommendationsThreadId:a.string().nullable(),hasOrganizations:a.boolean(),hasPaidBillingSubscription:a.boolean(),billingStepEnabled:a.boolean(),pendingInvitations:a.array($ge)}),Age=a.object({}),Tge=a.object({onboarding:Ige}),vI=S({operationId:"onboarding.getState",description:"Read onboarding progress for the authenticated user.",backend:"api",route:{method:"GET",path:"/onboarding/state",tags:["Onboarding"]},input:Age,output:Tge,pagination:"none",async:"sync"}),Oge=a.object({integration:a.enum(["github","slack"]).describe("Integration onboarding step to skip.")}),Lge=a.object({skipped:a.literal(!0)}),fI=S({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:Oge,output:Lge,pagination:"none",async:"sync"}),Cge=a.object({}),Dge=a.object({skipped:a.literal(!0)}),kI=S({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:Cge,output:Dge,pagination:"none",async:"sync"}),zge=a.object({}),_ge=a.object({skipped:a.literal(!0)}),SI=S({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:zge,output:_ge,pagination:"none",async:"sync"}),jge=a.object({projectId:a.string().uuid().describe("Project that completed onboarding.")}),Nge=a.object({completed:a.boolean()}),PI=S({operationId:"onboarding.finish",description:"Mark onboarding complete when all prerequisites are satisfied.",backend:"api",route:{method:"POST",path:"/onboarding/finish",tags:["Onboarding"]},input:jge,output:Nge,pagination:"none",async:"sync"}),HFe={getState:vI.contract,skipIntegration:fI.contract,skipGithubAppInstallation:kI.contract,skipSampleIssue:SI.contract,finish:PI.contract}});var Mg,xge,Rge,Uge,Mge,Kge,qge,Gge,Ege,Jge,Bge,$I,II,AI,TI,YFe;var ZH=g(()=>{be();Ae();zg();Mg=a.object({id:a.string().min(1),name:a.string(),slug:a.string(),logo:a.string().nullable().optional()}),xge=Mg.extend({role:Ti.optional()}),Rge=a.object({}),Uge=a.object({organizations:a.array(xge).describe("Organizations available to the current credential.")}),Mge=a.object({organizationId:a.string().min(1).describe("Organization ID to fetch.")}),Kge=a.object({organization:Mg}),qge=a.object({organizationId:a.string().min(1).describe("Organization ID to update. SDK and CLI callers can auto-fill this before dispatch."),name:a.string().trim().min(1).max(100).describe("New organization name.")}),Gge=a.object({organization:Mg.describe("Updated organization.")}),Ege=a.string().trim().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(/^[\p{L}\p{N} _-]+$/u,"Name can only contain letters, numbers, spaces, hyphens, and underscores"),Jge=a.object({name:Ege.describe("Organization display name.")}),Bge=a.object({organization:Mg}),$I=S({operationId:"organizations.create",description:"Create an organization for the authenticated user.",backend:"api",route:{method:"POST",path:"/organizations",tags:["Organizations"],successStatus:201},input:Jge,output:Bge,pagination:"none",async:"sync"}),II=S({operationId:"organizations.list",description:"List organizations available to the current credential.",backend:"api",route:{method:"GET",path:"/organizations",tags:["Organizations"]},input:Rge,output:Uge,pagination:"none",async:"sync"}),AI=S({operationId:"organizations.get",description:"Get one organization by ID.",backend:"api",route:{method:"GET",path:"/organizations/{organizationId}",tags:["Organizations"]},input:Mge,output:Kge,pagination:"none",async:"sync"}),TI=S({operationId:"organizations.update",description:"Update one organization.",backend:"api",route:{method:"PATCH",path:"/organizations/{organizationId}",tags:["Organizations"]},input:qge,output:Gge,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}}}]}),YFe={list:II.contract,get:AI.contract,create:$I.contract,update:TI.contract}});var ji,ts,XH,FH,YH,QH,VH,eW,tW,Kg,qg,Gg,nW,oW,Eg,rW,iW,Jg,Hge;var OI=g(()=>{be();Ae();ji=a.enum(["us-east-1","us-east-2","us-west-1","us-west-2","eu-central-1","eu-central-2","eu-north-1","eu-south-1","eu-south-2","eu-west-1","eu-west-2","eu-west-3"]),ts=a.object({id:a.string().uuid(),organizationId:a.string().min(1),name:a.string(),region:ji}),XH=a.object({organizationId:a.string().min(1).optional().describe("Organization to list projects for. Auto-filled from CLI and SDK context when omitted.")}),FH=a.object({projects:a.array(ts).describe("Projects visible within the selected organization.")}),YH=a.object({projectId:a.string().uuid().describe("Project ID to fetch.")}),QH=a.string().trim().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(/^[\p{L}\p{N} _-]+$/u,"Name can only contain letters, numbers, spaces, hyphens, and underscores"),VH=a.object({organizationId:a.string().min(1).optional().describe("Organization to create the project under. Auto-filled from CLI and SDK context when omitted."),name:QH.describe("Project name."),region:ji.optional().default("us-west-2").describe("AWS region where the new project should be created.")}),eW=a.object({project:ts}),tW=a.object({project:ts}),Kg=S({operationId:"projects.list",description:"List projects in an organization.",backend:"api",route:{method:"GET",path:"/projects",tags:["Projects"]},input:XH,output:FH,pagination:"none",async:"sync"}),qg=S({operationId:"projects.get",description:"Get one project by ID.",backend:"api",route:{method:"GET",path:"/projects/{projectId}",tags:["Projects"]},input:YH,output:tW,pagination:"none",async:"sync"}),Gg=S({operationId:"projects.create",description:"Create one project in an organization.",backend:"api",route:{method:"POST",path:"/projects",successStatus:201,tags:["Projects"]},input:VH,output:eW,pagination:"none",async:"sync"}),nW=a.object({projectId:a.string().uuid().describe("Project ID to update."),name:QH.optional().describe("New project name.")}),oW=a.object({project:ts}),Eg=S({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:nW,output:oW,pagination:"none",async:"sync"}),rW=a.object({projectId:a.string().uuid().describe("Project ID to delete.")}),iW=a.void(),Jg=S({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:rW,output:iW,pagination:"none",async:"sync"}),Hge={list:Kg.contract,get:qg.contract,create:Gg.contract,update:Eg.contract,delete:Jg.contract}});var aW,Wge,Zge,Xge,Fge,Yge,LI,rYe;var cW=g(()=>{be();Ae();aW=a.enum(["open","merged","closed"]),Wge=a.enum(["review_required","approved","changes_requested"]),Zge=a.enum(["passing","failing","pending"]),Xge=a.object({id:a.string().uuid(),projectId:a.string().uuid(),repositoryFullName:a.string(),pullRequestId:a.string().describe("Provider-native pull request identifier (GitHub PR number or Bitbucket PR id), serialized as a string."),githubPullRequestId:a.number().int().describe("Deprecated: use pullRequestId. Numeric form of the provider-native pull request identifier; kept for backward compatibility."),title:a.string().nullable(),url:a.string().nullable(),status:aW.nullable(),reviewState:Wge.nullable(),checksState:Zge.nullable(),requestedByUserId:a.string().nullable(),authorLogin:a.string().nullable().describe("Forge login that authored the pull request (often the Sazabi app identity)."),githubAuthorLogin:a.string().nullable().describe("Deprecated: use authorLogin. Kept for backward compatibility."),threadId:a.string().uuid().nullable(),runId:a.string().uuid().nullable(),createdAt:a.string().datetime(),mergedAt:a.string().datetime().nullable(),closedAt:a.string().datetime().nullable()}),Fge=a.object({projectId:a.string().uuid().optional().describe("Project to list pull requests for. Auto-filled from CLI and SDK context when omitted."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of pull requests to return per page."),cursor:a.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:aW.optional().describe("Filter by pull request status (open, merged, or closed)."),repositoryFullName:a.string().trim().optional().describe("Filter by repository full name, for example owner/repo. Case-insensitive."),requestedByUserId:a.string().trim().optional().describe("Filter by the Sazabi user who requested the pull request. Pass 'me' to filter to the authenticated user.")}),Yge=a.object({pullRequests:a.array(Xge),nextCursor:a.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),LI=S({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:Fge,output:Yge,pagination:"cursor",async:"sync"}),rYe={list:LI.contract}});var sW,lW,hW,uW,gW,ns;var CI=g(()=>{be();Ae();sW=a.enum(["data_source","mcp_connector","sandbox_cli","integration"]),lW=a.enum(["connected","recommended"]),hW=a.object({kind:sW.describe("What the recommendation targets: a data source, MCP connector, sandbox CLI, or integration."),targetId:a.string().describe("Exact catalog id for the kind (data source type, MCP provider id, sandbox CLI preset type, or integration provider id)."),status:lW.describe("Resolved live against current connections: connected (already set up) or recommended (suggested, not yet connected)."),roiScore:a.number().int().min(0).max(100).describe("Intrinsic ROI score, 0–100 — a normalized blend of how valuable, how easy to connect, and how proven the item is. A pure function of the item; computed live on read, never stored."),priority:a.number().int().min(1).describe("1-based rank within this list, sorted by roiScore (best first). Items are already returned in priority order; the field lets consumers recover the rank without trusting array position.")}),uW=a.object({projectId:a.string().uuid().optional().describe("Project to list recommendations for. Auto-filled from CLI and SDK context when omitted.")}),gW=a.object({recommendations:a.array(hW).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).")}),ns=S({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:uW,output:gW,pagination:"none",async:"sync"})});var dW,Qge,yW,Bg,bW,mW,pW,wW,Ni,vW,fW,kW,Hg,Vge;var DI=g(()=>{be();Ae();dW=a.object({type:a.string().describe("Preset type identifier."),label:a.string().describe("Human-readable display name."),executableNames:a.array(a.string()).describe("CLI binary names installed by this preset."),envVarKeys:a.array(a.string()).describe("Environment variables required for authentication."),setupSkill:a.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),Qge=a.object({}),yW=a.object({types:a.array(dW)}),Bg=S({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:Qge,output:yW,pagination:"none",async:"sync"}),bW=a.enum(["github_app","personal_access_token","stored_credentials"]),mW=a.object({presetType:a.string().describe("Preset type identifier."),credentialSource:bW.describe("Authoritative credential source for the preset."),isSystemManaged:a.boolean().describe("Whether the connection follows an integration lifecycle."),fallbackConfigured:a.boolean().describe("Whether user-provided fallback credentials are stored for this preset."),envVarKeys:a.array(a.string()).describe("Stored environment variable names. Secret values are omitted.")}),pW=a.object({projectId:a.string().uuid().optional().describe("Project to inspect. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted.")}),wW=a.object({connections:a.array(mW)}),Ni=S({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:pW,output:wW,pagination:"none",async:"sync"}),vW=a.object({key:a.string().min(1).max(256).regex(/^[A-Za-z_][A-Za-z0-9_]*$/,"Environment variable keys must match /^[A-Za-z_][A-Za-z0-9_]*$/.").describe("Environment variable name (e.g. KUBECONFIG_CONTENTS)."),value:a.string().max(10240).describe("Secret value. Encrypted at rest; never returned by any API response.")}),fW=a.object({projectId:a.string().uuid().optional().describe("Project to configure. Required for organization-scoped keys; auto-filled from a project-scoped key when omitted."),presetType:a.string().min(1).describe("Preset type identifier (e.g. kubectl, aws, github)."),environmentVariables:a.array(vW).max(100).describe("Full set of env vars for this preset. Replaces any previously stored values for the preset.")}),kW=a.object({projectId:a.string().uuid().describe("Project the preset was written to."),presetType:a.string().describe("Preset type that was upserted."),envVarKeys:a.array(a.string()).describe("Env var key names now stored for this preset. Values are never returned.")}),Hg=S({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:fW,output:kW,pagination:"none",async:"sync"}),Vge={listConnections:Ni.contract,listTypes:Bg.contract,upsertPreset:Hg.contract}});var Wg,SW=1048576,zI,PW,_I,ede,tde,nde,ode,rde,ide,ade,cde,sde,lde,jI,NI,xI,RI,UI,yYe;var $W=g(()=>{be();Ae();Wg=a.string().min(1).max(64).regex(/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/,"Name must start with a letter or digit and contain only letters, digits, underscores, and hyphens (max 64 characters).").describe("Script name. Must be unique within the project among non-deleted scripts."),zI=a.string().min(1).refine((e)=>new TextEncoder().encode(e).length<=SW,{message:`Script content must be at most ${SW} bytes (1 MiB).`}).describe("Bash script body materialized as /home/sazabi/scripts/<name>.sh in the sandbox."),PW=a.object({id:a.string().uuid(),projectId:a.string().uuid(),name:a.string(),description:a.string().nullable(),contentHash:a.string().describe("sha256 hex digest of the script content."),createdAt:a.string().datetime(),updatedAt:a.string().datetime()}),_I=PW.extend({content:zI}),ede=a.object({projectId:a.string().uuid().optional().describe("Project to list scripts for. Auto-filled from CLI and SDK context when omitted."),search:a.string().optional().describe("Case-insensitive partial match on script name."),cursor:a.string().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),limit:a.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of scripts to return per page.")}),tde=a.object({scripts:a.array(PW),nextCursor:a.string().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),nde=a.object({name:Wg.describe("Script name to fetch."),projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted.")}),ode=a.object({script:_I}),rde=a.object({projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted."),name:Wg.describe("Script name. Must be unique within the project among non-deleted scripts."),content:zI,description:a.string().max(500).nullable().optional().describe("Optional human-readable description.")}),ide=a.object({script:_I}),ade=a.object({name:Wg.describe("Script to update."),projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted."),content:zI.optional().describe("New script body. Omit to leave content unchanged."),description:a.string().max(500).nullable().optional().describe("New description, or null to clear it. Omit to leave unchanged.")}),cde=a.object({script:_I}),sde=a.object({name:Wg.describe("Script to delete."),projectId:a.string().uuid().optional().describe("Project that owns the script. Auto-filled from CLI and SDK context when omitted.")}),lde=a.object({deleted:a.boolean()}),jI=S({operationId:"scripts.list",description:"List durable bash scripts stored for a project.",backend:"api",route:{method:"GET",path:"/scripts",tags:["Scripts"]},input:ede,output:tde,pagination:"cursor",async:"sync"}),NI=S({operationId:"scripts.get",description:"Get a single project script by name, including its body.",backend:"api",route:{method:"GET",path:"/scripts/{name}",tags:["Scripts"]},input:nde,output:ode,pagination:"none",async:"sync"}),xI=S({operationId:"scripts.create",description:"Create a durable bash script for a project.",backend:"api",route:{method:"POST",path:"/scripts",successStatus:201,tags:["Scripts"]},input:rde,output:ide,pagination:"none",async:"sync"}),RI=S({operationId:"scripts.update",description:"Update a project script's body and/or description.",backend:"api",route:{method:"PATCH",path:"/scripts/{name}",tags:["Scripts"]},input:ade,output:cde,pagination:"none",async:"sync"}),UI=S({operationId:"scripts.delete",description:"Soft-delete a project script by name.",backend:"api",route:{method:"DELETE",path:"/scripts/{name}",successStatus:204,tags:["Scripts"]},input:sde,output:lde,pagination:"none",async:"sync"}),yYe={list:jI.contract,get:NI.contract,create:xI.contract,update:RI.contract,delete:UI.contract}});var MI,IW,AW,TW,OW,xi,Ri,hde;var KI=g(()=>{be();Ae();MI=a.object({projectId:a.string().uuid().optional().describe("Project to search within. Auto-filled from CLI and SDK context when omitted."),query:a.string().trim().min(1,"Query must be at least 1 character").max(500,"Query must be at most 500 characters"),limit:a.coerce.number().min(1).max(100).default(20).describe("Maximum number of search results to return."),page:a.coerce.number().min(1).default(1).describe("One-based page number.")}),IW=MI.extend({status:a.enum(["regular","archived"]).optional().describe("Optional thread status filter.")}),AW=MI.extend({threadId:a.string().uuid().optional().describe("Optional thread restriction for message search."),role:a.enum(["user","assistant"]).optional().describe("Optional message role filter.")}),TW=a.object({threads:a.array(a.object({id:a.string().uuid(),projectId:a.string().uuid().optional(),title:a.string(),status:a.enum(["regular","archived"]),labels:a.array(a.string()),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),highlights:a.array(a.string()),score:a.number().optional()})),pagination:a.object({page:a.number(),limit:a.number(),totalResults:a.number(),totalPages:a.number()}).describe("Page-based pagination metadata for the current search result.")}),OW=a.object({messages:a.array(a.object({id:a.string().uuid(),threadId:a.string().uuid(),threadTitle:a.string(),role:a.enum(["user","assistant"]),content:a.string(),createdAt:a.string().datetime(),updatedAt:a.string().datetime(),highlights:a.array(a.string()),score:a.number().optional()})),pagination:a.object({page:a.number(),limit:a.number(),totalResults:a.number(),totalPages:a.number()}).describe("Page-based pagination metadata for the current search result.")}),xi=S({operationId:"search.threads",description:"Search threads within one project.",backend:"api",route:{method:"GET",path:"/search/threads",tags:["Search"]},input:IW,output:TW,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}}}]}),Ri=S({operationId:"search.messages",description:"Search messages within one project.",backend:"api",route:{method:"GET",path:"/search/messages",tags:["Search"]},input:AW,output:OW,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}}}]}),hde={threads:xi.contract,messages:Ri.contract}});var LW;var CW=g(()=>{LW=["onboarding","setup"]});var DW,zW,_W,jW,os;var qI=g(()=>{CW();be();Ae();DW=a.enum(LW),zW=a.object({id:a.string().describe("Unique task identifier (e.g. install_github_app)."),label:a.string().describe("Short human-readable task name."),description:a.string().describe("Explanation of what needs to be completed to satisfy this task."),instructions:a.string().describe("Step-by-step instructions for completing this task."),completed:a.boolean().describe("Whether the task has been completed."),completedAt:a.string().datetime().nullable().describe("ISO 8601 timestamp of when the task was completed, or null."),category:DW.describe("Task category: onboarding (core setup steps) or setup (additional configuration).")}),_W=a.object({projectId:a.string().uuid().optional().describe("Project to list tasks for. Auto-filled from CLI and SDK context when omitted.")}),jW=a.object({tasks:a.array(zW).describe("All onboarding and setup tasks with their current completion status.")}),os=S({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:_W,output:jW,pagination:"none",async:"sync"})});var ude,gde,Fo,dde,yde,bde,mde,pde,wde,vde,fde,kde,Sde,Pde,$de,Ide,Ade,GI,EI,JI,BI,HI,WI,ZI,AYe;var NW=g(()=>{be();Ae();ude=a.object({id:a.string().uuid().describe("Team ID."),name:a.string().describe("Team name, unique among the org's active teams."),description:a.string().nullable().describe("Optional team description."),createdAt:a.string().datetime().describe("When the team was created."),memberCount:a.number().int().nonnegative().describe("Number of active members in the team.")}),gde=a.object({userId:a.string().min(1).describe("User ID of the team member."),name:a.string().nullable().describe("Display name for the member, when available."),email:a.string().email().describe("Email address for the member."),addedAt:a.string().datetime().describe("When the member was added to the team.")}),Fo=a.string().min(1).optional().describe("Organization to operate on. Auto-filled from CLI and SDK context when omitted."),dde=a.object({organizationId:Fo}),yde=a.object({teams:a.array(ude).describe("Active teams in the organization.")}),bde=a.object({organizationId:Fo,name:a.string().trim().min(1).describe("Team name."),description:a.string().trim().min(1).optional().describe("Optional team description.")}),mde=a.object({id:a.string().uuid().describe("ID of the created team.")}),pde=a.object({organizationId:Fo,teamId:a.string().uuid().describe("Team to update."),name:a.string().trim().min(1).optional().describe("New team name."),description:a.string().trim().min(1).nullable().optional().describe("New team description; null clears it.")}),wde=a.object({id:a.string().uuid().describe("ID of the updated team.")}),vde=a.object({params:a.object({teamId:a.string().uuid().describe("Team to delete.")}),query:a.object({organizationId:Fo})}).transform(({params:e,query:t})=>({...t,...e})),fde=a.object({success:a.literal(!0).describe("The team and its memberships were removed.")}),kde=a.object({organizationId:Fo,teamId:a.string().uuid().describe("Team to add the member to."),userId:a.string().min(1).describe("User ID of an active organization member to add.")}),Sde=a.object({id:a.string().uuid().describe("ID of the team membership.")}),Pde=a.object({params:a.object({teamId:a.string().uuid().describe("Team to remove the member from."),userId:a.string().min(1).describe("User ID of the member to remove.")}),query:a.object({organizationId:Fo})}).transform(({params:e,query:t})=>({...t,...e})),$de=a.object({success:a.literal(!0).describe("The membership was removed.")}),Ide=a.object({organizationId:Fo,teamId:a.string().uuid().describe("Team to list members for.")}),Ade=a.object({members:a.array(gde).describe("Active members of the team.")}),GI=S({operationId:"teams.list",description:"List teams in an organization.",backend:"api",route:{method:"GET",path:"/teams",tags:["Teams"]},input:dde,output:yde,pagination:"none",async:"sync",examples:[{name:"organization-teams",input:{organizationId:"organization-123"},output:{teams:[{id:"5c0f9866-31ab-4237-94cc-a1d0ba2f6de2",name:"Payments",description:"Owns checkout and billing components.",createdAt:"2026-01-01T00:00:00.000Z",memberCount:4}]}}]}),EI=S({operationId:"teams.create",description:"Create a team in an organization.",backend:"api",route:{method:"POST",path:"/teams",tags:["Teams"],successStatus:201},input:bde,output:mde,pagination:"none",async:"sync"}),JI=S({operationId:"teams.update",description:"Rename a team or update its description.",backend:"api",route:{method:"PATCH",path:"/teams/{teamId}",tags:["Teams"]},input:pde,output:wde,pagination:"none",async:"sync"}),BI=S({operationId:"teams.delete",description:"Delete a team, its memberships, and its component-ownership assignments.",backend:"api",route:{method:"DELETE",path:"/teams/{teamId}",tags:["Teams"],inputStructure:"detailed"},input:vde,output:fde,pagination:"none",async:"sync"}),HI=S({operationId:"teams.addMember",description:"Add an active organization member to a team.",backend:"api",route:{method:"POST",path:"/teams/{teamId}/members",tags:["Teams"],successStatus:201},input:kde,output:Sde,pagination:"none",async:"sync"}),WI=S({operationId:"teams.removeMember",description:"Remove a member from a team.",backend:"api",route:{method:"DELETE",path:"/teams/{teamId}/members/{userId}",tags:["Teams"],inputStructure:"detailed"},input:Pde,output:$de,pagination:"none",async:"sync"}),ZI=S({operationId:"teams.listMembers",description:"List a team's active members.",backend:"api",route:{method:"GET",path:"/teams/{teamId}/members",tags:["Teams"]},input:Ide,output:Ade,pagination:"none",async:"sync"}),AYe={list:GI.contract,create:EI.contract,update:JI.contract,delete:BI.contract,addMember:HI.contract,removeMember:WI.contract,listMembers:ZI.contract}});var XI;var xW=g(()=>{MD();qD();Sf();FD();Uf();qf();Nz();uu();d4();pS();O$();zg();GB();R$();yH();qH();HH();WH();ZH();OI();cW();CI();Ng();DI();$W();KI();qI();NW();eI();XI={me:L$.contract,automations:{list:$f.contract,get:If.contract,create:Af.contract,update:Tf.contract,enable:Of.contract,disable:Lf.contract,runs:{list:Cf.contract,get:Df.contract,logs:zf.contract}},logs:{query:Qr.contract,schema:Vr.contract,volume:ei.contract,patterns:ti.contract,nativeQuery:ni.contract,searchNatural:gu.contract},logSources:{listProviders:cu.contract,list:Fr.contract,create:Yr.contract,get:su.contract,update:lu.contract,delete:hu.contract},logStreams:{list:hS.contract,create:uS.contract,get:gS.contract,update:dS.contract,delete:yS.contract,reassign:bS.contract},integrations:{listProviders:GD.contract,listConnections:ED.contract,getConnection:JD.contract,createConnection:BD.contract,beginConnect:HD.contract,getConnectAttempt:WD.contract,disconnectConnection:ZD.contract,updateConnectionCredentials:XD.contract},notificationChannels:{getProject:aI.contract},notificationDeliveryRules:{list:dI.contract,options:yI.contract,create:bI.contract,update:mI.contract,delete:pI.contract},mcpConnectors:{listProviders:Dg.contract,list:ki.contract,get:Si.contract,details:Pi.contract,search:$i.contract,describe:Ii.contract,call:Ai.contract},sandboxPresets:{listConnections:Ni.contract,listTypes:Bg.contract,upsertPreset:Hg.contract},scripts:{list:jI.contract,get:NI.contract,create:xI.contract,update:RI.contract,delete:UI.contract},logMatchExpressions:{list:Jf.contract,get:Bf.contract,create:Hf.contract,update:Wf.contract,disable:Zf.contract},memory:{put:Oi.contract,get:Li.contract,list:Ci.contract,search:Di.contract,delete:zi.contract},onboarding:{getState:vI.contract,skipIntegration:fI.contract,skipGithubAppInstallation:kI.contract,skipSampleIssue:SI.contract,finish:PI.contract},organizations:{list:II.contract,get:AI.contract,create:$I.contract,update:TI.contract},members:{list:C$.contract,updateRole:D$.contract,remove:z$.contract},teams:{list:GI.contract,create:EI.contract,update:JI.contract,delete:BI.contract,addMember:HI.contract,removeMember:WI.contract,listMembers:ZI.contract},publicKeys:{list:Jr.contract,get:Br.contract,ensureLogForwarding:Hr.contract,update:Wr.contract,deactivate:Zr.contract},secretKeys:{list:Qh.contract,get:Vh.contract,create:eu.contract,update:tu.contract,delete:nu.contract},projects:{list:Kg.contract,get:qg.contract,create:Gg.contract,update:Eg.contract,delete:Jg.contract},search:{threads:xi.contract,messages:Ri.contract},messages:{list:gH.contract,append:dH.contract},threads:{list:E$.contract,get:J$.contract,getStatus:B$.contract,stop:H$.contract,create:W$.contract,update:Z$.contract,fork:X$.contract,setVisibility:F$.contract,createShareLink:Y$.contract,listShareLinks:Q$.contract,revokeShareLink:V$.contract},runs:{list:U$.contract,listForThread:M$.contract,get:K$.contract,cancel:q$.contract},pullRequests:{list:LI.contract},issues:{count:qh.contract,create:Er.contract,list:Mh.contract,search:Kh.contract,get:Gh.contract,resolve:Eh.contract,ignore:Jh.contract,reopen:Bh.contract,reassignAndReopen:Hh.contract,mute:Wh.contract,unmute:Zh.contract},billing:{getSummary:_f.contract,getUsage:jf.contract,listTransactions:Nf.contract},tasks:{list:os.contract},recommendations:{list:ns.contract},components:{list:vh.contract,get:fh.contract,register:qr.contract,deregister:kh.contract,rename:Sh.contract,assignTeam:Ph.contract,retirementPreview:$h.contract,retire:Ih.contract,restorationPreview:Ah.contract,restore:Th.contract,mergePreview:_h.contract,merge:jh.contract,relationships:{list:Oh.contract,preview:Lh.contract,add:Ch.contract,remove:Dh.contract},incidents:{list:Nh.contract},timeline:xh.contract}}});var Ui=g(()=>{UC();Sf();xW();Uf();qf();uu();pS();O$();R$();OI();CI();DI();KI();qI()});var Tde="https://api.sazabi.com",Ode="x-sazabi-client-source",UW=(e)=>{return{streamRun:async(t)=>{return RW({options:e,path:`/runs/${encodeURIComponent(t.runId)}/stream`,cursor:t.cursor,signal:t.signal})},streamThread:async(t)=>{return RW({options:e,path:`/threads/${encodeURIComponent(t.threadId)}/stream`,cursor:t.cursor,signal:t.signal})}}},RW=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(),r=Lde(e.options.apiBaseUrl,e.path,e.cursor);return Dde({url:r,token:n,clientSource:e.options.clientSource,initialCursor:e.cursor,signal:e.signal,fetch:t})},Lde=(e,t,n)=>{let r=Cde(e??Tde),o=new URL(`${r}${t}`);if(n)o.searchParams.set(cf,n);return o.toString()},Cde=(e)=>{let t=e.replace(/\/+$/,"");return t.endsWith("/v1")?t:`${t}/v1`},Dde=async(e)=>{let t=[],n=[],r=!1,o=!1,i,c=e.initialCursor,s=new AbortController,l=(f)=>{if(r)return;r=!0,i=f;while(n.length>0)n.shift()?.({value:void 0,done:!0})},h=(f)=>{let A=n.shift();if(A){A({value:f,done:!1});return}t.push(f)},u=(f)=>{if(f.event===lf){let L=xde(f.data);if(L!==void 0)c=L;return}if(f.data===hf){o=!0,s.abort(),l();return}let A=Rde(f.data);if(A)h(A)},d=()=>{o=!0,s.abort(),l()};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 c},next:async()=>{if(t.length>0)return{value:t.shift(),done:!1};if(r){if(i)throw i;return{value:void 0,done:!0}}return new Promise((f)=>{n.push(f)}).then((f)=>{if(f.done&&i)throw i;return f})},return:async()=>{return o=!0,s.abort(),l(),{value:void 0,done:!0}},throw:async(f)=>{throw o=!0,s.abort(),l(f instanceof Error?f:Error(String(f))),f},close:async()=>{o=!0,s.abort(),l()}};if(o)return l(),y;let b=await e.fetch(e.url,{method:sf,headers:zde(e.token,e.clientSource),signal:s.signal});if(await _de(b))l();else jde(b,u).then(()=>l()).catch((f)=>{if(Mde(f)||o||e.signal?.aborted){l();return}l(Kde(f))});return y},zde=(e,t)=>{return{accept:"text/event-stream",authorization:`Bearer ${e}`,...t?{[Ode]:t}:{}}},_de=async(e)=>{if(e.status===204)return!0;if(e.ok&&e.body)return!1;let t=await Ude(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}`)},jde=async(e,t)=>{let n=e.body?.getReader();if(!n)throw Error("Agent stream response did not include a body.");let r=new TextDecoder,o="",i=Nde(t);try{while(!0){let c=await n.read();if(c.done)break;o+=r.decode(c.value,{stream:!0});let s=o.split(/\r\n|\r|\n/);o=s.pop()??"";for(let l of s)i.line(l)}if(o+=r.decode(),o)for(let c of o.split(/\r\n|\r|\n/))i.line(c);i.flush()}finally{n.releaseLock()}},Nde=(e)=>{let t="message",n=[],r=()=>{t="message",n=[]},o=()=>{if(n.length===0){r();return}e({event:t,data:n.join(`
8554
8554
  `)}),r()};return{line:(i)=>{if(i===""){o();return}if(i.startsWith(":"))return;let c=i.indexOf(":"),s=c===-1?i:i.slice(0,c),l=c===-1?"":i.slice(c+1),h=l.startsWith(" ")?l.slice(1):l;if(s==="event"){t=h||"message";return}if(s==="data")n.push(h)},flush:o}},xde=(e)=>{try{let t=af.safeParse(JSON.parse(e));return t.success?t.data.streamNextOffset:void 0}catch{return}},Rde=(e)=>{try{let t=rf.safeParse(JSON.parse(e));return t.success?t.data:void 0}catch{return}},Ude=async(e)=>{try{return await e.text()}catch{return""}},Mde=(e)=>{return e instanceof Error&&e.name==="AbortError"},Kde=(e)=>{return e instanceof Error?e:Error(String(e))};var MW=g(()=>{Ui()});var FI,YI,QI,KW;var qW=g(()=>{be();FI=a.object({severities:a.array(a.string()).optional().describe("Limit results to the listed severities."),services:a.array(a.string()).optional().describe("Limit results to the listed service names."),environments:a.array(a.string()).optional().describe("Limit results to the listed deployment environments."),searchTerm:a.string().optional().describe("Case-insensitive substring match against the log body."),traceId:a.string().optional().describe("Limit results to one trace ID."),attributes:a.record(a.string(),a.string()).optional().describe("Limit results to logs whose attributes contain every listed key with an exactly equal value.")}),YI=a.object({service:a.string(),namespace:a.string(),environment:a.string(),host:a.string(),container:a.string(),pod:a.string()}),QI=a.object({id:a.string(),timestamp:a.string().datetime(),severity:a.string(),body:a.string(),service:a.string(),traceId:a.string(),spanId:a.string(),attributes:a.record(a.string(),a.string()),resource:YI}),KW=a.object({type:a.literal("logs"),timestamp:a.string().datetime(),data:a.array(QI)})});var qde="https://{region}.intake.sazabi.com",Gde="https://{region}.tail.sazabi.com",JW=500,Ede=5000,BW="sazabi.public_key",Jde="x-sazabi-internal-log-forwarding-secret",Bde="x-sazabi-internal-log-forwarding-source",Hde=(e)=>{return e.startsWith("[")&&e.endsWith("]")?e.slice(1,-1):e},HW=(e)=>{let t=Hde(e);return t==="localhost"||t==="127.0.0.1"||t==="::1"},Wde,Zde,Xde,WW=(e)=>{let t=new Map;return{tail:async(n)=>{let r=await cye(e.credentialProvider,n.projectId,"logs.tail"),o=await sye(e,t,r,n.region,"logs.tail"),i=Qde({projectId:r,region:o,filters:n.filters,apiBaseUrl:e.apiBaseUrl,tailBaseUrl:e.tailBaseUrl}),c=await e.credentialProvider.getToken(),s=e.fetch??globalThis.fetch;if(!s)throw Error("Fetch transport is not available in this runtime.");return hye({token:c,url:i,signal:n.signal,fetch:s})},forward:async(n)=>{let r=await lye(e,t,n.projectId??await e.credentialProvider.getProjectId?.(),n.region,"logs.forward"),o=nye(r,e.intakeBaseUrl),i=e.fetch??globalThis.fetch,c=rye(n.logs,n.publicKey),s=wye(c);return await pye(i,o,c,aye(n.sazabiInternalForwarding)),{forwardedCount:s,failedCount:0}}}},Fde="3010",Yde,Qde=(e)=>{let t=(e.tailBaseUrl??Vde({region:e.region,apiBaseUrl:e.apiBaseUrl})).replace("{region}",e.region),n=eye(t);n.searchParams.set("projectId",e.projectId);let r=tye(e.filters);if(r)n.searchParams.set("filters",r);return n.toString()},Vde=(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 Gde.replace("{region}",e.region)},eye=(e)=>{let t=(()=>{try{return new URL(e)}catch{return null}})();if(!t)throw Error(`Invalid tail base URL: ${e}`);if(HW(t.hostname)){if(t.protocol="http:",!t.port||Yde.has(t.port))t.port=Fde;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},tye=(e)=>{if(!e)return;let t=Object.entries(e).filter(([,n])=>n!==void 0&&(!Array.isArray(n)||n.length>0)&&(typeof n!=="object"||Array.isArray(n)||n===null||Object.keys(n).length>0)&&n!=="");if(t.length===0)return;return JSON.stringify(Object.fromEntries(t))},nye=(e,t)=>{let n=(t??qde).replace("{region}",e),r=n.endsWith("/")?n.slice(0,-1):n,o=oye(r);if(o)return o;let i=r.match(/^https:\/\/([a-z0-9-]+)\.intake\.([a-z0-9.]+)$/);return`${i?`https://otlp.${i[1]}.intake.${i[2]}`:r}/v1/logs`},oye=(e)=>{let t=(()=>{try{return new URL(e)}catch{return null}})();if(!t)return;if(!HW(t.hostname))return;return t.pathname="/adapters/otlp",t.toString()},rye=(e,t)=>{let n=e.resourceLogs;if(!n||n.length===0)return{...e,resourceLogs:[{resource:{attributes:[ZW(t)]},scopeLogs:[]}]};return{...e,resourceLogs:n.map((r)=>({...r,resource:{...r.resource,attributes:iye(r.resource?.attributes,t)}}))}},iye=(e,t)=>{return[...(e??[]).filter((r)=>r?.key!==BW),ZW(t)]},ZW=(e)=>({key:BW,value:{stringValue:e}}),aye=(e)=>{if(!e?.secret)return{};return{[Jde]:e.secret,...e.source?{[Bde]:e.source}:{}}},cye=async(e,t,n)=>{let r=t??await e.getProjectId?.();if(r)return r;throw YW(n,"Project ID is required",["projectId"])},sye=async(e,t,n,r,o)=>{return r??await XW(e,t,n)},lye=async(e,t,n,r,o)=>{if(r)return r;if(!n)throw YW(o,"Project ID is required",["projectId"]);return XW(e,t,n)},XW=async(e,t,n)=>{let r=t.get(n);if(r)return r;let o=e.raw.projects.get({projectId:n}).then((i)=>i.project.region);t.set(n,o);try{return await o}catch(i){throw t.delete(n),i}},hye=async(e)=>{let t=[],n=[],r=!1,o=!1,i,c=0,s,l,h=(A)=>{if(r)return;r=!0,i=A;while(n.length>0){let L=n.shift();if(L)L({value:void 0,done:!0})}},u=(A)=>{let L=n.shift();if(L){L({value:A,done:!1});return}t.push(A)},d=()=>{l?.abort()},y=(A)=>{if(A.event!=="log"){if(A.id)s=A.id;return}let L=bye(A.data);for(let K of L)u(K);if(A.id)s=A.id},b=async(A)=>{let L=!1;while(!r&&!o){let K=new AbortController,x=()=>K.abort();l=K;let Y=!1;e.signal?.addEventListener("abort",x,{once:!0});try{let q=await e.fetch(uye(e.url,s),{method:"GET",headers:{accept:"text/event-stream",authorization:`Bearer ${e.token}`},signal:K.signal});await gye(q),c=0,L=!0,A(),await dye(q,y),Y=!0}catch(q){if(EW(q)||e.signal?.aborted)break;let ve=GW(q);if(!L||mye(ve))throw ve;Y=!0}finally{if(e.signal?.removeEventListener("abort",x),l===K)l=void 0}if(r||o||e.signal?.aborted)break;if(!Y)continue;c+=1,await FW(Math.min(JW*2**(c-1),Ede),e.signal)}};if(e.signal?.addEventListener("abort",()=>{o=!0,d(),h()},{once:!0}),e.signal?.aborted)o=!0,d(),h();await new Promise((A,L)=>{let K=!1;b(()=>{if(!K)K=!0,A()}).catch((Y)=>{let q=GW(Y);if(!K){K=!0,L(q);return}if(!EW(Y))h(q)})});let f={[Symbol.asyncIterator](){return f},next:async()=>{if(t.length>0)return{value:t.shift(),done:!1};if(r){if(i)throw i;return{value:void 0,done:!0}}return new Promise((A)=>{n.push(A)}).then((A)=>{if(A.done&&i)throw i;return A})},return:async()=>{return o=!0,d(),h(),{value:void 0,done:!0}},throw:async(A)=>{throw o=!0,d(),h(A instanceof Error?A:Error(String(A))),A}};return f},uye=(e,t)=>{if(!t)return e;let n=new URL(e);return n.searchParams.set("cursor",t),n.toString()},gye=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}`)},dye=async(e,t)=>{let n=e.body?.getReader();if(!n)throw Error("Tail stream response did not include a body.");let r=new TextDecoder,o="",i=yye(t);try{while(!0){let c=await n.read();if(c.done)break;o+=r.decode(c.value,{stream:!0});let s=o.split(/\r\n|\r|\n/);o=s.pop()??"";for(let l of s)i.line(l)}if(o+=r.decode(),o){let c=o.split(/\r\n|\r|\n/);for(let s of c)i.line(s)}i.flush()}finally{n.releaseLock()}},yye=(e)=>{let t="message",n,r=[],o=()=>{t="message",n=void 0,r=[]},i=()=>{if(r.length===0&&!n){o();return}e({event:t,data:r.join(`
8555
8555
  `),...n?{id:n}:{}}),o()};return{line:(c)=>{if(c===""){i();return}if(c.startsWith(":"))return;let s=c.indexOf(":"),l=s===-1?c:c.slice(0,s),h=s===-1?"":c.slice(s+1),u=h.startsWith(" ")?h.slice(1):h;if(l==="event"){t=u||"message";return}if(l==="data"){r.push(u);return}if(l==="id"&&!u.includes("\x00"))n=u},flush:i}},bye=(e)=>{try{let t=KW.safeParse(JSON.parse(e));if(!t.success)return[];return t.data.data}catch{return[]}},GW=(e)=>{return e instanceof Error?e:Error(String(e))},EW=(e)=>{return e instanceof Error&&e.name==="AbortError"},mye=(e)=>{return e.message.startsWith("Authentication failed")||e.message.startsWith("Forbidden (")||e.message.startsWith("Wrong region (")||e.message.startsWith("Client error (")},pye=async(e,t,n,r={},o=3,i=1e4)=>{let c;for(let s=0;s<=o;s+=1){let l=new AbortController,h=globalThis.setTimeout(()=>l.abort(),i);try{let u=await e(t,{method:"POST",headers:{"content-type":"application/json",...r},body:JSON.stringify(n),signal:l.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}`);c=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);c=u instanceof Error&&u.name==="AbortError"?Error("Request timed out"):u instanceof Error?u:Error(String(u))}finally{globalThis.clearTimeout(h)}if(s<o)await FW(JW*2**s)}throw Error(`Failed after ${o+1} attempts: ${c?.message??"Unknown error"}`)},wye=(e)=>{return e.resourceLogs?.reduce((t,n)=>t+(n.scopeLogs?.reduce((r,o)=>r+(o.logRecords?.length??0),0)??0),0)??0},FW=async(e,t)=>{if(t?.aborted)return;await new Promise((n)=>{let r=globalThis.setTimeout(n,e);t?.addEventListener("abort",()=>{globalThis.clearTimeout(r),n()},{once:!0})})},YW=(e,t,n)=>{return new Qe("BAD_REQUEST",{message:t,data:{operationId:e,missingContext:n}})};var VI=g(()=>{lr();qW();be();Wde=a.object({projectId:a.string().uuid().optional().describe("Project to tail logs for. Auto-filled from CLI and SDK context when omitted."),filters:FI.optional().describe("Optional filters applied by the tail SSE service.")}),Zde=a.object({publicKey:a.string().min(1).describe("Public key for intake auth. Create or list one via the public key endpoints."),logs:a.custom((e)=>typeof e==="object"&&e!==null).describe("OTLP logs export request payload to send to the intake service.")}),Xde=a.object({forwardedCount:a.number().int().nonnegative().describe("Number of log records accepted by the intake request."),failedCount:a.number().int().nonnegative().describe("Number of log records rejected by the intake request.")}),Yde=new Set(["15006","3010"])});var eA="https://api.sazabi.com",VW="https://api.platform.sazabi.com",eZ="sazabi-cli",vye="urn:ietf:params:oauth:grant-type:device_code",tZ=(e)=>{let t=Zd(new cy(XI,{url:fye(e.apiBaseUrl??eA),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,i)=>{let c=Tye(o);if(!c)return null;return new Qe(c.code,{message:c.message,status:i.status,data:{operationId:c.operationId,missingContext:c.missingContext}})}})),n=WW({raw:t,credentialProvider:e.credentialProvider,fetch:e.fetch,apiBaseUrl:e.apiBaseUrl??eA,intakeBaseUrl:e.intakeBaseUrl,tailBaseUrl:e.tailBaseUrl}),r=UW({credentialProvider:e.credentialProvider,fetch:e.fetch,apiBaseUrl:e.apiBaseUrl??eA,clientSource:e.clientSource});return{raw:t,me:async()=>t.me({}),automations:{list:async(o={})=>t.automations.list(await ee(e.credentialProvider,o,"automations.list")),get:async(o)=>t.automations.get(await ee(e.credentialProvider,o,"automations.get")),create:async(o)=>t.automations.create(await ee(e.credentialProvider,o,"automations.create")),update:async(o)=>t.automations.update(await ee(e.credentialProvider,o,"automations.update")),enable:async(o)=>t.automations.enable(await ee(e.credentialProvider,o,"automations.enable")),disable:async(o)=>t.automations.disable(await ee(e.credentialProvider,o,"automations.disable")),runs:{list:async(o)=>t.automations.runs.list(await ee(e.credentialProvider,o,"automations.runs.list")),get:async(o)=>t.automations.runs.get(await ee(e.credentialProvider,o,"automations.runs.get")),logs:async(o)=>t.automations.runs.logs(await ee(e.credentialProvider,o,"automations.runs.logs"))}},logs:{...n,query:async(o={})=>t.logs.query(await ee(e.credentialProvider,o,Qr.operationId)),schema:async(o={})=>t.logs.schema(await ee(e.credentialProvider,o,Vr.operationId)),volume:async(o)=>t.logs.volume(await ee(e.credentialProvider,o,ei.operationId)),patterns:async(o={})=>t.logs.patterns(await ee(e.credentialProvider,o,ti.operationId)),nativeQuery:async(o)=>t.logs.nativeQuery(await ee(e.credentialProvider,o,ni.operationId))},organizations:{list:async()=>t.organizations.list({}),get:async(o)=>t.organizations.get(o),update:async(o)=>t.organizations.update(await Sye(e.credentialProvider,o))},members:{list:async(o={})=>t.members.list(await Ue(e.credentialProvider,o)),updateRole:async(o)=>t.members.updateRole(await Ue(e.credentialProvider,o)),remove:async(o)=>{let i=await Ue(e.credentialProvider,o);return t.members.remove({params:{userId:i.userId},query:{organizationId:i.organizationId}})}},teams:{list:async(o={})=>t.teams.list(await Ue(e.credentialProvider,o)),create:async(o)=>t.teams.create(await Ue(e.credentialProvider,o)),update:async(o)=>t.teams.update(await Ue(e.credentialProvider,o)),delete:async(o)=>{let i=await Ue(e.credentialProvider,o);return t.teams.delete({params:{teamId:i.teamId},query:{organizationId:i.organizationId}})},addMember:async(o)=>t.teams.addMember(await Ue(e.credentialProvider,o)),removeMember:async(o)=>{let i=await Ue(e.credentialProvider,o);return t.teams.removeMember({params:{teamId:i.teamId,userId:i.userId},query:{organizationId:i.organizationId}})},listMembers:async(o)=>t.teams.listMembers(await Ue(e.credentialProvider,o))},publicKeys:{list:async(o={})=>t.publicKeys.list(await ee(e.credentialProvider,o,Jr.operationId)),get:async(o)=>t.publicKeys.get(await ee(e.credentialProvider,o,Br.operationId)),ensureLogForwarding:async(o={})=>t.publicKeys.ensureLogForwarding(await ee(e.credentialProvider,o,Hr.operationId)),update:async(o)=>t.publicKeys.update(await ee(e.credentialProvider,o,Wr.operationId)),deactivate:async(o)=>{let i=await ee(e.credentialProvider,o,Zr.operationId);return t.publicKeys.deactivate({params:{keyId:i.keyId},query:{projectId:i.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 ee(e.credentialProvider,o,xi.operationId)),messages:async(o)=>t.search.messages(await ee(e.credentialProvider,o,Ri.operationId))},projects:{list:async(o={})=>t.projects.list(await kye(e.credentialProvider,o)),get:async(o)=>t.projects.get(o),create:async(o)=>t.projects.create(await Ue(e.credentialProvider,o))},messages:{list:async(o)=>t.messages.list(o),append:async(o)=>QW(t,await t.messages.append(Aye(o)))},threads:{list:async(o={})=>t.threads.list(await Pye(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)=>QW(t,await t.threads.create(await Iye(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)=>r.streamThread(o)},runs:{list:async(o={})=>t.runs.list(await $ye(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)=>r.streamRun(o)},logSources:{listProviders:async()=>t.logSources.listProviders({}),list:async(o={})=>t.logSources.list(await ee(e.credentialProvider,o,Fr.operationId)),get:async(o)=>t.logSources.get(o),create:async(o)=>t.logSources.create(await ee(e.credentialProvider,o,Yr.operationId)),update:async(o)=>t.logSources.update(o),delete:async(o)=>t.logSources.delete(o)},logStreams:{list:async(o)=>t.logStreams.list(o),get:async(o)=>t.logStreams.get(o),create:async(o)=>t.logStreams.create(o),update:async(o)=>t.logStreams.update(o),delete:async(o)=>t.logStreams.delete(o),reassign:async(o)=>t.logStreams.reassign(o)},integrations:{listProviders:async(o={})=>t.integrations.listProviders(await Ue(e.credentialProvider,o)),listConnections:async(o={})=>t.integrations.listConnections(await Ue(e.credentialProvider,o)),getConnection:async(o)=>t.integrations.getConnection(await Ue(e.credentialProvider,o)),createConnection:async(o)=>t.integrations.createConnection(await Ue(e.credentialProvider,o)),beginConnect:async(o)=>t.integrations.beginConnect(await Ue(e.credentialProvider,o)),getConnectAttempt:async(o)=>t.integrations.getConnectAttempt(await Ue(e.credentialProvider,o)),disconnectConnection:async(o)=>t.integrations.disconnectConnection(await Ue(e.credentialProvider,o)),updateConnectionCredentials:async(o)=>t.integrations.updateConnectionCredentials(await Ue(e.credentialProvider,o))},mcpConnectors:{list:async(o={})=>t.mcpConnectors.list(await ee(e.credentialProvider,o,ki.operationId)),get:async(o)=>t.mcpConnectors.get(await ee(e.credentialProvider,o,Si.operationId)),details:async(o)=>t.mcpConnectors.details(await ee(e.credentialProvider,o,Pi.operationId)),listProviders:async()=>t.mcpConnectors.listProviders({}),search:async(o={})=>t.mcpConnectors.search(await ee(e.credentialProvider,o,$i.operationId)),describe:async(o)=>t.mcpConnectors.describe(await ee(e.credentialProvider,o,Ii.operationId)),call:async(o)=>t.mcpConnectors.call(await ee(e.credentialProvider,o,Ai.operationId))},sandboxPresets:{listConnections:async(o={})=>t.sandboxPresets.listConnections(await ee(e.credentialProvider,o,Ni.operationId)),listTypes:async()=>t.sandboxPresets.listTypes({})},memory:{list:async(o={})=>t.memory.list(await ee(e.credentialProvider,o,Ci.operationId)),get:async(o)=>t.memory.get(await ee(e.credentialProvider,o,Li.operationId)),put:async(o)=>t.memory.put(await ee(e.credentialProvider,o,Oi.operationId)),search:async(o)=>t.memory.search(await ee(e.credentialProvider,o,Di.operationId)),delete:async(o)=>t.memory.delete(await ee(e.credentialProvider,o,zi.operationId))},logMatchExpressions:{list:async(o={})=>t.logMatchExpressions.list(await ee(e.credentialProvider,o,"logMatchExpressions.list")),get:async(o)=>t.logMatchExpressions.get(await ee(e.credentialProvider,o,"logMatchExpressions.get")),create:async(o)=>t.logMatchExpressions.create(await ee(e.credentialProvider,o,"logMatchExpressions.create")),update:async(o)=>t.logMatchExpressions.update(await ee(e.credentialProvider,o,"logMatchExpressions.update")),disable:async(o)=>t.logMatchExpressions.disable(await ee(e.credentialProvider,o,"logMatchExpressions.disable"))},scripts:{list:async(o={})=>t.scripts.list(await ee(e.credentialProvider,o,"scripts.list")),get:async(o)=>t.scripts.get(await ee(e.credentialProvider,o,"scripts.get")),create:async(o)=>t.scripts.create(await ee(e.credentialProvider,o,"scripts.create")),update:async(o)=>t.scripts.update(await ee(e.credentialProvider,o,"scripts.update")),delete:async(o)=>t.scripts.delete(await ee(e.credentialProvider,o,"scripts.delete"))},issues:{count:async(o={})=>t.issues.count(await ee(e.credentialProvider,o,"issues.count")),create:async(o)=>t.issues.create(await ee(e.credentialProvider,o,Er.operationId)),list:async(o={})=>t.issues.list(await ee(e.credentialProvider,o,"issues.list")),search:async(o={})=>t.issues.search(await ee(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 ee(e.credentialProvider,o,"pullRequests.list"))},components:{list:async(o={})=>t.components.list(await ee(e.credentialProvider,o,"components.list")),get:async(o)=>t.components.get(o),register:async(o)=>t.components.register(await ee(e.credentialProvider,o,qr.operationId)),deregister:async(o)=>t.components.deregister({componentId:o.componentId,...o.reason!==void 0?{reason:o.reason}:{}}),rename:async(o)=>t.components.rename(o),assignTeam:async(o)=>t.components.assignTeam(o),retirementPreview:async(o)=>t.components.retirementPreview(o),retire:async(o)=>t.components.retire(o),restorationPreview:async(o)=>t.components.restorationPreview(o),restore:async(o)=>t.components.restore(o),mergePreview:async(o)=>t.components.mergePreview(await ee(e.credentialProvider,o,"components.mergePreview")),merge:async(o)=>t.components.merge(await ee(e.credentialProvider,o,"components.merge")),relationships:{list:async(o={})=>t.components.relationships.list(await ee(e.credentialProvider,o,"components.relationships.list")),preview:async(o)=>t.components.relationships.preview(await ee(e.credentialProvider,o,"components.relationships.preview")),add:async(o)=>t.components.relationships.add(await ee(e.credentialProvider,o,"components.relationships.add")),remove:async(o)=>t.components.relationships.remove(await ee(e.credentialProvider,o,"components.relationships.remove"))},incidents:{list:async(o={})=>t.components.incidents.list(await ee(e.credentialProvider,o,"components.incidents.list"))},timeline:async(o)=>t.components.timeline(o)},billing:{getSummary:async(o={})=>t.billing.getSummary(await Ue(e.credentialProvider,o)),getUsage:async(o={})=>t.billing.getUsage(await Ue(e.credentialProvider,o)),listTransactions:async(o={})=>t.billing.listTransactions(await Ue(e.credentialProvider,o))},tasks:{list:async(o={})=>t.tasks.list(await ee(e.credentialProvider,o,os.operationId))},recommendations:{list:async(o={})=>t.recommendations.list(await ee(e.credentialProvider,o,ns.operationId))}}},nA=async(e={})=>{let t=await rZ(e.fetch)(nZ(e.apiBaseUrl??VW,"/device/code"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({client_id:e.clientId??eZ,...e.scope?{scope:e.scope}:{}})}),n=await t.json();if(!t.ok)throw Oye(n,t.status);let r=n;return{deviceCode:Mi(r.device_code,"device_code"),userCode:Mi(r.user_code,"user_code"),verificationUri:Mi(r.verification_uri,"verification_uri"),verificationUriComplete:Mi(r.verification_uri_complete,"verification_uri_complete"),expiresIn:tA(r.expires_in,"expires_in"),interval:tA(r.interval,"interval")}},oA=async(e)=>{let t=await rZ(e.fetch)(nZ(e.apiBaseUrl??VW,"/device/token"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({grant_type:vye,device_code:e.deviceCode,client_id:e.clientId??eZ})}),n=await t.json();if(t.ok){let o=n;return{status:"authorized",accessToken:Mi(o.access_token,"access_token"),tokenType:Mi(o.token_type,"token_type"),expiresIn:tA(o.expires_in,"expires_in"),scope:typeof o.scope==="string"?o.scope:""}}let r=oZ(n);if(!r)throw Error(`Device authorization failed with status ${t.status}`);if(r.error==="authorization_pending")return{status:"pending"};if(r.error==="slow_down")return{status:"pending",interval:10};if(r.error==="access_denied")return{status:"denied",message:r.errorDescription};if(r.error==="expired_token"||r.error==="invalid_grant")return{status:"expired",message:r.errorDescription};throw Error(r.errorDescription)},fye=(e)=>{let t=e.replace(/\/+$/,"");return t.endsWith("/v1")?t:`${t}/v1`},nZ=(e,t)=>{return`${e.replace(/\/+$/,"")}/api/auth${t}`},kye=async(e,t)=>{return Ue(e,t)},Ue=async(e,t)=>{let n=t.organizationId??await e.getOrganizationId?.();return n?{...t,organizationId:n}:t},Sye=async(e,t)=>{let n=t.organizationId??await e.getOrganizationId?.();if(!n)throw new Qe("BAD_REQUEST",{message:"Organization ID is required",data:{operationId:"organizations.update",missingContext:["organizationId"]},status:400});return{...t,organizationId:n}},ee=async(e,t,n)=>{let r=t.projectId??await e.getProjectId?.();if(!r)throw new Qe("BAD_REQUEST",{message:"Project ID is required",data:{operationId:n,missingContext:["projectId"]},status:400});return{...t,projectId:r}},Pye=async(e,t)=>{let n=t.projectId??await e.getProjectId?.();return n?{...t,projectId:n}:t},$ye=async(e,t)=>{let n=t.projectId??await e.getProjectId?.();return n?{...t,projectId:n}:t},Iye=async(e,t)=>{let n=t.projectId??await e.getProjectId?.();return n?{...t,projectId:n}:t},Aye=(e)=>{return{threadId:e.threadId,message:e.message,wait:e.wait??!0,timeoutSeconds:e.timeoutSeconds??20,...e.automationId!==void 0?{automationId:e.automationId}:{}}},Tye=(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"):[]}},oZ=(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}},Oye=(e,t)=>{let n=oZ(e);return Error(n?.errorDescription??`Device authorization failed with status ${t}`)},rZ=(e)=>{return e??globalThis.fetch},QW=(e,t)=>({result:t,poll:()=>e.runs.get({runId:t.runId}),waitForCompletion:async(n={})=>Lye(e,t,n)}),Lye=async(e,t,n)=>{if(t.completed)return t;let r=n.intervalMs??2000,o=Date.now(),i=t;while(!i.completed){if(n.timeoutMs!==void 0&&Date.now()-o>=n.timeoutMs)return i;await Cye(r),i=await e.runs.get({runId:i.runId})}return i},Cye=async(e)=>{await new Promise((t)=>globalThis.setTimeout(t,e))},Mi=(e,t)=>{if(typeof e==="string")return e;throw Error(`Expected '${t}' to be a string.`)},tA=(e,t)=>{if(typeof e==="number")return e;throw Error(`Expected '${t}' to be a number.`)};var rA=g(()=>{lr();NT();Ui();MW();VI();VI()});var Ze=(e)=>({success:!0,value:e}),Ke=(e,t,n)=>({success:!1,error:e,...t!==void 0&&{statusCode:t},...n!==void 0&&{errorPayload:n}}),w=(e,t,n)=>{if(!e.success){let r=`${t}: ${e.error}`;if(n)return m(e.errorPayload??r);return p(r)}return e.value};var ie=g(()=>{te()});var Dye="https://api.sazabi.com",O=async(e)=>{try{return Ze(await e())}catch(t){let n=zye(t),r=_ye(t),o=t instanceof Error?t.message:String(t);return Ke(o,r,n)}},zye=(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((r)=>typeof r==="string"):[]}},_ye=(e)=>{if(!e||typeof e!=="object")return;let t=e;return typeof t.status==="number"?t.status:void 0},Gn=(e)=>{let t=tZ({apiBaseUrl:e.baseUrl??Dye,clientSource:"cli",credentialProvider:{getToken:()=>e.token,getOrganizationId:()=>e.organizationId,getProjectId:()=>e.projectId},intakeBaseUrl:e.intakeBaseUrl,tailBaseUrl:e.tailBaseUrl});return{me:()=>O(()=>t.me()),automations:{list:(n={})=>O(()=>t.automations.list(n)),get:(n)=>O(()=>t.automations.get({automationId:n})),create:(n)=>O(()=>t.automations.create(n)),update:(n)=>O(()=>t.automations.update(n)),enable:(n)=>O(()=>t.automations.enable({automationId:n})),disable:(n)=>O(()=>t.automations.disable({automationId:n})),runs:{list:(n,r={})=>O(()=>t.automations.runs.list({automationId:n,...r})),get:(n,r)=>O(()=>t.automations.runs.get({automationId:n,runId:r})),logs:(n,r)=>O(()=>t.automations.runs.logs({automationId:n,runId:r}))}},logs:{tail:(n)=>O(()=>t.logs.tail(n)),forward:(n)=>O(()=>t.logs.forward(n)),query:(n={})=>O(()=>t.logs.query(n)),schema:(n={})=>O(()=>t.logs.schema(n)),volume:(n)=>O(()=>t.logs.volume(n)),patterns:(n={})=>O(()=>t.logs.patterns(n)),nativeQuery:(n)=>O(()=>t.logs.nativeQuery(n))},organizations:{list:()=>O(()=>t.organizations.list()),get:(n)=>O(()=>t.organizations.get({organizationId:n})),rename:(n,r)=>O(()=>t.organizations.update({organizationId:r,name:n}))},members:{list:(n={})=>O(()=>t.members.list(n)),updateRole:(n,r,o)=>O(()=>t.members.updateRole({organizationId:o,userId:n,role:r})),remove:(n,r)=>O(()=>t.members.remove({organizationId:r,userId:n}))},teams:{list:(n={})=>O(()=>t.teams.list(n)),create:(n,r,o)=>O(()=>t.teams.create({organizationId:o,name:n,...r!==void 0?{description:r}:{}})),update:(n,r,o)=>O(()=>t.teams.update({organizationId:o,teamId:n,...r.name!==void 0?{name:r.name}:{},...r.description!==void 0?{description:r.description}:{}})),delete:(n,r)=>O(()=>t.teams.delete({organizationId:r,teamId:n})),addMember:(n,r,o)=>O(()=>t.teams.addMember({organizationId:o,teamId:n,userId:r})),removeMember:(n,r,o)=>O(()=>t.teams.removeMember({organizationId:o,teamId:n,userId:r})),listMembers:(n,r)=>O(()=>t.teams.listMembers({organizationId:r,teamId:n}))},projects:{list:(n={})=>O(()=>t.projects.list(n)),get:(n)=>O(()=>t.projects.get({projectId:n})),create:(n)=>O(()=>t.projects.create(n))},threads:{list:(n={})=>O(()=>t.threads.list(n)),get:(n)=>O(()=>t.threads.get({threadId:n})),create:(n)=>O(()=>t.threads.create(n)),getStatus:(n)=>O(()=>t.threads.getStatus({threadId:n})),update:(n,r)=>O(()=>t.threads.update({threadId:n,status:r})),fork:(n,r)=>O(()=>t.threads.fork({threadId:n,messageId:r})),setVisibility:(n,r)=>O(()=>t.threads.setVisibility({threadId:n,visibility:r})),createShareLink:(n)=>O(()=>t.threads.createShareLink({threadId:n})),listShareLinks:(n)=>O(()=>t.threads.listShareLinks({threadId:n})),revokeShareLink:(n,r)=>O(()=>t.threads.revokeShareLink({threadId:n,shareId:r})),stop:(n)=>O(()=>t.threads.stop({threadId:n})),stream:(n)=>O(()=>t.threads.stream(n))},messages:{list:(n,r={})=>O(()=>t.messages.list({threadId:n,...r})),append:(n,r,o,i,c,s)=>O(()=>t.messages.append({threadId:n,message:r,wait:o,timeoutSeconds:i,...c!==void 0?{automationId:c}:{},...s?{ambientServiceRun:s}:{}}))},runs:{get:(n)=>O(()=>t.runs.get({runId:n})),cancel:(n)=>O(()=>t.runs.cancel({runId:n})),stream:(n)=>O(()=>t.runs.stream(n))},search:{threads:(n)=>O(()=>t.search.threads(n)),messages:(n)=>O(()=>t.search.messages(n))},publicKeys:{list:(n)=>O(()=>t.publicKeys.list(n)),get:(n,r)=>O(()=>t.publicKeys.get(r?{keyId:n,projectId:r}:{keyId:n})),ensureLogForwarding:(n)=>O(()=>t.publicKeys.ensureLogForwarding(n)),update:(n)=>O(()=>t.publicKeys.update(n)),deactivate:(n)=>O(()=>t.publicKeys.deactivate(n))},secretKeys:{list:(n)=>O(()=>t.secretKeys.list(n)),get:(n)=>O(()=>t.secretKeys.get({keyId:n})),create:(n)=>O(()=>t.secretKeys.create(n)),update:(n)=>O(()=>t.secretKeys.update(n)),delete:(n)=>O(()=>t.secretKeys.delete(n))},issues:{count:(n={})=>O(()=>t.issues.count(n)),create:(n)=>O(()=>t.issues.create(n)),list:(n={})=>O(()=>t.issues.list(n)),search:(n={})=>O(()=>t.issues.search(n)),get:(n)=>O(()=>t.issues.get({issueId:n})),resolve:(n)=>O(()=>t.issues.resolve({issueId:n})),ignore:(n)=>O(()=>t.issues.ignore({issueId:n})),reopen:(n)=>O(()=>t.issues.reopen({issueId:n})),mute:(n)=>O(()=>t.issues.mute({issueId:n})),unmute:(n)=>O(()=>t.issues.unmute({issueId:n}))},pullRequests:{list:(n={})=>O(()=>t.pullRequests.list(n))},components:{list:(n={})=>O(()=>t.components.list(n)),get:(n)=>O(()=>t.components.get({componentId:n})),register:(n)=>O(()=>t.components.register(n)),deregister:(n,r)=>O(()=>t.components.deregister({componentId:n,...r!==void 0?{reason:r}:{}})),rename:(n)=>O(()=>t.components.rename(n)),retirementPreview:(n)=>O(()=>t.components.retirementPreview(n)),retire:(n)=>O(()=>t.components.retire(n)),restorationPreview:(n)=>O(()=>t.components.restorationPreview(n)),restore:(n)=>O(()=>t.components.restore(n)),mergePreview:(n)=>O(()=>t.components.mergePreview(n)),merge:(n)=>O(()=>t.components.merge(n)),relationships:{list:(n={})=>O(()=>t.components.relationships.list(n)),preview:(n)=>O(()=>t.components.relationships.preview(n)),add:(n)=>O(()=>t.components.relationships.add(n)),remove:(n)=>O(()=>t.components.relationships.remove(n))},incidents:{list:(n={})=>O(()=>t.components.incidents.list(n))},timeline:(n)=>O(()=>t.components.timeline(n))},billing:{getSummary:(n={})=>O(()=>t.billing.getSummary(n)),getUsage:(n={})=>O(()=>t.billing.getUsage(n)),listTransactions:(n={})=>O(()=>t.billing.listTransactions(n))},tasks:{list:(n={})=>O(()=>t.tasks.list(n))},recommendations:{list:(n={})=>O(()=>t.recommendations.list(n))},logSources:{listProviders:()=>O(()=>t.logSources.listProviders()),list:(n)=>O(()=>t.logSources.list(n)),get:(n)=>O(()=>t.logSources.get({logSourceId:n})),create:(n)=>O(()=>t.logSources.create(n)),update:(n)=>O(()=>t.logSources.update(n)),delete:(n)=>O(()=>t.logSources.delete({logSourceId:n}))},logStreams:{list:(n)=>O(()=>t.logStreams.list({logSourceId:n})),get:(n)=>O(()=>t.logStreams.get({streamId:n})),create:(n)=>O(()=>t.logStreams.create(n)),update:(n)=>O(()=>t.logStreams.update(n)),delete:(n)=>O(()=>t.logStreams.delete({streamId:n})),reassign:(n)=>O(()=>t.logStreams.reassign(n))},integrations:{listProviders:()=>O(()=>t.integrations.listProviders()),listConnections:(n)=>O(()=>t.integrations.listConnections(n)),getConnection:(n)=>O(()=>t.integrations.getConnection({connectionId:n})),createConnection:(n)=>O(()=>t.integrations.createConnection(n)),beginConnect:(n)=>O(()=>t.integrations.beginConnect(n)),getConnectAttempt:(n)=>O(()=>t.integrations.getConnectAttempt({attemptId:n})),disconnectConnection:(n)=>O(()=>t.integrations.disconnectConnection({connectionId:n})),updateConnectionCredentials:(n)=>O(()=>t.integrations.updateConnectionCredentials(n))},mcpConnectors:{list:(n)=>O(()=>t.mcpConnectors.list(n)),get:(n)=>O(()=>t.mcpConnectors.get(n)),details:(n)=>O(()=>t.mcpConnectors.details(n)),listProviders:()=>O(()=>t.mcpConnectors.listProviders())},sandboxPresets:{listTypes:()=>O(()=>t.sandboxPresets.listTypes())},memory:{list:(n={})=>O(()=>t.memory.list(n)),get:(n)=>O(()=>t.memory.get(n)),search:(n)=>O(()=>t.memory.search(n)),put:(n)=>O(()=>t.memory.put({kind:"note",...n})),delete:(n)=>O(()=>t.memory.delete(n))},logMatchExpressions:{list:(n={})=>O(()=>t.logMatchExpressions.list(n)),get:(n)=>O(()=>t.logMatchExpressions.get({expressionId:n})),create:(n)=>O(()=>t.logMatchExpressions.create(n)),update:(n,r={})=>O(()=>t.logMatchExpressions.update({expressionId:n,...r})),disable:(n)=>O(()=>t.logMatchExpressions.disable({expressionId:n}))},scripts:{list:(n={})=>O(()=>t.scripts.list(n)),get:(n)=>O(()=>t.scripts.get({name:n})),create:(n)=>O(()=>t.scripts.create(n)),update:(n,r={})=>O(()=>t.scripts.update({name:n,...r})),delete:(n)=>O(()=>t.scripts.delete({name:n}))}}};var rs=g(()=>{rA();ie()});var iZ;var aZ=g(()=>{iZ={version:2,activeProfile:"default",profiles:{default:{}}}});import*as En from"node:fs";import*as cZ from"node:os";import*as cA from"node:path";var dt=(e)=>{if(e===void 0||e===null)return;if(typeof e==="string")return e.length>0?e:void 0;return},iA,Ki,jye=()=>{if(!En.existsSync(iA))En.mkdirSync(iA,{recursive:!0,mode:448})},aA,sZ=(e)=>{aA=e},lZ=(e)=>({token:dt(e.token),activeOrganizationId:dt(e.activeOrganizationId??e.organizationId),organizationName:dt(e.organizationName),activeProjectId:dt(e.activeProjectId??e.defaultProjectId),apiBaseUrl:dt(e.apiBaseUrl),authBaseUrl:dt(e.authBaseUrl),webBaseUrl:dt(e.webBaseUrl),intakeBaseUrl:dt(e.intakeBaseUrl),tailBaseUrl:dt(e.tailBaseUrl),apiDomain:dt(e.apiDomain),webDomain:dt(e.webDomain),intakeDomain:dt(e.intakeDomain),tailDomain:dt(e.tailDomain),forwardPublicKey:dt(e.forwardPublicKey),forwardPublicKeyProjectId:dt(e.forwardPublicKeyProjectId)}),Nye=(e)=>({version:2,activeProfile:"default",profiles:{default:lZ(e)}}),xye=(e)=>{let t=dt(e.activeProfile)??"default",n=typeof e.profiles==="object"&&e.profiles!==null?e.profiles:{},r={};for(let[o,i]of Object.entries(n)){if(typeof i!=="object"||i===null)continue;r[o]=lZ(i)}if(!r[t])r[t]={};return{version:2,activeProfile:t,profiles:r}},Re=()=>{try{if(!En.existsSync(Ki))return Ze(iZ);let e=En.readFileSync(Ki,"utf-8"),t=JSON.parse(e),n=typeof t.version==="number"?t.version:void 0;if(n!==void 0&&n>2)return Ke("Settings file requires a newer CLI version. Upgrade with 'npm install -g @sazabi/cli@latest'.");if(n===2)return Ze(xye(t));let r=Nye(t),o=Fe(r);if(!o.success)return o;return Ze(r)}catch(e){let t=e instanceof Error?e.message:String(e);return Ke(t)}},Fe=(e)=>{try{return jye(),En.writeFileSync(Ki,JSON.stringify(e,null,2),{encoding:"utf-8",mode:384}),Ze(void 0)}catch(t){let n=t instanceof Error?t.message:String(t);return Ke(n)}},In=(e,t)=>{if(t)return t;if(aA)return aA;let n=process.env.SAZABI_PROFILE?.trim();if(n)return n;return e.activeProfile??"default"},Rt=(e,t)=>{let n=In(e,t),r=e.profiles[n];if(r)return Ze(r);if(n==="default")return Ze({});return Ke(`Profile '${n}' does not exist. Run 'sazabi profiles create ${n}' first.`)},Jn=()=>{let e=Re();if(!e.success)return e;return Rt(e.value)},Ut=(e,t,n)=>{let r=In(e,n);if(!e.profiles[r])return Ke(`Profile '${r}' does not exist. Run 'sazabi profiles create ${r}' first.`);return Ze({...e,profiles:{...e.profiles,[r]:{...e.profiles[r],...t}}})},Bn=(e)=>{if(!e?.forwardPublicKey&&!e?.forwardPublicKeyProjectId)return{};return{forwardPublicKey:void 0,forwardPublicKeyProjectId:void 0}};var Vt=g(()=>{aZ();ie();iA=cA.join(cZ.homedir(),".sazabi"),Ki=cA.join(iA,"settings.json")});var An=(e)=>{let{cliFlag:t,globalUrl:n,globalDomain:r,buildUrlFromDomain:o,defaultUrl:i}=e;if(t)return t;let c=process.env.SAZABI_API_URL?.trim();if(c)return c;if(n)return n;if(r)return o(r);return i},D=(e)=>{let{tokenFlag:t,organizationIdFlag:n,projectIdFlag:r,jsonMode:o}=e,i=t?.trim(),c=process.env.SAZABI_TOKEN?.trim(),s=process.env.SAZABI_ORGANIZATION_ID?.trim(),l=process.env.SAZABI_PROJECT_ID?.trim(),h=w(Jn(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",o),u=h.token?.trim(),d=(i&&i.length>0?i:void 0)||(c&&c.length>0?c:void 0)||u,y=i&&i.length>0?"flag":c&&c.length>0?"environment":"settings";if(!d||d.length===0){if(o)return m("Not authenticated. Set SAZABI_TOKEN, pass --token, run 'sazabi auth login', or run 'sazabi auth save <token>'.");return p("Not authenticated. Set SAZABI_TOKEN, pass --token, run 'sazabi auth login', or run 'sazabi auth save <token>'.")}let b,v;if(n)b=n,v="flag";else if(s&&s.length>0)b=s,v="environment";else if(h.activeOrganizationId)b=h.activeOrganizationId,v="settings";let f,A;if(r)f=r,A="flag";else if(l&&l.length>0)f=l,A="environment";else if(h.activeProjectId)f=h.activeProjectId,A="settings";return{token:d,type:"token",projectId:f,organizationId:b,tokenSource:y,organizationSource:v,projectSource:A}},lA=(e)=>{let t=w(Jn(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",e?.jsonMode);return An({cliFlag:e?.apiBaseUrlFlag,globalUrl:t.apiBaseUrl,globalDomain:t.apiDomain,buildUrlFromDomain:(n)=>`https://api.${n}`,defaultUrl:"https://api.sazabi.com"})},z=(e)=>{let t=lA({apiBaseUrlFlag:e.apiBaseUrlFlag,jsonMode:e.jsonMode});return Gn({token:e.token,baseUrl:t,organizationId:e.organizationId,projectId:e.projectId})},hZ,sA,Xg=async(e)=>{let t=w(Jn(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)",e.jsonMode),n=An({cliFlag:e.apiBaseUrlFlag,globalUrl:t.apiBaseUrl,globalDomain:t.apiDomain,buildUrlFromDomain:(l)=>`https://api.${l}`,defaultUrl:"https://api.sazabi.com"}),r=`${e.token}@${n}@${e.projectId??""}`,o=hZ.get(r);if(o)return o;let i=sA.get(r);if(i)return i;if(!e.projectId){if(e.jsonMode)return m("Project ID is required. Run 'sazabi projects use <project-id>' or set SAZABI_PROJECT_ID.");return p("Project ID is required. Run 'sazabi projects use <project-id>' or set SAZABI_PROJECT_ID.")}let c=e.projectId,s=(async()=>{let h=await Gn({token:e.token,baseUrl:n,projectId:c}).projects.get(c),d=w(h,"Couldn't fetch project info (run 'sazabi projects list' to verify the project ID)",e.jsonMode).project;return hZ.set(r,d),d})();sA.set(r,s);try{return await s}finally{sA.delete(r)}},Zg=(e)=>{let t=e.trim().toLowerCase(),n=/^[a-z][a-z0-9+.-]*:\/\//.test(t)?t:`https://${t}`,r=t;try{r=new URL(n).hostname.toLowerCase()}catch{r=t.replace(/^[a-z][a-z0-9+.-]*:\/\//,"").replace(/[/?#].*$/,"").replace(/:\d+$/,"")}return`https://app.${r.replace(/^(?:app\.)+/,"")}`},qi=(e)=>{let t=(r)=>r.replace(/\/+$/,"");if(e)return t(e);let n=w(Jn(),"Couldn't read settings (check that ~/.sazabi/settings.json is readable)");if(n.webBaseUrl)return t(n.webBaseUrl);if(n.webDomain)return Zg(n.webDomain);if(n.apiDomain)return Zg(n.apiDomain);return"https://app.sazabi.com"},Tn=(e,t)=>{if(e&&e.length>0)return e;let n="No project selected. Pass --project-id, set SAZABI_PROJECT_ID, or run 'sazabi projects use <project-id>'.";if(t)return m(n);return p(n)},wo=(e,t)=>{return`${qi(t)}/projects/${e}`},Ye=(e,t,n,r)=>{let o=`${qi(n)}/projects/${e}/threads/${t}`;return r?`${o}?messageId=${encodeURIComponent(r)}`:o},uZ=(e,t,n,r)=>{return Ye(e,t,n,r)},gZ=(e,t,n)=>{return`${wo(e,n)}/issues/${t}`},dZ=(e,t,n)=>{return`${wo(e,n)}/automations/${t}`},yZ=(e,t)=>{return`${wo(e,t)}/status`},bZ=(e,t,n)=>{return`${wo(e,n)}/settings/log-source-providers/${t}`},mZ=(e,t,n)=>{return`${wo(e,n)}/settings/mcp-connectors/${t}`},pZ=(e,t,n)=>{return`${wo(e,n)}/settings/sandbox/catalog/${t}`},wZ=(e,t)=>{return`https://otlp.${t}.intake.${e}`};var ce=g(()=>{te();rs();ie();Vt();hZ=new Map,sA=new Map});var bd,FF=(e)=>{bd.set(e.name,e)},md=(e)=>{return bd.get(e)},fs=()=>{return Array.from(bd.values())},YF=(e)=>{return bd.has(e)};var jA=g(()=>{bd=new Map});async function UA(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 MA(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 Ss(e){let t=await e.logSources.list();if(!t.success)return[];return t.value.logSources.map((n)=>({value:n.id,description:n.name??n.provider}))}async function eY(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 Oke=3000,Lke,tY=async(e,t,n)=>{try{let r=Lke[e]?.[t];if(!r)return[];let o=Jn();if(!o.success)return[];let i=o.value,c=process.env.SAZABI_TOKEN?.trim()||i.token?.trim();if(!c)return[];let s=An({globalUrl:i.apiBaseUrl,globalDomain:i.apiDomain,buildUrlFromDomain:(u)=>`https://api.${u}`,defaultUrl:"https://api.sazabi.com"}),l=Gn({token:c,baseUrl:s,organizationId:i.activeOrganizationId,projectId:i.activeProjectId});return(await Promise.race([r(l),new Promise((u)=>setTimeout(()=>u([]),Oke))])).filter((u)=>u.value.startsWith(n))}catch{return[]}};var nY=g(()=>{rs();ce();Vt();Lke={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:UA,update:UA,deactivate:UA},"secret-keys":{get:MA,update:MA,delete:MA},"log-sources":{get:Ss,enable:Ss,disable:Ss,delete:Ss,remove:Ss},members:{"update-role":eY,remove:eY}}});var rY={};dn(rY,{parseCompletionContext:()=>zke,getCompletions:()=>_ke});var Cke,Dke,zke=(e)=>{let t=e.length>0?e:[""],n=t.length-1,r=t[n]??"";return{words:t,currentIndex:n,partial:r}},_ke=async(e)=>{let{words:t,currentIndex:n,partial:r}=e,o=t[n-1];if(o==="--profile")return Rke(r);let i=xke(t),c=Math.max(0,i.length-(t.length-n));if(c===0)return jke(r);let s=i[0]??"",l=md(s);if(!l)return[];if(c===1&&l.subcommands){if(r.startsWith("-"))return oY(l.options,i);return Nke(l,r)}let h=l.subcommands?i[1]:void 0,d=(h?l.subcommands?.[h]:void 0)?.options??l.options;if(r.startsWith("-"))return oY(d,i);if(o?.startsWith("--")){let y=o.slice(2);if(d?.[y]?.type==="string"){let v=`${s}:${h??""}`,f=Dke[v]?.[y]??Cke[y];if(f)return f.filter((A)=>A.startsWith(r)).map((A)=>({value:A}));return[]}}return tY(s,h??"",r)},jke=(e)=>{let n=fs().filter((o)=>o.name.startsWith(e)).map((o)=>({value:o.name,description:o.description})),r=[{value:"--help",description:"Show help"},{value:"--version",description:"Show version"},{value:"--profile",description:"Use a named profile"}];for(let o of r)if(o.value.startsWith(e))n.push(o);return n},Nke=(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}))},oY=(e,t)=>{let n=t[t.length-1]??"",r=new Set(t.filter((i)=>i.startsWith("--")).map((i)=>i.replace(/=.*/,""))),o=[];if(!r.has("--help")&&"--help".startsWith(n))o.push({value:"--help",description:"Show help"});if(!r.has("--profile")&&"--profile".startsWith(n))o.push({value:"--profile",description:"Use a named profile"});if(!e)return o;for(let[i,c]of Object.entries(e)){let s=`--${i}`;if(r.has(s))continue;if(!s.startsWith(n))continue;o.push({value:s,description:c.description})}return o},xke=(e)=>{let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(r==="--profile"&&n+1<e.length)n++;else if(r.startsWith("--profile="));else t.push(r)}return t},Rke=(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 iY=g(()=>{jA();Vt();nY();Cke={status:["regular","archived"],format:["json","text"]},Dke={"members:update-role":{role:["admin","member"]},"messages:search":{role:["user","assistant"]},"messages:list":{role:["user","assistant"]}}});te();te();te();import{parseArgs as jY}from"node:util";var I=(e,t,n={})=>{let r=jY({args:e,options:t,allowPositionals:Boolean(n.allowPositionals),strict:!1,tokens:!0}),o=Object.hasOwn(t,"json")&&r.values.json===!0,i=new Set(Object.keys(t)),c=new Set(Object.entries(t).map(([,l])=>l.short).filter((l)=>Boolean(l))),s=[];if(Array.isArray(r.tokens))for(let l of r.tokens){if(l.kind!=="option")continue;let h=l.name,u=h.length>1;if(!(i.has(h)||!u&&c.has(h))){let y=u?`--${h}`:`-${h}`;if(!s.includes(y))s.push(y)}}for(let l of Object.keys(r.values))if(!i.has(l)){let h=l.length>1?`--${l}`:`-${l}`;if(!s.includes(h))s.push(h)}if(s.length>0){let l=`Unknown option${s.length>1?"s":""}: ${s.join(", ")}. Run the command with -h for usage.`;if(o)m(l);p(l)}for(let[l,h]of Object.entries(t))if(h.type==="string"&&r.values[l]===!0){let u=l.length===1?`-${l}`:`--${l}`,d=`Option ${u} requires a value. Use '${u} <value>'.`;if(o)m(d);p(d)}for(let[l,h]of Object.entries(t)){let u=r.values[l];if(h.type==="string"&&typeof u==="string"){if(u.startsWith("--")||u.length===2&&u[0]==="-"&&/[a-zA-Z]/.test(u.charAt(1))){let b=`Option ${l.length===1?`-${l}`:`--${l}`} received "${u}" as its value. Did you forget to provide a value?`;if(o)m(b);p(b)}}}return{values:r.values,positionals:r.positionals}};var Ts=(e,t)=>{if(e?.json?.type!=="boolean")throw Error(`${t} must include a boolean --json option (enforced by CommandBuilder)`)};class nT{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)Ts(this.options,`Subcommand "${this.name}"`);if(!this.allowNoJson&&this.subcommands){for(let[e,t]of Object.entries(this.subcommands))if(!t.subcommands)Ts(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 oT{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)Ts(this.options,`Command "${this.name}"`);if(this.subcommands)for(let[e,t]of Object.entries(this.subcommands)){if(t.subcommands)continue;Ts(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 Q=(e,t)=>{return new oT(e,t)},P=(e,t,n)=>{return new nT(e,t,n)};te();var ht=(e,t,n,r,o)=>{let i=Number.parseInt(e,10);if(Number.isNaN(i)||i<t||i>n){let c=`${r} must be between ${t} and ${n}.`;if(o)return m(c);return p(c)}return i},Dt=(e,t,n,r)=>{if(!t.includes(e)){let o=t.map((c)=>`"${c}"`).join(" or "),i=`${n} must be ${o}.`;if(r)return m(i);return p(i)}return e};te();ce();ie();var uA=(e)=>{let t=[];for(let n of e){let r=0;for(let o of n.content){if(o.type!=="artifact")continue;t.push({id:`${n.id}:${r}`,messageId:n.id,name:o.name,toolCallId:o.toolCallId??null,createdAt:n.createdAt,data:o.data}),r+=1}}return t},fZ=(e)=>{let t=e.lastIndexOf(":");if(t<=0||t===e.length-1)return null;let n=e.slice(0,t),r=e.slice(t+1);if(!/^\d+$/.test(r))return null;return{messageId:n,index:Number.parseInt(r,10)}},kZ=(e,t)=>{return uA(e).find((n)=>n.id===t)},hA=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),vZ=(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},Rye=(e)=>{if(Array.isArray(e)&&e.every(hA))return e;if(hA(e))for(let t of["rows","data","items","points"]){let n=e[t];if(Array.isArray(n)&&n.every(hA))return n}return null},SZ=(e)=>{let t=Rye(e);if(!t||t.length===0)return null;let n=[];for(let o of t)for(let i of Object.keys(o))if(!n.includes(i))n.push(i);if(n.length===0)return null;let r=[n.map(vZ).join(",")];for(let o of t)r.push(n.map((i)=>vZ(o[i])).join(","));return r.join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sazabi/cli",
3
- "version": "0.19.0-dev.g415de7d",
3
+ "version": "0.19.0-dev.g448df4d",
4
4
  "description": "The Sazabi CLI",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",