@sazabi/cli 0.14.4-dev.g79b4a75 → 0.14.4-dev.g94bf23c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7472,7 +7472,7 @@ sinks:
|
|
|
7472
7472
|
codec: otlp`}]}]}]},{id:"wire-sources",section:"config",title:"Wire sources",actions:[{instruction:'Replace `inputs: ["*"]` on the `remap` transform with your specific source or transform IDs in production. `["*"]` also matches `internal_metrics` and other unrelated components.',notes:[{variant:"requirement",text:"The sink's `otlp` codec doesn't build the OTLP envelope on its own. If you wire raw sources straight into it, Vector drops every event."},{text:"Sazabi indexes logs and traces from Vector. It accepts metrics at the intake but silently drops them."}]}]},{id:"traces",section:"config",title:"Forward traces (optional)",actions:[{instruction:'Add a second `opentelemetry` sink with `uri` ending in `/v1/traces` and explicit `inputs` referencing an already-OTLP-shaped source, typically an `opentelemetry` Vector source with `use_otlp_decoding.traces: true` (use `inputs: ["otlp_in.traces"]`).',notes:[{text:"No remap is needed for traces."},{variant:"requirement",text:'Do not wire `["*"]` into a traces sink.'}]}]}]}});var l_;var u_=g(()=>{h_();l_={id:"vector",name:"Vector",capabilities:["connectionless"],auth:[],delivery:["push"],lifecycleSkipReason:"Manual agent setup is not exercised by automated lifecycle tests yet.",intake:[{id:"vector",label:"Vector",subdomain:"vector",transform:"otlp-passthrough"}],subtitle:"Forward logs and traces from your infrastructure to Sazabi using the Vector observability pipeline.",features:["Kubernetes DaemonSet","High-throughput pipeline","Built-in transforms","Multiple source types"],evidenceHints:["vector.toml/yaml/json, vector.dev Helm values, or Vector sidecars","VECTOR_* environment variables or VRL transform config","README/docs naming Vector as the observability pipeline"],setupSkill:H,dashboard:{iconKey:"vector",intakeSourceId:"vector"}}});var Kv,xv,Ev,Gv;var g_=g(()=>{It();Kv={kind:"multi-step",steps:[{id:"prepare",title:"Create token",actions:[{kind:"instruction",instruction:"Create a full-access API token in your [Vercel account settings](https://vercel.com/account/tokens). For team accounts, create the token while scoped to the correct team.",notes:[{text:"A token gets the same permissions as your account."}]}]},{id:"credentials",title:"Enter token",actions:[{id:"token",kind:"secret",label:"API token",instruction:"Enter your Vercel API token below.",placeholder:"Enter your Vercel API token"}]}],submit:{actions:[{kind:"validate",action:"validate",input:{token:"$token"},resultAs:"validate"}],metadata:{vercelApiToken:"$token",vercelTeamId:"$validate.teamId",vercelTeamName:"$validate.teamName"},button:Ee}},xv={groups:[{id:"open-drains",section:"config",title:"Open Drains",notes:[{variant:"requirement",text:"**Vercel Drains require the Pro or Enterprise plan.** Hobby and Pro Trial teams cannot create drains."}],actions:[{instruction:"In your [Vercel dashboard](https://vercel.com/dashboard), go to **Team Settings > Drains** and create a new drain."},{instruction:"Choose **Logs** as the data to deliver.",notes:[{text:"This path covers logs only — to send traces or Web Analytics events, connect your Vercel account instead and Sazabi creates those drains for you."}]}]},{id:"endpoint",section:"config",title:"Set the endpoint",actions:[{instruction:"Paste your Sazabi intake URL (above) into the drain's endpoint field."}]},{id:"delivery-settings",section:"config",title:"Set delivery options",actions:[{instruction:"Set the delivery format to **JSON**.",notes:[{text:"Sazabi does not parse NDJSON on this endpoint."}]},{instruction:"Pick the projects, environments, and log sources to send.",notes:[{text:"Sazabi accepts every Vercel log source (Static, Lambda, Edge, Build, External, Firewall, Redirect)."}]}]},{id:"verify",section:"verify",title:"Save and verify",actions:[{instruction:"Save the drain, then send some traffic — push a deployment or hit an application route. Logs show up in Sazabi within a few minutes."}]}],docsUrl:"https://docs.sazabi.com/data/sources/endpoint/vercel"},Ev=[{field:"name",header:"Project"},{field:"framework",header:"Framework",width:"w-32",cell:"badge",transform:"fallback:Unspecified"}],Gv={content:{kind:"tabs",tabs:[{id:"logs",label:"Logs",content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:Ev,searchPlaceholder:"Search projects...",searchFields:["name","framework"],dedupeByConfigField:"vercelProjectId",dedupeExtraMatch:{drainType:"logs"},emptyState:{noMatches:"No projects found.",allConfigured:"All projects already have logs drains configured."},toStreamItem:{displayName:"$item.name (Logs)",config:{vercelProjectId:"$item.id",vercelProjectName:"$item.name",drainType:"logs"}}}},{id:"traces",label:"Traces",content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:Ev,searchPlaceholder:"Search projects...",searchFields:["name","framework"],dedupeByConfigField:"vercelProjectId",dedupeExtraMatch:{drainType:"traces"},emptyState:{noMatches:"No projects found.",allConfigured:"All projects already have traces drains configured."},toStreamItem:{displayName:"$item.name (Traces)",config:{vercelProjectId:"$item.id",vercelProjectName:"$item.name",drainType:"traces"}}}},{id:"analytics",label:"Analytics",content:{kind:"list",listAction:"list",listInput:{connectionId:"${context.connectionId}"},columns:Ev,searchPlaceholder:"Search projects...",searchFields:["name","framework"],dedupeByConfigField:"vercelProjectId",dedupeExtraMatch:{drainType:"analytics"},emptyState:{noMatches:"No projects found.",allConfigured:"All projects already have analytics drains configured."},toStreamItem:{displayName:"$item.name (Analytics)",config:{vercelProjectId:"$item.id",vercelProjectName:"$item.name",drainType:"analytics"}}}}]}}});var zV,NV,_V,d_;var y_=g(()=>{g_();zV=["vercelApiToken"],NV={id:"vercel",label:"Vercel",subdomain:"vercel",transform:"vercel-drain"},_V={id:"vercel-analytics",label:"Vercel Analytics",subdomain:"vercel-analytics",transform:"vercel-analytics-drain"},d_={id:"vercel",name:"Vercel",capabilities:["connectionless","managed"],auth:["apiToken"],delivery:["push"],lifecycleEligible:!0,sensitiveFields:zV,intake:[NV,_V],subtitle:"Forward your Vercel deployment logs, traces, and Web Analytics events directly to Sazabi for real-time analysis and alerting.",features:["Log forwarding","Trace forwarding","Web Analytics forwarding","Real-time streaming"],evidenceHints:["vercel.json, .vercel/, or Vercel build/deploy scripts","@vercel packages, VERCEL_* environment variables, or GitHub Actions that run vercel","README/docs naming Vercel as the deployment host"],setupSkill:H,dashboard:{iconKey:"vercel",intakeSourceId:"vercel",streamSelectorLayout:"sidepanel",streamTableColumns:[{kind:"config-enum-badge",header:"Type",width:"w-24",configField:"drainType",values:[{value:"logs",label:"Logs"},{value:"traces",label:"Traces"},{value:"analytics",label:"Analytics"}],fallbackLabel:"N/A"}],actions:{submit:{validate:{kind:"source-action",actionId:"validate-token"}},list:{list:{kind:"source-action",actionId:"list-projects",itemsField:"projects"}}}}}});var Mv;var b_=g(()=>{Mv={perStreamInstructions:!0,groups:[{id:"endpoint",section:"config",title:"Send events",actions:[{instruction:"Send an HTTP `POST` with a JSON body to your webhook URL (above).",notes:[{text:"A single JSON object is stored as one event; a JSON array of objects is stored as one event per element."},{text:"You can append any path — for example `/deploys` — to record the event's origin; the path is passed through and stored as `webhook.path`."}]}]},{id:"configure-vendor",section:"config",title:"Paste the URL into your vendor",actions:[{instruction:"Open your vendor's webhook or outbound-event settings, add a new endpoint, and paste the URL above. Choose JSON as the payload format if the vendor offers a choice.",notes:[{text:"Sazabi reads the time, severity, and message from common field names when present, and stores every field of the payload under `webhook.*` either way. There is nothing to map or declare."}]}]},{id:"verify",section:"verify",title:"Send a test event and verify",actions:[{instruction:"Trigger a test event from your vendor — most webhook settings pages have a “Send test” button — or POST a sample event yourself, then watch for it below.",payloads:[{kind:"code",label:"Send a test event",language:"bash",copyLabel:"curl test event",value:`curl -X POST \\
|
|
7473
7473
|
https://\${context.ingestHost}/test \\
|
|
7474
7474
|
-H 'content-type: application/json' \\
|
|
7475
|
-
-d '{"event":"hello.world","level":"info","message":"first webhook event"}'`}]}]}]}});var p_;var m_=g(()=>{b_();p_={id:"webhook_events",name:"Webhook Events",searchAliases:["webhook","webhooks","json events","http events","generic webhook","event stream"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"webhook-events",label:"Webhook Events",subdomain:"webhook-events",transform:"webhook-events"}],lifecycleSkipReason:"Manual webhook setup is not exercised by automated lifecycle tests yet.",subtitle:"Point any vendor's webhooks at Sazabi. Arbitrary JSON events land as searchable log records with zero vendor-specific configuration.",features:["Any JSON event stream","One keyed URL per endpoint","Full payload preserved as attributes","No schema or field mapping"],evidenceHints:["A vendor that emits plain JSON webhooks without a dedicated Sazabi source","An internal service, deploy bot, or cron that POSTs JSON events","Existing outbound webhook configuration with no other Sazabi destination"],setupSkill:H,dashboard:{slug:"webhook-events",iconKey:"webhook-events",intakeSourceId:"webhook-events"}}});var Yh,w_,tCe,nCe,ji,oCe,iCe,jV,RV,UV,rCe;var f_=g(()=>{yz();mz();vz();Pz();$z();Cz();zz();jz();Ez();Gz();Jz();Wz();Fz();Vz();nN();rN();sN();uN();yN();mN();vN();PN();$N();CN();zN();jN();EN();GN();JN();WN();FN();VN();n_();r_();s_();u_();y_();m_();Yh=[dz,pz,fz,Iz,Oz,Az,Dz,_z,Uz,xz,Bz,Hz,Xz,Qz,tN,iN,cN,lN,dN,pN,fN,IN,ON,AN,DN,_N,UN,xN,BN,HN,QN,XN,t_,i_,c_,l_,d_,p_],w_=Yh,tCe=Object.fromEntries(w_.map((e)=>[e.id,e.sensitiveFields??[]])),nCe=Object.fromEntries(w_.flatMap((e)=>[...Object.values(e.dashboard?.actions?.submit??{}),...Object.values(e.dashboard?.actions?.list??{}),...Object.values(e.dashboard?.actions?.prefetch??{})].flatMap((t)=>{let n=t.sensitiveInputFields??[];if(n.length===0)return[];return[["procedure"in t?t.procedure:`${e.id}.${t.actionId}`,n]]}))),ji=["vercel","cloudflare","railway","render","fly_io","netlify","supabase","digital_ocean","inngest","trigger_dev","temporal","mastra","neon","langchain","daytona","e2b","cloudwatch","convex","datadog","sentry","sentry_platform","openrouter","posthog","posthog_sdk","gcp","otel","otel_metrics","fluent_bit","vector","grafana_alloy","otel_collector","cloudflare_workers","elastic_cloud","porter","respan","plain","prometheus","webhook_events"],oCe=Yh.map((e)=>({id:e.id,name:e.name,capabilities:e.capabilities})),iCe=Object.fromEntries(Yh.map((e)=>[e.id,{name:e.name,setupSkill:e.setupSkill}])),jV={cloudflare:_f,cloudwatch:Gf,convex:Jf,digital_ocean:Xf,fly_io:tv,gcp:iv,plain:mv,posthog:kv,render:Tv,sentry_platform:zv,vercel:Kv},RV={cloudflare:jf,cloudwatch:Mf,convex:Hf,digital_ocean:Zf,fly_io:ov,gcp:rv,plain:fv,posthog:Iv,render:Cv,vercel:Gv},UV={cloudflare:Rf,cloudflare_workers:Uf,cloudwatch:Bf,convex:qf,datadog:Wf,daytona:Yf,digital_ocean:Ff,fluent_bit:ev,fly_io:nv,grafana_alloy:cv,e2b:Qf,elastic_cloud:Vf,gcp:av,inngest:sv,langchain:hv,mastra:lv,neon:uv,netlify:gv,openrouter:dv,otel:yv,otel_collector:bv,otel_metrics:pv,plain:wv,posthog:Pv,posthog_sdk:Sv,porter:vv,prometheus:Ov,railway:$v,render:Av,respan:Lv,sentry:Dv,sentry_platform:Nv,supabase:_v,temporal:jv,trigger_dev:Rv,vector:Uv,vercel:xv,webhook_events:Mv},rCe=Yh.map((e)=>({sourceId:e.id,name:e.name,capabilities:e.capabilities,setupAuthModes:e.auth,deliveryModes:e.delivery,hasDashboardMetadata:Boolean(e.dashboard),hasManagedFlow:Boolean(jV[e.id]),hasConnectionlessFlow:Boolean(UV[e.id]),hasStreamSelector:Boolean(RV[e.id]),lifecycleEligible:e.lifecycleEligible??!1,lifecycleSkipReason:e.lifecycleSkipReason}))});var v_=g(()=>{f_()});var Bv=g(()=>{uz();v_()});var k_,qa,EV,KV,I_,Jv,qv,Xh,P_,S_,Fh,O_,$_,Ri,T_,A_,Zh,C_,Hv,L_,D_,Qh,z_,N_,Vh,__,j_,Ui,R_,U_,el,E_,K_,tl,x_,G_,nl,M_,B_,ol,J_,q_,il,H_,W_,rl,xV;var Wv=g(()=>{Bv();we();Ne();k_=ji,qa=c.enum(k_),EV=c.enum(["pending","provisioning","active","error"]),KV=c.object({name:c.string().describe("Field name used as the JSON key in metadata."),type:c.string().describe('Zod type name, e.g. "string", "boolean", "enum".'),required:c.boolean().describe("Whether the field is required."),sensitive:c.boolean().describe("Whether the field contains a secret and will be encrypted."),description:c.string().nullable().describe("Human-readable description of the field.")}),I_=c.object({id:c.string().describe("Data source type identifier."),name:c.string().describe("Human-readable display name."),metadataFields:c.array(KV).describe("Fields required in the metadata object when creating a connection."),setupSkill:c.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),Jv=c.object({kind:c.enum(["url","hostPort"]).describe("Card shape. `url` = a complete keyed URL whose hostname authenticates; `hostPort` = a non-keyed listener host + port whose credential travels separately."),label:c.string().optional().describe("Card label. Present when a source exposes several endpoints (e.g. separate logs and traces destinations)."),url:c.string().optional().describe("The complete keyed intake URL. Present when kind is `url`."),host:c.string().optional().describe("The regional listener hostname (no scheme). Present when kind is `hostPort`."),port:c.number().int().optional().describe("The listener port. Present when kind is `hostPort`."),description:c.string().optional().describe("Vendor-specific guidance rendered under the value."),extraCredential:c.object({label:c.string(),value:c.string(),description:c.string().optional()}).optional().describe("The credential the sender must attach when the hostname alone does not authenticate. Present when kind is `hostPort`.")}),qv=c.object({id:c.string().uuid(),projectId:c.string().uuid(),dataSourceType:qa,displayName:c.string().nullable(),createdAt:c.string().datetime()}),Xh=c.object({id:c.string().uuid(),instanceId:c.string().uuid().describe("Root instance ID. Every stream roots on exactly one data source instance (managed or connectionless)."),connectionId:c.string().uuid().nullable().describe("Backing connection ID, resolved from the stream's instance. Null for connectionless streams, which ingest directly without a managed connection."),displayName:c.string(),config:c.record(c.string(),c.unknown()),status:EV,errorMessage:c.string().nullable(),enabled:c.boolean().describe("Whether the stream is currently ingesting. Independent of provisioning status: a paused stream stays configured but stops accepting new data."),createdAt:c.string().datetime(),endpointCards:c.array(Jv).optional().describe("Server-computed endpoint card(s) for this stream's delivery key — where to point the sender. Present only for streams that carry their own intake key (connectionless-lifecycle streams).")}),P_=c.object({}),S_=c.object({types:c.array(I_)}),Fh=$({operationId:"dataSources.listTypes",description:"List all supported data source types with their metadata requirements.",backend:"api",route:{method:"GET",path:"/data-sources/types",tags:["Data Sources"]},input:P_,output:S_,pagination:"none",async:"sync"}),O_=c.object({projectId:c.string().uuid().optional().describe("Project to list connections for. Auto-filled from SDK context when omitted."),dataSourceType:qa.optional().describe("Filter connections by data source type.")}),$_=c.object({connections:c.array(qv)}),Ri=$({operationId:"dataSources.listConnections",description:"List data source connections within one project.",backend:"api",route:{method:"GET",path:"/data-sources/connections",tags:["Data Sources"]},input:O_,output:$_,pagination:"none",async:"sync"}),T_=c.object({connectionId:c.string().uuid().describe("Connection ID to fetch.")}),A_=c.object({connection:qv}),Zh=$({operationId:"dataSources.getConnection",description:"Get one data source connection by ID.",backend:"api",route:{method:"GET",path:"/data-sources/connections/{connectionId}",tags:["Data Sources"]},input:T_,output:A_,pagination:"none",async:"sync"}),C_=c.enum(["managed","connectionless"]),Hv=c.object({id:c.string().uuid(),dataSourceType:qa,mode:C_,label:c.string().nullable(),connectionId:c.string().uuid().nullable(),streamCount:c.number().int(),createdAt:c.string().datetime(),connectionDisplayName:c.string().nullish(),streamName:c.string().nullish()}),L_=c.object({projectId:c.string().uuid().optional().describe("Project to list instances for. Auto-filled from SDK context when omitted."),dataSourceType:qa.optional().describe("Filter instances by data source type.")}),D_=c.object({instances:c.array(Hv)}),Qh=$({operationId:"dataSources.listInstances",description:"List data source instances within one project.",backend:"api",route:{method:"GET",path:"/data-sources/instances",tags:["Data Sources"]},input:L_,output:D_,pagination:"none",async:"sync"}),z_=c.object({instanceId:c.string().uuid().describe("Instance ID to fetch."),projectId:c.string().uuid().optional().describe("Project the instance belongs to. Auto-filled from SDK context when omitted.")}),N_=c.object({instance:Hv}),Vh=$({operationId:"dataSources.getInstance",description:"Get one data source instance by ID.",backend:"api",route:{method:"GET",path:"/data-sources/instances/{instanceId}",tags:["Data Sources"]},input:z_,output:N_,pagination:"none",async:"sync"}),__=c.object({projectId:c.string().uuid().optional().describe("Project to create the connection in. Auto-filled from SDK context when omitted."),dataSourceType:qa.describe("Data source type identifier."),metadata:c.record(c.string(),c.unknown()).describe("Platform-specific credentials. Fields vary by data source type."),displayName:c.string().optional().describe("Optional human-readable name for this connection.")}),j_=c.object({connectionId:c.string().uuid().describe("ID of the created connection."),publicKey:c.string().describe("Auto-generated public key for this connection. Store this securely — it is only shown once."),endpointCards:c.array(Jv).optional().describe("Server-computed endpoint card(s) for the minted key — where to point the sender. Present for sources that ingest through a Sazabi endpoint (connectionless lifecycle).")}),Ui=$({operationId:"dataSources.createConnection",description:"Create a new data source connection. Validates credentials, encrypts sensitive fields, and auto-generates a public key.",backend:"api",route:{method:"POST",path:"/data-sources/connections",successStatus:201,tags:["Data Sources"]},input:__,output:j_,pagination:"none",async:"sync"}),R_=c.object({connectionId:c.string().uuid().describe("Connection ID to list streams for."),enabled:c.boolean().optional().describe("Optional filter on stream ingestion state. Omit to list all streams; pass true for only enabled streams or false for only paused streams.")}),U_=c.object({streams:c.array(Xh)}),el=$({operationId:"dataSources.listStreams",description:"List streams for a data source connection.",backend:"api",route:{method:"GET",path:"/data-sources/connections/{connectionId}/streams",tags:["Data Sources"]},input:R_,output:U_,pagination:"none",async:"sync"}),E_=c.object({instanceId:c.string().uuid().describe("Instance ID to list streams for."),enabled:c.boolean().optional().describe("Optional filter on stream ingestion state. Omit to list all streams; pass true for only enabled streams or false for only paused streams.")}),K_=c.object({streams:c.array(Xh)}),tl=$({operationId:"dataSources.listInstanceStreams",description:"List the streams that belong to a data source instance.",backend:"api",route:{method:"GET",path:"/data-sources/instances/{instanceId}/streams",tags:["Data Sources"]},input:E_,output:K_,pagination:"none",async:"sync"}),x_=c.object({instanceId:c.string().uuid().describe("Instance ID to create the stream under."),displayName:c.string().describe("Resource name, e.g. service or app name."),config:c.record(c.string(),c.unknown()).describe("Platform-specific stream configuration.")}),G_=c.object({streamId:c.string().uuid().describe("ID of the created stream."),publicKey:c.string().optional().describe("Auto-generated public key for this stream. Returned only when the data source mints a per-stream key (sources that send to a Sazabi endpoint). Store this securely — it is only shown once.")}),nl=$({operationId:"dataSources.createStream",description:"Create a new stream under a data source instance. Triggers async provisioning.",backend:"api",route:{method:"POST",path:"/data-sources/instances/{instanceId}/streams",successStatus:201,tags:["Data Sources"]},input:x_,output:G_,pagination:"none",async:"sync"}),M_=c.object({streamId:c.string().uuid().describe("Stream ID to fetch.")}),B_=c.object({stream:Xh}),ol=$({operationId:"dataSources.getStream",description:"Get one data source stream by ID. Use to poll provisioning status.",backend:"api",route:{method:"GET",path:"/data-sources/streams/{streamId}",tags:["Data Sources"]},input:M_,output:B_,pagination:"none",async:"sync"}),J_=c.object({streamId:c.string().uuid().describe("Stream ID to delete.")}),q_=c.object({success:c.boolean()}),il=$({operationId:"dataSources.deleteStream",description:"Delete a data source stream. For sources that send to a Sazabi endpoint, also deletes the stream's public key.",backend:"api",route:{method:"DELETE",path:"/data-sources/streams/{streamId}",successStatus:204,tags:["Data Sources"]},input:J_,output:q_,pagination:"none",async:"sync"}),H_=c.object({connectionId:c.string().uuid().describe("Connection ID to disconnect.")}),W_=c.object({success:c.boolean(),connectionTeardownError:c.string().nullable().describe("Null when teardown succeeded; error message when remote cleanup failed.")}),rl=$({operationId:"dataSources.disconnectConnection",description:"Disconnect a data source connection. Removes the connection, all associated streams, and their public keys. Provider-side cleanup runs asynchronously when the source supports it.",backend:"api",route:{method:"DELETE",path:"/data-sources/connections/{connectionId}",successStatus:200,tags:["Data Sources"]},input:H_,output:W_,pagination:"none",async:"sync"}),xV={listTypes:Fh.contract,listConnections:Ri.contract,getConnection:Zh.contract,listInstances:Qh.contract,getInstance:Vh.contract,createConnection:Ui.contract,disconnectConnection:rl.contract,listStreams:el.contract,listInstanceStreams:tl.contract,createStream:nl.contract,getStream:ol.contract,deleteStream:il.contract}});var GV,Yv,MV,BV,JV,qV,HV,Y_,WV,YV,X_,XV,FV,F_,ZV,QV,Z_;var Q_=g(()=>{we();Ne();GV=["slack","github","linear","pagerduty","victorops","rootly","incident_io","webhook","teams","bitbucket","jira"],Yv=c.enum(GV),MV=c.enum(["oauth","app_installation","api_key"]),BV=c.enum(["alert_routing","inbound_webhooks","messaging","code_search","health_check"]),JV=c.enum(["pending","connected","error","revoked"]),qV=c.enum(["healthy","unhealthy","unknown"]),HV=c.object({id:Yv.describe("Integration provider identifier."),name:c.string().describe("Human-readable display name."),description:c.string().describe("Short description of the provider."),authType:MV.describe("Auth flow used to connect this provider."),capabilities:c.array(BV).describe("Capabilities the provider exposes once connected."),connectionCount:c.number().int().describe("Number of active connections for this provider in the organization, including error-status connections that need attention.")}),Y_=c.object({id:c.string().uuid(),provider:Yv,displayName:c.string().nullable(),status:JV,isActive:c.boolean().describe("Whether this connection counts as connected (status 'connected' or 'error'). An error-status connection is the organization's connection — broken, not absent."),needsAttention:c.boolean().describe("Whether the connection should surface a reconnect prompt (status 'error' or health status 'unhealthy')."),metadata:c.record(c.string(),c.unknown()).describe("Non-secret provider metadata (e.g. workspace/team names)."),healthStatus:qV,healthMessage:c.string().nullable(),healthCheckedAt:c.string().datetime().nullable(),healthConsecutiveFailures:c.number().int(),connectedBy:c.string().nullable(),createdAt:c.string().datetime(),updatedAt:c.string().datetime()}),WV=c.object({organizationId:c.string().min(1).optional().describe("Organization to list providers for. Auto-filled from CLI and SDK context when omitted.")}),YV=c.object({providers:c.array(HV)}),X_=$({operationId:"integrations.listProviders",description:"List supported integration providers and how many connections the organization has for each.",backend:"api",route:{method:"GET",path:"/integrations/providers",tags:["Integrations"]},input:WV,output:YV,pagination:"none",async:"sync"}),XV=c.object({organizationId:c.string().min(1).optional().describe("Organization to list connections for. Auto-filled from CLI and SDK context when omitted."),provider:Yv.optional().describe("Filter connections by provider.")}),FV=c.object({connections:c.array(Y_)}),F_=$({operationId:"integrations.listConnections",description:"List integration connections and their connection state for the organization.",backend:"api",route:{method:"GET",path:"/integrations/connections",tags:["Integrations"]},input:XV,output:FV,pagination:"none",async:"sync"}),ZV=c.object({organizationId:c.string().min(1).optional().describe("Organization the connection belongs to. Auto-filled from CLI and SDK context when omitted."),connectionId:c.string().uuid().describe("Connection ID to fetch.")}),QV=c.object({connection:Y_}),Z_=$({operationId:"integrations.getConnection",description:"Get one integration connection by ID (non-secret config only).",backend:"api",route:{method:"GET",path:"/integrations/connections/{connectionId}",tags:["Integrations"]},input:ZV,output:QV,pagination:"none",async:"sync"})});var vn,VV,e3,V_,al,cl,ej,Xv,tj,Fv,nj,oj,t3,n3,ij,rj,aj,cj,sj,hj,lj,uj,gj,dj,yj,bj,pj,Ei,sl,hl,ll,ul,gl,dl,Zv,yl,bl,o3;var Qv=g(()=>{we();Ne();vn=c.object({id:c.string().uuid(),projectId:c.string().uuid(),name:c.string(),description:c.string().nullable(),status:c.enum(["open","resolved","ignored"]),severity:c.enum(["low","medium","high","critical"]),statusComponentId:c.string().uuid().nullable(),createdAt:c.string().datetime(),resolvedAt:c.string().datetime().nullable(),mutedAt:c.string().datetime().nullable(),muteHitCount:c.number().int().nonnegative(),lastActivityAt:c.string().datetime().nullable(),lastDeliveredAt:c.string().datetime().nullable(),locked:c.boolean(),redacted:c.boolean()}),VV=c.object({channelId:c.string().nullable(),channelName:c.string().nullable(),threadTs:c.string().nullable(),permalink:c.string().nullable(),workspaceName:c.string().nullable()}),e3=vn.extend({slackChannels:c.array(VV)}),V_=vn.extend({delivery:c.record(c.string(),c.unknown()).nullable().optional()}),al=c.object({projectId:c.string().uuid().optional().describe("Project to create the issue in. Auto-filled from CLI and SDK context when omitted."),name:c.string().trim().min(1).optional().describe("Stable issue name for indexing and mute matching. When omitted, the name is derived from contentMdx."),contentMdx:c.string().trim().min(1,"contentMdx cannot be empty").describe("Safe Sazabi MDX document for the issue body (impact, root cause, remediation, evidence)."),severity:c.enum(["low","medium","high","critical"]).default("medium").describe("Issue severity used for prioritization and triage."),statusComponentId:c.string().uuid().optional().describe("Optional status component ID to link to the issue."),statusStartedAt:c.string().datetime({offset:!0}).optional().describe("Optional ISO timestamp for when the linked status-page incident began.")}),cl=al.superRefine((e,t)=>{if(e.statusStartedAt&&!e.statusComponentId)t.addIssue({code:"custom",path:["statusStartedAt"],message:"statusStartedAt requires statusComponentId."})}),ej=c.object({issue:vn,duplicateIssueId:c.string().uuid().optional().describe("Present when creation reused an existing open issue instead of creating a new one.")}),Xv=c.object({projectId:c.string().uuid().optional().describe("Project to list issues for. Auto-filled from CLI and SDK context when omitted."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of issues to return per page."),cursor:c.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:c.enum(["open","resolved","ignored"]).optional().describe("Filter by issue status."),severity:c.enum(["low","medium","high","critical"]).optional().describe("Filter by severity."),statusComponentId:c.string().uuid().optional().describe("Filter by status component ID.")}),tj=c.object({issues:c.array(vn),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Fv=Xv.extend({name:c.string().trim().optional().describe("Case-insensitive partial match on issue name."),includeDeliveryMetadata:c.union([c.boolean(),c.stringbool()]).default(!1).describe("When true, include raw delivery metadata in each issue.")}),nj=c.object({issues:c.array(V_),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),oj=Fv.omit({limit:!0,cursor:!0,includeDeliveryMetadata:!0}),t3=c.object({open:c.number().int().nonnegative(),resolved:c.number().int().nonnegative(),ignored:c.number().int().nonnegative()}),n3=c.object({low:c.number().int().nonnegative(),medium:c.number().int().nonnegative(),high:c.number().int().nonnegative(),critical:c.number().int().nonnegative()}),ij=c.object({total:c.number().int().nonnegative(),byStatus:t3,bySeverity:n3,filters:c.object({name:c.string().nullable(),status:c.enum(["open","resolved","ignored"]).nullable(),severity:c.enum(["low","medium","high","critical"]).nullable(),statusComponentId:c.string().uuid().nullable()})}),rj=c.object({issueId:c.string().uuid().describe("Issue ID to retrieve.")}),aj=c.object({issue:e3}),cj=c.object({issueId:c.string().uuid().describe("Issue ID to resolve."),statusResolvedAt:c.string().datetime({offset:!0}).optional().describe("Optional ISO timestamp for when the linked status-page incident ended.")}),sj=c.object({issue:vn}),hj=c.object({issueId:c.string().uuid().describe("Issue ID to ignore.")}),lj=c.object({issue:vn}),uj=c.object({issueId:c.string().uuid().describe("Issue ID to reopen.")}),gj=c.object({issue:vn}),dj=c.object({issueId:c.string().uuid().describe("Issue ID to mute.")}),yj=c.object({issue:vn}),bj=c.object({issueId:c.string().uuid().describe("Issue ID to unmute.")}),pj=c.object({issue:vn}),Ei=$({operationId:"issues.create",description:"Create an issue in a project, returning an existing open issue when root-cause deduplication finds a match.",backend:"api",route:{method:"POST",path:"/issues",tags:["Issues"],successStatus:201},input:cl,output:ej,pagination:"none",async:"sync"}),sl=$({operationId:"issues.list",description:"List issues in a project, optionally filtered by status and severity.",backend:"api",route:{method:"GET",path:"/issues",tags:["Issues"]},input:Xv,output:tj,pagination:"cursor",async:"sync"}),hl=$({operationId:"issues.search",description:"Search issues in a project by name, status, and severity.",backend:"api",route:{method:"GET",path:"/issues/search",tags:["Issues"]},input:Fv,output:nj,pagination:"cursor",async:"sync"}),ll=$({operationId:"issues.count",description:"Count issues in a project with status and severity breakdowns.",backend:"api",route:{method:"GET",path:"/issues/count",tags:["Issues"]},input:oj,output:ij,pagination:"none",async:"sync"}),ul=$({operationId:"issues.get",description:"Get a single issue by ID.",backend:"api",route:{method:"GET",path:"/issues/{issueId}",tags:["Issues"]},input:rj,output:aj,pagination:"none",async:"sync"}),gl=$({operationId:"issues.resolve",description:"Resolve an open issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/resolve",tags:["Issues"]},input:cj,output:sj,pagination:"none",async:"sync"}),dl=$({operationId:"issues.ignore",description:"Ignore an open issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/ignore",tags:["Issues"]},input:hj,output:lj,pagination:"none",async:"sync"}),Zv=$({operationId:"issues.reopen",description:"Reopen a resolved or ignored issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/reopen",tags:["Issues"]},input:uj,output:gj,pagination:"none",async:"sync"}),yl=$({operationId:"issues.mute",description:"Mute an issue, suppressing future re-fires without changing status.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/mute",tags:["Issues"]},input:dj,output:yj,pagination:"none",async:"sync"}),bl=$({operationId:"issues.unmute",description:"Unmute an issue, preserving its current status.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/unmute",tags:["Issues"]},input:bj,output:pj,pagination:"none",async:"sync"}),o3={count:ll.contract,create:Ei.contract,list:sl.contract,search:hl.contract,get:ul.contract,resolve:gl.contract,ignore:dl.contract,mute:yl.contract,unmute:bl.contract}});var Vv,mj,pl,ml,wj,fj,vj,kj,wl,ek,Ij,Pj,Sj,Oj,$j,Tj,Aj,Cj,Lj,Dj,zj,Nj,Ki,xi,Gi,Mi,Bi,fl,vl,kl,Il,Pl,i3,r3;var tk=g(()=>{we();Ne();Vv=/^[a-zA-Z0-9\s\-_]+$/,mj=c.object({id:c.string().uuid(),name:c.string(),expiresAt:c.string().datetime().nullable(),lastUsedAt:c.string().datetime().nullable(),createdAt:c.string().datetime()}),pl=mj.extend({projectId:c.string().uuid(),dataSourceConnectionId:c.string().uuid().nullable().describe("Linked data source connection ID when this key is scoped to one data source."),deactivatedAt:c.string().datetime().nullable().describe("Timestamp when this public key was deactivated.")}),ml=mj.extend({projectId:c.string().uuid().nullable()}),wj=c.object({projectId:c.string().uuid().optional().describe("Project to list keys for. Auto-filled from CLI and SDK context when omitted."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of keys to return per page."),cursor:c.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),fj=c.object({publicKeys:c.array(pl),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),vj=c.object({secretKeys:c.array(ml),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),kj=c.object({projectId:c.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted."),keyId:c.string().uuid().describe("Key ID to fetch.")}),wl=c.object({publicKey:pl}),ek=c.object({secretKey:ml}),Ij=c.object({publicKey:pl.extend({value:c.string()})}),Pj=c.object({projectId:c.string().uuid().optional().describe("Project to ensure the log forwarding key for. Auto-filled from CLI and SDK context when omitted.")}),Sj=c.object({secretKey:ml.extend({value:c.string()})}),Oj=c.object({projectId:c.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted."),keyId:c.string().uuid().describe("Key ID to update."),name:c.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(Vv,"Name can only contain letters, numbers, spaces, hyphens, and underscores").optional().describe("New human-readable name for the key."),expiresAt:c.string().datetime().nullable().optional().describe("New expiration timestamp for the key, or null to clear it.")}),$j=c.object({params:c.object({keyId:c.string().uuid().describe("Public key ID to deactivate.")}),query:c.object({projectId:c.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted.")})}).transform(({params:e,query:t})=>({...t,...e})),Tj=wl,Aj=c.void(),Cj=c.object({limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of keys to return per page."),cursor:c.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),Lj=c.object({keyId:c.string().uuid().describe("Key ID to fetch.")}),Dj=c.object({projectId:c.string().uuid().optional().describe("Project to scope this key to. When set, the key can only access resources within this project. Omit for organization-wide access."),name:c.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(Vv,"Name can only contain letters, numbers, spaces, hyphens, and underscores").describe("Human-readable name for the key."),expiresAt:c.string().datetime().optional().describe("Optional expiration timestamp for the key.")}),zj=c.object({keyId:c.string().uuid().describe("Key ID to update."),name:c.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(Vv,"Name can only contain letters, numbers, spaces, hyphens, and underscores").optional().describe("New human-readable name for the key."),expiresAt:c.string().datetime().nullable().optional().describe("New expiration timestamp for the key, or null to clear it.")}),Nj=c.object({params:c.object({keyId:c.string().uuid().describe("Key ID to delete.")})}).transform(({params:e})=>({...e})),Ki=$({operationId:"publicKeys.list",description:"List public keys within one project.",backend:"api",route:{method:"GET",path:"/public-keys",tags:["Public Keys"]},input:wj,output:fj,pagination:"cursor",async:"sync",examples:[{name:"list-public-keys",input:{projectId:"11111111-1111-4111-8111-111111111111",limit:25},output:{publicKeys:[{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}],nextCursor:null}}]}),xi=$({operationId:"publicKeys.get",description:"Get one public key within one project.",backend:"api",route:{method:"GET",path:"/public-keys/{keyId}",tags:["Public Keys"]},input:kj,output:wl,pagination:"none",async:"sync",examples:[{name:"get-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111",keyId:"22222222-2222-4222-8222-222222222222"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Gi=$({operationId:"publicKeys.ensureLogForwarding",description:"Ensure a reusable project-scoped public key exists for CLI log forwarding.",backend:"api",route:{method:"POST",path:"/public-keys/log-forwarding/ensure",tags:["Public Keys"]},input:Pj,output:Ij,pagination:"none",async:"sync",examples:[{name:"ensure-log-forwarding-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"sazabi-cli-forward",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z",value:"sazabi_public_example"}}}]}),Mi=$({operationId:"publicKeys.update",description:"Update one public key within one project.",backend:"api",route:{method:"PATCH",path:"/public-keys/{keyId}",tags:["Public Keys"]},input:Oj,output:wl,pagination:"none",async:"sync",examples:[{name:"rename-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111",keyId:"22222222-2222-4222-8222-222222222222",name:"Updated CLI forwarder"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"Updated CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Bi=$({operationId:"publicKeys.deactivate",description:"Deactivate one public key within one project. Recently validated requests may continue to authenticate for a short period after deactivation.",backend:"api",route:{method:"POST",path:"/public-keys/{keyId}/deactivate",tags:["Public Keys"],inputStructure:"detailed"},input:$j,output:Tj,pagination:"none",async:"sync"}),fl=$({operationId:"secretKeys.list",description:"List secret keys within the organization.",backend:"api",route:{method:"GET",path:"/secret-keys",tags:["Secret Keys"]},input:Cj,output:vj,pagination:"cursor",async:"sync",examples:[{name:"list-secret-keys",input:{limit:25},output:{secretKeys:[{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}],nextCursor:null}}]}),vl=$({operationId:"secretKeys.get",description:"Get one secret key within the organization.",backend:"api",route:{method:"GET",path:"/secret-keys/{keyId}",tags:["Secret Keys"]},input:Lj,output:ek,pagination:"none",async:"sync",examples:[{name:"get-secret-key",input:{keyId:"33333333-3333-4333-8333-333333333333"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),kl=$({operationId:"secretKeys.create",description:"Create one secret key within the organization.",backend:"api",route:{method:"POST",path:"/secret-keys",successStatus:201,tags:["Secret Keys"]},input:Dj,output:Sj,pagination:"none",async:"sync",examples:[{name:"create-secret-key",input:{name:"CI agent"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z",value:"sazabi_secret_example"}}}]}),Il=$({operationId:"secretKeys.update",description:"Update one secret key within the organization.",backend:"api",route:{method:"PATCH",path:"/secret-keys/{keyId}",tags:["Secret Keys"]},input:zj,output:ek,pagination:"none",async:"sync",examples:[{name:"rename-secret-key",input:{keyId:"33333333-3333-4333-8333-333333333333",name:"Updated CI agent"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"Updated CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Pl=$({operationId:"secretKeys.delete",description:"Delete one secret key within the organization.",backend:"api",route:{method:"DELETE",path:"/secret-keys/{keyId}",successStatus:204,tags:["Secret Keys"],inputStructure:"detailed"},input:Nj,output:Aj,pagination:"none",async:"sync"}),i3={list:Ki.contract,get:xi.contract,ensureLogForwarding:Gi.contract,update:Mi.contract,deactivate:Bi.contract},r3={list:fl.contract,get:vl.contract,create:kl.contract,update:Il.contract,delete:Pl.contract}});var _j,jj,Rj,Uj,Ej,Kj,xj,Ha,Gj,Mj,Bj,nk,Jj,qj,Hj,Wj,Yj,Xj,Fj,Zj,Qj,Vj,a3,e1,t1,Ji,qi,Hi,Wi,Yi,Sl,c3;var ok=g(()=>{we();Ne();_j=c.enum(["eq","neq","in","contains","starts_with","gt","gte","lt","lte","between","exists"]).describe("Filter operator: 'eq' (equals), 'neq' (not equals), 'in' (in array), 'contains' (substring), 'starts_with' (prefix), 'gt' (greater than), 'gte' (greater than or equal), 'lt' (less than), 'lte' (less than or equal), 'between' (range), 'exists' (field exists)"),jj=c.enum(["any","all","phrase"]).describe("Search mode: 'any' (match any token), 'all' (match all tokens), 'phrase' (exact phrase match)"),Rj=c.object({query:c.string().min(1,"Search query must be at least 1 character").max(500,"Search query must be at most 500 characters").describe("Search query text (1-500 characters)"),fields:c.array(c.string()).optional().describe("Fields to search in (defaults to backend allowlist)"),mode:jj.optional().default("all").describe("Token matching mode")}),Uj=c.object({field:c.string().describe("Field name to filter on"),op:_j.describe("Filter operator"),value:c.union([c.string(),c.number(),c.boolean(),c.array(c.union([c.string(),c.number()])),c.object({from:c.string(),to:c.string()})]).describe("Filter value (type depends on operator)")}).superRefine((e,t)=>{if(e.op==="in"&&!Array.isArray(e.value))t.addIssue({code:c.ZodIssueCode.custom,message:"Value must be an array when op is 'in'",path:["value"]});if(e.op==="between"){let n=e.value;if(!(typeof n==="object"&&n!==null&&("from"in n)&&("to"in n)))t.addIssue({code:c.ZodIssueCode.custom,message:"Value must be an object with from/to when op is 'between'",path:["value"]})}if(e.op==="exists"&&typeof e.value!=="boolean")t.addIssue({code:c.ZodIssueCode.custom,message:"Value must be boolean when op is 'exists'",path:["value"]})}),Ej=c.object({field:c.string().describe("Field name to sort by"),direction:c.enum(["asc","desc"]).default("desc").describe("Sort direction: 'asc' for ascending, 'desc' for descending")}),Kj=c.object({limit:c.number().int().min(1,"Limit must be at least 1").max(1000,"Limit must be at most 1000").default(50).describe("Maximum number of rows to return"),cursor:c.string().optional().describe("Opaque cursor from previous response for pagination")}),xj=c.object({projectId:c.string().uuid().optional().describe("Project to query logs for. Auto-filled from CLI and SDK context when omitted."),search:Rj.optional().describe("Full-text search configuration"),filters:c.array(Uj).optional().describe("Structured filter clauses (ANDed together). When no `timestamp` filter is provided, queries default to a 24h look-back window; pass an explicit `timestamp` filter to query a different range."),select:c.array(c.string()).optional().describe("Fields to return (defaults to backend default set)"),sort:Ej.optional().describe("Sort configuration (defaults to timestamp desc)"),pagination:Kj.optional().describe("Pagination configuration")}),Ha=c.enum(["clickhouse","better-stack","datadog","gcp","axiom","cloudwatch","sentry","posthog","mezmo"]),Gj=c.enum(["native","external"]),Mj=c.object({projectId:c.string().uuid().optional().describe("Project to inspect. Auto-filled from CLI and SDK context when omitted.")}),Bj=c.object({backend:c.object({id:Ha,name:c.string(),kind:Gj}).describe("Active log backend for the project"),features:c.array(c.string()).describe("Backend features registered on the server"),commands:c.array(c.enum(["schema","query","volume","patterns","nativeQuery"])).describe("CLI/API commands available for this backend"),queryableFields:c.array(c.string()).describe("Fields accepted by the normalized logs.query contract"),searchableFields:c.array(c.string()).describe("Fields accepted by logs.query full-text search"),observedServiceNames:c.array(c.string()).describe("Recently observed service names for this project"),observedAttributeKeys:c.array(c.string()).describe("Recently observed log attribute keys for this project"),schemaContext:c.record(c.string(),c.any()).optional().describe("Backend-specific schema guidance and examples")}),nk=c.enum(["1m","5m","15m","1h"]),Jj=c.enum(["service_name","severity_text","environment"]),qj=c.object({projectId:c.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),startDate:c.string().datetime({offset:!0}),endDate:c.string().datetime({offset:!0}),interval:nk.optional().describe("Aggregation bucket size for the volume series"),groupBy:Jj.optional().describe("Optional field to split volume series by"),filters:c.object({service_name:c.string().optional(),severity_text:c.string().optional(),environment:c.string().optional()}).optional()}).refine((e)=>new Date(e.startDate)<new Date(e.endDate),{message:"startDate must be before endDate",path:["endDate"]}),Hj=c.object({total:c.number().nonnegative(),startDate:c.string().datetime({offset:!0}),endDate:c.string().datetime({offset:!0}),interval:nk,series:c.array(c.object({group:c.string(),total:c.number().nonnegative(),points:c.array(c.object({bucket:c.string(),count:c.number().nonnegative()}))}))}),Wj=c.object({projectId:c.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),query:c.string().min(1).max(500).optional().describe("Optional text to match against normalized log patterns"),severity:c.string().optional().describe("Optional severity_text value, for example ERROR"),startDate:c.string().datetime({offset:!0}).optional().describe("Optional earliest last-seen timestamp"),endDate:c.string().datetime({offset:!0}).optional().describe("Optional latest last-seen timestamp"),limit:c.number().int().min(1).max(100).default(25).describe("Maximum number of log patterns to return")}).refine((e)=>!e.startDate||!e.endDate||new Date(e.startDate)<new Date(e.endDate),{message:"startDate must be before endDate",path:["endDate"]}),Yj=c.object({serviceName:c.string().nullable(),fingerprint:c.string(),pattern:c.string(),severity:c.string().nullable(),occurrences:c.number().nonnegative(),firstSeen:c.string().nullable(),lastSeen:c.string().nullable(),representativeId:c.string().nullable()}),Xj=c.object({patterns:c.array(Yj),meta:c.object({backendId:Ha,count:c.number().int().nonnegative(),took:c.number().nonnegative()})}),Fj=c.object({projectId:c.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),query:c.string().min(1,"Query cannot be empty").max(1e4,"Query must be 10000 characters or less")}),Zj=c.object({result:c.string().describe("Backend-formatted query result"),format:c.literal("text"),meta:c.object({backendId:Ha,took:c.number().nonnegative(),truncated:c.boolean()})}),Qj=c.object({projectId:c.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),query:c.string().min(1,"Query must be at least 1 character long.").max(4000,"Query must be at most 4000 characters").describe("Natural-language logs question. Examples: 'api request failures in the last day', 'timeouts in intake', 'top ERROR patterns for public-api'.")}),Vj=c.object({answer:c.string().describe("Evidence-backed natural-language answer to the logs question"),steps:c.number().int().nonnegative().describe("Number of nested model steps used"),toolCalls:c.number().int().nonnegative().describe("Number of nested tool calls used"),compacted:c.boolean().describe("Whether nested messages were compacted during the search"),meta:c.object({backendId:Ha,took:c.number().nonnegative(),modelProvider:c.string().optional(),modelId:c.string().optional()})}),a3=c.object({cursor:c.string().nullable().describe("Cursor for next page (null if no more results)"),hasMore:c.boolean().describe("Whether more results are available")}),e1=c.object({count:c.number().int().nonnegative().describe("Number of log rows returned in this response"),took:c.number().nonnegative().describe("Query execution time in milliseconds")}),t1=c.object({data:c.array(c.record(c.string(),c.any())).describe("Array of log rows with selected fields"),nextCursor:c.string().nullable().describe("Pass as 'cursor' in the next query to fetch the next page. Null when there are no more results."),meta:e1.describe("Query execution metadata")}),Ji=$({operationId:"logs.query",description:"Query logs within one project.",backend:"api",route:{method:"POST",path:"/logs/query",tags:["Logs"]},input:xj,output:t1,pagination:"cursor",async:"sync"}),qi=$({operationId:"logs.schema",description:"Describe the active log backend, supported commands, query fields, and schema context.",backend:"api",route:{method:"POST",path:"/logs/schema",tags:["Logs"]},input:Mj,output:Bj,pagination:"none",async:"sync"}),Hi=$({operationId:"logs.volume",description:"Query pre-aggregated log volume for one project.",backend:"api",route:{method:"POST",path:"/logs/volume",tags:["Logs"]},input:qj,output:Hj,pagination:"none",async:"sync"}),Wi=$({operationId:"logs.patterns",description:"Query normalized log patterns for discovery workflows.",backend:"api",route:{method:"POST",path:"/logs/patterns",tags:["Logs"]},input:Wj,output:Xj,pagination:"none",async:"sync"}),Yi=$({operationId:"logs.nativeQuery",description:"Run a read-only query in the log store's native query language, with server-side guardrails.",backend:"api",route:{method:"POST",path:"/logs/native-query",tags:["Logs"]},input:Fj,output:Zj,pagination:"none",async:"sync"}),Sl=$({operationId:"logs.searchNatural",summary:"Natural Language Log Search",description:"Search project logs by asking a natural-language question. Experimental.",backend:"api",route:{method:"POST",path:"/logs/search-natural",tags:["Logs"]},input:Qj,output:Vj,pagination:"none",async:"sync"}),c3={query:Ji.contract,schema:qi.contract,volume:Hi.contract,patterns:Wi.contract,nativeQuery:Yi.contract,searchNatural:Sl.contract}});var n1=g(()=>{Hh()});var ik=g(()=>{n1()});var i1=()=>{};var rk,ak,Ol,s3,h3,Xi,$l,r1,a1,ck,c1,s1,l3,h1,sk,u3,g3,d3,y3,b3,p3,m3,w3,f3,v3,k3,I3,P3,hk,l1,u1,S3,lk;var Tl=g(()=>{we();rk=["streamable-http","sse"],ak=["none","headers","oauth","aws-sigv4"],Ol=["none","client_secret_basic","client_secret_post"],s3=["preset","custom"],h3=["configured","authorizing","connected","error"],Xi=["enabled","disabled","custom-only"],$l=["enabled","write_blocked","disabled"],r1=c.enum(rk),a1=c.enum(ak),ck=c.enum(Ol),c1=c.enum(s3),s1=c.enum(h3),l3=c.enum(Xi),h1=c.enum($l),sk=c.object({id:c.string().min(1),name:c.string().min(1),value:c.string().min(1)}),u3=c.object({id:c.string().min(1),name:c.string().min(1),maskedValue:c.string().min(1)}),g3=c.object({authMode:c.literal("none")}),d3=c.object({tokenUrl:c.string().url(),clientId:c.string().min(1),clientSecret:c.string().min(1).optional(),tokenEndpointAuthMethod:ck.optional(),refreshToken:c.string().min(1),headerName:c.string().min(1).default("Authorization"),headerValuePrefix:c.string().default("Bearer "),expiresAt:c.string().datetime().optional()}),y3=c.object({authMode:c.literal("headers"),headers:c.array(sk),refreshCredentials:d3.optional()}),b3=c.object({authMode:c.literal("aws-sigv4"),accessKeyId:c.string().min(1),secretAccessKey:c.string().min(1),sessionToken:c.string().min(1).optional(),region:c.string().min(1),service:c.string().min(1).default("aws-mcp")}),p3=c.preprocess((e)=>{if(typeof e!=="string")return;let t=e.trim();return t.length>0?t:void 0},c.string().min(1).optional()).optional(),m3=c.object({accessToken:c.string().min(1),refreshToken:c.string().min(1).optional(),tokenType:c.string().min(1).optional(),scope:p3,expiresAt:c.string().datetime().optional()}).transform(({scope:e,...t})=>{return e===void 0?t:{...t,scope:e}}),w3=c.object({authMode:c.literal("oauth"),providerId:c.string().min(1),tokens:m3,headers:c.array(sk).optional()}),f3=c.discriminatedUnion("authMode",[g3,y3,w3,b3]),v3=c.string().min(1).regex(/^enc:v1:/,"Encrypted auth config must use enc:v1 format."),k3=c.object({codeVerifier:c.string().min(1),clientId:c.string().min(1),clientSecret:c.string().min(1).optional(),tokenEndpointAuthMethod:ck.optional(),tokenUrl:c.string().url().optional(),resourceUrl:c.string().url().optional(),projectId:c.string().uuid().optional(),returnTo:c.string().min(1).max(2000).optional(),messageId:c.string().min(1).max(240).optional(),scopes:c.array(c.string().min(1)).optional()}),I3=c.object({type:c.string().optional(),properties:c.record(c.string(),c.unknown()).optional(),required:c.array(c.string()).optional(),additionalProperties:c.boolean().optional()}).catchall(c.unknown()),P3=c.object({supportsOAuth:c.boolean().default(!1),supportsCustomHeaders:c.boolean().default(!0),supportsToolDiscovery:c.boolean().default(!0),readOnlyToolNames:c.array(c.string()).default([])}),hk=c.object({name:c.string().min(1),title:c.string().min(1),description:c.string().min(1),inputSchema:I3,annotations:c.record(c.string(),c.unknown()).default({}),availability:h1,isReadOnly:c.boolean()}),l1=c.object({discoveredAt:c.string().datetime(),tools:c.array(hk)}),u1=c.object({mode:c.enum(["user","system"]),managedBy:c.object({type:c.literal("integration"),id:c.string().min(1),displayName:c.string().min(1),iconKey:c.string().min(1)}).nullable(),capabilities:c.object({canRename:c.boolean(),canEditCredentials:c.boolean(),canSetReadOnly:c.boolean(),canConfigureTools:c.boolean(),canDisconnect:c.boolean()})}),S3=c.object({id:c.string().uuid(),organizationId:c.string().min(1),projectId:c.string().uuid(),providerId:c.string().min(1),source:c1,displayName:c.string().min(1),connectionKey:c.string().min(1),serverUrl:c.string().url(),transport:r1,authMode:a1,installStatus:s1,installedByUserId:c.string().nullable(),connectedAt:c.string().datetime().nullable(),toolSnapshot:l1.nullable(),enabledToolNames:c.array(c.string()),readOnly:c.boolean().default(!1),version:c.number().int().nonnegative(),createdAt:c.string().datetime(),updatedAt:c.string().datetime(),deletedAt:c.string().datetime().nullable()}),lk=u1});var gk=K((SLe,Ll)=>{var g1,d1,y1,b1,p1,m1,w1,f1,v1,k1,I1,P1,S1,Al,uk,O1,$1,T1,Fi,A1,C1,L1,D1,z1,N1,_1,j1,R1,Cl,U1,E1,K1;(function(e){var t=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(i){e(n(t,n(i)))});else if(typeof Ll==="object"&&typeof SLe==="object")e(n(t,n(SLe)));else e(n(t));function n(i,o){if(i!==t)if(typeof Object.create==="function")Object.defineProperty(i,"__esModule",{value:!0});else i.__esModule=!0;return function(r,a){return i[r]=o?o(r,a):a}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var s in a)if(Object.prototype.hasOwnProperty.call(a,s))r[s]=a[s]};g1=function(r,a){if(typeof a!=="function"&&a!==null)throw TypeError("Class extends value "+String(a)+" is not a constructor or null");t(r,a);function s(){this.constructor=r}r.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)},d1=Object.assign||function(r){for(var a,s=1,h=arguments.length;s<h;s++){a=arguments[s];for(var l in a)if(Object.prototype.hasOwnProperty.call(a,l))r[l]=a[l]}return r},y1=function(r,a){var s={};for(var h in r)if(Object.prototype.hasOwnProperty.call(r,h)&&a.indexOf(h)<0)s[h]=r[h];if(r!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var l=0,h=Object.getOwnPropertySymbols(r);l<h.length;l++)if(a.indexOf(h[l])<0&&Object.prototype.propertyIsEnumerable.call(r,h[l]))s[h[l]]=r[h[l]]}return s},b1=function(r,a,s,h){var l=arguments.length,u=l<3?a:h===null?h=Object.getOwnPropertyDescriptor(a,s):h,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")u=Reflect.decorate(r,a,s,h);else for(var y=r.length-1;y>=0;y--)if(d=r[y])u=(l<3?d(u):l>3?d(a,s,u):d(a,s))||u;return l>3&&u&&Object.defineProperty(a,s,u),u},p1=function(r,a){return function(s,h){a(s,h,r)}},m1=function(r,a,s,h,l,u){function d(me){if(me!==void 0&&typeof me!=="function")throw TypeError("Function expected");return me}var y=h.kind,b=y==="getter"?"get":y==="setter"?"set":"value",w=!a&&r?h.static?r:r.prototype:null,f=a||(w?Object.getOwnPropertyDescriptor(w,h.name):{}),P,A=!1;for(var N=s.length-1;N>=0;N--){var U={};for(var X in h)U[X]=X==="access"?{}:h[X];for(var X in h.access)U.access[X]=h.access[X];U.addInitializer=function(me){if(A)throw TypeError("Cannot add initializers after decoration has completed");u.push(d(me||null))};var B=(0,s[N])(y==="accessor"?{get:f.get,set:f.set}:f[b],U);if(y==="accessor"){if(B===void 0)continue;if(B===null||typeof B!=="object")throw TypeError("Object expected");if(P=d(B.get))f.get=P;if(P=d(B.set))f.set=P;if(P=d(B.init))l.unshift(P)}else if(P=d(B))if(y==="field")l.unshift(P);else f[b]=P}if(w)Object.defineProperty(w,h.name,f);A=!0},w1=function(r,a,s){var h=arguments.length>2;for(var l=0;l<a.length;l++)s=h?a[l].call(r,s):a[l].call(r);return h?s:void 0},f1=function(r){return typeof r==="symbol"?r:"".concat(r)},v1=function(r,a,s){if(typeof a==="symbol")a=a.description?"[".concat(a.description,"]"):"";return Object.defineProperty(r,"name",{configurable:!0,value:s?"".concat(s," ",a):a})},k1=function(r,a){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(r,a)},I1=function(r,a,s,h){function l(u){return u instanceof s?u:new s(function(d){d(u)})}return new(s||(s=Promise))(function(u,d){function y(f){try{w(h.next(f))}catch(P){d(P)}}function b(f){try{w(h.throw(f))}catch(P){d(P)}}function w(f){f.done?u(f.value):l(f.value).then(y,b)}w((h=h.apply(r,a||[])).next())})},P1=function(r,a){var s={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},h,l,u,d=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return d.next=y(0),d.throw=y(1),d.return=y(2),typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function y(w){return function(f){return b([w,f])}}function b(w){if(h)throw TypeError("Generator is already executing.");while(d&&(d=0,w[0]&&(s=0)),s)try{if(h=1,l&&(u=w[0]&2?l.return:w[0]?l.throw||((u=l.return)&&u.call(l),0):l.next)&&!(u=u.call(l,w[1])).done)return u;if(l=0,u)w=[w[0]&2,u.value];switch(w[0]){case 0:case 1:u=w;break;case 4:return s.label++,{value:w[1],done:!1};case 5:s.label++,l=w[1],w=[0];continue;case 7:w=s.ops.pop(),s.trys.pop();continue;default:if((u=s.trys,!(u=u.length>0&&u[u.length-1]))&&(w[0]===6||w[0]===2)){s=0;continue}if(w[0]===3&&(!u||w[1]>u[0]&&w[1]<u[3])){s.label=w[1];break}if(w[0]===6&&s.label<u[1]){s.label=u[1],u=w;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(w);break}if(u[2])s.ops.pop();s.trys.pop();continue}w=a.call(r,s)}catch(f){w=[6,f],l=0}finally{h=u=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}},S1=function(r,a){for(var s in r)if(s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s))Cl(a,r,s)},Cl=Object.create?function(r,a,s,h){if(h===void 0)h=s;var l=Object.getOwnPropertyDescriptor(a,s);if(!l||("get"in l?!a.__esModule:l.writable||l.configurable))l={enumerable:!0,get:function(){return a[s]}};Object.defineProperty(r,h,l)}:function(r,a,s,h){if(h===void 0)h=s;r[h]=a[s]},Al=function(r){var a=typeof Symbol==="function"&&Symbol.iterator,s=a&&r[a],h=0;if(s)return s.call(r);if(r&&typeof r.length==="number")return{next:function(){if(r&&h>=r.length)r=void 0;return{value:r&&r[h++],done:!r}}};throw TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},uk=function(r,a){var s=typeof Symbol==="function"&&r[Symbol.iterator];if(!s)return r;var h=s.call(r),l,u=[],d;try{while((a===void 0||a-- >0)&&!(l=h.next()).done)u.push(l.value)}catch(y){d={error:y}}finally{try{if(l&&!l.done&&(s=h.return))s.call(h)}finally{if(d)throw d.error}}return u},O1=function(){for(var r=[],a=0;a<arguments.length;a++)r=r.concat(uk(arguments[a]));return r},$1=function(){for(var r=0,a=0,s=arguments.length;a<s;a++)r+=arguments[a].length;for(var h=Array(r),l=0,a=0;a<s;a++)for(var u=arguments[a],d=0,y=u.length;d<y;d++,l++)h[l]=u[d];return h},T1=function(r,a,s){if(s||arguments.length===2){for(var h=0,l=a.length,u;h<l;h++)if(u||!(h in a)){if(!u)u=Array.prototype.slice.call(a,0,h);u[h]=a[h]}}return r.concat(u||Array.prototype.slice.call(a))},Fi=function(r){return this instanceof Fi?(this.v=r,this):new Fi(r)},A1=function(r,a,s){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var h=s.apply(r,a||[]),l,u=[];return l=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),y("next"),y("throw"),y("return",d),l[Symbol.asyncIterator]=function(){return this},l;function d(N){return function(U){return Promise.resolve(U).then(N,P)}}function y(N,U){if(h[N]){if(l[N]=function(X){return new Promise(function(B,me){u.push([N,X,B,me])>1||b(N,X)})},U)l[N]=U(l[N])}}function b(N,U){try{w(h[N](U))}catch(X){A(u[0][3],X)}}function w(N){N.value instanceof Fi?Promise.resolve(N.value.v).then(f,P):A(u[0][2],N)}function f(N){b("next",N)}function P(N){b("throw",N)}function A(N,U){if(N(U),u.shift(),u.length)b(u[0][0],u[0][1])}},C1=function(r){var a,s;return a={},h("next"),h("throw",function(l){throw l}),h("return"),a[Symbol.iterator]=function(){return this},a;function h(l,u){a[l]=r[l]?function(d){return(s=!s)?{value:Fi(r[l](d)),done:!1}:u?u(d):d}:u}},L1=function(r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var a=r[Symbol.asyncIterator],s;return a?a.call(r):(r=typeof Al==="function"?Al(r):r[Symbol.iterator](),s={},h("next"),h("throw"),h("return"),s[Symbol.asyncIterator]=function(){return this},s);function h(u){s[u]=r[u]&&function(d){return new Promise(function(y,b){d=r[u](d),l(y,b,d.done,d.value)})}}function l(u,d,y,b){Promise.resolve(b).then(function(w){u({value:w,done:y})},d)}},D1=function(r,a){if(Object.defineProperty)Object.defineProperty(r,"raw",{value:a});else r.raw=a;return r};var n=Object.create?function(r,a){Object.defineProperty(r,"default",{enumerable:!0,value:a})}:function(r,a){r.default=a},i=function(r){return i=Object.getOwnPropertyNames||function(a){var s=[];for(var h in a)if(Object.prototype.hasOwnProperty.call(a,h))s[s.length]=h;return s},i(r)};z1=function(r){if(r&&r.__esModule)return r;var a={};if(r!=null){for(var s=i(r),h=0;h<s.length;h++)if(s[h]!=="default")Cl(a,r,s[h])}return n(a,r),a},N1=function(r){return r&&r.__esModule?r:{default:r}},_1=function(r,a,s,h){if(s==="a"&&!h)throw TypeError("Private accessor was defined without a getter");if(typeof a==="function"?r!==a||!h:!a.has(r))throw TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?h:s==="a"?h.call(r):h?h.value:a.get(r)},j1=function(r,a,s,h,l){if(h==="m")throw TypeError("Private method is not writable");if(h==="a"&&!l)throw TypeError("Private accessor was defined without a setter");if(typeof a==="function"?r!==a||!l:!a.has(r))throw TypeError("Cannot write private member to an object whose class did not declare it");return h==="a"?l.call(r,s):l?l.value=s:a.set(r,s),s},R1=function(r,a){if(a===null||typeof a!=="object"&&typeof a!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof r==="function"?a===r:r.has(a)},U1=function(r,a,s){if(a!==null&&a!==void 0){if(typeof a!=="object"&&typeof a!=="function")throw TypeError("Object expected.");var h,l;if(s){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");h=a[Symbol.asyncDispose]}if(h===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(h=a[Symbol.dispose],s)l=h}if(typeof h!=="function")throw TypeError("Object not disposable.");if(l)h=function(){try{l.call(this)}catch(u){return Promise.reject(u)}};r.stack.push({value:a,dispose:h,async:s})}else if(s)r.stack.push({async:!0});return a};var o=typeof SuppressedError==="function"?SuppressedError:function(r,a,s){var h=Error(s);return h.name="SuppressedError",h.error=r,h.suppressed=a,h};E1=function(r){function a(u){r.error=r.hasError?new o(u,r.error,"An error was suppressed during disposal."):u,r.hasError=!0}var s,h=0;function l(){while(s=r.stack.pop())try{if(!s.async&&h===1)return h=0,r.stack.push(s),Promise.resolve().then(l);if(s.dispose){var u=s.dispose.call(s.value);if(s.async)return h|=2,Promise.resolve(u).then(l,function(d){return a(d),l()})}else h|=1}catch(d){a(d)}if(h===1)return r.hasError?Promise.reject(r.error):Promise.resolve();if(r.hasError)throw r.error}return l()},K1=function(r,a){if(typeof r==="string"&&/^\.\.?\//.test(r))return r.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(s,h,l,u,d){return h?a?".jsx":".js":l&&(!u||!d)?s:l+u+"."+d.toLowerCase()+"js"});return r},e("__extends",g1),e("__assign",d1),e("__rest",y1),e("__decorate",b1),e("__param",p1),e("__esDecorate",m1),e("__runInitializers",w1),e("__propKey",f1),e("__setFunctionName",v1),e("__metadata",k1),e("__awaiter",I1),e("__generator",P1),e("__exportStar",S1),e("__createBinding",Cl),e("__values",Al),e("__read",uk),e("__spread",O1),e("__spreadArrays",$1),e("__spreadArray",T1),e("__await",Fi),e("__asyncGenerator",A1),e("__asyncDelegator",C1),e("__asyncValues",L1),e("__makeTemplateObject",D1),e("__importStar",z1),e("__importDefault",N1),e("__classPrivateFieldGet",_1),e("__classPrivateFieldSet",j1),e("__classPrivateFieldIn",R1),e("__addDisposableResource",U1),e("__disposeResources",E1),e("__rewriteRelativeImportExtension",K1)})});var dk=K((x1)=>{Object.defineProperty(x1,"__esModule",{value:!0});x1.MAX_HASHABLE_LENGTH=x1.INIT=x1.KEY=x1.DIGEST_LENGTH=x1.BLOCK_SIZE=void 0;x1.BLOCK_SIZE=64;x1.DIGEST_LENGTH=32;x1.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);x1.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];x1.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1});var J1=K((M1)=>{Object.defineProperty(M1,"__esModule",{value:!0});M1.RawSha256=void 0;var Bt=dk(),C3=function(){function e(){this.state=Int32Array.from(Bt.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw Error("Attempted to update an already finished hash.");var n=0,i=t.byteLength;if(this.bytesHashed+=i,this.bytesHashed*8>Bt.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");while(i>0)if(this.buffer[this.bufferLength++]=t[n++],i--,this.bufferLength===Bt.BLOCK_SIZE)this.hashBuffer(),this.bufferLength=0},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),i=this.bufferLength;if(n.setUint8(this.bufferLength++,128),i%Bt.BLOCK_SIZE>=Bt.BLOCK_SIZE-8){for(var o=this.bufferLength;o<Bt.BLOCK_SIZE;o++)n.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(var o=this.bufferLength;o<Bt.BLOCK_SIZE-8;o++)n.setUint8(o,0);n.setUint32(Bt.BLOCK_SIZE-8,Math.floor(t/4294967296),!0),n.setUint32(Bt.BLOCK_SIZE-4,t),this.hashBuffer(),this.finished=!0}var r=new Uint8Array(Bt.DIGEST_LENGTH);for(var o=0;o<8;o++)r[o*4]=this.state[o]>>>24&255,r[o*4+1]=this.state[o]>>>16&255,r[o*4+2]=this.state[o]>>>8&255,r[o*4+3]=this.state[o]>>>0&255;return r},e.prototype.hashBuffer=function(){var t=this,n=t.buffer,i=t.state,o=i[0],r=i[1],a=i[2],s=i[3],h=i[4],l=i[5],u=i[6],d=i[7];for(var y=0;y<Bt.BLOCK_SIZE;y++){if(y<16)this.temp[y]=(n[y*4]&255)<<24|(n[y*4+1]&255)<<16|(n[y*4+2]&255)<<8|n[y*4+3]&255;else{var b=this.temp[y-2],w=(b>>>17|b<<15)^(b>>>19|b<<13)^b>>>10;b=this.temp[y-15];var f=(b>>>7|b<<25)^(b>>>18|b<<14)^b>>>3;this.temp[y]=(w+this.temp[y-7]|0)+(f+this.temp[y-16]|0)}var P=(((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&l^~h&u)|0)+(d+(Bt.KEY[y]+this.temp[y]|0)|0)|0,A=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&r^o&a^r&a)|0;d=u,u=l,l=h,h=s+P|0,s=a,a=r,r=o,o=P+A|0}i[0]+=o,i[1]+=r,i[2]+=a,i[3]+=s,i[4]+=h,i[5]+=l,i[6]+=u,i[7]+=d},e}();M1.RawSha256=C3});var W1=K((TLe,H1)=>{var{defineProperty:Dl,getOwnPropertyDescriptor:L3,getOwnPropertyNames:D3}=Object,z3=Object.prototype.hasOwnProperty,N3=(e,t)=>Dl(e,"name",{value:t,configurable:!0}),_3=(e,t)=>{for(var n in t)Dl(e,n,{get:t[n],enumerable:!0})},j3=(e,t,n,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of D3(t))if(!z3.call(e,o)&&o!==n)Dl(e,o,{get:()=>t[o],enumerable:!(i=L3(t,o))||i.enumerable})}return e},R3=(e)=>j3(Dl({},"__esModule",{value:!0}),e),q1={};_3(q1,{isArrayBuffer:()=>U3});H1.exports=R3(q1);var U3=N3((e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]","isArrayBuffer")});var Z1=K((ALe,F1)=>{var{defineProperty:zl,getOwnPropertyDescriptor:E3,getOwnPropertyNames:K3}=Object,x3=Object.prototype.hasOwnProperty,Y1=(e,t)=>zl(e,"name",{value:t,configurable:!0}),G3=(e,t)=>{for(var n in t)zl(e,n,{get:t[n],enumerable:!0})},M3=(e,t,n,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of K3(t))if(!x3.call(e,o)&&o!==n)zl(e,o,{get:()=>t[o],enumerable:!(i=E3(t,o))||i.enumerable})}return e},B3=(e)=>M3(zl({},"__esModule",{value:!0}),e),X1={};G3(X1,{fromArrayBuffer:()=>q3,fromString:()=>H3});F1.exports=B3(X1);var J3=W1(),yk=dO("buffer"),q3=Y1((e,t=0,n=e.byteLength-t)=>{if(!(0,J3.isArrayBuffer)(e))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return yk.Buffer.from(e,t,n)},"fromArrayBuffer"),H3=Y1((e,t)=>{if(typeof e!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?yk.Buffer.from(e,t):yk.Buffer.from(e)},"fromString")});var n4=K((CLe,t4)=>{var{defineProperty:Nl,getOwnPropertyDescriptor:W3,getOwnPropertyNames:Y3}=Object,X3=Object.prototype.hasOwnProperty,bk=(e,t)=>Nl(e,"name",{value:t,configurable:!0}),F3=(e,t)=>{for(var n in t)Nl(e,n,{get:t[n],enumerable:!0})},Z3=(e,t,n,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of Y3(t))if(!X3.call(e,o)&&o!==n)Nl(e,o,{get:()=>t[o],enumerable:!(i=W3(t,o))||i.enumerable})}return e},Q3=(e)=>Z3(Nl({},"__esModule",{value:!0}),e),Q1={};F3(Q1,{fromUtf8:()=>e4,toUint8Array:()=>V3,toUtf8:()=>e5});t4.exports=Q3(Q1);var V1=Z1(),e4=bk((e)=>{let t=(0,V1.fromString)(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),V3=bk((e)=>{if(typeof e==="string")return e4(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)},"toUint8Array"),e5=bk((e)=>{if(typeof e==="string")return e;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return(0,V1.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength).toString("utf8")},"toUtf8")});var r4=K((o4)=>{Object.defineProperty(o4,"__esModule",{value:!0});o4.convertToBuffer=void 0;var t5=n4(),n5=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:t5.fromUtf8;function o5(e){if(e instanceof Uint8Array)return e;if(typeof e==="string")return n5(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)}o4.convertToBuffer=o5});var s4=K((a4)=>{Object.defineProperty(a4,"__esModule",{value:!0});a4.isEmptyData=void 0;function i5(e){if(typeof e==="string")return e.length===0;return e.byteLength===0}a4.isEmptyData=i5});var u4=K((h4)=>{Object.defineProperty(h4,"__esModule",{value:!0});h4.numToUint8=void 0;function r5(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}h4.numToUint8=r5});var y4=K((g4)=>{Object.defineProperty(g4,"__esModule",{value:!0});g4.uint32ArrayFrom=void 0;function a5(e){if(!Uint32Array.from){var t=new Uint32Array(e.length),n=0;while(n<e.length)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}g4.uint32ArrayFrom=a5});var b4=K((Zi)=>{Object.defineProperty(Zi,"__esModule",{value:!0});Zi.uint32ArrayFrom=Zi.numToUint8=Zi.isEmptyData=Zi.convertToBuffer=void 0;var c5=r4();Object.defineProperty(Zi,"convertToBuffer",{enumerable:!0,get:function(){return c5.convertToBuffer}});var s5=s4();Object.defineProperty(Zi,"isEmptyData",{enumerable:!0,get:function(){return s5.isEmptyData}});var h5=u4();Object.defineProperty(Zi,"numToUint8",{enumerable:!0,get:function(){return h5.numToUint8}});var l5=y4();Object.defineProperty(Zi,"uint32ArrayFrom",{enumerable:!0,get:function(){return l5.uint32ArrayFrom}})});var f4=K((m4)=>{Object.defineProperty(m4,"__esModule",{value:!0});m4.Sha256=void 0;var p4=gk(),jl=dk(),_l=J1(),pk=b4(),g5=function(){function e(t){this.secret=t,this.hash=new _l.RawSha256,this.reset()}return e.prototype.update=function(t){if((0,pk.isEmptyData)(t)||this.error)return;try{this.hash.update((0,pk.convertToBuffer)(t))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;if(this.outer){if(!this.outer.finished)this.outer.update(this.hash.digest());return this.outer.digest()}return this.hash.digest()},e.prototype.digest=function(){return p4.__awaiter(this,void 0,void 0,function(){return p4.__generator(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new _l.RawSha256,this.secret){this.outer=new _l.RawSha256;var t=d5(this.secret),n=new Uint8Array(jl.BLOCK_SIZE);n.set(t);for(var i=0;i<jl.BLOCK_SIZE;i++)t[i]^=54,n[i]^=92;this.hash.update(t),this.outer.update(n);for(var i=0;i<t.byteLength;i++)t[i]=0}},e}();m4.Sha256=g5;function d5(e){var t=(0,pk.convertToBuffer)(e);if(t.byteLength>jl.BLOCK_SIZE){var n=new _l.RawSha256;n.update(t),t=n.digest()}var i=new Uint8Array(jl.BLOCK_SIZE);return i.set(t),i}});var v4=K((mk)=>{Object.defineProperty(mk,"__esModule",{value:!0});var y5=gk();y5.__exportStar(f4(),mk)});var Rl=()=>{};var k4="io.modelcontextprotocol/related-task",El="2.0",Je,I4,P4,GLe,b5,p5,wk,Dt,Kl,Ve,Jt,qt,et,xl,m5,w5,S4,Wa,O4,$4,MLe,fk,f5,vk,v5,Ya,Qi,T4,k5,I5,P5,S5,O5,$5,T5,A5,A4,C5,kk,L5,D5,Ik,z5,Xa,Fa,N5,Za,Gl,_5,Pk,Sk,Ok,$k,BLe,Tk,Ak,Ck,j5,C4,L4,Lk,D4,Qa,Vi,z4,R5,U5,N4,E5,_4,Dk,K5,x5,j4,R4,G5,M5,B5,J5,q5,H5,W5,Y5,X5,U4,F5,Z5,zk,Nk,_k,Q5,V5,e8,jk,t8,E4,K4,n8,o8,x4,i8,G4,Ml,JLe,r8,a8,M4,c8,B4,s8,h8,l8,u8,g8,d8,y8,b8,p8,Ul,m8,w8,J4,q4,H4,f8,v8,k8,I8,P8,S8,O8,$8,T8,A8,C8,L8,D8,z8,N8,W4,_8,j8,Y4,R8,U8,E8,K8,X4,x8,G8,M8,B8,qLe,HLe,WLe,YLe,XLe,FLe;var Eo=g(()=>{ik();Je=qh((e)=>e!==null&&(typeof e==="object"||typeof e==="function")),I4=Le([v(),be().int()]),P4=v(),GLe=xe({ttl:be().optional(),pollInterval:be().optional()}),b5=q({ttl:be().optional()}),p5=q({taskId:v()}),wk=xe({progressToken:I4.optional(),[k4]:p5.optional()}),Dt=q({_meta:wk.optional()}),Kl=Dt.extend({task:b5.optional()}),Ve=q({method:v(),params:Dt.loose().optional()}),Jt=q({_meta:wk.optional()}),qt=q({method:v(),params:Jt.loose().optional()}),et=xe({_meta:wk.optional()}),xl=Le([v(),be().int()]),m5=q({jsonrpc:F(El),id:xl,...Ve.shape}).strict(),w5=q({jsonrpc:F(El),...qt.shape}).strict(),S4=q({jsonrpc:F(El),id:xl,result:et}).strict();(function(e){e[e.ConnectionClosed=-32000]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(Wa||(Wa={}));O4=q({jsonrpc:F(El),id:xl.optional(),error:q({code:be().int(),message:v(),data:Ce().optional()})}).strict(),$4=Le([m5,w5,S4,O4]),MLe=Le([S4,O4]),fk=et.strict(),f5=Jt.extend({requestId:xl.optional(),reason:v().optional()}),vk=qt.extend({method:F("notifications/cancelled"),params:f5}),v5=q({src:v(),mimeType:v().optional(),sizes:x(v()).optional(),theme:Qe(["light","dark"]).optional()}),Ya=q({icons:x(v5).optional()}),Qi=q({name:v(),title:v().optional()}),T4=Qi.extend({...Qi.shape,...Ya.shape,version:v(),websiteUrl:v().optional(),description:v().optional()}),k5=_i(q({applyDefaults:Se().optional()}),$e(v(),Ce())),I5=Ma((e)=>{if(e&&typeof e==="object"&&!Array.isArray(e)){if(Object.keys(e).length===0)return{form:{}}}return e},_i(q({form:k5.optional(),url:Je.optional()}),$e(v(),Ce()).optional())),P5=xe({list:Je.optional(),cancel:Je.optional(),requests:xe({sampling:xe({createMessage:Je.optional()}).optional(),elicitation:xe({create:Je.optional()}).optional()}).optional()}),S5=xe({list:Je.optional(),cancel:Je.optional(),requests:xe({tools:xe({call:Je.optional()}).optional()}).optional()}),O5=q({experimental:$e(v(),Je).optional(),sampling:q({context:Je.optional(),tools:Je.optional()}).optional(),elicitation:I5.optional(),roots:q({listChanged:Se().optional()}).optional(),tasks:P5.optional(),extensions:$e(v(),Je).optional()}),$5=Dt.extend({protocolVersion:v(),capabilities:O5,clientInfo:T4}),T5=Ve.extend({method:F("initialize"),params:$5}),A5=q({experimental:$e(v(),Je).optional(),logging:Je.optional(),completions:Je.optional(),prompts:q({listChanged:Se().optional()}).optional(),resources:q({subscribe:Se().optional(),listChanged:Se().optional()}).optional(),tools:q({listChanged:Se().optional()}).optional(),tasks:S5.optional(),extensions:$e(v(),Je).optional()}),A4=et.extend({protocolVersion:v(),capabilities:A5,serverInfo:T4,instructions:v().optional()}),C5=qt.extend({method:F("notifications/initialized"),params:Jt.optional()}),kk=Ve.extend({method:F("ping"),params:Dt.optional()}),L5=q({progress:be(),total:ze(be()),message:ze(v())}),D5=q({...Jt.shape,...L5.shape,progressToken:I4}),Ik=qt.extend({method:F("notifications/progress"),params:D5}),z5=Dt.extend({cursor:P4.optional()}),Xa=Ve.extend({params:z5.optional()}),Fa=et.extend({nextCursor:P4.optional()}),N5=Qe(["working","input_required","completed","failed","cancelled"]),Za=q({taskId:v(),status:N5,ttl:Le([be(),ja()]),createdAt:v(),lastUpdatedAt:v(),pollInterval:ze(be()),statusMessage:ze(v())}),Gl=et.extend({task:Za}),_5=Jt.merge(Za),Pk=qt.extend({method:F("notifications/tasks/status"),params:_5}),Sk=Ve.extend({method:F("tasks/get"),params:Dt.extend({taskId:v()})}),Ok=et.merge(Za),$k=Ve.extend({method:F("tasks/result"),params:Dt.extend({taskId:v()})}),BLe=et.loose(),Tk=Xa.extend({method:F("tasks/list")}),Ak=Fa.extend({tasks:x(Za)}),Ck=Ve.extend({method:F("tasks/cancel"),params:Dt.extend({taskId:v()})}),j5=et.merge(Za),C4=q({uri:v(),mimeType:ze(v()),_meta:$e(v(),Ce()).optional()}),L4=C4.extend({text:v()}),Lk=v().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),D4=C4.extend({blob:Lk}),Qa=Qe(["user","assistant"]),Vi=q({audience:x(Qa).optional(),priority:be().min(0).max(1).optional(),lastModified:co.datetime({offset:!0}).optional()}),z4=q({...Qi.shape,...Ya.shape,uri:v(),description:ze(v()),mimeType:ze(v()),size:ze(be()),annotations:Vi.optional(),_meta:ze(xe({}))}),R5=q({...Qi.shape,...Ya.shape,uriTemplate:v(),description:ze(v()),mimeType:ze(v()),annotations:Vi.optional(),_meta:ze(xe({}))}),U5=Xa.extend({method:F("resources/list")}),N4=Fa.extend({resources:x(z4)}),E5=Xa.extend({method:F("resources/templates/list")}),_4=Fa.extend({resourceTemplates:x(R5)}),Dk=Dt.extend({uri:v()}),K5=Dk,x5=Ve.extend({method:F("resources/read"),params:K5}),j4=et.extend({contents:x(Le([L4,D4]))}),R4=qt.extend({method:F("notifications/resources/list_changed"),params:Jt.optional()}),G5=Dk,M5=Ve.extend({method:F("resources/subscribe"),params:G5}),B5=Dk,J5=Ve.extend({method:F("resources/unsubscribe"),params:B5}),q5=Jt.extend({uri:v()}),H5=qt.extend({method:F("notifications/resources/updated"),params:q5}),W5=q({name:v(),description:ze(v()),required:ze(Se())}),Y5=q({...Qi.shape,...Ya.shape,description:ze(v()),arguments:ze(x(W5)),_meta:ze(xe({}))}),X5=Xa.extend({method:F("prompts/list")}),U4=Fa.extend({prompts:x(Y5)}),F5=Dt.extend({name:v(),arguments:$e(v(),v()).optional()}),Z5=Ve.extend({method:F("prompts/get"),params:F5}),zk=q({type:F("text"),text:v(),annotations:Vi.optional(),_meta:$e(v(),Ce()).optional()}),Nk=q({type:F("image"),data:Lk,mimeType:v(),annotations:Vi.optional(),_meta:$e(v(),Ce()).optional()}),_k=q({type:F("audio"),data:Lk,mimeType:v(),annotations:Vi.optional(),_meta:$e(v(),Ce()).optional()}),Q5=q({type:F("tool_use"),name:v(),id:v(),input:$e(v(),Ce()),_meta:$e(v(),Ce()).optional()}),V5=q({type:F("resource"),resource:Le([L4,D4]),annotations:Vi.optional(),_meta:$e(v(),Ce()).optional()}),e8=z4.extend({type:F("resource_link")}),jk=Le([zk,Nk,_k,e8,V5]),t8=q({role:Qa,content:jk}),E4=et.extend({description:v().optional(),messages:x(t8)}),K4=qt.extend({method:F("notifications/prompts/list_changed"),params:Jt.optional()}),n8=q({title:v().optional(),readOnlyHint:Se().optional(),destructiveHint:Se().optional(),idempotentHint:Se().optional(),openWorldHint:Se().optional()}),o8=q({taskSupport:Qe(["required","optional","forbidden"]).optional()}),x4=q({...Qi.shape,...Ya.shape,description:v().optional(),inputSchema:q({type:F("object"),properties:$e(v(),Je).optional(),required:x(v()).optional()}).catchall(Ce()),outputSchema:q({type:F("object"),properties:$e(v(),Je).optional(),required:x(v()).optional()}).catchall(Ce()).optional(),annotations:n8.optional(),execution:o8.optional(),_meta:$e(v(),Ce()).optional()}),i8=Xa.extend({method:F("tools/list")}),G4=Fa.extend({tools:x(x4)}),Ml=et.extend({content:x(jk).default([]),structuredContent:$e(v(),Ce()).optional(),isError:Se().optional()}),JLe=Ml.or(et.extend({toolResult:Ce()})),r8=Kl.extend({name:v(),arguments:$e(v(),Ce()).optional()}),a8=Ve.extend({method:F("tools/call"),params:r8}),M4=qt.extend({method:F("notifications/tools/list_changed"),params:Jt.optional()}),c8=q({autoRefresh:Se().default(!0),debounceMs:be().int().nonnegative().default(300)}),B4=Qe(["debug","info","notice","warning","error","critical","alert","emergency"]),s8=Dt.extend({level:B4}),h8=Ve.extend({method:F("logging/setLevel"),params:s8}),l8=Jt.extend({level:B4,logger:v().optional(),data:Ce()}),u8=qt.extend({method:F("notifications/message"),params:l8}),g8=q({name:v().optional()}),d8=q({hints:x(g8).optional(),costPriority:be().min(0).max(1).optional(),speedPriority:be().min(0).max(1).optional(),intelligencePriority:be().min(0).max(1).optional()}),y8=q({mode:Qe(["auto","required","none"]).optional()}),b8=q({type:F("tool_result"),toolUseId:v().describe("The unique identifier for the corresponding tool call."),content:x(jk).default([]),structuredContent:q({}).loose().optional(),isError:Se().optional(),_meta:$e(v(),Ce()).optional()}),p8=Ka("type",[zk,Nk,_k]),Ul=Ka("type",[zk,Nk,_k,Q5,b8]),m8=q({role:Qa,content:Le([Ul,x(Ul)]),_meta:$e(v(),Ce()).optional()}),w8=Kl.extend({messages:x(m8),modelPreferences:d8.optional(),systemPrompt:v().optional(),includeContext:Qe(["none","thisServer","allServers"]).optional(),temperature:be().optional(),maxTokens:be().int(),stopSequences:x(v()).optional(),metadata:Je.optional(),tools:x(x4).optional(),toolChoice:y8.optional()}),J4=Ve.extend({method:F("sampling/createMessage"),params:w8}),q4=et.extend({model:v(),stopReason:ze(Qe(["endTurn","stopSequence","maxTokens"]).or(v())),role:Qa,content:p8}),H4=et.extend({model:v(),stopReason:ze(Qe(["endTurn","stopSequence","maxTokens","toolUse"]).or(v())),role:Qa,content:Le([Ul,x(Ul)])}),f8=q({type:F("boolean"),title:v().optional(),description:v().optional(),default:Se().optional()}),v8=q({type:F("string"),title:v().optional(),description:v().optional(),minLength:be().optional(),maxLength:be().optional(),format:Qe(["email","uri","date","date-time"]).optional(),default:v().optional()}),k8=q({type:Qe(["number","integer"]),title:v().optional(),description:v().optional(),minimum:be().optional(),maximum:be().optional(),default:be().optional()}),I8=q({type:F("string"),title:v().optional(),description:v().optional(),enum:x(v()),default:v().optional()}),P8=q({type:F("string"),title:v().optional(),description:v().optional(),oneOf:x(q({const:v(),title:v()})),default:v().optional()}),S8=q({type:F("string"),title:v().optional(),description:v().optional(),enum:x(v()),enumNames:x(v()).optional(),default:v().optional()}),O8=Le([I8,P8]),$8=q({type:F("array"),title:v().optional(),description:v().optional(),minItems:be().optional(),maxItems:be().optional(),items:q({type:F("string"),enum:x(v())}),default:x(v()).optional()}),T8=q({type:F("array"),title:v().optional(),description:v().optional(),minItems:be().optional(),maxItems:be().optional(),items:q({anyOf:x(q({const:v(),title:v()}))}),default:x(v()).optional()}),A8=Le([$8,T8]),C8=Le([S8,O8,A8]),L8=Le([C8,f8,v8,k8]),D8=Kl.extend({mode:F("form").optional(),message:v(),requestedSchema:q({type:F("object"),properties:$e(v(),L8),required:x(v()).optional()})}),z8=Kl.extend({mode:F("url"),message:v(),elicitationId:v(),url:v().url()}),N8=Le([D8,z8]),W4=Ve.extend({method:F("elicitation/create"),params:N8}),_8=Jt.extend({elicitationId:v()}),j8=qt.extend({method:F("notifications/elicitation/complete"),params:_8}),Y4=et.extend({action:Qe(["accept","decline","cancel"]),content:Ma((e)=>e===null?void 0:e,$e(v(),Le([v(),be(),Se(),x(v())])).optional())}),R8=q({type:F("ref/resource"),uri:v()}),U8=q({type:F("ref/prompt"),name:v()}),E8=Dt.extend({ref:Le([U8,R8]),argument:q({name:v(),value:v()}),context:q({arguments:$e(v(),v()).optional()}).optional()}),K8=Ve.extend({method:F("completion/complete"),params:E8}),X4=et.extend({completion:xe({values:x(v()).max(100),total:ze(be().int()),hasMore:ze(Se())})}),x8=q({uri:v().startsWith("file://"),name:v().optional(),_meta:$e(v(),Ce()).optional()}),G8=Ve.extend({method:F("roots/list"),params:Dt.optional()}),M8=et.extend({roots:x(x8)}),B8=qt.extend({method:F("notifications/roots/list_changed"),params:Jt.optional()}),qLe=Le([kk,T5,K8,h8,Z5,X5,U5,E5,x5,M5,J5,a8,i8,Sk,$k,Tk,Ck]),HLe=Le([vk,Ik,C5,B8,Pk]),WLe=Le([fk,q4,H4,Y4,M8,Ok,Ak,Gl]),YLe=Le([kk,J4,W4,G8,Sk,$k,Tk,Ck]),XLe=Le([vk,Ik,u8,H5,R4,M4,K4,Pk,j8]),FLe=Le([fk,A4,X4,E4,U4,N4,_4,j4,Ml,G4,Ok,Ak,Gl])});var J8;var Bl=g(()=>{J8=Symbol("Let zodToJsonSchema decide on which parser to use")});var Rk=g(()=>{Bl()});var Ht=()=>{};var Uk=g(()=>{Me()});var Ek=()=>{};var Jl=g(()=>{Me()});var Kk=g(()=>{Me()});var xk=()=>{};var Gk=g(()=>{Me()});var Mk=g(()=>{Me();Ht()});var Bk=g(()=>{Me()});var CDe;var ql=g(()=>{CDe=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});var Hl=g(()=>{Me();ql();Jl();Ht()});var Jk=g(()=>{Me();Hl();Ht()});var qk=g(()=>{Ht()});var Wl=g(()=>{Me()});var Hk=g(()=>{Me();Wl()});var Wk=()=>{};var Yk=g(()=>{Me()});var Xk=g(()=>{Me();Ht()});var Fk=g(()=>{Me()});var Zk=g(()=>{Me()});var Qk=g(()=>{Me()});var Vk=g(()=>{Me()});var eI=g(()=>{Ht()});var tI=g(()=>{Ht()});var nI=g(()=>{Me()});var oI=g(()=>{Ht();Uk();Ek();Jl();Kk();xk();Gk();Mk();Bk();Jk();qk();Hk();Wk();Yk();Xk();Fk();Zk();Hl();Qk();ql();Vk();eI();Wl();tI();nI()});var Me=g(()=>{Bl();oI();Ht()});var F4=()=>{};var iI=g(()=>{Me();Rk();Ht()});var Z4=g(()=>{iI();Bl();Rk();Me();F4();Ht();Uk();Ek();Jl();Kk();xk();Gk();Mk();Bk();Jk();qk();Hk();Wk();Yk();Xk();Fk();Zk();nI();Hl();Qk();ql();Vk();eI();Wl();tI();oI();iI()});var V4=g(()=>{Rl();Z4()});var tR=g(()=>{Rl();Eo();V4()});var tc=K((iR)=>{Object.defineProperty(iR,"__esModule",{value:!0});iR.regexpCode=iR.getEsmExportName=iR.getProperty=iR.safeStringify=iR.stringify=iR.strConcat=iR.addCodeArg=iR.str=iR._=iR.nil=iR._Code=iR.Name=iR.IDENTIFIER=iR._CodeOrName=void 0;class Yl{}iR._CodeOrName=Yl;iR.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class er extends Yl{constructor(e){super();if(!iR.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}iR.Name=er;class nn extends Yl{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>{if(n instanceof er)t[n.str]=(t[n.str]||0)+1;return t},{})}}iR._Code=nn;iR.nil=new nn("");function nR(e,...t){let n=[e[0]],i=0;while(i<t.length)aI(n,t[i]),n.push(e[++i]);return new nn(n)}iR._=nR;var rI=new nn("+");function oR(e,...t){let n=[ec(e[0])],i=0;while(i<t.length)n.push(rI),aI(n,t[i]),n.push(rI,ec(e[++i]));return e7(n),new nn(n)}iR.str=oR;function aI(e,t){if(t instanceof nn)e.push(...t._items);else if(t instanceof er)e.push(t);else e.push(o7(t))}iR.addCodeArg=aI;function e7(e){let t=1;while(t<e.length-1){if(e[t]===rI){let n=t7(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function t7(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof er||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof er))return`"${e}${t.slice(1)}`;return}function n7(e,t){return t.emptyStr()?e:e.emptyStr()?t:oR`${e}${t}`}iR.strConcat=n7;function o7(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ec(Array.isArray(e)?e.join(","):e)}function i7(e){return new nn(ec(e))}iR.stringify=i7;function ec(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}iR.safeStringify=ec;function r7(e){return typeof e=="string"&&iR.IDENTIFIER.test(e)?new nn(`.${e}`):nR`[${e}]`}iR.getProperty=r7;function a7(e){if(typeof e=="string"&&iR.IDENTIFIER.test(e))return new nn(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}iR.getEsmExportName=a7;function c7(e){return new nn(e.toString())}iR.regexpCode=c7});var lI=K((sR)=>{Object.defineProperty(sR,"__esModule",{value:!0});sR.ValueScope=sR.ValueScopeName=sR.Scope=sR.varKinds=sR.UsedValueState=void 0;var Pt=tc();class aR extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var Fl;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Fl||(sR.UsedValueState=Fl={}));sR.varKinds={const:new Pt.Name("const"),let:new Pt.Name("let"),var:new Pt.Name("var")};class sI{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Pt.Name?e:this.name(e)}name(e){return new Pt.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}sR.Scope=sI;class hI extends Pt.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=Pt._`.${new Pt.Name(t)}[${n}]`}}sR.ValueScopeName=hI;var v7=Pt._`\n`;class cR extends sI{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?v7:Pt.nil}}get(){return this._scope}name(e){return new hI(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,r=(n=t.key)!==null&&n!==void 0?n:t.ref,a=this._values[o];if(a){let l=a.get(r);if(l)return l}else a=this._values[o]=new Map;a.set(r,i);let s=this._scope[o]||(this._scope[o]=[]),h=s.length;return s[h]=t.ref,i.setValue(t,{property:o,itemIndex:h}),i}getValue(e,t){let n=this._values[e];if(!n)return;return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(n)=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return Pt._`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,(i)=>{if(i.value===void 0)throw Error(`CodeGen: name "${i}" has no value`);return i.value.code},t,n)}_reduceValues(e,t,n={},i){let o=Pt.nil;for(let r in e){let a=e[r];if(!a)continue;let s=n[r]=n[r]||new Map;a.forEach((h)=>{if(s.has(h))return;s.set(h,Fl.Started);let l=t(h);if(l){let u=this.opts.es5?sR.varKinds.var:sR.varKinds.const;o=Pt._`${o}${u} ${h} = ${l};${this.opts._n}`}else if(l=i===null||i===void 0?void 0:i(h))o=Pt._`${o}${l}${this.opts._n}`;else throw new aR(h);s.set(h,Fl.Completed)})}return o}}sR.ValueScope=cR});var de=K((St)=>{Object.defineProperty(St,"__esModule",{value:!0});St.or=St.and=St.not=St.CodeGen=St.operators=St.varKinds=St.ValueScopeName=St.ValueScope=St.Scope=St.Name=St.regexpCode=St.stringify=St.getProperty=St.nil=St.strConcat=St.str=St._=void 0;var pe=tc(),on=lI(),so=tc();Object.defineProperty(St,"_",{enumerable:!0,get:function(){return so._}});Object.defineProperty(St,"str",{enumerable:!0,get:function(){return so.str}});Object.defineProperty(St,"strConcat",{enumerable:!0,get:function(){return so.strConcat}});Object.defineProperty(St,"nil",{enumerable:!0,get:function(){return so.nil}});Object.defineProperty(St,"getProperty",{enumerable:!0,get:function(){return so.getProperty}});Object.defineProperty(St,"stringify",{enumerable:!0,get:function(){return so.stringify}});Object.defineProperty(St,"regexpCode",{enumerable:!0,get:function(){return so.regexpCode}});Object.defineProperty(St,"Name",{enumerable:!0,get:function(){return so.Name}});var nu=lI();Object.defineProperty(St,"Scope",{enumerable:!0,get:function(){return nu.Scope}});Object.defineProperty(St,"ValueScope",{enumerable:!0,get:function(){return nu.ValueScope}});Object.defineProperty(St,"ValueScopeName",{enumerable:!0,get:function(){return nu.ValueScopeName}});Object.defineProperty(St,"varKinds",{enumerable:!0,get:function(){return nu.varKinds}});St.operators={GT:new pe._Code(">"),GTE:new pe._Code(">="),LT:new pe._Code("<"),LTE:new pe._Code("<="),EQ:new pe._Code("==="),NEQ:new pe._Code("!=="),NOT:new pe._Code("!"),OR:new pe._Code("||"),AND:new pe._Code("&&"),ADD:new pe._Code("+")};class ho{optimizeNodes(){return this}optimizeNames(e,t){return this}}class lR extends ho{constructor(e,t,n){super();this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?on.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=nr(this.rhs,e,t);return this}get names(){return this.rhs instanceof pe._CodeOrName?this.rhs.names:{}}}class dI extends ho{constructor(e,t,n){super();this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof pe.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=nr(this.rhs,e,t),this}get names(){let e=this.lhs instanceof pe.Name?{}:{...this.lhs.names};return tu(e,this.rhs)}}class uR extends dI{constructor(e,t,n,i){super(e,n,i);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class gR extends ho{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class dR extends ho{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class yR extends ho{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class bR extends ho{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=nr(this.code,e,t),this}get names(){return this.code instanceof pe._CodeOrName?this.code.names:{}}}class ou extends ho{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let n=e[t].optimizeNodes();if(Array.isArray(n))e.splice(t,1,...n);else if(n)e[t]=n;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,i=n.length;while(i--){let o=n[i];if(o.optimizeNames(e,t))continue;S7(e,o.names),n.splice(i,1)}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Ko(e,t.names),{})}}class lo extends ou{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class pR extends ou{}class nc extends lo{}nc.kind="else";class Rn extends lo{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new nc(n):n}if(t){if(e===!1)return t instanceof Rn?t:t.nodes;if(this.nodes.length)return this;return new Rn(kR(e),t instanceof Rn?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=nr(this.condition,e,t),this}get names(){let e=super.names;if(tu(e,this.condition),this.else)Ko(e,this.else.names);return e}}Rn.kind="if";class tr extends lo{}tr.kind="for";class mR extends tr{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=nr(this.iteration,e,t),this}get names(){return Ko(super.names,this.iteration.names)}}class wR extends tr{constructor(e,t,n,i){super();this.varKind=e,this.name=t,this.from=n,this.to=i}render(e){let t=e.es5?on.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${t} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=tu(super.names,this.from);return tu(e,this.to)}}class uI extends tr{constructor(e,t,n,i){super();this.loop=e,this.varKind=t,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=nr(this.iterable,e,t),this}get names(){return Ko(super.names,this.iterable.names)}}class Zl extends lo{constructor(e,t,n){super();this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}Zl.kind="func";class Ql extends ou{render(e){return"return "+super.render(e)}}Ql.kind="return";class fR extends lo{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,i;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(i=this.finally)===null||i===void 0||i.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)Ko(e,this.catch.names);if(this.finally)Ko(e,this.finally.names);return e}}class Vl extends lo{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Vl.kind="catch";class eu extends lo{render(e){return"finally"+super.render(e)}}eu.kind="finally";class vR{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
7475
|
+
-d '{"event":"hello.world","level":"info","message":"first webhook event"}'`}]}]}]}});var p_;var m_=g(()=>{b_();p_={id:"webhook_events",name:"Webhook Events",searchAliases:["webhook","webhooks","json events","http events","generic webhook","event stream"],capabilities:["connectionless"],auth:[],delivery:["push"],intake:[{id:"webhook-events",label:"Webhook Events",subdomain:"webhook-events",transform:"webhook-events"}],lifecycleSkipReason:"Manual webhook setup is not exercised by automated lifecycle tests yet.",subtitle:"Point any vendor's webhooks at Sazabi. Arbitrary JSON events land as searchable log records with zero vendor-specific configuration.",features:["Any JSON event stream","One keyed URL per endpoint","Full payload preserved as attributes","No schema or field mapping"],evidenceHints:["A vendor that emits plain JSON webhooks without a dedicated Sazabi source","An internal service, deploy bot, or cron that POSTs JSON events","Existing outbound webhook configuration with no other Sazabi destination"],setupSkill:H,dashboard:{slug:"webhook-events",iconKey:"webhook-events",intakeSourceId:"webhook-events"}}});var Yh,w_,tCe,nCe,ji,oCe,iCe,jV,RV,UV,rCe;var f_=g(()=>{yz();mz();vz();Pz();$z();Cz();zz();jz();Ez();Gz();Jz();Wz();Fz();Vz();nN();rN();sN();uN();yN();mN();vN();PN();$N();CN();zN();jN();EN();GN();JN();WN();FN();VN();n_();r_();s_();u_();y_();m_();Yh=[dz,pz,fz,Iz,Oz,Az,Dz,_z,Uz,xz,Bz,Hz,Xz,Qz,tN,iN,cN,lN,dN,pN,fN,IN,ON,AN,DN,_N,UN,xN,BN,HN,QN,XN,t_,i_,c_,l_,d_,p_],w_=Yh,tCe=Object.fromEntries(w_.map((e)=>[e.id,e.sensitiveFields??[]])),nCe=Object.fromEntries(w_.flatMap((e)=>[...Object.values(e.dashboard?.actions?.submit??{}),...Object.values(e.dashboard?.actions?.list??{}),...Object.values(e.dashboard?.actions?.prefetch??{})].flatMap((t)=>{let n=t.sensitiveInputFields??[];if(n.length===0)return[];return[["procedure"in t?t.procedure:`${e.id}.${t.actionId}`,n]]}))),ji=["vercel","cloudflare","railway","render","fly_io","netlify","supabase","digital_ocean","inngest","trigger_dev","temporal","mastra","neon","langchain","daytona","e2b","cloudwatch","convex","datadog","sentry","sentry_platform","openrouter","posthog","posthog_sdk","gcp","otel","otel_metrics","fluent_bit","vector","grafana_alloy","otel_collector","cloudflare_workers","elastic_cloud","porter","respan","plain","prometheus","webhook_events"],oCe=Yh.map((e)=>({id:e.id,name:e.name,capabilities:e.capabilities})),iCe=Object.fromEntries(Yh.map((e)=>[e.id,{name:e.name,setupSkill:e.setupSkill}])),jV={cloudflare:_f,cloudwatch:Gf,convex:Jf,digital_ocean:Xf,fly_io:tv,gcp:iv,plain:mv,posthog:kv,render:Tv,sentry_platform:zv,vercel:Kv},RV={cloudflare:jf,cloudwatch:Mf,convex:Hf,digital_ocean:Zf,fly_io:ov,gcp:rv,plain:fv,posthog:Iv,render:Cv,vercel:Gv},UV={cloudflare:Rf,cloudflare_workers:Uf,cloudwatch:Bf,convex:qf,datadog:Wf,daytona:Yf,digital_ocean:Ff,fluent_bit:ev,fly_io:nv,grafana_alloy:cv,e2b:Qf,elastic_cloud:Vf,gcp:av,inngest:sv,langchain:hv,mastra:lv,neon:uv,netlify:gv,openrouter:dv,otel:yv,otel_collector:bv,otel_metrics:pv,plain:wv,posthog:Pv,posthog_sdk:Sv,porter:vv,prometheus:Ov,railway:$v,render:Av,respan:Lv,sentry:Dv,sentry_platform:Nv,supabase:_v,temporal:jv,trigger_dev:Rv,vector:Uv,vercel:xv,webhook_events:Mv},rCe=Yh.map((e)=>({sourceId:e.id,name:e.name,capabilities:e.capabilities,setupAuthModes:e.auth,deliveryModes:e.delivery,hasDashboardMetadata:Boolean(e.dashboard),hasManagedFlow:Boolean(jV[e.id]),hasConnectionlessFlow:Boolean(UV[e.id]),hasStreamSelector:Boolean(RV[e.id]),lifecycleEligible:e.lifecycleEligible??!1,lifecycleSkipReason:e.lifecycleSkipReason}))});var v_=g(()=>{f_()});var Bv=g(()=>{uz();v_()});var k_,qa,EV,KV,I_,Jv,qv,Xh,P_,S_,Fh,O_,$_,Ri,T_,A_,Zh,C_,Hv,L_,D_,Qh,z_,N_,Vh,__,j_,Ui,R_,U_,el,E_,K_,tl,x_,G_,nl,M_,B_,ol,J_,q_,il,H_,W_,rl,xV;var Wv=g(()=>{Bv();we();Ne();k_=ji,qa=c.enum(k_),EV=c.enum(["pending","provisioning","active","error"]),KV=c.object({name:c.string().describe("Field name used as the JSON key in metadata."),type:c.string().describe('Zod type name, e.g. "string", "boolean", "enum".'),required:c.boolean().describe("Whether the field is required."),sensitive:c.boolean().describe("Whether the field contains a secret and will be encrypted."),description:c.string().nullable().describe("Human-readable description of the field.")}),I_=c.object({id:c.string().describe("Data source type identifier."),name:c.string().describe("Human-readable display name."),metadataFields:c.array(KV).describe("Fields required in the metadata object when creating a connection."),setupSkill:c.string().nullable().describe("Markdown setup skill for AI agents. Null when no skill is available.")}),Jv=c.object({kind:c.enum(["url","hostPort"]).describe("Card shape. `url` = a complete keyed URL whose hostname authenticates; `hostPort` = a non-keyed listener host + port whose credential travels separately."),label:c.string().optional().describe("Card label. Present when a source exposes several endpoints (e.g. separate logs and traces destinations)."),url:c.string().optional().describe("The complete keyed intake URL. Present when kind is `url`."),host:c.string().optional().describe("The regional listener hostname (no scheme). Present when kind is `hostPort`."),port:c.number().int().optional().describe("The listener port. Present when kind is `hostPort`."),description:c.string().optional().describe("Vendor-specific guidance rendered under the value."),extraCredential:c.object({label:c.string(),value:c.string(),description:c.string().optional()}).optional().describe("The credential the sender must attach when the hostname alone does not authenticate. Present when kind is `hostPort`.")}),qv=c.object({id:c.string().uuid(),projectId:c.string().uuid(),dataSourceType:qa,displayName:c.string().nullable(),createdAt:c.string().datetime()}),Xh=c.object({id:c.string().uuid(),instanceId:c.string().uuid().describe("Root instance ID. Every stream roots on exactly one data source instance (managed or connectionless)."),connectionId:c.string().uuid().nullable().describe("Backing connection ID, resolved from the stream's instance. Null for connectionless streams, which ingest directly without a managed connection."),displayName:c.string(),config:c.record(c.string(),c.unknown()),status:EV,errorMessage:c.string().nullable(),enabled:c.boolean().describe("Whether the stream is currently ingesting. Independent of provisioning status: a paused stream stays configured but stops accepting new data."),createdAt:c.string().datetime(),endpointCards:c.array(Jv).optional().describe("Server-computed endpoint card(s) for this stream's delivery key — where to point the sender. Present only for streams that carry their own intake key (connectionless-lifecycle streams).")}),P_=c.object({}),S_=c.object({types:c.array(I_)}),Fh=$({operationId:"dataSources.listTypes",description:"List all supported data source types with their metadata requirements.",backend:"api",route:{method:"GET",path:"/data-sources/types",tags:["Data Sources"]},input:P_,output:S_,pagination:"none",async:"sync"}),O_=c.object({projectId:c.string().uuid().optional().describe("Project to list connections for. Auto-filled from SDK context when omitted."),dataSourceType:qa.optional().describe("Filter connections by data source type.")}),$_=c.object({connections:c.array(qv)}),Ri=$({operationId:"dataSources.listConnections",description:"List data source connections within one project.",backend:"api",route:{method:"GET",path:"/data-sources/connections",tags:["Data Sources"]},input:O_,output:$_,pagination:"none",async:"sync"}),T_=c.object({connectionId:c.string().uuid().describe("Connection ID to fetch.")}),A_=c.object({connection:qv}),Zh=$({operationId:"dataSources.getConnection",description:"Get one data source connection by ID.",backend:"api",route:{method:"GET",path:"/data-sources/connections/{connectionId}",tags:["Data Sources"]},input:T_,output:A_,pagination:"none",async:"sync"}),C_=c.enum(["managed","connectionless"]),Hv=c.object({id:c.string().uuid(),dataSourceType:qa,mode:C_,label:c.string().nullable(),connectionId:c.string().uuid().nullable(),streamCount:c.number().int(),createdAt:c.string().datetime(),connectionDisplayName:c.string().nullish(),streamName:c.string().nullish()}),L_=c.object({projectId:c.string().uuid().optional().describe("Project to list instances for. Auto-filled from SDK context when omitted."),dataSourceType:qa.optional().describe("Filter instances by data source type.")}),D_=c.object({instances:c.array(Hv)}),Qh=$({operationId:"dataSources.listInstances",description:"List data source instances within one project.",backend:"api",route:{method:"GET",path:"/data-sources/instances",tags:["Data Sources"]},input:L_,output:D_,pagination:"none",async:"sync"}),z_=c.object({instanceId:c.string().uuid().describe("Instance ID to fetch."),projectId:c.string().uuid().optional().describe("Project the instance belongs to. Auto-filled from SDK context when omitted.")}),N_=c.object({instance:Hv}),Vh=$({operationId:"dataSources.getInstance",description:"Get one data source instance by ID.",backend:"api",route:{method:"GET",path:"/data-sources/instances/{instanceId}",tags:["Data Sources"]},input:z_,output:N_,pagination:"none",async:"sync"}),__=c.object({projectId:c.string().uuid().optional().describe("Project to create the connection in. Auto-filled from SDK context when omitted."),dataSourceType:qa.describe("Data source type identifier."),metadata:c.record(c.string(),c.unknown()).describe("Platform-specific credentials. Fields vary by data source type."),displayName:c.string().optional().describe("Optional human-readable name for this connection.")}),j_=c.object({connectionId:c.string().uuid().describe("ID of the created connection."),publicKey:c.string().describe("Auto-generated public key for this connection. Store this securely — it is only shown once."),endpointCards:c.array(Jv).optional().describe("Server-computed endpoint card(s) for the minted key — where to point the sender. Present for sources that ingest through a Sazabi endpoint (connectionless lifecycle).")}),Ui=$({operationId:"dataSources.createConnection",description:"Create a new managed data source connection. Validates credentials, encrypts sensitive fields, and auto-generates a public key. Managed sources only: connectionless data sources have no connection to create and are rejected with 400 — set them up in the Sazabi dashboard, which mints a keyed intake URL; existing setups are listed under /data-sources/instances.",backend:"api",route:{method:"POST",path:"/data-sources/connections",successStatus:201,tags:["Data Sources"]},input:__,output:j_,pagination:"none",async:"sync"}),R_=c.object({connectionId:c.string().uuid().describe("Connection ID to list streams for."),enabled:c.boolean().optional().describe("Optional filter on stream ingestion state. Omit to list all streams; pass true for only enabled streams or false for only paused streams.")}),U_=c.object({streams:c.array(Xh)}),el=$({operationId:"dataSources.listStreams",description:"List streams for a data source connection.",backend:"api",route:{method:"GET",path:"/data-sources/connections/{connectionId}/streams",tags:["Data Sources"]},input:R_,output:U_,pagination:"none",async:"sync"}),E_=c.object({instanceId:c.string().uuid().describe("Instance ID to list streams for."),enabled:c.boolean().optional().describe("Optional filter on stream ingestion state. Omit to list all streams; pass true for only enabled streams or false for only paused streams.")}),K_=c.object({streams:c.array(Xh)}),tl=$({operationId:"dataSources.listInstanceStreams",description:"List the streams that belong to a data source instance.",backend:"api",route:{method:"GET",path:"/data-sources/instances/{instanceId}/streams",tags:["Data Sources"]},input:E_,output:K_,pagination:"none",async:"sync"}),x_=c.object({instanceId:c.string().uuid().describe("Instance ID to create the stream under."),displayName:c.string().describe("Resource name, e.g. service or app name."),config:c.record(c.string(),c.unknown()).describe("Platform-specific stream configuration.")}),G_=c.object({streamId:c.string().uuid().describe("ID of the created stream."),publicKey:c.string().optional().describe("Auto-generated public key for this stream. Returned only when the data source mints a per-stream key (sources that send to a Sazabi endpoint). Store this securely — it is only shown once.")}),nl=$({operationId:"dataSources.createStream",description:"Create a new stream under a data source instance. Triggers async provisioning.",backend:"api",route:{method:"POST",path:"/data-sources/instances/{instanceId}/streams",successStatus:201,tags:["Data Sources"]},input:x_,output:G_,pagination:"none",async:"sync"}),M_=c.object({streamId:c.string().uuid().describe("Stream ID to fetch.")}),B_=c.object({stream:Xh}),ol=$({operationId:"dataSources.getStream",description:"Get one data source stream by ID. Use to poll provisioning status.",backend:"api",route:{method:"GET",path:"/data-sources/streams/{streamId}",tags:["Data Sources"]},input:M_,output:B_,pagination:"none",async:"sync"}),J_=c.object({streamId:c.string().uuid().describe("Stream ID to delete.")}),q_=c.object({success:c.boolean()}),il=$({operationId:"dataSources.deleteStream",description:"Delete a data source stream. For sources that send to a Sazabi endpoint, also deletes the stream's public key.",backend:"api",route:{method:"DELETE",path:"/data-sources/streams/{streamId}",successStatus:204,tags:["Data Sources"]},input:J_,output:q_,pagination:"none",async:"sync"}),H_=c.object({connectionId:c.string().uuid().describe("Connection ID to disconnect.")}),W_=c.object({success:c.boolean(),connectionTeardownError:c.string().nullable().describe("Null when teardown succeeded; error message when remote cleanup failed.")}),rl=$({operationId:"dataSources.disconnectConnection",description:"Disconnect a data source connection. Removes the connection, all associated streams, and their public keys. Provider-side cleanup runs asynchronously when the source supports it.",backend:"api",route:{method:"DELETE",path:"/data-sources/connections/{connectionId}",successStatus:200,tags:["Data Sources"]},input:H_,output:W_,pagination:"none",async:"sync"}),xV={listTypes:Fh.contract,listConnections:Ri.contract,getConnection:Zh.contract,listInstances:Qh.contract,getInstance:Vh.contract,createConnection:Ui.contract,disconnectConnection:rl.contract,listStreams:el.contract,listInstanceStreams:tl.contract,createStream:nl.contract,getStream:ol.contract,deleteStream:il.contract}});var GV,Yv,MV,BV,JV,qV,HV,Y_,WV,YV,X_,XV,FV,F_,ZV,QV,Z_;var Q_=g(()=>{we();Ne();GV=["slack","github","linear","pagerduty","victorops","rootly","incident_io","webhook","teams","bitbucket","jira"],Yv=c.enum(GV),MV=c.enum(["oauth","app_installation","api_key"]),BV=c.enum(["alert_routing","inbound_webhooks","messaging","code_search","health_check"]),JV=c.enum(["pending","connected","error","revoked"]),qV=c.enum(["healthy","unhealthy","unknown"]),HV=c.object({id:Yv.describe("Integration provider identifier."),name:c.string().describe("Human-readable display name."),description:c.string().describe("Short description of the provider."),authType:MV.describe("Auth flow used to connect this provider."),capabilities:c.array(BV).describe("Capabilities the provider exposes once connected."),connectionCount:c.number().int().describe("Number of active connections for this provider in the organization, including error-status connections that need attention.")}),Y_=c.object({id:c.string().uuid(),provider:Yv,displayName:c.string().nullable(),status:JV,isActive:c.boolean().describe("Whether this connection counts as connected (status 'connected' or 'error'). An error-status connection is the organization's connection — broken, not absent."),needsAttention:c.boolean().describe("Whether the connection should surface a reconnect prompt (status 'error' or health status 'unhealthy')."),metadata:c.record(c.string(),c.unknown()).describe("Non-secret provider metadata (e.g. workspace/team names)."),healthStatus:qV,healthMessage:c.string().nullable(),healthCheckedAt:c.string().datetime().nullable(),healthConsecutiveFailures:c.number().int(),connectedBy:c.string().nullable(),createdAt:c.string().datetime(),updatedAt:c.string().datetime()}),WV=c.object({organizationId:c.string().min(1).optional().describe("Organization to list providers for. Auto-filled from CLI and SDK context when omitted.")}),YV=c.object({providers:c.array(HV)}),X_=$({operationId:"integrations.listProviders",description:"List supported integration providers and how many connections the organization has for each.",backend:"api",route:{method:"GET",path:"/integrations/providers",tags:["Integrations"]},input:WV,output:YV,pagination:"none",async:"sync"}),XV=c.object({organizationId:c.string().min(1).optional().describe("Organization to list connections for. Auto-filled from CLI and SDK context when omitted."),provider:Yv.optional().describe("Filter connections by provider.")}),FV=c.object({connections:c.array(Y_)}),F_=$({operationId:"integrations.listConnections",description:"List integration connections and their connection state for the organization.",backend:"api",route:{method:"GET",path:"/integrations/connections",tags:["Integrations"]},input:XV,output:FV,pagination:"none",async:"sync"}),ZV=c.object({organizationId:c.string().min(1).optional().describe("Organization the connection belongs to. Auto-filled from CLI and SDK context when omitted."),connectionId:c.string().uuid().describe("Connection ID to fetch.")}),QV=c.object({connection:Y_}),Z_=$({operationId:"integrations.getConnection",description:"Get one integration connection by ID (non-secret config only).",backend:"api",route:{method:"GET",path:"/integrations/connections/{connectionId}",tags:["Integrations"]},input:ZV,output:QV,pagination:"none",async:"sync"})});var vn,VV,e3,V_,al,cl,ej,Xv,tj,Fv,nj,oj,t3,n3,ij,rj,aj,cj,sj,hj,lj,uj,gj,dj,yj,bj,pj,Ei,sl,hl,ll,ul,gl,dl,Zv,yl,bl,o3;var Qv=g(()=>{we();Ne();vn=c.object({id:c.string().uuid(),projectId:c.string().uuid(),name:c.string(),description:c.string().nullable(),status:c.enum(["open","resolved","ignored"]),severity:c.enum(["low","medium","high","critical"]),statusComponentId:c.string().uuid().nullable(),createdAt:c.string().datetime(),resolvedAt:c.string().datetime().nullable(),mutedAt:c.string().datetime().nullable(),muteHitCount:c.number().int().nonnegative(),lastActivityAt:c.string().datetime().nullable(),lastDeliveredAt:c.string().datetime().nullable(),locked:c.boolean(),redacted:c.boolean()}),VV=c.object({channelId:c.string().nullable(),channelName:c.string().nullable(),threadTs:c.string().nullable(),permalink:c.string().nullable(),workspaceName:c.string().nullable()}),e3=vn.extend({slackChannels:c.array(VV)}),V_=vn.extend({delivery:c.record(c.string(),c.unknown()).nullable().optional()}),al=c.object({projectId:c.string().uuid().optional().describe("Project to create the issue in. Auto-filled from CLI and SDK context when omitted."),name:c.string().trim().min(1).optional().describe("Stable issue name for indexing and mute matching. When omitted, the name is derived from contentMdx."),contentMdx:c.string().trim().min(1,"contentMdx cannot be empty").describe("Safe Sazabi MDX document for the issue body (impact, root cause, remediation, evidence)."),severity:c.enum(["low","medium","high","critical"]).default("medium").describe("Issue severity used for prioritization and triage."),statusComponentId:c.string().uuid().optional().describe("Optional status component ID to link to the issue."),statusStartedAt:c.string().datetime({offset:!0}).optional().describe("Optional ISO timestamp for when the linked status-page incident began.")}),cl=al.superRefine((e,t)=>{if(e.statusStartedAt&&!e.statusComponentId)t.addIssue({code:"custom",path:["statusStartedAt"],message:"statusStartedAt requires statusComponentId."})}),ej=c.object({issue:vn,duplicateIssueId:c.string().uuid().optional().describe("Present when creation reused an existing open issue instead of creating a new one.")}),Xv=c.object({projectId:c.string().uuid().optional().describe("Project to list issues for. Auto-filled from CLI and SDK context when omitted."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of issues to return per page."),cursor:c.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page."),status:c.enum(["open","resolved","ignored"]).optional().describe("Filter by issue status."),severity:c.enum(["low","medium","high","critical"]).optional().describe("Filter by severity."),statusComponentId:c.string().uuid().optional().describe("Filter by status component ID.")}),tj=c.object({issues:c.array(vn),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),Fv=Xv.extend({name:c.string().trim().optional().describe("Case-insensitive partial match on issue name."),includeDeliveryMetadata:c.union([c.boolean(),c.stringbool()]).default(!1).describe("When true, include raw delivery metadata in each issue.")}),nj=c.object({issues:c.array(V_),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),oj=Fv.omit({limit:!0,cursor:!0,includeDeliveryMetadata:!0}),t3=c.object({open:c.number().int().nonnegative(),resolved:c.number().int().nonnegative(),ignored:c.number().int().nonnegative()}),n3=c.object({low:c.number().int().nonnegative(),medium:c.number().int().nonnegative(),high:c.number().int().nonnegative(),critical:c.number().int().nonnegative()}),ij=c.object({total:c.number().int().nonnegative(),byStatus:t3,bySeverity:n3,filters:c.object({name:c.string().nullable(),status:c.enum(["open","resolved","ignored"]).nullable(),severity:c.enum(["low","medium","high","critical"]).nullable(),statusComponentId:c.string().uuid().nullable()})}),rj=c.object({issueId:c.string().uuid().describe("Issue ID to retrieve.")}),aj=c.object({issue:e3}),cj=c.object({issueId:c.string().uuid().describe("Issue ID to resolve."),statusResolvedAt:c.string().datetime({offset:!0}).optional().describe("Optional ISO timestamp for when the linked status-page incident ended.")}),sj=c.object({issue:vn}),hj=c.object({issueId:c.string().uuid().describe("Issue ID to ignore.")}),lj=c.object({issue:vn}),uj=c.object({issueId:c.string().uuid().describe("Issue ID to reopen.")}),gj=c.object({issue:vn}),dj=c.object({issueId:c.string().uuid().describe("Issue ID to mute.")}),yj=c.object({issue:vn}),bj=c.object({issueId:c.string().uuid().describe("Issue ID to unmute.")}),pj=c.object({issue:vn}),Ei=$({operationId:"issues.create",description:"Create an issue in a project, returning an existing open issue when root-cause deduplication finds a match.",backend:"api",route:{method:"POST",path:"/issues",tags:["Issues"],successStatus:201},input:cl,output:ej,pagination:"none",async:"sync"}),sl=$({operationId:"issues.list",description:"List issues in a project, optionally filtered by status and severity.",backend:"api",route:{method:"GET",path:"/issues",tags:["Issues"]},input:Xv,output:tj,pagination:"cursor",async:"sync"}),hl=$({operationId:"issues.search",description:"Search issues in a project by name, status, and severity.",backend:"api",route:{method:"GET",path:"/issues/search",tags:["Issues"]},input:Fv,output:nj,pagination:"cursor",async:"sync"}),ll=$({operationId:"issues.count",description:"Count issues in a project with status and severity breakdowns.",backend:"api",route:{method:"GET",path:"/issues/count",tags:["Issues"]},input:oj,output:ij,pagination:"none",async:"sync"}),ul=$({operationId:"issues.get",description:"Get a single issue by ID.",backend:"api",route:{method:"GET",path:"/issues/{issueId}",tags:["Issues"]},input:rj,output:aj,pagination:"none",async:"sync"}),gl=$({operationId:"issues.resolve",description:"Resolve an open issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/resolve",tags:["Issues"]},input:cj,output:sj,pagination:"none",async:"sync"}),dl=$({operationId:"issues.ignore",description:"Ignore an open issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/ignore",tags:["Issues"]},input:hj,output:lj,pagination:"none",async:"sync"}),Zv=$({operationId:"issues.reopen",description:"Reopen a resolved or ignored issue.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/reopen",tags:["Issues"]},input:uj,output:gj,pagination:"none",async:"sync"}),yl=$({operationId:"issues.mute",description:"Mute an issue, suppressing future re-fires without changing status.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/mute",tags:["Issues"]},input:dj,output:yj,pagination:"none",async:"sync"}),bl=$({operationId:"issues.unmute",description:"Unmute an issue, preserving its current status.",backend:"api",route:{method:"POST",path:"/issues/{issueId}/unmute",tags:["Issues"]},input:bj,output:pj,pagination:"none",async:"sync"}),o3={count:ll.contract,create:Ei.contract,list:sl.contract,search:hl.contract,get:ul.contract,resolve:gl.contract,ignore:dl.contract,mute:yl.contract,unmute:bl.contract}});var Vv,mj,pl,ml,wj,fj,vj,kj,wl,ek,Ij,Pj,Sj,Oj,$j,Tj,Aj,Cj,Lj,Dj,zj,Nj,Ki,xi,Gi,Mi,Bi,fl,vl,kl,Il,Pl,i3,r3;var tk=g(()=>{we();Ne();Vv=/^[a-zA-Z0-9\s\-_]+$/,mj=c.object({id:c.string().uuid(),name:c.string(),expiresAt:c.string().datetime().nullable(),lastUsedAt:c.string().datetime().nullable(),createdAt:c.string().datetime()}),pl=mj.extend({projectId:c.string().uuid(),dataSourceConnectionId:c.string().uuid().nullable().describe("Linked data source connection ID when this key is scoped to one data source."),deactivatedAt:c.string().datetime().nullable().describe("Timestamp when this public key was deactivated.")}),ml=mj.extend({projectId:c.string().uuid().nullable()}),wj=c.object({projectId:c.string().uuid().optional().describe("Project to list keys for. Auto-filled from CLI and SDK context when omitted."),limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of keys to return per page."),cursor:c.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),fj=c.object({publicKeys:c.array(pl),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),vj=c.object({secretKeys:c.array(ml),nextCursor:c.string().uuid().nullable().describe("Pass as 'cursor' to fetch the next page. Null when there are no more results.")}),kj=c.object({projectId:c.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted."),keyId:c.string().uuid().describe("Key ID to fetch.")}),wl=c.object({publicKey:pl}),ek=c.object({secretKey:ml}),Ij=c.object({publicKey:pl.extend({value:c.string()})}),Pj=c.object({projectId:c.string().uuid().optional().describe("Project to ensure the log forwarding key for. Auto-filled from CLI and SDK context when omitted.")}),Sj=c.object({secretKey:ml.extend({value:c.string()})}),Oj=c.object({projectId:c.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted."),keyId:c.string().uuid().describe("Key ID to update."),name:c.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(Vv,"Name can only contain letters, numbers, spaces, hyphens, and underscores").optional().describe("New human-readable name for the key."),expiresAt:c.string().datetime().nullable().optional().describe("New expiration timestamp for the key, or null to clear it.")}),$j=c.object({params:c.object({keyId:c.string().uuid().describe("Public key ID to deactivate.")}),query:c.object({projectId:c.string().uuid().optional().describe("Project containing the key. Auto-filled from CLI and SDK context when omitted.")})}).transform(({params:e,query:t})=>({...t,...e})),Tj=wl,Aj=c.void(),Cj=c.object({limit:c.coerce.number().int().min(1).max(100).default(50).describe("Maximum number of keys to return per page."),cursor:c.string().uuid().optional().describe("Cursor from a previous response's nextCursor to fetch the next page.")}),Lj=c.object({keyId:c.string().uuid().describe("Key ID to fetch.")}),Dj=c.object({projectId:c.string().uuid().optional().describe("Project to scope this key to. When set, the key can only access resources within this project. Omit for organization-wide access."),name:c.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(Vv,"Name can only contain letters, numbers, spaces, hyphens, and underscores").describe("Human-readable name for the key."),expiresAt:c.string().datetime().optional().describe("Optional expiration timestamp for the key.")}),zj=c.object({keyId:c.string().uuid().describe("Key ID to update."),name:c.string().min(1,"Name is required").max(100,"Name must be 100 characters or less").regex(Vv,"Name can only contain letters, numbers, spaces, hyphens, and underscores").optional().describe("New human-readable name for the key."),expiresAt:c.string().datetime().nullable().optional().describe("New expiration timestamp for the key, or null to clear it.")}),Nj=c.object({params:c.object({keyId:c.string().uuid().describe("Key ID to delete.")})}).transform(({params:e})=>({...e})),Ki=$({operationId:"publicKeys.list",description:"List public keys within one project.",backend:"api",route:{method:"GET",path:"/public-keys",tags:["Public Keys"]},input:wj,output:fj,pagination:"cursor",async:"sync",examples:[{name:"list-public-keys",input:{projectId:"11111111-1111-4111-8111-111111111111",limit:25},output:{publicKeys:[{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}],nextCursor:null}}]}),xi=$({operationId:"publicKeys.get",description:"Get one public key within one project.",backend:"api",route:{method:"GET",path:"/public-keys/{keyId}",tags:["Public Keys"]},input:kj,output:wl,pagination:"none",async:"sync",examples:[{name:"get-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111",keyId:"22222222-2222-4222-8222-222222222222"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Gi=$({operationId:"publicKeys.ensureLogForwarding",description:"Ensure a reusable project-scoped public key exists for CLI log forwarding.",backend:"api",route:{method:"POST",path:"/public-keys/log-forwarding/ensure",tags:["Public Keys"]},input:Pj,output:Ij,pagination:"none",async:"sync",examples:[{name:"ensure-log-forwarding-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"sazabi-cli-forward",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z",value:"sazabi_public_example"}}}]}),Mi=$({operationId:"publicKeys.update",description:"Update one public key within one project.",backend:"api",route:{method:"PATCH",path:"/public-keys/{keyId}",tags:["Public Keys"]},input:Oj,output:wl,pagination:"none",async:"sync",examples:[{name:"rename-public-key",input:{projectId:"11111111-1111-4111-8111-111111111111",keyId:"22222222-2222-4222-8222-222222222222",name:"Updated CLI forwarder"},output:{publicKey:{id:"22222222-2222-4222-8222-222222222222",projectId:"11111111-1111-4111-8111-111111111111",name:"Updated CLI forwarder",dataSourceConnectionId:null,deactivatedAt:null,expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Bi=$({operationId:"publicKeys.deactivate",description:"Deactivate one public key within one project. Recently validated requests may continue to authenticate for a short period after deactivation.",backend:"api",route:{method:"POST",path:"/public-keys/{keyId}/deactivate",tags:["Public Keys"],inputStructure:"detailed"},input:$j,output:Tj,pagination:"none",async:"sync"}),fl=$({operationId:"secretKeys.list",description:"List secret keys within the organization.",backend:"api",route:{method:"GET",path:"/secret-keys",tags:["Secret Keys"]},input:Cj,output:vj,pagination:"cursor",async:"sync",examples:[{name:"list-secret-keys",input:{limit:25},output:{secretKeys:[{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}],nextCursor:null}}]}),vl=$({operationId:"secretKeys.get",description:"Get one secret key within the organization.",backend:"api",route:{method:"GET",path:"/secret-keys/{keyId}",tags:["Secret Keys"]},input:Lj,output:ek,pagination:"none",async:"sync",examples:[{name:"get-secret-key",input:{keyId:"33333333-3333-4333-8333-333333333333"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),kl=$({operationId:"secretKeys.create",description:"Create one secret key within the organization.",backend:"api",route:{method:"POST",path:"/secret-keys",successStatus:201,tags:["Secret Keys"]},input:Dj,output:Sj,pagination:"none",async:"sync",examples:[{name:"create-secret-key",input:{name:"CI agent"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z",value:"sazabi_secret_example"}}}]}),Il=$({operationId:"secretKeys.update",description:"Update one secret key within the organization.",backend:"api",route:{method:"PATCH",path:"/secret-keys/{keyId}",tags:["Secret Keys"]},input:zj,output:ek,pagination:"none",async:"sync",examples:[{name:"rename-secret-key",input:{keyId:"33333333-3333-4333-8333-333333333333",name:"Updated CI agent"},output:{secretKey:{id:"33333333-3333-4333-8333-333333333333",projectId:null,name:"Updated CI agent",expiresAt:null,lastUsedAt:null,createdAt:"2026-01-01T00:00:00.000Z"}}}]}),Pl=$({operationId:"secretKeys.delete",description:"Delete one secret key within the organization.",backend:"api",route:{method:"DELETE",path:"/secret-keys/{keyId}",successStatus:204,tags:["Secret Keys"],inputStructure:"detailed"},input:Nj,output:Aj,pagination:"none",async:"sync"}),i3={list:Ki.contract,get:xi.contract,ensureLogForwarding:Gi.contract,update:Mi.contract,deactivate:Bi.contract},r3={list:fl.contract,get:vl.contract,create:kl.contract,update:Il.contract,delete:Pl.contract}});var _j,jj,Rj,Uj,Ej,Kj,xj,Ha,Gj,Mj,Bj,nk,Jj,qj,Hj,Wj,Yj,Xj,Fj,Zj,Qj,Vj,a3,e1,t1,Ji,qi,Hi,Wi,Yi,Sl,c3;var ok=g(()=>{we();Ne();_j=c.enum(["eq","neq","in","contains","starts_with","gt","gte","lt","lte","between","exists"]).describe("Filter operator: 'eq' (equals), 'neq' (not equals), 'in' (in array), 'contains' (substring), 'starts_with' (prefix), 'gt' (greater than), 'gte' (greater than or equal), 'lt' (less than), 'lte' (less than or equal), 'between' (range), 'exists' (field exists)"),jj=c.enum(["any","all","phrase"]).describe("Search mode: 'any' (match any token), 'all' (match all tokens), 'phrase' (exact phrase match)"),Rj=c.object({query:c.string().min(1,"Search query must be at least 1 character").max(500,"Search query must be at most 500 characters").describe("Search query text (1-500 characters)"),fields:c.array(c.string()).optional().describe("Fields to search in (defaults to backend allowlist)"),mode:jj.optional().default("all").describe("Token matching mode")}),Uj=c.object({field:c.string().describe("Field name to filter on"),op:_j.describe("Filter operator"),value:c.union([c.string(),c.number(),c.boolean(),c.array(c.union([c.string(),c.number()])),c.object({from:c.string(),to:c.string()})]).describe("Filter value (type depends on operator)")}).superRefine((e,t)=>{if(e.op==="in"&&!Array.isArray(e.value))t.addIssue({code:c.ZodIssueCode.custom,message:"Value must be an array when op is 'in'",path:["value"]});if(e.op==="between"){let n=e.value;if(!(typeof n==="object"&&n!==null&&("from"in n)&&("to"in n)))t.addIssue({code:c.ZodIssueCode.custom,message:"Value must be an object with from/to when op is 'between'",path:["value"]})}if(e.op==="exists"&&typeof e.value!=="boolean")t.addIssue({code:c.ZodIssueCode.custom,message:"Value must be boolean when op is 'exists'",path:["value"]})}),Ej=c.object({field:c.string().describe("Field name to sort by"),direction:c.enum(["asc","desc"]).default("desc").describe("Sort direction: 'asc' for ascending, 'desc' for descending")}),Kj=c.object({limit:c.number().int().min(1,"Limit must be at least 1").max(1000,"Limit must be at most 1000").default(50).describe("Maximum number of rows to return"),cursor:c.string().optional().describe("Opaque cursor from previous response for pagination")}),xj=c.object({projectId:c.string().uuid().optional().describe("Project to query logs for. Auto-filled from CLI and SDK context when omitted."),search:Rj.optional().describe("Full-text search configuration"),filters:c.array(Uj).optional().describe("Structured filter clauses (ANDed together). When no `timestamp` filter is provided, queries default to a 24h look-back window; pass an explicit `timestamp` filter to query a different range."),select:c.array(c.string()).optional().describe("Fields to return (defaults to backend default set)"),sort:Ej.optional().describe("Sort configuration (defaults to timestamp desc)"),pagination:Kj.optional().describe("Pagination configuration")}),Ha=c.enum(["clickhouse","better-stack","datadog","gcp","axiom","cloudwatch","sentry","posthog","mezmo"]),Gj=c.enum(["native","external"]),Mj=c.object({projectId:c.string().uuid().optional().describe("Project to inspect. Auto-filled from CLI and SDK context when omitted.")}),Bj=c.object({backend:c.object({id:Ha,name:c.string(),kind:Gj}).describe("Active log backend for the project"),features:c.array(c.string()).describe("Backend features registered on the server"),commands:c.array(c.enum(["schema","query","volume","patterns","nativeQuery"])).describe("CLI/API commands available for this backend"),queryableFields:c.array(c.string()).describe("Fields accepted by the normalized logs.query contract"),searchableFields:c.array(c.string()).describe("Fields accepted by logs.query full-text search"),observedServiceNames:c.array(c.string()).describe("Recently observed service names for this project"),observedAttributeKeys:c.array(c.string()).describe("Recently observed log attribute keys for this project"),schemaContext:c.record(c.string(),c.any()).optional().describe("Backend-specific schema guidance and examples")}),nk=c.enum(["1m","5m","15m","1h"]),Jj=c.enum(["service_name","severity_text","environment"]),qj=c.object({projectId:c.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),startDate:c.string().datetime({offset:!0}),endDate:c.string().datetime({offset:!0}),interval:nk.optional().describe("Aggregation bucket size for the volume series"),groupBy:Jj.optional().describe("Optional field to split volume series by"),filters:c.object({service_name:c.string().optional(),severity_text:c.string().optional(),environment:c.string().optional()}).optional()}).refine((e)=>new Date(e.startDate)<new Date(e.endDate),{message:"startDate must be before endDate",path:["endDate"]}),Hj=c.object({total:c.number().nonnegative(),startDate:c.string().datetime({offset:!0}),endDate:c.string().datetime({offset:!0}),interval:nk,series:c.array(c.object({group:c.string(),total:c.number().nonnegative(),points:c.array(c.object({bucket:c.string(),count:c.number().nonnegative()}))}))}),Wj=c.object({projectId:c.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),query:c.string().min(1).max(500).optional().describe("Optional text to match against normalized log patterns"),severity:c.string().optional().describe("Optional severity_text value, for example ERROR"),startDate:c.string().datetime({offset:!0}).optional().describe("Optional earliest last-seen timestamp"),endDate:c.string().datetime({offset:!0}).optional().describe("Optional latest last-seen timestamp"),limit:c.number().int().min(1).max(100).default(25).describe("Maximum number of log patterns to return")}).refine((e)=>!e.startDate||!e.endDate||new Date(e.startDate)<new Date(e.endDate),{message:"startDate must be before endDate",path:["endDate"]}),Yj=c.object({serviceName:c.string().nullable(),fingerprint:c.string(),pattern:c.string(),severity:c.string().nullable(),occurrences:c.number().nonnegative(),firstSeen:c.string().nullable(),lastSeen:c.string().nullable(),representativeId:c.string().nullable()}),Xj=c.object({patterns:c.array(Yj),meta:c.object({backendId:Ha,count:c.number().int().nonnegative(),took:c.number().nonnegative()})}),Fj=c.object({projectId:c.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),query:c.string().min(1,"Query cannot be empty").max(1e4,"Query must be 10000 characters or less")}),Zj=c.object({result:c.string().describe("Backend-formatted query result"),format:c.literal("text"),meta:c.object({backendId:Ha,took:c.number().nonnegative(),truncated:c.boolean()})}),Qj=c.object({projectId:c.string().uuid().optional().describe("Project to query. Auto-filled from CLI and SDK context when omitted."),query:c.string().min(1,"Query must be at least 1 character long.").max(4000,"Query must be at most 4000 characters").describe("Natural-language logs question. Examples: 'api request failures in the last day', 'timeouts in intake', 'top ERROR patterns for public-api'.")}),Vj=c.object({answer:c.string().describe("Evidence-backed natural-language answer to the logs question"),steps:c.number().int().nonnegative().describe("Number of nested model steps used"),toolCalls:c.number().int().nonnegative().describe("Number of nested tool calls used"),compacted:c.boolean().describe("Whether nested messages were compacted during the search"),meta:c.object({backendId:Ha,took:c.number().nonnegative(),modelProvider:c.string().optional(),modelId:c.string().optional()})}),a3=c.object({cursor:c.string().nullable().describe("Cursor for next page (null if no more results)"),hasMore:c.boolean().describe("Whether more results are available")}),e1=c.object({count:c.number().int().nonnegative().describe("Number of log rows returned in this response"),took:c.number().nonnegative().describe("Query execution time in milliseconds")}),t1=c.object({data:c.array(c.record(c.string(),c.any())).describe("Array of log rows with selected fields"),nextCursor:c.string().nullable().describe("Pass as 'cursor' in the next query to fetch the next page. Null when there are no more results."),meta:e1.describe("Query execution metadata")}),Ji=$({operationId:"logs.query",description:"Query logs within one project.",backend:"api",route:{method:"POST",path:"/logs/query",tags:["Logs"]},input:xj,output:t1,pagination:"cursor",async:"sync"}),qi=$({operationId:"logs.schema",description:"Describe the active log backend, supported commands, query fields, and schema context.",backend:"api",route:{method:"POST",path:"/logs/schema",tags:["Logs"]},input:Mj,output:Bj,pagination:"none",async:"sync"}),Hi=$({operationId:"logs.volume",description:"Query pre-aggregated log volume for one project.",backend:"api",route:{method:"POST",path:"/logs/volume",tags:["Logs"]},input:qj,output:Hj,pagination:"none",async:"sync"}),Wi=$({operationId:"logs.patterns",description:"Query normalized log patterns for discovery workflows.",backend:"api",route:{method:"POST",path:"/logs/patterns",tags:["Logs"]},input:Wj,output:Xj,pagination:"none",async:"sync"}),Yi=$({operationId:"logs.nativeQuery",description:"Run a read-only query in the log store's native query language, with server-side guardrails.",backend:"api",route:{method:"POST",path:"/logs/native-query",tags:["Logs"]},input:Fj,output:Zj,pagination:"none",async:"sync"}),Sl=$({operationId:"logs.searchNatural",summary:"Natural Language Log Search",description:"Search project logs by asking a natural-language question. Experimental.",backend:"api",route:{method:"POST",path:"/logs/search-natural",tags:["Logs"]},input:Qj,output:Vj,pagination:"none",async:"sync"}),c3={query:Ji.contract,schema:qi.contract,volume:Hi.contract,patterns:Wi.contract,nativeQuery:Yi.contract,searchNatural:Sl.contract}});var n1=g(()=>{Hh()});var ik=g(()=>{n1()});var i1=()=>{};var rk,ak,Ol,s3,h3,Xi,$l,r1,a1,ck,c1,s1,l3,h1,sk,u3,g3,d3,y3,b3,p3,m3,w3,f3,v3,k3,I3,P3,hk,l1,u1,S3,lk;var Tl=g(()=>{we();rk=["streamable-http","sse"],ak=["none","headers","oauth","aws-sigv4"],Ol=["none","client_secret_basic","client_secret_post"],s3=["preset","custom"],h3=["configured","authorizing","connected","error"],Xi=["enabled","disabled","custom-only"],$l=["enabled","write_blocked","disabled"],r1=c.enum(rk),a1=c.enum(ak),ck=c.enum(Ol),c1=c.enum(s3),s1=c.enum(h3),l3=c.enum(Xi),h1=c.enum($l),sk=c.object({id:c.string().min(1),name:c.string().min(1),value:c.string().min(1)}),u3=c.object({id:c.string().min(1),name:c.string().min(1),maskedValue:c.string().min(1)}),g3=c.object({authMode:c.literal("none")}),d3=c.object({tokenUrl:c.string().url(),clientId:c.string().min(1),clientSecret:c.string().min(1).optional(),tokenEndpointAuthMethod:ck.optional(),refreshToken:c.string().min(1),headerName:c.string().min(1).default("Authorization"),headerValuePrefix:c.string().default("Bearer "),expiresAt:c.string().datetime().optional()}),y3=c.object({authMode:c.literal("headers"),headers:c.array(sk),refreshCredentials:d3.optional()}),b3=c.object({authMode:c.literal("aws-sigv4"),accessKeyId:c.string().min(1),secretAccessKey:c.string().min(1),sessionToken:c.string().min(1).optional(),region:c.string().min(1),service:c.string().min(1).default("aws-mcp")}),p3=c.preprocess((e)=>{if(typeof e!=="string")return;let t=e.trim();return t.length>0?t:void 0},c.string().min(1).optional()).optional(),m3=c.object({accessToken:c.string().min(1),refreshToken:c.string().min(1).optional(),tokenType:c.string().min(1).optional(),scope:p3,expiresAt:c.string().datetime().optional()}).transform(({scope:e,...t})=>{return e===void 0?t:{...t,scope:e}}),w3=c.object({authMode:c.literal("oauth"),providerId:c.string().min(1),tokens:m3,headers:c.array(sk).optional()}),f3=c.discriminatedUnion("authMode",[g3,y3,w3,b3]),v3=c.string().min(1).regex(/^enc:v1:/,"Encrypted auth config must use enc:v1 format."),k3=c.object({codeVerifier:c.string().min(1),clientId:c.string().min(1),clientSecret:c.string().min(1).optional(),tokenEndpointAuthMethod:ck.optional(),tokenUrl:c.string().url().optional(),resourceUrl:c.string().url().optional(),projectId:c.string().uuid().optional(),returnTo:c.string().min(1).max(2000).optional(),messageId:c.string().min(1).max(240).optional(),scopes:c.array(c.string().min(1)).optional()}),I3=c.object({type:c.string().optional(),properties:c.record(c.string(),c.unknown()).optional(),required:c.array(c.string()).optional(),additionalProperties:c.boolean().optional()}).catchall(c.unknown()),P3=c.object({supportsOAuth:c.boolean().default(!1),supportsCustomHeaders:c.boolean().default(!0),supportsToolDiscovery:c.boolean().default(!0),readOnlyToolNames:c.array(c.string()).default([])}),hk=c.object({name:c.string().min(1),title:c.string().min(1),description:c.string().min(1),inputSchema:I3,annotations:c.record(c.string(),c.unknown()).default({}),availability:h1,isReadOnly:c.boolean()}),l1=c.object({discoveredAt:c.string().datetime(),tools:c.array(hk)}),u1=c.object({mode:c.enum(["user","system"]),managedBy:c.object({type:c.literal("integration"),id:c.string().min(1),displayName:c.string().min(1),iconKey:c.string().min(1)}).nullable(),capabilities:c.object({canRename:c.boolean(),canEditCredentials:c.boolean(),canSetReadOnly:c.boolean(),canConfigureTools:c.boolean(),canDisconnect:c.boolean()})}),S3=c.object({id:c.string().uuid(),organizationId:c.string().min(1),projectId:c.string().uuid(),providerId:c.string().min(1),source:c1,displayName:c.string().min(1),connectionKey:c.string().min(1),serverUrl:c.string().url(),transport:r1,authMode:a1,installStatus:s1,installedByUserId:c.string().nullable(),connectedAt:c.string().datetime().nullable(),toolSnapshot:l1.nullable(),enabledToolNames:c.array(c.string()),readOnly:c.boolean().default(!1),version:c.number().int().nonnegative(),createdAt:c.string().datetime(),updatedAt:c.string().datetime(),deletedAt:c.string().datetime().nullable()}),lk=u1});var gk=K((SLe,Ll)=>{var g1,d1,y1,b1,p1,m1,w1,f1,v1,k1,I1,P1,S1,Al,uk,O1,$1,T1,Fi,A1,C1,L1,D1,z1,N1,_1,j1,R1,Cl,U1,E1,K1;(function(e){var t=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(i){e(n(t,n(i)))});else if(typeof Ll==="object"&&typeof SLe==="object")e(n(t,n(SLe)));else e(n(t));function n(i,o){if(i!==t)if(typeof Object.create==="function")Object.defineProperty(i,"__esModule",{value:!0});else i.__esModule=!0;return function(r,a){return i[r]=o?o(r,a):a}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var s in a)if(Object.prototype.hasOwnProperty.call(a,s))r[s]=a[s]};g1=function(r,a){if(typeof a!=="function"&&a!==null)throw TypeError("Class extends value "+String(a)+" is not a constructor or null");t(r,a);function s(){this.constructor=r}r.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)},d1=Object.assign||function(r){for(var a,s=1,h=arguments.length;s<h;s++){a=arguments[s];for(var l in a)if(Object.prototype.hasOwnProperty.call(a,l))r[l]=a[l]}return r},y1=function(r,a){var s={};for(var h in r)if(Object.prototype.hasOwnProperty.call(r,h)&&a.indexOf(h)<0)s[h]=r[h];if(r!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var l=0,h=Object.getOwnPropertySymbols(r);l<h.length;l++)if(a.indexOf(h[l])<0&&Object.prototype.propertyIsEnumerable.call(r,h[l]))s[h[l]]=r[h[l]]}return s},b1=function(r,a,s,h){var l=arguments.length,u=l<3?a:h===null?h=Object.getOwnPropertyDescriptor(a,s):h,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")u=Reflect.decorate(r,a,s,h);else for(var y=r.length-1;y>=0;y--)if(d=r[y])u=(l<3?d(u):l>3?d(a,s,u):d(a,s))||u;return l>3&&u&&Object.defineProperty(a,s,u),u},p1=function(r,a){return function(s,h){a(s,h,r)}},m1=function(r,a,s,h,l,u){function d(me){if(me!==void 0&&typeof me!=="function")throw TypeError("Function expected");return me}var y=h.kind,b=y==="getter"?"get":y==="setter"?"set":"value",w=!a&&r?h.static?r:r.prototype:null,f=a||(w?Object.getOwnPropertyDescriptor(w,h.name):{}),P,A=!1;for(var N=s.length-1;N>=0;N--){var U={};for(var X in h)U[X]=X==="access"?{}:h[X];for(var X in h.access)U.access[X]=h.access[X];U.addInitializer=function(me){if(A)throw TypeError("Cannot add initializers after decoration has completed");u.push(d(me||null))};var B=(0,s[N])(y==="accessor"?{get:f.get,set:f.set}:f[b],U);if(y==="accessor"){if(B===void 0)continue;if(B===null||typeof B!=="object")throw TypeError("Object expected");if(P=d(B.get))f.get=P;if(P=d(B.set))f.set=P;if(P=d(B.init))l.unshift(P)}else if(P=d(B))if(y==="field")l.unshift(P);else f[b]=P}if(w)Object.defineProperty(w,h.name,f);A=!0},w1=function(r,a,s){var h=arguments.length>2;for(var l=0;l<a.length;l++)s=h?a[l].call(r,s):a[l].call(r);return h?s:void 0},f1=function(r){return typeof r==="symbol"?r:"".concat(r)},v1=function(r,a,s){if(typeof a==="symbol")a=a.description?"[".concat(a.description,"]"):"";return Object.defineProperty(r,"name",{configurable:!0,value:s?"".concat(s," ",a):a})},k1=function(r,a){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(r,a)},I1=function(r,a,s,h){function l(u){return u instanceof s?u:new s(function(d){d(u)})}return new(s||(s=Promise))(function(u,d){function y(f){try{w(h.next(f))}catch(P){d(P)}}function b(f){try{w(h.throw(f))}catch(P){d(P)}}function w(f){f.done?u(f.value):l(f.value).then(y,b)}w((h=h.apply(r,a||[])).next())})},P1=function(r,a){var s={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},h,l,u,d=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return d.next=y(0),d.throw=y(1),d.return=y(2),typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function y(w){return function(f){return b([w,f])}}function b(w){if(h)throw TypeError("Generator is already executing.");while(d&&(d=0,w[0]&&(s=0)),s)try{if(h=1,l&&(u=w[0]&2?l.return:w[0]?l.throw||((u=l.return)&&u.call(l),0):l.next)&&!(u=u.call(l,w[1])).done)return u;if(l=0,u)w=[w[0]&2,u.value];switch(w[0]){case 0:case 1:u=w;break;case 4:return s.label++,{value:w[1],done:!1};case 5:s.label++,l=w[1],w=[0];continue;case 7:w=s.ops.pop(),s.trys.pop();continue;default:if((u=s.trys,!(u=u.length>0&&u[u.length-1]))&&(w[0]===6||w[0]===2)){s=0;continue}if(w[0]===3&&(!u||w[1]>u[0]&&w[1]<u[3])){s.label=w[1];break}if(w[0]===6&&s.label<u[1]){s.label=u[1],u=w;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(w);break}if(u[2])s.ops.pop();s.trys.pop();continue}w=a.call(r,s)}catch(f){w=[6,f],l=0}finally{h=u=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}},S1=function(r,a){for(var s in r)if(s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s))Cl(a,r,s)},Cl=Object.create?function(r,a,s,h){if(h===void 0)h=s;var l=Object.getOwnPropertyDescriptor(a,s);if(!l||("get"in l?!a.__esModule:l.writable||l.configurable))l={enumerable:!0,get:function(){return a[s]}};Object.defineProperty(r,h,l)}:function(r,a,s,h){if(h===void 0)h=s;r[h]=a[s]},Al=function(r){var a=typeof Symbol==="function"&&Symbol.iterator,s=a&&r[a],h=0;if(s)return s.call(r);if(r&&typeof r.length==="number")return{next:function(){if(r&&h>=r.length)r=void 0;return{value:r&&r[h++],done:!r}}};throw TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},uk=function(r,a){var s=typeof Symbol==="function"&&r[Symbol.iterator];if(!s)return r;var h=s.call(r),l,u=[],d;try{while((a===void 0||a-- >0)&&!(l=h.next()).done)u.push(l.value)}catch(y){d={error:y}}finally{try{if(l&&!l.done&&(s=h.return))s.call(h)}finally{if(d)throw d.error}}return u},O1=function(){for(var r=[],a=0;a<arguments.length;a++)r=r.concat(uk(arguments[a]));return r},$1=function(){for(var r=0,a=0,s=arguments.length;a<s;a++)r+=arguments[a].length;for(var h=Array(r),l=0,a=0;a<s;a++)for(var u=arguments[a],d=0,y=u.length;d<y;d++,l++)h[l]=u[d];return h},T1=function(r,a,s){if(s||arguments.length===2){for(var h=0,l=a.length,u;h<l;h++)if(u||!(h in a)){if(!u)u=Array.prototype.slice.call(a,0,h);u[h]=a[h]}}return r.concat(u||Array.prototype.slice.call(a))},Fi=function(r){return this instanceof Fi?(this.v=r,this):new Fi(r)},A1=function(r,a,s){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var h=s.apply(r,a||[]),l,u=[];return l=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),y("next"),y("throw"),y("return",d),l[Symbol.asyncIterator]=function(){return this},l;function d(N){return function(U){return Promise.resolve(U).then(N,P)}}function y(N,U){if(h[N]){if(l[N]=function(X){return new Promise(function(B,me){u.push([N,X,B,me])>1||b(N,X)})},U)l[N]=U(l[N])}}function b(N,U){try{w(h[N](U))}catch(X){A(u[0][3],X)}}function w(N){N.value instanceof Fi?Promise.resolve(N.value.v).then(f,P):A(u[0][2],N)}function f(N){b("next",N)}function P(N){b("throw",N)}function A(N,U){if(N(U),u.shift(),u.length)b(u[0][0],u[0][1])}},C1=function(r){var a,s;return a={},h("next"),h("throw",function(l){throw l}),h("return"),a[Symbol.iterator]=function(){return this},a;function h(l,u){a[l]=r[l]?function(d){return(s=!s)?{value:Fi(r[l](d)),done:!1}:u?u(d):d}:u}},L1=function(r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var a=r[Symbol.asyncIterator],s;return a?a.call(r):(r=typeof Al==="function"?Al(r):r[Symbol.iterator](),s={},h("next"),h("throw"),h("return"),s[Symbol.asyncIterator]=function(){return this},s);function h(u){s[u]=r[u]&&function(d){return new Promise(function(y,b){d=r[u](d),l(y,b,d.done,d.value)})}}function l(u,d,y,b){Promise.resolve(b).then(function(w){u({value:w,done:y})},d)}},D1=function(r,a){if(Object.defineProperty)Object.defineProperty(r,"raw",{value:a});else r.raw=a;return r};var n=Object.create?function(r,a){Object.defineProperty(r,"default",{enumerable:!0,value:a})}:function(r,a){r.default=a},i=function(r){return i=Object.getOwnPropertyNames||function(a){var s=[];for(var h in a)if(Object.prototype.hasOwnProperty.call(a,h))s[s.length]=h;return s},i(r)};z1=function(r){if(r&&r.__esModule)return r;var a={};if(r!=null){for(var s=i(r),h=0;h<s.length;h++)if(s[h]!=="default")Cl(a,r,s[h])}return n(a,r),a},N1=function(r){return r&&r.__esModule?r:{default:r}},_1=function(r,a,s,h){if(s==="a"&&!h)throw TypeError("Private accessor was defined without a getter");if(typeof a==="function"?r!==a||!h:!a.has(r))throw TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?h:s==="a"?h.call(r):h?h.value:a.get(r)},j1=function(r,a,s,h,l){if(h==="m")throw TypeError("Private method is not writable");if(h==="a"&&!l)throw TypeError("Private accessor was defined without a setter");if(typeof a==="function"?r!==a||!l:!a.has(r))throw TypeError("Cannot write private member to an object whose class did not declare it");return h==="a"?l.call(r,s):l?l.value=s:a.set(r,s),s},R1=function(r,a){if(a===null||typeof a!=="object"&&typeof a!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof r==="function"?a===r:r.has(a)},U1=function(r,a,s){if(a!==null&&a!==void 0){if(typeof a!=="object"&&typeof a!=="function")throw TypeError("Object expected.");var h,l;if(s){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");h=a[Symbol.asyncDispose]}if(h===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(h=a[Symbol.dispose],s)l=h}if(typeof h!=="function")throw TypeError("Object not disposable.");if(l)h=function(){try{l.call(this)}catch(u){return Promise.reject(u)}};r.stack.push({value:a,dispose:h,async:s})}else if(s)r.stack.push({async:!0});return a};var o=typeof SuppressedError==="function"?SuppressedError:function(r,a,s){var h=Error(s);return h.name="SuppressedError",h.error=r,h.suppressed=a,h};E1=function(r){function a(u){r.error=r.hasError?new o(u,r.error,"An error was suppressed during disposal."):u,r.hasError=!0}var s,h=0;function l(){while(s=r.stack.pop())try{if(!s.async&&h===1)return h=0,r.stack.push(s),Promise.resolve().then(l);if(s.dispose){var u=s.dispose.call(s.value);if(s.async)return h|=2,Promise.resolve(u).then(l,function(d){return a(d),l()})}else h|=1}catch(d){a(d)}if(h===1)return r.hasError?Promise.reject(r.error):Promise.resolve();if(r.hasError)throw r.error}return l()},K1=function(r,a){if(typeof r==="string"&&/^\.\.?\//.test(r))return r.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(s,h,l,u,d){return h?a?".jsx":".js":l&&(!u||!d)?s:l+u+"."+d.toLowerCase()+"js"});return r},e("__extends",g1),e("__assign",d1),e("__rest",y1),e("__decorate",b1),e("__param",p1),e("__esDecorate",m1),e("__runInitializers",w1),e("__propKey",f1),e("__setFunctionName",v1),e("__metadata",k1),e("__awaiter",I1),e("__generator",P1),e("__exportStar",S1),e("__createBinding",Cl),e("__values",Al),e("__read",uk),e("__spread",O1),e("__spreadArrays",$1),e("__spreadArray",T1),e("__await",Fi),e("__asyncGenerator",A1),e("__asyncDelegator",C1),e("__asyncValues",L1),e("__makeTemplateObject",D1),e("__importStar",z1),e("__importDefault",N1),e("__classPrivateFieldGet",_1),e("__classPrivateFieldSet",j1),e("__classPrivateFieldIn",R1),e("__addDisposableResource",U1),e("__disposeResources",E1),e("__rewriteRelativeImportExtension",K1)})});var dk=K((x1)=>{Object.defineProperty(x1,"__esModule",{value:!0});x1.MAX_HASHABLE_LENGTH=x1.INIT=x1.KEY=x1.DIGEST_LENGTH=x1.BLOCK_SIZE=void 0;x1.BLOCK_SIZE=64;x1.DIGEST_LENGTH=32;x1.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);x1.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];x1.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1});var J1=K((M1)=>{Object.defineProperty(M1,"__esModule",{value:!0});M1.RawSha256=void 0;var Bt=dk(),C3=function(){function e(){this.state=Int32Array.from(Bt.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw Error("Attempted to update an already finished hash.");var n=0,i=t.byteLength;if(this.bytesHashed+=i,this.bytesHashed*8>Bt.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");while(i>0)if(this.buffer[this.bufferLength++]=t[n++],i--,this.bufferLength===Bt.BLOCK_SIZE)this.hashBuffer(),this.bufferLength=0},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),i=this.bufferLength;if(n.setUint8(this.bufferLength++,128),i%Bt.BLOCK_SIZE>=Bt.BLOCK_SIZE-8){for(var o=this.bufferLength;o<Bt.BLOCK_SIZE;o++)n.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(var o=this.bufferLength;o<Bt.BLOCK_SIZE-8;o++)n.setUint8(o,0);n.setUint32(Bt.BLOCK_SIZE-8,Math.floor(t/4294967296),!0),n.setUint32(Bt.BLOCK_SIZE-4,t),this.hashBuffer(),this.finished=!0}var r=new Uint8Array(Bt.DIGEST_LENGTH);for(var o=0;o<8;o++)r[o*4]=this.state[o]>>>24&255,r[o*4+1]=this.state[o]>>>16&255,r[o*4+2]=this.state[o]>>>8&255,r[o*4+3]=this.state[o]>>>0&255;return r},e.prototype.hashBuffer=function(){var t=this,n=t.buffer,i=t.state,o=i[0],r=i[1],a=i[2],s=i[3],h=i[4],l=i[5],u=i[6],d=i[7];for(var y=0;y<Bt.BLOCK_SIZE;y++){if(y<16)this.temp[y]=(n[y*4]&255)<<24|(n[y*4+1]&255)<<16|(n[y*4+2]&255)<<8|n[y*4+3]&255;else{var b=this.temp[y-2],w=(b>>>17|b<<15)^(b>>>19|b<<13)^b>>>10;b=this.temp[y-15];var f=(b>>>7|b<<25)^(b>>>18|b<<14)^b>>>3;this.temp[y]=(w+this.temp[y-7]|0)+(f+this.temp[y-16]|0)}var P=(((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&l^~h&u)|0)+(d+(Bt.KEY[y]+this.temp[y]|0)|0)|0,A=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&r^o&a^r&a)|0;d=u,u=l,l=h,h=s+P|0,s=a,a=r,r=o,o=P+A|0}i[0]+=o,i[1]+=r,i[2]+=a,i[3]+=s,i[4]+=h,i[5]+=l,i[6]+=u,i[7]+=d},e}();M1.RawSha256=C3});var W1=K((TLe,H1)=>{var{defineProperty:Dl,getOwnPropertyDescriptor:L3,getOwnPropertyNames:D3}=Object,z3=Object.prototype.hasOwnProperty,N3=(e,t)=>Dl(e,"name",{value:t,configurable:!0}),_3=(e,t)=>{for(var n in t)Dl(e,n,{get:t[n],enumerable:!0})},j3=(e,t,n,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of D3(t))if(!z3.call(e,o)&&o!==n)Dl(e,o,{get:()=>t[o],enumerable:!(i=L3(t,o))||i.enumerable})}return e},R3=(e)=>j3(Dl({},"__esModule",{value:!0}),e),q1={};_3(q1,{isArrayBuffer:()=>U3});H1.exports=R3(q1);var U3=N3((e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]","isArrayBuffer")});var Z1=K((ALe,F1)=>{var{defineProperty:zl,getOwnPropertyDescriptor:E3,getOwnPropertyNames:K3}=Object,x3=Object.prototype.hasOwnProperty,Y1=(e,t)=>zl(e,"name",{value:t,configurable:!0}),G3=(e,t)=>{for(var n in t)zl(e,n,{get:t[n],enumerable:!0})},M3=(e,t,n,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of K3(t))if(!x3.call(e,o)&&o!==n)zl(e,o,{get:()=>t[o],enumerable:!(i=E3(t,o))||i.enumerable})}return e},B3=(e)=>M3(zl({},"__esModule",{value:!0}),e),X1={};G3(X1,{fromArrayBuffer:()=>q3,fromString:()=>H3});F1.exports=B3(X1);var J3=W1(),yk=dO("buffer"),q3=Y1((e,t=0,n=e.byteLength-t)=>{if(!(0,J3.isArrayBuffer)(e))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return yk.Buffer.from(e,t,n)},"fromArrayBuffer"),H3=Y1((e,t)=>{if(typeof e!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?yk.Buffer.from(e,t):yk.Buffer.from(e)},"fromString")});var n4=K((CLe,t4)=>{var{defineProperty:Nl,getOwnPropertyDescriptor:W3,getOwnPropertyNames:Y3}=Object,X3=Object.prototype.hasOwnProperty,bk=(e,t)=>Nl(e,"name",{value:t,configurable:!0}),F3=(e,t)=>{for(var n in t)Nl(e,n,{get:t[n],enumerable:!0})},Z3=(e,t,n,i)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of Y3(t))if(!X3.call(e,o)&&o!==n)Nl(e,o,{get:()=>t[o],enumerable:!(i=W3(t,o))||i.enumerable})}return e},Q3=(e)=>Z3(Nl({},"__esModule",{value:!0}),e),Q1={};F3(Q1,{fromUtf8:()=>e4,toUint8Array:()=>V3,toUtf8:()=>e5});t4.exports=Q3(Q1);var V1=Z1(),e4=bk((e)=>{let t=(0,V1.fromString)(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),V3=bk((e)=>{if(typeof e==="string")return e4(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)},"toUint8Array"),e5=bk((e)=>{if(typeof e==="string")return e;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return(0,V1.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength).toString("utf8")},"toUtf8")});var r4=K((o4)=>{Object.defineProperty(o4,"__esModule",{value:!0});o4.convertToBuffer=void 0;var t5=n4(),n5=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:t5.fromUtf8;function o5(e){if(e instanceof Uint8Array)return e;if(typeof e==="string")return n5(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)}o4.convertToBuffer=o5});var s4=K((a4)=>{Object.defineProperty(a4,"__esModule",{value:!0});a4.isEmptyData=void 0;function i5(e){if(typeof e==="string")return e.length===0;return e.byteLength===0}a4.isEmptyData=i5});var u4=K((h4)=>{Object.defineProperty(h4,"__esModule",{value:!0});h4.numToUint8=void 0;function r5(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}h4.numToUint8=r5});var y4=K((g4)=>{Object.defineProperty(g4,"__esModule",{value:!0});g4.uint32ArrayFrom=void 0;function a5(e){if(!Uint32Array.from){var t=new Uint32Array(e.length),n=0;while(n<e.length)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}g4.uint32ArrayFrom=a5});var b4=K((Zi)=>{Object.defineProperty(Zi,"__esModule",{value:!0});Zi.uint32ArrayFrom=Zi.numToUint8=Zi.isEmptyData=Zi.convertToBuffer=void 0;var c5=r4();Object.defineProperty(Zi,"convertToBuffer",{enumerable:!0,get:function(){return c5.convertToBuffer}});var s5=s4();Object.defineProperty(Zi,"isEmptyData",{enumerable:!0,get:function(){return s5.isEmptyData}});var h5=u4();Object.defineProperty(Zi,"numToUint8",{enumerable:!0,get:function(){return h5.numToUint8}});var l5=y4();Object.defineProperty(Zi,"uint32ArrayFrom",{enumerable:!0,get:function(){return l5.uint32ArrayFrom}})});var f4=K((m4)=>{Object.defineProperty(m4,"__esModule",{value:!0});m4.Sha256=void 0;var p4=gk(),jl=dk(),_l=J1(),pk=b4(),g5=function(){function e(t){this.secret=t,this.hash=new _l.RawSha256,this.reset()}return e.prototype.update=function(t){if((0,pk.isEmptyData)(t)||this.error)return;try{this.hash.update((0,pk.convertToBuffer)(t))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;if(this.outer){if(!this.outer.finished)this.outer.update(this.hash.digest());return this.outer.digest()}return this.hash.digest()},e.prototype.digest=function(){return p4.__awaiter(this,void 0,void 0,function(){return p4.__generator(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new _l.RawSha256,this.secret){this.outer=new _l.RawSha256;var t=d5(this.secret),n=new Uint8Array(jl.BLOCK_SIZE);n.set(t);for(var i=0;i<jl.BLOCK_SIZE;i++)t[i]^=54,n[i]^=92;this.hash.update(t),this.outer.update(n);for(var i=0;i<t.byteLength;i++)t[i]=0}},e}();m4.Sha256=g5;function d5(e){var t=(0,pk.convertToBuffer)(e);if(t.byteLength>jl.BLOCK_SIZE){var n=new _l.RawSha256;n.update(t),t=n.digest()}var i=new Uint8Array(jl.BLOCK_SIZE);return i.set(t),i}});var v4=K((mk)=>{Object.defineProperty(mk,"__esModule",{value:!0});var y5=gk();y5.__exportStar(f4(),mk)});var Rl=()=>{};var k4="io.modelcontextprotocol/related-task",El="2.0",Je,I4,P4,GLe,b5,p5,wk,Dt,Kl,Ve,Jt,qt,et,xl,m5,w5,S4,Wa,O4,$4,MLe,fk,f5,vk,v5,Ya,Qi,T4,k5,I5,P5,S5,O5,$5,T5,A5,A4,C5,kk,L5,D5,Ik,z5,Xa,Fa,N5,Za,Gl,_5,Pk,Sk,Ok,$k,BLe,Tk,Ak,Ck,j5,C4,L4,Lk,D4,Qa,Vi,z4,R5,U5,N4,E5,_4,Dk,K5,x5,j4,R4,G5,M5,B5,J5,q5,H5,W5,Y5,X5,U4,F5,Z5,zk,Nk,_k,Q5,V5,e8,jk,t8,E4,K4,n8,o8,x4,i8,G4,Ml,JLe,r8,a8,M4,c8,B4,s8,h8,l8,u8,g8,d8,y8,b8,p8,Ul,m8,w8,J4,q4,H4,f8,v8,k8,I8,P8,S8,O8,$8,T8,A8,C8,L8,D8,z8,N8,W4,_8,j8,Y4,R8,U8,E8,K8,X4,x8,G8,M8,B8,qLe,HLe,WLe,YLe,XLe,FLe;var Eo=g(()=>{ik();Je=qh((e)=>e!==null&&(typeof e==="object"||typeof e==="function")),I4=Le([v(),be().int()]),P4=v(),GLe=xe({ttl:be().optional(),pollInterval:be().optional()}),b5=q({ttl:be().optional()}),p5=q({taskId:v()}),wk=xe({progressToken:I4.optional(),[k4]:p5.optional()}),Dt=q({_meta:wk.optional()}),Kl=Dt.extend({task:b5.optional()}),Ve=q({method:v(),params:Dt.loose().optional()}),Jt=q({_meta:wk.optional()}),qt=q({method:v(),params:Jt.loose().optional()}),et=xe({_meta:wk.optional()}),xl=Le([v(),be().int()]),m5=q({jsonrpc:F(El),id:xl,...Ve.shape}).strict(),w5=q({jsonrpc:F(El),...qt.shape}).strict(),S4=q({jsonrpc:F(El),id:xl,result:et}).strict();(function(e){e[e.ConnectionClosed=-32000]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(Wa||(Wa={}));O4=q({jsonrpc:F(El),id:xl.optional(),error:q({code:be().int(),message:v(),data:Ce().optional()})}).strict(),$4=Le([m5,w5,S4,O4]),MLe=Le([S4,O4]),fk=et.strict(),f5=Jt.extend({requestId:xl.optional(),reason:v().optional()}),vk=qt.extend({method:F("notifications/cancelled"),params:f5}),v5=q({src:v(),mimeType:v().optional(),sizes:x(v()).optional(),theme:Qe(["light","dark"]).optional()}),Ya=q({icons:x(v5).optional()}),Qi=q({name:v(),title:v().optional()}),T4=Qi.extend({...Qi.shape,...Ya.shape,version:v(),websiteUrl:v().optional(),description:v().optional()}),k5=_i(q({applyDefaults:Se().optional()}),$e(v(),Ce())),I5=Ma((e)=>{if(e&&typeof e==="object"&&!Array.isArray(e)){if(Object.keys(e).length===0)return{form:{}}}return e},_i(q({form:k5.optional(),url:Je.optional()}),$e(v(),Ce()).optional())),P5=xe({list:Je.optional(),cancel:Je.optional(),requests:xe({sampling:xe({createMessage:Je.optional()}).optional(),elicitation:xe({create:Je.optional()}).optional()}).optional()}),S5=xe({list:Je.optional(),cancel:Je.optional(),requests:xe({tools:xe({call:Je.optional()}).optional()}).optional()}),O5=q({experimental:$e(v(),Je).optional(),sampling:q({context:Je.optional(),tools:Je.optional()}).optional(),elicitation:I5.optional(),roots:q({listChanged:Se().optional()}).optional(),tasks:P5.optional(),extensions:$e(v(),Je).optional()}),$5=Dt.extend({protocolVersion:v(),capabilities:O5,clientInfo:T4}),T5=Ve.extend({method:F("initialize"),params:$5}),A5=q({experimental:$e(v(),Je).optional(),logging:Je.optional(),completions:Je.optional(),prompts:q({listChanged:Se().optional()}).optional(),resources:q({subscribe:Se().optional(),listChanged:Se().optional()}).optional(),tools:q({listChanged:Se().optional()}).optional(),tasks:S5.optional(),extensions:$e(v(),Je).optional()}),A4=et.extend({protocolVersion:v(),capabilities:A5,serverInfo:T4,instructions:v().optional()}),C5=qt.extend({method:F("notifications/initialized"),params:Jt.optional()}),kk=Ve.extend({method:F("ping"),params:Dt.optional()}),L5=q({progress:be(),total:ze(be()),message:ze(v())}),D5=q({...Jt.shape,...L5.shape,progressToken:I4}),Ik=qt.extend({method:F("notifications/progress"),params:D5}),z5=Dt.extend({cursor:P4.optional()}),Xa=Ve.extend({params:z5.optional()}),Fa=et.extend({nextCursor:P4.optional()}),N5=Qe(["working","input_required","completed","failed","cancelled"]),Za=q({taskId:v(),status:N5,ttl:Le([be(),ja()]),createdAt:v(),lastUpdatedAt:v(),pollInterval:ze(be()),statusMessage:ze(v())}),Gl=et.extend({task:Za}),_5=Jt.merge(Za),Pk=qt.extend({method:F("notifications/tasks/status"),params:_5}),Sk=Ve.extend({method:F("tasks/get"),params:Dt.extend({taskId:v()})}),Ok=et.merge(Za),$k=Ve.extend({method:F("tasks/result"),params:Dt.extend({taskId:v()})}),BLe=et.loose(),Tk=Xa.extend({method:F("tasks/list")}),Ak=Fa.extend({tasks:x(Za)}),Ck=Ve.extend({method:F("tasks/cancel"),params:Dt.extend({taskId:v()})}),j5=et.merge(Za),C4=q({uri:v(),mimeType:ze(v()),_meta:$e(v(),Ce()).optional()}),L4=C4.extend({text:v()}),Lk=v().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),D4=C4.extend({blob:Lk}),Qa=Qe(["user","assistant"]),Vi=q({audience:x(Qa).optional(),priority:be().min(0).max(1).optional(),lastModified:co.datetime({offset:!0}).optional()}),z4=q({...Qi.shape,...Ya.shape,uri:v(),description:ze(v()),mimeType:ze(v()),size:ze(be()),annotations:Vi.optional(),_meta:ze(xe({}))}),R5=q({...Qi.shape,...Ya.shape,uriTemplate:v(),description:ze(v()),mimeType:ze(v()),annotations:Vi.optional(),_meta:ze(xe({}))}),U5=Xa.extend({method:F("resources/list")}),N4=Fa.extend({resources:x(z4)}),E5=Xa.extend({method:F("resources/templates/list")}),_4=Fa.extend({resourceTemplates:x(R5)}),Dk=Dt.extend({uri:v()}),K5=Dk,x5=Ve.extend({method:F("resources/read"),params:K5}),j4=et.extend({contents:x(Le([L4,D4]))}),R4=qt.extend({method:F("notifications/resources/list_changed"),params:Jt.optional()}),G5=Dk,M5=Ve.extend({method:F("resources/subscribe"),params:G5}),B5=Dk,J5=Ve.extend({method:F("resources/unsubscribe"),params:B5}),q5=Jt.extend({uri:v()}),H5=qt.extend({method:F("notifications/resources/updated"),params:q5}),W5=q({name:v(),description:ze(v()),required:ze(Se())}),Y5=q({...Qi.shape,...Ya.shape,description:ze(v()),arguments:ze(x(W5)),_meta:ze(xe({}))}),X5=Xa.extend({method:F("prompts/list")}),U4=Fa.extend({prompts:x(Y5)}),F5=Dt.extend({name:v(),arguments:$e(v(),v()).optional()}),Z5=Ve.extend({method:F("prompts/get"),params:F5}),zk=q({type:F("text"),text:v(),annotations:Vi.optional(),_meta:$e(v(),Ce()).optional()}),Nk=q({type:F("image"),data:Lk,mimeType:v(),annotations:Vi.optional(),_meta:$e(v(),Ce()).optional()}),_k=q({type:F("audio"),data:Lk,mimeType:v(),annotations:Vi.optional(),_meta:$e(v(),Ce()).optional()}),Q5=q({type:F("tool_use"),name:v(),id:v(),input:$e(v(),Ce()),_meta:$e(v(),Ce()).optional()}),V5=q({type:F("resource"),resource:Le([L4,D4]),annotations:Vi.optional(),_meta:$e(v(),Ce()).optional()}),e8=z4.extend({type:F("resource_link")}),jk=Le([zk,Nk,_k,e8,V5]),t8=q({role:Qa,content:jk}),E4=et.extend({description:v().optional(),messages:x(t8)}),K4=qt.extend({method:F("notifications/prompts/list_changed"),params:Jt.optional()}),n8=q({title:v().optional(),readOnlyHint:Se().optional(),destructiveHint:Se().optional(),idempotentHint:Se().optional(),openWorldHint:Se().optional()}),o8=q({taskSupport:Qe(["required","optional","forbidden"]).optional()}),x4=q({...Qi.shape,...Ya.shape,description:v().optional(),inputSchema:q({type:F("object"),properties:$e(v(),Je).optional(),required:x(v()).optional()}).catchall(Ce()),outputSchema:q({type:F("object"),properties:$e(v(),Je).optional(),required:x(v()).optional()}).catchall(Ce()).optional(),annotations:n8.optional(),execution:o8.optional(),_meta:$e(v(),Ce()).optional()}),i8=Xa.extend({method:F("tools/list")}),G4=Fa.extend({tools:x(x4)}),Ml=et.extend({content:x(jk).default([]),structuredContent:$e(v(),Ce()).optional(),isError:Se().optional()}),JLe=Ml.or(et.extend({toolResult:Ce()})),r8=Kl.extend({name:v(),arguments:$e(v(),Ce()).optional()}),a8=Ve.extend({method:F("tools/call"),params:r8}),M4=qt.extend({method:F("notifications/tools/list_changed"),params:Jt.optional()}),c8=q({autoRefresh:Se().default(!0),debounceMs:be().int().nonnegative().default(300)}),B4=Qe(["debug","info","notice","warning","error","critical","alert","emergency"]),s8=Dt.extend({level:B4}),h8=Ve.extend({method:F("logging/setLevel"),params:s8}),l8=Jt.extend({level:B4,logger:v().optional(),data:Ce()}),u8=qt.extend({method:F("notifications/message"),params:l8}),g8=q({name:v().optional()}),d8=q({hints:x(g8).optional(),costPriority:be().min(0).max(1).optional(),speedPriority:be().min(0).max(1).optional(),intelligencePriority:be().min(0).max(1).optional()}),y8=q({mode:Qe(["auto","required","none"]).optional()}),b8=q({type:F("tool_result"),toolUseId:v().describe("The unique identifier for the corresponding tool call."),content:x(jk).default([]),structuredContent:q({}).loose().optional(),isError:Se().optional(),_meta:$e(v(),Ce()).optional()}),p8=Ka("type",[zk,Nk,_k]),Ul=Ka("type",[zk,Nk,_k,Q5,b8]),m8=q({role:Qa,content:Le([Ul,x(Ul)]),_meta:$e(v(),Ce()).optional()}),w8=Kl.extend({messages:x(m8),modelPreferences:d8.optional(),systemPrompt:v().optional(),includeContext:Qe(["none","thisServer","allServers"]).optional(),temperature:be().optional(),maxTokens:be().int(),stopSequences:x(v()).optional(),metadata:Je.optional(),tools:x(x4).optional(),toolChoice:y8.optional()}),J4=Ve.extend({method:F("sampling/createMessage"),params:w8}),q4=et.extend({model:v(),stopReason:ze(Qe(["endTurn","stopSequence","maxTokens"]).or(v())),role:Qa,content:p8}),H4=et.extend({model:v(),stopReason:ze(Qe(["endTurn","stopSequence","maxTokens","toolUse"]).or(v())),role:Qa,content:Le([Ul,x(Ul)])}),f8=q({type:F("boolean"),title:v().optional(),description:v().optional(),default:Se().optional()}),v8=q({type:F("string"),title:v().optional(),description:v().optional(),minLength:be().optional(),maxLength:be().optional(),format:Qe(["email","uri","date","date-time"]).optional(),default:v().optional()}),k8=q({type:Qe(["number","integer"]),title:v().optional(),description:v().optional(),minimum:be().optional(),maximum:be().optional(),default:be().optional()}),I8=q({type:F("string"),title:v().optional(),description:v().optional(),enum:x(v()),default:v().optional()}),P8=q({type:F("string"),title:v().optional(),description:v().optional(),oneOf:x(q({const:v(),title:v()})),default:v().optional()}),S8=q({type:F("string"),title:v().optional(),description:v().optional(),enum:x(v()),enumNames:x(v()).optional(),default:v().optional()}),O8=Le([I8,P8]),$8=q({type:F("array"),title:v().optional(),description:v().optional(),minItems:be().optional(),maxItems:be().optional(),items:q({type:F("string"),enum:x(v())}),default:x(v()).optional()}),T8=q({type:F("array"),title:v().optional(),description:v().optional(),minItems:be().optional(),maxItems:be().optional(),items:q({anyOf:x(q({const:v(),title:v()}))}),default:x(v()).optional()}),A8=Le([$8,T8]),C8=Le([S8,O8,A8]),L8=Le([C8,f8,v8,k8]),D8=Kl.extend({mode:F("form").optional(),message:v(),requestedSchema:q({type:F("object"),properties:$e(v(),L8),required:x(v()).optional()})}),z8=Kl.extend({mode:F("url"),message:v(),elicitationId:v(),url:v().url()}),N8=Le([D8,z8]),W4=Ve.extend({method:F("elicitation/create"),params:N8}),_8=Jt.extend({elicitationId:v()}),j8=qt.extend({method:F("notifications/elicitation/complete"),params:_8}),Y4=et.extend({action:Qe(["accept","decline","cancel"]),content:Ma((e)=>e===null?void 0:e,$e(v(),Le([v(),be(),Se(),x(v())])).optional())}),R8=q({type:F("ref/resource"),uri:v()}),U8=q({type:F("ref/prompt"),name:v()}),E8=Dt.extend({ref:Le([U8,R8]),argument:q({name:v(),value:v()}),context:q({arguments:$e(v(),v()).optional()}).optional()}),K8=Ve.extend({method:F("completion/complete"),params:E8}),X4=et.extend({completion:xe({values:x(v()).max(100),total:ze(be().int()),hasMore:ze(Se())})}),x8=q({uri:v().startsWith("file://"),name:v().optional(),_meta:$e(v(),Ce()).optional()}),G8=Ve.extend({method:F("roots/list"),params:Dt.optional()}),M8=et.extend({roots:x(x8)}),B8=qt.extend({method:F("notifications/roots/list_changed"),params:Jt.optional()}),qLe=Le([kk,T5,K8,h8,Z5,X5,U5,E5,x5,M5,J5,a8,i8,Sk,$k,Tk,Ck]),HLe=Le([vk,Ik,C5,B8,Pk]),WLe=Le([fk,q4,H4,Y4,M8,Ok,Ak,Gl]),YLe=Le([kk,J4,W4,G8,Sk,$k,Tk,Ck]),XLe=Le([vk,Ik,u8,H5,R4,M4,K4,Pk,j8]),FLe=Le([fk,A4,X4,E4,U4,N4,_4,j4,Ml,G4,Ok,Ak,Gl])});var J8;var Bl=g(()=>{J8=Symbol("Let zodToJsonSchema decide on which parser to use")});var Rk=g(()=>{Bl()});var Ht=()=>{};var Uk=g(()=>{Me()});var Ek=()=>{};var Jl=g(()=>{Me()});var Kk=g(()=>{Me()});var xk=()=>{};var Gk=g(()=>{Me()});var Mk=g(()=>{Me();Ht()});var Bk=g(()=>{Me()});var CDe;var ql=g(()=>{CDe=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});var Hl=g(()=>{Me();ql();Jl();Ht()});var Jk=g(()=>{Me();Hl();Ht()});var qk=g(()=>{Ht()});var Wl=g(()=>{Me()});var Hk=g(()=>{Me();Wl()});var Wk=()=>{};var Yk=g(()=>{Me()});var Xk=g(()=>{Me();Ht()});var Fk=g(()=>{Me()});var Zk=g(()=>{Me()});var Qk=g(()=>{Me()});var Vk=g(()=>{Me()});var eI=g(()=>{Ht()});var tI=g(()=>{Ht()});var nI=g(()=>{Me()});var oI=g(()=>{Ht();Uk();Ek();Jl();Kk();xk();Gk();Mk();Bk();Jk();qk();Hk();Wk();Yk();Xk();Fk();Zk();Hl();Qk();ql();Vk();eI();Wl();tI();nI()});var Me=g(()=>{Bl();oI();Ht()});var F4=()=>{};var iI=g(()=>{Me();Rk();Ht()});var Z4=g(()=>{iI();Bl();Rk();Me();F4();Ht();Uk();Ek();Jl();Kk();xk();Gk();Mk();Bk();Jk();qk();Hk();Wk();Yk();Xk();Fk();Zk();nI();Hl();Qk();ql();Vk();eI();Wl();tI();oI();iI()});var V4=g(()=>{Rl();Z4()});var tR=g(()=>{Rl();Eo();V4()});var tc=K((iR)=>{Object.defineProperty(iR,"__esModule",{value:!0});iR.regexpCode=iR.getEsmExportName=iR.getProperty=iR.safeStringify=iR.stringify=iR.strConcat=iR.addCodeArg=iR.str=iR._=iR.nil=iR._Code=iR.Name=iR.IDENTIFIER=iR._CodeOrName=void 0;class Yl{}iR._CodeOrName=Yl;iR.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class er extends Yl{constructor(e){super();if(!iR.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}iR.Name=er;class nn extends Yl{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>{if(n instanceof er)t[n.str]=(t[n.str]||0)+1;return t},{})}}iR._Code=nn;iR.nil=new nn("");function nR(e,...t){let n=[e[0]],i=0;while(i<t.length)aI(n,t[i]),n.push(e[++i]);return new nn(n)}iR._=nR;var rI=new nn("+");function oR(e,...t){let n=[ec(e[0])],i=0;while(i<t.length)n.push(rI),aI(n,t[i]),n.push(rI,ec(e[++i]));return e7(n),new nn(n)}iR.str=oR;function aI(e,t){if(t instanceof nn)e.push(...t._items);else if(t instanceof er)e.push(t);else e.push(o7(t))}iR.addCodeArg=aI;function e7(e){let t=1;while(t<e.length-1){if(e[t]===rI){let n=t7(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function t7(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof er||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof er))return`"${e}${t.slice(1)}`;return}function n7(e,t){return t.emptyStr()?e:e.emptyStr()?t:oR`${e}${t}`}iR.strConcat=n7;function o7(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ec(Array.isArray(e)?e.join(","):e)}function i7(e){return new nn(ec(e))}iR.stringify=i7;function ec(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}iR.safeStringify=ec;function r7(e){return typeof e=="string"&&iR.IDENTIFIER.test(e)?new nn(`.${e}`):nR`[${e}]`}iR.getProperty=r7;function a7(e){if(typeof e=="string"&&iR.IDENTIFIER.test(e))return new nn(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}iR.getEsmExportName=a7;function c7(e){return new nn(e.toString())}iR.regexpCode=c7});var lI=K((sR)=>{Object.defineProperty(sR,"__esModule",{value:!0});sR.ValueScope=sR.ValueScopeName=sR.Scope=sR.varKinds=sR.UsedValueState=void 0;var Pt=tc();class aR extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var Fl;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Fl||(sR.UsedValueState=Fl={}));sR.varKinds={const:new Pt.Name("const"),let:new Pt.Name("let"),var:new Pt.Name("var")};class sI{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Pt.Name?e:this.name(e)}name(e){return new Pt.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}sR.Scope=sI;class hI extends Pt.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=Pt._`.${new Pt.Name(t)}[${n}]`}}sR.ValueScopeName=hI;var v7=Pt._`\n`;class cR extends sI{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?v7:Pt.nil}}get(){return this._scope}name(e){return new hI(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,r=(n=t.key)!==null&&n!==void 0?n:t.ref,a=this._values[o];if(a){let l=a.get(r);if(l)return l}else a=this._values[o]=new Map;a.set(r,i);let s=this._scope[o]||(this._scope[o]=[]),h=s.length;return s[h]=t.ref,i.setValue(t,{property:o,itemIndex:h}),i}getValue(e,t){let n=this._values[e];if(!n)return;return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(n)=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return Pt._`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,(i)=>{if(i.value===void 0)throw Error(`CodeGen: name "${i}" has no value`);return i.value.code},t,n)}_reduceValues(e,t,n={},i){let o=Pt.nil;for(let r in e){let a=e[r];if(!a)continue;let s=n[r]=n[r]||new Map;a.forEach((h)=>{if(s.has(h))return;s.set(h,Fl.Started);let l=t(h);if(l){let u=this.opts.es5?sR.varKinds.var:sR.varKinds.const;o=Pt._`${o}${u} ${h} = ${l};${this.opts._n}`}else if(l=i===null||i===void 0?void 0:i(h))o=Pt._`${o}${l}${this.opts._n}`;else throw new aR(h);s.set(h,Fl.Completed)})}return o}}sR.ValueScope=cR});var de=K((St)=>{Object.defineProperty(St,"__esModule",{value:!0});St.or=St.and=St.not=St.CodeGen=St.operators=St.varKinds=St.ValueScopeName=St.ValueScope=St.Scope=St.Name=St.regexpCode=St.stringify=St.getProperty=St.nil=St.strConcat=St.str=St._=void 0;var pe=tc(),on=lI(),so=tc();Object.defineProperty(St,"_",{enumerable:!0,get:function(){return so._}});Object.defineProperty(St,"str",{enumerable:!0,get:function(){return so.str}});Object.defineProperty(St,"strConcat",{enumerable:!0,get:function(){return so.strConcat}});Object.defineProperty(St,"nil",{enumerable:!0,get:function(){return so.nil}});Object.defineProperty(St,"getProperty",{enumerable:!0,get:function(){return so.getProperty}});Object.defineProperty(St,"stringify",{enumerable:!0,get:function(){return so.stringify}});Object.defineProperty(St,"regexpCode",{enumerable:!0,get:function(){return so.regexpCode}});Object.defineProperty(St,"Name",{enumerable:!0,get:function(){return so.Name}});var nu=lI();Object.defineProperty(St,"Scope",{enumerable:!0,get:function(){return nu.Scope}});Object.defineProperty(St,"ValueScope",{enumerable:!0,get:function(){return nu.ValueScope}});Object.defineProperty(St,"ValueScopeName",{enumerable:!0,get:function(){return nu.ValueScopeName}});Object.defineProperty(St,"varKinds",{enumerable:!0,get:function(){return nu.varKinds}});St.operators={GT:new pe._Code(">"),GTE:new pe._Code(">="),LT:new pe._Code("<"),LTE:new pe._Code("<="),EQ:new pe._Code("==="),NEQ:new pe._Code("!=="),NOT:new pe._Code("!"),OR:new pe._Code("||"),AND:new pe._Code("&&"),ADD:new pe._Code("+")};class ho{optimizeNodes(){return this}optimizeNames(e,t){return this}}class lR extends ho{constructor(e,t,n){super();this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?on.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=nr(this.rhs,e,t);return this}get names(){return this.rhs instanceof pe._CodeOrName?this.rhs.names:{}}}class dI extends ho{constructor(e,t,n){super();this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof pe.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=nr(this.rhs,e,t),this}get names(){let e=this.lhs instanceof pe.Name?{}:{...this.lhs.names};return tu(e,this.rhs)}}class uR extends dI{constructor(e,t,n,i){super(e,n,i);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class gR extends ho{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class dR extends ho{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class yR extends ho{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class bR extends ho{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=nr(this.code,e,t),this}get names(){return this.code instanceof pe._CodeOrName?this.code.names:{}}}class ou extends ho{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let n=e[t].optimizeNodes();if(Array.isArray(n))e.splice(t,1,...n);else if(n)e[t]=n;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,i=n.length;while(i--){let o=n[i];if(o.optimizeNames(e,t))continue;S7(e,o.names),n.splice(i,1)}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Ko(e,t.names),{})}}class lo extends ou{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class pR extends ou{}class nc extends lo{}nc.kind="else";class Rn extends lo{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new nc(n):n}if(t){if(e===!1)return t instanceof Rn?t:t.nodes;if(this.nodes.length)return this;return new Rn(kR(e),t instanceof Rn?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=nr(this.condition,e,t),this}get names(){let e=super.names;if(tu(e,this.condition),this.else)Ko(e,this.else.names);return e}}Rn.kind="if";class tr extends lo{}tr.kind="for";class mR extends tr{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=nr(this.iteration,e,t),this}get names(){return Ko(super.names,this.iteration.names)}}class wR extends tr{constructor(e,t,n,i){super();this.varKind=e,this.name=t,this.from=n,this.to=i}render(e){let t=e.es5?on.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${t} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=tu(super.names,this.from);return tu(e,this.to)}}class uI extends tr{constructor(e,t,n,i){super();this.loop=e,this.varKind=t,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=nr(this.iterable,e,t),this}get names(){return Ko(super.names,this.iterable.names)}}class Zl extends lo{constructor(e,t,n){super();this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}Zl.kind="func";class Ql extends ou{render(e){return"return "+super.render(e)}}Ql.kind="return";class fR extends lo{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,i;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(i=this.finally)===null||i===void 0||i.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)Ko(e,this.catch.names);if(this.finally)Ko(e,this.finally.names);return e}}class Vl extends lo{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Vl.kind="catch";class eu extends lo{render(e){return"finally"+super.render(e)}}eu.kind="finally";class vR{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
7476
7476
|
`:""},this._extScope=e,this._scope=new on.Scope({parent:e}),this._nodes=[new pR]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,i){let o=this._scope.toName(t);if(n!==void 0&&i)this._constants[o.str]=n;return this._leafNode(new lR(e,o,n)),o}const(e,t,n){return this._def(on.varKinds.const,e,t,n)}let(e,t,n){return this._def(on.varKinds.let,e,t,n)}var(e,t,n){return this._def(on.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new dI(e,t,n))}add(e,t){return this._leafNode(new uR(e,St.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==pe.nil)this._leafNode(new bR(e));return this}object(...e){let t=["{"];for(let[n,i]of e){if(t.length>1)t.push(",");if(t.push(n),n!==i||this.opts.es5)t.push(":"),(0,pe.addCodeArg)(t,i)}return t.push("}"),new pe._Code(t)}if(e,t,n){if(this._blockNode(new Rn(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Rn(e))}else(){return this._elseNode(new nc)}endIf(){return this._endBlockNode(Rn,nc)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new mR(e),t)}forRange(e,t,n,i,o=this.opts.es5?on.varKinds.var:on.varKinds.let){let r=this._scope.toName(e);return this._for(new wR(o,r,t,n),()=>i(r))}forOf(e,t,n,i=on.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let r=t instanceof pe.Name?t:this.var("_arr",t);return this.forRange("_i",0,pe._`${r}.length`,(a)=>{this.var(o,pe._`${r}[${a}]`),n(o)})}return this._for(new uI("of",i,o,t),()=>n(o))}forIn(e,t,n,i=this.opts.es5?on.varKinds.var:on.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,pe._`Object.keys(${t})`,n);let o=this._scope.toName(e);return this._for(new uI("in",i,o,t),()=>n(o))}endFor(){return this._endBlockNode(tr)}label(e){return this._leafNode(new gR(e))}break(e){return this._leafNode(new dR(e))}return(e){let t=new Ql;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(Ql)}try(e,t,n){if(!t&&!n)throw Error('CodeGen: "try" without "catch" and "finally"');let i=new fR;if(this._blockNode(i),this.code(e),t){let o=this.name("e");this._currNode=i.catch=new Vl(o),t(o)}if(n)this._currNode=i.finally=new eu,this.code(n);return this._endBlockNode(Vl,eu)}throw(e){return this._leafNode(new yR(e))}block(e,t){if(this._blockStarts.push(this._nodes.length),e)this.code(e).endBlock(t);return this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=pe.nil,n,i){if(this._blockNode(new Zl(e,t,n)),i)this.code(i).endFunc();return this}endFunc(){return this._endBlockNode(Zl)}optimize(e=1){while(e-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Rn))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}St.CodeGen=vR;function Ko(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function tu(e,t){return t instanceof pe._CodeOrName?Ko(e,t.names):e}function nr(e,t,n){if(e instanceof pe.Name)return i(e);if(!o(e))return e;return new pe._Code(e._items.reduce((r,a)=>{if(a instanceof pe.Name)a=i(a);if(a instanceof pe._Code)r.push(...a._items);else r.push(a);return r},[]));function i(r){let a=n[r.str];if(a===void 0||t[r.str]!==1)return r;return delete t[r.str],a}function o(r){return r instanceof pe._Code&&r._items.some((a)=>a instanceof pe.Name&&t[a.str]===1&&n[a.str]!==void 0)}}function S7(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function kR(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:pe._`!${gI(e)}`}St.not=kR;var O7=IR(St.operators.AND);function $7(...e){return e.reduce(O7)}St.and=$7;var T7=IR(St.operators.OR);function A7(...e){return e.reduce(T7)}St.or=A7;function IR(e){return(t,n)=>t===pe.nil?n:n===pe.nil?t:pe._`${gI(t)} ${e} ${gI(n)}`}function gI(e){return e instanceof pe.Name?e:pe._`(${e})`}});var fe=K((DR)=>{Object.defineProperty(DR,"__esModule",{value:!0});DR.checkStrictMode=DR.getErrorPath=DR.Type=DR.useFunc=DR.setEvaluated=DR.evaluatedPropsToName=DR.mergeEvaluated=DR.eachItem=DR.unescapeJsonPointer=DR.escapeJsonPointer=DR.escapeFragment=DR.unescapeFragment=DR.schemaRefOrVal=DR.schemaHasRulesButRef=DR.schemaHasRules=DR.checkUnknownRules=DR.alwaysValidSchema=DR.toHash=void 0;var _e=de(),z7=tc();function N7(e){let t={};for(let n of e)t[n]=!0;return t}DR.toHash=N7;function _7(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return $R(e,t),!TR(t,e.self.RULES.all)}DR.alwaysValidSchema=_7;function $R(e,t=e.schema){let{opts:n,self:i}=e;if(!n.strictSchema)return;if(typeof t==="boolean")return;let o=i.RULES.keywords;for(let r in t)if(!o[r])LR(e,`unknown keyword: "${r}"`)}DR.checkUnknownRules=$R;function TR(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(t[n])return!0;return!1}DR.schemaHasRules=TR;function j7(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}DR.schemaHasRulesButRef=j7;function R7({topSchemaRef:e,schemaPath:t},n,i,o){if(!o){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return _e._`${n}`}return _e._`${e}${t}${(0,_e.getProperty)(i)}`}DR.schemaRefOrVal=R7;function U7(e){return AR(decodeURIComponent(e))}DR.unescapeFragment=U7;function E7(e){return encodeURIComponent(bI(e))}DR.escapeFragment=E7;function bI(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}DR.escapeJsonPointer=bI;function AR(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}DR.unescapeJsonPointer=AR;function K7(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}DR.eachItem=K7;function SR({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:i}){return(o,r,a,s)=>{let h=a===void 0?r:a instanceof _e.Name?(r instanceof _e.Name?e(o,r,a):t(o,r,a),a):r instanceof _e.Name?(t(o,a,r),r):n(r,a);return s===_e.Name&&!(h instanceof _e.Name)?i(o,h):h}}DR.mergeEvaluated={props:SR({mergeNames:(e,t,n)=>e.if(_e._`${n} !== true && ${t} !== undefined`,()=>{e.if(_e._`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,_e._`${n} || {}`).code(_e._`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if(_e._`${n} !== true`,()=>{if(t===!0)e.assign(n,!0);else e.assign(n,_e._`${n} || {}`),pI(e,n,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:CR}),items:SR({mergeNames:(e,t,n)=>e.if(_e._`${n} !== true && ${t} !== undefined`,()=>e.assign(n,_e._`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if(_e._`${n} !== true`,()=>e.assign(n,t===!0?!0:_e._`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function CR(e,t){if(t===!0)return e.var("props",!0);let n=e.var("props",_e._`{}`);if(t!==void 0)pI(e,n,t);return n}DR.evaluatedPropsToName=CR;function pI(e,t,n){Object.keys(n).forEach((i)=>e.assign(_e._`${t}${(0,_e.getProperty)(i)}`,!0))}DR.setEvaluated=pI;var OR={};function x7(e,t){return e.scopeValue("func",{ref:t,code:OR[t.code]||(OR[t.code]=new z7._Code(t.code))})}DR.useFunc=x7;var yI;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(yI||(DR.Type=yI={}));function G7(e,t,n){if(e instanceof _e.Name){let i=t===yI.Num;return n?i?_e._`"[" + ${e} + "]"`:_e._`"['" + ${e} + "']"`:i?_e._`"/" + ${e}`:_e._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,_e.getProperty)(e).toString():"/"+bI(e)}DR.getErrorPath=G7;function LR(e,t,n=e.opts.strictSchema){if(!n)return;if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}DR.checkStrictMode=LR});var Un=K((NR)=>{Object.defineProperty(NR,"__esModule",{value:!0});var ut=de(),r2={data:new ut.Name("data"),valCxt:new ut.Name("valCxt"),instancePath:new ut.Name("instancePath"),parentData:new ut.Name("parentData"),parentDataProperty:new ut.Name("parentDataProperty"),rootData:new ut.Name("rootData"),dynamicAnchors:new ut.Name("dynamicAnchors"),vErrors:new ut.Name("vErrors"),errors:new ut.Name("errors"),this:new ut.Name("this"),self:new ut.Name("self"),scope:new ut.Name("scope"),json:new ut.Name("json"),jsonPos:new ut.Name("jsonPos"),jsonLen:new ut.Name("jsonLen"),jsonPart:new ut.Name("jsonPart")};NR.default=r2});var oc=K((UR)=>{Object.defineProperty(UR,"__esModule",{value:!0});UR.extendErrors=UR.resetErrorsCount=UR.reportExtraError=UR.reportError=UR.keyword$DataError=UR.keywordError=void 0;var ve=de(),ru=fe(),pt=Un();UR.keywordError={message:({keyword:e})=>ve.str`must pass "${e}" keyword validation`};UR.keyword$DataError={message:({keyword:e,schemaType:t})=>t?ve.str`"${e}" keyword must be ${t} ($data)`:ve.str`"${e}" keyword is invalid ($data)`};function c2(e,t=UR.keywordError,n,i){let{it:o}=e,{gen:r,compositeRule:a,allErrors:s}=o,h=RR(e,t,n);if(i!==null&&i!==void 0?i:a||s)_R(r,h);else jR(o,ve._`[${h}]`)}UR.reportError=c2;function s2(e,t=UR.keywordError,n){let{it:i}=e,{gen:o,compositeRule:r,allErrors:a}=i,s=RR(e,t,n);if(_R(o,s),!(r||a))jR(i,pt.default.vErrors)}UR.reportExtraError=s2;function h2(e,t){e.assign(pt.default.errors,t),e.if(ve._`${pt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(ve._`${pt.default.vErrors}.length`,t),()=>e.assign(pt.default.vErrors,null)))}UR.resetErrorsCount=h2;function l2({gen:e,keyword:t,schemaValue:n,data:i,errsCount:o,it:r}){if(o===void 0)throw Error("ajv implementation error");let a=e.name("err");e.forRange("i",o,pt.default.errors,(s)=>{if(e.const(a,ve._`${pt.default.vErrors}[${s}]`),e.if(ve._`${a}.instancePath === undefined`,()=>e.assign(ve._`${a}.instancePath`,(0,ve.strConcat)(pt.default.instancePath,r.errorPath))),e.assign(ve._`${a}.schemaPath`,ve.str`${r.errSchemaPath}/${t}`),r.opts.verbose)e.assign(ve._`${a}.schema`,n),e.assign(ve._`${a}.data`,i)})}UR.extendErrors=l2;function _R(e,t){let n=e.const("err",t);e.if(ve._`${pt.default.vErrors} === null`,()=>e.assign(pt.default.vErrors,ve._`[${n}]`),ve._`${pt.default.vErrors}.push(${n})`),e.code(ve._`${pt.default.errors}++`)}function jR(e,t){let{gen:n,validateName:i,schemaEnv:o}=e;if(o.$async)n.throw(ve._`new ${e.ValidationError}(${t})`);else n.assign(ve._`${i}.errors`,t),n.return(!1)}var xo={keyword:new ve.Name("keyword"),schemaPath:new ve.Name("schemaPath"),params:new ve.Name("params"),propertyName:new ve.Name("propertyName"),message:new ve.Name("message"),schema:new ve.Name("schema"),parentSchema:new ve.Name("parentSchema")};function RR(e,t,n){let{createErrors:i}=e.it;if(i===!1)return ve._`{}`;return u2(e,t,n)}function u2(e,t,n={}){let{gen:i,it:o}=e,r=[g2(o,n),d2(e,n)];return y2(e,t,r),i.object(...r)}function g2({errorPath:e},{instancePath:t}){let n=t?ve.str`${e}${(0,ru.getErrorPath)(t,ru.Type.Str)}`:e;return[pt.default.instancePath,(0,ve.strConcat)(pt.default.instancePath,n)]}function d2({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:i}){let o=i?t:ve.str`${t}/${e}`;if(n)o=ve.str`${o}${(0,ru.getErrorPath)(n,ru.Type.Str)}`;return[xo.schemaPath,o]}function y2(e,{params:t,message:n},i){let{keyword:o,data:r,schemaValue:a,it:s}=e,{opts:h,propertyName:l,topSchemaRef:u,schemaPath:d}=s;if(i.push([xo.keyword,o],[xo.params,typeof t=="function"?t(e):t||ve._`{}`]),h.messages)i.push([xo.message,typeof n=="function"?n(e):n]);if(h.verbose)i.push([xo.schema,a],[xo.parentSchema,ve._`${u}${d}`],[pt.default.data,r]);if(l)i.push([xo.propertyName,l])}});var MR=K((xR)=>{Object.defineProperty(xR,"__esModule",{value:!0});xR.boolOrEmptySchema=xR.topBoolOrEmptySchema=void 0;var f2=oc(),v2=de(),k2=Un(),I2={message:"boolean schema is false"};function P2(e){let{gen:t,schema:n,validateName:i}=e;if(n===!1)KR(e,!1);else if(typeof n=="object"&&n.$async===!0)t.return(k2.default.data);else t.assign(v2._`${i}.errors`,null),t.return(!0)}xR.topBoolOrEmptySchema=P2;function S2(e,t){let{gen:n,schema:i}=e;if(i===!1)n.var(t,!1),KR(e);else n.var(t,!0)}xR.boolOrEmptySchema=S2;function KR(e,t){let{gen:n,data:i}=e,o={gen:n,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,f2.reportError)(o,I2,void 0,t)}});var wI=K((BR)=>{Object.defineProperty(BR,"__esModule",{value:!0});BR.getRules=BR.isJSONType=void 0;var $2=["string","number","integer","boolean","null","object","array"],T2=new Set($2);function A2(e){return typeof e=="string"&&T2.has(e)}BR.isJSONType=A2;function C2(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}BR.getRules=C2});var fI=K((WR)=>{Object.defineProperty(WR,"__esModule",{value:!0});WR.shouldUseRule=WR.shouldUseGroup=WR.schemaHasRulesForType=void 0;function D2({schema:e,self:t},n){let i=t.RULES.types[n];return i&&i!==!0&&qR(e,i)}WR.schemaHasRulesForType=D2;function qR(e,t){return t.rules.some((n)=>HR(e,n))}WR.shouldUseGroup=qR;function HR(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some((i)=>e[i]!==void 0))}WR.shouldUseRule=HR});var ic=K((QR)=>{Object.defineProperty(QR,"__esModule",{value:!0});QR.reportTypeError=QR.checkDataTypes=QR.checkDataType=QR.coerceAndCheckDataType=QR.getJSONTypes=QR.getSchemaTypes=QR.DataType=void 0;var _2=wI(),j2=fI(),R2=oc(),ue=de(),XR=fe(),or;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(or||(QR.DataType=or={}));function U2(e){let t=FR(e.type);if(t.includes("null")){if(e.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(e.nullable===!0)t.push("null")}return t}QR.getSchemaTypes=U2;function FR(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(_2.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}QR.getJSONTypes=FR;function E2(e,t){let{gen:n,data:i,opts:o}=e,r=K2(t,o.coerceTypes),a=t.length>0&&!(r.length===0&&t.length===1&&(0,j2.schemaHasRulesForType)(e,t[0]));if(a){let s=kI(t,i,o.strictNumbers,or.Wrong);n.if(s,()=>{if(r.length)x2(e,t,r);else II(e)})}return a}QR.coerceAndCheckDataType=E2;var ZR=new Set(["string","number","integer","boolean","null"]);function K2(e,t){return t?e.filter((n)=>ZR.has(n)||t==="array"&&n==="array"):[]}function x2(e,t,n){let{gen:i,data:o,opts:r}=e,a=i.let("dataType",ue._`typeof ${o}`),s=i.let("coerced",ue._`undefined`);if(r.coerceTypes==="array")i.if(ue._`${a} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>i.assign(o,ue._`${o}[0]`).assign(a,ue._`typeof ${o}`).if(kI(t,o,r.strictNumbers),()=>i.assign(s,o)));i.if(ue._`${s} !== undefined`);for(let l of n)if(ZR.has(l)||l==="array"&&r.coerceTypes==="array")h(l);i.else(),II(e),i.endIf(),i.if(ue._`${s} !== undefined`,()=>{i.assign(o,s),G2(e,s)});function h(l){switch(l){case"string":i.elseIf(ue._`${a} == "number" || ${a} == "boolean"`).assign(s,ue._`"" + ${o}`).elseIf(ue._`${o} === null`).assign(s,ue._`""`);return;case"number":i.elseIf(ue._`${a} == "boolean" || ${o} === null
|
|
7477
7477
|
|| (${a} == "string" && ${o} && ${o} == +${o})`).assign(s,ue._`+${o}`);return;case"integer":i.elseIf(ue._`${a} === "boolean" || ${o} === null
|
|
7478
7478
|
|| (${a} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(s,ue._`+${o}`);return;case"boolean":i.elseIf(ue._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(s,!1).elseIf(ue._`${o} === "true" || ${o} === 1`).assign(s,!0);return;case"null":i.elseIf(ue._`${o} === "" || ${o} === 0 || ${o} === false`),i.assign(s,null);return;case"array":i.elseIf(ue._`${a} === "string" || ${a} === "number"
|
|
@@ -8907,7 +8907,10 @@ sazabi data-sources connections list --type <provider>
|
|
|
8907
8907
|
# Get one connection
|
|
8908
8908
|
sazabi data-sources connections get <connection-id>
|
|
8909
8909
|
|
|
8910
|
-
# Create a connection directly when you already know the metadata
|
|
8910
|
+
# Create a MANAGED connection directly when you already know the metadata
|
|
8911
|
+
# contract. Managed sources only: connectionless data sources (PostHog SDK,
|
|
8912
|
+
# OTel, Datadog Agent, ...) have no connection to create and are rejected —
|
|
8913
|
+
# set them up in the Sazabi dashboard, which mints a keyed intake URL.
|
|
8911
8914
|
# Note: for Vercel, prefer the MCP \`setup_vercel\` tool or \`data-sources skill
|
|
8912
8915
|
# --type vercel\` — creating a Vercel connection this way does NOT provision log/trace/analytics drains.
|
|
8913
8916
|
sazabi data-sources connections create --type <provider> --metadata '{"apiToken":"..."}'
|