@useatlas/types
Advanced tools
+1
-0
@@ -503,2 +503,3 @@ // src/auth.ts | ||
| "rate_limited", | ||
| "billing_blocked", | ||
| "internal_error" | ||
@@ -505,0 +506,0 @@ ]; |
+13
-3
@@ -40,3 +40,13 @@ /** | ||
| * - `rate_limited` — request rate, concurrency cap, or pool capacity hit. | ||
| * Includes `retry_after` (seconds) when the upstream knows it. | ||
| * Includes `retry_after` (seconds) when the upstream knows it. Also used | ||
| * for workspace abuse-throttle blocks from the billing gate (#3437) — | ||
| * the recovery (back off `retry_after` seconds) is identical. | ||
| * - `billing_blocked` — the workspace is not in good billing standing | ||
| * (suspended, deleted, trial expired, subscription ended, or plan token | ||
| * budget exhausted) and datasource-querying tools are blocked (#3437). | ||
| * Retrying will not help; the workspace owner must resolve billing / | ||
| * suspension in Atlas. Unlike the other codes this one is constructed | ||
| * directly from the typed billing-gate verdict in | ||
| * `packages/mcp/src/billing-gate.ts` — it never flows through the | ||
| * string classifiers in `error-envelope.ts`, so no regex branch exists. | ||
| * - `internal_error` — unexpected failure. Includes `request_id` so the | ||
@@ -59,3 +69,3 @@ * user can quote it when filing a support ticket. | ||
| */ | ||
| export type AtlasMcpToolErrorCode = "validation_failed" | "rls_denied" | "query_timeout" | "unknown_entity" | "unknown_metric" | "ambiguous_term" | "rate_limited" | "internal_error"; | ||
| export type AtlasMcpToolErrorCode = "validation_failed" | "rls_denied" | "query_timeout" | "unknown_entity" | "unknown_metric" | "ambiguous_term" | "rate_limited" | "billing_blocked" | "internal_error"; | ||
| /** | ||
@@ -79,3 +89,3 @@ * Wire shape of a typed MCP tool failure. Agents/SDK consumers parse the | ||
| /** Closed list of every code, useful for table-driven tests and the runtime guard. */ | ||
| export declare const ATLAS_MCP_TOOL_ERROR_CODES: readonly ["validation_failed", "rls_denied", "query_timeout", "unknown_entity", "unknown_metric", "ambiguous_term", "rate_limited", "internal_error"]; | ||
| export declare const ATLAS_MCP_TOOL_ERROR_CODES: readonly ["validation_failed", "rls_denied", "query_timeout", "unknown_entity", "unknown_metric", "ambiguous_term", "rate_limited", "billing_blocked", "internal_error"]; | ||
| /** Type guard — checks whether a string is a known `AtlasMcpToolErrorCode`. */ | ||
@@ -82,0 +92,0 @@ export declare function isAtlasMcpToolErrorCode(value: string): value is AtlasMcpToolErrorCode; |
+1
-0
@@ -10,2 +10,3 @@ // src/mcp.ts | ||
| "rate_limited", | ||
| "billing_blocked", | ||
| "internal_error" | ||
@@ -12,0 +13,0 @@ ]; |
+1
-1
| { | ||
| "name": "@useatlas/types", | ||
| "version": "0.1.18", | ||
| "version": "0.1.19", | ||
| "description": "Shared types for the Atlas text-to-SQL agent", | ||
@@ -5,0 +5,0 @@ "type": "module", |
241722
0.33%5932
0.2%