sailfork / t3code-github / .repos/ effect/ packages/ ai/ anthropic/ src/ Generated.ts

/**
 * @stability unstable
 * @since 4.0.0
 */

import * as Data from "effect/Data"
import * as Effect from "effect/Effect"
import * as HttpClient from "effect/http/HttpClient"
import * as HttpClientError from "effect/http/HttpClientError"
import * as HttpClientRequest from "effect/http/HttpClientRequest"
import * as HttpClientResponse from "effect/http/HttpClientResponse"
import type { SchemaError } from "effect/Schema"
import * as Schema from "effect/Schema"
import * as Stream from "effect/Stream"
// non-recursive definitions
export type Model =
  | "claude-haiku-5-5"
  | "claude-sonnet-5-5"
  | "claude-fable-5-1"
  | "claude-opus-5-5"
  | "claude-mythos-5-1"
  | "claude-sonnet-5"
  | "claude-fable-5"
  | "claude-mythos-5"
  | "claude-opus-5"
  | "claude-opus-4-8"
  | "claude-opus-4-7"
  | "claude-mythos-preview"
  | "claude-opus-4-6"
  | "claude-sonnet-4-6"
  | "claude-haiku-4-5"
  | "claude-haiku-4-5-20251001"
  | "claude-opus-4-5"
  | "claude-opus-4-5-20251101"
  | "claude-sonnet-4-5"
  | "claude-sonnet-4-5-20250929"
  | string
export const Model = Schema.Union([
  Schema.Literal("claude-haiku-5-5").annotate({ "description": "Fastest model for high-volume, real-time tasks" }),
  Schema.Literal("claude-sonnet-5-5").annotate({ "description": "Efficient model for coding and agents" }),
  Schema.Literal("claude-fable-5-1").annotate({
    "description":
      "Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows"
  }),
  Schema.Literal("claude-opus-5-5").annotate({
    "description": "Powerful intelligence for coding, knowledge work, and long-running agents"
  }),
  Schema.Literal("claude-mythos-5-1").annotate({
    "description":
      "Our most capable model for cybersecurity and biology research, available through trusted access programs"
  }),
  Schema.Literal("claude-sonnet-5").annotate({ "description": "Efficient model for coding and agents" }),
  Schema.Literal("claude-fable-5").annotate({
    "description": "Next generation of intelligence for the hardest knowledge work and coding problems"
  }),
  Schema.Literal("claude-mythos-5").annotate({
    "description": "Most capable model for cybersecurity and biology research"
  }),
  Schema.Literal("claude-opus-5").annotate({
    "description": "Powerful intelligence for long-running agents and coding"
  }),
  Schema.Literal("claude-opus-4-8").annotate({
    "description": "Powerful intelligence for long-running agents and coding"
  }),
  Schema.Literal("claude-opus-4-7").annotate({
    "description": "Powerful intelligence for long-running agents and coding"
  }),
  Schema.Literal("claude-mythos-preview").annotate({
    "description": "New class of intelligence, strongest in coding and cybersecurity"
  }),
  Schema.Literal("claude-opus-4-6").annotate({
    "description": "Powerful intelligence for long-running agents and coding"
  }),
  Schema.Literal("claude-sonnet-4-6").annotate({ "description": "Best combination of speed and intelligence" }),
  Schema.Literal("claude-haiku-4-5"),
  Schema.Literal("claude-haiku-4-5-20251001"),
  Schema.Literal("claude-opus-4-5").annotate({
    "description": "Powerful intelligence for long-running agents and coding"
  }),
  Schema.Literal("claude-opus-4-5-20251101").annotate({
    "description": "Powerful intelligence for long-running agents and coding"
  }),
  Schema.Literal("claude-sonnet-4-5").annotate({ "description": "High-performance model for agents and coding" }),
  Schema.Literal("claude-sonnet-4-5-20250929").annotate({
    "description": "High-performance model for agents and coding"
  }),
  Schema.String
]).annotate({
  "title": "Model",
  "description":
    "The model that will complete your prompt.\n\nSee [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.",
  "identifier": "Model"
})
export type CacheControlEphemeral = { readonly "ttl"?: "5m" | "1h"; readonly "type": "ephemeral" }
export const CacheControlEphemeral = Schema.Struct({
  "ttl": Schema.optionalKey(
    Schema.Literals(["5m", "1h"]).annotate({
      "title": "Ttl",
      "description":
        "The time-to-live for the cache control breakpoint.\n\nThis may be one the following values:\n- `5m`: 5 minutes\n- `1h`: 1 hour\n\nDefaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details."
    })
  ),
  "type": Schema.Literal("ephemeral").annotate({ "title": "Type" })
}).annotate({ "title": "CacheControlEphemeral", "identifier": "CacheControlEphemeral" })
export type RequestCharLocationCitation = {
  readonly "cited_text": string
  readonly "document_index": number
  readonly "document_title": string | null
  readonly "end_char_index": number
  readonly "start_char_index": number
  readonly "type": "char_location"
}
export const RequestCharLocationCitation = Schema.Struct({
  "cited_text": Schema.String.annotate({ "title": "Cited Text" }),
  "document_index": Schema.Number.annotate({ "title": "Document Index" }).check(
    Schema.isInt().annotate({ "expected": "an integer" })
  ).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })),
  "document_title": Schema.Union([
    Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(
      Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" })
    ),
    Schema.Null
  ]).annotate({ "title": "Document Title" }),
  "end_char_index": Schema.Number.annotate({ "title": "End Char Index" }).check(
    Schema.isInt().annotate({ "expected": "an integer" })
  ),
  "start_char_index": Schema.Number.annotate({ "title": "Start Char Index" }).check(
    Schema.isInt().annotate({ "expected": "an integer" })
  ).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })),
  "type": Schema.Literal("char_location").annotate({ "title": "Type" })
}).annotate({ "title": "RequestCharLocationCitation", "identifier": "RequestCharLocationCitation" })
export type RequestPageLocationCitation = {
  readonly "cited_text": string
  readonly "document_index": number
  readonly "document_title": string | null
  readonly "end_page_number": number
  readonly "start_page_number": number
  readonly "type": "page_location"
}
export const RequestPageLocationCitation = Schema.Struct({
  "cited_text": Schema.String.annotate({ "title": "Cited Text" }),
  "document_index": Schema.Number.annotate({ "title": "Document Index" }).check(
    Schema.isInt().annotate({ "expected": "an integer" })
  ).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })),
  "document_title": Schema.Union([
    Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(
      Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" })
    ),
    Schema.Null
  ]).annotate({ "title": "Document Title" }),
  "end_page_number": Schema.Number.annotate({ "title": "End Page Number" }).check(
    Schema.isInt().annotate({ "expected": "an integer" })
  ),
  "start_page_number": Schema.Number.annotate({ "title": "Start Page Number" }).check(
    Schema.isInt().annotate({ "expected": "an integer" })
  ).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })),
  "type": Schema.Literal("page_location").annotate({ "title": "Type" })
}).annotate({ "title": "RequestPageLocationCitation", "identifier": "RequestPageLocationCitation" })
export type RequestContentBlockLocationCitation = {
  readonly "cited_text": string
  readonly "document_index": number
  readonly "document_title": string | null
  readonly "end_block_index": number
  readonly "start_block_index": number
  readonly "type": "content_block_location"
}
export const RequestContentBlockLocationCitation = Schema.Struct({
  "cited_text": Schema.String.annotate({
    "title": "Cited Text",
    "description":
      "The full text of the cited block range, concatenated.\n\nAlways equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns."
  }),
  "document_index": Schema.Number.annotate({ "title": "Document Index" }).check(
    Schema.isInt().annotate({ "expected": "an integer" })
  ).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })),
  "document_title": Schema.Union([
    Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(
      Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" })
    ),
    Schema.Null
  ]).annotate({ "title": "Document Title" }),
  "end_block_index": Schema.Number.annotate({
    "title": "End Block Index",
    "description":
      "Exclusive 0-based end index of the cited block range in the source's `content` array.\n\nAlways greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`."
  }).check(Schema.isInt().annotate({ "expected": "an integer" })),
  "start_block_index": Schema.Number.annotate({
    "title": "Start Block Index",
    "description": "0-based index of the first cited block in the source's `content` array."
  }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(
    Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })
  ),
  "type": Schema.Literal("content_block_location").annotate({ "title": "Type" })
}).annotate({ "title": "RequestContentBlockLocationCitation", "identifier": "RequestContentBlockLocationCitation" })
export type RequestWebSearchResultLocationCitation = {
  readonly "cited_text": string
  readonly "encrypted_index": string
  readonly "title": string | null
  readonly "type": "web_search_result_location"
  readonly "url": string
}
export const RequestWebSearchResultLocationCitation = Schema.Struct({
  "cited_text": Schema.String.annotate({ "title": "Cited Text" }),
  "encrypted_index": Schema.String.annotate({ "title": "Encrypted Index" }),
  "title": Schema.Union([
    Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(
      Schema.isMaxCodePoints(512).annotate({ "expected": "a string with at most 512 code points" })
    ),
    Schema.Null
  ]).annotate({ "title": "Title" }),
  "type": Schema.Literal("web_search_result_location").annotate({ "title": "Type" }),
  "url": Schema.String.annotate({ "title": "Url" }).check(
    Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })
  )
}).annotate({
  "title": "RequestWebSearchResultLocationCitation",
  "identifier": "RequestWebSearchResultLocationCitation"
})
export type RequestSearchResultLocationCitation = {
  readonly "cited_text": string
  readonly "end_block_index": number
  readonly "search_result_index": number
  readonly "source": string
  readonly "start_block_index": number
  readonly "title": string | null
  readonly "type": "search_result_location"
}
export const RequestSearchResultLocationCitation = Schema.Struct({
  "cited_text": Schema.String.annotate({
    "title": "Cited Text",
    "description":
      "The full text of the cited block range, concatenated.\n\nAlways equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns."
  }),
  "end_block_index": Schema.Number.annotate({
    "title": "End Block Index",
    "description":
      "Exclusive 0-based end index of the cited block range in the source's `content` array.\n\nAlways greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`."
  }).check(Schema.isInt().annotate({ "expected": "an integer" })),
  "search_result_index": Schema.Number.annotate({
    "title": "Search Result Index",
    "description":
      "0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results.\n\nCounted separately from `document_index`; server-side web search results are not included in this count."
  }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(
    Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })
  ),
  "source": Schema.String.annotate({ "title": "Source" }),
  "start_block_index": Schema.Number.annotate({
    "title": "Start Block Index",
    "description": "0-based index of the first cited block in the source's `content` array."
  }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(
    Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })
  ),
  "title": Schema.Union([Schema.String, Schema.Null]).annotate({ "title": "Title" }),
  "type": Schema.Literal("search_result_location").annotate({ "title": "Type" })
}).annotate({ "title": "RequestSearchResultLocationCitation", "identifier": "RequestSearchResultLocationCitation" })
export type Base64ImageSource = {
  readonly "data": string
  readonly "media_type": "image/jpeg" | "image/png" | "image/gif" | "image/webp"
  readonly "type": "base64"
}
export const Base64ImageSource = Schema.Struct({
  "data": Schema.String.annotate({ "title": "Data", "format": "byte" }),
  "media_type": Schema.Literals(["image/jpeg", "image/png", "image/gif", "image/webp"]).annotate({
    "title": "Media Type"
  }),
  "type": Schema.Literal("base64").annotate({ "title": "Type" })
}).annotate({ "title": "Base64ImageSource", "identifier": "Base64ImageSource" })
export type URLImageSource = { readonly "type": "url"; readonly "url": string }
export const URLImageSource = Schema.Struct({
  "type": Schema.Literal("url").annotate({ "title": "Type" }),
  "url": Schema.String.annotate({ "title": "Url" })
}).annotate({ "title": "URLImageSource", "identifier": "URLImageSource" })
export type FileImageSource = { readonly "file_id": string; readonly "type": "file" }
export const FileImageSource = Schema.Struct({
  "file_id": Schema.String.annotate({ "title": "File Id" }),
  "type": Schema.Literal("file").annotate({ "title": "Type" })
}).annotate({ "title": "FileImageSource", "identifier": "FileImageSource" })
export type RequestImageTransformations = { readonly "oversized_image"?: "downsize" | "error" }
export const RequestImageTransformations = Schema.Struct({
  "oversized_image": Schema.optionalKey(
    Schema.Literals(["downsize", "error"]).annotate({
      "title": "Oversized Image",
      "description":
        "What the server does when this image exceeds the model's maximum image size. `\"downsize\"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `\"error\"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down."
    })
  )
}).annotate({
  "title": "RequestImageTransformations",
  "description":
    "Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.",
  "identifier": "RequestImageTransformations"
})
export type RequestCitationsConfig = { readonly "enabled"?: boolean }
export const RequestCitationsConfig = Schema.Struct({
  "enabled": Schema.optionalKey(Schema.Boolean.annotate({ "title": "Enabled" }))
}).annotate({ "title": "RequestCitationsConfig", "identifier": "RequestCitationsConfig" })
export type Base64PDFSource = {
  readonly "data": string
  readonly "media_type": "application/pdf"
  readonly "type": "base64"
}
export const Base64PDFSource = Schema.Struct({
  "data": Schema.String.annotate({ "title": "Data", "format": "byte" }),
  "media_type": Schema.Literal("application/pdf").annotate({ "title": "Media Type" }),
  "type": Schema.Literal("base64").annotate({ "title": "Type" })
}).annotate({ "title": "Base64PDFSource", "identifier": "Base64PDFSource" })
export type PlainTextSource = { readonly "data": string; readonly "media_type": "text/plain"; readonly "type": "text" }
export const PlainTextSource = Schema.Struct({
  "data": Schema.String.annotate({ "title": "Data" }),
  "media_type": Schema.Literal("text/plain").annotate({ "title": "Media Type" }),
  "type": Schema.Literal("text").annotate({ "title": "Type" })
}).annotate({ "title": "PlainTextSource", "identifier": "PlainTextSource" })
export type URLPDFSource = { readonly "type": "url"; readonly "url": string }
export const URLPDFSource = Schema.Struct({
  "type": Schema.Literal("url").annotate({ "title": "Type" }),
  "url": Schema.String.annotate({ "title": "Url" })
}).annotate({ "title": "URLPDFSource", "identifier": "URLPDFSource" })
export type FileDocumentSource = { readonly "file_id": string; readonly "type": "file" }
export const FileDocumentSource = Schema.Struct({
  "file_id": Schema.String.annotate({ "title": "File Id" }),
  "type": Schema.Literal("file").annotate({ "title": "Type" })
}).annotate({ "title": "FileDocumentSource", "identifier": "FileDocumentSource" })
export type RequestThinkingBlock = {
  readonly "signature": string
  readonly "thinking": string
  readonly "type": "thinking"
}
export const RequestThinkingBlock = Schema.Struct({
  "signature": Schema.String.annotate({
    "title": "Signature",
    "description":
      "The `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude.\n\nThinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`."
  }),
  "thinking": Schema.String.annotate({
    "title": "Thinking",
    "description": "The `thinking` text of this block as returned by the API."
  }),
  "type": Schema.Literal("thinking").annotate({ "title": "Type" })
}).annotate({ "title": "RequestThinkingBlock", "identifier": "RequestThinkingBlock" })
export type RequestRedactedThinkingBlock = { readonly "data": string; readonly "type": "redacted_thinking" }
export const RequestRedactedThinkingBlock = Schema.Struct({
  "data": Schema.String.annotate({
    "title": "Data",
    "description":
      "The `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged."
  }),
  "type": Schema.Literal("redacted_thinking").annotate({ "title": "Type" })
}).annotate({ "title": "RequestRedactedThinkingBlock", "identifier": "RequestRedactedThinkingBlock" })
export type DirectCaller = { readonly "type": "direct" }
export const DirectCaller = Schema.Struct({ "type": Schema.Literal("direct").annotate({ "title": "Type" }) }).annotate({
  "title": "DirectCaller",
  "description": "Tool invocation directly from the model.",
  "identifier": "DirectCaller"
})
export type ServerToolCaller = { readonly "tool_id": string; readonly "type": "code_execution_20250825" }
export const ServerToolCaller = Schema.Struct({
  "tool_id": Schema.String.annotate({ "title": "Tool Id" }).check(
    Schema.isPattern(new RegExp("^srvtoolu_[a-zA-Z0-9_]+$", "u")).annotate({
      "expected": "a string matching the RegExp ^srvtoolu_[a-zA-Z0-9_]+$"
    })
  ),
  "type": Schema.Literal("code_execution_20250825").annotate({ "title": "Type" })
}).annotate({
  "title": "ServerToolCaller",
  "description": "Tool invocation generated by a server-side tool.",
  "identifier": "ServerToolCaller"
})
export type ServerToolCaller_20260120 = { readonly "tool_id": string; readonly "type": "code_execution_20260120" }
export const ServerToolCaller_20260120 = Schema.Struct({
  "tool_id": Schema.String.annotate({ "title": "Tool Id" }).check(
    Schema.isPattern(new RegExp("^srvtoolu_[a-zA-Z0-9_]+$", "u")).annotate({
      "expected": "a string matching the RegExp ^srvtoolu_[a-zA-Z0-9_]+$"
    })
  ),
  "type": Schema.Literal("code_execution_20260120").annotate({ "title": "Type" })
}).annotate({ "title": "ServerToolCaller_20260120", "identifier": "ServerToolCaller_20260120" })
export type BrowserStateChangeTabOpened = { readonly "tab_id": string; readonly "type": "tab_opened" }
export const BrowserStateChangeTabOpened = Schema.Struct({
  "tab_id": Schema.String.annotate({
    "title": "Tab Id",
    "description": "The `tab_id` of the opened tab, present in `tabs`."
  }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(
    Schema.isMaxCodePoints(4096).annotate({ "expected": "a string with at most 4096 code points" })
  ).check(
    Schema.isPattern(new RegExp("^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$", "u")).annotate({
      "expected": "a string matching the RegExp ^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$"
    })
  ),
  "type": Schema.Literal("tab_opened").annotate({ "title": "Type" })
}).annotate({
  "title": "BrowserStateChangeTabOpened",
  "description":
    "A tab this call's execution opened that remains open at its end —\nthe creation delta of the `tabs` inventory, not an event log.\n\nCarries only the `tab_id`; the tab's `title` and `url` live on its\n`tabs` entry, which must include the same `tab_id`. A tab opened\nduring a failed call gets no deferred `tab_opened`; it simply appears\nin the next result's `tabs` inventory.",
  "identifier": "BrowserStateChangeTabOpened"
})
export type BrowserStateChangeDownloadStarted = {
  readonly "download_id": string
  readonly "type": "download_started"
  readonly "url": string
}
export const BrowserStateChangeDownloadStarted = Schema.Struct({
  "download_id": Schema.String.annotate({
    "title": "Download Id",
    "description": "The caller-assigned identifier for this download, stable across the state changes reporting it."
  }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(
    Schema.isMaxCodePoints(4096).annotate({ "expected": "a string with at most 4096 code points" })
  ).check(
    Schema.isPattern(new RegExp("^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$", "u")).annotate({
      "expected": "a string matching the RegExp ^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$"
    })
  ),
  "type": Schema.Literal("download_started").annotate({ "title": "Type" }),
  "url": Schema.String.annotate({
    "title": "Url",
    "description": "The final post-redirect URL the download was served from."
  }).check(Schema.isMaxCodePoints(4096).annotate({ "expected": "a string with at most 4096 code points" })).check(
    Schema.isPattern(new RegExp("^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$", "u")).annotate({
      "expected": "a string matching the RegExp ^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$"
    })
  )
}).annotate({
  "title": "BrowserStateChangeDownloadStarted",
  "description": "A file download that started during this call.",
  "identifier": "BrowserStateChangeDownloadStarted"
})
export type BrowserStateChangeDownloadCompleted = {
  readonly "download_id": string
  readonly "path"?: string | null
  readonly "size_bytes"?: number | null
  readonly "type": "download_completed"
  readonly "url": string
}
export const BrowserStateChangeDownloadCompleted = Schema.Struct({
  "download_id": Schema.String.annotate({
    "title": "Download Id",
    "description": "The caller-assigned identifier for this download, stable across the state changes reporting it."
  }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(
    Schema.isMaxCodePoints(4096).annotate({ "expected": "a string with at most 4096 code points" })
  ).check(
    Schema.isPattern(new RegExp("^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$", "u")).annotate({
      "expected": "a string matching the RegExp ^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$"
    })
  ),
  "path": Schema.optionalKey(
    Schema.Union([
      Schema.String.check(
        Schema.isMaxCodePoints(4096).annotate({ "expected": "a string with at most 4096 code points" })
      ).check(
        Schema.isPattern(new RegExp("^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$", "u")).annotate({
          "expected": "a string matching the RegExp ^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$",
          "title": "Path",
          "description":
            "Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path."
        })
      ),
      Schema.Null.annotate({
        "title": "Path",
        "description":
          "Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path."
      })
    ])
  ),
  "size_bytes": Schema.optionalKey(
    Schema.Union([
      Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(
        Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })
      ),
      Schema.Null
    ]).annotate({ "title": "Size Bytes", "description": "The completed download's size." })
  ),
  "type": Schema.Literal("download_completed").annotate({ "title": "Type" }),
  "url": Schema.String.annotate({
    "title": "Url",
    "description": "The final post-redirect URL the download was served from."
  }).check(Schema.isMaxCodePoints(4096).annotate({ "expected": "a string with at most 4096 code points" })).check(
    Schema.isPattern(new RegExp("^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$", "u")).annotate({
      "expected": "a string matching the RegExp ^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$"
    })
  )
}).annotate({
  "title": "BrowserStateChangeDownloadCompleted",
  "description":
    "A file download that finished during this call, reported with the\nsame `download_id` as its `download_started` — or without a prior\n`download_started`, when the download finished during the call that\nstarted it (at most one state change per `download_id` per result).",
  "identifier": "BrowserStateChangeDownloadCompleted"
})
export type BrowserStateChangeDownloadFailed = {
  readonly "download_id": string
  readonly "error"?: string | null
  readonly "type": "download_failed"
  readonly "url": string
}
export const BrowserStateChangeDownloadFailed = Schema.Struct({
  "download_id": Schema.String.annotate({
    "title": "Download Id",
    "description": "The caller-assigned identifier for this download, stable across the state changes reporting it."
  }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(
    Schema.isMaxCodePoints(4096).annotate({ "expected": "a string with at most 4096 code points" })
  ).check(
    Schema.isPattern(new RegExp("^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$", "u")).annotate({
      "expected": "a string matching the RegExp ^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$"
    })
  ),
  "error": Schema.optionalKey(
    Schema.Union([
      Schema.String.check(
        Schema.isMaxCodePoints(4096).annotate({ "expected": "a string with at most 4096 code points" })
      ).check(
        Schema.isPattern(new RegExp("^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$", "u")).annotate({
          "expected": "a string matching the RegExp ^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$",
          "title": "Error",
          "description": "The failure or cancellation detail, when known."
        })
      ),
      Schema.Null.annotate({ "title": "Error", "description": "The failure or cancellation detail, when known." })
    ])
  ),
  "type": Schema.Literal("download_failed").annotate({ "title": "Type" }),
  "url": Schema.String.annotate({
    "title": "Url",
    "description": "The final post-redirect URL the download was served from."
  }).check(Schema.isMaxCodePoints(4096).annotate({ "expected": "a string with at most 4096 code points" })).check(
    Schema.isPattern(new RegExp("^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$", "u")).annotate({
      "expected": "a string matching the RegExp ^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$"
    })
  )
}).annotate({
  "title": "BrowserStateChangeDownloadFailed",
  "description": "A file download that failed — or was cancelled — during this call.",
  "identifier": "BrowserStateChangeDownloadFailed"
})
export type BrowserStateTabEntry = {
  readonly "active"?: boolean
  readonly "tab_id": string
  readonly "title": string
  readonly "url": string
}
export const BrowserStateTabEntry = Schema.Struct({
  "active": Schema.optionalKey(
    Schema.Boolean.annotate({
      "title": "Active",
      "description":
        "Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`."
    })
  ),
  "tab_id": Schema.String.annotate({
    "title": "Tab Id",
    "description": "The caller-assigned identifier for this tab, unique within the inventory."
  }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(
    Schema.isMaxCodePoints(4096).annotate({ "expected": "a string with at most 4096 code points" })
  ).check(
    Schema.isPattern(new RegExp("^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$", "u")).annotate({
      "expected": "a string matching the RegExp ^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$"
    })
  ),
  "title": Schema.String.annotate({
    "title": "Title",
    "description": "The title of the page the tab is showing. May be empty."
  }).check(Schema.isMaxCodePoints(4096).annotate({ "expected": "a string with at most 4096 code points" })).check(
    Schema.isPattern(new RegExp("^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$", "u")).annotate({
      "expected": "a string matching the RegExp ^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$"
    })
  ),
  "url": Schema.String.annotate({
    "title": "Url",
    "description": "The URL of the page the tab is showing. May be empty."
  }).check(Schema.isMaxCodePoints(4096).annotate({ "expected": "a string with at most 4096 code points" })).check(
    Schema.isPattern(new RegExp("^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$", "u")).annotate({
      "expected": "a string matching the RegExp ^[^\\x00-\\x1f\\x7f-\\x9f\\u2028\\u2029]*$"
    })
  )
}).annotate({
  "title": "BrowserStateTabEntry",
  "description":
    "One open browser tab reported in a `browser_state` block's `tabs`\ninventory.\n\n`tab_id` is the caller-assigned identifier for the tab; `title` and\n`url` describe the page the tab is currently showing and may be empty\nstrings (a blank tab legitimately has both empty). `active` marks the\ntab that is active after this call; whenever `tabs` is non-empty,\nexactly one entry is marked.",
  "identifier": "BrowserStateTabEntry"
})
export type RequestWebSearchResultBlock = {
  readonly "encrypted_content": string
  readonly "page_age"?: string | null
  readonly "title": string
  readonly "type": "web_search_result"
  readonly "url": string
}
export const RequestWebSearchResultBlock = Schema.Struct({
  "encrypted_content": Schema.String.annotate({ "title": "Encrypted Content" }),
  "page_age": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]).annotate({ "title": "Page Age" })),
  "title": Schema.String.annotate({ "title": "Title" }),
  "type": Schema.Literal("web_search_result").annotate({ "title": "Type" }),
  "url": Schema.String.annotate({ "title": "Url" })
}).annotate({ "title": "RequestWebSearchResultBlock", "identifier": "RequestWebSearchResultBlock" })
export type WebSearchToolResultErrorCode =
  | "invalid_tool_input"
  | "unavailable"
  | "max_uses_exceeded"
  | "too_many_requests"
  | "query_too_long"
  | "request_too_large"
export const WebSearchToolResultErrorCode = Schema.Literals([
  "invalid_tool_input",
  "unavailable",
  "max_uses_exceeded",
  "too_many_requests",
  "query_too_long",
  "request_too_large"
]).annotate({ "title": "WebSearchToolResultErrorCode", "identifier": "WebSearchToolResultErrorCode" })
export type WebFetchToolResultErrorCode =
  | "invalid_tool_input"
  | "url_too_long"
  | "url_not_allowed"
  | "url_not_in_prior_context"
  | "url_not_accessible"
  | "unsupported_content_type"
  | "too_many_requests"
  | "max_uses_exceeded"
  | "unavailable"
  | "content_too_large"
export const WebFetchToolResultErrorCode = Schema.Literals([
  "invalid_tool_input",
  "url_too_long",
  "url_not_allowed",
  "url_not_in_prior_context",
  "url_not_accessible",
  "unsupported_content_type",
  "too_many_requests",
  "max_uses_exceeded",
  "unavailable",
  "content_too_large"
]).annotate({ "title": "WebFetchToolResultErrorCode", "identifier": "WebFetchToolResultErrorCode" })
export type CodeExecutionToolResultErrorCode =
  | "invalid_tool_input"
  | "unavailable"
  | "too_many_requests"
  | "execution_time_exceeded"
export const CodeExecutionToolResultErrorCode = Schema.Literals([
  "invalid_tool_input",
  "unavailable",
  "too_many_requests",
  "execution_time_exceeded"
]).annotate({ "title": "CodeExecutionToolResultErrorCode", "identifier": "CodeExecutionToolResultErrorCode" })
export type RequestCodeExecutionOutputBlock = { readonly "file_id": string; readonly "type": "code_execution_output" }
export const RequestCodeExecutionOutputBlock = Schema.Struct({
  "file_id": Schema.String.annotate({ "title": "File Id" }),
  "type": Schema.Literal("code_execution_output").annotate({ "title": "Type" })
}).annotate({ "title": "RequestCodeExecutionOutputBlock", "identifier": "RequestCodeExecutionOutputBlock" })
export type BashCodeExecutionToolResultErrorCode =
  | "invalid_tool_input"
  | "unavailable"
  | "too_many_requests"
  | "execution_time_exceeded"
  | "output_file_too_large"
export const BashCodeExecutionToolResultErrorCode = Schema.Literals([
  "invalid_tool_input",
  "unavailable",
  "too_many_requests",
  "execution_time_exceeded",
  "output_file_too_large"
]).annotate({ "title": "BashCodeExecutionToolResultErrorCode", "identifier": "BashCodeExecutionToolResultErrorCode" })
export type RequestBashCodeExecutionOutputBlock = {
  readonly "file_id": string
  readonly "type": "bash_code_execution_output"
}
export const RequestBashCodeExecutionOutputBlock = Schema.Struct({
  "file_id": Schema.String.annotate({ "title": "File Id" }),
  "type": Schema.Literal("bash_code_execution_output").annotate({ "title": "Type" })
}).annotate({ "title": "RequestBashCodeExecutionOutputBlock", "identifier": "RequestBashCodeExecutionOutputBlock" })
export type TextEditorCodeExecutionToolResultErrorCode =
  | "invalid_tool_input"
  | "unavailable"
  | "too_many_requests"
  | "execution_time_exceeded"
  | "file_not_found"
export const TextEditorCodeExecutionToolResultErrorCode = Schema.Literals([
  "invalid_tool_input",
  "unavailable",
  "too_many_requests",
  "execution_time_exceeded",
  "file_not_found"
]).annotate({
  "title": "TextEditorCodeExecutionToolResultErrorCode",
  "identifier": "TextEditorCodeExecutionToolResultErrorCode"
})
export type RequestTextEditorCodeExecutionViewResultBlock = {
  readonly "content": string
  readonly "file_type": "text" | "image" | "pdf"
  readonly "num_lines"?: number | null
  readonly "start_line"?: number | null
  readonly "total_lines"?: number | null
  readonly "type": "text_editor_code_execution_view_result"
}
export const RequestTextEditorCodeExecutionViewResultBlock = Schema.Struct({
  "content": Schema.String.annotate({ "title": "Content" }),
  "file_type": Schema.Literals(["text", "image", "pdf"]).annotate({ "title": "File Type" }),
  "num_lines": Schema.optionalKey(
    Schema.Union([Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })), Schema.Null]).annotate({
      "title": "Num Lines"
    })
  ),
  "start_line": Schema.optionalKey(
    Schema.Union([Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })), Schema.Null]).annotate({
      "title": "Start Line"
    })
  ),
  "total_lines": Schema.optionalKey(
    Schema.Union([Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })), Schema.Null]).annotate({
      "title": "Total Lines"
    })
  ),
  "type": Schema.Literal("text_editor_code_execution_view_result").annotate({ "title": "Type" })
}).annotate({
  "title": "RequestTextEditorCodeExecutionViewResultBlock",
  "identifier": "RequestTextEditorCodeExecutionViewResultBlock"
})
export type RequestTextEditorCodeExecutionCreateResultBlock = {
  readonly "is_file_update": boolean
  readonly "type": "text_editor_code_execution_create_result"
}
export const RequestTextEditorCodeExecutionCreateResultBlock = Schema.Struct({
  "is_file_update": Schema.Boolean.annotate({ "title": "Is File Update" }),
  "type": Schema.Literal("text_editor_code_execution_create_result").annotate({ "title": "Type" })
}).annotate({
  "title": "RequestTextEditorCodeExecutionCreateResultBlock",
  "identifier": "RequestTextEditorCodeExecutionCreateResultBlock"
})
export type RequestTextEditorCodeExecutionStrReplaceResultBlock = {
  readonly "lines"?: ReadonlyArray<string> | null
  readonly "new_lines"?: number | null
  readonly "new_start"?: number | null
  readonly "old_lines"?: number | null
  readonly "old_start"?: number | null
  readonly "type": "text_editor_code_execution_str_replace_result"
}
export const RequestTextEditorCodeExecutionStrReplaceResultBlock = Schema.Struct({
  "lines": Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null]).annotate({ "title": "Lines" })),
  "new_lines": Schema.optionalKey(
    Schema.Union([Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })), Schema.Null]).annotate({
      "title": "New Lines"
    })
  ),
  "new_start": Schema.optionalKey(
    Schema.Union([Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })), Schema.Null]).annotate({
      "title": "New Start"
    })
  ),
  "old_lines": Schema.optionalKey(
    Schema.Union([Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })), Schema.Null]).annotate({
      "title": "Old Lines"
    })
  ),
  "old_start": Schema.optionalKey(
    Schema.Union([Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })), Schema.Null]).annotate({
      "title": "Old Start"
    })
  ),
  "type": Schema.Literal("text_editor_code_execution_str_replace_result").annotate({ "title": "Type" })
}).annotate({
  "title": "RequestTextEditorCodeExecutionStrReplaceResultBlock",
  "identifier": "RequestTextEditorCodeExecutionStrReplaceResultBlock"
})
export type ToolSearchToolResultErrorCode =
  | "invalid_tool_input"
  | "unavailable"
  | "too_many_requests"
  | "execution_time_exceeded"
export const ToolSearchToolResultErrorCode = Schema.Literals([
  "invalid_tool_input",
  "unavailable",
  "too_many_requests",
  "execution_time_exceeded"
]).annotate({ "title": "ToolSearchToolResultErrorCode", "identifier": "ToolSearchToolResultErrorCode" })
export type SkillParams = {
  readonly "skill_id": string
  readonly "type": "anthropic" | "custom"
  readonly "version"?: string
}
export const SkillParams = Schema.Struct({
  "skill_id": Schema.String.annotate({ "title": "Skill Id", "description": "Skill ID" }).check(
    Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })
  ).check(Schema.isMaxCodePoints(64).annotate({ "expected": "a string with at most 64 code points" })),
  "type": Schema.Literals(["anthropic", "custom"]).annotate({
    "title": "Type",
    "description": "Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)"
  }),
  "version": Schema.optionalKey(
    Schema.String.annotate({ "title": "Version", "description": "Skill version or 'latest' for most recent version" })
      .check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(
        Schema.isMaxCodePoints(64).annotate({ "expected": "a string with at most 64 code points" })
      )
  )
}).annotate({
  "title": "SkillParams",
  "description": "Specification for a skill to be loaded in a container (request model).",
  "identifier": "SkillParams"
})
export type DiagnosticsParam = { readonly "previous_message_id"?: string | null }
export const DiagnosticsParam = Schema.Struct({
  "previous_message_id": Schema.optionalKey(
    Schema.Union([
      Schema.String.check(
        Schema.isMaxCodePoints(256).annotate({ "expected": "a string with at most 256 code points" })
      ),
      Schema.Null
    ]).annotate({
      "title": "Previous Message Id",
      "description":
        "The `id` (`msg_...`) from this client's previous /v1/messages response. The server compares that request's prompt fingerprint against this one and returns `diagnostics.cache_miss_reason` when the prompt-cache prefix could not be reused. Pass `null` on the first turn to opt in without a prior message to compare."
    })
  )
}).annotate({
  "title": "DiagnosticsParam",
  "description":
    "Request-level diagnostics. Currently carries the previous response\nid for prompt-cache divergence reporting.",
  "identifier": "DiagnosticsParam"
})
export type Metadata = { readonly "user_id"?: string | null }
export const Metadata = Schema.Struct({
  "user_id": Schema.optionalKey(
    Schema.Union([
      Schema.String.check(
        Schema.isMaxCodePoints(512).annotate({ "expected": "a string with at most 512 code points" })
      ),
      Schema.Null
    ]).annotate({
      "title": "User Id",
      "description":
        "An external identifier for the user who is associated with the request.\n\nThis should be a uuid, hash value, or other opaque identifier. Anthropic may use this id to help detect abuse. Do not include any identifying information such as name, email address, or phone number."
    })
  )
}).annotate({ "title": "Metadata", "identifier": "Metadata" })
export type EffortLevel = "low" | "medium" | "high" | "xhigh" | "max"
export const EffortLevel = Schema.Literals(["low", "medium", "high", "xhigh", "max"]).annotate({
  "title": "EffortLevel",
  "description": "All possible effort levels.",
  "identifier": "EffortLevel"
})
export type JsonOutputFormat = {
  readonly "schema": { readonly [x: string]: Schema.Json }
  readonly "type": "json_schema"
}
export const JsonOutputFormat = Schema.Struct({
  "schema": Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })).annotate({
    "title": "Schema",
    "description": "The JSON schema of the format"
  }),
  "type": Schema.Literal("json_schema").annotate({ "title": "Type" })
}).annotate({ "title": "JsonOutputFormat", "identifier": "JsonOutputFormat" })
export type Speed = "standard" | "fast"
export const Speed = Schema.Literals(["standard", "fast"]).annotate({ "title": "Speed", "identifier": "Speed" })
export type ThinkingDisplayMode = "summarized" | "omitted"
export const ThinkingDisplayMode = Schema.Literals(["summarized", "omitted"]).annotate({
  "title": "ThinkingDisplayMode",
  "identifier": "ThinkingDisplayMode"
})
export type ThinkingConfigDisabled = { readonly "type": "disabled" }
export const ThinkingConfigDisabled = Schema.Struct({
  "type": Schema.Literal("disabled").annotate({ "title": "Type" })
}).annotate({ "title": "ThinkingConfigDisabled", "identifier": "ThinkingConfigDisabled" })
export type ThinkingConfigBetweenTools = { readonly "type": "between_tools" }
export const ThinkingConfigBetweenTools = Schema.Struct({
  "type": Schema.Literal("between_tools").annotate({ "title": "Type" })
}).annotate({ "title": "ThinkingConfigBetweenTools", "identifier": "ThinkingConfigBetweenTools" })
export type ToolChoiceAuto = { readonly "disable_parallel_tool_use"?: boolean; readonly "type": "auto" }
export const ToolChoiceAuto = Schema.Struct({
  "disable_parallel_tool_use": Schema.optionalKey(
    Schema.Boolean.annotate({
      "title": "Disable Parallel Tool Use",
      "description":
        "Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output at most one tool use."
    })
  ),
  "type": Schema.Literal("auto").annotate({ "title": "Type" })
}).annotate({
  "title": "ToolChoiceAuto",
  "description": "The model will automatically decide whether to use tools.",
  "identifier": "ToolChoiceAuto"
})
export type ToolChoiceAny = { readonly "disable_parallel_tool_use"?: boolean; readonly "type": "any" }
export const ToolChoiceAny = Schema.Struct({
  "disable_parallel_tool_use": Schema.optionalKey(
    Schema.Boolean.annotate({
      "title": "Disable Parallel Tool Use",
      "description":
        "Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output exactly one tool use."
    })
  ),
  "type": Schema.Literal("any").annotate({ "title": "Type" })
}).annotate({
  "title": "ToolChoiceAny",
  "description": "The model will use any available tools.",
  "identifier": "ToolChoiceAny"
})
export type ToolChoiceTool = {
  readonly "disable_parallel_tool_use"?: boolean
  readonly "name": string
  readonly "type": "tool"
}
export const ToolChoiceTool = Schema.Struct({
  "disable_parallel_tool_use": Schema.optionalKey(
    Schema.Boolean.annotate({
      "title": "Disable Parallel Tool Use",
      "description":
        "Whether to disable parallel tool use.\n\nDefaults to `false`. If set to `true`, the model will output exactly one tool use."
    })
  ),
  "name": Schema.String.annotate({ "title": "Name", "description": "The name of the tool to use." }),
  "type": Schema.Literal("tool").annotate({ "title": "Type" })
}).annotate({
  "title": "ToolChoiceTool",
  "description": "The model will use the specified tool with `tool_choice.name`.",
  "identifier": "ToolChoiceTool"
})
export type ToolChoiceNone = { readonly "type": "none" }
export const ToolChoiceNone = Schema.Struct({ "type": Schema.Literal("none").annotate({ "title": "Type" }) }).annotate({
  "title": "ToolChoiceNone",
  "description": "The model will not be allowed to use tools.",
  "identifier": "ToolChoiceNone"
})
export type InputSchema = {
  readonly "properties"?: { readonly [x: string]: Schema.Json } | null
  readonly "required"?: ReadonlyArray<string> | null
  readonly "type": "object"
} & { readonly [x: string]: Schema.Json }
export const InputSchema = Schema.StructWithRest(
  Schema.Struct({
    "properties": Schema.optionalKey(
      Schema.Union([Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })), Schema.Null])
        .annotate({ "title": "Properties" })
    ),
    "required": Schema.optionalKey(
      Schema.Union([Schema.Array(Schema.String), Schema.Null]).annotate({ "title": "Required" })
    ),
    "type": Schema.Literal("object").annotate({ "title": "Type" })
  }),
  [Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))]
).annotate({ "title": "InputSchema", "identifier": "InputSchema" })
export type AllowedCaller = "direct" | "code_execution_20250825" | "code_execution_20260120" | "code_execution_20260521"
export const AllowedCaller = Schema.Literals([
  "direct",
  "code_execution_20250825",
  "code_execution_20260120",
  "code_execution_20260521"
]).annotate({
  "title": "AllowedCaller",
  "description":
    "Specifies who can invoke a tool.\n\nValues:\n    direct: The model can call this tool directly.\n    code_execution_20250825: The tool can be called from the code execution environment (v1).\n    code_execution_20260120: The tool can be called from the code execution environment (v2 with persistence).\n    code_execution_20260521: The tool can be called from the code execution environment (v2 with persistence).",
  "identifier": "AllowedCaller"
})
export type JsonValue = unknown
export const JsonValue = Schema.Unknown
export type BrowserCloseTabConfig = { readonly "defer_loading"?: boolean | null; readonly "enabled"?: boolean | null }
export const BrowserCloseTabConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserCloseTabConfig",
  "description": "``close_tab``'s config overrides.",
  "identifier": "BrowserCloseTabConfig"
})
export type BrowserDoubleClickConfig = {
  readonly "defer_loading"?: boolean | null
  readonly "enabled"?: boolean | null
}
export const BrowserDoubleClickConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserDoubleClickConfig",
  "description": "``double_click``'s config overrides.",
  "identifier": "BrowserDoubleClickConfig"
})
export type BrowserFileUploadConfig = { readonly "defer_loading"?: boolean | null; readonly "enabled"?: boolean | null }
export const BrowserFileUploadConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserFileUploadConfig",
  "description": "``file_upload``'s config overrides.",
  "identifier": "BrowserFileUploadConfig"
})
export type BrowserFindConfig = { readonly "defer_loading"?: boolean | null; readonly "enabled"?: boolean | null }
export const BrowserFindConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserFindConfig",
  "description": "``find``'s config overrides.",
  "identifier": "BrowserFindConfig"
})
export type BrowserFormInputConfig = { readonly "defer_loading"?: boolean | null; readonly "enabled"?: boolean | null }
export const BrowserFormInputConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserFormInputConfig",
  "description": "``form_input``'s config overrides.",
  "identifier": "BrowserFormInputConfig"
})
export type BrowserGetPageTextConfig = {
  readonly "defer_loading"?: boolean | null
  readonly "enabled"?: boolean | null
}
export const BrowserGetPageTextConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserGetPageTextConfig",
  "description": "``get_page_text``'s config overrides.",
  "identifier": "BrowserGetPageTextConfig"
})
export type BrowserHoldKeyConfig = { readonly "defer_loading"?: boolean | null; readonly "enabled"?: boolean | null }
export const BrowserHoldKeyConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserHoldKeyConfig",
  "description": "``hold_key``'s config overrides.",
  "identifier": "BrowserHoldKeyConfig"
})
export type BrowserHoverConfig = { readonly "defer_loading"?: boolean | null; readonly "enabled"?: boolean | null }
export const BrowserHoverConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserHoverConfig",
  "description": "``hover``'s config overrides.",
  "identifier": "BrowserHoverConfig"
})
export type BrowserJavascriptExecConfig = {
  readonly "defer_loading"?: boolean | null
  readonly "enabled"?: boolean | null
}
export const BrowserJavascriptExecConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserJavascriptExecConfig",
  "description": "``javascript_exec``'s config overrides.",
  "identifier": "BrowserJavascriptExecConfig"
})
export type BrowserKeyConfig = { readonly "defer_loading"?: boolean | null; readonly "enabled"?: boolean | null }
export const BrowserKeyConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserKeyConfig",
  "description": "``key``'s config overrides.",
  "identifier": "BrowserKeyConfig"
})
export type BrowserLeftClickConfig = { readonly "defer_loading"?: boolean | null; readonly "enabled"?: boolean | null }
export const BrowserLeftClickConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserLeftClickConfig",
  "description": "``left_click``'s config overrides.",
  "identifier": "BrowserLeftClickConfig"
})
export type BrowserLeftClickDragConfig = {
  readonly "defer_loading"?: boolean | null
  readonly "enabled"?: boolean | null
}
export const BrowserLeftClickDragConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserLeftClickDragConfig",
  "description": "``left_click_drag``'s config overrides.",
  "identifier": "BrowserLeftClickDragConfig"
})
export type BrowserLeftMouseDownConfig = {
  readonly "defer_loading"?: boolean | null
  readonly "enabled"?: boolean | null
}
export const BrowserLeftMouseDownConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserLeftMouseDownConfig",
  "description": "``left_mouse_down``'s config overrides.",
  "identifier": "BrowserLeftMouseDownConfig"
})
export type BrowserLeftMouseUpConfig = {
  readonly "defer_loading"?: boolean | null
  readonly "enabled"?: boolean | null
}
export const BrowserLeftMouseUpConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserLeftMouseUpConfig",
  "description": "``left_mouse_up``'s config overrides.",
  "identifier": "BrowserLeftMouseUpConfig"
})
export type BrowserListTabsConfig = { readonly "defer_loading"?: boolean | null; readonly "enabled"?: boolean | null }
export const BrowserListTabsConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserListTabsConfig",
  "description": "``list_tabs``'s config overrides.",
  "identifier": "BrowserListTabsConfig"
})
export type BrowserMiddleClickConfig = {
  readonly "defer_loading"?: boolean | null
  readonly "enabled"?: boolean | null
}
export const BrowserMiddleClickConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserMiddleClickConfig",
  "description": "``middle_click``'s config overrides.",
  "identifier": "BrowserMiddleClickConfig"
})
export type BrowserMouseMoveConfig = { readonly "defer_loading"?: boolean | null; readonly "enabled"?: boolean | null }
export const BrowserMouseMoveConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserMouseMoveConfig",
  "description": "``mouse_move``'s config overrides.",
  "identifier": "BrowserMouseMoveConfig"
})
export type BrowserNavigateConfig = { readonly "defer_loading"?: boolean | null; readonly "enabled"?: boolean | null }
export const BrowserNavigateConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",
      "description":
        "Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema."
    })
  )
}).annotate({
  "title": "BrowserNavigateConfig",
  "description": "``navigate``'s config overrides.",
  "identifier": "BrowserNavigateConfig"
})
export type BrowserNewTabConfig = { readonly "defer_loading"?: boolean | null; readonly "enabled"?: boolean | null }
export const BrowserNewTabConfig = Schema.Struct({
  "defer_loading": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Defer Loading",
      "description":
        "Defer loading for this member. Must resolve to the same value on every enabled member of the toolset."
    })
  ),
  "enabled": Schema.optionalKey(
    Schema.Union([Schema.Boolean, Schema.Null]).annotate({
      "title": "Enabled",