@puku-ai/sdk 4.0.0 → 4.0.1
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/README.md +29 -10
- package/package.json +1 -1
- package/sdk.cjs +5 -5
- package/sdk.cjs.map +17 -17
- package/sdk.d.ts +9 -9
- package/sdk.mjs +21 -21
- package/sdk.mjs.map +17 -17
package/sdk.cjs.map
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\n/**\n * https://stackoverflow.com/a/2117523\n */\nexport let uuid4 = function () {\n const { crypto } = globalThis as any;\n if (crypto?.randomUUID) {\n uuid4 = crypto.randomUUID.bind(crypto);\n return crypto.randomUUID();\n }\n const u8 = new Uint8Array(1);\n const randomByte = crypto ? () => crypto.getRandomValues(u8)[0]! : () => (Math.random() * 0xff) & 0xff;\n return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, (c) =>\n (+c ^ (randomByte() & (15 >> (+c / 4)))).toString(16),\n );\n};\n",
|
|
6
6
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nexport function isAbortError(err: unknown) {\n return (\n typeof err === 'object' &&\n err !== null &&\n // Spec-compliant fetch implementations\n (('name' in err && (err as any).name === 'AbortError') ||\n // Expo fetch\n ('message' in err && String((err as any).message).includes('FetchRequestCanceledException')))\n );\n}\n\nexport const castToError = (err: any): Error => {\n if (err instanceof Error) return err;\n if (typeof err === 'object' && err !== null) {\n try {\n const tag = Object.prototype.toString.call(err);\n // cross-realm errors (e.g. undici's abort `DOMException` under jest) fail `instanceof Error`\n if (tag === '[object Error]' || tag === '[object DOMException]') {\n // @ts-ignore - not all envs have native support for cause yet\n const error = new Error(err.message, err.cause ? { cause: err.cause } : {});\n if (err.stack) error.stack = err.stack;\n // @ts-ignore - not all envs have native support for cause yet\n if (err.cause && !error.cause) error.cause = err.cause;\n if (err.name) error.name = err.name;\n return error;\n }\n } catch {}\n try {\n return new Error(JSON.stringify(err));\n } catch {}\n }\n return new Error(err);\n};\n",
|
|
7
|
-
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { castToError } from '../internal/errors';\nimport type { ErrorType } from '../resources/shared';\n\n/**\n * Branded base error class for the Puku SDK. Every error the SDK throws\n * is an instance of `PukuError`, so `err.toString()` and stack traces\n * report `PukuError: …` consistently.\n *\n * `instanceof PukuError` is the canonical check. The class itself is\n * re-exported from `@puku-ai/sdk` under both `PukuError` and the legacy\n * `PukuError` name; both refer to the same constructor.\n */\nexport class PukuError extends Error {\n override name: string = 'PukuError';\n constructor(message?: string) {\n super(message);\n this.name = 'PukuError';\n }\n}\n\n/**\n * Legacy base-error type alias for source compatibility with code that\n * imports the
|
|
8
|
-
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { PukuError } from '../../core/error';\n\n//
|
|
7
|
+
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { castToError } from '../internal/errors';\nimport type { ErrorType } from '../resources/shared';\n\n/**\n * Branded base error class for the Puku SDK. Every error the SDK throws\n * is an instance of `PukuError`, so `err.toString()` and stack traces\n * report `PukuError: …` consistently.\n *\n * `instanceof PukuError` is the canonical check. The class itself is\n * re-exported from `@puku-ai/sdk` under both `PukuError` and the legacy\n * `PukuError` name; both refer to the same constructor.\n */\nexport class PukuError extends Error {\n override name: string = 'PukuError';\n constructor(message?: string) {\n super(message);\n this.name = 'PukuError';\n }\n}\n\n/**\n * Legacy base-error type alias for source compatibility with code that\n * imports the SDK's base error type by its old name. Throw sites\n * should always throw `PukuError` directly; the legacy alias exists only\n * so consumers' `instanceof` checks keep working across the rename.\n *\n * @deprecated Import `PukuError` instead. The alias will be removed in\n * the next major version.\n */\nexport type LegacyBaseError = PukuError;\n\nexport class APIError<\n TStatus extends number | undefined = number | undefined,\n THeaders extends Headers | undefined = Headers | undefined,\n TError extends Object | undefined = Object | undefined,\n> extends PukuError {\n /** HTTP status for the response that caused the error */\n readonly status: TStatus;\n /** HTTP headers for the response that caused the error */\n readonly headers: THeaders;\n /** JSON body of the response that caused the error */\n readonly error: TError;\n\n readonly requestID: string | null | undefined;\n readonly workspaceID: string | null | undefined;\n\n /** The `error.type` from the API response body, e.g. `\"rate_limit_error\"` */\n readonly type: ErrorType | null;\n\n constructor(\n status: TStatus,\n error: TError,\n message: string | undefined,\n headers: THeaders,\n type?: ErrorType | null,\n ) {\n super(`${APIError.makeMessage(status, error, message)}`);\n this.status = status;\n this.headers = headers;\n this.requestID = headers?.get('request-id');\n this.workspaceID = headers?.get('puku-workspace-id');\n this.error = error;\n this.type = type ?? null;\n }\n\n private static makeMessage(status: number | undefined, error: any, message: string | undefined) {\n const msg =\n error?.message ?\n typeof error.message === 'string' ?\n error.message\n : JSON.stringify(error.message)\n : error ? JSON.stringify(error)\n : message;\n\n if (status && msg) {\n return `${status} ${msg}`;\n }\n if (status) {\n return `${status} status code (no body)`;\n }\n if (msg) {\n return msg;\n }\n return '(no status code or body)';\n }\n\n static generate(\n status: number | undefined,\n errorResponse: Object | undefined,\n message: string | undefined,\n headers: Headers | undefined,\n ): APIError {\n if (!status || !headers) {\n return new APIConnectionError({ message, cause: castToError(errorResponse) });\n }\n\n const error = errorResponse as Record<string, any>;\n const type = error?.['error']?.['type'] as ErrorType | undefined;\n\n if (status === 400) {\n return new BadRequestError(status, error, message, headers, type);\n }\n\n if (status === 401) {\n return new AuthenticationError(status, error, message, headers, type);\n }\n\n if (status === 403) {\n return new PermissionDeniedError(status, error, message, headers, type);\n }\n\n if (status === 404) {\n return new NotFoundError(status, error, message, headers, type);\n }\n\n if (status === 409) {\n return new ConflictError(status, error, message, headers, type);\n }\n\n if (status === 422) {\n return new UnprocessableEntityError(status, error, message, headers, type);\n }\n\n if (status === 429) {\n return new RateLimitError(status, error, message, headers, type);\n }\n\n if (status >= 500) {\n return new InternalServerError(status, error, message, headers, type);\n }\n\n return new APIError(status, error, message, headers, type);\n }\n}\n\nexport class APIUserAbortError extends APIError<undefined, undefined, undefined> {\n constructor({ message }: { message?: string } = {}) {\n super(undefined, undefined, message || 'Request was aborted.', undefined);\n }\n}\n\nexport class APIConnectionError extends APIError<undefined, undefined, undefined> {\n constructor({ message, cause }: { message?: string | undefined; cause?: Error | undefined }) {\n super(undefined, undefined, message || 'Connection error.', undefined);\n // in some environments the 'cause' property is already declared\n // @ts-ignore\n if (cause) this.cause = cause;\n }\n}\n\nexport class APIConnectionTimeoutError extends APIConnectionError {\n constructor({ message }: { message?: string } = {}) {\n super({ message: message ?? 'Request timed out.' });\n }\n}\n\n/**\n * An error that opts into the SDK's retry policy: throw it (e.g. from\n * middleware) to have the attempt retried.\n *\n * Note that the request will only be retried when `maxRetries` has not been exhausted.\n */\nexport class RetryableError extends PukuError {\n constructor(message?: string, { cause }: { cause?: unknown } = {}) {\n super(message ?? 'Retryable error.');\n // in some environments the 'cause' property is already declared\n // @ts-ignore\n if (cause !== undefined) this.cause = cause;\n }\n}\n\nexport class BadRequestError extends APIError<400, Headers> {}\n\nexport class AuthenticationError extends APIError<401, Headers> {}\n\nexport class PermissionDeniedError extends APIError<403, Headers> {}\n\nexport class NotFoundError extends APIError<404, Headers> {}\n\nexport class ConflictError extends APIError<409, Headers> {}\n\nexport class UnprocessableEntityError extends APIError<422, Headers> {}\n\nexport class RateLimitError extends APIError<429, Headers> {}\n\nexport class InternalServerError extends APIError<number, Headers> {}\n",
|
|
8
|
+
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { PukuError } from '../../core/error';\n\n// \nconst startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i;\n\nexport const isAbsoluteURL = (url: string): boolean => {\n return startsWithSchemeRegexp.test(url);\n};\n\nexport let isArray = (val: unknown): val is unknown[] => ((isArray = Array.isArray), isArray(val));\nexport let isReadonlyArray = isArray as (val: unknown) => val is readonly unknown[];\n\n/** Returns an object if the given value isn't an object, otherwise returns as-is */\nexport function maybeObj(x: unknown): object {\n if (typeof x !== 'object') {\n return {};\n }\n\n return x ?? {};\n}\n\n// https://stackoverflow.com/a/34491287\nexport function isEmptyObj(obj: Object | null | undefined): boolean {\n if (!obj) return true;\n for (const _k in obj) return false;\n return true;\n}\n\n// https://eslint.org/docs/latest/rules/no-prototype-builtins\nexport function hasOwn<T extends object = object>(obj: T, key: PropertyKey): key is keyof T {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport function isObj(obj: unknown): obj is Record<string, unknown> {\n return obj != null && typeof obj === 'object' && !Array.isArray(obj);\n}\n\nexport const ensurePresent = <T>(value: T | null | undefined): T => {\n if (value == null) {\n throw new PukuError(`Expected a value to be given but received ${value} instead.`);\n }\n\n return value;\n};\n\nexport const validatePositiveInteger = (name: string, n: unknown): number => {\n if (typeof n !== 'number' || !Number.isInteger(n)) {\n throw new PukuError(`${name} must be an integer`);\n }\n if (n < 0) {\n throw new PukuError(`${name} must be a positive integer`);\n }\n return n;\n};\n\nexport const coerceInteger = (value: unknown): number => {\n if (typeof value === 'number') return Math.round(value);\n if (typeof value === 'string') return parseInt(value, 10);\n\n throw new PukuError(`Could not coerce ${value} (type: ${typeof value}) into a number`);\n};\n\nexport const coerceFloat = (value: unknown): number => {\n if (typeof value === 'number') return value;\n if (typeof value === 'string') return parseFloat(value);\n\n throw new PukuError(`Could not coerce ${value} (type: ${typeof value}) into a number`);\n};\n\nexport const coerceBoolean = (value: unknown): boolean => {\n if (typeof value === 'boolean') return value;\n if (typeof value === 'string') return value === 'true';\n return Boolean(value);\n};\n\nexport const maybeCoerceInteger = (value: unknown): number | undefined => {\n if (value == null) {\n return undefined;\n }\n return coerceInteger(value);\n};\n\nexport const maybeCoerceFloat = (value: unknown): number | undefined => {\n if (value == null) {\n return undefined;\n }\n return coerceFloat(value);\n};\n\nexport const maybeCoerceBoolean = (value: unknown): boolean | undefined => {\n if (value == null) {\n return undefined;\n }\n return coerceBoolean(value);\n};\n\nexport const safeJSON = (text: string) => {\n try {\n return JSON.parse(text);\n } catch (err) {\n return undefined;\n }\n};\n\n// Gets a value from an object, deletes the key, and returns the value (or undefined if not found)\nexport const pop = <T extends Record<string, any>, K extends string>(obj: T, key: K): T[K] => {\n const value = obj[key];\n delete obj[key];\n return value;\n};\n\n/**\n * Compile-time exhaustiveness check: passing a value here only type-checks once every\n * member of its union has been handled. Does nothing at runtime, so unknown values from a\n * newer API version fall through instead of throwing.\n */\nexport function checkNever(_value: never): void {}\n",
|
|
9
9
|
"/**\n * Resolve after `ms`, or immediately when `signal` aborts.\n *\n * When a `signal` is passed the abort listener is always removed so repeated\n * calls do not accumulate listeners on a long-lived signal. Resolves (rather\n * than rejects) on abort — callers treat abort as \"wake up early,\" not as a\n * failure; callers that want to unwind should check the signal themselves.\n */\nexport const sleep = (ms: number, signal?: AbortSignal): Promise<void> =>\n new Promise<void>((resolve) => {\n if (signal?.aborted) return resolve();\n\n const onAbort = () => {\n clearTimeout(timer);\n resolve();\n };\n\n const timer = setTimeout(() => {\n signal?.removeEventListener('abort', onAbort);\n resolve();\n }, ms);\n\n // `{ once: true }` auto-removes the listener if abort fires first,\n // so we only need an explicit remove on the timer-wins path above.\n signal?.addEventListener('abort', onAbort, { once: true });\n });\n",
|
|
10
10
|
"export const VERSION = '0.123.0'; // x-release-please-version\n",
|
|
11
|
-
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { VERSION } from '../version';\n\nexport const isRunningInBrowser = () => {\n return (\n // @ts-ignore\n typeof window !== 'undefined' &&\n // @ts-ignore\n typeof window.document !== 'undefined' &&\n // @ts-ignore\n typeof navigator !== 'undefined'\n );\n};\n\ntype DetectedPlatform = 'deno' | 'node' | 'edge' | 'unknown';\n\n/**\n * Note this does not detect 'browser'; for that, use getBrowserInfo().\n */\nfunction getDetectedPlatform(): DetectedPlatform {\n if (typeof Deno !== 'undefined' && Deno.build != null) {\n return 'deno';\n }\n if (typeof EdgeRuntime !== 'undefined') {\n return 'edge';\n }\n if (\n Object.prototype.toString.call(\n typeof (globalThis as any).process !== 'undefined' ? (globalThis as any).process : 0,\n ) === '[object process]'\n ) {\n return 'node';\n }\n return 'unknown';\n}\n\ndeclare const Deno: any;\ndeclare const EdgeRuntime: any;\ntype Arch = 'x32' | 'x64' | 'arm' | 'arm64' | `other:${string}` | 'unknown';\ntype PlatformName =\n | 'MacOS'\n | 'Linux'\n | 'Windows'\n | 'FreeBSD'\n | 'OpenBSD'\n | 'iOS'\n | 'Android'\n | `Other:${string}`\n | 'Unknown';\ntype Browser = 'ie' | 'edge' | 'chrome' | 'firefox' | 'safari';\ntype PlatformProperties = {\n 'X-Stainless-Lang': 'js';\n 'X-Stainless-Package-Version': string;\n 'X-Stainless-OS': PlatformName;\n 'X-Stainless-Arch': Arch;\n 'X-Stainless-Runtime': 'node' | 'deno' | 'edge' | `browser:${Browser}` | 'unknown';\n 'X-Stainless-Runtime-Version': string;\n};\nconst getPlatformProperties = (): PlatformProperties => {\n const detectedPlatform = getDetectedPlatform();\n if (detectedPlatform === 'deno') {\n return {\n 'X-Stainless-Lang': 'js',\n 'X-Stainless-Package-Version': VERSION,\n 'X-Stainless-OS': normalizePlatform(Deno.build.os),\n 'X-Stainless-Arch': normalizeArch(Deno.build.arch),\n 'X-Stainless-Runtime': 'deno',\n 'X-Stainless-Runtime-Version':\n typeof Deno.version === 'string' ? Deno.version : Deno.version?.deno ?? 'unknown',\n };\n }\n if (typeof EdgeRuntime !== 'undefined') {\n return {\n 'X-Stainless-Lang': 'js',\n 'X-Stainless-Package-Version': VERSION,\n 'X-Stainless-OS': 'Unknown',\n 'X-Stainless-Arch': `other:${EdgeRuntime}`,\n 'X-Stainless-Runtime': 'edge',\n 'X-Stainless-Runtime-Version': (globalThis as any).process?.version ?? 'unknown',\n };\n }\n // Check if Node.js\n if (detectedPlatform === 'node') {\n return {\n 'X-Stainless-Lang': 'js',\n 'X-Stainless-Package-Version': VERSION,\n 'X-Stainless-OS': normalizePlatform((globalThis as any).process.platform ?? 'unknown'),\n 'X-Stainless-Arch': normalizeArch((globalThis as any).process.arch ?? 'unknown'),\n 'X-Stainless-Runtime': 'node',\n 'X-Stainless-Runtime-Version': (globalThis as any).process.version ?? 'unknown',\n };\n }\n\n const browserInfo = getBrowserInfo();\n if (browserInfo) {\n return {\n 'X-Stainless-Lang': 'js',\n 'X-Stainless-Package-Version': VERSION,\n 'X-Stainless-OS': 'Unknown',\n 'X-Stainless-Arch': 'unknown',\n 'X-Stainless-Runtime': `browser:${browserInfo.browser}`,\n 'X-Stainless-Runtime-Version': browserInfo.version,\n };\n }\n\n // TODO add support for Cloudflare workers, etc.\n return {\n 'X-Stainless-Lang': 'js',\n 'X-Stainless-Package-Version': VERSION,\n 'X-Stainless-OS': 'Unknown',\n 'X-Stainless-Arch': 'unknown',\n 'X-Stainless-Runtime': 'unknown',\n 'X-Stainless-Runtime-Version': 'unknown',\n };\n};\n\ntype BrowserInfo = {\n browser: Browser;\n version: string;\n};\n\ndeclare const navigator: { userAgent: string } | undefined;\n\n// Note: modified from https://github.com/JS-DevTools/host-environment/blob/b1ab79ecde37db5d6e163c050e54fe7d287d7c92/src/isomorphic.browser.ts\nfunction getBrowserInfo(): BrowserInfo | null {\n if (typeof navigator === 'undefined' || !navigator) {\n return null;\n }\n\n // NOTE: The order matters here!\n const browserPatterns = [\n { key: 'edge' as const, pattern: /Edge(?:\\W+(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?/ },\n { key: 'ie' as const, pattern: /MSIE(?:\\W+(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?/ },\n { key: 'ie' as const, pattern: /Trident(?:.*rv\\:(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?/ },\n { key: 'chrome' as const, pattern: /Chrome(?:\\W+(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?/ },\n { key: 'firefox' as const, pattern: /Firefox(?:\\W+(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?/ },\n { key: 'safari' as const, pattern: /(?:Version\\W+(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?(?:\\W+Mobile\\S*)?\\W+Safari/ },\n ];\n\n // Find the FIRST matching browser\n for (const { key, pattern } of browserPatterns) {\n const match = pattern.exec(navigator.userAgent);\n if (match) {\n const major = match[1] || 0;\n const minor = match[2] || 0;\n const patch = match[3] || 0;\n\n return { browser: key, version: `${major}.${minor}.${patch}` };\n }\n }\n\n return null;\n}\n\nconst normalizeArch = (arch: string): Arch => {\n // Node docs:\n // - https://nodejs.org/api/process.html#processarch\n // Deno docs:\n // - https://doc.deno.land/deno/stable/~/Deno.build\n if (arch === 'x32') return 'x32';\n if (arch === 'x86_64' || arch === 'x64') return 'x64';\n if (arch === 'arm') return 'arm';\n if (arch === 'aarch64' || arch === 'arm64') return 'arm64';\n if (arch) return `other:${arch}`;\n return 'unknown';\n};\n\nconst normalizePlatform = (platform: string): PlatformName => {\n // Node platforms:\n // - https://nodejs.org/api/process.html#processplatform\n // Deno platforms:\n
|
|
11
|
+
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { VERSION } from '../version';\n\nexport const isRunningInBrowser = () => {\n return (\n // @ts-ignore\n typeof window !== 'undefined' &&\n // @ts-ignore\n typeof window.document !== 'undefined' &&\n // @ts-ignore\n typeof navigator !== 'undefined'\n );\n};\n\ntype DetectedPlatform = 'deno' | 'node' | 'edge' | 'unknown';\n\n/**\n * Note this does not detect 'browser'; for that, use getBrowserInfo().\n */\nfunction getDetectedPlatform(): DetectedPlatform {\n if (typeof Deno !== 'undefined' && Deno.build != null) {\n return 'deno';\n }\n if (typeof EdgeRuntime !== 'undefined') {\n return 'edge';\n }\n if (\n Object.prototype.toString.call(\n typeof (globalThis as any).process !== 'undefined' ? (globalThis as any).process : 0,\n ) === '[object process]'\n ) {\n return 'node';\n }\n return 'unknown';\n}\n\ndeclare const Deno: any;\ndeclare const EdgeRuntime: any;\ntype Arch = 'x32' | 'x64' | 'arm' | 'arm64' | `other:${string}` | 'unknown';\ntype PlatformName =\n | 'MacOS'\n | 'Linux'\n | 'Windows'\n | 'FreeBSD'\n | 'OpenBSD'\n | 'iOS'\n | 'Android'\n | `Other:${string}`\n | 'Unknown';\ntype Browser = 'ie' | 'edge' | 'chrome' | 'firefox' | 'safari';\ntype PlatformProperties = {\n 'X-Stainless-Lang': 'js';\n 'X-Stainless-Package-Version': string;\n 'X-Stainless-OS': PlatformName;\n 'X-Stainless-Arch': Arch;\n 'X-Stainless-Runtime': 'node' | 'deno' | 'edge' | `browser:${Browser}` | 'unknown';\n 'X-Stainless-Runtime-Version': string;\n};\nconst getPlatformProperties = (): PlatformProperties => {\n const detectedPlatform = getDetectedPlatform();\n if (detectedPlatform === 'deno') {\n return {\n 'X-Stainless-Lang': 'js',\n 'X-Stainless-Package-Version': VERSION,\n 'X-Stainless-OS': normalizePlatform(Deno.build.os),\n 'X-Stainless-Arch': normalizeArch(Deno.build.arch),\n 'X-Stainless-Runtime': 'deno',\n 'X-Stainless-Runtime-Version':\n typeof Deno.version === 'string' ? Deno.version : Deno.version?.deno ?? 'unknown',\n };\n }\n if (typeof EdgeRuntime !== 'undefined') {\n return {\n 'X-Stainless-Lang': 'js',\n 'X-Stainless-Package-Version': VERSION,\n 'X-Stainless-OS': 'Unknown',\n 'X-Stainless-Arch': `other:${EdgeRuntime}`,\n 'X-Stainless-Runtime': 'edge',\n 'X-Stainless-Runtime-Version': (globalThis as any).process?.version ?? 'unknown',\n };\n }\n // Check if Node.js\n if (detectedPlatform === 'node') {\n return {\n 'X-Stainless-Lang': 'js',\n 'X-Stainless-Package-Version': VERSION,\n 'X-Stainless-OS': normalizePlatform((globalThis as any).process.platform ?? 'unknown'),\n 'X-Stainless-Arch': normalizeArch((globalThis as any).process.arch ?? 'unknown'),\n 'X-Stainless-Runtime': 'node',\n 'X-Stainless-Runtime-Version': (globalThis as any).process.version ?? 'unknown',\n };\n }\n\n const browserInfo = getBrowserInfo();\n if (browserInfo) {\n return {\n 'X-Stainless-Lang': 'js',\n 'X-Stainless-Package-Version': VERSION,\n 'X-Stainless-OS': 'Unknown',\n 'X-Stainless-Arch': 'unknown',\n 'X-Stainless-Runtime': `browser:${browserInfo.browser}`,\n 'X-Stainless-Runtime-Version': browserInfo.version,\n };\n }\n\n // TODO add support for Cloudflare workers, etc.\n return {\n 'X-Stainless-Lang': 'js',\n 'X-Stainless-Package-Version': VERSION,\n 'X-Stainless-OS': 'Unknown',\n 'X-Stainless-Arch': 'unknown',\n 'X-Stainless-Runtime': 'unknown',\n 'X-Stainless-Runtime-Version': 'unknown',\n };\n};\n\ntype BrowserInfo = {\n browser: Browser;\n version: string;\n};\n\ndeclare const navigator: { userAgent: string } | undefined;\n\n// Note: modified from https://github.com/JS-DevTools/host-environment/blob/b1ab79ecde37db5d6e163c050e54fe7d287d7c92/src/isomorphic.browser.ts\nfunction getBrowserInfo(): BrowserInfo | null {\n if (typeof navigator === 'undefined' || !navigator) {\n return null;\n }\n\n // NOTE: The order matters here!\n const browserPatterns = [\n { key: 'edge' as const, pattern: /Edge(?:\\W+(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?/ },\n { key: 'ie' as const, pattern: /MSIE(?:\\W+(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?/ },\n { key: 'ie' as const, pattern: /Trident(?:.*rv\\:(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?/ },\n { key: 'chrome' as const, pattern: /Chrome(?:\\W+(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?/ },\n { key: 'firefox' as const, pattern: /Firefox(?:\\W+(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?/ },\n { key: 'safari' as const, pattern: /(?:Version\\W+(\\d+)\\.(\\d+)(?:\\.(\\d+))?)?(?:\\W+Mobile\\S*)?\\W+Safari/ },\n ];\n\n // Find the FIRST matching browser\n for (const { key, pattern } of browserPatterns) {\n const match = pattern.exec(navigator.userAgent);\n if (match) {\n const major = match[1] || 0;\n const minor = match[2] || 0;\n const patch = match[3] || 0;\n\n return { browser: key, version: `${major}.${minor}.${patch}` };\n }\n }\n\n return null;\n}\n\nconst normalizeArch = (arch: string): Arch => {\n // Node docs:\n // - https://nodejs.org/api/process.html#processarch\n // Deno docs:\n // - https://doc.deno.land/deno/stable/~/Deno.build\n if (arch === 'x32') return 'x32';\n if (arch === 'x86_64' || arch === 'x64') return 'x64';\n if (arch === 'arm') return 'arm';\n if (arch === 'aarch64' || arch === 'arm64') return 'arm64';\n if (arch) return `other:${arch}`;\n return 'unknown';\n};\n\nconst normalizePlatform = (platform: string): PlatformName => {\n // Node platforms:\n // - https://nodejs.org/api/process.html#processplatform\n // Deno platforms:\n \n\n platform = platform.toLowerCase();\n\n // NOTE: this iOS check is untested and may not work\n // Node does not work natively on IOS, there is a fork at\n // https://github.com/nodejs-mobile/nodejs-mobile\n // however it is unknown at the time of writing how to detect if it is running\n if (platform.includes('ios')) return 'iOS';\n if (platform === 'android') return 'Android';\n if (platform === 'darwin') return 'MacOS';\n if (platform === 'win32') return 'Windows';\n if (platform === 'freebsd') return 'FreeBSD';\n if (platform === 'openbsd') return 'OpenBSD';\n if (platform === 'linux') return 'Linux';\n if (platform) return `Other:${platform}`;\n return 'Unknown';\n};\n\nlet _platformHeaders: PlatformProperties;\nexport const getPlatformHeaders = () => {\n return (_platformHeaders ??= getPlatformProperties());\n};\n",
|
|
12
12
|
"/**\n * Tracks the removal of the per-request abort listener that\n * `fetchWithTimeout` attaches to a caller-provided signal, so the listener's\n * lifetime matches the request instead of the signal.\n *\n * Without removal, a long-lived signal (e.g. one AbortController reused for\n * a whole session) accumulates one `{ once: true }` listener plus its bound\n * AbortController per HTTP attempt until the signal fires or is collected,\n * and Node warns at the 11th listener. The listener must survive until the\n * response body is settled - removing it when fetch resolves (headers) would\n * break aborting an in-flight body read - so the code that finishes the body\n * (response parsing, stream teardown, retry/error handling) calls\n * `releaseRequestSignal` with the request's controller.\n */\nconst cleanups = new WeakMap<AbortController, () => void>();\n\n// Backstop for requests that never reach an explicit release point: a caller\n// that partially iterates a stream (or receives a raw binary Response) and\n// drops the reference never completes, errors, or cancels it, so the only\n// remaining lifecycle event is the response being collected. Finalization\n// timing is GC-driven and not guaranteed, so this only bounds abandonment -\n// the explicit release calls stay the primary cleanup. The held value must\n// not reference the response, or it could never be collected. Typed\n// structurally because the compiler lib is es2020.\ntype AbandonmentRegistry = {\n register(target: object, heldValue: AbortController, token: object): void;\n unregister(token: object): void;\n};\n\nconst registry: AbandonmentRegistry | null =\n typeof (globalThis as any).FinalizationRegistry === 'function' ?\n new (globalThis as any).FinalizationRegistry((controller: AbortController) =>\n releaseRequestSignal(controller),\n )\n : null;\n\n// Module-scope factory so the cleanup closure captures exactly the signal and\n// the listener - built at the `fetchWithTimeout` call site it would share that\n// scope's context and retain the request body for as long as the cleanup is\n// held (same reason `_makeAbort` exists in client.ts).\nfunction makeCleanup(signal: AbortSignal, listener: () => void): () => void {\n return () => signal.removeEventListener('abort', listener);\n}\n\nexport function registerRequestSignalCleanup(\n controller: AbortController,\n signal: AbortSignal,\n listener: () => void,\n): void {\n cleanups.set(controller, makeCleanup(signal, listener));\n}\n\n// The registered target is the response BODY, not the Response: a caller can\n// keep a reader on the body and drop the Response wrapper (`.asResponse()`),\n// and the listener must survive for as long as anything can still read - the\n// body is what a live read keeps alive.\nexport function armAbandonmentBackstop(body: object, controller: AbortController): void {\n if (cleanups.has(controller)) registry?.register(body, controller, controller);\n}\n\nexport function releaseRequestSignal(controller: AbortController): void {\n const cleanup = cleanups.get(controller);\n if (cleanup) {\n cleanups.delete(controller);\n registry?.unregister(controller);\n cleanup();\n }\n}\n",
|
|
13
|
-
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\n/**\n * This module provides internal shims and utility functions for environments where certain Node.js or global types may not be available.\n *\n * These are used to ensure we can provide a consistent behaviour between different JavaScript environments and good error\n * messages in cases where an environment isn't fully supported.\n */\n\nimport type { Fetch } from './builtin-types';\nimport type { ReadableStream } from './shim-types';\n\nexport function getDefaultFetch(): Fetch {\n if (typeof fetch !== 'undefined') {\n return fetch as any;\n }\n\n throw new Error(\n '`fetch` is not defined as a global; Either pass `fetch` to the client, `new PukuAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`',\n );\n}\n\ntype ReadableStreamArgs = ConstructorParameters<typeof ReadableStream>;\n\nexport function makeReadableStream(...args: ReadableStreamArgs): ReadableStream {\n const ReadableStream = (globalThis as any).ReadableStream;\n if (typeof ReadableStream === 'undefined') {\n // Note: All of the platforms / runtimes we officially support already define\n // `ReadableStream` as a global, so this should only ever be hit on unsupported runtimes.\n throw new Error(\n '`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`',\n );\n }\n\n return new ReadableStream(...args);\n}\n\nexport function ReadableStreamFrom<T>(iterable: Iterable<T> | AsyncIterable<T>): ReadableStream<T> {\n let iter: AsyncIterator<T> | Iterator<T> =\n Symbol.asyncIterator in iterable ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();\n\n return makeReadableStream({\n start() {},\n async pull(controller: any) {\n const { done, value } = await iter.next();\n if (done) {\n controller.close();\n } else {\n controller.enqueue(value);\n }\n },\n async cancel() {\n await iter.return?.();\n },\n });\n}\n\n/**\n * Most browsers don't yet have async iterable support for ReadableStream,\n * and Node has a very different way of reading bytes from its \"ReadableStream\".\n *\n * This polyfill was pulled from
|
|
13
|
+
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\n/**\n * This module provides internal shims and utility functions for environments where certain Node.js or global types may not be available.\n *\n * These are used to ensure we can provide a consistent behaviour between different JavaScript environments and good error\n * messages in cases where an environment isn't fully supported.\n */\n\nimport type { Fetch } from './builtin-types';\nimport type { ReadableStream } from './shim-types';\n\nexport function getDefaultFetch(): Fetch {\n if (typeof fetch !== 'undefined') {\n return fetch as any;\n }\n\n throw new Error(\n '`fetch` is not defined as a global; Either pass `fetch` to the client, `new PukuAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`',\n );\n}\n\ntype ReadableStreamArgs = ConstructorParameters<typeof ReadableStream>;\n\nexport function makeReadableStream(...args: ReadableStreamArgs): ReadableStream {\n const ReadableStream = (globalThis as any).ReadableStream;\n if (typeof ReadableStream === 'undefined') {\n // Note: All of the platforms / runtimes we officially support already define\n // `ReadableStream` as a global, so this should only ever be hit on unsupported runtimes.\n throw new Error(\n '`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`',\n );\n }\n\n return new ReadableStream(...args);\n}\n\nexport function ReadableStreamFrom<T>(iterable: Iterable<T> | AsyncIterable<T>): ReadableStream<T> {\n let iter: AsyncIterator<T> | Iterator<T> =\n Symbol.asyncIterator in iterable ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();\n\n return makeReadableStream({\n start() {},\n async pull(controller: any) {\n const { done, value } = await iter.next();\n if (done) {\n controller.close();\n } else {\n controller.enqueue(value);\n }\n },\n async cancel() {\n await iter.return?.();\n },\n });\n}\n\n/**\n * Most browsers don't yet have async iterable support for ReadableStream,\n * and Node has a very different way of reading bytes from its \"ReadableStream\".\n *\n * This polyfill was pulled from\n */\nexport function ReadableStreamToAsyncIterable<T>(stream: any): AsyncIterableIterator<T> {\n if (stream[Symbol.asyncIterator]) return stream;\n\n const reader = stream.getReader();\n return {\n async next() {\n try {\n const result = await reader.read();\n if (result?.done) reader.releaseLock(); // release lock when stream becomes closed\n return result;\n } catch (e) {\n reader.releaseLock(); // release lock when stream becomes errored\n throw e;\n }\n },\n async return() {\n const cancelPromise = reader.cancel();\n reader.releaseLock();\n await cancelPromise;\n return { done: true, value: undefined };\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n };\n}\n\n/**\n * Cancels a ReadableStream we don't need to consume.\n * See https://undici.nodejs.org/#/?id=garbage-collection\n */\nexport async function CancelReadableStream(stream: any): Promise<void> {\n if (stream === null || typeof stream !== 'object') return;\n\n if (stream[Symbol.asyncIterator]) {\n await stream[Symbol.asyncIterator]().return?.();\n return;\n }\n\n const reader = stream.getReader();\n const cancelPromise = reader.cancel();\n reader.releaseLock();\n await cancelPromise;\n}\n",
|
|
14
14
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { NullableHeaders } from './headers';\n\nimport type { BodyInit } from './builtin-types';\nimport { Stream } from '../core/streaming';\nimport type { Middleware } from '../core/middleware';\nimport type { HTTPMethod, MergedRequestInit } from './types';\nimport { type HeadersLike } from './headers';\n\nexport type FinalRequestOptions = RequestOptions & { method: HTTPMethod; path: string };\n\n/**\n * Tracks which fallback a sequence of requests is pinned to.\n *\n * Create one (`new BetaFallbackState()`) and pass it via the `fallbackState`\n * request option on every request that should share the pin — the turns of one\n * conversation, or any wider scope the stickiness should apply to;\n * `betaRefusalFallbackMiddleware` mutates it in place when a model refuses.\n */\nexport class BetaFallbackState {\n /**\n * Index into the fallback chain the requests are pinned to.\n *\n * `undefined` (or -1) targets the original request params; the middleware\n * sets it to the index of the fallback that accepted the request.\n */\n index?: number;\n}\n\n/**\n * Options for an individual API request.\n *\n * Declared as an interface so it can be extended via declaration merging, e.g.\n * to thread custom per-request context through to {@link Middleware}:\n *\n * ```ts\n * declare module '@puku-ai/sdk/internal/request-options' {\n * interface RequestOptions {\n * myContext?: string;\n * }\n * }\n * ```\n *\n * The SDK ignores properties it doesn't know about; they are visible to\n * middleware on `ctx.options`.\n */\nexport interface RequestOptions {\n /**\n * The HTTP method for the request (e.g., 'get', 'post', 'put', 'delete').\n */\n method?: HTTPMethod;\n\n /**\n * The URL path for the request.\n *\n * @example \"/v1/foo\"\n */\n path?: string;\n\n /**\n * Query parameters to include in the request URL.\n */\n query?: object | undefined | null;\n\n /**\n * The request body. Can be a string, JSON object, FormData, or other supported types.\n */\n body?: unknown;\n\n /**\n * HTTP headers to include with the request. Can be a Headers object, plain object, or array of tuples.\n */\n headers?: HeadersLike;\n\n /**\n * The maximum number of times that the client will retry a request in case of a\n * temporary failure, like a network error or a 5XX error from the server.\n *\n * @default 2\n */\n maxRetries?: number;\n\n stream?: boolean | undefined;\n\n /**\n * The maximum amount of time (in milliseconds) that the client should wait for a response\n * from the server before timing out a single request.\n *\n * @unit milliseconds\n */\n timeout?: number;\n\n /**\n * Additional `RequestInit` options to be passed to the underlying `fetch` call.\n * These options will be merged with the client's default fetch options.\n */\n fetchOptions?: MergedRequestInit;\n\n /**\n * An AbortSignal that can be used to cancel the request.\n */\n signal?: AbortSignal | undefined | null;\n\n /**\n * Additional {@link Middleware} to wrap this request's HTTP attempts.\n *\n * These run after any client-level middleware (but still outside any backend\n * adaptation) and apply to every attempt of this request, including retries.\n */\n middleware?: ReadonlyArray<Middleware> | undefined;\n\n /**\n * Sticky state for `betaRefusalFallbackMiddleware`.\n *\n * The middleware records which fallback it settled on, so requests sharing\n * the state skip models that already refused. Pass the same object across\n * whatever scope the pin should apply to — typically a conversation.\n */\n fallbackState?: BetaFallbackState;\n\n /**\n * A unique key for this request to enable idempotency.\n */\n idempotencyKey?: string;\n\n /**\n * Override the default base URL for this specific request.\n */\n defaultBaseURL?: string | undefined;\n\n __binaryResponse?: boolean | undefined;\n __streamClass?: typeof Stream;\n}\n\nexport type EncodedContent = { bodyHeaders: HeadersLike; body: BodyInit };\nexport type RequestEncoder = (request: { headers: NullableHeaders; body: unknown }) => EncodedContent;\n\nexport const FallbackEncoder: RequestEncoder = ({ headers, body }) => {\n return {\n bodyHeaders: {\n 'content-type': 'application/json',\n },\n body: JSON.stringify(body),\n };\n};\n",
|
|
15
15
|
"import type { Format } from './types';\n\nexport const default_format: Format = 'RFC3986';\nexport const default_formatter = (v: PropertyKey) => String(v);\nexport const formatters: Record<Format, (str: PropertyKey) => string> = {\n RFC1738: (v: PropertyKey) => String(v).replace(/%20/g, '+'),\n RFC3986: default_formatter,\n};\nexport const RFC1738 = 'RFC1738';\nexport const RFC3986 = 'RFC3986';\n",
|
|
16
16
|
"import { RFC1738 } from './formats';\nimport type { DefaultEncoder, Format } from './types';\nimport { isArray } from '../utils/values';\n\nexport let has = (obj: object, key: PropertyKey): boolean => (\n (has = (Object as any).hasOwn ?? Function.prototype.call.bind(Object.prototype.hasOwnProperty)),\n has(obj, key)\n);\n\nconst hex_table = /* @__PURE__ */ (() => {\n const array = [];\n for (let i = 0; i < 256; ++i) {\n array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n }\n\n return array;\n})();\n\nfunction compact_queue<T extends Record<string, any>>(queue: Array<{ obj: T; prop: string }>) {\n while (queue.length > 1) {\n const item = queue.pop();\n if (!item) continue;\n\n const obj = item.obj[item.prop];\n\n if (isArray(obj)) {\n const compacted: unknown[] = [];\n\n for (let j = 0; j < obj.length; ++j) {\n if (typeof obj[j] !== 'undefined') {\n compacted.push(obj[j]);\n }\n }\n\n // @ts-ignore\n item.obj[item.prop] = compacted;\n }\n }\n}\n\nfunction array_to_object(source: any[], options: { plainObjects: boolean }) {\n const obj = options && options.plainObjects ? Object.create(null) : {};\n for (let i = 0; i < source.length; ++i) {\n if (typeof source[i] !== 'undefined') {\n obj[i] = source[i];\n }\n }\n\n return obj;\n}\n\nexport function merge(\n target: any,\n source: any,\n options: { plainObjects?: boolean; allowPrototypes?: boolean } = {},\n) {\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object') {\n if (isArray(target)) {\n target.push(source);\n } else if (target && typeof target === 'object') {\n if ((options && (options.plainObjects || options.allowPrototypes)) || !has(Object.prototype, source)) {\n target[source] = true;\n }\n } else {\n return [target, source];\n }\n\n return target;\n }\n\n if (!target || typeof target !== 'object') {\n return [target].concat(source);\n }\n\n let mergeTarget = target;\n if (isArray(target) && !isArray(source)) {\n // @ts-ignore\n mergeTarget = array_to_object(target, options);\n }\n\n if (isArray(target) && isArray(source)) {\n source.forEach(function (item, i) {\n if (has(target, i)) {\n const targetItem = target[i];\n if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {\n target[i] = merge(targetItem, item, options);\n } else {\n target.push(item);\n }\n } else {\n target[i] = item;\n }\n });\n return target;\n }\n\n return Object.keys(source).reduce(function (acc, key) {\n const value = source[key];\n\n if (has(acc, key)) {\n acc[key] = merge(acc[key], value, options);\n } else {\n acc[key] = value;\n }\n return acc;\n }, mergeTarget);\n}\n\nexport function assign_single_source(target: any, source: any) {\n return Object.keys(source).reduce(function (acc, key) {\n acc[key] = source[key];\n return acc;\n }, target);\n}\n\nexport function decode(str: string, _: any, charset: string) {\n const strWithoutPlus = str.replace(/\\+/g, ' ');\n if (charset === 'iso-8859-1') {\n // unescape never throws, no try...catch needed:\n return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);\n }\n // utf-8\n try {\n return decodeURIComponent(strWithoutPlus);\n } catch (e) {\n return strWithoutPlus;\n }\n}\n\nconst limit = 1024;\n\nexport const encode: (\n str: any,\n defaultEncoder: DefaultEncoder,\n charset: string,\n type: 'key' | 'value',\n format: Format,\n) => string = (str, _defaultEncoder, charset, _kind, format: Format) => {\n // This code was originally written by Brian White for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n let string = str;\n if (typeof str === 'symbol') {\n string = Symbol.prototype.toString.call(str);\n } else if (typeof str !== 'string') {\n string = String(str);\n }\n\n if (charset === 'iso-8859-1') {\n return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {\n return '%26%23' + parseInt($0.slice(2), 16) + '%3B';\n });\n }\n\n let out = '';\n for (let j = 0; j < string.length; j += limit) {\n const segment = string.length >= limit ? string.slice(j, j + limit) : string;\n const arr = [];\n\n for (let i = 0; i < segment.length; ++i) {\n let c = segment.charCodeAt(i);\n if (\n c === 0x2d || // -\n c === 0x2e || // .\n c === 0x5f || // _\n c === 0x7e || // ~\n (c >= 0x30 && c <= 0x39) || // 0-9\n (c >= 0x41 && c <= 0x5a) || // a-z\n (c >= 0x61 && c <= 0x7a) || // A-Z\n (format === RFC1738 && (c === 0x28 || c === 0x29)) // ( )\n ) {\n arr[arr.length] = segment.charAt(i);\n continue;\n }\n\n if (c < 0x80) {\n arr[arr.length] = hex_table[c];\n continue;\n }\n\n if (c < 0x800) {\n arr[arr.length] = hex_table[0xc0 | (c >> 6)]! + hex_table[0x80 | (c & 0x3f)];\n continue;\n }\n\n if (c < 0xd800 || c >= 0xe000) {\n arr[arr.length] =\n hex_table[0xe0 | (c >> 12)]! + hex_table[0x80 | ((c >> 6) & 0x3f)] + hex_table[0x80 | (c & 0x3f)];\n continue;\n }\n\n i += 1;\n c = 0x10000 + (((c & 0x3ff) << 10) | (segment.charCodeAt(i) & 0x3ff));\n\n arr[arr.length] =\n hex_table[0xf0 | (c >> 18)]! +\n hex_table[0x80 | ((c >> 12) & 0x3f)] +\n hex_table[0x80 | ((c >> 6) & 0x3f)] +\n hex_table[0x80 | (c & 0x3f)];\n }\n\n out += arr.join('');\n }\n\n return out;\n};\n\nexport function compact(value: any) {\n const queue = [{ obj: { o: value }, prop: 'o' }];\n const refs = [];\n\n for (let i = 0; i < queue.length; ++i) {\n const item = queue[i];\n // @ts-ignore\n const obj = item.obj[item.prop];\n\n const keys = Object.keys(obj);\n for (let j = 0; j < keys.length; ++j) {\n const key = keys[j]!;\n const val = obj[key];\n if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n queue.push({ obj: obj, prop: key });\n refs.push(val);\n }\n }\n }\n\n compact_queue(queue);\n\n return value;\n}\n\nexport function is_regexp(obj: any) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n}\n\nexport function is_buffer(obj: any) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n\n return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n}\n\nexport function combine(a: any, b: any) {\n return [].concat(a, b);\n}\n\nexport function maybe_map<T>(val: T[], fn: (v: T) => T) {\n if (isArray(val)) {\n const mapped = [];\n for (let i = 0; i < val.length; i += 1) {\n mapped.push(fn(val[i]!));\n }\n return mapped;\n }\n return fn(val);\n}\n",
|
|
@@ -30,18 +30,18 @@
|
|
|
30
30
|
"import type { Fetch } from '../../internal/builtin-types';\nimport type { AccessTokenProvider, IdentityTokenProvider } from './types';\nimport {\n FEDERATION_BETA_HEADER,\n GRANT_TYPE_JWT_BEARER,\n OAUTH_API_BETA_HEADER,\n TOKEN_ENDPOINT,\n WorkloadIdentityError,\n parseTokenResponse,\n redactSensitive,\n requireSecureTokenEndpoint,\n} from './types';\nimport { nowAsSeconds } from '../../internal/utils/time';\nimport { VERSION } from '../../version';\n\nexport type OIDCFederationConfig = {\n identityTokenProvider: IdentityTokenProvider;\n federationRuleId: string;\n organizationId: string;\n serviceAccountId?: string | undefined;\n /**\n * Optional `wrkspc_*` tagged ID, or the literal `\"default\"` to scope the\n * token to the organization's default workspace. When omitted the server\n * picks the rule's sole enabled workspace, else the org default if the rule\n * covers it. Required when the rule enables more than one non-default\n * workspace, or to target a specific workspace other than the one the\n * server would pick. The minted token is workspace-scoped: per-request\n * workspace selection (the `puku-workspace-id` header) is not supported\n * for federation tokens — switching workspaces requires a new token exchange\n * with a different `workspaceId`.\n */\n workspaceId?: string | undefined;\n baseURL: string;\n fetch: Fetch;\n /**\n * Overrides the outgoing User-Agent header on the token exchange. When\n * empty, sends an SDK-identified UA so the token endpoint's access logs\n * identify the caller.\n */\n userAgent?: string | undefined;\n};\n\n/**\n * Exchanges an external OIDC JWT for an PukuAI access token via the\n * RFC 7523 jwt-bearer grant.\n *\n * Each invocation performs a fresh token exchange. Wrap in a\n * {@link TokenCache} to avoid exchanging on every request.\n *\n * Federation grants do not return a refresh token — callers re-exchange\n * their assertion on expiry.\n */\nexport function oidcFederationProvider(config: OIDCFederationConfig): AccessTokenProvider {\n return async () => {\n requireSecureTokenEndpoint(config.baseURL);\n\n const jwt = await config.identityTokenProvider();\n // The token endpoint enforces a 16 KiB assertion limit; surface a clear\n // client-side error so misconfigured projected-token sources are\n // diagnosable without a server round-trip.\n if (jwt.length > 16 * 1024) {\n throw new WorkloadIdentityError(\n `Identity token is ${Math.ceil(jwt.length / 1024)} KiB, exceeds the 16 KiB assertion limit`,\n );\n }\n\n const body: Record<string, string> = {\n grant_type: GRANT_TYPE_JWT_BEARER,\n assertion: jwt,\n federation_rule_id: config.federationRuleId,\n organization_id: config.organizationId,\n };\n if (config.serviceAccountId) {\n body['service_account_id'] = config.serviceAccountId;\n }\n if (config.workspaceId) {\n body['workspace_id'] = config.workspaceId;\n }\n\n const url = `${config.baseURL}${TOKEN_ENDPOINT}`;\n let resp: Response;\n try {\n resp = await config.fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'puku-beta': `${OAUTH_API_BETA_HEADER},${FEDERATION_BETA_HEADER}`,\n 'User-Agent': config.userAgent || `puku-ai-sdk-typescript/${VERSION} oidcFederationProvider`,\n },\n body: JSON.stringify(body),\n });\n } catch (err) {\n throw new WorkloadIdentityError(`Failed to reach token endpoint ${url}: ${err}`);\n }\n\n const requestId = resp.headers.get('Request-Id');\n\n if (!resp.ok) {\n const text = await resp.text().catch(() => '');\n const redacted = redactSensitive(text);\n // A 401 is hard to debug from the status code alone, so surface\n // guidance: check the federation rule, optionally set a workspace ID\n // (the most common fix when no workspaceId is configured), and point at\n // the Workload identity page in Puku Console for the server-side\n // authentication event log. Other statuses (5xx, 400, ...) get no hint.\n let hint = '';\n if (resp.status === 401) {\n const hintMiddle =\n config.workspaceId ? '' : (\n \"If your federation rule is scoped to multiple workspaces, set the PUKU_WORKSPACE_ID environment variable, the 'workspace_id' config key, or the `workspaceId` option. \"\n );\n hint = ` Ensure your federation rule matches your identity token. ${hintMiddle}View your authentication events in the Workload identity page of Puku Console for more details.`;\n }\n throw new WorkloadIdentityError(\n `Token exchange failed with status ${resp.status}${\n requestId ? ` (request-id ${requestId})` : ''\n }: ${redacted}${hint}`,\n resp.status,\n redacted,\n requestId,\n );\n }\n\n const data = await parseTokenResponse(resp, requestId);\n const expiresIn = Number(data.expires_in);\n if (!Number.isFinite(expiresIn)) {\n throw new WorkloadIdentityError(\n `Token endpoint response missing required fields: ${JSON.stringify(redactSensitive(data))}`,\n resp.status,\n redactSensitive(data),\n requestId,\n );\n }\n\n return {\n token: data.access_token,\n expiresAt: nowAsSeconds() + expiresIn,\n };\n };\n}\n",
|
|
31
31
|
"import type { Fetch } from '../../internal/builtin-types';\nimport { CREDENTIALS_FILE_VERSION, type PukuCredentials } from '../../core/credentials';\nimport type { AccessTokenProvider } from './types';\nimport {\n GRANT_TYPE_REFRESH_TOKEN,\n MANDATORY_REFRESH_THRESHOLD_IN_SECONDS,\n OAUTH_API_BETA_HEADER,\n TOKEN_ENDPOINT,\n WorkloadIdentityError,\n checkCredentialsFileSafety,\n parseTokenResponse,\n redactSensitive,\n requireSecureTokenEndpoint,\n writeCredentialsFileAtomic,\n} from './types';\nimport { nowAsSeconds } from '../../internal/utils/time';\nimport { VERSION } from '../../version';\n\nexport type UserOAuthConfig = {\n credentialsPath: string;\n clientId?: string | undefined;\n baseURL: string;\n fetch: Fetch;\n userAgent?: string | undefined;\n onSafetyWarning?: ((msg: string) => void) | undefined;\n};\n\n/**\n * Reads a user-oauth credential file. Returns the cached access token while\n * fresh; on expiry performs a `refresh_token` grant and writes the new\n * tokens back to the credentials file (atomic replace, fsync'd).\n *\n * If `clientId` is empty, the access token is treated as static — the\n * credentials file is read on every call but no refresh is attempted, and\n * an expired token without a `refresh_token` raises.\n */\nexport function userOAuthProvider(config: UserOAuthConfig): AccessTokenProvider {\n return async (opts) => {\n const { fs } = await import('../../internal/node');\n\n await checkCredentialsFileSafety(config.credentialsPath, config.onSafetyWarning);\n\n let raw: string;\n try {\n raw = await fs.promises.readFile(config.credentialsPath, 'utf-8');\n } catch (err) {\n throw new WorkloadIdentityError(`Credentials file not found at ${config.credentialsPath}: ${err}`);\n }\n let creds: PukuCredentials;\n try {\n creds = JSON.parse(raw);\n } catch (err) {\n throw new WorkloadIdentityError(\n `Credentials file at ${config.credentialsPath} is not valid JSON: ${err}`,\n );\n }\n\n const accessToken = creds.access_token;\n if (!accessToken) {\n throw new WorkloadIdentityError(\n `Credentials file at ${config.credentialsPath} must include 'access_token'`,\n );\n }\n\n // Return cached token if still fresh (or no expiry info), unless the\n // caller is forcing a refresh after a 401 — then go straight to refresh\n // even if the file's expires_at still looks valid.\n const expiresAt = creds.expires_at;\n if (\n !opts?.forceRefresh &&\n (expiresAt == null || nowAsSeconds() < expiresAt - MANDATORY_REFRESH_THRESHOLD_IN_SECONDS)\n ) {\n return { token: accessToken, expiresAt: expiresAt ?? null };\n }\n\n const refreshToken = creds.refresh_token;\n if (!config.clientId || !refreshToken) {\n throw new WorkloadIdentityError(\n `Access token at ${config.credentialsPath} has expired and no refresh is available ` +\n `(client_id ${config.clientId ? 'set' : 'empty'}, refresh_token ${refreshToken ? 'set' : 'empty'})`,\n );\n }\n\n requireSecureTokenEndpoint(config.baseURL);\n\n const body: Record<string, string> = {\n grant_type: GRANT_TYPE_REFRESH_TOKEN,\n refresh_token: refreshToken,\n client_id: config.clientId,\n };\n\n const url = `${config.baseURL}${TOKEN_ENDPOINT}`;\n let resp: Response;\n try {\n resp = await config.fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'puku-beta': OAUTH_API_BETA_HEADER,\n 'User-Agent': config.userAgent || `puku-ai-sdk-typescript/${VERSION} userOAuthProvider`,\n },\n body: JSON.stringify(body),\n });\n } catch (err) {\n throw new WorkloadIdentityError(`User OAuth refresh failed to reach token endpoint: ${err}`);\n }\n\n const requestId = resp.headers.get('Request-Id');\n\n if (!resp.ok) {\n const text = await resp.text().catch(() => '');\n throw new WorkloadIdentityError(\n `User OAuth refresh failed (HTTP ${resp.status}): ${redactSensitive(text)}`,\n resp.status,\n redactSensitive(text),\n requestId,\n );\n }\n\n const data = await parseTokenResponse(resp, requestId);\n const expiresIn = Number(data.expires_in);\n if (!Number.isFinite(expiresIn)) {\n throw new WorkloadIdentityError(\n `User OAuth refresh response missing or invalid expires_in: ${JSON.stringify(redactSensitive(data))}`,\n resp.status,\n redactSensitive(data),\n requestId,\n );\n }\n const newExpiresAt = nowAsSeconds() + expiresIn;\n const newRefreshToken = data.refresh_token || refreshToken;\n\n await writeCredentialsFileAtomic(config.credentialsPath, {\n ...creds,\n version: CREDENTIALS_FILE_VERSION,\n type: 'oauth_token',\n access_token: data.access_token,\n expires_at: newExpiresAt,\n refresh_token: newRefreshToken,\n });\n\n return { token: data.access_token, expiresAt: newExpiresAt };\n };\n}\n",
|
|
32
32
|
"import type { Fetch } from '../../internal/builtin-types';\nimport { readEnv } from '../../internal/utils/env';\nimport {\n CREDENTIALS_FILE_VERSION,\n loadConfigWithSource,\n getCredentialsPath,\n type PukuConfig,\n} from '../../core/credentials';\nimport type { AccessTokenProvider, CredentialResult, IdentityTokenProvider } from './types';\nimport {\n MANDATORY_REFRESH_THRESHOLD_IN_SECONDS,\n WorkloadIdentityError,\n checkCredentialsFileSafety,\n writeCredentialsFileAtomic,\n} from './types';\nimport { nowAsSeconds } from '../../internal/utils/time';\nimport { identityTokenFromFile, identityTokenFromValue } from './identity-token';\nimport { oidcFederationProvider } from './oidc-federation';\nimport { userOAuthProvider } from './user-oauth';\n\n/**\n * Builds a {@link CredentialResult} from an explicit {@link PukuConfig}.\n *\n * Use this when constructing a client from an in-memory config object rather\n * than from profile files or environment variables.\n *\n * For `oidc_federation`, `authentication.credentials_path` is optional —\n * if omitted, every call performs a fresh exchange with no on-disk cache.\n * For `user_oauth`, `authentication.credentials_path` is required (it is\n * where the access/refresh tokens live).\n */\nexport type ResolverOptions = {\n baseURL: string;\n fetch: Fetch;\n userAgent?: string | undefined;\n onCacheWriteError?: ((err: unknown) => void) | undefined;\n onSafetyWarning?: ((msg: string) => void) | undefined;\n};\n\nexport function resolveCredentialsFromConfig(\n config: PukuConfig,\n options: ResolverOptions,\n): CredentialResult {\n const credentialsPath = config.authentication.credentials_path ?? null;\n const effectiveBaseURL = (config.base_url || options.baseURL).replace(/\\/+$/, '');\n\n const provider = buildProvider(config, credentialsPath, effectiveBaseURL, options);\n\n const extraHeaders: Record<string, string> = {};\n // For federation profiles workspace_id is sent in the jwt-bearer exchange\n // body, not as a request header (the minted token is already\n // workspace-scoped, so the header would be ignored).\n if (config.workspace_id && config.authentication.type === 'user_oauth') {\n extraHeaders['puku-workspace-id'] = config.workspace_id;\n }\n\n // Surface the profile's own base_url (not the options.baseURL fallback) so\n // the client can adopt it for outbound API requests when the caller didn't\n // pin one explicitly. Echoing options.baseURL back would defeat precedence.\n return { provider, extraHeaders, baseURL: config.base_url || undefined };\n}\n\n/**\n * Resolves a {@link CredentialResult} from the environment. Returns `null`\n * when no credentials can be resolved.\n *\n * Resolution order:\n *\n * 1. Config file for the active profile (or the explicit `profile` argument)\n * → dispatch on `authentication.type` (`oidc_federation`, `user_oauth`)\n * 2. Environment variables `PUKU_FEDERATION_RULE_ID` +\n * `PUKU_ORGANIZATION_ID` (+ identity token) → OIDC federation\n * 3. Nothing matches → `null`\n *\n * Passing `profile` selects `<config_dir>/configs/<profile>.json` directly,\n * skipping `PUKU_PROFILE` / `active_config` resolution.\n */\nexport async function defaultCredentials(\n options: ResolverOptions,\n profile?: string,\n): Promise<CredentialResult | null> {\n const loaded = await loadConfigWithSource(profile);\n if (!loaded) {\n return null;\n }\n const { config, fromFile } = loaded;\n\n // For file-loaded configs, default credentials_path to the per-profile\n // location so user_oauth and federation caching work. Shallow-clone first\n // so callers that retain a reference to the loaded config don't observe the\n // patched-in default.\n //\n // Env-only credentials (no profile file on disk) skip the disk cache —\n // matching the other SDKs. A disk cache keyed by profile path would\n // re-serve a stale token after a change to PUKU_WORKSPACE_ID (or\n // PUKU_ORGANIZATION_ID / PUKU_FEDERATION_RULE_ID) until the\n // cached token expired, so the env-only chain stays in-memory only.\n const withPath: PukuConfig =\n config.authentication.credentials_path || !fromFile ?\n config\n : {\n ...config,\n authentication: {\n ...config.authentication,\n credentials_path: (await getCredentialsPath(config, profile)) ?? undefined,\n },\n };\n\n return resolveCredentialsFromConfig(withPath, options);\n}\n\nfunction buildProvider(\n config: PukuConfig,\n credentialsPath: string | null,\n baseURL: string,\n options: ResolverOptions,\n): AccessTokenProvider {\n switch (config.authentication.type) {\n case 'oidc_federation': {\n const auth = config.authentication;\n const identityProvider = resolveIdentityTokenProvider(auth);\n if (!identityProvider) {\n throw new WorkloadIdentityError(\n 'oidc_federation config requires an identity token (set authentication.identity_token, ' +\n 'PUKU_IDENTITY_TOKEN_FILE, or PUKU_IDENTITY_TOKEN)',\n );\n }\n if (!auth.federation_rule_id) {\n throw new WorkloadIdentityError(\n \"oidc_federation config requires 'federation_rule_id'. Set it in authentication.federation_rule_id in your profile, or via PUKU_FEDERATION_RULE_ID (profile takes precedence).\",\n );\n }\n if (!config.organization_id) {\n throw new WorkloadIdentityError(\n 'oidc_federation config requires organization_id (set PUKU_ORGANIZATION_ID or config.organization_id)',\n );\n }\n\n const exchange = oidcFederationProvider({\n identityTokenProvider: identityProvider,\n federationRuleId: auth.federation_rule_id,\n organizationId: config.organization_id,\n serviceAccountId: auth.service_account_id,\n workspaceId: config.workspace_id,\n baseURL,\n fetch: options.fetch,\n userAgent: options.userAgent,\n });\n\n // If there's a credentials file path, wrap the exchange with file caching\n // (check file for fresh token before exchanging, write back after).\n if (credentialsPath) {\n return cachedExchangeProvider(\n exchange,\n credentialsPath,\n options.onCacheWriteError,\n options.onSafetyWarning,\n );\n }\n return exchange;\n }\n\n case 'user_oauth': {\n if (!credentialsPath) {\n throw new WorkloadIdentityError(\n 'user_oauth config requires authentication.credentials_path ' +\n '(or load via a profile so it defaults to <config_dir>/credentials/<profile>.json)',\n );\n }\n return userOAuthProvider({\n credentialsPath,\n clientId: config.authentication.client_id,\n baseURL,\n fetch: options.fetch,\n userAgent: options.userAgent,\n onSafetyWarning: options.onSafetyWarning,\n });\n }\n\n default: {\n const t = (config.authentication as { type: string }).type;\n throw new WorkloadIdentityError(`authentication.type \"${t}\" is not a known authentication type`);\n }\n }\n}\n\n/**\n * Resolves the identity token provider from config fields or environment variables.\n *\n * Resolution order:\n * 1. `identity_token.path` from the config (source: \"file\")\n * 2. `PUKU_IDENTITY_TOKEN_FILE` env var\n * 3. `PUKU_IDENTITY_TOKEN` env var (static value)\n */\nfunction resolveIdentityTokenProvider(\n auth: Extract<PukuConfig['authentication'], { type: 'oidc_federation' }>,\n): IdentityTokenProvider | null {\n if (auth.identity_token) {\n // Cast needed to stringify an unknown source value for the error message:\n // the on-disk JSON may contain a source this SDK version doesn't know about.\n const source = (auth.identity_token as { source: string }).source;\n if (source !== 'file') {\n throw new WorkloadIdentityError(\n `identity_token.source \"${source}\" is not supported by this SDK version (only \"file\")`,\n );\n }\n if (!auth.identity_token.path) {\n throw new WorkloadIdentityError(`identity_token.source \"file\" requires a non-empty path`);\n }\n return identityTokenFromFile(auth.identity_token.path);\n }\n\n const tokenFile = readEnv('PUKU_IDENTITY_TOKEN_FILE');\n if (tokenFile) {\n return identityTokenFromFile(tokenFile);\n }\n\n const tokenValue = readEnv('PUKU_IDENTITY_TOKEN');\n if (tokenValue) {\n return identityTokenFromValue(tokenValue);\n }\n\n return null;\n}\n\n/**\n * Wraps a federation exchange provider with credential file caching.\n * Checks the file for a fresh token before exchanging, and writes the\n * result back after a successful exchange (best-effort, atomic replace).\n *\n * Note: this is not cross-process serialized — two SDK instances that\n * miss the cache simultaneously will both perform a full exchange and\n * the last writer wins. That is acceptable: federation exchanges are\n * idempotent and the cache is an optimization, not a correctness gate.\n */\nfunction cachedExchangeProvider(\n exchange: AccessTokenProvider,\n credentialsPath: string,\n onCacheWriteError: ((err: unknown) => void) | undefined,\n onSafetyWarning: ((msg: string) => void) | undefined,\n): AccessTokenProvider {\n return async (opts) => {\n const { fs } = await import('../../internal/node');\n\n await checkCredentialsFileSafety(credentialsPath, onSafetyWarning);\n\n // Try cached credentials file\n let existing: Record<string, unknown> | undefined;\n try {\n const raw = await fs.promises.readFile(credentialsPath, 'utf-8');\n existing = JSON.parse(raw);\n const token = existing?.['access_token'] as string | undefined;\n if (token && !opts?.forceRefresh) {\n const expiresAt = existing?.['expires_at'] as number | undefined;\n if (expiresAt == null || nowAsSeconds() < expiresAt - MANDATORY_REFRESH_THRESHOLD_IN_SECONDS) {\n return { token, expiresAt: expiresAt ?? null };\n }\n }\n } catch (err) {\n // ENOENT or invalid-JSON → no usable cache, exchange fresh. Other\n // errors (EACCES, EISDIR, …) indicate a broken cache path; surface to\n // the optional hook so they're at least debuggable, then proceed.\n const code = (err as NodeJS.ErrnoException)?.code;\n if (code !== 'ENOENT' && !(err instanceof SyntaxError)) {\n onCacheWriteError?.(err);\n }\n }\n\n // Exchange for a new token\n const result = await exchange(opts);\n\n // Write cache back (best-effort). Preserve any unknown keys from the\n // existing file (notably refresh_token, in the unlikely case this path\n // is shared with a user_oauth profile) so the federation cache writer\n // doesn't clobber material it didn't own.\n try {\n await writeCredentialsFileAtomic(credentialsPath, {\n ...(existing ?? {}),\n version: CREDENTIALS_FILE_VERSION,\n type: 'oauth_token',\n access_token: result.token,\n expires_at: result.expiresAt,\n });\n } catch (err) {\n // Best-effort caching: surface to the optional hook but never fail\n // the exchange itself.\n onCacheWriteError?.(err);\n }\n\n return result;\n };\n}\n",
|
|
33
|
-
"import { concatBytes, decodeUTF8, encodeUTF8 } from '../utils/bytes';\n\nexport type Bytes = string | ArrayBuffer | Uint8Array | null | undefined;\n\n/**\n * A re-implementation of httpx's `LineDecoder` in Python that handles incrementally\n * reading lines from text.\n *\n *
|
|
33
|
+
"import { concatBytes, decodeUTF8, encodeUTF8 } from '../utils/bytes';\n\nexport type Bytes = string | ArrayBuffer | Uint8Array | null | undefined;\n\n/**\n * A re-implementation of httpx's `LineDecoder` in Python that handles incrementally\n * reading lines from text.\n *\n * \n */\nexport class LineDecoder {\n // prettier-ignore\n static NEWLINE_CHARS = new Set(['\\n', '\\r']);\n static NEWLINE_REGEXP = /\\r\\n|[\\n\\r]/g;\n\n #buffer: Uint8Array;\n #carriageReturnIndex: number | null;\n\n constructor() {\n this.#buffer = new Uint8Array();\n this.#carriageReturnIndex = null;\n }\n\n decode(chunk: Bytes): string[] {\n if (chunk == null) {\n return [];\n }\n\n const binaryChunk =\n chunk instanceof ArrayBuffer ? new Uint8Array(chunk)\n : typeof chunk === 'string' ? encodeUTF8(chunk)\n : chunk;\n\n this.#buffer = concatBytes([this.#buffer, binaryChunk]);\n\n const lines: string[] = [];\n let patternIndex;\n while ((patternIndex = findNewlineIndex(this.#buffer, this.#carriageReturnIndex)) != null) {\n if (patternIndex.carriage && this.#carriageReturnIndex == null) {\n // skip until we either get a corresponding `\\n`, a new `\\r` or nothing\n this.#carriageReturnIndex = patternIndex.index;\n continue;\n }\n\n // we got double \\r or \\rtext\\n\n if (\n this.#carriageReturnIndex != null &&\n (patternIndex.index !== this.#carriageReturnIndex + 1 || patternIndex.carriage)\n ) {\n lines.push(decodeUTF8(this.#buffer.subarray(0, this.#carriageReturnIndex - 1)));\n this.#buffer = this.#buffer.subarray(this.#carriageReturnIndex);\n this.#carriageReturnIndex = null;\n continue;\n }\n\n const endIndex =\n this.#carriageReturnIndex !== null ? patternIndex.preceding - 1 : patternIndex.preceding;\n\n const line = decodeUTF8(this.#buffer.subarray(0, endIndex));\n lines.push(line);\n\n this.#buffer = this.#buffer.subarray(patternIndex.index);\n this.#carriageReturnIndex = null;\n }\n\n return lines;\n }\n\n flush(): string[] {\n if (!this.#buffer.length) {\n return [];\n }\n return this.decode('\\n');\n }\n}\n\n/**\n * This function searches the buffer for the end patterns, (\\r or \\n)\n * and returns an object with the index preceding the matched newline and the\n * index after the newline char. `null` is returned if no new line is found.\n *\n * ```ts\n * findNewLineIndex('abc\\ndef') -> { preceding: 2, index: 3 }\n * ```\n */\nfunction findNewlineIndex(\n buffer: Uint8Array,\n startIndex: number | null,\n): { preceding: number; index: number; carriage: boolean } | null {\n const newline = 0x0a; // \\n\n const carriage = 0x0d; // \\r\n\n for (let i = startIndex ?? 0; i < buffer.length; i++) {\n if (buffer[i] === newline) {\n return { preceding: i, index: i + 1, carriage: false };\n }\n\n if (buffer[i] === carriage) {\n return { preceding: i, index: i + 1, carriage: true };\n }\n }\n\n return null;\n}\n\nexport function findDoubleNewlineIndex(buffer: Uint8Array): number {\n // This function searches the buffer for the end patterns (\\r\\r, \\n\\n, \\r\\n\\r\\n)\n // and returns the index right after the first occurrence of any pattern,\n // or -1 if none of the patterns are found.\n const newline = 0x0a; // \\n\n const carriage = 0x0d; // \\r\n\n for (let i = 0; i < buffer.length - 1; i++) {\n if (buffer[i] === newline && buffer[i + 1] === newline) {\n // \\n\\n\n return i + 2;\n }\n if (buffer[i] === carriage && buffer[i + 1] === carriage) {\n // \\r\\r\n return i + 2;\n }\n if (\n buffer[i] === carriage &&\n buffer[i + 1] === newline &&\n i + 3 < buffer.length &&\n buffer[i + 2] === carriage &&\n buffer[i + 3] === newline\n ) {\n // \\r\\n\\r\\n\n return i + 4;\n }\n }\n\n return -1;\n}\n",
|
|
34
34
|
"import { PukuError } from './error';\nimport { type ReadableStream } from '../internal/shim-types';\nimport { makeReadableStream } from '../internal/shims';\nimport { findDoubleNewlineIndex, LineDecoder } from '../internal/decoders/line';\nimport { ReadableStreamToAsyncIterable } from '../internal/shims';\nimport { isAbortError } from '../internal/errors';\nimport { safeJSON } from '../internal/utils/values';\nimport { encodeUTF8 } from '../internal/utils/bytes';\nimport { loggerFor } from '../internal/utils/log';\nimport type { BasePuku } from '../client';\n\nimport { APIError } from './error';\nimport type { ErrorType } from '../resources/shared';\nimport { releaseRequestSignal } from '../internal/request-signal';\n\ntype Bytes = string | ArrayBuffer | Uint8Array | null | undefined;\n\nexport type ServerSentEvent = {\n event: string | null;\n data: string;\n raw: string[];\n};\n\nexport class Stream<Item> implements AsyncIterable<Item> {\n controller: AbortController;\n #client: BasePuku | undefined;\n\n constructor(\n private iterator: () => AsyncIterator<Item>,\n controller: AbortController,\n client?: BasePuku,\n ) {\n this.controller = controller;\n this.#client = client;\n }\n\n /**\n * Iterate the raw Server-Sent Events from `response` — `{event, data, raw}`\n * objects, before any JSON parsing or event-name filtering.\n *\n * This reads `response.body` directly (not a clone), so the response is\n * consumed. Use this in middleware that fully replaces the stream body; for\n * read-only observation of parsed events, use `ctx.parse()` instead.\n */\n static rawEvents(\n response: Response,\n controller: AbortController = new AbortController(),\n ): AsyncGenerator<ServerSentEvent, void, unknown> {\n return _iterSSEMessages(response, controller);\n }\n\n static fromSSEResponse<Item>(\n response: Response,\n controller: AbortController,\n client?: BasePuku,\n ): Stream<Item> {\n let consumed = false;\n const logger = client ? loggerFor(client) : console;\n\n async function* iterator(): AsyncIterator<Item, any, undefined> {\n if (consumed) {\n throw new PukuError('Cannot iterate over a consumed stream, use `.tee()` to split the stream.');\n }\n consumed = true;\n let done = false;\n try {\n for await (const sse of _iterSSEMessages(response, controller)) {\n if (sse.event === 'completion') {\n try {\n yield JSON.parse(sse.data) as Item;\n } catch (e) {\n logger.error(`Could not parse message into JSON:`, sse.data);\n logger.error(`From chunk:`, sse.raw);\n throw e;\n }\n }\n\n if (\n sse.event === 'message_start' ||\n sse.event === 'message_delta' ||\n sse.event === 'message_stop' ||\n sse.event === 'content_block_start' ||\n sse.event === 'content_block_delta' ||\n sse.event === 'content_block_stop' ||\n sse.event === 'message' ||\n sse.event === 'user.message' ||\n sse.event === 'user.interrupt' ||\n sse.event === 'user.tool_confirmation' ||\n sse.event === 'user.custom_tool_result' ||\n sse.event === 'user.tool_result' ||\n sse.event === 'agent.message' ||\n sse.event === 'agent.thinking' ||\n sse.event === 'agent.tool_use' ||\n sse.event === 'agent.tool_result' ||\n sse.event === 'agent.mcp_tool_use' ||\n sse.event === 'agent.mcp_tool_result' ||\n sse.event === 'agent.custom_tool_use' ||\n sse.event === 'agent.thread_context_compacted' ||\n sse.event === 'session.status_running' ||\n sse.event === 'session.status_idle' ||\n sse.event === 'session.status_rescheduled' ||\n sse.event === 'session.status_terminated' ||\n sse.event === 'session.error' ||\n sse.event === 'session.deleted' ||\n sse.event === 'session.updated' ||\n sse.event === 'span.model_request_start' ||\n sse.event === 'span.model_request_end' ||\n sse.event === 'span.outcome_evaluation_start' ||\n sse.event === 'span.outcome_evaluation_ongoing' ||\n sse.event === 'span.outcome_evaluation_end' ||\n sse.event === 'user.define_outcome' ||\n sse.event === 'agent.thread_message_received' ||\n sse.event === 'agent.thread_message_sent' ||\n sse.event === 'agent.session_thread_message_received' ||\n sse.event === 'agent.session_thread_message_sent' ||\n sse.event === 'session.thread_created' ||\n sse.event === 'session.thread_status_created' ||\n sse.event === 'session.thread_status_running' ||\n sse.event === 'session.thread_status_idle' ||\n sse.event === 'session.thread_status_rescheduled' ||\n sse.event === 'session.thread_status_terminated' ||\n sse.event === 'event_start' ||\n sse.event === 'event_delta' ||\n sse.event === 'system.message'\n ) {\n try {\n yield JSON.parse(sse.data) as Item;\n } catch (e) {\n logger.error(`Could not parse message into JSON:`, sse.data);\n logger.error(`From chunk:`, sse.raw);\n throw e;\n }\n }\n\n if (sse.event === 'ping') {\n continue;\n }\n\n if (sse.event === 'error') {\n const body = safeJSON(sse.data) ?? sse.data;\n const type = body?.error?.type as ErrorType | undefined;\n throw new APIError(undefined, body, undefined, response.headers, type);\n }\n }\n done = true;\n } catch (e) {\n // If the user calls `stream.controller.abort()`, we should exit without throwing.\n if (isAbortError(e)) return;\n throw e;\n } finally {\n // If the user `break`s, abort the ongoing request.\n if (!done) controller.abort();\n releaseRequestSignal(controller);\n }\n }\n\n return new Stream(iterator, controller, client);\n }\n\n /**\n * Generates a Stream from a newline-separated ReadableStream\n * where each item is a JSON value.\n */\n static fromReadableStream<Item>(\n readableStream: ReadableStream,\n controller: AbortController,\n client?: BasePuku,\n ): Stream<Item> {\n let consumed = false;\n\n async function* iterLines(): AsyncGenerator<string, void, unknown> {\n const lineDecoder = new LineDecoder();\n\n const iter = ReadableStreamToAsyncIterable<Bytes>(readableStream);\n for await (const chunk of iter) {\n for (const line of lineDecoder.decode(chunk)) {\n yield line;\n }\n }\n\n for (const line of lineDecoder.flush()) {\n yield line;\n }\n }\n\n async function* iterator(): AsyncIterator<Item, any, undefined> {\n if (consumed) {\n throw new PukuError('Cannot iterate over a consumed stream, use `.tee()` to split the stream.');\n }\n consumed = true;\n let done = false;\n try {\n for await (const line of iterLines()) {\n if (done) continue;\n if (line) yield JSON.parse(line) as Item;\n }\n done = true;\n } catch (e) {\n // If the user calls `stream.controller.abort()`, we should exit without throwing.\n if (isAbortError(e)) return;\n throw e;\n } finally {\n // If the user `break`s, abort the ongoing request.\n if (!done) controller.abort();\n releaseRequestSignal(controller);\n }\n }\n\n return new Stream(iterator, controller, client);\n }\n\n [Symbol.asyncIterator](): AsyncIterator<Item> {\n return this.iterator();\n }\n\n /**\n * Splits the stream into two streams which can be\n * independently read from at different speeds.\n */\n tee(): [Stream<Item>, Stream<Item>] {\n const left: Array<Promise<IteratorResult<Item>>> = [];\n const right: Array<Promise<IteratorResult<Item>>> = [];\n const iterator = this.iterator();\n\n const teeIterator = (queue: Array<Promise<IteratorResult<Item>>>): AsyncIterator<Item> => {\n return {\n next: () => {\n if (queue.length === 0) {\n const result = iterator.next();\n left.push(result);\n right.push(result);\n }\n return queue.shift()!;\n },\n };\n };\n\n return [\n new Stream(() => teeIterator(left), this.controller, this.#client),\n new Stream(() => teeIterator(right), this.controller, this.#client),\n ];\n }\n\n /**\n * Converts this stream to a newline-separated ReadableStream of\n * JSON stringified values in the stream\n * which can be turned back into a Stream with `Stream.fromReadableStream()`.\n */\n toReadableStream(): ReadableStream {\n const self = this;\n let iter: AsyncIterator<Item>;\n\n return makeReadableStream({\n async start() {\n iter = self[Symbol.asyncIterator]();\n },\n async pull(ctrl: any) {\n try {\n const { value, done } = await iter.next();\n if (done) return ctrl.close();\n\n const bytes = encodeUTF8(JSON.stringify(value) + '\\n');\n\n ctrl.enqueue(bytes);\n } catch (err) {\n ctrl.error(err);\n }\n },\n async cancel() {\n await iter.return?.();\n },\n });\n }\n}\n\nexport async function* _iterSSEMessages(\n response: Response,\n controller: AbortController,\n): AsyncGenerator<ServerSentEvent, void, unknown> {\n if (!response.body) {\n controller.abort();\n if (\n typeof (globalThis as any).navigator !== 'undefined' &&\n (globalThis as any).navigator.product === 'ReactNative'\n ) {\n throw new PukuError(\n `The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api`,\n );\n }\n throw new PukuError(`Attempted to iterate over a response with no body`);\n }\n\n const sseDecoder = new SSEDecoder();\n const lineDecoder = new LineDecoder();\n\n const iter = ReadableStreamToAsyncIterable<Bytes>(response.body);\n for await (const sseChunk of iterSSEChunks(iter)) {\n for (const line of lineDecoder.decode(sseChunk)) {\n const sse = sseDecoder.decode(line);\n if (sse) yield sse;\n }\n }\n\n for (const line of lineDecoder.flush()) {\n const sse = sseDecoder.decode(line);\n if (sse) yield sse;\n }\n}\n\n/**\n * Given an async iterable iterator, iterates over it and yields full\n * SSE chunks, i.e. yields when a double new-line is encountered.\n */\nasync function* iterSSEChunks(iterator: AsyncIterableIterator<Bytes>): AsyncGenerator<Uint8Array> {\n let data = new Uint8Array();\n\n for await (const chunk of iterator) {\n if (chunk == null) {\n continue;\n }\n\n const binaryChunk =\n chunk instanceof ArrayBuffer ? new Uint8Array(chunk)\n : typeof chunk === 'string' ? encodeUTF8(chunk)\n : chunk;\n\n let newData = new Uint8Array(data.length + binaryChunk.length);\n newData.set(data);\n newData.set(binaryChunk, data.length);\n data = newData;\n\n let patternIndex;\n while ((patternIndex = findDoubleNewlineIndex(data)) !== -1) {\n yield data.slice(0, patternIndex);\n data = data.slice(patternIndex);\n }\n }\n\n if (data.length > 0) {\n yield data;\n }\n}\n\nclass SSEDecoder {\n private data: string[];\n private event: string | null;\n private chunks: string[];\n\n constructor() {\n this.event = null;\n this.data = [];\n this.chunks = [];\n }\n\n decode(line: string) {\n if (line.endsWith('\\r')) {\n line = line.substring(0, line.length - 1);\n }\n\n if (!line) {\n // empty line and we didn't previously encounter any messages\n if (!this.event && !this.data.length) return null;\n\n const sse: ServerSentEvent = {\n event: this.event,\n data: this.data.join('\\n'),\n raw: this.chunks,\n };\n\n this.event = null;\n this.data = [];\n this.chunks = [];\n\n return sse;\n }\n\n this.chunks.push(line);\n\n if (line.startsWith(':')) {\n return null;\n }\n\n let [fieldname, _, value] = partition(line, ':');\n\n if (value.startsWith(' ')) {\n value = value.substring(1);\n }\n\n if (fieldname === 'event') {\n this.event = value;\n } else if (fieldname === 'data') {\n this.data.push(value);\n }\n\n return null;\n }\n}\n\nfunction partition(str: string, delimiter: string): [string, string, string] {\n const index = str.indexOf(delimiter);\n if (index !== -1) {\n return [str.substring(0, index), delimiter, str.substring(index + delimiter.length)];\n }\n\n return [str, '', ''];\n}\n",
|
|
35
35
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport type { FinalRequestOptions } from './request-options';\nimport { Stream } from '../core/streaming';\nimport { type BasePuku } from '../client';\nimport { formatRequestDetails, loggerFor } from './utils/log';\nimport { releaseRequestSignal } from './request-signal';\nimport type { AbstractPage } from '../core/pagination';\n\nexport type APIResponseProps = {\n response: Response;\n options: FinalRequestOptions;\n controller: AbortController;\n requestLogID: string;\n retryOfRequestLogID: string | undefined;\n startTime: number;\n};\n\nexport async function defaultParseResponse<T>(\n client: BasePuku,\n props: APIResponseProps,\n): Promise<WithRequestID<T>> {\n const { response, requestLogID, retryOfRequestLogID, startTime } = props;\n const body = await (async () => {\n if (props.options.stream) {\n loggerFor(client).debug('response', response.status, response.url, response.headers, response.body);\n\n // Note: there is an invariant here that isn't represented in the type system\n // that if you set `stream: true` the response type must also be `Stream<T>`\n\n return Stream.fromSSEResponse(response, props.controller, client) as any;\n }\n\n // fetch refuses to read the body when the status code is 204.\n if (response.status === 204) {\n return null as T;\n }\n\n if (props.options.__binaryResponse) {\n return response as unknown as T;\n }\n\n const contentType = response.headers.get('content-type');\n const mediaType = contentType?.split(';')[0]?.trim();\n const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json');\n if (isJSON) {\n const contentLength = response.headers.get('content-length');\n if (contentLength === '0') {\n // if there is no content we can't do anything\n return undefined as T;\n }\n\n const json = await response.json();\n return addResponseIDs(json as T, response);\n }\n\n const text = await response.text();\n return text as unknown as T;\n })().finally(() => {\n // The body is settled (or parsing threw), so the caller-signal abort\n // listener has nothing left to cancel. Streams release in their own\n // teardown; a raw Response (`__binaryResponse`) keeps the listener so\n // aborting an in-flight download still works.\n if (!props.options.stream && !props.options.__binaryResponse) {\n releaseRequestSignal(props.controller);\n }\n });\n loggerFor(client).debug(\n `[${requestLogID}] response parsed`,\n formatRequestDetails({\n retryOfRequestLogID,\n url: response.url,\n status: response.status,\n body,\n durationMs: Date.now() - startTime,\n }),\n );\n return body;\n}\n\nexport type WithRequestID<T> =\n T extends Array<any> | Response | AbstractPage<any> ? T\n : T extends Record<string, any> ? T & { _request_id?: string | null; _workspace_id?: string | null }\n : T;\n\nexport function addResponseIDs<T>(value: T, response: Response): WithRequestID<T> {\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return value as WithRequestID<T>;\n }\n\n return Object.defineProperties(value, {\n _request_id: { value: response.headers.get('request-id'), enumerable: false },\n _workspace_id: { value: response.headers.get('puku-workspace-id'), enumerable: false },\n }) as WithRequestID<T>;\n}\n",
|
|
36
36
|
"import type { BasePuku } from '../client';\nimport type { Fetch } from '../internal/builtin-types';\nimport { castToError, isAbortError } from '../internal/errors';\nimport { addResponseIDs } from '../internal/parse';\nimport type { FinalRequestOptions } from '../internal/request-options';\nimport { defaultLogger, loggerFor, type Logger } from '../internal/utils/log';\nimport type { APIRequest } from './api';\nimport { PukuError, APIConnectionError, RetryableError } from './error';\nimport { Stream } from './streaming';\n\n/**\n * Invokes the rest of the middleware chain, ending with the underlying `fetch`.\n *\n * This function can be invoked multiple times.\n */\nexport type MiddlewareNext = (request: APIRequest) => Promise<Response>;\n\n/**\n * Helpers passed to each middleware alongside `next`, scoped to the request\n * in flight (one context is shared by every middleware in the chain).\n */\nexport interface MiddlewareContext {\n /**\n * The SDK request options the API call in flight was made with: `method`,\n * `path`, the pre-encoded `body`, `stream`, etc.\n *\n * `undefined` when the chain isn't running for an SDK API request, i.e.\n * for credential token-exchange requests.\n */\n readonly options?: FinalRequestOptions | undefined;\n\n /**\n * The client's logger, pre-filtered to the client's configured log level\n * (the `logLevel` client option or the `PUKU_LOG` environment\n * variable). Calls below the active level are no-ops, so it's always safe\n * to call; with no logger configured it writes to the global `console`.\n *\n * Values are logged as-is — when logging request or response headers,\n * redact credentials (`authorization`, `x-api-key`, `cookie`) the way the\n * SDK's own logs do.\n *\n * @example\n * ```ts\n * const mw: Middleware = async (request, next, ctx) => {\n * ctx.logger.debug('->', request.method, request.url);\n * return next(request);\n * };\n * ```\n */\n readonly logger: Logger;\n\n /**\n * Parse a response body the way the SDK would for the request in flight:\n *\n * - JSON responses are decoded, with the non-enumerable `_request_id`\n * property attached like SDK return values, and anything else resolves\n * to the body text.\n * - For streaming requests ({@link options}`.stream`), resolves immediately\n * with a {@link Stream} reading an independent copy of the response body —\n * iterating it doesn't consume the client's events, and aborting or\n * `break`ing out of it doesn't cancel the underlying request. Each call\n * returns a fresh `Stream` (streams are single-consumer, so they aren't\n * cached). Error (non-2xx) responses parse as JSON/text rather than as a\n * stream, mirroring the SDK's own handling.\n * - For binary requests, resolves with the `Response` itself, unconsumed.\n *\n * Reads through an internal `response.clone()`, so the response stays\n * readable: the client (and any other middleware) can still consume the\n * body afterwards. Non-stream results are cached per `Response` and shared\n * across the middleware chain, so repeated calls cost a single read.\n *\n * @example\n * ```ts\n * const mw: Middleware = async (request, next, ctx) => {\n * const response = await next(request);\n * const data = await ctx.parse<Message>(response);\n * if (data.type === 'message') console.log(data.usage);\n * return response;\n * };\n * ```\n */\n parse<T = unknown>(response: Response): Promise<T>;\n}\n\n/**\n * A function that wraps each HTTP request made by the client.\n *\n * Middleware may observe or modify the request before calling `next`, observe\n * or replace the response, short-circuit by returning a `Response` without\n * calling `next`, or call `next` multiple times to implement custom retries.\n *\n * Middleware always observes the canonical PukuAI-shaped request — e.g.\n * `POST .../v1/messages` with `model` and `stream` in the JSON body and\n * `puku-beta` as a header — with the client's logical credentials\n * (`x-api-key` / `Authorization`) applied. On clients for third-party\n * backends (Bedrock, Vertex, Foundry), the backend adaptation — URL and body\n * rewriting, request signing (e.g. AWS SigV4), and response normalization\n * (e.g. AWS EventStream to SSE) — runs *inside* `next`, so middleware behaves\n * identically on every backend: mutating the request is safe (signing covers\n * the final body), and streaming responses are observed as SSE. Each `next()`\n * call re-runs the adaptation, so custom retries re-sign from scratch. To\n * observe the literal wire traffic instead, provide a custom `fetch`.\n *\n * Middleware must not consume the body of the `Response` it returns - the\n * client still needs to read it. To inspect the body, use\n * `await ctx.parse(response)` (cached, leaves the body readable) or read a\n * clone (`await response.clone().text()`); to transform it, return a\n * replacement, e.g. `new Response(body, response)`.\n *\n * Middleware runs per HTTP attempt, inside the SDK's retry loop; the attempt\n * number is available via the `X-Stainless-Retry-Count` request header. An\n * error thrown from middleware propagates to the caller as-is.\n *\n * Middleware errors are **not** retried apart from connection-level errors:\n * timeout/abort errors, errors thrown by `fetch()`, and `APIConnectionError`s\n * or `RetryableError`s — thrown directly or present anywhere in an error's\n * `cause` chain. Retryable middleware errors still propagate to the caller\n * as-is once retries are exhausted.\n *\n * @example\n * ```ts\n * const logger: Middleware = async (request, next, ctx) => {\n * ctx.logger.debug('->', request.method, request.url);\n * const response = await next(request);\n * ctx.logger.debug('<-', response.status, request.url);\n * return response;\n * };\n *\n * const client = new PukuAI({ middleware: [logger] });\n * ```\n */\nexport type Middleware = (\n request: APIRequest,\n next: MiddlewareNext,\n ctx: MiddlewareContext,\n) => Promise<Response>;\n\n/**\n * Errors thrown by the underlying `fetch`, as opposed to by a middleware.\n *\n * Tracked so the client can apply its connection-error retry policy to\n * transport failures while letting errors thrown by middleware propagate to\n * the caller untouched.\n */\nconst fetchOriginErrors = new WeakSet<object>();\n\n/** Whether `err` was thrown by the underlying `fetch` rather than by a middleware. */\nexport function isFetchOriginError(err: unknown): boolean {\n return typeof err === 'object' && err !== null && fetchOriginErrors.has(err);\n}\n\n/**\n * Whether an error thrown by middleware should stay on the SDK's\n * connection-error retry policy: fetch-origin, abort, `APIConnectionError`, or\n * `RetryableError` — checked through the error's `cause` chain.\n */\nexport function isRetryableError(err: unknown): boolean {\n const seen = new Set<unknown>(); // guard against `cause` cycles\n while (typeof err === 'object' && err !== null && !seen.has(err)) {\n seen.add(err);\n if (\n isFetchOriginError(err) ||\n isAbortError(err) ||\n err instanceof APIConnectionError ||\n err instanceof RetryableError\n ) {\n return true;\n }\n err = (err as { cause?: unknown }).cause;\n }\n return false;\n}\n\n/**\n * Wraps `fetchFn` so each call runs through `middleware`, keeping the same\n * call signature as `fetch` itself.\n *\n * With no middleware, calls are passed straight through to `fetchFn`.\n * Otherwise the arguments are normalized into an {@link APIRequest} (headers\n * coerced to a `Headers` instance, URL stringified) before entering the\n * chain. The chain is composed per call, so mutations of a `middleware`\n * array are picked up by later requests.\n *\n * `options` — the SDK request options behind this call, when there are any —\n * is surfaced to middleware as `ctx.options` and drives `ctx.parse`.\n *\n * `client` supplies `ctx.logger` (the client's level-filtered logger);\n * without it, `ctx.logger` falls back to the client defaults: `console`,\n * filtered to `PUKU_LOG` or `'warn'`.\n */\nexport function wrapFetchWithMiddleware(\n fetchFn: Fetch,\n middleware: readonly Middleware[],\n options?: FinalRequestOptions | undefined,\n client?: BasePuku | undefined,\n): Fetch {\n return async (url, init = {}) => {\n if (middleware.length === 0) {\n // use undefined this binding; fetch errors if bound to something else in browser/cloudflare\n return fetchFn.call(undefined, url, init);\n }\n const headers = init.headers instanceof Headers ? init.headers : new Headers(init.headers);\n const response = await applyMiddleware(\n fetchFn,\n middleware,\n options,\n client,\n )({\n ...init,\n headers,\n url:\n typeof url === 'string' ? url\n : url instanceof URL ? url.href\n : url.url,\n });\n // Catch a footgun before the client tries to read the body itself and\n // fails with a confusing low-level stream error.\n if (response.bodyUsed || response.body?.locked) {\n throw new PukuError(\n 'middleware consumed the response body; use response.clone() to inspect it, ' +\n 'or return new Response(body, response) to consume and replace it',\n );\n }\n return response;\n };\n}\n\n/**\n * Creates the {@link MiddlewareContext} shared by every middleware in one chain.\n */\nfunction createMiddlewareContext(\n options: FinalRequestOptions | undefined,\n client: BasePuku | undefined,\n): MiddlewareContext {\n // Keyed on the Response so each `next()` call's response (e.g. with custom\n // retries, or a middleware swapping in a replacement) parses independently,\n // while several middleware parsing the same response share a single read.\n const cache = new WeakMap<Response, Promise<unknown>>();\n return {\n options,\n // Resolved per chain, so changes to the client's `logLevel`/`logger`\n // apply to subsequent requests.\n logger: client ? loggerFor(client) : defaultLogger(),\n parse<T>(response: Response): Promise<T> {\n // Streams are single-consumer, so caching one would hand later callers\n // an already-consumed stream; every call gets a fresh clone-backed one.\n if (options?.stream && response.ok) {\n return parseMiddlewareResponse(response, options, client) as Promise<T>;\n }\n let parsed = cache.get(response);\n if (!parsed) {\n parsed = parseMiddlewareResponse(response, options, client);\n cache.set(response, parsed);\n }\n return parsed as Promise<T>;\n },\n };\n}\n\n/**\n * Mirrors the client's own response parsing (`defaultParseResponse` in\n * `internal/parse.ts`), reading through a clone so the body stays available\n * to the rest of the chain and the client itself.\n */\nasync function parseMiddlewareResponse(\n response: Response,\n options: FinalRequestOptions | undefined,\n client: BasePuku | undefined,\n): Promise<unknown> {\n if (response.bodyUsed || response.body?.locked) {\n throw new PukuError(\n 'cannot ctx.parse() a response whose body was already consumed; ' +\n 'call ctx.parse() instead of reading the body, or read via response.clone()',\n );\n }\n\n // Error responses parse as JSON/text below — the SDK only stream-parses\n // successful responses, and middleware typically wants the error body.\n if (options?.stream && response.ok) {\n // A fresh controller rather than the request's own: aborting (or\n // `break`ing out of) the middleware's stream must not cancel the\n // in-flight request the client is still reading.\n return Stream.fromSSEResponse(response.clone(), new AbortController(), client);\n }\n\n // fetch refuses to read the body when the status code is 204.\n if (response.status === 204) {\n return null;\n }\n\n if (options?.__binaryResponse) {\n return response;\n }\n\n const contentType = response.headers.get('content-type');\n const mediaType = contentType?.split(';')[0]?.trim();\n const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json');\n if (isJSON) {\n if (response.headers.get('content-length') === '0') {\n // if there is no content we can't do anything\n return undefined;\n }\n return addResponseIDs(await response.clone().json(), response);\n }\n\n return await response.clone().text();\n}\n\n/**\n * Composes `middleware` around `fetchFn` and returns the entry point of the chain.\n */\nexport function applyMiddleware(\n fetchFn: Fetch,\n middleware: readonly Middleware[],\n options?: FinalRequestOptions | undefined,\n client?: BasePuku | undefined,\n): MiddlewareNext {\n // use undefined this binding; fetch errors if bound to something else in browser/cloudflare\n let next: MiddlewareNext = async ({ url, ...init }) => {\n try {\n return await fetchFn.call(undefined, url, init);\n } catch (err) {\n // Brand the error as fetch-origin, normalizing with `castToError` first since a\n // WeakSet can't hold primitives and the brand must be on the same object the\n // client's own `castToError` will later pass through.\n const error = castToError(err);\n fetchOriginErrors.add(error);\n throw error;\n }\n };\n\n const ctx = createMiddlewareContext(options, client);\n for (let i = middleware.length - 1; i >= 0; i--) {\n const mw = middleware[i]!;\n const nextInner = next;\n next = async (request) => mw(request, nextInner, ctx);\n }\n\n return next;\n}\n",
|
|
37
37
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { type BasePuku } from '../client';\n\nimport { type PromiseOrValue } from '../internal/types';\nimport {\n type APIResponseProps,\n type WithRequestID,\n defaultParseResponse,\n addResponseIDs,\n} from '../internal/parse';\n\n/**\n * A subclass of `Promise` providing additional helper methods\n * for interacting with the SDK.\n */\nexport class APIPromise<T> extends Promise<WithRequestID<T>> {\n private parsedPromise: Promise<WithRequestID<T>> | undefined;\n #client: BasePuku;\n\n constructor(\n client: BasePuku,\n private responsePromise: Promise<APIResponseProps>,\n private parseResponse: (\n client: BasePuku,\n props: APIResponseProps,\n ) => PromiseOrValue<WithRequestID<T>> = defaultParseResponse,\n ) {\n super((resolve) => {\n // this is maybe a bit weird but this has to be a no-op to not implicitly\n // parse the response body; instead .then, .catch, .finally are overridden\n // to parse the response\n resolve(null as any);\n });\n this.#client = client;\n }\n\n _thenUnwrap<U>(transform: (data: T, props: APIResponseProps) => U): APIPromise<U> {\n return new APIPromise(this.#client, this.responsePromise, async (client, props) =>\n addResponseIDs(transform(await this.parseResponse(client, props), props), props.response),\n );\n }\n\n /**\n * Gets the raw `Response` instance instead of parsing the response\n * data.\n *\n * If you want to parse the response body but still get the `Response`\n * instance, you can use {@link withResponse()}.\n *\n * 👋 Getting the wrong TypeScript type for `Response`?\n * Try setting `\"moduleResolution\": \"NodeNext\"` or add `\"lib\": [\"DOM\"]`\n * to your `tsconfig.json`.\n */\n asResponse(): Promise<Response> {\n return this.responsePromise.then((p) => p.response);\n }\n\n /**\n * Gets the parsed response data, the raw `Response` instance and the ID of the request,\n * returned via the `request-id` header which is useful for debugging requests and resporting\n * issues to PukuAI.\n *\n * If you just want to get the raw `Response` instance without parsing it,\n * you can use {@link asResponse()}.\n *\n * 👋 Getting the wrong TypeScript type for `Response`?\n * Try setting `\"moduleResolution\": \"NodeNext\"` or add `\"lib\": [\"DOM\"]`\n * to your `tsconfig.json`.\n */\n async withResponse(): Promise<{\n data: T;\n response: Response;\n request_id: string | null | undefined;\n workspace_id: string | null | undefined;\n }> {\n const [data, response] = await Promise.all([this.parse(), this.asResponse()]);\n return {\n data,\n response,\n request_id: response.headers.get('request-id'),\n workspace_id: response.headers.get('puku-workspace-id'),\n };\n }\n\n private parse(): Promise<WithRequestID<T>> {\n if (!this.parsedPromise) {\n this.parsedPromise = this.responsePromise.then(\n (data) => this.parseResponse(this.#client, data) as any as Promise<WithRequestID<T>>,\n );\n }\n return this.parsedPromise;\n }\n\n override then<TResult1 = WithRequestID<T>, TResult2 = never>(\n onfulfilled?: ((value: WithRequestID<T>) => TResult1 | PromiseLike<TResult1>) | undefined | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null,\n ): Promise<TResult1 | TResult2> {\n return this.parse().then(onfulfilled, onrejected);\n }\n\n override catch<TResult = never>(\n onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null,\n ): Promise<WithRequestID<T> | TResult> {\n return this.parse().catch(onrejected);\n }\n\n override finally(onfinally?: (() => void) | undefined | null): Promise<WithRequestID<T>> {\n return this.parse().finally(onfinally);\n }\n}\n",
|
|
38
38
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { PukuError } from './error';\nimport { FinalRequestOptions } from '../internal/request-options';\nimport { defaultParseResponse, WithRequestID } from '../internal/parse';\nimport { type BasePuku } from '../client';\nimport { APIPromise } from './api-promise';\nimport { type APIResponseProps } from '../internal/parse';\nimport { maybeObj } from '../internal/utils/values';\n\nexport type PageRequestOptions = Pick<FinalRequestOptions, 'query' | 'headers' | 'body' | 'path' | 'method'>;\n\nexport abstract class AbstractPage<Item> implements AsyncIterable<Item> {\n #client: BasePuku;\n protected options: FinalRequestOptions;\n\n protected response: Response;\n protected body: unknown;\n\n constructor(client: BasePuku, response: Response, body: unknown, options: FinalRequestOptions) {\n this.#client = client;\n this.options = options;\n this.response = response;\n this.body = body;\n }\n\n abstract nextPageRequestOptions(): PageRequestOptions | null;\n\n abstract getPaginatedItems(): Item[];\n\n hasNextPage(): boolean {\n const items = this.getPaginatedItems();\n if (!items.length) return false;\n return this.nextPageRequestOptions() != null;\n }\n\n async getNextPage(): Promise<this> {\n const nextOptions = this.nextPageRequestOptions();\n if (!nextOptions) {\n throw new PukuError(\n 'No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.',\n );\n }\n\n return await this.#client.requestAPIList(this.constructor as any, nextOptions);\n }\n\n async *iterPages(): AsyncGenerator<this> {\n let page: this = this;\n yield page;\n while (page.hasNextPage()) {\n page = await page.getNextPage();\n yield page;\n }\n }\n\n async *[Symbol.asyncIterator](): AsyncGenerator<Item> {\n for await (const page of this.iterPages()) {\n for (const item of page.getPaginatedItems()) {\n yield item;\n }\n }\n }\n}\n\n/**\n * This subclass of Promise will resolve to an instantiated Page once the request completes.\n *\n * It also implements AsyncIterable to allow auto-paginating iteration on an unawaited list call, eg:\n *\n * for await (const item of client.items.list()) {\n * console.log(item)\n * }\n */\nexport class PagePromise<\n PageClass extends AbstractPage<Item>,\n Item = ReturnType<PageClass['getPaginatedItems']>[number],\n >\n extends APIPromise<PageClass>\n implements AsyncIterable<Item>\n{\n constructor(\n client: BasePuku,\n request: Promise<APIResponseProps>,\n Page: new (...args: ConstructorParameters<typeof AbstractPage>) => PageClass,\n ) {\n super(\n client,\n request,\n async (client, props) =>\n new Page(\n client,\n props.response,\n await defaultParseResponse(client, props),\n props.options,\n ) as WithRequestID<PageClass>,\n );\n }\n\n /**\n * Allow auto-paginating iteration on an unawaited list call, eg:\n *\n * for await (const item of client.items.list()) {\n * console.log(item)\n * }\n */\n async *[Symbol.asyncIterator](): AsyncGenerator<Item> {\n const page = await this;\n for await (const item of page) {\n yield item;\n }\n }\n}\n\nexport interface PageResponse<Item> {\n data: Array<Item>;\n\n has_more: boolean;\n\n first_id: string | null;\n\n last_id: string | null;\n}\n\nexport interface PageParams {\n /**\n * Number of items per page.\n */\n limit?: number;\n\n before_id?: string;\n\n after_id?: string;\n}\n\nexport class Page<Item> extends AbstractPage<Item> implements PageResponse<Item> {\n data: Array<Item>;\n\n has_more: boolean;\n\n first_id: string | null;\n\n last_id: string | null;\n\n constructor(\n client: BasePuku,\n response: Response,\n body: PageResponse<Item>,\n options: FinalRequestOptions,\n ) {\n super(client, response, body, options);\n\n this.data = body.data || [];\n this.has_more = body.has_more || false;\n this.first_id = body.first_id || null;\n this.last_id = body.last_id || null;\n }\n\n getPaginatedItems(): Item[] {\n return this.data ?? [];\n }\n\n override hasNextPage(): boolean {\n if (this.has_more === false) {\n return false;\n }\n\n return super.hasNextPage();\n }\n\n nextPageRequestOptions(): PageRequestOptions | null {\n if ((this.options.query as Record<string, unknown>)?.['before_id']) {\n // in reverse\n const first_id = this.first_id;\n if (!first_id) {\n return null;\n }\n\n return {\n ...this.options,\n query: {\n ...maybeObj(this.options.query),\n before_id: first_id,\n },\n };\n }\n\n const cursor = this.last_id;\n if (!cursor) {\n return null;\n }\n\n return {\n ...this.options,\n query: {\n ...maybeObj(this.options.query),\n after_id: cursor,\n },\n };\n }\n}\n\nexport interface TokenPageResponse<Item> {\n data: Array<Item>;\n\n has_more: boolean;\n\n next_page: string | null;\n}\n\nexport interface TokenPageParams {\n /**\n * Number of items per page.\n */\n limit?: number;\n\n page_token?: string;\n}\n\nexport class TokenPage<Item> extends AbstractPage<Item> implements TokenPageResponse<Item> {\n data: Array<Item>;\n\n has_more: boolean;\n\n next_page: string | null;\n\n constructor(\n client: BasePuku,\n response: Response,\n body: TokenPageResponse<Item>,\n options: FinalRequestOptions,\n ) {\n super(client, response, body, options);\n\n this.data = body.data || [];\n this.has_more = body.has_more || false;\n this.next_page = body.next_page || null;\n }\n\n getPaginatedItems(): Item[] {\n return this.data ?? [];\n }\n\n override hasNextPage(): boolean {\n if (this.has_more === false) {\n return false;\n }\n\n return super.hasNextPage();\n }\n\n nextPageRequestOptions(): PageRequestOptions | null {\n const cursor = this.next_page;\n if (!cursor) {\n return null;\n }\n\n return {\n ...this.options,\n query: {\n ...maybeObj(this.options.query),\n page_token: cursor,\n },\n };\n }\n}\n\nexport interface PageCursorResponse<Item> {\n data: Array<Item>;\n\n next_page: string | null;\n}\n\nexport interface PageCursorParams {\n /**\n * Number of items per page.\n */\n limit?: number;\n\n page?: string | null;\n}\n\nexport class PageCursor<Item> extends AbstractPage<Item> implements PageCursorResponse<Item> {\n data: Array<Item>;\n\n next_page: string | null;\n\n constructor(\n client: BasePuku,\n response: Response,\n body: PageCursorResponse<Item>,\n options: FinalRequestOptions,\n ) {\n super(client, response, body, options);\n\n this.data = body.data || [];\n this.next_page = body.next_page || null;\n }\n\n getPaginatedItems(): Item[] {\n return this.data ?? [];\n }\n\n nextPageRequestOptions(): PageRequestOptions | null {\n const cursor = this.next_page;\n if (!cursor) {\n return null;\n }\n\n return {\n ...this.options,\n query: {\n ...maybeObj(this.options.query),\n page: cursor,\n },\n };\n }\n}\n\nexport interface BidirectionalPageCursorResponse<Item> {\n data: Array<Item>;\n\n next_page: string | null;\n\n prev_page: string | null;\n}\n\nexport interface BidirectionalPageCursorParams {\n /**\n * Number of items per page.\n */\n limit?: number;\n\n page?: string | null;\n}\n\nexport class BidirectionalPageCursor<Item>\n extends AbstractPage<Item>\n implements BidirectionalPageCursorResponse<Item>\n{\n data: Array<Item>;\n\n next_page: string | null;\n\n prev_page: string | null;\n\n constructor(\n client: BasePuku,\n response: Response,\n body: BidirectionalPageCursorResponse<Item>,\n options: FinalRequestOptions,\n ) {\n super(client, response, body, options);\n\n this.data = body.data || [];\n this.next_page = body.next_page || null;\n this.prev_page = body.prev_page || null;\n }\n\n getPaginatedItems(): Item[] {\n return this.data ?? [];\n }\n\n nextPageRequestOptions(): PageRequestOptions | null {\n const cursor = this.next_page;\n if (!cursor) {\n return null;\n }\n\n return {\n ...this.options,\n query: {\n ...maybeObj(this.options.query),\n page: cursor,\n },\n };\n }\n}\n",
|
|
39
|
-
"import { type RequestOptions } from './request-options';\nimport type { FilePropertyBag, Fetch } from './builtin-types';\nimport type { BasePuku } from '../client';\nimport { ReadableStreamFrom } from './shims';\n\nexport type BlobPart = string | ArrayBuffer | ArrayBufferView | Blob | DataView;\ntype FsReadStream = AsyncIterable<Uint8Array> & { path: string | { toString(): string } };\n\n
|
|
39
|
+
"import { type RequestOptions } from './request-options';\nimport type { FilePropertyBag, Fetch } from './builtin-types';\nimport type { BasePuku } from '../client';\nimport { ReadableStreamFrom } from './shims';\n\nexport type BlobPart = string | ArrayBuffer | ArrayBufferView | Blob | DataView;\ntype FsReadStream = AsyncIterable<Uint8Array> & { path: string | { toString(): string } };\n\n\ninterface BunFile extends Blob {\n readonly name?: string | undefined;\n}\n\nexport const checkFileSupport = () => {\n if (typeof File === 'undefined') {\n const { process } = globalThis as any;\n const isOldNode =\n typeof process?.versions?.node === 'string' && parseInt(process.versions.node.split('.')) < 20;\n throw new Error(\n '`File` is not defined as a global, which is required for file uploads.' +\n (isOldNode ?\n \" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.\"\n : ''),\n );\n }\n};\n\n/**\n * Typically, this is a native \"File\" class.\n *\n * We provide the {@link toFile} utility to convert a variety of objects\n * into the File class.\n *\n * For convenience, you can also pass a fetch Response, or in Node,\n * the result of fs.createReadStream().\n */\nexport type Uploadable = File | Response | FsReadStream | BunFile;\n\n/**\n * Construct a `File` instance. This is used to ensure a helpful error is thrown\n * for environments that don't define a global `File` yet.\n */\nexport function makeFile(\n fileBits: BlobPart[],\n fileName: string | undefined,\n options?: FilePropertyBag,\n): File {\n checkFileSupport();\n return new File(fileBits as any, fileName ?? 'unknown_file', options);\n}\n\nexport function getName(value: any, stripPath: boolean): string | undefined {\n const val =\n (typeof value === 'object' &&\n value !== null &&\n (('name' in value && value.name && String(value.name)) ||\n ('url' in value && value.url && String(value.url)) ||\n ('filename' in value && value.filename && String(value.filename)) ||\n ('path' in value && value.path && String(value.path)))) ||\n '';\n\n return stripPath ? val.split(/[\\\\/]/).pop() || undefined : val;\n}\n\nexport const isAsyncIterable = (value: any): value is AsyncIterable<any> =>\n value != null && typeof value === 'object' && typeof value[Symbol.asyncIterator] === 'function';\n\n/**\n * Returns a multipart/form-data request if any part of the given request body contains a File / Blob value.\n * Otherwise returns the request as is.\n */\nexport const maybeMultipartFormRequestOptions = async (\n opts: RequestOptions,\n fetch: BasePuku | Fetch,\n): Promise<RequestOptions> => {\n if (!hasUploadableValue(opts.body)) return opts;\n\n return { ...opts, body: await createForm(opts.body, fetch) };\n};\n\ntype MultipartFormRequestOptions = Omit<RequestOptions, 'body'> & { body: unknown };\n\nexport const multipartFormRequestOptions = async (\n opts: MultipartFormRequestOptions,\n fetch: BasePuku | Fetch,\n stripFilenames: boolean = true,\n): Promise<RequestOptions> => {\n return { ...opts, body: await createForm(opts.body, fetch, stripFilenames) };\n};\n\nconst supportsFormDataMap = /* @__PURE__ */ new WeakMap<Fetch, Promise<boolean>>();\n\n/**\n * node-fetch doesn't support the global FormData object in recent node versions. Instead of sending\n * properly-encoded form data, it just stringifies the object, resulting in a request body of \"[object FormData]\".\n * This function detects if the fetch function provided supports the global FormData object to avoid\n * confusing error messages later on.\n */\nfunction supportsFormData(fetchObject: BasePuku | Fetch): Promise<boolean> {\n const fetch: Fetch = typeof fetchObject === 'function' ? fetchObject : (fetchObject as any).fetch;\n const cached = supportsFormDataMap.get(fetch);\n if (cached) return cached;\n const promise = (async () => {\n try {\n const FetchResponse = (\n 'Response' in fetch ?\n fetch.Response\n : (await fetch('data:,')).constructor) as typeof Response;\n const data = new FormData();\n if (data.toString() === (await new FetchResponse(data).text())) {\n return false;\n }\n return true;\n } catch {\n // avoid false negatives\n return true;\n }\n })();\n supportsFormDataMap.set(fetch, promise);\n return promise;\n}\n\nexport const createForm = async <T = Record<string, unknown>>(\n body: T | undefined,\n fetch: BasePuku | Fetch,\n stripFilenames: boolean = true,\n): Promise<FormData> => {\n if (!(await supportsFormData(fetch))) {\n throw new TypeError(\n 'The provided fetch function does not support file uploads with the current global FormData class.',\n );\n }\n const form = new FormData();\n await Promise.all(\n Object.entries(body || {}).map(([key, value]) => addFormValue(form, key, value, stripFilenames)),\n );\n return form;\n};\n\n// Blob, not File: bare Blobs and Bun.file() results don't inherit from File.\nconst isUploadable = (value: unknown) =>\n typeof value === 'object' &&\n value !== null &&\n (value instanceof Response || isAsyncIterable(value) || value instanceof Blob);\n\nconst hasUploadableValue = (value: unknown): boolean => {\n if (isUploadable(value)) return true;\n if (Array.isArray(value)) return value.some(hasUploadableValue);\n if (value && typeof value === 'object') {\n for (const k in value) {\n if (hasUploadableValue((value as any)[k])) return true;\n }\n }\n return false;\n};\n\nconst addFormValue = async (\n form: FormData,\n key: string,\n value: unknown,\n stripFilenames: boolean,\n): Promise<void> => {\n if (value === undefined) return;\n if (value == null) {\n throw new TypeError(\n `Received null for \"${key}\"; to pass null in FormData, you must use the string 'null'`,\n );\n }\n\n // TODO: make nested formats configurable\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n form.append(key, String(value));\n } else if (value instanceof Response) {\n let options = {} as FilePropertyBag;\n const contentType = value.headers.get('Content-Type');\n if (contentType) {\n options = { type: contentType };\n }\n\n form.append(key, makeFile([await value.blob()], getName(value, stripFilenames), options));\n } else if (isAsyncIterable(value)) {\n form.append(\n key,\n makeFile([await new Response(ReadableStreamFrom(value)).blob()], getName(value, stripFilenames)),\n );\n } else if (value instanceof Blob) {\n form.append(key, makeFile([value], getName(value, stripFilenames) || undefined, { type: value.type }));\n } else if (Array.isArray(value)) {\n await Promise.all(value.map((entry) => addFormValue(form, key + '[]', entry, stripFilenames)));\n } else if (typeof (value as any).then === 'function') {\n throw new TypeError(`Received a Promise for \"${key}\"; await it first, e.g. \\`await toFile(...)\\``);\n } else if (value instanceof ArrayBuffer || ArrayBuffer.isView(value)) {\n throw new TypeError(\n `Received ${value.constructor.name} for \"${key}\"; to upload raw bytes, wrap them with \\`await toFile(bytes, 'filename')\\``,\n );\n } else if (typeof value === 'object') {\n await Promise.all(\n Object.entries(value).map(([name, prop]) =>\n addFormValue(form, `${key}[${name}]`, prop, stripFilenames),\n ),\n );\n } else {\n throw new TypeError(\n `Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${value} instead`,\n );\n }\n};\n",
|
|
40
40
|
"import { BlobPart, getName, makeFile, isAsyncIterable } from './uploads';\nimport type { FilePropertyBag } from './builtin-types';\nimport { checkFileSupport } from './uploads';\n\ntype BlobLikePart = string | ArrayBuffer | ArrayBufferView | BlobLike | DataView;\n\n/**\n * Intended to match DOM Blob, node-fetch Blob, node:buffer Blob, etc.\n * Don't add arrayBuffer here, node-fetch doesn't have it\n */\ninterface BlobLike {\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */\n readonly size: number;\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */\n readonly type: string;\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */\n text(): Promise<string>;\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */\n slice(start?: number, end?: number): BlobLike;\n}\n\n/**\n * This check adds the arrayBuffer() method type because it is available and used at runtime\n */\nconst isBlobLike = (value: any): value is BlobLike & { arrayBuffer(): Promise<ArrayBuffer> } =>\n value != null &&\n typeof value === 'object' &&\n typeof value.size === 'number' &&\n typeof value.type === 'string' &&\n typeof value.text === 'function' &&\n typeof value.slice === 'function' &&\n typeof value.arrayBuffer === 'function';\n\n/**\n * Intended to match DOM File, node:buffer File, undici File, etc.\n */\ninterface FileLike extends BlobLike {\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */\n readonly lastModified: number;\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */\n readonly name?: string | undefined;\n}\n\n/**\n * This check adds the arrayBuffer() method type because it is available and used at runtime\n */\nconst isFileLike = (value: any): value is FileLike & { arrayBuffer(): Promise<ArrayBuffer> } =>\n value != null &&\n typeof value === 'object' &&\n typeof value.name === 'string' &&\n typeof value.lastModified === 'number' &&\n isBlobLike(value);\n\n/**\n * Intended to match DOM Response, node-fetch Response, undici Response, etc.\n */\nexport interface ResponseLike {\n url: string;\n blob(): Promise<BlobLike>;\n}\n\nconst isResponseLike = (value: any): value is ResponseLike =>\n value != null &&\n typeof value === 'object' &&\n typeof value.url === 'string' &&\n typeof value.blob === 'function';\n\nexport type ToFileInput =\n | FileLike\n | ResponseLike\n | Exclude<BlobLikePart, string>\n | AsyncIterable<BlobLikePart>;\n\n/**\n * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats\n * @param value the raw content of the file. Can be an {@link Uploadable}, BlobLikePart, or AsyncIterable of BlobLikeParts\n * @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible\n * @param {Object=} options additional properties\n * @param {string=} options.type the MIME type of the content\n * @param {number=} options.lastModified the last modified timestamp\n * @returns a {@link File} with the given properties\n */\nexport async function toFile(\n value: ToFileInput | PromiseLike<ToFileInput>,\n name?: string | null | undefined,\n options?: FilePropertyBag | undefined,\n): Promise<File> {\n checkFileSupport();\n\n // If it's a promise, resolve it.\n value = await value;\n\n name ||= getName(value, true);\n\n // If we've been given a `File` we don't need to do anything if the name / options\n // have not been customised.\n if (isFileLike(value)) {\n if (value instanceof File && name == null && options == null) {\n return value;\n }\n return makeFile([await value.arrayBuffer()], name ?? value.name, {\n type: value.type,\n lastModified: value.lastModified,\n ...options,\n });\n }\n\n if (isResponseLike(value)) {\n const blob = await value.blob();\n name ||= new URL(value.url).pathname.split(/[\\\\/]/).pop();\n\n return makeFile(await getBytes(blob), name, options);\n }\n\n const parts = await getBytes(value);\n\n if (!options?.type) {\n const type = parts.find((part) => typeof part === 'object' && 'type' in part && part.type);\n if (typeof type === 'string') {\n options = { ...options, type };\n }\n }\n\n return makeFile(parts, name, options);\n}\n\nasync function getBytes(value: BlobLikePart | AsyncIterable<BlobLikePart>): Promise<Array<BlobPart>> {\n let parts: Array<BlobPart> = [];\n if (\n typeof value === 'string' ||\n ArrayBuffer.isView(value) || // includes Uint8Array, Buffer, etc.\n value instanceof ArrayBuffer\n ) {\n parts.push(value);\n } else if (isBlobLike(value)) {\n parts.push(value instanceof Blob ? value : await value.arrayBuffer());\n } else if (\n isAsyncIterable(value) // includes Readable, ReadableStream, etc.\n ) {\n for await (const chunk of value) {\n parts.push(...(await getBytes(chunk as BlobLikePart))); // TODO, consider validating?\n }\n } else {\n const constructor = value?.constructor?.name;\n throw new Error(\n `Unexpected data type: ${typeof value}${\n constructor ? `; constructor: ${constructor}` : ''\n }${propsForError(value)}`,\n );\n }\n\n return parts;\n}\n\nfunction propsForError(value: unknown): string {\n if (typeof value !== 'object' || value === null) return '';\n const props = Object.getOwnPropertyNames(value);\n return `; props: [${props.map((p) => `\"${p}\"`).join(', ')}]`;\n}\n",
|
|
41
41
|
"export { type Uploadable } from '../internal/uploads';\nexport { toFile, type ToFileInput } from '../internal/to-file';\n",
|
|
42
42
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { BasePuku } from '../client';\n\nexport abstract class APIResource {\n protected _client: BasePuku;\n\n constructor(client: BasePuku) {\n this._client = client;\n }\n}\n",
|
|
43
43
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { isReadonlyArray } from './utils/values';\n\ntype HeaderValue = string | undefined | null;\nexport type HeadersLike =\n | Headers\n | readonly HeaderValue[][]\n | Record<string, HeaderValue | readonly HeaderValue[]>\n | undefined\n | null\n | NullableHeaders;\n\nconst brand_privateNullableHeaders = Symbol.for('brand.privateNullableHeaders') as symbol & {\n description: 'brand.privateNullableHeaders';\n};\n\n/**\n * @internal\n * Users can pass explicit nulls to unset default headers. When we parse them\n * into a standard headers type we need to preserve that information.\n */\nexport type NullableHeaders = {\n /** Brand check, prevent users from creating a NullableHeaders. */\n [_: typeof brand_privateNullableHeaders]: true;\n /** Parsed headers. */\n values: Headers;\n /** Set of lowercase header names explicitly set to null. */\n nulls: Set<string>;\n};\n\nfunction* iterateHeaders(\n headers: HeadersLike,\n): IterableIterator<readonly [string, string | null | ClearSentinel]> {\n if (!headers) return;\n\n if (brand_privateNullableHeaders in headers) {\n const { values, nulls } = headers as NullableHeaders;\n yield* values.entries();\n for (const name of nulls) {\n yield [name, null];\n }\n return;\n }\n\n let shouldClear = false;\n let iter: Iterable<readonly (HeaderValue | readonly HeaderValue[])[]>;\n if (headers instanceof Headers) {\n iter = headers.entries();\n } else if (isReadonlyArray(headers)) {\n iter = headers;\n } else {\n shouldClear = true;\n iter = Object.entries(headers ?? {});\n }\n for (let row of iter) {\n const name = row[0];\n if (typeof name !== 'string') throw new TypeError('expected header name to be a string');\n const values = isReadonlyArray(row[1]) ? row[1] : [row[1]];\n let didClear = false;\n for (const value of values) {\n if (value === undefined) continue;\n\n // Objects keys always overwrite older headers, they never append.\n // Yield the clear sentinel before adding the new values, so the\n // consumer can tell this synthetic \"clear-before-set\" apart from a\n // user's explicit `null` (= remove).\n if (shouldClear && !didClear) {\n didClear = true;\n yield [name, clearSentinel];\n }\n yield [name, value];\n }\n }\n}\n\n/** Distinguishes iterateHeaders' synthetic clear-before-set from a user `null`. */\nconst clearSentinel = Symbol('clear');\ntype ClearSentinel = typeof clearSentinel;\n\n/**\n * Headers whose values accumulate across {@link buildHeaders} sources instead\n * of the later source's value replacing the earlier one. Values are\n * comma-appended (deduplicated, order-preserving) into a single header line.\n */\nexport const APPEND_HEADERS: ReadonlySet<string> = new Set(['x-stainless-helper']);\n\nexport const appendHeaderValue = (existing: string | null, addition: string): string => {\n const tokens =\n existing ?\n existing\n .split(',')\n .map((t) => t.trim())\n .filter(Boolean)\n : [];\n for (const tok of addition.split(',').map((t) => t.trim())) {\n if (tok && !tokens.includes(tok)) tokens.push(tok);\n }\n return tokens.join(', ');\n};\n\nexport const buildHeaders = (newHeaders: HeadersLike[]): NullableHeaders => {\n const targetHeaders = new Headers();\n const nullHeaders = new Set<string>();\n for (const headers of newHeaders) {\n const seenHeaders = new Set<string>();\n for (const [name, value] of iterateHeaders(headers)) {\n const lowerName = name.toLowerCase();\n if (APPEND_HEADERS.has(lowerName)) {\n // Accumulating headers ignore the synthetic clear-before-set; an\n // explicit `null` (any source shape) is honored as removal.\n if (value === clearSentinel) continue;\n if (value === null) {\n targetHeaders.delete(name);\n nullHeaders.add(lowerName);\n } else {\n targetHeaders.set(name, appendHeaderValue(targetHeaders.get(name), value));\n nullHeaders.delete(lowerName);\n }\n continue;\n }\n if (value === clearSentinel || !seenHeaders.has(lowerName)) {\n targetHeaders.delete(name);\n seenHeaders.add(lowerName);\n if (value === clearSentinel) continue;\n }\n if (value === null) {\n targetHeaders.delete(name);\n nullHeaders.add(lowerName);\n } else {\n targetHeaders.append(name, value);\n nullHeaders.delete(lowerName);\n }\n }\n }\n return { [brand_privateNullableHeaders]: true, values: targetHeaders, nulls: nullHeaders };\n};\n\nexport const isEmptyHeaders = (headers: HeadersLike) => {\n for (const _ of iterateHeaders(headers)) return false;\n return true;\n};\n",
|
|
44
|
-
"import { PukuError } from '../../core/error';\n\n/**\n * Percent-encode everything that isn't safe to have in a path without encoding safe chars.\n *\n * Taken from
|
|
44
|
+
"import { PukuError } from '../../core/error';\n\n/**\n * Percent-encode everything that isn't safe to have in a path without encoding safe chars.\n *\n * Taken from \n * > unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * > sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\" / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n * > pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n */\nexport function encodeURIPath(str: string) {\n return str.replace(/[^A-Za-z0-9\\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);\n}\n\nconst EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));\n\nexport const createPathTagFunction = (pathEncoder = encodeURIPath) =>\n function path(statics: readonly string[], ...params: readonly unknown[]): string {\n // If there are no params, no processing is needed.\n if (statics.length === 1) return statics[0]!;\n\n let postPath = false;\n const invalidSegments = [];\n const path = statics.reduce((previousValue, currentValue, index) => {\n if (/[?#]/.test(currentValue)) {\n postPath = true;\n }\n const value = params[index];\n let encoded = (postPath ? encodeURIComponent : pathEncoder)('' + value);\n if (\n index !== params.length &&\n (value == null ||\n (typeof value === 'object' &&\n // handle values from other realms\n value.toString ===\n Object.getPrototypeOf(Object.getPrototypeOf((value as any).hasOwnProperty ?? EMPTY) ?? EMPTY)\n ?.toString))\n ) {\n encoded = value + '';\n invalidSegments.push({\n start: previousValue.length + currentValue.length,\n length: encoded.length,\n error: `Value of type ${Object.prototype.toString\n .call(value)\n .slice(8, -1)} is not a valid path parameter`,\n });\n }\n return previousValue + currentValue + (index === params.length ? '' : encoded);\n }, '');\n\n const pathOnly = path.split(/[?#]/, 1)[0]!;\n const invalidSegmentPattern = /(?<=^|\\/)(?:\\.|%2e){1,2}(?=\\/|$)/gi;\n let match;\n\n // Find all invalid segments\n while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) {\n invalidSegments.push({\n start: match.index,\n length: match[0].length,\n error: `Value \"${match[0]}\" can\\'t be safely passed as a path parameter`,\n });\n }\n\n invalidSegments.sort((a, b) => a.start - b.start);\n\n if (invalidSegments.length > 0) {\n let lastEnd = 0;\n const underline = invalidSegments.reduce((acc, segment) => {\n const spaces = ' '.repeat(segment.start - lastEnd);\n const arrows = '^'.repeat(segment.length);\n lastEnd = segment.start + segment.length;\n return acc + spaces + arrows;\n }, '');\n\n throw new PukuError(\n `Path parameters result in path with invalid segments:\\n${invalidSegments\n .map((e) => e.error)\n .join('\\n')}\\n${path}\\n${underline}`,\n );\n }\n\n return path;\n };\n\n/**\n * URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced.\n */\nexport const path = /* @__PURE__ */ createPathTagFunction(encodeURIPath);\n",
|
|
45
45
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { APIResource } from '../../core/resource';\nimport * as BetaAPI from './beta';\nimport * as AgentsAPI from './agents/agents';\nimport { APIPromise } from '../../core/api-promise';\nimport { PageCursor, type PageCursorParams, PagePromise } from '../../core/pagination';\nimport { buildHeaders } from '../../internal/headers';\nimport { RequestOptions } from '../../internal/request-options';\nimport { path } from '../../internal/utils/path';\n\nexport class DeploymentRuns extends APIResource {\n /**\n * Get Deployment Run\n *\n * @example\n * ```ts\n * const betaManagedAgentsDeploymentRun =\n * await client.beta.deploymentRuns.retrieve(\n * 'deployment_run_id',\n * );\n * ```\n */\n retrieve(\n deploymentRunID: string,\n params: DeploymentRunRetrieveParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaManagedAgentsDeploymentRun> {\n const { betas } = params ?? {};\n return this._client.get(path`/v1/deployment_runs/${deploymentRunID}?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * List Deployment Runs\n *\n * @example\n * ```ts\n * // Automatically fetches more pages as needed.\n * for await (const betaManagedAgentsDeploymentRun of client.beta.deploymentRuns.list()) {\n * // ...\n * }\n * ```\n */\n list(\n params: DeploymentRunListParams | null | undefined = {},\n options?: RequestOptions,\n ): PagePromise<BetaManagedAgentsDeploymentRunsPageCursor, BetaManagedAgentsDeploymentRun> {\n const { betas, ...query } = params ?? {};\n return this._client.getAPIList(\n '/v1/deployment_runs?beta=true',\n PageCursor<BetaManagedAgentsDeploymentRun>,\n {\n query,\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },\n options?.headers,\n ]),\n },\n );\n }\n}\n\nexport type BetaManagedAgentsDeploymentRunsPageCursor = PageCursor<BetaManagedAgentsDeploymentRun>;\n\n/**\n * The deployment's agent was archived.\n */\nexport interface BetaManagedAgentsAgentArchivedRunError {\n /**\n * Human-readable error description.\n */\n message: string;\n\n type: 'agent_archived_error';\n}\n\n/**\n * A persistent, append-only record of a single deployment execution. Records\n * session creation success or failure — no session lifecycle tracking.\n */\nexport interface BetaManagedAgentsDeploymentRun {\n /**\n * Unique identifier for this run (`drun_...`).\n */\n id: string;\n\n /**\n * A resolved agent reference with a concrete version.\n */\n agent: AgentsAPI.BetaManagedAgentsAgentReference;\n\n /**\n * A timestamp in RFC 3339 format\n */\n created_at: string;\n\n /**\n * ID of the deployment that produced this run.\n */\n deployment_id: string;\n\n /**\n * Why the run failed to create a session. The type identifies the failure; message\n * is human-readable detail.\n */\n error:\n | BetaManagedAgentsEnvironmentArchivedRunError\n | BetaManagedAgentsAgentArchivedRunError\n | BetaManagedAgentsEnvironmentNotFoundRunError\n | BetaManagedAgentsVaultNotFoundRunError\n | BetaManagedAgentsVaultArchivedRunError\n | BetaManagedAgentsFileNotFoundRunError\n | BetaManagedAgentsMemoryStoreArchivedRunError\n | BetaManagedAgentsSkillNotFoundRunError\n | BetaManagedAgentsSessionResourceNotFoundRunError\n | BetaManagedAgentsWorkspaceArchivedRunError\n | BetaManagedAgentsOrganizationDisabledRunError\n | BetaManagedAgentsSessionRateLimitedRunError\n | BetaManagedAgentsSessionCreationRejectedRunError\n | BetaManagedAgentsUnknownRunError\n | BetaManagedAgentsSelfHostedResourcesUnsupportedRunError\n | BetaManagedAgentsMCPEgressBlockedRunError\n | null;\n\n /**\n * Populated on success. Null on creation failure. Exactly one of `session_id` or\n * `error` is non-null.\n */\n session_id: string | null;\n\n /**\n * Describes what triggered a deployment run, with trigger-specific metadata.\n */\n trigger_context: BetaManagedAgentsTriggerContext;\n\n type: 'deployment_run';\n}\n\n/**\n * The deployment's environment was archived.\n */\nexport interface BetaManagedAgentsEnvironmentArchivedRunError {\n /**\n * Human-readable error description.\n */\n message: string;\n\n type: 'environment_archived_error';\n}\n\n/**\n * The deployment's environment no longer exists.\n */\nexport interface BetaManagedAgentsEnvironmentNotFoundRunError {\n /**\n * Human-readable error description.\n */\n message: string;\n\n type: 'environment_not_found_error';\n}\n\n/**\n * A file resource referenced by the deployment no longer exists.\n */\nexport interface BetaManagedAgentsFileNotFoundRunError {\n /**\n * Human-readable error description.\n */\n message: string;\n\n type: 'file_not_found_error';\n}\n\n/**\n * The run was started manually by creating a session directly against the\n * deployment.\n */\nexport interface BetaManagedAgentsManualTriggerContext {\n type: 'manual';\n}\n\n/**\n * An MCP server host used by the deployment's agent is blocked by the\n * environment's network policy.\n */\nexport interface BetaManagedAgentsMCPEgressBlockedRunError {\n /**\n * Human-readable error description.\n */\n message: string;\n\n type: 'mcp_egress_blocked_error';\n}\n\n/**\n * A memory store referenced by the deployment is archived.\n */\nexport interface BetaManagedAgentsMemoryStoreArchivedRunError {\n /**\n * Human-readable error description.\n */\n message: string;\n\n type: 'memory_store_archived_error';\n}\n\n/**\n * The deployment's organization is disabled.\n */\nexport interface BetaManagedAgentsOrganizationDisabledRunError {\n /**\n * Human-readable error description.\n */\n message: string;\n\n type: 'organization_disabled_error';\n}\n\n/**\n * The run was fired by the deployment's cron schedule.\n */\nexport interface BetaManagedAgentsScheduleTriggerContext {\n /**\n * A timestamp in RFC 3339 format\n */\n scheduled_at: string;\n\n type: 'schedule';\n}\n\n/**\n * The deployment configures resources, but its environment is self-hosted and\n * cannot mount them.\n */\nexport interface BetaManagedAgentsSelfHostedResourcesUnsupportedRunError {\n /**\n * Human-readable error description.\n */\n message: string;\n\n type: 'self_hosted_resources_unsupported_error';\n}\n\n/**\n * The session create request was rejected with a non-retryable validation error.\n */\nexport interface BetaManagedAgentsSessionCreationRejectedRunError {\n /**\n * Human-readable error description.\n */\n message: string;\n\n type: 'session_creation_rejected_error';\n}\n\n/**\n * Session creation was rejected due to rate limiting. The schedule keeps firing;\n * subsequent runs may succeed.\n */\nexport interface BetaManagedAgentsSessionRateLimitedRunError {\n /**\n * Human-readable error description.\n */\n message: string;\n\n type: 'session_rate_limited_error';\n}\n\n/**\n * A referenced resource no longer exists and its kind was not reported.\n */\nexport interface BetaManagedAgentsSessionResourceNotFoundRunError {\n /**\n * Human-readable error description.\n */\n message: string;\n\n type: 'session_resource_not_found_error';\n}\n\n/**\n * A skill referenced by the deployment's agent no longer exists.\n */\nexport interface BetaManagedAgentsSkillNotFoundRunError {\n /**\n * Human-readable error description.\n */\n message: string;\n\n type: 'skill_not_found_error';\n}\n\n/**\n * Describes what triggered a deployment run, with trigger-specific metadata.\n */\nexport type BetaManagedAgentsTriggerContext =\n | BetaManagedAgentsScheduleTriggerContext\n | BetaManagedAgentsManualTriggerContext;\n\n/**\n * What triggered a deployment run.\n */\nexport type BetaManagedAgentsTriggerType = 'schedule' | 'manual';\n\n/**\n * An unknown or unexpected error caused the run to fail. A fallback variant;\n * clients that do not recognize a new error type can match on message alone.\n */\nexport interface BetaManagedAgentsUnknownRunError {\n /**\n * Human-readable error description.\n */\n message: string;\n\n type: 'unknown_error';\n}\n\n/**\n * A vault referenced by the deployment is archived.\n */\nexport interface BetaManagedAgentsVaultArchivedRunError {\n /**\n * Human-readable error description.\n */\n message: string;\n\n type: 'vault_archived_error';\n}\n\n/**\n * A vault referenced by the deployment no longer exists.\n */\nexport interface BetaManagedAgentsVaultNotFoundRunError {\n /**\n * Human-readable error description.\n */\n message: string;\n\n type: 'vault_not_found_error';\n}\n\n/**\n * The deployment's workspace was archived.\n */\nexport interface BetaManagedAgentsWorkspaceArchivedRunError {\n /**\n * Human-readable error description.\n */\n message: string;\n\n type: 'workspace_archived_error';\n}\n\nexport interface DeploymentRunRetrieveParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface DeploymentRunListParams extends PageCursorParams {\n /**\n * Query param: Return runs created strictly after this time (exclusive).\n */\n 'created_at[gt]'?: string;\n\n /**\n * Query param: Return runs created at or after this time (inclusive).\n */\n 'created_at[gte]'?: string;\n\n /**\n * Query param: Return runs created strictly before this time (exclusive).\n */\n 'created_at[lt]'?: string;\n\n /**\n * Query param: Return runs created at or before this time (inclusive).\n */\n 'created_at[lte]'?: string;\n\n /**\n * Query param: Filter to a specific deployment. Omit to list across all\n * deployments in the workspace. Filtering by a non-existent `deployment_id`\n * returns 200 with empty data.\n */\n deployment_id?: string;\n\n /**\n * Query param: Filter: true for runs with non-null `error`, false for runs with\n * non-null `session_id`. Omit for all.\n */\n has_error?: boolean;\n\n /**\n * Query param: Filter runs by what triggered them. Omit to return all runs.\n */\n trigger_type?: BetaManagedAgentsTriggerType;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport declare namespace DeploymentRuns {\n export {\n type BetaManagedAgentsAgentArchivedRunError as BetaManagedAgentsAgentArchivedRunError,\n type BetaManagedAgentsDeploymentRun as BetaManagedAgentsDeploymentRun,\n type BetaManagedAgentsEnvironmentArchivedRunError as BetaManagedAgentsEnvironmentArchivedRunError,\n type BetaManagedAgentsEnvironmentNotFoundRunError as BetaManagedAgentsEnvironmentNotFoundRunError,\n type BetaManagedAgentsFileNotFoundRunError as BetaManagedAgentsFileNotFoundRunError,\n type BetaManagedAgentsManualTriggerContext as BetaManagedAgentsManualTriggerContext,\n type BetaManagedAgentsMCPEgressBlockedRunError as BetaManagedAgentsMCPEgressBlockedRunError,\n type BetaManagedAgentsMemoryStoreArchivedRunError as BetaManagedAgentsMemoryStoreArchivedRunError,\n type BetaManagedAgentsOrganizationDisabledRunError as BetaManagedAgentsOrganizationDisabledRunError,\n type BetaManagedAgentsScheduleTriggerContext as BetaManagedAgentsScheduleTriggerContext,\n type BetaManagedAgentsSelfHostedResourcesUnsupportedRunError as BetaManagedAgentsSelfHostedResourcesUnsupportedRunError,\n type BetaManagedAgentsSessionCreationRejectedRunError as BetaManagedAgentsSessionCreationRejectedRunError,\n type BetaManagedAgentsSessionRateLimitedRunError as BetaManagedAgentsSessionRateLimitedRunError,\n type BetaManagedAgentsSessionResourceNotFoundRunError as BetaManagedAgentsSessionResourceNotFoundRunError,\n type BetaManagedAgentsSkillNotFoundRunError as BetaManagedAgentsSkillNotFoundRunError,\n type BetaManagedAgentsTriggerContext as BetaManagedAgentsTriggerContext,\n type BetaManagedAgentsTriggerType as BetaManagedAgentsTriggerType,\n type BetaManagedAgentsUnknownRunError as BetaManagedAgentsUnknownRunError,\n type BetaManagedAgentsVaultArchivedRunError as BetaManagedAgentsVaultArchivedRunError,\n type BetaManagedAgentsVaultNotFoundRunError as BetaManagedAgentsVaultNotFoundRunError,\n type BetaManagedAgentsWorkspaceArchivedRunError as BetaManagedAgentsWorkspaceArchivedRunError,\n type BetaManagedAgentsDeploymentRunsPageCursor as BetaManagedAgentsDeploymentRunsPageCursor,\n type DeploymentRunRetrieveParams as DeploymentRunRetrieveParams,\n type DeploymentRunListParams as DeploymentRunListParams,\n };\n}\n",
|
|
46
46
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { APIResource } from '../../core/resource';\nimport * as BetaAPI from './beta';\nimport * as DeploymentRunsAPI from './deployment-runs';\nimport * as AgentsAPI from './agents/agents';\nimport * as EventsAPI from './sessions/events';\nimport * as SessionsAPI from './sessions/sessions';\nimport { APIPromise } from '../../core/api-promise';\nimport { PageCursor, type PageCursorParams, PagePromise } from '../../core/pagination';\nimport { buildHeaders } from '../../internal/headers';\nimport { RequestOptions } from '../../internal/request-options';\nimport { path } from '../../internal/utils/path';\n\nexport class Deployments extends APIResource {\n /**\n * Create Deployment\n *\n * @example\n * ```ts\n * const betaManagedAgentsDeployment =\n * await client.beta.deployments.create({\n * agent: 'string',\n * environment_id: 'x',\n * initial_events: [\n * {\n * content: [\n * {\n * text: 'Where is my order #1234?',\n * type: 'text',\n * },\n * ],\n * type: 'user.message',\n * },\n * ],\n * name: 'x',\n * });\n * ```\n */\n create(params: DeploymentCreateParams, options?: RequestOptions): APIPromise<BetaManagedAgentsDeployment> {\n const { betas, ...body } = params;\n return this._client.post('/v1/deployments?beta=true', {\n body,\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Get Deployment\n *\n * @example\n * ```ts\n * const betaManagedAgentsDeployment =\n * await client.beta.deployments.retrieve(\n * 'depl_011CZkZcDH3vPqd7xnEfwTai',\n * );\n * ```\n */\n retrieve(\n deploymentID: string,\n params: DeploymentRetrieveParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaManagedAgentsDeployment> {\n const { betas } = params ?? {};\n return this._client.get(path`/v1/deployments/${deploymentID}?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Update Deployment\n *\n * @example\n * ```ts\n * const betaManagedAgentsDeployment =\n * await client.beta.deployments.update(\n * 'depl_011CZkZcDH3vPqd7xnEfwTai',\n * );\n * ```\n */\n update(\n deploymentID: string,\n params: DeploymentUpdateParams,\n options?: RequestOptions,\n ): APIPromise<BetaManagedAgentsDeployment> {\n const { betas, ...body } = params;\n return this._client.post(path`/v1/deployments/${deploymentID}?beta=true`, {\n body,\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * List Deployments\n *\n * @example\n * ```ts\n * // Automatically fetches more pages as needed.\n * for await (const betaManagedAgentsDeployment of client.beta.deployments.list()) {\n * // ...\n * }\n * ```\n */\n list(\n params: DeploymentListParams | null | undefined = {},\n options?: RequestOptions,\n ): PagePromise<BetaManagedAgentsDeploymentsPageCursor, BetaManagedAgentsDeployment> {\n const { betas, ...query } = params ?? {};\n return this._client.getAPIList('/v1/deployments?beta=true', PageCursor<BetaManagedAgentsDeployment>, {\n query,\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Archive Deployment\n *\n * @example\n * ```ts\n * const betaManagedAgentsDeployment =\n * await client.beta.deployments.archive(\n * 'depl_011CZkZcDH3vPqd7xnEfwTai',\n * );\n * ```\n */\n archive(\n deploymentID: string,\n params: DeploymentArchiveParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaManagedAgentsDeployment> {\n const { betas } = params ?? {};\n return this._client.post(path`/v1/deployments/${deploymentID}/archive?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Pause Deployment\n *\n * @example\n * ```ts\n * const betaManagedAgentsDeployment =\n * await client.beta.deployments.pause(\n * 'depl_011CZkZcDH3vPqd7xnEfwTai',\n * );\n * ```\n */\n pause(\n deploymentID: string,\n params: DeploymentPauseParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaManagedAgentsDeployment> {\n const { betas } = params ?? {};\n return this._client.post(path`/v1/deployments/${deploymentID}/pause?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Run Deployment Now\n *\n * @example\n * ```ts\n * const betaManagedAgentsDeploymentRun =\n * await client.beta.deployments.run(\n * 'depl_011CZkZcDH3vPqd7xnEfwTai',\n * );\n * ```\n */\n run(\n deploymentID: string,\n params: DeploymentRunParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<DeploymentRunsAPI.BetaManagedAgentsDeploymentRun> {\n const { betas } = params ?? {};\n return this._client.post(path`/v1/deployments/${deploymentID}/run?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Unpause Deployment\n *\n * @example\n * ```ts\n * const betaManagedAgentsDeployment =\n * await client.beta.deployments.unpause(\n * 'depl_011CZkZcDH3vPqd7xnEfwTai',\n * );\n * ```\n */\n unpause(\n deploymentID: string,\n params: DeploymentUnpauseParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaManagedAgentsDeployment> {\n const { betas } = params ?? {};\n return this._client.post(path`/v1/deployments/${deploymentID}/unpause?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },\n options?.headers,\n ]),\n });\n }\n}\n\nexport type BetaManagedAgentsDeploymentsPageCursor = PageCursor<BetaManagedAgentsDeployment>;\n\n/**\n * The deployment's agent was archived.\n */\nexport interface BetaManagedAgentsAgentArchivedDeploymentPausedReasonError {\n type: 'agent_archived_error';\n}\n\n/**\n * 5-field POSIX cron schedule with computed runtime timestamps.\n */\nexport interface BetaManagedAgentsCronSchedule {\n /**\n * 5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g.,\n * \"0 9 \\* \\* 1-5\" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean\n * Sunday. Extended cron syntax - seconds or year fields, and the special\n * characters L, W, #, and ? - is not supported, nor are predefined shortcuts\n * (@daily).\n */\n expression: string;\n\n /**\n * IANA timezone identifier (e.g., \"America/Los_Angeles\", \"UTC\").\n */\n timezone: string;\n\n type: 'cron';\n\n /**\n * A timestamp in RFC 3339 format\n */\n last_run_at?: string | null;\n\n /**\n * Up to 5 timestamps of upcoming cron occurrences. Non-empty for active and paused\n * deployments (reflects what the schedule would do if unpaused); empty once the\n * deployment is archived (`archived_at` set). Each fire is offset by a small\n * per-schedule jitter, so a run will actually start at or shortly after its listed\n * time.\n */\n upcoming_runs_at?: Array<string>;\n}\n\n/**\n * 5-field POSIX cron schedule. Literal wall-clock matching in the configured\n * timezone.\n */\nexport interface BetaManagedAgentsCronScheduleParams {\n /**\n * 5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g.,\n * \"0 9 \\* \\* 1-5\" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean\n * Sunday. Extended cron syntax - seconds or year fields, and the special\n * characters L, W, #, and ? - is not supported, nor are predefined shortcuts\n * (@daily).\n */\n expression: string;\n\n /**\n * Required. IANA timezone identifier (e.g., \"America/Los_Angeles\", \"UTC\").\n * Validated against the IANA timezone database.\n */\n timezone: string;\n\n type: 'cron';\n}\n\n/**\n * A deployment is a configured instance of an agent — it binds the agent to\n * everything needed to run it autonomously: an environment, credentials, initial\n * events, and an optional schedule.\n */\nexport interface BetaManagedAgentsDeployment {\n /**\n * Unique identifier for this deployment.\n */\n id: string;\n\n /**\n * A resolved agent reference with a concrete version.\n */\n agent: AgentsAPI.BetaManagedAgentsAgentReference;\n\n /**\n * A timestamp in RFC 3339 format\n */\n archived_at: string | null;\n\n /**\n * A timestamp in RFC 3339 format\n */\n created_at: string;\n\n /**\n * Description of what the deployment does.\n */\n description: string | null;\n\n /**\n * ID of the `environment` where sessions run.\n */\n environment_id: string;\n\n /**\n * Events sent to each session immediately after creation.\n */\n initial_events: Array<BetaManagedAgentsDeploymentInitialEvent>;\n\n /**\n * Arbitrary key-value metadata. Maximum 16 pairs.\n */\n metadata: { [key: string]: string };\n\n /**\n * Human-readable name.\n */\n name: string;\n\n /**\n * Why a deployment is paused. Non-null exactly when `status` is `paused`.\n */\n paused_reason: BetaManagedAgentsDeploymentPausedReason | null;\n\n /**\n * Resources attached to sessions created from this deployment. Echoes the input\n * minus write-only credentials.\n */\n resources: Array<BetaManagedAgentsSessionResourceConfig>;\n\n /**\n * 5-field POSIX cron schedule with computed runtime timestamps.\n */\n schedule: BetaManagedAgentsSchedule | null;\n\n /**\n * Lifecycle status of a deployment.\n */\n status: BetaManagedAgentsDeploymentStatus;\n\n type: 'deployment';\n\n /**\n * A timestamp in RFC 3339 format\n */\n updated_at: string;\n\n /**\n * Vault IDs supplying stored credentials for sessions created from this\n * deployment.\n */\n vault_ids: Array<string>;\n\n /**\n * A hard spend ceiling. The session stops issuing new model requests once the\n * tracked list cost reaches `max_list_cost`.\n */\n budget?: SessionsAPI.BetaManagedAgentsBudgetLimit | null;\n}\n\n/**\n * An event sent to a session immediately after it is created. Supports\n * `user.message`, `user.define_outcome`, and `system.message`.\n */\nexport type BetaManagedAgentsDeploymentInitialEvent =\n | BetaManagedAgentsDeploymentUserMessageEvent\n | BetaManagedAgentsDeploymentUserDefineOutcomeEvent\n | BetaManagedAgentsDeploymentSystemMessageEvent;\n\n/**\n * An event sent to a session immediately after it is created. Supports\n * `user.message`, `user.define_outcome`, and `system.message`.\n */\nexport type BetaManagedAgentsDeploymentInitialEventParams =\n | EventsAPI.BetaManagedAgentsUserMessageEventParams\n | EventsAPI.BetaManagedAgentsUserDefineOutcomeEventParams\n | EventsAPI.BetaManagedAgentsSystemMessageEventParams;\n\n/**\n * Why a deployment is paused. Non-null exactly when `status` is `paused`.\n */\nexport type BetaManagedAgentsDeploymentPausedReason =\n | BetaManagedAgentsManualDeploymentPausedReason\n | BetaManagedAgentsErrorDeploymentPausedReason;\n\n/**\n * The error that triggered an auto-pause. Matches the failed run's `error.type`.\n */\nexport type BetaManagedAgentsDeploymentPausedReasonError =\n | BetaManagedAgentsEnvironmentArchivedDeploymentPausedReasonError\n | BetaManagedAgentsAgentArchivedDeploymentPausedReasonError\n | BetaManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError\n | BetaManagedAgentsVaultNotFoundDeploymentPausedReasonError\n | BetaManagedAgentsFileNotFoundDeploymentPausedReasonError\n | BetaManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError\n | BetaManagedAgentsWorkspaceArchivedDeploymentPausedReasonError\n | BetaManagedAgentsOrganizationDisabledDeploymentPausedReasonError\n | BetaManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError\n | BetaManagedAgentsSkillNotFoundDeploymentPausedReasonError\n | BetaManagedAgentsVaultArchivedDeploymentPausedReasonError\n | BetaManagedAgentsUnknownDeploymentPausedReasonError\n | BetaManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError\n | BetaManagedAgentsMCPEgressBlockedDeploymentPausedReasonError;\n\n/**\n * Lifecycle status of a deployment.\n */\nexport type BetaManagedAgentsDeploymentStatus = 'active' | 'paused';\n\n/**\n * Privileged context for the accompanying turn and all subsequent turns, appended\n * to the session's system context as a `role: \"system\"` turn rather than replacing\n * the top-level system prompt.\n */\nexport interface BetaManagedAgentsDeploymentSystemMessageEvent {\n /**\n * System content blocks to append. Text-only.\n */\n content: Array<SessionsAPI.BetaManagedAgentsSystemContentBlock>;\n\n type: 'system.message';\n}\n\n/**\n * An outcome the agent should work toward. The agent begins work on receipt.\n */\nexport interface BetaManagedAgentsDeploymentUserDefineOutcomeEvent {\n /**\n * What the agent should produce. This is the task specification.\n */\n description: string;\n\n /**\n * Rubric for grading the quality of an outcome.\n */\n rubric: EventsAPI.BetaManagedAgentsFileRubric | EventsAPI.BetaManagedAgentsTextRubric;\n\n type: 'user.define_outcome';\n\n /**\n * Eval→revision cycles before giving up. Default 3, max 20.\n */\n max_iterations?: number | null;\n}\n\n/**\n * A user message sent to the session.\n */\nexport interface BetaManagedAgentsDeploymentUserMessageEvent {\n /**\n * Array of content blocks for the user message.\n */\n content: Array<\n | EventsAPI.BetaManagedAgentsTextBlock\n | EventsAPI.BetaManagedAgentsImageBlock\n | EventsAPI.BetaManagedAgentsDocumentBlock\n | EventsAPI.BetaManagedAgentsRedactedBlock\n >;\n\n type: 'user.message';\n}\n\n/**\n * The deployment's environment was archived.\n */\nexport interface BetaManagedAgentsEnvironmentArchivedDeploymentPausedReasonError {\n type: 'environment_archived_error';\n}\n\n/**\n * The deployment's environment no longer exists.\n */\nexport interface BetaManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError {\n type: 'environment_not_found_error';\n}\n\n/**\n * A scheduled fire recorded a failed run whose error auto-pauses the deployment.\n */\nexport interface BetaManagedAgentsErrorDeploymentPausedReason {\n /**\n * The error that triggered an auto-pause. Matches the failed run's `error.type`.\n */\n error: BetaManagedAgentsDeploymentPausedReasonError;\n\n type: 'error';\n}\n\n/**\n * A file resource referenced by the deployment no longer exists.\n */\nexport interface BetaManagedAgentsFileNotFoundDeploymentPausedReasonError {\n type: 'file_not_found_error';\n}\n\n/**\n * A file mounted into each session's container.\n */\nexport interface BetaManagedAgentsFileResourceConfig {\n /**\n * ID of a previously uploaded file.\n */\n file_id: string;\n\n type: 'file';\n\n /**\n * Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`.\n */\n mount_path?: string | null;\n}\n\n/**\n * A GitHub repository mounted into each session's container. The authorization\n * token is write-only and never returned.\n */\nexport interface BetaManagedAgentsGitHubRepositoryResourceConfig {\n type: 'github_repository';\n\n /**\n * Github URL of the repository\n */\n url: string;\n\n /**\n * Branch or commit to check out. Defaults to the repository's default branch.\n */\n checkout?: SessionsAPI.BetaManagedAgentsBranchCheckout | SessionsAPI.BetaManagedAgentsCommitCheckout | null;\n\n /**\n * Mount path in the container. Defaults to `/workspace/<repo-name>`.\n */\n mount_path?: string | null;\n}\n\n/**\n * The caller invoked the pause endpoint on the deployment.\n */\nexport interface BetaManagedAgentsManualDeploymentPausedReason {\n type: 'manual';\n}\n\n/**\n * An MCP server host used by the deployment's agent is blocked by the\n * environment's network policy.\n */\nexport interface BetaManagedAgentsMCPEgressBlockedDeploymentPausedReasonError {\n type: 'mcp_egress_blocked_error';\n}\n\n/**\n * A memory store referenced by the deployment is archived.\n */\nexport interface BetaManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError {\n type: 'memory_store_archived_error';\n}\n\n/**\n * A memory store attached to each session created from this deployment.\n */\nexport interface BetaManagedAgentsMemoryStoreResourceConfig {\n /**\n * The memory store ID (memstore\\_...). Must belong to the caller's organization\n * and workspace.\n */\n memory_store_id: string;\n\n type: 'memory_store';\n\n /**\n * Access mode for an attached memory store.\n */\n access?: 'read_write' | 'read_only' | null;\n\n /**\n * Per-attachment guidance for the agent on how to use this store. Rendered into\n * the memory section of the system prompt. Max 4096 chars.\n */\n instructions?: string | null;\n}\n\n/**\n * The deployment's organization is disabled.\n */\nexport interface BetaManagedAgentsOrganizationDisabledDeploymentPausedReasonError {\n type: 'organization_disabled_error';\n}\n\n/**\n * 5-field POSIX cron schedule with computed runtime timestamps.\n */\nexport interface BetaManagedAgentsSchedule {\n /**\n * 5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g.,\n * \"0 9 \\* \\* 1-5\" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean\n * Sunday. Extended cron syntax - seconds or year fields, and the special\n * characters L, W, #, and ? - is not supported, nor are predefined shortcuts\n * (@daily).\n */\n expression: string;\n\n /**\n * IANA timezone identifier (e.g., \"America/Los_Angeles\", \"UTC\").\n */\n timezone: string;\n\n type: 'cron';\n\n /**\n * A timestamp in RFC 3339 format\n */\n last_run_at?: string | null;\n\n /**\n * Up to 5 timestamps of upcoming cron occurrences. Non-empty for active and paused\n * deployments (reflects what the schedule would do if unpaused); empty once the\n * deployment is archived (`archived_at` set). Each fire is offset by a small\n * per-schedule jitter, so a run will actually start at or shortly after its listed\n * time.\n */\n upcoming_runs_at?: Array<string>;\n}\n\n/**\n * 5-field POSIX cron schedule. Literal wall-clock matching in the configured\n * timezone.\n */\nexport interface BetaManagedAgentsScheduleParams {\n /**\n * 5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g.,\n * \"0 9 \\* \\* 1-5\" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean\n * Sunday. Extended cron syntax - seconds or year fields, and the special\n * characters L, W, #, and ? - is not supported, nor are predefined shortcuts\n * (@daily).\n */\n expression: string;\n\n /**\n * Required. IANA timezone identifier (e.g., \"America/Los_Angeles\", \"UTC\").\n * Validated against the IANA timezone database.\n */\n timezone: string;\n\n type: 'cron';\n}\n\n/**\n * The deployment configures resources, but its environment is self-hosted and\n * cannot mount them.\n */\nexport interface BetaManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError {\n type: 'self_hosted_resources_unsupported_error';\n}\n\n/**\n * A configured session resource. Echoes the input minus write-only credentials.\n */\nexport type BetaManagedAgentsSessionResourceConfig =\n | BetaManagedAgentsGitHubRepositoryResourceConfig\n | BetaManagedAgentsFileResourceConfig\n | BetaManagedAgentsMemoryStoreResourceConfig;\n\n/**\n * A referenced resource no longer exists and its kind was not reported.\n */\nexport interface BetaManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError {\n type: 'session_resource_not_found_error';\n}\n\n/**\n * A skill referenced by the deployment's agent no longer exists.\n */\nexport interface BetaManagedAgentsSkillNotFoundDeploymentPausedReasonError {\n type: 'skill_not_found_error';\n}\n\n/**\n * An unrecognized error auto-paused the deployment. A fallback variant; matches a\n * run whose `error.type` is `unknown_error`.\n */\nexport interface BetaManagedAgentsUnknownDeploymentPausedReasonError {\n type: 'unknown_error';\n}\n\n/**\n * A vault referenced by the deployment is archived.\n */\nexport interface BetaManagedAgentsVaultArchivedDeploymentPausedReasonError {\n type: 'vault_archived_error';\n}\n\n/**\n * A vault referenced by the deployment no longer exists.\n */\nexport interface BetaManagedAgentsVaultNotFoundDeploymentPausedReasonError {\n type: 'vault_not_found_error';\n}\n\n/**\n * The deployment's workspace was archived.\n */\nexport interface BetaManagedAgentsWorkspaceArchivedDeploymentPausedReasonError {\n type: 'workspace_archived_error';\n}\n\nexport interface DeploymentCreateParams {\n /**\n * Body param: Agent to deploy. Accepts the `agent` ID string, which pins the\n * latest version, or an `agent` object with both id and version specified. The\n * agent must exist and not be archived.\n */\n agent: string | SessionsAPI.BetaManagedAgentsAgentParams;\n\n /**\n * Body param: ID of the `environment` defining the container configuration for\n * sessions created from this deployment.\n */\n environment_id: string;\n\n /**\n * Body param: Events to send to each session immediately after creation. At least\n * 1, maximum 50.\n */\n initial_events: Array<BetaManagedAgentsDeploymentInitialEventParams>;\n\n /**\n * Body param: Human-readable name for the deployment.\n */\n name: string;\n\n /**\n * Body param: A hard spend ceiling. The session stops issuing new model requests\n * once the tracked list cost reaches `max_list_cost`.\n */\n budget?: SessionsAPI.BetaManagedAgentsBudgetLimit | null;\n\n /**\n * Body param: Description of what the deployment does.\n */\n description?: string | null;\n\n /**\n * Body param: Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars,\n * values up to 512 chars.\n */\n metadata?: { [key: string]: string };\n\n /**\n * Body param: Resources (e.g. repositories, files) to mount into each session's\n * container. Maximum 500.\n */\n resources?: Array<\n | SessionsAPI.BetaManagedAgentsGitHubRepositoryResourceParams\n | SessionsAPI.BetaManagedAgentsFileResourceParams\n | SessionsAPI.BetaManagedAgentsMemoryStoreResourceParam\n >;\n\n /**\n * Body param: 5-field POSIX cron schedule. Literal wall-clock matching in the\n * configured timezone.\n */\n schedule?: BetaManagedAgentsScheduleParams | null;\n\n /**\n * Body param: Vault IDs for stored credentials the agent can use during sessions\n * created from this deployment. Maximum 50.\n */\n vault_ids?: Array<string>;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface DeploymentRetrieveParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface DeploymentUpdateParams {\n /**\n * Body param: Agent to deploy. Accepts the `agent` ID string, which re-pins to the\n * latest version, or an `agent` object with both id and version specified. Omit to\n * preserve. Cannot be cleared.\n */\n agent?: string | SessionsAPI.BetaManagedAgentsAgentParams;\n\n /**\n * Body param: A hard spend ceiling. The session stops issuing new model requests\n * once the tracked list cost reaches `max_list_cost`.\n */\n budget?: SessionsAPI.BetaManagedAgentsBudgetLimit | null;\n\n /**\n * Body param: Description. Omit to preserve; send empty string or null to clear.\n */\n description?: string | null;\n\n /**\n * Body param: ID of the `environment` where sessions run. Omit to preserve. Cannot\n * be cleared.\n */\n environment_id?: string;\n\n /**\n * Body param: Initial events. Full replacement. Omit to preserve. Cannot be\n * cleared. At least 1, maximum 50.\n */\n initial_events?: Array<BetaManagedAgentsDeploymentInitialEventParams>;\n\n /**\n * Body param: Metadata patch. Set a key to a string to upsert it, or to null to\n * delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up\n * to 64 chars each) with values up to 512 chars.\n */\n metadata?: { [key: string]: string | null } | null;\n\n /**\n * Body param: Human-readable name. Must be non-empty. Omit to preserve. Cannot be\n * cleared.\n */\n name?: string;\n\n /**\n * Body param: Session resources. Full replacement. Omit to preserve; send empty\n * array or null to clear. Maximum 500.\n */\n resources?: Array<\n | SessionsAPI.BetaManagedAgentsGitHubRepositoryResourceParams\n | SessionsAPI.BetaManagedAgentsFileResourceParams\n | SessionsAPI.BetaManagedAgentsMemoryStoreResourceParam\n > | null;\n\n /**\n * Body param: 5-field POSIX cron schedule. Literal wall-clock matching in the\n * configured timezone.\n */\n schedule?: BetaManagedAgentsScheduleParams | null;\n\n /**\n * Body param: Vault IDs. Full replacement. Omit to preserve; send empty array or\n * null to clear. Maximum 50.\n */\n vault_ids?: Array<string> | null;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface DeploymentListParams extends PageCursorParams {\n /**\n * Query param: Filter by agent ID.\n */\n agent_id?: string;\n\n /**\n * Query param: Return deployments created at or after this time (inclusive).\n */\n 'created_at[gte]'?: string;\n\n /**\n * Query param: Return deployments created at or before this time (inclusive).\n */\n 'created_at[lte]'?: string;\n\n /**\n * Query param: When true, includes archived deployments. Default: false (exclude\n * archived).\n */\n include_archived?: boolean;\n\n /**\n * Query param: Filter by status: `active` or `paused`. Omit for both. To include\n * archived deployments, use `include_archived` instead; the two cannot be\n * combined.\n */\n status?: BetaManagedAgentsDeploymentStatus;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface DeploymentArchiveParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface DeploymentPauseParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface DeploymentRunParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface DeploymentUnpauseParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport declare namespace Deployments {\n export {\n type BetaManagedAgentsAgentArchivedDeploymentPausedReasonError as BetaManagedAgentsAgentArchivedDeploymentPausedReasonError,\n type BetaManagedAgentsCronSchedule as BetaManagedAgentsCronSchedule,\n type BetaManagedAgentsCronScheduleParams as BetaManagedAgentsCronScheduleParams,\n type BetaManagedAgentsDeployment as BetaManagedAgentsDeployment,\n type BetaManagedAgentsDeploymentInitialEvent as BetaManagedAgentsDeploymentInitialEvent,\n type BetaManagedAgentsDeploymentInitialEventParams as BetaManagedAgentsDeploymentInitialEventParams,\n type BetaManagedAgentsDeploymentPausedReason as BetaManagedAgentsDeploymentPausedReason,\n type BetaManagedAgentsDeploymentPausedReasonError as BetaManagedAgentsDeploymentPausedReasonError,\n type BetaManagedAgentsDeploymentStatus as BetaManagedAgentsDeploymentStatus,\n type BetaManagedAgentsDeploymentSystemMessageEvent as BetaManagedAgentsDeploymentSystemMessageEvent,\n type BetaManagedAgentsDeploymentUserDefineOutcomeEvent as BetaManagedAgentsDeploymentUserDefineOutcomeEvent,\n type BetaManagedAgentsDeploymentUserMessageEvent as BetaManagedAgentsDeploymentUserMessageEvent,\n type BetaManagedAgentsEnvironmentArchivedDeploymentPausedReasonError as BetaManagedAgentsEnvironmentArchivedDeploymentPausedReasonError,\n type BetaManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError as BetaManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError,\n type BetaManagedAgentsErrorDeploymentPausedReason as BetaManagedAgentsErrorDeploymentPausedReason,\n type BetaManagedAgentsFileNotFoundDeploymentPausedReasonError as BetaManagedAgentsFileNotFoundDeploymentPausedReasonError,\n type BetaManagedAgentsFileResourceConfig as BetaManagedAgentsFileResourceConfig,\n type BetaManagedAgentsGitHubRepositoryResourceConfig as BetaManagedAgentsGitHubRepositoryResourceConfig,\n type BetaManagedAgentsManualDeploymentPausedReason as BetaManagedAgentsManualDeploymentPausedReason,\n type BetaManagedAgentsMCPEgressBlockedDeploymentPausedReasonError as BetaManagedAgentsMCPEgressBlockedDeploymentPausedReasonError,\n type BetaManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError as BetaManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError,\n type BetaManagedAgentsMemoryStoreResourceConfig as BetaManagedAgentsMemoryStoreResourceConfig,\n type BetaManagedAgentsOrganizationDisabledDeploymentPausedReasonError as BetaManagedAgentsOrganizationDisabledDeploymentPausedReasonError,\n type BetaManagedAgentsSchedule as BetaManagedAgentsSchedule,\n type BetaManagedAgentsScheduleParams as BetaManagedAgentsScheduleParams,\n type BetaManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError as BetaManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError,\n type BetaManagedAgentsSessionResourceConfig as BetaManagedAgentsSessionResourceConfig,\n type BetaManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError as BetaManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError,\n type BetaManagedAgentsSkillNotFoundDeploymentPausedReasonError as BetaManagedAgentsSkillNotFoundDeploymentPausedReasonError,\n type BetaManagedAgentsUnknownDeploymentPausedReasonError as BetaManagedAgentsUnknownDeploymentPausedReasonError,\n type BetaManagedAgentsVaultArchivedDeploymentPausedReasonError as BetaManagedAgentsVaultArchivedDeploymentPausedReasonError,\n type BetaManagedAgentsVaultNotFoundDeploymentPausedReasonError as BetaManagedAgentsVaultNotFoundDeploymentPausedReasonError,\n type BetaManagedAgentsWorkspaceArchivedDeploymentPausedReasonError as BetaManagedAgentsWorkspaceArchivedDeploymentPausedReasonError,\n type BetaManagedAgentsDeploymentsPageCursor as BetaManagedAgentsDeploymentsPageCursor,\n type DeploymentCreateParams as DeploymentCreateParams,\n type DeploymentRetrieveParams as DeploymentRetrieveParams,\n type DeploymentUpdateParams as DeploymentUpdateParams,\n type DeploymentListParams as DeploymentListParams,\n type DeploymentArchiveParams as DeploymentArchiveParams,\n type DeploymentPauseParams as DeploymentPauseParams,\n type DeploymentRunParams as DeploymentRunParams,\n type DeploymentUnpauseParams as DeploymentUnpauseParams,\n };\n}\n",
|
|
47
47
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { APIResource } from '../../core/resource';\nimport * as BetaAPI from './beta';\nimport { APIPromise } from '../../core/api-promise';\nimport { PageCursor, type PageCursorParams, PagePromise } from '../../core/pagination';\nimport { buildHeaders } from '../../internal/headers';\nimport { RequestOptions } from '../../internal/request-options';\nimport { path } from '../../internal/utils/path';\n\nexport class Dreams extends APIResource {\n /**\n * Create a Dream\n *\n * @example\n * ```ts\n * const betaDream = await client.beta.dreams.create({\n * inputs: [{ memory_store_id: 'x', type: 'memory_store' }],\n * model: 'string',\n * });\n * ```\n */\n create(params: DreamCreateParams, options?: RequestOptions): APIPromise<BetaDream> {\n const { betas, ...body } = params;\n return this._client.post('/v1/dreams?beta=true', {\n body,\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'dreaming-2026-04-21'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Get a Dream\n *\n * @example\n * ```ts\n * const betaDream = await client.beta.dreams.retrieve(\n * 'dream_id',\n * );\n * ```\n */\n retrieve(\n dreamID: string,\n params: DreamRetrieveParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaDream> {\n const { betas } = params ?? {};\n return this._client.get(path`/v1/dreams/${dreamID}?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'dreaming-2026-04-21'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * List Dreams\n *\n * @example\n * ```ts\n * // Automatically fetches more pages as needed.\n * for await (const betaDream of client.beta.dreams.list()) {\n * // ...\n * }\n * ```\n */\n list(\n params: DreamListParams | null | undefined = {},\n options?: RequestOptions,\n ): PagePromise<BetaDreamsPageCursor, BetaDream> {\n const { betas, ...query } = params ?? {};\n return this._client.getAPIList('/v1/dreams?beta=true', PageCursor<BetaDream>, {\n query,\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'dreaming-2026-04-21'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Archive a Dream\n *\n * @example\n * ```ts\n * const betaDream = await client.beta.dreams.archive(\n * 'dream_id',\n * );\n * ```\n */\n archive(\n dreamID: string,\n params: DreamArchiveParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaDream> {\n const { betas } = params ?? {};\n return this._client.post(path`/v1/dreams/${dreamID}/archive?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'dreaming-2026-04-21'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Cancel a Dream\n *\n * @example\n * ```ts\n * const betaDream = await client.beta.dreams.cancel(\n * 'dream_id',\n * );\n * ```\n */\n cancel(\n dreamID: string,\n params: DreamCancelParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaDream> {\n const { betas } = params ?? {};\n return this._client.post(path`/v1/dreams/${dreamID}/cancel?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'dreaming-2026-04-21'].toString() },\n options?.headers,\n ]),\n });\n }\n}\n\nexport type BetaDreamsPageCursor = PageCursor<BetaDream>;\n\n/**\n * An asynchronous memory-consolidation job that reads a memory store plus a set of\n * session transcripts and writes consolidated memories into an output memory store\n * — a new store by default, or an existing store chosen via output_behavior. The\n * Dreams API is in research preview: the request and response shapes are volatile\n * and may change without the deprecation period that applies to\n * generally-available endpoints.\n */\nexport interface BetaDream {\n id: string;\n\n /**\n * A timestamp in RFC 3339 format\n */\n archived_at: string | null;\n\n /**\n * A timestamp in RFC 3339 format\n */\n created_at: string;\n\n /**\n * A timestamp in RFC 3339 format\n */\n ended_at: string | null;\n\n /**\n * Failure detail for a Dream whose `status` is `failed`.\n */\n error: BetaDreamError | null;\n\n inputs: Array<BetaDreamInput>;\n\n instructions: string | null;\n\n /**\n * Model identifier and configuration applied to every pipeline stage. Same wire\n * shape as the Agents API ModelConfig.\n */\n model: BetaDreamModelConfig;\n\n /**\n * The default destination: the job creates a new output memory store as a clone of\n * the memory_store input and writes the consolidated memories into it. The input\n * store is never mutated.\n */\n output_behavior: BetaOutputBehavior;\n\n outputs: Array<BetaDreamOutput>;\n\n session_id: string | null;\n\n /**\n * Lifecycle status of a Dream.\n */\n status: BetaDreamStatus;\n\n type: 'dream';\n\n /**\n * Cumulative token usage for the dream across every pipeline stage.\n */\n usage: BetaDreamUsage;\n}\n\n/**\n * Failure detail for a Dream whose `status` is `failed`.\n */\nexport interface BetaDreamError {\n message: string;\n\n type: string;\n}\n\n/**\n * An input memory store the dream reads from. The dream never mutates this store\n * unless it is also the destination: with output_behavior {type:\n * \"update_existing\"} the job consolidates this store in place.\n */\nexport type BetaDreamInput = BetaDreamMemoryStoreInput | BetaDreamSessionsInput;\n\n/**\n * An input memory store the dream reads from. The dream never mutates this store\n * unless it is also the destination: with output_behavior {type:\n * \"update_existing\"} the job consolidates this store in place.\n */\nexport interface BetaDreamMemoryStoreInput {\n memory_store_id: string;\n\n type: 'memory_store';\n}\n\n/**\n * An output memory store the dream writes consolidated memories into.\n */\nexport interface BetaDreamMemoryStoreOutput {\n memory_store_id: string;\n\n type: 'memory_store';\n}\n\n/**\n * Model identifier and configuration applied to every pipeline stage. Same wire\n * shape as the Agents API ModelConfig.\n */\nexport interface BetaDreamModelConfig {\n /**\n * Model identifier, e.g. \"puku-opus-5\". 1-256 characters.\n */\n id: string;\n\n /**\n * Inference speed mode. `fast` provides significantly faster output token\n * generation at premium pricing. Not all models support `fast`; invalid\n * combinations are rejected at create time.\n */\n speed?: 'standard' | 'fast';\n}\n\n/**\n * Model identifier and configuration applied to every pipeline stage.\n */\nexport interface BetaDreamModelConfigParam {\n /**\n * Model identifier, e.g. \"puku-opus-5\". 1-256 characters.\n */\n id: string;\n\n /**\n * Inference speed mode. `fast` provides significantly faster output token\n * generation at premium pricing. Not all models support `fast`; invalid\n * combinations are rejected at create time.\n */\n speed?: 'standard' | 'fast' | null;\n}\n\n/**\n * An output memory store the dream writes consolidated memories into.\n */\nexport interface BetaDreamOutput {\n memory_store_id: string;\n\n type: 'memory_store';\n}\n\n/**\n * Input session transcripts the dream reads.\n */\nexport interface BetaDreamSessionsInput {\n session_ids: Array<string>;\n\n type: 'sessions';\n}\n\n/**\n * Lifecycle status of a Dream.\n */\nexport type BetaDreamStatus = 'pending' | 'running' | 'completed' | 'failed' | 'canceled';\n\n/**\n * Cumulative token usage for the dream across every pipeline stage.\n */\nexport interface BetaDreamUsage {\n /**\n * Total tokens used to create prompt-cache entries (sum of all TTL tiers).\n */\n cache_creation_input_tokens: number;\n\n /**\n * Total tokens read from prompt cache.\n */\n cache_read_input_tokens: number;\n\n /**\n * Total uncached input tokens consumed across every pipeline stage.\n */\n input_tokens: number;\n\n /**\n * Total output tokens generated across every pipeline stage.\n */\n output_tokens: number;\n}\n\n/**\n * The `output_behavior.memory_store_id` target is still held by a prior\n * `{type: \"update_existing\"}` dream — one that is `pending` or `running`, or was\n * canceled with its final writes still landing. Rarely the named dream has just\n * finished (`completed`/`failed`) and its execution is still closing; an immediate\n * retry then almost always succeeds. The message names the holding dream when the\n * server can identify it (rarely omitted); poll it to a terminal state or cancel\n * it, then retry. Carried with `x-should-retry: false`.\n */\nexport type BetaDreamingError =\n | BetaAPI.BetaInvalidRequestError\n | BetaAPI.BetaAuthenticationError\n | BetaAPI.BetaBillingError\n | BetaAPI.BetaPermissionError\n | BetaAPI.BetaNotFoundError\n | BetaAPI.BetaRateLimitError\n | BetaAPI.BetaGatewayTimeoutError\n | BetaAPI.BetaAPIError\n | BetaAPI.BetaOverloadedError\n | BetaTargetStoreHeldError;\n\n/**\n * The default destination: the job creates a new output memory store as a clone of\n * the memory_store input and writes the consolidated memories into it. The input\n * store is never mutated.\n */\nexport type BetaOutputBehavior = BetaOutputBehaviorCreateNew | BetaOutputBehaviorUpdateExisting;\n\n/**\n * The default destination: the job creates a new output memory store as a clone of\n * the memory_store input and writes the consolidated memories into it. The input\n * store is never mutated.\n */\nexport interface BetaOutputBehaviorCreateNew {\n type: 'create_new';\n}\n\n/**\n * The job writes the consolidated memories into this existing memory store instead\n * of creating one. In EAP the store must be the job's own memory_store input, so\n * the job consolidates the store in place.\n */\nexport interface BetaOutputBehaviorUpdateExisting {\n memory_store_id: string;\n\n type: 'update_existing';\n}\n\n/**\n * The `output_behavior.memory_store_id` target is still held by a prior\n * `{type: \"update_existing\"}` dream — one that is `pending` or `running`, or was\n * canceled with its final writes still landing. Rarely the named dream has just\n * finished (`completed`/`failed`) and its execution is still closing; an immediate\n * retry then almost always succeeds. The message names the holding dream when the\n * server can identify it (rarely omitted); poll it to a terminal state or cancel\n * it, then retry. Carried with `x-should-retry: false`.\n */\nexport interface BetaTargetStoreHeldError {\n type: 'conflict_error';\n\n /**\n * Human-readable description of the conflict, naming the dream that holds the\n * target store when the server can identify it.\n */\n message?: string;\n}\n\nexport interface DreamCreateParams {\n /**\n * Body param\n */\n inputs: Array<BetaDreamInput>;\n\n /**\n * Body param: Model identifier and configuration applied to every pipeline stage.\n */\n model: string | BetaDreamModelConfigParam;\n\n /**\n * Body param\n */\n instructions?: string | null;\n\n /**\n * Body param: The default destination: the job creates a new output memory store\n * as a clone of the memory_store input and writes the consolidated memories into\n * it. The input store is never mutated.\n */\n output_behavior?: BetaOutputBehavior;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface DreamRetrieveParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface DreamListParams extends PageCursorParams {\n /**\n * Query param: Return dreams with `created_at` strictly after this timestamp\n * (exclusive lower bound, RFC 3339). Unset applies no lower bound.\n */\n 'created_at[gt]'?: string;\n\n /**\n * Query param: Return dreams with `created_at` strictly before this timestamp\n * (exclusive upper bound, RFC 3339). Unset applies no upper bound.\n */\n 'created_at[lt]'?: string;\n\n /**\n * Query param: Query parameter for include_archived\n */\n include_archived?: boolean;\n\n /**\n * Query param: Filter by lifecycle status. Repeat the parameter to match any of\n * multiple statuses. Empty applies no status filter.\n */\n statuses?: Array<BetaDreamStatus>;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface DreamArchiveParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface DreamCancelParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport declare namespace Dreams {\n export {\n type BetaDream as BetaDream,\n type BetaDreamError as BetaDreamError,\n type BetaDreamInput as BetaDreamInput,\n type BetaDreamMemoryStoreInput as BetaDreamMemoryStoreInput,\n type BetaDreamMemoryStoreOutput as BetaDreamMemoryStoreOutput,\n type BetaDreamModelConfig as BetaDreamModelConfig,\n type BetaDreamModelConfigParam as BetaDreamModelConfigParam,\n type BetaDreamOutput as BetaDreamOutput,\n type BetaDreamSessionsInput as BetaDreamSessionsInput,\n type BetaDreamStatus as BetaDreamStatus,\n type BetaDreamUsage as BetaDreamUsage,\n type BetaDreamingError as BetaDreamingError,\n type BetaOutputBehavior as BetaOutputBehavior,\n type BetaOutputBehaviorCreateNew as BetaOutputBehaviorCreateNew,\n type BetaOutputBehaviorUpdateExisting as BetaOutputBehaviorUpdateExisting,\n type BetaTargetStoreHeldError as BetaTargetStoreHeldError,\n type BetaDreamsPageCursor as BetaDreamsPageCursor,\n type DreamCreateParams as DreamCreateParams,\n type DreamRetrieveParams as DreamRetrieveParams,\n type DreamListParams as DreamListParams,\n type DreamArchiveParams as DreamArchiveParams,\n type DreamCancelParams as DreamCancelParams,\n };\n}\n",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { APIResource } from '../../core/resource';\nimport { Webhook } from 'standardwebhooks';\n\nexport class Webhooks extends APIResource {\n /**\n * Parses a webhook payload into an event without verifying its signature. Prefer\n * `unwrap()` unless you have already verified the signature yourself.\n */\n parseUnverified(body: string): BetaWebhookEvent {\n return JSON.parse(body) as BetaWebhookEvent;\n }\n\n /**\n * Verifies the webhook signature from the `webhook-id`, `webhook-timestamp` and\n * `webhook-signature` headers using your webhook signing key, then parses the\n * payload into an event. Fails if the signature is missing or invalid.\n */\n unwrap(body: string, options: { headers: Record<string, string>; key?: string }): BetaWebhookEvent {\n const headers = options?.headers;\n if (headers == null) throw new Error('Webhook headers are required in order to verify the signature');\n const keyStr: string | null = options.key === undefined ? this._client.webhookKey : options.key;\n if (!keyStr) throw new Error('Webhook key must not be null or empty in order to unwrap');\n const wh = new Webhook(keyStr);\n wh.verify(body, headers);\n return JSON.parse(body) as BetaWebhookEvent;\n }\n}\n\nexport interface BetaWebhookAgentArchivedEventData {\n /**\n * ID of the agent that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'agent.archived';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookAgentCreatedEventData {\n /**\n * ID of the agent that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'agent.created';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookAgentDeletedEventData {\n /**\n * ID of the agent that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'agent.deleted';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookAgentUpdatedEventData {\n /**\n * ID of the agent that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'agent.updated';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookDeploymentArchivedEventData {\n /**\n * ID of the deployment that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'deployment.archived';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookDeploymentCreatedEventData {\n /**\n * ID of the deployment that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'deployment.created';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookDeploymentDeletedEventData {\n /**\n * ID of the deployment that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'deployment.deleted';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookDeploymentPausedEventData {\n /**\n * ID of the deployment that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'deployment.paused';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookDeploymentRunFailedEventData {\n /**\n * ID of the deployment run that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'deployment_run.failed';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookDeploymentRunStartedEventData {\n /**\n * ID of the deployment run that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'deployment_run.started';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookDeploymentRunSucceededEventData {\n /**\n * ID of the deployment run that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'deployment_run.succeeded';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookDeploymentUnpausedEventData {\n /**\n * ID of the deployment that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'deployment.unpaused';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookDeploymentUpdatedEventData {\n /**\n * ID of the deployment that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'deployment.updated';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookEnvironmentArchivedEventData {\n /**\n * ID of the environment that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'environment.archived';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookEnvironmentCreatedEventData {\n /**\n * ID of the environment that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'environment.created';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookEnvironmentDeletedEventData {\n /**\n * ID of the environment that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'environment.deleted';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookEnvironmentUpdatedEventData {\n /**\n * ID of the environment that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'environment.updated';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookEvent {\n /**\n * Unique event identifier for idempotency.\n */\n id: string;\n\n /**\n * RFC 3339 timestamp when the event occurred.\n */\n created_at: string;\n\n data: BetaWebhookEventData;\n\n /**\n * Object type. Always `event` for webhook payloads.\n */\n type: 'event';\n}\n\nexport type BetaWebhookEventData =\n | BetaWebhookSessionCreatedEventData\n | BetaWebhookSessionPendingEventData\n | BetaWebhookSessionRunningEventData\n | BetaWebhookSessionIdledEventData\n | BetaWebhookSessionRequiresActionEventData\n | BetaWebhookSessionArchivedEventData\n | BetaWebhookSessionDeletedEventData\n | BetaWebhookSessionStatusRescheduledEventData\n | BetaWebhookSessionStatusRunStartedEventData\n | BetaWebhookSessionStatusIdledEventData\n | BetaWebhookSessionStatusTerminatedEventData\n | BetaWebhookSessionThreadCreatedEventData\n | BetaWebhookSessionThreadIdledEventData\n | BetaWebhookSessionThreadTerminatedEventData\n | BetaWebhookSessionOutcomeEvaluationEndedEventData\n | BetaWebhookVaultCreatedEventData\n | BetaWebhookVaultArchivedEventData\n | BetaWebhookVaultDeletedEventData\n | BetaWebhookVaultCredentialCreatedEventData\n | BetaWebhookVaultCredentialArchivedEventData\n | BetaWebhookVaultCredentialDeletedEventData\n | BetaWebhookVaultCredentialRefreshFailedEventData\n | BetaWebhookSessionUpdatedEventData\n | BetaWebhookAgentCreatedEventData\n | BetaWebhookAgentArchivedEventData\n | BetaWebhookAgentDeletedEventData\n | BetaWebhookDeploymentPausedEventData\n | BetaWebhookDeploymentRunFailedEventData\n | BetaWebhookDeploymentCreatedEventData\n | BetaWebhookDeploymentUpdatedEventData\n | BetaWebhookDeploymentUnpausedEventData\n | BetaWebhookAgentUpdatedEventData\n | BetaWebhookDeploymentArchivedEventData\n | BetaWebhookDeploymentRunStartedEventData\n | BetaWebhookDeploymentDeletedEventData\n | BetaWebhookDeploymentRunSucceededEventData\n | BetaWebhookEnvironmentCreatedEventData\n | BetaWebhookEnvironmentUpdatedEventData\n | BetaWebhookEnvironmentArchivedEventData\n | BetaWebhookEnvironmentDeletedEventData\n | BetaWebhookMemoryStoreCreatedEventData\n | BetaWebhookMemoryStoreArchivedEventData\n | BetaWebhookMemoryStoreDeletedEventData\n | BetaWebhookSessionBudgetReachedEventData;\n\nexport interface BetaWebhookMemoryStoreArchivedEventData {\n /**\n * ID of the memory store that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'memory_store.archived';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookMemoryStoreCreatedEventData {\n /**\n * ID of the memory store that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'memory_store.created';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookMemoryStoreDeletedEventData {\n /**\n * ID of the memory store that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'memory_store.deleted';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookSessionArchivedEventData {\n /**\n * ID of the session that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'session.archived';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookSessionBudgetReachedEventData {\n /**\n * ID of the session that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'session.budget_reached';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookSessionCreatedEventData {\n /**\n * ID of the session that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'session.created';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookSessionDeletedEventData {\n /**\n * ID of the session that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'session.deleted';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookSessionIdledEventData {\n /**\n * ID of the session that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'session.idled';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookSessionOutcomeEvaluationEndedEventData {\n /**\n * ID of the session that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'session.outcome_evaluation_ended';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookSessionPendingEventData {\n /**\n * ID of the session that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'session.pending';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookSessionRequiresActionEventData {\n /**\n * ID of the session that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'session.requires_action';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookSessionRunningEventData {\n /**\n * ID of the session that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'session.running';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookSessionStatusIdledEventData {\n /**\n * ID of the session that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'session.status_idled';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookSessionStatusRescheduledEventData {\n /**\n * ID of the session that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'session.status_rescheduled';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookSessionStatusRunStartedEventData {\n /**\n * ID of the session that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'session.status_run_started';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookSessionStatusTerminatedEventData {\n /**\n * ID of the session that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'session.status_terminated';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookSessionThreadCreatedEventData {\n /**\n * ID of the session that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n /**\n * ID of the session thread this event refers to.\n */\n session_thread_id: string;\n\n type: 'session.thread_created';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookSessionThreadIdledEventData {\n /**\n * ID of the session that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n /**\n * ID of the session thread this event refers to.\n */\n session_thread_id: string;\n\n type: 'session.thread_idled';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookSessionThreadTerminatedEventData {\n /**\n * ID of the session that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n /**\n * ID of the session thread this event refers to.\n */\n session_thread_id: string;\n\n type: 'session.thread_terminated';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookSessionUpdatedEventData {\n /**\n * ID of the session that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'session.updated';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookVaultArchivedEventData {\n /**\n * ID of the vault that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'vault.archived';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookVaultCreatedEventData {\n /**\n * ID of the vault that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'vault.created';\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookVaultCredentialArchivedEventData {\n /**\n * ID of the vault credential that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'vault_credential.archived';\n\n /**\n * ID of the vault that owns this credential.\n */\n vault_id: string;\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookVaultCredentialCreatedEventData {\n /**\n * ID of the vault credential that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'vault_credential.created';\n\n /**\n * ID of the vault that owns this credential.\n */\n vault_id: string;\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookVaultCredentialDeletedEventData {\n /**\n * ID of the vault credential that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'vault_credential.deleted';\n\n /**\n * ID of the vault that owns this credential.\n */\n vault_id: string;\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookVaultCredentialRefreshFailedEventData {\n /**\n * ID of the vault credential that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'vault_credential.refresh_failed';\n\n /**\n * ID of the vault that owns this credential.\n */\n vault_id: string;\n\n workspace_id: string;\n}\n\nexport interface BetaWebhookVaultDeletedEventData {\n /**\n * ID of the vault that triggered the event.\n */\n id: string;\n\n organization_id: string;\n\n type: 'vault.deleted';\n\n workspace_id: string;\n}\n\n/**\n * @deprecated UnwrapWebhookEvent has been renamed to BetaWebhookEvent\n */\nexport type UnwrapWebhookEvent = BetaWebhookEvent;\n\nexport declare namespace Webhooks {\n export {\n type BetaWebhookAgentArchivedEventData as BetaWebhookAgentArchivedEventData,\n type BetaWebhookAgentCreatedEventData as BetaWebhookAgentCreatedEventData,\n type BetaWebhookAgentDeletedEventData as BetaWebhookAgentDeletedEventData,\n type BetaWebhookAgentUpdatedEventData as BetaWebhookAgentUpdatedEventData,\n type BetaWebhookDeploymentArchivedEventData as BetaWebhookDeploymentArchivedEventData,\n type BetaWebhookDeploymentCreatedEventData as BetaWebhookDeploymentCreatedEventData,\n type BetaWebhookDeploymentDeletedEventData as BetaWebhookDeploymentDeletedEventData,\n type BetaWebhookDeploymentPausedEventData as BetaWebhookDeploymentPausedEventData,\n type BetaWebhookDeploymentRunFailedEventData as BetaWebhookDeploymentRunFailedEventData,\n type BetaWebhookDeploymentRunStartedEventData as BetaWebhookDeploymentRunStartedEventData,\n type BetaWebhookDeploymentRunSucceededEventData as BetaWebhookDeploymentRunSucceededEventData,\n type BetaWebhookDeploymentUnpausedEventData as BetaWebhookDeploymentUnpausedEventData,\n type BetaWebhookDeploymentUpdatedEventData as BetaWebhookDeploymentUpdatedEventData,\n type BetaWebhookEnvironmentArchivedEventData as BetaWebhookEnvironmentArchivedEventData,\n type BetaWebhookEnvironmentCreatedEventData as BetaWebhookEnvironmentCreatedEventData,\n type BetaWebhookEnvironmentDeletedEventData as BetaWebhookEnvironmentDeletedEventData,\n type BetaWebhookEnvironmentUpdatedEventData as BetaWebhookEnvironmentUpdatedEventData,\n type BetaWebhookEvent as BetaWebhookEvent,\n type BetaWebhookEventData as BetaWebhookEventData,\n type BetaWebhookMemoryStoreArchivedEventData as BetaWebhookMemoryStoreArchivedEventData,\n type BetaWebhookMemoryStoreCreatedEventData as BetaWebhookMemoryStoreCreatedEventData,\n type BetaWebhookMemoryStoreDeletedEventData as BetaWebhookMemoryStoreDeletedEventData,\n type BetaWebhookSessionArchivedEventData as BetaWebhookSessionArchivedEventData,\n type BetaWebhookSessionBudgetReachedEventData as BetaWebhookSessionBudgetReachedEventData,\n type BetaWebhookSessionCreatedEventData as BetaWebhookSessionCreatedEventData,\n type BetaWebhookSessionDeletedEventData as BetaWebhookSessionDeletedEventData,\n type BetaWebhookSessionIdledEventData as BetaWebhookSessionIdledEventData,\n type BetaWebhookSessionOutcomeEvaluationEndedEventData as BetaWebhookSessionOutcomeEvaluationEndedEventData,\n type BetaWebhookSessionPendingEventData as BetaWebhookSessionPendingEventData,\n type BetaWebhookSessionRequiresActionEventData as BetaWebhookSessionRequiresActionEventData,\n type BetaWebhookSessionRunningEventData as BetaWebhookSessionRunningEventData,\n type BetaWebhookSessionStatusIdledEventData as BetaWebhookSessionStatusIdledEventData,\n type BetaWebhookSessionStatusRescheduledEventData as BetaWebhookSessionStatusRescheduledEventData,\n type BetaWebhookSessionStatusRunStartedEventData as BetaWebhookSessionStatusRunStartedEventData,\n type BetaWebhookSessionStatusTerminatedEventData as BetaWebhookSessionStatusTerminatedEventData,\n type BetaWebhookSessionThreadCreatedEventData as BetaWebhookSessionThreadCreatedEventData,\n type BetaWebhookSessionThreadIdledEventData as BetaWebhookSessionThreadIdledEventData,\n type BetaWebhookSessionThreadTerminatedEventData as BetaWebhookSessionThreadTerminatedEventData,\n type BetaWebhookSessionUpdatedEventData as BetaWebhookSessionUpdatedEventData,\n type BetaWebhookVaultArchivedEventData as BetaWebhookVaultArchivedEventData,\n type BetaWebhookVaultCreatedEventData as BetaWebhookVaultCreatedEventData,\n type BetaWebhookVaultCredentialArchivedEventData as BetaWebhookVaultCredentialArchivedEventData,\n type BetaWebhookVaultCredentialCreatedEventData as BetaWebhookVaultCredentialCreatedEventData,\n type BetaWebhookVaultCredentialDeletedEventData as BetaWebhookVaultCredentialDeletedEventData,\n type BetaWebhookVaultCredentialRefreshFailedEventData as BetaWebhookVaultCredentialRefreshFailedEventData,\n type BetaWebhookVaultDeletedEventData as BetaWebhookVaultDeletedEventData,\n type UnwrapWebhookEvent as UnwrapWebhookEvent,\n };\n}\n",
|
|
57
57
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { APIResource } from '../../../core/resource';\nimport * as BetaAPI from '../beta';\nimport * as AgentsAPI from './agents';\nimport { BetaManagedAgentsAgentsPageCursor } from './agents';\nimport { PageCursor, type PageCursorParams, PagePromise } from '../../../core/pagination';\nimport { buildHeaders } from '../../../internal/headers';\nimport { RequestOptions } from '../../../internal/request-options';\nimport { path } from '../../../internal/utils/path';\n\nexport class Versions extends APIResource {\n /**\n * List Agent Versions\n *\n * @example\n * ```ts\n * // Automatically fetches more pages as needed.\n * for await (const betaManagedAgentsAgent of client.beta.agents.versions.list(\n * 'agent_011CZkYpogX7uDKUyvBTophP',\n * )) {\n * // ...\n * }\n * ```\n */\n list(\n agentID: string,\n params: VersionListParams | null | undefined = {},\n options?: RequestOptions,\n ): PagePromise<BetaManagedAgentsAgentsPageCursor, AgentsAPI.BetaManagedAgentsAgent> {\n const { betas, ...query } = params ?? {};\n return this._client.getAPIList(\n path`/v1/agents/${agentID}/versions?beta=true`,\n PageCursor<AgentsAPI.BetaManagedAgentsAgent>,\n {\n query,\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },\n options?.headers,\n ]),\n },\n );\n }\n}\n\nexport interface VersionListParams extends PageCursorParams {\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport declare namespace Versions {\n export { type VersionListParams as VersionListParams };\n}\n\nexport { type BetaManagedAgentsAgentsPageCursor };\n",
|
|
58
58
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { APIResource } from '../../../core/resource';\nimport * as BetaAPI from '../beta';\nimport * as VersionsAPI from './versions';\nimport { VersionListParams, Versions } from './versions';\nimport * as SessionsAPI from '../sessions/sessions';\nimport { APIPromise } from '../../../core/api-promise';\nimport { PageCursor, type PageCursorParams, PagePromise } from '../../../core/pagination';\nimport { buildHeaders } from '../../../internal/headers';\nimport { RequestOptions } from '../../../internal/request-options';\nimport { path } from '../../../internal/utils/path';\n\nexport class Agents extends APIResource {\n versions: VersionsAPI.Versions = new VersionsAPI.Versions(this._client);\n\n /**\n * Create Agent\n *\n * @example\n * ```ts\n * const betaManagedAgentsAgent =\n * await client.beta.agents.create({\n * model: 'puku-opus-5',\n * name: 'My First Agent',\n * });\n * ```\n */\n create(params: AgentCreateParams, options?: RequestOptions): APIPromise<BetaManagedAgentsAgent> {\n const { betas, ...body } = params;\n return this._client.post('/v1/agents?beta=true', {\n body,\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Get Agent\n *\n * @example\n * ```ts\n * const betaManagedAgentsAgent =\n * await client.beta.agents.retrieve(\n * 'agent_011CZkYpogX7uDKUyvBTophP',\n * );\n * ```\n */\n retrieve(\n agentID: string,\n params: AgentRetrieveParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaManagedAgentsAgent> {\n const { betas, ...query } = params ?? {};\n return this._client.get(path`/v1/agents/${agentID}?beta=true`, {\n query,\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Update Agent\n *\n * @example\n * ```ts\n * const betaManagedAgentsAgent =\n * await client.beta.agents.update(\n * 'agent_011CZkYpogX7uDKUyvBTophP',\n * { description: 'updated' },\n * );\n * ```\n */\n update(\n agentID: string,\n params: AgentUpdateParams,\n options?: RequestOptions,\n ): APIPromise<BetaManagedAgentsAgent> {\n const { betas, ...body } = params;\n return this._client.post(path`/v1/agents/${agentID}?beta=true`, {\n body,\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * List Agents\n *\n * @example\n * ```ts\n * // Automatically fetches more pages as needed.\n * for await (const betaManagedAgentsAgent of client.beta.agents.list()) {\n * // ...\n * }\n * ```\n */\n list(\n params: AgentListParams | null | undefined = {},\n options?: RequestOptions,\n ): PagePromise<BetaManagedAgentsAgentsPageCursor, BetaManagedAgentsAgent> {\n const { betas, ...query } = params ?? {};\n return this._client.getAPIList('/v1/agents?beta=true', PageCursor<BetaManagedAgentsAgent>, {\n query,\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Archive Agent\n *\n * @example\n * ```ts\n * const betaManagedAgentsAgent =\n * await client.beta.agents.archive(\n * 'agent_011CZkYpogX7uDKUyvBTophP',\n * );\n * ```\n */\n archive(\n agentID: string,\n params: AgentArchiveParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaManagedAgentsAgent> {\n const { betas } = params ?? {};\n return this._client.post(path`/v1/agents/${agentID}/archive?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },\n options?.headers,\n ]),\n });\n }\n}\n\nexport type BetaManagedAgentsAgentsPageCursor = PageCursor<BetaManagedAgentsAgent>;\n\n/**\n * Platform advisor roster entry: a model the session's primary thread may consult\n * mid-turn.\n */\nexport interface BetaManagedAgentsAdvisor {\n /**\n * The advisor model id.\n */\n model: string;\n\n type: 'advisor';\n}\n\n/**\n * A Managed Agents `agent`.\n */\nexport interface BetaManagedAgentsAgent {\n id: string;\n\n /**\n * A timestamp in RFC 3339 format\n */\n archived_at: string | null;\n\n /**\n * A timestamp in RFC 3339 format\n */\n created_at: string;\n\n description: string | null;\n\n mcp_servers: Array<BetaManagedAgentsMCPServerURLDefinition>;\n\n metadata: { [key: string]: string };\n\n /**\n * Model identifier and configuration.\n */\n model: BetaManagedAgentsModelConfig;\n\n /**\n * Resolved coordinator topology with a concrete agent roster.\n */\n multiagent: SessionsAPI.BetaManagedAgentsMultiagent | null;\n\n name: string;\n\n skills: Array<BetaManagedAgentsPukuSkill | BetaManagedAgentsCustomSkill>;\n\n system: string | null;\n\n tools: Array<\n BetaManagedAgentsAgentToolset20260401 | BetaManagedAgentsMCPToolset | BetaManagedAgentsCustomTool\n >;\n\n type: 'agent';\n\n /**\n * A timestamp in RFC 3339 format\n */\n updated_at: string;\n\n /**\n * The agent's current version. Starts at 1 and increments when the agent is\n * modified.\n */\n version: number;\n}\n\n/**\n * A resolved agent reference with a concrete version.\n */\nexport interface BetaManagedAgentsAgentReference {\n id: string;\n\n type: 'agent';\n\n version: number;\n}\n\n/**\n * Configuration for a specific agent tool.\n */\nexport type BetaManagedAgentsAgentToolConfig =\n | BetaManagedAgentsBashToolConfig\n | BetaManagedAgentsEditToolConfig\n | BetaManagedAgentsReadToolConfig\n | BetaManagedAgentsWriteToolConfig\n | BetaManagedAgentsGlobToolConfig\n | BetaManagedAgentsGrepToolConfig\n | BetaManagedAgentsWebFetchToolConfig\n | BetaManagedAgentsWebSearchToolConfig;\n\n/**\n * Configuration override for a specific tool within a toolset.\n */\nexport type BetaManagedAgentsAgentToolConfigParams =\n | BetaManagedAgentsBashToolConfigParams\n | BetaManagedAgentsEditToolConfigParams\n | BetaManagedAgentsReadToolConfigParams\n | BetaManagedAgentsWriteToolConfigParams\n | BetaManagedAgentsGlobToolConfigParams\n | BetaManagedAgentsGrepToolConfigParams\n | BetaManagedAgentsWebFetchToolConfigParams\n | BetaManagedAgentsWebSearchToolConfigParams;\n\n/**\n * Resolved default configuration for agent tools.\n */\nexport interface BetaManagedAgentsAgentToolsetDefaultConfig {\n enabled: boolean;\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;\n}\n\n/**\n * Default configuration for all tools in a toolset.\n */\nexport interface BetaManagedAgentsAgentToolsetDefaultConfigParams {\n /**\n * Whether tools are enabled and available to Puku by default. Defaults to true\n * if not specified.\n */\n enabled?: boolean | null;\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;\n}\n\nexport interface BetaManagedAgentsAgentToolset20260401 {\n configs: Array<BetaManagedAgentsAgentToolConfig>;\n\n /**\n * Resolved default configuration for agent tools.\n */\n default_config: BetaManagedAgentsAgentToolsetDefaultConfig;\n\n type: 'agent_toolset_20260401';\n}\n\n/**\n * Input payload for the `bash` tool of the `agent_toolset_20260401` toolset. All\n * fields are optional; a normal invocation supplies `command`, while\n * `restart=true` (with no `command`) reboots the runner-side bash session.\n */\nexport interface BetaManagedAgentsAgentToolset20260401BashInput {\n /**\n * Shell command to execute. Omit only when `restart` is true.\n */\n command?: string;\n\n /**\n * When true, restart the persistent bash session instead of running a command.\n * Subsequent calls without `restart` will run against the fresh session.\n */\n restart?: boolean;\n\n /**\n * Per-call timeout in milliseconds. Defaults to the runner-wide tool timeout when\n * omitted or zero.\n */\n timeout_ms?: number;\n}\n\n/**\n * Input payload for the `edit` tool. Performs a string replacement in the named\n * file; by default `old_string` must occur exactly once.\n */\nexport interface BetaManagedAgentsAgentToolset20260401EditInput {\n /**\n * Path of the file to edit.\n */\n file_path: string;\n\n /**\n * Replacement text.\n */\n new_string: string;\n\n /**\n * Substring to find and replace.\n */\n old_string: string;\n\n /**\n * When true, replace every occurrence of `old_string` instead of requiring a\n * unique match.\n */\n replace_all?: boolean;\n}\n\n/**\n * Input payload for the `glob` tool. Returns paths matching a doublestar glob\n * pattern, newest first.\n */\nexport interface BetaManagedAgentsAgentToolset20260401GlobInput {\n /**\n * Doublestar glob pattern (e.g. `** /*.go`). Absolute patterns are only permitted\n * when the runner is configured to allow them.\n */\n pattern: string;\n\n /**\n * Optional directory root to search under. Defaults to the runner's working\n * directory.\n */\n path?: string;\n}\n\n/**\n * Input payload for the `grep` tool. Searches file contents for a regular\n * expression, returning matching lines.\n */\nexport interface BetaManagedAgentsAgentToolset20260401GrepInput {\n /**\n * Regular expression to search for.\n */\n pattern: string;\n\n /**\n * Optional directory root to search under. Defaults to the runner's working\n * directory.\n */\n path?: string;\n}\n\n/**\n * Configuration for built-in agent tools. Use this to enable or disable groups of\n * tools available to the agent.\n */\nexport interface BetaManagedAgentsAgentToolset20260401Params {\n type: 'agent_toolset_20260401';\n\n /**\n * Per-tool configuration overrides.\n */\n configs?: Array<BetaManagedAgentsAgentToolConfigParams>;\n\n /**\n * Default configuration for all tools in a toolset.\n */\n default_config?: BetaManagedAgentsAgentToolsetDefaultConfigParams | null;\n}\n\n/**\n * Input payload for the `read` tool. Reads file contents relative to the runner's\n * working directory (or absolute when the runner permits).\n */\nexport interface BetaManagedAgentsAgentToolset20260401ReadInput {\n /**\n * Path of the file to read.\n */\n file_path: string;\n\n /**\n * Optional `[start_line, end_line]` 1-indexed inclusive range. When omitted the\n * entire file is returned. `end_line` of 0 or negative means \"to end of file\".\n */\n view_range?: Array<number>;\n}\n\n/**\n * Input payload for the `write` tool. Writes (overwriting) the entire file\n * contents.\n */\nexport interface BetaManagedAgentsAgentToolset20260401WriteInput {\n /**\n * Full file contents to write.\n */\n content: string;\n\n /**\n * Path of the file to write.\n */\n file_path: string;\n}\n\n/**\n * Tool calls are automatically approved without user confirmation.\n */\nexport interface BetaManagedAgentsAlwaysAllowPolicy {\n type: 'always_allow';\n}\n\n/**\n * Tool calls require user confirmation before execution.\n */\nexport interface BetaManagedAgentsAlwaysAskPolicy {\n type: 'always_ask';\n}\n\n/**\n * A resolved PukuAI-managed skill.\n */\nexport interface BetaManagedAgentsPukuSkill {\n skill_id: string;\n\n type: 'puku';\n\n version: string;\n}\n\n/**\n * An PukuAI-managed skill.\n */\nexport interface BetaManagedAgentsPukuSkillParams {\n /**\n * Identifier of the PukuAI skill (e.g., \"xlsx\").\n */\n skill_id: string;\n\n type: 'puku';\n\n /**\n * Version to pin. Defaults to latest if omitted.\n */\n version?: string | null;\n}\n\n/**\n * Configuration for the bash tool.\n */\nexport interface BetaManagedAgentsBashToolConfig {\n enabled: boolean;\n\n name: 'bash';\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;\n\n type: 'bash';\n}\n\n/**\n * Configuration override for the bash tool.\n */\nexport interface BetaManagedAgentsBashToolConfigParams {\n /**\n * Must be \"bash\".\n */\n name: 'bash';\n\n /**\n * Whether this tool is enabled and available to Puku. Overrides the\n * default_config setting.\n */\n enabled?: boolean | null;\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;\n\n type?: 'bash';\n}\n\n/**\n * A resolved user-created custom skill.\n */\nexport interface BetaManagedAgentsCustomSkill {\n skill_id: string;\n\n type: 'custom';\n\n version: string;\n}\n\n/**\n * A user-created custom skill.\n */\nexport interface BetaManagedAgentsCustomSkillParams {\n /**\n * Tagged ID of the custom skill (e.g., \"skill_01XJ5...\").\n */\n skill_id: string;\n\n type: 'custom';\n\n /**\n * Version to pin. Defaults to latest if omitted.\n */\n version?: string | null;\n}\n\n/**\n * A custom tool as returned in API responses.\n */\nexport interface BetaManagedAgentsCustomTool {\n description: string;\n\n /**\n * JSON Schema for custom tool input parameters.\n */\n input_schema: BetaManagedAgentsCustomToolInputSchema;\n\n name: string;\n\n type: 'custom';\n}\n\n/**\n * JSON Schema for custom tool input parameters.\n */\nexport interface BetaManagedAgentsCustomToolInputSchema {\n type: 'object';\n\n properties?: { [key: string]: unknown } | null;\n\n required?: Array<string> | null;\n\n [k: string]: unknown;\n}\n\n/**\n * A custom tool that is executed by the API client rather than the agent. When the\n * agent calls this tool, an `agent.custom_tool_use` event is emitted and the\n * session goes idle, waiting for the client to provide the result via a\n * `user.custom_tool_result` event.\n */\nexport interface BetaManagedAgentsCustomToolParams {\n /**\n * Description of what the tool does, shown to the agent to help it decide when to\n * use the tool.\n */\n description: string;\n\n /**\n * JSON Schema for custom tool input parameters.\n */\n input_schema: BetaManagedAgentsCustomToolInputSchema;\n\n /**\n * Unique name for the tool. 1-128 characters; letters, digits, underscores, and\n * hyphens.\n */\n name: string;\n\n type: 'custom';\n}\n\n/**\n * Configuration for the edit tool.\n */\nexport interface BetaManagedAgentsEditToolConfig {\n enabled: boolean;\n\n name: 'edit';\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;\n\n type: 'edit';\n}\n\n/**\n * Configuration override for the edit tool.\n */\nexport interface BetaManagedAgentsEditToolConfigParams {\n /**\n * Must be \"edit\".\n */\n name: 'edit';\n\n /**\n * Whether this tool is enabled and available to Puku. Overrides the\n * default_config setting.\n */\n enabled?: boolean | null;\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;\n\n type?: 'edit';\n}\n\n/**\n * High effort. Favors reasoning depth.\n */\nexport interface BetaManagedAgentsEffortHigh {\n type: 'high';\n}\n\n/**\n * Low effort. Favors latency over reasoning depth.\n */\nexport interface BetaManagedAgentsEffortLow {\n type: 'low';\n}\n\n/**\n * Maximum effort. Favors reasoning depth over latency.\n */\nexport interface BetaManagedAgentsEffortMax {\n type: 'max';\n}\n\n/**\n * Medium effort. Balances latency and reasoning depth.\n */\nexport interface BetaManagedAgentsEffortMedium {\n type: 'medium';\n}\n\n/**\n * Extra-high effort. Not all models accept this level.\n */\nexport interface BetaManagedAgentsEffortXhigh {\n type: 'xhigh';\n}\n\n/**\n * Configuration for the glob tool.\n */\nexport interface BetaManagedAgentsGlobToolConfig {\n enabled: boolean;\n\n name: 'glob';\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;\n\n type: 'glob';\n}\n\n/**\n * Configuration override for the glob tool.\n */\nexport interface BetaManagedAgentsGlobToolConfigParams {\n /**\n * Must be \"glob\".\n */\n name: 'glob';\n\n /**\n * Whether this tool is enabled and available to Puku. Overrides the\n * default_config setting.\n */\n enabled?: boolean | null;\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;\n\n type?: 'glob';\n}\n\n/**\n * Configuration for the grep tool.\n */\nexport interface BetaManagedAgentsGrepToolConfig {\n enabled: boolean;\n\n name: 'grep';\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;\n\n type: 'grep';\n}\n\n/**\n * Configuration override for the grep tool.\n */\nexport interface BetaManagedAgentsGrepToolConfigParams {\n /**\n * Must be \"grep\".\n */\n name: 'grep';\n\n /**\n * Whether this tool is enabled and available to Puku. Overrides the\n * default_config setting.\n */\n enabled?: boolean | null;\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;\n\n type?: 'grep';\n}\n\n/**\n * URL-based MCP server connection as returned in API responses.\n */\nexport interface BetaManagedAgentsMCPServerURLDefinition {\n name: string;\n\n type: 'url';\n\n url: string;\n}\n\n/**\n * Resolved configuration for a specific MCP tool.\n */\nexport interface BetaManagedAgentsMCPToolConfig {\n enabled: boolean;\n\n name: string;\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;\n}\n\n/**\n * Configuration override for a specific MCP tool.\n */\nexport interface BetaManagedAgentsMCPToolConfigParams {\n /**\n * Name of the MCP tool to configure. 1-128 characters.\n */\n name: string;\n\n /**\n * Whether this tool is enabled. Overrides the `default_config` setting.\n */\n enabled?: boolean | null;\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;\n}\n\nexport interface BetaManagedAgentsMCPToolset {\n configs: Array<BetaManagedAgentsMCPToolConfig>;\n\n /**\n * Resolved default configuration for all tools from an MCP server.\n */\n default_config: BetaManagedAgentsMCPToolsetDefaultConfig;\n\n mcp_server_name: string;\n\n type: 'mcp_toolset';\n}\n\n/**\n * Resolved default configuration for all tools from an MCP server.\n */\nexport interface BetaManagedAgentsMCPToolsetDefaultConfig {\n enabled: boolean;\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;\n}\n\n/**\n * Default configuration for all tools from an MCP server.\n */\nexport interface BetaManagedAgentsMCPToolsetDefaultConfigParams {\n /**\n * Whether tools are enabled by default. Defaults to true if not specified.\n */\n enabled?: boolean | null;\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;\n}\n\n/**\n * Configuration for tools from an MCP server defined in `mcp_servers`.\n */\nexport interface BetaManagedAgentsMCPToolsetParams {\n /**\n * Name of the MCP server. Must match a server name from the mcp_servers array.\n * 1-255 characters.\n */\n mcp_server_name: string;\n\n type: 'mcp_toolset';\n\n /**\n * Per-tool configuration overrides.\n */\n configs?: Array<BetaManagedAgentsMCPToolConfigParams>;\n\n /**\n * Default configuration for all tools from an MCP server.\n */\n default_config?: BetaManagedAgentsMCPToolsetDefaultConfigParams | null;\n}\n\n/**\n * The model that will power your agent.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\nexport type BetaManagedAgentsModel =\n | 'puku-ai-2.7'\n | 'puku-ai-2.8'\n | 'opus-4.8'\n | (string & {});\n\n/**\n * Model identifier and configuration.\n */\nexport interface BetaManagedAgentsModelConfig {\n /**\n * The model that will power your agent.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n id: BetaManagedAgentsModel;\n\n /**\n * How hard Puku works on each turn. Sets `output_config.effort` on every\n * Messages call the session makes.\n */\n effort?:\n | BetaManagedAgentsEffortLow\n | BetaManagedAgentsEffortMedium\n | BetaManagedAgentsEffortHigh\n | BetaManagedAgentsEffortXhigh\n | BetaManagedAgentsEffortMax;\n\n /**\n * Geographic region for model inference. When unset, requests fall through to the\n * workspace's default_inference_geo.\n */\n inference_geo?: string;\n\n /**\n * Inference speed mode. `fast` provides significantly faster output token\n * generation at premium pricing. Not all models support `fast`; invalid\n * combinations are rejected at create time.\n */\n speed?: 'standard' | 'fast';\n}\n\n/**\n * An object that defines additional configuration control over model use\n */\nexport interface BetaManagedAgentsModelConfigParams {\n /**\n * The model that will power your agent.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n id: BetaManagedAgentsModel;\n\n /**\n * How hard Puku works on each inference call. Accepts a bare level string\n * (`\"high\"`) or `{\"type\": \"high\"}`. On create, omitting it resolves the per-model\n * default; on update, omitting it leaves the stored value unchanged.\n */\n effort?:\n | 'low'\n | 'medium'\n | 'high'\n | 'xhigh'\n | 'max'\n | BetaManagedAgentsEffortLow\n | BetaManagedAgentsEffortMedium\n | BetaManagedAgentsEffortHigh\n | BetaManagedAgentsEffortXhigh\n | BetaManagedAgentsEffortMax\n | null;\n\n /**\n * Geographic region for model inference. When unset, requests fall through to the\n * workspace's default_inference_geo. On update, `model` is whole-object\n * replacement — omitting inference_geo clears it.\n */\n inference_geo?: string | null;\n\n /**\n * Inference speed mode. `fast` provides significantly faster output token\n * generation at premium pricing. Not all models support `fast`; invalid\n * combinations are rejected at create time.\n */\n speed?: 'standard' | 'fast' | null;\n}\n\n/**\n * Resolved coordinator topology with a concrete agent roster.\n */\nexport interface BetaManagedAgentsMultiagentCoordinator {\n /**\n * Agents the coordinator may spawn as session threads, each resolved to a specific\n * version.\n */\n agents: Array<BetaManagedAgentsAgentReference | BetaManagedAgentsAdvisor>;\n\n type: 'coordinator';\n}\n\n/**\n * A coordinator topology: the session's primary thread orchestrates work by\n * spawning session threads, each running an agent drawn from the `agents` roster.\n */\nexport interface BetaManagedAgentsMultiagentCoordinatorParams {\n /**\n * Agents the coordinator may spawn as session threads. 1–20 entries. Each entry is\n * an agent ID string, a versioned `{\"type\":\"agent\",\"id\",\"version\"}` reference, or\n * `{\"type\":\"self\"}` to allow recursive self-invocation. Entries must reference\n * distinct agents (after resolving `self` and string forms); at most one `self`.\n * Referenced agents must exist, must not be archived, and must not themselves have\n * `multiagent` set (depth limit 1).\n */\n agents: Array<SessionsAPI.BetaManagedAgentsMultiagentRosterEntryParams>;\n\n type: 'coordinator';\n}\n\n/**\n * Sentinel roster entry meaning \"the agent that owns this configuration\". Resolved\n * server-side to a concrete agent reference.\n */\nexport interface BetaManagedAgentsMultiagentSelfParams {\n type: 'self';\n}\n\n/**\n * Configuration for the read tool.\n */\nexport interface BetaManagedAgentsReadToolConfig {\n enabled: boolean;\n\n name: 'read';\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;\n\n type: 'read';\n}\n\n/**\n * Configuration override for the read tool.\n */\nexport interface BetaManagedAgentsReadToolConfigParams {\n /**\n * Must be \"read\".\n */\n name: 'read';\n\n /**\n * Whether this tool is enabled and available to Puku. Overrides the\n * default_config setting.\n */\n enabled?: boolean | null;\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;\n\n type?: 'read';\n}\n\n/**\n * Resolved `agent` definition for a single `session_thread`. Snapshot of the agent\n * at thread creation time. The multiagent roster is not repeated here; read it\n * from `Session.agent`.\n */\nexport interface BetaManagedAgentsSessionThreadAgent {\n id: string;\n\n description: string | null;\n\n mcp_servers: Array<BetaManagedAgentsMCPServerURLDefinition>;\n\n /**\n * Model identifier and configuration.\n */\n model: BetaManagedAgentsModelConfig;\n\n name: string;\n\n skills: Array<BetaManagedAgentsPukuSkill | BetaManagedAgentsCustomSkill>;\n\n system: string | null;\n\n tools: Array<\n BetaManagedAgentsAgentToolset20260401 | BetaManagedAgentsMCPToolset | BetaManagedAgentsCustomTool\n >;\n\n type: 'agent';\n\n version: number;\n}\n\n/**\n * Skill to load in the session container.\n */\nexport type BetaManagedAgentsSkillParams =\n | BetaManagedAgentsPukuSkillParams\n | BetaManagedAgentsCustomSkillParams;\n\n/**\n * URL-based MCP server connection.\n */\nexport interface BetaManagedAgentsURLMCPServerParams {\n /**\n * Unique name for this server, referenced by mcp_toolset configurations. 1-255\n * characters.\n */\n name: string;\n\n type: 'url';\n\n /**\n * Endpoint URL for the MCP server.\n */\n url: string;\n}\n\n/**\n * Approximate user location for search result localization.\n */\nexport interface BetaManagedAgentsUserLocation {\n /**\n * Location precision. Only \"approximate\" is supported.\n */\n type: 'approximate';\n\n /**\n * City name.\n */\n city?: string | null;\n\n /**\n * Two-letter ISO 3166-1 country code, uppercase.\n */\n country?: string | null;\n\n /**\n * Region or state name.\n */\n region?: string | null;\n\n /**\n * IANA timezone identifier, e.g. \"America/Los_Angeles\".\n */\n timezone?: string | null;\n}\n\n/**\n * Configuration for the web_fetch tool.\n */\nexport interface BetaManagedAgentsWebFetchToolConfig {\n enabled: boolean;\n\n name: 'web_fetch';\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;\n\n type: 'web_fetch';\n\n allowed_domains?: Array<string>;\n\n blocked_domains?: Array<string>;\n\n max_content_tokens?: number | null;\n}\n\n/**\n * Configuration override for the web_fetch tool.\n */\nexport interface BetaManagedAgentsWebFetchToolConfigParams {\n /**\n * Must be \"web_fetch\".\n */\n name: 'web_fetch';\n\n /**\n * Only fetch URLs whose host is one of these domains or a subdomain of one. Each\n * entry is a plain hostname like \"docs.example.com\" (no scheme, port, or path). At\n * most 64 entries; an empty list is rejected (omit the field instead). Cannot be\n * combined with blocked_domains.\n */\n allowed_domains?: Array<string>;\n\n /**\n * Never fetch URLs whose host is one of these domains or a subdomain of one. Each\n * entry is a plain hostname like \"ads.example.com\" (no scheme, port, or path). At\n * most 64 entries; an empty list is rejected (omit the field instead). Cannot be\n * combined with allowed_domains.\n */\n blocked_domains?: Array<string>;\n\n /**\n * Whether this tool is enabled and available to Puku. Overrides the\n * default_config setting.\n */\n enabled?: boolean | null;\n\n /**\n * Maximum number of tokens of fetched text content to include in context per call.\n * Does not apply to binary content such as PDFs.\n */\n max_content_tokens?: number | null;\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;\n\n type?: 'web_fetch';\n}\n\n/**\n * Configuration for the web_search tool.\n */\nexport interface BetaManagedAgentsWebSearchToolConfig {\n enabled: boolean;\n\n name: 'web_search';\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;\n\n type: 'web_search';\n\n allowed_domains?: Array<string>;\n\n blocked_domains?: Array<string>;\n\n /**\n * Approximate user location for search result localization.\n */\n user_location?: BetaManagedAgentsUserLocation | null;\n}\n\n/**\n * Configuration override for the web_search tool.\n */\nexport interface BetaManagedAgentsWebSearchToolConfigParams {\n /**\n * Must be \"web_search\".\n */\n name: 'web_search';\n\n /**\n * Only return search results whose host is one of these domains or a subdomain of\n * one. Each entry is a plain hostname like \"docs.example.com\" (no scheme or port;\n * an optional path suffix is accepted). At most 64 entries; an empty list is\n * rejected (omit the field instead). Cannot be combined with blocked_domains.\n */\n allowed_domains?: Array<string>;\n\n /**\n * Never return search results whose host is one of these domains or a subdomain of\n * one. Each entry is a plain hostname like \"ads.example.com\" (no scheme or port;\n * an optional path suffix is accepted). At most 64 entries; an empty list is\n * rejected (omit the field instead). Cannot be combined with allowed_domains.\n */\n blocked_domains?: Array<string>;\n\n /**\n * Whether this tool is enabled and available to Puku. Overrides the\n * default_config setting.\n */\n enabled?: boolean | null;\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;\n\n type?: 'web_search';\n\n /**\n * Approximate user location for search result localization.\n */\n user_location?: BetaManagedAgentsUserLocation | null;\n}\n\n/**\n * Configuration for the write tool.\n */\nexport interface BetaManagedAgentsWriteToolConfig {\n enabled: boolean;\n\n name: 'write';\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy;\n\n type: 'write';\n}\n\n/**\n * Configuration override for the write tool.\n */\nexport interface BetaManagedAgentsWriteToolConfigParams {\n /**\n * Must be \"write\".\n */\n name: 'write';\n\n /**\n * Whether this tool is enabled and available to Puku. Overrides the\n * default_config setting.\n */\n enabled?: boolean | null;\n\n /**\n * Permission policy for tool execution.\n */\n permission_policy?: BetaManagedAgentsAlwaysAllowPolicy | BetaManagedAgentsAlwaysAskPolicy | null;\n\n type?: 'write';\n}\n\nexport interface AgentCreateParams {\n /**\n * Body param: Model identifier. Accepts the\n * [model string](https://platform.puku.com/docs/en/about-puku/models/overview#latest-models-comparison),\n * e.g. `puku-opus-5`, or a `model_config` object for additional configuration\n * control\n */\n model: BetaManagedAgentsModel | BetaManagedAgentsModelConfigParams;\n\n /**\n * Body param: Human-readable name for the agent.\n */\n name: string;\n\n /**\n * Body param: Description of what the agent does.\n */\n description?: string | null;\n\n /**\n * Body param: MCP servers this agent connects to. Maximum 20. Names must be unique\n * within the array. Every server must be referenced by an `mcp_toolset` in\n * `tools`; unreferenced servers are rejected. See the\n * [MCP connector guide](https://platform.puku.com/docs/en/managed-agents/mcp-connector).\n */\n mcp_servers?: Array<BetaManagedAgentsURLMCPServerParams>;\n\n /**\n * Body param: Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars,\n * values up to 512 chars.\n */\n metadata?: { [key: string]: string };\n\n /**\n * Body param: A coordinator topology: the session's primary thread orchestrates\n * work by spawning session threads, each running an agent drawn from the `agents`\n * roster.\n */\n multiagent?: SessionsAPI.BetaManagedAgentsMultiagentParams | null;\n\n /**\n * Body param: Skills available to the agent.\n */\n skills?: Array<BetaManagedAgentsSkillParams>;\n\n /**\n * Body param: System prompt for the agent.\n */\n system?: string | null;\n\n /**\n * Body param: Tool configurations available to the agent. Maximum of 128 tools\n * across all toolsets allowed.\n */\n tools?: Array<\n | BetaManagedAgentsAgentToolset20260401Params\n | BetaManagedAgentsMCPToolsetParams\n | BetaManagedAgentsCustomToolParams\n >;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface AgentRetrieveParams {\n /**\n * Query param: Agent version. Omit for the most recent version. Must be at least 1\n * if specified.\n */\n version?: number;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface AgentUpdateParams {\n /**\n * Body param: Description. Omit to preserve; send empty string or null to clear.\n */\n description?: string | null;\n\n /**\n * Body param: MCP servers. Full replacement. Omit to preserve; send empty array or\n * `null` to clear. Names must be unique. Maximum 20. Every server must be\n * referenced by an `mcp_toolset` in the agent's resulting `tools`; unreferenced\n * servers are rejected. See the\n * [MCP connector guide](https://platform.puku.com/docs/en/managed-agents/mcp-connector).\n */\n mcp_servers?: Array<BetaManagedAgentsURLMCPServerParams> | null;\n\n /**\n * Body param: Metadata patch. Set a key to a string to upsert it, or to null to\n * delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up\n * to 64 chars each) with values up to 512 chars.\n */\n metadata?: { [key: string]: string | null } | null;\n\n /**\n * Body param: Model identifier. Accepts the\n * [model string](https://platform.puku.com/docs/en/about-puku/models/overview#latest-models-comparison),\n * e.g. `puku-opus-5`, or a `model_config` object for additional configuration\n * control. Omit to preserve. Cannot be cleared.\n */\n model?: BetaManagedAgentsModel | BetaManagedAgentsModelConfigParams;\n\n /**\n * Body param: A coordinator topology: the session's primary thread orchestrates\n * work by spawning session threads, each running an agent drawn from the `agents`\n * roster.\n */\n multiagent?: SessionsAPI.BetaManagedAgentsMultiagentParams | null;\n\n /**\n * Body param: Human-readable name. Must be non-empty. Omit to preserve. Cannot be\n * cleared.\n */\n name?: string;\n\n /**\n * Body param: Skills. Full replacement. Omit to preserve; send empty array or null\n * to clear.\n */\n skills?: Array<BetaManagedAgentsSkillParams> | null;\n\n /**\n * Body param: System prompt. Omit to preserve; send empty string or null to clear.\n */\n system?: string | null;\n\n /**\n * Body param: Tool configurations available to the agent. Full replacement. Omit\n * to preserve; send empty array or null to clear. Maximum of 128 tools across all\n * toolsets allowed.\n */\n tools?: Array<\n | BetaManagedAgentsAgentToolset20260401Params\n | BetaManagedAgentsMCPToolsetParams\n | BetaManagedAgentsCustomToolParams\n > | null;\n\n /**\n * Body param: The agent's current version, used to prevent concurrent overwrites.\n * Obtain this value from a create or retrieve response. Must be at least 1 if\n * specified. When supplied, the request fails if it does not match the server's\n * current version; omit to apply the update unconditionally.\n */\n version?: number;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface AgentListParams extends PageCursorParams {\n /**\n * Query param: Return agents created at or after this time (inclusive).\n */\n 'created_at[gte]'?: string;\n\n /**\n * Query param: Return agents created at or before this time (inclusive).\n */\n 'created_at[lte]'?: string;\n\n /**\n * Query param: Include archived agents in results. Defaults to false.\n */\n include_archived?: boolean;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface AgentArchiveParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nAgents.Versions = Versions;\n\nexport declare namespace Agents {\n export {\n type BetaManagedAgentsAdvisor as BetaManagedAgentsAdvisor,\n type BetaManagedAgentsAgent as BetaManagedAgentsAgent,\n type BetaManagedAgentsAgentReference as BetaManagedAgentsAgentReference,\n type BetaManagedAgentsAgentToolConfig as BetaManagedAgentsAgentToolConfig,\n type BetaManagedAgentsAgentToolConfigParams as BetaManagedAgentsAgentToolConfigParams,\n type BetaManagedAgentsAgentToolsetDefaultConfig as BetaManagedAgentsAgentToolsetDefaultConfig,\n type BetaManagedAgentsAgentToolsetDefaultConfigParams as BetaManagedAgentsAgentToolsetDefaultConfigParams,\n type BetaManagedAgentsAgentToolset20260401 as BetaManagedAgentsAgentToolset20260401,\n type BetaManagedAgentsAgentToolset20260401BashInput as BetaManagedAgentsAgentToolset20260401BashInput,\n type BetaManagedAgentsAgentToolset20260401EditInput as BetaManagedAgentsAgentToolset20260401EditInput,\n type BetaManagedAgentsAgentToolset20260401GlobInput as BetaManagedAgentsAgentToolset20260401GlobInput,\n type BetaManagedAgentsAgentToolset20260401GrepInput as BetaManagedAgentsAgentToolset20260401GrepInput,\n type BetaManagedAgentsAgentToolset20260401Params as BetaManagedAgentsAgentToolset20260401Params,\n type BetaManagedAgentsAgentToolset20260401ReadInput as BetaManagedAgentsAgentToolset20260401ReadInput,\n type BetaManagedAgentsAgentToolset20260401WriteInput as BetaManagedAgentsAgentToolset20260401WriteInput,\n type BetaManagedAgentsAlwaysAllowPolicy as BetaManagedAgentsAlwaysAllowPolicy,\n type BetaManagedAgentsAlwaysAskPolicy as BetaManagedAgentsAlwaysAskPolicy,\n type BetaManagedAgentsPukuSkill as BetaManagedAgentsPukuSkill,\n type BetaManagedAgentsPukuSkillParams as BetaManagedAgentsPukuSkillParams,\n type BetaManagedAgentsBashToolConfig as BetaManagedAgentsBashToolConfig,\n type BetaManagedAgentsBashToolConfigParams as BetaManagedAgentsBashToolConfigParams,\n type BetaManagedAgentsCustomSkill as BetaManagedAgentsCustomSkill,\n type BetaManagedAgentsCustomSkillParams as BetaManagedAgentsCustomSkillParams,\n type BetaManagedAgentsCustomTool as BetaManagedAgentsCustomTool,\n type BetaManagedAgentsCustomToolInputSchema as BetaManagedAgentsCustomToolInputSchema,\n type BetaManagedAgentsCustomToolParams as BetaManagedAgentsCustomToolParams,\n type BetaManagedAgentsEditToolConfig as BetaManagedAgentsEditToolConfig,\n type BetaManagedAgentsEditToolConfigParams as BetaManagedAgentsEditToolConfigParams,\n type BetaManagedAgentsEffortHigh as BetaManagedAgentsEffortHigh,\n type BetaManagedAgentsEffortLow as BetaManagedAgentsEffortLow,\n type BetaManagedAgentsEffortMax as BetaManagedAgentsEffortMax,\n type BetaManagedAgentsEffortMedium as BetaManagedAgentsEffortMedium,\n type BetaManagedAgentsEffortXhigh as BetaManagedAgentsEffortXhigh,\n type BetaManagedAgentsGlobToolConfig as BetaManagedAgentsGlobToolConfig,\n type BetaManagedAgentsGlobToolConfigParams as BetaManagedAgentsGlobToolConfigParams,\n type BetaManagedAgentsGrepToolConfig as BetaManagedAgentsGrepToolConfig,\n type BetaManagedAgentsGrepToolConfigParams as BetaManagedAgentsGrepToolConfigParams,\n type BetaManagedAgentsMCPServerURLDefinition as BetaManagedAgentsMCPServerURLDefinition,\n type BetaManagedAgentsMCPToolConfig as BetaManagedAgentsMCPToolConfig,\n type BetaManagedAgentsMCPToolConfigParams as BetaManagedAgentsMCPToolConfigParams,\n type BetaManagedAgentsMCPToolset as BetaManagedAgentsMCPToolset,\n type BetaManagedAgentsMCPToolsetDefaultConfig as BetaManagedAgentsMCPToolsetDefaultConfig,\n type BetaManagedAgentsMCPToolsetDefaultConfigParams as BetaManagedAgentsMCPToolsetDefaultConfigParams,\n type BetaManagedAgentsMCPToolsetParams as BetaManagedAgentsMCPToolsetParams,\n type BetaManagedAgentsModel as BetaManagedAgentsModel,\n type BetaManagedAgentsModelConfig as BetaManagedAgentsModelConfig,\n type BetaManagedAgentsModelConfigParams as BetaManagedAgentsModelConfigParams,\n type BetaManagedAgentsMultiagentCoordinator as BetaManagedAgentsMultiagentCoordinator,\n type BetaManagedAgentsMultiagentCoordinatorParams as BetaManagedAgentsMultiagentCoordinatorParams,\n type BetaManagedAgentsMultiagentSelfParams as BetaManagedAgentsMultiagentSelfParams,\n type BetaManagedAgentsReadToolConfig as BetaManagedAgentsReadToolConfig,\n type BetaManagedAgentsReadToolConfigParams as BetaManagedAgentsReadToolConfigParams,\n type BetaManagedAgentsSessionThreadAgent as BetaManagedAgentsSessionThreadAgent,\n type BetaManagedAgentsSkillParams as BetaManagedAgentsSkillParams,\n type BetaManagedAgentsURLMCPServerParams as BetaManagedAgentsURLMCPServerParams,\n type BetaManagedAgentsUserLocation as BetaManagedAgentsUserLocation,\n type BetaManagedAgentsWebFetchToolConfig as BetaManagedAgentsWebFetchToolConfig,\n type BetaManagedAgentsWebFetchToolConfigParams as BetaManagedAgentsWebFetchToolConfigParams,\n type BetaManagedAgentsWebSearchToolConfig as BetaManagedAgentsWebSearchToolConfig,\n type BetaManagedAgentsWebSearchToolConfigParams as BetaManagedAgentsWebSearchToolConfigParams,\n type BetaManagedAgentsWriteToolConfig as BetaManagedAgentsWriteToolConfig,\n type BetaManagedAgentsWriteToolConfigParams as BetaManagedAgentsWriteToolConfigParams,\n type BetaManagedAgentsAgentsPageCursor as BetaManagedAgentsAgentsPageCursor,\n type AgentCreateParams as AgentCreateParams,\n type AgentRetrieveParams as AgentRetrieveParams,\n type AgentUpdateParams as AgentUpdateParams,\n type AgentListParams as AgentListParams,\n type AgentArchiveParams as AgentArchiveParams,\n };\n\n export { Versions as Versions, type VersionListParams as VersionListParams };\n}\n",
|
|
59
|
-
"/**\n * Chain an external {@link AbortSignal} into a local {@link AbortController}:\n * the controller aborts whenever `external` aborts (synchronously if it is\n * already aborted).\n *\n * Returns a cleanup function that detaches the listener. Callers MUST invoke it\n * on their normal teardown path — `{ once: true }` only removes the listener if\n * abort actually fires, so a long-lived `external` signal
|
|
59
|
+
"/**\n * Chain an external {@link AbortSignal} into a local {@link AbortController}:\n * the controller aborts whenever `external` aborts (synchronously if it is\n * already aborted).\n *\n * Returns a cleanup function that detaches the listener. Callers MUST invoke it\n * on their normal teardown path — `{ once: true }` only removes the listener if\n * abort actually fires, so a long-lived `external` signal would otherwise leak one\n * listener per controller.\n */\nexport function linkAbort(external: AbortSignal | null | undefined, controller: AbortController): () => void {\n if (!external) return () => {};\n if (external.aborted) {\n controller.abort();\n return () => {};\n }\n const onAbort = () => controller.abort();\n external.addEventListener('abort', onAbort);\n return () => external.removeEventListener('abort', onAbort);\n}\n",
|
|
60
60
|
"import { APIError } from '../../core/error';\n\n/** True when `e` is an {@link APIError} whose HTTP status equals `code`. */\nexport function isStatus(e: unknown, code: number): boolean {\n return e instanceof APIError && e.status === code;\n}\n\n/** True when `e` is an {@link APIError} with a 4xx status. */\nexport function is4xx(e: unknown): boolean {\n return e instanceof APIError && typeof e.status === 'number' && e.status >= 400 && e.status < 500;\n}\n\n/**\n * True for a 4xx that the core client's retry policy would *not* retry, i.e. a\n * permanent client error. 408 (request timeout), 409 (lock timeout) and 429\n * (rate limit) are retryable for the base client (`PukuAI.shouldRetry`), so\n * they are not treated as fatal here — keeping helper retry behaviour aligned\n * with the rest of the SDK.\n */\nexport function isFatal4xx(e: unknown): boolean {\n return is4xx(e) && !isStatus(e, 408) && !isStatus(e, 409) && !isStatus(e, 429);\n}\n\n/** Exponential backoff: `baseMs * 2 ** attempt`, clamped to `capMs`. */\nexport function backoff(attempt: number, baseMs: number, capMs: number): number {\n return Math.min(baseMs * 2 ** attempt, capMs);\n}\n\n/** Uniform random delay in the half-open interval `[lowMs, highMs)`. */\nexport function jitter(lowMs: number, highMs: number): number {\n return lowMs + Math.random() * (highMs - lowMs);\n}\n\n/**\n * Trim up to 25% off `ms` at random so a fleet of clients backing off after a\n * shared outage does not retry in lockstep — mirrors the jitter the core client\n * applies to its own retry timeout.\n */\nexport function applyJitter(ms: number): number {\n return ms * (1 - Math.random() * 0.25);\n}\n",
|
|
61
61
|
"import { PukuError } from '../core/error';\nimport type { PukuAI } from '../client';\nimport { buildHeaders, type HeadersLike, type NullableHeaders } from '../internal/headers';\nimport {\n STAINLESS_HELPER_HEADER,\n type StainlessHelperHeaderValue,\n} from '../internal/stainless-helper-header';\n\n/**\n * Shared util for building a runner-helper-bound sub-client.\n *\n * The work poller, the environment worker, and the session tool runner each\n * need to issue requests authenticated by a per-helper credential (a\n * self-hosted environment key, today) rather than the parent client's own\n * `X-Api-Key`, *and* tagged with their own `x-stainless-helper` telemetry\n * value. Each wants to inherit the parent's full configuration — `timeout`,\n * `maxRetries`, `fetch`, `fetchOptions`, custom `defaultHeaders`,\n * `defaultQuery` — and override only the auth + telemetry bits.\n *\n * {@link copyClientForHelper} is the one shared construction.\n */\n\ninterface ClientInternalAccess {\n _options: { defaultHeaders?: HeadersLike };\n _authState?: { extraHeaders?: Record<string, string> };\n}\n\n/**\n * Return a `withOptions()` clone of `client` set up for use *by* one of the\n * runner helpers: authenticated with `authToken` as Bearer credentials, with\n * the parent's `X-Api-Key` cleared, and tagged with the helper's\n * `x-stainless-helper` value on every outgoing request.\n *\n * The returned sub-client inherits the parent's full configuration\n * (`baseURL`, `timeout`, `maxRetries`, `fetch`, `fetchOptions`, custom\n * `defaultHeaders`, `defaultQuery`). Overrides applied:\n *\n * - `authToken: authToken` — the new credential.\n * - `apiKey: null` — the parent's `X-Api-Key` is cleared. `withOptions`\n * inherits the parent's `apiKey` by default; without this, both\n * `X-Api-Key` *and* `Authorization: Bearer …` would land on the wire.\n * `client.ts` only triggers the env-var fallback when `apiKey === undefined`,\n * so explicit `null` is honored.\n * - `credentials: undefined` — opts the clone out of any inherited\n * credentials/config/profile so the explicit bearer is the unambiguous auth.\n * - `baseURL: client.baseURL` — pins the parent's resolved host (auth override otherwise resets it).\n * - `defaultHeaders` is rebuilt as `parent._authState.extraHeaders ⊕ parent.defaultHeaders ⊕\n * {'x-stainless-helper': helper}`. `withOptions` *replaces* (does not\n * merge) `defaultHeaders`, so we merge here so any custom headers the\n * caller set on the parent client survive on the sub-client.\n */\nexport function copyClientForHelper<T extends PukuAI>(\n client: T,\n { authToken, helper }: { authToken: string; helper: StainlessHelperHeaderValue },\n): T {\n if (!authToken) {\n throw new PukuError(\n `copyClientForHelper: expected a non-empty authToken but received ${JSON.stringify(authToken)}`,\n );\n }\n const internal = client as unknown as ClientInternalAccess;\n const parentDefaults = internal._options.defaultHeaders;\n // Carry the parent's credential/profile headers; strip the auth ones (we re-auth below).\n const parentAuthExtraHeaders = internal._authState?.extraHeaders;\n const inheritedAuthExtraHeaders: Record<string, string> | undefined =\n parentAuthExtraHeaders ?\n Object.fromEntries(\n Object.entries(parentAuthExtraHeaders).filter(([name]) => {\n const lower = name.toLowerCase();\n return lower !== 'authorization' && lower !== 'x-api-key';\n }),\n )\n : undefined;\n const defaultHeaders: NullableHeaders = buildHeaders([\n inheritedAuthExtraHeaders,\n parentDefaults,\n { [STAINLESS_HELPER_HEADER]: helper },\n ]);\n return client.withOptions({\n apiKey: null,\n authToken,\n baseURL: client.baseURL,\n credentials: undefined,\n defaultHeaders,\n }) as T;\n}\n",
|
|
62
62
|
"import { PukuError } from '../../core/error';\nimport type { PukuAI } from '../../client';\nimport type { BetaSelfHostedWork } from '../../resources/beta/environments/work';\nimport { loggerFor, type Logger } from '../../internal/utils/log';\nimport { sleep } from '../../internal/utils/sleep';\nimport { uuid4 } from '../../internal/utils/uuid';\nimport { linkAbort } from '../../internal/utils/abort';\nimport { buildHeaders } from '../../internal/headers';\nimport type { BetaToolRunnerRequestOptions } from '../tools/BetaToolRunner';\nimport {\n applyJitter,\n backoff as expBackoff,\n isFatal4xx,\n isStatus,\n jitter,\n} from '../../internal/utils/backoff';\nimport { copyClientForHelper } from '../helper-client';\n\nexport { is4xx, isFatal4xx, isStatus, jitter } from '../../internal/utils/backoff';\n\n// API caps block_ms at 999; rely on client-side jitter between empty polls.\nexport const POLL_BLOCK_MS = 999;\nconst POLL_BACKOFF_BASE_MS = 1000;\nconst POLL_BACKOFF_CAP_MS = 60_000;\nconst IDLE_REPORT_INTERVAL_MS = 300_000;\n\nexport interface WorkPollerOptions {\n client: PukuAI;\n environmentId: string;\n /**\n * The environment key — the single credential for the self-hosted runner. It\n * authenticates the work-poll calls here and every per-session call the\n * consumer makes afterwards.\n */\n environmentKey: string;\n workerId?: string;\n /** External abort signal. Aborting it ends the iteration. */\n signal?: AbortSignal;\n /**\n * Whether the poller posts `work.stop` itself after the consumer's loop body\n * returns. Defaults to `true`. Set `false` when the consumer already owns the\n * stop (e.g. {@link EnvironmentWorker} force-stops every item) so the work\n * item is not stopped twice.\n *\n * Orthogonal to {@link WorkPollerOptions.drain}: `autoStop` is a per-item\n * lifecycle flag (does the poller `work.stop` each item), `drain` controls\n * loop termination (does the poller return when the queue is empty). They are\n * not two names for the same thing — `EnvironmentWorker.run` uses\n * `autoStop: false` with `drain` defaulting `false`.\n */\n autoStop?: boolean;\n /**\n * When `true`, the poller returns (ends iteration) as soon as the work queue\n * is empty instead of long-polling forever. Defaults to `false` (long-poll\n * until aborted). Pair with `blockMs: null` for a single non-blocking pass\n * over whatever is already queued.\n */\n drain?: boolean;\n /**\n * Block timeout in milliseconds passed through to `work.poll` — the server\n * long-polls up to this long for an item before returning empty. Defaults to\n * {@link POLL_BLOCK_MS} (the API cap, 999). Pass `null` to omit it entirely\n * for a non-blocking single poll (useful with {@link WorkPollerOptions.drain}).\n */\n blockMs?: number | null;\n /**\n * Reclaim unacknowledged work items older than this many milliseconds, passed\n * through to `work.poll`'s `reclaim_older_than_ms`. Defaults to `undefined`\n * (omitted — the server applies its own default).\n */\n reclaimOlderThanMs?: number | null;\n /**\n * Extra per-request options merged into the poll/ack/stop calls. Custom\n * `headers` (e.g. a proxy's auth/routing headers) are layered on top of the\n * environment-key auth + helper telemetry headers; the poller owns the abort\n * signal, so a `signal` here is ignored.\n */\n requestOptions?: BetaToolRunnerRequestOptions;\n}\n\n/**\n * Async-iterable that long-polls a self-hosted environment for work, ack's\n * each item, yields the {@link BetaSelfHostedWork} item, and posts `stop` after\n * the consumer's loop body returns (or when the consumer `break`s).\n *\n * A yielded item may carry a per-item `secret` payload (populated only by the\n * poll response); the poller passes it through untouched — consumers such as\n * {@link EnvironmentWorker} extract the sessions token it carries and prefer\n * that over the environment key for the item's downstream calls. Treat it as\n * opaque and never log it.\n *\n * @example\n * ```ts\n * for await (const work of client.beta.environments.work.poller({\n * environmentId,\n * environmentKey,\n * })) {\n * // ...service the work...\n * }\n * ```\n */\nexport class WorkPoller implements AsyncIterable<BetaSelfHostedWork> {\n readonly client: PukuAI;\n readonly environmentId: string;\n readonly environmentKey: string;\n readonly workerId: string;\n\n // Sub-client scoped to the environment key. Every poll / ack / stop call\n // is routed through this so the parent's `X-Api-Key` never lands on the\n // wire alongside the bearer credential. The helper-telemetry header is\n // attached as a default on this client; per-call plumbing is unnecessary.\n readonly #runnerClient: PukuAI;\n #consumed = false;\n readonly #controller: AbortController;\n readonly #detachExternal: () => void;\n readonly #autoStop: boolean;\n readonly #drain: boolean;\n readonly #blockMs: number | null;\n readonly #reclaimOlderThanMs: number | null;\n readonly #requestOpts: BetaToolRunnerRequestOptions | undefined;\n\n constructor(opts: WorkPollerOptions) {\n this.client = opts.client;\n this.environmentId = opts.environmentId;\n this.environmentKey = opts.environmentKey;\n this.workerId = opts.workerId ?? defaultWorkerId();\n this.#runnerClient = copyClientForHelper(opts.client, {\n authToken: opts.environmentKey,\n helper: 'environments-work-poller',\n });\n this.#autoStop = opts.autoStop ?? true;\n this.#drain = opts.drain ?? false;\n // `undefined` => default to the API cap; an explicit `null` => omit\n // `block_ms` for a non-blocking poll.\n this.#blockMs = opts.blockMs === undefined ? POLL_BLOCK_MS : opts.blockMs;\n this.#reclaimOlderThanMs = opts.reclaimOlderThanMs ?? null;\n this.#requestOpts = opts.requestOptions;\n this.#controller = new AbortController();\n this.#detachExternal = linkAbort(opts.signal, this.#controller);\n }\n\n /** Read-only view of this iterator's abort signal. */\n get signal(): AbortSignal {\n return this.#controller.signal;\n }\n\n /** Abort the iterator. The current `for await` will exit cleanly. */\n abort(): void {\n this.#controller.abort();\n }\n\n async *[Symbol.asyncIterator](): AsyncIterator<BetaSelfHostedWork> {\n if (this.#consumed) {\n throw new PukuError('Cannot iterate over a consumed WorkPoller');\n }\n this.#consumed = true;\n const log = loggerFor(this.client);\n log.info('poller starting', {\n component: 'work-poller',\n environment_id: this.environmentId,\n });\n const idle = new IdleLog(log, this.environmentId);\n\n try {\n let attempt = 0;\n while (!this.#controller.signal.aborted) {\n let work: BetaSelfHostedWork | null;\n try {\n work = await this.#runnerClient.beta.environments.work.poll(\n this.environmentId,\n {\n 'PukuAI-Worker-ID': this.workerId,\n ...(this.#blockMs !== null ? { block_ms: this.#blockMs } : {}),\n ...(this.#reclaimOlderThanMs !== null ?\n { reclaim_older_than_ms: this.#reclaimOlderThanMs }\n : {}),\n },\n { headers: buildHeaders([this.#requestOpts?.headers]), signal: this.#controller.signal },\n );\n } catch (e) {\n if (this.#controller.signal.aborted) return;\n // A bad environment key / missing environment never recovers — surface\n // it instead of spinning forever at the backoff cap.\n if (isFatal4xx(e)) {\n log.error('poll failed permanently, stopping poller', { error: String(e) });\n throw e;\n }\n // Jittered exponential backoff so a fleet of pollers doesn't retry in\n // lockstep after a shared outage.\n const wait = applyJitter(backoff(attempt));\n log.warn('poll failed, backing off', { error: String(e), backoff_ms: wait });\n attempt++;\n await sleep(wait, this.#controller.signal);\n continue;\n }\n attempt = 0;\n if (work == null) {\n // Queue empty: either return now (drain) or wait and poll again.\n if (this.#drain) return;\n idle.onEmptyPoll();\n await sleep(jitter(1000, 3000), this.#controller.signal);\n continue;\n }\n idle.onClaim();\n log.info('claimed work', {\n component: 'work-poller',\n environment_id: this.environmentId,\n work_id: work.id,\n work_type: work.data.type,\n });\n\n try {\n await this.#runnerClient.beta.environments.work.ack(\n work.id,\n { environment_id: work.environment_id },\n { headers: buildHeaders([this.#requestOpts?.headers]), signal: this.#controller.signal },\n );\n } catch (e) {\n log.error('ack failed', { work_id: work.id, error: String(e) });\n continue;\n }\n\n try {\n yield work;\n } finally {\n // Post-handler stop. Runs whether the consumer body returned\n // normally, threw, or `break`d out of the loop — unless the consumer\n // owns the stop itself (`autoStop: false`).\n if (this.#autoStop) {\n try {\n await this.#runnerClient.beta.environments.work.stop(\n work.id,\n { environment_id: work.environment_id },\n { headers: buildHeaders([this.#requestOpts?.headers]) },\n );\n } catch (e) {\n if (!isStatus(e, 409)) log.warn('stop failed', { work_id: work.id, error: String(e) });\n }\n }\n }\n }\n } finally {\n // Detach from the external signal so the consumer can drop their\n // signal reference without leaking this iterator instance.\n this.#detachExternal();\n }\n }\n}\n\n/** Exponential poll backoff: 1s, 2s, 4s … clamped to a 60s cap. */\nexport function backoff(attempt: number): number {\n return expBackoff(attempt, POLL_BACKOFF_BASE_MS, POLL_BACKOFF_CAP_MS);\n}\n\n/**\n * Keeps an idle poll loop visible in the logs without an INFO line per poll:\n * the first empty poll after start-up or after a claim logs at INFO and later\n * ones at DEBUG, with an INFO reminder every `IDLE_REPORT_INTERVAL_MS` while\n * the loop stays idle.\n */\nclass IdleLog {\n readonly #log: Logger;\n readonly #environmentId: string;\n #idleSince: number | undefined;\n #lastReport = 0;\n\n constructor(log: Logger, environmentId: string) {\n this.#log = log;\n this.#environmentId = environmentId;\n }\n\n onEmptyPoll(): void {\n const now = Date.now();\n const fields = { component: 'work-poller', environment_id: this.#environmentId };\n if (this.#idleSince === undefined) {\n this.#idleSince = this.#lastReport = now;\n this.#log.info('idle; polling for work', fields);\n } else if (now - this.#lastReport >= IDLE_REPORT_INTERVAL_MS) {\n this.#lastReport = now;\n this.#log.info(`still polling; idle for ${Math.round((now - this.#idleSince) / 1000)}s`, fields);\n } else {\n this.#log.debug('poll returned no work', fields);\n }\n }\n\n onClaim(): void {\n this.#idleSince = undefined;\n }\n}\n\nfunction defaultWorkerId(): string {\n // The API documents the worker id as a *unique* identifier for Redis consumer\n // groups, so the fallback must be unique even when several pollers share a\n // host. Prefix with the hostname when one is exposed for readability, but rely\n // on the uuid for uniqueness.\n const env = (globalThis as { process?: { env?: Record<string, string | undefined> } }).process?.env;\n const host = env?.['HOSTNAME'];\n return host ? `${host}-${uuid4()}` : uuid4();\n}\n",
|
|
@@ -81,16 +81,16 @@
|
|
|
81
81
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { APIResource } from '../../../core/resource';\nimport * as BetaAPI from '../beta';\nimport * as MemoriesAPI from './memories';\nimport {\n BetaManagedAgentsConflictError,\n BetaManagedAgentsContentSha256Precondition,\n BetaManagedAgentsDeletedMemory,\n BetaManagedAgentsError,\n BetaManagedAgentsMemory,\n BetaManagedAgentsMemoryListItem,\n BetaManagedAgentsMemoryListItemsPageCursor,\n BetaManagedAgentsMemoryPathConflictError,\n BetaManagedAgentsMemoryPreconditionFailedError,\n BetaManagedAgentsMemoryPrefix,\n BetaManagedAgentsMemoryView,\n BetaManagedAgentsPrecondition,\n Memories,\n MemoryCreateParams,\n MemoryDeleteParams,\n MemoryListParams,\n MemoryRetrieveParams,\n MemoryUpdateParams,\n} from './memories';\nimport * as MemoryVersionsAPI from './memory-versions';\nimport {\n BetaManagedAgentsAPIActor,\n BetaManagedAgentsActor,\n BetaManagedAgentsMemoryVersion,\n BetaManagedAgentsMemoryVersionOperation,\n BetaManagedAgentsMemoryVersionsPageCursor,\n BetaManagedAgentsServiceAccountActor,\n BetaManagedAgentsSessionActor,\n BetaManagedAgentsUserActor,\n MemoryVersionListParams,\n MemoryVersionRedactParams,\n MemoryVersionRetrieveParams,\n MemoryVersions,\n} from './memory-versions';\nimport { APIPromise } from '../../../core/api-promise';\nimport { PageCursor, type PageCursorParams, PagePromise } from '../../../core/pagination';\nimport { buildHeaders } from '../../../internal/headers';\nimport { RequestOptions } from '../../../internal/request-options';\nimport { path } from '../../../internal/utils/path';\n\nexport class MemoryStores extends APIResource {\n memories: MemoriesAPI.Memories = new MemoriesAPI.Memories(this._client);\n memoryVersions: MemoryVersionsAPI.MemoryVersions = new MemoryVersionsAPI.MemoryVersions(this._client);\n\n /**\n * Create a memory store\n *\n * @example\n * ```ts\n * const betaManagedAgentsMemoryStore =\n * await client.beta.memoryStores.create({ name: 'x' });\n * ```\n */\n create(\n params: MemoryStoreCreateParams,\n options?: RequestOptions,\n ): APIPromise<BetaManagedAgentsMemoryStore> {\n const { betas, ...body } = params;\n return this._client.post('/v1/memory_stores?beta=true', {\n body,\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Retrieve a memory store\n *\n * @example\n * ```ts\n * const betaManagedAgentsMemoryStore =\n * await client.beta.memoryStores.retrieve(\n * 'memory_store_id',\n * );\n * ```\n */\n retrieve(\n memoryStoreID: string,\n params: MemoryStoreRetrieveParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaManagedAgentsMemoryStore> {\n const { betas } = params ?? {};\n return this._client.get(path`/v1/memory_stores/${memoryStoreID}?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Update a memory store\n *\n * @example\n * ```ts\n * const betaManagedAgentsMemoryStore =\n * await client.beta.memoryStores.update('memory_store_id');\n * ```\n */\n update(\n memoryStoreID: string,\n params: MemoryStoreUpdateParams,\n options?: RequestOptions,\n ): APIPromise<BetaManagedAgentsMemoryStore> {\n const { betas, ...body } = params;\n return this._client.post(path`/v1/memory_stores/${memoryStoreID}?beta=true`, {\n body,\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * List memory stores\n *\n * @example\n * ```ts\n * // Automatically fetches more pages as needed.\n * for await (const betaManagedAgentsMemoryStore of client.beta.memoryStores.list()) {\n * // ...\n * }\n * ```\n */\n list(\n params: MemoryStoreListParams | null | undefined = {},\n options?: RequestOptions,\n ): PagePromise<BetaManagedAgentsMemoryStoresPageCursor, BetaManagedAgentsMemoryStore> {\n const { betas, ...query } = params ?? {};\n return this._client.getAPIList('/v1/memory_stores?beta=true', PageCursor<BetaManagedAgentsMemoryStore>, {\n query,\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Delete a memory store\n *\n * @example\n * ```ts\n * const betaManagedAgentsDeletedMemoryStore =\n * await client.beta.memoryStores.delete('memory_store_id');\n * ```\n */\n delete(\n memoryStoreID: string,\n params: MemoryStoreDeleteParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaManagedAgentsDeletedMemoryStore> {\n const { betas } = params ?? {};\n return this._client.delete(path`/v1/memory_stores/${memoryStoreID}?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Archive a memory store\n *\n * @example\n * ```ts\n * const betaManagedAgentsMemoryStore =\n * await client.beta.memoryStores.archive('memory_store_id');\n * ```\n */\n archive(\n memoryStoreID: string,\n params: MemoryStoreArchiveParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaManagedAgentsMemoryStore> {\n const { betas } = params ?? {};\n return this._client.post(path`/v1/memory_stores/${memoryStoreID}/archive?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString() },\n options?.headers,\n ]),\n });\n }\n}\n\nexport type BetaManagedAgentsMemoryStoresPageCursor = PageCursor<BetaManagedAgentsMemoryStore>;\n\n/**\n * Confirmation that a `memory_store` was deleted.\n */\nexport interface BetaManagedAgentsDeletedMemoryStore {\n /**\n * ID of the deleted memory store (a `memstore_...` identifier). The store and all\n * its memories and versions are no longer retrievable.\n */\n id: string;\n\n type: 'memory_store_deleted';\n}\n\n/**\n * A `memory_store`: a named container for agent memories, scoped to a workspace.\n * Attach a store to a session via `resources[]` to mount it as a directory the\n * agent can read and write.\n */\nexport interface BetaManagedAgentsMemoryStore {\n /**\n * Unique identifier for the memory store (a `memstore_...` tagged ID). Use this\n * when attaching the store to a session, or in the `{memory_store_id}` path\n * parameter of subsequent calls.\n */\n id: string;\n\n /**\n * A timestamp in RFC 3339 format\n */\n created_at: string;\n\n /**\n * Human-readable name for the store. 1–255 characters. The store's mount-path slug\n * under `/mnt/memory/` is derived from this name.\n */\n name: string;\n\n type: 'memory_store';\n\n /**\n * A timestamp in RFC 3339 format\n */\n updated_at: string;\n\n /**\n * A timestamp in RFC 3339 format\n */\n archived_at?: string | null;\n\n /**\n * Free-text description of what the store contains, up to 1024 characters.\n * Included in the agent's system prompt when the store is attached, so word it to\n * be useful to the agent. Empty string when unset.\n */\n description?: string;\n\n /**\n * Arbitrary key-value tags for your own bookkeeping (such as the end user a store\n * belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters.\n * Returned on retrieve/list but not filterable.\n */\n metadata?: { [key: string]: string };\n}\n\nexport interface MemoryStoreCreateParams {\n /**\n * Body param: Human-readable name for the store. Required; 1–255 characters; no\n * control characters. The mount-path slug under `/mnt/memory/` is derived from\n * this name (lowercased, non-alphanumeric runs collapsed to a hyphen). Names need\n * not be unique within a workspace.\n */\n name: string;\n\n /**\n * Body param: Free-text description of what the store contains, up to 1024\n * characters. Included in the agent's system prompt when the store is attached, so\n * word it to be useful to the agent.\n */\n description?: string;\n\n /**\n * Body param: Arbitrary key-value tags for your own bookkeeping (such as the end\n * user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512\n * characters. Not visible to the agent.\n */\n metadata?: { [key: string]: string };\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface MemoryStoreRetrieveParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface MemoryStoreUpdateParams {\n /**\n * Body param: New description for the store, up to 1024 characters. Pass an empty\n * string to clear it.\n */\n description?: string | null;\n\n /**\n * Body param: Metadata patch. Set a key to a string to upsert it, or to null to\n * delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up\n * to 64 chars each) with values up to 512 chars.\n */\n metadata?: { [key: string]: string | null } | null;\n\n /**\n * Body param: New human-readable name for the store. 1–255 characters; no control\n * characters. Renaming changes the slug used for the store's `mount_path` in\n * sessions created after the update.\n */\n name?: string | null;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface MemoryStoreListParams extends PageCursorParams {\n /**\n * Query param: Return only stores whose `created_at` is at or after this time\n * (inclusive). Sent on the wire as `created_at[gte]`.\n */\n 'created_at[gte]'?: string;\n\n /**\n * Query param: Return only stores whose `created_at` is at or before this time\n * (inclusive). Sent on the wire as `created_at[lte]`.\n */\n 'created_at[lte]'?: string;\n\n /**\n * Query param: When `true`, archived stores are included in the results. Defaults\n * to `false` (archived stores are excluded).\n */\n include_archived?: boolean;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface MemoryStoreDeleteParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface MemoryStoreArchiveParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nMemoryStores.Memories = Memories;\nMemoryStores.MemoryVersions = MemoryVersions;\n\nexport declare namespace MemoryStores {\n export {\n type BetaManagedAgentsDeletedMemoryStore as BetaManagedAgentsDeletedMemoryStore,\n type BetaManagedAgentsMemoryStore as BetaManagedAgentsMemoryStore,\n type BetaManagedAgentsMemoryStoresPageCursor as BetaManagedAgentsMemoryStoresPageCursor,\n type MemoryStoreCreateParams as MemoryStoreCreateParams,\n type MemoryStoreRetrieveParams as MemoryStoreRetrieveParams,\n type MemoryStoreUpdateParams as MemoryStoreUpdateParams,\n type MemoryStoreListParams as MemoryStoreListParams,\n type MemoryStoreDeleteParams as MemoryStoreDeleteParams,\n type MemoryStoreArchiveParams as MemoryStoreArchiveParams,\n };\n\n export {\n Memories as Memories,\n type BetaManagedAgentsConflictError as BetaManagedAgentsConflictError,\n type BetaManagedAgentsContentSha256Precondition as BetaManagedAgentsContentSha256Precondition,\n type BetaManagedAgentsDeletedMemory as BetaManagedAgentsDeletedMemory,\n type BetaManagedAgentsError as BetaManagedAgentsError,\n type BetaManagedAgentsMemory as BetaManagedAgentsMemory,\n type BetaManagedAgentsMemoryListItem as BetaManagedAgentsMemoryListItem,\n type BetaManagedAgentsMemoryPathConflictError as BetaManagedAgentsMemoryPathConflictError,\n type BetaManagedAgentsMemoryPreconditionFailedError as BetaManagedAgentsMemoryPreconditionFailedError,\n type BetaManagedAgentsMemoryPrefix as BetaManagedAgentsMemoryPrefix,\n type BetaManagedAgentsMemoryView as BetaManagedAgentsMemoryView,\n type BetaManagedAgentsPrecondition as BetaManagedAgentsPrecondition,\n type BetaManagedAgentsMemoryListItemsPageCursor as BetaManagedAgentsMemoryListItemsPageCursor,\n type MemoryCreateParams as MemoryCreateParams,\n type MemoryRetrieveParams as MemoryRetrieveParams,\n type MemoryUpdateParams as MemoryUpdateParams,\n type MemoryListParams as MemoryListParams,\n type MemoryDeleteParams as MemoryDeleteParams,\n };\n\n export {\n MemoryVersions as MemoryVersions,\n type BetaManagedAgentsActor as BetaManagedAgentsActor,\n type BetaManagedAgentsAPIActor as BetaManagedAgentsAPIActor,\n type BetaManagedAgentsMemoryVersion as BetaManagedAgentsMemoryVersion,\n type BetaManagedAgentsMemoryVersionOperation as BetaManagedAgentsMemoryVersionOperation,\n type BetaManagedAgentsServiceAccountActor as BetaManagedAgentsServiceAccountActor,\n type BetaManagedAgentsSessionActor as BetaManagedAgentsSessionActor,\n type BetaManagedAgentsUserActor as BetaManagedAgentsUserActor,\n type BetaManagedAgentsMemoryVersionsPageCursor as BetaManagedAgentsMemoryVersionsPageCursor,\n type MemoryVersionRetrieveParams as MemoryVersionRetrieveParams,\n type MemoryVersionListParams as MemoryVersionListParams,\n type MemoryVersionRedactParams as MemoryVersionRedactParams,\n };\n}\n",
|
|
82
82
|
"/** @deprecated Import from ./core/error instead */\nexport * from './core/error';\n",
|
|
83
83
|
"import { PukuError } from '../../core/error';\nimport { ReadableStreamToAsyncIterable } from '../shims';\nimport { LineDecoder, type Bytes } from './line';\n\nexport class JSONLDecoder<T> {\n controller: AbortController;\n\n constructor(\n private iterator: AsyncIterableIterator<Bytes>,\n controller: AbortController,\n ) {\n this.controller = controller;\n }\n\n private async *decoder(): AsyncIterator<T, any, undefined> {\n const lineDecoder = new LineDecoder();\n for await (const chunk of this.iterator) {\n for (const line of lineDecoder.decode(chunk)) {\n yield JSON.parse(line) as T;\n }\n }\n\n for (const line of lineDecoder.flush()) {\n yield JSON.parse(line) as T;\n }\n }\n\n [Symbol.asyncIterator](): AsyncIterator<T> {\n return this.decoder();\n }\n\n static fromResponse<T>(response: Response, controller: AbortController): JSONLDecoder<T> {\n if (!response.body) {\n controller.abort();\n if (\n typeof (globalThis as any).navigator !== 'undefined' &&\n (globalThis as any).navigator.product === 'ReactNative'\n ) {\n throw new PukuError(\n `The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api`,\n );\n }\n throw new PukuError(`Attempted to iterate over a response with no body`);\n }\n\n return new JSONLDecoder(ReadableStreamToAsyncIterable<Bytes>(response.body), controller);\n }\n}\n",
|
|
84
|
-
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { APIResource } from '../../../core/resource';\nimport * as BetaAPI from '../beta';\nimport { APIPromise } from '../../../core/api-promise';\nimport * as BetaMessagesAPI from './messages';\nimport { Page, type PageParams, PagePromise } from '../../../core/pagination';\nimport { buildHeaders } from '../../../internal/headers';\nimport { RequestOptions } from '../../../internal/request-options';\nimport { JSONLDecoder } from '../../../internal/decoders/jsonl';\nimport { PukuError } from '../../../error';\nimport { path } from '../../../internal/utils/path';\nimport * as MessagesApi from '../../messages/messages';\n\nexport class Batches extends APIResource {\n /**\n * Send a batch of Message creation requests.\n *\n * The Message Batches API can be used to process multiple Messages API requests at\n * once. Once a Message Batch is created, it begins processing immediately. Batches\n * can take up to 24 hours to complete.\n *\n * Learn more about the Message Batches API in our\n * [user guide](https://platform.puku.com/docs/en/build-with-puku/batch-processing)\n *\n * @example\n * ```ts\n * const betaMessageBatch =\n * await client.beta.messages.batches.create({\n * requests: [\n * {\n * custom_id: 'my-custom-id-1',\n * params: {\n * max_tokens: 1024,\n * messages: [\n * { content: 'Hello, world', role: 'user' },\n * ],\n * model: 'puku-opus-5',\n * },\n * },\n * ],\n * });\n * ```\n */\n create(params: BatchCreateParams, options?: RequestOptions): APIPromise<BetaMessageBatch> {\n const { betas, user_profile_id, ...body } = params;\n return this._client.post('/v1/messages/batches?beta=true', {\n body,\n ...options,\n headers: buildHeaders([\n {\n 'puku-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),\n ...(user_profile_id != null ? { 'puku-user-profile-id': user_profile_id } : undefined),\n },\n options?.headers,\n ]),\n });\n }\n\n /**\n * This endpoint is idempotent and can be used to poll for Message Batch\n * completion. To access the results of a Message Batch, make a request to the\n * `results_url` field in the response.\n *\n * Learn more about the Message Batches API in our\n * [user guide](https://platform.puku.com/docs/en/build-with-puku/batch-processing)\n *\n * @example\n * ```ts\n * const betaMessageBatch =\n * await client.beta.messages.batches.retrieve(\n * 'message_batch_id',\n * );\n * ```\n */\n retrieve(\n messageBatchID: string,\n params: BatchRetrieveParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaMessageBatch> {\n const { betas } = params ?? {};\n return this._client.get(path`/v1/messages/batches/${messageBatchID}?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * List all Message Batches within a Workspace. Most recently created batches are\n * returned first.\n *\n * Learn more about the Message Batches API in our\n * [user guide](https://platform.puku.com/docs/en/build-with-puku/batch-processing)\n *\n * @example\n * ```ts\n * // Automatically fetches more pages as needed.\n * for await (const betaMessageBatch of client.beta.messages.batches.list()) {\n * // ...\n * }\n * ```\n */\n list(\n params: BatchListParams | null | undefined = {},\n options?: RequestOptions,\n ): PagePromise<BetaMessageBatchesPage, BetaMessageBatch> {\n const { betas, ...query } = params ?? {};\n return this._client.getAPIList('/v1/messages/batches?beta=true', Page<BetaMessageBatch>, {\n query,\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Delete a Message Batch.\n *\n * Message Batches can only be deleted once they've finished processing. If you'd\n * like to delete an in-progress batch, you must first cancel it.\n *\n * Learn more about the Message Batches API in our\n * [user guide](https://platform.puku.com/docs/en/build-with-puku/batch-processing)\n *\n * @example\n * ```ts\n * const betaDeletedMessageBatch =\n * await client.beta.messages.batches.delete(\n * 'message_batch_id',\n * );\n * ```\n */\n delete(\n messageBatchID: string,\n params: BatchDeleteParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaDeletedMessageBatch> {\n const { betas } = params ?? {};\n return this._client.delete(path`/v1/messages/batches/${messageBatchID}?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Batches may be canceled any time before processing ends. Once cancellation is\n * initiated, the batch enters a `canceling` state, at which time the system may\n * complete any in-progress, non-interruptible requests before finalizing\n * cancellation.\n *\n * The number of canceled requests is specified in `request_counts`. To determine\n * which requests were canceled, check the individual results within the batch.\n * Note that cancellation may not result in any canceled requests if they were\n * non-interruptible.\n *\n * Learn more about the Message Batches API in our\n * [user guide](https://platform.puku.com/docs/en/build-with-puku/batch-processing)\n *\n * @example\n * ```ts\n * const betaMessageBatch =\n * await client.beta.messages.batches.cancel(\n * 'message_batch_id',\n * );\n * ```\n */\n cancel(\n messageBatchID: string,\n params: BatchCancelParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaMessageBatch> {\n const { betas } = params ?? {};\n return this._client.post(path`/v1/messages/batches/${messageBatchID}/cancel?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Streams the results of a Message Batch as a `.jsonl` file.\n *\n * Each line in the file is a JSON object containing the result of a single request\n * in the Message Batch. Results are not guaranteed to be in the same order as\n * requests. Use the `custom_id` field to match results to requests.\n *\n * Learn more about the Message Batches API in our\n * [user guide](https://platform.puku.com/docs/en/build-with-puku/batch-processing)\n *\n * @example\n * ```ts\n * const betaMessageBatchIndividualResponse =\n * await client.beta.messages.batches.results(\n * 'message_batch_id',\n * );\n * ```\n */\n async results(\n messageBatchID: string,\n params: BatchResultsParams | undefined = {},\n options?: RequestOptions,\n ): Promise<JSONLDecoder<BetaMessageBatchIndividualResponse>> {\n const batch = await this.retrieve(messageBatchID);\n if (!batch.results_url) {\n throw new PukuError(\n `No batch \\`results_url\\`; Has it finished processing? ${batch.processing_status} - ${batch.id}`,\n );\n }\n\n const { betas } = params ?? {};\n return this._client\n .get(batch.results_url, {\n ...options,\n headers: buildHeaders([\n {\n 'puku-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),\n Accept: 'application/binary',\n },\n options?.headers,\n ]),\n stream: true,\n __binaryResponse: true,\n })\n ._thenUnwrap((_, props) => JSONLDecoder.fromResponse(props.response, props.controller)) as APIPromise<\n JSONLDecoder<BetaMessageBatchIndividualResponse>\n >;\n }\n}\n\nexport type BetaMessageBatchesPage = Page<BetaMessageBatch>;\n\nexport interface BetaDeletedMessageBatch {\n /**\n * ID of the Message Batch.\n */\n id: string;\n\n /**\n * Deleted object type.\n *\n * For Message Batches, this is always `\"message_batch_deleted\"`.\n */\n type: 'message_batch_deleted';\n}\n\nexport interface BetaMessageBatch {\n /**\n * Unique object identifier.\n *\n * The format and length of IDs may change over time.\n */\n id: string;\n\n /**\n * RFC 3339 datetime string representing the time at which the Message Batch was\n * archived and its results became unavailable.\n */\n archived_at: string | null;\n\n /**\n * RFC 3339 datetime string representing the time at which cancellation was\n * initiated for the Message Batch. Specified only if cancellation was initiated.\n */\n cancel_initiated_at: string | null;\n\n /**\n * RFC 3339 datetime string representing the time at which the Message Batch was\n * created.\n */\n created_at: string;\n\n /**\n * RFC 3339 datetime string representing the time at which processing for the\n * Message Batch ended. Specified only once processing ends.\n *\n * Processing ends when every request in a Message Batch has either succeeded,\n * errored, canceled, or expired.\n */\n ended_at: string | null;\n\n /**\n * RFC 3339 datetime string representing the time at which the Message Batch will\n * expire and end processing, which is 24 hours after creation.\n */\n expires_at: string;\n\n /**\n * Processing status of the Message Batch.\n */\n processing_status: 'in_progress' | 'canceling' | 'ended';\n\n /**\n * Tallies requests within the Message Batch, categorized by their status.\n *\n * Requests start as `processing` and move to one of the other statuses only once\n * processing of the entire batch ends. The sum of all values always matches the\n * total number of requests in the batch.\n */\n request_counts: BetaMessageBatchRequestCounts;\n\n /**\n * URL to a `.jsonl` file containing the results of the Message Batch requests.\n * Specified only once processing ends.\n *\n * Results in the file are not guaranteed to be in the same order as requests. Use\n * the `custom_id` field to match results to requests.\n */\n results_url: string | null;\n\n /**\n * Object type.\n *\n * For Message Batches, this is always `\"message_batch\"`.\n */\n type: 'message_batch';\n}\n\nexport interface BetaMessageBatchCanceledResult {\n type: 'canceled';\n}\n\nexport interface BetaMessageBatchErroredResult {\n error: BetaAPI.BetaErrorResponse;\n\n type: 'errored';\n}\n\nexport interface BetaMessageBatchExpiredResult {\n type: 'expired';\n}\n\n/**\n * This is a single line in the response `.jsonl` file and does not represent the\n * response as a whole.\n */\nexport interface BetaMessageBatchIndividualResponse {\n /**\n * Developer-provided ID created for each request in a Message Batch. Useful for\n * matching results to requests, as results may be given out of request order.\n *\n * Must be unique for each request within the Message Batch.\n */\n custom_id: string;\n\n /**\n * Processing result for this request.\n *\n * Contains a Message output if processing was successful, an error response if\n * processing failed, or the reason why processing was not attempted, such as\n * cancellation or expiration.\n */\n result: BetaMessageBatchResult;\n}\n\nexport interface BetaMessageBatchRequestCounts {\n /**\n * Number of requests in the Message Batch that have been canceled.\n *\n * This is zero until processing of the entire Message Batch has ended.\n */\n canceled: number;\n\n /**\n * Number of requests in the Message Batch that encountered an error.\n *\n * This is zero until processing of the entire Message Batch has ended.\n */\n errored: number;\n\n /**\n * Number of requests in the Message Batch that have expired.\n *\n * This is zero until processing of the entire Message Batch has ended.\n */\n expired: number;\n\n /**\n * Number of requests in the Message Batch that are processing.\n */\n processing: number;\n\n /**\n * Number of requests in the Message Batch that have completed successfully.\n *\n * This is zero until processing of the entire Message Batch has ended.\n */\n succeeded: number;\n}\n\n/**\n * Processing result for this request.\n *\n * Contains a Message output if processing was successful, an error response if\n * processing failed, or the reason why processing was not attempted, such as\n * cancellation or expiration.\n */\nexport type BetaMessageBatchResult =\n | BetaMessageBatchSucceededResult\n | BetaMessageBatchErroredResult\n | BetaMessageBatchCanceledResult\n | BetaMessageBatchExpiredResult;\n\nexport interface BetaMessageBatchSucceededResult {\n message: BetaMessagesAPI.BetaMessage;\n\n type: 'succeeded';\n}\n\nexport interface BatchCreateParams {\n /**\n * Body param: List of requests for prompt completion. Each is an individual\n * request to create a Message.\n */\n requests: Array<BatchCreateParams.Request>;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n\n /**\n * Header param: The user profile ID to attribute the requests in this batch to.\n * Use when acting on behalf of a party other than your organization. Requires the\n * `user-profiles` beta header. Applies to every request in the batch; an\n * individual request whose `user_profile_id` body field conflicts with this header\n * is errored.\n */\n user_profile_id?: string;\n}\n\nexport namespace BatchCreateParams {\n export interface Request {\n /**\n * Developer-provided ID created for each request in a Message Batch. Useful for\n * matching results to requests, as results may be given out of request order.\n *\n * Must be unique for each request within the Message Batch.\n */\n custom_id: string;\n\n /**\n * Messages API creation parameters for the individual request.\n *\n * See the\n * [Messages API reference](https://platform.puku.com/docs/en/api/messages) for\n * full documentation on available parameters.\n */\n params: Request.Params;\n }\n\n export namespace Request {\n /**\n * Messages API creation parameters for the individual request.\n *\n * See the\n * [Messages API reference](https://platform.puku.com/docs/en/api/messages) for\n * full documentation on available parameters.\n */\n export interface Params {\n /**\n * The maximum number of tokens to generate before stopping.\n *\n * Note that our models may stop _before_ reaching this maximum. This parameter\n * only specifies the absolute maximum number of tokens to generate.\n *\n * Set to `0` to populate the\n * [prompt cache](https://platform.puku.com/docs/en/build-with-puku/prompt-caching#pre-warming-the-cache)\n * without generating a response.\n *\n * Different models have different maximum values for this parameter. See\n * [models](https://platform.puku.com/docs/en/about-puku/models/overview) for\n * details.\n */\n max_tokens: number;\n\n /**\n * Input messages.\n *\n * Our models are trained to operate on alternating `user` and `assistant`\n * conversational turns. When creating a new `Message`, you specify the prior\n * conversational turns with the `messages` parameter, and the model then generates\n * the next `Message` in the conversation. Consecutive `user` or `assistant` turns\n * in your request will be combined into a single turn.\n *\n * Each input message must be an object with a `role` and `content`. You can\n * specify a single `user`-role message, or you can include multiple `user` and\n * `assistant` messages.\n *\n * If the final message uses the `assistant` role, the response content will\n * continue immediately from the content in that message. This can be used to\n * constrain part of the model's response.\n *\n * Example with a single `user` message:\n *\n * ```json\n * [{ \"role\": \"user\", \"content\": \"Hello, Puku\" }]\n * ```\n *\n * Example with multiple conversational turns:\n *\n * ```json\n * [\n * { \"role\": \"user\", \"content\": \"Hello there.\" },\n * { \"role\": \"assistant\", \"content\": \"Hi, I'm Puku. How can I help you?\" },\n * { \"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\" }\n * ]\n * ```\n *\n * Example with a partially-filled response from Puku:\n *\n * ```json\n * [\n * {\n * \"role\": \"user\",\n * \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"\n * },\n * { \"role\": \"assistant\", \"content\": \"The best answer is (\" }\n * ]\n * ```\n *\n * Each input message `content` may be either a single `string` or an array of\n * content blocks, where each block has a specific `type`. Using a `string` for\n * `content` is shorthand for an array of one content block of type `\"text\"`. The\n * following input messages are equivalent:\n *\n * ```json\n * { \"role\": \"user\", \"content\": \"Hello, Puku\" }\n * ```\n *\n * ```json\n * { \"role\": \"user\", \"content\": [{ \"type\": \"text\", \"text\": \"Hello, Puku\" }] }\n * ```\n *\n * See\n * [input examples](https://platform.puku.com/docs/en/build-with-puku/working-with-messages).\n *\n * Note that if you want to include a\n * [system prompt](https://platform.puku.com/docs/en/build-with-puku/prompt-engineering/puku-prompting-best-practices#give-puku-a-role),\n * you can use the top-level `system` parameter — there is no `\"system\"` role for\n * input messages in the Messages API.\n *\n * There is a limit of 100,000 messages in a single request.\n */\n messages: Array<BetaMessagesAPI.BetaMessageParam>;\n\n /**\n * The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesApi.Model;\n\n /**\n * Top-level cache control automatically applies a cache_control marker to the last\n * cacheable block in the request.\n */\n cache_control?: BetaMessagesAPI.BetaCacheControlEphemeral | null;\n\n /**\n * Container identifier for reuse across requests.\n */\n container?: BetaMessagesAPI.BetaContainerParams | string | null;\n\n /**\n * Context management configuration.\n *\n * This allows you to control how Puku manages context across multiple requests,\n * such as whether to clear function results or not.\n */\n context_management?: BetaMessagesAPI.BetaContextManagementConfig | null;\n\n /**\n * Request-level diagnostics. Currently carries the previous response id for\n * prompt-cache divergence reporting.\n */\n diagnostics?: BetaMessagesAPI.BetaDiagnosticsParam | null;\n\n /**\n * The `fallback_credit_token` from a prior refusal's `stop_details`.\n *\n * When a preceding request was refused and returned a `fallback_credit_token`,\n * pass that code here on the retry to have the retry's cache-creation tokens for\n * the prefix that was warm on the refused model billed at the cache-read rate.\n * Must be redeemed by the same organization and workspace, with the same request\n * body (optionally extended by one appended `assistant` message whose content is\n * the partial text — with any trailing whitespace stripped from the final text\n * block — and paired server-tool blocks streamed before the refusal; the\n * appended-assistant form is not available for requests with `output_format` set\n * or forced `tool_choice`), on an eligible fallback model, on the same platform,\n * and within 5 minutes of the refusal; a mismatch is a 400. A token minted\n * mid-server-tool-loop whose partial content was continuable may only be redeemed\n * with the appended-assistant form — if an exact-body retry is rejected with a 400\n * saying the token must be redeemed by continuing the partial response, retry with\n * the appended-assistant form instead.\n *\n * When the appended-assistant form is used on a model that otherwise disallows\n * assistant-turn prefill, this token also authorizes that one prefill.\n */\n fallback_credit_token?: string | BetaMessagesAPI.BetaFallbackCreditTokenParam | null;\n\n /**\n * Opt-in server-side retry on one or more substitute models when the requested\n * model declines for policy reasons. Tried in order: if the first entry also\n * declines, the second is tried, and so on. The string \"default\" requests the\n * requested model's server-defined default fallback configuration.\n */\n fallbacks?: BetaMessagesAPI.BetaFallbacksParam | null;\n\n /**\n * Specifies the geographic region for inference processing. If not specified, the\n * workspace's `default_inference_geo` is used.\n */\n inference_geo?: string | null;\n\n /**\n * MCP servers to be utilized in this request\n */\n mcp_servers?: Array<BetaMessagesAPI.BetaRequestMCPServerURLDefinition>;\n\n /**\n * An object describing metadata about the request.\n */\n metadata?: BetaMessagesAPI.BetaMetadata;\n\n /**\n * Configuration options for the model's output, such as the output format.\n */\n output_config?: BetaMessagesAPI.BetaOutputConfig;\n\n /**\n * @deprecated Deprecated: Use `output_config.format` instead. See\n * [structured outputs](https://platform.puku.com/docs/en/build-with-puku/structured-outputs)\n *\n * A schema to specify Puku's output format in responses. This parameter will be\n * removed in a future release.\n */\n output_format?: BetaMessagesAPI.BetaJSONOutputFormat | null;\n\n /**\n * Determines whether to use priority capacity (if available) or standard capacity\n * for this request.\n *\n * PukuAI offers different levels of service for your API requests. See\n * [service-tiers](https://platform.puku.com/docs/en/api/service-tiers) for\n * details.\n */\n service_tier?: 'auto' | 'standard_only';\n\n /**\n * Inference speed mode. `fast` provides significantly faster output token\n * generation at premium pricing. Not all models support `fast`; invalid\n * combinations are rejected at create time.\n */\n speed?: 'standard' | 'fast' | null;\n\n /**\n * Custom text sequences that will cause the model to stop generating.\n *\n * Our models will normally stop when they have naturally completed their turn,\n * which will result in a response `stop_reason` of `\"end_turn\"`.\n *\n * If you want the model to stop generating when it encounters custom strings of\n * text, you can use the `stop_sequences` parameter. If the model encounters one of\n * the custom sequences, the response `stop_reason` value will be `\"stop_sequence\"`\n * and the response `stop_sequence` value will contain the matched stop sequence.\n */\n stop_sequences?: Array<string>;\n\n /**\n * Whether to incrementally stream the response using server-sent events.\n *\n * See [streaming](https://platform.puku.com/docs/en/build-with-puku/streaming)\n * for details.\n */\n stream?: boolean;\n\n /**\n * System prompt.\n *\n * A system prompt is a way of providing context and instructions to Puku, such\n * as specifying a particular goal or role. See our\n * [guide to system prompts](https://platform.puku.com/docs/en/build-with-puku/prompt-engineering/puku-prompting-best-practices#give-puku-a-role).\n */\n system?: string | Array<BetaMessagesAPI.BetaTextBlockParam>;\n\n /**\n * @deprecated Deprecated. Models released after Puku Opus 4.6 do not support\n * setting temperature. A value of 1.0 of will be accepted for backwards\n * compatibility, all other values will be rejected with a 400 error.\n */\n temperature?: number;\n\n /**\n * Configuration for enabling Puku's extended thinking.\n *\n * When enabled, responses include `thinking` content blocks showing Puku's\n * thinking process before the final answer. Requires a minimum budget of 1,024\n * tokens and counts towards your `max_tokens` limit.\n *\n * See\n * [extended thinking](https://platform.puku.com/docs/en/build-with-puku/extended-thinking)\n * for details.\n */\n thinking?: BetaMessagesAPI.BetaThinkingConfigParam;\n\n /**\n * How the model should use the provided tools. The model can use a specific tool,\n * any available tool, decide by itself, or not use tools at all.\n */\n tool_choice?: BetaMessagesAPI.BetaToolChoice;\n\n /**\n * Definitions of tools that the model may use.\n *\n * If you include `tools` in your API request, the model may return `tool_use`\n * content blocks that represent the model's use of those tools. You can then run\n * those tools using the tool input generated by the model and then optionally\n * return results back to the model using `tool_result` content blocks.\n *\n * There are two types of tools: **client tools** and **server tools**. The\n * behavior described below applies to client tools. For\n * [server tools](https://platform.puku.com/docs/en/agents-and-tools/tool-use/server-tools),\n * see their individual documentation as each has its own behavior (e.g., the\n * [web search tool](https://platform.puku.com/docs/en/agents-and-tools/tool-use/web-search-tool)).\n *\n * Each tool definition includes:\n *\n * - `name`: Name of the tool.\n * - `description`: Optional, but strongly-recommended description of the tool.\n * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the\n * tool `input` shape that the model will produce in `tool_use` output content\n * blocks.\n *\n * For example, if you defined `tools` as:\n *\n * ```json\n * [\n * {\n * \"name\": \"get_stock_price\",\n * \"description\": \"Get the current stock price for a given ticker symbol.\",\n * \"input_schema\": {\n * \"type\": \"object\",\n * \"properties\": {\n * \"ticker\": {\n * \"type\": \"string\",\n * \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n * }\n * },\n * \"required\": [\"ticker\"]\n * }\n * }\n * ]\n * ```\n *\n * And then asked the model \"What's the S&P 500 at today?\", the model might produce\n * `tool_use` content blocks in the response like this:\n *\n * ```json\n * [\n * {\n * \"type\": \"tool_use\",\n * \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n * \"name\": \"get_stock_price\",\n * \"input\": { \"ticker\": \"^GSPC\" }\n * }\n * ]\n * ```\n *\n * You might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an\n * input, and return the following back to the model in a subsequent `user`\n * message:\n *\n * ```json\n * [\n * {\n * \"type\": \"tool_result\",\n * \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n * \"content\": \"259.75 USD\"\n * }\n * ]\n * ```\n *\n * Tools can be used for workflows that include running client-side tools and\n * functions, or more generally whenever you want the model to produce a particular\n * JSON structure of output.\n *\n * See our\n * [guide](https://platform.puku.com/docs/en/agents-and-tools/tool-use/overview)\n * for more details.\n */\n tools?: Array<BetaMessagesAPI.BetaToolUnion>;\n\n /**\n * @deprecated Deprecated. Models released after Puku Opus 4.6 do not accept\n * top_k; any value will be rejected with a 400 error.\n */\n top_k?: number;\n\n /**\n * @deprecated Deprecated. Models released after Puku Opus 4.6 do not support\n * setting top_p. A value >= 0.99 will be accepted for backwards compatibility, all\n * other values will be rejected with a 400 error.\n */\n top_p?: number;\n }\n }\n}\n\nexport interface BatchRetrieveParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface BatchListParams extends PageParams {\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface BatchDeleteParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface BatchCancelParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface BatchResultsParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport declare namespace Batches {\n export {\n type BetaDeletedMessageBatch as BetaDeletedMessageBatch,\n type BetaMessageBatch as BetaMessageBatch,\n type BetaMessageBatchCanceledResult as BetaMessageBatchCanceledResult,\n type BetaMessageBatchErroredResult as BetaMessageBatchErroredResult,\n type BetaMessageBatchExpiredResult as BetaMessageBatchExpiredResult,\n type BetaMessageBatchIndividualResponse as BetaMessageBatchIndividualResponse,\n type BetaMessageBatchRequestCounts as BetaMessageBatchRequestCounts,\n type BetaMessageBatchResult as BetaMessageBatchResult,\n type BetaMessageBatchSucceededResult as BetaMessageBatchSucceededResult,\n type BetaMessageBatchesPage as BetaMessageBatchesPage,\n type BatchCreateParams as BatchCreateParams,\n type BatchRetrieveParams as BatchRetrieveParams,\n type BatchListParams as BatchListParams,\n type BatchDeleteParams as BatchDeleteParams,\n type BatchCancelParams as BatchCancelParams,\n type BatchResultsParams as BatchResultsParams,\n };\n}\n",
|
|
85
|
-
"// File containing shared constants\n\n/**\n * Model-specific timeout constraints for non-streaming requests\n */\nexport const MODEL_NONSTREAMING_TOKENS: Record<string, number> = {\n 'puku-
|
|
84
|
+
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { APIResource } from '../../../core/resource';\nimport * as BetaAPI from '../beta';\nimport { APIPromise } from '../../../core/api-promise';\nimport * as BetaMessagesAPI from './messages';\nimport { Page, type PageParams, PagePromise } from '../../../core/pagination';\nimport { buildHeaders } from '../../../internal/headers';\nimport { RequestOptions } from '../../../internal/request-options';\nimport { JSONLDecoder } from '../../../internal/decoders/jsonl';\nimport { PukuError } from '../../../error';\nimport { path } from '../../../internal/utils/path';\nimport * as MessagesApi from '../../messages/messages';\n\nexport class Batches extends APIResource {\n /**\n * Send a batch of Message creation requests.\n *\n * The Message Batches API can be used to process multiple Messages API requests at\n * once. Once a Message Batch is created, it begins processing immediately. Batches\n * can take up to 24 hours to complete.\n *\n * Learn more about the Message Batches API in our\n * [user guide](https://platform.puku.com/docs/en/build-with-puku/batch-processing)\n *\n * @example\n * ```ts\n * const betaMessageBatch =\n * await client.beta.messages.batches.create({\n * requests: [\n * {\n * custom_id: 'my-custom-id-1',\n * params: {\n * max_tokens: 1024,\n * messages: [\n * { content: 'Hello, world', role: 'user' },\n * ],\n * model: 'opus-4.8',\n * },\n * },\n * ],\n * });\n * ```\n */\n create(params: BatchCreateParams, options?: RequestOptions): APIPromise<BetaMessageBatch> {\n const { betas, user_profile_id, ...body } = params;\n return this._client.post('/v1/messages/batches?beta=true', {\n body,\n ...options,\n headers: buildHeaders([\n {\n 'puku-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),\n ...(user_profile_id != null ? { 'puku-user-profile-id': user_profile_id } : undefined),\n },\n options?.headers,\n ]),\n });\n }\n\n /**\n * This endpoint is idempotent and can be used to poll for Message Batch\n * completion. To access the results of a Message Batch, make a request to the\n * `results_url` field in the response.\n *\n * Learn more about the Message Batches API in our\n *\n *\n * @example\n * ```ts\n * const betaMessageBatch =\n * await client.beta.messages.batches.retrieve(\n * 'message_batch_id',\n * );\n * ```\n */\n retrieve(\n messageBatchID: string,\n params: BatchRetrieveParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaMessageBatch> {\n const { betas } = params ?? {};\n return this._client.get(path`/v1/messages/batches/${messageBatchID}?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * List all Message Batches within a Workspace. Most recently created batches are\n * returned first.\n *\n * Learn more about the Message Batches API in our\n * \n *\n * @example\n * ```ts\n * // Automatically fetches more pages as needed.\n * for await (const betaMessageBatch of client.beta.messages.batches.list()) {\n * // ...\n * }\n * ```\n */\n list(\n params: BatchListParams | null | undefined = {},\n options?: RequestOptions,\n ): PagePromise<BetaMessageBatchesPage, BetaMessageBatch> {\n const { betas, ...query } = params ?? {};\n return this._client.getAPIList('/v1/messages/batches?beta=true', Page<BetaMessageBatch>, {\n query,\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Delete a Message Batch.\n *\n * Message Batches can only be deleted once they've finished processing. If you'd\n * like to delete an in-progress batch, you must first cancel it.\n *\n * Learn more about the Message Batches API in our\n * \n *\n * @example\n * ```ts\n * const betaDeletedMessageBatch =\n * await client.beta.messages.batches.delete(\n * 'message_batch_id',\n * );\n * ```\n */\n delete(\n messageBatchID: string,\n params: BatchDeleteParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaDeletedMessageBatch> {\n const { betas } = params ?? {};\n return this._client.delete(path`/v1/messages/batches/${messageBatchID}?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Batches may be canceled any time before processing ends. Once cancellation is\n * initiated, the batch enters a `canceling` state, at which time the system may\n * complete any in-progress, non-interruptible requests before finalizing\n * cancellation.\n *\n * The number of canceled requests is specified in `request_counts`. To determine\n * which requests were canceled, check the individual results within the batch.\n * Note that cancellation may not result in any canceled requests if they were\n * non-interruptible.\n *\n * Learn more about the Message Batches API in our\n * \n *\n * @example\n * ```ts\n * const betaMessageBatch =\n * await client.beta.messages.batches.cancel(\n * 'message_batch_id',\n * );\n * ```\n */\n cancel(\n messageBatchID: string,\n params: BatchCancelParams | null | undefined = {},\n options?: RequestOptions,\n ): APIPromise<BetaMessageBatch> {\n const { betas } = params ?? {};\n return this._client.post(path`/v1/messages/batches/${messageBatchID}/cancel?beta=true`, {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString() },\n options?.headers,\n ]),\n });\n }\n\n /**\n * Streams the results of a Message Batch as a `.jsonl` file.\n *\n * Each line in the file is a JSON object containing the result of a single request\n * in the Message Batch. Results are not guaranteed to be in the same order as\n * requests. Use the `custom_id` field to match results to requests.\n *\n * Learn more about the Message Batches API in our\n * [user guide]\n *\n * @example\n * ```ts\n * const betaMessageBatchIndividualResponse =\n * await client.beta.messages.batches.results(\n * 'message_batch_id',\n * );\n * ```\n */\n async results(\n messageBatchID: string,\n params: BatchResultsParams | undefined = {},\n options?: RequestOptions,\n ): Promise<JSONLDecoder<BetaMessageBatchIndividualResponse>> {\n const batch = await this.retrieve(messageBatchID);\n if (!batch.results_url) {\n throw new PukuError(\n `No batch \\`results_url\\`; Has it finished processing? ${batch.processing_status} - ${batch.id}`,\n );\n }\n\n const { betas } = params ?? {};\n return this._client\n .get(batch.results_url, {\n ...options,\n headers: buildHeaders([\n {\n 'puku-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),\n Accept: 'application/binary',\n },\n options?.headers,\n ]),\n stream: true,\n __binaryResponse: true,\n })\n ._thenUnwrap((_, props) => JSONLDecoder.fromResponse(props.response, props.controller)) as APIPromise<\n JSONLDecoder<BetaMessageBatchIndividualResponse>\n >;\n }\n}\n\nexport type BetaMessageBatchesPage = Page<BetaMessageBatch>;\n\nexport interface BetaDeletedMessageBatch {\n /**\n * ID of the Message Batch.\n */\n id: string;\n\n /**\n * Deleted object type.\n *\n * For Message Batches, this is always `\"message_batch_deleted\"`.\n */\n type: 'message_batch_deleted';\n}\n\nexport interface BetaMessageBatch {\n /**\n * Unique object identifier.\n *\n * The format and length of IDs may change over time.\n */\n id: string;\n\n /**\n * RFC 3339 datetime string representing the time at which the Message Batch was\n * archived and its results became unavailable.\n */\n archived_at: string | null;\n\n /**\n * RFC 3339 datetime string representing the time at which cancellation was\n * initiated for the Message Batch. Specified only if cancellation was initiated.\n */\n cancel_initiated_at: string | null;\n\n /**\n * RFC 3339 datetime string representing the time at which the Message Batch was\n * created.\n */\n created_at: string;\n\n /**\n * RFC 3339 datetime string representing the time at which processing for the\n * Message Batch ended. Specified only once processing ends.\n *\n * Processing ends when every request in a Message Batch has either succeeded,\n * errored, canceled, or expired.\n */\n ended_at: string | null;\n\n /**\n * RFC 3339 datetime string representing the time at which the Message Batch will\n * expire and end processing, which is 24 hours after creation.\n */\n expires_at: string;\n\n /**\n * Processing status of the Message Batch.\n */\n processing_status: 'in_progress' | 'canceling' | 'ended';\n\n /**\n * Tallies requests within the Message Batch, categorized by their status.\n *\n * Requests start as `processing` and move to one of the other statuses only once\n * processing of the entire batch ends. The sum of all values always matches the\n * total number of requests in the batch.\n */\n request_counts: BetaMessageBatchRequestCounts;\n\n /**\n * URL to a `.jsonl` file containing the results of the Message Batch requests.\n * Specified only once processing ends.\n *\n * Results in the file are not guaranteed to be in the same order as requests. Use\n * the `custom_id` field to match results to requests.\n */\n results_url: string | null;\n\n /**\n * Object type.\n *\n * For Message Batches, this is always `\"message_batch\"`.\n */\n type: 'message_batch';\n}\n\nexport interface BetaMessageBatchCanceledResult {\n type: 'canceled';\n}\n\nexport interface BetaMessageBatchErroredResult {\n error: BetaAPI.BetaErrorResponse;\n\n type: 'errored';\n}\n\nexport interface BetaMessageBatchExpiredResult {\n type: 'expired';\n}\n\n/**\n * This is a single line in the response `.jsonl` file and does not represent the\n * response as a whole.\n */\nexport interface BetaMessageBatchIndividualResponse {\n /**\n * Developer-provided ID created for each request in a Message Batch. Useful for\n * matching results to requests, as results may be given out of request order.\n *\n * Must be unique for each request within the Message Batch.\n */\n custom_id: string;\n\n /**\n * Processing result for this request.\n *\n * Contains a Message output if processing was successful, an error response if\n * processing failed, or the reason why processing was not attempted, such as\n * cancellation or expiration.\n */\n result: BetaMessageBatchResult;\n}\n\nexport interface BetaMessageBatchRequestCounts {\n /**\n * Number of requests in the Message Batch that have been canceled.\n *\n * This is zero until processing of the entire Message Batch has ended.\n */\n canceled: number;\n\n /**\n * Number of requests in the Message Batch that encountered an error.\n *\n * This is zero until processing of the entire Message Batch has ended.\n */\n errored: number;\n\n /**\n * Number of requests in the Message Batch that have expired.\n *\n * This is zero until processing of the entire Message Batch has ended.\n */\n expired: number;\n\n /**\n * Number of requests in the Message Batch that are processing.\n */\n processing: number;\n\n /**\n * Number of requests in the Message Batch that have completed successfully.\n *\n * This is zero until processing of the entire Message Batch has ended.\n */\n succeeded: number;\n}\n\n/**\n * Processing result for this request.\n *\n * Contains a Message output if processing was successful, an error response if\n * processing failed, or the reason why processing was not attempted, such as\n * cancellation or expiration.\n */\nexport type BetaMessageBatchResult =\n | BetaMessageBatchSucceededResult\n | BetaMessageBatchErroredResult\n | BetaMessageBatchCanceledResult\n | BetaMessageBatchExpiredResult;\n\nexport interface BetaMessageBatchSucceededResult {\n message: BetaMessagesAPI.BetaMessage;\n\n type: 'succeeded';\n}\n\nexport interface BatchCreateParams {\n /**\n * Body param: List of requests for prompt completion. Each is an individual\n * request to create a Message.\n */\n requests: Array<BatchCreateParams.Request>;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n\n /**\n * Header param: The user profile ID to attribute the requests in this batch to.\n * Use when acting on behalf of a party other than your organization. Requires the\n * `user-profiles` beta header. Applies to every request in the batch; an\n * individual request whose `user_profile_id` body field conflicts with this header\n * is errored.\n */\n user_profile_id?: string;\n}\n\nexport namespace BatchCreateParams {\n export interface Request {\n /**\n * Developer-provided ID created for each request in a Message Batch. Useful for\n * matching results to requests, as results may be given out of request order.\n *\n * Must be unique for each request within the Message Batch.\n */\n custom_id: string;\n\n /**\n * Messages API creation parameters for the individual request.\n *\n * See the\n * [Messages API reference] for\n * full documentation on available parameters.\n */\n params: Request.Params;\n }\n\n export namespace Request {\n /**\n * Messages API creation parameters for the individual request.\n *\n * See the\n * [Messages API reference] for\n * full documentation on available parameters.\n */\n export interface Params {\n /**\n * The maximum number of tokens to generate before stopping.\n *\n * Note that our models may stop _before_ reaching this maximum. This parameter\n * only specifies the absolute maximum number of tokens to generate.\n *\n * Set to `0` to populate the\n * [prompt cache]\n * without generating a response.\n *\n * Different models have different maximum values for this parameter. See\n * [models] for\n * details.\n */\n max_tokens: number;\n\n /**\n * Input messages.\n *\n * Our models are trained to operate on alternating `user` and `assistant`\n * conversational turns. When creating a new `Message`, you specify the prior\n * conversational turns with the `messages` parameter, and the model then generates\n * the next `Message` in the conversation. Consecutive `user` or `assistant` turns\n * in your request will be combined into a single turn.\n *\n * Each input message must be an object with a `role` and `content`. You can\n * specify a single `user`-role message, or you can include multiple `user` and\n * `assistant` messages.\n *\n * If the final message uses the `assistant` role, the response content will\n * continue immediately from the content in that message. This can be used to\n * constrain part of the model's response.\n *\n * Example with a single `user` message:\n *\n * ```json\n * [{ \"role\": \"user\", \"content\": \"Hello, Puku\" }]\n * ```\n *\n * Example with multiple conversational turns:\n *\n * ```json\n * [\n * { \"role\": \"user\", \"content\": \"Hello there.\" },\n * { \"role\": \"assistant\", \"content\": \"Hi, I'm Puku. How can I help you?\" },\n * { \"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\" }\n * ]\n * ```\n *\n * Example with a partially-filled response from Puku:\n *\n * ```json\n * [\n * {\n * \"role\": \"user\",\n * \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"\n * },\n * { \"role\": \"assistant\", \"content\": \"The best answer is (\" }\n * ]\n * ```\n *\n * Each input message `content` may be either a single `string` or an array of\n * content blocks, where each block has a specific `type`. Using a `string` for\n * `content` is shorthand for an array of one content block of type `\"text\"`. The\n * following input messages are equivalent:\n *\n * ```json\n * { \"role\": \"user\", \"content\": \"Hello, Puku\" }\n * ```\n *\n * ```json\n * { \"role\": \"user\", \"content\": [{ \"type\": \"text\", \"text\": \"Hello, Puku\" }] }\n * ```\n *\n * See\n * [input examples]s\n *\n * Note that if you want to include a\n * [system prompt],\n * you can use the top-level `system` parameter — there is no `\"system\"` role for\n * input messages in the Messages API.\n *\n * There is a limit of 100,000 messages in a single request.\n */\n messages: Array<BetaMessagesAPI.BetaMessageParam>;\n\n /**\n * The model that will complete your prompt.\n *\n * See [models] for additional\n * details and options.\n */\n model: MessagesApi.Model;\n\n /**\n * Top-level cache control automatically applies a cache_control marker to the last\n * cacheable block in the request.\n */\n cache_control?: BetaMessagesAPI.BetaCacheControlEphemeral | null;\n\n /**\n * Container identifier for reuse across requests.\n */\n container?: BetaMessagesAPI.BetaContainerParams | string | null;\n\n /**\n * Context management configuration.\n *\n * This allows you to control how Puku manages context across multiple requests,\n * such as whether to clear function results or not.\n */\n context_management?: BetaMessagesAPI.BetaContextManagementConfig | null;\n\n /**\n * Request-level diagnostics. Currently carries the previous response id for\n * prompt-cache divergence reporting.\n */\n diagnostics?: BetaMessagesAPI.BetaDiagnosticsParam | null;\n\n /**\n * The `fallback_credit_token` from a prior refusal's `stop_details`.\n *\n * When a preceding request was refused and returned a `fallback_credit_token`,\n * pass that code here on the retry to have the retry's cache-creation tokens for\n * the prefix that was warm on the refused model billed at the cache-read rate.\n * Must be redeemed by the same organization and workspace, with the same request\n * body (optionally extended by one appended `assistant` message whose content is\n * the partial text — with any trailing whitespace stripped from the final text\n * block — and paired server-tool blocks streamed before the refusal; the\n * appended-assistant form is not available for requests with `output_format` set\n * or forced `tool_choice`), on an eligible fallback model, on the same platform,\n * and within 5 minutes of the refusal; a mismatch is a 400. A token minted\n * mid-server-tool-loop whose partial content was continuable may only be redeemed\n * with the appended-assistant form — if an exact-body retry is rejected with a 400\n * saying the token must be redeemed by continuing the partial response, retry with\n * the appended-assistant form instead.\n *\n * When the appended-assistant form is used on a model that otherwise disallows\n * assistant-turn prefill, this token also authorizes that one prefill.\n */\n fallback_credit_token?: string | BetaMessagesAPI.BetaFallbackCreditTokenParam | null;\n\n /**\n * Opt-in server-side retry on one or more substitute models when the requested\n * model declines for policy reasons. Tried in order: if the first entry also\n * declines, the second is tried, and so on. The string \"default\" requests the\n * requested model's server-defined default fallback configuration.\n */\n fallbacks?: BetaMessagesAPI.BetaFallbacksParam | null;\n\n /**\n * Specifies the geographic region for inference processing. If not specified, the\n * workspace's `default_inference_geo` is used.\n */\n inference_geo?: string | null;\n\n /**\n * MCP servers to be utilized in this request\n */\n mcp_servers?: Array<BetaMessagesAPI.BetaRequestMCPServerURLDefinition>;\n\n /**\n * An object describing metadata about the request.\n */\n metadata?: BetaMessagesAPI.BetaMetadata;\n\n /**\n * Configuration options for the model's output, such as the output format.\n */\n output_config?: BetaMessagesAPI.BetaOutputConfig;\n\n /**\n * @deprecated Deprecated: Use `output_config.format` instead. See\n * [structured outputs]\n *\n * A schema to specify Puku's output format in responses. This parameter will be\n * removed in a future release.\n */\n output_format?: BetaMessagesAPI.BetaJSONOutputFormat | null;\n\n /**\n * Determines whether to use priority capacity (if available) or standard capacity\n * for this request.\n *\n * PukuAI offers different levels of service for your API requests. See\n * [service-tiers] for\n * details.\n */\n service_tier?: 'auto' | 'standard_only';\n\n /**\n * Inference speed mode. `fast` provides significantly faster output token\n * generation at premium pricing. Not all models support `fast`; invalid\n * combinations are rejected at create time.\n */\n speed?: 'standard' | 'fast' | null;\n\n /**\n * Custom text sequences that will cause the model to stop generating.\n *\n * Our models will normally stop when they have naturally completed their turn,\n * which will result in a response `stop_reason` of `\"end_turn\"`.\n *\n * If you want the model to stop generating when it encounters custom strings of\n * text, you can use the `stop_sequences` parameter. If the model encounters one of\n * the custom sequences, the response `stop_reason` value will be `\"stop_sequence\"`\n * and the response `stop_sequence` value will contain the matched stop sequence.\n */\n stop_sequences?: Array<string>;\n\n /**\n * Whether to incrementally stream the response using server-sent events.\n *\n * See [streaming]\n * for details.\n */\n stream?: boolean;\n\n /**\n * System prompt.\n *\n * A system prompt is a way of providing context and instructions to Puku, such\n * as specifying a particular goal or role. See our\n * [guide to system prompts].\n */\n system?: string | Array<BetaMessagesAPI.BetaTextBlockParam>;\n\n /**\n * @deprecated Deprecated. Models released after Puku Opus 4.6 do not support\n * setting temperature. A value of 1.0 of will be accepted for backwards\n * compatibility, all other values will be rejected with a 400 error.\n */\n temperature?: number;\n\n /**\n * Configuration for enabling Puku's extended thinking.\n *\n * When enabled, responses include `thinking` content blocks showing Puku's\n * thinking process before the final answer. Requires a minimum budget of 1,024\n * tokens and counts towards your `max_tokens` limit.\n *\n * See\n * [extended thinking]\n * for details.\n */\n thinking?: BetaMessagesAPI.BetaThinkingConfigParam;\n\n /**\n * How the model should use the provided tools. The model can use a specific tool,\n * any available tool, decide by itself, or not use tools at all.\n */\n tool_choice?: BetaMessagesAPI.BetaToolChoice;\n\n /**\n * Definitions of tools that the model may use.\n *\n * If you include `tools` in your API request, the model may return `tool_use`\n * content blocks that represent the model's use of those tools. You can then run\n * those tools using the tool input generated by the model and then optionally\n * return results back to the model using `tool_result` content blocks.\n *\n * There are two types of tools: **client tools** and **server tools**. The\n * behavior described below applies to client tools. For\n * [server tools],\n * see their individual documentation as each has its own behavior (e.g., the\n * [web search tool]).\n *\n * Each tool definition includes:\n *\n * - `name`: Name of the tool.\n * - `description`: Optional, but strongly-recommended description of the tool.\n * - `input_schema`: [JSON schema] for the\n * tool `input` shape that the model will produce in `tool_use` output content\n * blocks.\n *\n * For example, if you defined `tools` as:\n *\n * ```json\n * [\n * {\n * \"name\": \"get_stock_price\",\n * \"description\": \"Get the current stock price for a given ticker symbol.\",\n * \"input_schema\": {\n * \"type\": \"object\",\n * \"properties\": {\n * \"ticker\": {\n * \"type\": \"string\",\n * \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n * }\n * },\n * \"required\": [\"ticker\"]\n * }\n * }\n * ]\n * ```\n *\n * And then asked the model \"What's the S&P 500 at today?\", the model might produce\n * `tool_use` content blocks in the response like this:\n *\n * ```json\n * [\n * {\n * \"type\": \"tool_use\",\n * \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n * \"name\": \"get_stock_price\",\n * \"input\": { \"ticker\": \"^GSPC\" }\n * }\n * ]\n * ```\n *\n * You might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an\n * input, and return the following back to the model in a subsequent `user`\n * message:\n *\n * ```json\n * [\n * {\n * \"type\": \"tool_result\",\n * \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n * \"content\": \"259.75 USD\"\n * }\n * ]\n * ```\n *\n * Tools can be used for workflows that include running client-side tools and\n * functions, or more generally whenever you want the model to produce a particular\n * JSON structure of output.\n *\n * See our\n * [guide]\n * for more details.\n */\n tools?: Array<BetaMessagesAPI.BetaToolUnion>;\n\n /**\n * @deprecated Deprecated. Models released after Puku Opus 4.6 do not accept\n * top_k; any value will be rejected with a 400 error.\n */\n top_k?: number;\n\n /**\n * @deprecated Deprecated. Models released after Puku Opus 4.6 do not support\n * setting top_p. A value >= 0.99 will be accepted for backwards compatibility, all\n * other values will be rejected with a 400 error.\n */\n top_p?: number;\n }\n }\n}\n\nexport interface BatchRetrieveParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface BatchListParams extends PageParams {\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface BatchDeleteParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface BatchCancelParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport interface BatchResultsParams {\n /**\n * Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n}\n\nexport declare namespace Batches {\n export {\n type BetaDeletedMessageBatch as BetaDeletedMessageBatch,\n type BetaMessageBatch as BetaMessageBatch,\n type BetaMessageBatchCanceledResult as BetaMessageBatchCanceledResult,\n type BetaMessageBatchErroredResult as BetaMessageBatchErroredResult,\n type BetaMessageBatchExpiredResult as BetaMessageBatchExpiredResult,\n type BetaMessageBatchIndividualResponse as BetaMessageBatchIndividualResponse,\n type BetaMessageBatchRequestCounts as BetaMessageBatchRequestCounts,\n type BetaMessageBatchResult as BetaMessageBatchResult,\n type BetaMessageBatchSucceededResult as BetaMessageBatchSucceededResult,\n type BetaMessageBatchesPage as BetaMessageBatchesPage,\n type BatchCreateParams as BatchCreateParams,\n type BatchRetrieveParams as BatchRetrieveParams,\n type BatchListParams as BatchListParams,\n type BatchDeleteParams as BatchDeleteParams,\n type BatchCancelParams as BatchCancelParams,\n type BatchResultsParams as BatchResultsParams,\n };\n}\n",
|
|
85
|
+
"// File containing shared constants\n\n/**\n * Model-specific timeout constraints for non-streaming requests\n */\nexport const MODEL_NONSTREAMING_TOKENS: Record<string, number> = {\n 'puku-ai-2.7': 8192,\n 'puku-ai-2.8': 8192,\n 'opus-4.8': 8192,\n};\n",
|
|
86
86
|
"import type { Logger } from '../client';\nimport { PukuError } from '../core/error';\nimport {\n BetaContentBlock,\n BetaJSONOutputFormat,\n BetaMessage,\n BetaOutputConfig,\n BetaTextBlock,\n MessageCreateParams,\n} from '../resources/beta/messages/messages';\n\n// vendored from typefest just to make things look a bit nicer on hover\ntype Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};\n\ntype AutoParseableBetaOutputConfig = Omit<BetaOutputConfig, 'format'> & {\n format?: BetaJSONOutputFormat | AutoParseableBetaOutputFormat<any> | null;\n};\n\nexport type BetaParseableMessageCreateParams = Simplify<\n Omit<MessageCreateParams, 'output_format' | 'output_config'> & {\n /**\n * @deprecated Use `output_config.format` instead. This parameter will be removed in a future\n * release.\n */\n output_format?: BetaJSONOutputFormat | AutoParseableBetaOutputFormat<any> | null;\n output_config?: AutoParseableBetaOutputConfig | null;\n }\n>;\n\nexport type ExtractParsedContentFromBetaParams<Params extends BetaParseableMessageCreateParams> =\n Params['output_format'] extends AutoParseableBetaOutputFormat<infer P> ? P\n : Params['output_config'] extends { format: AutoParseableBetaOutputFormat<infer P> } ? P\n : null;\n\nexport type AutoParseableBetaOutputFormat<ParsedT> = BetaJSONOutputFormat & {\n parse(content: string): ParsedT;\n};\n\nexport type ParsedBetaMessage<ParsedT> = BetaMessage & {\n content: Array<ParsedBetaContentBlock<ParsedT>>;\n parsed_output: ParsedT | null;\n};\n\nexport type ParsedBetaContentBlock<ParsedT> =\n | (BetaTextBlock & { parsed_output: ParsedT | null })\n | Exclude<BetaContentBlock, BetaTextBlock>;\n\nfunction getOutputFormat(\n params: BetaParseableMessageCreateParams | null,\n): BetaJSONOutputFormat | AutoParseableBetaOutputFormat<any> | null | undefined {\n // Prefer output_format (deprecated) over output_config.format for backward compatibility\n return params?.output_format ?? params?.output_config?.format;\n}\n\nexport function maybeParseBetaMessage<Params extends BetaParseableMessageCreateParams | null>(\n message: BetaMessage,\n params: Params,\n opts: { logger: Logger },\n): ParsedBetaMessage<ExtractParsedContentFromBetaParams<NonNullable<Params>>> {\n const outputFormat = getOutputFormat(params);\n if (!params || !('parse' in (outputFormat ?? {}))) {\n return {\n ...message,\n content: message.content.map((block) => {\n if (block.type === 'text') {\n const parsedBlock = Object.defineProperty({ ...block }, 'parsed_output', {\n value: null,\n enumerable: false,\n }) as ParsedBetaContentBlock<ExtractParsedContentFromBetaParams<NonNullable<Params>>>;\n\n return Object.defineProperty(parsedBlock, 'parsed', {\n get() {\n opts.logger.warn(\n 'The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead.',\n );\n return null;\n },\n enumerable: false,\n });\n }\n return block;\n }),\n parsed_output: null,\n } as ParsedBetaMessage<ExtractParsedContentFromBetaParams<NonNullable<Params>>>;\n }\n\n return parseBetaMessage(message, params, opts);\n}\n\nexport function parseBetaMessage<Params extends BetaParseableMessageCreateParams>(\n message: BetaMessage,\n params: Params,\n opts: { logger: Logger },\n): ParsedBetaMessage<ExtractParsedContentFromBetaParams<Params>> {\n let firstParsedOutput: ReturnType<typeof parseBetaOutputFormat<Params>> | null = null;\n\n const content: Array<ParsedBetaContentBlock<ExtractParsedContentFromBetaParams<Params>>> =\n message.content.map((block) => {\n if (block.type === 'text') {\n const parsedOutput = parseBetaOutputFormat(params, block.text);\n\n if (firstParsedOutput === null) {\n firstParsedOutput = parsedOutput;\n }\n\n const parsedBlock = Object.defineProperty({ ...block }, 'parsed_output', {\n value: parsedOutput,\n enumerable: false,\n }) as ParsedBetaContentBlock<ExtractParsedContentFromBetaParams<Params>>;\n return Object.defineProperty(parsedBlock, 'parsed', {\n get() {\n opts.logger.warn(\n 'The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead.',\n );\n return parsedOutput;\n },\n enumerable: false,\n });\n }\n return block;\n });\n\n return {\n ...message,\n content,\n parsed_output: firstParsedOutput,\n } as ParsedBetaMessage<ExtractParsedContentFromBetaParams<Params>>;\n}\n\nfunction parseBetaOutputFormat<Params extends BetaParseableMessageCreateParams>(\n params: Params,\n content: string,\n): ExtractParsedContentFromBetaParams<Params> | null {\n const outputFormat = getOutputFormat(params);\n if (outputFormat?.type !== 'json_schema') {\n return null;\n }\n\n try {\n if ('parse' in outputFormat) {\n return outputFormat.parse(content);\n }\n\n return JSON.parse(content);\n } catch (error) {\n throw new PukuError(`Failed to parse structured output: ${error}`);\n }\n}\n",
|
|
87
87
|
"/** @deprecated Import from ./core/streaming instead */\nexport * from './core/streaming';\n",
|
|
88
88
|
"type Token = {\n type: string;\n value: string;\n};\n\nconst tokenize = (input: string): Token[] => {\n let current = 0;\n let tokens: Token[] = [];\n\n while (current < input.length) {\n let char = input[current];\n\n if (char === '\\\\') {\n current++;\n continue;\n }\n\n if (char === '{') {\n tokens.push({\n type: 'brace',\n value: '{',\n });\n\n current++;\n continue;\n }\n\n if (char === '}') {\n tokens.push({\n type: 'brace',\n value: '}',\n });\n\n current++;\n continue;\n }\n\n if (char === '[') {\n tokens.push({\n type: 'paren',\n value: '[',\n });\n\n current++;\n continue;\n }\n\n if (char === ']') {\n tokens.push({\n type: 'paren',\n value: ']',\n });\n\n current++;\n continue;\n }\n\n if (char === ':') {\n tokens.push({\n type: 'separator',\n value: ':',\n });\n\n current++;\n continue;\n }\n\n if (char === ',') {\n tokens.push({\n type: 'delimiter',\n value: ',',\n });\n\n current++;\n continue;\n }\n\n if (char === '\"') {\n let value = '';\n let danglingQuote = false;\n\n char = input[++current];\n\n while (char !== '\"') {\n if (current === input.length) {\n danglingQuote = true;\n break;\n }\n\n if (char === '\\\\') {\n current++;\n if (current === input.length) {\n danglingQuote = true;\n break;\n }\n value += char + input[current];\n char = input[++current];\n } else {\n value += char;\n char = input[++current];\n }\n }\n\n char = input[++current];\n\n if (!danglingQuote) {\n tokens.push({\n type: 'string',\n value,\n });\n }\n continue;\n }\n\n let WHITESPACE = /\\s/;\n if (char && WHITESPACE.test(char)) {\n current++;\n continue;\n }\n\n let NUMBERS = /[0-9]/;\n if ((char && NUMBERS.test(char)) || char === '-' || char === '.') {\n let value = '';\n\n if (char === '-') {\n value += char;\n char = input[++current];\n }\n\n while ((char && NUMBERS.test(char)) || char === '.') {\n value += char;\n char = input[++current];\n }\n\n tokens.push({\n type: 'number',\n value,\n });\n continue;\n }\n\n let LETTERS = /[a-z]/i;\n if (char && LETTERS.test(char)) {\n let value = '';\n\n while (char && LETTERS.test(char)) {\n if (current === input.length) {\n break;\n }\n value += char;\n char = input[++current];\n }\n\n if (value == 'true' || value == 'false' || value === 'null') {\n tokens.push({\n type: 'name',\n value,\n });\n } else {\n // unknown token, e.g. `nul` which isn't quite `null`\n current++;\n continue;\n }\n continue;\n }\n\n current++;\n }\n\n return tokens;\n },\n strip = (tokens: Token[]): Token[] => {\n if (tokens.length === 0) {\n return tokens;\n }\n\n let lastToken = tokens[tokens.length - 1]!;\n\n switch (lastToken.type) {\n case 'separator':\n tokens = tokens.slice(0, tokens.length - 1);\n return strip(tokens);\n break;\n case 'number':\n let lastCharacterOfLastToken = lastToken.value[lastToken.value.length - 1];\n if (lastCharacterOfLastToken === '.' || lastCharacterOfLastToken === '-') {\n tokens = tokens.slice(0, tokens.length - 1);\n return strip(tokens);\n }\n case 'string':\n let tokenBeforeTheLastToken = tokens[tokens.length - 2];\n if (tokenBeforeTheLastToken?.type === 'delimiter') {\n tokens = tokens.slice(0, tokens.length - 1);\n return strip(tokens);\n } else if (tokenBeforeTheLastToken?.type === 'brace' && tokenBeforeTheLastToken.value === '{') {\n tokens = tokens.slice(0, tokens.length - 1);\n return strip(tokens);\n }\n break;\n case 'delimiter':\n tokens = tokens.slice(0, tokens.length - 1);\n return strip(tokens);\n break;\n }\n\n return tokens;\n },\n unstrip = (tokens: Token[]): Token[] => {\n let tail: string[] = [];\n\n tokens.map((token) => {\n if (token.type === 'brace') {\n if (token.value === '{') {\n tail.push('}');\n } else {\n tail.splice(tail.lastIndexOf('}'), 1);\n }\n }\n if (token.type === 'paren') {\n if (token.value === '[') {\n tail.push(']');\n } else {\n tail.splice(tail.lastIndexOf(']'), 1);\n }\n }\n });\n\n if (tail.length > 0) {\n tail.reverse().map((item) => {\n if (item === '}') {\n tokens.push({\n type: 'brace',\n value: '}',\n });\n } else if (item === ']') {\n tokens.push({\n type: 'paren',\n value: ']',\n });\n }\n });\n }\n\n return tokens;\n },\n generate = (tokens: Token[]): string => {\n let output = '';\n\n tokens.map((token) => {\n switch (token.type) {\n case 'string':\n output += '\"' + token.value + '\"';\n break;\n default:\n output += token.value;\n break;\n }\n });\n\n return output;\n },\n partialParse = (input: string): unknown => JSON.parse(generate(unstrip(strip(tokenize(input)))));\n\nexport { partialParse };\n",
|
|
89
89
|
"import { partialParse } from '../_vendor/partial-json-parser/parser';\n\nexport const JSON_BUF_PROPERTY = '__json_buf';\n\n/**\n * Copies a tool-use block with an updated `__json_buf`, installing `.input` as\n * a memoized getter so the partial-JSON parse happens on first read instead of\n * on every delta.\n */\nexport function withLazyInput<T extends { input: unknown }>(prev: T, jsonBuf: string): T {\n const next = {} as T;\n for (const key of Object.keys(prev) as (keyof T)[]) {\n if (key !== 'input') next[key] = prev[key];\n }\n Object.defineProperty(next, JSON_BUF_PROPERTY, { value: jsonBuf, enumerable: false, writable: true });\n let input: unknown;\n let parsed = false;\n Object.defineProperty(next, 'input', {\n enumerable: true,\n configurable: true,\n get() {\n if (!parsed) {\n input = jsonBuf ? partialParse(jsonBuf) : {};\n parsed = true;\n }\n return input;\n },\n });\n return next;\n}\n",
|
|
90
90
|
"import { STAINLESS_HELPER_METHOD_HEADER } from '../internal/stainless-helper-header';\nimport type { Logger } from '../client';\nimport { PukuError, APIUserAbortError } from '../error';\nimport { isAbortError } from '../internal/errors';\nimport { checkNever } from '../internal/utils/values';\nimport { type RequestOptions } from '../internal/request-options';\nimport {\n type BetaContentBlock,\n type BetaMCPToolUseBlock,\n type BetaMessage,\n type BetaMessageParam,\n Messages as BetaMessages,\n type BetaRawMessageStreamEvent as BetaMessageStreamEvent,\n type BetaServerToolUseBlock,\n type BetaTextBlock,\n type BetaTextCitation,\n type BetaToolUseBlock,\n type MessageCreateParams,\n type MessageCreateParamsBase,\n MessageCreateParamsStreaming,\n} from '../resources/beta/messages/messages';\nimport { Stream } from '../streaming';\nimport { maybeParseBetaMessage, type ParsedBetaMessage } from './beta-parser';\nimport { JSON_BUF_PROPERTY, withLazyInput } from '../internal/message-stream-utils';\n\nexport interface MessageStreamEvents {\n connect: () => void;\n streamEvent: (event: BetaMessageStreamEvent, snapshot: BetaMessage) => void;\n text: (textDelta: string, textSnapshot: string) => void;\n citation: (citation: BetaTextCitation, citationsSnapshot: BetaTextCitation[]) => void;\n inputJson: (partialJson: string, jsonSnapshot: unknown) => void;\n thinking: (thinkingDelta: string, thinkingSnapshot: string) => void;\n signature: (signature: string) => void;\n compaction: (compactedContent: string) => void;\n message: (message: BetaMessage) => void;\n contentBlock: (content: BetaContentBlock) => void;\n finalMessage: (message: BetaMessage) => void;\n error: (error: PukuError) => void;\n abort: (error: APIUserAbortError) => void;\n end: () => void;\n}\n\ntype MessageStreamEventListeners<Event extends keyof MessageStreamEvents> = {\n listener: MessageStreamEvents[Event];\n once?: boolean;\n}[];\n\nexport type TracksToolInput = BetaToolUseBlock | BetaServerToolUseBlock | BetaMCPToolUseBlock;\n\nfunction tracksToolInput(content: BetaContentBlock): content is TracksToolInput {\n return content.type === 'tool_use' || content.type === 'server_tool_use' || content.type === 'mcp_tool_use';\n}\n\nexport class BetaMessageStream<ParsedT = null> implements AsyncIterable<BetaMessageStreamEvent> {\n messages: BetaMessageParam[] = [];\n receivedMessages: ParsedBetaMessage<ParsedT>[] = [];\n #currentMessageSnapshot: BetaMessage | undefined;\n #params: MessageCreateParams | null = null;\n\n controller: AbortController = new AbortController();\n\n #connectedPromise: Promise<Response | null>;\n #resolveConnectedPromise: (response: Response | null) => void = () => {};\n #rejectConnectedPromise: (error: PukuError) => void = () => {};\n\n #endPromise: Promise<void>;\n #resolveEndPromise: () => void = () => {};\n #rejectEndPromise: (error: PukuError) => void = () => {};\n\n #listeners: { [Event in keyof MessageStreamEvents]?: MessageStreamEventListeners<Event> } = {};\n\n #ended = false;\n #errored = false;\n #aborted = false;\n #catchingPromiseCreated = false;\n #response: Response | null | undefined;\n #request_id: string | null | undefined;\n #workspace_id: string | null | undefined;\n #logger: Logger;\n\n constructor(params: MessageCreateParamsBase | null, opts?: { logger?: Logger | undefined }) {\n this.#connectedPromise = new Promise<Response | null>((resolve, reject) => {\n this.#resolveConnectedPromise = resolve;\n this.#rejectConnectedPromise = reject;\n });\n\n this.#endPromise = new Promise<void>((resolve, reject) => {\n this.#resolveEndPromise = resolve;\n this.#rejectEndPromise = reject;\n });\n\n // Don't let these promises cause unhandled rejection errors.\n // we will manually cause an unhandled rejection error later\n // if the user hasn't registered any error listener or called\n // any promise-returning method.\n this.#connectedPromise.catch(() => {});\n this.#endPromise.catch(() => {});\n\n this.#params = params;\n this.#logger = opts?.logger ?? console;\n }\n\n get response(): Response | null | undefined {\n return this.#response;\n }\n\n get request_id(): string | null | undefined {\n return this.#request_id;\n }\n\n get workspace_id(): string | null | undefined {\n return this.#workspace_id;\n }\n\n /**\n * Returns the `MessageStream` data, the raw `Response` instance and the ID of the request,\n * returned vie the `request-id` header which is useful for debugging requests and resporting\n * issues to PukuAI.\n *\n * This is the same as the `APIPromise.withResponse()` method.\n *\n * This method will raise an error if you created the stream using `MessageStream.fromReadableStream`\n * as no `Response` is available.\n */\n async withResponse(): Promise<{\n data: BetaMessageStream<ParsedT>;\n response: Response;\n request_id: string | null | undefined;\n workspace_id: string | null | undefined;\n }> {\n this.#catchingPromiseCreated = true;\n\n const response = await this.#connectedPromise;\n if (!response) {\n throw new Error('Could not resolve a `Response` object');\n }\n\n return {\n data: this,\n response,\n request_id: response.headers.get('request-id'),\n workspace_id: response.headers.get('puku-workspace-id'),\n };\n }\n\n /**\n * Intended for use on the frontend, consuming a stream produced with\n * `.toReadableStream()` on the backend.\n *\n * Note that messages sent to the model do not appear in `.on('message')`\n * in this context.\n */\n static fromReadableStream(stream: ReadableStream): BetaMessageStream {\n const runner = new BetaMessageStream(null);\n runner._run(() => runner._fromReadableStream(stream));\n return runner;\n }\n\n static createMessage<ParsedT>(\n messages: BetaMessages,\n params: MessageCreateParamsBase,\n options?: RequestOptions,\n { logger }: { logger?: Logger | undefined } = {},\n ): BetaMessageStream<ParsedT> {\n const runner = new BetaMessageStream<ParsedT>(params as MessageCreateParamsStreaming, { logger });\n for (const message of params.messages) {\n runner._addMessageParam(message);\n }\n runner.#params = { ...params, stream: true };\n runner._run(() =>\n runner._createMessage(\n messages,\n { ...params, stream: true },\n { ...options, headers: { ...options?.headers, [STAINLESS_HELPER_METHOD_HEADER]: 'stream' } },\n ),\n );\n return runner;\n }\n\n protected _run(executor: () => Promise<any>) {\n executor().then(() => {\n this._emitFinal();\n this._emit('end');\n }, this.#handleError);\n }\n\n protected _addMessageParam(message: BetaMessageParam) {\n this.messages.push(message);\n }\n\n protected _addMessage(message: ParsedBetaMessage<ParsedT>, emit = true) {\n this.receivedMessages.push(message);\n if (emit) {\n this._emit('message', message);\n }\n }\n\n protected async _createMessage(\n messages: BetaMessages,\n params: MessageCreateParams,\n options?: RequestOptions,\n ): Promise<void> {\n const signal = options?.signal;\n let abortHandler: (() => void) | undefined;\n if (signal) {\n if (signal.aborted) this.controller.abort();\n abortHandler = this.controller.abort.bind(this.controller);\n signal.addEventListener('abort', abortHandler);\n }\n try {\n this.#beginRequest();\n const { response, data: stream } = await messages\n .create({ ...params, stream: true }, { ...options, signal: this.controller.signal })\n .withResponse();\n this._connected(response);\n for await (const event of stream) {\n this.#addStreamEvent(event);\n }\n if (stream.controller.signal?.aborted) {\n throw new APIUserAbortError();\n }\n this.#endRequest();\n } finally {\n if (signal && abortHandler) {\n signal.removeEventListener('abort', abortHandler);\n }\n }\n }\n\n protected _connected(response: Response | null) {\n if (this.ended) return;\n this.#response = response;\n this.#request_id = response?.headers.get('request-id');\n this.#workspace_id = response?.headers.get('puku-workspace-id');\n this.#resolveConnectedPromise(response);\n this._emit('connect');\n }\n\n get ended(): boolean {\n return this.#ended;\n }\n\n get errored(): boolean {\n return this.#errored;\n }\n\n get aborted(): boolean {\n return this.#aborted;\n }\n\n abort() {\n this.controller.abort();\n }\n\n /**\n * Adds the listener function to the end of the listeners array for the event.\n * No checks are made to see if the listener has already been added. Multiple calls passing\n * the same combination of event and listener will result in the listener being added, and\n * called, multiple times.\n * @returns this MessageStream, so that calls can be chained\n */\n on<Event extends keyof MessageStreamEvents>(event: Event, listener: MessageStreamEvents[Event]): this {\n const listeners: MessageStreamEventListeners<Event> =\n this.#listeners[event] || (this.#listeners[event] = []);\n listeners.push({ listener });\n return this;\n }\n\n /**\n * Removes the specified listener from the listener array for the event.\n * off() will remove, at most, one instance of a listener from the listener array. If any single\n * listener has been added multiple times to the listener array for the specified event, then\n * off() must be called multiple times to remove each instance.\n * @returns this MessageStream, so that calls can be chained\n */\n off<Event extends keyof MessageStreamEvents>(event: Event, listener: MessageStreamEvents[Event]): this {\n const listeners = this.#listeners[event];\n if (!listeners) return this;\n const index = listeners.findIndex((l) => l.listener === listener);\n if (index >= 0) listeners.splice(index, 1);\n return this;\n }\n\n /**\n * Adds a one-time listener function for the event. The next time the event is triggered,\n * this listener is removed and then invoked.\n * @returns this MessageStream, so that calls can be chained\n */\n once<Event extends keyof MessageStreamEvents>(event: Event, listener: MessageStreamEvents[Event]): this {\n const listeners: MessageStreamEventListeners<Event> =\n this.#listeners[event] || (this.#listeners[event] = []);\n listeners.push({ listener, once: true });\n return this;\n }\n\n /**\n * This is similar to `.once()`, but returns a Promise that resolves the next time\n * the event is triggered, instead of calling a listener callback.\n * @returns a Promise that resolves the next time given event is triggered,\n * or rejects if an error is emitted. (If you request the 'error' event,\n * returns a promise that resolves with the error).\n *\n * Example:\n *\n * const message = await stream.emitted('message') // rejects if the stream errors\n */\n emitted<Event extends keyof MessageStreamEvents>(\n event: Event,\n ): Promise<\n Parameters<MessageStreamEvents[Event]> extends [infer Param] ? Param\n : Parameters<MessageStreamEvents[Event]> extends [] ? void\n : Parameters<MessageStreamEvents[Event]>\n > {\n return new Promise((resolve, reject) => {\n this.#catchingPromiseCreated = true;\n if (event !== 'error') this.once('error', reject);\n this.once(event, resolve as any);\n });\n }\n\n async done(): Promise<void> {\n this.#catchingPromiseCreated = true;\n await this.#endPromise;\n }\n\n get currentMessage(): BetaMessage | undefined {\n return this.#currentMessageSnapshot;\n }\n\n #getFinalMessage(): ParsedBetaMessage<ParsedT> {\n if (this.receivedMessages.length === 0) {\n throw new PukuError('stream ended without producing a Message with role=assistant');\n }\n return this.receivedMessages.at(-1)!;\n }\n\n /**\n * @returns a promise that resolves with the the final assistant Message response,\n * or rejects if an error occurred or the stream ended prematurely without producing a Message.\n * If structured outputs were used, this will be a ParsedMessage with a `parsed` field.\n */\n async finalMessage(): Promise<ParsedBetaMessage<ParsedT>> {\n await this.done();\n return this.#getFinalMessage();\n }\n\n #getFinalText(): string {\n if (this.receivedMessages.length === 0) {\n throw new PukuError('stream ended without producing a Message with role=assistant');\n }\n const textBlocks = this.receivedMessages\n .at(-1)!\n .content.filter((block): block is BetaTextBlock => block.type === 'text')\n .map((block) => block.text);\n if (textBlocks.length === 0) {\n throw new PukuError('stream ended without producing a content block with type=text');\n }\n return textBlocks.join(' ');\n }\n\n /**\n * @returns a promise that resolves with the the final assistant Message's text response, concatenated\n * together if there are more than one text blocks.\n * Rejects if an error occurred or the stream ended prematurely without producing a Message.\n */\n async finalText(): Promise<string> {\n await this.done();\n return this.#getFinalText();\n }\n\n #handleError = (error: unknown) => {\n this.#errored = true;\n if (isAbortError(error)) {\n error = new APIUserAbortError();\n }\n if (error instanceof APIUserAbortError) {\n this.#aborted = true;\n return this._emit('abort', error);\n }\n if (error instanceof PukuError) {\n return this._emit('error', error);\n }\n if (error instanceof Error) {\n const pukuError: PukuError = new PukuError(error.message);\n // @ts-ignore\n pukuError.cause = error;\n return this._emit('error', pukuError);\n }\n return this._emit('error', new PukuError(String(error)));\n };\n\n protected _emit<Event extends keyof MessageStreamEvents>(\n event: Event,\n ...args: Parameters<MessageStreamEvents[Event]>\n ) {\n // make sure we don't emit any MessageStreamEvents after end\n if (this.#ended) return;\n\n if (event === 'end') {\n this.#ended = true;\n this.#resolveEndPromise();\n }\n\n const listeners: MessageStreamEventListeners<Event> | undefined = this.#listeners[event];\n if (listeners) {\n this.#listeners[event] = listeners.filter((l) => !l.once) as any;\n listeners.forEach(({ listener }: any) => listener(...args));\n }\n\n if (event === 'abort') {\n const error = args[0] as APIUserAbortError;\n if (!this.#catchingPromiseCreated && !listeners?.length) {\n Promise.reject(error);\n }\n this.#rejectConnectedPromise(error);\n this.#rejectEndPromise(error);\n this._emit('end');\n return;\n }\n\n if (event === 'error') {\n // NOTE: _emit('error', error) should only be called from #handleError().\n\n const error = args[0] as PukuError;\n if (!this.#catchingPromiseCreated && !listeners?.length) {\n // Trigger an unhandled rejection if the user hasn't registered any error handlers.\n // If you are seeing stack traces here, make sure to handle errors via either:\n // - runner.on('error', () => ...)\n // - await runner.done()\n // - await runner.final...()\n // - etc.\n Promise.reject(error);\n }\n this.#rejectConnectedPromise(error);\n this.#rejectEndPromise(error);\n this._emit('end');\n }\n }\n\n protected _emitFinal() {\n const finalMessage = this.receivedMessages.at(-1);\n if (finalMessage) {\n this._emit('finalMessage', this.#getFinalMessage());\n }\n }\n\n #beginRequest() {\n if (this.ended) return;\n this.#currentMessageSnapshot = undefined;\n }\n #addStreamEvent(event: BetaMessageStreamEvent) {\n if (this.ended) return;\n const messageSnapshot = this.#accumulateMessage(event);\n this._emit('streamEvent', event, messageSnapshot);\n\n switch (event.type) {\n case 'content_block_delta': {\n const content = messageSnapshot.content.at(-1)!;\n switch (event.delta.type) {\n case 'text_delta': {\n if (content.type === 'text') {\n this._emit('text', event.delta.text, content.text || '');\n }\n break;\n }\n case 'citations_delta': {\n if (content.type === 'text') {\n this._emit('citation', event.delta.citation, content.citations ?? []);\n }\n break;\n }\n case 'input_json_delta': {\n if (tracksToolInput(content) && this.#listeners.inputJson?.length) {\n let jsonSnapshot: unknown;\n try {\n jsonSnapshot = content.input;\n } catch (err) {\n this.#handleError(this.#toolInputParseError(content, err));\n break;\n }\n this._emit('inputJson', event.delta.partial_json, jsonSnapshot);\n }\n break;\n }\n case 'thinking_delta': {\n if (content.type === 'thinking') {\n this._emit('thinking', event.delta.thinking, content.thinking);\n }\n break;\n }\n case 'signature_delta': {\n if (content.type === 'thinking') {\n this._emit('signature', content.signature);\n }\n break;\n }\n case 'compaction_delta': {\n if (content.type === 'compaction' && content.content) {\n this._emit('compaction', content.content);\n }\n break;\n }\n default:\n checkNever(event.delta);\n }\n break;\n }\n case 'message_stop': {\n this._addMessageParam(messageSnapshot);\n this._addMessage(\n maybeParseBetaMessage(messageSnapshot, this.#params, { logger: this.#logger }),\n true,\n );\n break;\n }\n case 'content_block_stop': {\n this._emit('contentBlock', messageSnapshot.content.at(-1)!);\n break;\n }\n case 'message_start': {\n this.#currentMessageSnapshot = messageSnapshot;\n break;\n }\n case 'content_block_start':\n case 'message_delta':\n break;\n }\n }\n #endRequest(): ParsedBetaMessage<ParsedT> {\n if (this.ended) {\n throw new PukuError(`stream has ended, this shouldn't happen`);\n }\n const snapshot = this.#currentMessageSnapshot;\n if (!snapshot) {\n throw new PukuError(`request ended without sending any chunks`);\n }\n this.#currentMessageSnapshot = undefined;\n return maybeParseBetaMessage(snapshot, this.#params, { logger: this.#logger });\n }\n\n protected async _fromReadableStream(\n readableStream: ReadableStream,\n options?: RequestOptions,\n ): Promise<void> {\n const signal = options?.signal;\n let abortHandler: (() => void) | undefined;\n if (signal) {\n if (signal.aborted) this.controller.abort();\n abortHandler = this.controller.abort.bind(this.controller);\n signal.addEventListener('abort', abortHandler);\n }\n try {\n this.#beginRequest();\n this._connected(null);\n const stream = Stream.fromReadableStream<BetaMessageStreamEvent>(readableStream, this.controller);\n for await (const event of stream) {\n this.#addStreamEvent(event);\n }\n if (stream.controller.signal?.aborted) {\n throw new APIUserAbortError();\n }\n this.#endRequest();\n } finally {\n if (signal && abortHandler) {\n signal.removeEventListener('abort', abortHandler);\n }\n }\n }\n\n /**\n * Mutates this.#currentMessage with the current event. Handling the accumulation of multiple messages\n * will be needed to be handled by the caller, this method will throw if you try to accumulate for multiple\n * messages.\n */\n #accumulateMessage(event: BetaMessageStreamEvent): BetaMessage {\n let snapshot = this.#currentMessageSnapshot;\n\n if (event.type === 'message_start') {\n if (snapshot) {\n throw new PukuError(`Unexpected event order, got ${event.type} before receiving \"message_stop\"`);\n }\n return event.message;\n }\n\n if (!snapshot) {\n throw new PukuError(`Unexpected event order, got ${event.type} before \"message_start\"`);\n }\n\n switch (event.type) {\n case 'message_stop':\n return snapshot;\n case 'message_delta':\n snapshot.stop_reason = event.delta.stop_reason;\n snapshot.stop_sequence = event.delta.stop_sequence;\n snapshot.stop_details = event.delta.stop_details;\n snapshot.usage.output_tokens = event.usage.output_tokens;\n\n if (event.delta.container != null) {\n snapshot.container = event.delta.container;\n }\n\n if (event.context_management != null) {\n snapshot.context_management = event.context_management;\n }\n\n if (event.input_transformations != null) {\n snapshot.input_transformations = event.input_transformations;\n }\n\n // The remaining usage counters are cumulative whole-message totals that are\n // omitted when they don't apply, so overwrite when present and never add.\n if (event.usage.input_tokens != null) {\n snapshot.usage.input_tokens = event.usage.input_tokens;\n }\n\n if (event.usage.cache_creation_input_tokens != null) {\n snapshot.usage.cache_creation_input_tokens = event.usage.cache_creation_input_tokens;\n }\n\n if (event.usage.cache_read_input_tokens != null) {\n snapshot.usage.cache_read_input_tokens = event.usage.cache_read_input_tokens;\n }\n\n if (event.usage.server_tool_use != null) {\n snapshot.usage.server_tool_use = event.usage.server_tool_use;\n }\n\n if (event.usage.iterations != null) {\n snapshot.usage.iterations = event.usage.iterations;\n }\n\n if (event.usage.fallback_credit != null) {\n snapshot.usage.fallback_credit = event.usage.fallback_credit;\n }\n\n if (event.usage.output_tokens_details != null) {\n snapshot.usage.output_tokens_details = event.usage.output_tokens_details;\n }\n\n return snapshot;\n case 'content_block_start':\n snapshot.content.push(event.content_block);\n if (event.content_block.type === 'fallback') {\n // the final hop's fallback block names the model that served the response —\n // keeps the snapshot consistent with the relabeled non-streaming message\n snapshot.model = event.content_block.to.model;\n }\n return snapshot;\n case 'content_block_delta': {\n const snapshotContent = snapshot.content.at(event.index);\n\n switch (event.delta.type) {\n case 'text_delta': {\n if (snapshotContent?.type === 'text') {\n snapshot.content[event.index] = {\n ...snapshotContent,\n text: (snapshotContent.text || '') + event.delta.text,\n };\n }\n break;\n }\n case 'citations_delta': {\n if (snapshotContent?.type === 'text') {\n snapshot.content[event.index] = {\n ...snapshotContent,\n citations: [...(snapshotContent.citations ?? []), event.delta.citation],\n };\n }\n break;\n }\n case 'input_json_delta': {\n if (snapshotContent && tracksToolInput(snapshotContent)) {\n const jsonBuf = ((snapshotContent as any)[JSON_BUF_PROPERTY] || '') + event.delta.partial_json;\n snapshot.content[event.index] = withLazyInput(snapshotContent, jsonBuf);\n }\n break;\n }\n case 'thinking_delta': {\n if (snapshotContent?.type === 'thinking') {\n snapshot.content[event.index] = {\n ...snapshotContent,\n thinking: snapshotContent.thinking + event.delta.thinking,\n };\n }\n break;\n }\n case 'signature_delta': {\n if (snapshotContent?.type === 'thinking') {\n snapshot.content[event.index] = {\n ...snapshotContent,\n signature: event.delta.signature,\n };\n }\n break;\n }\n case 'compaction_delta': {\n if (snapshotContent?.type === 'compaction') {\n snapshot.content[event.index] = {\n ...snapshotContent,\n content: (snapshotContent.content || '') + event.delta.content,\n encrypted_content: event.delta.encrypted_content,\n };\n }\n break;\n }\n default:\n checkNever(event.delta);\n }\n return snapshot;\n }\n case 'content_block_stop': {\n const snapshotContent = snapshot.content.at(event.index);\n if (snapshotContent && tracksToolInput(snapshotContent) && JSON_BUF_PROPERTY in snapshotContent) {\n let input: unknown;\n try {\n input = snapshotContent.input;\n } catch (err) {\n input = {};\n this.#handleError(this.#toolInputParseError(snapshotContent, err));\n }\n Object.defineProperty(snapshotContent, 'input', {\n value: input,\n enumerable: true,\n configurable: true,\n writable: true,\n });\n }\n return snapshot;\n }\n }\n }\n\n #toolInputParseError(block: TracksToolInput, err: unknown): PukuError {\n const jsonBuf = (block as any)[JSON_BUF_PROPERTY];\n return new PukuError(\n `Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${err}. JSON: ${jsonBuf}`,\n );\n }\n\n [Symbol.asyncIterator](): AsyncIterator<BetaMessageStreamEvent> {\n const pushQueue: BetaMessageStreamEvent[] = [];\n const readQueue: {\n resolve: (chunk: BetaMessageStreamEvent | undefined) => void;\n reject: (error: unknown) => void;\n }[] = [];\n let done = false;\n\n this.on('streamEvent', (event) => {\n const reader = readQueue.shift();\n if (reader) {\n reader.resolve(event);\n } else {\n pushQueue.push(event);\n }\n });\n\n this.on('end', () => {\n done = true;\n for (const reader of readQueue) {\n reader.resolve(undefined);\n }\n readQueue.length = 0;\n });\n\n this.on('abort', (err) => {\n done = true;\n for (const reader of readQueue) {\n reader.reject(err);\n }\n readQueue.length = 0;\n });\n\n this.on('error', (err) => {\n done = true;\n for (const reader of readQueue) {\n reader.reject(err);\n }\n readQueue.length = 0;\n });\n\n return {\n next: async (): Promise<IteratorResult<BetaMessageStreamEvent>> => {\n if (!pushQueue.length) {\n if (done) {\n return { value: undefined, done: true };\n }\n return new Promise<BetaMessageStreamEvent | undefined>((resolve, reject) =>\n readQueue.push({ resolve, reject }),\n ).then((chunk) => (chunk ? { value: chunk, done: false } : { value: undefined, done: true }));\n }\n const chunk = pushQueue.shift()!;\n return { value: chunk, done: false };\n },\n return: async () => {\n this.abort();\n return { value: undefined, done: true };\n },\n };\n }\n\n toReadableStream(): ReadableStream {\n const stream = new Stream(this[Symbol.asyncIterator].bind(this), this.controller);\n return stream.toReadableStream();\n }\n}\n",
|
|
91
|
-
"import { Model } from '../../resources';\n\nexport const DEFAULT_TOKEN_THRESHOLD = 100_000;\n\nexport const DEFAULT_SUMMARY_PROMPT = `You have been working on the task described above but have not yet completed it. Write a continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary. Your summary should be structured, concise, and actionable. Include:\n1. Task Overview\nThe user's core request and success criteria\nAny clarifications or constraints they specified\n2. Current State\nWhat has been completed so far\nFiles created, modified, or analyzed (with paths if relevant)\nKey outputs or artifacts produced\n3. Important Discoveries\nTechnical constraints or requirements uncovered\nDecisions made and their rationale\nErrors encountered and how they were resolved\nWhat approaches were tried that didn't work (and why)\n4. Next Steps\nSpecific actions needed to complete the task\nAny blockers or open questions to resolve\nPriority order if multiple steps remain\n5. Context to Preserve\nUser preferences or style requirements\nDomain-specific details that aren't obvious\nAny promises made to the user\nBe concise but complete—err on the side of including information that would prevent duplicate work or repeated mistakes. Write in a way that enables immediate resumption of the task.\nWrap your summary in <summary></summary> tags.`;\n\n/**\n * @deprecated Use server-side compaction instead by passing\n * `edits: [{ type: '
|
|
92
|
-
"import { BetaRunnableTool } from './BetaRunnableTool';\nimport { ToolError } from './ToolError';\nimport { PukuAI } from '../..';\nimport { PukuError } from '../../core/error';\nimport {\n BetaContentBlockParam,\n BetaMessage,\n BetaMessageParam,\n BetaRequestToolAdditionBlock,\n BetaRequestToolRemovalBlock,\n BetaStopReason,\n BetaToolChangeMCPToolReference,\n BetaToolChangeMCPToolsetReference,\n BetaToolChangeToolReference,\n BetaToolUnion,\n MessageCreateParams,\n} from '../../resources/beta';\nimport { BetaMessageStream } from '../BetaMessageStream';\nimport { RequestOptions } from '../../internal/request-options';\nimport { buildHeaders } from '../../internal/headers';\nimport { promiseWithResolvers } from '../../internal/utils/promise';\nimport { checkNever } from '../../internal/utils/values';\nimport { CompactionControl, DEFAULT_SUMMARY_PROMPT, DEFAULT_TOKEN_THRESHOLD } from './CompactionControl';\nimport {\n collectStainlessHelpers,\n helperHeader,\n STAINLESS_HELPER_HEADER,\n} from '../../internal/stainless-helper-header';\n\n/**\n * A ToolRunner handles the automatic conversation loop between the assistant and tools.\n *\n * A ToolRunner is an async iterable that yields either BetaMessage or BetaMessageStream objects\n * depending on the streaming configuration.\n */\nexport class BetaToolRunner<Stream extends boolean> {\n /** Whether the async iterator has been consumed */\n #consumed = false;\n /** Whether parameters have been mutated since the last API call */\n #mutated = false;\n /** Current state containing the request parameters */\n #state: { params: BetaToolRunnerParams };\n #options: BetaToolRunnerRequestOptions;\n /** Promise for the last message received from the assistant */\n #message?: Promise<BetaMessage> | undefined;\n /** Cached tool response to avoid redundant executions */\n #toolResponse?: Promise<BetaMessageParam | null> | undefined;\n /** Promise resolvers for waiting on completion */\n #completion: {\n promise: Promise<BetaMessage>;\n resolve: (value: BetaMessage) => void;\n reject: (reason?: any) => void;\n };\n /** Number of iterations (API requests) made so far */\n #iterationCount = 0;\n\n constructor(\n private client: PukuAI,\n params: BetaToolRunnerParams,\n options?: BetaToolRunnerRequestOptions,\n ) {\n this.#state = {\n params: {\n // You can't clone the entire params since there are functions as handlers.\n // You also don't really need to clone params.messages, but it probably will prevent a foot gun\n // somewhere.\n ...params,\n messages: structuredClone(params.messages),\n },\n };\n\n // structuredClone drops symbol-keyed properties, so collect helper marks\n // from the original params here — the create()-side collector won't see\n // them on the cloned messages.\n const collected = collectStainlessHelpers(params.tools, params.messages);\n this.#options = {\n ...options,\n headers: buildHeaders([\n helperHeader('BetaToolRunner'),\n collected.length ? { [STAINLESS_HELPER_HEADER]: collected.join(', ') } : undefined,\n options?.headers,\n ]),\n };\n this.#completion = promiseWithResolvers();\n\n if (params.compactionControl?.enabled) {\n console.warn(\n 'Puku: The `compactionControl` parameter is deprecated and will be removed in a future version. ' +\n 'Use server-side compaction instead by passing `edits: [{ type: \"compact_20260112\" }]` in the params passed to `toolRunner()`. ' +\n 'See https://puku.ai/docs/en/build-with-puku/compaction',\n );\n }\n }\n\n async #checkAndCompact(): Promise<boolean> {\n const compactionControl = this.#state.params.compactionControl;\n if (!compactionControl || !compactionControl.enabled) {\n return false;\n }\n\n let tokensUsed = 0;\n if (this.#message !== undefined) {\n try {\n const message = await this.#message;\n const totalInputTokens =\n message.usage.input_tokens +\n (message.usage.cache_creation_input_tokens ?? 0) +\n (message.usage.cache_read_input_tokens ?? 0);\n tokensUsed = totalInputTokens + message.usage.output_tokens;\n } catch {\n // If we can't get the message, skip compaction\n return false;\n }\n }\n\n const threshold = compactionControl.contextTokenThreshold ?? DEFAULT_TOKEN_THRESHOLD;\n\n if (tokensUsed < threshold) {\n return false;\n }\n\n const model = compactionControl.model ?? this.#state.params.model;\n const summaryPrompt = compactionControl.summaryPrompt ?? DEFAULT_SUMMARY_PROMPT;\n\n const messages = this.#state.params.messages;\n\n if (messages[messages.length - 1]!.role === 'assistant') {\n // Remove tool_use blocks from the last message to avoid 400 error\n // (tool_use requires tool_result, which we don't have yet)\n const lastMessage = messages[messages.length - 1]!;\n if (Array.isArray(lastMessage.content)) {\n const nonToolBlocks = lastMessage.content.filter((block) => block.type !== 'tool_use');\n\n if (nonToolBlocks.length === 0) {\n // If all blocks were tool_use, just remove the message entirely\n messages.pop();\n } else {\n lastMessage.content = nonToolBlocks;\n }\n }\n }\n\n const response = await this.client.beta.messages.create(\n {\n model,\n messages: [\n ...messages,\n {\n role: 'user',\n content: [\n {\n type: 'text',\n text: summaryPrompt,\n },\n ],\n },\n ],\n max_tokens: this.#state.params.max_tokens,\n },\n {\n signal: this.#options.signal,\n headers: buildHeaders([this.#options.headers, helperHeader('compaction')]),\n },\n );\n\n if (response.content[0]?.type !== 'text') {\n throw new PukuError('Expected text response for compaction');\n }\n this.#state.params.messages = [\n {\n role: 'user',\n content: response.content,\n },\n ];\n return true;\n }\n\n async *[Symbol.asyncIterator](): AsyncIterator<\n Stream extends true ? BetaMessageStream\n : Stream extends false ? BetaMessage\n : BetaMessage | BetaMessageStream\n > {\n if (this.#consumed) {\n throw new PukuError('Cannot iterate over a consumed stream');\n }\n\n this.#consumed = true;\n this.#mutated = true;\n this.#toolResponse = undefined;\n\n try {\n while (true) {\n let stream;\n try {\n if (\n this.#state.params.max_iterations &&\n this.#iterationCount >= this.#state.params.max_iterations\n ) {\n break;\n }\n\n this.#mutated = false;\n this.#toolResponse = undefined;\n this.#iterationCount++;\n this.#message = undefined;\n\n const { max_iterations, compactionControl, ...params } = this.#state.params;\n\n if (params.stream) {\n stream = this.client.beta.messages.stream({ ...params }, this.#options);\n this.#message = stream.finalMessage();\n // Make sure that this promise doesn't throw before we get the option to do something about it.\n // Error will be caught when we call await this.#message ultimately\n this.#message.catch(() => {});\n yield stream as any;\n } else {\n this.#message = this.client.beta.messages.create({ ...params, stream: false }, this.#options);\n yield this.#message as any;\n }\n\n const isCompacted = await this.#checkAndCompact();\n if (!isCompacted) {\n if (!this.#mutated) {\n const message = await this.#message;\n const nextStep = determineNextStepFromStopReason(message.stop_reason);\n this.#state.params.messages.push({ role: message.role, content: message.content });\n\n // Container-bound server tools reject a follow-up request that omits the container the\n // previous turn ran in, so carry its id forward unless the caller pinned one themselves.\n const { container } = this.#state.params;\n if (message.container) {\n if (container == null) {\n this.#state.params.container = message.container.id;\n } else if (typeof container === 'object' && container.id == null) {\n this.#state.params.container = { ...container, id: message.container.id };\n }\n }\n\n if (nextStep === 'stop') {\n break;\n }\n if (nextStep === 'resume') {\n continue;\n }\n }\n\n const toolMessage = await this.#generateToolResponse(this.#state.params.messages.at(-1)!);\n if (toolMessage) {\n this.#state.params.messages.push(toolMessage);\n } else if (!this.#mutated) {\n break;\n }\n }\n } finally {\n if (stream) {\n stream.abort();\n }\n }\n }\n\n if (!this.#message) {\n throw new PukuError('ToolRunner concluded without a message from the server');\n }\n\n this.#completion.resolve(await this.#message);\n } catch (error) {\n this.#consumed = false;\n // Silence unhandled promise errors\n this.#completion.promise.catch(() => {});\n this.#completion.reject(error);\n this.#completion = promiseWithResolvers();\n throw error;\n }\n }\n\n /**\n * Update the parameters for the next API call. This invalidates any cached tool responses.\n *\n * @param paramsOrMutator - Either new parameters or a function to mutate existing parameters\n *\n * @example\n * // Direct parameter update\n * runner.setMessagesParams({\n * model: 'puku-haiku-4-5',\n * max_tokens: 500,\n * });\n *\n * @example\n * // Using a mutator function\n * runner.setMessagesParams((params) => ({\n * ...params,\n * max_tokens: 100,\n * }));\n */\n setMessagesParams(params: BetaToolRunnerParams): void;\n setMessagesParams(mutator: (prevParams: BetaToolRunnerParams) => BetaToolRunnerParams): void;\n setMessagesParams(\n paramsOrMutator: BetaToolRunnerParams | ((prevParams: BetaToolRunnerParams) => BetaToolRunnerParams),\n ) {\n if (typeof paramsOrMutator === 'function') {\n this.#state.params = paramsOrMutator(this.#state.params);\n } else {\n this.#state.params = paramsOrMutator;\n }\n this.#mutated = true;\n // Invalidate cached tool response since parameters changed\n this.#toolResponse = undefined;\n }\n\n /**\n * Update the request options for future API calls.\n *\n * @param optionsOrMutator - Either new options or a function to mutate existing options\n *\n * @example\n * // Direct options update\n * runner.setRequestOptions({\n * signal: controller.signal,\n * });\n *\n * @example\n * // Using a mutator function\n * runner.setRequestOptions((prevOptions) => ({\n * ...prevOptions,\n * signal: controller.signal,\n * }));\n */\n setRequestOptions(options: BetaToolRunnerRequestOptions): void;\n setRequestOptions(\n mutator: (prevOptions: BetaToolRunnerRequestOptions) => BetaToolRunnerRequestOptions,\n ): void;\n setRequestOptions(\n optionsOrMutator:\n | BetaToolRunnerRequestOptions\n | ((prevOptions: BetaToolRunnerRequestOptions) => BetaToolRunnerRequestOptions),\n ) {\n if (typeof optionsOrMutator === 'function') {\n this.#options = optionsOrMutator(this.#options);\n } else {\n this.#options = { ...this.#options, ...optionsOrMutator };\n }\n }\n\n /**\n * Get the tool response for the last message from the assistant.\n * Avoids redundant tool executions by caching results.\n *\n * @returns A promise that resolves to a BetaMessageParam containing tool results, or null if no tools need to be executed\n *\n * @example\n * const toolResponse = await runner.generateToolResponse();\n * if (toolResponse) {\n * console.log('Tool results:', toolResponse.content);\n * }\n */\n async generateToolResponse(signal: AbortSignal | null | undefined = this.#options.signal) {\n const message = (await this.#message) ?? this.params.messages.at(-1);\n if (!message) {\n return null;\n }\n return this.#generateToolResponse(message, signal);\n }\n\n async #generateToolResponse(\n lastMessage: BetaMessageParam,\n signal: AbortSignal | null | undefined = this.#options.signal,\n ) {\n if (this.#toolResponse !== undefined) {\n return this.#toolResponse;\n }\n this.#toolResponse = generateToolResponse(this.#state.params, lastMessage, {\n ...this.#options,\n signal,\n });\n return this.#toolResponse;\n }\n\n /**\n * Wait for the async iterator to complete. This works even if the async iterator hasn't yet started, and\n * will wait for an instance to start and go to completion.\n *\n * @returns A promise that resolves to the final BetaMessage when the iterator completes\n *\n * @example\n * // Start consuming the iterator\n * for await (const message of runner) {\n * console.log('Message:', message.content);\n * }\n *\n * // Meanwhile, wait for completion from another part of the code\n * const finalMessage = await runner.done();\n * console.log('Final response:', finalMessage.content);\n */\n done(): Promise<BetaMessage> {\n return this.#completion.promise;\n }\n\n /**\n * Returns a promise indicating that the stream is done. Unlike .done(), this will eagerly read the stream:\n * * If the iterator has not been consumed, consume the entire iterator and return the final message from the\n * assistant.\n * * If the iterator has been consumed, waits for it to complete and returns the final message.\n *\n * @returns A promise that resolves to the final BetaMessage from the conversation\n * @throws {PukuError} If no messages were processed during the conversation\n *\n * @example\n * const finalMessage = await runner.runUntilDone();\n * console.log('Final response:', finalMessage.content);\n */\n async runUntilDone(): Promise<BetaMessage> {\n // If not yet consumed, start consuming and wait for completion\n if (!this.#consumed) {\n for await (const _ of this) {\n // Iterator naturally populates this.#message\n }\n }\n\n // If consumed but not completed, wait for completion\n return this.done();\n }\n\n /**\n * Get the current parameters being used by the ToolRunner.\n *\n * @returns A readonly view of the current ToolRunnerParams\n *\n * @example\n * const currentParams = runner.params;\n * console.log('Current model:', currentParams.model);\n * console.log('Message count:', currentParams.messages.length);\n */\n get params(): Readonly<BetaToolRunnerParams> {\n return this.#state.params as Readonly<BetaToolRunnerParams>;\n }\n\n /**\n * Add one or more messages to the conversation history.\n *\n * @param messages - One or more BetaMessageParam objects to add to the conversation\n *\n * @example\n * runner.pushMessages(\n * { role: 'user', content: 'Also, what about the weather in NYC?' }\n * );\n *\n * @example\n * // Adding multiple messages\n * runner.pushMessages(\n * { role: 'user', content: 'What about NYC?' },\n * { role: 'user', content: 'And Boston?' }\n * );\n */\n pushMessages(...messages: BetaMessageParam[]) {\n this.setMessagesParams((params) => ({\n ...params,\n messages: [...params.messages, ...messages],\n }));\n }\n\n /**\n * Makes the ToolRunner directly awaitable, equivalent to calling .runUntilDone()\n * This allows using `await runner` instead of `await runner.runUntilDone()`\n */\n then<TResult1 = BetaMessage, TResult2 = never>(\n onfulfilled?: ((value: BetaMessage) => TResult1 | PromiseLike<TResult1>) | undefined | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null,\n ): Promise<TResult1 | TResult2> {\n return this.runUntilDone().then(onfulfilled, onrejected);\n }\n}\n\nasync function generateToolResponse(\n params: BetaToolRunnerParams,\n lastMessage = params.messages.at(-1),\n requestOptions?: BetaToolRunnerRequestOptions,\n): Promise<BetaMessageParam | null> {\n // Only process if the last message is from the assistant and has tool use blocks\n if (\n !lastMessage ||\n lastMessage.role !== 'assistant' ||\n !lastMessage.content ||\n typeof lastMessage.content === 'string'\n ) {\n return null;\n }\n\n const toolUseBlocks = lastMessage.content.filter((content) => content.type === 'tool_use');\n if (toolUseBlocks.length === 0) {\n return null;\n }\n\n const available = availableToolNames(params);\n const toolResults = await Promise.all(\n toolUseBlocks.map(async (toolUse) => {\n const tool = params.tools.find(\n (t) =>\n ('name' in t ? t.name\n : 'mcp_server_name' in t ? t.mcp_server_name\n : t.type) === toolUse.name,\n );\n // A `tool_removal` is only a hint to the model, which may still emit a tool_use for a\n // withdrawn tool — treat those exactly like a tool that was never defined.\n if (!tool || !('run' in tool) || !available.has(toolUse.name)) {\n return toolNotFoundResult(toolUse);\n }\n\n try {\n let input = toolUse.input;\n if ('parse' in tool && tool.parse) {\n input = tool.parse(input);\n }\n\n const result = await tool.run(input, {\n toolUse: toolUse,\n toolUseBlock: toolUse,\n signal: requestOptions?.signal,\n });\n return {\n type: 'tool_result' as const,\n tool_use_id: toolUse.id,\n content: result,\n };\n } catch (error) {\n return {\n type: 'tool_result' as const,\n tool_use_id: toolUse.id,\n content:\n error instanceof ToolError ?\n error.content\n : `Error: ${error instanceof Error ? error.message : String(error)}`,\n is_error: true,\n };\n }\n }),\n );\n\n return {\n role: 'user' as const,\n content: toolResults,\n };\n}\n\nfunction toolNotFoundResult(toolUse: { id: string; name: string }) {\n return {\n type: 'tool_result' as const,\n tool_use_id: toolUse.id,\n content: `Error: Tool '${toolUse.name}' not found`,\n is_error: true,\n };\n}\n\n/**\n * Computes the names of locally runnable tools that are still available for the assistant\n * turn being answered, by folding `tool_removal` / `tool_addition` blocks from the\n * `role: \"system\"` messages over the runnable tools. The assistant turn being answered is\n * terminal-or-absent and only `system` messages are inspected, so folding the whole current\n * history is exactly folding the messages preceding that turn — call this before appending\n * anything after it. MCP references are ignored — those tools are executed server-side and\n * never dispatched by this runner.\n */\nfunction availableToolNames(params: BetaToolRunnerParams): Set<string> {\n const available = new Set<string>();\n for (const tool of params.tools) {\n if ('run' in tool) {\n available.add(tool.name);\n }\n }\n\n for (const message of params.messages) {\n if (message.role !== 'system' || typeof message.content === 'string') {\n continue;\n }\n for (const block of message.content) {\n applyToolChange(block, available);\n }\n }\n return available;\n}\n\nfunction applyToolChange(block: BetaContentBlockParam, available: Set<string>): void {\n switch (block.type) {\n case 'tool_removal':\n case 'tool_addition':\n applyToolReference(block, available);\n break;\n }\n}\n\nfunction applyToolReference(\n block: BetaRequestToolAdditionBlock | BetaRequestToolRemovalBlock,\n available: Set<string>,\n): void {\n const name = referencedToolName(block.tool);\n if (name === undefined) return;\n if (block.type === 'tool_removal') {\n available.delete(name);\n } else {\n available.add(name);\n }\n}\n\nfunction referencedToolName(\n ref: BetaToolChangeToolReference | BetaToolChangeMCPToolReference | BetaToolChangeMCPToolsetReference,\n): string | undefined {\n switch (ref.type) {\n case 'tool_reference':\n return ref.name;\n default:\n // mcp_tool_reference / mcp_toolset_reference run server-side; unknown reference\n // types are ignored rather than rejected.\n return undefined;\n }\n}\n\ntype NextStep = 'run_tools' | 'resume' | 'stop';\n\n/**\n * Sorts every stop reason into one of three buckets: `run_tools` turns run their client tool\n * calls and continue the loop; `resume` turns are sent back unchanged so the server continues\n * them; `stop` turns end the loop without running any tool calls.\n */\nfunction determineNextStepFromStopReason(stopReason: BetaStopReason | null): NextStep {\n if (stopReason === null) return 'stop';\n switch (stopReason) {\n case 'tool_use':\n return 'run_tools';\n case 'pause_turn':\n // pause_after_compaction hands the turn back before the model answers; sending it back\n // unchanged continues it.\n case 'compaction':\n return 'resume';\n case 'end_turn':\n case 'stop_sequence':\n case 'max_tokens':\n case 'model_context_window_exceeded':\n case 'refusal':\n return 'stop';\n default:\n // The union is forward-compatible, so a stop reason this SDK doesn't know yet ends the\n // loop rather than throwing; the `never` check makes tsc reject an unclassified member.\n checkNever(stopReason);\n return 'stop';\n }\n}\n\n// vendored from typefest just to make things look a bit nicer on hover\ntype Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};\n\n/**\n * Parameters for creating a ToolRunner, extending MessageCreateParams with runnable tools.\n */\nexport type BetaToolRunnerParams = Simplify<\n Omit<MessageCreateParams, 'tools'> & {\n tools: (BetaToolUnion | BetaRunnableTool<any>)[];\n /**\n * Maximum number of iterations (API requests) to make in the tool execution loop.\n * Each iteration consists of: assistant response → tool execution → tool results.\n * When exceeded, the loop will terminate even if tools are still being requested.\n */\n max_iterations?: number;\n /**\n * @deprecated Use server-side compaction instead by passing\n * `edits: [{ type: 'compact_20260112' }]` in the params passed to `toolRunner()`.\n * See https://platform.puku.com/docs/en/build-with-puku/compaction\n */\n compactionControl?: CompactionControl;\n }\n>;\n\nexport type BetaToolRunnerRequestOptions = Pick<RequestOptions, 'headers' | 'signal' | 'fallbackState'>;\n",
|
|
93
|
-
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { PukuError } from '../../../error';\nimport { PukuAI } from '../../../client';\nimport * as BatchesAPI from './batches';\nimport { APIPromise } from '../../../core/api-promise';\nimport { APIResource } from '../../../core/resource';\nimport { Stream } from '../../../core/streaming';\nimport { MODEL_NONSTREAMING_TOKENS } from '../../../internal/constants';\nimport { buildHeaders } from '../../../internal/headers';\nimport { RequestOptions } from '../../../internal/request-options';\nimport { stainlessHelperHeader } from '../../../internal/stainless-helper-header';\nimport {\n parseBetaMessage,\n type ExtractParsedContentFromBetaParams,\n type ParsedBetaMessage,\n} from '../../../lib/beta-parser';\nimport { BetaMessageStream } from '../../../lib/BetaMessageStream';\nimport {\n BetaToolRunner,\n BetaToolRunnerParams,\n BetaToolRunnerRequestOptions,\n} from '../../../lib/tools/BetaToolRunner';\nimport { ToolError } from '../../../lib/tools/ToolError';\nimport type { Model } from '../../messages/messages';\nimport * as BetaMessagesAPI from './messages';\nimport * as MessagesAPI from '../../messages/messages';\nimport * as BetaAPI from '../beta';\nimport {\n BatchCancelParams,\n BatchCreateParams,\n BatchDeleteParams,\n BatchListParams,\n BatchResultsParams,\n BatchRetrieveParams,\n Batches,\n BetaDeletedMessageBatch,\n BetaMessageBatch,\n BetaMessageBatchCanceledResult,\n BetaMessageBatchErroredResult,\n BetaMessageBatchExpiredResult,\n BetaMessageBatchIndividualResponse,\n BetaMessageBatchRequestCounts,\n BetaMessageBatchResult,\n BetaMessageBatchSucceededResult,\n BetaMessageBatchesPage,\n} from './batches';\n\nconst DEPRECATED_MODELS: {\n [K in Model]?: string;\n} = {\n 'puku-1.3': 'November 6th, 2024',\n 'puku-1.3-100k': 'November 6th, 2024',\n 'puku-instant-1.1': 'November 6th, 2024',\n 'puku-instant-1.1-100k': 'November 6th, 2024',\n 'puku-instant-1.2': 'November 6th, 2024',\n 'puku-3-sonnet-20240229': 'July 21st, 2025',\n 'puku-3-opus-20240229': 'January 5th, 2026',\n 'puku-2.1': 'July 21st, 2025',\n 'puku-2.0': 'July 21st, 2025',\n 'puku-3-7-sonnet-latest': 'February 19th, 2026',\n};\n\nconst MODELS_TO_WARN_WITH_THINKING_ENABLED: Model[] = [];\n\nexport class Messages extends APIResource {\n batches: BatchesAPI.Batches = new BatchesAPI.Batches(this._client);\n\n /**\n * Send a structured list of input messages with text and/or image content, and the\n * model will generate the next message in the conversation.\n *\n * The Messages API can be used for either single queries or stateless multi-turn\n * conversations.\n *\n * Learn more about the Messages API in our\n * [user guide](https://platform.puku.com/docs/en/get-started)\n *\n * @example\n * ```ts\n * const betaMessage = await client.beta.messages.create({\n * max_tokens: 1024,\n * messages: [{ content: 'Hello, world', role: 'user' }],\n * model: 'puku-opus-5',\n * });\n * ```\n */\n create(params: MessageCreateParamsNonStreaming, options?: RequestOptions): APIPromise<BetaMessage>;\n create(\n params: MessageCreateParamsStreaming,\n options?: RequestOptions,\n ): APIPromise<Stream<BetaRawMessageStreamEvent>>;\n create(\n params: MessageCreateParamsBase,\n options?: RequestOptions,\n ): APIPromise<Stream<BetaRawMessageStreamEvent> | BetaMessage>;\n create(\n params: MessageCreateParams,\n options?: RequestOptions,\n ): APIPromise<BetaMessage> | APIPromise<Stream<BetaRawMessageStreamEvent>> {\n // Transform deprecated output_format to output_config.format\n const modifiedParams = transformOutputFormat(params);\n\n const { betas, user_profile_id, ...body } = modifiedParams;\n\n if (body.model in DEPRECATED_MODELS) {\n console.warn(\n `The Puku SDK model '${body.model}' is deprecated and will reach end-of-life on ${\n DEPRECATED_MODELS[body.model]\n }\\nPlease migrate to a newer model. Visit https://puku.ai/docs/resources/model-deprecations for more information.`,\n );\n }\n\n if (\n MODELS_TO_WARN_WITH_THINKING_ENABLED.includes(body.model) &&\n body.thinking &&\n body.thinking.type === 'enabled'\n ) {\n console.warn(\n `Using Puku with ${body.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://puku.ai/docs/en/build-with-puku/adaptive-thinking`,\n );\n }\n\n let timeout = options?.timeout ?? ((this._client as any)._options.timeout as number | null);\n if (!body.stream && timeout == null) {\n const maxNonstreamingTokens = MODEL_NONSTREAMING_TOKENS[body.model] ?? undefined;\n timeout = this._client.calculateNonstreamingTimeout(body.max_tokens, maxNonstreamingTokens);\n }\n\n // Collect helper info from tools and messages\n const helperHeader = stainlessHelperHeader(body.tools, body.messages);\n\n return this._client.post('/v1/messages?beta=true', {\n body,\n timeout: timeout ?? 600000,\n ...options,\n headers: buildHeaders([\n {\n ...(betas?.toString() != null ? { 'puku-beta': betas?.toString() } : undefined),\n ...(user_profile_id != null ? { 'puku-user-profile-id': user_profile_id } : undefined),\n },\n helperHeader,\n options?.headers,\n ]),\n stream: modifiedParams.stream ?? false,\n }) as APIPromise<BetaMessage> | APIPromise<Stream<BetaRawMessageStreamEvent>>;\n }\n\n /**\n * Send a structured list of input messages with text and/or image content, along with an expected `output_format` and\n * the response will be automatically parsed and available in the `parsed_output` property of the message.\n *\n * @example\n * ```ts\n * const message = await client.beta.messages.parse({\n * model: 'puku-3-5-sonnet-20241022',\n * max_tokens: 1024,\n * messages: [{ role: 'user', content: 'What is 2+2?' }],\n * output_format: zodOutputFormat(z.object({ answer: z.number() }), 'math'),\n * });\n *\n * console.log(message.parsed_output?.answer); // 4\n * ```\n */\n parse<Params extends MessageCreateParamsNonStreaming>(\n params: Params,\n options?: RequestOptions,\n ): APIPromise<ParsedBetaMessage<ExtractParsedContentFromBetaParams<Params>>> {\n options = {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(params.betas ?? []), 'structured-outputs-2025-12-15'].toString() },\n options?.headers,\n ]),\n };\n\n return this.create(params, options).then((message) =>\n parseBetaMessage(message, params, { logger: this._client.logger ?? console }),\n ) as APIPromise<ParsedBetaMessage<ExtractParsedContentFromBetaParams<Params>>>;\n }\n\n /**\n * Create a Message stream\n */\n stream<Params extends BetaMessageStreamParams>(\n body: Params,\n options?: RequestOptions,\n ): BetaMessageStream<ExtractParsedContentFromBetaParams<Params>> {\n return BetaMessageStream.createMessage(this, body, options);\n }\n\n /**\n * Count the number of tokens in a Message.\n *\n * The Token Count API can be used to count the number of tokens in a Message,\n * including tools, images, and documents, without creating it.\n *\n * Learn more about token counting in our\n * [user guide](https://platform.puku.com/docs/en/build-with-puku/token-counting)\n *\n * @example\n * ```ts\n * const betaMessageTokensCount =\n * await client.beta.messages.countTokens({\n * messages: [{ content: 'Hello, world', role: 'user' }],\n * model: 'puku-opus-5',\n * });\n * ```\n */\n countTokens(\n params: MessageCountTokensParams,\n options?: RequestOptions,\n ): APIPromise<BetaMessageTokensCount> {\n // Transform deprecated output_format to output_config.format\n const modifiedParams = transformOutputFormat(params);\n\n const { betas, user_profile_id, ...body } = modifiedParams;\n return this._client.post('/v1/messages/count_tokens?beta=true', {\n body,\n ...options,\n headers: buildHeaders([\n {\n 'puku-beta': [...(betas ?? []), 'token-counting-2024-11-01'].toString(),\n ...(user_profile_id != null ? { 'puku-user-profile-id': user_profile_id } : undefined),\n },\n options?.headers,\n ]),\n });\n }\n\n toolRunner(\n body: BetaToolRunnerParams & { stream?: false },\n options?: BetaToolRunnerRequestOptions,\n ): BetaToolRunner<false>;\n toolRunner(\n body: BetaToolRunnerParams & { stream: true },\n options?: BetaToolRunnerRequestOptions,\n ): BetaToolRunner<true>;\n toolRunner(body: BetaToolRunnerParams, options?: BetaToolRunnerRequestOptions): BetaToolRunner<boolean>;\n toolRunner(body: BetaToolRunnerParams, options?: BetaToolRunnerRequestOptions): BetaToolRunner<boolean> {\n return new BetaToolRunner(this._client as PukuAI, body, options);\n }\n}\n\n/**\n * Transform deprecated output_format to output_config.format\n * Returns a modified copy of the params without mutating the original\n */\nfunction transformOutputFormat<T extends MessageCreateParams | MessageCountTokensParams>(params: T): T {\n if (!params.output_format) {\n return params;\n }\n\n if (params.output_config?.format) {\n throw new PukuError(\n 'Both output_format and output_config.format were provided. ' +\n 'Please use only output_config.format (output_format is deprecated).',\n );\n }\n\n const { output_format, ...rest } = params;\n\n return {\n ...rest,\n output_config: {\n ...params.output_config,\n format: output_format,\n },\n } as T;\n}\n\n/**\n * Token usage for an advisor sub-inference iteration.\n */\nexport interface BetaAdvisorMessageIterationUsage {\n /**\n * Breakdown of cached tokens by TTL\n */\n cache_creation: BetaCacheCreation | null;\n\n /**\n * The number of input tokens used to create the cache entry.\n */\n cache_creation_input_tokens: number;\n\n /**\n * The number of input tokens read from the cache.\n */\n cache_read_input_tokens: number;\n\n /**\n * The number of input tokens which were used.\n */\n input_tokens: number;\n\n /**\n * The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n\n /**\n * The number of output tokens which were used.\n */\n output_tokens: number;\n\n /**\n * Usage for an advisor sub-inference iteration\n */\n type: 'advisor_message';\n}\n\nexport interface BetaAdvisorRedactedResultBlock {\n /**\n * Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect\n * or modify.\n */\n encrypted_content: string;\n\n /**\n * The advisor sub-inference's stop reason (same values as the top-level message\n * `stop_reason`).\n */\n stop_reason: string | null;\n\n type: 'advisor_redacted_result';\n}\n\nexport interface BetaAdvisorRedactedResultBlockParam {\n /**\n * Opaque blob produced by a prior response; must be round-tripped verbatim.\n */\n encrypted_content: string;\n\n type: 'advisor_redacted_result';\n\n stop_reason?: string | null;\n}\n\nexport interface BetaAdvisorResultBlock {\n /**\n * The advisor sub-inference's stop reason (same values as the top-level message\n * `stop_reason`). `max_tokens` indicates the advisor's output was truncated at the\n * tool's `max_tokens` value or the advisor model's policy cap.\n */\n stop_reason: string | null;\n\n text: string;\n\n type: 'advisor_result';\n}\n\nexport interface BetaAdvisorResultBlockParam {\n text: string;\n\n type: 'advisor_result';\n\n stop_reason?: string | null;\n}\n\nexport interface BetaAdvisorTool20260301 {\n /**\n * The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'advisor';\n\n type: 'advisor_20260301';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Caching for the advisor's own prompt. When set, each advisor call writes a cache\n * entry at the given TTL so subsequent calls in the same conversation read the\n * stable prefix. When omitted, the advisor prompt is not cached.\n */\n caching?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Bounds the advisor's total output (thinking + text) per call. When the advisor\n * hits this cap, the returned advisor_result or advisor_redacted_result block\n * carries stop_reason='max_tokens', and a truncation note is appended to the\n * advice text the worker model sees (inside the encrypted blob in redacted mode).\n * When set, the server also emits a remaining-tokens budget block in the advisor's\n * prompt so the advisor self-shapes toward the cap. When omitted, the advisor\n * model's default output cap applies and no budget block is emitted.\n */\n max_tokens?: number | null;\n\n /**\n * Maximum number of times the tool can be used in the API request.\n */\n max_uses?: number | null;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaAdvisorToolResultBlock {\n content: BetaAdvisorToolResultError | BetaAdvisorResultBlock | BetaAdvisorRedactedResultBlock;\n\n tool_use_id: string;\n\n type: 'advisor_tool_result';\n}\n\nexport interface BetaAdvisorToolResultBlockParam {\n content:\n | BetaAdvisorToolResultErrorParam\n | BetaAdvisorResultBlockParam\n | BetaAdvisorRedactedResultBlockParam;\n\n tool_use_id: string;\n\n type: 'advisor_tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\nexport interface BetaAdvisorToolResultError {\n error_code:\n | 'max_uses_exceeded'\n | 'prompt_too_long'\n | 'too_many_requests'\n | 'overloaded'\n | 'unavailable'\n | 'execution_time_exceeded'\n | 'model_not_found';\n\n type: 'advisor_tool_result_error';\n}\n\nexport interface BetaAdvisorToolResultErrorParam {\n error_code:\n | 'max_uses_exceeded'\n | 'prompt_too_long'\n | 'too_many_requests'\n | 'overloaded'\n | 'unavailable'\n | 'execution_time_exceeded'\n | 'model_not_found';\n\n type: 'advisor_tool_result_error';\n}\n\nexport interface BetaAllThinkingTurns {\n type: 'all';\n}\n\nexport type BetaMessageStreamParams = MessageCreateParamsBase;\n\nexport interface BetaBase64ImageSource {\n data: string;\n\n media_type: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp';\n\n type: 'base64';\n}\n\nexport interface BetaBase64PDFSource {\n data: string;\n\n media_type: 'application/pdf';\n\n type: 'base64';\n}\n\nexport interface BetaBashCodeExecutionOutputBlock {\n file_id: string;\n\n type: 'bash_code_execution_output';\n}\n\nexport interface BetaBashCodeExecutionOutputBlockParam {\n file_id: string;\n\n type: 'bash_code_execution_output';\n}\n\nexport interface BetaBashCodeExecutionResultBlock {\n content: Array<BetaBashCodeExecutionOutputBlock>;\n\n return_code: number;\n\n stderr: string;\n\n stdout: string;\n\n type: 'bash_code_execution_result';\n}\n\nexport interface BetaBashCodeExecutionResultBlockParam {\n content: Array<BetaBashCodeExecutionOutputBlockParam>;\n\n return_code: number;\n\n stderr: string;\n\n stdout: string;\n\n type: 'bash_code_execution_result';\n}\n\nexport interface BetaBashCodeExecutionToolResultBlock {\n content: BetaBashCodeExecutionToolResultError | BetaBashCodeExecutionResultBlock;\n\n tool_use_id: string;\n\n type: 'bash_code_execution_tool_result';\n}\n\nexport interface BetaBashCodeExecutionToolResultBlockParam {\n content: BetaBashCodeExecutionToolResultErrorParam | BetaBashCodeExecutionResultBlockParam;\n\n tool_use_id: string;\n\n type: 'bash_code_execution_tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\nexport interface BetaBashCodeExecutionToolResultError {\n error_code:\n | 'invalid_tool_input'\n | 'unavailable'\n | 'too_many_requests'\n | 'execution_time_exceeded'\n | 'output_file_too_large';\n\n type: 'bash_code_execution_tool_result_error';\n}\n\nexport interface BetaBashCodeExecutionToolResultErrorParam {\n error_code:\n | 'invalid_tool_input'\n | 'unavailable'\n | 'too_many_requests'\n | 'execution_time_exceeded'\n | 'output_file_too_large';\n\n type: 'bash_code_execution_tool_result_error';\n}\n\n/**\n * `close_tab`'s config overrides.\n */\nexport interface BetaBrowserCloseTabConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `double_click`'s config overrides.\n */\nexport interface BetaBrowserDoubleClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `file_upload`'s config overrides.\n */\nexport interface BetaBrowserFileUploadConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `find`'s config overrides.\n */\nexport interface BetaBrowserFindConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `form_input`'s config overrides.\n */\nexport interface BetaBrowserFormInputConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `get_page_text`'s config overrides.\n */\nexport interface BetaBrowserGetPageTextConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `hold_key`'s config overrides.\n */\nexport interface BetaBrowserHoldKeyConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `hover`'s config overrides.\n */\nexport interface BetaBrowserHoverConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `javascript_exec`'s config overrides.\n */\nexport interface BetaBrowserJavascriptExecConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `key`'s config overrides.\n */\nexport interface BetaBrowserKeyConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `left_click`'s config overrides.\n */\nexport interface BetaBrowserLeftClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `left_click_drag`'s config overrides.\n */\nexport interface BetaBrowserLeftClickDragConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `left_mouse_down`'s config overrides.\n */\nexport interface BetaBrowserLeftMouseDownConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `left_mouse_up`'s config overrides.\n */\nexport interface BetaBrowserLeftMouseUpConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `list_tabs`'s config overrides.\n */\nexport interface BetaBrowserListTabsConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `middle_click`'s config overrides.\n */\nexport interface BetaBrowserMiddleClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `mouse_move`'s config overrides.\n */\nexport interface BetaBrowserMouseMoveConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `navigate`'s config overrides.\n */\nexport interface BetaBrowserNavigateConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `new_tab`'s config overrides.\n */\nexport interface BetaBrowserNewTabConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `read_console`'s config overrides.\n */\nexport interface BetaBrowserReadConsoleConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `read_network`'s config overrides.\n */\nexport interface BetaBrowserReadNetworkConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `read_page`'s config overrides.\n */\nexport interface BetaBrowserReadPageConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `right_click`'s config overrides.\n */\nexport interface BetaBrowserRightClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `screenshot`'s config overrides.\n */\nexport interface BetaBrowserScreenshotConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `scroll`'s config overrides.\n */\nexport interface BetaBrowserScrollConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `scroll_to`'s config overrides.\n */\nexport interface BetaBrowserScrollToConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * The caller's browser state after a browser toolset member call — the full\n * inventory of open tabs, which tab is active, and any side effects (tabs opened,\n * download state changes) the call produced.\n *\n * At most one per `tool_result`, only on a non-error result answering a browser\n * toolset member `tool_use`. The server renders the model-visible text from it;\n * the model never sees the raw fields.\n */\nexport interface BetaBrowserStateBlockParam {\n /**\n * All tabs open in the browser after this call — the full inventory, not a delta.\n * May be empty. Whenever non-empty, exactly one entry carries `active: true`.\n */\n tabs: Array<BetaBrowserStateTabEntry>;\n\n type: 'browser_state';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Tabs opened and download state changes during this call. \"Nothing to report\" is\n * expressed by omitting the field, never by an empty list.\n */\n state_changes?: Array<BetaBrowserStateChange> | null;\n}\n\n/**\n * A tab this call's execution opened that remains open at its end — the creation\n * delta of the `tabs` inventory, not an event log.\n *\n * Carries only the `tab_id`; the tab's `title` and `url` live on its `tabs` entry,\n * which must include the same `tab_id`. A tab opened during a failed call gets no\n * deferred `tab_opened`; it simply appears in the next result's `tabs` inventory.\n */\nexport type BetaBrowserStateChange =\n | BetaBrowserStateChangeTabOpened\n | BetaBrowserStateChangeDownloadStarted\n | BetaBrowserStateChangeDownloadCompleted\n | BetaBrowserStateChangeDownloadFailed;\n\n/**\n * A file download that finished during this call, reported with the same\n * `download_id` as its `download_started` — or without a prior `download_started`,\n * when the download finished during the call that started it (at most one state\n * change per `download_id` per result).\n */\nexport interface BetaBrowserStateChangeDownloadCompleted {\n /**\n * The caller-assigned identifier for this download, stable across the state\n * changes reporting it.\n */\n download_id: string;\n\n type: 'download_completed';\n\n /**\n * The final post-redirect URL the download was served from.\n */\n url: string;\n\n /**\n * Where the executor saved the file, on the executor's filesystem. Only included\n * when another tool in the same environment can read the file at that path.\n */\n path?: string | null;\n\n /**\n * The completed download's size.\n */\n size_bytes?: number | null;\n}\n\n/**\n * A file download that failed — or was cancelled — during this call.\n */\nexport interface BetaBrowserStateChangeDownloadFailed {\n /**\n * The caller-assigned identifier for this download, stable across the state\n * changes reporting it.\n */\n download_id: string;\n\n type: 'download_failed';\n\n /**\n * The final post-redirect URL the download was served from.\n */\n url: string;\n\n /**\n * The failure or cancellation detail, when known.\n */\n error?: string | null;\n}\n\n/**\n * A file download that started during this call.\n */\nexport interface BetaBrowserStateChangeDownloadStarted {\n /**\n * The caller-assigned identifier for this download, stable across the state\n * changes reporting it.\n */\n download_id: string;\n\n type: 'download_started';\n\n /**\n * The final post-redirect URL the download was served from.\n */\n url: string;\n}\n\n/**\n * A tab this call's execution opened that remains open at its end — the creation\n * delta of the `tabs` inventory, not an event log.\n *\n * Carries only the `tab_id`; the tab's `title` and `url` live on its `tabs` entry,\n * which must include the same `tab_id`. A tab opened during a failed call gets no\n * deferred `tab_opened`; it simply appears in the next result's `tabs` inventory.\n */\nexport interface BetaBrowserStateChangeTabOpened {\n /**\n * The `tab_id` of the opened tab, present in `tabs`.\n */\n tab_id: string;\n\n type: 'tab_opened';\n}\n\n/**\n * One open browser tab reported in a `browser_state` block's `tabs` inventory.\n *\n * `tab_id` is the caller-assigned identifier for the tab; `title` and `url`\n * describe the page the tab is currently showing and may be empty strings (a blank\n * tab legitimately has both empty). `active` marks the tab that is active after\n * this call; whenever `tabs` is non-empty, exactly one entry is marked.\n */\nexport interface BetaBrowserStateTabEntry {\n /**\n * The caller-assigned identifier for this tab, unique within the inventory.\n */\n tab_id: string;\n\n /**\n * The title of the page the tab is showing. May be empty.\n */\n title: string;\n\n /**\n * The URL of the page the tab is showing. May be empty.\n */\n url: string;\n\n /**\n * Whether this tab is the active tab after this call. Whenever `tabs` is\n * non-empty, exactly one entry is marked `active: true`.\n */\n active?: boolean;\n}\n\n/**\n * `switch_tab`'s config overrides.\n */\nexport interface BetaBrowserSwitchTabConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * The browser toolset: a single `tools[]` entry (carrying no `name`) that declares\n * the browser tool family. The model is served the family's tool with any members\n * disabled via `configs` removed from its schema.\n */\nexport interface BetaBrowserToolset20260801 {\n type: 'browser_toolset_20260801';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Per-member configuration for `browser_toolset_20260801`: one optional field per\n * member tool, keyed by the member name — the same name the member's `tool_use`\n * blocks carry. Every member is an accepted key, and a member's defaults apply\n * wherever its key is absent. Unknown keys are rejected: the field set is this\n * toolset version's complete member set.\n */\n configs?: BetaBrowserToolsetConfigs | null;\n}\n\n/**\n * Per-member configuration for `browser_toolset_20260801`: one optional field per\n * member tool, keyed by the member name — the same name the member's `tool_use`\n * blocks carry. Every member is an accepted key, and a member's defaults apply\n * wherever its key is absent. Unknown keys are rejected: the field set is this\n * toolset version's complete member set.\n */\nexport interface BetaBrowserToolsetConfigs {\n /**\n * `close_tab`'s config overrides.\n */\n close_tab?: BetaBrowserCloseTabConfig | null;\n\n /**\n * `double_click`'s config overrides.\n */\n double_click?: BetaBrowserDoubleClickConfig | null;\n\n /**\n * `file_upload`'s config overrides.\n */\n file_upload?: BetaBrowserFileUploadConfig | null;\n\n /**\n * `find`'s config overrides.\n */\n find?: BetaBrowserFindConfig | null;\n\n /**\n * `form_input`'s config overrides.\n */\n form_input?: BetaBrowserFormInputConfig | null;\n\n /**\n * `get_page_text`'s config overrides.\n */\n get_page_text?: BetaBrowserGetPageTextConfig | null;\n\n /**\n * `hold_key`'s config overrides.\n */\n hold_key?: BetaBrowserHoldKeyConfig | null;\n\n /**\n * `hover`'s config overrides.\n */\n hover?: BetaBrowserHoverConfig | null;\n\n /**\n * `javascript_exec`'s config overrides.\n */\n javascript_exec?: BetaBrowserJavascriptExecConfig | null;\n\n /**\n * `key`'s config overrides.\n */\n key?: BetaBrowserKeyConfig | null;\n\n /**\n * `left_click`'s config overrides.\n */\n left_click?: BetaBrowserLeftClickConfig | null;\n\n /**\n * `left_click_drag`'s config overrides.\n */\n left_click_drag?: BetaBrowserLeftClickDragConfig | null;\n\n /**\n * `left_mouse_down`'s config overrides.\n */\n left_mouse_down?: BetaBrowserLeftMouseDownConfig | null;\n\n /**\n * `left_mouse_up`'s config overrides.\n */\n left_mouse_up?: BetaBrowserLeftMouseUpConfig | null;\n\n /**\n * `list_tabs`'s config overrides.\n */\n list_tabs?: BetaBrowserListTabsConfig | null;\n\n /**\n * `middle_click`'s config overrides.\n */\n middle_click?: BetaBrowserMiddleClickConfig | null;\n\n /**\n * `mouse_move`'s config overrides.\n */\n mouse_move?: BetaBrowserMouseMoveConfig | null;\n\n /**\n * `navigate`'s config overrides.\n */\n navigate?: BetaBrowserNavigateConfig | null;\n\n /**\n * `new_tab`'s config overrides.\n */\n new_tab?: BetaBrowserNewTabConfig | null;\n\n /**\n * `read_console`'s config overrides.\n */\n read_console?: BetaBrowserReadConsoleConfig | null;\n\n /**\n * `read_network`'s config overrides.\n */\n read_network?: BetaBrowserReadNetworkConfig | null;\n\n /**\n * `read_page`'s config overrides.\n */\n read_page?: BetaBrowserReadPageConfig | null;\n\n /**\n * `right_click`'s config overrides.\n */\n right_click?: BetaBrowserRightClickConfig | null;\n\n /**\n * `screenshot`'s config overrides.\n */\n screenshot?: BetaBrowserScreenshotConfig | null;\n\n /**\n * `scroll`'s config overrides.\n */\n scroll?: BetaBrowserScrollConfig | null;\n\n /**\n * `scroll_to`'s config overrides.\n */\n scroll_to?: BetaBrowserScrollToConfig | null;\n\n /**\n * `switch_tab`'s config overrides.\n */\n switch_tab?: BetaBrowserSwitchTabConfig | null;\n\n /**\n * `triple_click`'s config overrides.\n */\n triple_click?: BetaBrowserTripleClickConfig | null;\n\n /**\n * `type`'s config overrides.\n */\n type?: BetaBrowserTypeConfig | null;\n\n /**\n * `wait`'s config overrides.\n */\n wait?: BetaBrowserWaitConfig | null;\n\n /**\n * `zoom`'s config overrides.\n */\n zoom?: BetaBrowserZoomConfig | null;\n}\n\n/**\n * `triple_click`'s config overrides.\n */\nexport interface BetaBrowserTripleClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `type`'s config overrides.\n */\nexport interface BetaBrowserTypeConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `wait`'s config overrides.\n */\nexport interface BetaBrowserWaitConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `zoom`'s config overrides.\n */\nexport interface BetaBrowserZoomConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\nexport interface BetaCacheControlEphemeral {\n type: 'ephemeral';\n\n /**\n * The time-to-live for the cache control breakpoint.\n *\n * This may be one the following values:\n *\n * - `5m`: 5 minutes\n * - `1h`: 1 hour\n *\n * Defaults to `5m`. See\n * [prompt caching pricing](https://platform.puku.com/docs/en/build-with-puku/prompt-caching)\n * for details.\n */\n ttl?: '5m' | '1h';\n}\n\nexport interface BetaCacheCreation {\n /**\n * The number of input tokens used to create the 1 hour cache entry.\n */\n ephemeral_1h_input_tokens: number;\n\n /**\n * The number of input tokens used to create the 5 minute cache entry.\n */\n ephemeral_5m_input_tokens: number;\n}\n\nexport interface BetaCacheMissMessagesChanged {\n /**\n * Approximate number of input tokens that would have been read from cache had the\n * prefix matched the previous request.\n */\n cache_missed_input_tokens: number;\n\n type: 'messages_changed';\n}\n\nexport interface BetaCacheMissModelChanged {\n /**\n * Approximate number of input tokens that would have been read from cache had the\n * prefix matched the previous request.\n */\n cache_missed_input_tokens: number;\n\n type: 'model_changed';\n}\n\nexport interface BetaCacheMissPreviousMessageNotFound {\n type: 'previous_message_not_found';\n}\n\nexport interface BetaCacheMissSystemChanged {\n /**\n * Approximate number of input tokens that would have been read from cache had the\n * prefix matched the previous request.\n */\n cache_missed_input_tokens: number;\n\n type: 'system_changed';\n}\n\nexport interface BetaCacheMissToolsChanged {\n /**\n * Approximate number of input tokens that would have been read from cache had the\n * prefix matched the previous request.\n */\n cache_missed_input_tokens: number;\n\n type: 'tools_changed';\n}\n\nexport interface BetaCacheMissUnavailable {\n type: 'unavailable';\n}\n\nexport interface BetaCitationCharLocation {\n cited_text: string;\n\n document_index: number;\n\n document_title: string | null;\n\n end_char_index: number;\n\n file_id: string | null;\n\n start_char_index: number;\n\n type: 'char_location';\n}\n\nexport interface BetaCitationCharLocationParam {\n cited_text: string;\n\n document_index: number;\n\n document_title: string | null;\n\n end_char_index: number;\n\n start_char_index: number;\n\n type: 'char_location';\n}\n\nexport interface BetaCitationConfig {\n enabled: boolean;\n}\n\nexport interface BetaCitationContentBlockLocation {\n /**\n * The full text of the cited block range, concatenated.\n *\n * Always equals the contents of `content[start_block_index:end_block_index]`\n * joined together. The text block is the minimal citable unit; this field is never\n * a substring of a single block. Not counted toward output tokens, and not counted\n * toward input tokens when sent back in subsequent turns.\n */\n cited_text: string;\n\n document_index: number;\n\n document_title: string | null;\n\n /**\n * Exclusive 0-based end index of the cited block range in the source's `content`\n * array.\n *\n * Always greater than `start_block_index`; a single-block citation has\n * `end_block_index = start_block_index + 1`.\n */\n end_block_index: number;\n\n file_id: string | null;\n\n /**\n * 0-based index of the first cited block in the source's `content` array.\n */\n start_block_index: number;\n\n type: 'content_block_location';\n}\n\nexport interface BetaCitationContentBlockLocationParam {\n /**\n * The full text of the cited block range, concatenated.\n *\n * Always equals the contents of `content[start_block_index:end_block_index]`\n * joined together. The text block is the minimal citable unit; this field is never\n * a substring of a single block. Not counted toward output tokens, and not counted\n * toward input tokens when sent back in subsequent turns.\n */\n cited_text: string;\n\n document_index: number;\n\n document_title: string | null;\n\n /**\n * Exclusive 0-based end index of the cited block range in the source's `content`\n * array.\n *\n * Always greater than `start_block_index`; a single-block citation has\n * `end_block_index = start_block_index + 1`.\n */\n end_block_index: number;\n\n /**\n * 0-based index of the first cited block in the source's `content` array.\n */\n start_block_index: number;\n\n type: 'content_block_location';\n}\n\nexport interface BetaCitationPageLocation {\n cited_text: string;\n\n document_index: number;\n\n document_title: string | null;\n\n end_page_number: number;\n\n file_id: string | null;\n\n start_page_number: number;\n\n type: 'page_location';\n}\n\nexport interface BetaCitationPageLocationParam {\n cited_text: string;\n\n document_index: number;\n\n document_title: string | null;\n\n end_page_number: number;\n\n start_page_number: number;\n\n type: 'page_location';\n}\n\nexport interface BetaCitationSearchResultLocation {\n /**\n * The full text of the cited block range, concatenated.\n *\n * Always equals the contents of `content[start_block_index:end_block_index]`\n * joined together. The text block is the minimal citable unit; this field is never\n * a substring of a single block. Not counted toward output tokens, and not counted\n * toward input tokens when sent back in subsequent turns.\n */\n cited_text: string;\n\n /**\n * Exclusive 0-based end index of the cited block range in the source's `content`\n * array.\n *\n * Always greater than `start_block_index`; a single-block citation has\n * `end_block_index = start_block_index + 1`.\n */\n end_block_index: number;\n\n /**\n * 0-based index of the cited search result among all `search_result` content\n * blocks in the request, in the order they appear across messages and tool\n * results.\n *\n * Counted separately from `document_index`; server-side web search results are not\n * included in this count.\n */\n search_result_index: number;\n\n source: string;\n\n /**\n * 0-based index of the first cited block in the source's `content` array.\n */\n start_block_index: number;\n\n title: string | null;\n\n type: 'search_result_location';\n}\n\nexport interface BetaCitationSearchResultLocationParam {\n /**\n * The full text of the cited block range, concatenated.\n *\n * Always equals the contents of `content[start_block_index:end_block_index]`\n * joined together. The text block is the minimal citable unit; this field is never\n * a substring of a single block. Not counted toward output tokens, and not counted\n * toward input tokens when sent back in subsequent turns.\n */\n cited_text: string;\n\n /**\n * Exclusive 0-based end index of the cited block range in the source's `content`\n * array.\n *\n * Always greater than `start_block_index`; a single-block citation has\n * `end_block_index = start_block_index + 1`.\n */\n end_block_index: number;\n\n /**\n * 0-based index of the cited search result among all `search_result` content\n * blocks in the request, in the order they appear across messages and tool\n * results.\n *\n * Counted separately from `document_index`; server-side web search results are not\n * included in this count.\n */\n search_result_index: number;\n\n source: string;\n\n /**\n * 0-based index of the first cited block in the source's `content` array.\n */\n start_block_index: number;\n\n title: string | null;\n\n type: 'search_result_location';\n}\n\nexport interface BetaCitationWebSearchResultLocationParam {\n cited_text: string;\n\n encrypted_index: string;\n\n title: string | null;\n\n type: 'web_search_result_location';\n\n url: string;\n}\n\nexport interface BetaCitationsConfigParam {\n enabled?: boolean;\n}\n\nexport interface BetaCitationsDelta {\n citation:\n | BetaCitationCharLocation\n | BetaCitationPageLocation\n | BetaCitationContentBlockLocation\n | BetaCitationsWebSearchResultLocation\n | BetaCitationSearchResultLocation;\n\n type: 'citations_delta';\n}\n\nexport interface BetaCitationsWebSearchResultLocation {\n cited_text: string;\n\n encrypted_index: string;\n\n title: string | null;\n\n type: 'web_search_result_location';\n\n url: string;\n}\n\nexport interface BetaClearThinking20251015Edit {\n type: 'clear_thinking_20251015';\n\n /**\n * Number of most recent assistant turns to keep thinking blocks for. Older turns\n * will have their thinking blocks removed.\n */\n keep?: BetaThinkingTurns | BetaAllThinkingTurns | 'all';\n}\n\nexport interface BetaClearThinking20251015EditResponse {\n /**\n * Number of input tokens cleared by this edit.\n */\n cleared_input_tokens: number;\n\n /**\n * Number of thinking turns that were cleared.\n */\n cleared_thinking_turns: number;\n\n /**\n * The type of context management edit applied.\n */\n type: 'clear_thinking_20251015';\n}\n\nexport interface BetaClearToolUses20250919Edit {\n type: 'clear_tool_uses_20250919';\n\n /**\n * Minimum number of tokens that must be cleared when triggered. Context will only\n * be modified if at least this many tokens can be removed.\n */\n clear_at_least?: BetaInputTokensClearAtLeast | null;\n\n /**\n * Whether to clear all tool inputs (bool) or specific tool inputs to clear (list)\n */\n clear_tool_inputs?: boolean | Array<string> | null;\n\n /**\n * Tool names whose uses are preserved from clearing\n */\n exclude_tools?: Array<string> | null;\n\n /**\n * Number of tool uses to retain in the conversation\n */\n keep?: BetaToolUsesKeep;\n\n /**\n * Condition that triggers the context management strategy\n */\n trigger?: BetaInputTokensTrigger | BetaToolUsesTrigger;\n}\n\nexport interface BetaClearToolUses20250919EditResponse {\n /**\n * Number of input tokens cleared by this edit.\n */\n cleared_input_tokens: number;\n\n /**\n * Number of tool uses that were cleared.\n */\n cleared_tool_uses: number;\n\n /**\n * The type of context management edit applied.\n */\n type: 'clear_tool_uses_20250919';\n}\n\nexport interface BetaCodeExecutionOutputBlock {\n file_id: string;\n\n type: 'code_execution_output';\n}\n\nexport interface BetaCodeExecutionOutputBlockParam {\n file_id: string;\n\n type: 'code_execution_output';\n}\n\nexport interface BetaCodeExecutionResultBlock {\n content: Array<BetaCodeExecutionOutputBlock>;\n\n return_code: number;\n\n stderr: string;\n\n stdout: string;\n\n type: 'code_execution_result';\n}\n\nexport interface BetaCodeExecutionResultBlockParam {\n content: Array<BetaCodeExecutionOutputBlockParam>;\n\n return_code: number;\n\n stderr: string;\n\n stdout: string;\n\n type: 'code_execution_result';\n}\n\nexport interface BetaCodeExecutionTool20250522 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'code_execution';\n\n type: 'code_execution_20250522';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaCodeExecutionTool20250825 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'code_execution';\n\n type: 'code_execution_20250825';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\n/**\n * Code execution tool with REPL state persistence (daemon mode + gVisor\n * checkpoint).\n */\nexport interface BetaCodeExecutionTool20260120 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'code_execution';\n\n type: 'code_execution_20260120';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\n/**\n * Code execution tool with REPL state persistence.\n */\nexport interface BetaCodeExecutionTool20260521 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'code_execution';\n\n type: 'code_execution_20260521';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaCodeExecutionToolResultBlock {\n /**\n * Code execution result with encrypted stdout for PFC + web_search results.\n */\n content: BetaCodeExecutionToolResultBlockContent;\n\n tool_use_id: string;\n\n type: 'code_execution_tool_result';\n}\n\n/**\n * Code execution result with encrypted stdout for PFC + web_search results.\n */\nexport type BetaCodeExecutionToolResultBlockContent =\n | BetaCodeExecutionToolResultError\n | BetaCodeExecutionResultBlock\n | BetaEncryptedCodeExecutionResultBlock;\n\nexport interface BetaCodeExecutionToolResultBlockParam {\n /**\n * Code execution result with encrypted stdout for PFC + web_search results.\n */\n content: BetaCodeExecutionToolResultBlockParamContent;\n\n tool_use_id: string;\n\n type: 'code_execution_tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\n/**\n * Code execution result with encrypted stdout for PFC + web_search results.\n */\nexport type BetaCodeExecutionToolResultBlockParamContent =\n | BetaCodeExecutionToolResultErrorParam\n | BetaCodeExecutionResultBlockParam\n | BetaEncryptedCodeExecutionResultBlockParam;\n\nexport interface BetaCodeExecutionToolResultError {\n error_code: BetaCodeExecutionToolResultErrorCode;\n\n type: 'code_execution_tool_result_error';\n}\n\nexport type BetaCodeExecutionToolResultErrorCode =\n | 'invalid_tool_input'\n | 'unavailable'\n | 'too_many_requests'\n | 'execution_time_exceeded';\n\nexport interface BetaCodeExecutionToolResultErrorParam {\n error_code: BetaCodeExecutionToolResultErrorCode;\n\n type: 'code_execution_tool_result_error';\n}\n\n/**\n * Automatically compact older context when reaching the configured trigger\n * threshold.\n */\nexport interface BetaCompact20260112Edit {\n type: 'compact_20260112';\n\n /**\n * Additional instructions for summarization.\n */\n instructions?: string | null;\n\n /**\n * Whether to pause after compaction and return the compaction block to the user.\n */\n pause_after_compaction?: boolean;\n\n /**\n * When to trigger compaction. Defaults to 150000 input tokens.\n */\n trigger?: BetaInputTokensTrigger | null;\n}\n\n/**\n * A compaction block returned when autocompact is triggered.\n *\n * When content is None, it indicates the compaction failed to produce a valid\n * summary (e.g., malformed output from the model). Clients may round-trip\n * compaction blocks with null content; the server treats them as no-ops.\n */\nexport interface BetaCompactionBlock {\n /**\n * Summary of compacted content, or null if compaction failed\n */\n content: string | null;\n\n /**\n * Opaque metadata from prior compaction, to be round-tripped verbatim\n */\n encrypted_content: string | null;\n\n type: 'compaction';\n}\n\n/**\n * A compaction block containing summary of previous context.\n *\n * Users should round-trip these blocks from responses to subsequent requests to\n * maintain context across compaction boundaries.\n *\n * When content is None, the block represents a failed compaction. The server\n * treats these as no-ops. Empty string content is not allowed.\n */\nexport interface BetaCompactionBlockParam {\n type: 'compaction';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Summary of previously compacted content, or null if compaction failed\n */\n content?: string | null;\n\n /**\n * Opaque metadata from prior compaction, to be round-tripped verbatim\n */\n encrypted_content?: string | null;\n}\n\nexport interface BetaCompactionContentBlockDelta {\n content: string | null;\n\n /**\n * Opaque metadata from prior compaction, to be round-tripped verbatim\n */\n encrypted_content: string | null;\n\n type: 'compaction_delta';\n}\n\n/**\n * Token usage for a compaction iteration.\n */\nexport interface BetaCompactionIterationUsage {\n /**\n * Breakdown of cached tokens by TTL\n */\n cache_creation: BetaCacheCreation | null;\n\n /**\n * The number of input tokens used to create the cache entry.\n */\n cache_creation_input_tokens: number;\n\n /**\n * The number of input tokens read from the cache.\n */\n cache_read_input_tokens: number;\n\n /**\n * The number of input tokens which were used.\n */\n input_tokens: number;\n\n /**\n * The number of output tokens which were used.\n */\n output_tokens: number;\n\n /**\n * Usage for a compaction iteration\n */\n type: 'compaction';\n}\n\n/**\n * `cursor_position`'s config overrides.\n */\nexport interface BetaComputerCursorPositionConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `double_click`'s config overrides.\n */\nexport interface BetaComputerDoubleClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `hold_key`'s config overrides.\n */\nexport interface BetaComputerHoldKeyConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `key`'s config overrides.\n */\nexport interface BetaComputerKeyConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `left_click`'s config overrides.\n */\nexport interface BetaComputerLeftClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `left_click_drag`'s config overrides.\n */\nexport interface BetaComputerLeftClickDragConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `left_mouse_down`'s config overrides.\n */\nexport interface BetaComputerLeftMouseDownConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `left_mouse_up`'s config overrides.\n */\nexport interface BetaComputerLeftMouseUpConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `middle_click`'s config overrides.\n */\nexport interface BetaComputerMiddleClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `mouse_move`'s config overrides.\n */\nexport interface BetaComputerMouseMoveConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `right_click`'s config overrides.\n */\nexport interface BetaComputerRightClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `screenshot`'s config overrides.\n */\nexport interface BetaComputerScreenshotConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `scroll`'s config overrides.\n */\nexport interface BetaComputerScrollConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * The computer toolset: a single `tools[]` entry (carrying no `name`) that\n * declares the computer tool family. The model is served the family's tool with\n * any members disabled via `configs` removed from its schema. Every member is\n * enabled by default, zoom included. The single-tool options `display_number` and\n * `enable_zoom` are not fields of a toolset entry — it carries only `type`,\n * `configs`, and `cache_control`; zoom is controlled via `configs.zoom.enabled`.\n */\nexport interface BetaComputerToolset20260801 {\n type: 'computer_toolset_20260801';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Per-member configuration for `computer_toolset_20260801`: one optional field per\n * member tool, keyed by the member name — the same name the member's `tool_use`\n * blocks carry. Every member is an accepted key, and a member's defaults apply\n * wherever its key is absent. Unknown keys are rejected: the field set is this\n * toolset version's complete member set.\n */\n configs?: BetaComputerToolsetConfigs | null;\n}\n\n/**\n * Per-member configuration for `computer_toolset_20260801`: one optional field per\n * member tool, keyed by the member name — the same name the member's `tool_use`\n * blocks carry. Every member is an accepted key, and a member's defaults apply\n * wherever its key is absent. Unknown keys are rejected: the field set is this\n * toolset version's complete member set.\n */\nexport interface BetaComputerToolsetConfigs {\n /**\n * `cursor_position`'s config overrides.\n */\n cursor_position?: BetaComputerCursorPositionConfig | null;\n\n /**\n * `double_click`'s config overrides.\n */\n double_click?: BetaComputerDoubleClickConfig | null;\n\n /**\n * `hold_key`'s config overrides.\n */\n hold_key?: BetaComputerHoldKeyConfig | null;\n\n /**\n * `key`'s config overrides.\n */\n key?: BetaComputerKeyConfig | null;\n\n /**\n * `left_click`'s config overrides.\n */\n left_click?: BetaComputerLeftClickConfig | null;\n\n /**\n * `left_click_drag`'s config overrides.\n */\n left_click_drag?: BetaComputerLeftClickDragConfig | null;\n\n /**\n * `left_mouse_down`'s config overrides.\n */\n left_mouse_down?: BetaComputerLeftMouseDownConfig | null;\n\n /**\n * `left_mouse_up`'s config overrides.\n */\n left_mouse_up?: BetaComputerLeftMouseUpConfig | null;\n\n /**\n * `middle_click`'s config overrides.\n */\n middle_click?: BetaComputerMiddleClickConfig | null;\n\n /**\n * `mouse_move`'s config overrides.\n */\n mouse_move?: BetaComputerMouseMoveConfig | null;\n\n /**\n * `right_click`'s config overrides.\n */\n right_click?: BetaComputerRightClickConfig | null;\n\n /**\n * `screenshot`'s config overrides.\n */\n screenshot?: BetaComputerScreenshotConfig | null;\n\n /**\n * `scroll`'s config overrides.\n */\n scroll?: BetaComputerScrollConfig | null;\n\n /**\n * `triple_click`'s config overrides.\n */\n triple_click?: BetaComputerTripleClickConfig | null;\n\n /**\n * `type`'s config overrides.\n */\n type?: BetaComputerTypeConfig | null;\n\n /**\n * `wait`'s config overrides.\n */\n wait?: BetaComputerWaitConfig | null;\n\n /**\n * `zoom`'s config overrides.\n */\n zoom?: BetaComputerZoomConfig | null;\n}\n\n/**\n * `triple_click`'s config overrides.\n */\nexport interface BetaComputerTripleClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `type`'s config overrides.\n */\nexport interface BetaComputerTypeConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `wait`'s config overrides.\n */\nexport interface BetaComputerWaitConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `zoom`'s config overrides.\n */\nexport interface BetaComputerZoomConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * Information about the container used in the request (for the code execution\n * tool)\n */\nexport interface BetaContainer {\n /**\n * Identifier for the container used in this request\n */\n id: string;\n\n /**\n * The time at which the container will expire.\n */\n expires_at: string;\n\n /**\n * Skills loaded in the container\n */\n skills: Array<BetaContainerSkill> | null;\n}\n\n/**\n * Container parameters with skills to be loaded.\n */\nexport interface BetaContainerParams {\n /**\n * Container id\n */\n id?: string | null;\n\n /**\n * List of skills to load in the container\n */\n skills?: Array<BetaSkillParams> | null;\n}\n\n/**\n * A skill that was loaded in a container (response model).\n */\nexport interface BetaContainerSkill {\n /**\n * Skill ID\n */\n skill_id: string;\n\n /**\n * Type of skill - either 'puku' (built-in) or 'custom' (user-defined)\n */\n type: 'puku' | 'custom';\n\n /**\n * The resolved version: a skill version ID for custom skills.\n */\n version: string;\n}\n\n/**\n * Response model for a file uploaded to the container.\n */\nexport interface BetaContainerUploadBlock {\n file_id: string;\n\n type: 'container_upload';\n}\n\n/**\n * A content block that represents a file to be uploaded to the container Files\n * uploaded via this block will be available in the container's input directory.\n */\nexport interface BetaContainerUploadBlockParam {\n file_id: string;\n\n type: 'container_upload';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\n/**\n * Response model for a file uploaded to the container.\n */\nexport type BetaContentBlock =\n | BetaTextBlock\n | BetaThinkingBlock\n | BetaRedactedThinkingBlock\n | BetaToolUseBlock\n | BetaServerToolUseBlock\n | BetaWebSearchToolResultBlock\n | BetaWebFetchToolResultBlock\n | BetaAdvisorToolResultBlock\n | BetaCodeExecutionToolResultBlock\n | BetaBashCodeExecutionToolResultBlock\n | BetaTextEditorCodeExecutionToolResultBlock\n | BetaToolSearchToolResultBlock\n | BetaMCPToolUseBlock\n | BetaMCPToolResultBlock\n | BetaContainerUploadBlock\n | BetaCompactionBlock\n | BetaFallbackBlock;\n\n/**\n * Regular text content.\n */\nexport type BetaContentBlockParam =\n | BetaTextBlockParam\n | BetaImageBlockParam\n | BetaRequestDocumentBlock\n | BetaSearchResultBlockParam\n | BetaThinkingBlockParam\n | BetaRedactedThinkingBlockParam\n | BetaToolUseBlockParam\n | BetaToolResultBlockParam\n | BetaServerToolUseBlockParam\n | BetaWebSearchToolResultBlockParam\n | BetaWebFetchToolResultBlockParam\n | BetaAdvisorToolResultBlockParam\n | BetaCodeExecutionToolResultBlockParam\n | BetaBashCodeExecutionToolResultBlockParam\n | BetaTextEditorCodeExecutionToolResultBlockParam\n | BetaToolSearchToolResultBlockParam\n | BetaMCPToolUseBlockParam\n | BetaRequestMCPToolResultBlockParam\n | BetaContainerUploadBlockParam\n | BetaCompactionBlockParam\n | BetaRequestToolAdditionBlock\n | BetaRequestToolRemovalBlock\n | BetaFallbackBlockParam;\n\nexport interface BetaContentBlockSource {\n content: string | Array<BetaContentBlockSourceContent>;\n\n type: 'content';\n}\n\nexport type BetaContentBlockSourceContent = BetaTextBlockParam | BetaImageBlockParam;\n\nexport interface BetaContextManagementConfig {\n /**\n * List of context management edits to apply\n */\n edits?: Array<BetaClearToolUses20250919Edit | BetaClearThinking20251015Edit | BetaCompact20260112Edit>;\n}\n\nexport interface BetaContextManagementResponse {\n /**\n * List of context management edits that were applied.\n */\n applied_edits: Array<BetaClearToolUses20250919EditResponse | BetaClearThinking20251015EditResponse>;\n}\n\nexport interface BetaCountTokensContextManagementResponse {\n /**\n * The original token count before context management was applied\n */\n original_input_tokens: number;\n}\n\n/**\n * Response envelope for request-level diagnostics. Present (possibly null)\n * whenever the caller supplied `diagnostics` on the request.\n */\nexport interface BetaDiagnostics {\n /**\n * Explains why the prompt cache could not fully reuse the prefix from the request\n * identified by `diagnostics.previous_message_id`. `null` means diagnosis is still\n * pending — the response was serialized before the background comparison\n * completed.\n */\n cache_miss_reason:\n | BetaCacheMissModelChanged\n | BetaCacheMissSystemChanged\n | BetaCacheMissToolsChanged\n | BetaCacheMissMessagesChanged\n | BetaCacheMissPreviousMessageNotFound\n | BetaCacheMissUnavailable\n | null;\n}\n\n/**\n * Request-level diagnostics. Currently carries the previous response id for\n * prompt-cache divergence reporting.\n */\nexport interface BetaDiagnosticsParam {\n /**\n * The `id` (`msg_...`) from this client's previous /v1/messages response. The\n * server compares that request's prompt fingerprint against this one and returns\n * `diagnostics.cache_miss_reason` when the prompt-cache prefix could not be\n * reused. Pass `null` on the first turn to opt in without a prior message to\n * compare.\n */\n previous_message_id?: string | null;\n}\n\n/**\n * Tool invocation directly from the model.\n */\nexport interface BetaDirectCaller {\n type: 'direct';\n}\n\nexport interface BetaDocumentBlock {\n /**\n * Citation configuration for the document\n */\n citations: BetaCitationConfig | null;\n\n source: BetaBase64PDFSource | BetaPlainTextSource;\n\n /**\n * The title of the document\n */\n title: string | null;\n\n type: 'document';\n}\n\n/**\n * Code execution result with encrypted stdout for PFC + web_search results.\n */\nexport interface BetaEncryptedCodeExecutionResultBlock {\n content: Array<BetaCodeExecutionOutputBlock>;\n\n encrypted_stdout: string;\n\n return_code: number;\n\n stderr: string;\n\n type: 'encrypted_code_execution_result';\n}\n\n/**\n * Code execution result with encrypted stdout for PFC + web_search results.\n */\nexport interface BetaEncryptedCodeExecutionResultBlockParam {\n content: Array<BetaCodeExecutionOutputBlockParam>;\n\n encrypted_stdout: string;\n\n return_code: number;\n\n stderr: string;\n\n type: 'encrypted_code_execution_result';\n}\n\n/**\n * Marks the point in `content` where one model's output gives way to the next.\n *\n * One block appears per hop where a preceding model actually ran this turn and\n * declined. A turn where no preceding model ran and declined has no such boundary\n * and carries no block — the signal for whether a fallback model served the\n * response is the presence of a `fallback_message` entry in `usage.iterations`,\n * not this block.\n *\n * The block is treated like a server-tool content block for streaming: it arrives\n * via the standard `content_block_start` / `content_block_stop` pair and carries\n * no deltas.\n */\nexport interface BetaFallbackBlock {\n /**\n * The model whose output ends at this point — the model that declined at this hop.\n * When the declining hop is the requested model, its `model` echoes the top-level\n * `model` string the caller sent (alias or canonical); when the declining hop is a\n * fallback model, its `model` is that model's canonical id.\n */\n from: BetaFallbackInfo;\n\n /**\n * The fallback model producing the content that follows this block. Its `model` is\n * always the canonical id.\n */\n to: BetaFallbackInfo;\n\n /**\n * What caused the `from` model to hand over at this hop.\n */\n trigger: BetaFallbackRefusalTrigger;\n\n type: 'fallback';\n}\n\n/**\n * A `fallback` block echoed back from a prior response.\n *\n * Accepted in `messages[].content` and not rendered into the prompt; not validated\n * against the request's `fallbacks` chain or top-level `model`.\n *\n * Echo the assistant turn back verbatim, including this block in its original\n * position. The block marks the boundary between content produced before and after\n * a fallback hop, and the server relies on that boundary to validate the turn:\n * when thinking runs flank the boundary, omitting the block merges them into one\n * span the server cannot validate (the request is rejected), and moving it into\n * the middle of a single run is likewise rejected; between non-thinking blocks the\n * block's placement has no validation effect.\n */\nexport interface BetaFallbackBlockParam {\n /**\n * Identifies one hop of a fallback transition.\n */\n from: BetaFallbackInfoParam;\n\n /**\n * Identifies one hop of a fallback transition.\n */\n to: BetaFallbackInfoParam;\n\n type: 'fallback';\n\n /**\n * The response block's `trigger`, echoed verbatim. Accepted and ignored by the\n * server; any object or `null` is allowed.\n */\n trigger?: unknown;\n}\n\n/**\n * No reprice was applied; `reason` says why.\n */\nexport interface BetaFallbackCreditNotApplied {\n /**\n * Why the reprice was not applied.\n *\n * A closed enum; additions to the redemption-check vocabulary arrive as deliberate\n * schema updates.\n */\n reason:\n | 'body_mismatch'\n | 'continuation_excluded'\n | 'continuation_only'\n | 'expired'\n | 'invalid_target_model'\n | 'not_enabled'\n | 'reprice_unavailable'\n | 'temporarily_unavailable'\n | 'variant_fields_present'\n | 'wrong_organization'\n | 'wrong_platform'\n | 'wrong_workspace';\n\n type: 'not_applied';\n\n /**\n * Request fields to remove before retrying, so the retry can redeem this token.\n *\n * Present exactly when `reason` is `variant_fields_present` — never null, never an\n * empty array; absent otherwise. Fields are named only from your own request, and\n * only after the sealed variant hash matched. A served best-effort retry has\n * already been billed at normal price; nothing redeems retroactively, but a\n * corrected re-send inside the token's five-minute window can still redeem.\n */\n remove_to_redeem?: Array<string> | null;\n}\n\n/**\n * The reprice was applied: the retry is billed as if the conversation had been on\n * the retry model all along.\n */\nexport interface BetaFallbackCreditRedeemed {\n type: 'redeemed';\n}\n\n/**\n * Object form of `fallback_credit_token`: the token plus a redemption mode.\n *\n * Requires `puku-beta: fallback-credit-2026-07-01`; without that header the\n * field accepts the bare string only. The bare string and the mode-less object are\n * equivalent (both select `strict`), so wrapping an existing token changes nothing\n * by itself.\n */\nexport interface BetaFallbackCreditTokenParam {\n /**\n * The opaque `fallback_credit_token` from a prior refusal's `stop_details` — the\n * same string the bare-string form carries.\n */\n token: string;\n\n /**\n * How a failing token affects the retry. `strict` (the default, and the\n * bare-string behavior): a failing redemption is a 400 and the retry is not\n * served. `best_effort`: the retry is served either way — a token-layer failure no\n * longer rejects the request; the retry proceeds at normal price and the outcome\n * is reported on the response's `usage.fallback_credit`. Two failures stay hard in\n * both modes: a malformed token, and combining `fallback_credit_token` with\n * `fallbacks`.\n */\n mode?: 'strict' | 'best_effort';\n}\n\n/**\n * Outcome of the `fallback_credit_token` presented on this request.\n */\nexport interface BetaFallbackCreditUsage {\n /**\n * Whether the fallback-credit reprice was applied to this response's billing.\n *\n * A union discriminated on `type`. `redeemed`: the retry is billed as if the\n * conversation had been on the retry model all along — including when the\n * resulting shift is zero because there was nothing to move. `not_applied`: no\n * reprice was applied; the arm's `reason` says why.\n */\n status: BetaFallbackCreditRedeemed | BetaFallbackCreditNotApplied;\n}\n\n/**\n * Identifies one hop of a fallback transition.\n */\nexport interface BetaFallbackInfo {\n /**\n * The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n}\n\n/**\n * Identifies one hop of a fallback transition.\n */\nexport interface BetaFallbackInfoParam {\n /**\n * The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n}\n\n/**\n * Token usage for the fallback-model attempt of a server-side fallback request.\n *\n * Produced in place of a `message` entry for whichever hop served the response. A\n * declined hop produces the existing `message` entry. Whether a fallback model\n * served the response is signalled by the presence of this entry in\n * `usage.iterations`.\n */\nexport interface BetaFallbackMessageIterationUsage {\n /**\n * Breakdown of cached tokens by TTL\n */\n cache_creation: BetaCacheCreation | null;\n\n /**\n * The number of input tokens used to create the cache entry.\n */\n cache_creation_input_tokens: number;\n\n /**\n * The number of input tokens read from the cache.\n */\n cache_read_input_tokens: number;\n\n /**\n * The number of input tokens which were used.\n */\n input_tokens: number;\n\n /**\n * The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n\n /**\n * The number of output tokens which were used.\n */\n output_tokens: number;\n\n /**\n * Usage for the fallback-model attempt that served the response\n */\n type: 'fallback_message';\n}\n\n/**\n * One entry in the `fallbacks` chain on a `/v1/messages` request.\n *\n * `model` is required. The override fields (`max_tokens`, `thinking`,\n * `output_config`, and `speed`) set the corresponding parameter for this attempt\n * only and are validated as if the request were made to `model`. Any other key is\n * rejected at parse time.\n */\nexport interface BetaFallbackParam {\n /**\n * The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n\n max_tokens?: number | null;\n\n output_config?: BetaOutputConfig | null;\n\n /**\n * Inference speed mode. `fast` provides significantly faster output token\n * generation at premium pricing. Not all models support `fast`; invalid\n * combinations are rejected at create time.\n */\n speed?: 'standard' | 'fast' | null;\n\n thinking?: BetaThinkingConfigEnabled | BetaThinkingConfigDisabled | BetaThinkingConfigAdaptive | null;\n\n [k: string]: unknown;\n}\n\n/**\n * The `from` model declined for policy reasons.\n */\nexport interface BetaFallbackRefusalTrigger {\n /**\n * The policy category that triggered a refusal.\n *\n * - `cyber` - The request could enable cyber harm, such as malware or exploit\n * development. Benign cybersecurity work can also trigger this category.\n * - `bio` - The request could enable biological harm, such as dangerous lab\n * methods. Beneficial life sciences work can also trigger this category.\n * - `frontier_llm` - The request could assist the development of competing AI\n * models, which is restricted under\n * [PukuAI's commercial terms](https://www.puku.com/legal/commercial-terms).\n * Benign machine learning work can also trigger this category.\n * - `reasoning_extraction` - The request asks the model to reproduce its internal\n * reasoning in the response text. To get reasoning in a structured form instead,\n * use\n * [adaptive thinking](https://platform.puku.com/docs/en/build-with-puku/adaptive-thinking).\n * - `general_harms` - The request could be related to an area that was determined\n * as harmful. Benign work might sometimes trigger this category.\n */\n category: 'cyber' | 'bio' | 'frontier_llm' | 'reasoning_extraction' | 'general_harms' | null;\n\n type: 'refusal';\n}\n\n/**\n * Opt-in server-side retry on one or more substitute models when the requested\n * model declines for policy reasons. Tried in order: if the first entry also\n * declines, the second is tried, and so on. The string \"default\" requests the\n * requested model's server-defined default fallback configuration.\n */\nexport type BetaFallbacksParam = Array<BetaFallbackParam> | 'default';\n\nexport interface BetaFileDocumentSource {\n file_id: string;\n\n type: 'file';\n}\n\nexport interface BetaFileImageSource {\n file_id: string;\n\n type: 'file';\n}\n\nexport interface BetaImageBlockParam {\n source: BetaBase64ImageSource | BetaURLImageSource | BetaFileImageSource;\n\n type: 'image';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Configures the transformations the server applies to this image before the model\n * observes it. Each key names a condition the server transforms images for; its\n * value selects the transformation applied. Omitted keys keep their default\n * behavior, and an empty object is equivalent to omitting the field.\n */\n transformations?: BetaImageTransformationsParam | null;\n}\n\n/**\n * Configures the transformations the server applies to this image before the model\n * observes it. Each key names a condition the server transforms images for; its\n * value selects the transformation applied. Omitted keys keep their default\n * behavior, and an empty object is equivalent to omitting the field.\n */\nexport interface BetaImageTransformationsParam {\n /**\n * What the server does when this image exceeds the model's maximum image size.\n * `\"downsize\"` (the default) scales the image down to fit, which changes the\n * dimensions the model observes without telling you. `\"error\"` instead rejects the\n * request with a 400 error naming the image's dimensions and the largest\n * dimensions that fit, so you can scale the image deliberately — your image is\n * never silently scaled down.\n */\n oversized_image?: 'downsize' | 'error';\n}\n\nexport interface BetaInputJSONDelta {\n partial_json: string;\n\n type: 'input_json_delta';\n}\n\nexport interface BetaInputTokensClearAtLeast {\n type: 'input_tokens';\n\n value: number;\n}\n\nexport interface BetaInputTokensTrigger {\n type: 'input_tokens';\n\n value: number;\n}\n\n/**\n * Per-iteration token usage breakdown.\n *\n * Each entry represents one sampling iteration, with its own input/output token\n * counts and cache statistics, discriminated by `type`. For `message` entries\n * (model sampling iterations, such as the turns of a server-side tool use loop),\n * this allows you to:\n *\n * - Determine which iterations exceeded long context thresholds (>=200k tokens)\n * - Calculate the context window size from the last `message` entry\n * - Understand token accumulation across server-side tool use loops\n *\n * A `compaction` entry reports the token usage of the compaction operation itself\n * — the server-side request that summarizes the context being closed — NOT the\n * size of the context that was compacted away, and its token counts can be much\n * smaller than that closed context (for example, a compaction that closes a\n * ~200k-token context can report only a few thousand tokens). Do not derive the\n * context window size from a `compaction` entry, even when it is the last entry. A\n * `compaction` entry's tokens are not included in the top-level `usage` fields.\n * When an input-token trigger is in effect (the default — 150,000 tokens unless\n * configured otherwise), each `compaction` entry closes a context that had reached\n * at least that threshold, though the context can exceed it by the final\n * iteration's output and tool results.\n */\nexport type BetaIterationsUsage = Array<\n | BetaMessageIterationUsage\n | BetaCompactionIterationUsage\n | BetaAdvisorMessageIterationUsage\n | BetaFallbackMessageIterationUsage\n>;\n\nexport interface BetaJSONOutputFormat {\n /**\n * The JSON schema of the format\n */\n schema: { [key: string]: unknown };\n\n type: 'json_schema';\n}\n\n/**\n * Configuration for a specific tool in an MCP toolset.\n */\nexport interface BetaMCPToolConfig {\n defer_loading?: boolean;\n\n enabled?: boolean;\n}\n\n/**\n * Default configuration for tools in an MCP toolset.\n */\nexport interface BetaMCPToolDefaultConfig {\n defer_loading?: boolean;\n\n enabled?: boolean;\n}\n\nexport interface BetaMCPToolResultBlock {\n content: string | Array<BetaTextBlock>;\n\n is_error: boolean;\n\n tool_use_id: string;\n\n type: 'mcp_tool_result';\n}\n\nexport interface BetaMCPToolUseBlock {\n id: string;\n\n input: unknown;\n\n /**\n * The name of the MCP tool\n */\n name: string;\n\n /**\n * The name of the MCP server\n */\n server_name: string;\n\n type: 'mcp_tool_use';\n}\n\nexport interface BetaMCPToolUseBlockParam {\n id: string;\n\n input: unknown;\n\n name: string;\n\n /**\n * The name of the MCP server\n */\n server_name: string;\n\n type: 'mcp_tool_use';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\n/**\n * Configuration for a group of tools from an MCP server.\n *\n * Allows configuring enabled status and defer_loading for all tools from an MCP\n * server, with optional per-tool overrides.\n */\nexport interface BetaMCPToolset {\n /**\n * Name of the MCP server to configure tools for\n */\n mcp_server_name: string;\n\n type: 'mcp_toolset';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Configuration overrides for specific tools, keyed by tool name\n */\n configs?: { [key: string]: BetaMCPToolConfig } | null;\n\n /**\n * Default configuration applied to all tools from this server\n */\n default_config?: BetaMCPToolDefaultConfig;\n}\n\nexport interface BetaMemoryTool20250818 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'memory';\n\n type: 'memory_20250818';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport type BetaMemoryTool20250818Command =\n | BetaMemoryTool20250818ViewCommand\n | BetaMemoryTool20250818CreateCommand\n | BetaMemoryTool20250818StrReplaceCommand\n | BetaMemoryTool20250818InsertCommand\n | BetaMemoryTool20250818DeleteCommand\n | BetaMemoryTool20250818RenameCommand;\n\nexport interface BetaMemoryTool20250818CreateCommand {\n /**\n * Command type identifier\n */\n command: 'create';\n\n /**\n * Content to write to the file\n */\n file_text: string;\n\n /**\n * Path where the file should be created\n */\n path: string;\n}\n\nexport interface BetaMemoryTool20250818DeleteCommand {\n /**\n * Command type identifier\n */\n command: 'delete';\n\n /**\n * Path to the file or directory to delete\n */\n path: string;\n}\n\nexport interface BetaMemoryTool20250818InsertCommand {\n /**\n * Command type identifier\n */\n command: 'insert';\n\n /**\n * Line number where text should be inserted\n */\n insert_line: number;\n\n /**\n * Text to insert at the specified line\n */\n insert_text: string;\n\n /**\n * Path to the file where text should be inserted\n */\n path: string;\n}\n\nexport interface BetaMemoryTool20250818RenameCommand {\n /**\n * Command type identifier\n */\n command: 'rename';\n\n /**\n * New path for the file or directory\n */\n new_path: string;\n\n /**\n * Current path of the file or directory\n */\n old_path: string;\n}\n\nexport interface BetaMemoryTool20250818StrReplaceCommand {\n /**\n * Command type identifier\n */\n command: 'str_replace';\n\n /**\n * Text to replace with\n */\n new_str: string;\n\n /**\n * Text to search for and replace\n */\n old_str: string;\n\n /**\n * Path to the file where text should be replaced\n */\n path: string;\n}\n\nexport interface BetaMemoryTool20250818ViewCommand {\n /**\n * Command type identifier\n */\n command: 'view';\n\n /**\n * Path to directory or file to view\n */\n path: string;\n\n /**\n * Optional line range for viewing specific lines\n */\n view_range?: Array<number>;\n}\n\nexport interface BetaMessage {\n /**\n * Unique object identifier.\n *\n * The format and length of IDs may change over time.\n */\n id: string;\n\n /**\n * Information about the container used in the request (for the code execution\n * tool)\n */\n container: BetaContainer | null;\n\n /**\n * Content generated by the model.\n *\n * This is an array of content blocks, each of which has a `type` that determines\n * its shape.\n *\n * Example:\n *\n * ```json\n * [{ \"type\": \"text\", \"text\": \"Hi, I'm Puku.\" }]\n * ```\n *\n * If the request input `messages` ended with an `assistant` turn, then the\n * response `content` will continue directly from that last turn. You can use this\n * to constrain the model's output.\n *\n * For example, if the input `messages` were:\n *\n * ```json\n * [\n * {\n * \"role\": \"user\",\n * \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"\n * },\n * { \"role\": \"assistant\", \"content\": \"The best answer is (\" }\n * ]\n * ```\n *\n * Then the response `content` might be:\n *\n * ```json\n * [{ \"type\": \"text\", \"text\": \"B)\" }]\n * ```\n */\n content: Array<BetaContentBlock>;\n\n /**\n * Context management response.\n *\n * Information about context management strategies applied during the request.\n */\n context_management: BetaContextManagementResponse | null;\n\n /**\n * Response envelope for request-level diagnostics. Present (possibly null)\n * whenever the caller supplied `diagnostics` on the request.\n */\n diagnostics: BetaDiagnostics | null;\n\n /**\n * The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n\n /**\n * Conversational role of the generated message.\n *\n * This will always be `\"assistant\"`.\n */\n role: 'assistant';\n\n /**\n * Structured information about a refusal.\n */\n stop_details: BetaRefusalStopDetails | null;\n\n /**\n * The reason that we stopped.\n *\n * This may be one the following values:\n *\n * - `\"end_turn\"`: the model reached a natural stopping point\n * - `\"max_tokens\"`: we exceeded the requested `max_tokens` or the model's maximum\n * - `\"stop_sequence\"`: one of your provided custom `stop_sequences` was generated\n * - `\"tool_use\"`: the model invoked one or more tools\n * - `\"pause_turn\"`: we paused a long-running turn. You may provide the response\n * back as-is in a subsequent request to let the model continue.\n * - `\"refusal\"`: when streaming classifiers intervene to handle potential policy\n * violations\n * - `\"model_context_window_exceeded\"`: we exceeded the model's context window\n *\n * In non-streaming mode this value is always non-null. In streaming mode, it is\n * null in the `message_start` event and non-null otherwise.\n */\n stop_reason: BetaStopReason | null;\n\n /**\n * Which custom stop sequence was generated, if any.\n *\n * This value will be a non-null string if one of your custom stop sequences was\n * generated.\n */\n stop_sequence: string | null;\n\n /**\n * Object type.\n *\n * For Messages, this is always `\"message\"`.\n */\n type: 'message';\n\n /**\n * Billing and rate-limit usage.\n *\n * PukuAI's API bills and rate-limits by token counts, as tokens represent the\n * underlying cost to our systems.\n *\n * Under the hood, the API transforms requests into a format suitable for the\n * model. The model's output then goes through a parsing stage before becoming an\n * API response. As a result, the token counts in `usage` will not match one-to-one\n * with the exact visible content of an API request or response.\n *\n * For example, `output_tokens` will be non-zero, even for an empty string response\n * from Puku.\n *\n * Total input tokens in a request is the summation of `input_tokens`,\n * `cache_creation_input_tokens`, and `cache_read_input_tokens`.\n */\n usage: BetaUsage;\n\n /**\n * Changes the API made to the request's input before showing it to the model: one\n * entry per change, in request order. Today the only entry type is\n * `thinking_dropped` — a `thinking`, `redacted_thinking` or `connector_text` block\n * from the request's `messages` that was removed from the prompt instead of being\n * shown to the model because it failed a binding check. More entry types may be\n * added over time; ignore types you do not recognize.\n *\n * Requires `puku-beta: thinking-binding-controls-2026-08-01`. Present on\n * every such response from a model that supports extended thinking, as `[]` when\n * nothing was changed; without the beta, blocks are removed all the same but\n * nothing is reported. Removed blocks contribute nothing to `usage.input_tokens`.\n * When streaming, the array is final in `message_start`; the final `message_delta`\n * event carries it only when a server-side model fallback happened mid-stream, in\n * which case it holds the serving model's entries and replaces the one in\n * `message_start`.\n */\n input_transformations?: Array<BetaThinkingDroppedInputTransformation> | null;\n}\n\nexport interface BetaMessageDeltaUsage {\n /**\n * The cumulative number of input tokens used to create the cache entry.\n */\n cache_creation_input_tokens: number | null;\n\n /**\n * The cumulative number of input tokens read from the cache.\n */\n cache_read_input_tokens: number | null;\n\n /**\n * Outcome of the `fallback_credit_token` presented on this request.\n */\n fallback_credit: BetaFallbackCreditUsage | null;\n\n /**\n * The cumulative number of input tokens which were used.\n */\n input_tokens: number | null;\n\n /**\n * Per-iteration token usage breakdown.\n *\n * Each entry represents one sampling iteration, with its own input/output token\n * counts and cache statistics, discriminated by `type`. For `message` entries\n * (model sampling iterations, such as the turns of a server-side tool use loop),\n * this allows you to:\n *\n * - Determine which iterations exceeded long context thresholds (>=200k tokens)\n * - Calculate the context window size from the last `message` entry\n * - Understand token accumulation across server-side tool use loops\n *\n * A `compaction` entry reports the token usage of the compaction operation itself\n * — the server-side request that summarizes the context being closed — NOT the\n * size of the context that was compacted away, and its token counts can be much\n * smaller than that closed context (for example, a compaction that closes a\n * ~200k-token context can report only a few thousand tokens). Do not derive the\n * context window size from a `compaction` entry, even when it is the last entry. A\n * `compaction` entry's tokens are not included in the top-level `usage` fields.\n * When an input-token trigger is in effect (the default — 150,000 tokens unless\n * configured otherwise), each `compaction` entry closes a context that had reached\n * at least that threshold, though the context can exceed it by the final\n * iteration's output and tool results.\n */\n iterations: BetaIterationsUsage | null;\n\n /**\n * The cumulative number of output tokens which were used.\n */\n output_tokens: number;\n\n /**\n * Breakdown of output tokens by category.\n *\n * `output_tokens` remains the inclusive, authoritative total used for billing.\n * This object provides a read-only decomposition for observability — for example,\n * how many of the billed output tokens were spent on internal reasoning that may\n * have been summarized before being returned to you.\n */\n output_tokens_details: BetaOutputTokensDetails | null;\n\n /**\n * The number of server tool requests.\n */\n server_tool_use: BetaServerToolUsage | null;\n}\n\n/**\n * Token usage for a sampling iteration.\n */\nexport interface BetaMessageIterationUsage {\n /**\n * Breakdown of cached tokens by TTL\n */\n cache_creation: BetaCacheCreation | null;\n\n /**\n * The number of input tokens used to create the cache entry.\n */\n cache_creation_input_tokens: number;\n\n /**\n * The number of input tokens read from the cache.\n */\n cache_read_input_tokens: number;\n\n /**\n * The number of input tokens which were used.\n */\n input_tokens: number;\n\n /**\n * The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n\n /**\n * The number of output tokens which were used.\n */\n output_tokens: number;\n\n /**\n * Usage for a sampling iteration\n */\n type: 'message';\n}\n\nexport interface BetaMessageParam {\n content: string | Array<BetaContentBlockParam>;\n\n role: 'user' | 'assistant' | 'system';\n\n /**\n * How long this system message's text stays in front of the model. `\"never\"` (the\n * default) renders it on every request that includes it. `\"next_user_message\"`\n * renders it only for the user turn it follows: once a later `role: \"user\"`\n * message exists in `messages` the message stays in the array (send it unchanged)\n * but is no longer shown to the model. Only permitted on `role: \"system\"`\n * messages.\n */\n clear_at?: 'next_user_message' | 'never' | null;\n\n /**\n * Per-message output configuration on a role:\"system\" input message.\n *\n * Fields here apply per-turn; `format` remains top-level only. An empty `{}` is\n * accepted on a message that carries content; a message with neither content nor\n * output_config fields is rejected.\n */\n output_config?: BetaSystemMessageOutputConfig | null;\n}\n\nexport interface BetaMessageTokensCount {\n /**\n * Information about context management applied to the message.\n */\n context_management: BetaCountTokensContextManagementResponse | null;\n\n /**\n * The total number of tokens across the provided list of messages, system prompt,\n * and tools.\n */\n input_tokens: number;\n}\n\nexport interface BetaMetadata {\n /**\n * An external identifier for the user who is associated with the request.\n *\n * This should be a uuid, hash value, or other opaque identifier. PukuAI may use\n * this id to help detect abuse. Do not include any identifying information such as\n * name, email address, or phone number.\n */\n user_id?: string | null;\n}\n\nexport interface BetaOutputConfig {\n /**\n * All possible effort levels.\n */\n effort?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null;\n\n /**\n * A schema to specify Puku's output format in responses. See\n * [structured outputs](https://platform.puku.com/docs/en/build-with-puku/structured-outputs)\n */\n format?: BetaJSONOutputFormat | null;\n\n /**\n * User-configurable total token budget across contexts.\n */\n task_budget?: BetaTokenTaskBudget | null;\n}\n\nexport interface BetaOutputTokensDetails {\n /**\n * Number of output tokens the model generated as internal reasoning, including the\n * thinking-block delimiter tokens.\n *\n * Reflects the raw reasoning the model produced, not the (possibly shorter)\n * summarized thinking text returned in the response body. Computed by\n * re-tokenizing the raw reasoning text, so it may differ from the model's exact\n * generation count by a small number of tokens. Always ≤ `output_tokens`;\n * `output_tokens - thinking_tokens` approximates the non-reasoning output.\n */\n thinking_tokens: number;\n}\n\nexport interface BetaPlainTextSource {\n data: string;\n\n media_type: 'text/plain';\n\n type: 'text';\n}\n\nexport type BetaRawContentBlockDelta =\n | BetaTextDelta\n | BetaInputJSONDelta\n | BetaCitationsDelta\n | BetaThinkingDelta\n | BetaSignatureDelta\n | BetaCompactionContentBlockDelta;\n\nexport interface BetaRawContentBlockDeltaEvent {\n delta: BetaRawContentBlockDelta;\n\n index: number;\n\n type: 'content_block_delta';\n}\n\nexport interface BetaRawContentBlockStartEvent {\n /**\n * Response model for a file uploaded to the container.\n */\n content_block:\n | BetaTextBlock\n | BetaThinkingBlock\n | BetaRedactedThinkingBlock\n | BetaToolUseBlock\n | BetaServerToolUseBlock\n | BetaWebSearchToolResultBlock\n | BetaWebFetchToolResultBlock\n | BetaAdvisorToolResultBlock\n | BetaCodeExecutionToolResultBlock\n | BetaBashCodeExecutionToolResultBlock\n | BetaTextEditorCodeExecutionToolResultBlock\n | BetaToolSearchToolResultBlock\n | BetaMCPToolUseBlock\n | BetaMCPToolResultBlock\n | BetaContainerUploadBlock\n | BetaCompactionBlock\n | BetaFallbackBlock;\n\n index: number;\n\n type: 'content_block_start';\n}\n\nexport interface BetaRawContentBlockStopEvent {\n index: number;\n\n type: 'content_block_stop';\n}\n\nexport interface BetaRawMessageDeltaEvent {\n /**\n * Information about context management strategies applied during the request\n */\n context_management: BetaContextManagementResponse | null;\n\n delta: BetaRawMessageDeltaEvent.Delta;\n\n type: 'message_delta';\n\n /**\n * Billing and rate-limit usage.\n *\n * PukuAI's API bills and rate-limits by token counts, as tokens represent the\n * underlying cost to our systems.\n *\n * Under the hood, the API transforms requests into a format suitable for the\n * model. The model's output then goes through a parsing stage before becoming an\n * API response. As a result, the token counts in `usage` will not match one-to-one\n * with the exact visible content of an API request or response.\n *\n * For example, `output_tokens` will be non-zero, even for an empty string response\n * from Puku.\n *\n * Total input tokens in a request is the summation of `input_tokens`,\n * `cache_creation_input_tokens`, and `cache_read_input_tokens`.\n */\n usage: BetaMessageDeltaUsage;\n\n /**\n * Changes the API made to the request's input before showing it to the model: one\n * entry per change, in request order. Today the only entry type is\n * `thinking_dropped` — a `thinking`, `redacted_thinking` or `connector_text` block\n * from the request's `messages` that was removed from the prompt instead of being\n * shown to the model because it failed a binding check. More entry types may be\n * added over time; ignore types you do not recognize.\n *\n * Requires `puku-beta: thinking-binding-controls-2026-08-01`. Present on\n * every such response from a model that supports extended thinking, as `[]` when\n * nothing was changed; without the beta, blocks are removed all the same but\n * nothing is reported. Removed blocks contribute nothing to `usage.input_tokens`.\n * When streaming, the array is final in `message_start`; the final `message_delta`\n * event carries it only when a server-side model fallback happened mid-stream, in\n * which case it holds the serving model's entries and replaces the one in\n * `message_start`.\n */\n input_transformations?: Array<BetaThinkingDroppedInputTransformation> | null;\n}\n\nexport namespace BetaRawMessageDeltaEvent {\n export interface Delta {\n /**\n * Information about the container used in the request (for the code execution\n * tool)\n */\n container: BetaMessagesAPI.BetaContainer | null;\n\n /**\n * Structured information about a refusal.\n */\n stop_details: BetaMessagesAPI.BetaRefusalStopDetails | null;\n\n stop_reason: BetaMessagesAPI.BetaStopReason | null;\n\n stop_sequence: string | null;\n }\n}\n\nexport interface BetaRawMessageStartEvent {\n message: BetaMessage;\n\n type: 'message_start';\n}\n\nexport interface BetaRawMessageStopEvent {\n type: 'message_stop';\n}\n\nexport type BetaRawMessageStreamEvent =\n | BetaRawMessageStartEvent\n | BetaRawMessageDeltaEvent\n | BetaRawMessageStopEvent\n | BetaRawContentBlockStartEvent\n | BetaRawContentBlockDeltaEvent\n | BetaRawContentBlockStopEvent;\n\nexport interface BetaRedactedThinkingBlock {\n /**\n * The contents of this redacted thinking block, returned when portions of the\n * model's thinking were safety-redacted. This field is opaque and encrypted, with\n * no readable content.\n *\n * Pass `redacted_thinking` blocks back to the API unchanged when continuing a\n * multi-turn conversation.\n *\n * See\n * [extended thinking](https://platform.puku.com/docs/en/build-with-puku/extended-thinking#redacted-thinking-blocks)\n * for details.\n */\n data: string;\n\n type: 'redacted_thinking';\n}\n\nexport interface BetaRedactedThinkingBlockParam {\n /**\n * The `data` value of this redacted thinking block, exactly as returned by the API\n * in a previous response. Opaque and encrypted; pass it back unchanged.\n */\n data: string;\n\n type: 'redacted_thinking';\n}\n\n/**\n * Structured information about a refusal.\n */\nexport interface BetaRefusalStopDetails {\n /**\n * The policy category that triggered a refusal.\n *\n * - `cyber` - The request could enable cyber harm, such as malware or exploit\n * development. Benign cybersecurity work can also trigger this category.\n * - `bio` - The request could enable biological harm, such as dangerous lab\n * methods. Beneficial life sciences work can also trigger this category.\n * - `frontier_llm` - The request could assist the development of competing AI\n * models, which is restricted under\n * [PukuAI's commercial terms](https://www.puku.com/legal/commercial-terms).\n * Benign machine learning work can also trigger this category.\n * - `reasoning_extraction` - The request asks the model to reproduce its internal\n * reasoning in the response text. To get reasoning in a structured form instead,\n * use\n * [adaptive thinking](https://platform.puku.com/docs/en/build-with-puku/adaptive-thinking).\n * - `general_harms` - The request could be related to an area that was determined\n * as harmful. Benign work might sometimes trigger this category.\n */\n category: 'cyber' | 'bio' | 'frontier_llm' | 'reasoning_extraction' | 'general_harms' | null;\n\n /**\n * Human-readable explanation of the refusal.\n *\n * This text is not guaranteed to be stable. `null` when no explanation is\n * available for the category.\n */\n explanation: string | null;\n\n /**\n * Opaque code that refunds the cache-miss cost when retrying this refused request\n * on the fallback model. Pass it as `fallback_credit_token` on the retry request.\n * Expires 5 minutes after the refusal.\n *\n * The retry is sent either with the same request body (`system`, `messages`,\n * `tools`, and other render-shaping fields), or with the same body plus one\n * appended `assistant` message whose content is the partial text (with any\n * trailing whitespace stripped from the final text block) and paired server-tool\n * blocks from this refusal — which also authorizes that appended turn as an\n * assistant-prefill continuation on models that otherwise disallow prefill. A\n * token minted mid-server-tool-loop whose partial content was continuable may only\n * be redeemed the second way — if a same-body retry is rejected with a 400 saying\n * the token must be redeemed by continuing the partial response, retry the second\n * way instead. Either way: same workspace, same platform; a mismatch is a 400.\n * Resending a token for an already-warm prefix is permitted but yields no\n * additional credit.\n *\n * `null` when the refused model isn't eligible for a fallback credit.\n */\n fallback_credit_token: string | null;\n\n /**\n * Whether the accompanying `fallback_credit_token` may be redeemed with the\n * appended-assistant retry form. Only set when `fallback_credit_token` is present.\n *\n * `true`: retry by resending the same request body plus one appended `assistant`\n * message whose content is this response's `content` with any trailing whitespace\n * stripped from the final text block and unpaired `tool_use` blocks omitted (the\n * same appended-turn shape described on `fallback_credit_token`), with the token\n * attached. `false`: retry by resending the original request body unchanged, with\n * the token attached — the appended-assistant form is not available for this\n * refusal (no continuable partial content, or the request uses `output_format` or\n * a `tool_choice` that forces tool use). One exception: when the request used\n * `output_format` or a forced `tool_choice` and the refusal arrived after server\n * tools (including MCP connector tools) had already executed, the token may not be\n * redeemable by either retry form; if the exact-body retry is then rejected with a\n * 400 saying the token must be redeemed by continuing the partial response,\n * discard the token and retry without it.\n *\n * Advisory: if an appended-assistant retry is rejected with a 400 despite `true`,\n * fall back to resending the original request body with the token.\n */\n fallback_has_prefill_claim: boolean | null;\n\n /**\n * The server's suggested retry target for this refusal. Populated when a fallback\n * attempt could not be made (the fallback model's rate limit was exhausted, or it\n * was overloaded); names the fallback model the caller can retry directly. Null\n * otherwise.\n */\n recommended_model: string | null;\n\n type: 'refusal';\n}\n\nexport interface BetaRequestDocumentBlock {\n source:\n | BetaBase64PDFSource\n | BetaPlainTextSource\n | BetaContentBlockSource\n | BetaURLPDFSource\n | BetaFileDocumentSource;\n\n type: 'document';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n citations?: BetaCitationsConfigParam | null;\n\n context?: string | null;\n\n title?: string | null;\n}\n\nexport interface BetaRequestMCPServerToolConfiguration {\n allowed_tools?: Array<string> | null;\n\n enabled?: boolean | null;\n}\n\nexport interface BetaRequestMCPServerURLDefinition {\n name: string;\n\n type: 'url';\n\n url: string;\n\n authorization_token?: string | null;\n\n tool_configuration?: BetaRequestMCPServerToolConfiguration | null;\n}\n\nexport interface BetaRequestMCPToolResultBlockParam {\n tool_use_id: string;\n\n type: 'mcp_tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n content?: string | Array<BetaTextBlockParam>;\n\n is_error?: boolean;\n}\n\n/**\n * Mid-conversation directive to surface a declared tool.\n *\n * `tool` references a tool (or MCP toolset) by name from the request's `tools`; it\n * is offered to the model from this point in the conversation onward.\n */\nexport interface BetaRequestToolAdditionBlock {\n /**\n * Reference to a single tool the caller declared directly in `tools[]`. Does not\n * accept the composed `{server}_{name}` form the server assigns to MCP-resolved\n * tools — use `mcp_tool_reference` or `mcp_toolset_reference` for those.\n */\n tool: BetaToolChangeToolReference | BetaToolChangeMCPToolReference | BetaToolChangeMCPToolsetReference;\n\n type: 'tool_addition';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\n/**\n * Mid-conversation directive to withdraw a tool.\n *\n * `tool` references a tool (or MCP toolset) by name from the request's `tools`; it\n * is no longer offered to the model from this point in the conversation onward.\n */\nexport interface BetaRequestToolRemovalBlock {\n /**\n * Reference to a single tool the caller declared directly in `tools[]`. Does not\n * accept the composed `{server}_{name}` form the server assigns to MCP-resolved\n * tools — use `mcp_tool_reference` or `mcp_toolset_reference` for those.\n */\n tool: BetaToolChangeToolReference | BetaToolChangeMCPToolReference | BetaToolChangeMCPToolsetReference;\n\n type: 'tool_removal';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\nexport interface BetaSearchResultBlockParam {\n content: Array<BetaTextBlockParam>;\n\n source: string;\n\n title: string;\n\n type: 'search_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n citations?: BetaCitationsConfigParam;\n}\n\n/**\n * Tool invocation generated by a server-side tool.\n */\nexport interface BetaServerToolCaller {\n tool_id: string;\n\n type: 'code_execution_20250825';\n}\n\nexport interface BetaServerToolCaller20260120 {\n tool_id: string;\n\n type: 'code_execution_20260120';\n}\n\nexport interface BetaServerToolUsage {\n /**\n * The number of web fetch tool requests.\n */\n web_fetch_requests: number;\n\n /**\n * The number of web search tool requests.\n */\n web_search_requests: number;\n}\n\nexport interface BetaServerToolUseBlock {\n id: string;\n\n input: { [key: string]: unknown };\n\n name:\n | 'advisor'\n | 'web_search'\n | 'web_fetch'\n | 'code_execution'\n | 'bash_code_execution'\n | 'text_editor_code_execution'\n | 'tool_search_tool_regex'\n | 'tool_search_tool_bm25';\n\n type: 'server_tool_use';\n\n /**\n * Tool invocation directly from the model.\n */\n caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;\n}\n\nexport interface BetaServerToolUseBlockParam {\n id: string;\n\n input: unknown;\n\n name:\n | 'advisor'\n | 'web_search'\n | 'web_fetch'\n | 'code_execution'\n | 'bash_code_execution'\n | 'text_editor_code_execution'\n | 'tool_search_tool_regex'\n | 'tool_search_tool_bm25';\n\n type: 'server_tool_use';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Tool invocation directly from the model.\n */\n caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;\n}\n\nexport interface BetaSignatureDelta {\n /**\n * The `signature` for this thinking block: an opaque value used to verify that the\n * block was generated by Puku when it is passed back to the API. Delivered in a\n * `signature_delta` event just before the block's `content_block_stop` event.\n */\n signature: string;\n\n type: 'signature_delta';\n}\n\n/**\n * Specification for a skill to be loaded in a container (request model).\n */\nexport interface BetaSkillParams {\n /**\n * Skill ID\n */\n skill_id: string;\n\n /**\n * Type of skill - either 'puku' (built-in) or 'custom' (user-defined)\n */\n type: 'puku' | 'custom';\n\n /**\n * Skill version or 'latest' for most recent version\n */\n version?: string;\n}\n\nexport type BetaStopReason =\n | 'end_turn'\n | 'max_tokens'\n | 'stop_sequence'\n | 'tool_use'\n | 'pause_turn'\n | 'compaction'\n | 'refusal'\n | 'model_context_window_exceeded';\n\n/**\n * Per-message output configuration on a role:\"system\" input message.\n *\n * Fields here apply per-turn; `format` remains top-level only. An empty `{}` is\n * accepted on a message that carries content; a message with neither content nor\n * output_config fields is rejected.\n */\nexport interface BetaSystemMessageOutputConfig {\n /**\n * All possible effort levels.\n */\n effort?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null;\n}\n\nexport interface BetaTextBlock {\n /**\n * Citations supporting the text block.\n *\n * The type of citation returned will depend on the type of document being cited.\n * Citing a PDF results in `page_location`, plain text results in `char_location`,\n * and content document results in `content_block_location`.\n */\n citations: Array<BetaTextCitation> | null;\n\n text: string;\n\n type: 'text';\n}\n\nexport interface BetaTextBlockParam {\n text: string;\n\n type: 'text';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n citations?: Array<BetaTextCitationParam> | null;\n}\n\nexport type BetaTextCitation =\n | BetaCitationCharLocation\n | BetaCitationPageLocation\n | BetaCitationContentBlockLocation\n | BetaCitationsWebSearchResultLocation\n | BetaCitationSearchResultLocation;\n\nexport type BetaTextCitationParam =\n | BetaCitationCharLocationParam\n | BetaCitationPageLocationParam\n | BetaCitationContentBlockLocationParam\n | BetaCitationWebSearchResultLocationParam\n | BetaCitationSearchResultLocationParam;\n\nexport interface BetaTextDelta {\n text: string;\n\n type: 'text_delta';\n}\n\nexport interface BetaTextEditorCodeExecutionCreateResultBlock {\n is_file_update: boolean;\n\n type: 'text_editor_code_execution_create_result';\n}\n\nexport interface BetaTextEditorCodeExecutionCreateResultBlockParam {\n is_file_update: boolean;\n\n type: 'text_editor_code_execution_create_result';\n}\n\nexport interface BetaTextEditorCodeExecutionStrReplaceResultBlock {\n lines: Array<string> | null;\n\n new_lines: number | null;\n\n new_start: number | null;\n\n old_lines: number | null;\n\n old_start: number | null;\n\n type: 'text_editor_code_execution_str_replace_result';\n}\n\nexport interface BetaTextEditorCodeExecutionStrReplaceResultBlockParam {\n type: 'text_editor_code_execution_str_replace_result';\n\n lines?: Array<string> | null;\n\n new_lines?: number | null;\n\n new_start?: number | null;\n\n old_lines?: number | null;\n\n old_start?: number | null;\n}\n\nexport interface BetaTextEditorCodeExecutionToolResultBlock {\n content:\n | BetaTextEditorCodeExecutionToolResultError\n | BetaTextEditorCodeExecutionViewResultBlock\n | BetaTextEditorCodeExecutionCreateResultBlock\n | BetaTextEditorCodeExecutionStrReplaceResultBlock;\n\n tool_use_id: string;\n\n type: 'text_editor_code_execution_tool_result';\n}\n\nexport interface BetaTextEditorCodeExecutionToolResultBlockParam {\n content:\n | BetaTextEditorCodeExecutionToolResultErrorParam\n | BetaTextEditorCodeExecutionViewResultBlockParam\n | BetaTextEditorCodeExecutionCreateResultBlockParam\n | BetaTextEditorCodeExecutionStrReplaceResultBlockParam;\n\n tool_use_id: string;\n\n type: 'text_editor_code_execution_tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\nexport interface BetaTextEditorCodeExecutionToolResultError {\n error_code:\n | 'invalid_tool_input'\n | 'unavailable'\n | 'too_many_requests'\n | 'execution_time_exceeded'\n | 'file_not_found';\n\n error_message: string | null;\n\n type: 'text_editor_code_execution_tool_result_error';\n}\n\nexport interface BetaTextEditorCodeExecutionToolResultErrorParam {\n error_code:\n | 'invalid_tool_input'\n | 'unavailable'\n | 'too_many_requests'\n | 'execution_time_exceeded'\n | 'file_not_found';\n\n type: 'text_editor_code_execution_tool_result_error';\n\n error_message?: string | null;\n}\n\nexport interface BetaTextEditorCodeExecutionViewResultBlock {\n content: string;\n\n file_type: 'text' | 'image' | 'pdf';\n\n num_lines: number | null;\n\n start_line: number | null;\n\n total_lines: number | null;\n\n type: 'text_editor_code_execution_view_result';\n}\n\nexport interface BetaTextEditorCodeExecutionViewResultBlockParam {\n content: string;\n\n file_type: 'text' | 'image' | 'pdf';\n\n type: 'text_editor_code_execution_view_result';\n\n num_lines?: number | null;\n\n start_line?: number | null;\n\n total_lines?: number | null;\n}\n\nexport interface BetaThinkingBlock {\n /**\n * A value used to verify that this thinking block was generated by Puku when it\n * is passed back to the API.\n *\n * This is an opaque field and should not be interpreted or parsed. When passing\n * thinking blocks back to the API (required when using tools with extended\n * thinking), pass them back exactly as received, with this field intact.\n *\n * See\n * [extended thinking](https://platform.puku.com/docs/en/build-with-puku/extended-thinking)\n * for details.\n */\n signature: string;\n\n /**\n * The text of Puku's thinking process for this block.\n */\n thinking: string;\n\n type: 'thinking';\n}\n\n/**\n * Controls for block binding: what happens when a thinking block this request\n * sends back fails the conversation check. Every field is optional; an empty\n * object means every default.\n */\nexport interface BetaThinkingBlockBinding {\n /**\n * What happens when a thinking block in `messages` fails the conversation check:\n * it was created in a different conversation, or the messages before it have\n * changed since. `\"error\"` (the default) fails the request with a 400 error.\n * `\"drop_block\"` removes the failing blocks and the request proceeds; the model no\n * longer sees the dropped reasoning.\n */\n prefix_mismatch_behavior?: BetaThinkingPrefixMismatchBehavior | null;\n}\n\nexport interface BetaThinkingBlockParam {\n /**\n * The `signature` value of this thinking block, exactly as returned by the API in\n * a previous response. Used to verify that the block was generated by Puku.\n *\n * Thinking blocks must be passed back unmodified and in their original order; a\n * modified block results in a 400 `invalid_request_error`.\n */\n signature: string;\n\n /**\n * The `thinking` text of this block as returned by the API.\n */\n thinking: string;\n\n type: 'thinking';\n}\n\nexport interface BetaThinkingConfigAdaptive {\n type: 'adaptive';\n\n /**\n * Controls for block binding: what happens when a thinking block this request\n * sends back fails the conversation check. Every field is optional; an empty\n * object means every default.\n */\n block_binding?: BetaThinkingBlockBinding | null;\n\n /**\n * Controls how thinking content appears in the response. When set to `summarized`,\n * thinking is returned normally. When set to `omitted`, thinking content is\n * redacted but a signature is returned for multi-turn continuity. Defaults to\n * `summarized`.\n */\n display?: 'summarized' | 'omitted' | 'updates' | null;\n}\n\nexport interface BetaThinkingConfigDisabled {\n type: 'disabled';\n}\n\nexport interface BetaThinkingConfigEnabled {\n /**\n * Determines how many tokens Puku can use for its internal reasoning process.\n * Larger budgets can enable more thorough analysis for complex problems, improving\n * response quality.\n *\n * Must be ≥1024 and less than `max_tokens`.\n *\n * See\n * [extended thinking](https://platform.puku.com/docs/en/build-with-puku/extended-thinking)\n * for details.\n */\n budget_tokens: number;\n\n type: 'enabled';\n\n /**\n * Controls for block binding: what happens when a thinking block this request\n * sends back fails the conversation check. Every field is optional; an empty\n * object means every default.\n */\n block_binding?: BetaThinkingBlockBinding | null;\n\n /**\n * Controls how thinking content appears in the response. When set to `summarized`,\n * thinking is returned normally. When set to `omitted`, thinking content is\n * redacted but a signature is returned for multi-turn continuity. Defaults to\n * `summarized`.\n */\n display?: 'summarized' | 'omitted' | 'updates' | null;\n}\n\n/**\n * Configuration for enabling Puku's extended thinking.\n *\n * When enabled, responses include `thinking` content blocks showing Puku's\n * thinking process before the final answer. Requires a minimum budget of 1,024\n * tokens and counts towards your `max_tokens` limit.\n *\n * See\n * [extended thinking](https://platform.puku.com/docs/en/build-with-puku/extended-thinking)\n * for details.\n */\nexport type BetaThinkingConfigParam =\n | BetaThinkingConfigEnabled\n | BetaThinkingConfigDisabled\n | BetaThinkingConfigAdaptive;\n\nexport interface BetaThinkingDelta {\n /**\n * Per-frame increment of a coarse, running estimate of the tokens this thinking\n * block has produced so far. Present whenever the\n * `thinking-token-count-2026-05-13` beta is set; `null` unless `thinking.display`\n * resolves to `\"omitted\"` and a count is due this frame. Sum the increments across\n * `thinking_delta` frames on this block for a progress indicator. Each increment\n * is a non-negative multiple of a fixed quantum and the cadence is rate-limited,\n * so this is a deliberately lossy display hint, not a billable count;\n * `usage.output_tokens` remains authoritative.\n */\n estimated_tokens: number | null;\n\n /**\n * The incremental `thinking` text for this content block. Concatenate the\n * `thinking` values of successive `thinking_delta` events to assemble the block's\n * full `thinking` value.\n */\n thinking: string;\n\n type: 'thinking_delta';\n}\n\nexport interface BetaThinkingDroppedInputTransformation {\n /**\n * Where the removed block was in your request, as `messages.{i}.content.{j}`: `i`\n * indexes the `messages` array you sent and `j` that message's `content` array —\n * the same form error messages use.\n */\n path: string;\n\n /**\n * Which binding check removed the block: `model_binding_mismatch` — it was created\n * by a model whose reasoning the requested model may not read;\n * `prefix_binding_mismatch` — the conversation before it differs from the\n * conversation it was created in (the rest of that turn's consecutive thinking\n * blocks are removed with it, each with this reason);\n * `organization_binding_mismatch` — it was created under a different organization\n * (an PukuAI organization, AWS account or Google Cloud project) and this\n * organization is not one of its additional organizations;\n * `end_user_binding_mismatch` — it was created for a different end user, or was\n * removed by the consumer-organization binding. A block that would fail several\n * checks reports one reason, in this order of precedence:\n * `organization_binding_mismatch`, `end_user_binding_mismatch`,\n * `model_binding_mismatch`, `prefix_binding_mismatch`.\n */\n reason:\n | 'model_binding_mismatch'\n | 'prefix_binding_mismatch'\n | 'organization_binding_mismatch'\n | 'end_user_binding_mismatch';\n\n /**\n * Always `thinking_dropped` for this entry type.\n */\n type: 'thinking_dropped';\n}\n\n/**\n * What happens when a thinking block in `messages` fails the conversation check:\n * it was created in a different conversation, or the messages before it have\n * changed since. `\"error\"` (the default) fails the request with a 400 error.\n * `\"drop_block\"` removes the failing blocks and the request proceeds; the model no\n * longer sees the dropped reasoning.\n */\nexport type BetaThinkingPrefixMismatchBehavior = 'error' | 'drop_block';\n\nexport interface BetaThinkingTurns {\n type: 'thinking_turns';\n\n value: number;\n}\n\n/**\n * User-configurable total token budget across contexts.\n */\nexport interface BetaTokenTaskBudget {\n /**\n * Total token budget across all contexts in the session.\n */\n total: number;\n\n /**\n * The budget type. Currently only 'tokens' is supported.\n */\n type: 'tokens';\n\n /**\n * Remaining tokens in the budget. Use this to track usage across contexts when\n * implementing compaction client-side. Defaults to total if not provided.\n */\n remaining?: number | null;\n}\n\nexport interface BetaTool {\n /**\n * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.\n *\n * This defines the shape of the `input` that your tool accepts and that the model\n * will produce.\n */\n input_schema: BetaTool.InputSchema;\n\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: string;\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Description of what this tool does.\n *\n * Tool descriptions should be as detailed as possible. The more information that\n * the model has about what the tool is and how to use it, the better it will\n * perform. You can use natural language descriptions to reinforce important\n * aspects of the tool input JSON schema.\n */\n description?: string;\n\n /**\n * Enable eager input streaming for this tool. When true, tool input parameters\n * will be streamed incrementally as they are generated, and types will be inferred\n * on-the-fly rather than buffering the full JSON output. When false, streaming is\n * disabled for this tool even if the fine-grained-tool-streaming beta is active.\n * When null (default), uses the default behavior based on beta headers.\n */\n eager_input_streaming?: boolean | null;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n\n type?: 'custom' | null;\n}\n\nexport namespace BetaTool {\n /**\n * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.\n *\n * This defines the shape of the `input` that your tool accepts and that the model\n * will produce.\n */\n export interface InputSchema {\n type: 'object';\n\n properties?: unknown | null;\n\n required?: string[] | readonly string[] | null;\n\n [k: string]: unknown;\n }\n}\n\nexport interface BetaToolBash20241022 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'bash';\n\n type: 'bash_20241022';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolBash20250124 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'bash';\n\n type: 'bash_20250124';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\n/**\n * Reference to a single MCP tool by its server and remote name — the same\n * `server_name`/`name` pair `mcp_tool_use` carries.\n */\nexport interface BetaToolChangeMCPToolReference {\n name: string;\n\n server_name: string;\n\n type: 'mcp_tool_reference';\n}\n\n/**\n * Reference to every tool in the named MCP server's toolset.\n */\nexport interface BetaToolChangeMCPToolsetReference {\n server_name: string;\n\n type: 'mcp_toolset_reference';\n}\n\n/**\n * Reference to a single tool the caller declared directly in `tools[]`. Does not\n * accept the composed `{server}_{name}` form the server assigns to MCP-resolved\n * tools — use `mcp_tool_reference` or `mcp_toolset_reference` for those.\n */\nexport interface BetaToolChangeToolReference {\n name: string;\n\n type: 'tool_reference';\n}\n\n/**\n * How the model should use the provided tools. The model can use a specific tool,\n * any available tool, decide by itself, or not use tools at all.\n */\nexport type BetaToolChoice = BetaToolChoiceAuto | BetaToolChoiceAny | BetaToolChoiceTool | BetaToolChoiceNone;\n\n/**\n * The model will use any available tools.\n */\nexport interface BetaToolChoiceAny {\n type: 'any';\n\n /**\n * Whether to disable parallel tool use.\n *\n * Defaults to `false`. If set to `true`, the model will output exactly one tool\n * use.\n */\n disable_parallel_tool_use?: boolean;\n}\n\n/**\n * The model will automatically decide whether to use tools.\n */\nexport interface BetaToolChoiceAuto {\n type: 'auto';\n\n /**\n * Whether to disable parallel tool use.\n *\n * Defaults to `false`. If set to `true`, the model will output at most one tool\n * use.\n */\n disable_parallel_tool_use?: boolean;\n}\n\n/**\n * The model will not be allowed to use tools.\n */\nexport interface BetaToolChoiceNone {\n type: 'none';\n}\n\n/**\n * The model will use the specified tool with `tool_choice.name`.\n */\nexport interface BetaToolChoiceTool {\n /**\n * The name of the tool to use.\n */\n name: string;\n\n type: 'tool';\n\n /**\n * Whether to disable parallel tool use.\n *\n * Defaults to `false`. If set to `true`, the model will output exactly one tool\n * use.\n */\n disable_parallel_tool_use?: boolean;\n}\n\nexport interface BetaToolComputerUse20241022 {\n /**\n * The height of the display in pixels.\n */\n display_height_px: number;\n\n /**\n * The width of the display in pixels.\n */\n display_width_px: number;\n\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'computer';\n\n type: 'computer_20241022';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * The X11 display number (e.g. 0, 1) for the display.\n */\n display_number?: number | null;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolComputerUse20250124 {\n /**\n * The height of the display in pixels.\n */\n display_height_px: number;\n\n /**\n * The width of the display in pixels.\n */\n display_width_px: number;\n\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'computer';\n\n type: 'computer_20250124';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * The X11 display number (e.g. 0, 1) for the display.\n */\n display_number?: number | null;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolComputerUse20251124 {\n /**\n * The height of the display in pixels.\n */\n display_height_px: number;\n\n /**\n * The width of the display in pixels.\n */\n display_width_px: number;\n\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'computer';\n\n type: 'computer_20251124';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * The X11 display number (e.g. 0, 1) for the display.\n */\n display_number?: number | null;\n\n /**\n * Whether to enable an action to take a zoomed-in screenshot of the screen.\n */\n enable_zoom?: boolean;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolReferenceBlock {\n tool_name: string;\n\n type: 'tool_reference';\n}\n\n/**\n * Tool reference block that can be included in tool_result content.\n */\nexport interface BetaToolReferenceBlockParam {\n tool_name: string;\n\n type: 'tool_reference';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\nexport interface BetaToolResultBlockParam {\n tool_use_id: string;\n\n type: 'tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n content?:\n | string\n | Array<\n | BetaTextBlockParam\n | BetaImageBlockParam\n | BetaSearchResultBlockParam\n | BetaRequestDocumentBlock\n | BetaToolReferenceBlockParam\n | BetaBrowserStateBlockParam\n >;\n\n is_error?: boolean;\n\n /**\n * For a toolset member tool_result, the toolset family of the paired tool_use.\n */\n toolset_name?: string | null;\n}\n\nexport interface BetaToolSearchToolBm25_20251119 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'tool_search_tool_bm25';\n\n type: 'tool_search_tool_bm25_20251119' | 'tool_search_tool_bm25';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolSearchToolRegex20251119 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'tool_search_tool_regex';\n\n type: 'tool_search_tool_regex_20251119' | 'tool_search_tool_regex';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolSearchToolResultBlock {\n content: BetaToolSearchToolResultError | BetaToolSearchToolSearchResultBlock;\n\n tool_use_id: string;\n\n type: 'tool_search_tool_result';\n}\n\nexport interface BetaToolSearchToolResultBlockParam {\n content: BetaToolSearchToolResultErrorParam | BetaToolSearchToolSearchResultBlockParam;\n\n tool_use_id: string;\n\n type: 'tool_search_tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\nexport interface BetaToolSearchToolResultError {\n error_code: 'invalid_tool_input' | 'unavailable' | 'too_many_requests' | 'execution_time_exceeded';\n\n error_message: string | null;\n\n type: 'tool_search_tool_result_error';\n}\n\nexport interface BetaToolSearchToolResultErrorParam {\n error_code: 'invalid_tool_input' | 'unavailable' | 'too_many_requests' | 'execution_time_exceeded';\n\n type: 'tool_search_tool_result_error';\n\n error_message?: string | null;\n}\n\nexport interface BetaToolSearchToolSearchResultBlock {\n tool_references: Array<BetaToolReferenceBlock>;\n\n type: 'tool_search_tool_search_result';\n}\n\nexport interface BetaToolSearchToolSearchResultBlockParam {\n tool_references: Array<BetaToolReferenceBlockParam>;\n\n type: 'tool_search_tool_search_result';\n}\n\nexport type BetaToolResultContentBlockParam = Extract<BetaToolResultBlockParam['content'], any[]>[number];\n\nexport interface BetaToolTextEditor20241022 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'str_replace_editor';\n\n type: 'text_editor_20241022';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolTextEditor20250124 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'str_replace_editor';\n\n type: 'text_editor_20250124';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolTextEditor20250429 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'str_replace_based_edit_tool';\n\n type: 'text_editor_20250429';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolTextEditor20250728 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'str_replace_based_edit_tool';\n\n type: 'text_editor_20250728';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * Maximum number of characters to display when viewing a file. If not specified,\n * defaults to displaying the full file.\n */\n max_characters?: number | null;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\n/**\n * Code execution tool with REPL state persistence (daemon mode + gVisor\n * checkpoint).\n */\nexport type BetaToolUnion =\n | BetaTool\n | BetaToolBash20241022\n | BetaToolBash20250124\n | BetaCodeExecutionTool20250522\n | BetaCodeExecutionTool20250825\n | BetaCodeExecutionTool20260120\n | BetaCodeExecutionTool20260521\n | BetaBrowserToolset20260801\n | BetaToolComputerUse20241022\n | BetaMemoryTool20250818\n | BetaToolComputerUse20250124\n | BetaToolTextEditor20241022\n | BetaToolComputerUse20251124\n | BetaComputerToolset20260801\n | BetaToolTextEditor20250124\n | BetaToolTextEditor20250429\n | BetaToolTextEditor20250728\n | BetaWebSearchTool20250305\n | BetaWebFetchTool20250910\n | BetaWebSearchTool20260209\n | BetaWebFetchTool20260209\n | BetaWebFetchTool20260309\n | BetaWebSearchTool20260318\n | BetaWebFetchTool20260318\n | BetaAdvisorTool20260301\n | BetaToolSearchToolBm25_20251119\n | BetaToolSearchToolRegex20251119\n | BetaMCPToolset;\n\nexport interface BetaToolUseBlock {\n id: string;\n\n input: unknown;\n\n name: string;\n\n type: 'tool_use';\n\n /**\n * Tool invocation directly from the model.\n */\n caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;\n\n /**\n * For a toolset member tool_use, the toolset family.\n */\n toolset_name?: string | null;\n}\n\nexport interface BetaToolUseBlockParam {\n id: string;\n\n input: unknown;\n\n name: string;\n\n type: 'tool_use';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Tool invocation directly from the model.\n */\n caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;\n\n /**\n * For a toolset member tool_use, the toolset family this member belongs to.\n */\n toolset_name?: string | null;\n}\n\nexport interface BetaToolUsesKeep {\n type: 'tool_uses';\n\n value: number;\n}\n\nexport interface BetaToolUsesTrigger {\n type: 'tool_uses';\n\n value: number;\n}\n\nexport interface BetaURLImageSource {\n type: 'url';\n\n url: string;\n}\n\nexport interface BetaURLPDFSource {\n type: 'url';\n\n url: string;\n}\n\nexport interface BetaUsage {\n /**\n * Breakdown of cached tokens by TTL\n */\n cache_creation: BetaCacheCreation | null;\n\n /**\n * The number of input tokens used to create the cache entry.\n */\n cache_creation_input_tokens: number | null;\n\n /**\n * The number of input tokens read from the cache.\n */\n cache_read_input_tokens: number | null;\n\n /**\n * Outcome of the `fallback_credit_token` presented on this request.\n */\n fallback_credit: BetaFallbackCreditUsage | null;\n\n /**\n * The geographic region where inference was performed for this request.\n */\n inference_geo: string | null;\n\n /**\n * The number of input tokens which were used.\n */\n input_tokens: number;\n\n /**\n * Per-iteration token usage breakdown.\n *\n * Each entry represents one sampling iteration, with its own input/output token\n * counts and cache statistics, discriminated by `type`. For `message` entries\n * (model sampling iterations, such as the turns of a server-side tool use loop),\n * this allows you to:\n *\n * - Determine which iterations exceeded long context thresholds (>=200k tokens)\n * - Calculate the context window size from the last `message` entry\n * - Understand token accumulation across server-side tool use loops\n *\n * A `compaction` entry reports the token usage of the compaction operation itself\n * — the server-side request that summarizes the context being closed — NOT the\n * size of the context that was compacted away, and its token counts can be much\n * smaller than that closed context (for example, a compaction that closes a\n * ~200k-token context can report only a few thousand tokens). Do not derive the\n * context window size from a `compaction` entry, even when it is the last entry. A\n * `compaction` entry's tokens are not included in the top-level `usage` fields.\n * When an input-token trigger is in effect (the default — 150,000 tokens unless\n * configured otherwise), each `compaction` entry closes a context that had reached\n * at least that threshold, though the context can exceed it by the final\n * iteration's output and tool results.\n */\n iterations: BetaIterationsUsage | null;\n\n /**\n * The number of output tokens which were used.\n */\n output_tokens: number;\n\n /**\n * Breakdown of output tokens by category.\n *\n * `output_tokens` remains the inclusive, authoritative total used for billing.\n * This object provides a read-only decomposition for observability — for example,\n * how many of the billed output tokens were spent on internal reasoning that may\n * have been summarized before being returned to you.\n */\n output_tokens_details: BetaOutputTokensDetails | null;\n\n /**\n * The number of server tool requests.\n */\n server_tool_use: BetaServerToolUsage | null;\n\n /**\n * If the request used the priority, standard, or batch tier.\n */\n service_tier: 'standard' | 'priority' | 'batch' | null;\n\n /**\n * Inference speed mode. `fast` provides significantly faster output token\n * generation at premium pricing. Not all models support `fast`; invalid\n * combinations are rejected at create time.\n */\n speed: 'standard' | 'fast' | null;\n}\n\nexport interface BetaUserLocation {\n type: 'approximate';\n\n /**\n * The city of the user.\n */\n city?: string | null;\n\n /**\n * The two letter\n * [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the\n * user.\n */\n country?: string | null;\n\n /**\n * The region of the user.\n */\n region?: string | null;\n\n /**\n * The [IANA timezone](https://nodatime.org/TimeZones) of the user.\n */\n timezone?: string | null;\n}\n\nexport interface BetaWebFetchBlock {\n content: BetaDocumentBlock;\n\n /**\n * ISO 8601 timestamp when the content was retrieved\n */\n retrieved_at: string | null;\n\n type: 'web_fetch_result';\n\n /**\n * Fetched content URL\n */\n url: string;\n}\n\nexport interface BetaWebFetchBlockParam {\n content: BetaRequestDocumentBlock;\n\n type: 'web_fetch_result';\n\n /**\n * Fetched content URL\n */\n url: string;\n\n /**\n * ISO 8601 timestamp when the content was retrieved\n */\n retrieved_at?: string | null;\n}\n\nexport interface BetaWebFetchTool20250910 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'web_fetch';\n\n type: 'web_fetch_20250910';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * List of domains to allow fetching from\n */\n allowed_domains?: Array<string> | null;\n\n /**\n * List of domains to block fetching from\n */\n blocked_domains?: Array<string> | null;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Citations configuration for fetched documents. Citations are disabled by\n * default.\n */\n citations?: BetaCitationsConfigParam | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Maximum number of tokens used by including web page text content in the context.\n * The limit is approximate and does not apply to binary content such as PDFs.\n */\n max_content_tokens?: number | null;\n\n /**\n * Maximum number of times the tool can be used in the API request.\n */\n max_uses?: number | null;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaWebFetchTool20260209 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'web_fetch';\n\n type: 'web_fetch_20260209';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * List of domains to allow fetching from\n */\n allowed_domains?: Array<string> | null;\n\n /**\n * List of domains to block fetching from\n */\n blocked_domains?: Array<string> | null;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Citations configuration for fetched documents. Citations are disabled by\n * default.\n */\n citations?: BetaCitationsConfigParam | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Maximum number of tokens used by including web page text content in the context.\n * The limit is approximate and does not apply to binary content such as PDFs.\n */\n max_content_tokens?: number | null;\n\n /**\n * Maximum number of times the tool can be used in the API request.\n */\n max_uses?: number | null;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\n/**\n * Web fetch tool with use_cache parameter for bypassing cached content.\n */\nexport interface BetaWebFetchTool20260309 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'web_fetch';\n\n type: 'web_fetch_20260309';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * List of domains to allow fetching from\n */\n allowed_domains?: Array<string> | null;\n\n /**\n * List of domains to block fetching from\n */\n blocked_domains?: Array<string> | null;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Citations configuration for fetched documents. Citations are disabled by\n * default.\n */\n citations?: BetaCitationsConfigParam | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Maximum number of tokens used by including web page text content in the context.\n * The limit is approximate and does not apply to binary content such as PDFs.\n */\n max_content_tokens?: number | null;\n\n /**\n * Maximum number of times the tool can be used in the API request.\n */\n max_uses?: number | null;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n\n /**\n * Whether to use cached content. Set to false to bypass the cache and fetch fresh\n * content. Only set to false when the user explicitly requests fresh content or\n * when fetching rapidly-changing sources.\n */\n use_cache?: boolean;\n}\n\nexport interface BetaWebFetchTool20260318 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'web_fetch';\n\n type: 'web_fetch_20260318';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * List of domains to allow fetching from\n */\n allowed_domains?: Array<string> | null;\n\n /**\n * List of domains to block fetching from\n */\n blocked_domains?: Array<string> | null;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Citations configuration for fetched documents. Citations are disabled by\n * default.\n */\n citations?: BetaCitationsConfigParam | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Maximum number of tokens used by including web page text content in the context.\n * The limit is approximate and does not apply to binary content such as PDFs.\n */\n max_content_tokens?: number | null;\n\n /**\n * Maximum number of times the tool can be used in the API request.\n */\n max_uses?: number | null;\n\n /**\n * How this tool's result blocks appear in the API response when the result was\n * consumed by a completed code_execution call in the same turn. 'full' returns the\n * complete content (default). 'excluded' drops the nested server_tool_use and\n * result block pair entirely. Results from direct calls, or from code_execution\n * calls that paused before completing, are always returned in full so they can be\n * sent back on the next turn.\n */\n response_inclusion?: 'full' | 'excluded';\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n\n /**\n * Whether to use cached content. Set to false to bypass the cache and fetch fresh\n * content. Only set to false when the user explicitly requests fresh content or\n * when fetching rapidly-changing sources.\n */\n use_cache?: boolean;\n}\n\nexport interface BetaWebFetchToolResultBlock {\n content: BetaWebFetchToolResultErrorBlock | BetaWebFetchBlock;\n\n tool_use_id: string;\n\n type: 'web_fetch_tool_result';\n\n /**\n * Tool invocation directly from the model.\n */\n caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;\n}\n\nexport interface BetaWebFetchToolResultBlockParam {\n content: BetaWebFetchToolResultErrorBlockParam | BetaWebFetchBlockParam;\n\n tool_use_id: string;\n\n type: 'web_fetch_tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Tool invocation directly from the model.\n */\n caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;\n}\n\nexport interface BetaWebFetchToolResultErrorBlock {\n error_code: BetaWebFetchToolResultErrorCode;\n\n type: 'web_fetch_tool_result_error';\n}\n\nexport interface BetaWebFetchToolResultErrorBlockParam {\n error_code: BetaWebFetchToolResultErrorCode;\n\n type: 'web_fetch_tool_result_error';\n}\n\nexport type BetaWebFetchToolResultErrorCode =\n | 'invalid_tool_input'\n | 'url_too_long'\n | 'url_not_allowed'\n | 'url_not_in_prior_context'\n | 'url_not_accessible'\n | 'unsupported_content_type'\n | 'too_many_requests'\n | 'max_uses_exceeded'\n | 'unavailable';\n\nexport interface BetaWebSearchResultBlock {\n encrypted_content: string;\n\n page_age: string | null;\n\n title: string;\n\n type: 'web_search_result';\n\n url: string;\n}\n\nexport interface BetaWebSearchResultBlockParam {\n encrypted_content: string;\n\n title: string;\n\n type: 'web_search_result';\n\n url: string;\n\n page_age?: string | null;\n}\n\nexport interface BetaWebSearchTool20250305 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'web_search';\n\n type: 'web_search_20250305';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * If provided, only these domains will be included in results. Cannot be used\n * alongside `blocked_domains`.\n */\n allowed_domains?: Array<string> | null;\n\n /**\n * If provided, these domains will never appear in results. Cannot be used\n * alongside `allowed_domains`.\n */\n blocked_domains?: Array<string> | null;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Maximum number of times the tool can be used in the API request.\n */\n max_uses?: number | null;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n\n /**\n * Parameters for the user's location. Used to provide more relevant search\n * results.\n */\n user_location?: BetaUserLocation | null;\n}\n\nexport interface BetaWebSearchTool20260209 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'web_search';\n\n type: 'web_search_20260209';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * If provided, only these domains will be included in results. Cannot be used\n * alongside `blocked_domains`.\n */\n allowed_domains?: Array<string> | null;\n\n /**\n * If provided, these domains will never appear in results. Cannot be used\n * alongside `allowed_domains`.\n */\n blocked_domains?: Array<string> | null;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Maximum number of times the tool can be used in the API request.\n */\n max_uses?: number | null;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n\n /**\n * Parameters for the user's location. Used to provide more relevant search\n * results.\n */\n user_location?: BetaUserLocation | null;\n}\n\nexport interface BetaWebSearchTool20260318 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'web_search';\n\n type: 'web_search_20260318';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * If provided, only these domains will be included in results. Cannot be used\n * alongside `blocked_domains`.\n */\n allowed_domains?: Array<string> | null;\n\n /**\n * If provided, these domains will never appear in results. Cannot be used\n * alongside `allowed_domains`.\n */\n blocked_domains?: Array<string> | null;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Maximum number of times the tool can be used in the API request.\n */\n max_uses?: number | null;\n\n /**\n * How this tool's result blocks appear in the API response when the result was\n * consumed by a completed code_execution call in the same turn. 'full' returns the\n * complete content (default). 'excluded' drops the nested server_tool_use and\n * result block pair entirely. Results from direct calls, or from code_execution\n * calls that paused before completing, are always returned in full so they can be\n * sent back on the next turn.\n */\n response_inclusion?: 'full' | 'excluded';\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n\n /**\n * Parameters for the user's location. Used to provide more relevant search\n * results.\n */\n user_location?: BetaUserLocation | null;\n}\n\nexport interface BetaWebSearchToolRequestError {\n error_code: BetaWebSearchToolResultErrorCode;\n\n type: 'web_search_tool_result_error';\n}\n\nexport interface BetaWebSearchToolResultBlock {\n content: BetaWebSearchToolResultBlockContent;\n\n tool_use_id: string;\n\n type: 'web_search_tool_result';\n\n /**\n * Tool invocation directly from the model.\n */\n caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;\n}\n\nexport type BetaWebSearchToolResultBlockContent =\n | BetaWebSearchToolResultError\n | Array<BetaWebSearchResultBlock>;\n\nexport interface BetaWebSearchToolResultBlockParam {\n content: BetaWebSearchToolResultBlockParamContent;\n\n tool_use_id: string;\n\n type: 'web_search_tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Tool invocation directly from the model.\n */\n caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;\n}\n\nexport type BetaWebSearchToolResultBlockParamContent =\n | Array<BetaWebSearchResultBlockParam>\n | BetaWebSearchToolRequestError;\n\nexport interface BetaWebSearchToolResultError {\n error_code: BetaWebSearchToolResultErrorCode;\n\n type: 'web_search_tool_result_error';\n}\n\nexport type BetaWebSearchToolResultErrorCode =\n | 'invalid_tool_input'\n | 'unavailable'\n | 'max_uses_exceeded'\n | 'too_many_requests'\n | 'query_too_long'\n | 'request_too_large';\n\n/**\n * @deprecated BetaRequestDocumentBlock should be used insated\n */\nexport type BetaBase64PDFBlock = BetaRequestDocumentBlock;\n\nexport type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming;\n\nexport interface MessageCreateParamsBase {\n /**\n * Body param: The maximum number of tokens to generate before stopping.\n *\n * Note that our models may stop _before_ reaching this maximum. This parameter\n * only specifies the absolute maximum number of tokens to generate.\n *\n * Set to `0` to populate the\n * [prompt cache](https://platform.puku.com/docs/en/build-with-puku/prompt-caching#pre-warming-the-cache)\n * without generating a response.\n *\n * Different models have different maximum values for this parameter. See\n * [models](https://platform.puku.com/docs/en/about-puku/models/overview) for\n * details.\n */\n max_tokens: number;\n\n /**\n * Body param: Input messages.\n *\n * Our models are trained to operate on alternating `user` and `assistant`\n * conversational turns. When creating a new `Message`, you specify the prior\n * conversational turns with the `messages` parameter, and the model then generates\n * the next `Message` in the conversation. Consecutive `user` or `assistant` turns\n * in your request will be combined into a single turn.\n *\n * Each input message must be an object with a `role` and `content`. You can\n * specify a single `user`-role message, or you can include multiple `user` and\n * `assistant` messages.\n *\n * If the final message uses the `assistant` role, the response content will\n * continue immediately from the content in that message. This can be used to\n * constrain part of the model's response.\n *\n * Example with a single `user` message:\n *\n * ```json\n * [{ \"role\": \"user\", \"content\": \"Hello, Puku\" }]\n * ```\n *\n * Example with multiple conversational turns:\n *\n * ```json\n * [\n * { \"role\": \"user\", \"content\": \"Hello there.\" },\n * { \"role\": \"assistant\", \"content\": \"Hi, I'm Puku. How can I help you?\" },\n * { \"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\" }\n * ]\n * ```\n *\n * Example with a partially-filled response from Puku:\n *\n * ```json\n * [\n * {\n * \"role\": \"user\",\n * \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"\n * },\n * { \"role\": \"assistant\", \"content\": \"The best answer is (\" }\n * ]\n * ```\n *\n * Each input message `content` may be either a single `string` or an array of\n * content blocks, where each block has a specific `type`. Using a `string` for\n * `content` is shorthand for an array of one content block of type `\"text\"`. The\n * following input messages are equivalent:\n *\n * ```json\n * { \"role\": \"user\", \"content\": \"Hello, Puku\" }\n * ```\n *\n * ```json\n * { \"role\": \"user\", \"content\": [{ \"type\": \"text\", \"text\": \"Hello, Puku\" }] }\n * ```\n *\n * See\n * [input examples](https://platform.puku.com/docs/en/build-with-puku/working-with-messages).\n *\n * Note that if you want to include a\n * [system prompt](https://platform.puku.com/docs/en/build-with-puku/prompt-engineering/puku-prompting-best-practices#give-puku-a-role),\n * you can use the top-level `system` parameter — there is no `\"system\"` role for\n * input messages in the Messages API.\n *\n * There is a limit of 100,000 messages in a single request.\n */\n messages: Array<BetaMessageParam>;\n\n /**\n * Body param: The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n\n /**\n * Body param: Top-level cache control automatically applies a cache_control marker\n * to the last cacheable block in the request.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Body param: Container identifier for reuse across requests.\n */\n container?: BetaContainerParams | string | null;\n\n /**\n * Body param: Context management configuration.\n *\n * This allows you to control how Puku manages context across multiple requests,\n * such as whether to clear function results or not.\n */\n context_management?: BetaContextManagementConfig | null;\n\n /**\n * Body param: Request-level diagnostics. Currently carries the previous response\n * id for prompt-cache divergence reporting.\n */\n diagnostics?: BetaDiagnosticsParam | null;\n\n /**\n * Body param: The `fallback_credit_token` from a prior refusal's `stop_details`.\n *\n * When a preceding request was refused and returned a `fallback_credit_token`,\n * pass that code here on the retry to have the retry's cache-creation tokens for\n * the prefix that was warm on the refused model billed at the cache-read rate.\n * Must be redeemed by the same organization and workspace, with the same request\n * body (optionally extended by one appended `assistant` message whose content is\n * the partial text — with any trailing whitespace stripped from the final text\n * block — and paired server-tool blocks streamed before the refusal; the\n * appended-assistant form is not available for requests with `output_format` set\n * or forced `tool_choice`), on an eligible fallback model, on the same platform,\n * and within 5 minutes of the refusal; a mismatch is a 400. A token minted\n * mid-server-tool-loop whose partial content was continuable may only be redeemed\n * with the appended-assistant form — if an exact-body retry is rejected with a 400\n * saying the token must be redeemed by continuing the partial response, retry with\n * the appended-assistant form instead.\n *\n * When the appended-assistant form is used on a model that otherwise disallows\n * assistant-turn prefill, this token also authorizes that one prefill.\n */\n fallback_credit_token?: string | BetaFallbackCreditTokenParam | null;\n\n /**\n * Body param: Opt-in server-side retry on one or more substitute models when the\n * requested model declines for policy reasons. Tried in order: if the first entry\n * also declines, the second is tried, and so on. The string \"default\" requests the\n * requested model's server-defined default fallback configuration.\n */\n fallbacks?: BetaFallbacksParam | null;\n\n /**\n * Body param: Specifies the geographic region for inference processing. If not\n * specified, the workspace's `default_inference_geo` is used.\n */\n inference_geo?: string | null;\n\n /**\n * Body param: MCP servers to be utilized in this request\n */\n mcp_servers?: Array<BetaRequestMCPServerURLDefinition>;\n\n /**\n * Body param: An object describing metadata about the request.\n */\n metadata?: BetaMetadata;\n\n /**\n * Body param: Configuration options for the model's output, such as the output\n * format.\n */\n output_config?: BetaOutputConfig;\n\n /**\n * Body param: Deprecated: Use `output_config.format` instead. See\n * [structured outputs](https://platform.puku.com/docs/en/build-with-puku/structured-outputs)\n *\n * A schema to specify Puku's output format in responses. This parameter will be\n * removed in a future release.\n */\n output_format?: BetaJSONOutputFormat | null;\n\n /**\n * Body param: Determines whether to use priority capacity (if available) or\n * standard capacity for this request.\n *\n * PukuAI offers different levels of service for your API requests. See\n * [service-tiers](https://platform.puku.com/docs/en/api/service-tiers) for\n * details.\n */\n service_tier?: 'auto' | 'standard_only';\n\n /**\n * Body param: Inference speed mode. `fast` provides significantly faster output\n * token generation at premium pricing. Not all models support `fast`; invalid\n * combinations are rejected at create time.\n */\n speed?: 'standard' | 'fast' | null;\n\n /**\n * Body param: Custom text sequences that will cause the model to stop generating.\n *\n * Our models will normally stop when they have naturally completed their turn,\n * which will result in a response `stop_reason` of `\"end_turn\"`.\n *\n * If you want the model to stop generating when it encounters custom strings of\n * text, you can use the `stop_sequences` parameter. If the model encounters one of\n * the custom sequences, the response `stop_reason` value will be `\"stop_sequence\"`\n * and the response `stop_sequence` value will contain the matched stop sequence.\n */\n stop_sequences?: Array<string>;\n\n /**\n * Body param: Whether to incrementally stream the response using server-sent\n * events.\n *\n * See [streaming](https://platform.puku.com/docs/en/build-with-puku/streaming)\n * for details.\n */\n stream?: boolean;\n\n /**\n * Body param: System prompt.\n *\n * A system prompt is a way of providing context and instructions to Puku, such\n * as specifying a particular goal or role. See our\n * [guide to system prompts](https://platform.puku.com/docs/en/build-with-puku/prompt-engineering/puku-prompting-best-practices#give-puku-a-role).\n */\n system?: string | Array<BetaTextBlockParam>;\n\n /**\n * @deprecated Deprecated. Models released after Puku Opus 4.6 do not support\n * setting temperature. A value of 1.0 of will be accepted for backwards\n * compatibility, all other values will be rejected with a 400 error.\n */\n temperature?: number;\n\n /**\n * Body param: Configuration for enabling Puku's extended thinking.\n *\n * When enabled, responses include `thinking` content blocks showing Puku's\n * thinking process before the final answer. Requires a minimum budget of 1,024\n * tokens and counts towards your `max_tokens` limit.\n *\n * See\n * [extended thinking](https://platform.puku.com/docs/en/build-with-puku/extended-thinking)\n * for details.\n */\n thinking?: BetaThinkingConfigParam;\n\n /**\n * Body param: How the model should use the provided tools. The model can use a\n * specific tool, any available tool, decide by itself, or not use tools at all.\n */\n tool_choice?: BetaToolChoice;\n\n /**\n * Body param: Definitions of tools that the model may use.\n *\n * If you include `tools` in your API request, the model may return `tool_use`\n * content blocks that represent the model's use of those tools. You can then run\n * those tools using the tool input generated by the model and then optionally\n * return results back to the model using `tool_result` content blocks.\n *\n * There are two types of tools: **client tools** and **server tools**. The\n * behavior described below applies to client tools. For\n * [server tools](https://platform.puku.com/docs/en/agents-and-tools/tool-use/server-tools),\n * see their individual documentation as each has its own behavior (e.g., the\n * [web search tool](https://platform.puku.com/docs/en/agents-and-tools/tool-use/web-search-tool)).\n *\n * Each tool definition includes:\n *\n * - `name`: Name of the tool.\n * - `description`: Optional, but strongly-recommended description of the tool.\n * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the\n * tool `input` shape that the model will produce in `tool_use` output content\n * blocks.\n *\n * For example, if you defined `tools` as:\n *\n * ```json\n * [\n * {\n * \"name\": \"get_stock_price\",\n * \"description\": \"Get the current stock price for a given ticker symbol.\",\n * \"input_schema\": {\n * \"type\": \"object\",\n * \"properties\": {\n * \"ticker\": {\n * \"type\": \"string\",\n * \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n * }\n * },\n * \"required\": [\"ticker\"]\n * }\n * }\n * ]\n * ```\n *\n * And then asked the model \"What's the S&P 500 at today?\", the model might produce\n * `tool_use` content blocks in the response like this:\n *\n * ```json\n * [\n * {\n * \"type\": \"tool_use\",\n * \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n * \"name\": \"get_stock_price\",\n * \"input\": { \"ticker\": \"^GSPC\" }\n * }\n * ]\n * ```\n *\n * You might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an\n * input, and return the following back to the model in a subsequent `user`\n * message:\n *\n * ```json\n * [\n * {\n * \"type\": \"tool_result\",\n * \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n * \"content\": \"259.75 USD\"\n * }\n * ]\n * ```\n *\n * Tools can be used for workflows that include running client-side tools and\n * functions, or more generally whenever you want the model to produce a particular\n * JSON structure of output.\n *\n * See our\n * [guide](https://platform.puku.com/docs/en/agents-and-tools/tool-use/overview)\n * for more details.\n */\n tools?: Array<BetaToolUnion>;\n\n /**\n * @deprecated Deprecated. Models released after Puku Opus 4.6 do not accept\n * top_k; any value will be rejected with a 400 error.\n */\n top_k?: number;\n\n /**\n * @deprecated Deprecated. Models released after Puku Opus 4.6 do not support\n * setting top_p. A value >= 0.99 will be accepted for backwards compatibility, all\n * other values will be rejected with a 400 error.\n */\n top_p?: number;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n\n /**\n * Header param: The user profile ID to attribute this request to. Use when acting\n * on behalf of a party other than your organization. Requires the `user-profiles`\n * beta header.\n */\n user_profile_id?: string;\n}\n\nexport namespace MessageCreateParams {\n export type MessageCreateParamsNonStreaming = BetaMessagesAPI.MessageCreateParamsNonStreaming;\n export type MessageCreateParamsStreaming = BetaMessagesAPI.MessageCreateParamsStreaming;\n}\n\nexport interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase {\n /**\n * Body param: Whether to incrementally stream the response using server-sent\n * events.\n *\n * See [streaming](https://platform.puku.com/docs/en/build-with-puku/streaming)\n * for details.\n */\n stream?: false;\n}\n\nexport interface MessageCreateParamsStreaming extends MessageCreateParamsBase {\n /**\n * Body param: Whether to incrementally stream the response using server-sent\n * events.\n *\n * See [streaming](https://platform.puku.com/docs/en/build-with-puku/streaming)\n * for details.\n */\n stream: true;\n}\n\nexport interface MessageCountTokensParams {\n /**\n * Body param: Input messages.\n *\n * Our models are trained to operate on alternating `user` and `assistant`\n * conversational turns. When creating a new `Message`, you specify the prior\n * conversational turns with the `messages` parameter, and the model then generates\n * the next `Message` in the conversation. Consecutive `user` or `assistant` turns\n * in your request will be combined into a single turn.\n *\n * Each input message must be an object with a `role` and `content`. You can\n * specify a single `user`-role message, or you can include multiple `user` and\n * `assistant` messages.\n *\n * If the final message uses the `assistant` role, the response content will\n * continue immediately from the content in that message. This can be used to\n * constrain part of the model's response.\n *\n * Example with a single `user` message:\n *\n * ```json\n * [{ \"role\": \"user\", \"content\": \"Hello, Puku\" }]\n * ```\n *\n * Example with multiple conversational turns:\n *\n * ```json\n * [\n * { \"role\": \"user\", \"content\": \"Hello there.\" },\n * { \"role\": \"assistant\", \"content\": \"Hi, I'm Puku. How can I help you?\" },\n * { \"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\" }\n * ]\n * ```\n *\n * Example with a partially-filled response from Puku:\n *\n * ```json\n * [\n * {\n * \"role\": \"user\",\n * \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"\n * },\n * { \"role\": \"assistant\", \"content\": \"The best answer is (\" }\n * ]\n * ```\n *\n * Each input message `content` may be either a single `string` or an array of\n * content blocks, where each block has a specific `type`. Using a `string` for\n * `content` is shorthand for an array of one content block of type `\"text\"`. The\n * following input messages are equivalent:\n *\n * ```json\n * { \"role\": \"user\", \"content\": \"Hello, Puku\" }\n * ```\n *\n * ```json\n * { \"role\": \"user\", \"content\": [{ \"type\": \"text\", \"text\": \"Hello, Puku\" }] }\n * ```\n *\n * See\n * [input examples](https://platform.puku.com/docs/en/build-with-puku/working-with-messages).\n *\n * Note that if you want to include a\n * [system prompt](https://platform.puku.com/docs/en/build-with-puku/prompt-engineering/puku-prompting-best-practices#give-puku-a-role),\n * you can use the top-level `system` parameter — there is no `\"system\"` role for\n * input messages in the Messages API.\n *\n * There is a limit of 100,000 messages in a single request.\n */\n messages: Array<BetaMessageParam>;\n\n /**\n * Body param: The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n\n /**\n * Body param: Top-level cache control automatically applies a cache_control marker\n * to the last cacheable block in the request.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Body param: Context management configuration.\n *\n * This allows you to control how Puku manages context across multiple requests,\n * such as whether to clear function results or not.\n */\n context_management?: BetaContextManagementConfig | null;\n\n /**\n * Body param: MCP servers to be utilized in this request\n */\n mcp_servers?: Array<BetaRequestMCPServerURLDefinition>;\n\n /**\n * Body param: Configuration options for the model's output, such as the output\n * format.\n */\n output_config?: BetaOutputConfig;\n\n /**\n * Body param: Deprecated: Use `output_config.format` instead. See\n * [structured outputs](https://platform.puku.com/docs/en/build-with-puku/structured-outputs)\n *\n * A schema to specify Puku's output format in responses. This parameter will be\n * removed in a future release.\n */\n output_format?: BetaJSONOutputFormat | null;\n\n /**\n * Body param: Inference speed mode. `fast` provides significantly faster output\n * token generation at premium pricing. Not all models support `fast`; invalid\n * combinations are rejected at create time.\n */\n speed?: 'standard' | 'fast' | null;\n\n /**\n * Body param: System prompt.\n *\n * A system prompt is a way of providing context and instructions to Puku, such\n * as specifying a particular goal or role. See our\n * [guide to system prompts](https://platform.puku.com/docs/en/build-with-puku/prompt-engineering/puku-prompting-best-practices#give-puku-a-role).\n */\n system?: string | Array<BetaTextBlockParam>;\n\n /**\n * Body param: Configuration for enabling Puku's extended thinking.\n *\n * When enabled, responses include `thinking` content blocks showing Puku's\n * thinking process before the final answer. Requires a minimum budget of 1,024\n * tokens and counts towards your `max_tokens` limit.\n *\n * See\n * [extended thinking](https://platform.puku.com/docs/en/build-with-puku/extended-thinking)\n * for details.\n */\n thinking?: BetaThinkingConfigParam;\n\n /**\n * Body param: How the model should use the provided tools. The model can use a\n * specific tool, any available tool, decide by itself, or not use tools at all.\n */\n tool_choice?: BetaToolChoice;\n\n /**\n * Body param: Definitions of tools that the model may use.\n *\n * If you include `tools` in your API request, the model may return `tool_use`\n * content blocks that represent the model's use of those tools. You can then run\n * those tools using the tool input generated by the model and then optionally\n * return results back to the model using `tool_result` content blocks.\n *\n * There are two types of tools: **client tools** and **server tools**. The\n * behavior described below applies to client tools. For\n * [server tools](https://platform.puku.com/docs/en/agents-and-tools/tool-use/server-tools),\n * see their individual documentation as each has its own behavior (e.g., the\n * [web search tool](https://platform.puku.com/docs/en/agents-and-tools/tool-use/web-search-tool)).\n *\n * Each tool definition includes:\n *\n * - `name`: Name of the tool.\n * - `description`: Optional, but strongly-recommended description of the tool.\n * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the\n * tool `input` shape that the model will produce in `tool_use` output content\n * blocks.\n *\n * For example, if you defined `tools` as:\n *\n * ```json\n * [\n * {\n * \"name\": \"get_stock_price\",\n * \"description\": \"Get the current stock price for a given ticker symbol.\",\n * \"input_schema\": {\n * \"type\": \"object\",\n * \"properties\": {\n * \"ticker\": {\n * \"type\": \"string\",\n * \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n * }\n * },\n * \"required\": [\"ticker\"]\n * }\n * }\n * ]\n * ```\n *\n * And then asked the model \"What's the S&P 500 at today?\", the model might produce\n * `tool_use` content blocks in the response like this:\n *\n * ```json\n * [\n * {\n * \"type\": \"tool_use\",\n * \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n * \"name\": \"get_stock_price\",\n * \"input\": { \"ticker\": \"^GSPC\" }\n * }\n * ]\n * ```\n *\n * You might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an\n * input, and return the following back to the model in a subsequent `user`\n * message:\n *\n * ```json\n * [\n * {\n * \"type\": \"tool_result\",\n * \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n * \"content\": \"259.75 USD\"\n * }\n * ]\n * ```\n *\n * Tools can be used for workflows that include running client-side tools and\n * functions, or more generally whenever you want the model to produce a particular\n * JSON structure of output.\n *\n * See our\n * [guide](https://platform.puku.com/docs/en/agents-and-tools/tool-use/overview)\n * for more details.\n */\n tools?: Array<\n | BetaTool\n | BetaToolBash20241022\n | BetaToolBash20250124\n | BetaCodeExecutionTool20250522\n | BetaCodeExecutionTool20250825\n | BetaCodeExecutionTool20260120\n | BetaCodeExecutionTool20260521\n | BetaBrowserToolset20260801\n | BetaToolComputerUse20241022\n | BetaMemoryTool20250818\n | BetaToolComputerUse20250124\n | BetaToolTextEditor20241022\n | BetaToolComputerUse20251124\n | BetaComputerToolset20260801\n | BetaToolTextEditor20250124\n | BetaToolTextEditor20250429\n | BetaToolTextEditor20250728\n | BetaWebSearchTool20250305\n | BetaWebFetchTool20250910\n | BetaWebSearchTool20260209\n | BetaWebFetchTool20260209\n | BetaWebFetchTool20260309\n | BetaWebSearchTool20260318\n | BetaWebFetchTool20260318\n | BetaAdvisorTool20260301\n | BetaToolSearchToolBm25_20251119\n | BetaToolSearchToolRegex20251119\n | BetaMCPToolset\n >;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n\n /**\n * Header param: The user profile ID to attribute this request to. Use when acting\n * on behalf of a party other than your organization. Requires the `user-profiles`\n * beta header.\n */\n user_profile_id?: string;\n}\n\nexport { BetaToolRunner, type BetaToolRunnerParams } from '../../../lib/tools/BetaToolRunner';\nexport { ToolError } from '../../../lib/tools/ToolError';\n\nMessages.Batches = Batches;\n\nMessages.BetaToolRunner = BetaToolRunner;\nMessages.ToolError = ToolError;\n\nexport declare namespace Messages {\n export {\n type BetaAdvisorMessageIterationUsage as BetaAdvisorMessageIterationUsage,\n type BetaAdvisorRedactedResultBlock as BetaAdvisorRedactedResultBlock,\n type BetaAdvisorRedactedResultBlockParam as BetaAdvisorRedactedResultBlockParam,\n type BetaAdvisorResultBlock as BetaAdvisorResultBlock,\n type BetaAdvisorResultBlockParam as BetaAdvisorResultBlockParam,\n type BetaAdvisorTool20260301 as BetaAdvisorTool20260301,\n type BetaAdvisorToolResultBlock as BetaAdvisorToolResultBlock,\n type BetaAdvisorToolResultBlockParam as BetaAdvisorToolResultBlockParam,\n type BetaAdvisorToolResultError as BetaAdvisorToolResultError,\n type BetaAdvisorToolResultErrorParam as BetaAdvisorToolResultErrorParam,\n type BetaAllThinkingTurns as BetaAllThinkingTurns,\n type BetaBase64ImageSource as BetaBase64ImageSource,\n type BetaBase64PDFSource as BetaBase64PDFSource,\n type BetaBashCodeExecutionOutputBlock as BetaBashCodeExecutionOutputBlock,\n type BetaBashCodeExecutionOutputBlockParam as BetaBashCodeExecutionOutputBlockParam,\n type BetaBashCodeExecutionResultBlock as BetaBashCodeExecutionResultBlock,\n type BetaBashCodeExecutionResultBlockParam as BetaBashCodeExecutionResultBlockParam,\n type BetaBashCodeExecutionToolResultBlock as BetaBashCodeExecutionToolResultBlock,\n type BetaBashCodeExecutionToolResultBlockParam as BetaBashCodeExecutionToolResultBlockParam,\n type BetaBashCodeExecutionToolResultError as BetaBashCodeExecutionToolResultError,\n type BetaBashCodeExecutionToolResultErrorParam as BetaBashCodeExecutionToolResultErrorParam,\n type BetaBrowserCloseTabConfig as BetaBrowserCloseTabConfig,\n type BetaBrowserDoubleClickConfig as BetaBrowserDoubleClickConfig,\n type BetaBrowserFileUploadConfig as BetaBrowserFileUploadConfig,\n type BetaBrowserFindConfig as BetaBrowserFindConfig,\n type BetaBrowserFormInputConfig as BetaBrowserFormInputConfig,\n type BetaBrowserGetPageTextConfig as BetaBrowserGetPageTextConfig,\n type BetaBrowserHoldKeyConfig as BetaBrowserHoldKeyConfig,\n type BetaBrowserHoverConfig as BetaBrowserHoverConfig,\n type BetaBrowserJavascriptExecConfig as BetaBrowserJavascriptExecConfig,\n type BetaBrowserKeyConfig as BetaBrowserKeyConfig,\n type BetaBrowserLeftClickConfig as BetaBrowserLeftClickConfig,\n type BetaBrowserLeftClickDragConfig as BetaBrowserLeftClickDragConfig,\n type BetaBrowserLeftMouseDownConfig as BetaBrowserLeftMouseDownConfig,\n type BetaBrowserLeftMouseUpConfig as BetaBrowserLeftMouseUpConfig,\n type BetaBrowserListTabsConfig as BetaBrowserListTabsConfig,\n type BetaBrowserMiddleClickConfig as BetaBrowserMiddleClickConfig,\n type BetaBrowserMouseMoveConfig as BetaBrowserMouseMoveConfig,\n type BetaBrowserNavigateConfig as BetaBrowserNavigateConfig,\n type BetaBrowserNewTabConfig as BetaBrowserNewTabConfig,\n type BetaBrowserReadConsoleConfig as BetaBrowserReadConsoleConfig,\n type BetaBrowserReadNetworkConfig as BetaBrowserReadNetworkConfig,\n type BetaBrowserReadPageConfig as BetaBrowserReadPageConfig,\n type BetaBrowserRightClickConfig as BetaBrowserRightClickConfig,\n type BetaBrowserScreenshotConfig as BetaBrowserScreenshotConfig,\n type BetaBrowserScrollConfig as BetaBrowserScrollConfig,\n type BetaBrowserScrollToConfig as BetaBrowserScrollToConfig,\n type BetaBrowserStateBlockParam as BetaBrowserStateBlockParam,\n type BetaBrowserStateChange as BetaBrowserStateChange,\n type BetaBrowserStateChangeDownloadCompleted as BetaBrowserStateChangeDownloadCompleted,\n type BetaBrowserStateChangeDownloadFailed as BetaBrowserStateChangeDownloadFailed,\n type BetaBrowserStateChangeDownloadStarted as BetaBrowserStateChangeDownloadStarted,\n type BetaBrowserStateChangeTabOpened as BetaBrowserStateChangeTabOpened,\n type BetaBrowserStateTabEntry as BetaBrowserStateTabEntry,\n type BetaBrowserSwitchTabConfig as BetaBrowserSwitchTabConfig,\n type BetaBrowserToolset20260801 as BetaBrowserToolset20260801,\n type BetaBrowserToolsetConfigs as BetaBrowserToolsetConfigs,\n type BetaBrowserTripleClickConfig as BetaBrowserTripleClickConfig,\n type BetaBrowserTypeConfig as BetaBrowserTypeConfig,\n type BetaBrowserWaitConfig as BetaBrowserWaitConfig,\n type BetaBrowserZoomConfig as BetaBrowserZoomConfig,\n type BetaCacheControlEphemeral as BetaCacheControlEphemeral,\n type BetaCacheCreation as BetaCacheCreation,\n type BetaCacheMissMessagesChanged as BetaCacheMissMessagesChanged,\n type BetaCacheMissModelChanged as BetaCacheMissModelChanged,\n type BetaCacheMissPreviousMessageNotFound as BetaCacheMissPreviousMessageNotFound,\n type BetaCacheMissSystemChanged as BetaCacheMissSystemChanged,\n type BetaCacheMissToolsChanged as BetaCacheMissToolsChanged,\n type BetaCacheMissUnavailable as BetaCacheMissUnavailable,\n type BetaCitationCharLocation as BetaCitationCharLocation,\n type BetaCitationCharLocationParam as BetaCitationCharLocationParam,\n type BetaCitationConfig as BetaCitationConfig,\n type BetaCitationContentBlockLocation as BetaCitationContentBlockLocation,\n type BetaCitationContentBlockLocationParam as BetaCitationContentBlockLocationParam,\n type BetaCitationPageLocation as BetaCitationPageLocation,\n type BetaCitationPageLocationParam as BetaCitationPageLocationParam,\n type BetaCitationSearchResultLocation as BetaCitationSearchResultLocation,\n type BetaCitationSearchResultLocationParam as BetaCitationSearchResultLocationParam,\n type BetaCitationWebSearchResultLocationParam as BetaCitationWebSearchResultLocationParam,\n type BetaCitationsConfigParam as BetaCitationsConfigParam,\n type BetaCitationsDelta as BetaCitationsDelta,\n type BetaCitationsWebSearchResultLocation as BetaCitationsWebSearchResultLocation,\n type BetaClearThinking20251015Edit as BetaClearThinking20251015Edit,\n type BetaClearThinking20251015EditResponse as BetaClearThinking20251015EditResponse,\n type BetaClearToolUses20250919Edit as BetaClearToolUses20250919Edit,\n type BetaClearToolUses20250919EditResponse as BetaClearToolUses20250919EditResponse,\n type BetaCodeExecutionOutputBlock as BetaCodeExecutionOutputBlock,\n type BetaCodeExecutionOutputBlockParam as BetaCodeExecutionOutputBlockParam,\n type BetaCodeExecutionResultBlock as BetaCodeExecutionResultBlock,\n type BetaCodeExecutionResultBlockParam as BetaCodeExecutionResultBlockParam,\n type BetaCodeExecutionTool20250522 as BetaCodeExecutionTool20250522,\n type BetaCodeExecutionTool20250825 as BetaCodeExecutionTool20250825,\n type BetaCodeExecutionTool20260120 as BetaCodeExecutionTool20260120,\n type BetaCodeExecutionTool20260521 as BetaCodeExecutionTool20260521,\n type BetaCodeExecutionToolResultBlock as BetaCodeExecutionToolResultBlock,\n type BetaCodeExecutionToolResultBlockContent as BetaCodeExecutionToolResultBlockContent,\n type BetaCodeExecutionToolResultBlockParam as BetaCodeExecutionToolResultBlockParam,\n type BetaCodeExecutionToolResultBlockParamContent as BetaCodeExecutionToolResultBlockParamContent,\n type BetaCodeExecutionToolResultError as BetaCodeExecutionToolResultError,\n type BetaCodeExecutionToolResultErrorCode as BetaCodeExecutionToolResultErrorCode,\n type BetaCodeExecutionToolResultErrorParam as BetaCodeExecutionToolResultErrorParam,\n type BetaCompact20260112Edit as BetaCompact20260112Edit,\n type BetaCompactionBlock as BetaCompactionBlock,\n type BetaCompactionBlockParam as BetaCompactionBlockParam,\n type BetaCompactionContentBlockDelta as BetaCompactionContentBlockDelta,\n type BetaCompactionIterationUsage as BetaCompactionIterationUsage,\n type BetaComputerCursorPositionConfig as BetaComputerCursorPositionConfig,\n type BetaComputerDoubleClickConfig as BetaComputerDoubleClickConfig,\n type BetaComputerHoldKeyConfig as BetaComputerHoldKeyConfig,\n type BetaComputerKeyConfig as BetaComputerKeyConfig,\n type BetaComputerLeftClickConfig as BetaComputerLeftClickConfig,\n type BetaComputerLeftClickDragConfig as BetaComputerLeftClickDragConfig,\n type BetaComputerLeftMouseDownConfig as BetaComputerLeftMouseDownConfig,\n type BetaComputerLeftMouseUpConfig as BetaComputerLeftMouseUpConfig,\n type BetaComputerMiddleClickConfig as BetaComputerMiddleClickConfig,\n type BetaComputerMouseMoveConfig as BetaComputerMouseMoveConfig,\n type BetaComputerRightClickConfig as BetaComputerRightClickConfig,\n type BetaComputerScreenshotConfig as BetaComputerScreenshotConfig,\n type BetaComputerScrollConfig as BetaComputerScrollConfig,\n type BetaComputerToolset20260801 as BetaComputerToolset20260801,\n type BetaComputerToolsetConfigs as BetaComputerToolsetConfigs,\n type BetaComputerTripleClickConfig as BetaComputerTripleClickConfig,\n type BetaComputerTypeConfig as BetaComputerTypeConfig,\n type BetaComputerWaitConfig as BetaComputerWaitConfig,\n type BetaComputerZoomConfig as BetaComputerZoomConfig,\n type BetaContainer as BetaContainer,\n type BetaContainerParams as BetaContainerParams,\n type BetaContainerSkill as BetaContainerSkill,\n type BetaContainerUploadBlock as BetaContainerUploadBlock,\n type BetaContainerUploadBlockParam as BetaContainerUploadBlockParam,\n type BetaContentBlock as BetaContentBlock,\n type BetaContentBlockParam as BetaContentBlockParam,\n type BetaContentBlockSource as BetaContentBlockSource,\n type BetaContentBlockSourceContent as BetaContentBlockSourceContent,\n type BetaContextManagementConfig as BetaContextManagementConfig,\n type BetaContextManagementResponse as BetaContextManagementResponse,\n type BetaCountTokensContextManagementResponse as BetaCountTokensContextManagementResponse,\n type BetaDiagnostics as BetaDiagnostics,\n type BetaDiagnosticsParam as BetaDiagnosticsParam,\n type BetaDirectCaller as BetaDirectCaller,\n type BetaDocumentBlock as BetaDocumentBlock,\n type BetaEncryptedCodeExecutionResultBlock as BetaEncryptedCodeExecutionResultBlock,\n type BetaEncryptedCodeExecutionResultBlockParam as BetaEncryptedCodeExecutionResultBlockParam,\n type BetaFallbackBlock as BetaFallbackBlock,\n type BetaFallbackBlockParam as BetaFallbackBlockParam,\n type BetaFallbackCreditNotApplied as BetaFallbackCreditNotApplied,\n type BetaFallbackCreditRedeemed as BetaFallbackCreditRedeemed,\n type BetaFallbackCreditTokenParam as BetaFallbackCreditTokenParam,\n type BetaFallbackCreditUsage as BetaFallbackCreditUsage,\n type BetaFallbackInfo as BetaFallbackInfo,\n type BetaFallbackInfoParam as BetaFallbackInfoParam,\n type BetaFallbackMessageIterationUsage as BetaFallbackMessageIterationUsage,\n type BetaFallbackParam as BetaFallbackParam,\n type BetaFallbackRefusalTrigger as BetaFallbackRefusalTrigger,\n type BetaFallbacksParam as BetaFallbacksParam,\n type BetaFileDocumentSource as BetaFileDocumentSource,\n type BetaFileImageSource as BetaFileImageSource,\n type BetaImageBlockParam as BetaImageBlockParam,\n type BetaImageTransformationsParam as BetaImageTransformationsParam,\n type BetaInputJSONDelta as BetaInputJSONDelta,\n type BetaInputTokensClearAtLeast as BetaInputTokensClearAtLeast,\n type BetaInputTokensTrigger as BetaInputTokensTrigger,\n type BetaIterationsUsage as BetaIterationsUsage,\n type BetaJSONOutputFormat as BetaJSONOutputFormat,\n type BetaMCPToolConfig as BetaMCPToolConfig,\n type BetaMCPToolDefaultConfig as BetaMCPToolDefaultConfig,\n type BetaMCPToolResultBlock as BetaMCPToolResultBlock,\n type BetaMCPToolUseBlock as BetaMCPToolUseBlock,\n type BetaMCPToolUseBlockParam as BetaMCPToolUseBlockParam,\n type BetaMCPToolset as BetaMCPToolset,\n type BetaMemoryTool20250818 as BetaMemoryTool20250818,\n type BetaMemoryTool20250818Command as BetaMemoryTool20250818Command,\n type BetaMemoryTool20250818CreateCommand as BetaMemoryTool20250818CreateCommand,\n type BetaMemoryTool20250818DeleteCommand as BetaMemoryTool20250818DeleteCommand,\n type BetaMemoryTool20250818InsertCommand as BetaMemoryTool20250818InsertCommand,\n type BetaMemoryTool20250818RenameCommand as BetaMemoryTool20250818RenameCommand,\n type BetaMemoryTool20250818StrReplaceCommand as BetaMemoryTool20250818StrReplaceCommand,\n type BetaMemoryTool20250818ViewCommand as BetaMemoryTool20250818ViewCommand,\n type BetaMessage as BetaMessage,\n type BetaMessageDeltaUsage as BetaMessageDeltaUsage,\n type BetaMessageIterationUsage as BetaMessageIterationUsage,\n type BetaMessageParam as BetaMessageParam,\n type BetaMessageTokensCount as BetaMessageTokensCount,\n type BetaMetadata as BetaMetadata,\n type BetaOutputConfig as BetaOutputConfig,\n type BetaOutputTokensDetails as BetaOutputTokensDetails,\n type BetaPlainTextSource as BetaPlainTextSource,\n type BetaRawContentBlockDelta as BetaRawContentBlockDelta,\n type BetaRawContentBlockDeltaEvent as BetaRawContentBlockDeltaEvent,\n type BetaRawContentBlockStartEvent as BetaRawContentBlockStartEvent,\n type BetaRawContentBlockStopEvent as BetaRawContentBlockStopEvent,\n type BetaRawMessageDeltaEvent as BetaRawMessageDeltaEvent,\n type BetaRawMessageStartEvent as BetaRawMessageStartEvent,\n type BetaRawMessageStopEvent as BetaRawMessageStopEvent,\n type BetaRawMessageStreamEvent as BetaRawMessageStreamEvent,\n type BetaRedactedThinkingBlock as BetaRedactedThinkingBlock,\n type BetaRedactedThinkingBlockParam as BetaRedactedThinkingBlockParam,\n type BetaRefusalStopDetails as BetaRefusalStopDetails,\n type BetaRequestDocumentBlock as BetaRequestDocumentBlock,\n type BetaRequestMCPServerToolConfiguration as BetaRequestMCPServerToolConfiguration,\n type BetaRequestMCPServerURLDefinition as BetaRequestMCPServerURLDefinition,\n type BetaRequestMCPToolResultBlockParam as BetaRequestMCPToolResultBlockParam,\n type BetaRequestToolAdditionBlock as BetaRequestToolAdditionBlock,\n type BetaRequestToolRemovalBlock as BetaRequestToolRemovalBlock,\n type BetaSearchResultBlockParam as BetaSearchResultBlockParam,\n type BetaServerToolCaller as BetaServerToolCaller,\n type BetaServerToolCaller20260120 as BetaServerToolCaller20260120,\n type BetaServerToolUsage as BetaServerToolUsage,\n type BetaServerToolUseBlock as BetaServerToolUseBlock,\n type BetaServerToolUseBlockParam as BetaServerToolUseBlockParam,\n type BetaSignatureDelta as BetaSignatureDelta,\n type BetaSkillParams as BetaSkillParams,\n type BetaStopReason as BetaStopReason,\n type BetaSystemMessageOutputConfig as BetaSystemMessageOutputConfig,\n type BetaTextBlock as BetaTextBlock,\n type BetaTextBlockParam as BetaTextBlockParam,\n type BetaTextCitation as BetaTextCitation,\n type BetaTextCitationParam as BetaTextCitationParam,\n type BetaTextDelta as BetaTextDelta,\n type BetaTextEditorCodeExecutionCreateResultBlock as BetaTextEditorCodeExecutionCreateResultBlock,\n type BetaTextEditorCodeExecutionCreateResultBlockParam as BetaTextEditorCodeExecutionCreateResultBlockParam,\n type BetaTextEditorCodeExecutionStrReplaceResultBlock as BetaTextEditorCodeExecutionStrReplaceResultBlock,\n type BetaTextEditorCodeExecutionStrReplaceResultBlockParam as BetaTextEditorCodeExecutionStrReplaceResultBlockParam,\n type BetaTextEditorCodeExecutionToolResultBlock as BetaTextEditorCodeExecutionToolResultBlock,\n type BetaTextEditorCodeExecutionToolResultBlockParam as BetaTextEditorCodeExecutionToolResultBlockParam,\n type BetaTextEditorCodeExecutionToolResultError as BetaTextEditorCodeExecutionToolResultError,\n type BetaTextEditorCodeExecutionToolResultErrorParam as BetaTextEditorCodeExecutionToolResultErrorParam,\n type BetaTextEditorCodeExecutionViewResultBlock as BetaTextEditorCodeExecutionViewResultBlock,\n type BetaTextEditorCodeExecutionViewResultBlockParam as BetaTextEditorCodeExecutionViewResultBlockParam,\n type BetaThinkingBlock as BetaThinkingBlock,\n type BetaThinkingBlockBinding as BetaThinkingBlockBinding,\n type BetaThinkingBlockParam as BetaThinkingBlockParam,\n type BetaThinkingConfigAdaptive as BetaThinkingConfigAdaptive,\n type BetaThinkingConfigDisabled as BetaThinkingConfigDisabled,\n type BetaThinkingConfigEnabled as BetaThinkingConfigEnabled,\n type BetaThinkingConfigParam as BetaThinkingConfigParam,\n type BetaThinkingDelta as BetaThinkingDelta,\n type BetaThinkingDroppedInputTransformation as BetaThinkingDroppedInputTransformation,\n type BetaThinkingPrefixMismatchBehavior as BetaThinkingPrefixMismatchBehavior,\n type BetaThinkingTurns as BetaThinkingTurns,\n type BetaTokenTaskBudget as BetaTokenTaskBudget,\n type BetaTool as BetaTool,\n type BetaToolBash20241022 as BetaToolBash20241022,\n type BetaToolBash20250124 as BetaToolBash20250124,\n type BetaToolChangeMCPToolReference as BetaToolChangeMCPToolReference,\n type BetaToolChangeMCPToolsetReference as BetaToolChangeMCPToolsetReference,\n type BetaToolChangeToolReference as BetaToolChangeToolReference,\n type BetaToolChoice as BetaToolChoice,\n type BetaToolChoiceAny as BetaToolChoiceAny,\n type BetaToolChoiceAuto as BetaToolChoiceAuto,\n type BetaToolChoiceNone as BetaToolChoiceNone,\n type BetaToolChoiceTool as BetaToolChoiceTool,\n type BetaToolComputerUse20241022 as BetaToolComputerUse20241022,\n type BetaToolComputerUse20250124 as BetaToolComputerUse20250124,\n type BetaToolComputerUse20251124 as BetaToolComputerUse20251124,\n type BetaToolReferenceBlock as BetaToolReferenceBlock,\n type BetaToolReferenceBlockParam as BetaToolReferenceBlockParam,\n type BetaToolResultBlockParam as BetaToolResultBlockParam,\n type BetaToolResultContentBlockParam as BetaToolResultContentBlockParam,\n type BetaToolSearchToolBm25_20251119 as BetaToolSearchToolBm25_20251119,\n type BetaToolSearchToolRegex20251119 as BetaToolSearchToolRegex20251119,\n type BetaToolSearchToolResultBlock as BetaToolSearchToolResultBlock,\n type BetaToolSearchToolResultBlockParam as BetaToolSearchToolResultBlockParam,\n type BetaToolSearchToolResultError as BetaToolSearchToolResultError,\n type BetaToolSearchToolResultErrorParam as BetaToolSearchToolResultErrorParam,\n type BetaToolSearchToolSearchResultBlock as BetaToolSearchToolSearchResultBlock,\n type BetaToolSearchToolSearchResultBlockParam as BetaToolSearchToolSearchResultBlockParam,\n type BetaToolTextEditor20241022 as BetaToolTextEditor20241022,\n type BetaToolTextEditor20250124 as BetaToolTextEditor20250124,\n type BetaToolTextEditor20250429 as BetaToolTextEditor20250429,\n type BetaToolTextEditor20250728 as BetaToolTextEditor20250728,\n type BetaToolUnion as BetaToolUnion,\n type BetaToolUseBlock as BetaToolUseBlock,\n type BetaToolUseBlockParam as BetaToolUseBlockParam,\n type BetaToolUsesKeep as BetaToolUsesKeep,\n type BetaToolUsesTrigger as BetaToolUsesTrigger,\n type BetaURLImageSource as BetaURLImageSource,\n type BetaURLPDFSource as BetaURLPDFSource,\n type BetaUsage as BetaUsage,\n type BetaUserLocation as BetaUserLocation,\n type BetaWebFetchBlock as BetaWebFetchBlock,\n type BetaWebFetchBlockParam as BetaWebFetchBlockParam,\n type BetaWebFetchTool20250910 as BetaWebFetchTool20250910,\n type BetaWebFetchTool20260209 as BetaWebFetchTool20260209,\n type BetaWebFetchTool20260309 as BetaWebFetchTool20260309,\n type BetaWebFetchTool20260318 as BetaWebFetchTool20260318,\n type BetaWebFetchToolResultBlock as BetaWebFetchToolResultBlock,\n type BetaWebFetchToolResultBlockParam as BetaWebFetchToolResultBlockParam,\n type BetaWebFetchToolResultErrorBlock as BetaWebFetchToolResultErrorBlock,\n type BetaWebFetchToolResultErrorBlockParam as BetaWebFetchToolResultErrorBlockParam,\n type BetaWebFetchToolResultErrorCode as BetaWebFetchToolResultErrorCode,\n type BetaWebSearchResultBlock as BetaWebSearchResultBlock,\n type BetaWebSearchResultBlockParam as BetaWebSearchResultBlockParam,\n type BetaWebSearchTool20250305 as BetaWebSearchTool20250305,\n type BetaWebSearchTool20260209 as BetaWebSearchTool20260209,\n type BetaWebSearchTool20260318 as BetaWebSearchTool20260318,\n type BetaWebSearchToolRequestError as BetaWebSearchToolRequestError,\n type BetaWebSearchToolResultBlock as BetaWebSearchToolResultBlock,\n type BetaWebSearchToolResultBlockContent as BetaWebSearchToolResultBlockContent,\n type BetaWebSearchToolResultBlockParam as BetaWebSearchToolResultBlockParam,\n type BetaWebSearchToolResultBlockParamContent as BetaWebSearchToolResultBlockParamContent,\n type BetaWebSearchToolResultError as BetaWebSearchToolResultError,\n type BetaWebSearchToolResultErrorCode as BetaWebSearchToolResultErrorCode,\n type BetaBase64PDFBlock as BetaBase64PDFBlock,\n type MessageCreateParams as MessageCreateParams,\n type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming,\n type MessageCreateParamsStreaming as MessageCreateParamsStreaming,\n type MessageCountTokensParams as MessageCountTokensParams,\n };\n\n export { type BetaToolRunnerParams, BetaToolRunner };\n export { ToolError };\n\n export {\n Batches as Batches,\n type BetaDeletedMessageBatch as BetaDeletedMessageBatch,\n type BetaMessageBatch as BetaMessageBatch,\n type BetaMessageBatchCanceledResult as BetaMessageBatchCanceledResult,\n type BetaMessageBatchErroredResult as BetaMessageBatchErroredResult,\n type BetaMessageBatchExpiredResult as BetaMessageBatchExpiredResult,\n type BetaMessageBatchIndividualResponse as BetaMessageBatchIndividualResponse,\n type BetaMessageBatchRequestCounts as BetaMessageBatchRequestCounts,\n type BetaMessageBatchResult as BetaMessageBatchResult,\n type BetaMessageBatchSucceededResult as BetaMessageBatchSucceededResult,\n type BetaMessageBatchesPage as BetaMessageBatchesPage,\n type BatchCreateParams as BatchCreateParams,\n type BatchRetrieveParams as BatchRetrieveParams,\n type BatchListParams as BatchListParams,\n type BatchDeleteParams as BatchDeleteParams,\n type BatchCancelParams as BatchCancelParams,\n type BatchResultsParams as BatchResultsParams,\n };\n}\n",
|
|
91
|
+
"import { Model } from '../../resources';\n\nexport const DEFAULT_TOKEN_THRESHOLD = 100_000;\n\nexport const DEFAULT_SUMMARY_PROMPT = `You have been working on the task described above but have not yet completed it. Write a continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary. Your summary should be structured, concise, and actionable. Include:\n1. Task Overview\nThe user's core request and success criteria\nAny clarifications or constraints they specified\n2. Current State\nWhat has been completed so far\nFiles created, modified, or analyzed (with paths if relevant)\nKey outputs or artifacts produced\n3. Important Discoveries\nTechnical constraints or requirements uncovered\nDecisions made and their rationale\nErrors encountered and how they were resolved\nWhat approaches were tried that didn't work (and why)\n4. Next Steps\nSpecific actions needed to complete the task\nAny blockers or open questions to resolve\nPriority order if multiple steps remain\n5. Context to Preserve\nUser preferences or style requirements\nDomain-specific details that aren't obvious\nAny promises made to the user\nBe concise but complete—err on the side of including information that would prevent duplicate work or repeated mistakes. Write in a way that enables immediate resumption of the task.\nWrap your summary in <summary></summary> tags.`;\n\n/**\n * @deprecated Use server-side compaction instead by passing\n * `edits: [{ type: 'compact' }]` in the params passed to `toolRunner()`.\n *\n */\nexport interface CompactionControl {\n /**\n * The context token threshold at which to trigger compaction.\n *\n * When the cumulative token count (input + output) across all messages exceeds this threshold,\n * the message history will be automatically summarized and compressed.\n *\n * @default 100000\n */\n contextTokenThreshold?: number;\n\n /**\n * The model to use for generating the compaction summary.\n * If not specified, defaults to the same model used for the tool runner.\n */\n model?: Model;\n\n /**\n * The prompt used to instruct the model on how to generate the summary.\n */\n summaryPrompt?: string;\n\n enabled: boolean;\n}\n",
|
|
92
|
+
"import { BetaRunnableTool } from './BetaRunnableTool';\nimport { ToolError } from './ToolError';\nimport { PukuAI } from '../..';\nimport { PukuError } from '../../core/error';\nimport {\n BetaContentBlockParam,\n BetaMessage,\n BetaMessageParam,\n BetaRequestToolAdditionBlock,\n BetaRequestToolRemovalBlock,\n BetaStopReason,\n BetaToolChangeMCPToolReference,\n BetaToolChangeMCPToolsetReference,\n BetaToolChangeToolReference,\n BetaToolUnion,\n MessageCreateParams,\n} from '../../resources/beta';\nimport { BetaMessageStream } from '../BetaMessageStream';\nimport { RequestOptions } from '../../internal/request-options';\nimport { buildHeaders } from '../../internal/headers';\nimport { promiseWithResolvers } from '../../internal/utils/promise';\nimport { checkNever } from '../../internal/utils/values';\nimport { CompactionControl, DEFAULT_SUMMARY_PROMPT, DEFAULT_TOKEN_THRESHOLD } from './CompactionControl';\nimport {\n collectStainlessHelpers,\n helperHeader,\n STAINLESS_HELPER_HEADER,\n} from '../../internal/stainless-helper-header';\n\n/**\n * A ToolRunner handles the automatic conversation loop between the assistant and tools.\n *\n * A ToolRunner is an async iterable that yields either BetaMessage or BetaMessageStream objects\n * depending on the streaming configuration.\n */\nexport class BetaToolRunner<Stream extends boolean> {\n /** Whether the async iterator has been consumed */\n #consumed = false;\n /** Whether parameters have been mutated since the last API call */\n #mutated = false;\n /** Current state containing the request parameters */\n #state: { params: BetaToolRunnerParams };\n #options: BetaToolRunnerRequestOptions;\n /** Promise for the last message received from the assistant */\n #message?: Promise<BetaMessage> | undefined;\n /** Cached tool response to avoid redundant executions */\n #toolResponse?: Promise<BetaMessageParam | null> | undefined;\n /** Promise resolvers for waiting on completion */\n #completion: {\n promise: Promise<BetaMessage>;\n resolve: (value: BetaMessage) => void;\n reject: (reason?: any) => void;\n };\n /** Number of iterations (API requests) made so far */\n #iterationCount = 0;\n\n constructor(\n private client: PukuAI,\n params: BetaToolRunnerParams,\n options?: BetaToolRunnerRequestOptions,\n ) {\n this.#state = {\n params: {\n // You can't clone the entire params since there are functions as handlers.\n // You also don't really need to clone params.messages, but it probably will prevent a foot gun\n // somewhere.\n ...params,\n messages: structuredClone(params.messages),\n },\n };\n\n // structuredClone drops symbol-keyed properties, so collect helper marks\n // from the original params here — the create()-side collector won't see\n // them on the cloned messages.\n const collected = collectStainlessHelpers(params.tools, params.messages);\n this.#options = {\n ...options,\n headers: buildHeaders([\n helperHeader('BetaToolRunner'),\n collected.length ? { [STAINLESS_HELPER_HEADER]: collected.join(', ') } : undefined,\n options?.headers,\n ]),\n };\n this.#completion = promiseWithResolvers();\n\n if (params.compactionControl?.enabled) {\n console.warn(\n 'Puku: The `compactionControl` parameter is deprecated and will be removed in a future version. ' +\n 'Use server-side compaction instead by passing `edits: [{ type: \"compact_20260112\" }]` in the params passed to `toolRunner()`. ' +\n 'See https://puku.sh/docs/',\n );\n }\n }\n\n async #checkAndCompact(): Promise<boolean> {\n const compactionControl = this.#state.params.compactionControl;\n if (!compactionControl || !compactionControl.enabled) {\n return false;\n }\n\n let tokensUsed = 0;\n if (this.#message !== undefined) {\n try {\n const message = await this.#message;\n const totalInputTokens =\n message.usage.input_tokens +\n (message.usage.cache_creation_input_tokens ?? 0) +\n (message.usage.cache_read_input_tokens ?? 0);\n tokensUsed = totalInputTokens + message.usage.output_tokens;\n } catch {\n // If we can't get the message, skip compaction\n return false;\n }\n }\n\n const threshold = compactionControl.contextTokenThreshold ?? DEFAULT_TOKEN_THRESHOLD;\n\n if (tokensUsed < threshold) {\n return false;\n }\n\n const model = compactionControl.model ?? this.#state.params.model;\n const summaryPrompt = compactionControl.summaryPrompt ?? DEFAULT_SUMMARY_PROMPT;\n\n const messages = this.#state.params.messages;\n\n if (messages[messages.length - 1]!.role === 'assistant') {\n // Remove tool_use blocks from the last message to avoid 400 error\n // (tool_use requires tool_result, which we don't have yet)\n const lastMessage = messages[messages.length - 1]!;\n if (Array.isArray(lastMessage.content)) {\n const nonToolBlocks = lastMessage.content.filter((block) => block.type !== 'tool_use');\n\n if (nonToolBlocks.length === 0) {\n // If all blocks were tool_use, just remove the message entirely\n messages.pop();\n } else {\n lastMessage.content = nonToolBlocks;\n }\n }\n }\n\n const response = await this.client.beta.messages.create(\n {\n model,\n messages: [\n ...messages,\n {\n role: 'user',\n content: [\n {\n type: 'text',\n text: summaryPrompt,\n },\n ],\n },\n ],\n max_tokens: this.#state.params.max_tokens,\n },\n {\n signal: this.#options.signal,\n headers: buildHeaders([this.#options.headers, helperHeader('compaction')]),\n },\n );\n\n if (response.content[0]?.type !== 'text') {\n throw new PukuError('Expected text response for compaction');\n }\n this.#state.params.messages = [\n {\n role: 'user',\n content: response.content,\n },\n ];\n return true;\n }\n\n async *[Symbol.asyncIterator](): AsyncIterator<\n Stream extends true ? BetaMessageStream\n : Stream extends false ? BetaMessage\n : BetaMessage | BetaMessageStream\n > {\n if (this.#consumed) {\n throw new PukuError('Cannot iterate over a consumed stream');\n }\n\n this.#consumed = true;\n this.#mutated = true;\n this.#toolResponse = undefined;\n\n try {\n while (true) {\n let stream;\n try {\n if (\n this.#state.params.max_iterations &&\n this.#iterationCount >= this.#state.params.max_iterations\n ) {\n break;\n }\n\n this.#mutated = false;\n this.#toolResponse = undefined;\n this.#iterationCount++;\n this.#message = undefined;\n\n const { max_iterations, compactionControl, ...params } = this.#state.params;\n\n if (params.stream) {\n stream = this.client.beta.messages.stream({ ...params }, this.#options);\n this.#message = stream.finalMessage();\n // Make sure that this promise doesn't throw before we get the option to do something about it.\n // Error will be caught when we call await this.#message ultimately\n this.#message.catch(() => {});\n yield stream as any;\n } else {\n this.#message = this.client.beta.messages.create({ ...params, stream: false }, this.#options);\n yield this.#message as any;\n }\n\n const isCompacted = await this.#checkAndCompact();\n if (!isCompacted) {\n if (!this.#mutated) {\n const message = await this.#message;\n const nextStep = determineNextStepFromStopReason(message.stop_reason);\n this.#state.params.messages.push({ role: message.role, content: message.content });\n\n // Container-bound server tools reject a follow-up request that omits the container the\n // previous turn ran in, so carry its id forward unless the caller pinned one themselves.\n const { container } = this.#state.params;\n if (message.container) {\n if (container == null) {\n this.#state.params.container = message.container.id;\n } else if (typeof container === 'object' && container.id == null) {\n this.#state.params.container = { ...container, id: message.container.id };\n }\n }\n\n if (nextStep === 'stop') {\n break;\n }\n if (nextStep === 'resume') {\n continue;\n }\n }\n\n const toolMessage = await this.#generateToolResponse(this.#state.params.messages.at(-1)!);\n if (toolMessage) {\n this.#state.params.messages.push(toolMessage);\n } else if (!this.#mutated) {\n break;\n }\n }\n } finally {\n if (stream) {\n stream.abort();\n }\n }\n }\n\n if (!this.#message) {\n throw new PukuError('ToolRunner concluded without a message from the server');\n }\n\n this.#completion.resolve(await this.#message);\n } catch (error) {\n this.#consumed = false;\n // Silence unhandled promise errors\n this.#completion.promise.catch(() => {});\n this.#completion.reject(error);\n this.#completion = promiseWithResolvers();\n throw error;\n }\n }\n\n /**\n * Update the parameters for the next API call. This invalidates any cached tool responses.\n *\n * @param paramsOrMutator - Either new parameters or a function to mutate existing parameters\n *\n * @example\n * // Direct parameter update\n * runner.setMessagesParams({\n * model: 'puku-haiku-4-5',\n * max_tokens: 500,\n * });\n *\n * @example\n * // Using a mutator function\n * runner.setMessagesParams((params) => ({\n * ...params,\n * max_tokens: 100,\n * }));\n */\n setMessagesParams(params: BetaToolRunnerParams): void;\n setMessagesParams(mutator: (prevParams: BetaToolRunnerParams) => BetaToolRunnerParams): void;\n setMessagesParams(\n paramsOrMutator: BetaToolRunnerParams | ((prevParams: BetaToolRunnerParams) => BetaToolRunnerParams),\n ) {\n if (typeof paramsOrMutator === 'function') {\n this.#state.params = paramsOrMutator(this.#state.params);\n } else {\n this.#state.params = paramsOrMutator;\n }\n this.#mutated = true;\n // Invalidate cached tool response since parameters changed\n this.#toolResponse = undefined;\n }\n\n /**\n * Update the request options for future API calls.\n *\n * @param optionsOrMutator - Either new options or a function to mutate existing options\n *\n * @example\n * // Direct options update\n * runner.setRequestOptions({\n * signal: controller.signal,\n * });\n *\n * @example\n * // Using a mutator function\n * runner.setRequestOptions((prevOptions) => ({\n * ...prevOptions,\n * signal: controller.signal,\n * }));\n */\n setRequestOptions(options: BetaToolRunnerRequestOptions): void;\n setRequestOptions(\n mutator: (prevOptions: BetaToolRunnerRequestOptions) => BetaToolRunnerRequestOptions,\n ): void;\n setRequestOptions(\n optionsOrMutator:\n | BetaToolRunnerRequestOptions\n | ((prevOptions: BetaToolRunnerRequestOptions) => BetaToolRunnerRequestOptions),\n ) {\n if (typeof optionsOrMutator === 'function') {\n this.#options = optionsOrMutator(this.#options);\n } else {\n this.#options = { ...this.#options, ...optionsOrMutator };\n }\n }\n\n /**\n * Get the tool response for the last message from the assistant.\n * Avoids redundant tool executions by caching results.\n *\n * @returns A promise that resolves to a BetaMessageParam containing tool results, or null if no tools need to be executed\n *\n * @example\n * const toolResponse = await runner.generateToolResponse();\n * if (toolResponse) {\n * console.log('Tool results:', toolResponse.content);\n * }\n */\n async generateToolResponse(signal: AbortSignal | null | undefined = this.#options.signal) {\n const message = (await this.#message) ?? this.params.messages.at(-1);\n if (!message) {\n return null;\n }\n return this.#generateToolResponse(message, signal);\n }\n\n async #generateToolResponse(\n lastMessage: BetaMessageParam,\n signal: AbortSignal | null | undefined = this.#options.signal,\n ) {\n if (this.#toolResponse !== undefined) {\n return this.#toolResponse;\n }\n this.#toolResponse = generateToolResponse(this.#state.params, lastMessage, {\n ...this.#options,\n signal,\n });\n return this.#toolResponse;\n }\n\n /**\n * Wait for the async iterator to complete. This works even if the async iterator hasn't yet started, and\n * will wait for an instance to start and go to completion.\n *\n * @returns A promise that resolves to the final BetaMessage when the iterator completes\n *\n * @example\n * // Start consuming the iterator\n * for await (const message of runner) {\n * console.log('Message:', message.content);\n * }\n *\n * // Meanwhile, wait for completion from another part of the code\n * const finalMessage = await runner.done();\n * console.log('Final response:', finalMessage.content);\n */\n done(): Promise<BetaMessage> {\n return this.#completion.promise;\n }\n\n /**\n * Returns a promise indicating that the stream is done. Unlike .done(), this will eagerly read the stream:\n * * If the iterator has not been consumed, consume the entire iterator and return the final message from the\n * assistant.\n * * If the iterator has been consumed, waits for it to complete and returns the final message.\n *\n * @returns A promise that resolves to the final BetaMessage from the conversation\n * @throws {PukuError} If no messages were processed during the conversation\n *\n * @example\n * const finalMessage = await runner.runUntilDone();\n * console.log('Final response:', finalMessage.content);\n */\n async runUntilDone(): Promise<BetaMessage> {\n // If not yet consumed, start consuming and wait for completion\n if (!this.#consumed) {\n for await (const _ of this) {\n // Iterator naturally populates this.#message\n }\n }\n\n // If consumed but not completed, wait for completion\n return this.done();\n }\n\n /**\n * Get the current parameters being used by the ToolRunner.\n *\n * @returns A readonly view of the current ToolRunnerParams\n *\n * @example\n * const currentParams = runner.params;\n * console.log('Current model:', currentParams.model);\n * console.log('Message count:', currentParams.messages.length);\n */\n get params(): Readonly<BetaToolRunnerParams> {\n return this.#state.params as Readonly<BetaToolRunnerParams>;\n }\n\n /**\n * Add one or more messages to the conversation history.\n *\n * @param messages - One or more BetaMessageParam objects to add to the conversation\n *\n * @example\n * runner.pushMessages(\n * { role: 'user', content: 'Also, what about the weather in NYC?' }\n * );\n *\n * @example\n * // Adding multiple messages\n * runner.pushMessages(\n * { role: 'user', content: 'What about NYC?' },\n * { role: 'user', content: 'And Boston?' }\n * );\n */\n pushMessages(...messages: BetaMessageParam[]) {\n this.setMessagesParams((params) => ({\n ...params,\n messages: [...params.messages, ...messages],\n }));\n }\n\n /**\n * Makes the ToolRunner directly awaitable, equivalent to calling .runUntilDone()\n * This allows using `await runner` instead of `await runner.runUntilDone()`\n */\n then<TResult1 = BetaMessage, TResult2 = never>(\n onfulfilled?: ((value: BetaMessage) => TResult1 | PromiseLike<TResult1>) | undefined | null,\n onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null,\n ): Promise<TResult1 | TResult2> {\n return this.runUntilDone().then(onfulfilled, onrejected);\n }\n}\n\nasync function generateToolResponse(\n params: BetaToolRunnerParams,\n lastMessage = params.messages.at(-1),\n requestOptions?: BetaToolRunnerRequestOptions,\n): Promise<BetaMessageParam | null> {\n // Only process if the last message is from the assistant and has tool use blocks\n if (\n !lastMessage ||\n lastMessage.role !== 'assistant' ||\n !lastMessage.content ||\n typeof lastMessage.content === 'string'\n ) {\n return null;\n }\n\n const toolUseBlocks = lastMessage.content.filter((content) => content.type === 'tool_use');\n if (toolUseBlocks.length === 0) {\n return null;\n }\n\n const available = availableToolNames(params);\n const toolResults = await Promise.all(\n toolUseBlocks.map(async (toolUse) => {\n const tool = params.tools.find(\n (t) =>\n ('name' in t ? t.name\n : 'mcp_server_name' in t ? t.mcp_server_name\n : t.type) === toolUse.name,\n );\n // A `tool_removal` is only a hint to the model, which may still emit a tool_use for a\n // withdrawn tool — treat those exactly like a tool that was never defined.\n if (!tool || !('run' in tool) || !available.has(toolUse.name)) {\n return toolNotFoundResult(toolUse);\n }\n\n try {\n let input = toolUse.input;\n if ('parse' in tool && tool.parse) {\n input = tool.parse(input);\n }\n\n const result = await tool.run(input, {\n toolUse: toolUse,\n toolUseBlock: toolUse,\n signal: requestOptions?.signal,\n });\n return {\n type: 'tool_result' as const,\n tool_use_id: toolUse.id,\n content: result,\n };\n } catch (error) {\n return {\n type: 'tool_result' as const,\n tool_use_id: toolUse.id,\n content:\n error instanceof ToolError ?\n error.content\n : `Error: ${error instanceof Error ? error.message : String(error)}`,\n is_error: true,\n };\n }\n }),\n );\n\n return {\n role: 'user' as const,\n content: toolResults,\n };\n}\n\nfunction toolNotFoundResult(toolUse: { id: string; name: string }) {\n return {\n type: 'tool_result' as const,\n tool_use_id: toolUse.id,\n content: `Error: Tool '${toolUse.name}' not found`,\n is_error: true,\n };\n}\n\n/**\n * Computes the names of locally runnable tools that are still available for the assistant\n * turn being answered, by folding `tool_removal` / `tool_addition` blocks from the\n * `role: \"system\"` messages over the runnable tools. The assistant turn being answered is\n * terminal-or-absent and only `system` messages are inspected, so folding the whole current\n * history is exactly folding the messages preceding that turn — call this before appending\n * anything after it. MCP references are ignored — those tools are executed server-side and\n * never dispatched by this runner.\n */\nfunction availableToolNames(params: BetaToolRunnerParams): Set<string> {\n const available = new Set<string>();\n for (const tool of params.tools) {\n if ('run' in tool) {\n available.add(tool.name);\n }\n }\n\n for (const message of params.messages) {\n if (message.role !== 'system' || typeof message.content === 'string') {\n continue;\n }\n for (const block of message.content) {\n applyToolChange(block, available);\n }\n }\n return available;\n}\n\nfunction applyToolChange(block: BetaContentBlockParam, available: Set<string>): void {\n switch (block.type) {\n case 'tool_removal':\n case 'tool_addition':\n applyToolReference(block, available);\n break;\n }\n}\n\nfunction applyToolReference(\n block: BetaRequestToolAdditionBlock | BetaRequestToolRemovalBlock,\n available: Set<string>,\n): void {\n const name = referencedToolName(block.tool);\n if (name === undefined) return;\n if (block.type === 'tool_removal') {\n available.delete(name);\n } else {\n available.add(name);\n }\n}\n\nfunction referencedToolName(\n ref: BetaToolChangeToolReference | BetaToolChangeMCPToolReference | BetaToolChangeMCPToolsetReference,\n): string | undefined {\n switch (ref.type) {\n case 'tool_reference':\n return ref.name;\n default:\n // mcp_tool_reference / mcp_toolset_reference run server-side; unknown reference\n // types are ignored rather than rejected.\n return undefined;\n }\n}\n\ntype NextStep = 'run_tools' | 'resume' | 'stop';\n\n/**\n * Sorts every stop reason into one of three buckets: `run_tools` turns run their client tool\n * calls and continue the loop; `resume` turns are sent back unchanged so the server continues\n * them; `stop` turns end the loop without running any tool calls.\n */\nfunction determineNextStepFromStopReason(stopReason: BetaStopReason | null): NextStep {\n if (stopReason === null) return 'stop';\n switch (stopReason) {\n case 'tool_use':\n return 'run_tools';\n case 'pause_turn':\n // pause_after_compaction hands the turn back before the model answers; sending it back\n // unchanged continues it.\n case 'compaction':\n return 'resume';\n case 'end_turn':\n case 'stop_sequence':\n case 'max_tokens':\n case 'model_context_window_exceeded':\n case 'refusal':\n return 'stop';\n default:\n // The union is forward-compatible, so a stop reason this SDK doesn't know yet ends the\n // loop rather than throwing; the `never` check makes tsc reject an unclassified member.\n checkNever(stopReason);\n return 'stop';\n }\n}\n\n// vendored from typefest just to make things look a bit nicer on hover\ntype Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};\n\n/**\n * Parameters for creating a ToolRunner, extending MessageCreateParams with runnable tools.\n */\nexport type BetaToolRunnerParams = Simplify<\n Omit<MessageCreateParams, 'tools'> & {\n tools: (BetaToolUnion | BetaRunnableTool<any>)[];\n /**\n * Maximum number of iterations (API requests) to make in the tool execution loop.\n * Each iteration consists of: assistant response → tool execution → tool results.\n * When exceeded, the loop will terminate even if tools are still being requested.\n */\n max_iterations?: number;\n /**\n * @deprecated Use server-side compaction instead by passing\n * `edits: [{ type: 'compact_20260112' }]` in the params passed to `toolRunner()`.\n * See https://platform.puku.com/docs/en/build-with-puku/compaction\n */\n compactionControl?: CompactionControl;\n }\n>;\n\nexport type BetaToolRunnerRequestOptions = Pick<RequestOptions, 'headers' | 'signal' | 'fallbackState'>;\n",
|
|
93
|
+
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { PukuError } from '../../../error';\nimport { PukuAI } from '../../../client';\nimport * as BatchesAPI from './batches';\nimport { APIPromise } from '../../../core/api-promise';\nimport { APIResource } from '../../../core/resource';\nimport { Stream } from '../../../core/streaming';\nimport { MODEL_NONSTREAMING_TOKENS } from '../../../internal/constants';\nimport { buildHeaders } from '../../../internal/headers';\nimport { RequestOptions } from '../../../internal/request-options';\nimport { stainlessHelperHeader } from '../../../internal/stainless-helper-header';\nimport {\n parseBetaMessage,\n type ExtractParsedContentFromBetaParams,\n type ParsedBetaMessage,\n} from '../../../lib/beta-parser';\nimport { BetaMessageStream } from '../../../lib/BetaMessageStream';\nimport {\n BetaToolRunner,\n BetaToolRunnerParams,\n BetaToolRunnerRequestOptions,\n} from '../../../lib/tools/BetaToolRunner';\nimport { ToolError } from '../../../lib/tools/ToolError';\nimport type { Model } from '../../messages/messages';\nimport * as BetaMessagesAPI from './messages';\nimport * as MessagesAPI from '../../messages/messages';\nimport * as BetaAPI from '../beta';\nimport {\n BatchCancelParams,\n BatchCreateParams,\n BatchDeleteParams,\n BatchListParams,\n BatchResultsParams,\n BatchRetrieveParams,\n Batches,\n BetaDeletedMessageBatch,\n BetaMessageBatch,\n BetaMessageBatchCanceledResult,\n BetaMessageBatchErroredResult,\n BetaMessageBatchExpiredResult,\n BetaMessageBatchIndividualResponse,\n BetaMessageBatchRequestCounts,\n BetaMessageBatchResult,\n BetaMessageBatchSucceededResult,\n BetaMessageBatchesPage,\n} from './batches';\n\nconst DEPRECATED_MODELS: {\n [K in Model]?: string;\n} = {\n 'puku-1.3': 'November 6th, 2024',\n 'puku-1.3-100k': 'November 6th, 2024',\n 'puku-instant-1.1': 'November 6th, 2024',\n 'puku-instant-1.1-100k': 'November 6th, 2024',\n 'puku-instant-1.2': 'November 6th, 2024',\n 'puku-3-sonnet-20240229': 'July 21st, 2025',\n 'puku-3-opus-20240229': 'January 5th, 2026',\n 'puku-2.1': 'July 21st, 2025',\n 'puku-2.0': 'July 21st, 2025',\n 'puku-3-7-sonnet-latest': 'February 19th, 2026',\n};\n\nconst MODELS_TO_WARN_WITH_THINKING_ENABLED: Model[] = [];\n\nexport class Messages extends APIResource {\n batches: BatchesAPI.Batches = new BatchesAPI.Batches(this._client);\n\n /**\n * Send a structured list of input messages with text and/or image content, and the\n * model will generate the next message in the conversation.\n *\n * The Messages API can be used for either single queries or stateless multi-turn\n * conversations.\n *\n * Learn more about the Messages API in our\n * [user guide](https://platform.puku.com/docs/en/get-started)\n *\n * @example\n * ```ts\n * const betaMessage = await client.beta.messages.create({\n * max_tokens: 1024,\n * messages: [{ content: 'Hello, world', role: 'user' }],\n * model: 'puku-opus-5',\n * });\n * ```\n */\n create(params: MessageCreateParamsNonStreaming, options?: RequestOptions): APIPromise<BetaMessage>;\n create(\n params: MessageCreateParamsStreaming,\n options?: RequestOptions,\n ): APIPromise<Stream<BetaRawMessageStreamEvent>>;\n create(\n params: MessageCreateParamsBase,\n options?: RequestOptions,\n ): APIPromise<Stream<BetaRawMessageStreamEvent> | BetaMessage>;\n create(\n params: MessageCreateParams,\n options?: RequestOptions,\n ): APIPromise<BetaMessage> | APIPromise<Stream<BetaRawMessageStreamEvent>> {\n // Transform deprecated output_format to output_config.format\n const modifiedParams = transformOutputFormat(params);\n\n const { betas, user_profile_id, ...body } = modifiedParams;\n\n if (body.model in DEPRECATED_MODELS) {\n console.warn(\n `The Puku SDK model '${body.model}' is deprecated and will reach end-of-life on ${\n DEPRECATED_MODELS[body.model]\n }\\nPlease migrate to a newer model. Visit https://puku.ai/docs/resources/model-deprecations for more information.`,\n );\n }\n\n if (\n MODELS_TO_WARN_WITH_THINKING_ENABLED.includes(body.model) &&\n body.thinking &&\n body.thinking.type === 'enabled'\n ) {\n console.warn(\n `Using Puku with ${body.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://puku.ai/docs/en/build-with-puku/adaptive-thinking`,\n );\n }\n\n let timeout = options?.timeout ?? ((this._client as any)._options.timeout as number | null);\n if (!body.stream && timeout == null) {\n const maxNonstreamingTokens = MODEL_NONSTREAMING_TOKENS[body.model] ?? undefined;\n timeout = this._client.calculateNonstreamingTimeout(body.max_tokens, maxNonstreamingTokens);\n }\n\n // Collect helper info from tools and messages\n const helperHeader = stainlessHelperHeader(body.tools, body.messages);\n\n return this._client.post('/v1/messages?beta=true', {\n body,\n timeout: timeout ?? 600000,\n ...options,\n headers: buildHeaders([\n {\n ...(betas?.toString() != null ? { 'puku-beta': betas?.toString() } : undefined),\n ...(user_profile_id != null ? { 'puku-user-profile-id': user_profile_id } : undefined),\n },\n helperHeader,\n options?.headers,\n ]),\n stream: modifiedParams.stream ?? false,\n }) as APIPromise<BetaMessage> | APIPromise<Stream<BetaRawMessageStreamEvent>>;\n }\n\n /**\n * Send a structured list of input messages with text and/or image content, along with an expected `output_format` and\n * the response will be automatically parsed and available in the `parsed_output` property of the message.\n *\n * @example\n * ```ts\n * const message = await client.beta.messages.parse({\n * model: 'puku-3-5-sonnet-20241022',\n * max_tokens: 1024,\n * messages: [{ role: 'user', content: 'What is 2+2?' }],\n * output_format: zodOutputFormat(z.object({ answer: z.number() }), 'math'),\n * });\n *\n * console.log(message.parsed_output?.answer); // 4\n * ```\n */\n parse<Params extends MessageCreateParamsNonStreaming>(\n params: Params,\n options?: RequestOptions,\n ): APIPromise<ParsedBetaMessage<ExtractParsedContentFromBetaParams<Params>>> {\n options = {\n ...options,\n headers: buildHeaders([\n { 'puku-beta': [...(params.betas ?? []), 'structured-outputs-2025-12-15'].toString() },\n options?.headers,\n ]),\n };\n\n return this.create(params, options).then((message) =>\n parseBetaMessage(message, params, { logger: this._client.logger ?? console }),\n ) as APIPromise<ParsedBetaMessage<ExtractParsedContentFromBetaParams<Params>>>;\n }\n\n /**\n * Create a Message stream\n */\n stream<Params extends BetaMessageStreamParams>(\n body: Params,\n options?: RequestOptions,\n ): BetaMessageStream<ExtractParsedContentFromBetaParams<Params>> {\n return BetaMessageStream.createMessage(this, body, options);\n }\n\n /**\n * Count the number of tokens in a Message.\n *\n * The Token Count API can be used to count the number of tokens in a Message,\n * including tools, images, and documents, without creating it.\n *\n * Learn more about token counting in our\n * [user guide](https://platform.puku.com/docs/en/build-with-puku/token-counting)\n *\n * @example\n * ```ts\n * const betaMessageTokensCount =\n * await client.beta.messages.countTokens({\n * messages: [{ content: 'Hello, world', role: 'user' }],\n * model: 'puku-ai-2.8,\n * });\n * ```\n */\n countTokens(\n params: MessageCountTokensParams,\n options?: RequestOptions,\n ): APIPromise<BetaMessageTokensCount> {\n // Transform deprecated output_format to output_config.format\n const modifiedParams = transformOutputFormat(params);\n\n const { betas, user_profile_id, ...body } = modifiedParams;\n return this._client.post('/v1/messages/count_tokens?beta=true', {\n body,\n ...options,\n headers: buildHeaders([\n {\n 'puku-beta': [...(betas ?? []), 'token-counting-2024-11-01'].toString(),\n ...(user_profile_id != null ? { 'puku-user-profile-id': user_profile_id } : undefined),\n },\n options?.headers,\n ]),\n });\n }\n\n toolRunner(\n body: BetaToolRunnerParams & { stream?: false },\n options?: BetaToolRunnerRequestOptions,\n ): BetaToolRunner<false>;\n toolRunner(\n body: BetaToolRunnerParams & { stream: true },\n options?: BetaToolRunnerRequestOptions,\n ): BetaToolRunner<true>;\n toolRunner(body: BetaToolRunnerParams, options?: BetaToolRunnerRequestOptions): BetaToolRunner<boolean>;\n toolRunner(body: BetaToolRunnerParams, options?: BetaToolRunnerRequestOptions): BetaToolRunner<boolean> {\n return new BetaToolRunner(this._client as PukuAI, body, options);\n }\n}\n\n/**\n * Transform deprecated output_format to output_config.format\n * Returns a modified copy of the params without mutating the original\n */\nfunction transformOutputFormat<T extends MessageCreateParams | MessageCountTokensParams>(params: T): T {\n if (!params.output_format) {\n return params;\n }\n\n if (params.output_config?.format) {\n throw new PukuError(\n 'Both output_format and output_config.format were provided. ' +\n 'Please use only output_config.format (output_format is deprecated).',\n );\n }\n\n const { output_format, ...rest } = params;\n\n return {\n ...rest,\n output_config: {\n ...params.output_config,\n format: output_format,\n },\n } as T;\n}\n\n/**\n * Token usage for an advisor sub-inference iteration.\n */\nexport interface BetaAdvisorMessageIterationUsage {\n /**\n * Breakdown of cached tokens by TTL\n */\n cache_creation: BetaCacheCreation | null;\n\n /**\n * The number of input tokens used to create the cache entry.\n */\n cache_creation_input_tokens: number;\n\n /**\n * The number of input tokens read from the cache.\n */\n cache_read_input_tokens: number;\n\n /**\n * The number of input tokens which were used.\n */\n input_tokens: number;\n\n /**\n * The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n\n /**\n * The number of output tokens which were used.\n */\n output_tokens: number;\n\n /**\n * Usage for an advisor sub-inference iteration\n */\n type: 'advisor_message';\n}\n\nexport interface BetaAdvisorRedactedResultBlock {\n /**\n * Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect\n * or modify.\n */\n encrypted_content: string;\n\n /**\n * The advisor sub-inference's stop reason (same values as the top-level message\n * `stop_reason`).\n */\n stop_reason: string | null;\n\n type: 'advisor_redacted_result';\n}\n\nexport interface BetaAdvisorRedactedResultBlockParam {\n /**\n * Opaque blob produced by a prior response; must be round-tripped verbatim.\n */\n encrypted_content: string;\n\n type: 'advisor_redacted_result';\n\n stop_reason?: string | null;\n}\n\nexport interface BetaAdvisorResultBlock {\n /**\n * The advisor sub-inference's stop reason (same values as the top-level message\n * `stop_reason`). `max_tokens` indicates the advisor's output was truncated at the\n * tool's `max_tokens` value or the advisor model's policy cap.\n */\n stop_reason: string | null;\n\n text: string;\n\n type: 'advisor_result';\n}\n\nexport interface BetaAdvisorResultBlockParam {\n text: string;\n\n type: 'advisor_result';\n\n stop_reason?: string | null;\n}\n\nexport interface BetaAdvisorTool20260301 {\n /**\n * The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'advisor';\n\n type: 'advisor_20260301';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Caching for the advisor's own prompt. When set, each advisor call writes a cache\n * entry at the given TTL so subsequent calls in the same conversation read the\n * stable prefix. When omitted, the advisor prompt is not cached.\n */\n caching?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Bounds the advisor's total output (thinking + text) per call. When the advisor\n * hits this cap, the returned advisor_result or advisor_redacted_result block\n * carries stop_reason='max_tokens', and a truncation note is appended to the\n * advice text the worker model sees (inside the encrypted blob in redacted mode).\n * When set, the server also emits a remaining-tokens budget block in the advisor's\n * prompt so the advisor self-shapes toward the cap. When omitted, the advisor\n * model's default output cap applies and no budget block is emitted.\n */\n max_tokens?: number | null;\n\n /**\n * Maximum number of times the tool can be used in the API request.\n */\n max_uses?: number | null;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaAdvisorToolResultBlock {\n content: BetaAdvisorToolResultError | BetaAdvisorResultBlock | BetaAdvisorRedactedResultBlock;\n\n tool_use_id: string;\n\n type: 'advisor_tool_result';\n}\n\nexport interface BetaAdvisorToolResultBlockParam {\n content:\n | BetaAdvisorToolResultErrorParam\n | BetaAdvisorResultBlockParam\n | BetaAdvisorRedactedResultBlockParam;\n\n tool_use_id: string;\n\n type: 'advisor_tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\nexport interface BetaAdvisorToolResultError {\n error_code:\n | 'max_uses_exceeded'\n | 'prompt_too_long'\n | 'too_many_requests'\n | 'overloaded'\n | 'unavailable'\n | 'execution_time_exceeded'\n | 'model_not_found';\n\n type: 'advisor_tool_result_error';\n}\n\nexport interface BetaAdvisorToolResultErrorParam {\n error_code:\n | 'max_uses_exceeded'\n | 'prompt_too_long'\n | 'too_many_requests'\n | 'overloaded'\n | 'unavailable'\n | 'execution_time_exceeded'\n | 'model_not_found';\n\n type: 'advisor_tool_result_error';\n}\n\nexport interface BetaAllThinkingTurns {\n type: 'all';\n}\n\nexport type BetaMessageStreamParams = MessageCreateParamsBase;\n\nexport interface BetaBase64ImageSource {\n data: string;\n\n media_type: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp';\n\n type: 'base64';\n}\n\nexport interface BetaBase64PDFSource {\n data: string;\n\n media_type: 'application/pdf';\n\n type: 'base64';\n}\n\nexport interface BetaBashCodeExecutionOutputBlock {\n file_id: string;\n\n type: 'bash_code_execution_output';\n}\n\nexport interface BetaBashCodeExecutionOutputBlockParam {\n file_id: string;\n\n type: 'bash_code_execution_output';\n}\n\nexport interface BetaBashCodeExecutionResultBlock {\n content: Array<BetaBashCodeExecutionOutputBlock>;\n\n return_code: number;\n\n stderr: string;\n\n stdout: string;\n\n type: 'bash_code_execution_result';\n}\n\nexport interface BetaBashCodeExecutionResultBlockParam {\n content: Array<BetaBashCodeExecutionOutputBlockParam>;\n\n return_code: number;\n\n stderr: string;\n\n stdout: string;\n\n type: 'bash_code_execution_result';\n}\n\nexport interface BetaBashCodeExecutionToolResultBlock {\n content: BetaBashCodeExecutionToolResultError | BetaBashCodeExecutionResultBlock;\n\n tool_use_id: string;\n\n type: 'bash_code_execution_tool_result';\n}\n\nexport interface BetaBashCodeExecutionToolResultBlockParam {\n content: BetaBashCodeExecutionToolResultErrorParam | BetaBashCodeExecutionResultBlockParam;\n\n tool_use_id: string;\n\n type: 'bash_code_execution_tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\nexport interface BetaBashCodeExecutionToolResultError {\n error_code:\n | 'invalid_tool_input'\n | 'unavailable'\n | 'too_many_requests'\n | 'execution_time_exceeded'\n | 'output_file_too_large';\n\n type: 'bash_code_execution_tool_result_error';\n}\n\nexport interface BetaBashCodeExecutionToolResultErrorParam {\n error_code:\n | 'invalid_tool_input'\n | 'unavailable'\n | 'too_many_requests'\n | 'execution_time_exceeded'\n | 'output_file_too_large';\n\n type: 'bash_code_execution_tool_result_error';\n}\n\n/**\n * `close_tab`'s config overrides.\n */\nexport interface BetaBrowserCloseTabConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `double_click`'s config overrides.\n */\nexport interface BetaBrowserDoubleClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `file_upload`'s config overrides.\n */\nexport interface BetaBrowserFileUploadConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `find`'s config overrides.\n */\nexport interface BetaBrowserFindConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `form_input`'s config overrides.\n */\nexport interface BetaBrowserFormInputConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `get_page_text`'s config overrides.\n */\nexport interface BetaBrowserGetPageTextConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `hold_key`'s config overrides.\n */\nexport interface BetaBrowserHoldKeyConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `hover`'s config overrides.\n */\nexport interface BetaBrowserHoverConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `javascript_exec`'s config overrides.\n */\nexport interface BetaBrowserJavascriptExecConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `key`'s config overrides.\n */\nexport interface BetaBrowserKeyConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `left_click`'s config overrides.\n */\nexport interface BetaBrowserLeftClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `left_click_drag`'s config overrides.\n */\nexport interface BetaBrowserLeftClickDragConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `left_mouse_down`'s config overrides.\n */\nexport interface BetaBrowserLeftMouseDownConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `left_mouse_up`'s config overrides.\n */\nexport interface BetaBrowserLeftMouseUpConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `list_tabs`'s config overrides.\n */\nexport interface BetaBrowserListTabsConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `middle_click`'s config overrides.\n */\nexport interface BetaBrowserMiddleClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `mouse_move`'s config overrides.\n */\nexport interface BetaBrowserMouseMoveConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `navigate`'s config overrides.\n */\nexport interface BetaBrowserNavigateConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `new_tab`'s config overrides.\n */\nexport interface BetaBrowserNewTabConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `read_console`'s config overrides.\n */\nexport interface BetaBrowserReadConsoleConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `read_network`'s config overrides.\n */\nexport interface BetaBrowserReadNetworkConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `read_page`'s config overrides.\n */\nexport interface BetaBrowserReadPageConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `right_click`'s config overrides.\n */\nexport interface BetaBrowserRightClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `screenshot`'s config overrides.\n */\nexport interface BetaBrowserScreenshotConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `scroll`'s config overrides.\n */\nexport interface BetaBrowserScrollConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `scroll_to`'s config overrides.\n */\nexport interface BetaBrowserScrollToConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * The caller's browser state after a browser toolset member call — the full\n * inventory of open tabs, which tab is active, and any side effects (tabs opened,\n * download state changes) the call produced.\n *\n * At most one per `tool_result`, only on a non-error result answering a browser\n * toolset member `tool_use`. The server renders the model-visible text from it;\n * the model never sees the raw fields.\n */\nexport interface BetaBrowserStateBlockParam {\n /**\n * All tabs open in the browser after this call — the full inventory, not a delta.\n * May be empty. Whenever non-empty, exactly one entry carries `active: true`.\n */\n tabs: Array<BetaBrowserStateTabEntry>;\n\n type: 'browser_state';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Tabs opened and download state changes during this call. \"Nothing to report\" is\n * expressed by omitting the field, never by an empty list.\n */\n state_changes?: Array<BetaBrowserStateChange> | null;\n}\n\n/**\n * A tab this call's execution opened that remains open at its end — the creation\n * delta of the `tabs` inventory, not an event log.\n *\n * Carries only the `tab_id`; the tab's `title` and `url` live on its `tabs` entry,\n * which must include the same `tab_id`. A tab opened during a failed call gets no\n * deferred `tab_opened`; it simply appears in the next result's `tabs` inventory.\n */\nexport type BetaBrowserStateChange =\n | BetaBrowserStateChangeTabOpened\n | BetaBrowserStateChangeDownloadStarted\n | BetaBrowserStateChangeDownloadCompleted\n | BetaBrowserStateChangeDownloadFailed;\n\n/**\n * A file download that finished during this call, reported with the same\n * `download_id` as its `download_started` — or without a prior `download_started`,\n * when the download finished during the call that started it (at most one state\n * change per `download_id` per result).\n */\nexport interface BetaBrowserStateChangeDownloadCompleted {\n /**\n * The caller-assigned identifier for this download, stable across the state\n * changes reporting it.\n */\n download_id: string;\n\n type: 'download_completed';\n\n /**\n * The final post-redirect URL the download was served from.\n */\n url: string;\n\n /**\n * Where the executor saved the file, on the executor's filesystem. Only included\n * when another tool in the same environment can read the file at that path.\n */\n path?: string | null;\n\n /**\n * The completed download's size.\n */\n size_bytes?: number | null;\n}\n\n/**\n * A file download that failed — or was cancelled — during this call.\n */\nexport interface BetaBrowserStateChangeDownloadFailed {\n /**\n * The caller-assigned identifier for this download, stable across the state\n * changes reporting it.\n */\n download_id: string;\n\n type: 'download_failed';\n\n /**\n * The final post-redirect URL the download was served from.\n */\n url: string;\n\n /**\n * The failure or cancellation detail, when known.\n */\n error?: string | null;\n}\n\n/**\n * A file download that started during this call.\n */\nexport interface BetaBrowserStateChangeDownloadStarted {\n /**\n * The caller-assigned identifier for this download, stable across the state\n * changes reporting it.\n */\n download_id: string;\n\n type: 'download_started';\n\n /**\n * The final post-redirect URL the download was served from.\n */\n url: string;\n}\n\n/**\n * A tab this call's execution opened that remains open at its end — the creation\n * delta of the `tabs` inventory, not an event log.\n *\n * Carries only the `tab_id`; the tab's `title` and `url` live on its `tabs` entry,\n * which must include the same `tab_id`. A tab opened during a failed call gets no\n * deferred `tab_opened`; it simply appears in the next result's `tabs` inventory.\n */\nexport interface BetaBrowserStateChangeTabOpened {\n /**\n * The `tab_id` of the opened tab, present in `tabs`.\n */\n tab_id: string;\n\n type: 'tab_opened';\n}\n\n/**\n * One open browser tab reported in a `browser_state` block's `tabs` inventory.\n *\n * `tab_id` is the caller-assigned identifier for the tab; `title` and `url`\n * describe the page the tab is currently showing and may be empty strings (a blank\n * tab legitimately has both empty). `active` marks the tab that is active after\n * this call; whenever `tabs` is non-empty, exactly one entry is marked.\n */\nexport interface BetaBrowserStateTabEntry {\n /**\n * The caller-assigned identifier for this tab, unique within the inventory.\n */\n tab_id: string;\n\n /**\n * The title of the page the tab is showing. May be empty.\n */\n title: string;\n\n /**\n * The URL of the page the tab is showing. May be empty.\n */\n url: string;\n\n /**\n * Whether this tab is the active tab after this call. Whenever `tabs` is\n * non-empty, exactly one entry is marked `active: true`.\n */\n active?: boolean;\n}\n\n/**\n * `switch_tab`'s config overrides.\n */\nexport interface BetaBrowserSwitchTabConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * The browser toolset: a single `tools[]` entry (carrying no `name`) that declares\n * the browser tool family. The model is served the family's tool with any members\n * disabled via `configs` removed from its schema.\n */\nexport interface BetaBrowserToolset20260801 {\n type: 'browser_toolset_20260801';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Per-member configuration for `browser_toolset_20260801`: one optional field per\n * member tool, keyed by the member name — the same name the member's `tool_use`\n * blocks carry. Every member is an accepted key, and a member's defaults apply\n * wherever its key is absent. Unknown keys are rejected: the field set is this\n * toolset version's complete member set.\n */\n configs?: BetaBrowserToolsetConfigs | null;\n}\n\n/**\n * Per-member configuration for `browser_toolset_20260801`: one optional field per\n * member tool, keyed by the member name — the same name the member's `tool_use`\n * blocks carry. Every member is an accepted key, and a member's defaults apply\n * wherever its key is absent. Unknown keys are rejected: the field set is this\n * toolset version's complete member set.\n */\nexport interface BetaBrowserToolsetConfigs {\n /**\n * `close_tab`'s config overrides.\n */\n close_tab?: BetaBrowserCloseTabConfig | null;\n\n /**\n * `double_click`'s config overrides.\n */\n double_click?: BetaBrowserDoubleClickConfig | null;\n\n /**\n * `file_upload`'s config overrides.\n */\n file_upload?: BetaBrowserFileUploadConfig | null;\n\n /**\n * `find`'s config overrides.\n */\n find?: BetaBrowserFindConfig | null;\n\n /**\n * `form_input`'s config overrides.\n */\n form_input?: BetaBrowserFormInputConfig | null;\n\n /**\n * `get_page_text`'s config overrides.\n */\n get_page_text?: BetaBrowserGetPageTextConfig | null;\n\n /**\n * `hold_key`'s config overrides.\n */\n hold_key?: BetaBrowserHoldKeyConfig | null;\n\n /**\n * `hover`'s config overrides.\n */\n hover?: BetaBrowserHoverConfig | null;\n\n /**\n * `javascript_exec`'s config overrides.\n */\n javascript_exec?: BetaBrowserJavascriptExecConfig | null;\n\n /**\n * `key`'s config overrides.\n */\n key?: BetaBrowserKeyConfig | null;\n\n /**\n * `left_click`'s config overrides.\n */\n left_click?: BetaBrowserLeftClickConfig | null;\n\n /**\n * `left_click_drag`'s config overrides.\n */\n left_click_drag?: BetaBrowserLeftClickDragConfig | null;\n\n /**\n * `left_mouse_down`'s config overrides.\n */\n left_mouse_down?: BetaBrowserLeftMouseDownConfig | null;\n\n /**\n * `left_mouse_up`'s config overrides.\n */\n left_mouse_up?: BetaBrowserLeftMouseUpConfig | null;\n\n /**\n * `list_tabs`'s config overrides.\n */\n list_tabs?: BetaBrowserListTabsConfig | null;\n\n /**\n * `middle_click`'s config overrides.\n */\n middle_click?: BetaBrowserMiddleClickConfig | null;\n\n /**\n * `mouse_move`'s config overrides.\n */\n mouse_move?: BetaBrowserMouseMoveConfig | null;\n\n /**\n * `navigate`'s config overrides.\n */\n navigate?: BetaBrowserNavigateConfig | null;\n\n /**\n * `new_tab`'s config overrides.\n */\n new_tab?: BetaBrowserNewTabConfig | null;\n\n /**\n * `read_console`'s config overrides.\n */\n read_console?: BetaBrowserReadConsoleConfig | null;\n\n /**\n * `read_network`'s config overrides.\n */\n read_network?: BetaBrowserReadNetworkConfig | null;\n\n /**\n * `read_page`'s config overrides.\n */\n read_page?: BetaBrowserReadPageConfig | null;\n\n /**\n * `right_click`'s config overrides.\n */\n right_click?: BetaBrowserRightClickConfig | null;\n\n /**\n * `screenshot`'s config overrides.\n */\n screenshot?: BetaBrowserScreenshotConfig | null;\n\n /**\n * `scroll`'s config overrides.\n */\n scroll?: BetaBrowserScrollConfig | null;\n\n /**\n * `scroll_to`'s config overrides.\n */\n scroll_to?: BetaBrowserScrollToConfig | null;\n\n /**\n * `switch_tab`'s config overrides.\n */\n switch_tab?: BetaBrowserSwitchTabConfig | null;\n\n /**\n * `triple_click`'s config overrides.\n */\n triple_click?: BetaBrowserTripleClickConfig | null;\n\n /**\n * `type`'s config overrides.\n */\n type?: BetaBrowserTypeConfig | null;\n\n /**\n * `wait`'s config overrides.\n */\n wait?: BetaBrowserWaitConfig | null;\n\n /**\n * `zoom`'s config overrides.\n */\n zoom?: BetaBrowserZoomConfig | null;\n}\n\n/**\n * `triple_click`'s config overrides.\n */\nexport interface BetaBrowserTripleClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `type`'s config overrides.\n */\nexport interface BetaBrowserTypeConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `wait`'s config overrides.\n */\nexport interface BetaBrowserWaitConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `zoom`'s config overrides.\n */\nexport interface BetaBrowserZoomConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\nexport interface BetaCacheControlEphemeral {\n type: 'ephemeral';\n\n /**\n * The time-to-live for the cache control breakpoint.\n *\n * This may be one the following values:\n *\n * - `5m`: 5 minutes\n * - `1h`: 1 hour\n *\n * Defaults to `5m`. See\n * [prompt caching pricing](https://platform.puku.com/docs/en/build-with-puku/prompt-caching)\n * for details.\n */\n ttl?: '5m' | '1h';\n}\n\nexport interface BetaCacheCreation {\n /**\n * The number of input tokens used to create the 1 hour cache entry.\n */\n ephemeral_1h_input_tokens: number;\n\n /**\n * The number of input tokens used to create the 5 minute cache entry.\n */\n ephemeral_5m_input_tokens: number;\n}\n\nexport interface BetaCacheMissMessagesChanged {\n /**\n * Approximate number of input tokens that would have been read from cache had the\n * prefix matched the previous request.\n */\n cache_missed_input_tokens: number;\n\n type: 'messages_changed';\n}\n\nexport interface BetaCacheMissModelChanged {\n /**\n * Approximate number of input tokens that would have been read from cache had the\n * prefix matched the previous request.\n */\n cache_missed_input_tokens: number;\n\n type: 'model_changed';\n}\n\nexport interface BetaCacheMissPreviousMessageNotFound {\n type: 'previous_message_not_found';\n}\n\nexport interface BetaCacheMissSystemChanged {\n /**\n * Approximate number of input tokens that would have been read from cache had the\n * prefix matched the previous request.\n */\n cache_missed_input_tokens: number;\n\n type: 'system_changed';\n}\n\nexport interface BetaCacheMissToolsChanged {\n /**\n * Approximate number of input tokens that would have been read from cache had the\n * prefix matched the previous request.\n */\n cache_missed_input_tokens: number;\n\n type: 'tools_changed';\n}\n\nexport interface BetaCacheMissUnavailable {\n type: 'unavailable';\n}\n\nexport interface BetaCitationCharLocation {\n cited_text: string;\n\n document_index: number;\n\n document_title: string | null;\n\n end_char_index: number;\n\n file_id: string | null;\n\n start_char_index: number;\n\n type: 'char_location';\n}\n\nexport interface BetaCitationCharLocationParam {\n cited_text: string;\n\n document_index: number;\n\n document_title: string | null;\n\n end_char_index: number;\n\n start_char_index: number;\n\n type: 'char_location';\n}\n\nexport interface BetaCitationConfig {\n enabled: boolean;\n}\n\nexport interface BetaCitationContentBlockLocation {\n /**\n * The full text of the cited block range, concatenated.\n *\n * Always equals the contents of `content[start_block_index:end_block_index]`\n * joined together. The text block is the minimal citable unit; this field is never\n * a substring of a single block. Not counted toward output tokens, and not counted\n * toward input tokens when sent back in subsequent turns.\n */\n cited_text: string;\n\n document_index: number;\n\n document_title: string | null;\n\n /**\n * Exclusive 0-based end index of the cited block range in the source's `content`\n * array.\n *\n * Always greater than `start_block_index`; a single-block citation has\n * `end_block_index = start_block_index + 1`.\n */\n end_block_index: number;\n\n file_id: string | null;\n\n /**\n * 0-based index of the first cited block in the source's `content` array.\n */\n start_block_index: number;\n\n type: 'content_block_location';\n}\n\nexport interface BetaCitationContentBlockLocationParam {\n /**\n * The full text of the cited block range, concatenated.\n *\n * Always equals the contents of `content[start_block_index:end_block_index]`\n * joined together. The text block is the minimal citable unit; this field is never\n * a substring of a single block. Not counted toward output tokens, and not counted\n * toward input tokens when sent back in subsequent turns.\n */\n cited_text: string;\n\n document_index: number;\n\n document_title: string | null;\n\n /**\n * Exclusive 0-based end index of the cited block range in the source's `content`\n * array.\n *\n * Always greater than `start_block_index`; a single-block citation has\n * `end_block_index = start_block_index + 1`.\n */\n end_block_index: number;\n\n /**\n * 0-based index of the first cited block in the source's `content` array.\n */\n start_block_index: number;\n\n type: 'content_block_location';\n}\n\nexport interface BetaCitationPageLocation {\n cited_text: string;\n\n document_index: number;\n\n document_title: string | null;\n\n end_page_number: number;\n\n file_id: string | null;\n\n start_page_number: number;\n\n type: 'page_location';\n}\n\nexport interface BetaCitationPageLocationParam {\n cited_text: string;\n\n document_index: number;\n\n document_title: string | null;\n\n end_page_number: number;\n\n start_page_number: number;\n\n type: 'page_location';\n}\n\nexport interface BetaCitationSearchResultLocation {\n /**\n * The full text of the cited block range, concatenated.\n *\n * Always equals the contents of `content[start_block_index:end_block_index]`\n * joined together. The text block is the minimal citable unit; this field is never\n * a substring of a single block. Not counted toward output tokens, and not counted\n * toward input tokens when sent back in subsequent turns.\n */\n cited_text: string;\n\n /**\n * Exclusive 0-based end index of the cited block range in the source's `content`\n * array.\n *\n * Always greater than `start_block_index`; a single-block citation has\n * `end_block_index = start_block_index + 1`.\n */\n end_block_index: number;\n\n /**\n * 0-based index of the cited search result among all `search_result` content\n * blocks in the request, in the order they appear across messages and tool\n * results.\n *\n * Counted separately from `document_index`; server-side web search results are not\n * included in this count.\n */\n search_result_index: number;\n\n source: string;\n\n /**\n * 0-based index of the first cited block in the source's `content` array.\n */\n start_block_index: number;\n\n title: string | null;\n\n type: 'search_result_location';\n}\n\nexport interface BetaCitationSearchResultLocationParam {\n /**\n * The full text of the cited block range, concatenated.\n *\n * Always equals the contents of `content[start_block_index:end_block_index]`\n * joined together. The text block is the minimal citable unit; this field is never\n * a substring of a single block. Not counted toward output tokens, and not counted\n * toward input tokens when sent back in subsequent turns.\n */\n cited_text: string;\n\n /**\n * Exclusive 0-based end index of the cited block range in the source's `content`\n * array.\n *\n * Always greater than `start_block_index`; a single-block citation has\n * `end_block_index = start_block_index + 1`.\n */\n end_block_index: number;\n\n /**\n * 0-based index of the cited search result among all `search_result` content\n * blocks in the request, in the order they appear across messages and tool\n * results.\n *\n * Counted separately from `document_index`; server-side web search results are not\n * included in this count.\n */\n search_result_index: number;\n\n source: string;\n\n /**\n * 0-based index of the first cited block in the source's `content` array.\n */\n start_block_index: number;\n\n title: string | null;\n\n type: 'search_result_location';\n}\n\nexport interface BetaCitationWebSearchResultLocationParam {\n cited_text: string;\n\n encrypted_index: string;\n\n title: string | null;\n\n type: 'web_search_result_location';\n\n url: string;\n}\n\nexport interface BetaCitationsConfigParam {\n enabled?: boolean;\n}\n\nexport interface BetaCitationsDelta {\n citation:\n | BetaCitationCharLocation\n | BetaCitationPageLocation\n | BetaCitationContentBlockLocation\n | BetaCitationsWebSearchResultLocation\n | BetaCitationSearchResultLocation;\n\n type: 'citations_delta';\n}\n\nexport interface BetaCitationsWebSearchResultLocation {\n cited_text: string;\n\n encrypted_index: string;\n\n title: string | null;\n\n type: 'web_search_result_location';\n\n url: string;\n}\n\nexport interface BetaClearThinking20251015Edit {\n type: 'clear_thinking_20251015';\n\n /**\n * Number of most recent assistant turns to keep thinking blocks for. Older turns\n * will have their thinking blocks removed.\n */\n keep?: BetaThinkingTurns | BetaAllThinkingTurns | 'all';\n}\n\nexport interface BetaClearThinking20251015EditResponse {\n /**\n * Number of input tokens cleared by this edit.\n */\n cleared_input_tokens: number;\n\n /**\n * Number of thinking turns that were cleared.\n */\n cleared_thinking_turns: number;\n\n /**\n * The type of context management edit applied.\n */\n type: 'clear_thinking_20251015';\n}\n\nexport interface BetaClearToolUses20250919Edit {\n type: 'clear_tool_uses_20250919';\n\n /**\n * Minimum number of tokens that must be cleared when triggered. Context will only\n * be modified if at least this many tokens can be removed.\n */\n clear_at_least?: BetaInputTokensClearAtLeast | null;\n\n /**\n * Whether to clear all tool inputs (bool) or specific tool inputs to clear (list)\n */\n clear_tool_inputs?: boolean | Array<string> | null;\n\n /**\n * Tool names whose uses are preserved from clearing\n */\n exclude_tools?: Array<string> | null;\n\n /**\n * Number of tool uses to retain in the conversation\n */\n keep?: BetaToolUsesKeep;\n\n /**\n * Condition that triggers the context management strategy\n */\n trigger?: BetaInputTokensTrigger | BetaToolUsesTrigger;\n}\n\nexport interface BetaClearToolUses20250919EditResponse {\n /**\n * Number of input tokens cleared by this edit.\n */\n cleared_input_tokens: number;\n\n /**\n * Number of tool uses that were cleared.\n */\n cleared_tool_uses: number;\n\n /**\n * The type of context management edit applied.\n */\n type: 'clear_tool_uses_20250919';\n}\n\nexport interface BetaCodeExecutionOutputBlock {\n file_id: string;\n\n type: 'code_execution_output';\n}\n\nexport interface BetaCodeExecutionOutputBlockParam {\n file_id: string;\n\n type: 'code_execution_output';\n}\n\nexport interface BetaCodeExecutionResultBlock {\n content: Array<BetaCodeExecutionOutputBlock>;\n\n return_code: number;\n\n stderr: string;\n\n stdout: string;\n\n type: 'code_execution_result';\n}\n\nexport interface BetaCodeExecutionResultBlockParam {\n content: Array<BetaCodeExecutionOutputBlockParam>;\n\n return_code: number;\n\n stderr: string;\n\n stdout: string;\n\n type: 'code_execution_result';\n}\n\nexport interface BetaCodeExecutionTool20250522 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'code_execution';\n\n type: 'code_execution_20250522';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaCodeExecutionTool20250825 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'code_execution';\n\n type: 'code_execution_20250825';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\n/**\n * Code execution tool with REPL state persistence (daemon mode + gVisor\n * checkpoint).\n */\nexport interface BetaCodeExecutionTool20260120 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'code_execution';\n\n type: 'code_execution_20260120';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\n/**\n * Code execution tool with REPL state persistence.\n */\nexport interface BetaCodeExecutionTool20260521 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'code_execution';\n\n type: 'code_execution_20260521';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaCodeExecutionToolResultBlock {\n /**\n * Code execution result with encrypted stdout for PFC + web_search results.\n */\n content: BetaCodeExecutionToolResultBlockContent;\n\n tool_use_id: string;\n\n type: 'code_execution_tool_result';\n}\n\n/**\n * Code execution result with encrypted stdout for PFC + web_search results.\n */\nexport type BetaCodeExecutionToolResultBlockContent =\n | BetaCodeExecutionToolResultError\n | BetaCodeExecutionResultBlock\n | BetaEncryptedCodeExecutionResultBlock;\n\nexport interface BetaCodeExecutionToolResultBlockParam {\n /**\n * Code execution result with encrypted stdout for PFC + web_search results.\n */\n content: BetaCodeExecutionToolResultBlockParamContent;\n\n tool_use_id: string;\n\n type: 'code_execution_tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\n/**\n * Code execution result with encrypted stdout for PFC + web_search results.\n */\nexport type BetaCodeExecutionToolResultBlockParamContent =\n | BetaCodeExecutionToolResultErrorParam\n | BetaCodeExecutionResultBlockParam\n | BetaEncryptedCodeExecutionResultBlockParam;\n\nexport interface BetaCodeExecutionToolResultError {\n error_code: BetaCodeExecutionToolResultErrorCode;\n\n type: 'code_execution_tool_result_error';\n}\n\nexport type BetaCodeExecutionToolResultErrorCode =\n | 'invalid_tool_input'\n | 'unavailable'\n | 'too_many_requests'\n | 'execution_time_exceeded';\n\nexport interface BetaCodeExecutionToolResultErrorParam {\n error_code: BetaCodeExecutionToolResultErrorCode;\n\n type: 'code_execution_tool_result_error';\n}\n\n/**\n * Automatically compact older context when reaching the configured trigger\n * threshold.\n */\nexport interface BetaCompact20260112Edit {\n type: 'compact_20260112';\n\n /**\n * Additional instructions for summarization.\n */\n instructions?: string | null;\n\n /**\n * Whether to pause after compaction and return the compaction block to the user.\n */\n pause_after_compaction?: boolean;\n\n /**\n * When to trigger compaction. Defaults to 150000 input tokens.\n */\n trigger?: BetaInputTokensTrigger | null;\n}\n\n/**\n * A compaction block returned when autocompact is triggered.\n *\n * When content is None, it indicates the compaction failed to produce a valid\n * summary (e.g., malformed output from the model). Clients may round-trip\n * compaction blocks with null content; the server treats them as no-ops.\n */\nexport interface BetaCompactionBlock {\n /**\n * Summary of compacted content, or null if compaction failed\n */\n content: string | null;\n\n /**\n * Opaque metadata from prior compaction, to be round-tripped verbatim\n */\n encrypted_content: string | null;\n\n type: 'compaction';\n}\n\n/**\n * A compaction block containing summary of previous context.\n *\n * Users should round-trip these blocks from responses to subsequent requests to\n * maintain context across compaction boundaries.\n *\n * When content is None, the block represents a failed compaction. The server\n * treats these as no-ops. Empty string content is not allowed.\n */\nexport interface BetaCompactionBlockParam {\n type: 'compaction';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Summary of previously compacted content, or null if compaction failed\n */\n content?: string | null;\n\n /**\n * Opaque metadata from prior compaction, to be round-tripped verbatim\n */\n encrypted_content?: string | null;\n}\n\nexport interface BetaCompactionContentBlockDelta {\n content: string | null;\n\n /**\n * Opaque metadata from prior compaction, to be round-tripped verbatim\n */\n encrypted_content: string | null;\n\n type: 'compaction_delta';\n}\n\n/**\n * Token usage for a compaction iteration.\n */\nexport interface BetaCompactionIterationUsage {\n /**\n * Breakdown of cached tokens by TTL\n */\n cache_creation: BetaCacheCreation | null;\n\n /**\n * The number of input tokens used to create the cache entry.\n */\n cache_creation_input_tokens: number;\n\n /**\n * The number of input tokens read from the cache.\n */\n cache_read_input_tokens: number;\n\n /**\n * The number of input tokens which were used.\n */\n input_tokens: number;\n\n /**\n * The number of output tokens which were used.\n */\n output_tokens: number;\n\n /**\n * Usage for a compaction iteration\n */\n type: 'compaction';\n}\n\n/**\n * `cursor_position`'s config overrides.\n */\nexport interface BetaComputerCursorPositionConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `double_click`'s config overrides.\n */\nexport interface BetaComputerDoubleClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `hold_key`'s config overrides.\n */\nexport interface BetaComputerHoldKeyConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `key`'s config overrides.\n */\nexport interface BetaComputerKeyConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `left_click`'s config overrides.\n */\nexport interface BetaComputerLeftClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `left_click_drag`'s config overrides.\n */\nexport interface BetaComputerLeftClickDragConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `left_mouse_down`'s config overrides.\n */\nexport interface BetaComputerLeftMouseDownConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `left_mouse_up`'s config overrides.\n */\nexport interface BetaComputerLeftMouseUpConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `middle_click`'s config overrides.\n */\nexport interface BetaComputerMiddleClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `mouse_move`'s config overrides.\n */\nexport interface BetaComputerMouseMoveConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `right_click`'s config overrides.\n */\nexport interface BetaComputerRightClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `screenshot`'s config overrides.\n */\nexport interface BetaComputerScreenshotConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `scroll`'s config overrides.\n */\nexport interface BetaComputerScrollConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * The computer toolset: a single `tools[]` entry (carrying no `name`) that\n * declares the computer tool family. The model is served the family's tool with\n * any members disabled via `configs` removed from its schema. Every member is\n * enabled by default, zoom included. The single-tool options `display_number` and\n * `enable_zoom` are not fields of a toolset entry — it carries only `type`,\n * `configs`, and `cache_control`; zoom is controlled via `configs.zoom.enabled`.\n */\nexport interface BetaComputerToolset20260801 {\n type: 'computer_toolset_20260801';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Per-member configuration for `computer_toolset_20260801`: one optional field per\n * member tool, keyed by the member name — the same name the member's `tool_use`\n * blocks carry. Every member is an accepted key, and a member's defaults apply\n * wherever its key is absent. Unknown keys are rejected: the field set is this\n * toolset version's complete member set.\n */\n configs?: BetaComputerToolsetConfigs | null;\n}\n\n/**\n * Per-member configuration for `computer_toolset_20260801`: one optional field per\n * member tool, keyed by the member name — the same name the member's `tool_use`\n * blocks carry. Every member is an accepted key, and a member's defaults apply\n * wherever its key is absent. Unknown keys are rejected: the field set is this\n * toolset version's complete member set.\n */\nexport interface BetaComputerToolsetConfigs {\n /**\n * `cursor_position`'s config overrides.\n */\n cursor_position?: BetaComputerCursorPositionConfig | null;\n\n /**\n * `double_click`'s config overrides.\n */\n double_click?: BetaComputerDoubleClickConfig | null;\n\n /**\n * `hold_key`'s config overrides.\n */\n hold_key?: BetaComputerHoldKeyConfig | null;\n\n /**\n * `key`'s config overrides.\n */\n key?: BetaComputerKeyConfig | null;\n\n /**\n * `left_click`'s config overrides.\n */\n left_click?: BetaComputerLeftClickConfig | null;\n\n /**\n * `left_click_drag`'s config overrides.\n */\n left_click_drag?: BetaComputerLeftClickDragConfig | null;\n\n /**\n * `left_mouse_down`'s config overrides.\n */\n left_mouse_down?: BetaComputerLeftMouseDownConfig | null;\n\n /**\n * `left_mouse_up`'s config overrides.\n */\n left_mouse_up?: BetaComputerLeftMouseUpConfig | null;\n\n /**\n * `middle_click`'s config overrides.\n */\n middle_click?: BetaComputerMiddleClickConfig | null;\n\n /**\n * `mouse_move`'s config overrides.\n */\n mouse_move?: BetaComputerMouseMoveConfig | null;\n\n /**\n * `right_click`'s config overrides.\n */\n right_click?: BetaComputerRightClickConfig | null;\n\n /**\n * `screenshot`'s config overrides.\n */\n screenshot?: BetaComputerScreenshotConfig | null;\n\n /**\n * `scroll`'s config overrides.\n */\n scroll?: BetaComputerScrollConfig | null;\n\n /**\n * `triple_click`'s config overrides.\n */\n triple_click?: BetaComputerTripleClickConfig | null;\n\n /**\n * `type`'s config overrides.\n */\n type?: BetaComputerTypeConfig | null;\n\n /**\n * `wait`'s config overrides.\n */\n wait?: BetaComputerWaitConfig | null;\n\n /**\n * `zoom`'s config overrides.\n */\n zoom?: BetaComputerZoomConfig | null;\n}\n\n/**\n * `triple_click`'s config overrides.\n */\nexport interface BetaComputerTripleClickConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `type`'s config overrides.\n */\nexport interface BetaComputerTypeConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `wait`'s config overrides.\n */\nexport interface BetaComputerWaitConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * `zoom`'s config overrides.\n */\nexport interface BetaComputerZoomConfig {\n /**\n * Defer loading for this member. Must resolve to the same value on every enabled\n * member of the toolset.\n */\n defer_loading?: boolean | null;\n\n /**\n * Whether this member is offered to the model. Default is per member, per the\n * toolset's documentation. A member whose enabled resolves false is withheld from\n * the served schema.\n */\n enabled?: boolean | null;\n}\n\n/**\n * Information about the container used in the request (for the code execution\n * tool)\n */\nexport interface BetaContainer {\n /**\n * Identifier for the container used in this request\n */\n id: string;\n\n /**\n * The time at which the container will expire.\n */\n expires_at: string;\n\n /**\n * Skills loaded in the container\n */\n skills: Array<BetaContainerSkill> | null;\n}\n\n/**\n * Container parameters with skills to be loaded.\n */\nexport interface BetaContainerParams {\n /**\n * Container id\n */\n id?: string | null;\n\n /**\n * List of skills to load in the container\n */\n skills?: Array<BetaSkillParams> | null;\n}\n\n/**\n * A skill that was loaded in a container (response model).\n */\nexport interface BetaContainerSkill {\n /**\n * Skill ID\n */\n skill_id: string;\n\n /**\n * Type of skill - either 'puku' (built-in) or 'custom' (user-defined)\n */\n type: 'puku' | 'custom';\n\n /**\n * The resolved version: a skill version ID for custom skills.\n */\n version: string;\n}\n\n/**\n * Response model for a file uploaded to the container.\n */\nexport interface BetaContainerUploadBlock {\n file_id: string;\n\n type: 'container_upload';\n}\n\n/**\n * A content block that represents a file to be uploaded to the container Files\n * uploaded via this block will be available in the container's input directory.\n */\nexport interface BetaContainerUploadBlockParam {\n file_id: string;\n\n type: 'container_upload';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\n/**\n * Response model for a file uploaded to the container.\n */\nexport type BetaContentBlock =\n | BetaTextBlock\n | BetaThinkingBlock\n | BetaRedactedThinkingBlock\n | BetaToolUseBlock\n | BetaServerToolUseBlock\n | BetaWebSearchToolResultBlock\n | BetaWebFetchToolResultBlock\n | BetaAdvisorToolResultBlock\n | BetaCodeExecutionToolResultBlock\n | BetaBashCodeExecutionToolResultBlock\n | BetaTextEditorCodeExecutionToolResultBlock\n | BetaToolSearchToolResultBlock\n | BetaMCPToolUseBlock\n | BetaMCPToolResultBlock\n | BetaContainerUploadBlock\n | BetaCompactionBlock\n | BetaFallbackBlock;\n\n/**\n * Regular text content.\n */\nexport type BetaContentBlockParam =\n | BetaTextBlockParam\n | BetaImageBlockParam\n | BetaRequestDocumentBlock\n | BetaSearchResultBlockParam\n | BetaThinkingBlockParam\n | BetaRedactedThinkingBlockParam\n | BetaToolUseBlockParam\n | BetaToolResultBlockParam\n | BetaServerToolUseBlockParam\n | BetaWebSearchToolResultBlockParam\n | BetaWebFetchToolResultBlockParam\n | BetaAdvisorToolResultBlockParam\n | BetaCodeExecutionToolResultBlockParam\n | BetaBashCodeExecutionToolResultBlockParam\n | BetaTextEditorCodeExecutionToolResultBlockParam\n | BetaToolSearchToolResultBlockParam\n | BetaMCPToolUseBlockParam\n | BetaRequestMCPToolResultBlockParam\n | BetaContainerUploadBlockParam\n | BetaCompactionBlockParam\n | BetaRequestToolAdditionBlock\n | BetaRequestToolRemovalBlock\n | BetaFallbackBlockParam;\n\nexport interface BetaContentBlockSource {\n content: string | Array<BetaContentBlockSourceContent>;\n\n type: 'content';\n}\n\nexport type BetaContentBlockSourceContent = BetaTextBlockParam | BetaImageBlockParam;\n\nexport interface BetaContextManagementConfig {\n /**\n * List of context management edits to apply\n */\n edits?: Array<BetaClearToolUses20250919Edit | BetaClearThinking20251015Edit | BetaCompact20260112Edit>;\n}\n\nexport interface BetaContextManagementResponse {\n /**\n * List of context management edits that were applied.\n */\n applied_edits: Array<BetaClearToolUses20250919EditResponse | BetaClearThinking20251015EditResponse>;\n}\n\nexport interface BetaCountTokensContextManagementResponse {\n /**\n * The original token count before context management was applied\n */\n original_input_tokens: number;\n}\n\n/**\n * Response envelope for request-level diagnostics. Present (possibly null)\n * whenever the caller supplied `diagnostics` on the request.\n */\nexport interface BetaDiagnostics {\n /**\n * Explains why the prompt cache could not fully reuse the prefix from the request\n * identified by `diagnostics.previous_message_id`. `null` means diagnosis is still\n * pending — the response was serialized before the background comparison\n * completed.\n */\n cache_miss_reason:\n | BetaCacheMissModelChanged\n | BetaCacheMissSystemChanged\n | BetaCacheMissToolsChanged\n | BetaCacheMissMessagesChanged\n | BetaCacheMissPreviousMessageNotFound\n | BetaCacheMissUnavailable\n | null;\n}\n\n/**\n * Request-level diagnostics. Currently carries the previous response id for\n * prompt-cache divergence reporting.\n */\nexport interface BetaDiagnosticsParam {\n /**\n * The `id` (`msg_...`) from this client's previous /v1/messages response. The\n * server compares that request's prompt fingerprint against this one and returns\n * `diagnostics.cache_miss_reason` when the prompt-cache prefix could not be\n * reused. Pass `null` on the first turn to opt in without a prior message to\n * compare.\n */\n previous_message_id?: string | null;\n}\n\n/**\n * Tool invocation directly from the model.\n */\nexport interface BetaDirectCaller {\n type: 'direct';\n}\n\nexport interface BetaDocumentBlock {\n /**\n * Citation configuration for the document\n */\n citations: BetaCitationConfig | null;\n\n source: BetaBase64PDFSource | BetaPlainTextSource;\n\n /**\n * The title of the document\n */\n title: string | null;\n\n type: 'document';\n}\n\n/**\n * Code execution result with encrypted stdout for PFC + web_search results.\n */\nexport interface BetaEncryptedCodeExecutionResultBlock {\n content: Array<BetaCodeExecutionOutputBlock>;\n\n encrypted_stdout: string;\n\n return_code: number;\n\n stderr: string;\n\n type: 'encrypted_code_execution_result';\n}\n\n/**\n * Code execution result with encrypted stdout for PFC + web_search results.\n */\nexport interface BetaEncryptedCodeExecutionResultBlockParam {\n content: Array<BetaCodeExecutionOutputBlockParam>;\n\n encrypted_stdout: string;\n\n return_code: number;\n\n stderr: string;\n\n type: 'encrypted_code_execution_result';\n}\n\n/**\n * Marks the point in `content` where one model's output gives way to the next.\n *\n * One block appears per hop where a preceding model actually ran this turn and\n * declined. A turn where no preceding model ran and declined has no such boundary\n * and carries no block — the signal for whether a fallback model served the\n * response is the presence of a `fallback_message` entry in `usage.iterations`,\n * not this block.\n *\n * The block is treated like a server-tool content block for streaming: it arrives\n * via the standard `content_block_start` / `content_block_stop` pair and carries\n * no deltas.\n */\nexport interface BetaFallbackBlock {\n /**\n * The model whose output ends at this point — the model that declined at this hop.\n * When the declining hop is the requested model, its `model` echoes the top-level\n * `model` string the caller sent (alias or canonical); when the declining hop is a\n * fallback model, its `model` is that model's canonical id.\n */\n from: BetaFallbackInfo;\n\n /**\n * The fallback model producing the content that follows this block. Its `model` is\n * always the canonical id.\n */\n to: BetaFallbackInfo;\n\n /**\n * What caused the `from` model to hand over at this hop.\n */\n trigger: BetaFallbackRefusalTrigger;\n\n type: 'fallback';\n}\n\n/**\n * A `fallback` block echoed back from a prior response.\n *\n * Accepted in `messages[].content` and not rendered into the prompt; not validated\n * against the request's `fallbacks` chain or top-level `model`.\n *\n * Echo the assistant turn back verbatim, including this block in its original\n * position. The block marks the boundary between content produced before and after\n * a fallback hop, and the server relies on that boundary to validate the turn:\n * when thinking runs flank the boundary, omitting the block merges them into one\n * span the server cannot validate (the request is rejected), and moving it into\n * the middle of a single run is likewise rejected; between non-thinking blocks the\n * block's placement has no validation effect.\n */\nexport interface BetaFallbackBlockParam {\n /**\n * Identifies one hop of a fallback transition.\n */\n from: BetaFallbackInfoParam;\n\n /**\n * Identifies one hop of a fallback transition.\n */\n to: BetaFallbackInfoParam;\n\n type: 'fallback';\n\n /**\n * The response block's `trigger`, echoed verbatim. Accepted and ignored by the\n * server; any object or `null` is allowed.\n */\n trigger?: unknown;\n}\n\n/**\n * No reprice was applied; `reason` says why.\n */\nexport interface BetaFallbackCreditNotApplied {\n /**\n * Why the reprice was not applied.\n *\n * A closed enum; additions to the redemption-check vocabulary arrive as deliberate\n * schema updates.\n */\n reason:\n | 'body_mismatch'\n | 'continuation_excluded'\n | 'continuation_only'\n | 'expired'\n | 'invalid_target_model'\n | 'not_enabled'\n | 'reprice_unavailable'\n | 'temporarily_unavailable'\n | 'variant_fields_present'\n | 'wrong_organization'\n | 'wrong_platform'\n | 'wrong_workspace';\n\n type: 'not_applied';\n\n /**\n * Request fields to remove before retrying, so the retry can redeem this token.\n *\n * Present exactly when `reason` is `variant_fields_present` — never null, never an\n * empty array; absent otherwise. Fields are named only from your own request, and\n * only after the sealed variant hash matched. A served best-effort retry has\n * already been billed at normal price; nothing redeems retroactively, but a\n * corrected re-send inside the token's five-minute window can still redeem.\n */\n remove_to_redeem?: Array<string> | null;\n}\n\n/**\n * The reprice was applied: the retry is billed as if the conversation had been on\n * the retry model all along.\n */\nexport interface BetaFallbackCreditRedeemed {\n type: 'redeemed';\n}\n\n/**\n * Object form of `fallback_credit_token`: the token plus a redemption mode.\n *\n * Requires `puku-beta: fallback-credit-2026-07-01`; without that header the\n * field accepts the bare string only. The bare string and the mode-less object are\n * equivalent (both select `strict`), so wrapping an existing token changes nothing\n * by itself.\n */\nexport interface BetaFallbackCreditTokenParam {\n /**\n * The opaque `fallback_credit_token` from a prior refusal's `stop_details` — the\n * same string the bare-string form carries.\n */\n token: string;\n\n /**\n * How a failing token affects the retry. `strict` (the default, and the\n * bare-string behavior): a failing redemption is a 400 and the retry is not\n * served. `best_effort`: the retry is served either way — a token-layer failure no\n * longer rejects the request; the retry proceeds at normal price and the outcome\n * is reported on the response's `usage.fallback_credit`. Two failures stay hard in\n * both modes: a malformed token, and combining `fallback_credit_token` with\n * `fallbacks`.\n */\n mode?: 'strict' | 'best_effort';\n}\n\n/**\n * Outcome of the `fallback_credit_token` presented on this request.\n */\nexport interface BetaFallbackCreditUsage {\n /**\n * Whether the fallback-credit reprice was applied to this response's billing.\n *\n * A union discriminated on `type`. `redeemed`: the retry is billed as if the\n * conversation had been on the retry model all along — including when the\n * resulting shift is zero because there was nothing to move. `not_applied`: no\n * reprice was applied; the arm's `reason` says why.\n */\n status: BetaFallbackCreditRedeemed | BetaFallbackCreditNotApplied;\n}\n\n/**\n * Identifies one hop of a fallback transition.\n */\nexport interface BetaFallbackInfo {\n /**\n * The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n}\n\n/**\n * Identifies one hop of a fallback transition.\n */\nexport interface BetaFallbackInfoParam {\n /**\n * The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n}\n\n/**\n * Token usage for the fallback-model attempt of a server-side fallback request.\n *\n * Produced in place of a `message` entry for whichever hop served the response. A\n * declined hop produces the existing `message` entry. Whether a fallback model\n * served the response is signalled by the presence of this entry in\n * `usage.iterations`.\n */\nexport interface BetaFallbackMessageIterationUsage {\n /**\n * Breakdown of cached tokens by TTL\n */\n cache_creation: BetaCacheCreation | null;\n\n /**\n * The number of input tokens used to create the cache entry.\n */\n cache_creation_input_tokens: number;\n\n /**\n * The number of input tokens read from the cache.\n */\n cache_read_input_tokens: number;\n\n /**\n * The number of input tokens which were used.\n */\n input_tokens: number;\n\n /**\n * The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n\n /**\n * The number of output tokens which were used.\n */\n output_tokens: number;\n\n /**\n * Usage for the fallback-model attempt that served the response\n */\n type: 'fallback_message';\n}\n\n/**\n * One entry in the `fallbacks` chain on a `/v1/messages` request.\n *\n * `model` is required. The override fields (`max_tokens`, `thinking`,\n * `output_config`, and `speed`) set the corresponding parameter for this attempt\n * only and are validated as if the request were made to `model`. Any other key is\n * rejected at parse time.\n */\nexport interface BetaFallbackParam {\n /**\n * The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n\n max_tokens?: number | null;\n\n output_config?: BetaOutputConfig | null;\n\n /**\n * Inference speed mode. `fast` provides significantly faster output token\n * generation at premium pricing. Not all models support `fast`; invalid\n * combinations are rejected at create time.\n */\n speed?: 'standard' | 'fast' | null;\n\n thinking?: BetaThinkingConfigEnabled | BetaThinkingConfigDisabled | BetaThinkingConfigAdaptive | null;\n\n [k: string]: unknown;\n}\n\n/**\n * The `from` model declined for policy reasons.\n */\nexport interface BetaFallbackRefusalTrigger {\n /**\n * The policy category that triggered a refusal.\n *\n * - `cyber` - The request could enable cyber harm, such as malware or exploit\n * development. Benign cybersecurity work can also trigger this category.\n * - `bio` - The request could enable biological harm, such as dangerous lab\n * methods. Beneficial life sciences work can also trigger this category.\n * - `frontier_llm` - The request could assist the development of competing AI\n * models, which is restricted under\n * [PukuAI's commercial terms](https://www.puku.com/legal/commercial-terms).\n * Benign machine learning work can also trigger this category.\n * - `reasoning_extraction` - The request asks the model to reproduce its internal\n * reasoning in the response text. To get reasoning in a structured form instead,\n * use\n * [adaptive thinking](https://platform.puku.com/docs/en/build-with-puku/adaptive-thinking).\n * - `general_harms` - The request could be related to an area that was determined\n * as harmful. Benign work might sometimes trigger this category.\n */\n category: 'cyber' | 'bio' | 'frontier_llm' | 'reasoning_extraction' | 'general_harms' | null;\n\n type: 'refusal';\n}\n\n/**\n * Opt-in server-side retry on one or more substitute models when the requested\n * model declines for policy reasons. Tried in order: if the first entry also\n * declines, the second is tried, and so on. The string \"default\" requests the\n * requested model's server-defined default fallback configuration.\n */\nexport type BetaFallbacksParam = Array<BetaFallbackParam> | 'default';\n\nexport interface BetaFileDocumentSource {\n file_id: string;\n\n type: 'file';\n}\n\nexport interface BetaFileImageSource {\n file_id: string;\n\n type: 'file';\n}\n\nexport interface BetaImageBlockParam {\n source: BetaBase64ImageSource | BetaURLImageSource | BetaFileImageSource;\n\n type: 'image';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Configures the transformations the server applies to this image before the model\n * observes it. Each key names a condition the server transforms images for; its\n * value selects the transformation applied. Omitted keys keep their default\n * behavior, and an empty object is equivalent to omitting the field.\n */\n transformations?: BetaImageTransformationsParam | null;\n}\n\n/**\n * Configures the transformations the server applies to this image before the model\n * observes it. Each key names a condition the server transforms images for; its\n * value selects the transformation applied. Omitted keys keep their default\n * behavior, and an empty object is equivalent to omitting the field.\n */\nexport interface BetaImageTransformationsParam {\n /**\n * What the server does when this image exceeds the model's maximum image size.\n * `\"downsize\"` (the default) scales the image down to fit, which changes the\n * dimensions the model observes without telling you. `\"error\"` instead rejects the\n * request with a 400 error naming the image's dimensions and the largest\n * dimensions that fit, so you can scale the image deliberately — your image is\n * never silently scaled down.\n */\n oversized_image?: 'downsize' | 'error';\n}\n\nexport interface BetaInputJSONDelta {\n partial_json: string;\n\n type: 'input_json_delta';\n}\n\nexport interface BetaInputTokensClearAtLeast {\n type: 'input_tokens';\n\n value: number;\n}\n\nexport interface BetaInputTokensTrigger {\n type: 'input_tokens';\n\n value: number;\n}\n\n/**\n * Per-iteration token usage breakdown.\n *\n * Each entry represents one sampling iteration, with its own input/output token\n * counts and cache statistics, discriminated by `type`. For `message` entries\n * (model sampling iterations, such as the turns of a server-side tool use loop),\n * this allows you to:\n *\n * - Determine which iterations exceeded long context thresholds (>=200k tokens)\n * - Calculate the context window size from the last `message` entry\n * - Understand token accumulation across server-side tool use loops\n *\n * A `compaction` entry reports the token usage of the compaction operation itself\n * — the server-side request that summarizes the context being closed — NOT the\n * size of the context that was compacted away, and its token counts can be much\n * smaller than that closed context (for example, a compaction that closes a\n * ~200k-token context can report only a few thousand tokens). Do not derive the\n * context window size from a `compaction` entry, even when it is the last entry. A\n * `compaction` entry's tokens are not included in the top-level `usage` fields.\n * When an input-token trigger is in effect (the default — 150,000 tokens unless\n * configured otherwise), each `compaction` entry closes a context that had reached\n * at least that threshold, though the context can exceed it by the final\n * iteration's output and tool results.\n */\nexport type BetaIterationsUsage = Array<\n | BetaMessageIterationUsage\n | BetaCompactionIterationUsage\n | BetaAdvisorMessageIterationUsage\n | BetaFallbackMessageIterationUsage\n>;\n\nexport interface BetaJSONOutputFormat {\n /**\n * The JSON schema of the format\n */\n schema: { [key: string]: unknown };\n\n type: 'json_schema';\n}\n\n/**\n * Configuration for a specific tool in an MCP toolset.\n */\nexport interface BetaMCPToolConfig {\n defer_loading?: boolean;\n\n enabled?: boolean;\n}\n\n/**\n * Default configuration for tools in an MCP toolset.\n */\nexport interface BetaMCPToolDefaultConfig {\n defer_loading?: boolean;\n\n enabled?: boolean;\n}\n\nexport interface BetaMCPToolResultBlock {\n content: string | Array<BetaTextBlock>;\n\n is_error: boolean;\n\n tool_use_id: string;\n\n type: 'mcp_tool_result';\n}\n\nexport interface BetaMCPToolUseBlock {\n id: string;\n\n input: unknown;\n\n /**\n * The name of the MCP tool\n */\n name: string;\n\n /**\n * The name of the MCP server\n */\n server_name: string;\n\n type: 'mcp_tool_use';\n}\n\nexport interface BetaMCPToolUseBlockParam {\n id: string;\n\n input: unknown;\n\n name: string;\n\n /**\n * The name of the MCP server\n */\n server_name: string;\n\n type: 'mcp_tool_use';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\n/**\n * Configuration for a group of tools from an MCP server.\n *\n * Allows configuring enabled status and defer_loading for all tools from an MCP\n * server, with optional per-tool overrides.\n */\nexport interface BetaMCPToolset {\n /**\n * Name of the MCP server to configure tools for\n */\n mcp_server_name: string;\n\n type: 'mcp_toolset';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Configuration overrides for specific tools, keyed by tool name\n */\n configs?: { [key: string]: BetaMCPToolConfig } | null;\n\n /**\n * Default configuration applied to all tools from this server\n */\n default_config?: BetaMCPToolDefaultConfig;\n}\n\nexport interface BetaMemoryTool20250818 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'memory';\n\n type: 'memory_20250818';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport type BetaMemoryTool20250818Command =\n | BetaMemoryTool20250818ViewCommand\n | BetaMemoryTool20250818CreateCommand\n | BetaMemoryTool20250818StrReplaceCommand\n | BetaMemoryTool20250818InsertCommand\n | BetaMemoryTool20250818DeleteCommand\n | BetaMemoryTool20250818RenameCommand;\n\nexport interface BetaMemoryTool20250818CreateCommand {\n /**\n * Command type identifier\n */\n command: 'create';\n\n /**\n * Content to write to the file\n */\n file_text: string;\n\n /**\n * Path where the file should be created\n */\n path: string;\n}\n\nexport interface BetaMemoryTool20250818DeleteCommand {\n /**\n * Command type identifier\n */\n command: 'delete';\n\n /**\n * Path to the file or directory to delete\n */\n path: string;\n}\n\nexport interface BetaMemoryTool20250818InsertCommand {\n /**\n * Command type identifier\n */\n command: 'insert';\n\n /**\n * Line number where text should be inserted\n */\n insert_line: number;\n\n /**\n * Text to insert at the specified line\n */\n insert_text: string;\n\n /**\n * Path to the file where text should be inserted\n */\n path: string;\n}\n\nexport interface BetaMemoryTool20250818RenameCommand {\n /**\n * Command type identifier\n */\n command: 'rename';\n\n /**\n * New path for the file or directory\n */\n new_path: string;\n\n /**\n * Current path of the file or directory\n */\n old_path: string;\n}\n\nexport interface BetaMemoryTool20250818StrReplaceCommand {\n /**\n * Command type identifier\n */\n command: 'str_replace';\n\n /**\n * Text to replace with\n */\n new_str: string;\n\n /**\n * Text to search for and replace\n */\n old_str: string;\n\n /**\n * Path to the file where text should be replaced\n */\n path: string;\n}\n\nexport interface BetaMemoryTool20250818ViewCommand {\n /**\n * Command type identifier\n */\n command: 'view';\n\n /**\n * Path to directory or file to view\n */\n path: string;\n\n /**\n * Optional line range for viewing specific lines\n */\n view_range?: Array<number>;\n}\n\nexport interface BetaMessage {\n /**\n * Unique object identifier.\n *\n * The format and length of IDs may change over time.\n */\n id: string;\n\n /**\n * Information about the container used in the request (for the code execution\n * tool)\n */\n container: BetaContainer | null;\n\n /**\n * Content generated by the model.\n *\n * This is an array of content blocks, each of which has a `type` that determines\n * its shape.\n *\n * Example:\n *\n * ```json\n * [{ \"type\": \"text\", \"text\": \"Hi, I'm Puku.\" }]\n * ```\n *\n * If the request input `messages` ended with an `assistant` turn, then the\n * response `content` will continue directly from that last turn. You can use this\n * to constrain the model's output.\n *\n * For example, if the input `messages` were:\n *\n * ```json\n * [\n * {\n * \"role\": \"user\",\n * \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"\n * },\n * { \"role\": \"assistant\", \"content\": \"The best answer is (\" }\n * ]\n * ```\n *\n * Then the response `content` might be:\n *\n * ```json\n * [{ \"type\": \"text\", \"text\": \"B)\" }]\n * ```\n */\n content: Array<BetaContentBlock>;\n\n /**\n * Context management response.\n *\n * Information about context management strategies applied during the request.\n */\n context_management: BetaContextManagementResponse | null;\n\n /**\n * Response envelope for request-level diagnostics. Present (possibly null)\n * whenever the caller supplied `diagnostics` on the request.\n */\n diagnostics: BetaDiagnostics | null;\n\n /**\n * The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n\n /**\n * Conversational role of the generated message.\n *\n * This will always be `\"assistant\"`.\n */\n role: 'assistant';\n\n /**\n * Structured information about a refusal.\n */\n stop_details: BetaRefusalStopDetails | null;\n\n /**\n * The reason that we stopped.\n *\n * This may be one the following values:\n *\n * - `\"end_turn\"`: the model reached a natural stopping point\n * - `\"max_tokens\"`: we exceeded the requested `max_tokens` or the model's maximum\n * - `\"stop_sequence\"`: one of your provided custom `stop_sequences` was generated\n * - `\"tool_use\"`: the model invoked one or more tools\n * - `\"pause_turn\"`: we paused a long-running turn. You may provide the response\n * back as-is in a subsequent request to let the model continue.\n * - `\"refusal\"`: when streaming classifiers intervene to handle potential policy\n * violations\n * - `\"model_context_window_exceeded\"`: we exceeded the model's context window\n *\n * In non-streaming mode this value is always non-null. In streaming mode, it is\n * null in the `message_start` event and non-null otherwise.\n */\n stop_reason: BetaStopReason | null;\n\n /**\n * Which custom stop sequence was generated, if any.\n *\n * This value will be a non-null string if one of your custom stop sequences was\n * generated.\n */\n stop_sequence: string | null;\n\n /**\n * Object type.\n *\n * For Messages, this is always `\"message\"`.\n */\n type: 'message';\n\n /**\n * Billing and rate-limit usage.\n *\n * PukuAI's API bills and rate-limits by token counts, as tokens represent the\n * underlying cost to our systems.\n *\n * Under the hood, the API transforms requests into a format suitable for the\n * model. The model's output then goes through a parsing stage before becoming an\n * API response. As a result, the token counts in `usage` will not match one-to-one\n * with the exact visible content of an API request or response.\n *\n * For example, `output_tokens` will be non-zero, even for an empty string response\n * from Puku.\n *\n * Total input tokens in a request is the summation of `input_tokens`,\n * `cache_creation_input_tokens`, and `cache_read_input_tokens`.\n */\n usage: BetaUsage;\n\n /**\n * Changes the API made to the request's input before showing it to the model: one\n * entry per change, in request order. Today the only entry type is\n * `thinking_dropped` — a `thinking`, `redacted_thinking` or `connector_text` block\n * from the request's `messages` that was removed from the prompt instead of being\n * shown to the model because it failed a binding check. More entry types may be\n * added over time; ignore types you do not recognize.\n *\n * Requires `puku-beta: thinking-binding-controls-2026-08-01`. Present on\n * every such response from a model that supports extended thinking, as `[]` when\n * nothing was changed; without the beta, blocks are removed all the same but\n * nothing is reported. Removed blocks contribute nothing to `usage.input_tokens`.\n * When streaming, the array is final in `message_start`; the final `message_delta`\n * event carries it only when a server-side model fallback happened mid-stream, in\n * which case it holds the serving model's entries and replaces the one in\n * `message_start`.\n */\n input_transformations?: Array<BetaThinkingDroppedInputTransformation> | null;\n}\n\nexport interface BetaMessageDeltaUsage {\n /**\n * The cumulative number of input tokens used to create the cache entry.\n */\n cache_creation_input_tokens: number | null;\n\n /**\n * The cumulative number of input tokens read from the cache.\n */\n cache_read_input_tokens: number | null;\n\n /**\n * Outcome of the `fallback_credit_token` presented on this request.\n */\n fallback_credit: BetaFallbackCreditUsage | null;\n\n /**\n * The cumulative number of input tokens which were used.\n */\n input_tokens: number | null;\n\n /**\n * Per-iteration token usage breakdown.\n *\n * Each entry represents one sampling iteration, with its own input/output token\n * counts and cache statistics, discriminated by `type`. For `message` entries\n * (model sampling iterations, such as the turns of a server-side tool use loop),\n * this allows you to:\n *\n * - Determine which iterations exceeded long context thresholds (>=200k tokens)\n * - Calculate the context window size from the last `message` entry\n * - Understand token accumulation across server-side tool use loops\n *\n * A `compaction` entry reports the token usage of the compaction operation itself\n * — the server-side request that summarizes the context being closed — NOT the\n * size of the context that was compacted away, and its token counts can be much\n * smaller than that closed context (for example, a compaction that closes a\n * ~200k-token context can report only a few thousand tokens). Do not derive the\n * context window size from a `compaction` entry, even when it is the last entry. A\n * `compaction` entry's tokens are not included in the top-level `usage` fields.\n * When an input-token trigger is in effect (the default — 150,000 tokens unless\n * configured otherwise), each `compaction` entry closes a context that had reached\n * at least that threshold, though the context can exceed it by the final\n * iteration's output and tool results.\n */\n iterations: BetaIterationsUsage | null;\n\n /**\n * The cumulative number of output tokens which were used.\n */\n output_tokens: number;\n\n /**\n * Breakdown of output tokens by category.\n *\n * `output_tokens` remains the inclusive, authoritative total used for billing.\n * This object provides a read-only decomposition for observability — for example,\n * how many of the billed output tokens were spent on internal reasoning that may\n * have been summarized before being returned to you.\n */\n output_tokens_details: BetaOutputTokensDetails | null;\n\n /**\n * The number of server tool requests.\n */\n server_tool_use: BetaServerToolUsage | null;\n}\n\n/**\n * Token usage for a sampling iteration.\n */\nexport interface BetaMessageIterationUsage {\n /**\n * Breakdown of cached tokens by TTL\n */\n cache_creation: BetaCacheCreation | null;\n\n /**\n * The number of input tokens used to create the cache entry.\n */\n cache_creation_input_tokens: number;\n\n /**\n * The number of input tokens read from the cache.\n */\n cache_read_input_tokens: number;\n\n /**\n * The number of input tokens which were used.\n */\n input_tokens: number;\n\n /**\n * The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n\n /**\n * The number of output tokens which were used.\n */\n output_tokens: number;\n\n /**\n * Usage for a sampling iteration\n */\n type: 'message';\n}\n\nexport interface BetaMessageParam {\n content: string | Array<BetaContentBlockParam>;\n\n role: 'user' | 'assistant' | 'system';\n\n /**\n * How long this system message's text stays in front of the model. `\"never\"` (the\n * default) renders it on every request that includes it. `\"next_user_message\"`\n * renders it only for the user turn it follows: once a later `role: \"user\"`\n * message exists in `messages` the message stays in the array (send it unchanged)\n * but is no longer shown to the model. Only permitted on `role: \"system\"`\n * messages.\n */\n clear_at?: 'next_user_message' | 'never' | null;\n\n /**\n * Per-message output configuration on a role:\"system\" input message.\n *\n * Fields here apply per-turn; `format` remains top-level only. An empty `{}` is\n * accepted on a message that carries content; a message with neither content nor\n * output_config fields is rejected.\n */\n output_config?: BetaSystemMessageOutputConfig | null;\n}\n\nexport interface BetaMessageTokensCount {\n /**\n * Information about context management applied to the message.\n */\n context_management: BetaCountTokensContextManagementResponse | null;\n\n /**\n * The total number of tokens across the provided list of messages, system prompt,\n * and tools.\n */\n input_tokens: number;\n}\n\nexport interface BetaMetadata {\n /**\n * An external identifier for the user who is associated with the request.\n *\n * This should be a uuid, hash value, or other opaque identifier. PukuAI may use\n * this id to help detect abuse. Do not include any identifying information such as\n * name, email address, or phone number.\n */\n user_id?: string | null;\n}\n\nexport interface BetaOutputConfig {\n /**\n * All possible effort levels.\n */\n effort?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null;\n\n /**\n * A schema to specify Puku's output format in responses. See\n * [structured outputs](https://platform.puku.com/docs/en/build-with-puku/structured-outputs)\n */\n format?: BetaJSONOutputFormat | null;\n\n /**\n * User-configurable total token budget across contexts.\n */\n task_budget?: BetaTokenTaskBudget | null;\n}\n\nexport interface BetaOutputTokensDetails {\n /**\n * Number of output tokens the model generated as internal reasoning, including the\n * thinking-block delimiter tokens.\n *\n * Reflects the raw reasoning the model produced, not the (possibly shorter)\n * summarized thinking text returned in the response body. Computed by\n * re-tokenizing the raw reasoning text, so it may differ from the model's exact\n * generation count by a small number of tokens. Always ≤ `output_tokens`;\n * `output_tokens - thinking_tokens` approximates the non-reasoning output.\n */\n thinking_tokens: number;\n}\n\nexport interface BetaPlainTextSource {\n data: string;\n\n media_type: 'text/plain';\n\n type: 'text';\n}\n\nexport type BetaRawContentBlockDelta =\n | BetaTextDelta\n | BetaInputJSONDelta\n | BetaCitationsDelta\n | BetaThinkingDelta\n | BetaSignatureDelta\n | BetaCompactionContentBlockDelta;\n\nexport interface BetaRawContentBlockDeltaEvent {\n delta: BetaRawContentBlockDelta;\n\n index: number;\n\n type: 'content_block_delta';\n}\n\nexport interface BetaRawContentBlockStartEvent {\n /**\n * Response model for a file uploaded to the container.\n */\n content_block:\n | BetaTextBlock\n | BetaThinkingBlock\n | BetaRedactedThinkingBlock\n | BetaToolUseBlock\n | BetaServerToolUseBlock\n | BetaWebSearchToolResultBlock\n | BetaWebFetchToolResultBlock\n | BetaAdvisorToolResultBlock\n | BetaCodeExecutionToolResultBlock\n | BetaBashCodeExecutionToolResultBlock\n | BetaTextEditorCodeExecutionToolResultBlock\n | BetaToolSearchToolResultBlock\n | BetaMCPToolUseBlock\n | BetaMCPToolResultBlock\n | BetaContainerUploadBlock\n | BetaCompactionBlock\n | BetaFallbackBlock;\n\n index: number;\n\n type: 'content_block_start';\n}\n\nexport interface BetaRawContentBlockStopEvent {\n index: number;\n\n type: 'content_block_stop';\n}\n\nexport interface BetaRawMessageDeltaEvent {\n /**\n * Information about context management strategies applied during the request\n */\n context_management: BetaContextManagementResponse | null;\n\n delta: BetaRawMessageDeltaEvent.Delta;\n\n type: 'message_delta';\n\n /**\n * Billing and rate-limit usage.\n *\n * PukuAI's API bills and rate-limits by token counts, as tokens represent the\n * underlying cost to our systems.\n *\n * Under the hood, the API transforms requests into a format suitable for the\n * model. The model's output then goes through a parsing stage before becoming an\n * API response. As a result, the token counts in `usage` will not match one-to-one\n * with the exact visible content of an API request or response.\n *\n * For example, `output_tokens` will be non-zero, even for an empty string response\n * from Puku.\n *\n * Total input tokens in a request is the summation of `input_tokens`,\n * `cache_creation_input_tokens`, and `cache_read_input_tokens`.\n */\n usage: BetaMessageDeltaUsage;\n\n /**\n * Changes the API made to the request's input before showing it to the model: one\n * entry per change, in request order. Today the only entry type is\n * `thinking_dropped` — a `thinking`, `redacted_thinking` or `connector_text` block\n * from the request's `messages` that was removed from the prompt instead of being\n * shown to the model because it failed a binding check. More entry types may be\n * added over time; ignore types you do not recognize.\n *\n * Requires `puku-beta: thinking-binding-controls-2026-08-01`. Present on\n * every such response from a model that supports extended thinking, as `[]` when\n * nothing was changed; without the beta, blocks are removed all the same but\n * nothing is reported. Removed blocks contribute nothing to `usage.input_tokens`.\n * When streaming, the array is final in `message_start`; the final `message_delta`\n * event carries it only when a server-side model fallback happened mid-stream, in\n * which case it holds the serving model's entries and replaces the one in\n * `message_start`.\n */\n input_transformations?: Array<BetaThinkingDroppedInputTransformation> | null;\n}\n\nexport namespace BetaRawMessageDeltaEvent {\n export interface Delta {\n /**\n * Information about the container used in the request (for the code execution\n * tool)\n */\n container: BetaMessagesAPI.BetaContainer | null;\n\n /**\n * Structured information about a refusal.\n */\n stop_details: BetaMessagesAPI.BetaRefusalStopDetails | null;\n\n stop_reason: BetaMessagesAPI.BetaStopReason | null;\n\n stop_sequence: string | null;\n }\n}\n\nexport interface BetaRawMessageStartEvent {\n message: BetaMessage;\n\n type: 'message_start';\n}\n\nexport interface BetaRawMessageStopEvent {\n type: 'message_stop';\n}\n\nexport type BetaRawMessageStreamEvent =\n | BetaRawMessageStartEvent\n | BetaRawMessageDeltaEvent\n | BetaRawMessageStopEvent\n | BetaRawContentBlockStartEvent\n | BetaRawContentBlockDeltaEvent\n | BetaRawContentBlockStopEvent;\n\nexport interface BetaRedactedThinkingBlock {\n /**\n * The contents of this redacted thinking block, returned when portions of the\n * model's thinking were safety-redacted. This field is opaque and encrypted, with\n * no readable content.\n *\n * Pass `redacted_thinking` blocks back to the API unchanged when continuing a\n * multi-turn conversation.\n *\n * See\n * [extended thinking](https://platform.puku.com/docs/en/build-with-puku/extended-thinking#redacted-thinking-blocks)\n * for details.\n */\n data: string;\n\n type: 'redacted_thinking';\n}\n\nexport interface BetaRedactedThinkingBlockParam {\n /**\n * The `data` value of this redacted thinking block, exactly as returned by the API\n * in a previous response. Opaque and encrypted; pass it back unchanged.\n */\n data: string;\n\n type: 'redacted_thinking';\n}\n\n/**\n * Structured information about a refusal.\n */\nexport interface BetaRefusalStopDetails {\n /**\n * The policy category that triggered a refusal.\n *\n * - `cyber` - The request could enable cyber harm, such as malware or exploit\n * development. Benign cybersecurity work can also trigger this category.\n * - `bio` - The request could enable biological harm, such as dangerous lab\n * methods. Beneficial life sciences work can also trigger this category.\n * - `frontier_llm` - The request could assist the development of competing AI\n * models, which is restricted under\n * [PukuAI's commercial terms](https://www.puku.com/legal/commercial-terms).\n * Benign machine learning work can also trigger this category.\n * - `reasoning_extraction` - The request asks the model to reproduce its internal\n * reasoning in the response text. To get reasoning in a structured form instead,\n * use\n * [adaptive thinking](https://platform.puku.com/docs/en/build-with-puku/adaptive-thinking).\n * - `general_harms` - The request could be related to an area that was determined\n * as harmful. Benign work might sometimes trigger this category.\n */\n category: 'cyber' | 'bio' | 'frontier_llm' | 'reasoning_extraction' | 'general_harms' | null;\n\n /**\n * Human-readable explanation of the refusal.\n *\n * This text is not guaranteed to be stable. `null` when no explanation is\n * available for the category.\n */\n explanation: string | null;\n\n /**\n * Opaque code that refunds the cache-miss cost when retrying this refused request\n * on the fallback model. Pass it as `fallback_credit_token` on the retry request.\n * Expires 5 minutes after the refusal.\n *\n * The retry is sent either with the same request body (`system`, `messages`,\n * `tools`, and other render-shaping fields), or with the same body plus one\n * appended `assistant` message whose content is the partial text (with any\n * trailing whitespace stripped from the final text block) and paired server-tool\n * blocks from this refusal — which also authorizes that appended turn as an\n * assistant-prefill continuation on models that otherwise disallow prefill. A\n * token minted mid-server-tool-loop whose partial content was continuable may only\n * be redeemed the second way — if a same-body retry is rejected with a 400 saying\n * the token must be redeemed by continuing the partial response, retry the second\n * way instead. Either way: same workspace, same platform; a mismatch is a 400.\n * Resending a token for an already-warm prefix is permitted but yields no\n * additional credit.\n *\n * `null` when the refused model isn't eligible for a fallback credit.\n */\n fallback_credit_token: string | null;\n\n /**\n * Whether the accompanying `fallback_credit_token` may be redeemed with the\n * appended-assistant retry form. Only set when `fallback_credit_token` is present.\n *\n * `true`: retry by resending the same request body plus one appended `assistant`\n * message whose content is this response's `content` with any trailing whitespace\n * stripped from the final text block and unpaired `tool_use` blocks omitted (the\n * same appended-turn shape described on `fallback_credit_token`), with the token\n * attached. `false`: retry by resending the original request body unchanged, with\n * the token attached — the appended-assistant form is not available for this\n * refusal (no continuable partial content, or the request uses `output_format` or\n * a `tool_choice` that forces tool use). One exception: when the request used\n * `output_format` or a forced `tool_choice` and the refusal arrived after server\n * tools (including MCP connector tools) had already executed, the token may not be\n * redeemable by either retry form; if the exact-body retry is then rejected with a\n * 400 saying the token must be redeemed by continuing the partial response,\n * discard the token and retry without it.\n *\n * Advisory: if an appended-assistant retry is rejected with a 400 despite `true`,\n * fall back to resending the original request body with the token.\n */\n fallback_has_prefill_claim: boolean | null;\n\n /**\n * The server's suggested retry target for this refusal. Populated when a fallback\n * attempt could not be made (the fallback model's rate limit was exhausted, or it\n * was overloaded); names the fallback model the caller can retry directly. Null\n * otherwise.\n */\n recommended_model: string | null;\n\n type: 'refusal';\n}\n\nexport interface BetaRequestDocumentBlock {\n source:\n | BetaBase64PDFSource\n | BetaPlainTextSource\n | BetaContentBlockSource\n | BetaURLPDFSource\n | BetaFileDocumentSource;\n\n type: 'document';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n citations?: BetaCitationsConfigParam | null;\n\n context?: string | null;\n\n title?: string | null;\n}\n\nexport interface BetaRequestMCPServerToolConfiguration {\n allowed_tools?: Array<string> | null;\n\n enabled?: boolean | null;\n}\n\nexport interface BetaRequestMCPServerURLDefinition {\n name: string;\n\n type: 'url';\n\n url: string;\n\n authorization_token?: string | null;\n\n tool_configuration?: BetaRequestMCPServerToolConfiguration | null;\n}\n\nexport interface BetaRequestMCPToolResultBlockParam {\n tool_use_id: string;\n\n type: 'mcp_tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n content?: string | Array<BetaTextBlockParam>;\n\n is_error?: boolean;\n}\n\n/**\n * Mid-conversation directive to surface a declared tool.\n *\n * `tool` references a tool (or MCP toolset) by name from the request's `tools`; it\n * is offered to the model from this point in the conversation onward.\n */\nexport interface BetaRequestToolAdditionBlock {\n /**\n * Reference to a single tool the caller declared directly in `tools[]`. Does not\n * accept the composed `{server}_{name}` form the server assigns to MCP-resolved\n * tools — use `mcp_tool_reference` or `mcp_toolset_reference` for those.\n */\n tool: BetaToolChangeToolReference | BetaToolChangeMCPToolReference | BetaToolChangeMCPToolsetReference;\n\n type: 'tool_addition';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\n/**\n * Mid-conversation directive to withdraw a tool.\n *\n * `tool` references a tool (or MCP toolset) by name from the request's `tools`; it\n * is no longer offered to the model from this point in the conversation onward.\n */\nexport interface BetaRequestToolRemovalBlock {\n /**\n * Reference to a single tool the caller declared directly in `tools[]`. Does not\n * accept the composed `{server}_{name}` form the server assigns to MCP-resolved\n * tools — use `mcp_tool_reference` or `mcp_toolset_reference` for those.\n */\n tool: BetaToolChangeToolReference | BetaToolChangeMCPToolReference | BetaToolChangeMCPToolsetReference;\n\n type: 'tool_removal';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\nexport interface BetaSearchResultBlockParam {\n content: Array<BetaTextBlockParam>;\n\n source: string;\n\n title: string;\n\n type: 'search_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n citations?: BetaCitationsConfigParam;\n}\n\n/**\n * Tool invocation generated by a server-side tool.\n */\nexport interface BetaServerToolCaller {\n tool_id: string;\n\n type: 'code_execution_20250825';\n}\n\nexport interface BetaServerToolCaller20260120 {\n tool_id: string;\n\n type: 'code_execution_20260120';\n}\n\nexport interface BetaServerToolUsage {\n /**\n * The number of web fetch tool requests.\n */\n web_fetch_requests: number;\n\n /**\n * The number of web search tool requests.\n */\n web_search_requests: number;\n}\n\nexport interface BetaServerToolUseBlock {\n id: string;\n\n input: { [key: string]: unknown };\n\n name:\n | 'advisor'\n | 'web_search'\n | 'web_fetch'\n | 'code_execution'\n | 'bash_code_execution'\n | 'text_editor_code_execution'\n | 'tool_search_tool_regex'\n | 'tool_search_tool_bm25';\n\n type: 'server_tool_use';\n\n /**\n * Tool invocation directly from the model.\n */\n caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;\n}\n\nexport interface BetaServerToolUseBlockParam {\n id: string;\n\n input: unknown;\n\n name:\n | 'advisor'\n | 'web_search'\n | 'web_fetch'\n | 'code_execution'\n | 'bash_code_execution'\n | 'text_editor_code_execution'\n | 'tool_search_tool_regex'\n | 'tool_search_tool_bm25';\n\n type: 'server_tool_use';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Tool invocation directly from the model.\n */\n caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;\n}\n\nexport interface BetaSignatureDelta {\n /**\n * The `signature` for this thinking block: an opaque value used to verify that the\n * block was generated by Puku when it is passed back to the API. Delivered in a\n * `signature_delta` event just before the block's `content_block_stop` event.\n */\n signature: string;\n\n type: 'signature_delta';\n}\n\n/**\n * Specification for a skill to be loaded in a container (request model).\n */\nexport interface BetaSkillParams {\n /**\n * Skill ID\n */\n skill_id: string;\n\n /**\n * Type of skill - either 'puku' (built-in) or 'custom' (user-defined)\n */\n type: 'puku' | 'custom';\n\n /**\n * Skill version or 'latest' for most recent version\n */\n version?: string;\n}\n\nexport type BetaStopReason =\n | 'end_turn'\n | 'max_tokens'\n | 'stop_sequence'\n | 'tool_use'\n | 'pause_turn'\n | 'compaction'\n | 'refusal'\n | 'model_context_window_exceeded';\n\n/**\n * Per-message output configuration on a role:\"system\" input message.\n *\n * Fields here apply per-turn; `format` remains top-level only. An empty `{}` is\n * accepted on a message that carries content; a message with neither content nor\n * output_config fields is rejected.\n */\nexport interface BetaSystemMessageOutputConfig {\n /**\n * All possible effort levels.\n */\n effort?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null;\n}\n\nexport interface BetaTextBlock {\n /**\n * Citations supporting the text block.\n *\n * The type of citation returned will depend on the type of document being cited.\n * Citing a PDF results in `page_location`, plain text results in `char_location`,\n * and content document results in `content_block_location`.\n */\n citations: Array<BetaTextCitation> | null;\n\n text: string;\n\n type: 'text';\n}\n\nexport interface BetaTextBlockParam {\n text: string;\n\n type: 'text';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n citations?: Array<BetaTextCitationParam> | null;\n}\n\nexport type BetaTextCitation =\n | BetaCitationCharLocation\n | BetaCitationPageLocation\n | BetaCitationContentBlockLocation\n | BetaCitationsWebSearchResultLocation\n | BetaCitationSearchResultLocation;\n\nexport type BetaTextCitationParam =\n | BetaCitationCharLocationParam\n | BetaCitationPageLocationParam\n | BetaCitationContentBlockLocationParam\n | BetaCitationWebSearchResultLocationParam\n | BetaCitationSearchResultLocationParam;\n\nexport interface BetaTextDelta {\n text: string;\n\n type: 'text_delta';\n}\n\nexport interface BetaTextEditorCodeExecutionCreateResultBlock {\n is_file_update: boolean;\n\n type: 'text_editor_code_execution_create_result';\n}\n\nexport interface BetaTextEditorCodeExecutionCreateResultBlockParam {\n is_file_update: boolean;\n\n type: 'text_editor_code_execution_create_result';\n}\n\nexport interface BetaTextEditorCodeExecutionStrReplaceResultBlock {\n lines: Array<string> | null;\n\n new_lines: number | null;\n\n new_start: number | null;\n\n old_lines: number | null;\n\n old_start: number | null;\n\n type: 'text_editor_code_execution_str_replace_result';\n}\n\nexport interface BetaTextEditorCodeExecutionStrReplaceResultBlockParam {\n type: 'text_editor_code_execution_str_replace_result';\n\n lines?: Array<string> | null;\n\n new_lines?: number | null;\n\n new_start?: number | null;\n\n old_lines?: number | null;\n\n old_start?: number | null;\n}\n\nexport interface BetaTextEditorCodeExecutionToolResultBlock {\n content:\n | BetaTextEditorCodeExecutionToolResultError\n | BetaTextEditorCodeExecutionViewResultBlock\n | BetaTextEditorCodeExecutionCreateResultBlock\n | BetaTextEditorCodeExecutionStrReplaceResultBlock;\n\n tool_use_id: string;\n\n type: 'text_editor_code_execution_tool_result';\n}\n\nexport interface BetaTextEditorCodeExecutionToolResultBlockParam {\n content:\n | BetaTextEditorCodeExecutionToolResultErrorParam\n | BetaTextEditorCodeExecutionViewResultBlockParam\n | BetaTextEditorCodeExecutionCreateResultBlockParam\n | BetaTextEditorCodeExecutionStrReplaceResultBlockParam;\n\n tool_use_id: string;\n\n type: 'text_editor_code_execution_tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\nexport interface BetaTextEditorCodeExecutionToolResultError {\n error_code:\n | 'invalid_tool_input'\n | 'unavailable'\n | 'too_many_requests'\n | 'execution_time_exceeded'\n | 'file_not_found';\n\n error_message: string | null;\n\n type: 'text_editor_code_execution_tool_result_error';\n}\n\nexport interface BetaTextEditorCodeExecutionToolResultErrorParam {\n error_code:\n | 'invalid_tool_input'\n | 'unavailable'\n | 'too_many_requests'\n | 'execution_time_exceeded'\n | 'file_not_found';\n\n type: 'text_editor_code_execution_tool_result_error';\n\n error_message?: string | null;\n}\n\nexport interface BetaTextEditorCodeExecutionViewResultBlock {\n content: string;\n\n file_type: 'text' | 'image' | 'pdf';\n\n num_lines: number | null;\n\n start_line: number | null;\n\n total_lines: number | null;\n\n type: 'text_editor_code_execution_view_result';\n}\n\nexport interface BetaTextEditorCodeExecutionViewResultBlockParam {\n content: string;\n\n file_type: 'text' | 'image' | 'pdf';\n\n type: 'text_editor_code_execution_view_result';\n\n num_lines?: number | null;\n\n start_line?: number | null;\n\n total_lines?: number | null;\n}\n\nexport interface BetaThinkingBlock {\n /**\n * A value used to verify that this thinking block was generated by Puku when it\n * is passed back to the API.\n *\n * This is an opaque field and should not be interpreted or parsed. When passing\n * thinking blocks back to the API (required when using tools with extended\n * thinking), pass them back exactly as received, with this field intact.\n *\n * See\n * [extended thinking](https://platform.puku.com/docs/en/build-with-puku/extended-thinking)\n * for details.\n */\n signature: string;\n\n /**\n * The text of Puku's thinking process for this block.\n */\n thinking: string;\n\n type: 'thinking';\n}\n\n/**\n * Controls for block binding: what happens when a thinking block this request\n * sends back fails the conversation check. Every field is optional; an empty\n * object means every default.\n */\nexport interface BetaThinkingBlockBinding {\n /**\n * What happens when a thinking block in `messages` fails the conversation check:\n * it was created in a different conversation, or the messages before it have\n * changed since. `\"error\"` (the default) fails the request with a 400 error.\n * `\"drop_block\"` removes the failing blocks and the request proceeds; the model no\n * longer sees the dropped reasoning.\n */\n prefix_mismatch_behavior?: BetaThinkingPrefixMismatchBehavior | null;\n}\n\nexport interface BetaThinkingBlockParam {\n /**\n * The `signature` value of this thinking block, exactly as returned by the API in\n * a previous response. Used to verify that the block was generated by Puku.\n *\n * Thinking blocks must be passed back unmodified and in their original order; a\n * modified block results in a 400 `invalid_request_error`.\n */\n signature: string;\n\n /**\n * The `thinking` text of this block as returned by the API.\n */\n thinking: string;\n\n type: 'thinking';\n}\n\nexport interface BetaThinkingConfigAdaptive {\n type: 'adaptive';\n\n /**\n * Controls for block binding: what happens when a thinking block this request\n * sends back fails the conversation check. Every field is optional; an empty\n * object means every default.\n */\n block_binding?: BetaThinkingBlockBinding | null;\n\n /**\n * Controls how thinking content appears in the response. When set to `summarized`,\n * thinking is returned normally. When set to `omitted`, thinking content is\n * redacted but a signature is returned for multi-turn continuity. Defaults to\n * `summarized`.\n */\n display?: 'summarized' | 'omitted' | 'updates' | null;\n}\n\nexport interface BetaThinkingConfigDisabled {\n type: 'disabled';\n}\n\nexport interface BetaThinkingConfigEnabled {\n /**\n * Determines how many tokens Puku can use for its internal reasoning process.\n * Larger budgets can enable more thorough analysis for complex problems, improving\n * response quality.\n *\n * Must be ≥1024 and less than `max_tokens`.\n *\n * See\n * [extended thinking](https://platform.puku.com/docs/en/build-with-puku/extended-thinking)\n * for details.\n */\n budget_tokens: number;\n\n type: 'enabled';\n\n /**\n * Controls for block binding: what happens when a thinking block this request\n * sends back fails the conversation check. Every field is optional; an empty\n * object means every default.\n */\n block_binding?: BetaThinkingBlockBinding | null;\n\n /**\n * Controls how thinking content appears in the response. When set to `summarized`,\n * thinking is returned normally. When set to `omitted`, thinking content is\n * redacted but a signature is returned for multi-turn continuity. Defaults to\n * `summarized`.\n */\n display?: 'summarized' | 'omitted' | 'updates' | null;\n}\n\n/**\n * Configuration for enabling Puku's extended thinking.\n *\n * When enabled, responses include `thinking` content blocks showing Puku's\n * thinking process before the final answer. Requires a minimum budget of 1,024\n * tokens and counts towards your `max_tokens` limit.\n *\n * See\n * [extended thinking](https://platform.puku.com/docs/en/build-with-puku/extended-thinking)\n * for details.\n */\nexport type BetaThinkingConfigParam =\n | BetaThinkingConfigEnabled\n | BetaThinkingConfigDisabled\n | BetaThinkingConfigAdaptive;\n\nexport interface BetaThinkingDelta {\n /**\n * Per-frame increment of a coarse, running estimate of the tokens this thinking\n * block has produced so far. Present whenever the\n * `thinking-token-count-2026-05-13` beta is set; `null` unless `thinking.display`\n * resolves to `\"omitted\"` and a count is due this frame. Sum the increments across\n * `thinking_delta` frames on this block for a progress indicator. Each increment\n * is a non-negative multiple of a fixed quantum and the cadence is rate-limited,\n * so this is a deliberately lossy display hint, not a billable count;\n * `usage.output_tokens` remains authoritative.\n */\n estimated_tokens: number | null;\n\n /**\n * The incremental `thinking` text for this content block. Concatenate the\n * `thinking` values of successive `thinking_delta` events to assemble the block's\n * full `thinking` value.\n */\n thinking: string;\n\n type: 'thinking_delta';\n}\n\nexport interface BetaThinkingDroppedInputTransformation {\n /**\n * Where the removed block was in your request, as `messages.{i}.content.{j}`: `i`\n * indexes the `messages` array you sent and `j` that message's `content` array —\n * the same form error messages use.\n */\n path: string;\n\n /**\n * Which binding check removed the block: `model_binding_mismatch` — it was created\n * by a model whose reasoning the requested model may not read;\n * `prefix_binding_mismatch` — the conversation before it differs from the\n * conversation it was created in (the rest of that turn's consecutive thinking\n * blocks are removed with it, each with this reason);\n * `organization_binding_mismatch` — it was created under a different organization\n * (an PukuAI organization, AWS account or Google Cloud project) and this\n * organization is not one of its additional organizations;\n * `end_user_binding_mismatch` — it was created for a different end user, or was\n * removed by the consumer-organization binding. A block that would fail several\n * checks reports one reason, in this order of precedence:\n * `organization_binding_mismatch`, `end_user_binding_mismatch`,\n * `model_binding_mismatch`, `prefix_binding_mismatch`.\n */\n reason:\n | 'model_binding_mismatch'\n | 'prefix_binding_mismatch'\n | 'organization_binding_mismatch'\n | 'end_user_binding_mismatch';\n\n /**\n * Always `thinking_dropped` for this entry type.\n */\n type: 'thinking_dropped';\n}\n\n/**\n * What happens when a thinking block in `messages` fails the conversation check:\n * it was created in a different conversation, or the messages before it have\n * changed since. `\"error\"` (the default) fails the request with a 400 error.\n * `\"drop_block\"` removes the failing blocks and the request proceeds; the model no\n * longer sees the dropped reasoning.\n */\nexport type BetaThinkingPrefixMismatchBehavior = 'error' | 'drop_block';\n\nexport interface BetaThinkingTurns {\n type: 'thinking_turns';\n\n value: number;\n}\n\n/**\n * User-configurable total token budget across contexts.\n */\nexport interface BetaTokenTaskBudget {\n /**\n * Total token budget across all contexts in the session.\n */\n total: number;\n\n /**\n * The budget type. Currently only 'tokens' is supported.\n */\n type: 'tokens';\n\n /**\n * Remaining tokens in the budget. Use this to track usage across contexts when\n * implementing compaction client-side. Defaults to total if not provided.\n */\n remaining?: number | null;\n}\n\nexport interface BetaTool {\n /**\n * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.\n *\n * This defines the shape of the `input` that your tool accepts and that the model\n * will produce.\n */\n input_schema: BetaTool.InputSchema;\n\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: string;\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Description of what this tool does.\n *\n * Tool descriptions should be as detailed as possible. The more information that\n * the model has about what the tool is and how to use it, the better it will\n * perform. You can use natural language descriptions to reinforce important\n * aspects of the tool input JSON schema.\n */\n description?: string;\n\n /**\n * Enable eager input streaming for this tool. When true, tool input parameters\n * will be streamed incrementally as they are generated, and types will be inferred\n * on-the-fly rather than buffering the full JSON output. When false, streaming is\n * disabled for this tool even if the fine-grained-tool-streaming beta is active.\n * When null (default), uses the default behavior based on beta headers.\n */\n eager_input_streaming?: boolean | null;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n\n type?: 'custom' | null;\n}\n\nexport namespace BetaTool {\n /**\n * [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.\n *\n * This defines the shape of the `input` that your tool accepts and that the model\n * will produce.\n */\n export interface InputSchema {\n type: 'object';\n\n properties?: unknown | null;\n\n required?: string[] | readonly string[] | null;\n\n [k: string]: unknown;\n }\n}\n\nexport interface BetaToolBash20241022 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'bash';\n\n type: 'bash_20241022';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolBash20250124 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'bash';\n\n type: 'bash_20250124';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\n/**\n * Reference to a single MCP tool by its server and remote name — the same\n * `server_name`/`name` pair `mcp_tool_use` carries.\n */\nexport interface BetaToolChangeMCPToolReference {\n name: string;\n\n server_name: string;\n\n type: 'mcp_tool_reference';\n}\n\n/**\n * Reference to every tool in the named MCP server's toolset.\n */\nexport interface BetaToolChangeMCPToolsetReference {\n server_name: string;\n\n type: 'mcp_toolset_reference';\n}\n\n/**\n * Reference to a single tool the caller declared directly in `tools[]`. Does not\n * accept the composed `{server}_{name}` form the server assigns to MCP-resolved\n * tools — use `mcp_tool_reference` or `mcp_toolset_reference` for those.\n */\nexport interface BetaToolChangeToolReference {\n name: string;\n\n type: 'tool_reference';\n}\n\n/**\n * How the model should use the provided tools. The model can use a specific tool,\n * any available tool, decide by itself, or not use tools at all.\n */\nexport type BetaToolChoice = BetaToolChoiceAuto | BetaToolChoiceAny | BetaToolChoiceTool | BetaToolChoiceNone;\n\n/**\n * The model will use any available tools.\n */\nexport interface BetaToolChoiceAny {\n type: 'any';\n\n /**\n * Whether to disable parallel tool use.\n *\n * Defaults to `false`. If set to `true`, the model will output exactly one tool\n * use.\n */\n disable_parallel_tool_use?: boolean;\n}\n\n/**\n * The model will automatically decide whether to use tools.\n */\nexport interface BetaToolChoiceAuto {\n type: 'auto';\n\n /**\n * Whether to disable parallel tool use.\n *\n * Defaults to `false`. If set to `true`, the model will output at most one tool\n * use.\n */\n disable_parallel_tool_use?: boolean;\n}\n\n/**\n * The model will not be allowed to use tools.\n */\nexport interface BetaToolChoiceNone {\n type: 'none';\n}\n\n/**\n * The model will use the specified tool with `tool_choice.name`.\n */\nexport interface BetaToolChoiceTool {\n /**\n * The name of the tool to use.\n */\n name: string;\n\n type: 'tool';\n\n /**\n * Whether to disable parallel tool use.\n *\n * Defaults to `false`. If set to `true`, the model will output exactly one tool\n * use.\n */\n disable_parallel_tool_use?: boolean;\n}\n\nexport interface BetaToolComputerUse20241022 {\n /**\n * The height of the display in pixels.\n */\n display_height_px: number;\n\n /**\n * The width of the display in pixels.\n */\n display_width_px: number;\n\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'computer';\n\n type: 'computer_20241022';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * The X11 display number (e.g. 0, 1) for the display.\n */\n display_number?: number | null;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolComputerUse20250124 {\n /**\n * The height of the display in pixels.\n */\n display_height_px: number;\n\n /**\n * The width of the display in pixels.\n */\n display_width_px: number;\n\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'computer';\n\n type: 'computer_20250124';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * The X11 display number (e.g. 0, 1) for the display.\n */\n display_number?: number | null;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolComputerUse20251124 {\n /**\n * The height of the display in pixels.\n */\n display_height_px: number;\n\n /**\n * The width of the display in pixels.\n */\n display_width_px: number;\n\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'computer';\n\n type: 'computer_20251124';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * The X11 display number (e.g. 0, 1) for the display.\n */\n display_number?: number | null;\n\n /**\n * Whether to enable an action to take a zoomed-in screenshot of the screen.\n */\n enable_zoom?: boolean;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolReferenceBlock {\n tool_name: string;\n\n type: 'tool_reference';\n}\n\n/**\n * Tool reference block that can be included in tool_result content.\n */\nexport interface BetaToolReferenceBlockParam {\n tool_name: string;\n\n type: 'tool_reference';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\nexport interface BetaToolResultBlockParam {\n tool_use_id: string;\n\n type: 'tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n content?:\n | string\n | Array<\n | BetaTextBlockParam\n | BetaImageBlockParam\n | BetaSearchResultBlockParam\n | BetaRequestDocumentBlock\n | BetaToolReferenceBlockParam\n | BetaBrowserStateBlockParam\n >;\n\n is_error?: boolean;\n\n /**\n * For a toolset member tool_result, the toolset family of the paired tool_use.\n */\n toolset_name?: string | null;\n}\n\nexport interface BetaToolSearchToolBm25_20251119 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'tool_search_tool_bm25';\n\n type: 'tool_search_tool_bm25_20251119' | 'tool_search_tool_bm25';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolSearchToolRegex20251119 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'tool_search_tool_regex';\n\n type: 'tool_search_tool_regex_20251119' | 'tool_search_tool_regex';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolSearchToolResultBlock {\n content: BetaToolSearchToolResultError | BetaToolSearchToolSearchResultBlock;\n\n tool_use_id: string;\n\n type: 'tool_search_tool_result';\n}\n\nexport interface BetaToolSearchToolResultBlockParam {\n content: BetaToolSearchToolResultErrorParam | BetaToolSearchToolSearchResultBlockParam;\n\n tool_use_id: string;\n\n type: 'tool_search_tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n}\n\nexport interface BetaToolSearchToolResultError {\n error_code: 'invalid_tool_input' | 'unavailable' | 'too_many_requests' | 'execution_time_exceeded';\n\n error_message: string | null;\n\n type: 'tool_search_tool_result_error';\n}\n\nexport interface BetaToolSearchToolResultErrorParam {\n error_code: 'invalid_tool_input' | 'unavailable' | 'too_many_requests' | 'execution_time_exceeded';\n\n type: 'tool_search_tool_result_error';\n\n error_message?: string | null;\n}\n\nexport interface BetaToolSearchToolSearchResultBlock {\n tool_references: Array<BetaToolReferenceBlock>;\n\n type: 'tool_search_tool_search_result';\n}\n\nexport interface BetaToolSearchToolSearchResultBlockParam {\n tool_references: Array<BetaToolReferenceBlockParam>;\n\n type: 'tool_search_tool_search_result';\n}\n\nexport type BetaToolResultContentBlockParam = Extract<BetaToolResultBlockParam['content'], any[]>[number];\n\nexport interface BetaToolTextEditor20241022 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'str_replace_editor';\n\n type: 'text_editor_20241022';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolTextEditor20250124 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'str_replace_editor';\n\n type: 'text_editor_20250124';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolTextEditor20250429 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'str_replace_based_edit_tool';\n\n type: 'text_editor_20250429';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaToolTextEditor20250728 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'str_replace_based_edit_tool';\n\n type: 'text_editor_20250728';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n input_examples?: Array<{ [key: string]: unknown }>;\n\n /**\n * Maximum number of characters to display when viewing a file. If not specified,\n * defaults to displaying the full file.\n */\n max_characters?: number | null;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\n/**\n * Code execution tool with REPL state persistence (daemon mode + gVisor\n * checkpoint).\n */\nexport type BetaToolUnion =\n | BetaTool\n | BetaToolBash20241022\n | BetaToolBash20250124\n | BetaCodeExecutionTool20250522\n | BetaCodeExecutionTool20250825\n | BetaCodeExecutionTool20260120\n | BetaCodeExecutionTool20260521\n | BetaBrowserToolset20260801\n | BetaToolComputerUse20241022\n | BetaMemoryTool20250818\n | BetaToolComputerUse20250124\n | BetaToolTextEditor20241022\n | BetaToolComputerUse20251124\n | BetaComputerToolset20260801\n | BetaToolTextEditor20250124\n | BetaToolTextEditor20250429\n | BetaToolTextEditor20250728\n | BetaWebSearchTool20250305\n | BetaWebFetchTool20250910\n | BetaWebSearchTool20260209\n | BetaWebFetchTool20260209\n | BetaWebFetchTool20260309\n | BetaWebSearchTool20260318\n | BetaWebFetchTool20260318\n | BetaAdvisorTool20260301\n | BetaToolSearchToolBm25_20251119\n | BetaToolSearchToolRegex20251119\n | BetaMCPToolset;\n\nexport interface BetaToolUseBlock {\n id: string;\n\n input: unknown;\n\n name: string;\n\n type: 'tool_use';\n\n /**\n * Tool invocation directly from the model.\n */\n caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;\n\n /**\n * For a toolset member tool_use, the toolset family.\n */\n toolset_name?: string | null;\n}\n\nexport interface BetaToolUseBlockParam {\n id: string;\n\n input: unknown;\n\n name: string;\n\n type: 'tool_use';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Tool invocation directly from the model.\n */\n caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;\n\n /**\n * For a toolset member tool_use, the toolset family this member belongs to.\n */\n toolset_name?: string | null;\n}\n\nexport interface BetaToolUsesKeep {\n type: 'tool_uses';\n\n value: number;\n}\n\nexport interface BetaToolUsesTrigger {\n type: 'tool_uses';\n\n value: number;\n}\n\nexport interface BetaURLImageSource {\n type: 'url';\n\n url: string;\n}\n\nexport interface BetaURLPDFSource {\n type: 'url';\n\n url: string;\n}\n\nexport interface BetaUsage {\n /**\n * Breakdown of cached tokens by TTL\n */\n cache_creation: BetaCacheCreation | null;\n\n /**\n * The number of input tokens used to create the cache entry.\n */\n cache_creation_input_tokens: number | null;\n\n /**\n * The number of input tokens read from the cache.\n */\n cache_read_input_tokens: number | null;\n\n /**\n * Outcome of the `fallback_credit_token` presented on this request.\n */\n fallback_credit: BetaFallbackCreditUsage | null;\n\n /**\n * The geographic region where inference was performed for this request.\n */\n inference_geo: string | null;\n\n /**\n * The number of input tokens which were used.\n */\n input_tokens: number;\n\n /**\n * Per-iteration token usage breakdown.\n *\n * Each entry represents one sampling iteration, with its own input/output token\n * counts and cache statistics, discriminated by `type`. For `message` entries\n * (model sampling iterations, such as the turns of a server-side tool use loop),\n * this allows you to:\n *\n * - Determine which iterations exceeded long context thresholds (>=200k tokens)\n * - Calculate the context window size from the last `message` entry\n * - Understand token accumulation across server-side tool use loops\n *\n * A `compaction` entry reports the token usage of the compaction operation itself\n * — the server-side request that summarizes the context being closed — NOT the\n * size of the context that was compacted away, and its token counts can be much\n * smaller than that closed context (for example, a compaction that closes a\n * ~200k-token context can report only a few thousand tokens). Do not derive the\n * context window size from a `compaction` entry, even when it is the last entry. A\n * `compaction` entry's tokens are not included in the top-level `usage` fields.\n * When an input-token trigger is in effect (the default — 150,000 tokens unless\n * configured otherwise), each `compaction` entry closes a context that had reached\n * at least that threshold, though the context can exceed it by the final\n * iteration's output and tool results.\n */\n iterations: BetaIterationsUsage | null;\n\n /**\n * The number of output tokens which were used.\n */\n output_tokens: number;\n\n /**\n * Breakdown of output tokens by category.\n *\n * `output_tokens` remains the inclusive, authoritative total used for billing.\n * This object provides a read-only decomposition for observability — for example,\n * how many of the billed output tokens were spent on internal reasoning that may\n * have been summarized before being returned to you.\n */\n output_tokens_details: BetaOutputTokensDetails | null;\n\n /**\n * The number of server tool requests.\n */\n server_tool_use: BetaServerToolUsage | null;\n\n /**\n * If the request used the priority, standard, or batch tier.\n */\n service_tier: 'standard' | 'priority' | 'batch' | null;\n\n /**\n * Inference speed mode. `fast` provides significantly faster output token\n * generation at premium pricing. Not all models support `fast`; invalid\n * combinations are rejected at create time.\n */\n speed: 'standard' | 'fast' | null;\n}\n\nexport interface BetaUserLocation {\n type: 'approximate';\n\n /**\n * The city of the user.\n */\n city?: string | null;\n\n /**\n * The two letter\n * [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the\n * user.\n */\n country?: string | null;\n\n /**\n * The region of the user.\n */\n region?: string | null;\n\n /**\n * The [IANA timezone](https://nodatime.org/TimeZones) of the user.\n */\n timezone?: string | null;\n}\n\nexport interface BetaWebFetchBlock {\n content: BetaDocumentBlock;\n\n /**\n * ISO 8601 timestamp when the content was retrieved\n */\n retrieved_at: string | null;\n\n type: 'web_fetch_result';\n\n /**\n * Fetched content URL\n */\n url: string;\n}\n\nexport interface BetaWebFetchBlockParam {\n content: BetaRequestDocumentBlock;\n\n type: 'web_fetch_result';\n\n /**\n * Fetched content URL\n */\n url: string;\n\n /**\n * ISO 8601 timestamp when the content was retrieved\n */\n retrieved_at?: string | null;\n}\n\nexport interface BetaWebFetchTool20250910 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'web_fetch';\n\n type: 'web_fetch_20250910';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * List of domains to allow fetching from\n */\n allowed_domains?: Array<string> | null;\n\n /**\n * List of domains to block fetching from\n */\n blocked_domains?: Array<string> | null;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Citations configuration for fetched documents. Citations are disabled by\n * default.\n */\n citations?: BetaCitationsConfigParam | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Maximum number of tokens used by including web page text content in the context.\n * The limit is approximate and does not apply to binary content such as PDFs.\n */\n max_content_tokens?: number | null;\n\n /**\n * Maximum number of times the tool can be used in the API request.\n */\n max_uses?: number | null;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\nexport interface BetaWebFetchTool20260209 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'web_fetch';\n\n type: 'web_fetch_20260209';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * List of domains to allow fetching from\n */\n allowed_domains?: Array<string> | null;\n\n /**\n * List of domains to block fetching from\n */\n blocked_domains?: Array<string> | null;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Citations configuration for fetched documents. Citations are disabled by\n * default.\n */\n citations?: BetaCitationsConfigParam | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Maximum number of tokens used by including web page text content in the context.\n * The limit is approximate and does not apply to binary content such as PDFs.\n */\n max_content_tokens?: number | null;\n\n /**\n * Maximum number of times the tool can be used in the API request.\n */\n max_uses?: number | null;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n}\n\n/**\n * Web fetch tool with use_cache parameter for bypassing cached content.\n */\nexport interface BetaWebFetchTool20260309 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'web_fetch';\n\n type: 'web_fetch_20260309';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * List of domains to allow fetching from\n */\n allowed_domains?: Array<string> | null;\n\n /**\n * List of domains to block fetching from\n */\n blocked_domains?: Array<string> | null;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Citations configuration for fetched documents. Citations are disabled by\n * default.\n */\n citations?: BetaCitationsConfigParam | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Maximum number of tokens used by including web page text content in the context.\n * The limit is approximate and does not apply to binary content such as PDFs.\n */\n max_content_tokens?: number | null;\n\n /**\n * Maximum number of times the tool can be used in the API request.\n */\n max_uses?: number | null;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n\n /**\n * Whether to use cached content. Set to false to bypass the cache and fetch fresh\n * content. Only set to false when the user explicitly requests fresh content or\n * when fetching rapidly-changing sources.\n */\n use_cache?: boolean;\n}\n\nexport interface BetaWebFetchTool20260318 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'web_fetch';\n\n type: 'web_fetch_20260318';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * List of domains to allow fetching from\n */\n allowed_domains?: Array<string> | null;\n\n /**\n * List of domains to block fetching from\n */\n blocked_domains?: Array<string> | null;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Citations configuration for fetched documents. Citations are disabled by\n * default.\n */\n citations?: BetaCitationsConfigParam | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Maximum number of tokens used by including web page text content in the context.\n * The limit is approximate and does not apply to binary content such as PDFs.\n */\n max_content_tokens?: number | null;\n\n /**\n * Maximum number of times the tool can be used in the API request.\n */\n max_uses?: number | null;\n\n /**\n * How this tool's result blocks appear in the API response when the result was\n * consumed by a completed code_execution call in the same turn. 'full' returns the\n * complete content (default). 'excluded' drops the nested server_tool_use and\n * result block pair entirely. Results from direct calls, or from code_execution\n * calls that paused before completing, are always returned in full so they can be\n * sent back on the next turn.\n */\n response_inclusion?: 'full' | 'excluded';\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n\n /**\n * Whether to use cached content. Set to false to bypass the cache and fetch fresh\n * content. Only set to false when the user explicitly requests fresh content or\n * when fetching rapidly-changing sources.\n */\n use_cache?: boolean;\n}\n\nexport interface BetaWebFetchToolResultBlock {\n content: BetaWebFetchToolResultErrorBlock | BetaWebFetchBlock;\n\n tool_use_id: string;\n\n type: 'web_fetch_tool_result';\n\n /**\n * Tool invocation directly from the model.\n */\n caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;\n}\n\nexport interface BetaWebFetchToolResultBlockParam {\n content: BetaWebFetchToolResultErrorBlockParam | BetaWebFetchBlockParam;\n\n tool_use_id: string;\n\n type: 'web_fetch_tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Tool invocation directly from the model.\n */\n caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;\n}\n\nexport interface BetaWebFetchToolResultErrorBlock {\n error_code: BetaWebFetchToolResultErrorCode;\n\n type: 'web_fetch_tool_result_error';\n}\n\nexport interface BetaWebFetchToolResultErrorBlockParam {\n error_code: BetaWebFetchToolResultErrorCode;\n\n type: 'web_fetch_tool_result_error';\n}\n\nexport type BetaWebFetchToolResultErrorCode =\n | 'invalid_tool_input'\n | 'url_too_long'\n | 'url_not_allowed'\n | 'url_not_in_prior_context'\n | 'url_not_accessible'\n | 'unsupported_content_type'\n | 'too_many_requests'\n | 'max_uses_exceeded'\n | 'unavailable';\n\nexport interface BetaWebSearchResultBlock {\n encrypted_content: string;\n\n page_age: string | null;\n\n title: string;\n\n type: 'web_search_result';\n\n url: string;\n}\n\nexport interface BetaWebSearchResultBlockParam {\n encrypted_content: string;\n\n title: string;\n\n type: 'web_search_result';\n\n url: string;\n\n page_age?: string | null;\n}\n\nexport interface BetaWebSearchTool20250305 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'web_search';\n\n type: 'web_search_20250305';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * If provided, only these domains will be included in results. Cannot be used\n * alongside `blocked_domains`.\n */\n allowed_domains?: Array<string> | null;\n\n /**\n * If provided, these domains will never appear in results. Cannot be used\n * alongside `allowed_domains`.\n */\n blocked_domains?: Array<string> | null;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Maximum number of times the tool can be used in the API request.\n */\n max_uses?: number | null;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n\n /**\n * Parameters for the user's location. Used to provide more relevant search\n * results.\n */\n user_location?: BetaUserLocation | null;\n}\n\nexport interface BetaWebSearchTool20260209 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'web_search';\n\n type: 'web_search_20260209';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * If provided, only these domains will be included in results. Cannot be used\n * alongside `blocked_domains`.\n */\n allowed_domains?: Array<string> | null;\n\n /**\n * If provided, these domains will never appear in results. Cannot be used\n * alongside `allowed_domains`.\n */\n blocked_domains?: Array<string> | null;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Maximum number of times the tool can be used in the API request.\n */\n max_uses?: number | null;\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n\n /**\n * Parameters for the user's location. Used to provide more relevant search\n * results.\n */\n user_location?: BetaUserLocation | null;\n}\n\nexport interface BetaWebSearchTool20260318 {\n /**\n * Name of the tool.\n *\n * This is how the tool will be called by the model and in `tool_use` blocks.\n */\n name: 'web_search';\n\n type: 'web_search_20260318';\n\n allowed_callers?: Array<\n 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'\n >;\n\n /**\n * If provided, only these domains will be included in results. Cannot be used\n * alongside `blocked_domains`.\n */\n allowed_domains?: Array<string> | null;\n\n /**\n * If provided, these domains will never appear in results. Cannot be used\n * alongside `allowed_domains`.\n */\n blocked_domains?: Array<string> | null;\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * If true, tool will not be included in initial system prompt. Only loaded when\n * returned via tool_reference from tool search.\n */\n defer_loading?: boolean;\n\n /**\n * Maximum number of times the tool can be used in the API request.\n */\n max_uses?: number | null;\n\n /**\n * How this tool's result blocks appear in the API response when the result was\n * consumed by a completed code_execution call in the same turn. 'full' returns the\n * complete content (default). 'excluded' drops the nested server_tool_use and\n * result block pair entirely. Results from direct calls, or from code_execution\n * calls that paused before completing, are always returned in full so they can be\n * sent back on the next turn.\n */\n response_inclusion?: 'full' | 'excluded';\n\n /**\n * When true, guarantees schema validation on tool names and inputs\n */\n strict?: boolean;\n\n /**\n * Parameters for the user's location. Used to provide more relevant search\n * results.\n */\n user_location?: BetaUserLocation | null;\n}\n\nexport interface BetaWebSearchToolRequestError {\n error_code: BetaWebSearchToolResultErrorCode;\n\n type: 'web_search_tool_result_error';\n}\n\nexport interface BetaWebSearchToolResultBlock {\n content: BetaWebSearchToolResultBlockContent;\n\n tool_use_id: string;\n\n type: 'web_search_tool_result';\n\n /**\n * Tool invocation directly from the model.\n */\n caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;\n}\n\nexport type BetaWebSearchToolResultBlockContent =\n | BetaWebSearchToolResultError\n | Array<BetaWebSearchResultBlock>;\n\nexport interface BetaWebSearchToolResultBlockParam {\n content: BetaWebSearchToolResultBlockParamContent;\n\n tool_use_id: string;\n\n type: 'web_search_tool_result';\n\n /**\n * Create a cache control breakpoint at this content block.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Tool invocation directly from the model.\n */\n caller?: BetaDirectCaller | BetaServerToolCaller | BetaServerToolCaller20260120;\n}\n\nexport type BetaWebSearchToolResultBlockParamContent =\n | Array<BetaWebSearchResultBlockParam>\n | BetaWebSearchToolRequestError;\n\nexport interface BetaWebSearchToolResultError {\n error_code: BetaWebSearchToolResultErrorCode;\n\n type: 'web_search_tool_result_error';\n}\n\nexport type BetaWebSearchToolResultErrorCode =\n | 'invalid_tool_input'\n | 'unavailable'\n | 'max_uses_exceeded'\n | 'too_many_requests'\n | 'query_too_long'\n | 'request_too_large';\n\n/**\n * @deprecated BetaRequestDocumentBlock should be used insated\n */\nexport type BetaBase64PDFBlock = BetaRequestDocumentBlock;\n\nexport type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming;\n\nexport interface MessageCreateParamsBase {\n /**\n * Body param: The maximum number of tokens to generate before stopping.\n *\n * Note that our models may stop _before_ reaching this maximum. This parameter\n * only specifies the absolute maximum number of tokens to generate.\n *\n * Set to `0` to populate the\n * [prompt cache](https://platform.puku.com/docs/en/build-with-puku/prompt-caching#pre-warming-the-cache)\n * without generating a response.\n *\n * Different models have different maximum values for this parameter. See\n * [models](https://platform.puku.com/docs/en/about-puku/models/overview) for\n * details.\n */\n max_tokens: number;\n\n /**\n * Body param: Input messages.\n *\n * Our models are trained to operate on alternating `user` and `assistant`\n * conversational turns. When creating a new `Message`, you specify the prior\n * conversational turns with the `messages` parameter, and the model then generates\n * the next `Message` in the conversation. Consecutive `user` or `assistant` turns\n * in your request will be combined into a single turn.\n *\n * Each input message must be an object with a `role` and `content`. You can\n * specify a single `user`-role message, or you can include multiple `user` and\n * `assistant` messages.\n *\n * If the final message uses the `assistant` role, the response content will\n * continue immediately from the content in that message. This can be used to\n * constrain part of the model's response.\n *\n * Example with a single `user` message:\n *\n * ```json\n * [{ \"role\": \"user\", \"content\": \"Hello, Puku\" }]\n * ```\n *\n * Example with multiple conversational turns:\n *\n * ```json\n * [\n * { \"role\": \"user\", \"content\": \"Hello there.\" },\n * { \"role\": \"assistant\", \"content\": \"Hi, I'm Puku. How can I help you?\" },\n * { \"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\" }\n * ]\n * ```\n *\n * Example with a partially-filled response from Puku:\n *\n * ```json\n * [\n * {\n * \"role\": \"user\",\n * \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"\n * },\n * { \"role\": \"assistant\", \"content\": \"The best answer is (\" }\n * ]\n * ```\n *\n * Each input message `content` may be either a single `string` or an array of\n * content blocks, where each block has a specific `type`. Using a `string` for\n * `content` is shorthand for an array of one content block of type `\"text\"`. The\n * following input messages are equivalent:\n *\n * ```json\n * { \"role\": \"user\", \"content\": \"Hello, Puku\" }\n * ```\n *\n * ```json\n * { \"role\": \"user\", \"content\": [{ \"type\": \"text\", \"text\": \"Hello, Puku\" }] }\n * ```\n *\n * See\n * [input examples](https://platform.puku.com/docs/en/build-with-puku/working-with-messages).\n *\n * Note that if you want to include a\n * [system prompt](https://platform.puku.com/docs/en/build-with-puku/prompt-engineering/puku-prompting-best-practices#give-puku-a-role),\n * you can use the top-level `system` parameter — there is no `\"system\"` role for\n * input messages in the Messages API.\n *\n * There is a limit of 100,000 messages in a single request.\n */\n messages: Array<BetaMessageParam>;\n\n /**\n * Body param: The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n\n /**\n * Body param: Top-level cache control automatically applies a cache_control marker\n * to the last cacheable block in the request.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Body param: Container identifier for reuse across requests.\n */\n container?: BetaContainerParams | string | null;\n\n /**\n * Body param: Context management configuration.\n *\n * This allows you to control how Puku manages context across multiple requests,\n * such as whether to clear function results or not.\n */\n context_management?: BetaContextManagementConfig | null;\n\n /**\n * Body param: Request-level diagnostics. Currently carries the previous response\n * id for prompt-cache divergence reporting.\n */\n diagnostics?: BetaDiagnosticsParam | null;\n\n /**\n * Body param: The `fallback_credit_token` from a prior refusal's `stop_details`.\n *\n * When a preceding request was refused and returned a `fallback_credit_token`,\n * pass that code here on the retry to have the retry's cache-creation tokens for\n * the prefix that was warm on the refused model billed at the cache-read rate.\n * Must be redeemed by the same organization and workspace, with the same request\n * body (optionally extended by one appended `assistant` message whose content is\n * the partial text — with any trailing whitespace stripped from the final text\n * block — and paired server-tool blocks streamed before the refusal; the\n * appended-assistant form is not available for requests with `output_format` set\n * or forced `tool_choice`), on an eligible fallback model, on the same platform,\n * and within 5 minutes of the refusal; a mismatch is a 400. A token minted\n * mid-server-tool-loop whose partial content was continuable may only be redeemed\n * with the appended-assistant form — if an exact-body retry is rejected with a 400\n * saying the token must be redeemed by continuing the partial response, retry with\n * the appended-assistant form instead.\n *\n * When the appended-assistant form is used on a model that otherwise disallows\n * assistant-turn prefill, this token also authorizes that one prefill.\n */\n fallback_credit_token?: string | BetaFallbackCreditTokenParam | null;\n\n /**\n * Body param: Opt-in server-side retry on one or more substitute models when the\n * requested model declines for policy reasons. Tried in order: if the first entry\n * also declines, the second is tried, and so on. The string \"default\" requests the\n * requested model's server-defined default fallback configuration.\n */\n fallbacks?: BetaFallbacksParam | null;\n\n /**\n * Body param: Specifies the geographic region for inference processing. If not\n * specified, the workspace's `default_inference_geo` is used.\n */\n inference_geo?: string | null;\n\n /**\n * Body param: MCP servers to be utilized in this request\n */\n mcp_servers?: Array<BetaRequestMCPServerURLDefinition>;\n\n /**\n * Body param: An object describing metadata about the request.\n */\n metadata?: BetaMetadata;\n\n /**\n * Body param: Configuration options for the model's output, such as the output\n * format.\n */\n output_config?: BetaOutputConfig;\n\n /**\n * Body param: Deprecated: Use `output_config.format` instead. See\n * [structured outputs](https://platform.puku.com/docs/en/build-with-puku/structured-outputs)\n *\n * A schema to specify Puku's output format in responses. This parameter will be\n * removed in a future release.\n */\n output_format?: BetaJSONOutputFormat | null;\n\n /**\n * Body param: Determines whether to use priority capacity (if available) or\n * standard capacity for this request.\n *\n * PukuAI offers different levels of service for your API requests. See\n * [service-tiers](https://platform.puku.com/docs/en/api/service-tiers) for\n * details.\n */\n service_tier?: 'auto' | 'standard_only';\n\n /**\n * Body param: Inference speed mode. `fast` provides significantly faster output\n * token generation at premium pricing. Not all models support `fast`; invalid\n * combinations are rejected at create time.\n */\n speed?: 'standard' | 'fast' | null;\n\n /**\n * Body param: Custom text sequences that will cause the model to stop generating.\n *\n * Our models will normally stop when they have naturally completed their turn,\n * which will result in a response `stop_reason` of `\"end_turn\"`.\n *\n * If you want the model to stop generating when it encounters custom strings of\n * text, you can use the `stop_sequences` parameter. If the model encounters one of\n * the custom sequences, the response `stop_reason` value will be `\"stop_sequence\"`\n * and the response `stop_sequence` value will contain the matched stop sequence.\n */\n stop_sequences?: Array<string>;\n\n /**\n * Body param: Whether to incrementally stream the response using server-sent\n * events.\n *\n * See [streaming](https://platform.puku.com/docs/en/build-with-puku/streaming)\n * for details.\n */\n stream?: boolean;\n\n /**\n * Body param: System prompt.\n *\n * A system prompt is a way of providing context and instructions to Puku, such\n * as specifying a particular goal or role. See our\n * [guide to system prompts](https://platform.puku.com/docs/en/build-with-puku/prompt-engineering/puku-prompting-best-practices#give-puku-a-role).\n */\n system?: string | Array<BetaTextBlockParam>;\n\n /**\n * @deprecated Deprecated. Models released after Puku Opus 4.6 do not support\n * setting temperature. A value of 1.0 of will be accepted for backwards\n * compatibility, all other values will be rejected with a 400 error.\n */\n temperature?: number;\n\n /**\n * Body param: Configuration for enabling Puku's extended thinking.\n *\n * When enabled, responses include `thinking` content blocks showing Puku's\n * thinking process before the final answer. Requires a minimum budget of 1,024\n * tokens and counts towards your `max_tokens` limit.\n *\n * See\n * [extended thinking](https://platform.puku.com/docs/en/build-with-puku/extended-thinking)\n * for details.\n */\n thinking?: BetaThinkingConfigParam;\n\n /**\n * Body param: How the model should use the provided tools. The model can use a\n * specific tool, any available tool, decide by itself, or not use tools at all.\n */\n tool_choice?: BetaToolChoice;\n\n /**\n * Body param: Definitions of tools that the model may use.\n *\n * If you include `tools` in your API request, the model may return `tool_use`\n * content blocks that represent the model's use of those tools. You can then run\n * those tools using the tool input generated by the model and then optionally\n * return results back to the model using `tool_result` content blocks.\n *\n * There are two types of tools: **client tools** and **server tools**. The\n * behavior described below applies to client tools. For\n * [server tools](https://platform.puku.com/docs/en/agents-and-tools/tool-use/server-tools),\n * see their individual documentation as each has its own behavior (e.g., the\n * [web search tool](https://platform.puku.com/docs/en/agents-and-tools/tool-use/web-search-tool)).\n *\n * Each tool definition includes:\n *\n * - `name`: Name of the tool.\n * - `description`: Optional, but strongly-recommended description of the tool.\n * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the\n * tool `input` shape that the model will produce in `tool_use` output content\n * blocks.\n *\n * For example, if you defined `tools` as:\n *\n * ```json\n * [\n * {\n * \"name\": \"get_stock_price\",\n * \"description\": \"Get the current stock price for a given ticker symbol.\",\n * \"input_schema\": {\n * \"type\": \"object\",\n * \"properties\": {\n * \"ticker\": {\n * \"type\": \"string\",\n * \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n * }\n * },\n * \"required\": [\"ticker\"]\n * }\n * }\n * ]\n * ```\n *\n * And then asked the model \"What's the S&P 500 at today?\", the model might produce\n * `tool_use` content blocks in the response like this:\n *\n * ```json\n * [\n * {\n * \"type\": \"tool_use\",\n * \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n * \"name\": \"get_stock_price\",\n * \"input\": { \"ticker\": \"^GSPC\" }\n * }\n * ]\n * ```\n *\n * You might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an\n * input, and return the following back to the model in a subsequent `user`\n * message:\n *\n * ```json\n * [\n * {\n * \"type\": \"tool_result\",\n * \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n * \"content\": \"259.75 USD\"\n * }\n * ]\n * ```\n *\n * Tools can be used for workflows that include running client-side tools and\n * functions, or more generally whenever you want the model to produce a particular\n * JSON structure of output.\n *\n * See our\n * [guide](https://platform.puku.com/docs/en/agents-and-tools/tool-use/overview)\n * for more details.\n */\n tools?: Array<BetaToolUnion>;\n\n /**\n * @deprecated Deprecated. Models released after Puku Opus 4.6 do not accept\n * top_k; any value will be rejected with a 400 error.\n */\n top_k?: number;\n\n /**\n * @deprecated Deprecated. Models released after Puku Opus 4.6 do not support\n * setting top_p. A value >= 0.99 will be accepted for backwards compatibility, all\n * other values will be rejected with a 400 error.\n */\n top_p?: number;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n\n /**\n * Header param: The user profile ID to attribute this request to. Use when acting\n * on behalf of a party other than your organization. Requires the `user-profiles`\n * beta header.\n */\n user_profile_id?: string;\n}\n\nexport namespace MessageCreateParams {\n export type MessageCreateParamsNonStreaming = BetaMessagesAPI.MessageCreateParamsNonStreaming;\n export type MessageCreateParamsStreaming = BetaMessagesAPI.MessageCreateParamsStreaming;\n}\n\nexport interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase {\n /**\n * Body param: Whether to incrementally stream the response using server-sent\n * events.\n *\n * See [streaming](https://platform.puku.com/docs/en/build-with-puku/streaming)\n * for details.\n */\n stream?: false;\n}\n\nexport interface MessageCreateParamsStreaming extends MessageCreateParamsBase {\n /**\n * Body param: Whether to incrementally stream the response using server-sent\n * events.\n *\n * See [streaming](https://platform.puku.com/docs/en/build-with-puku/streaming)\n * for details.\n */\n stream: true;\n}\n\nexport interface MessageCountTokensParams {\n /**\n * Body param: Input messages.\n *\n * Our models are trained to operate on alternating `user` and `assistant`\n * conversational turns. When creating a new `Message`, you specify the prior\n * conversational turns with the `messages` parameter, and the model then generates\n * the next `Message` in the conversation. Consecutive `user` or `assistant` turns\n * in your request will be combined into a single turn.\n *\n * Each input message must be an object with a `role` and `content`. You can\n * specify a single `user`-role message, or you can include multiple `user` and\n * `assistant` messages.\n *\n * If the final message uses the `assistant` role, the response content will\n * continue immediately from the content in that message. This can be used to\n * constrain part of the model's response.\n *\n * Example with a single `user` message:\n *\n * ```json\n * [{ \"role\": \"user\", \"content\": \"Hello, Puku\" }]\n * ```\n *\n * Example with multiple conversational turns:\n *\n * ```json\n * [\n * { \"role\": \"user\", \"content\": \"Hello there.\" },\n * { \"role\": \"assistant\", \"content\": \"Hi, I'm Puku. How can I help you?\" },\n * { \"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\" }\n * ]\n * ```\n *\n * Example with a partially-filled response from Puku:\n *\n * ```json\n * [\n * {\n * \"role\": \"user\",\n * \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"\n * },\n * { \"role\": \"assistant\", \"content\": \"The best answer is (\" }\n * ]\n * ```\n *\n * Each input message `content` may be either a single `string` or an array of\n * content blocks, where each block has a specific `type`. Using a `string` for\n * `content` is shorthand for an array of one content block of type `\"text\"`. The\n * following input messages are equivalent:\n *\n * ```json\n * { \"role\": \"user\", \"content\": \"Hello, Puku\" }\n * ```\n *\n * ```json\n * { \"role\": \"user\", \"content\": [{ \"type\": \"text\", \"text\": \"Hello, Puku\" }] }\n * ```\n *\n * See\n * [input examples](https://platform.puku.com/docs/en/build-with-puku/working-with-messages).\n *\n * Note that if you want to include a\n * [system prompt](https://platform.puku.com/docs/en/build-with-puku/prompt-engineering/puku-prompting-best-practices#give-puku-a-role),\n * you can use the top-level `system` parameter — there is no `\"system\"` role for\n * input messages in the Messages API.\n *\n * There is a limit of 100,000 messages in a single request.\n */\n messages: Array<BetaMessageParam>;\n\n /**\n * Body param: The model that will complete your prompt.\n *\n * See [models](https://docs.puku.com/en/docs/models-overview) for additional\n * details and options.\n */\n model: MessagesAPI.Model;\n\n /**\n * Body param: Top-level cache control automatically applies a cache_control marker\n * to the last cacheable block in the request.\n */\n cache_control?: BetaCacheControlEphemeral | null;\n\n /**\n * Body param: Context management configuration.\n *\n * This allows you to control how Puku manages context across multiple requests,\n * such as whether to clear function results or not.\n */\n context_management?: BetaContextManagementConfig | null;\n\n /**\n * Body param: MCP servers to be utilized in this request\n */\n mcp_servers?: Array<BetaRequestMCPServerURLDefinition>;\n\n /**\n * Body param: Configuration options for the model's output, such as the output\n * format.\n */\n output_config?: BetaOutputConfig;\n\n /**\n * Body param: Deprecated: Use `output_config.format` instead. See\n * [structured outputs](https://platform.puku.com/docs/en/build-with-puku/structured-outputs)\n *\n * A schema to specify Puku's output format in responses. This parameter will be\n * removed in a future release.\n */\n output_format?: BetaJSONOutputFormat | null;\n\n /**\n * Body param: Inference speed mode. `fast` provides significantly faster output\n * token generation at premium pricing. Not all models support `fast`; invalid\n * combinations are rejected at create time.\n */\n speed?: 'standard' | 'fast' | null;\n\n /**\n * Body param: System prompt.\n *\n * A system prompt is a way of providing context and instructions to Puku, such\n * as specifying a particular goal or role. See our\n * [guide to system prompts](https://platform.puku.com/docs/en/build-with-puku/prompt-engineering/puku-prompting-best-practices#give-puku-a-role).\n */\n system?: string | Array<BetaTextBlockParam>;\n\n /**\n * Body param: Configuration for enabling Puku's extended thinking.\n *\n * When enabled, responses include `thinking` content blocks showing Puku's\n * thinking process before the final answer. Requires a minimum budget of 1,024\n * tokens and counts towards your `max_tokens` limit.\n *\n * See\n * [extended thinking](https://platform.puku.com/docs/en/build-with-puku/extended-thinking)\n * for details.\n */\n thinking?: BetaThinkingConfigParam;\n\n /**\n * Body param: How the model should use the provided tools. The model can use a\n * specific tool, any available tool, decide by itself, or not use tools at all.\n */\n tool_choice?: BetaToolChoice;\n\n /**\n * Body param: Definitions of tools that the model may use.\n *\n * If you include `tools` in your API request, the model may return `tool_use`\n * content blocks that represent the model's use of those tools. You can then run\n * those tools using the tool input generated by the model and then optionally\n * return results back to the model using `tool_result` content blocks.\n *\n * There are two types of tools: **client tools** and **server tools**. The\n * behavior described below applies to client tools. For\n * [server tools](https://platform.puku.com/docs/en/agents-and-tools/tool-use/server-tools),\n * see their individual documentation as each has its own behavior (e.g., the\n * [web search tool](https://platform.puku.com/docs/en/agents-and-tools/tool-use/web-search-tool)).\n *\n * Each tool definition includes:\n *\n * - `name`: Name of the tool.\n * - `description`: Optional, but strongly-recommended description of the tool.\n * - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the\n * tool `input` shape that the model will produce in `tool_use` output content\n * blocks.\n *\n * For example, if you defined `tools` as:\n *\n * ```json\n * [\n * {\n * \"name\": \"get_stock_price\",\n * \"description\": \"Get the current stock price for a given ticker symbol.\",\n * \"input_schema\": {\n * \"type\": \"object\",\n * \"properties\": {\n * \"ticker\": {\n * \"type\": \"string\",\n * \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n * }\n * },\n * \"required\": [\"ticker\"]\n * }\n * }\n * ]\n * ```\n *\n * And then asked the model \"What's the S&P 500 at today?\", the model might produce\n * `tool_use` content blocks in the response like this:\n *\n * ```json\n * [\n * {\n * \"type\": \"tool_use\",\n * \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n * \"name\": \"get_stock_price\",\n * \"input\": { \"ticker\": \"^GSPC\" }\n * }\n * ]\n * ```\n *\n * You might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an\n * input, and return the following back to the model in a subsequent `user`\n * message:\n *\n * ```json\n * [\n * {\n * \"type\": \"tool_result\",\n * \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n * \"content\": \"259.75 USD\"\n * }\n * ]\n * ```\n *\n * Tools can be used for workflows that include running client-side tools and\n * functions, or more generally whenever you want the model to produce a particular\n * JSON structure of output.\n *\n * See our\n * [guide](https://platform.puku.com/docs/en/agents-and-tools/tool-use/overview)\n * for more details.\n */\n tools?: Array<\n | BetaTool\n | BetaToolBash20241022\n | BetaToolBash20250124\n | BetaCodeExecutionTool20250522\n | BetaCodeExecutionTool20250825\n | BetaCodeExecutionTool20260120\n | BetaCodeExecutionTool20260521\n | BetaBrowserToolset20260801\n | BetaToolComputerUse20241022\n | BetaMemoryTool20250818\n | BetaToolComputerUse20250124\n | BetaToolTextEditor20241022\n | BetaToolComputerUse20251124\n | BetaComputerToolset20260801\n | BetaToolTextEditor20250124\n | BetaToolTextEditor20250429\n | BetaToolTextEditor20250728\n | BetaWebSearchTool20250305\n | BetaWebFetchTool20250910\n | BetaWebSearchTool20260209\n | BetaWebFetchTool20260209\n | BetaWebFetchTool20260309\n | BetaWebSearchTool20260318\n | BetaWebFetchTool20260318\n | BetaAdvisorTool20260301\n | BetaToolSearchToolBm25_20251119\n | BetaToolSearchToolRegex20251119\n | BetaMCPToolset\n >;\n\n /**\n * Header param: Optional header to specify the beta version(s) you want to use.\n */\n betas?: Array<BetaAPI.PukuBeta>;\n\n /**\n * Header param: The user profile ID to attribute this request to. Use when acting\n * on behalf of a party other than your organization. Requires the `user-profiles`\n * beta header.\n */\n user_profile_id?: string;\n}\n\nexport { BetaToolRunner, type BetaToolRunnerParams } from '../../../lib/tools/BetaToolRunner';\nexport { ToolError } from '../../../lib/tools/ToolError';\n\nMessages.Batches = Batches;\n\nMessages.BetaToolRunner = BetaToolRunner;\nMessages.ToolError = ToolError;\n\nexport declare namespace Messages {\n export {\n type BetaAdvisorMessageIterationUsage as BetaAdvisorMessageIterationUsage,\n type BetaAdvisorRedactedResultBlock as BetaAdvisorRedactedResultBlock,\n type BetaAdvisorRedactedResultBlockParam as BetaAdvisorRedactedResultBlockParam,\n type BetaAdvisorResultBlock as BetaAdvisorResultBlock,\n type BetaAdvisorResultBlockParam as BetaAdvisorResultBlockParam,\n type BetaAdvisorTool20260301 as BetaAdvisorTool20260301,\n type BetaAdvisorToolResultBlock as BetaAdvisorToolResultBlock,\n type BetaAdvisorToolResultBlockParam as BetaAdvisorToolResultBlockParam,\n type BetaAdvisorToolResultError as BetaAdvisorToolResultError,\n type BetaAdvisorToolResultErrorParam as BetaAdvisorToolResultErrorParam,\n type BetaAllThinkingTurns as BetaAllThinkingTurns,\n type BetaBase64ImageSource as BetaBase64ImageSource,\n type BetaBase64PDFSource as BetaBase64PDFSource,\n type BetaBashCodeExecutionOutputBlock as BetaBashCodeExecutionOutputBlock,\n type BetaBashCodeExecutionOutputBlockParam as BetaBashCodeExecutionOutputBlockParam,\n type BetaBashCodeExecutionResultBlock as BetaBashCodeExecutionResultBlock,\n type BetaBashCodeExecutionResultBlockParam as BetaBashCodeExecutionResultBlockParam,\n type BetaBashCodeExecutionToolResultBlock as BetaBashCodeExecutionToolResultBlock,\n type BetaBashCodeExecutionToolResultBlockParam as BetaBashCodeExecutionToolResultBlockParam,\n type BetaBashCodeExecutionToolResultError as BetaBashCodeExecutionToolResultError,\n type BetaBashCodeExecutionToolResultErrorParam as BetaBashCodeExecutionToolResultErrorParam,\n type BetaBrowserCloseTabConfig as BetaBrowserCloseTabConfig,\n type BetaBrowserDoubleClickConfig as BetaBrowserDoubleClickConfig,\n type BetaBrowserFileUploadConfig as BetaBrowserFileUploadConfig,\n type BetaBrowserFindConfig as BetaBrowserFindConfig,\n type BetaBrowserFormInputConfig as BetaBrowserFormInputConfig,\n type BetaBrowserGetPageTextConfig as BetaBrowserGetPageTextConfig,\n type BetaBrowserHoldKeyConfig as BetaBrowserHoldKeyConfig,\n type BetaBrowserHoverConfig as BetaBrowserHoverConfig,\n type BetaBrowserJavascriptExecConfig as BetaBrowserJavascriptExecConfig,\n type BetaBrowserKeyConfig as BetaBrowserKeyConfig,\n type BetaBrowserLeftClickConfig as BetaBrowserLeftClickConfig,\n type BetaBrowserLeftClickDragConfig as BetaBrowserLeftClickDragConfig,\n type BetaBrowserLeftMouseDownConfig as BetaBrowserLeftMouseDownConfig,\n type BetaBrowserLeftMouseUpConfig as BetaBrowserLeftMouseUpConfig,\n type BetaBrowserListTabsConfig as BetaBrowserListTabsConfig,\n type BetaBrowserMiddleClickConfig as BetaBrowserMiddleClickConfig,\n type BetaBrowserMouseMoveConfig as BetaBrowserMouseMoveConfig,\n type BetaBrowserNavigateConfig as BetaBrowserNavigateConfig,\n type BetaBrowserNewTabConfig as BetaBrowserNewTabConfig,\n type BetaBrowserReadConsoleConfig as BetaBrowserReadConsoleConfig,\n type BetaBrowserReadNetworkConfig as BetaBrowserReadNetworkConfig,\n type BetaBrowserReadPageConfig as BetaBrowserReadPageConfig,\n type BetaBrowserRightClickConfig as BetaBrowserRightClickConfig,\n type BetaBrowserScreenshotConfig as BetaBrowserScreenshotConfig,\n type BetaBrowserScrollConfig as BetaBrowserScrollConfig,\n type BetaBrowserScrollToConfig as BetaBrowserScrollToConfig,\n type BetaBrowserStateBlockParam as BetaBrowserStateBlockParam,\n type BetaBrowserStateChange as BetaBrowserStateChange,\n type BetaBrowserStateChangeDownloadCompleted as BetaBrowserStateChangeDownloadCompleted,\n type BetaBrowserStateChangeDownloadFailed as BetaBrowserStateChangeDownloadFailed,\n type BetaBrowserStateChangeDownloadStarted as BetaBrowserStateChangeDownloadStarted,\n type BetaBrowserStateChangeTabOpened as BetaBrowserStateChangeTabOpened,\n type BetaBrowserStateTabEntry as BetaBrowserStateTabEntry,\n type BetaBrowserSwitchTabConfig as BetaBrowserSwitchTabConfig,\n type BetaBrowserToolset20260801 as BetaBrowserToolset20260801,\n type BetaBrowserToolsetConfigs as BetaBrowserToolsetConfigs,\n type BetaBrowserTripleClickConfig as BetaBrowserTripleClickConfig,\n type BetaBrowserTypeConfig as BetaBrowserTypeConfig,\n type BetaBrowserWaitConfig as BetaBrowserWaitConfig,\n type BetaBrowserZoomConfig as BetaBrowserZoomConfig,\n type BetaCacheControlEphemeral as BetaCacheControlEphemeral,\n type BetaCacheCreation as BetaCacheCreation,\n type BetaCacheMissMessagesChanged as BetaCacheMissMessagesChanged,\n type BetaCacheMissModelChanged as BetaCacheMissModelChanged,\n type BetaCacheMissPreviousMessageNotFound as BetaCacheMissPreviousMessageNotFound,\n type BetaCacheMissSystemChanged as BetaCacheMissSystemChanged,\n type BetaCacheMissToolsChanged as BetaCacheMissToolsChanged,\n type BetaCacheMissUnavailable as BetaCacheMissUnavailable,\n type BetaCitationCharLocation as BetaCitationCharLocation,\n type BetaCitationCharLocationParam as BetaCitationCharLocationParam,\n type BetaCitationConfig as BetaCitationConfig,\n type BetaCitationContentBlockLocation as BetaCitationContentBlockLocation,\n type BetaCitationContentBlockLocationParam as BetaCitationContentBlockLocationParam,\n type BetaCitationPageLocation as BetaCitationPageLocation,\n type BetaCitationPageLocationParam as BetaCitationPageLocationParam,\n type BetaCitationSearchResultLocation as BetaCitationSearchResultLocation,\n type BetaCitationSearchResultLocationParam as BetaCitationSearchResultLocationParam,\n type BetaCitationWebSearchResultLocationParam as BetaCitationWebSearchResultLocationParam,\n type BetaCitationsConfigParam as BetaCitationsConfigParam,\n type BetaCitationsDelta as BetaCitationsDelta,\n type BetaCitationsWebSearchResultLocation as BetaCitationsWebSearchResultLocation,\n type BetaClearThinking20251015Edit as BetaClearThinking20251015Edit,\n type BetaClearThinking20251015EditResponse as BetaClearThinking20251015EditResponse,\n type BetaClearToolUses20250919Edit as BetaClearToolUses20250919Edit,\n type BetaClearToolUses20250919EditResponse as BetaClearToolUses20250919EditResponse,\n type BetaCodeExecutionOutputBlock as BetaCodeExecutionOutputBlock,\n type BetaCodeExecutionOutputBlockParam as BetaCodeExecutionOutputBlockParam,\n type BetaCodeExecutionResultBlock as BetaCodeExecutionResultBlock,\n type BetaCodeExecutionResultBlockParam as BetaCodeExecutionResultBlockParam,\n type BetaCodeExecutionTool20250522 as BetaCodeExecutionTool20250522,\n type BetaCodeExecutionTool20250825 as BetaCodeExecutionTool20250825,\n type BetaCodeExecutionTool20260120 as BetaCodeExecutionTool20260120,\n type BetaCodeExecutionTool20260521 as BetaCodeExecutionTool20260521,\n type BetaCodeExecutionToolResultBlock as BetaCodeExecutionToolResultBlock,\n type BetaCodeExecutionToolResultBlockContent as BetaCodeExecutionToolResultBlockContent,\n type BetaCodeExecutionToolResultBlockParam as BetaCodeExecutionToolResultBlockParam,\n type BetaCodeExecutionToolResultBlockParamContent as BetaCodeExecutionToolResultBlockParamContent,\n type BetaCodeExecutionToolResultError as BetaCodeExecutionToolResultError,\n type BetaCodeExecutionToolResultErrorCode as BetaCodeExecutionToolResultErrorCode,\n type BetaCodeExecutionToolResultErrorParam as BetaCodeExecutionToolResultErrorParam,\n type BetaCompact20260112Edit as BetaCompact20260112Edit,\n type BetaCompactionBlock as BetaCompactionBlock,\n type BetaCompactionBlockParam as BetaCompactionBlockParam,\n type BetaCompactionContentBlockDelta as BetaCompactionContentBlockDelta,\n type BetaCompactionIterationUsage as BetaCompactionIterationUsage,\n type BetaComputerCursorPositionConfig as BetaComputerCursorPositionConfig,\n type BetaComputerDoubleClickConfig as BetaComputerDoubleClickConfig,\n type BetaComputerHoldKeyConfig as BetaComputerHoldKeyConfig,\n type BetaComputerKeyConfig as BetaComputerKeyConfig,\n type BetaComputerLeftClickConfig as BetaComputerLeftClickConfig,\n type BetaComputerLeftClickDragConfig as BetaComputerLeftClickDragConfig,\n type BetaComputerLeftMouseDownConfig as BetaComputerLeftMouseDownConfig,\n type BetaComputerLeftMouseUpConfig as BetaComputerLeftMouseUpConfig,\n type BetaComputerMiddleClickConfig as BetaComputerMiddleClickConfig,\n type BetaComputerMouseMoveConfig as BetaComputerMouseMoveConfig,\n type BetaComputerRightClickConfig as BetaComputerRightClickConfig,\n type BetaComputerScreenshotConfig as BetaComputerScreenshotConfig,\n type BetaComputerScrollConfig as BetaComputerScrollConfig,\n type BetaComputerToolset20260801 as BetaComputerToolset20260801,\n type BetaComputerToolsetConfigs as BetaComputerToolsetConfigs,\n type BetaComputerTripleClickConfig as BetaComputerTripleClickConfig,\n type BetaComputerTypeConfig as BetaComputerTypeConfig,\n type BetaComputerWaitConfig as BetaComputerWaitConfig,\n type BetaComputerZoomConfig as BetaComputerZoomConfig,\n type BetaContainer as BetaContainer,\n type BetaContainerParams as BetaContainerParams,\n type BetaContainerSkill as BetaContainerSkill,\n type BetaContainerUploadBlock as BetaContainerUploadBlock,\n type BetaContainerUploadBlockParam as BetaContainerUploadBlockParam,\n type BetaContentBlock as BetaContentBlock,\n type BetaContentBlockParam as BetaContentBlockParam,\n type BetaContentBlockSource as BetaContentBlockSource,\n type BetaContentBlockSourceContent as BetaContentBlockSourceContent,\n type BetaContextManagementConfig as BetaContextManagementConfig,\n type BetaContextManagementResponse as BetaContextManagementResponse,\n type BetaCountTokensContextManagementResponse as BetaCountTokensContextManagementResponse,\n type BetaDiagnostics as BetaDiagnostics,\n type BetaDiagnosticsParam as BetaDiagnosticsParam,\n type BetaDirectCaller as BetaDirectCaller,\n type BetaDocumentBlock as BetaDocumentBlock,\n type BetaEncryptedCodeExecutionResultBlock as BetaEncryptedCodeExecutionResultBlock,\n type BetaEncryptedCodeExecutionResultBlockParam as BetaEncryptedCodeExecutionResultBlockParam,\n type BetaFallbackBlock as BetaFallbackBlock,\n type BetaFallbackBlockParam as BetaFallbackBlockParam,\n type BetaFallbackCreditNotApplied as BetaFallbackCreditNotApplied,\n type BetaFallbackCreditRedeemed as BetaFallbackCreditRedeemed,\n type BetaFallbackCreditTokenParam as BetaFallbackCreditTokenParam,\n type BetaFallbackCreditUsage as BetaFallbackCreditUsage,\n type BetaFallbackInfo as BetaFallbackInfo,\n type BetaFallbackInfoParam as BetaFallbackInfoParam,\n type BetaFallbackMessageIterationUsage as BetaFallbackMessageIterationUsage,\n type BetaFallbackParam as BetaFallbackParam,\n type BetaFallbackRefusalTrigger as BetaFallbackRefusalTrigger,\n type BetaFallbacksParam as BetaFallbacksParam,\n type BetaFileDocumentSource as BetaFileDocumentSource,\n type BetaFileImageSource as BetaFileImageSource,\n type BetaImageBlockParam as BetaImageBlockParam,\n type BetaImageTransformationsParam as BetaImageTransformationsParam,\n type BetaInputJSONDelta as BetaInputJSONDelta,\n type BetaInputTokensClearAtLeast as BetaInputTokensClearAtLeast,\n type BetaInputTokensTrigger as BetaInputTokensTrigger,\n type BetaIterationsUsage as BetaIterationsUsage,\n type BetaJSONOutputFormat as BetaJSONOutputFormat,\n type BetaMCPToolConfig as BetaMCPToolConfig,\n type BetaMCPToolDefaultConfig as BetaMCPToolDefaultConfig,\n type BetaMCPToolResultBlock as BetaMCPToolResultBlock,\n type BetaMCPToolUseBlock as BetaMCPToolUseBlock,\n type BetaMCPToolUseBlockParam as BetaMCPToolUseBlockParam,\n type BetaMCPToolset as BetaMCPToolset,\n type BetaMemoryTool20250818 as BetaMemoryTool20250818,\n type BetaMemoryTool20250818Command as BetaMemoryTool20250818Command,\n type BetaMemoryTool20250818CreateCommand as BetaMemoryTool20250818CreateCommand,\n type BetaMemoryTool20250818DeleteCommand as BetaMemoryTool20250818DeleteCommand,\n type BetaMemoryTool20250818InsertCommand as BetaMemoryTool20250818InsertCommand,\n type BetaMemoryTool20250818RenameCommand as BetaMemoryTool20250818RenameCommand,\n type BetaMemoryTool20250818StrReplaceCommand as BetaMemoryTool20250818StrReplaceCommand,\n type BetaMemoryTool20250818ViewCommand as BetaMemoryTool20250818ViewCommand,\n type BetaMessage as BetaMessage,\n type BetaMessageDeltaUsage as BetaMessageDeltaUsage,\n type BetaMessageIterationUsage as BetaMessageIterationUsage,\n type BetaMessageParam as BetaMessageParam,\n type BetaMessageTokensCount as BetaMessageTokensCount,\n type BetaMetadata as BetaMetadata,\n type BetaOutputConfig as BetaOutputConfig,\n type BetaOutputTokensDetails as BetaOutputTokensDetails,\n type BetaPlainTextSource as BetaPlainTextSource,\n type BetaRawContentBlockDelta as BetaRawContentBlockDelta,\n type BetaRawContentBlockDeltaEvent as BetaRawContentBlockDeltaEvent,\n type BetaRawContentBlockStartEvent as BetaRawContentBlockStartEvent,\n type BetaRawContentBlockStopEvent as BetaRawContentBlockStopEvent,\n type BetaRawMessageDeltaEvent as BetaRawMessageDeltaEvent,\n type BetaRawMessageStartEvent as BetaRawMessageStartEvent,\n type BetaRawMessageStopEvent as BetaRawMessageStopEvent,\n type BetaRawMessageStreamEvent as BetaRawMessageStreamEvent,\n type BetaRedactedThinkingBlock as BetaRedactedThinkingBlock,\n type BetaRedactedThinkingBlockParam as BetaRedactedThinkingBlockParam,\n type BetaRefusalStopDetails as BetaRefusalStopDetails,\n type BetaRequestDocumentBlock as BetaRequestDocumentBlock,\n type BetaRequestMCPServerToolConfiguration as BetaRequestMCPServerToolConfiguration,\n type BetaRequestMCPServerURLDefinition as BetaRequestMCPServerURLDefinition,\n type BetaRequestMCPToolResultBlockParam as BetaRequestMCPToolResultBlockParam,\n type BetaRequestToolAdditionBlock as BetaRequestToolAdditionBlock,\n type BetaRequestToolRemovalBlock as BetaRequestToolRemovalBlock,\n type BetaSearchResultBlockParam as BetaSearchResultBlockParam,\n type BetaServerToolCaller as BetaServerToolCaller,\n type BetaServerToolCaller20260120 as BetaServerToolCaller20260120,\n type BetaServerToolUsage as BetaServerToolUsage,\n type BetaServerToolUseBlock as BetaServerToolUseBlock,\n type BetaServerToolUseBlockParam as BetaServerToolUseBlockParam,\n type BetaSignatureDelta as BetaSignatureDelta,\n type BetaSkillParams as BetaSkillParams,\n type BetaStopReason as BetaStopReason,\n type BetaSystemMessageOutputConfig as BetaSystemMessageOutputConfig,\n type BetaTextBlock as BetaTextBlock,\n type BetaTextBlockParam as BetaTextBlockParam,\n type BetaTextCitation as BetaTextCitation,\n type BetaTextCitationParam as BetaTextCitationParam,\n type BetaTextDelta as BetaTextDelta,\n type BetaTextEditorCodeExecutionCreateResultBlock as BetaTextEditorCodeExecutionCreateResultBlock,\n type BetaTextEditorCodeExecutionCreateResultBlockParam as BetaTextEditorCodeExecutionCreateResultBlockParam,\n type BetaTextEditorCodeExecutionStrReplaceResultBlock as BetaTextEditorCodeExecutionStrReplaceResultBlock,\n type BetaTextEditorCodeExecutionStrReplaceResultBlockParam as BetaTextEditorCodeExecutionStrReplaceResultBlockParam,\n type BetaTextEditorCodeExecutionToolResultBlock as BetaTextEditorCodeExecutionToolResultBlock,\n type BetaTextEditorCodeExecutionToolResultBlockParam as BetaTextEditorCodeExecutionToolResultBlockParam,\n type BetaTextEditorCodeExecutionToolResultError as BetaTextEditorCodeExecutionToolResultError,\n type BetaTextEditorCodeExecutionToolResultErrorParam as BetaTextEditorCodeExecutionToolResultErrorParam,\n type BetaTextEditorCodeExecutionViewResultBlock as BetaTextEditorCodeExecutionViewResultBlock,\n type BetaTextEditorCodeExecutionViewResultBlockParam as BetaTextEditorCodeExecutionViewResultBlockParam,\n type BetaThinkingBlock as BetaThinkingBlock,\n type BetaThinkingBlockBinding as BetaThinkingBlockBinding,\n type BetaThinkingBlockParam as BetaThinkingBlockParam,\n type BetaThinkingConfigAdaptive as BetaThinkingConfigAdaptive,\n type BetaThinkingConfigDisabled as BetaThinkingConfigDisabled,\n type BetaThinkingConfigEnabled as BetaThinkingConfigEnabled,\n type BetaThinkingConfigParam as BetaThinkingConfigParam,\n type BetaThinkingDelta as BetaThinkingDelta,\n type BetaThinkingDroppedInputTransformation as BetaThinkingDroppedInputTransformation,\n type BetaThinkingPrefixMismatchBehavior as BetaThinkingPrefixMismatchBehavior,\n type BetaThinkingTurns as BetaThinkingTurns,\n type BetaTokenTaskBudget as BetaTokenTaskBudget,\n type BetaTool as BetaTool,\n type BetaToolBash20241022 as BetaToolBash20241022,\n type BetaToolBash20250124 as BetaToolBash20250124,\n type BetaToolChangeMCPToolReference as BetaToolChangeMCPToolReference,\n type BetaToolChangeMCPToolsetReference as BetaToolChangeMCPToolsetReference,\n type BetaToolChangeToolReference as BetaToolChangeToolReference,\n type BetaToolChoice as BetaToolChoice,\n type BetaToolChoiceAny as BetaToolChoiceAny,\n type BetaToolChoiceAuto as BetaToolChoiceAuto,\n type BetaToolChoiceNone as BetaToolChoiceNone,\n type BetaToolChoiceTool as BetaToolChoiceTool,\n type BetaToolComputerUse20241022 as BetaToolComputerUse20241022,\n type BetaToolComputerUse20250124 as BetaToolComputerUse20250124,\n type BetaToolComputerUse20251124 as BetaToolComputerUse20251124,\n type BetaToolReferenceBlock as BetaToolReferenceBlock,\n type BetaToolReferenceBlockParam as BetaToolReferenceBlockParam,\n type BetaToolResultBlockParam as BetaToolResultBlockParam,\n type BetaToolResultContentBlockParam as BetaToolResultContentBlockParam,\n type BetaToolSearchToolBm25_20251119 as BetaToolSearchToolBm25_20251119,\n type BetaToolSearchToolRegex20251119 as BetaToolSearchToolRegex20251119,\n type BetaToolSearchToolResultBlock as BetaToolSearchToolResultBlock,\n type BetaToolSearchToolResultBlockParam as BetaToolSearchToolResultBlockParam,\n type BetaToolSearchToolResultError as BetaToolSearchToolResultError,\n type BetaToolSearchToolResultErrorParam as BetaToolSearchToolResultErrorParam,\n type BetaToolSearchToolSearchResultBlock as BetaToolSearchToolSearchResultBlock,\n type BetaToolSearchToolSearchResultBlockParam as BetaToolSearchToolSearchResultBlockParam,\n type BetaToolTextEditor20241022 as BetaToolTextEditor20241022,\n type BetaToolTextEditor20250124 as BetaToolTextEditor20250124,\n type BetaToolTextEditor20250429 as BetaToolTextEditor20250429,\n type BetaToolTextEditor20250728 as BetaToolTextEditor20250728,\n type BetaToolUnion as BetaToolUnion,\n type BetaToolUseBlock as BetaToolUseBlock,\n type BetaToolUseBlockParam as BetaToolUseBlockParam,\n type BetaToolUsesKeep as BetaToolUsesKeep,\n type BetaToolUsesTrigger as BetaToolUsesTrigger,\n type BetaURLImageSource as BetaURLImageSource,\n type BetaURLPDFSource as BetaURLPDFSource,\n type BetaUsage as BetaUsage,\n type BetaUserLocation as BetaUserLocation,\n type BetaWebFetchBlock as BetaWebFetchBlock,\n type BetaWebFetchBlockParam as BetaWebFetchBlockParam,\n type BetaWebFetchTool20250910 as BetaWebFetchTool20250910,\n type BetaWebFetchTool20260209 as BetaWebFetchTool20260209,\n type BetaWebFetchTool20260309 as BetaWebFetchTool20260309,\n type BetaWebFetchTool20260318 as BetaWebFetchTool20260318,\n type BetaWebFetchToolResultBlock as BetaWebFetchToolResultBlock,\n type BetaWebFetchToolResultBlockParam as BetaWebFetchToolResultBlockParam,\n type BetaWebFetchToolResultErrorBlock as BetaWebFetchToolResultErrorBlock,\n type BetaWebFetchToolResultErrorBlockParam as BetaWebFetchToolResultErrorBlockParam,\n type BetaWebFetchToolResultErrorCode as BetaWebFetchToolResultErrorCode,\n type BetaWebSearchResultBlock as BetaWebSearchResultBlock,\n type BetaWebSearchResultBlockParam as BetaWebSearchResultBlockParam,\n type BetaWebSearchTool20250305 as BetaWebSearchTool20250305,\n type BetaWebSearchTool20260209 as BetaWebSearchTool20260209,\n type BetaWebSearchTool20260318 as BetaWebSearchTool20260318,\n type BetaWebSearchToolRequestError as BetaWebSearchToolRequestError,\n type BetaWebSearchToolResultBlock as BetaWebSearchToolResultBlock,\n type BetaWebSearchToolResultBlockContent as BetaWebSearchToolResultBlockContent,\n type BetaWebSearchToolResultBlockParam as BetaWebSearchToolResultBlockParam,\n type BetaWebSearchToolResultBlockParamContent as BetaWebSearchToolResultBlockParamContent,\n type BetaWebSearchToolResultError as BetaWebSearchToolResultError,\n type BetaWebSearchToolResultErrorCode as BetaWebSearchToolResultErrorCode,\n type BetaBase64PDFBlock as BetaBase64PDFBlock,\n type MessageCreateParams as MessageCreateParams,\n type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming,\n type MessageCreateParamsStreaming as MessageCreateParamsStreaming,\n type MessageCountTokensParams as MessageCountTokensParams,\n };\n\n export { type BetaToolRunnerParams, BetaToolRunner };\n export { ToolError };\n\n export {\n Batches as Batches,\n type BetaDeletedMessageBatch as BetaDeletedMessageBatch,\n type BetaMessageBatch as BetaMessageBatch,\n type BetaMessageBatchCanceledResult as BetaMessageBatchCanceledResult,\n type BetaMessageBatchErroredResult as BetaMessageBatchErroredResult,\n type BetaMessageBatchExpiredResult as BetaMessageBatchExpiredResult,\n type BetaMessageBatchIndividualResponse as BetaMessageBatchIndividualResponse,\n type BetaMessageBatchRequestCounts as BetaMessageBatchRequestCounts,\n type BetaMessageBatchResult as BetaMessageBatchResult,\n type BetaMessageBatchSucceededResult as BetaMessageBatchSucceededResult,\n type BetaMessageBatchesPage as BetaMessageBatchesPage,\n type BatchCreateParams as BatchCreateParams,\n type BatchRetrieveParams as BatchRetrieveParams,\n type BatchListParams as BatchListParams,\n type BatchDeleteParams as BatchDeleteParams,\n type BatchCancelParams as BatchCancelParams,\n type BatchResultsParams as BatchResultsParams,\n };\n}\n",
|
|
94
94
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { APIResource } from '../../../core/resource';\nimport { APIPromise } from '../../../core/api-promise';\nimport { Page, type PageParams, PagePromise } from '../../../core/pagination';\nimport { RequestOptions } from '../../../internal/request-options';\nimport { path } from '../../../internal/utils/path';\n\nexport class APIKeys extends APIResource {\n /**\n * Get API Key\n *\n * @example\n * ```ts\n * const betaAPIKey =\n * await client.beta.organization.apiKeys.retrieve(\n * 'api_key_id',\n * );\n * ```\n */\n retrieve(apiKeyID: string, options?: RequestOptions): APIPromise<BetaAPIKey> {\n return this._client.get(path`/v1/organizations/api_keys/${apiKeyID}?beta=true`, options);\n }\n\n /**\n * Update API Key\n *\n * @example\n * ```ts\n * const betaAPIKey =\n * await client.beta.organization.apiKeys.update(\n * 'api_key_id',\n * );\n * ```\n */\n update(apiKeyID: string, body: APIKeyUpdateParams, options?: RequestOptions): APIPromise<BetaAPIKey> {\n return this._client.post(path`/v1/organizations/api_keys/${apiKeyID}?beta=true`, { body, ...options });\n }\n\n /**\n * List API Keys\n *\n * @example\n * ```ts\n * // Automatically fetches more pages as needed.\n * for await (const betaAPIKey of client.beta.organization.apiKeys.list()) {\n * // ...\n * }\n * ```\n */\n list(\n query: APIKeyListParams | null | undefined = {},\n options?: RequestOptions,\n ): PagePromise<BetaAPIKeysPage, BetaAPIKey> {\n return this._client.getAPIList('/v1/organizations/api_keys?beta=true', Page<BetaAPIKey>, {\n query,\n ...options,\n });\n }\n}\n\nexport type BetaAPIKeysPage = Page<BetaAPIKey>;\n\nexport interface BetaAPIKey {\n /**\n * ID of the API key.\n */\n id: string;\n\n /**\n * RFC 3339 datetime string indicating when the API Key was created.\n */\n created_at: string;\n\n /**\n * The ID and type of the actor that created the API key, or `null` when the\n * creator is not recorded (legacy, workload-identity-federated, or system-created\n * keys).\n */\n created_by: BetaAPIKeyCreatedBy | null;\n\n /**\n * RFC 3339 datetime string indicating when the API Key expires, or `null` if it\n * never expires.\n */\n expires_at: string | null;\n\n /**\n * Name of the API key.\n */\n name: string;\n\n /**\n * Partially redacted hint for the API key.\n */\n partial_key_hint: string | null;\n\n /**\n * The principal the API key acts as (a User or a Service Account), or `null` if\n * the API key is not bound to a principal.\n */\n principal: BetaAPIKeyUserActor | BetaAPIKeyServiceAccountActor | null;\n\n /**\n * Where the API key belongs: its Workspace\n * (`{\"type\": \"workspace\", \"workspace_id\": \"wrkspc_...\"}`, with the Workspace's\n * real ID even when it is the organization's default Workspace), or the\n * organization (`{\"type\": \"organization\"}`) for a principal-bound API key that has\n * no Workspace.\n */\n scope: BetaAPIKeyOrganizationScope | BetaAPIKeyWorkspaceScope;\n\n /**\n * Status of the API key.\n */\n status: 'active' | 'archived' | 'expired' | 'inactive';\n\n /**\n * Object type.\n *\n * For API Keys, this is always `\"api_key\"`.\n */\n type: 'api_key';\n\n /**\n * @deprecated Use `scope` instead. `workspace_id` is `null` both for an API key in\n * the default Workspace and for a principal-bound API key that has no Workspace.\n */\n workspace_id: string | null;\n}\n\nexport interface BetaAPIKeyCreatedBy {\n /**\n * ID of the actor that created the object.\n */\n id: string;\n\n /**\n * Type of the actor that created the object.\n */\n type: 'service_account' | 'user';\n}\n\nexport interface BetaAPIKeyOrganizationScope {\n /**\n * Scope type. Always `\"organization\"`: the API key has no Workspace. Only a\n * principal-bound API key can have this scope.\n */\n type: 'organization';\n}\n\nexport interface BetaAPIKeyServiceAccountActor {\n /**\n * ID of the Service Account the API key acts as.\n */\n service_account_id: string;\n\n /**\n * Principal type. Always `\"service_account_actor\"` for a Service Account.\n */\n type: 'service_account_actor';\n}\n\nexport interface BetaAPIKeyUserActor {\n /**\n * Principal type. Always `\"user_actor\"` for a User.\n */\n type: 'user_actor';\n\n /**\n * ID of the User the API key acts as.\n */\n user_id: string;\n}\n\nexport interface BetaAPIKeyWorkspaceScope {\n /**\n * Scope type. Always `\"workspace\"`: the API key belongs to one Workspace.\n */\n type: 'workspace';\n\n /**\n * ID of the Workspace the API key belongs to. Unlike the deprecated top-level\n * `workspace_id`, this is the Workspace's real ID even for the organization's\n * default Workspace.\n */\n workspace_id: string;\n}\n\nexport interface APIKeyUpdateParams {\n /**\n * Name of the API key.\n */\n name?: string | null;\n\n /**\n * Status of the API key.\n */\n status?: 'active' | 'archived' | 'inactive' | null;\n}\n\nexport interface APIKeyListParams extends PageParams {\n /**\n * Filter by the ID of the User who created the object.\n */\n created_by_user_id?: string | null;\n\n /**\n * Filter by API key status.\n */\n status?: 'active' | 'archived' | 'expired' | 'inactive' | null;\n\n /**\n * Filter by Workspace ID.\n */\n workspace_id?: string | null;\n}\n\nexport declare namespace APIKeys {\n export {\n type BetaAPIKey as BetaAPIKey,\n type BetaAPIKeyCreatedBy as BetaAPIKeyCreatedBy,\n type BetaAPIKeyOrganizationScope as BetaAPIKeyOrganizationScope,\n type BetaAPIKeyServiceAccountActor as BetaAPIKeyServiceAccountActor,\n type BetaAPIKeyUserActor as BetaAPIKeyUserActor,\n type BetaAPIKeyWorkspaceScope as BetaAPIKeyWorkspaceScope,\n type BetaAPIKeysPage as BetaAPIKeysPage,\n type APIKeyUpdateParams as APIKeyUpdateParams,\n type APIKeyListParams as APIKeyListParams,\n };\n}\n",
|
|
95
95
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { APIResource } from '../../../core/resource';\nimport { APIPromise } from '../../../core/api-promise';\nimport { RequestOptions } from '../../../internal/request-options';\n\nexport class ComplianceSettings extends APIResource {\n /**\n * Retrieve your organization's Compliance Settings.\n *\n * Compliance Settings is a singleton resource: there is exactly one per\n * organization, addressed without an identifier. The `state` field reflects\n * whether the Compliance API is enabled. An organization with a parent\n * organization reads the state inherited from the parent's configuration.\n *\n * @example\n * ```ts\n * const betaComplianceSettings =\n * await client.beta.organization.complianceSettings.retrieve();\n * ```\n */\n retrieve(options?: RequestOptions): APIPromise<BetaComplianceSettings> {\n return this._client.get('/v1/organizations/compliance_settings?beta=true', options);\n }\n\n /**\n * Update your organization's Compliance Settings.\n *\n * Setting `state` to `enabled` turns on the Compliance API and begins capturing\n * organization activity events. Setting it to `disabled` turns both off. `state`\n * reflects whether the Compliance API is enabled.\n *\n * A request that sets `state` to its current value succeeds and leaves the\n * resource unchanged. A `disabled` request stays in effect until a later `enabled`\n * request or the organization's next provisioning action that enables Access\n * Transparency: enabling Access Transparency also enables the Compliance API,\n * which serves its activity events, so such provisioning (including re-runs)\n * re-enables the Compliance API even after a `disabled` request. Automated\n * provisioning never disables compliance settings.\n *\n * @example\n * ```ts\n * const betaComplianceSettings =\n * await client.beta.organization.complianceSettings.update({\n * state: { type: 'enabled' },\n * });\n * ```\n */\n update(body: ComplianceSettingUpdateParams, options?: RequestOptions): APIPromise<BetaComplianceSettings> {\n return this._client.post('/v1/organizations/compliance_settings?beta=true', { body, ...options });\n }\n}\n\nexport interface BetaComplianceSettings {\n /**\n * Whether the Compliance API is enabled for this organization.\n */\n state: BetaComplianceSettingsStateEnabled | BetaComplianceSettingsStateDisabled;\n\n type: 'compliance_settings';\n}\n\nexport interface BetaComplianceSettingsStateDisabled {\n type: 'disabled';\n}\n\nexport interface BetaComplianceSettingsStateDisabledParam {\n type: 'disabled';\n}\n\nexport interface BetaComplianceSettingsStateEnabled {\n type: 'enabled';\n}\n\nexport interface BetaComplianceSettingsStateEnabledParam {\n type: 'enabled';\n}\n\nexport interface ComplianceSettingUpdateParams {\n /**\n * Desired state. Accepts the string shorthand \"enabled\" or \"disabled\" in place of\n * the object form; the response always returns the canonical object form.\n */\n state: BetaComplianceSettingsStateEnabledParam | BetaComplianceSettingsStateDisabledParam;\n}\n\nexport declare namespace ComplianceSettings {\n export {\n type BetaComplianceSettings as BetaComplianceSettings,\n type BetaComplianceSettingsStateDisabled as BetaComplianceSettingsStateDisabled,\n type BetaComplianceSettingsStateDisabledParam as BetaComplianceSettingsStateDisabledParam,\n type BetaComplianceSettingsStateEnabled as BetaComplianceSettingsStateEnabled,\n type BetaComplianceSettingsStateEnabledParam as BetaComplianceSettingsStateEnabledParam,\n type ComplianceSettingUpdateParams as ComplianceSettingUpdateParams,\n };\n}\n",
|
|
96
96
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { APIResource } from '../../../core/resource';\nimport { APIPromise } from '../../../core/api-promise';\nimport { PageCursor, type PageCursorParams, PagePromise } from '../../../core/pagination';\nimport { RequestOptions } from '../../../internal/request-options';\nimport { path } from '../../../internal/utils/path';\n\nexport class ExternalKeys extends APIResource {\n /**\n * Create an external key config owned by the caller's organization.\n *\n * @example\n * ```ts\n * const betaExternalKey =\n * await client.beta.organization.externalKeys.create({\n * provider_config: {\n * kms_arn:\n * 'arn:aws:kms:us-east-1:111122223333:key/abcd1234-5678-90ab-cdef-000011112222',\n * type: 'aws',\n * },\n * });\n * ```\n */\n create(body: ExternalKeyCreateParams, options?: RequestOptions): APIPromise<BetaExternalKey> {\n return this._client.post('/v1/organizations/external_keys?beta=true', { body, ...options });\n }\n\n /**\n * Retrieve a single external key config in the caller's organization by ID.\n *\n * @example\n * ```ts\n * const betaExternalKey =\n * await client.beta.organization.externalKeys.retrieve(\n * 'external_key_id',\n * );\n * ```\n */\n retrieve(externalKeyID: string, options?: RequestOptions): APIPromise<BetaExternalKey> {\n return this._client.get(path`/v1/organizations/external_keys/${externalKeyID}?beta=true`, options);\n }\n\n /**\n * Partially update an external key config. Omitted fields are left unchanged.\n *\n * `display_name` is always editable. `geo` and `provider_config` cannot be changed\n * once any workspace references this config, because previously encrypted data\n * requires the original key identity to decrypt.\n *\n * @example\n * ```ts\n * const betaExternalKey =\n * await client.beta.organization.externalKeys.update(\n * 'external_key_id',\n * );\n * ```\n */\n update(\n externalKeyID: string,\n body: ExternalKeyUpdateParams,\n options?: RequestOptions,\n ): APIPromise<BetaExternalKey> {\n return this._client.post(path`/v1/organizations/external_keys/${externalKeyID}?beta=true`, {\n body,\n ...options,\n });\n }\n\n /**\n * List external key configs in the caller's organization.\n *\n * Results are ordered by creation time (newest first). Use the `next_page` cursor\n * from the response to fetch subsequent pages.\n *\n * @example\n * ```ts\n * // Automatically fetches more pages as needed.\n * for await (const betaExternalKey of client.beta.organization.externalKeys.list()) {\n * // ...\n * }\n * ```\n */\n list(\n query: ExternalKeyListParams | null | undefined = {},\n options?: RequestOptions,\n ): PagePromise<BetaExternalKeysPageCursor, BetaExternalKey> {\n return this._client.getAPIList('/v1/organizations/external_keys?beta=true', PageCursor<BetaExternalKey>, {\n query,\n ...options,\n });\n }\n\n /**\n * Delete an external key config.\n *\n * The request is rejected if any workspace still references this config.\n *\n * @example\n * ```ts\n * const externalKey =\n * await client.beta.organization.externalKeys.delete(\n * 'external_key_id',\n * );\n * ```\n */\n delete(externalKeyID: string, options?: RequestOptions): APIPromise<ExternalKeyDeleteResponse> {\n return this._client.delete(path`/v1/organizations/external_keys/${externalKeyID}?beta=true`, options);\n }\n\n /**\n * Validate an external key config against the customer's KMS.\n *\n * PukuAI performs an encrypt/decrypt roundtrip against the configured KMS key\n * and waits up to 30 seconds for the result. The response status is `success` if\n * the roundtrip succeeded, or `failure` with an error message if it failed or\n * timed out.\n *\n * @example\n * ```ts\n * const response =\n * await client.beta.organization.externalKeys.validate(\n * 'external_key_id',\n * );\n * ```\n */\n validate(externalKeyID: string, options?: RequestOptions): APIPromise<ExternalKeyValidateResponse> {\n return this._client.post(\n path`/v1/organizations/external_keys/${externalKeyID}/validate?beta=true`,\n options,\n );\n }\n}\n\nexport type BetaExternalKeysPageCursor = PageCursor<BetaExternalKey>;\n\nexport interface BetaAWSExternalKeyConfig {\n /**\n * Full ARN of the AWS KMS key. On Puku Platform on AWS the key must be a\n * single-Region key in your organization's own AWS account; cross-account keys,\n * multi-Region keys, and alias ARNs are rejected.\n */\n kms_arn: string;\n\n type: 'aws';\n\n /**\n * AWS region. Derived from `kms_arn` if omitted.\n */\n region?: string | null;\n\n /**\n * @deprecated IAM role ARN. Deprecated — PukuAI reaches the KMS key through its\n * own intermediate role (or, on Puku Platform on AWS, with credentials AWS\n * issues for the Workspace); this field is ignored.\n */\n role_arn?: string | null;\n}\n\nexport interface BetaAzureExternalKeyConfig {\n /**\n * Name of the key within the vault.\n */\n key_name: string;\n\n /**\n * Azure AD tenant ID.\n */\n tenant_id: string;\n\n type: 'azure';\n\n /**\n * Key Vault data-plane URI — `https://{vault-name}.vault.azure.net` or\n * `https://{hsm-name}.managedhsm.azure.net`.\n */\n vault_uri: string;\n\n /**\n * Azure AD application (client) ID. Omit to use PukuAI's multitenant app.\n * Provide only if using a single-tenant app registration in the customer's\n * directory.\n */\n client_id?: string | null;\n}\n\n/**\n * Azure Key Vault provider configuration.\n */\nexport interface BetaAzureExternalKeyConfigParam {\n /**\n * Name of the key within the vault.\n */\n key_name: string;\n\n /**\n * Azure AD tenant ID.\n */\n tenant_id: string;\n\n type: 'azure';\n\n /**\n * Key Vault data-plane URI — `https://{vault-name}.vault.azure.net` or\n * `https://{hsm-name}.managedhsm.azure.net`.\n */\n vault_uri: string;\n\n /**\n * Azure AD application (client) ID. Omit to use PukuAI's multitenant app.\n * Provide only if using a single-tenant app registration in the customer's\n * directory.\n */\n client_id?: string | null;\n}\n\n/**\n * CMEK external key config belonging to the caller's organization.\n *\n * Configs are organization-scoped. Workspaces attach to a config; once any\n * workspace references it, the provider fields become effectively immutable\n * (existing encrypted data needs the config for decrypt).\n */\nexport interface BetaExternalKey {\n /**\n * Identifier of the external key config. A tagged ID prefixed `ekey_`, or — for\n * organizations on the Puku Platform on AWS — the AWS KMS key ARN.\n */\n id: string;\n\n /**\n * Whether any workspace uses this config to encrypt its data — counting live and\n * archived workspaces (an archived workspace's data remains encrypted under the\n * config), excluding deleted ones. Only an attached config is used by the\n * encryption path; an `unattached` config is inert and can be deleted.\n */\n attachment: BetaExternalKeyAttachedAttachment | BetaExternalKeyUnattachedAttachment;\n\n created_at: string;\n\n /**\n * Human-friendly display name. Null if none was set.\n */\n display_name: string | null;\n\n /**\n * Data residency geo. Selects which regional validator handles this key's\n * encrypt/decrypt roundtrips.\n */\n geo: string;\n\n /**\n * KMS provider identity and auth coordinates.\n */\n provider_config: BetaAWSExternalKeyConfig | BetaGCPExternalKeyConfig | BetaAzureExternalKeyConfig;\n\n type: 'external_key';\n\n updated_at: string;\n}\n\nexport interface BetaExternalKeyAttachedAttachment {\n type: 'attached';\n}\n\nexport interface BetaExternalKeyUnattachedAttachment {\n type: 'unattached';\n}\n\nexport interface BetaGCPExternalKeyConfig {\n /**\n * Full resource name of the Cloud KMS key.\n */\n key_name: string;\n\n type: 'gcp';\n}\n\nexport interface ExternalKeyDeleteResponse {\n /**\n * ID of the deleted External Key.\n */\n id: string;\n\n type: 'external_key_deleted';\n}\n\n/**\n * Result of a validation roundtrip against the customer's KMS.\n *\n * HTTP 200 for both outcomes — the operation completed; `status` says whether the\n * key works.\n */\nexport interface ExternalKeyValidateResponse {\n /**\n * Error message when status is `failure`. Null otherwise.\n */\n error: string | null;\n\n /**\n * `success` — encrypt/decrypt roundtrip succeeded. `failure` — the roundtrip\n * failed or timed out; see `error`.\n */\n status: 'failure' | 'success';\n\n type: 'external_key_validation';\n}\n\nexport interface ExternalKeyCreateParams {\n /**\n * KMS provider identity and auth coordinates.\n */\n provider_config: BetaAWSExternalKeyConfig | BetaGCPExternalKeyConfig | BetaAzureExternalKeyConfigParam;\n\n /**\n * Human-friendly display name.\n */\n display_name?: string | null;\n\n /**\n * Data residency geo. Only `us` is supported.\n */\n geo?: 'us';\n}\n\nexport interface ExternalKeyUpdateParams {\n /**\n * Human-friendly display name.\n */\n display_name?: string | null;\n\n /**\n * Data residency geo. Only `us` is supported.\n */\n geo?: 'us' | null;\n\n /**\n * KMS provider identity and auth coordinates.\n */\n provider_config?:\n | BetaAWSExternalKeyConfig\n | BetaGCPExternalKeyConfig\n | BetaAzureExternalKeyConfigParam\n | null;\n}\n\nexport interface ExternalKeyListParams extends PageCursorParams {}\n\nexport declare namespace ExternalKeys {\n export {\n type BetaAWSExternalKeyConfig as BetaAWSExternalKeyConfig,\n type BetaAzureExternalKeyConfig as BetaAzureExternalKeyConfig,\n type BetaAzureExternalKeyConfigParam as BetaAzureExternalKeyConfigParam,\n type BetaExternalKey as BetaExternalKey,\n type BetaExternalKeyAttachedAttachment as BetaExternalKeyAttachedAttachment,\n type BetaExternalKeyUnattachedAttachment as BetaExternalKeyUnattachedAttachment,\n type BetaGCPExternalKeyConfig as BetaGCPExternalKeyConfig,\n type ExternalKeyDeleteResponse as ExternalKeyDeleteResponse,\n type ExternalKeyValidateResponse as ExternalKeyValidateResponse,\n type BetaExternalKeysPageCursor as BetaExternalKeysPageCursor,\n type ExternalKeyCreateParams as ExternalKeyCreateParams,\n type ExternalKeyUpdateParams as ExternalKeyUpdateParams,\n type ExternalKeyListParams as ExternalKeyListParams,\n };\n}\n",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport { APIResource } from '../../core/resource';\nimport * as VersionsAPI from './versions';\nimport {\n DeletedSkillVersion,\n SkillVersion,\n SkillVersionsPageCursor,\n VersionCreateParams,\n VersionDeleteParams,\n VersionListParams,\n VersionRetrieveParams,\n Versions,\n} from './versions';\nimport { APIPromise } from '../../core/api-promise';\nimport { PageCursor, type PageCursorParams, PagePromise } from '../../core/pagination';\nimport { type Uploadable } from '../../core/uploads';\nimport { RequestOptions } from '../../internal/request-options';\nimport { multipartFormRequestOptions } from '../../internal/uploads';\nimport { path } from '../../internal/utils/path';\n\nexport class Skills extends APIResource {\n versions: VersionsAPI.Versions = new VersionsAPI.Versions(this._client);\n\n /**\n * Create Skill\n */\n create(body: SkillCreateParams, options?: RequestOptions): APIPromise<Skill> {\n return this._client.post(\n '/v1/skills',\n multipartFormRequestOptions({ body, ...options }, this._client, false),\n );\n }\n\n /**\n * Get Skill\n */\n retrieve(skillID: string, options?: RequestOptions): APIPromise<Skill> {\n return this._client.get(path`/v1/skills/${skillID}`, options);\n }\n\n /**\n * List Skills\n */\n list(\n query: SkillListParams | null | undefined = {},\n options?: RequestOptions,\n ): PagePromise<SkillsPageCursor, Skill> {\n return this._client.getAPIList('/v1/skills', PageCursor<Skill>, { query, ...options });\n }\n\n /**\n * Delete Skill\n */\n delete(skillID: string, options?: RequestOptions): APIPromise<DeletedSkill> {\n return this._client.delete(path`/v1/skills/${skillID}`, options);\n }\n}\n\nexport type SkillsPageCursor = PageCursor<Skill>;\n\nexport interface DeletedSkill {\n /**\n * Unique identifier for the skill.\n *\n * The format and length of IDs may change over time.\n */\n id: string;\n\n /**\n * Deleted object type.\n *\n * For Skills, this is always `\"skill_deleted\"`.\n */\n type: 'skill_deleted';\n}\n\nexport interface Skill {\n /**\n * Unique identifier for the skill.\n *\n * The format and length of IDs may change over time.\n */\n id: string;\n\n /**\n * ISO 8601 timestamp of when the skill was created.\n */\n created_at: string;\n\n /**\n * Human-readable, single-line label for the Skill. Maximum 255 characters. Always\n * set: derived from the SKILL.md frontmatter `name` when omitted at creation. Not\n * unique.\n */\n display_name: string;\n\n /**\n * ID of the newest Skill Version — what `latest` references resolve to. Always\n * set: a Skill holds at least one version.\n */\n latest_version_id: string;\n\n /**\n * Where the Skill comes from.\n *\n * Possible values:\n *\n * - `\"custom\"`: authored by the platform user; private to their workspace\n * - `\"puku\"`: published by PukuAI; shared and read-only\n * - `\"puku_example\"`: PukuAI-published sample Skill\n * - `\"plugin\"`: resolved from an installed plugin\n */\n source: SkillSource;\n\n /**\n * Object type.\n *\n * For Skills, this is always `\"skill\"`.\n */\n type: 'skill';\n\n /**\n * ISO 8601 timestamp of when the skill was last updated.\n */\n updated_at: string;\n}\n\nexport interface SkillSource {\n /**\n * Where the Skill comes from.\n *\n * Possible values:\n *\n * - `\"custom\"`: authored by the platform user; private to their workspace\n * - `\"puku\"`: published by PukuAI; shared and read-only\n * - `\"puku_example\"`: PukuAI-published sample Skill\n * - `\"plugin\"`: resolved from an installed plugin\n */\n type: 'custom' | 'puku' | 'puku_example' | 'plugin';\n}\n\nexport interface SkillCreateParams {\n /**\n * Files to upload for the skill.\n *\n * All files must be in the same top-level directory and must include a SKILL.md\n * file at the root of that directory.\n */\n files: Array<Uploadable>;\n\n /**\n * Human-readable, single-line label for the Skill. Maximum 255 characters. Always\n * set: derived from the SKILL.md frontmatter `name` when omitted at creation. Not\n * unique.\n */\n display_name?: string | null;\n}\n\nexport interface SkillListParams extends PageCursorParams {\n /**\n * Filter skills by source.\n *\n * If provided, only skills from the specified source will be returned:\n *\n * - `\"custom\"`: only return user-created skills\n * - `\"puku\"`: only return PukuAI-created skills\n */\n source?: string | null;\n}\n\nSkills.Versions = Versions;\n\nexport declare namespace Skills {\n export {\n type DeletedSkill as DeletedSkill,\n type Skill as Skill,\n type SkillSource as SkillSource,\n type SkillsPageCursor as SkillsPageCursor,\n type SkillCreateParams as SkillCreateParams,\n type SkillListParams as SkillListParams,\n };\n\n export {\n Versions as Versions,\n type DeletedSkillVersion as DeletedSkillVersion,\n type SkillVersion as SkillVersion,\n type SkillVersionsPageCursor as SkillVersionsPageCursor,\n type VersionCreateParams as VersionCreateParams,\n type VersionRetrieveParams as VersionRetrieveParams,\n type VersionListParams as VersionListParams,\n type VersionDeleteParams as VersionDeleteParams,\n };\n}\n",
|
|
132
132
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nexport * from './shared';\nexport {\n Beta,\n type PukuBeta,\n type BetaAPIError,\n type BetaAuthenticationError,\n type BetaBillingError,\n type BetaCurrency,\n type BetaError,\n type BetaErrorResponse,\n type BetaGatewayTimeoutError,\n type BetaInvalidRequestError,\n type BetaMonetaryAmount,\n type BetaNotFoundError,\n type BetaOverloadedError,\n type BetaPermissionError,\n type BetaRateLimitError,\n} from './beta/beta';\nexport {\n Completions,\n type Completion,\n type CompletionCreateParams,\n type CompletionCreateParamsNonStreaming,\n type CompletionCreateParamsStreaming,\n} from './completions';\nexport {\n Files,\n type DeletedFile,\n type FileMetadata,\n type FileListParams,\n type FileUploadParams,\n type FileMetadataPageCursor,\n} from './files';\nexport {\n Messages,\n type Base64ImageSource,\n type Base64PDFSource,\n type BashCodeExecutionOutputBlock,\n type BashCodeExecutionOutputBlockParam,\n type BashCodeExecutionResultBlock,\n type BashCodeExecutionResultBlockParam,\n type BashCodeExecutionToolResultBlock,\n type BashCodeExecutionToolResultBlockParam,\n type BashCodeExecutionToolResultError,\n type BashCodeExecutionToolResultErrorCode,\n type BashCodeExecutionToolResultErrorParam,\n type BrowserCloseTabConfig,\n type BrowserDoubleClickConfig,\n type BrowserFileUploadConfig,\n type BrowserFindConfig,\n type BrowserFormInputConfig,\n type BrowserGetPageTextConfig,\n type BrowserHoldKeyConfig,\n type BrowserHoverConfig,\n type BrowserJavascriptExecConfig,\n type BrowserKeyConfig,\n type BrowserLeftClickConfig,\n type BrowserLeftClickDragConfig,\n type BrowserLeftMouseDownConfig,\n type BrowserLeftMouseUpConfig,\n type BrowserListTabsConfig,\n type BrowserMiddleClickConfig,\n type BrowserMouseMoveConfig,\n type BrowserNavigateConfig,\n type BrowserNewTabConfig,\n type BrowserReadConsoleConfig,\n type BrowserReadNetworkConfig,\n type BrowserReadPageConfig,\n type BrowserRightClickConfig,\n type BrowserScreenshotConfig,\n type BrowserScrollConfig,\n type BrowserScrollToConfig,\n type BrowserStateBlockParam,\n type BrowserStateChange,\n type BrowserStateChangeDownloadCompleted,\n type BrowserStateChangeDownloadFailed,\n type BrowserStateChangeDownloadStarted,\n type BrowserStateChangeTabOpened,\n type BrowserStateTabEntry,\n type BrowserSwitchTabConfig,\n type BrowserToolset20260801,\n type BrowserToolsetConfigs,\n type BrowserTripleClickConfig,\n type BrowserTypeConfig,\n type BrowserWaitConfig,\n type BrowserZoomConfig,\n type CacheControlEphemeral,\n type CacheCreation,\n type CitationCharLocation,\n type CitationCharLocationParam,\n type CitationContentBlockLocation,\n type CitationContentBlockLocationParam,\n type CitationPageLocation,\n type CitationPageLocationParam,\n type CitationSearchResultLocationParam,\n type CitationWebSearchResultLocationParam,\n type CitationsConfig,\n type CitationsConfigParam,\n type CitationsDelta,\n type CitationsSearchResultLocation,\n type CitationsWebSearchResultLocation,\n type CodeExecutionOutputBlock,\n type CodeExecutionOutputBlockParam,\n type CodeExecutionResultBlock,\n type CodeExecutionResultBlockParam,\n type CodeExecutionTool20250522,\n type CodeExecutionTool20250825,\n type CodeExecutionTool20260120,\n type CodeExecutionTool20260521,\n type CodeExecutionToolResultBlock,\n type CodeExecutionToolResultBlockContent,\n type CodeExecutionToolResultBlockParam,\n type CodeExecutionToolResultBlockParamContent,\n type CodeExecutionToolResultError,\n type CodeExecutionToolResultErrorCode,\n type CodeExecutionToolResultErrorParam,\n type ComputerCursorPositionConfig,\n type ComputerDoubleClickConfig,\n type ComputerHoldKeyConfig,\n type ComputerKeyConfig,\n type ComputerLeftClickConfig,\n type ComputerLeftClickDragConfig,\n type ComputerLeftMouseDownConfig,\n type ComputerLeftMouseUpConfig,\n type ComputerMiddleClickConfig,\n type ComputerMouseMoveConfig,\n type ComputerRightClickConfig,\n type ComputerScreenshotConfig,\n type ComputerScrollConfig,\n type ComputerToolset20260801,\n type ComputerToolsetConfigs,\n type ComputerTripleClickConfig,\n type ComputerTypeConfig,\n type ComputerWaitConfig,\n type ComputerZoomConfig,\n type Container,\n type ContainerParams,\n type ContainerSkill,\n type ContainerUploadBlock,\n type ContainerUploadBlockParam,\n type ContentBlock,\n type ContentBlockParam,\n type ContentBlockStartEvent,\n type ContentBlockStopEvent,\n type ContentBlockSource,\n type ContentBlockSourceContent,\n type DirectCaller,\n type DocumentBlock,\n type DocumentBlockParam,\n type EncryptedCodeExecutionResultBlock,\n type EncryptedCodeExecutionResultBlockParam,\n type FileDocumentSource,\n type FileImageSource,\n type ImageBlockParam,\n type ImageTransformationsParam,\n type InputJSONDelta,\n type JSONOutputFormat,\n type MemoryTool20250818,\n type Message,\n type MessageCountTokensTool,\n type MessageCreateParamsContainer,\n type MessageDeltaEvent,\n type MessageDeltaUsage,\n type MessageParam,\n type MessageStreamParams,\n type MessageTokensCount,\n type Metadata,\n type Model,\n type OutputConfig,\n type OutputTokensDetails,\n type PlainTextSource,\n type RawContentBlockDelta,\n type RawContentBlockDeltaEvent,\n type RawContentBlockStartEvent,\n type RawContentBlockStopEvent,\n type RawMessageDeltaEvent,\n type RawMessageStartEvent,\n type RawMessageStopEvent,\n type RawMessageStreamEvent,\n type RedactedThinkingBlock,\n type RedactedThinkingBlockParam,\n type RefusalStopDetails,\n type SearchResultBlockParam,\n type ServerToolCaller,\n type ServerToolCaller20260120,\n type ServerToolUsage,\n type ServerToolUseBlock,\n type ServerToolUseBlockParam,\n type SignatureDelta,\n type SkillParams,\n type StopReason,\n type TextBlock,\n type TextBlockParam,\n type TextCitation,\n type TextCitationParam,\n type TextDelta,\n type TextEditorCodeExecutionCreateResultBlock,\n type TextEditorCodeExecutionCreateResultBlockParam,\n type TextEditorCodeExecutionStrReplaceResultBlock,\n type TextEditorCodeExecutionStrReplaceResultBlockParam,\n type TextEditorCodeExecutionToolResultBlock,\n type TextEditorCodeExecutionToolResultBlockParam,\n type TextEditorCodeExecutionToolResultError,\n type TextEditorCodeExecutionToolResultErrorCode,\n type TextEditorCodeExecutionToolResultErrorParam,\n type TextEditorCodeExecutionViewResultBlock,\n type TextEditorCodeExecutionViewResultBlockParam,\n type ThinkingBlock,\n type ThinkingBlockParam,\n type ThinkingConfigAdaptive,\n type ThinkingConfigDisabled,\n type ThinkingConfigEnabled,\n type ThinkingConfigParam,\n type ThinkingDelta,\n type Tool,\n type ToolBash20250124,\n type ToolChoice,\n type ToolChoiceAny,\n type ToolChoiceAuto,\n type ToolChoiceNone,\n type ToolChoiceTool,\n type ToolReferenceBlock,\n type ToolReferenceBlockParam,\n type ToolResultBlockParam,\n type ToolSearchToolBm25_20251119,\n type ToolSearchToolRegex20251119,\n type ToolSearchToolResultBlock,\n type ToolSearchToolResultBlockParam,\n type ToolSearchToolResultError,\n type ToolSearchToolResultErrorCode,\n type ToolSearchToolResultErrorParam,\n type ToolSearchToolSearchResultBlock,\n type ToolSearchToolSearchResultBlockParam,\n type ToolTextEditor20250124,\n type ToolTextEditor20250429,\n type ToolTextEditor20250728,\n type ToolUnion,\n type ToolUseBlock,\n type ToolUseBlockParam,\n type URLImageSource,\n type URLPDFSource,\n type Usage,\n type UserLocation,\n type WebFetchBlock,\n type WebFetchBlockParam,\n type WebFetchTool20250910,\n type WebFetchTool20260209,\n type WebFetchTool20260309,\n type WebFetchTool20260318,\n type WebFetchToolResultBlock,\n type WebFetchToolResultBlockParam,\n type WebFetchToolResultErrorBlock,\n type WebFetchToolResultErrorBlockParam,\n type WebFetchToolResultErrorCode,\n type WebSearchResultBlock,\n type WebSearchResultBlockParam,\n type WebSearchTool20250305,\n type WebSearchTool20260209,\n type WebSearchTool20260318,\n type WebSearchToolRequestError,\n type WebSearchToolResultBlock,\n type WebSearchToolResultBlockContent,\n type WebSearchToolResultBlockParam,\n type WebSearchToolResultBlockParamContent,\n type WebSearchToolResultError,\n type WebSearchToolResultErrorCode,\n type MessageCreateParams,\n type MessageCreateParamsNonStreaming,\n type MessageCreateParamsStreaming,\n type MessageCountTokensParams,\n} from './messages/messages';\nexport {\n Models,\n type CapabilitySupport,\n type ContextManagementCapability,\n type EffortCapability,\n type ModelCapabilities,\n type ModelInfo,\n type ThinkingCapability,\n type ThinkingTypes,\n type ModelRetrieveParams,\n type ModelListParams,\n type ModelInfosPage,\n} from './models';\nexport {\n Skills,\n type DeletedSkill,\n type Skill,\n type SkillSource,\n type SkillCreateParams,\n type SkillListParams,\n type SkillsPageCursor,\n} from './skills/skills';\n",
|
|
133
133
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n\nimport type { RequestInit, RequestInfo, BodyInit } from './internal/builtin-types';\nimport type { HTTPMethod, PromiseOrValue, MergedRequestInit, FinalizedRequestInit } from './internal/types';\nimport { uuid4 } from './internal/utils/uuid';\nimport { validatePositiveInteger, isAbsoluteURL, safeJSON } from './internal/utils/values';\nimport { sleep } from './internal/utils/sleep';\nexport type { Logger, LogLevel } from './internal/utils/log';\nimport { castToError, isAbortError } from './internal/errors';\nimport type { APIResponseProps } from './internal/parse';\nimport { getPlatformHeaders } from './internal/detect-platform';\nimport {\n armAbandonmentBackstop,\n registerRequestSignalCleanup,\n releaseRequestSignal,\n} from './internal/request-signal';\nimport * as Shims from './internal/shims';\nimport * as Opts from './internal/request-options';\nimport { stringifyQuery } from './internal/utils/query';\nimport { VERSION } from './version';\nimport * as Errors from './core/error';\nimport type { AccessTokenProvider } from './lib/credentials/types';\nimport { OAUTH_API_BETA_HEADER } from './lib/credentials/types';\nimport { TokenCache } from './lib/credentials/token-cache';\nimport { defaultCredentials, resolveCredentialsFromConfig } from './lib/credentials/credential-chain';\nimport type { PukuConfig } from './core/credentials';\nimport {\n type Middleware,\n isFetchOriginError,\n isRetryableError,\n wrapFetchWithMiddleware,\n} from './core/middleware';\nexport type { Middleware, MiddlewareContext, MiddlewareNext } from './core/middleware';\nexport type { APIRequest } from './core/api';\nimport * as Pagination from './core/pagination';\nimport {\n type BidirectionalPageCursorParams,\n BidirectionalPageCursorResponse,\n type PageCursorParams,\n PageCursorResponse,\n type PageParams,\n PageResponse,\n type TokenPageParams,\n TokenPageResponse,\n} from './core/pagination';\nimport * as Uploads from './core/uploads';\nimport * as API from './resources/index';\nimport { APIPromise } from './core/api-promise';\nimport {\n Completion,\n CompletionCreateParams,\n CompletionCreateParamsNonStreaming,\n CompletionCreateParamsStreaming,\n Completions,\n} from './resources/completions';\nimport {\n DeletedFile,\n FileListParams,\n FileMetadata,\n FileMetadataPageCursor,\n FileUploadParams,\n Files,\n} from './resources/files';\nimport {\n CapabilitySupport,\n ContextManagementCapability,\n EffortCapability,\n ModelCapabilities,\n ModelInfo,\n ModelInfosPage,\n ModelListParams,\n ModelRetrieveParams,\n Models,\n ThinkingCapability,\n ThinkingTypes,\n} from './resources/models';\nimport {\n PukuBeta,\n Beta,\n BetaAPIError,\n BetaAuthenticationError,\n BetaBillingError,\n BetaCurrency,\n BetaError,\n BetaErrorResponse,\n BetaGatewayTimeoutError,\n BetaInvalidRequestError,\n BetaMonetaryAmount,\n BetaNotFoundError,\n BetaOverloadedError,\n BetaPermissionError,\n BetaRateLimitError,\n} from './resources/beta/beta';\nimport {\n Base64ImageSource,\n Base64PDFSource,\n BashCodeExecutionOutputBlock,\n BashCodeExecutionOutputBlockParam,\n BashCodeExecutionResultBlock,\n BashCodeExecutionResultBlockParam,\n BashCodeExecutionToolResultBlock,\n BashCodeExecutionToolResultBlockParam,\n BashCodeExecutionToolResultError,\n BashCodeExecutionToolResultErrorCode,\n BashCodeExecutionToolResultErrorParam,\n BrowserCloseTabConfig,\n BrowserDoubleClickConfig,\n BrowserFileUploadConfig,\n BrowserFindConfig,\n BrowserFormInputConfig,\n BrowserGetPageTextConfig,\n BrowserHoldKeyConfig,\n BrowserHoverConfig,\n BrowserJavascriptExecConfig,\n BrowserKeyConfig,\n BrowserLeftClickConfig,\n BrowserLeftClickDragConfig,\n BrowserLeftMouseDownConfig,\n BrowserLeftMouseUpConfig,\n BrowserListTabsConfig,\n BrowserMiddleClickConfig,\n BrowserMouseMoveConfig,\n BrowserNavigateConfig,\n BrowserNewTabConfig,\n BrowserReadConsoleConfig,\n BrowserReadNetworkConfig,\n BrowserReadPageConfig,\n BrowserRightClickConfig,\n BrowserScreenshotConfig,\n BrowserScrollConfig,\n BrowserScrollToConfig,\n BrowserStateBlockParam,\n BrowserStateChange,\n BrowserStateChangeDownloadCompleted,\n BrowserStateChangeDownloadFailed,\n BrowserStateChangeDownloadStarted,\n BrowserStateChangeTabOpened,\n BrowserStateTabEntry,\n BrowserSwitchTabConfig,\n BrowserToolset20260801,\n BrowserToolsetConfigs,\n BrowserTripleClickConfig,\n BrowserTypeConfig,\n BrowserWaitConfig,\n BrowserZoomConfig,\n CacheControlEphemeral,\n CacheCreation,\n CitationCharLocation,\n CitationCharLocationParam,\n CitationContentBlockLocation,\n CitationContentBlockLocationParam,\n CitationPageLocation,\n CitationPageLocationParam,\n CitationSearchResultLocationParam,\n CitationWebSearchResultLocationParam,\n CitationsConfig,\n CitationsConfigParam,\n CitationsDelta,\n CitationsSearchResultLocation,\n CitationsWebSearchResultLocation,\n CodeExecutionOutputBlock,\n CodeExecutionOutputBlockParam,\n CodeExecutionResultBlock,\n CodeExecutionResultBlockParam,\n CodeExecutionTool20250522,\n CodeExecutionTool20250825,\n CodeExecutionTool20260120,\n CodeExecutionTool20260521,\n CodeExecutionToolResultBlock,\n CodeExecutionToolResultBlockContent,\n CodeExecutionToolResultBlockParam,\n CodeExecutionToolResultBlockParamContent,\n CodeExecutionToolResultError,\n CodeExecutionToolResultErrorCode,\n CodeExecutionToolResultErrorParam,\n ComputerCursorPositionConfig,\n ComputerDoubleClickConfig,\n ComputerHoldKeyConfig,\n ComputerKeyConfig,\n ComputerLeftClickConfig,\n ComputerLeftClickDragConfig,\n ComputerLeftMouseDownConfig,\n ComputerLeftMouseUpConfig,\n ComputerMiddleClickConfig,\n ComputerMouseMoveConfig,\n ComputerRightClickConfig,\n ComputerScreenshotConfig,\n ComputerScrollConfig,\n ComputerToolset20260801,\n ComputerToolsetConfigs,\n ComputerTripleClickConfig,\n ComputerTypeConfig,\n ComputerWaitConfig,\n ComputerZoomConfig,\n Container,\n ContainerParams,\n ContainerSkill,\n ContainerUploadBlock,\n ContainerUploadBlockParam,\n ContentBlock,\n ContentBlockDeltaEvent,\n ContentBlockParam,\n ContentBlockStartEvent,\n ContentBlockStopEvent,\n ContentBlockSource,\n ContentBlockSourceContent,\n DirectCaller,\n DocumentBlock,\n DocumentBlockParam,\n EncryptedCodeExecutionResultBlock,\n EncryptedCodeExecutionResultBlockParam,\n FileDocumentSource,\n FileImageSource,\n ImageBlockParam,\n ImageTransformationsParam,\n InputJSONDelta,\n JSONOutputFormat,\n MemoryTool20250818,\n Message,\n MessageStreamParams,\n MessageCountTokensParams,\n MessageCountTokensTool,\n MessageCreateParams,\n MessageCreateParamsContainer,\n MessageCreateParamsNonStreaming,\n MessageCreateParamsStreaming,\n MessageDeltaEvent,\n MessageDeltaUsage,\n MessageParam,\n MessageStartEvent,\n MessageStopEvent,\n MessageStreamEvent,\n MessageTokensCount,\n Messages,\n Metadata,\n Model,\n OutputConfig,\n OutputTokensDetails,\n PlainTextSource,\n RawContentBlockDelta,\n RawContentBlockDeltaEvent,\n RawContentBlockStartEvent,\n RawContentBlockStopEvent,\n RawMessageDeltaEvent,\n RawMessageStartEvent,\n RawMessageStopEvent,\n RawMessageStreamEvent,\n RedactedThinkingBlock,\n RedactedThinkingBlockParam,\n RefusalStopDetails,\n SearchResultBlockParam,\n ServerToolCaller,\n ServerToolCaller20260120,\n ServerToolUsage,\n ServerToolUseBlock,\n ServerToolUseBlockParam,\n SignatureDelta,\n SkillParams,\n StopReason,\n TextBlock,\n TextBlockParam,\n TextCitation,\n TextCitationParam,\n TextDelta,\n TextEditorCodeExecutionCreateResultBlock,\n TextEditorCodeExecutionCreateResultBlockParam,\n TextEditorCodeExecutionStrReplaceResultBlock,\n TextEditorCodeExecutionStrReplaceResultBlockParam,\n TextEditorCodeExecutionToolResultBlock,\n TextEditorCodeExecutionToolResultBlockParam,\n TextEditorCodeExecutionToolResultError,\n TextEditorCodeExecutionToolResultErrorCode,\n TextEditorCodeExecutionToolResultErrorParam,\n TextEditorCodeExecutionViewResultBlock,\n TextEditorCodeExecutionViewResultBlockParam,\n ThinkingBlock,\n ThinkingBlockParam,\n ThinkingConfigAdaptive,\n ThinkingConfigDisabled,\n ThinkingConfigEnabled,\n ThinkingConfigParam,\n ThinkingDelta,\n Tool,\n ToolBash20250124,\n ToolChoice,\n ToolChoiceAny,\n ToolChoiceAuto,\n ToolChoiceNone,\n ToolChoiceTool,\n ToolReferenceBlock,\n ToolReferenceBlockParam,\n ToolResultBlockParam,\n ToolSearchToolBm25_20251119,\n ToolSearchToolRegex20251119,\n ToolSearchToolResultBlock,\n ToolSearchToolResultBlockParam,\n ToolSearchToolResultError,\n ToolSearchToolResultErrorCode,\n ToolSearchToolResultErrorParam,\n ToolSearchToolSearchResultBlock,\n ToolSearchToolSearchResultBlockParam,\n ToolTextEditor20250124,\n ToolTextEditor20250429,\n ToolTextEditor20250728,\n ToolUnion,\n ToolUseBlock,\n ToolUseBlockParam,\n URLImageSource,\n URLPDFSource,\n Usage,\n UserLocation,\n WebFetchBlock,\n WebFetchBlockParam,\n WebFetchTool20250910,\n WebFetchTool20260209,\n WebFetchTool20260309,\n WebFetchTool20260318,\n WebFetchToolResultBlock,\n WebFetchToolResultBlockParam,\n WebFetchToolResultErrorBlock,\n WebFetchToolResultErrorBlockParam,\n WebFetchToolResultErrorCode,\n WebSearchResultBlock,\n WebSearchResultBlockParam,\n WebSearchTool20250305,\n WebSearchTool20260209,\n WebSearchTool20260318,\n WebSearchToolRequestError,\n WebSearchToolResultBlock,\n WebSearchToolResultBlockContent,\n WebSearchToolResultBlockParam,\n WebSearchToolResultBlockParamContent,\n WebSearchToolResultError,\n WebSearchToolResultErrorCode,\n} from './resources/messages/messages';\nimport {\n DeletedSkill,\n Skill,\n SkillCreateParams,\n SkillListParams,\n SkillSource,\n Skills,\n SkillsPageCursor,\n} from './resources/skills/skills';\nimport { type Fetch } from './internal/builtin-types';\nimport { isRunningInBrowser } from './internal/detect-platform';\nimport { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';\nimport { FinalRequestOptions, RequestOptions } from './internal/request-options';\nimport { readEnv } from './internal/utils/env';\nimport {\n type LogLevel,\n type Logger,\n defaultLogLevel,\n formatRequestDetails,\n loggerFor,\n parseLogLevel,\n} from './internal/utils/log';\nimport { isEmptyObj } from './internal/utils/values';\n\n/**\n * Shared auth state. A `withOptions()` clone receives the parent's instance\n * (unless the caller overrides auth options) so a clone created before lazy\n * resolution settles observes the same provider/tokenCache/error/extraHeaders\n * as the parent rather than starting an independent resolution.\n */\ntype AuthState = {\n provider: AccessTokenProvider | null;\n tokenCache: TokenCache | null;\n resolution: Promise<void> | null;\n error: unknown;\n extraHeaders: Record<string, string>;\n /**\n * `base_url` from the resolved profile/config, normalized (no trailing\n * slash). Stored on the shared auth state so `withOptions()` clones created\n * before lazy resolution settles can still adopt it on their first request.\n */\n baseURL?: string | undefined;\n};\n\n/**\n * Per-request auth flags, keyed by the FinalRequestOptions object so\n * caller-owned options aren't mutated.\n */\ntype RequestAuthFlags = {\n usedTokenCache: boolean;\n didRefreshFor401: boolean;\n};\n\ntype InternalClientOptions = ClientOptions & {\n __auth?: AuthState | undefined;\n __baseURLIsExplicit?: boolean | undefined;\n};\n\nexport type ApiKeySetter = () => Promise<string>;\n\nexport interface ClientOptions {\n /**\n * API key used for authentication.\n *\n * - Accepts either a static string or an async function that resolves to a string.\n * - Defaults to process.env['PUKU_API_KEY'].\n * - When a function is provided, it is invoked before each request so you can rotate\n * or refresh credentials at runtime.\n * - The function must return a non-empty string; otherwise an PukuError is thrown.\n * - If the function throws, the error is wrapped in an PukuError with the original\n * error available as `cause`.\n */\n apiKey?: string | ApiKeySetter | null | undefined;\n\n /**\n * Defaults to process.env['PUKU_AUTH_TOKEN'].\n */\n authToken?: string | null | undefined;\n\n /**\n * An {@link AccessTokenProvider} for OAuth/workload-identity authentication.\n *\n * When set, the provider is wrapped in a {@link TokenCache} and used for\n * Bearer token auth on every request. Takes precedence over `authToken`\n * but not `apiKey`.\n *\n * If omitted (and no `apiKey` or `authToken` is provided), the client\n * automatically resolves credentials from config files or environment\n * variables on the first request.\n */\n credentials?: AccessTokenProvider | null | undefined;\n\n /**\n * An {@link PukuConfig} object to resolve credentials from directly,\n * bypassing config-file and environment-variable lookup. This is the\n * TypeScript equivalent of Go's `option.WithConfig(cfg)`.\n *\n * Ignored when `credentials` is set. For `oidc_federation`, the SDK\n * performs the jwt-bearer exchange in-process; for `user_oauth`,\n * `authentication.credentials_path` must point at the credentials file.\n */\n config?: PukuConfig | null | undefined;\n\n /**\n * Name of a profile to load from `<config_dir>/configs/<profile>.json`.\n *\n * Equivalent to setting the `PUKU_PROFILE` environment variable, but\n * scoped to this client instance. As an explicit constructor argument it\n * takes precedence over `PUKU_API_KEY` / `PUKU_AUTH_TOKEN` in the\n * environment. Mutually exclusive with `credentials` and `config`.\n */\n profile?: string | null | undefined;\n\n /**\n * Defaults to process.env['PUKU_WEBHOOK_SIGNING_KEY'].\n */\n webhookKey?: string | null | undefined;\n\n /**\n * Override the default base URL for the API, e.g., \"https://api.example.com/v2/\"\n *\n * Defaults to process.env['PUKU_BASE_URL'].\n */\n baseURL?: string | null | undefined;\n\n /**\n * The maximum amount of time (in milliseconds) that the client should wait for a response\n * from the server before timing out a single request.\n *\n * Note that request timeouts are retried by default, so in a worst-case scenario you may wait\n * much longer than this timeout before the promise succeeds or fails.\n *\n * @unit milliseconds\n */\n timeout?: number | undefined;\n /**\n * Additional `RequestInit` options to be passed to `fetch` calls.\n * Properties will be overridden by per-request `fetchOptions`.\n */\n fetchOptions?: MergedRequestInit | undefined;\n\n /**\n * Specify a custom `fetch` function implementation.\n *\n * If not provided, we expect that `fetch` is defined globally.\n */\n fetch?: Fetch | undefined;\n\n /**\n * {@link Middleware} functions that wrap every HTTP request made by the\n * client.\n *\n * Middleware runs per HTTP attempt, including retries. It observes the\n * canonical PukuAI-shaped request and response on every backend: on\n * clients for third-party backends (Bedrock, Vertex, Foundry), the\n * backend's URL/body rewriting, request signing, and response\n * normalization happen inside `next`.\n */\n middleware?: ReadonlyArray<Middleware> | undefined;\n\n /**\n * The maximum number of times that the client will retry a request in case of a\n * temporary failure, like a network error or a 5XX error from the server.\n *\n * @default 2\n */\n maxRetries?: number | undefined;\n\n /**\n * Default headers to include with every request to the API.\n *\n * These can be removed in individual requests by explicitly setting the\n * header to `null` in request options.\n */\n defaultHeaders?: HeadersLike | undefined;\n\n /**\n * Default query parameters to include with every request to the API.\n *\n * These can be removed in individual requests by explicitly setting the\n * param to `undefined` in request options.\n */\n defaultQuery?: Record<string, string | undefined> | undefined;\n\n /**\n * By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers.\n * Only set this option to `true` if you understand the risks and have appropriate mitigations in place.\n */\n dangerouslyAllowBrowser?: boolean | undefined;\n\n /**\n * Set the log level.\n *\n * Defaults to process.env['PUKU_LOG'] or 'warn' if it isn't set.\n */\n logLevel?: LogLevel | undefined;\n\n /**\n * Set the logger.\n *\n * Defaults to globalThis.console.\n */\n logger?: Logger | undefined;\n}\n\nexport const HUMAN_PROMPT = '\\\\n\\\\nHuman:';\nexport const AI_PROMPT = '\\\\n\\\\nAssistant:';\n\n/**\n * Base class for Puku API clients.\n */\nexport class BasePuku {\n apiKey: string | null;\n authToken: string | null;\n webhookKey: string | null;\n\n /**\n * The active credential provider. Default credential resolution runs once\n * at construction time. If it fails, the error is surfaced on every\n * request and the client must be reconstructed — there is no retry path.\n *\n * Clones returned by {@link withOptions} share the parent's auth state\n * (provider, token cache, pending resolution, and any resolution error)\n * unless the caller passes an explicit `apiKey`, `authToken`,\n * `credentials`, `config`, or `profile` override.\n */\n get credentials(): AccessTokenProvider | null {\n return this._authState.provider;\n }\n private _authState: AuthState;\n /**\n * Whether `baseURL` was chosen by the caller (constructor arg or env var)\n * rather than derived. Non-explicit base URLs may be replaced — by a\n * profile-supplied host, or by re-derivation in `withOptions()` clones.\n * Subclasses that derive their own base URL should correct this after\n * `super()`, since the base constructor can't tell a derived value apart.\n */\n protected _baseURLIsExplicit: boolean;\n private _requestAuthFlags = new WeakMap<FinalRequestOptions, RequestAuthFlags>();\n\n baseURL: string;\n maxRetries: number;\n timeout: number;\n logger: Logger;\n logLevel: LogLevel | undefined;\n fetchOptions: MergedRequestInit | undefined;\n middleware: ReadonlyArray<Middleware>;\n\n private fetch: Fetch;\n #encoder: Opts.RequestEncoder;\n protected idempotencyHeader?: string;\n protected _options: ClientOptions;\n\n /**\n * API Client for interfacing with the Puku API.\n *\n * @param {string | null | undefined} [opts.apiKey=process.env['PUKU_API_KEY'] ?? null]\n * @param {string | null | undefined} [opts.authToken=process.env['PUKU_AUTH_TOKEN'] ?? null]\n * @param {string | null | undefined} [opts.webhookKey=process.env['PUKU_WEBHOOK_SIGNING_KEY'] ?? null]\n * @param {string} [opts.baseURL=process.env['PUKU_BASE_URL']] - Override the default base URL for the API. Required.\n * @param {number} [opts.timeout=10 minutes] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.\n * @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.\n * @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.\n * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.\n * @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API.\n * @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.\n * @param {boolean} [opts.dangerouslyAllowBrowser=false] - By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers.\n */\n constructor({\n baseURL = readEnv('PUKU_BASE_URL'),\n apiKey,\n authToken,\n webhookKey = readEnv('PUKU_WEBHOOK_SIGNING_KEY') ?? null,\n ...opts\n }: ClientOptions = {}) {\n // An explicit `profile` is a constructor-level credential choice; when set,\n // do not let env PUKU_API_KEY / PUKU_AUTH_TOKEN shadow it.\n if (apiKey === undefined) {\n apiKey = opts.profile != null ? null : readEnv('PUKU_API_KEY') ?? null;\n }\n if (authToken === undefined) {\n authToken = opts.profile != null ? null : readEnv('PUKU_AUTH_TOKEN') ?? null;\n }\n if (opts.profile != null && (opts.credentials != null || opts.config != null)) {\n throw new TypeError('Pass at most one of `profile`, `credentials`, or `config`.');\n }\n const options: ClientOptions = {\n apiKey,\n authToken,\n webhookKey,\n ...opts,\n baseURL: baseURL || '',\n };\n\n if (!options.baseURL) {\n throw new Errors.PukuError(\n \"Missing baseURL: pass `baseURL` to the constructor or set the PUKU_BASE_URL environment variable.\",\n );\n }\n\n if (!options.dangerouslyAllowBrowser && isRunningInBrowser()) {\n throw new Errors.PukuError(\n \"It looks like you're running in a browser-like environment.\\n\\nThis is disabled by default, as it risks exposing your secret API credentials to attackers.\\nIf you understand the risks and have appropriate mitigations in place,\\nyou can set the `dangerouslyAllowBrowser` option to `true`, e.g.,\\n\\nnew PukuAI({ apiKey, dangerouslyAllowBrowser: true });\\n\",\n );\n }\n\n this.baseURL = options.baseURL!;\n // Normalize a trailing `/v1` so the SDK can append paths\n // (`/v1/messages`, `/v1/models`, etc.) without doubling the prefix. Puku\n // gateways are also commonly deployed at the bare host (e.g.\n // `https://api.sdk.puku.sh`); both forms must work.\n if (this.baseURL.endsWith('/v1')) {\n this.baseURL = this.baseURL.slice(0, -3);\n }\n // After destructuring, `baseURL` is the constructor arg or\n // PUKU_BASE_URL — both count as an explicit choice that a profile\n // base_url must not override. A falsy value means we fell through to the\n // hardcoded default above and a profile may supply the host. withOptions()\n // propagates the parent's flag via __baseURLIsExplicit so a non-overriding\n // clone doesn't mistake the inherited baseURL for a caller-supplied one.\n this._baseURLIsExplicit = (opts as InternalClientOptions).__baseURLIsExplicit ?? !!baseURL;\n this.timeout = options.timeout ?? BasePuku.DEFAULT_TIMEOUT /* 10 minutes */;\n this.logger = options.logger ?? console;\n // Set default logLevel early so that we can log a warning in parseLogLevel.\n this.logLevel = defaultLogLevel;\n this.logLevel =\n parseLogLevel(options.logLevel, 'ClientOptions.logLevel', loggerFor(this)) ??\n parseLogLevel(readEnv('PUKU_LOG'), \"process.env['PUKU_LOG']\", loggerFor(this)) ??\n defaultLogLevel;\n this.fetchOptions = options.fetchOptions;\n this.maxRetries = options.maxRetries ?? 2;\n this.fetch = options.fetch ?? Shims.getDefaultFetch();\n this.#encoder = Opts.FallbackEncoder;\n\n this.middleware = [...(options.middleware ?? [])];\n\n const customHeadersEnv = readEnv('PUKU_CUSTOM_HEADERS');\n if (customHeadersEnv) {\n const parsed: Record<string, string> = {};\n for (const line of customHeadersEnv.split('\\n')) {\n const colon = line.indexOf(':');\n if (colon >= 0) {\n parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();\n }\n }\n options.defaultHeaders = { ...parsed, ...options.defaultHeaders };\n }\n\n const inherited = (opts as InternalClientOptions).__auth;\n // Never persist the internal __auth handle on _options — it's a\n // one-shot constructor signal, and leaking it through _options would\n // cause withOptions() to spread a stale value into clones.\n delete (options as InternalClientOptions).__auth;\n delete (options as InternalClientOptions).__baseURLIsExplicit;\n this._options = options;\n\n this.apiKey = typeof apiKey === 'string' ? apiKey : null;\n this.authToken = authToken;\n this.webhookKey = webhookKey;\n\n if (inherited) {\n this._authState = inherited;\n if (!this._baseURLIsExplicit && inherited.baseURL) {\n this.baseURL = inherited.baseURL;\n }\n } else {\n this._authState = { provider: null, tokenCache: null, resolution: null, error: null, extraHeaders: {} };\n\n // apiKey/authToken win over credentials/config/profile; don't build a\n // token cache or resolve a config that the request path will then ignore.\n if (this.apiKey == null && this.authToken == null) {\n const credentials = options.credentials ?? null;\n if (credentials) {\n this._authState.provider = credentials;\n this._authState.tokenCache = this._makeTokenCache(credentials);\n } else if (options.config != null) {\n const result = resolveCredentialsFromConfig(options.config, this._credentialResolverOptions());\n this._authState.provider = result.provider;\n this._authState.tokenCache = this._makeTokenCache(result.provider);\n this._authState.extraHeaders = result.extraHeaders;\n this._applyCredentialBaseURL(result.baseURL);\n } else if (options.profile != null) {\n this._authState.resolution = this._resolveDefaultCredentials(options.profile);\n } else if (this._shouldResolveDefaultCredentials()) {\n // No explicit auth provided — lazily resolve from the credential\n // chain on first request. Errors are captured into _auth.error and\n // surfaced on first use rather than as an unhandled rejection.\n this._authState.resolution = this._resolveDefaultCredentials();\n }\n }\n }\n }\n\n /**\n * Whether to lazily resolve auth from the default credential chain when no\n * explicit auth is configured. Called once from the constructor, so\n * overrides must not depend on subclass instance state. Subclasses that\n * bring their own auth scheme return false so unrelated local credentials\n * are never resolved or allowed to supply a base URL.\n */\n protected _shouldResolveDefaultCredentials(): boolean {\n return true;\n }\n\n /**\n * Stores a profile/config-supplied base URL on the shared auth state and, if\n * the caller did not pin `baseURL` via constructor option or env, adopts it\n * as this client's outbound API host. Precedence: ctor opt > env > profile >\n * hardcoded default.\n */\n private _applyCredentialBaseURL(baseURL: string | undefined): void {\n if (!baseURL) return;\n const normalized = baseURL.replace(/\\/+$/, '');\n this._authState.baseURL = normalized;\n if (!this._baseURLIsExplicit) {\n this.baseURL = normalized;\n }\n }\n\n /**\n * Options bag passed into the credential chain. `baseURL` here is only the\n * fallback host for the token-exchange POST when the config itself omits\n * `base_url`; the chain returns the config's own `base_url` (if any) on\n * {@link CredentialResult.baseURL}, which {@link _applyCredentialBaseURL}\n * then adopts for outbound API requests. The two are deliberately decoupled\n * so this fallback never round-trips into precedence.\n */\n private _credentialResolverOptions() {\n return {\n baseURL: this.baseURL,\n fetch: this._credentialsFetch(),\n userAgent: this.getUserAgent(),\n onCacheWriteError: (err: unknown) => {\n loggerFor(this).debug('credential cache write failed (best-effort)', err);\n },\n onSafetyWarning: (msg: string) => {\n loggerFor(this).warn(msg);\n },\n };\n }\n\n /**\n * A `Fetch` for first-party credential token-exchange requests (OIDC\n * federation jwt-bearer grants, user-OAuth refresh grants) that routes\n * through this client's middleware chain, so middleware observes token\n * traffic like any other request. Only client-level middleware applies:\n * a minted token is shared across requests, so attributing the exchange\n * to any one request's per-request middleware would be arbitrary. For the\n * same reason, `ctx.options` is undefined for these requests.\n */\n private _credentialsFetch(): Fetch {\n return wrapFetchWithMiddleware(this.fetch, this.middleware, undefined, this);\n }\n\n private _makeTokenCache(provider: AccessTokenProvider): TokenCache {\n return new TokenCache(provider, (err) => {\n loggerFor(this).debug('advisory token refresh failed; serving cached token', err);\n });\n }\n\n /**\n * Create a new client instance re-using the same options given to the current client with optional overriding.\n */\n withOptions(options: Partial<ClientOptions>): this {\n // Share the auth state object unless the caller passes any auth-related\n // key. The `in` check is intentional: even `apiKey: undefined` opts the\n // clone out of sharing (it gets its own _auth and TokenCache, though it\n // may still wrap the parent's provider via the credentials spread below).\n const overridesStructuredAuth = 'credentials' in options || 'config' in options || 'profile' in options;\n const overridesAuth = 'apiKey' in options || 'authToken' in options || overridesStructuredAuth;\n const internal: InternalClientOptions = {\n ...this._options,\n // Only forward baseURL when the caller (or env) explicitly chose it.\n // For a non-explicit parent, this.baseURL may have been mutated to the\n // profile-resolved host; pinning that as the clone's options.baseURL\n // would make _options on the clone misreport caller intent and would\n // leave the clone stuck on the parent's host across an auth override.\n // The clone instead receives the construction-time value via\n // ...this._options above and re-adopts the profile host through the\n // shared _authState.baseURL + __baseURLIsExplicit=false path.\n ...(this._baseURLIsExplicit ? { baseURL: this.baseURL } : {}),\n maxRetries: this.maxRetries,\n timeout: this.timeout,\n logger: this.logger,\n logLevel: this.logLevel,\n fetch: this.fetch,\n fetchOptions: this.fetchOptions,\n middleware: this.middleware,\n apiKey: this.apiKey,\n authToken: this.authToken,\n webhookKey: this.webhookKey,\n // credentials: this.credentials is a no-op when __auth is shared (the\n // ctor takes the inherited path and ignores options.credentials); when\n // overridesAuth is true via apiKey/authToken only, it lets the clone\n // build a fresh TokenCache around the parent's provider.\n credentials: this.credentials,\n // When the caller passes a structured-credential override, drop inherited\n // structured-credential options so only `...options` supplies them —\n // otherwise an inherited `credentials`/`config`/`profile` would trip the\n // mutual-exclusion check or precedence over the override.\n ...(overridesStructuredAuth ? { credentials: undefined, config: undefined, profile: undefined } : {}),\n ...options,\n // Always set __auth so any stale value from ...this._options is\n // overwritten. undefined means \"build fresh auth from these options\".\n __auth: overridesAuth ? undefined : this._authState,\n __baseURLIsExplicit: 'baseURL' in options ? true : this._baseURLIsExplicit,\n };\n return new (this.constructor as any as new (props: ClientOptions) => typeof this)(internal);\n }\n\n /**\n * Lazily resolves credentials from config files or environment variables.\n * Called once from the constructor when no explicit auth is provided, or\n * when an explicit `profile` was passed (in which case a missing/unresolved\n * profile is surfaced as an error instead of falling through to \"no auth\").\n * The returned promise is stored and awaited on the first request.\n */\n private async _resolveDefaultCredentials(profile?: string): Promise<void> {\n try {\n const result = await defaultCredentials(this._credentialResolverOptions(), profile);\n if (result) {\n this._authState.provider = result.provider;\n this._authState.tokenCache = this._makeTokenCache(result.provider);\n this._authState.extraHeaders = result.extraHeaders;\n this._applyCredentialBaseURL(result.baseURL);\n } else if (profile != null) {\n throw new Errors.PukuError(\n `Profile \"${profile}\" could not be resolved (no <config_dir>/configs/${profile}.json found).`,\n );\n }\n } catch (err) {\n this._authState.error = err;\n } finally {\n this._authState.resolution = null;\n }\n }\n\n /**\n * Check whether the base URL is set to its default.\n *\n * A profile-supplied `base_url` counts as an override here: a profile that\n * pins a non-default host is declaring \"this whole client targets deployment\n * X\", so per-endpoint {@link RequestOptions.defaultBaseURL} hints must not\n * silently route individual calls back to production. No generated resource\n * currently sets `defaultBaseURL`, so this is documenting intent for when\n * one does.\n */\n #baseURLOverridden(): boolean {\n return this.baseURL !== '';\n }\n\n protected defaultQuery(): Record<string, string | undefined> | undefined {\n return this._options.defaultQuery;\n }\n\n protected validateHeaders({ values, nulls }: NullableHeaders) {\n if (values.get('x-api-key') || values.get('authorization')) {\n return;\n }\n if (this._authState.error) {\n throw this._authState.error;\n }\n if (this._authState.tokenCache || this._authState.resolution) {\n return; // auth will be injected per-request via authHeaders\n }\n\n if (this.apiKey && values.get('x-api-key')) {\n return;\n }\n if (nulls.has('x-api-key')) {\n return;\n }\n\n if (this.authToken && values.get('authorization')) {\n return;\n }\n if (nulls.has('authorization')) {\n return;\n }\n\n throw new Error(\n 'Could not resolve authentication method. Expected one of apiKey, authToken, credentials, config, or profile to be set. Or for one of the \"X-Api-Key\" or \"Authorization\" headers to be explicitly omitted',\n );\n }\n\n private _authFlags(opts: FinalRequestOptions): RequestAuthFlags {\n let flags = this._requestAuthFlags.get(opts);\n if (!flags) {\n flags = { usedTokenCache: false, didRefreshFor401: false };\n this._requestAuthFlags.set(opts, flags);\n }\n return flags;\n }\n\n protected async authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined> {\n // Wait for lazy credential resolution if it's in progress. If it failed,\n // return no auth headers — validateHeaders surfaces the stored error\n // after the explicit-header escape hatch has had a chance to apply.\n if (this._authState.resolution) {\n await this._authState.resolution;\n }\n if (this._authState.error) {\n return undefined;\n }\n // If we have a token cache and no API key is set, use token auth\n if (this._authState.tokenCache && this.apiKey == null) {\n const token = await this._authState.tokenCache.getToken();\n this._authFlags(opts).usedTokenCache = true;\n return buildHeaders([{ Authorization: `Bearer ${token}` }]);\n }\n return buildHeaders([await this.apiKeyAuth(opts), await this.bearerAuth(opts)]);\n }\n\n protected async apiKeyAuth(opts: FinalRequestOptions): Promise<NullableHeaders | undefined> {\n if (this.apiKey == null) {\n return undefined;\n }\n return buildHeaders([{ 'X-Api-Key': this.apiKey }]);\n }\n\n protected async bearerAuth(opts: FinalRequestOptions): Promise<NullableHeaders | undefined> {\n if (this.authToken == null) {\n return undefined;\n }\n return buildHeaders([{ Authorization: `Bearer ${this.authToken}` }]);\n }\n\n protected stringifyQuery(query: object | Record<string, unknown>): string {\n return stringifyQuery(query);\n }\n\n protected getUserAgent(): string {\n return `Puku/JS ${VERSION}`;\n }\n\n protected defaultIdempotencyKey(): string {\n return `stainless-node-retry-${uuid4()}`;\n }\n\n protected makeStatusError(\n status: number,\n error: Object,\n message: string | undefined,\n headers: Headers,\n ): Errors.APIError {\n return Errors.APIError.generate(status, error, message, headers);\n }\n\n buildURL(\n path: string,\n query: Record<string, unknown> | null | undefined,\n defaultBaseURL?: string | undefined,\n ): string {\n const baseURL = (!this.#baseURLOverridden() && defaultBaseURL) || this.baseURL;\n const url =\n isAbsoluteURL(path) ?\n new URL(path)\n : new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));\n\n const defaultQuery = this.defaultQuery();\n const pathQuery = Object.fromEntries(url.searchParams);\n if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {\n query = { ...pathQuery, ...defaultQuery, ...query };\n }\n\n if (typeof query === 'object' && query && !Array.isArray(query)) {\n url.search = this.stringifyQuery(query);\n }\n\n return url.toString();\n }\n\n _calculateNonstreamingTimeout(maxTokens: number): number {\n const defaultTimeout = 10 * 60;\n const expectedTimeout = (60 * 60 * maxTokens) / 128_000;\n if (expectedTimeout > defaultTimeout) {\n throw new Errors.PukuError(\n 'Streaming is required for operations that may take longer than 10 minutes. ' +\n 'See https://github.com/puku-ai/sdk#streaming-responses for more details',\n );\n }\n return defaultTimeout * 1000;\n }\n\n /**\n * Used as a callback for mutating the given `FinalRequestOptions` object.\n */\n protected async prepareOptions(options: FinalRequestOptions): Promise<void> {}\n\n /**\n * Used as a callback for mutating the given `RequestInit` object.\n *\n * This is useful for cases where you want to add certain headers based off of\n * the request properties, e.g. `method` or `url`.\n *\n * Runs after all middleware (including {@link backendMiddleware}),\n * immediately before each underlying fetch call, so it sees exactly what\n * goes over the wire. Middleware may replay a request by calling `next()`\n * more than once, so this hook can run multiple times per attempt:\n * overrides must be idempotent and overwrite headers from a previous\n * invocation rather than append to them.\n */\n protected async prepareRequest(\n request: RequestInit,\n { url, options }: { url: string; options: FinalRequestOptions },\n ): Promise<void> {\n // Append auth-derived headers when using token auth. Done here (after all\n // header merging) rather than in authHeaders() so we append to any existing\n // puku-beta values instead of being overwritten by later header sources.\n if (this._authState.tokenCache && this.apiKey == null) {\n // Normalize to a Headers instance — custom fetch impls or polyfills can\n // hand back arrays / plain objects, and silently dropping the beta\n // header in that case would surface as a confusing server-side 4xx.\n const headers = request.headers instanceof Headers ? request.headers : new Headers(request.headers);\n for (const [k, v] of Object.entries(this._authState.extraHeaders)) {\n if (!headers.has(k)) headers.set(k, v);\n }\n const existing = headers\n .get('puku-beta')\n ?.split(',')\n .map((s) => s.trim());\n if (!existing?.includes(OAUTH_API_BETA_HEADER)) {\n headers.append('puku-beta', OAUTH_API_BETA_HEADER);\n }\n request.headers = headers;\n }\n }\n\n /**\n * Internal {@link Middleware} composed innermost in the chain — inside both\n * client-level and per-request middleware, immediately around the underlying\n * `fetch`. Subclasses for third-party backends override this to adapt the\n * canonical PukuAI-shaped request to the backend's wire shape (URL/body\n * rewriting, request signing) and to normalize the wire response back to the\n * canonical shape (e.g. AWS EventStream to SSE).\n *\n * Running inside the user's middleware means user middleware always observes\n * canonical PukuAI-shaped traffic, and the adaptation re-runs (e.g.\n * re-signs) on every `next()` invocation, covering whatever the middleware\n * mutated.\n *\n * Errors thrown here follow the middleware error policy: they propagate to\n * the caller as-is — no retries, no `APIConnectionError` wrapping — unless\n * retryable (see {@link Middleware}); throw a `RetryableError` to opt into\n * the retry path.\n */\n protected backendMiddleware(): ReadonlyArray<Middleware> {\n return [];\n }\n\n get<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp> {\n return this.methodRequest('get', path, opts);\n }\n\n post<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp> {\n return this.methodRequest('post', path, opts);\n }\n\n patch<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp> {\n return this.methodRequest('patch', path, opts);\n }\n\n put<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp> {\n return this.methodRequest('put', path, opts);\n }\n\n delete<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp> {\n return this.methodRequest('delete', path, opts);\n }\n\n private methodRequest<Rsp>(\n method: HTTPMethod,\n path: string,\n opts?: PromiseOrValue<RequestOptions>,\n ): APIPromise<Rsp> {\n return this.request(\n Promise.resolve(opts).then((opts) => {\n return { method, path, ...opts };\n }),\n );\n }\n\n request<Rsp>(\n options: PromiseOrValue<FinalRequestOptions>,\n remainingRetries: number | null = null,\n ): APIPromise<Rsp> {\n return new APIPromise(this, this.makeRequest(options, remainingRetries, undefined));\n }\n\n private async makeRequest(\n optionsInput: PromiseOrValue<FinalRequestOptions>,\n retriesRemaining: number | null,\n retryOfRequestLogID: string | undefined,\n ): Promise<APIResponseProps> {\n const options = await optionsInput;\n const maxRetries = options.maxRetries ?? this.maxRetries;\n if (retriesRemaining == null) {\n retriesRemaining = maxRetries;\n // Top-level call: reset per-request auth flags so a reused options object\n // (via client.request(opts)) doesn't carry stale 401-refresh state.\n this._requestAuthFlags.delete(options);\n }\n\n await this.prepareOptions(options);\n\n const { req, url, timeout } = await this.buildRequest(options, {\n retryCount: maxRetries - retriesRemaining,\n });\n\n /** Not an API request ID, just for correlating local log entries. */\n const requestLogID = 'log_' + ((Math.random() * (1 << 24)) | 0).toString(16).padStart(6, '0');\n const retryLogStr = retryOfRequestLogID === undefined ? '' : `, retryOf: ${retryOfRequestLogID}`;\n const startTime = Date.now();\n\n if (options.signal?.aborted) {\n throw new Errors.APIUserAbortError();\n }\n\n const controller = new AbortController();\n const response = await this.fetchWithTimeout(url, req, timeout, controller, options, {\n requestLogID,\n retryOfRequestLogID,\n }).catch(castToError);\n const headersTime = Date.now();\n\n if (response instanceof globalThis.Error) {\n releaseRequestSignal(controller);\n const retryMessage = `retrying, ${retriesRemaining} attempts remaining`;\n if (options.signal?.aborted) {\n throw new Errors.APIUserAbortError();\n }\n // detect native connection timeout errors\n // deno throws \"TypeError: error sending request for url (https://example/): client error (Connect): tcp connect error: Operation timed out (os error 60): Operation timed out (os error 60)\"\n // undici throws \"TypeError: fetch failed\" with cause \"ConnectTimeoutError: Connect Timeout Error (attempted address: example:443, timeout: 1ms)\"\n // others do not provide enough information to distinguish timeouts from other connection errors\n const isTimeout =\n isAbortError(response) ||\n /timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : ''));\n\n // Errors thrown by middleware (user middleware and the backend adaptation\n // alike) propagate to the caller as-is — no retries, no APIConnectionError\n // wrapping — except retryable errors (timeouts/aborts, APIConnectionErrors,\n // and RetryableErrors, directly or in the `cause` chain), which stay on the\n // retry path.\n const hasMiddleware =\n this.middleware.length > 0 || !!options.middleware?.length || this.backendMiddleware().length > 0;\n if (hasMiddleware && !isTimeout && !isRetryableError(response)) {\n loggerFor(this).info(`[${requestLogID}] middleware error (not retryable)`);\n loggerFor(this).debug(\n `[${requestLogID}] middleware error (not retryable)`,\n formatRequestDetails({\n retryOfRequestLogID,\n url,\n durationMs: headersTime - startTime,\n message: response.message,\n }),\n );\n throw response;\n }\n if (retriesRemaining) {\n loggerFor(this).info(\n `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`,\n );\n loggerFor(this).debug(\n `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`,\n formatRequestDetails({\n retryOfRequestLogID,\n url,\n durationMs: headersTime - startTime,\n message: response.message,\n }),\n );\n return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID);\n }\n loggerFor(this).info(\n `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`,\n );\n loggerFor(this).debug(\n `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`,\n formatRequestDetails({\n retryOfRequestLogID,\n url,\n durationMs: headersTime - startTime,\n message: response.message,\n }),\n );\n if (isTimeout) {\n throw new Errors.APIConnectionTimeoutError();\n }\n // a retryable middleware-origin error is still the caller's error: once retries are\n // exhausted it propagates as-is rather than wrapped in APIConnectionError\n if (hasMiddleware && !isFetchOriginError(response)) {\n throw response;\n }\n throw new Errors.APIConnectionError({ cause: response });\n }\n\n const specialHeaders = [...response.headers.entries()]\n .filter(([name]) => name === 'request-id' || name === 'puku-workspace-id')\n .map(([name, value]) => ', ' + name + ': ' + JSON.stringify(value))\n .join('');\n const responseInfo = `[${requestLogID}${retryLogStr}${specialHeaders}] ${req.method} ${url} ${\n response.ok ? 'succeeded' : 'failed'\n } with status ${response.status} in ${headersTime - startTime}ms`;\n\n if (!response.ok) {\n const shouldRetry = await this.shouldRetry(response, options);\n if (retriesRemaining && shouldRetry) {\n const retryMessage = `retrying, ${retriesRemaining} attempts remaining`;\n\n // We don't need the body of this response.\n await Shims.CancelReadableStream(response.body);\n releaseRequestSignal(controller);\n loggerFor(this).info(`${responseInfo} - ${retryMessage}`);\n loggerFor(this).debug(\n `[${requestLogID}] response error (${retryMessage})`,\n formatRequestDetails({\n retryOfRequestLogID,\n url: response.url,\n status: response.status,\n headers: response.headers,\n durationMs: headersTime - startTime,\n }),\n );\n return this.retryRequest(\n options,\n retriesRemaining,\n retryOfRequestLogID ?? requestLogID,\n response.headers,\n );\n }\n\n const retryMessage = shouldRetry ? `error; no more retries left` : `error; not retryable`;\n\n loggerFor(this).info(`${responseInfo} - ${retryMessage}`);\n\n const errText = await response.text().catch((err: any) => castToError(err).message);\n const errJSON = safeJSON(errText) as any;\n const errMessage = errJSON ? undefined : errText;\n\n loggerFor(this).debug(\n `[${requestLogID}] response error (${retryMessage})`,\n formatRequestDetails({\n retryOfRequestLogID,\n url: response.url,\n status: response.status,\n headers: response.headers,\n message: errMessage,\n durationMs: Date.now() - startTime,\n }),\n );\n\n releaseRequestSignal(controller);\n const err = this.makeStatusError(response.status, errJSON, errMessage, response.headers);\n throw err;\n }\n\n loggerFor(this).info(responseInfo);\n loggerFor(this).debug(\n `[${requestLogID}] response start`,\n formatRequestDetails({\n retryOfRequestLogID,\n url: response.url,\n status: response.status,\n headers: response.headers,\n durationMs: headersTime - startTime,\n }),\n );\n\n armAbandonmentBackstop(response.body ?? response, controller);\n return { response, options, controller, requestLogID, retryOfRequestLogID, startTime };\n }\n\n getAPIList<Item, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(\n path: string,\n Page: new (...args: any[]) => PageClass,\n opts?: PromiseOrValue<RequestOptions>,\n ): Pagination.PagePromise<PageClass, Item> {\n return this.requestAPIList(\n Page,\n opts && 'then' in opts ?\n opts.then((opts) => ({ method: 'get', path, ...opts }))\n : { method: 'get', path, ...opts },\n );\n }\n\n requestAPIList<\n Item = unknown,\n PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>,\n >(\n Page: new (...args: ConstructorParameters<typeof Pagination.AbstractPage>) => PageClass,\n options: PromiseOrValue<FinalRequestOptions>,\n ): Pagination.PagePromise<PageClass, Item> {\n const request = this.makeRequest(options, null, undefined);\n return new Pagination.PagePromise<PageClass, Item>(this as any as PukuAI, request, Page);\n }\n\n async fetchWithTimeout(\n url: RequestInfo,\n init: RequestInit | undefined,\n ms: number,\n controller: AbortController,\n requestOptions?: FinalRequestOptions | undefined,\n logCtx?: { requestLogID: string; retryOfRequestLogID?: string | undefined } | undefined,\n ): Promise<Response> {\n const { signal, method, ...options } = init || {};\n // Avoid creating a closure over `this`, `init`, or `options` to prevent memory leaks.\n // An arrow function like `() => controller.abort()` captures the surrounding scope,\n // which includes the request body and other large objects. When the user passes a\n // long-lived AbortSignal, the listener prevents those objects from being GC'd for\n // the lifetime of the signal. Using `.bind()` only retains a reference to the\n // controller itself.\n const abort = this._makeAbort(controller);\n if (signal) {\n signal.addEventListener('abort', abort, { once: true });\n registerRequestSignalCleanup(controller, signal, abort);\n }\n\n const isReadableBody =\n ((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) ||\n (typeof options.body === 'object' && options.body !== null && Symbol.asyncIterator in options.body);\n\n const fetchOptions: RequestInit = {\n signal: controller.signal as any,\n ...(isReadableBody ? { duplex: 'half' } : {}),\n method: 'GET',\n ...options,\n };\n if (method) {\n // Custom methods like 'patch' need to be uppercased\n // See https://github.com/nodejs/undici/issues/2294\n fetchOptions.method = method.toUpperCase();\n }\n\n // Arm the timeout around the underlying fetch only, not the middleware\n // chain — middleware can take arbitrarily long (or call `next` more than\n // once), and each inner-fetch invocation gets its own `ms` timer.\n const baseFetch = this.fetch;\n const timedFetch: Fetch = async (innerUrl, innerInit) => {\n const timeout = setTimeout(abort, ms);\n try {\n return await baseFetch.call(undefined, innerUrl, innerInit);\n } finally {\n clearTimeout(timeout);\n }\n };\n\n // Prepare the request (auth signing and other `prepareRequest` hooks) as\n // the innermost step, after any middleware — including the backend\n // middleware, so it sees exactly what goes over the wire. Runs per\n // inner-fetch invocation, so a request middleware rewrote — or replayed\n // via a second `next()` call — is prepared fresh each time. Preparation is\n // outside the timeout timer, matching its pre-middleware behavior.\n const innerFetch: Fetch =\n requestOptions === undefined ? timedFetch : (\n async (innerUrl, innerInit = {}) => {\n const innerUrlStr =\n typeof innerUrl === 'string' ? innerUrl\n : innerUrl instanceof URL ? innerUrl.href\n : innerUrl.url;\n innerInit.headers =\n innerInit.headers instanceof Headers ? innerInit.headers : new Headers(innerInit.headers);\n\n await this.prepareRequest(innerInit, { url: innerUrlStr, options: requestOptions });\n\n if (logCtx) {\n loggerFor(this).debug(\n `[${logCtx.requestLogID}] sending request`,\n formatRequestDetails({\n retryOfRequestLogID: logCtx.retryOfRequestLogID,\n method: innerInit.method,\n url: innerUrlStr,\n options: requestOptions,\n headers: innerInit.headers,\n }),\n );\n }\n\n return timedFetch(innerUrl, innerInit);\n }\n );\n\n const requestMiddleware = requestOptions?.middleware;\n const backendMiddleware = this.backendMiddleware();\n const allMiddleware =\n requestMiddleware?.length || backendMiddleware.length ?\n [...this.middleware, ...(requestMiddleware ?? []), ...backendMiddleware]\n : this.middleware;\n return await wrapFetchWithMiddleware(innerFetch, allMiddleware, requestOptions, this)(url, fetchOptions);\n }\n\n private async shouldRetry(response: Response, options: FinalRequestOptions): Promise<boolean> {\n // Reactive refresh: on a 401 from a request that used the token cache,\n // invalidate and retry once. Only fires when this specific request was\n // bearer-authenticated (not when an apiKey was used) and only once per\n // request — a second 401 after refresh falls through to the normal\n // retry policy below (which treats 4xx as non-retryable).\n const flags = this._authFlags(options);\n if (\n response.status === 401 &&\n this._authState.tokenCache &&\n flags.usedTokenCache &&\n !flags.didRefreshFor401\n ) {\n flags.didRefreshFor401 = true;\n this._authState.tokenCache.invalidate();\n return true;\n }\n\n // Note this is not a standard header.\n const shouldRetryHeader = response.headers.get('x-should-retry');\n\n // If the server explicitly says whether or not to retry, obey.\n if (shouldRetryHeader === 'true') return true;\n if (shouldRetryHeader === 'false') return false;\n\n // Retry on request timeouts.\n if (response.status === 408) return true;\n\n // Retry on lock timeouts.\n if (response.status === 409) return true;\n\n // Retry on rate limits.\n if (response.status === 429) return true;\n\n // Retry internal errors.\n if (response.status >= 500) return true;\n\n return false;\n }\n\n private async retryRequest(\n options: FinalRequestOptions,\n retriesRemaining: number,\n requestLogID: string,\n responseHeaders?: Headers | undefined,\n ): Promise<APIResponseProps> {\n let timeoutMillis: number | undefined;\n\n // Note the `retry-after-ms` header may not be standard, but is a good idea and we'd like proactive support for it.\n const retryAfterMillisHeader = responseHeaders?.get('retry-after-ms');\n if (retryAfterMillisHeader) {\n const timeoutMs = parseFloat(retryAfterMillisHeader);\n if (!Number.isNaN(timeoutMs)) {\n timeoutMillis = timeoutMs;\n }\n }\n\n // About the Retry-After header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After\n const retryAfterHeader = responseHeaders?.get('retry-after');\n if (retryAfterHeader && !timeoutMillis) {\n const timeoutSeconds = parseFloat(retryAfterHeader);\n if (!Number.isNaN(timeoutSeconds)) {\n timeoutMillis = timeoutSeconds * 1000;\n } else {\n timeoutMillis = Date.parse(retryAfterHeader) - Date.now();\n }\n }\n\n // If the API asks us to wait a certain amount of time, just do what it\n // says, but otherwise calculate a default\n if (timeoutMillis === undefined) {\n const maxRetries = options.maxRetries ?? this.maxRetries;\n timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);\n }\n await sleep(timeoutMillis);\n\n return this.makeRequest(options, retriesRemaining - 1, requestLogID);\n }\n\n private calculateDefaultRetryTimeoutMillis(retriesRemaining: number, maxRetries: number): number {\n const initialRetryDelay = 0.5;\n const maxRetryDelay = 8.0;\n\n const numRetries = maxRetries - retriesRemaining;\n\n // Apply exponential backoff, but not more than the max.\n const sleepSeconds = Math.min(initialRetryDelay * Math.pow(2, numRetries), maxRetryDelay);\n\n // Apply some jitter, take up to at most 25 percent of the retry time.\n const jitter = 1 - Math.random() * 0.25;\n\n return sleepSeconds * jitter * 1000;\n }\n\n public calculateNonstreamingTimeout(maxTokens: number, maxNonstreamingTokens?: number): number {\n const maxTime = 60 * 60 * 1000; // 60 minutes\n const defaultTime = 60 * 10 * 1000; // 10 minutes\n\n const expectedTime = (maxTime * maxTokens) / 128000;\n if (expectedTime > defaultTime || (maxNonstreamingTokens != null && maxTokens > maxNonstreamingTokens)) {\n throw new Errors.PukuError(\n 'Streaming is required for operations that may take longer than 10 minutes. See https://github.com/puku-ai/sdk#long-requests for more details',\n );\n }\n\n return defaultTime;\n }\n\n async buildRequest(\n inputOptions: FinalRequestOptions,\n { retryCount = 0 }: { retryCount?: number } = {},\n ): Promise<{ req: FinalizedRequestInit; url: string; timeout: number }> {\n const options = { ...inputOptions };\n const { method, path, query, defaultBaseURL } = options;\n\n // Lazy credential resolution may carry a profile-supplied baseURL. Await\n // it before building the request URL so the very first request — and\n // requests on withOptions() clones created before resolution settled —\n // hit the profile's host rather than the hardcoded default.\n if (this._authState.resolution) {\n await this._authState.resolution;\n }\n if (!this._baseURLIsExplicit && this._authState.baseURL && this.baseURL !== this._authState.baseURL) {\n this.baseURL = this._authState.baseURL;\n }\n\n const url = this.buildURL(path!, query as Record<string, unknown>, defaultBaseURL);\n if ('timeout' in options) validatePositiveInteger('timeout', options.timeout);\n options.timeout = options.timeout ?? this.timeout;\n const { bodyHeaders, body } = this.buildBody({ options });\n const reqHeaders = await this.buildHeaders({ options: inputOptions, method, bodyHeaders, retryCount });\n\n const req: FinalizedRequestInit = {\n method,\n headers: reqHeaders,\n ...(options.signal && { signal: options.signal }),\n ...((globalThis as any).ReadableStream &&\n body instanceof (globalThis as any).ReadableStream && { duplex: 'half' }),\n ...(body && { body }),\n ...((this.fetchOptions as any) ?? {}),\n ...((options.fetchOptions as any) ?? {}),\n };\n\n return { req, url, timeout: options.timeout };\n }\n\n private async buildHeaders({\n options,\n method,\n bodyHeaders,\n retryCount,\n }: {\n options: FinalRequestOptions;\n method: HTTPMethod;\n bodyHeaders: HeadersLike;\n retryCount: number;\n }): Promise<Headers> {\n let idempotencyHeaders: HeadersLike = {};\n if (this.idempotencyHeader && method !== 'get') {\n if (!options.idempotencyKey) options.idempotencyKey = this.defaultIdempotencyKey();\n idempotencyHeaders[this.idempotencyHeader] = options.idempotencyKey;\n }\n\n const headers = buildHeaders([\n idempotencyHeaders,\n {\n Accept: 'application/json',\n 'User-Agent': this.getUserAgent(),\n 'X-Stainless-Retry-Count': String(retryCount),\n ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}),\n ...getPlatformHeaders(),\n ...(this._options.dangerouslyAllowBrowser ?\n { 'puku-dangerous-direct-browser-access': 'true' }\n : undefined),\n 'puku-version': '2023-06-01',\n },\n await this.authHeaders(options),\n this._options.defaultHeaders,\n bodyHeaders,\n options.headers,\n ]);\n\n this.validateHeaders(headers);\n\n return headers.values;\n }\n\n private _makeAbort(controller: AbortController) {\n // note: we can't just inline this method inside `fetchWithTimeout()` because then the closure\n // would capture all request options, and cause a memory leak.\n return () => controller.abort();\n }\n\n private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): {\n bodyHeaders: HeadersLike;\n body: BodyInit | undefined;\n } {\n if (!body) {\n return { bodyHeaders: undefined, body: undefined };\n }\n const headers = buildHeaders([rawHeaders]);\n if (\n // Pass raw type verbatim\n ArrayBuffer.isView(body) ||\n body instanceof ArrayBuffer ||\n body instanceof DataView ||\n (typeof body === 'string' &&\n // Preserve legacy string encoding behavior for now\n headers.values.has('content-type')) ||\n // `Blob` is superset of `File`\n ((globalThis as any).Blob && body instanceof (globalThis as any).Blob) ||\n // `FormData` -> `multipart/form-data`\n body instanceof FormData ||\n // `URLSearchParams` -> `application/x-www-form-urlencoded`\n body instanceof URLSearchParams ||\n // Send chunked stream (each chunk has own `length`)\n ((globalThis as any).ReadableStream && body instanceof (globalThis as any).ReadableStream)\n ) {\n return { bodyHeaders: undefined, body: body as BodyInit };\n } else if (\n typeof body === 'object' &&\n (Symbol.asyncIterator in body ||\n (Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))\n ) {\n return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable<Uint8Array>) };\n } else if (\n typeof body === 'object' &&\n headers.values.get('content-type') === 'application/x-www-form-urlencoded'\n ) {\n return {\n bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },\n body: this.stringifyQuery(body),\n };\n } else {\n return this.#encoder({ body, headers });\n }\n }\n\n static HUMAN_PROMPT = HUMAN_PROMPT;\n static AI_PROMPT = AI_PROMPT;\n static DEFAULT_TIMEOUT = 600000; // 10 minutes\n\n static PukuError = Errors.PukuError;\n static APIError = Errors.APIError;\n static APIConnectionError = Errors.APIConnectionError;\n static APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;\n static APIUserAbortError = Errors.APIUserAbortError;\n static NotFoundError = Errors.NotFoundError;\n static ConflictError = Errors.ConflictError;\n static RateLimitError = Errors.RateLimitError;\n static BadRequestError = Errors.BadRequestError;\n static AuthenticationError = Errors.AuthenticationError;\n static InternalServerError = Errors.InternalServerError;\n static PermissionDeniedError = Errors.PermissionDeniedError;\n static UnprocessableEntityError = Errors.UnprocessableEntityError;\n\n static toFile = Uploads.toFile;\n}\n\n/**\n * API Client for interfacing with the Puku API.\n */\nexport class PukuAI extends BasePuku {\n completions: API.Completions = new API.Completions(this);\n messages: API.Messages = new API.Messages(this);\n models: API.Models = new API.Models(this);\n files: API.Files = new API.Files(this);\n skills: API.Skills = new API.Skills(this);\n beta: API.Beta = new API.Beta(this);\n}\n\nPukuAI.Completions = Completions;\nPukuAI.Messages = Messages;\nPukuAI.Models = Models;\nPukuAI.Files = Files;\nPukuAI.Skills = Skills;\nPukuAI.Beta = Beta;\n\nexport declare namespace PukuAI {\n export type RequestOptions = Opts.RequestOptions;\n export type FinalRequestOptions = Opts.FinalRequestOptions;\n\n export type { ApiKeySetter };\n\n export import Page = Pagination.Page;\n export { type PageParams as PageParams, type PageResponse as PageResponse };\n\n export import TokenPage = Pagination.TokenPage;\n export { type TokenPageParams as TokenPageParams, type TokenPageResponse as TokenPageResponse };\n\n export import PageCursor = Pagination.PageCursor;\n export { type PageCursorParams as PageCursorParams, type PageCursorResponse as PageCursorResponse };\n\n export import BidirectionalPageCursor = Pagination.BidirectionalPageCursor;\n export {\n type BidirectionalPageCursorParams as BidirectionalPageCursorParams,\n type BidirectionalPageCursorResponse as BidirectionalPageCursorResponse,\n };\n\n export {\n Completions as Completions,\n type Completion as Completion,\n type CompletionCreateParams as CompletionCreateParams,\n type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming,\n type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming,\n };\n\n export {\n Messages as Messages,\n type Base64ImageSource as Base64ImageSource,\n type Base64PDFSource as Base64PDFSource,\n type BashCodeExecutionOutputBlock as BashCodeExecutionOutputBlock,\n type BashCodeExecutionOutputBlockParam as BashCodeExecutionOutputBlockParam,\n type BashCodeExecutionResultBlock as BashCodeExecutionResultBlock,\n type BashCodeExecutionResultBlockParam as BashCodeExecutionResultBlockParam,\n type BashCodeExecutionToolResultBlock as BashCodeExecutionToolResultBlock,\n type BashCodeExecutionToolResultBlockParam as BashCodeExecutionToolResultBlockParam,\n type BashCodeExecutionToolResultError as BashCodeExecutionToolResultError,\n type BashCodeExecutionToolResultErrorCode as BashCodeExecutionToolResultErrorCode,\n type BashCodeExecutionToolResultErrorParam as BashCodeExecutionToolResultErrorParam,\n type BrowserCloseTabConfig as BrowserCloseTabConfig,\n type BrowserDoubleClickConfig as BrowserDoubleClickConfig,\n type BrowserFileUploadConfig as BrowserFileUploadConfig,\n type BrowserFindConfig as BrowserFindConfig,\n type BrowserFormInputConfig as BrowserFormInputConfig,\n type BrowserGetPageTextConfig as BrowserGetPageTextConfig,\n type BrowserHoldKeyConfig as BrowserHoldKeyConfig,\n type BrowserHoverConfig as BrowserHoverConfig,\n type BrowserJavascriptExecConfig as BrowserJavascriptExecConfig,\n type BrowserKeyConfig as BrowserKeyConfig,\n type BrowserLeftClickConfig as BrowserLeftClickConfig,\n type BrowserLeftClickDragConfig as BrowserLeftClickDragConfig,\n type BrowserLeftMouseDownConfig as BrowserLeftMouseDownConfig,\n type BrowserLeftMouseUpConfig as BrowserLeftMouseUpConfig,\n type BrowserListTabsConfig as BrowserListTabsConfig,\n type BrowserMiddleClickConfig as BrowserMiddleClickConfig,\n type BrowserMouseMoveConfig as BrowserMouseMoveConfig,\n type BrowserNavigateConfig as BrowserNavigateConfig,\n type BrowserNewTabConfig as BrowserNewTabConfig,\n type BrowserReadConsoleConfig as BrowserReadConsoleConfig,\n type BrowserReadNetworkConfig as BrowserReadNetworkConfig,\n type BrowserReadPageConfig as BrowserReadPageConfig,\n type BrowserRightClickConfig as BrowserRightClickConfig,\n type BrowserScreenshotConfig as BrowserScreenshotConfig,\n type BrowserScrollConfig as BrowserScrollConfig,\n type BrowserScrollToConfig as BrowserScrollToConfig,\n type BrowserStateBlockParam as BrowserStateBlockParam,\n type BrowserStateChange as BrowserStateChange,\n type BrowserStateChangeDownloadCompleted as BrowserStateChangeDownloadCompleted,\n type BrowserStateChangeDownloadFailed as BrowserStateChangeDownloadFailed,\n type BrowserStateChangeDownloadStarted as BrowserStateChangeDownloadStarted,\n type BrowserStateChangeTabOpened as BrowserStateChangeTabOpened,\n type BrowserStateTabEntry as BrowserStateTabEntry,\n type BrowserSwitchTabConfig as BrowserSwitchTabConfig,\n type BrowserToolset20260801 as BrowserToolset20260801,\n type BrowserToolsetConfigs as BrowserToolsetConfigs,\n type BrowserTripleClickConfig as BrowserTripleClickConfig,\n type BrowserTypeConfig as BrowserTypeConfig,\n type BrowserWaitConfig as BrowserWaitConfig,\n type BrowserZoomConfig as BrowserZoomConfig,\n type CacheControlEphemeral as CacheControlEphemeral,\n type CacheCreation as CacheCreation,\n type CitationCharLocation as CitationCharLocation,\n type CitationCharLocationParam as CitationCharLocationParam,\n type CitationContentBlockLocation as CitationContentBlockLocation,\n type CitationContentBlockLocationParam as CitationContentBlockLocationParam,\n type CitationPageLocation as CitationPageLocation,\n type CitationPageLocationParam as CitationPageLocationParam,\n type CitationSearchResultLocationParam as CitationSearchResultLocationParam,\n type CitationWebSearchResultLocationParam as CitationWebSearchResultLocationParam,\n type CitationsConfig as CitationsConfig,\n type CitationsConfigParam as CitationsConfigParam,\n type CitationsDelta as CitationsDelta,\n type CitationsSearchResultLocation as CitationsSearchResultLocation,\n type CitationsWebSearchResultLocation as CitationsWebSearchResultLocation,\n type CodeExecutionOutputBlock as CodeExecutionOutputBlock,\n type CodeExecutionOutputBlockParam as CodeExecutionOutputBlockParam,\n type CodeExecutionResultBlock as CodeExecutionResultBlock,\n type CodeExecutionResultBlockParam as CodeExecutionResultBlockParam,\n type CodeExecutionTool20250522 as CodeExecutionTool20250522,\n type CodeExecutionTool20250825 as CodeExecutionTool20250825,\n type CodeExecutionTool20260120 as CodeExecutionTool20260120,\n type CodeExecutionTool20260521 as CodeExecutionTool20260521,\n type CodeExecutionToolResultBlock as CodeExecutionToolResultBlock,\n type CodeExecutionToolResultBlockContent as CodeExecutionToolResultBlockContent,\n type CodeExecutionToolResultBlockParam as CodeExecutionToolResultBlockParam,\n type CodeExecutionToolResultBlockParamContent as CodeExecutionToolResultBlockParamContent,\n type CodeExecutionToolResultError as CodeExecutionToolResultError,\n type CodeExecutionToolResultErrorCode as CodeExecutionToolResultErrorCode,\n type CodeExecutionToolResultErrorParam as CodeExecutionToolResultErrorParam,\n type ComputerCursorPositionConfig as ComputerCursorPositionConfig,\n type ComputerDoubleClickConfig as ComputerDoubleClickConfig,\n type ComputerHoldKeyConfig as ComputerHoldKeyConfig,\n type ComputerKeyConfig as ComputerKeyConfig,\n type ComputerLeftClickConfig as ComputerLeftClickConfig,\n type ComputerLeftClickDragConfig as ComputerLeftClickDragConfig,\n type ComputerLeftMouseDownConfig as ComputerLeftMouseDownConfig,\n type ComputerLeftMouseUpConfig as ComputerLeftMouseUpConfig,\n type ComputerMiddleClickConfig as ComputerMiddleClickConfig,\n type ComputerMouseMoveConfig as ComputerMouseMoveConfig,\n type ComputerRightClickConfig as ComputerRightClickConfig,\n type ComputerScreenshotConfig as ComputerScreenshotConfig,\n type ComputerScrollConfig as ComputerScrollConfig,\n type ComputerToolset20260801 as ComputerToolset20260801,\n type ComputerToolsetConfigs as ComputerToolsetConfigs,\n type ComputerTripleClickConfig as ComputerTripleClickConfig,\n type ComputerTypeConfig as ComputerTypeConfig,\n type ComputerWaitConfig as ComputerWaitConfig,\n type ComputerZoomConfig as ComputerZoomConfig,\n type Container as Container,\n type ContainerParams as ContainerParams,\n type ContainerSkill as ContainerSkill,\n type ContainerUploadBlock as ContainerUploadBlock,\n type ContainerUploadBlockParam as ContainerUploadBlockParam,\n type ContentBlock as ContentBlock,\n type ContentBlockDeltaEvent as ContentBlockDeltaEvent,\n type ContentBlockParam as ContentBlockParam,\n type ContentBlockStartEvent as ContentBlockStartEvent,\n type ContentBlockStopEvent as ContentBlockStopEvent,\n type ContentBlockSource as ContentBlockSource,\n type ContentBlockSourceContent as ContentBlockSourceContent,\n type DirectCaller as DirectCaller,\n type DocumentBlock as DocumentBlock,\n type DocumentBlockParam as DocumentBlockParam,\n type EncryptedCodeExecutionResultBlock as EncryptedCodeExecutionResultBlock,\n type EncryptedCodeExecutionResultBlockParam as EncryptedCodeExecutionResultBlockParam,\n type FileDocumentSource as FileDocumentSource,\n type FileImageSource as FileImageSource,\n type ImageBlockParam as ImageBlockParam,\n type ImageTransformationsParam as ImageTransformationsParam,\n type InputJSONDelta as InputJSONDelta,\n type JSONOutputFormat as JSONOutputFormat,\n type MemoryTool20250818 as MemoryTool20250818,\n type Message as Message,\n type MessageCountTokensTool as MessageCountTokensTool,\n type MessageCreateParamsContainer as MessageCreateParamsContainer,\n type MessageDeltaEvent as MessageDeltaEvent,\n type MessageDeltaUsage as MessageDeltaUsage,\n type MessageParam as MessageParam,\n type MessageStartEvent as MessageStartEvent,\n type MessageStopEvent as MessageStopEvent,\n type MessageStreamEvent as MessageStreamEvent,\n type MessageTokensCount as MessageTokensCount,\n type Metadata as Metadata,\n type Model as Model,\n type OutputConfig as OutputConfig,\n type OutputTokensDetails as OutputTokensDetails,\n type PlainTextSource as PlainTextSource,\n type RawContentBlockDelta as RawContentBlockDelta,\n type RawContentBlockDeltaEvent as RawContentBlockDeltaEvent,\n type RawContentBlockStartEvent as RawContentBlockStartEvent,\n type RawContentBlockStopEvent as RawContentBlockStopEvent,\n type RawMessageDeltaEvent as RawMessageDeltaEvent,\n type RawMessageStartEvent as RawMessageStartEvent,\n type RawMessageStopEvent as RawMessageStopEvent,\n type RawMessageStreamEvent as RawMessageStreamEvent,\n type RedactedThinkingBlock as RedactedThinkingBlock,\n type RedactedThinkingBlockParam as RedactedThinkingBlockParam,\n type RefusalStopDetails as RefusalStopDetails,\n type SearchResultBlockParam as SearchResultBlockParam,\n type ServerToolCaller as ServerToolCaller,\n type ServerToolCaller20260120 as ServerToolCaller20260120,\n type ServerToolUsage as ServerToolUsage,\n type ServerToolUseBlock as ServerToolUseBlock,\n type ServerToolUseBlockParam as ServerToolUseBlockParam,\n type SignatureDelta as SignatureDelta,\n type SkillParams as SkillParams,\n type StopReason as StopReason,\n type TextBlock as TextBlock,\n type TextBlockParam as TextBlockParam,\n type TextCitation as TextCitation,\n type TextCitationParam as TextCitationParam,\n type TextDelta as TextDelta,\n type TextEditorCodeExecutionCreateResultBlock as TextEditorCodeExecutionCreateResultBlock,\n type TextEditorCodeExecutionCreateResultBlockParam as TextEditorCodeExecutionCreateResultBlockParam,\n type TextEditorCodeExecutionStrReplaceResultBlock as TextEditorCodeExecutionStrReplaceResultBlock,\n type TextEditorCodeExecutionStrReplaceResultBlockParam as TextEditorCodeExecutionStrReplaceResultBlockParam,\n type TextEditorCodeExecutionToolResultBlock as TextEditorCodeExecutionToolResultBlock,\n type TextEditorCodeExecutionToolResultBlockParam as TextEditorCodeExecutionToolResultBlockParam,\n type TextEditorCodeExecutionToolResultError as TextEditorCodeExecutionToolResultError,\n type TextEditorCodeExecutionToolResultErrorCode as TextEditorCodeExecutionToolResultErrorCode,\n type TextEditorCodeExecutionToolResultErrorParam as TextEditorCodeExecutionToolResultErrorParam,\n type TextEditorCodeExecutionViewResultBlock as TextEditorCodeExecutionViewResultBlock,\n type TextEditorCodeExecutionViewResultBlockParam as TextEditorCodeExecutionViewResultBlockParam,\n type ThinkingBlock as ThinkingBlock,\n type ThinkingBlockParam as ThinkingBlockParam,\n type ThinkingConfigAdaptive as ThinkingConfigAdaptive,\n type ThinkingConfigDisabled as ThinkingConfigDisabled,\n type ThinkingConfigEnabled as ThinkingConfigEnabled,\n type ThinkingConfigParam as ThinkingConfigParam,\n type ThinkingDelta as ThinkingDelta,\n type Tool as Tool,\n type ToolBash20250124 as ToolBash20250124,\n type ToolChoice as ToolChoice,\n type ToolChoiceAny as ToolChoiceAny,\n type ToolChoiceAuto as ToolChoiceAuto,\n type ToolChoiceNone as ToolChoiceNone,\n type ToolChoiceTool as ToolChoiceTool,\n type ToolReferenceBlock as ToolReferenceBlock,\n type ToolReferenceBlockParam as ToolReferenceBlockParam,\n type ToolResultBlockParam as ToolResultBlockParam,\n type ToolSearchToolBm25_20251119 as ToolSearchToolBm25_20251119,\n type ToolSearchToolRegex20251119 as ToolSearchToolRegex20251119,\n type ToolSearchToolResultBlock as ToolSearchToolResultBlock,\n type ToolSearchToolResultBlockParam as ToolSearchToolResultBlockParam,\n type ToolSearchToolResultError as ToolSearchToolResultError,\n type ToolSearchToolResultErrorCode as ToolSearchToolResultErrorCode,\n type ToolSearchToolResultErrorParam as ToolSearchToolResultErrorParam,\n type ToolSearchToolSearchResultBlock as ToolSearchToolSearchResultBlock,\n type ToolSearchToolSearchResultBlockParam as ToolSearchToolSearchResultBlockParam,\n type ToolTextEditor20250124 as ToolTextEditor20250124,\n type ToolTextEditor20250429 as ToolTextEditor20250429,\n type ToolTextEditor20250728 as ToolTextEditor20250728,\n type ToolUnion as ToolUnion,\n type ToolUseBlock as ToolUseBlock,\n type ToolUseBlockParam as ToolUseBlockParam,\n type URLImageSource as URLImageSource,\n type URLPDFSource as URLPDFSource,\n type Usage as Usage,\n type UserLocation as UserLocation,\n type WebFetchBlock as WebFetchBlock,\n type WebFetchBlockParam as WebFetchBlockParam,\n type WebFetchTool20250910 as WebFetchTool20250910,\n type WebFetchTool20260209 as WebFetchTool20260209,\n type WebFetchTool20260309 as WebFetchTool20260309,\n type WebFetchTool20260318 as WebFetchTool20260318,\n type WebFetchToolResultBlock as WebFetchToolResultBlock,\n type WebFetchToolResultBlockParam as WebFetchToolResultBlockParam,\n type WebFetchToolResultErrorBlock as WebFetchToolResultErrorBlock,\n type WebFetchToolResultErrorBlockParam as WebFetchToolResultErrorBlockParam,\n type WebFetchToolResultErrorCode as WebFetchToolResultErrorCode,\n type WebSearchResultBlock as WebSearchResultBlock,\n type WebSearchResultBlockParam as WebSearchResultBlockParam,\n type WebSearchTool20250305 as WebSearchTool20250305,\n type WebSearchTool20260209 as WebSearchTool20260209,\n type WebSearchTool20260318 as WebSearchTool20260318,\n type WebSearchToolRequestError as WebSearchToolRequestError,\n type WebSearchToolResultBlock as WebSearchToolResultBlock,\n type WebSearchToolResultBlockContent as WebSearchToolResultBlockContent,\n type WebSearchToolResultBlockParam as WebSearchToolResultBlockParam,\n type WebSearchToolResultBlockParamContent as WebSearchToolResultBlockParamContent,\n type WebSearchToolResultError as WebSearchToolResultError,\n type WebSearchToolResultErrorCode as WebSearchToolResultErrorCode,\n type MessageCreateParams as MessageCreateParams,\n type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming,\n type MessageCreateParamsStreaming as MessageCreateParamsStreaming,\n type MessageStreamParams as MessageStreamParams,\n type MessageCountTokensParams as MessageCountTokensParams,\n };\n\n export {\n Models as Models,\n type CapabilitySupport as CapabilitySupport,\n type ContextManagementCapability as ContextManagementCapability,\n type EffortCapability as EffortCapability,\n type ModelCapabilities as ModelCapabilities,\n type ModelInfo as ModelInfo,\n type ThinkingCapability as ThinkingCapability,\n type ThinkingTypes as ThinkingTypes,\n type ModelInfosPage as ModelInfosPage,\n type ModelRetrieveParams as ModelRetrieveParams,\n type ModelListParams as ModelListParams,\n };\n\n export {\n Files as Files,\n type DeletedFile as DeletedFile,\n type FileMetadata as FileMetadata,\n type FileMetadataPageCursor as FileMetadataPageCursor,\n type FileListParams as FileListParams,\n type FileUploadParams as FileUploadParams,\n };\n\n export {\n Skills as Skills,\n type DeletedSkill as DeletedSkill,\n type Skill as Skill,\n type SkillSource as SkillSource,\n type SkillsPageCursor as SkillsPageCursor,\n type SkillCreateParams as SkillCreateParams,\n type SkillListParams as SkillListParams,\n };\n\n export {\n Beta as Beta,\n type PukuBeta as PukuBeta,\n type BetaAPIError as BetaAPIError,\n type BetaAuthenticationError as BetaAuthenticationError,\n type BetaBillingError as BetaBillingError,\n type BetaCurrency as BetaCurrency,\n type BetaError as BetaError,\n type BetaErrorResponse as BetaErrorResponse,\n type BetaGatewayTimeoutError as BetaGatewayTimeoutError,\n type BetaInvalidRequestError as BetaInvalidRequestError,\n type BetaMonetaryAmount as BetaMonetaryAmount,\n type BetaNotFoundError as BetaNotFoundError,\n type BetaOverloadedError as BetaOverloadedError,\n type BetaPermissionError as BetaPermissionError,\n type BetaRateLimitError as BetaRateLimitError,\n };\n\n export type APIErrorObject = API.APIErrorObject;\n export type AuthenticationError = API.AuthenticationError;\n export type BillingError = API.BillingError;\n export type ErrorObject = API.ErrorObject;\n export type ErrorResponse = API.ErrorResponse;\n export type ErrorType = API.ErrorType;\n export type GatewayTimeoutError = API.GatewayTimeoutError;\n export type InvalidRequestError = API.InvalidRequestError;\n export type NotFoundError = API.NotFoundError;\n export type OverloadedError = API.OverloadedError;\n export type PermissionError = API.PermissionError;\n export type RateLimitError = API.RateLimitError;\n}\n\n// ── Puku branding ──────────────────────────────────────────────────────────\n// `@puku-ai/sdk` is published under the Puku brand on npm. The client class\n// `PukuAI` (above) and its base class `BasePuku` (above) ARE the public API;\n// no separate aliases are exposed. Earlier versions of this SDK exposed\n// `PukuAI` / `BasePuku` / `PukuError` as compatibility aliases\n// — those have been removed; consumers should use `PukuAI` / `BasePuku` /\n// `PukuError` directly.\n",
|
|
134
|
-
"import type { APIRequest } from '../core/api';\nimport { PukuError } from '../core/error';\nimport type { Middleware, MiddlewareContext, MiddlewareNext } from '../core/middleware';\nimport { Stream, type ServerSentEvent } from '../core/streaming';\nimport { isAbortError } from '../internal/errors';\nimport { appendHeaderValue } from '../internal/headers';\nimport { STAINLESS_HELPER_HEADER } from '../internal/stainless-helper-header';\nimport { safeJSON } from '../internal/utils/values';\nimport type { PukuBeta } from '../resources/beta/beta';\nimport type {\n BetaContentBlockParam,\n BetaFallbackBlock,\n BetaFallbackCreditTokenParam,\n BetaFallbackMessageIterationUsage,\n BetaFallbackParam,\n BetaMessage,\n BetaMessageDeltaUsage,\n BetaMessageIterationUsage,\n BetaRawContentBlockDeltaEvent,\n BetaRawContentBlockStartEvent,\n BetaRawContentBlockStopEvent,\n BetaRawMessageDeltaEvent,\n BetaRawMessageStopEvent,\n BetaRawMessageStreamEvent,\n BetaRefusalStopDetails,\n BetaUsage,\n MessageCreateParams,\n} from '../resources/beta/messages/messages';\n\nexport { BetaFallbackState } from '../internal/request-options';\n\nconst encoder = new TextEncoder();\n\n/** Betas sent by default; override with {@link BetaRefusalFallbackOptions.betas}. */\nconst DEFAULT_BETAS: readonly PukuBeta[] = ['fallback-credit-2026-07-01'];\n\n/**\n * Remove `fallback` blocks replayed in history. They only parse under the\n * server-side fallback beta, which belongs to the caller-owned server-side\n * `fallbacks` feature — this middleware never sends it, so a request\n * replaying them would 400. A turn the strip leaves empty is dropped whole;\n * a turn that was already empty is kept — it may carry other payload (e.g. a\n * directive-only system message's `output_config`).\n */\nfunction stripFallbackBlocks(body: MessageCreateParams): MessageCreateParams {\n const messages = body.messages.flatMap((message) => {\n if (!Array.isArray(message.content)) return [message];\n const content = message.content.filter((block) => block.type !== 'fallback');\n if (content.length === message.content.length) return [message];\n return content.length > 0 ? [{ ...message, content }] : [];\n });\n return { ...body, messages };\n}\n\n/**\n * Apply one chain entry to the original request params as a patch: a field\n * set to a value overrides the original, a field explicitly `null` removes\n * the field from the retried request, and an absent (or `undefined`) field\n * keeps the original value. `output_config` patches one level deep — its\n * subfields follow the same set/`null`/absent rules against the original\n * `output_config` (created if the entry sets any subfield). Every hop patches\n * the original params — never a previous hop's patched body — and `body` is\n * never mutated.\n */\nfunction applyFallbackPatch(body: MessageCreateParams, entry: BetaFallbackParam): MessageCreateParams {\n const patched = { ...body } as Record<string, unknown>;\n for (const [key, value] of Object.entries(entry)) {\n if (key === 'output_config' && value != null) {\n const merged = { ...((patched[key] as Record<string, unknown> | undefined) ?? {}) };\n for (const [subKey, subValue] of Object.entries(value)) {\n patchField(merged, subKey, subValue);\n }\n patchField(patched, key, Object.keys(merged).length ? merged : null);\n } else {\n patchField(patched, key, value);\n }\n }\n return patched as unknown as MessageCreateParams;\n}\n\n/** Set/`null`-unset/absent-keep one field on `target` (mutated). */\nfunction patchField(target: Record<string, unknown>, key: string, value: unknown): void {\n if (value === undefined) return;\n if (value === null) {\n delete target[key];\n } else {\n target[key] = value;\n }\n}\n\n/** Why {@link BetaRefusalFallbackOptions.onError} fired. */\nexport type BetaRefusalFallbackError =\n | {\n /** The refusal carries no `fallback_credit_token`, so it can't be retried. */\n kind: 'no_credit_token';\n message: string;\n /** The refusal `message_delta` event, verbatim. */\n event: BetaRawMessageDeltaEvent;\n }\n | {\n /** The stream refused but every fallback entry has been used up. */\n kind: 'chain_exhausted';\n message: string;\n /** The refusal `message_delta` event, verbatim. */\n event: BetaRawMessageDeltaEvent;\n }\n | {\n /** A streaming fallback request failed; the hop was skipped. */\n kind: 'request_failed';\n message: string;\n /** The fallback model whose request failed. */\n model: string;\n /** The HTTP status, or `null` when the request threw instead of resolving. */\n status: number | null;\n /** The parsed error body, or the thrown error when `status` is `null`. */\n detail: unknown;\n };\n\nexport interface BetaRefusalFallbackOptions {\n /**\n * Betas added to the `puku-beta` header of every `/v1/messages`\n * request this middleware handles — the original request included, since\n * refusals only carry a `fallback_credit_token` when the beta is enabled.\n * Defaults to `['fallback-credit-2026-07-01']`; pass `[]` to send none.\n */\n betas?: readonly PukuBeta[] | undefined;\n\n /**\n * Called when a refusal is surfaced to the client rather than retried —\n * it carries no `fallback_credit_token`, no fallback entries remain, or a\n * streaming fallback request failed. Discriminate on `error.kind`.\n * Defaults to logging through the client logger.\n */\n onError?: ((error: BetaRefusalFallbackError) => void) | undefined;\n}\n\n/**\n * Middleware that retries refused `/v1/messages` requests down a fallback chain.\n *\n * Non-streaming: when a response comes back with `stop_reason: 'refusal'`, the\n * request is retried with each entry of `fallbacks` applied as a patch to the\n * original params (a set field overrides, an explicit `null` unsets, an absent\n * field keeps the original value; entries never patch each other's requests)\n * — passing along the refusal's `fallback_credit_token` — until a model\n * accepts or the chain is exhausted. A message served by a fallback carries a\n * `fallback` content block prepended at each model boundary — the same seam\n * block shape the server-side `fallbacks` param places in `content`, though\n * the rest of the envelope is the serving hop's as returned (see the\n * known-divergences note below); an exhausted chain surfaces the final\n * refusal verbatim.\n *\n * Streaming: when the stream ends in `stop_reason: 'refusal'`, a second\n * request is issued to the fallback model — carrying the refused model's\n * partial output as a trailing assistant prefill when the refusal grants one\n * (`fallback_has_prefill_claim`), plus the refusal's `fallback_credit_token`\n * — and the fallback's events are spliced onto the\n * still-open stream, so the client sees one continuous message in the\n * server-side `fallbacks` wire shape: a `fallback` content block at each model\n * boundary, monotonic block indices, and per-hop `usage.iterations` on the\n * final `message_delta`. Only `model` is honored from each entry on this path:\n * the credit token is redeemable only against the refused request's body, so\n * the other per-entry overrides (`max_tokens`, `thinking`, ...) would be\n * rejected.\n *\n * The fallback-credit beta the credit tokens require is sent by default on\n * every request the middleware handles; the `betas` option controls this.\n *\n * In both modes a fallback that itself refuses with a fresh credit token\n * continues down the chain. A streaming fallback whose prefill the server\n * rejects (HTTP 400) is retried once without it; a fallback whose request\n * fails outright is skipped — its token was never redeemed, so it carries to\n * the next entry.\n *\n * To keep later requests on the model that accepted, pass a\n * {@link BetaFallbackState} via the `fallbackState` request option; requests\n * sharing that state start directly at the pinned fallback. Reuse one state\n * across whatever scope the pin should apply to — typically a conversation.\n *\n * @example\n * ```ts\n * const client = new PukuAI({\n * middleware: [betaRefusalFallbackMiddleware([{ model: 'puku-opus-4-8' }])],\n * });\n *\n * const fallbackState = new BetaFallbackState();\n * const message = await client.beta.messages.create(params, { fallbackState });\n * ```\n */\nexport function betaRefusalFallbackMiddleware(\n fallbacks: readonly BetaFallbackParam[],\n options: BetaRefusalFallbackOptions = {},\n): Middleware {\n let warnedMissingState = false;\n\n return async (request, next, ctx) => {\n // This middleware only applies to the beta messages API\n // (`client.beta.messages`, which posts to `/v1/messages?beta=true`).\n // An empty chain also disables this middleware.\n const [path, query] = (ctx.options?.path ?? '').split('?');\n if (\n fallbacks.length === 0 ||\n ctx.options?.method !== 'post' ||\n path !== '/v1/messages' ||\n new URLSearchParams(query).get('beta') !== 'true' ||\n typeof ctx.options.body !== 'object' ||\n ctx.options.body == null\n ) {\n return next(request);\n }\n\n if ((ctx.options.body as MessageCreateParams).fallbacks != null) {\n throw new PukuError(\n 'Sending the `fallbacks:` request param is not supported when using the `betaRefusalFallbackMiddleware`. ' +\n 'You should either remove the middleware and send `fallbacks:` with the `server-side-fallback-2026-07-01` beta header to let the API handle refusal fallbacks, ' +\n \"or omit the `fallbacks:` param if you'd like `betaRefusalFallbackMiddleware` to handle fallbacks on the client side.\",\n );\n }\n\n const onError =\n options.onError ??\n ((error: BetaRefusalFallbackError) =>\n ctx.logger.error(`puku-ai/sdk: betaRefusalFallbackMiddleware: ${error.message}`));\n\n // Send the configured betas on this and every hop request derived from it,\n // and tag this and every hop with the middleware's helper telemetry.\n request = withMiddlewareHeaders(request, options.betas ?? DEFAULT_BETAS);\n\n const body = stripFallbackBlocks(ctx.options.body as MessageCreateParams);\n const state = ctx.options.fallbackState;\n\n // start from the pinned fallback (-1 = the original params)\n const startIndex = state?.index ?? -1;\n if (!Number.isInteger(startIndex) || startIndex < -1 || startIndex >= fallbacks.length) {\n throw new PukuError(\n `fallbackState.index ${startIndex} is out of bounds for a chain of ${fallbacks.length} fallback(s); was the state shared with a different middleware?`,\n );\n }\n\n // pin requests sharing the state to the entry being tried\n const pin = (index: number) => {\n if (state) {\n state.index = index;\n } else if (!warnedMissingState) {\n warnedMissingState = true;\n ctx.logger.warn(\n 'puku-ai/sdk: betaRefusalFallbackMiddleware fell back without a `fallbackState` request option; follow-up requests will retry models that already refused. Pass a shared `{ fallbackState: new BetaFallbackState() }` to pin them to the accepted model.',\n );\n }\n };\n\n const initialBody = startIndex === -1 ? body : applyFallbackPatch(body, fallbacks[startIndex]!);\n\n // a non-string body can't be respliced or redeemed against — leave the\n // request untouched (the streaming path stands down on it below too)\n const initialRequest =\n typeof request.body !== 'string' ? request : { ...request, body: JSON.stringify(initialBody) };\n\n const response = await next(initialRequest);\n if (!response.ok) {\n return response;\n }\n\n if (ctx.options.stream === true) {\n const firstHop = startIndex + 1;\n // Splicing needs at least one entry left to hop to and the JSON request\n // body the credit token is redeemable against (an earlier middleware\n // may have rewritten it to another BodyInit); otherwise the stream\n // passes through untouched.\n if (firstHop >= fallbacks.length || typeof initialRequest.body !== 'string') {\n return response;\n }\n return spliceFallbackStream({\n request: initialRequest,\n response,\n next,\n ctx,\n fallbacks,\n firstHop,\n onError,\n pin,\n });\n }\n\n let index = startIndex;\n let res = response;\n // The model the current hop was requested as — the caller's spelling, not\n // the server's `message.model` echo; the seam block's `from` carries it.\n let requestedModel = initialBody.model;\n const fallbackBlocks: BetaFallbackBlock[] = [];\n while (index < fallbacks.length - 1) {\n const message = await ctx.parse<BetaMessage | null>(res);\n if (message?.type !== 'message' || message.stop_reason !== 'refusal') {\n break;\n }\n\n index += 1;\n pin(index);\n const entry = fallbacks[index]!;\n // One `fallback` seam block per model boundary, prepended to the serving\n // hop's content below — the same block shape the server places in\n // `content`, not a claim of full envelope parity.\n fallbackBlocks.push({\n type: 'fallback',\n // `requestedModel` is always set for a typed body; the `??` defends\n // against an untyped body that carried no `model` field.\n from: { model: requestedModel ?? message.model },\n to: { model: entry.model },\n trigger: { type: 'refusal', category: message.stop_details?.category ?? null },\n });\n requestedModel = entry.model;\n res = await next({\n ...request,\n body: JSON.stringify({\n ...applyFallbackPatch(body, entry),\n ...(message.stop_details?.fallback_credit_token ?\n { fallback_credit_token: creditTokenParam(message.stop_details.fallback_credit_token) }\n : undefined),\n }),\n });\n }\n\n if (fallbackBlocks.length === 0) {\n return res;\n }\n const served = await ctx.parse<BetaMessage | null>(res);\n // Chain exhausted on a refusal (or an error/malformed body): surface it\n // verbatim. The array guard keeps a message-shaped body with non-array\n // `content` from throwing at the spread below.\n if (served?.type !== 'message' || served.stop_reason === 'refusal' || !Array.isArray(served.content)) {\n return res;\n }\n // A fallback hop served (or exhausted the chain with output): prepend the\n // seam blocks so the app-visible `content` opens with one `fallback` block\n // per model boundary. Response init is preserved (same `_request_id`);\n // `content-length` is dropped since the body grew.\n const headers = new Headers(res.headers);\n headers.delete('content-length');\n return new Response(JSON.stringify({ ...served, content: [...fallbackBlocks, ...served.content] }), {\n status: res.status,\n statusText: res.statusText,\n headers,\n });\n };\n}\n\n// --- streaming fallback (credit-token continuation) -------------------------\n//\n// The retry uses the appended-assistant form documented on\n// `fallback_credit_token`: the refused request's body, extended by one\n// trailing assistant turn carrying the refused model's partial output. The\n// token authorizes that turn as a prefill continuation and applies the\n// fallback credit. The refusal's `fallback_has_prefill_claim` says whether\n// the partial output may be resent verbatim: when true the accumulated\n// blocks are appended as-is; when false the refused hop's output is dropped\n// and the token is redeemed against the same body.\n//\n// Known divergences from server-side `fallbacks` (applies to both paths):\n//\n// * Seam `to.model` and non-first `from.model` carry the chain entry's\n// spelling, not the canonical id the server emits.\n// * Streaming: `message.model` keeps the refused model's id — `message_start`\n// has already been sent when the refusal arrives; the seam's `to.model`\n// carries the serving model.\n// * Streaming: `usage.iterations` survives stream accumulation only on the\n// beta surface (`client.beta.messages.stream`); the non-beta accumulator\n// drops it. Non-streaming: no `fallback_message` entry is synthesized in\n// `usage.iterations` — the serving hop's `usage` passes through as-is.\n// * Streaming: refusal text streamed before the refusal stays in the message\n// and is resent as-is (the appended turn must match the partial output\n// verbatim). Non-streaming: a refused hop's partial content is dropped.\n// * First-seam `from.model` differs by path: non-streaming uses the caller's\n// body spelling; streaming uses the server's `message.model` echo.\n\ninterface FallbackStreamArgs {\n /** The request stream A was made with — the body its credit token is redeemable against. */\n request: APIRequest;\n /** Stream A: the OK SSE response that may end in a refusal. */\n response: Response;\n next: MiddlewareNext;\n ctx: MiddlewareContext;\n fallbacks: readonly BetaFallbackParam[];\n /** Index into `fallbacks` of the first entry to try when stream A refuses. */\n firstHop: number;\n onError: (error: BetaRefusalFallbackError) => void;\n /** Pin shared state to the entry being tried (or warn that there is none). */\n pin: (index: number) => void;\n}\n\n/**\n * Wrap stream A in a response whose body passes events through until a\n * retryable refusal, then splices the fallback chain's events on (see\n * {@link splicedEvents}). Cancelling the returned body tears down whichever\n * stream is being read and aborts any in-flight fallback request or retry\n * backoff: hop requests run under `controller`'s signal, which fires on\n * cancel and mirrors the original request's signal — a user abort has no\n * other way to reach a hop, since this synthetic body isn't fetch-backed.\n */\nfunction spliceFallbackStream(args: FallbackStreamArgs): Response {\n const controller = new AbortController();\n const signal = args.request.signal;\n if (signal?.aborted) {\n controller.abort(signal.reason);\n } else {\n signal?.addEventListener('abort', makeAbort(controller, signal), { once: true });\n }\n const iter = splicedEvents(args, controller);\n const body = new ReadableStream<Uint8Array>({\n async pull(ctrl) {\n try {\n const { value, done } = await iter.next();\n if (done) return ctrl.close();\n ctrl.enqueue(value);\n } catch (err) {\n ctrl.error(err);\n }\n },\n async cancel() {\n controller.abort();\n await iter.return?.(undefined);\n },\n });\n return new Response(body, args.response);\n}\n\n/** A response content block being accumulated from its streaming deltas. */\ntype AccumulatedBlock = { index: number; block: any };\n\nasync function* splicedEvents(\n { request, response, next, ctx, fallbacks, firstHop, onError, pin }: FallbackStreamArgs,\n controller: AbortController,\n): AsyncGenerator<Uint8Array> {\n // --- stream A: pass through until a chainable refusal ---\n const a = yield* consumeHop({\n response,\n controller,\n indexBase: 0,\n hasNext: true, // the caller guarantees firstHop < fallbacks.length\n onError,\n splice: null,\n });\n if (!a.refused) return; // non-refusal or not-retryable: pure pass-through.\n\n // --- fallback chain: try each entry in order ---\n // `base` is the assistant-turn content the current token's request already\n // carried — the token is redeemable only with it resent verbatim. `partial`\n // is the newest refused hop's output, included only when its refusal\n // granted a prefill claim (any other change to the body is a 400).\n let nextIndex = a.nextIndex; // monotonic block index across all spliced streams\n let token = a.refused.token;\n let base: BetaContentBlockParam[] = [];\n let partial = a.refused.hasPrefillClaim ? toPrefillBlocks(a.blocks) : [];\n let fromModel = a.model ?? '';\n let lastUsage: BetaMessageDeltaUsage | null = a.refused.usage;\n // The refusal whose token is currently in flight — surfaced verbatim (with a\n // recommended_model added) if every fallback request fails and we degrade.\n let refusalDetails = a.refused.stopDetails;\n // That refused hop's suppressed message_start `input_transformations`, which\n // ride on the surfaced refusal delta (none for A: its start reached the client).\n let refusalInputTransformations = a.refused.inputTransformations;\n\n // One `message` entry per refused hop, in order — A first. Failed hops are\n // skipped (no usage came back); the serving hop is appended as\n // `fallback_message` when its message_delta arrives.\n const iterations: BetaMessageIterationUsage[] = [\n toIterationUsage('message', a.model ?? '', a.refused.usage),\n ];\n\n for (let hop = firstHop; hop < fallbacks.length; hop++) {\n const model = fallbacks[hop]!.model;\n const hasNext = hop + 1 < fallbacks.length;\n pin(hop);\n\n // --- boundary: a `fallback` content block at the next monotonic index ---\n // Emitted before the request, so a hop that fails leaves its boundary in\n // place and the next attempt emits its own (still `from: fromModel` — the\n // last model that contributed output).\n const fbIndex = nextIndex++;\n yield emit<BetaRawContentBlockStartEvent>('content_block_start', {\n type: 'content_block_start',\n index: fbIndex,\n content_block: {\n type: 'fallback',\n from: { model: fromModel },\n to: { model },\n trigger: { type: 'refusal', category: refusalDetails?.category ?? null },\n },\n });\n yield emit<BetaRawContentBlockStopEvent>('content_block_stop', {\n type: 'content_block_stop',\n index: fbIndex,\n });\n\n // --- build the request: appended-assistant continuation ---\n // First attempt carries the newest partial appended (when its refusal\n // granted a prefill claim); a 400 on that form means the server rejected\n // the prefill, so the hop is retried once without it — the same-body\n // form the token always supports.\n let continuation = [...base, ...partial];\n let resB: Response | null = null;\n let failure: BetaRefusalFallbackError | null = null;\n for (let attempt = 0; attempt < 2; attempt++) {\n const reqB = buildFallbackRequest(request, { model, creditToken: token, continuation });\n // controller mirrors the original signal and additionally fires when the\n // spliced body is cancelled — either must abort an in-flight hop request.\n reqB.signal = controller.signal;\n\n try {\n resB = await next(reqB);\n } catch (err) {\n // the consumer cancelled (or the original request was aborted): unwind\n if (isAbortError(err)) throw err;\n failure = {\n kind: 'request_failed',\n message: `fallback request failed: ${err}`,\n model,\n status: null,\n detail: err,\n };\n break;\n }\n if (resB.ok) break;\n // ctx.parse reads through an internal clone, so it works even though\n // the client will also read this body; resB.text() would conflict.\n const errBody = await ctx.parse(resB).catch(() => null);\n if (attempt === 0 && resB.status === 400 && partial.length) {\n ctx.logger.warn(\n `puku-ai/sdk: betaRefusalFallbackMiddleware: fallback request with the partial output appended was rejected (HTTP 400: ${JSON.stringify(\n errBody,\n )}); retrying without it`,\n );\n continuation = base;\n resB = null;\n continue;\n }\n failure = {\n kind: 'request_failed',\n message: `fallback request failed: HTTP ${resB.status}: ${JSON.stringify(errBody)}`,\n model,\n status: resB.status,\n detail: errBody,\n };\n break;\n }\n\n if (failure) {\n onError(failure);\n // The token was never redeemed — retry it against the next entry.\n if (hasNext) continue;\n // Surface the held refusal verbatim — its category/explanation and the\n // still-unredeemed credit token — and point recommended_model at the hop\n // we last tried.\n const stopDetails: BetaRefusalStopDetails = {\n ...refusalDetails,\n recommended_model: model,\n };\n yield emit<BetaRawMessageDeltaEvent>('message_delta', {\n type: 'message_delta',\n context_management: null,\n delta: {\n stop_reason: 'refusal',\n stop_sequence: null,\n container: null,\n stop_details: stopDetails,\n },\n usage: (lastUsage ?? {}) as BetaMessageDeltaUsage,\n ...(refusalInputTransformations !== undefined && {\n input_transformations: refusalInputTransformations,\n }),\n });\n yield emit<BetaRawMessageStopEvent>('message_stop', { type: 'message_stop' });\n return;\n }\n\n // --- splice: monotonic indices, suppressed message_start, usage.iterations ---\n const b = yield* consumeHop({\n response: resB!,\n controller,\n indexBase: nextIndex,\n hasNext,\n onError,\n splice: { iterations, model },\n });\n if (!b.refused) return;\n\n // This hop refused too, with a fresh token: its emitted partial stays in\n // the client's message, becomes the next partial segment, and the chain\n // continues.\n token = b.refused.token;\n refusalDetails = b.refused.stopDetails;\n refusalInputTransformations = b.refused.inputTransformations;\n base = continuation;\n partial = b.refused.hasPrefillClaim ? toPrefillBlocks(b.blocks) : [];\n iterations.push(toIterationUsage('message', model, b.refused.usage));\n lastUsage = b.refused.usage;\n fromModel = model;\n nextIndex = b.nextIndex;\n }\n}\n\n/** The outcome of consuming one hop's stream. */\ninterface HopOutcome {\n /** Set when the hop refused with a credit token and an entry remained to chain to. */\n refused: {\n token: string;\n hasPrefillClaim: boolean;\n usage: BetaMessageDeltaUsage;\n /** The refusal's stop_details verbatim, surfaced if the whole chain degrades. */\n stopDetails: BetaRefusalStopDetails;\n /**\n * A spliced hop's suppressed message_start `input_transformations`, forwarded\n * on the surfaced refusal delta if the whole chain degrades; `undefined` for\n * stream A (its start reached the client) or when the start had none.\n */\n inputTransformations: BetaMessage['input_transformations'] | undefined;\n } | null;\n /** The hop's serving model, from its message_start. */\n model: string | undefined;\n /** The hop's accumulated content blocks, in start order — the next partial segment. */\n blocks: any[];\n /** One past the highest (shifted) block index emitted — where the next boundary goes. */\n nextIndex: number;\n}\n\n/**\n * Consume one hop's SSE events, forwarding them to the client while\n * accumulating its content blocks (returned in the outcome).\n *\n * Stream A (`splice: null`) is forwarded in its original wire bytes; a\n * spliced hop (`splice` set) has its message_start suppressed (the client\n * already saw A's), its block indices shifted by `indexBase`, and its\n * terminal message_delta's usage rewritten to the `usage.iterations`\n * chain shape, with the suppressed message_start's `input_transformations`\n * forwarded onto it.\n *\n * A refusal that can be chained — it carries a `fallback_credit_token` and a\n * fallback entry remains — ends the hop early: open blocks are closed, the\n * terminal message_delta + message_stop are suppressed, and the token+usage\n * are returned so the caller can issue the next hop. Any other refusal is\n * reported through `onError` and passes through to the client.\n */\nasync function* consumeHop(args: {\n response: Response;\n controller: AbortController;\n /** Shift wire block indices by this much, keeping them monotonic across hops. */\n indexBase: number;\n /** Whether a fallback entry exists to chain to if this hop refuses. */\n hasNext: boolean;\n onError: (error: BetaRefusalFallbackError) => void;\n /** Splice context for fallback hops; null for stream A. */\n splice: { iterations: BetaMessageIterationUsage[]; model: string } | null;\n}): AsyncGenerator<Uint8Array, HopOutcome> {\n const { response, controller, indexBase, hasNext, onError, splice } = args;\n const tracker = new BlockTracker(indexBase);\n let model: string | undefined;\n let startUsage: BetaUsage | null = null;\n // A spliced hop's message_start is suppressed, so its `input_transformations`\n // must ride on the re-emitted terminal message_delta — the way a server-side\n // fallback reports the serving model's list.\n let startInputTransformations: BetaMessage['input_transformations'];\n\n for await (const sse of Stream.rawEvents(response, controller)) {\n const p = safeJSON(sse.data) as BetaRawMessageStreamEvent | undefined;\n switch (p?.type) {\n case 'message_start': {\n model = p.message.model;\n startUsage = p.message.usage;\n if ('input_transformations' in p.message) startInputTransformations = p.message.input_transformations;\n if (splice) continue;\n break;\n }\n case 'content_block_start': {\n tracker.start(p);\n if (splice) {\n yield emit(p.type, p);\n continue;\n }\n break;\n }\n case 'content_block_delta': {\n tracker.delta(p);\n if (splice) {\n yield emit(p.type, p);\n continue;\n }\n break;\n }\n case 'content_block_stop': {\n tracker.stop(p);\n if (splice) {\n yield emit(p.type, p);\n continue;\n }\n break;\n }\n case 'message_delta': {\n if (p.delta.stop_reason === 'refusal') {\n // `fallback_credit_token` is null when the refusal isn't eligible\n // for a fallback credit; without one we don't retry.\n const details = p.delta.stop_details?.type === 'refusal' ? p.delta.stop_details : null;\n if (details?.fallback_credit_token && hasNext) {\n const usage = backfill(p.usage, startUsage);\n yield* tracker.closeOpenBlocks();\n // suppress this hop's message_delta + message_stop\n return {\n refused: {\n token: details.fallback_credit_token,\n hasPrefillClaim: details.fallback_has_prefill_claim === true,\n usage,\n stopDetails: details,\n inputTransformations: splice ? startInputTransformations : undefined,\n },\n model,\n blocks: tracker.contentBlocks(),\n nextIndex: tracker.nextIndex,\n };\n }\n if (!details?.fallback_credit_token) {\n onError({\n kind: 'no_credit_token',\n message: 'refusal stop_details has no fallback_credit_token',\n event: p,\n });\n } else {\n onError({\n kind: 'chain_exhausted',\n message: 'refusal but no fallback entries remain',\n event: p,\n });\n }\n }\n if (splice) {\n // Terminal hop. Replace iterations, don't append: this hop's own\n // message_delta self-reports a single `{type:\"message\",\n // model:undefined}` iteration (a fresh non-fallback request counts\n // itself as one message hop). Server-side `fallbacks` relabels the\n // whole chain instead — refused hops as `message`, the serving hop\n // as `fallback_message` — so spreading the self-report would\n // prepend a spurious `message:undefined` entry.\n const usage = backfill(p.usage, startUsage);\n usage.iterations = [\n ...splice.iterations,\n toIterationUsage('fallback_message', splice.model, usage),\n ];\n p.usage = usage;\n if (!('input_transformations' in p) && startInputTransformations !== undefined) {\n p.input_transformations = startInputTransformations;\n }\n yield emit('message_delta', p);\n continue;\n }\n break;\n }\n }\n\n // message_stop, ping, error, unrecognised — and for stream A every\n // event — pass through in their original wire bytes.\n yield passthroughSSE(sse);\n }\n return { refused: null, model, blocks: tracker.contentBlocks(), nextIndex: tracker.nextIndex };\n}\n\n/**\n * Block bookkeeping for one stream of the splice: accumulates each content\n * block from its deltas (for the continuation prefill), shifts wire indices\n * by `indexBase` so they stay monotonic across hops, and tracks which blocks\n * are still open so a refusal that cuts mid-block can close them.\n */\nclass BlockTracker {\n /** The stream's accumulated blocks keyed by their original wire index. */\n private blocks: AccumulatedBlock[] = [];\n /** One past the highest shifted block index seen. */\n nextIndex: number;\n /** Shifted indices of blocks started but not yet stopped. */\n private open: number[] = [];\n\n constructor(private indexBase: number = 0) {\n this.nextIndex = indexBase;\n }\n\n /** The accumulated content blocks, in start order. */\n contentBlocks(): any[] {\n return this.blocks.map((b) => b.block);\n }\n\n /** Track a content_block_start, shifting `event.index`. */\n start(event: BetaRawContentBlockStartEvent): void {\n this.blocks.push({ index: event.index, block: { ...event.content_block } });\n event.index += this.indexBase;\n this.open.push(event.index);\n this.nextIndex = Math.max(this.nextIndex, event.index + 1);\n }\n\n /** Apply a content_block_delta to its accumulating block, shifting `event.index`. */\n delta(event: BetaRawContentBlockDeltaEvent): void {\n applyDelta(this.blocks, event.index, event.delta);\n event.index += this.indexBase;\n }\n\n /** Track a content_block_stop, shifting `event.index`. */\n stop(event: BetaRawContentBlockStopEvent): void {\n event.index += this.indexBase;\n const i = this.open.indexOf(event.index);\n if (i !== -1) this.open.splice(i, 1);\n this.nextIndex = Math.max(this.nextIndex, event.index + 1);\n }\n\n /** content_block_stop events for any blocks still open. */\n *closeOpenBlocks(): Generator<Uint8Array> {\n for (const index of this.open) {\n yield emit<BetaRawContentBlockStopEvent>('content_block_stop', {\n type: 'content_block_stop',\n index,\n });\n }\n this.open.length = 0;\n }\n}\n\n// --- fallback request construction (appended-assistant continuation) -------\n\n/**\n * Object form of the redeemed credit token. `best_effort` keeps the retry\n * served if the token layer rejects it — the retry then proceeds at normal\n * price and the outcome lands on `usage.fallback_credit` — where the\n * bare-string (`strict`) form would 400 the whole request.\n */\nfunction creditTokenParam(token: string): BetaFallbackCreditTokenParam {\n return { token, mode: 'best_effort' };\n}\n\nfunction buildFallbackRequest(\n orig: APIRequest,\n {\n model,\n creditToken,\n continuation,\n }: {\n model: string;\n creditToken: string;\n continuation: BetaContentBlockParam[];\n },\n): APIRequest {\n // the caller guarantees a JSON string body (checked before stream A is read)\n const body = JSON.parse(orig.body as string);\n\n body.model = model;\n body.fallback_credit_token = creditTokenParam(creditToken);\n\n // Append the continuation (decided by the chain loop) as a trailing\n // assistant turn; everything else must stay identical to the refused\n // request. When the refusal granted no prefill claim, omit the turn\n // entirely and send the same-body form.\n if (continuation.length) {\n body.messages = [...body.messages, { role: 'assistant', content: continuation }];\n }\n\n // Do NOT touch max_tokens (or any other render-shaping field): the token is\n // only redeemable against the same request body as the refused request —\n // model, fallback_credit_token, and the one appended assistant turn are the\n // only permitted deltas; anything else is a 400 (\"request body ... does not\n // match the original refused request\"). This is also why the per-entry\n // BetaFallbackParam overrides are ignored on the streaming path.\n\n return { ...orig, headers: new Headers(orig.headers), body: JSON.stringify(body) };\n}\n\n// --- block accumulation & prefill conversion -------------------------------\n\n/** Apply a content_block_delta to the accumulating block at `index`. */\nfunction applyDelta(\n blocks: AccumulatedBlock[],\n index: number,\n delta: BetaRawContentBlockDeltaEvent['delta'],\n): void {\n const block = blocks.find((x) => x.index === index)?.block;\n if (!block) return;\n switch (delta.type) {\n case 'text_delta': {\n block.text = (block.text ?? '') + delta.text;\n break;\n }\n case 'input_json_delta': {\n block._partial_json = (block._partial_json ?? '') + delta.partial_json;\n break;\n }\n case 'citations_delta':\n (block.citations ??= []).push(delta.citation);\n break;\n case 'thinking_delta': {\n block.thinking = (block.thinking ?? '') + delta.thinking;\n break;\n }\n case 'signature_delta': {\n block.signature = delta.signature;\n break;\n }\n case 'compaction_delta': {\n break;\n }\n default:\n ((_: never) => {})(delta);\n }\n}\n\n/**\n * Convert a hop's accumulated response blocks to the appended assistant turn,\n * as-is: a `fallback_has_prefill_claim` refusal guarantees the partial output\n * is resendable verbatim, so no client-side filtering is applied. The only\n * rewrite is reassembling tool inputs from their accumulated\n * `input_json_delta` JSON (content_block_start carries `input: {}`).\n */\nfunction toPrefillBlocks(responseBlocks: any[]): BetaContentBlockParam[] {\n return responseBlocks.map((b) => {\n if (typeof b?._partial_json !== 'string') return b;\n const { _partial_json, ...block } = b;\n return { ...block, input: safeJSON(_partial_json) ?? block.input };\n });\n}\n\n// --- helpers --------------------------------------------------------------\n\n/**\n * A copy of `request` with `betas` appended to its `puku-beta` header,\n * skipping values already present (set by the caller or another middleware).\n */\nfunction withMiddlewareHeaders(request: APIRequest, betas: readonly PukuBeta[]): APIRequest {\n const headers = new Headers(request.headers);\n const existing = new Set(\n headers\n .get('puku-beta')\n ?.split(',')\n .map((s) => s.trim()),\n );\n for (const beta of betas) {\n if (!existing.has(beta)) {\n headers.append('puku-beta', beta);\n existing.add(beta);\n }\n }\n headers.set(\n STAINLESS_HELPER_HEADER,\n appendHeaderValue(headers.get(STAINLESS_HELPER_HEADER), 'fallback-refusal-middleware'),\n );\n return { ...request, headers };\n}\n\nfunction emit<T extends { type: string }>(event: T['type'], payload: T): Uint8Array {\n const sse: ServerSentEvent = { event, data: JSON.stringify(payload), raw: [] };\n return encoder.encode(serializeSSE(sse));\n}\n\n/**\n * Forward a decoded event in its original wire bytes, preserving SSE fields\n * the decoder doesn't model (`id:`, `retry:`, comment lines). Falls back to\n * re-serializing for events with no raw lines.\n */\nfunction passthroughSSE(sse: ServerSentEvent): Uint8Array {\n return encoder.encode(sse.raw.length ? sse.raw.join('\\n') + '\\n\\n' : serializeSSE(sse));\n}\n\n// Field-wise union of BetaUsage and BetaMessageDeltaUsage, all nullable —\n// a plain Partial<A & B> intersects `number` with `number | null` down to\n// `number`, which rejects delta usage objects.\ntype UsageLike =\n | { [K in keyof (BetaUsage & BetaMessageDeltaUsage)]?: (BetaUsage & BetaMessageDeltaUsage)[K] | null }\n | null\n | undefined;\n\nfunction toIterationUsage(type: 'message', model: string, u: UsageLike): BetaMessageIterationUsage;\nfunction toIterationUsage(\n type: 'fallback_message',\n model: string,\n u: UsageLike,\n): BetaFallbackMessageIterationUsage;\nfunction toIterationUsage(\n type: 'message' | 'fallback_message',\n model: string,\n u: UsageLike,\n): BetaMessageIterationUsage | BetaFallbackMessageIterationUsage {\n return {\n type,\n model,\n input_tokens: u?.input_tokens ?? 0,\n output_tokens: u?.output_tokens ?? 0,\n cache_read_input_tokens: u?.cache_read_input_tokens ?? 0,\n cache_creation_input_tokens: u?.cache_creation_input_tokens ?? 0,\n cache_creation: u?.cache_creation ?? null,\n };\n}\n\n/** Fill null/undefined fields on `primary` from `fallback`. */\nfunction backfill(\n primary: BetaMessageDeltaUsage | null | undefined,\n fallback: BetaUsage | null | undefined,\n): BetaMessageDeltaUsage {\n const out: any = { ...(fallback ?? {}), ...(primary ?? {}) };\n for (const k of Object.keys(out)) {\n if (out[k] == null && (fallback as any)?.[k] != null) out[k] = (fallback as any)[k];\n }\n return out;\n}\n\n/**\n * Serialize a {@link ServerSentEvent} back to its SSE wire form\n * (`event: ...\\ndata: ...\\n\\n`). Multi-line `data` is emitted as one\n * `data:` line per line, matching the spec. The inverse of the decoder\n * behind {@link Stream.rawEvents}.\n */\nfunction serializeSSE(sse: ServerSentEvent): string {\n let out = '';\n if (sse.event !== null) out += `event: ${sse.event}\\n`;\n for (const line of sse.data.split('\\n')) out += `data: ${line}\\n`;\n return out + '\\n';\n}\n\nfunction makeAbort(controller: AbortController, signal: AbortSignal) {\n return () => controller.abort(signal.reason);\n}\n",
|
|
134
|
+
"import type { APIRequest } from '../core/api';\nimport { PukuError } from '../core/error';\nimport type { Middleware, MiddlewareContext, MiddlewareNext } from '../core/middleware';\nimport { Stream, type ServerSentEvent } from '../core/streaming';\nimport { isAbortError } from '../internal/errors';\nimport { appendHeaderValue } from '../internal/headers';\nimport { STAINLESS_HELPER_HEADER } from '../internal/stainless-helper-header';\nimport { safeJSON } from '../internal/utils/values';\nimport type { PukuBeta } from '../resources/beta/beta';\nimport type {\n BetaContentBlockParam,\n BetaFallbackBlock,\n BetaFallbackCreditTokenParam,\n BetaFallbackMessageIterationUsage,\n BetaFallbackParam,\n BetaMessage,\n BetaMessageDeltaUsage,\n BetaMessageIterationUsage,\n BetaRawContentBlockDeltaEvent,\n BetaRawContentBlockStartEvent,\n BetaRawContentBlockStopEvent,\n BetaRawMessageDeltaEvent,\n BetaRawMessageStopEvent,\n BetaRawMessageStreamEvent,\n BetaRefusalStopDetails,\n BetaUsage,\n MessageCreateParams,\n} from '../resources/beta/messages/messages';\n\nexport { BetaFallbackState } from '../internal/request-options';\n\nconst encoder = new TextEncoder();\n\n/** Betas sent by default; override with {@link BetaRefusalFallbackOptions.betas}. */\nconst DEFAULT_BETAS: readonly PukuBeta[] = ['fallback-credit-2026-07-01'];\n\n/**\n * Remove `fallback` blocks replayed in history. They only parse under the\n * server-side fallback beta, which belongs to the caller-owned server-side\n * `fallbacks` feature — this middleware never sends it, so a request\n * replaying them would 400. A turn the strip leaves empty is dropped whole;\n * a turn that was already empty is kept — it may carry other payload (e.g. a\n * directive-only system message's `output_config`).\n */\nfunction stripFallbackBlocks(body: MessageCreateParams): MessageCreateParams {\n const messages = body.messages.flatMap((message) => {\n if (!Array.isArray(message.content)) return [message];\n const content = message.content.filter((block) => block.type !== 'fallback');\n if (content.length === message.content.length) return [message];\n return content.length > 0 ? [{ ...message, content }] : [];\n });\n return { ...body, messages };\n}\n\n/**\n * Apply one chain entry to the original request params as a patch: a field\n * set to a value overrides the original, a field explicitly `null` removes\n * the field from the retried request, and an absent (or `undefined`) field\n * keeps the original value. `output_config` patches one level deep — its\n * subfields follow the same set/`null`/absent rules against the original\n * `output_config` (created if the entry sets any subfield). Every hop patches\n * the original params — never a previous hop's patched body — and `body` is\n * never mutated.\n */\nfunction applyFallbackPatch(body: MessageCreateParams, entry: BetaFallbackParam): MessageCreateParams {\n const patched = { ...body } as Record<string, unknown>;\n for (const [key, value] of Object.entries(entry)) {\n if (key === 'output_config' && value != null) {\n const merged = { ...((patched[key] as Record<string, unknown> | undefined) ?? {}) };\n for (const [subKey, subValue] of Object.entries(value)) {\n patchField(merged, subKey, subValue);\n }\n patchField(patched, key, Object.keys(merged).length ? merged : null);\n } else {\n patchField(patched, key, value);\n }\n }\n return patched as unknown as MessageCreateParams;\n}\n\n/** Set/`null`-unset/absent-keep one field on `target` (mutated). */\nfunction patchField(target: Record<string, unknown>, key: string, value: unknown): void {\n if (value === undefined) return;\n if (value === null) {\n delete target[key];\n } else {\n target[key] = value;\n }\n}\n\n/** Why {@link BetaRefusalFallbackOptions.onError} fired. */\nexport type BetaRefusalFallbackError =\n | {\n /** The refusal carries no `fallback_credit_token`, so it can't be retried. */\n kind: 'no_credit_token';\n message: string;\n /** The refusal `message_delta` event, verbatim. */\n event: BetaRawMessageDeltaEvent;\n }\n | {\n /** The stream refused but every fallback entry has been used up. */\n kind: 'chain_exhausted';\n message: string;\n /** The refusal `message_delta` event, verbatim. */\n event: BetaRawMessageDeltaEvent;\n }\n | {\n /** A streaming fallback request failed; the hop was skipped. */\n kind: 'request_failed';\n message: string;\n /** The fallback model whose request failed. */\n model: string;\n /** The HTTP status, or `null` when the request threw instead of resolving. */\n status: number | null;\n /** The parsed error body, or the thrown error when `status` is `null`. */\n detail: unknown;\n };\n\nexport interface BetaRefusalFallbackOptions {\n /**\n * Betas added to the `puku-beta` header of every `/v1/messages`\n * request this middleware handles — the original request included, since\n * refusals only carry a `fallback_credit_token` when the beta is enabled.\n * Defaults to `['fallback-credit-2026-07-01']`; pass `[]` to send none.\n */\n betas?: readonly PukuBeta[] | undefined;\n\n /**\n * Called when a refusal is surfaced to the client rather than retried —\n * it carries no `fallback_credit_token`, no fallback entries remain, or a\n * streaming fallback request failed. Discriminate on `error.kind`.\n * Defaults to logging through the client logger.\n */\n onError?: ((error: BetaRefusalFallbackError) => void) | undefined;\n}\n\n/**\n * Middleware that retries refused `/v1/messages` requests down a fallback chain.\n *\n * Non-streaming: when a response comes back with `stop_reason: 'refusal'`, the\n * request is retried with each entry of `fallbacks` applied as a patch to the\n * original params (a set field overrides, an explicit `null` unsets, an absent\n * field keeps the original value; entries never patch each other's requests)\n * — passing along the refusal's `fallback_credit_token` — until a model\n * accepts or the chain is exhausted. A message served by a fallback carries a\n * `fallback` content block prepended at each model boundary — the same seam\n * block shape the server-side `fallbacks` param places in `content`, though\n * the rest of the envelope is the serving hop's as returned (see the\n * known-divergences note below); an exhausted chain surfaces the final\n * refusal verbatim.\n *\n * Streaming: when the stream ends in `stop_reason: 'refusal'`, a second\n * request is issued to the fallback model — carrying the refused model's\n * partial output as a trailing assistant prefill when the refusal grants one\n * (`fallback_has_prefill_claim`), plus the refusal's `fallback_credit_token`\n * — and the fallback's events are spliced onto the\n * still-open stream, so the client sees one continuous message in the\n * server-side `fallbacks` wire shape: a `fallback` content block at each model\n * boundary, monotonic block indices, and per-hop `usage.iterations` on the\n * final `message_delta`. Only `model` is honored from each entry on this path:\n * the credit token is redeemable only against the refused request's body, so\n * the other per-entry overrides (`max_tokens`, `thinking`, ...) would be\n * rejected.\n *\n * The fallback-credit beta the credit tokens require is sent by default on\n * every request the middleware handles; the `betas` option controls this.\n *\n * In both modes a fallback that itself refuses with a fresh credit token\n * continues down the chain. A streaming fallback whose prefill the server\n * rejects (HTTP 400) is retried once without it; a fallback whose request\n * fails outright is skipped — its token was never redeemed, so it carries to\n * the next entry.\n *\n * To keep later requests on the model that accepted, pass a\n * {@link BetaFallbackState} via the `fallbackState` request option; requests\n * sharing that state start directly at the pinned fallback. Reuse one state\n * across whatever scope the pin should apply to — typically a conversation.\n *\n * @example\n * ```ts\n * const client = new PukuAI({\n * middleware: [betaRefusalFallbackMiddleware([{ model: 'opus-4.8' }])],\n * });\n *\n * const fallbackState = new BetaFallbackState();\n * const message = await client.beta.messages.create(params, { fallbackState });\n * ```\n */\nexport function betaRefusalFallbackMiddleware(\n fallbacks: readonly BetaFallbackParam[],\n options: BetaRefusalFallbackOptions = {},\n): Middleware {\n let warnedMissingState = false;\n\n return async (request, next, ctx) => {\n // This middleware only applies to the beta messages API\n // (`client.beta.messages`, which posts to `/v1/messages?beta=true`).\n // An empty chain also disables this middleware.\n const [path, query] = (ctx.options?.path ?? '').split('?');\n if (\n fallbacks.length === 0 ||\n ctx.options?.method !== 'post' ||\n path !== '/v1/messages' ||\n new URLSearchParams(query).get('beta') !== 'true' ||\n typeof ctx.options.body !== 'object' ||\n ctx.options.body == null\n ) {\n return next(request);\n }\n\n if ((ctx.options.body as MessageCreateParams).fallbacks != null) {\n throw new PukuError(\n 'Sending the `fallbacks:` request param is not supported when using the `betaRefusalFallbackMiddleware`. ' +\n 'You should either remove the middleware and send `fallbacks:` with the `server-side-fallback-2026-07-01` beta header to let the API handle refusal fallbacks, ' +\n \"or omit the `fallbacks:` param if you'd like `betaRefusalFallbackMiddleware` to handle fallbacks on the client side.\",\n );\n }\n\n const onError =\n options.onError ??\n ((error: BetaRefusalFallbackError) =>\n ctx.logger.error(`puku-ai/sdk: betaRefusalFallbackMiddleware: ${error.message}`));\n\n // Send the configured betas on this and every hop request derived from it,\n // and tag this and every hop with the middleware's helper telemetry.\n request = withMiddlewareHeaders(request, options.betas ?? DEFAULT_BETAS);\n\n const body = stripFallbackBlocks(ctx.options.body as MessageCreateParams);\n const state = ctx.options.fallbackState;\n\n // start from the pinned fallback (-1 = the original params)\n const startIndex = state?.index ?? -1;\n if (!Number.isInteger(startIndex) || startIndex < -1 || startIndex >= fallbacks.length) {\n throw new PukuError(\n `fallbackState.index ${startIndex} is out of bounds for a chain of ${fallbacks.length} fallback(s); was the state shared with a different middleware?`,\n );\n }\n\n // pin requests sharing the state to the entry being tried\n const pin = (index: number) => {\n if (state) {\n state.index = index;\n } else if (!warnedMissingState) {\n warnedMissingState = true;\n ctx.logger.warn(\n 'puku-ai/sdk: betaRefusalFallbackMiddleware fell back without a `fallbackState` request option; follow-up requests will retry models that already refused. Pass a shared `{ fallbackState: new BetaFallbackState() }` to pin them to the accepted model.',\n );\n }\n };\n\n const initialBody = startIndex === -1 ? body : applyFallbackPatch(body, fallbacks[startIndex]!);\n\n // a non-string body can't be respliced or redeemed against — leave the\n // request untouched (the streaming path stands down on it below too)\n const initialRequest =\n typeof request.body !== 'string' ? request : { ...request, body: JSON.stringify(initialBody) };\n\n const response = await next(initialRequest);\n if (!response.ok) {\n return response;\n }\n\n if (ctx.options.stream === true) {\n const firstHop = startIndex + 1;\n // Splicing needs at least one entry left to hop to and the JSON request\n // body the credit token is redeemable against (an earlier middleware\n // may have rewritten it to another BodyInit); otherwise the stream\n // passes through untouched.\n if (firstHop >= fallbacks.length || typeof initialRequest.body !== 'string') {\n return response;\n }\n return spliceFallbackStream({\n request: initialRequest,\n response,\n next,\n ctx,\n fallbacks,\n firstHop,\n onError,\n pin,\n });\n }\n\n let index = startIndex;\n let res = response;\n // The model the current hop was requested as — the caller's spelling, not\n // the server's `message.model` echo; the seam block's `from` carries it.\n let requestedModel = initialBody.model;\n const fallbackBlocks: BetaFallbackBlock[] = [];\n while (index < fallbacks.length - 1) {\n const message = await ctx.parse<BetaMessage | null>(res);\n if (message?.type !== 'message' || message.stop_reason !== 'refusal') {\n break;\n }\n\n index += 1;\n pin(index);\n const entry = fallbacks[index]!;\n // One `fallback` seam block per model boundary, prepended to the serving\n // hop's content below — the same block shape the server places in\n // `content`, not a claim of full envelope parity.\n fallbackBlocks.push({\n type: 'fallback',\n // `requestedModel` is always set for a typed body; the `??` defends\n // against an untyped body that carried no `model` field.\n from: { model: requestedModel ?? message.model },\n to: { model: entry.model },\n trigger: { type: 'refusal', category: message.stop_details?.category ?? null },\n });\n requestedModel = entry.model;\n res = await next({\n ...request,\n body: JSON.stringify({\n ...applyFallbackPatch(body, entry),\n ...(message.stop_details?.fallback_credit_token ?\n { fallback_credit_token: creditTokenParam(message.stop_details.fallback_credit_token) }\n : undefined),\n }),\n });\n }\n\n if (fallbackBlocks.length === 0) {\n return res;\n }\n const served = await ctx.parse<BetaMessage | null>(res);\n // Chain exhausted on a refusal (or an error/malformed body): surface it\n // verbatim. The array guard keeps a message-shaped body with non-array\n // `content` from throwing at the spread below.\n if (served?.type !== 'message' || served.stop_reason === 'refusal' || !Array.isArray(served.content)) {\n return res;\n }\n // A fallback hop served (or exhausted the chain with output): prepend the\n // seam blocks so the app-visible `content` opens with one `fallback` block\n // per model boundary. Response init is preserved (same `_request_id`);\n // `content-length` is dropped since the body grew.\n const headers = new Headers(res.headers);\n headers.delete('content-length');\n return new Response(JSON.stringify({ ...served, content: [...fallbackBlocks, ...served.content] }), {\n status: res.status,\n statusText: res.statusText,\n headers,\n });\n };\n}\n\n// --- streaming fallback (credit-token continuation) -------------------------\n//\n// The retry uses the appended-assistant form documented on\n// `fallback_credit_token`: the refused request's body, extended by one\n// trailing assistant turn carrying the refused model's partial output. The\n// token authorizes that turn as a prefill continuation and applies the\n// fallback credit. The refusal's `fallback_has_prefill_claim` says whether\n// the partial output may be resent verbatim: when true the accumulated\n// blocks are appended as-is; when false the refused hop's output is dropped\n// and the token is redeemed against the same body.\n//\n// Known divergences from server-side `fallbacks` (applies to both paths):\n//\n// * Seam `to.model` and non-first `from.model` carry the chain entry's\n// spelling, not the canonical id the server emits.\n// * Streaming: `message.model` keeps the refused model's id — `message_start`\n// has already been sent when the refusal arrives; the seam's `to.model`\n// carries the serving model.\n// * Streaming: `usage.iterations` survives stream accumulation only on the\n// beta surface (`client.beta.messages.stream`); the non-beta accumulator\n// drops it. Non-streaming: no `fallback_message` entry is synthesized in\n// `usage.iterations` — the serving hop's `usage` passes through as-is.\n// * Streaming: refusal text streamed before the refusal stays in the message\n// and is resent as-is (the appended turn must match the partial output\n// verbatim). Non-streaming: a refused hop's partial content is dropped.\n// * First-seam `from.model` differs by path: non-streaming uses the caller's\n// body spelling; streaming uses the server's `message.model` echo.\n\ninterface FallbackStreamArgs {\n /** The request stream A was made with — the body its credit token is redeemable against. */\n request: APIRequest;\n /** Stream A: the OK SSE response that may end in a refusal. */\n response: Response;\n next: MiddlewareNext;\n ctx: MiddlewareContext;\n fallbacks: readonly BetaFallbackParam[];\n /** Index into `fallbacks` of the first entry to try when stream A refuses. */\n firstHop: number;\n onError: (error: BetaRefusalFallbackError) => void;\n /** Pin shared state to the entry being tried (or warn that there is none). */\n pin: (index: number) => void;\n}\n\n/**\n * Wrap stream A in a response whose body passes events through until a\n * retryable refusal, then splices the fallback chain's events on (see\n * {@link splicedEvents}). Cancelling the returned body tears down whichever\n * stream is being read and aborts any in-flight fallback request or retry\n * backoff: hop requests run under `controller`'s signal, which fires on\n * cancel and mirrors the original request's signal — a user abort has no\n * other way to reach a hop, since this synthetic body isn't fetch-backed.\n */\nfunction spliceFallbackStream(args: FallbackStreamArgs): Response {\n const controller = new AbortController();\n const signal = args.request.signal;\n if (signal?.aborted) {\n controller.abort(signal.reason);\n } else {\n signal?.addEventListener('abort', makeAbort(controller, signal), { once: true });\n }\n const iter = splicedEvents(args, controller);\n const body = new ReadableStream<Uint8Array>({\n async pull(ctrl) {\n try {\n const { value, done } = await iter.next();\n if (done) return ctrl.close();\n ctrl.enqueue(value);\n } catch (err) {\n ctrl.error(err);\n }\n },\n async cancel() {\n controller.abort();\n await iter.return?.(undefined);\n },\n });\n return new Response(body, args.response);\n}\n\n/** A response content block being accumulated from its streaming deltas. */\ntype AccumulatedBlock = { index: number; block: any };\n\nasync function* splicedEvents(\n { request, response, next, ctx, fallbacks, firstHop, onError, pin }: FallbackStreamArgs,\n controller: AbortController,\n): AsyncGenerator<Uint8Array> {\n // --- stream A: pass through until a chainable refusal ---\n const a = yield* consumeHop({\n response,\n controller,\n indexBase: 0,\n hasNext: true, // the caller guarantees firstHop < fallbacks.length\n onError,\n splice: null,\n });\n if (!a.refused) return; // non-refusal or not-retryable: pure pass-through.\n\n // --- fallback chain: try each entry in order ---\n // `base` is the assistant-turn content the current token's request already\n // carried — the token is redeemable only with it resent verbatim. `partial`\n // is the newest refused hop's output, included only when its refusal\n // granted a prefill claim (any other change to the body is a 400).\n let nextIndex = a.nextIndex; // monotonic block index across all spliced streams\n let token = a.refused.token;\n let base: BetaContentBlockParam[] = [];\n let partial = a.refused.hasPrefillClaim ? toPrefillBlocks(a.blocks) : [];\n let fromModel = a.model ?? '';\n let lastUsage: BetaMessageDeltaUsage | null = a.refused.usage;\n // The refusal whose token is currently in flight — surfaced verbatim (with a\n // recommended_model added) if every fallback request fails and we degrade.\n let refusalDetails = a.refused.stopDetails;\n // That refused hop's suppressed message_start `input_transformations`, which\n // ride on the surfaced refusal delta (none for A: its start reached the client).\n let refusalInputTransformations = a.refused.inputTransformations;\n\n // One `message` entry per refused hop, in order — A first. Failed hops are\n // skipped (no usage came back); the serving hop is appended as\n // `fallback_message` when its message_delta arrives.\n const iterations: BetaMessageIterationUsage[] = [\n toIterationUsage('message', a.model ?? '', a.refused.usage),\n ];\n\n for (let hop = firstHop; hop < fallbacks.length; hop++) {\n const model = fallbacks[hop]!.model;\n const hasNext = hop + 1 < fallbacks.length;\n pin(hop);\n\n // --- boundary: a `fallback` content block at the next monotonic index ---\n // Emitted before the request, so a hop that fails leaves its boundary in\n // place and the next attempt emits its own (still `from: fromModel` — the\n // last model that contributed output).\n const fbIndex = nextIndex++;\n yield emit<BetaRawContentBlockStartEvent>('content_block_start', {\n type: 'content_block_start',\n index: fbIndex,\n content_block: {\n type: 'fallback',\n from: { model: fromModel },\n to: { model },\n trigger: { type: 'refusal', category: refusalDetails?.category ?? null },\n },\n });\n yield emit<BetaRawContentBlockStopEvent>('content_block_stop', {\n type: 'content_block_stop',\n index: fbIndex,\n });\n\n // --- build the request: appended-assistant continuation ---\n // First attempt carries the newest partial appended (when its refusal\n // granted a prefill claim); a 400 on that form means the server rejected\n // the prefill, so the hop is retried once without it — the same-body\n // form the token always supports.\n let continuation = [...base, ...partial];\n let resB: Response | null = null;\n let failure: BetaRefusalFallbackError | null = null;\n for (let attempt = 0; attempt < 2; attempt++) {\n const reqB = buildFallbackRequest(request, { model, creditToken: token, continuation });\n // controller mirrors the original signal and additionally fires when the\n // spliced body is cancelled — either must abort an in-flight hop request.\n reqB.signal = controller.signal;\n\n try {\n resB = await next(reqB);\n } catch (err) {\n // the consumer cancelled (or the original request was aborted): unwind\n if (isAbortError(err)) throw err;\n failure = {\n kind: 'request_failed',\n message: `fallback request failed: ${err}`,\n model,\n status: null,\n detail: err,\n };\n break;\n }\n if (resB.ok) break;\n // ctx.parse reads through an internal clone, so it works even though\n // the client will also read this body; resB.text() would conflict.\n const errBody = await ctx.parse(resB).catch(() => null);\n if (attempt === 0 && resB.status === 400 && partial.length) {\n ctx.logger.warn(\n `puku-ai/sdk: betaRefusalFallbackMiddleware: fallback request with the partial output appended was rejected (HTTP 400: ${JSON.stringify(\n errBody,\n )}); retrying without it`,\n );\n continuation = base;\n resB = null;\n continue;\n }\n failure = {\n kind: 'request_failed',\n message: `fallback request failed: HTTP ${resB.status}: ${JSON.stringify(errBody)}`,\n model,\n status: resB.status,\n detail: errBody,\n };\n break;\n }\n\n if (failure) {\n onError(failure);\n // The token was never redeemed — retry it against the next entry.\n if (hasNext) continue;\n // Surface the held refusal verbatim — its category/explanation and the\n // still-unredeemed credit token — and point recommended_model at the hop\n // we last tried.\n const stopDetails: BetaRefusalStopDetails = {\n ...refusalDetails,\n recommended_model: model,\n };\n yield emit<BetaRawMessageDeltaEvent>('message_delta', {\n type: 'message_delta',\n context_management: null,\n delta: {\n stop_reason: 'refusal',\n stop_sequence: null,\n container: null,\n stop_details: stopDetails,\n },\n usage: (lastUsage ?? {}) as BetaMessageDeltaUsage,\n ...(refusalInputTransformations !== undefined && {\n input_transformations: refusalInputTransformations,\n }),\n });\n yield emit<BetaRawMessageStopEvent>('message_stop', { type: 'message_stop' });\n return;\n }\n\n // --- splice: monotonic indices, suppressed message_start, usage.iterations ---\n const b = yield* consumeHop({\n response: resB!,\n controller,\n indexBase: nextIndex,\n hasNext,\n onError,\n splice: { iterations, model },\n });\n if (!b.refused) return;\n\n // This hop refused too, with a fresh token: its emitted partial stays in\n // the client's message, becomes the next partial segment, and the chain\n // continues.\n token = b.refused.token;\n refusalDetails = b.refused.stopDetails;\n refusalInputTransformations = b.refused.inputTransformations;\n base = continuation;\n partial = b.refused.hasPrefillClaim ? toPrefillBlocks(b.blocks) : [];\n iterations.push(toIterationUsage('message', model, b.refused.usage));\n lastUsage = b.refused.usage;\n fromModel = model;\n nextIndex = b.nextIndex;\n }\n}\n\n/** The outcome of consuming one hop's stream. */\ninterface HopOutcome {\n /** Set when the hop refused with a credit token and an entry remained to chain to. */\n refused: {\n token: string;\n hasPrefillClaim: boolean;\n usage: BetaMessageDeltaUsage;\n /** The refusal's stop_details verbatim, surfaced if the whole chain degrades. */\n stopDetails: BetaRefusalStopDetails;\n /**\n * A spliced hop's suppressed message_start `input_transformations`, forwarded\n * on the surfaced refusal delta if the whole chain degrades; `undefined` for\n * stream A (its start reached the client) or when the start had none.\n */\n inputTransformations: BetaMessage['input_transformations'] | undefined;\n } | null;\n /** The hop's serving model, from its message_start. */\n model: string | undefined;\n /** The hop's accumulated content blocks, in start order — the next partial segment. */\n blocks: any[];\n /** One past the highest (shifted) block index emitted — where the next boundary goes. */\n nextIndex: number;\n}\n\n/**\n * Consume one hop's SSE events, forwarding them to the client while\n * accumulating its content blocks (returned in the outcome).\n *\n * Stream A (`splice: null`) is forwarded in its original wire bytes; a\n * spliced hop (`splice` set) has its message_start suppressed (the client\n * already saw A's), its block indices shifted by `indexBase`, and its\n * terminal message_delta's usage rewritten to the `usage.iterations`\n * chain shape, with the suppressed message_start's `input_transformations`\n * forwarded onto it.\n *\n * A refusal that can be chained — it carries a `fallback_credit_token` and a\n * fallback entry remains — ends the hop early: open blocks are closed, the\n * terminal message_delta + message_stop are suppressed, and the token+usage\n * are returned so the caller can issue the next hop. Any other refusal is\n * reported through `onError` and passes through to the client.\n */\nasync function* consumeHop(args: {\n response: Response;\n controller: AbortController;\n /** Shift wire block indices by this much, keeping them monotonic across hops. */\n indexBase: number;\n /** Whether a fallback entry exists to chain to if this hop refuses. */\n hasNext: boolean;\n onError: (error: BetaRefusalFallbackError) => void;\n /** Splice context for fallback hops; null for stream A. */\n splice: { iterations: BetaMessageIterationUsage[]; model: string } | null;\n}): AsyncGenerator<Uint8Array, HopOutcome> {\n const { response, controller, indexBase, hasNext, onError, splice } = args;\n const tracker = new BlockTracker(indexBase);\n let model: string | undefined;\n let startUsage: BetaUsage | null = null;\n // A spliced hop's message_start is suppressed, so its `input_transformations`\n // must ride on the re-emitted terminal message_delta — the way a server-side\n // fallback reports the serving model's list.\n let startInputTransformations: BetaMessage['input_transformations'];\n\n for await (const sse of Stream.rawEvents(response, controller)) {\n const p = safeJSON(sse.data) as BetaRawMessageStreamEvent | undefined;\n switch (p?.type) {\n case 'message_start': {\n model = p.message.model;\n startUsage = p.message.usage;\n if ('input_transformations' in p.message) startInputTransformations = p.message.input_transformations;\n if (splice) continue;\n break;\n }\n case 'content_block_start': {\n tracker.start(p);\n if (splice) {\n yield emit(p.type, p);\n continue;\n }\n break;\n }\n case 'content_block_delta': {\n tracker.delta(p);\n if (splice) {\n yield emit(p.type, p);\n continue;\n }\n break;\n }\n case 'content_block_stop': {\n tracker.stop(p);\n if (splice) {\n yield emit(p.type, p);\n continue;\n }\n break;\n }\n case 'message_delta': {\n if (p.delta.stop_reason === 'refusal') {\n // `fallback_credit_token` is null when the refusal isn't eligible\n // for a fallback credit; without one we don't retry.\n const details = p.delta.stop_details?.type === 'refusal' ? p.delta.stop_details : null;\n if (details?.fallback_credit_token && hasNext) {\n const usage = backfill(p.usage, startUsage);\n yield* tracker.closeOpenBlocks();\n // suppress this hop's message_delta + message_stop\n return {\n refused: {\n token: details.fallback_credit_token,\n hasPrefillClaim: details.fallback_has_prefill_claim === true,\n usage,\n stopDetails: details,\n inputTransformations: splice ? startInputTransformations : undefined,\n },\n model,\n blocks: tracker.contentBlocks(),\n nextIndex: tracker.nextIndex,\n };\n }\n if (!details?.fallback_credit_token) {\n onError({\n kind: 'no_credit_token',\n message: 'refusal stop_details has no fallback_credit_token',\n event: p,\n });\n } else {\n onError({\n kind: 'chain_exhausted',\n message: 'refusal but no fallback entries remain',\n event: p,\n });\n }\n }\n if (splice) {\n // Terminal hop. Replace iterations, don't append: this hop's own\n // message_delta self-reports a single `{type:\"message\",\n // model:undefined}` iteration (a fresh non-fallback request counts\n // itself as one message hop). Server-side `fallbacks` relabels the\n // whole chain instead — refused hops as `message`, the serving hop\n // as `fallback_message` — so spreading the self-report would\n // prepend a spurious `message:undefined` entry.\n const usage = backfill(p.usage, startUsage);\n usage.iterations = [\n ...splice.iterations,\n toIterationUsage('fallback_message', splice.model, usage),\n ];\n p.usage = usage;\n if (!('input_transformations' in p) && startInputTransformations !== undefined) {\n p.input_transformations = startInputTransformations;\n }\n yield emit('message_delta', p);\n continue;\n }\n break;\n }\n }\n\n // message_stop, ping, error, unrecognised — and for stream A every\n // event — pass through in their original wire bytes.\n yield passthroughSSE(sse);\n }\n return { refused: null, model, blocks: tracker.contentBlocks(), nextIndex: tracker.nextIndex };\n}\n\n/**\n * Block bookkeeping for one stream of the splice: accumulates each content\n * block from its deltas (for the continuation prefill), shifts wire indices\n * by `indexBase` so they stay monotonic across hops, and tracks which blocks\n * are still open so a refusal that cuts mid-block can close them.\n */\nclass BlockTracker {\n /** The stream's accumulated blocks keyed by their original wire index. */\n private blocks: AccumulatedBlock[] = [];\n /** One past the highest shifted block index seen. */\n nextIndex: number;\n /** Shifted indices of blocks started but not yet stopped. */\n private open: number[] = [];\n\n constructor(private indexBase: number = 0) {\n this.nextIndex = indexBase;\n }\n\n /** The accumulated content blocks, in start order. */\n contentBlocks(): any[] {\n return this.blocks.map((b) => b.block);\n }\n\n /** Track a content_block_start, shifting `event.index`. */\n start(event: BetaRawContentBlockStartEvent): void {\n this.blocks.push({ index: event.index, block: { ...event.content_block } });\n event.index += this.indexBase;\n this.open.push(event.index);\n this.nextIndex = Math.max(this.nextIndex, event.index + 1);\n }\n\n /** Apply a content_block_delta to its accumulating block, shifting `event.index`. */\n delta(event: BetaRawContentBlockDeltaEvent): void {\n applyDelta(this.blocks, event.index, event.delta);\n event.index += this.indexBase;\n }\n\n /** Track a content_block_stop, shifting `event.index`. */\n stop(event: BetaRawContentBlockStopEvent): void {\n event.index += this.indexBase;\n const i = this.open.indexOf(event.index);\n if (i !== -1) this.open.splice(i, 1);\n this.nextIndex = Math.max(this.nextIndex, event.index + 1);\n }\n\n /** content_block_stop events for any blocks still open. */\n *closeOpenBlocks(): Generator<Uint8Array> {\n for (const index of this.open) {\n yield emit<BetaRawContentBlockStopEvent>('content_block_stop', {\n type: 'content_block_stop',\n index,\n });\n }\n this.open.length = 0;\n }\n}\n\n// --- fallback request construction (appended-assistant continuation) -------\n\n/**\n * Object form of the redeemed credit token. `best_effort` keeps the retry\n * served if the token layer rejects it — the retry then proceeds at normal\n * price and the outcome lands on `usage.fallback_credit` — where the\n * bare-string (`strict`) form would 400 the whole request.\n */\nfunction creditTokenParam(token: string): BetaFallbackCreditTokenParam {\n return { token, mode: 'best_effort' };\n}\n\nfunction buildFallbackRequest(\n orig: APIRequest,\n {\n model,\n creditToken,\n continuation,\n }: {\n model: string;\n creditToken: string;\n continuation: BetaContentBlockParam[];\n },\n): APIRequest {\n // the caller guarantees a JSON string body (checked before stream A is read)\n const body = JSON.parse(orig.body as string);\n\n body.model = model;\n body.fallback_credit_token = creditTokenParam(creditToken);\n\n // Append the continuation (decided by the chain loop) as a trailing\n // assistant turn; everything else must stay identical to the refused\n // request. When the refusal granted no prefill claim, omit the turn\n // entirely and send the same-body form.\n if (continuation.length) {\n body.messages = [...body.messages, { role: 'assistant', content: continuation }];\n }\n\n // Do NOT touch max_tokens (or any other render-shaping field): the token is\n // only redeemable against the same request body as the refused request —\n // model, fallback_credit_token, and the one appended assistant turn are the\n // only permitted deltas; anything else is a 400 (\"request body ... does not\n // match the original refused request\"). This is also why the per-entry\n // BetaFallbackParam overrides are ignored on the streaming path.\n\n return { ...orig, headers: new Headers(orig.headers), body: JSON.stringify(body) };\n}\n\n// --- block accumulation & prefill conversion -------------------------------\n\n/** Apply a content_block_delta to the accumulating block at `index`. */\nfunction applyDelta(\n blocks: AccumulatedBlock[],\n index: number,\n delta: BetaRawContentBlockDeltaEvent['delta'],\n): void {\n const block = blocks.find((x) => x.index === index)?.block;\n if (!block) return;\n switch (delta.type) {\n case 'text_delta': {\n block.text = (block.text ?? '') + delta.text;\n break;\n }\n case 'input_json_delta': {\n block._partial_json = (block._partial_json ?? '') + delta.partial_json;\n break;\n }\n case 'citations_delta':\n (block.citations ??= []).push(delta.citation);\n break;\n case 'thinking_delta': {\n block.thinking = (block.thinking ?? '') + delta.thinking;\n break;\n }\n case 'signature_delta': {\n block.signature = delta.signature;\n break;\n }\n case 'compaction_delta': {\n break;\n }\n default:\n ((_: never) => {})(delta);\n }\n}\n\n/**\n * Convert a hop's accumulated response blocks to the appended assistant turn,\n * as-is: a `fallback_has_prefill_claim` refusal guarantees the partial output\n * is resendable verbatim, so no client-side filtering is applied. The only\n * rewrite is reassembling tool inputs from their accumulated\n * `input_json_delta` JSON (content_block_start carries `input: {}`).\n */\nfunction toPrefillBlocks(responseBlocks: any[]): BetaContentBlockParam[] {\n return responseBlocks.map((b) => {\n if (typeof b?._partial_json !== 'string') return b;\n const { _partial_json, ...block } = b;\n return { ...block, input: safeJSON(_partial_json) ?? block.input };\n });\n}\n\n// --- helpers --------------------------------------------------------------\n\n/**\n * A copy of `request` with `betas` appended to its `puku-beta` header,\n * skipping values already present (set by the caller or another middleware).\n */\nfunction withMiddlewareHeaders(request: APIRequest, betas: readonly PukuBeta[]): APIRequest {\n const headers = new Headers(request.headers);\n const existing = new Set(\n headers\n .get('puku-beta')\n ?.split(',')\n .map((s) => s.trim()),\n );\n for (const beta of betas) {\n if (!existing.has(beta)) {\n headers.append('puku-beta', beta);\n existing.add(beta);\n }\n }\n headers.set(\n STAINLESS_HELPER_HEADER,\n appendHeaderValue(headers.get(STAINLESS_HELPER_HEADER), 'fallback-refusal-middleware'),\n );\n return { ...request, headers };\n}\n\nfunction emit<T extends { type: string }>(event: T['type'], payload: T): Uint8Array {\n const sse: ServerSentEvent = { event, data: JSON.stringify(payload), raw: [] };\n return encoder.encode(serializeSSE(sse));\n}\n\n/**\n * Forward a decoded event in its original wire bytes, preserving SSE fields\n * the decoder doesn't model (`id:`, `retry:`, comment lines). Falls back to\n * re-serializing for events with no raw lines.\n */\nfunction passthroughSSE(sse: ServerSentEvent): Uint8Array {\n return encoder.encode(sse.raw.length ? sse.raw.join('\\n') + '\\n\\n' : serializeSSE(sse));\n}\n\n// Field-wise union of BetaUsage and BetaMessageDeltaUsage, all nullable —\n// a plain Partial<A & B> intersects `number` with `number | null` down to\n// `number`, which rejects delta usage objects.\ntype UsageLike =\n | { [K in keyof (BetaUsage & BetaMessageDeltaUsage)]?: (BetaUsage & BetaMessageDeltaUsage)[K] | null }\n | null\n | undefined;\n\nfunction toIterationUsage(type: 'message', model: string, u: UsageLike): BetaMessageIterationUsage;\nfunction toIterationUsage(\n type: 'fallback_message',\n model: string,\n u: UsageLike,\n): BetaFallbackMessageIterationUsage;\nfunction toIterationUsage(\n type: 'message' | 'fallback_message',\n model: string,\n u: UsageLike,\n): BetaMessageIterationUsage | BetaFallbackMessageIterationUsage {\n return {\n type,\n model,\n input_tokens: u?.input_tokens ?? 0,\n output_tokens: u?.output_tokens ?? 0,\n cache_read_input_tokens: u?.cache_read_input_tokens ?? 0,\n cache_creation_input_tokens: u?.cache_creation_input_tokens ?? 0,\n cache_creation: u?.cache_creation ?? null,\n };\n}\n\n/** Fill null/undefined fields on `primary` from `fallback`. */\nfunction backfill(\n primary: BetaMessageDeltaUsage | null | undefined,\n fallback: BetaUsage | null | undefined,\n): BetaMessageDeltaUsage {\n const out: any = { ...(fallback ?? {}), ...(primary ?? {}) };\n for (const k of Object.keys(out)) {\n if (out[k] == null && (fallback as any)?.[k] != null) out[k] = (fallback as any)[k];\n }\n return out;\n}\n\n/**\n * Serialize a {@link ServerSentEvent} back to its SSE wire form\n * (`event: ...\\ndata: ...\\n\\n`). Multi-line `data` is emitted as one\n * `data:` line per line, matching the spec. The inverse of the decoder\n * behind {@link Stream.rawEvents}.\n */\nfunction serializeSSE(sse: ServerSentEvent): string {\n let out = '';\n if (sse.event !== null) out += `event: ${sse.event}\\n`;\n for (const line of sse.data.split('\\n')) out += `data: ${line}\\n`;\n return out + '\\n';\n}\n\nfunction makeAbort(controller: AbortController, signal: AbortSignal) {\n return () => controller.abort(signal.reason);\n}\n",
|
|
135
135
|
"// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.\n//\n// Public API surface:\n// `PukuAI` — client class (default + named)\n// `BasePuku` — base class (named)\n// `PukuError` — base error (named; static `PukuAI.PukuError` is also exposed)\n//\n// Static members on `PukuAI` mirror the upstream pattern: `PukuAI.PukuError`,\n// `PukuAI.APIError`, `PukuAI.RateLimitError`, ... are accessible directly.\n\nexport { PukuAI as default, PukuAI, BasePuku } from './client.js';\nexport { type PukuAI as PukuAIType, type BasePuku as BasePukuType } from './client.js';\n\nexport { VERSION } from './version.js';\n\nexport { type Uploadable, toFile } from './core/uploads.js';\nexport { APIPromise } from './core/api-promise.js';\nexport { type Middleware, type MiddlewareContext, type MiddlewareNext } from './core/middleware.js';\nexport {\n betaRefusalFallbackMiddleware,\n BetaFallbackState,\n type BetaRefusalFallbackError,\n type BetaRefusalFallbackOptions,\n} from './lib/middleware.js';\nexport {\n type APIRequest,\n type ClientOptions,\n HUMAN_PROMPT,\n AI_PROMPT,\n} from './client.js';\nexport { PagePromise } from './core/pagination.js';\n\n// ── Constants ──────────────────────────────────────────────────────────────\nexport {\n OAUTH_API_BETA_HEADER,\n FEDERATION_BETA_HEADER,\n} from './lib/credentials/types.js';\nexport { MODEL_NONSTREAMING_TOKENS } from './internal/constants.js';\nexport {\n PukuError as PukuError,\n APIError,\n APIConnectionError,\n APIConnectionTimeoutError,\n APIUserAbortError,\n RetryableError,\n NotFoundError,\n ConflictError,\n RateLimitError,\n BadRequestError,\n AuthenticationError,\n InternalServerError,\n PermissionDeniedError,\n UnprocessableEntityError,\n} from './core/error.js';\n\nexport type {\n AutoParseableOutputFormat,\n ParsedMessage,\n ParsedContentBlock,\n ParseableMessageCreateParams,\n ExtractParsedContentFromParams,\n} from './lib/parser.js';\n\n// ── Message content types (re-exported from resources/messages) ────────────\nexport type {\n ContentBlock,\n ContentBlockParam,\n TextBlock,\n TextBlockParam,\n ImageBlockParam,\n ToolUseBlock,\n ToolUseBlockParam,\n ToolResultBlockParam,\n ThinkingBlock,\n ThinkingBlockParam,\n Base64ImageSource,\n MessageParam,\n Message,\n} from './resources/messages/messages.js';\n\n// ── Streaming class ─────────────────────────────────────────────────────────\nexport { Stream } from './core/streaming.js';\n\n// ── Beta message types (re-exported from resources/beta/messages) ──────────\nexport type {\n BetaContentBlock,\n BetaContentBlockParam,\n BetaMessage,\n BetaMessageParam,\n BetaMessageStreamParams,\n BetaTool,\n BetaToolUnion,\n BetaToolUseBlock,\n BetaUsage,\n BetaTextBlock,\n BetaTextBlockParam,\n BetaImageBlockParam,\n BetaThinkingBlock,\n BetaThinkingBlockParam,\n BetaToolResultBlockParam,\n BetaToolUseBlockParam,\n} from './resources/beta/messages/messages.js';\n",
|
|
136
136
|
"/**\n * @puku-ai/sdk — public entrypoint.\n *\n * Re-exports the bundled vendor tree (`./vendor`) with a single targeted\n * change: the HTTP transport reads `PUKU_BASE_URL` (required, no fallback).\n *\n * Public API surface: `PukuAI` is the client class. Error classes are\n * `PukuError` (base), `APIError`, `RateLimitError`, etc. — all re-exported.\n *\n * Consumers only ever import from this root — there are no subpath exports.\n * Helpers previously reachable via `@puku-ai/sdk/helpers/beta/...` or\n * `@puku-ai/sdk/tools/...` are re-exported here as named symbols. The build\n * pipeline (scripts/build.ts) bundles the entire vendor tree into a single\n * `sdk.mjs` at the package root, so the internal file layout is invisible\n * to consumers.\n */\n\n// Re-export everything from the vendor root first. This brings the client\n// class, default callable, VERSION, APIPromise, PagePromise, toFile, all the\n// error classes (static members of PukuAI), and the parser types.\nexport * from \"./vendor/index.js\";\nexport { default } from \"./vendor/index.js\";\nexport { VERSION } from \"./vendor/version.js\";\n\n// ── Helper functions previously exposed via subpath exports ────────────────\nexport { betaTool, betaJSONSchemaOutputFormat } from \"./vendor/helpers/beta/json-schema.js\";\nexport { betaZodTool, betaZodOutputFormat } from \"./vendor/helpers/beta/zod.js\";\nexport { betaMemoryTool, type MemoryToolHandlers } from \"./vendor/helpers/beta/memory.js\";\nexport {\n mcpTool,\n mcpTools,\n mcpMessage,\n mcpMessages,\n mcpContent,\n mcpResourceToContent,\n mcpResourceToFile,\n UnsupportedMCPValueError,\n type MCPToolLike,\n type MCPCallToolResultLike,\n type MCPToolResultContentLike,\n type MCPTextContentLike,\n type MCPImageContentLike,\n type MCPAudioContentLike,\n type MCPEmbeddedResourceLike,\n type MCPResourceLinkLike,\n type MCPTextResourceContentsLike,\n type MCPBlobResourceContentsLike,\n type MCPResourceContentsLike,\n type MCPClientLike,\n type MCPPromptMessageLike,\n type MCPPromptContentLike,\n type MCPReadResourceResultLike,\n} from \"./vendor/helpers/beta/mcp.js\";\n\n// ── Runnable-tool surface ──────────────────────────────────────────────────\nexport { ToolError } from \"./vendor/lib/tools/ToolError.js\";\nexport type {\n Promisable,\n BetaToolRunContext,\n BetaClientRunnableToolType,\n} from \"./vendor/lib/tools/BetaRunnableTool.js\";\n\n// ── Agent toolset ──────────────────────────────────────────────────────────\nexport {\n betaAgentToolset20260401,\n betaBashTool,\n betaReadTool,\n betaWriteTool,\n betaEditTool,\n betaGlobTool,\n betaGrepTool,\n resolvePath,\n BashSession,\n BashTimeoutError,\n setupSkills,\n extractSkillArchive,\n type AgentToolContext,\n} from \"./vendor/tools/agent-toolset/node.js\";",
|
|
137
137
|
"import { transformJSONSchema } from '../..//lib/transform-json-schema';\nimport * as z from 'zod/v4';\nimport { PukuError } from '../../core/error';\nimport { AutoParseableBetaOutputFormat } from '../../lib/beta-parser';\nimport { BetaRunnableTool, BetaToolRunContext, Promisable } from '../../lib/tools/BetaRunnableTool';\nimport { BetaToolResultContentBlockParam } from '../../resources/beta';\n/**\n * Creates a JSON schema output format object from the given Zod schema.\n *\n * If this is passed to the `.parse()` method then the response message will contain a\n * `.parsed_output` property that is the result of parsing the content with the given Zod object.\n *\n * This can be passed directly to the `.create()` method but will not\n * result in any automatic parsing, you'll have to parse the response yourself.\n */\nexport function betaZodOutputFormat<ZodInput extends z.ZodType>(\n zodObject: ZodInput,\n): AutoParseableBetaOutputFormat<z.infer<ZodInput>> {\n const jsonSchema = transformJSONSchema(z.toJSONSchema(zodObject, { reused: 'ref' }));\n\n return {\n type: 'json_schema',\n schema: {\n ...jsonSchema,\n },\n parse: (content) => {\n const output = zodObject.safeParse(JSON.parse(content));\n\n if (!output.success) {\n throw new PukuError(\n `Failed to parse structured output: ${output.error.message} cause: ${output.error.issues}`,\n );\n }\n\n return output.data;\n },\n };\n}\n\n/**\n * Creates a tool using the provided Zod schema that can be passed\n * into the `.toolRunner()` method. The Zod schema will automatically be\n * converted into JSON Schema when passed to the API. The provided function's\n * input arguments will also be validated against the provided schema.\n */\nexport function betaZodTool<InputSchema extends z.ZodType>(options: {\n name: string;\n inputSchema: InputSchema;\n description: string;\n run: (\n args: z.infer<InputSchema>,\n context?: BetaToolRunContext,\n ) => Promisable<string | Array<BetaToolResultContentBlockParam>>;\n /**\n * Optional cleanup hook for tools that hold process-level resources (e.g. a\n * persistent shell). `client.beta.sessions.events.toolRunner` calls it once\n * when iteration ends.\n */\n close?: () => void | Promise<void>;\n}): BetaRunnableTool<z.infer<InputSchema>> {\n const jsonSchema = z.toJSONSchema(options.inputSchema, { reused: 'ref' });\n\n if (jsonSchema.type !== 'object') {\n throw new Error(`Zod schema for tool \"${options.name}\" must be an object, but got ${jsonSchema.type}`);\n }\n\n // TypeScript doesn't narrow the type after the runtime check, so we need to assert it\n const objectSchema = jsonSchema as typeof jsonSchema & { type: 'object' };\n\n return {\n type: 'custom',\n name: options.name,\n input_schema: objectSchema,\n description: options.description,\n run: options.run,\n parse: (args: unknown) => options.inputSchema.parse(args) as z.infer<InputSchema>,\n ...(options.close ? { close: options.close } : {}),\n };\n}\n",
|
|
@@ -141,9 +141,9 @@
|
|
|
141
141
|
"import { globalRegistry } from \"./registries.js\";\nimport { assignProp } from \"./util.js\";\nfunction assignProps(target, ...sources) {\n for (const source of sources) {\n for (const key of Reflect.ownKeys(source)) {\n if (Object.prototype.propertyIsEnumerable.call(source, key)) {\n assignProp(target, key, source[key]);\n }\n }\n }\n return target;\n}\n// function initializeContext<T extends schemas.$ZodType>(inputs: JSONSchemaGeneratorParams<T>): ToJSONSchemaContext<T> {\n// return {\n// processor: inputs.processor,\n// metadataRegistry: inputs.metadata ?? globalRegistry,\n// target: inputs.target ?? \"draft-2020-12\",\n// unrepresentable: inputs.unrepresentable ?? \"throw\",\n// };\n// }\nexport function initializeContext(params) {\n // Normalize target: convert old non-hyphenated versions to hyphenated versions\n let target = params?.target ?? \"draft-2020-12\";\n if (target === \"draft-4\")\n target = \"draft-04\";\n if (target === \"draft-7\")\n target = \"draft-07\";\n return {\n processors: params.processors ?? {},\n metadataRegistry: params?.metadata ?? globalRegistry,\n target,\n unrepresentable: params?.unrepresentable ?? \"throw\",\n override: params?.override ?? (() => { }),\n io: params?.io ?? \"output\",\n counter: 0,\n seen: new Map(),\n sharedDefsExtractedFor: undefined,\n sharedEmitDoneFor: undefined,\n cycles: params?.cycles ?? \"ref\",\n reused: params?.reused ?? \"inline\",\n intersections: [],\n deferred: [],\n external: params?.external ?? undefined,\n };\n}\n/**\n * Applies the `unrepresentable` setting at a site that has no JSON Schema equivalent. Throws\n * `message` unless the setting (or the handler's return value) says otherwise. Returns `true` if a\n * custom JSON Schema was written into `json`, in which case the caller must not write its own.\n */\nexport function handleUnrepresentable(schema, ctx, json, params, message) {\n const result = typeof ctx.unrepresentable === \"function\"\n ? ctx.unrepresentable({ zodSchema: schema, path: params.path, message })\n : ctx.unrepresentable;\n if (result === \"any\")\n return false;\n if (result === undefined || result === \"throw\")\n throw new Error(message);\n Object.assign(json, result);\n return true;\n}\nexport function process(schema, ctx, _params = { path: [], schemaPath: [] }) {\n var _a;\n const def = schema._zod.def;\n // check for schema in seens\n const seen = ctx.seen.get(schema);\n if (seen) {\n seen.count++;\n // check if cycle\n const isCycle = _params.schemaPath.includes(schema);\n if (isCycle) {\n seen.cycle = _params.path;\n }\n return seen.schema;\n }\n // initialize\n const result = { schema: {}, count: 1, cycle: undefined, path: _params.path };\n ctx.seen.set(schema, result);\n ctx.sharedDefsExtractedFor = undefined;\n ctx.sharedEmitDoneFor = undefined;\n // custom method overrides default behavior\n const overrideSchema = schema._zod.toJSONSchema?.();\n if (overrideSchema) {\n result.schema = overrideSchema;\n }\n else {\n const params = {\n ..._params,\n schemaPath: [..._params.schemaPath, schema],\n path: _params.path,\n };\n if (schema._zod.processJSONSchema) {\n schema._zod.processJSONSchema(ctx, result.schema, params);\n }\n else {\n const _json = result.schema;\n const processor = ctx.processors[def.type];\n if (!processor) {\n throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);\n }\n processor(schema, ctx, _json, params);\n }\n const parent = schema._zod.parent;\n if (parent) {\n // Also set ref if processor didn't (for inheritance)\n if (!result.ref)\n result.ref = parent;\n process(parent, ctx, params);\n ctx.seen.get(parent).isParent = true;\n }\n }\n // metadata\n const meta = ctx.metadataRegistry.get(schema);\n if (meta)\n assignProps(result.schema, meta);\n if (ctx.io === \"input\" && isTransforming(schema)) {\n // examples/defaults only apply to output type of pipe\n delete result.schema.examples;\n delete result.schema.default;\n }\n // set prefault as default\n if (ctx.io === \"input\" && \"_prefault\" in result.schema)\n (_a = result.schema).default ?? (_a.default = result.schema._prefault);\n delete result.schema._prefault;\n // pulling fresh from ctx.seen in case it was overwritten\n const _result = ctx.seen.get(schema);\n return _result.schema;\n}\n// Escape a reference token for use in a JSON Pointer fragment (RFC 6901): `~` becomes `~0` and `/` becomes `~1`. The `~` replacement must run first.\nfunction encodeJSONPointerSegment(segment) {\n return segment.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n}\nexport function extractDefs(ctx, schema\n// params: EmitParams\n) {\n // iterate over seen map;\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // With `external` set, every registered schema resolves through the external branch of `makeURI`, so the root branch below produces the same ref the external branch would — this pass is identical whichever schema it is called with, and only needs to run once.\n if (ctx.external && ctx.sharedDefsExtractedFor === ctx.external)\n return;\n // Track ids to detect duplicates across different schemas\n const idToSchema = new Map();\n for (const entry of ctx.seen.entries()) {\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n const existing = idToSchema.get(id);\n if (existing && existing !== entry[0]) {\n throw new Error(`Duplicate schema id \"${id}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);\n }\n idToSchema.set(id, entry[0]);\n }\n }\n // returns a ref to the schema defId will be empty if the ref points to an external schema (or #)\n const makeURI = (entry) => {\n // comparing the seen objects because sometimes multiple schemas map to the same seen object. e.g. lazy\n // external is configured\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (ctx.external) {\n const externalId = ctx.external.registry.get(entry[0])?.id; // ?? \"__shared\";// `__schema${ctx.counter++}`;\n // check if schema is in the external registry\n const uriGenerator = ctx.external.uri ?? ((id) => id);\n if (externalId) {\n return { ref: uriGenerator(externalId) };\n }\n // otherwise, add to __shared\n const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;\n entry[1].defId = id; // set defId so it will be reused if needed\n return { defId: id, ref: `${uriGenerator(\"__shared\")}#/${defsSegment}/${encodeJSONPointerSegment(id)}` };\n }\n const uriPrefix = `#`;\n const defUriPrefix = `${uriPrefix}/${defsSegment}/`;\n // an id-less root has nowhere to be extracted to, so it stays inline and self-references as `#`\n if (entry[1] === root && !entry[1].schema.id) {\n return { ref: uriPrefix };\n }\n // self-contained schema\n const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;\n return { defId, ref: defUriPrefix + encodeJSONPointerSegment(defId) };\n };\n // stored cached version in `def` property remove all properties, set $ref\n const extractToDef = (entry) => {\n // if the schema is already a reference, do not extract it\n if (entry[1].schema.$ref) {\n return;\n }\n const seen = entry[1];\n const { ref, defId } = makeURI(entry);\n seen.def = { ...seen.schema };\n // defId won't be set if the schema is a reference to an external schema or if the schema is the root schema\n if (defId)\n seen.defId = defId;\n // wipe away all properties except $ref\n const schema = seen.schema;\n for (const key in schema) {\n delete schema[key];\n }\n schema.$ref = ref;\n };\n // throw on cycles\n // break cycles\n if (ctx.cycles === \"throw\") {\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.cycle) {\n throw new Error(\"Cycle detected: \" +\n `#/${seen.cycle?.join(\"/\")}/<root>` +\n '\\n\\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.');\n }\n }\n }\n // extract schemas into $defs\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n // convert root schema to # $ref\n if (schema === entry[0]) {\n extractToDef(entry); // this has special handling for the root schema\n continue;\n }\n // extract schemas that are in the external registry\n if (ctx.external) {\n const ext = ctx.external.registry.get(entry[0])?.id;\n if (schema !== entry[0] && ext) {\n extractToDef(entry);\n continue;\n }\n }\n // extract schemas with `id` meta\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n extractToDef(entry);\n continue;\n }\n // break cycles\n if (seen.cycle) {\n // any\n extractToDef(entry);\n continue;\n }\n // extract reused schemas\n if (seen.count > 1) {\n if (ctx.reused === \"ref\") {\n extractToDef(entry);\n // biome-ignore lint:\n continue;\n }\n }\n }\n if (ctx.external)\n ctx.sharedDefsExtractedFor = ctx.external;\n}\n/** Rewrites `anyOf: [{type: \"a\"}, {type: \"b\"}]` to `type: [\"a\", \"b\"]`, which every JSON Schema draft treats as equivalent and most consumers render far better for the nullable case. Only branches that are a bare type assertion qualify — anything carrying a constraint, `$ref`, `const` or metadata is left alone. Runs after `flattenRef`, so a branch an override decorated or `$defs` extraction turned into a `$ref` is no longer bare and correctly stays in `anyOf`. `oneOf` is excluded: `integer` and `number` overlap, so \"exactly one\" and \"at least one\" are not the same there. OpenAPI 3.0 is excluded: its `type` must be a single string. */\nfunction compactTypeUnion(schema) {\n const options = schema.anyOf;\n if (!Array.isArray(options) || options.length === 0 || schema.type !== undefined)\n return;\n const types = [];\n for (const option of options) {\n if (!option || typeof option !== \"object\")\n return;\n // A branch that is itself a compactible union folds into this one — nested `anyOf` and a flat `type` array say the same thing. Compacting it first also makes the result independent of the order this pass walks the seen map in.\n compactTypeUnion(option);\n const keys = Object.keys(option);\n if (keys.length !== 1 || keys[0] !== \"type\")\n return;\n const type = option.type;\n for (const member of Array.isArray(type) ? type : [type]) {\n if (typeof member !== \"string\")\n return;\n if (!types.includes(member))\n types.push(member);\n }\n }\n delete schema.anyOf;\n // A `type` array must be non-empty and unique (metaschema); a single member is spelled as a bare string.\n schema.type = types.length === 1 ? types[0] : types;\n}\n/** Keywords `foldIntersection` knows how to combine. Anything else — `$ref`, `patternProperties`,\n * an annotation like `description` — makes a member unfoldable, so a constraint this does not\n * understand leaves the `allOf` alone instead of being silently dropped or misattributed. */\nconst FOLDABLE_KEYS = new Set([\"type\", \"properties\", \"required\", \"additionalProperties\"]);\nconst UNION_KEYS = [\"oneOf\", \"anyOf\"];\n/** A member's constraint on a key it does not declare itself. A `catchall` states one; `false`, an absent `additionalProperties`, and the empty schema a loose object emits state nothing. */\nfunction undeclaredConstraint(member) {\n const extra = member.additionalProperties;\n if (extra === undefined || extra === false || typeof extra !== \"object\" || extra === null)\n return null;\n return Object.keys(extra).length ? extra : null;\n}\n/** Combines object members into the single object they describe together, or returns `null` if any of them carries a keyword outside {@link FOLDABLE_KEYS}. */\nfunction foldObjects(members) {\n const objects = [];\n for (const member of members) {\n // A boolean subschema is legal JSON Schema and carries no keywords to fold.\n if (typeof member !== \"object\" || member.type !== \"object\")\n return null;\n for (const key in member) {\n if (!FOLDABLE_KEYS.has(key))\n return null;\n }\n objects.push(member);\n }\n const properties = {};\n const required = new Set();\n for (const object of objects) {\n for (const key in object.properties) {\n // `in` would report a `__proto__` key as already present via the prototype chain and skip it.\n if (Object.prototype.hasOwnProperty.call(properties, key))\n continue;\n // Every member constrains this key: the ones that declare it say how, and a `catchall` member constrains it too even though it does not name it. The key has to satisfy all of them, which is the same intersection one level down.\n const parts = [];\n for (const other of objects) {\n const part = other.properties?.[key] ?? undeclaredConstraint(other);\n if (part === null || part === undefined)\n continue;\n if (!parts.some((seen) => JSON.stringify(seen) === JSON.stringify(part)))\n parts.push(part);\n }\n const merged = parts.length === 1\n ? parts[0]\n : (foldObjects(parts) ?? { allOf: parts });\n assignProp(properties, key, merged);\n }\n for (const key of object.required ?? [])\n required.add(key);\n }\n const folded = { type: \"object\", properties };\n if (required.size)\n folded.required = [...required];\n // A key no member declares is rejected only when every member rejects it, so the fold is closed only when every member is. Otherwise it carries whatever the `catchall` members demand of such a key.\n if (objects.every((object) => object.additionalProperties === false)) {\n folded.additionalProperties = false;\n }\n else {\n const constraints = [];\n for (const object of objects) {\n const constraint = undeclaredConstraint(object);\n if (constraint && !constraints.some((seen) => JSON.stringify(seen) === JSON.stringify(constraint)))\n constraints.push(constraint);\n }\n if (constraints.length === 1)\n folded.additionalProperties = constraints[0];\n else if (constraints.length > 1)\n folded.additionalProperties = { allOf: constraints };\n }\n return folded;\n}\n/** `additionalProperties` in an `allOf` member sees only that member's own `properties`, so two\n * closed object members reject each other's keys and the schema validates nothing. Zod's parser\n * pools the key sets instead — `handleIntersectionResults` reports a key as unrecognized only when\n * *every* side rejects it — so the emitted schema has to pool them too, and folding the members\n * into one object is the encoding that says so on every target.\n *\n * This runs from `finalize`, after `extractDefs`, which is what keeps it clear of the `$ref`\n * machinery: a member extracted into `$defs` is already a `$ref` by now and declines to fold, so it\n * keeps its reference and its own closedness rather than being inlined as a stale copy. */\nfunction foldIntersection(json) {\n const allOf = json.allOf;\n if (!Array.isArray(allOf) || allOf.length < 2)\n return;\n // An `override` runs before this pass and may have written object keywords onto the intersection itself. Those are deliberate, so decline rather than overwrite them.\n for (const key of FOLDABLE_KEYS)\n if (key in json)\n return;\n // An intersection distributes over a union: `A & (X | Y)` is `(A & X) | (A & Y)`. Only the first union is distributed over; a second one stays among the members every branch folds against, where it fails the object check and declines the whole intersection rather than multiplying out.\n const unions = allOf.filter((m) => UNION_KEYS.some((k) => Array.isArray(m[k])));\n let folded = null;\n if (!unions.length) {\n folded = foldObjects(allOf);\n }\n else {\n const union = unions[0];\n const keyword = UNION_KEYS.find((k) => Array.isArray(union[k]));\n if (Object.keys(union).length !== 1)\n return;\n const rest = allOf.filter((m) => m !== union);\n const branches = union[keyword].map((branch) => foldObjects([...rest, branch]));\n if (branches.some((b) => !b))\n return;\n folded = { [keyword]: branches };\n }\n if (!folded)\n return;\n delete json.allOf;\n assignProps(json, folded);\n}\nexport function finalize(ctx, schema) {\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // flatten refs - inherit properties from parent schemas\n const flattenRef = (zodSchema) => {\n const seen = ctx.seen.get(zodSchema);\n // already processed\n if (seen.ref === null)\n return;\n const schema = seen.def ?? seen.schema;\n const _cached = { ...schema };\n const ref = seen.ref;\n seen.ref = null; // prevent infinite recursion\n if (ref) {\n flattenRef(ref);\n const refSeen = ctx.seen.get(ref);\n const refSchema = refSeen.schema;\n // merge referenced schema into current\n if (refSchema.$ref && (ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\")) {\n // older drafts can't combine $ref with other properties\n schema.allOf = schema.allOf ?? [];\n schema.allOf.push(refSchema);\n }\n else {\n assignProps(schema, refSchema);\n }\n // restore child's own properties (child wins)\n assignProps(schema, _cached);\n const isParentRef = zodSchema._zod.parent === ref;\n // For parent chain, child is a refinement - remove parent-only properties\n if (isParentRef) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (!(key in _cached)) {\n delete schema[key];\n }\n }\n }\n // When ref was extracted to $defs, remove properties that match the definition\n if (refSchema.$ref && refSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n // If parent was extracted (has $ref), propagate $ref to this schema. This handles cases like: readonly().meta({id}).describe() where processor sets ref to innerType but parent should be referenced\n const parent = zodSchema._zod.parent;\n if (parent && parent !== ref) {\n // Ensure parent is processed first so its def has inherited properties\n flattenRef(parent);\n const parentSeen = ctx.seen.get(parent);\n if (parentSeen?.schema.$ref) {\n schema.$ref = parentSeen.schema.$ref;\n // De-duplicate with parent's definition\n if (parentSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n }\n // execute overrides\n ctx.override({\n zodSchema: zodSchema,\n jsonSchema: schema,\n path: seen.path ?? [],\n });\n };\n // Flattening walks the whole map and clears each `ref` as it goes, so a second call over the same map is a no-op scan. Skip it outright once it has run for a registry conversion.\n if (!ctx.external || ctx.sharedEmitDoneFor !== ctx.external) {\n for (const entry of [...ctx.seen.entries()].reverse()) {\n flattenRef(entry[0]);\n }\n if (ctx.target !== \"openapi-3.0\") {\n for (const entry of ctx.seen.entries()) {\n compactTypeUnion(entry[1].def ?? entry[1].schema);\n }\n }\n for (const rewrite of ctx.deferred)\n rewrite();\n // After flattening, every member that was extracted is a `$ref`, so the fold sees the final shape. A schema that inherits an intersection — through `z.lazy`, or any `ref` chain — holds the same `allOf` array, so fold by array identity to catch every copy.\n if (ctx.intersections.length) {\n const carriers = new Map();\n for (const seen of ctx.seen.values()) {\n for (const json of [seen.schema, seen.def]) {\n const allOf = json?.allOf;\n if (!Array.isArray(allOf))\n continue;\n const existing = carriers.get(allOf);\n if (existing)\n existing.push(json);\n else\n carriers.set(allOf, [json]);\n }\n }\n for (const allOf of ctx.intersections) {\n for (const json of carriers.get(allOf) ?? [])\n foldIntersection(json);\n }\n }\n }\n const result = {};\n if (ctx.target === \"draft-2020-12\") {\n result.$schema = \"https://json-schema.org/draft/2020-12/schema\";\n }\n else if (ctx.target === \"draft-07\") {\n result.$schema = \"http://json-schema.org/draft-07/schema#\";\n }\n else if (ctx.target === \"draft-04\") {\n result.$schema = \"http://json-schema.org/draft-04/schema#\";\n }\n else if (ctx.target === \"openapi-3.0\") {\n // OpenAPI 3.0 schema objects should not include a $schema property\n }\n else {\n // Arbitrary string values are allowed but won't have a $schema property set\n }\n if (ctx.external?.uri) {\n const id = ctx.external.registry.get(schema)?.id;\n if (!id)\n throw new Error(\"Schema is missing an `id` property\");\n result.$id = ctx.external.uri(id);\n }\n // when the root was extracted into $defs, `root.schema` is the `$ref` wrapper and `root.def` is the body that now lives under $defs\n assignProps(result, root.defId ? root.schema : (root.def ?? root.schema));\n // The `id` in `.meta()` is a Zod-specific registration tag used to extract schemas into $defs — it is not user-facing JSON Schema metadata. Strip it from the output body where it would otherwise leak. The id is preserved implicitly via the $defs key (and via $ref paths).\n const rootMetaId = ctx.metadataRegistry.get(schema)?.id;\n if (rootMetaId !== undefined && result.id === rootMetaId)\n delete result.id;\n // build defs object. With `external`, `defs` is the shared object every schema writes into, so the same entries are reassigned on every call. Without it, `defs` is fresh per call and must be rebuilt.\n const defs = ctx.external?.defs ?? {};\n if (!ctx.external || ctx.sharedEmitDoneFor !== ctx.external) {\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.def && seen.defId) {\n if (seen.def.id === seen.defId)\n delete seen.def.id;\n assignProp(defs, seen.defId, seen.def);\n }\n }\n }\n if (ctx.external)\n ctx.sharedEmitDoneFor = ctx.external;\n // set definitions in result\n if (ctx.external) {\n }\n else {\n if (Object.keys(defs).length > 0) {\n if (ctx.target === \"draft-2020-12\") {\n result.$defs = defs;\n }\n else {\n result.definitions = defs;\n }\n }\n }\n try {\n // this \"finalizes\" this schema and ensures all cycles are removed each call to finalize() is functionally independent though the seen map is shared\n const finalized = JSON.parse(JSON.stringify(result));\n Object.defineProperty(finalized, \"~standard\", {\n value: {\n ...schema[\"~standard\"],\n jsonSchema: {\n input: createStandardJSONSchemaMethod(schema, \"input\", ctx.processors),\n output: createStandardJSONSchemaMethod(schema, \"output\", ctx.processors),\n },\n },\n enumerable: false,\n writable: false,\n });\n return finalized;\n }\n catch (_err) {\n throw new Error(\"Error converting schema to JSON.\");\n }\n}\nfunction isTransforming(_schema, _ctx) {\n const ctx = _ctx ?? { seen: new Set() };\n if (ctx.seen.has(_schema))\n return false;\n ctx.seen.add(_schema);\n const def = _schema._zod.def;\n if (def.type === \"transform\")\n return true;\n if (def.type === \"array\")\n return isTransforming(def.element, ctx);\n if (def.type === \"set\")\n return isTransforming(def.valueType, ctx);\n if (def.type === \"lazy\")\n return isTransforming(def.getter(), ctx);\n if (def.type === \"promise\" ||\n def.type === \"optional\" ||\n def.type === \"nonoptional\" ||\n def.type === \"nullable\" ||\n def.type === \"readonly\" ||\n def.type === \"default\" ||\n def.type === \"prefault\" ||\n def.type === \"catch\") {\n return isTransforming(def.innerType, ctx);\n }\n if (def.type === \"intersection\") {\n return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);\n }\n if (def.type === \"record\" || def.type === \"map\") {\n return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);\n }\n if (def.type === \"pipe\") {\n if (_schema._zod.traits.has(\"$ZodCodec\"))\n return true;\n return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);\n }\n if (def.type === \"object\") {\n for (const key in def.shape) {\n if (isTransforming(def.shape[key], ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"union\") {\n for (const option of def.options) {\n if (isTransforming(option, ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"tuple\") {\n for (const item of def.items) {\n if (isTransforming(item, ctx))\n return true;\n }\n if (def.rest && isTransforming(def.rest, ctx))\n return true;\n return false;\n }\n return false;\n}\n/**\n * Creates a toJSONSchema method for a schema instance.\n * This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.\n */\nexport const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {\n const ctx = initializeContext({ ...params, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\nexport const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {\n const { libraryOptions, target } = params ?? {};\n const ctx = initializeContext({ ...(libraryOptions ?? {}), target, io, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\n",
|
|
142
142
|
"import * as regexes from \"./regexes.js\";\nimport { extractDefs, finalize, handleUnrepresentable, initializeContext, process, } from \"./to-json-schema.js\";\nimport { assignProp, getEnumValues } from \"./util.js\";\nconst formatMap = {\n guid: \"uuid\",\n url: \"uri\",\n datetime: \"date-time\",\n json_string: \"json-string\",\n regex: \"\", // do not set\n};\n// ==================== SIMPLE TYPE PROCESSORS ====================\nexport const stringProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n json.type = \"string\";\n const { minimum, maximum, format, patterns, contentEncoding, laxFormat } = schema._zod\n .bag;\n if (typeof minimum === \"number\")\n json.minLength = minimum;\n if (typeof maximum === \"number\")\n json.maxLength = maximum;\n // custom pattern overrides format\n if (format) {\n json.format = formatMap[format] ?? format;\n if (json.format === \"\")\n delete json.format; // empty format is not valid\n // `z.iso.time()` is never full-time, and `laxFormat` carries the datetime shapes that also accept what their keyword forbids\n if (format === \"time\" || laxFormat) {\n delete json.format;\n }\n }\n if (contentEncoding)\n json.contentEncoding = contentEncoding;\n if (patterns && patterns.size > 0) {\n const patternList = [...patterns];\n if (patternList.length === 1)\n json.pattern = patternList[0].source;\n else if (patternList.length > 1) {\n json.allOf = [\n ...patternList.map((regex) => ({\n ...(ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\"\n ? { type: \"string\" }\n : {}),\n pattern: regex.source,\n })),\n ];\n }\n }\n};\nexport const numberProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;\n if (typeof format === \"string\" && format.includes(\"int\"))\n json.type = \"integer\";\n else\n json.type = \"number\";\n // when both minimum and exclusiveMinimum exist, pick the more restrictive one\n const exMin = typeof exclusiveMinimum === \"number\" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);\n const exMax = typeof exclusiveMaximum === \"number\" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);\n const legacy = ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\";\n if (exMin) {\n if (legacy) {\n json.minimum = exclusiveMinimum;\n json.exclusiveMinimum = true;\n }\n else {\n json.exclusiveMinimum = exclusiveMinimum;\n }\n }\n else if (typeof minimum === \"number\") {\n json.minimum = minimum;\n }\n if (exMax) {\n if (legacy) {\n json.maximum = exclusiveMaximum;\n json.exclusiveMaximum = true;\n }\n else {\n json.exclusiveMaximum = exclusiveMaximum;\n }\n }\n else if (typeof maximum === \"number\") {\n json.maximum = maximum;\n }\n if (typeof multipleOf === \"number\") {\n // JSON Schema requires a divisor strictly greater than zero, and a non-finite one does not survive JSON at all. A negative divisor accepts exactly what its absolute value accepts, so it still maps; zero, NaN and Infinity have no keyword form.\n if (Number.isFinite(multipleOf) && multipleOf !== 0)\n json.multipleOf = Math.abs(multipleOf);\n else\n handleUnrepresentable(schema, ctx, json, params, `A multipleOf divisor of ${multipleOf} cannot be represented in JSON Schema`);\n }\n};\nexport const booleanProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const bigintProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"BigInt cannot be represented in JSON Schema\");\n};\nexport const symbolProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Symbols cannot be represented in JSON Schema\");\n};\nexport const nullProcessor = (_schema, ctx, json, _params) => {\n if (ctx.target === \"openapi-3.0\") {\n json.type = \"string\";\n json.nullable = true;\n json.enum = [null];\n }\n else {\n json.type = \"null\";\n }\n};\nexport const undefinedProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Undefined cannot be represented in JSON Schema\");\n};\nexport const voidProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Void cannot be represented in JSON Schema\");\n};\nexport const neverProcessor = (_schema, _ctx, json, _params) => {\n json.not = {};\n};\nexport const anyProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const unknownProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const dateProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Date cannot be represented in JSON Schema\");\n};\nexport const enumProcessor = (schema, _ctx, json, _params) => {\n const def = schema._zod.def;\n const values = getEnumValues(def.entries);\n // an empty enum accepts nothing, same as z.never()\n if (values.length === 0) {\n json.not = {};\n return;\n }\n // Number enums can have both string and number values\n if (values.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (values.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n json.enum = values;\n};\nexport const literalProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n // a literal with no values accepts nothing, same as z.never()\n if (def.values.length === 0) {\n json.not = {};\n return;\n }\n const vals = [];\n for (const val of def.values) {\n if (val === undefined) {\n // a custom schema replaces the whole literal, so there is nothing left to accumulate\n if (handleUnrepresentable(schema, ctx, json, params, \"Literal `undefined` cannot be represented in JSON Schema\"))\n return;\n // otherwise do not add to vals\n }\n else if (typeof val === \"bigint\") {\n if (handleUnrepresentable(schema, ctx, json, params, \"BigInt literals cannot be represented in JSON Schema\"))\n return;\n vals.push(Number(val));\n }\n else {\n vals.push(val);\n }\n }\n if (vals.length === 0) {\n // do nothing (an undefined literal was stripped)\n }\n else if (vals.length === 1) {\n const val = vals[0];\n json.type = val === null ? \"null\" : typeof val;\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.enum = [val];\n }\n else {\n json.const = val;\n }\n }\n else {\n if (vals.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (vals.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n if (vals.every((v) => typeof v === \"boolean\"))\n json.type = \"boolean\";\n if (vals.every((v) => v === null))\n json.type = \"null\";\n json.enum = vals;\n }\n};\nexport const nanProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"NaN cannot be represented in JSON Schema\");\n};\nexport const templateLiteralProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const pattern = schema._zod.pattern;\n if (!pattern)\n throw new Error(\"Pattern not found in template literal\");\n _json.type = \"string\";\n _json.pattern = pattern.source;\n};\nexport const fileProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const file = {\n type: \"string\",\n format: \"binary\",\n contentEncoding: \"binary\",\n };\n const { minimum, maximum, mime } = schema._zod.bag;\n if (minimum !== undefined)\n file.minLength = minimum;\n if (maximum !== undefined)\n file.maxLength = maximum;\n if (mime) {\n if (mime.length === 1) {\n file.contentMediaType = mime[0];\n Object.assign(_json, file);\n }\n else {\n Object.assign(_json, file); // shared props at root\n _json.anyOf = mime.map((m) => ({ contentMediaType: m })); // only contentMediaType differs\n }\n }\n else {\n Object.assign(_json, file);\n }\n};\nexport const successProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const customProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Custom types cannot be represented in JSON Schema\");\n};\nexport const functionProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Function types cannot be represented in JSON Schema\");\n};\nexport const transformProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Transforms cannot be represented in JSON Schema\");\n};\nexport const mapProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Map cannot be represented in JSON Schema\");\n};\nexport const setProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Set cannot be represented in JSON Schema\");\n};\n// ==================== COMPOSITE TYPE PROCESSORS ====================\nexport const arrayProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n json.type = \"array\";\n json.items = process(def.element, ctx, {\n ...params,\n path: [...params.path, \"items\"],\n });\n};\n// Transform and catch set `optin = \"optional\"` at runtime so the parser lets them observe an\n// absent key, but their declared input type stays required. An input JSON Schema describes the\n// declared type, so resolve past them to the schema that actually carries the optionality.\n// Used by both `objectProcessor` (for `required`) and `tupleProcessor` (for `minItems`); see\n// wiki/optionality.md, \"The JSON Schema emitter reads the *static* value\".\nfunction inputOptin(schema) {\n const def = schema._zod.def;\n if (def.type === \"pipe\" && def.in._zod.traits.has(\"$ZodTransform\")) {\n return inputOptin(def.out);\n }\n if (def.type === \"catch\") {\n return inputOptin(def.innerType);\n }\n return schema._zod.optin;\n}\nexport const objectProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n const shape = def.shape;\n // dropping it while still emitting `additionalProperties: false` would emit a schema that rejects data this one requires\n const symbolKeys = Object.getOwnPropertySymbols(shape);\n if (symbolKeys.length &&\n handleUnrepresentable(schema, ctx, json, params, \"Symbol keys cannot be represented in JSON Schema\")) {\n return;\n }\n json.type = \"object\";\n json.properties = {};\n for (const key in shape) {\n // assignProp so a __proto__ key becomes an own property instead of hitting the inherited setter on the plain {} we build into\n assignProp(json.properties, key, process(shape[key], ctx, {\n ...params,\n path: [...params.path, \"properties\", key],\n }));\n }\n // required keys\n const allKeys = new Set(Object.keys(shape));\n const requiredKeys = new Set([...allKeys].filter((key) => {\n const field = def.shape[key];\n if (ctx.io === \"input\") {\n return inputOptin(field) === undefined;\n }\n else {\n return field._zod.optout === undefined;\n }\n }));\n if (requiredKeys.size > 0) {\n json.required = Array.from(requiredKeys);\n }\n // catchall\n if (def.catchall?._zod.def.type === \"never\") {\n // strict\n json.additionalProperties = false;\n }\n else if (!def.catchall) {\n // regular\n if (ctx.io === \"output\")\n json.additionalProperties = false;\n }\n else if (def.catchall) {\n json.additionalProperties = process(def.catchall, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n};\nexport const unionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n // Exclusive unions (inclusive === false) use oneOf (exactly one match) instead of anyOf (one or more matches). This includes both z.xor() and discriminated unions\n const isExclusive = def.inclusive === false;\n const options = def.options.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, isExclusive ? \"oneOf\" : \"anyOf\", i],\n }));\n if (isExclusive) {\n json.oneOf = options;\n }\n else {\n json.anyOf = options;\n }\n};\nexport const intersectionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const a = process(def.left, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 0],\n });\n const b = process(def.right, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 1],\n });\n const isSimpleIntersection = (val) => \"allOf\" in val && Object.keys(val).length === 1;\n const allOf = [\n ...(isSimpleIntersection(a) ? a.allOf : [a]),\n ...(isSimpleIntersection(b) ? b.allOf : [b]),\n ];\n json.allOf = allOf;\n // Recorded innermost first, so a nested intersection has already folded by the time this one is considered. The array is the handle rather than the schema, because a wrapper that inherits this schema shares the same array; `finalize` folds every object holding it. See `foldIntersection`.\n ctx.intersections.push(allOf);\n};\nexport const tupleProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"array\";\n const prefixPath = ctx.target === \"draft-2020-12\" ? \"prefixItems\" : \"items\";\n const restPath = ctx.target === \"draft-2020-12\" ? \"items\" : ctx.target === \"openapi-3.0\" ? \"items\" : \"additionalItems\";\n const prefixItems = def.items.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, prefixPath, i],\n }));\n const rest = def.rest\n ? process(def.rest, ctx, {\n ...params,\n path: [...params.path, restPath, ...(ctx.target === \"openapi-3.0\" ? [def.items.length] : [])],\n })\n : null;\n let minItems = def.items.length;\n while (minItems > 0) {\n const item = def.items[minItems - 1];\n const optional = ctx.io === \"input\" ? inputOptin(item) !== undefined : item._zod.optout === \"optional\";\n if (!optional)\n break;\n minItems--;\n }\n const maxItems = def.items.length;\n const isClosed = !def.rest;\n if (ctx.target === \"draft-2020-12\") {\n json.prefixItems = prefixItems;\n if (isClosed) {\n json.items = false;\n }\n else if (rest) {\n json.items = rest;\n }\n if (minItems > 0)\n json.minItems = minItems;\n if (isClosed)\n json.maxItems = maxItems;\n }\n else if (ctx.target === \"openapi-3.0\") {\n json.items = {\n anyOf: prefixItems,\n };\n if (rest) {\n json.items.anyOf.push(rest);\n }\n if (minItems > 0)\n json.minItems = minItems;\n if (isClosed)\n json.maxItems = maxItems;\n }\n else {\n json.items = prefixItems;\n if (isClosed) {\n json.additionalItems = false;\n }\n else if (rest) {\n json.additionalItems = rest;\n }\n if (minItems > 0)\n json.minItems = minItems;\n if (isClosed)\n json.maxItems = maxItems;\n }\n // explicit user-defined length checks take precedence\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n};\n/** JSON object keys are always strings, so a numeric record key schema is re-expressed over the\n * numeric-string form the record parser matches. Deferred to `finalize`, after the flatten: a key\n * behind a wrapper only carries its own `type` before then, and a union key only has its branches.\n *\n * A numeric bound cannot apply to a property name, so `minimum` and its siblings are dropped rather\n * than carried over: keeping them beside `type: \"string\"` reproduces the match-nothing schema this\n * exists to fix. A key that carries one therefore emits wider than the record parses — `z.record(z.number().min(5), V)`\n * accepts `\"3\"` — which is the deliberate trade, since throwing on it would reject an ordinary schema\n * outright. */\nfunction stringifyKeyNames(bySchema, json, visited) {\n // an extracted key that rewrites cannot go on sharing its definition — the string form a key position needs is not the number form every other reference wants — so it inlines. One that does not rewrite keeps the `$ref`.\n if (json.$ref) {\n // a recursive key holds its own reference inside its definition, so a node already on the path is left alone rather than resolved again\n if (visited.has(json))\n return json;\n visited.add(json);\n const def = bySchema.get(json)?.def;\n if (!def)\n return json;\n const inlined = stringifyKeyNames(bySchema, def, visited);\n return inlined === def ? json : inlined;\n }\n for (const keyword of [\"anyOf\", \"oneOf\"]) {\n const branches = json[keyword];\n if (!Array.isArray(branches))\n continue;\n const mapped = branches.map((branch) => stringifyKeyNames(bySchema, branch, visited));\n // rebuilding regardless would detach a key that had nothing to re-express, dropping its `$ref` and leaking the internal `id`\n if (mapped.some((branch, i) => branch !== branches[i]))\n json = { ...json, [keyword]: mapped };\n }\n // a member that already admits a string leaves the key unconstrained, so the node's own type re-expresses only when every member is numeric\n const types = Array.isArray(json.type) ? json.type : [json.type];\n const numericType = !types.includes(\"string\") && types.some((t) => t === \"number\" || t === \"integer\");\n // a heterogeneous key carries no type at all, so its numeric members are caught here instead\n const values = json.enum ?? (json.const !== undefined ? [json.const] : undefined);\n if (!numericType && !values?.some((v) => typeof v === \"number\"))\n return json;\n const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id, ...rest } = json;\n if (rest.enum)\n rest.enum = rest.enum.map((v) => (typeof v === \"number\" ? String(v) : v));\n else if (typeof rest.const === \"number\")\n rest.const = String(rest.const);\n // a heterogeneous key keeps its absent type: the stringified members already say what a key may be\n if (!numericType)\n return rest;\n rest.type = \"string\";\n if (!values)\n rest.pattern = (types.includes(\"number\") ? regexes.number : regexes.integer).source;\n return rest;\n}\n/** Every record of one conversion, so the carriers are found in a single pass rather than once per record. */\nconst pendingRecords = new WeakMap();\nfunction rewriteKeyNames(ctx) {\n // an extracted key is resolved by the object `extractToDef` left in its place, so the map is built once rather than searched per reference. `_zod.toJSONSchema` can hand the same object to two schemas, so the first entry carrying a body wins, as a search would have found it.\n const bySchema = new Map();\n for (const entry of ctx.seen.values()) {\n if (entry.def && !bySchema.has(entry.schema))\n bySchema.set(entry.schema, entry);\n }\n const rewrites = new Map();\n for (const record of pendingRecords.get(ctx) ?? []) {\n const seen = ctx.seen.get(record);\n const names = (seen?.def ?? seen?.schema)?.propertyNames;\n if (!names || names === true || rewrites.has(names))\n continue;\n const rewritten = stringifyKeyNames(bySchema, names, new Set());\n if (rewritten !== names)\n rewrites.set(names, rewritten);\n }\n if (!rewrites.size)\n return;\n // the flatten has already copied each record's own properties onto every wrapper by reference, and an extracted body is another such copy, so every carrier holding a rewritten key is updated together\n for (const entry of ctx.seen.values()) {\n for (const carrier of [entry.schema, entry.def]) {\n const rewritten = carrier && rewrites.get(carrier.propertyNames);\n if (rewritten)\n carrier.propertyNames = rewritten;\n }\n }\n}\nexport const recordProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n // For looseRecord with regex patterns, use patternProperties. This correctly represents \"only validate keys matching the pattern\" semantics and composes well with allOf (intersections)\n const keyType = def.keyType;\n const keyBag = keyType._zod.bag;\n const patterns = keyBag?.patterns;\n if (def.mode === \"loose\" && patterns && patterns.size > 0) {\n // Use patternProperties for looseRecord with regex patterns\n const valueSchema = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"patternProperties\", \"*\"],\n });\n json.patternProperties = {};\n for (const pattern of patterns) {\n assignProp(json.patternProperties, pattern.source, valueSchema);\n }\n }\n else {\n // Default behavior: use propertyNames + additionalProperties\n if (ctx.target === \"draft-07\" || ctx.target === \"draft-2020-12\") {\n json.propertyNames = process(def.keyType, ctx, {\n ...params,\n path: [...params.path, \"propertyNames\"],\n });\n let pending = pendingRecords.get(ctx);\n if (!pending) {\n pending = [];\n pendingRecords.set(ctx, pending);\n ctx.deferred.push(() => rewriteKeyNames(ctx));\n }\n pending.push(schema);\n }\n json.additionalProperties = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n // Add required for keys with discrete values (enum, literal, etc.)\n const keyValues = keyType._zod.values;\n // Every key shares one value schema, so an optional-in value makes the whole key set omittable on input. Output keeps them: the exhaustive branch assigns every key, even one whose value came back undefined.\n const omittableOnInput = ctx.io === \"input\" && inputOptin(def.valueType) !== undefined;\n if (keyValues && !def.partial && !omittableOnInput) {\n const validKeyValues = [...keyValues].filter((v) => typeof v === \"string\" || typeof v === \"number\");\n if (validKeyValues.length > 0) {\n json.required = validKeyValues.map(String);\n }\n }\n};\nexport const nullableProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const inner = process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n if (ctx.target === \"openapi-3.0\") {\n seen.ref = def.innerType;\n json.nullable = true;\n }\n else {\n json.anyOf = [inner, { type: \"null\" }];\n }\n};\nexport const nonoptionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\n/** Round-trips a default value through JSON so the emitted schema is guaranteed to be valid JSON.\n * A BigInt has no reliable encoding, so it goes through `unrepresentable` like any other\n * unrepresentable value. Returns a sentinel when the caller must not write a default of its own. */\nconst UNREPRESENTABLE_DEFAULT = Symbol();\nfunction serializeDefaultValue(value, schema, ctx, json, params) {\n let unrepresentable = false;\n const serialized = JSON.stringify(value, (_, val) => {\n if (typeof val !== \"bigint\")\n return val;\n unrepresentable = true;\n return null;\n });\n if (!unrepresentable)\n return JSON.parse(serialized);\n handleUnrepresentable(schema, ctx, json, params, \"BigInt defaults cannot be represented in JSON Schema\");\n return UNREPRESENTABLE_DEFAULT;\n}\nexport const defaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n const value = serializeDefaultValue(def.defaultValue, schema, ctx, json, params);\n if (value !== UNREPRESENTABLE_DEFAULT)\n json.default = value;\n};\nexport const prefaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n if (ctx.io !== \"input\")\n return;\n const value = serializeDefaultValue(def.defaultValue, schema, ctx, json, params);\n if (value !== UNREPRESENTABLE_DEFAULT)\n json._prefault = value;\n};\nexport const catchProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n let catchValue;\n try {\n catchValue = def.catchValue(undefined);\n }\n catch {\n handleUnrepresentable(schema, ctx, json, params, \"Dynamic catch values are not supported in JSON Schema\");\n return;\n }\n json.default = catchValue;\n};\nexport const pipeProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n const inIsTransform = def.in._zod.traits.has(\"$ZodTransform\");\n const innerType = ctx.io === \"input\" ? (inIsTransform ? def.out : def.in) : def.out;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\nexport const readonlyProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.readOnly = true;\n};\nexport const promiseProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const optionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const lazyProcessor = (schema, ctx, _json, params) => {\n const innerType = schema._zod.innerType;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\n// ==================== ALL PROCESSORS ====================\nexport const allProcessors = {\n string: stringProcessor,\n number: numberProcessor,\n boolean: booleanProcessor,\n bigint: bigintProcessor,\n symbol: symbolProcessor,\n null: nullProcessor,\n undefined: undefinedProcessor,\n void: voidProcessor,\n never: neverProcessor,\n any: anyProcessor,\n unknown: unknownProcessor,\n date: dateProcessor,\n enum: enumProcessor,\n literal: literalProcessor,\n nan: nanProcessor,\n template_literal: templateLiteralProcessor,\n file: fileProcessor,\n success: successProcessor,\n custom: customProcessor,\n function: functionProcessor,\n transform: transformProcessor,\n map: mapProcessor,\n set: setProcessor,\n array: arrayProcessor,\n object: objectProcessor,\n union: unionProcessor,\n intersection: intersectionProcessor,\n tuple: tupleProcessor,\n record: recordProcessor,\n nullable: nullableProcessor,\n nonoptional: nonoptionalProcessor,\n default: defaultProcessor,\n prefault: prefaultProcessor,\n catch: catchProcessor,\n pipe: pipeProcessor,\n readonly: readonlyProcessor,\n promise: promiseProcessor,\n optional: optionalProcessor,\n lazy: lazyProcessor,\n};\nexport function toJSONSchema(input, params) {\n if (\"_idmap\" in input) {\n // Registry case\n const registry = input;\n const ctx = initializeContext({ ...params, processors: allProcessors });\n const defs = {};\n // First pass: process all schemas to build the seen map\n for (const entry of registry._idmap.entries()) {\n const [_, schema] = entry;\n process(schema, ctx);\n }\n const schemas = {};\n const external = {\n registry,\n uri: params?.uri,\n defs,\n };\n // Update the context with external configuration\n ctx.external = external;\n // Second pass: emit each schema\n for (const entry of registry._idmap.entries()) {\n const [key, schema] = entry;\n extractDefs(ctx, schema);\n assignProp(schemas, key, finalize(ctx, schema));\n }\n if (Object.keys(defs).length > 0) {\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n schemas.__shared = {\n [defsSegment]: defs,\n };\n }\n return { schemas };\n }\n // Single schema case\n const ctx = initializeContext({ ...params, processors: allProcessors });\n process(input, ctx);\n extractDefs(ctx, input);\n return finalize(ctx, input);\n}\n",
|
|
143
143
|
"import { BetaRunnableTool, Promisable } from '../../lib/tools/BetaRunnableTool';\nimport { BetaMemoryTool20250818Command, BetaToolResultContentBlockParam } from '../../resources/beta';\n\ntype Command = BetaMemoryTool20250818Command['command'];\n\nexport type MemoryToolHandlers = {\n [K in Command]: (\n command: Extract<BetaMemoryTool20250818Command, { command: K }>,\n ) => Promisable<string | Array<BetaToolResultContentBlockParam>>;\n};\n\nexport function betaMemoryTool(\n handlers: MemoryToolHandlers,\n): BetaRunnableTool<BetaMemoryTool20250818Command> {\n return {\n type: 'memory_20250818',\n name: 'memory',\n parse: (content) => content as BetaMemoryTool20250818Command,\n run: (args) => {\n const handler = handlers[args.command];\n if (!handler) {\n throw new Error(`${args.command} not implemented`);\n }\n\n return handler.bind(handlers)(args as any);\n },\n };\n}\n",
|
|
144
|
-
"/**\n * Helper functions for integrating MCP (Model Context Protocol) SDK types\n * with the PukuAI SDK.\n *\n * These helpers reduce boilerplate when converting between MCP types and\n * PukuAI API types. The interfaces defined here use TypeScript's structural\n * typing to match MCP SDK types without requiring a direct dependency.\n */\n\nimport { BetaRunnableTool } from '../../lib/tools/BetaRunnableTool';\nimport { ToolError } from '../../lib/tools/ToolError';\nimport {\n BetaTool,\n BetaToolResultContentBlockParam,\n BetaMessageParam,\n BetaTextBlockParam,\n BetaImageBlockParam,\n BetaRequestDocumentBlock,\n BetaPlainTextSource,\n} from '../../resources/beta';\nimport {\n SDK_HELPER_SYMBOL,\n collectStainlessHelpers,\n stainlessHelperHeader,\n} from '../../internal/stainless-helper-header';\nimport { fromBase64 } from '../../internal/utils/base64';\n\nexport { SDK_HELPER_SYMBOL, collectStainlessHelpers, stainlessHelperHeader };\n\n// -----------------------------------------------------------------------------\n// Minimal MCP interfaces (duck-typed to match MCP SDK without dependency)\n// -----------------------------------------------------------------------------\n\n/**\n * Represents an MCP tool definition.\n * Matches the shape returned by `mcpClient.listTools()`.\n */\nexport interface MCPToolLike {\n name: string;\n description?: string | undefined;\n inputSchema: {\n type: 'object';\n properties?: Record<string, unknown> | null | undefined;\n required?: string[] | readonly string[] | null | undefined;\n [key: string]: unknown;\n };\n}\n\n/**\n * Represents the result of calling an MCP tool.\n * Matches the shape returned by `mcpClient.callTool()`.\n */\nexport interface MCPCallToolResultLike {\n content: MCPToolResultContentLike[];\n structuredContent?: object | undefined;\n isError?: boolean | undefined;\n}\n\nexport type MCPToolResultContentLike =\n | MCPTextContentLike\n | MCPImageContentLike\n | MCPAudioContentLike\n | MCPEmbeddedResourceLike\n | MCPResourceLinkLike;\n\nexport interface MCPTextContentLike {\n type: 'text';\n text: string;\n}\n\nexport interface MCPImageContentLike {\n type: 'image';\n data: string;\n mimeType: string;\n}\n\nexport interface MCPAudioContentLike {\n type: 'audio';\n data: string;\n mimeType: string;\n}\n\nexport interface MCPEmbeddedResourceLike {\n type: 'resource';\n resource: MCPResourceContentsLike;\n}\n\nexport interface MCPResourceLinkLike {\n type: 'resource_link';\n uri: string;\n name: string;\n mimeType?: string | undefined;\n}\n\n/**\n * Text resource contents from MCP.\n */\nexport interface MCPTextResourceContentsLike {\n uri: string;\n mimeType?: string | undefined;\n text: string;\n}\n\n/**\n * Blob (binary) resource contents from MCP.\n */\nexport interface MCPBlobResourceContentsLike {\n uri: string;\n mimeType?: string | undefined;\n blob: string;\n}\n\n/**\n * Resource contents - either text or blob.\n * Matches `TextResourceContents | BlobResourceContents` from MCP SDK.\n */\nexport type MCPResourceContentsLike = MCPTextResourceContentsLike | MCPBlobResourceContentsLike;\n\n/**\n * Interface for an MCP client that can call tools.\n * Matches the relevant methods of `Client` from `@modelcontextprotocol/sdk`.\n */\nexport interface MCPClientLike {\n callTool(params: { name: string; arguments?: Record<string, unknown> }): Promise<MCPCallToolResultLike>;\n}\n\n/**\n * Represents a message from an MCP prompt.\n * Matches the shape returned by `mcpClient.getPrompt()`.\n */\nexport interface MCPPromptMessageLike {\n role: 'user' | 'assistant';\n content: MCPPromptContentLike;\n}\n\nexport type MCPPromptContentLike =\n | MCPTextContentLike\n | MCPImageContentLike\n | MCPAudioContentLike\n | MCPEmbeddedResourceLike\n | MCPResourceLinkLike;\n\n/**\n * Represents the contents of an MCP resource.\n * Matches the shape returned by `mcpClient.readResource()`.\n */\nexport interface MCPReadResourceResultLike {\n contents: MCPResourceContentsLike[];\n}\n\n// -----------------------------------------------------------------------------\n// Supported MIME types\n// -----------------------------------------------------------------------------\n\nconst SUPPORTED_IMAGE_TYPES = ['image/jpeg', 'image/png', 'image/gif', 'image/webp'] as const;\ntype SupportedImageType = (typeof SUPPORTED_IMAGE_TYPES)[number];\n\nfunction isSupportedImageType(mimeType: string): mimeType is SupportedImageType {\n return SUPPORTED_IMAGE_TYPES.includes(mimeType as SupportedImageType);\n}\n\nfunction isSupportedResourceMimeType(mimeType: string | undefined): boolean {\n return (\n !mimeType ||\n mimeType.startsWith('text/') ||\n mimeType === 'application/pdf' ||\n isSupportedImageType(mimeType)\n );\n}\n\n// -----------------------------------------------------------------------------\n// Error classes\n// -----------------------------------------------------------------------------\n\n/**\n * Error thrown when an MCP value cannot be converted to a format supported by the Puku API.\n */\nexport class UnsupportedMCPValueError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'UnsupportedMCPValueError';\n }\n}\n\n// -----------------------------------------------------------------------------\n// Helper functions\n// -----------------------------------------------------------------------------\n\n/**\n * Converts an MCP tool to a BetaRunnableTool for use with the PukuAI SDK's\n * `toolRunner()` method.\n *\n * @param tool The MCP tool definition from `mcpClient.listTools()`\n * @param mcpClient The MCP client instance used to call the tool\n * @param extraProps Additional Puku API properties to include in the tool definition\n * @returns A runnable tool for use with `puku.beta.messages.toolRunner()`\n * @throws {UnsupportedMCPValueError} When the tool returns unsupported content types\n * @throws {UnsupportedMCPValueError} When the tool returns unsupported resource links\n * @throws {UnsupportedMCPValueError} When the tool returns resources with unsupported MIME types\n *\n * @example\n * ```ts\n * import { Client } from \"@modelcontextprotocol/sdk/client/index.js\";\n * import PukuAI from \"@puku-ai/sdk\";\n * import { mcpTool } from \"@puku-ai/sdk/helpers/beta/mcp\";\n *\n * const mcpClient = new Client({ name: \"example\", version: \"1.0.0\" });\n * const puku = new PukuAI();\n *\n * const tools = await mcpClient.listTools();\n * const runner = await puku.beta.messages.toolRunner({\n * model: \"puku-sonnet-4-20250514\",\n * max_tokens: 1024,\n * tools: tools.tools.map(tool => mcpTool(tool, mcpClient)),\n * messages: [{ role: \"user\", content: \"Use the available tools\" }],\n * });\n * ```\n */\nexport function mcpTool(\n tool: MCPToolLike,\n mcpClient: MCPClientLike,\n extraProps?: Partial<Omit<BetaTool, 'name' | 'description' | 'input_schema'>>,\n): BetaRunnableTool<Record<string, unknown>> {\n // Transform inputSchema to match BetaTool.InputSchema (convert undefined to null)\n const inputSchema: BetaTool['input_schema'] = {\n ...tool.inputSchema,\n type: 'object',\n properties: tool.inputSchema.properties ?? null,\n required: tool.inputSchema.required ?? null,\n };\n\n const betaTool: BetaTool = {\n name: tool.name,\n input_schema: inputSchema,\n ...(tool.description !== undefined ? { description: tool.description } : {}),\n ...extraProps,\n };\n\n const runnableTool = {\n ...betaTool,\n run: async (input: Record<string, unknown>): Promise<string | Array<BetaToolResultContentBlockParam>> => {\n const result = await mcpClient.callTool({\n name: tool.name,\n arguments: input,\n });\n\n if (result.isError) {\n const content = result.content.map((item) => mcpContent(item));\n throw new ToolError(content);\n }\n\n // If content is empty but structuredContent is present, JSON encode it\n // Spec: \"For backwards compatibility, a tool that returns structured content SHOULD also return the serialized JSON in a TextContent block.\"\n // meaning it's not required and cannot be assumed.\n if (\n result.content.length === 0 &&\n // Spec: \"Structured content is returned as a JSON object in the structuredContent field of a result.\"\n typeof result.structuredContent === 'object' &&\n result.structuredContent !== null\n ) {\n return JSON.stringify(result.structuredContent);\n }\n\n return result.content.map((item) => mcpContent(item));\n },\n parse: (content: unknown): Record<string, unknown> => content as Record<string, unknown>,\n [SDK_HELPER_SYMBOL]: 'mcpTool',\n };\n\n return runnableTool;\n}\n\n/**\n * Converts an array of MCP tools to BetaRunnableTools.\n *\n * @param tools Array of MCP tool definitions from `mcpClient.listTools()`\n * @param mcpClient The MCP client instance used to call the tools\n * @param extraProps Additional Puku API properties to include in each tool definition\n * @returns An array of runnable tools for use with `puku.beta.messages.toolRunner()`\n *\n * @example\n * ```ts\n * const { tools } = await mcpClient.listTools();\n * const runner = await puku.beta.messages.toolRunner({\n * model: \"puku-sonnet-4-20250514\",\n * max_tokens: 1024,\n * tools: mcpTools(tools, mcpClient),\n * messages: [{ role: \"user\", content: \"Use the available tools\" }],\n * });\n * ```\n */\nexport function mcpTools(\n tools: MCPToolLike[],\n mcpClient: MCPClientLike,\n extraProps?: Partial<Omit<BetaTool, 'name' | 'description' | 'input_schema'>>,\n): BetaRunnableTool<Record<string, unknown>>[] {\n return tools.map((tool) => mcpTool(tool, mcpClient, extraProps));\n}\n\n/**\n * Converts an MCP prompt message to an PukuAI BetaMessageParam.\n *\n * @param mcpMessage The MCP prompt message from `mcpClient.getPrompt()`\n * @param extraProps Additional Puku API properties to include in content blocks (e.g., `cache_control`)\n * @returns A message parameter for use with `puku.beta.messages.create()`\n * @throws {UnsupportedMCPValueError} When the message contains unsupported content types\n * @throws {UnsupportedMCPValueError} When the message contains unsupported resource links\n * @throws {UnsupportedMCPValueError} When the message contains resources with unsupported MIME types\n *\n * @example\n * ```ts\n * import { Client } from \"@modelcontextprotocol/sdk/client/index.js\";\n * import PukuAI from \"@puku-ai/sdk\";\n * import { mcpMessage } from \"@puku-ai/sdk/helpers/beta/mcp\";\n *\n * const mcpClient = new Client({ name: \"example\", version: \"1.0.0\" });\n * const puku = new PukuAI();\n *\n * const prompt = await mcpClient.getPrompt({\n * name: \"example-prompt\",\n * arguments: { arg1: \"value\" },\n * });\n *\n * await puku.beta.messages.create({\n * model: \"puku-sonnet-4-20250514\",\n * max_tokens: 1024,\n * messages: prompt.messages.map(msg => mcpMessage(msg)),\n * });\n * ```\n */\nexport function mcpMessage(\n mcpMessage: MCPPromptMessageLike,\n extraProps?: Partial<\n Omit<BetaTextBlockParam, 'type' | 'text' | 'source'> &\n Omit<BetaImageBlockParam, 'type' | 'source'> &\n Omit<BetaRequestDocumentBlock, 'type' | 'source'>\n >,\n): BetaMessageParam {\n const message = {\n role: mcpMessage.role,\n content: [mcpContent(mcpMessage.content, extraProps)],\n [SDK_HELPER_SYMBOL]: 'mcpMessage',\n };\n return message;\n}\n\n/**\n * Converts an array of MCP prompt messages to PukuAI BetaMessageParams.\n *\n * @param messages Array of MCP prompt messages from `mcpClient.getPrompt()`\n * @param extraProps Additional Puku API properties to include in content blocks (e.g., `cache_control`)\n * @returns An array of message parameters for use with `puku.beta.messages.create()`\n * @throws {UnsupportedMCPValueError} When any message contains unsupported content types\n * @throws {UnsupportedMCPValueError} When any message contains unsupported resource links\n * @throws {UnsupportedMCPValueError} When any message contains resources with unsupported MIME types\n *\n * @example\n * ```ts\n * const { messages } = await mcpClient.getPrompt({ name: \"example-prompt\" });\n * await puku.beta.messages.create({\n * model: \"puku-sonnet-4-20250514\",\n * max_tokens: 1024,\n * messages: mcpMessages(messages),\n * });\n * ```\n */\nexport function mcpMessages(\n messages: MCPPromptMessageLike[],\n extraProps?: Partial<\n Omit<BetaTextBlockParam, 'type' | 'text' | 'source'> &\n Omit<BetaImageBlockParam, 'type' | 'source'> &\n Omit<BetaRequestDocumentBlock, 'type' | 'source'>\n >,\n): BetaMessageParam[] {\n return messages.map((message) => mcpMessage(message, extraProps));\n}\n\n/**\n * Converts a single MCP prompt content item to an PukuAI content block.\n *\n * @param content The MCP content item (text, image, or embedded resource)\n * @param extraProps Additional Puku API properties to include in the content block (e.g., `cache_control`)\n * @returns A Puku content block for use in a message's content array\n * @throws {UnsupportedMCPValueError} When the content type is not supported (e.g., 'audio')\n * @throws {UnsupportedMCPValueError} When resource links use non-http/https protocols\n * @throws {UnsupportedMCPValueError} When resources have unsupported MIME types\n *\n * @example\n * ```ts\n * const { messages } = await mcpClient.getPrompt({ name: \"my-prompt\" });\n * // If you need to mix MCP content with other content:\n * await puku.beta.messages.create({\n * model: \"puku-sonnet-4-20250514\",\n * max_tokens: 1024,\n * messages: [{\n * role: \"user\",\n * content: [\n * mcpContent(messages[0].content),\n * { type: \"text\", text: \"Additional context\" },\n * ],\n * }],\n * });\n * ```\n */\nexport function mcpContent(\n content: MCPPromptContentLike,\n extraProps?: Partial<\n Omit<BetaTextBlockParam, 'type' | 'text' | 'source'> &\n Omit<BetaImageBlockParam, 'type' | 'source'> &\n Omit<BetaRequestDocumentBlock, 'type' | 'source'>\n >,\n): BetaTextBlockParam | BetaImageBlockParam | BetaRequestDocumentBlock {\n switch (content.type) {\n case 'text': {\n const textBlock = {\n type: 'text' as const,\n text: content.text,\n ...extraProps,\n [SDK_HELPER_SYMBOL]: 'mcpContent',\n };\n return textBlock;\n }\n\n case 'image': {\n if (!isSupportedImageType(content.mimeType)) {\n throw new UnsupportedMCPValueError(`Unsupported image MIME type: ${content.mimeType}`);\n }\n const imageBlock = {\n type: 'image' as const,\n source: {\n type: 'base64' as const,\n data: content.data,\n media_type: content.mimeType,\n },\n ...extraProps,\n [SDK_HELPER_SYMBOL]: 'mcpContent',\n };\n return imageBlock;\n }\n\n case 'resource':\n return mcpResourceContentToContentBlock(content.resource, extraProps, 'mcpContent');\n\n case 'resource_link':\n case 'audio':\n throw new UnsupportedMCPValueError(`Unsupported MCP content type: ${content.type}`);\n\n default:\n // This should never happen as we handle all MCPPromptContentLike types\n content satisfies never;\n throw new UnsupportedMCPValueError(\n `Unsupported MCP content type: ${(content as { type: string }).type}`,\n );\n }\n}\n\n/**\n * Converts a single MCP resource contents item to an PukuAI content block.\n */\nfunction mcpResourceContentToContentBlock(\n resourceContent: MCPResourceContentsLike,\n extraProps?: Partial<Omit<BetaRequestDocumentBlock, 'type' | 'source'>>,\n helperName: string = 'mcpResourceToContent',\n): BetaTextBlockParam | BetaImageBlockParam | BetaRequestDocumentBlock {\n const mimeType = resourceContent.mimeType;\n\n // Handle images (requires blob - base64-encoded binary data)\n if (mimeType && isSupportedImageType(mimeType)) {\n if (!('blob' in resourceContent)) {\n throw new UnsupportedMCPValueError(\n `Image resource must have blob data, not text. URI: ${resourceContent.uri}`,\n );\n }\n const imageBlock = {\n type: 'image' as const,\n source: {\n type: 'base64' as const,\n data: resourceContent.blob,\n media_type: mimeType,\n },\n ...extraProps,\n [SDK_HELPER_SYMBOL]: helperName,\n };\n return imageBlock;\n }\n\n // Handle PDFs (requires blob - base64-encoded binary data)\n if (mimeType === 'application/pdf') {\n if (!('blob' in resourceContent)) {\n throw new UnsupportedMCPValueError(\n `PDF resource must have blob data, not text. URI: ${resourceContent.uri}`,\n );\n }\n const pdfBlock = {\n type: 'document' as const,\n source: {\n type: 'base64' as const,\n data: resourceContent.blob,\n media_type: 'application/pdf' as const,\n },\n ...extraProps,\n [SDK_HELPER_SYMBOL]: helperName,\n };\n return pdfBlock;\n }\n\n // Handle text types (text/*, or no MIME type defaults to text)\n if (!mimeType || mimeType.startsWith('text/')) {\n const textDocBlock = {\n type: 'document' as const,\n source: textSourceFromResource(resourceContent),\n ...extraProps,\n [SDK_HELPER_SYMBOL]: helperName,\n };\n return textDocBlock;\n }\n\n throw new UnsupportedMCPValueError(\n `Unsupported MIME type \"${mimeType}\" for resource: ${resourceContent.uri}`,\n );\n}\n\n/**\n * Converts MCP resource contents to an PukuAI content block.\n *\n * This helper is useful when you have resource contents from `mcpClient.readResource()`\n * and want to include them in a message or as a document source. It automatically\n * finds the first resource with a supported MIME type.\n *\n * @param result The result from `mcpClient.readResource()`\n * @param extraProps Additional Puku API properties to include in the content block (e.g., `cache_control`)\n * @returns A Puku content block\n * @throws {UnsupportedMCPValueError} When contents array is empty or none have a supported MIME type\n *\n * @example\n * ```ts\n * import { Client } from \"@modelcontextprotocol/sdk/client/index.js\";\n * import PukuAI from \"@puku-ai/sdk\";\n * import { mcpResourceToContent } from \"@puku-ai/sdk/helpers/beta/mcp\";\n *\n * const mcpClient = new Client({ name: \"example\", version: \"1.0.0\" });\n * const puku = new PukuAI();\n *\n * const resource = await mcpClient.readResource({ uri: \"file:///example.txt\" });\n * await puku.beta.messages.create({\n * model: \"puku-sonnet-4-20250514\",\n * max_tokens: 1024,\n * messages: [{\n * role: \"user\",\n * content: [mcpResourceToContent(resource)],\n * }],\n * });\n * ```\n */\nexport function mcpResourceToContent(\n result: MCPReadResourceResultLike,\n extraProps?: Partial<Omit<BetaRequestDocumentBlock, 'type' | 'source'>>,\n): BetaTextBlockParam | BetaImageBlockParam | BetaRequestDocumentBlock {\n if (result.contents.length === 0) {\n throw new UnsupportedMCPValueError('Resource contents array must contain at least one item');\n }\n const supported = result.contents.find((c) => isSupportedResourceMimeType(c.mimeType));\n if (!supported) {\n const mimeTypes = result.contents.map((c) => c.mimeType).filter((m) => m !== undefined);\n throw new UnsupportedMCPValueError(\n `No supported MIME type found in resource contents. Available: ${mimeTypes.join(', ')}`,\n );\n }\n return mcpResourceContentToContentBlock(supported, extraProps);\n}\n\n/**\n * Gets the raw bytes from an MCP resource.\n */\nfunction bytesFromResource(resource: MCPResourceContentsLike): Uint8Array {\n if ('blob' in resource) {\n return fromBase64(resource.blob);\n }\n return new TextEncoder().encode(resource.text);\n}\n\n/**\n * Creates a text document source from an MCP resource, decoding base64 blob to UTF-8 if needed.\n */\nfunction textSourceFromResource(resource: MCPResourceContentsLike): BetaPlainTextSource {\n const data = 'text' in resource ? resource.text : new TextDecoder().decode(fromBase64(resource.blob));\n return { type: 'text', data, media_type: 'text/plain' };\n}\n\n/**\n * Converts an MCP resource to a File object suitable for uploading via `puku.beta.files.upload()`.\n *\n * @param result The result from `mcpClient.readResource()`\n * @returns A File object for use with `puku.beta.files.upload()`\n * @throws {UnsupportedMCPValueError} When contents array is empty\n *\n * @example\n * ```ts\n * import { Client } from \"@modelcontextprotocol/sdk/client/index.js\";\n * import PukuAI from \"@puku-ai/sdk\";\n * import { mcpResourceToFile } from \"@puku-ai/sdk/helpers/beta/mcp\";\n *\n * const mcpClient = new Client({ name: \"example\", version: \"1.0.0\" });\n * const puku = new PukuAI();\n *\n * const resource = await mcpClient.readResource({ uri: \"file:///document.pdf\" });\n *\n * const uploaded = await puku.beta.files.upload({\n * file: mcpResourceToFile(resource),\n * });\n * ```\n */\nexport function mcpResourceToFile(result: MCPReadResourceResultLike): File {\n if (result.contents.length === 0) {\n throw new UnsupportedMCPValueError('Resource contents array must contain at least one item');\n }\n const resourceContents = result.contents[0]!;\n const name = new URL(resourceContents.uri).pathname.split('/').at(-1) || 'file';\n const type = resourceContents.mimeType;\n const data = bytesFromResource(resourceContents);\n const file = new File([data as BlobPart], name, type ? { type } : undefined);\n (file as any)[SDK_HELPER_SYMBOL] = 'mcpResourceToFile';\n return file;\n}\n"
|
|
144
|
+
"/**\n * Helper functions for integrating MCP (Model Context Protocol) SDK types\n * with the PukuAI SDK.\n *\n * These helpers reduce boilerplate when converting between MCP types and\n * PukuAI API types. The interfaces defined here use TypeScript's structural\n * typing to match MCP SDK types without requiring a direct dependency.\n */\n\nimport { BetaRunnableTool } from '../../lib/tools/BetaRunnableTool';\nimport { ToolError } from '../../lib/tools/ToolError';\nimport {\n BetaTool,\n BetaToolResultContentBlockParam,\n BetaMessageParam,\n BetaTextBlockParam,\n BetaImageBlockParam,\n BetaRequestDocumentBlock,\n BetaPlainTextSource,\n} from '../../resources/beta';\nimport {\n SDK_HELPER_SYMBOL,\n collectStainlessHelpers,\n stainlessHelperHeader,\n} from '../../internal/stainless-helper-header';\nimport { fromBase64 } from '../../internal/utils/base64';\n\nexport { SDK_HELPER_SYMBOL, collectStainlessHelpers, stainlessHelperHeader };\n\n// -----------------------------------------------------------------------------\n// Minimal MCP interfaces (duck-typed to match MCP SDK without dependency)\n// -----------------------------------------------------------------------------\n\n/**\n * Represents an MCP tool definition.\n * Matches the shape returned by `mcpClient.listTools()`.\n */\nexport interface MCPToolLike {\n name: string;\n description?: string | undefined;\n inputSchema: {\n type: 'object';\n properties?: Record<string, unknown> | null | undefined;\n required?: string[] | readonly string[] | null | undefined;\n [key: string]: unknown;\n };\n}\n\n/**\n * Represents the result of calling an MCP tool.\n * Matches the shape returned by `mcpClient.callTool()`.\n */\nexport interface MCPCallToolResultLike {\n content: MCPToolResultContentLike[];\n structuredContent?: object | undefined;\n isError?: boolean | undefined;\n}\n\nexport type MCPToolResultContentLike =\n | MCPTextContentLike\n | MCPImageContentLike\n | MCPAudioContentLike\n | MCPEmbeddedResourceLike\n | MCPResourceLinkLike;\n\nexport interface MCPTextContentLike {\n type: 'text';\n text: string;\n}\n\nexport interface MCPImageContentLike {\n type: 'image';\n data: string;\n mimeType: string;\n}\n\nexport interface MCPAudioContentLike {\n type: 'audio';\n data: string;\n mimeType: string;\n}\n\nexport interface MCPEmbeddedResourceLike {\n type: 'resource';\n resource: MCPResourceContentsLike;\n}\n\nexport interface MCPResourceLinkLike {\n type: 'resource_link';\n uri: string;\n name: string;\n mimeType?: string | undefined;\n}\n\n/**\n * Text resource contents from MCP.\n */\nexport interface MCPTextResourceContentsLike {\n uri: string;\n mimeType?: string | undefined;\n text: string;\n}\n\n/**\n * Blob (binary) resource contents from MCP.\n */\nexport interface MCPBlobResourceContentsLike {\n uri: string;\n mimeType?: string | undefined;\n blob: string;\n}\n\n/**\n * Resource contents - either text or blob.\n * Matches `TextResourceContents | BlobResourceContents` from MCP SDK.\n */\nexport type MCPResourceContentsLike = MCPTextResourceContentsLike | MCPBlobResourceContentsLike;\n\n/**\n * Interface for an MCP client that can call tools.\n * Matches the relevant methods of `Client` from `@modelcontextprotocol/sdk`.\n */\nexport interface MCPClientLike {\n callTool(params: { name: string; arguments?: Record<string, unknown> }): Promise<MCPCallToolResultLike>;\n}\n\n/**\n * Represents a message from an MCP prompt.\n * Matches the shape returned by `mcpClient.getPrompt()`.\n */\nexport interface MCPPromptMessageLike {\n role: 'user' | 'assistant';\n content: MCPPromptContentLike;\n}\n\nexport type MCPPromptContentLike =\n | MCPTextContentLike\n | MCPImageContentLike\n | MCPAudioContentLike\n | MCPEmbeddedResourceLike\n | MCPResourceLinkLike;\n\n/**\n * Represents the contents of an MCP resource.\n * Matches the shape returned by `mcpClient.readResource()`.\n */\nexport interface MCPReadResourceResultLike {\n contents: MCPResourceContentsLike[];\n}\n\n// -----------------------------------------------------------------------------\n// Supported MIME types\n// -----------------------------------------------------------------------------\n\nconst SUPPORTED_IMAGE_TYPES = ['image/jpeg', 'image/png', 'image/gif', 'image/webp'] as const;\ntype SupportedImageType = (typeof SUPPORTED_IMAGE_TYPES)[number];\n\nfunction isSupportedImageType(mimeType: string): mimeType is SupportedImageType {\n return SUPPORTED_IMAGE_TYPES.includes(mimeType as SupportedImageType);\n}\n\nfunction isSupportedResourceMimeType(mimeType: string | undefined): boolean {\n return (\n !mimeType ||\n mimeType.startsWith('text/') ||\n mimeType === 'application/pdf' ||\n isSupportedImageType(mimeType)\n );\n}\n\n// -----------------------------------------------------------------------------\n// Error classes\n// -----------------------------------------------------------------------------\n\n/**\n * Error thrown when an MCP value cannot be converted to a format supported by the Puku API.\n */\nexport class UnsupportedMCPValueError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'UnsupportedMCPValueError';\n }\n}\n\n// -----------------------------------------------------------------------------\n// Helper functions\n// -----------------------------------------------------------------------------\n\n/**\n * Converts an MCP tool to a BetaRunnableTool for use with the PukuAI SDK's\n * `toolRunner()` method.\n *\n * @param tool The MCP tool definition from `mcpClient.listTools()`\n * @param mcpClient The MCP client instance used to call the tool\n * @param extraProps Additional Puku API properties to include in the tool definition\n * @returns A runnable tool for use with `puku.beta.messages.toolRunner()`\n * @throws {UnsupportedMCPValueError} When the tool returns unsupported content types\n * @throws {UnsupportedMCPValueError} When the tool returns unsupported resource links\n * @throws {UnsupportedMCPValueError} When the tool returns resources with unsupported MIME types\n *\n * @example\n * ```ts\n * import { Client } from \"@modelcontextprotocol/sdk/client/index.js\";\n * import PukuAI from \"@puku-ai/sdk\";\n * import { mcpTool } from \"@puku-ai/sdk/helpers/beta/mcp\";\n *\n * const mcpClient = new Client({ name: \"example\", version: \"1.0.0\" });\n * const puku = new PukuAI();\n *\n * const tools = await mcpClient.listTools();\n * const runner = await puku.beta.messages.toolRunner({\n * model: \"puku-ai-2.8\",\n * max_tokens: 1024,\n * tools: tools.tools.map(tool => mcpTool(tool, mcpClient)),\n * messages: [{ role: \"user\", content: \"Use the available tools\" }],\n * });\n * ```\n */\nexport function mcpTool(\n tool: MCPToolLike,\n mcpClient: MCPClientLike,\n extraProps?: Partial<Omit<BetaTool, 'name' | 'description' | 'input_schema'>>,\n): BetaRunnableTool<Record<string, unknown>> {\n // Transform inputSchema to match BetaTool.InputSchema (convert undefined to null)\n const inputSchema: BetaTool['input_schema'] = {\n ...tool.inputSchema,\n type: 'object',\n properties: tool.inputSchema.properties ?? null,\n required: tool.inputSchema.required ?? null,\n };\n\n const betaTool: BetaTool = {\n name: tool.name,\n input_schema: inputSchema,\n ...(tool.description !== undefined ? { description: tool.description } : {}),\n ...extraProps,\n };\n\n const runnableTool = {\n ...betaTool,\n run: async (input: Record<string, unknown>): Promise<string | Array<BetaToolResultContentBlockParam>> => {\n const result = await mcpClient.callTool({\n name: tool.name,\n arguments: input,\n });\n\n if (result.isError) {\n const content = result.content.map((item) => mcpContent(item));\n throw new ToolError(content);\n }\n\n // If content is empty but structuredContent is present, JSON encode it\n // Spec: \"For backwards compatibility, a tool that returns structured content SHOULD also return the serialized JSON in a TextContent block.\"\n // meaning it's not required and cannot be assumed.\n if (\n result.content.length === 0 &&\n // Spec: \"Structured content is returned as a JSON object in the structuredContent field of a result.\"\n typeof result.structuredContent === 'object' &&\n result.structuredContent !== null\n ) {\n return JSON.stringify(result.structuredContent);\n }\n\n return result.content.map((item) => mcpContent(item));\n },\n parse: (content: unknown): Record<string, unknown> => content as Record<string, unknown>,\n [SDK_HELPER_SYMBOL]: 'mcpTool',\n };\n\n return runnableTool;\n}\n\n/**\n * Converts an array of MCP tools to BetaRunnableTools.\n *\n * @param tools Array of MCP tool definitions from `mcpClient.listTools()`\n * @param mcpClient The MCP client instance used to call the tools\n * @param extraProps Additional Puku API properties to include in each tool definition\n * @returns An array of runnable tools for use with `puku.beta.messages.toolRunner()`\n *\n * @example\n * ```ts\n * const { tools } = await mcpClient.listTools();\n * const runner = await puku.beta.messages.toolRunner({\n * model: \"puku-ai-2.8\",\n * max_tokens: 1024,\n * tools: mcpTools(tools, mcpClient),\n * messages: [{ role: \"user\", content: \"Use the available tools\" }],\n * });\n * ```\n */\nexport function mcpTools(\n tools: MCPToolLike[],\n mcpClient: MCPClientLike,\n extraProps?: Partial<Omit<BetaTool, 'name' | 'description' | 'input_schema'>>,\n): BetaRunnableTool<Record<string, unknown>>[] {\n return tools.map((tool) => mcpTool(tool, mcpClient, extraProps));\n}\n\n/**\n * Converts an MCP prompt message to an PukuAI BetaMessageParam.\n *\n * @param mcpMessage The MCP prompt message from `mcpClient.getPrompt()`\n * @param extraProps Additional Puku API properties to include in content blocks (e.g., `cache_control`)\n * @returns A message parameter for use with `puku.beta.messages.create()`\n * @throws {UnsupportedMCPValueError} When the message contains unsupported content types\n * @throws {UnsupportedMCPValueError} When the message contains unsupported resource links\n * @throws {UnsupportedMCPValueError} When the message contains resources with unsupported MIME types\n *\n * @example\n * ```ts\n * import { Client } from \"@modelcontextprotocol/sdk/client/index.js\";\n * import PukuAI from \"@puku-ai/sdk\";\n * import { mcpMessage } from \"@puku-ai/sdk/helpers/beta/mcp\";\n *\n * const mcpClient = new Client({ name: \"example\", version: \"1.0.0\" });\n * const puku = new PukuAI();\n *\n * const prompt = await mcpClient.getPrompt({\n * name: \"example-prompt\",\n * arguments: { arg1: \"value\" },\n * });\n *\n * await puku.beta.messages.create({\n * model: \"puku-ai-2.8\",\n * max_tokens: 1024,\n * messages: prompt.messages.map(msg => mcpMessage(msg)),\n * });\n * ```\n */\nexport function mcpMessage(\n mcpMessage: MCPPromptMessageLike,\n extraProps?: Partial<\n Omit<BetaTextBlockParam, 'type' | 'text' | 'source'> &\n Omit<BetaImageBlockParam, 'type' | 'source'> &\n Omit<BetaRequestDocumentBlock, 'type' | 'source'>\n >,\n): BetaMessageParam {\n const message = {\n role: mcpMessage.role,\n content: [mcpContent(mcpMessage.content, extraProps)],\n [SDK_HELPER_SYMBOL]: 'mcpMessage',\n };\n return message;\n}\n\n/**\n * Converts an array of MCP prompt messages to PukuAI BetaMessageParams.\n *\n * @param messages Array of MCP prompt messages from `mcpClient.getPrompt()`\n * @param extraProps Additional Puku API properties to include in content blocks (e.g., `cache_control`)\n * @returns An array of message parameters for use with `puku.beta.messages.create()`\n * @throws {UnsupportedMCPValueError} When any message contains unsupported content types\n * @throws {UnsupportedMCPValueError} When any message contains unsupported resource links\n * @throws {UnsupportedMCPValueError} When any message contains resources with unsupported MIME types\n *\n * @example\n * ```ts\n * const { messages } = await mcpClient.getPrompt({ name: \"example-prompt\" });\n * await puku.beta.messages.create({\n * model: \"puku-ai-2.8\",\n * max_tokens: 1024,\n * messages: mcpMessages(messages),\n * });\n * ```\n */\nexport function mcpMessages(\n messages: MCPPromptMessageLike[],\n extraProps?: Partial<\n Omit<BetaTextBlockParam, 'type' | 'text' | 'source'> &\n Omit<BetaImageBlockParam, 'type' | 'source'> &\n Omit<BetaRequestDocumentBlock, 'type' | 'source'>\n >,\n): BetaMessageParam[] {\n return messages.map((message) => mcpMessage(message, extraProps));\n}\n\n/**\n * Converts a single MCP prompt content item to an PukuAI content block.\n *\n * @param content The MCP content item (text, image, or embedded resource)\n * @param extraProps Additional Puku API properties to include in the content block (e.g., `cache_control`)\n * @returns A Puku content block for use in a message's content array\n * @throws {UnsupportedMCPValueError} When the content type is not supported (e.g., 'audio')\n * @throws {UnsupportedMCPValueError} When resource links use non-http/https protocols\n * @throws {UnsupportedMCPValueError} When resources have unsupported MIME types\n *\n * @example\n * ```ts\n * const { messages } = await mcpClient.getPrompt({ name: \"my-prompt\" });\n * // If you need to mix MCP content with other content:\n * await puku.beta.messages.create({\n * model: \"puku-ai-2.8\",\n * max_tokens: 1024,\n * messages: [{\n * role: \"user\",\n * content: [\n * mcpContent(messages[0].content),\n * { type: \"text\", text: \"Additional context\" },\n * ],\n * }],\n * });\n * ```\n */\nexport function mcpContent(\n content: MCPPromptContentLike,\n extraProps?: Partial<\n Omit<BetaTextBlockParam, 'type' | 'text' | 'source'> &\n Omit<BetaImageBlockParam, 'type' | 'source'> &\n Omit<BetaRequestDocumentBlock, 'type' | 'source'>\n >,\n): BetaTextBlockParam | BetaImageBlockParam | BetaRequestDocumentBlock {\n switch (content.type) {\n case 'text': {\n const textBlock = {\n type: 'text' as const,\n text: content.text,\n ...extraProps,\n [SDK_HELPER_SYMBOL]: 'mcpContent',\n };\n return textBlock;\n }\n\n case 'image': {\n if (!isSupportedImageType(content.mimeType)) {\n throw new UnsupportedMCPValueError(`Unsupported image MIME type: ${content.mimeType}`);\n }\n const imageBlock = {\n type: 'image' as const,\n source: {\n type: 'base64' as const,\n data: content.data,\n media_type: content.mimeType,\n },\n ...extraProps,\n [SDK_HELPER_SYMBOL]: 'mcpContent',\n };\n return imageBlock;\n }\n\n case 'resource':\n return mcpResourceContentToContentBlock(content.resource, extraProps, 'mcpContent');\n\n case 'resource_link':\n case 'audio':\n throw new UnsupportedMCPValueError(`Unsupported MCP content type: ${content.type}`);\n\n default:\n // This should never happen as we handle all MCPPromptContentLike types\n content satisfies never;\n throw new UnsupportedMCPValueError(\n `Unsupported MCP content type: ${(content as { type: string }).type}`,\n );\n }\n}\n\n/**\n * Converts a single MCP resource contents item to an PukuAI content block.\n */\nfunction mcpResourceContentToContentBlock(\n resourceContent: MCPResourceContentsLike,\n extraProps?: Partial<Omit<BetaRequestDocumentBlock, 'type' | 'source'>>,\n helperName: string = 'mcpResourceToContent',\n): BetaTextBlockParam | BetaImageBlockParam | BetaRequestDocumentBlock {\n const mimeType = resourceContent.mimeType;\n\n // Handle images (requires blob - base64-encoded binary data)\n if (mimeType && isSupportedImageType(mimeType)) {\n if (!('blob' in resourceContent)) {\n throw new UnsupportedMCPValueError(\n `Image resource must have blob data, not text. URI: ${resourceContent.uri}`,\n );\n }\n const imageBlock = {\n type: 'image' as const,\n source: {\n type: 'base64' as const,\n data: resourceContent.blob,\n media_type: mimeType,\n },\n ...extraProps,\n [SDK_HELPER_SYMBOL]: helperName,\n };\n return imageBlock;\n }\n\n // Handle PDFs (requires blob - base64-encoded binary data)\n if (mimeType === 'application/pdf') {\n if (!('blob' in resourceContent)) {\n throw new UnsupportedMCPValueError(\n `PDF resource must have blob data, not text. URI: ${resourceContent.uri}`,\n );\n }\n const pdfBlock = {\n type: 'document' as const,\n source: {\n type: 'base64' as const,\n data: resourceContent.blob,\n media_type: 'application/pdf' as const,\n },\n ...extraProps,\n [SDK_HELPER_SYMBOL]: helperName,\n };\n return pdfBlock;\n }\n\n // Handle text types (text/*, or no MIME type defaults to text)\n if (!mimeType || mimeType.startsWith('text/')) {\n const textDocBlock = {\n type: 'document' as const,\n source: textSourceFromResource(resourceContent),\n ...extraProps,\n [SDK_HELPER_SYMBOL]: helperName,\n };\n return textDocBlock;\n }\n\n throw new UnsupportedMCPValueError(\n `Unsupported MIME type \"${mimeType}\" for resource: ${resourceContent.uri}`,\n );\n}\n\n/**\n * Converts MCP resource contents to an PukuAI content block.\n *\n * This helper is useful when you have resource contents from `mcpClient.readResource()`\n * and want to include them in a message or as a document source. It automatically\n * finds the first resource with a supported MIME type.\n *\n * @param result The result from `mcpClient.readResource()`\n * @param extraProps Additional Puku API properties to include in the content block (e.g., `cache_control`)\n * @returns A Puku content block\n * @throws {UnsupportedMCPValueError} When contents array is empty or none have a supported MIME type\n *\n * @example\n * ```ts\n * import { Client } from \"@modelcontextprotocol/sdk/client/index.js\";\n * import PukuAI from \"@puku-ai/sdk\";\n * import { mcpResourceToContent } from \"@puku-ai/sdk/helpers/beta/mcp\";\n *\n * const mcpClient = new Client({ name: \"example\", version: \"1.0.0\" });\n * const puku = new PukuAI();\n *\n * const resource = await mcpClient.readResource({ uri: \"file:///example.txt\" });\n * await puku.beta.messages.create({\n * model: \"puku-ai-2.8\",\n * max_tokens: 1024,\n * messages: [{\n * role: \"user\",\n * content: [mcpResourceToContent(resource)],\n * }],\n * });\n * ```\n */\nexport function mcpResourceToContent(\n result: MCPReadResourceResultLike,\n extraProps?: Partial<Omit<BetaRequestDocumentBlock, 'type' | 'source'>>,\n): BetaTextBlockParam | BetaImageBlockParam | BetaRequestDocumentBlock {\n if (result.contents.length === 0) {\n throw new UnsupportedMCPValueError('Resource contents array must contain at least one item');\n }\n const supported = result.contents.find((c) => isSupportedResourceMimeType(c.mimeType));\n if (!supported) {\n const mimeTypes = result.contents.map((c) => c.mimeType).filter((m) => m !== undefined);\n throw new UnsupportedMCPValueError(\n `No supported MIME type found in resource contents. Available: ${mimeTypes.join(', ')}`,\n );\n }\n return mcpResourceContentToContentBlock(supported, extraProps);\n}\n\n/**\n * Gets the raw bytes from an MCP resource.\n */\nfunction bytesFromResource(resource: MCPResourceContentsLike): Uint8Array {\n if ('blob' in resource) {\n return fromBase64(resource.blob);\n }\n return new TextEncoder().encode(resource.text);\n}\n\n/**\n * Creates a text document source from an MCP resource, decoding base64 blob to UTF-8 if needed.\n */\nfunction textSourceFromResource(resource: MCPResourceContentsLike): BetaPlainTextSource {\n const data = 'text' in resource ? resource.text : new TextDecoder().decode(fromBase64(resource.blob));\n return { type: 'text', data, media_type: 'text/plain' };\n}\n\n/**\n * Converts an MCP resource to a File object suitable for uploading via `puku.beta.files.upload()`.\n *\n * @param result The result from `mcpClient.readResource()`\n * @returns A File object for use with `puku.beta.files.upload()`\n * @throws {UnsupportedMCPValueError} When contents array is empty\n *\n * @example\n * ```ts\n * import { Client } from \"@modelcontextprotocol/sdk/client/index.js\";\n * import PukuAI from \"@puku-ai/sdk\";\n * import { mcpResourceToFile } from \"@puku-ai/sdk/helpers/beta/mcp\";\n *\n * const mcpClient = new Client({ name: \"example\", version: \"1.0.0\" });\n * const puku = new PukuAI();\n *\n * const resource = await mcpClient.readResource({ uri: \"file:///document.pdf\" });\n *\n * const uploaded = await puku.beta.files.upload({\n * file: mcpResourceToFile(resource),\n * });\n * ```\n */\nexport function mcpResourceToFile(result: MCPReadResourceResultLike): File {\n if (result.contents.length === 0) {\n throw new UnsupportedMCPValueError('Resource contents array must contain at least one item');\n }\n const resourceContents = result.contents[0]!;\n const name = new URL(resourceContents.uri).pathname.split('/').at(-1) || 'file';\n const type = resourceContents.mimeType;\n const data = bytesFromResource(resourceContents);\n const file = new File([data as BlobPart], name, type ? { type } : undefined);\n (file as any)[SDK_HELPER_SYMBOL] = 'mcpResource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