diff --git a/apps/radar/worker-configuration.d.ts b/apps/radar/worker-configuration.d.ts index 3870e279..49ccf0d9 100644 --- a/apps/radar/worker-configuration.d.ts +++ b/apps/radar/worker-configuration.d.ts @@ -1,4 +1,4 @@ -// Runtime types generated with workerd@1.20250409.0 2025-03-10 nodejs_compat +// Runtime types generated with workerd@1.20250321.0 2025-03-10 nodejs_compat // Begin runtime types /*! ***************************************************************************** Copyright (c) Cloudflare. All rights reserved. @@ -267,6 +267,16 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope { FixedLengthStream: typeof FixedLengthStream; IdentityTransformStream: typeof IdentityTransformStream; HTMLRewriter: typeof HTMLRewriter; + GPUAdapter: typeof GPUAdapter; + GPUOutOfMemoryError: typeof GPUOutOfMemoryError; + GPUValidationError: typeof GPUValidationError; + GPUInternalError: typeof GPUInternalError; + GPUDeviceLostInfo: typeof GPUDeviceLostInfo; + GPUBufferUsage: typeof GPUBufferUsage; + GPUShaderStage: typeof GPUShaderStage; + GPUMapMode: typeof GPUMapMode; + GPUTextureUsage: typeof GPUTextureUsage; + GPUColorWrite: typeof GPUColorWrite; } declare function addEventListener(type: Type, handler: EventListenerOrEventListenerObject, options?: EventTargetAddEventListenerOptions | boolean): void; declare function removeEventListener(type: Type, handler: EventListenerOrEventListenerObject, options?: EventTargetEventListenerOptions | boolean): void; @@ -364,7 +374,7 @@ declare abstract class PromiseRejectionEvent extends Event { declare abstract class Navigator { sendBeacon(url: string, body?: (ReadableStream | string | (ArrayBuffer | ArrayBufferView) | Blob | FormData | URLSearchParams | URLSearchParams)): boolean; readonly userAgent: string; - readonly hardwareConcurrency: number; + readonly gpu?: GPU; } /** * The Workers runtime supports a subset of the Performance API, used to measure timing and performance, @@ -933,26 +943,26 @@ interface RsaOtherPrimesInfo { } interface SubtleCryptoDeriveKeyAlgorithm { name: string; - salt?: (ArrayBuffer | ArrayBufferView); + salt?: ArrayBuffer; iterations?: number; hash?: (string | SubtleCryptoHashAlgorithm); $public?: CryptoKey; - info?: (ArrayBuffer | ArrayBufferView); + info?: ArrayBuffer; } interface SubtleCryptoEncryptAlgorithm { name: string; - iv?: (ArrayBuffer | ArrayBufferView); - additionalData?: (ArrayBuffer | ArrayBufferView); + iv?: ArrayBuffer; + additionalData?: ArrayBuffer; tagLength?: number; - counter?: (ArrayBuffer | ArrayBufferView); + counter?: ArrayBuffer; length?: number; - label?: (ArrayBuffer | ArrayBufferView); + label?: ArrayBuffer; } interface SubtleCryptoGenerateKeyAlgorithm { name: string; hash?: (string | SubtleCryptoHashAlgorithm); modulusLength?: number; - publicExponent?: (ArrayBuffer | ArrayBufferView); + publicExponent?: ArrayBuffer; length?: number; namedCurve?: string; } @@ -987,7 +997,7 @@ interface CryptoKeyHmacKeyAlgorithm { interface CryptoKeyRsaKeyAlgorithm { name: string; modulusLength: number; - publicExponent: ArrayBuffer | ArrayBufferView; + publicExponent: ArrayBuffer | (ArrayBuffer | ArrayBufferView); hash?: CryptoKeyKeyAlgorithm; } interface CryptoKeyEllipticKeyAlgorithm { @@ -1002,7 +1012,7 @@ interface CryptoKeyArbitraryKeyAlgorithm { } declare class DigestStream extends WritableStream { constructor(algorithm: string | SubtleCryptoHashAlgorithm); - readonly digest: Promise; + get digest(): Promise; get bytesWritten(): number | bigint; } /** @@ -1011,7 +1021,7 @@ declare class DigestStream extends WritableStream * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder) */ declare class TextDecoder { - constructor(label?: string, options?: TextDecoderConstructorOptions); + constructor(decoder?: string, options?: TextDecoderConstructorOptions); /** * Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented input. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments. * @@ -2400,6 +2410,472 @@ interface SocketInfo { remoteAddress?: string; localAddress?: string; } +interface GPU { + requestAdapter(param1?: GPURequestAdapterOptions): Promise; +} +declare abstract class GPUAdapter { + requestDevice(param1?: GPUDeviceDescriptor): Promise; + requestAdapterInfo(unmaskHints?: string[]): Promise; + get features(): GPUSupportedFeatures; + get limits(): GPUSupportedLimits; +} +interface GPUDevice extends EventTarget { + createBuffer(param1: GPUBufferDescriptor): GPUBuffer; + createBindGroupLayout(descriptor: GPUBindGroupLayoutDescriptor): GPUBindGroupLayout; + createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup; + createSampler(descriptor: GPUSamplerDescriptor): GPUSampler; + createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule; + createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout; + createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline; + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder; + createTexture(param1: GPUTextureDescriptor): GPUTexture; + destroy(): void; + createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet; + pushErrorScope(filter: string): void; + popErrorScope(): Promise; + get queue(): GPUQueue; + get lost(): Promise; + get features(): GPUSupportedFeatures; + get limits(): GPUSupportedLimits; +} +interface GPUDeviceDescriptor { + label?: string; + requiredFeatures?: string[]; + requiredLimits?: Record; + defaultQueue?: GPUQueueDescriptor; +} +interface GPUBufferDescriptor { + label: string; + size: number | bigint; + usage: number; + mappedAtCreation: boolean; +} +interface GPUQueueDescriptor { + label?: string; +} +declare abstract class GPUBufferUsage { + static readonly MAP_READ: number; + static readonly MAP_WRITE: number; + static readonly COPY_SRC: number; + static readonly COPY_DST: number; + static readonly INDEX: number; + static readonly VERTEX: number; + static readonly UNIFORM: number; + static readonly STORAGE: number; + static readonly INDIRECT: number; + static readonly QUERY_RESOLVE: number; +} +interface GPUBuffer { + getMappedRange(size?: (number | bigint), param2?: (number | bigint)): ArrayBuffer; + unmap(): void; + destroy(): void; + mapAsync(offset: number, size?: (number | bigint), param3?: (number | bigint)): Promise; + get size(): number | bigint; + get usage(): number; + get mapState(): string; +} +declare abstract class GPUShaderStage { + static readonly VERTEX: number; + static readonly FRAGMENT: number; + static readonly COMPUTE: number; +} +interface GPUBindGroupLayoutDescriptor { + label?: string; + entries: GPUBindGroupLayoutEntry[]; +} +interface GPUBindGroupLayoutEntry { + binding: number; + visibility: number; + buffer?: GPUBufferBindingLayout; + sampler?: GPUSamplerBindingLayout; + texture?: GPUTextureBindingLayout; + storageTexture?: GPUStorageTextureBindingLayout; +} +interface GPUStorageTextureBindingLayout { + access?: string; + format: string; + viewDimension?: string; +} +interface GPUTextureBindingLayout { + sampleType?: string; + viewDimension?: string; + multisampled?: boolean; +} +interface GPUSamplerBindingLayout { + type?: string; +} +interface GPUBufferBindingLayout { + type?: string; + hasDynamicOffset?: boolean; + minBindingSize?: (number | bigint); +} +interface GPUBindGroupLayout { +} +interface GPUBindGroup { +} +interface GPUBindGroupDescriptor { + label?: string; + layout: GPUBindGroupLayout; + entries: GPUBindGroupEntry[]; +} +interface GPUBindGroupEntry { + binding: number; + resource: GPUBufferBinding | GPUSampler; +} +interface GPUBufferBinding { + buffer: GPUBuffer; + offset?: (number | bigint); + size?: (number | bigint); +} +interface GPUSampler { +} +interface GPUSamplerDescriptor { + label?: string; + addressModeU?: string; + addressModeV?: string; + addressModeW?: string; + magFilter?: string; + minFilter?: string; + mipmapFilter?: string; + lodMinClamp?: number; + lodMaxClamp?: number; + compare: string; + maxAnisotropy?: number; +} +interface GPUShaderModule { + getCompilationInfo(): Promise; +} +interface GPUShaderModuleDescriptor { + label?: string; + code: string; +} +interface GPUPipelineLayout { +} +interface GPUPipelineLayoutDescriptor { + label?: string; + bindGroupLayouts: GPUBindGroupLayout[]; +} +interface GPUComputePipeline { + getBindGroupLayout(index: number): GPUBindGroupLayout; +} +interface GPUComputePipelineDescriptor { + label?: string; + compute: GPUProgrammableStage; + layout: string | GPUPipelineLayout; +} +interface GPUProgrammableStage { + module: GPUShaderModule; + entryPoint: string; + constants?: Record; +} +interface GPUCommandEncoder { + get label(): string; + beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder; + beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder; + copyBufferToBuffer(source: GPUBuffer, sourceOffset: number | bigint, destination: GPUBuffer, destinationOffset: number | bigint, size: number | bigint): void; + finish(param0?: GPUCommandBufferDescriptor): GPUCommandBuffer; + copyTextureToBuffer(source: GPUImageCopyTexture, destination: GPUImageCopyBuffer, copySize: Iterable | GPUExtent3DDict): void; + copyBufferToTexture(source: GPUImageCopyBuffer, destination: GPUImageCopyTexture, copySize: Iterable | GPUExtent3DDict): void; + copyTextureToTexture(source: GPUImageCopyTexture, destination: GPUImageCopyTexture, copySize: Iterable | GPUExtent3DDict): void; + clearBuffer(buffer: GPUBuffer, offset?: (number | bigint), size?: (number | bigint)): void; +} +interface GPUCommandEncoderDescriptor { + label?: string; +} +interface GPUComputePassEncoder { + setPipeline(pipeline: GPUComputePipeline): void; + setBindGroup(index: number, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable): void; + dispatchWorkgroups(workgroupCountX: number, workgroupCountY?: number, workgroupCountZ?: number): void; + end(): void; +} +interface GPUComputePassDescriptor { + label?: string; + timestampWrites?: GPUComputePassTimestampWrites; +} +interface GPUQuerySet { +} +interface GPUQuerySetDescriptor { + label?: string; +} +interface GPUComputePassTimestampWrites { + querySet: GPUQuerySet; + beginningOfPassWriteIndex?: number; + endOfPassWriteIndex?: number; +} +interface GPUCommandBufferDescriptor { + label?: string; +} +interface GPUCommandBuffer { +} +interface GPUQueue { + submit(commandBuffers: GPUCommandBuffer[]): void; + writeBuffer(buffer: GPUBuffer, bufferOffset: number | bigint, data: ArrayBuffer | ArrayBufferView, dataOffset?: (number | bigint), size?: (number | bigint)): void; +} +declare abstract class GPUMapMode { + static readonly READ: number; + static readonly WRITE: number; +} +interface GPURequestAdapterOptions { + powerPreference: string; + forceFallbackAdapter?: boolean; +} +interface GPUAdapterInfo { + get vendor(): string; + get architecture(): string; + get device(): string; + get description(): string; +} +interface GPUSupportedFeatures { + has(name: string): boolean; + keys(): string[]; +} +interface GPUSupportedLimits { + get maxTextureDimension1D(): number; + get maxTextureDimension2D(): number; + get maxTextureDimension3D(): number; + get maxTextureArrayLayers(): number; + get maxBindGroups(): number; + get maxBindingsPerBindGroup(): number; + get maxDynamicUniformBuffersPerPipelineLayout(): number; + get maxDynamicStorageBuffersPerPipelineLayout(): number; + get maxSampledTexturesPerShaderStage(): number; + get maxSamplersPerShaderStage(): number; + get maxStorageBuffersPerShaderStage(): number; + get maxStorageTexturesPerShaderStage(): number; + get maxUniformBuffersPerShaderStage(): number; + get maxUniformBufferBindingSize(): number | bigint; + get maxStorageBufferBindingSize(): number | bigint; + get minUniformBufferOffsetAlignment(): number; + get minStorageBufferOffsetAlignment(): number; + get maxVertexBuffers(): number; + get maxBufferSize(): number | bigint; + get maxVertexAttributes(): number; + get maxVertexBufferArrayStride(): number; + get maxInterStageShaderComponents(): number; + get maxInterStageShaderVariables(): number; + get maxColorAttachments(): number; + get maxColorAttachmentBytesPerSample(): number; + get maxComputeWorkgroupStorageSize(): number; + get maxComputeInvocationsPerWorkgroup(): number; + get maxComputeWorkgroupSizeX(): number; + get maxComputeWorkgroupSizeY(): number; + get maxComputeWorkgroupSizeZ(): number; + get maxComputeWorkgroupsPerDimension(): number; +} +declare abstract class GPUError { + get message(): string; +} +declare abstract class GPUOutOfMemoryError extends GPUError { +} +declare abstract class GPUInternalError extends GPUError { +} +declare abstract class GPUValidationError extends GPUError { +} +declare abstract class GPUDeviceLostInfo { + get message(): string; + get reason(): string; +} +interface GPUCompilationMessage { + get message(): string; + get type(): string; + get lineNum(): number; + get linePos(): number; + get offset(): number; + get length(): number; +} +interface GPUCompilationInfo { + get messages(): GPUCompilationMessage[]; +} +declare abstract class GPUTextureUsage { + static readonly COPY_SRC: number; + static readonly COPY_DST: number; + static readonly TEXTURE_BINDING: number; + static readonly STORAGE_BINDING: number; + static readonly RENDER_ATTACHMENT: number; +} +interface GPUTextureDescriptor { + label: string; + size: number[] | GPUExtent3DDict; + mipLevelCount?: number; + sampleCount?: number; + dimension?: string; + format: string; + usage: number; + viewFormats?: string[]; +} +interface GPUExtent3DDict { + width: number; + height?: number; + depthOrArrayLayers?: number; +} +interface GPUTexture { + createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView; + destroy(): void; + get width(): number; + get height(): number; + get depthOrArrayLayers(): number; + get mipLevelCount(): number; + get dimension(): string; + get format(): string; + get usage(): number; +} +interface GPUTextureView { +} +interface GPUTextureViewDescriptor { + label: string; + format: string; + dimension: string; + aspect?: string; + baseMipLevel?: number; + mipLevelCount: number; + baseArrayLayer?: number; + arrayLayerCount: number; +} +declare abstract class GPUColorWrite { + static readonly RED: number; + static readonly GREEN: number; + static readonly BLUE: number; + static readonly ALPHA: number; + static readonly ALL: number; +} +interface GPURenderPipeline { +} +interface GPURenderPipelineDescriptor { + label?: string; + layout: string | GPUPipelineLayout; + vertex: GPUVertexState; + primitive?: GPUPrimitiveState; + depthStencil?: GPUDepthStencilState; + multisample?: GPUMultisampleState; + fragment?: GPUFragmentState; +} +interface GPUVertexState { + module: GPUShaderModule; + entryPoint: string; + constants?: Record; + buffers?: GPUVertexBufferLayout[]; +} +interface GPUVertexBufferLayout { + arrayStride: number | bigint; + stepMode?: string; + attributes: GPUVertexAttribute[]; +} +interface GPUVertexAttribute { + format: string; + offset: number | bigint; + shaderLocation: number; +} +interface GPUPrimitiveState { + topology?: string; + stripIndexFormat?: string; + frontFace?: string; + cullMode?: string; + unclippedDepth?: boolean; +} +interface GPUStencilFaceState { + compare?: string; + failOp?: string; + depthFailOp?: string; + passOp?: string; +} +interface GPUDepthStencilState { + format: string; + depthWriteEnabled: boolean; + depthCompare: string; + stencilFront?: GPUStencilFaceState; + stencilBack?: GPUStencilFaceState; + stencilReadMask?: number; + stencilWriteMask?: number; + depthBias?: number; + depthBiasSlopeScale?: number; + depthBiasClamp?: number; +} +interface GPUMultisampleState { + count?: number; + mask?: number; + alphaToCoverageEnabled?: boolean; +} +interface GPUFragmentState { + module: GPUShaderModule; + entryPoint: string; + constants?: Record; + targets: GPUColorTargetState[]; +} +interface GPUColorTargetState { + format: string; + blend: GPUBlendState; + writeMask?: number; +} +interface GPUBlendState { + color: GPUBlendComponent; + alpha: GPUBlendComponent; +} +interface GPUBlendComponent { + operation?: string; + srcFactor?: string; + dstFactor?: string; +} +interface GPURenderPassEncoder { + setPipeline(pipeline: GPURenderPipeline): void; + draw(vertexCount: number, instanceCount?: number, firstVertex?: number, firstInstance?: number): void; + end(): void; +} +interface GPURenderPassDescriptor { + label?: string; + colorAttachments: GPURenderPassColorAttachment[]; + depthStencilAttachment?: GPURenderPassDepthStencilAttachment; + occlusionQuerySet?: GPUQuerySet; + timestampWrites?: GPURenderPassTimestampWrites; + maxDrawCount?: (number | bigint); +} +interface GPURenderPassColorAttachment { + view: GPUTextureView; + depthSlice?: number; + resolveTarget?: GPUTextureView; + clearValue?: (number[] | GPUColorDict); + loadOp: string; + storeOp: string; +} +interface GPUColorDict { + r: number; + g: number; + b: number; + a: number; +} +interface GPURenderPassDepthStencilAttachment { + view: GPUTextureView; + depthClearValue?: number; + depthLoadOp?: string; + depthStoreOp?: string; + depthReadOnly?: boolean; + stencilClearValue?: number; + stencilLoadOp?: string; + stencilStoreOp?: string; + stencilReadOnly?: boolean; +} +interface GPURenderPassTimestampWrites { + querySet: GPUQuerySet; + beginningOfPassWriteIndex?: number; + endOfPassWriteIndex?: number; +} +interface GPUImageCopyTexture { + texture: GPUTexture; + mipLevel?: number; + origin?: (number[] | GPUOrigin3DDict); + aspect?: string; +} +interface GPUImageCopyBuffer { + buffer: GPUBuffer; + offset?: (number | bigint); + bytesPerRow?: number; + rowsPerImage?: number; +} +interface GPUOrigin3DDict { + x?: number; + y?: number; + z?: number; +} /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */ declare class EventSource extends EventTarget { constructor(url: string, init?: EventSourceEventSourceInit); @@ -2493,28 +2969,6 @@ declare abstract class BaseAiImageToText { inputs: AiImageToTextInput; postProcessedOutputs: AiImageToTextOutput; } -type AiImageTextToTextInput = { - image: string; - prompt?: string; - max_tokens?: number; - temperature?: number; - ignore_eos?: boolean; - top_p?: number; - top_k?: number; - seed?: number; - repetition_penalty?: number; - frequency_penalty?: number; - presence_penalty?: number; - raw?: boolean; - messages?: RoleScopedChatInput[]; -}; -type AiImageTextToTextOutput = { - description: string; -}; -declare abstract class BaseAiImageTextToText { - inputs: AiImageTextToTextInput; - postProcessedOutputs: AiImageTextToTextOutput; -} type AiObjectDetectionInput = { image: number[]; }; @@ -2907,69 +3361,6 @@ declare abstract class Base_Ai_Cf_Openai_Whisper_Large_V3_Turbo { inputs: Ai_Cf_Openai_Whisper_Large_V3_Turbo_Input; postProcessedOutputs: Ai_Cf_Openai_Whisper_Large_V3_Turbo_Output; } -type Ai_Cf_Baai_Bge_M3_Input = BGEM3InputQueryAndContexts | BGEM3InputEmbedding; -interface BGEM3InputQueryAndContexts { - /** - * A query you wish to perform against the provided contexts. If no query is provided the model with respond with embeddings for contexts - */ - query?: string; - /** - * List of provided contexts. Note that the index in this array is important, as the response will refer to it. - */ - contexts: { - /** - * One of the provided context content - */ - text?: string; - }[]; - /** - * When provided with too long context should the model error out or truncate the context to fit? - */ - truncate_inputs?: boolean; -} -interface BGEM3InputEmbedding { - text: string | string[]; - /** - * When provided with too long context should the model error out or truncate the context to fit? - */ - truncate_inputs?: boolean; -} -type Ai_Cf_Baai_Bge_M3_Output = BGEM3OuputQuery | BGEM3OutputEmbeddingForContexts | BGEM3OuputEmbedding; -interface BGEM3OuputQuery { - response?: { - /** - * Index of the context in the request - */ - id?: number; - /** - * Score of the context under the index. - */ - score?: number; - }[]; -} -interface BGEM3OutputEmbeddingForContexts { - response?: number[][]; - shape?: number[]; - /** - * The pooling method used in the embedding process. - */ - pooling?: "mean" | "cls"; -} -interface BGEM3OuputEmbedding { - shape?: number[]; - /** - * Embeddings of the requested text values - */ - data?: number[][]; - /** - * The pooling method used in the embedding process. - */ - pooling?: "mean" | "cls"; -} -declare abstract class Base_Ai_Cf_Baai_Bge_M3 { - inputs: Ai_Cf_Baai_Bge_M3_Input; - postProcessedOutputs: Ai_Cf_Baai_Bge_M3_Output; -} interface Ai_Cf_Black_Forest_Labs_Flux_1_Schnell_Input { /** * A text description of the image you want to generate. @@ -3273,306 +3664,6 @@ declare abstract class Base_Ai_Cf_Meta_Llama_Guard_3_8B { inputs: Ai_Cf_Meta_Llama_Guard_3_8B_Input; postProcessedOutputs: Ai_Cf_Meta_Llama_Guard_3_8B_Output; } -interface Ai_Cf_Baai_Bge_Reranker_Base_Input { - /** - * A query you wish to perform against the provided contexts. - */ - /** - * Number of returned results starting with the best score. - */ - top_k?: number; - /** - * List of provided contexts. Note that the index in this array is important, as the response will refer to it. - */ - contexts: { - /** - * One of the provided context content - */ - text?: string; - }[]; -} -interface Ai_Cf_Baai_Bge_Reranker_Base_Output { - response?: { - /** - * Index of the context in the request - */ - id?: number; - /** - * Score of the context under the index. - */ - score?: number; - }[]; -} -declare abstract class Base_Ai_Cf_Baai_Bge_Reranker_Base { - inputs: Ai_Cf_Baai_Bge_Reranker_Base_Input; - postProcessedOutputs: Ai_Cf_Baai_Bge_Reranker_Base_Output; -} -type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input = Ai_Cf_Meta_Llama_4_Prompt | Ai_Cf_Meta_Llama_4_Messages; -interface Ai_Cf_Meta_Llama_4_Prompt { - /** - * The input text prompt for the model to generate a response. - */ - prompt: string; - /** - * JSON schema that should be fulfilled for the response. - */ - guided_json?: object; - /** - * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. - */ - raw?: boolean; - /** - * If true, the response will be streamed back incrementally using SSE, Server Sent Events. - */ - stream?: boolean; - /** - * The maximum number of tokens to generate in the response. - */ - max_tokens?: number; - /** - * Controls the randomness of the output; higher values produce more random results. - */ - temperature?: number; - /** - * Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. - */ - top_p?: number; - /** - * Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. - */ - top_k?: number; - /** - * Random seed for reproducibility of the generation. - */ - seed?: number; - /** - * Penalty for repeated tokens; higher values discourage repetition. - */ - repetition_penalty?: number; - /** - * Decreases the likelihood of the model repeating the same lines verbatim. - */ - frequency_penalty?: number; - /** - * Increases the likelihood of the model introducing new topics. - */ - presence_penalty?: number; -} -interface Ai_Cf_Meta_Llama_4_Messages { - /** - * An array of message objects representing the conversation history. - */ - messages: { - /** - * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). - */ - role?: string; - /** - * The tool call id. Must be supplied for tool calls for Mistral-3. If you don't know what to put here you can fall back to 000000001 - */ - tool_call_id?: string; - content?: string | { - /** - * Type of the content provided - */ - type?: string; - text?: string; - image_url?: { - /** - * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted - */ - url?: string; - }; - }[] | { - /** - * Type of the content provided - */ - type?: string; - text?: string; - image_url?: { - /** - * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted - */ - url?: string; - }; - }; - }[]; - functions?: { - name: string; - code: string; - }[]; - /** - * A list of tools available for the assistant to use. - */ - tools?: ({ - /** - * The name of the tool. More descriptive the better. - */ - name: string; - /** - * A brief description of what the tool does. - */ - description: string; - /** - * Schema defining the parameters accepted by the tool. - */ - parameters: { - /** - * The type of the parameters object (usually 'object'). - */ - type: string; - /** - * List of required parameter names. - */ - required?: string[]; - /** - * Definitions of each parameter. - */ - properties: { - [k: string]: { - /** - * The data type of the parameter. - */ - type: string; - /** - * A description of the expected parameter. - */ - description: string; - }; - }; - }; - } | { - /** - * Specifies the type of tool (e.g., 'function'). - */ - type: string; - /** - * Details of the function tool. - */ - function: { - /** - * The name of the function. - */ - name: string; - /** - * A brief description of what the function does. - */ - description: string; - /** - * Schema defining the parameters accepted by the function. - */ - parameters: { - /** - * The type of the parameters object (usually 'object'). - */ - type: string; - /** - * List of required parameter names. - */ - required?: string[]; - /** - * Definitions of each parameter. - */ - properties: { - [k: string]: { - /** - * The data type of the parameter. - */ - type: string; - /** - * A description of the expected parameter. - */ - description: string; - }; - }; - }; - }; - })[]; - /** - * JSON schema that should be fufilled for the response. - */ - guided_json?: object; - /** - * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. - */ - raw?: boolean; - /** - * If true, the response will be streamed back incrementally using SSE, Server Sent Events. - */ - stream?: boolean; - /** - * The maximum number of tokens to generate in the response. - */ - max_tokens?: number; - /** - * Controls the randomness of the output; higher values produce more random results. - */ - temperature?: number; - /** - * Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses. - */ - top_p?: number; - /** - * Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises. - */ - top_k?: number; - /** - * Random seed for reproducibility of the generation. - */ - seed?: number; - /** - * Penalty for repeated tokens; higher values discourage repetition. - */ - repetition_penalty?: number; - /** - * Decreases the likelihood of the model repeating the same lines verbatim. - */ - frequency_penalty?: number; - /** - * Increases the likelihood of the model introducing new topics. - */ - presence_penalty?: number; -} -type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output = { - /** - * The generated text response from the model - */ - response: string; - /** - * Usage statistics for the inference request - */ - usage?: { - /** - * Total number of tokens in input - */ - prompt_tokens?: number; - /** - * Total number of tokens in output - */ - completion_tokens?: number; - /** - * Total number of input and output tokens - */ - total_tokens?: number; - }; - /** - * An array of tool calls requests made during the response generation - */ - tool_calls?: { - /** - * The arguments passed to be passed to the tool call request - */ - arguments?: object; - /** - * The name of the tool to be called - */ - name?: string; - }[]; -} | string; -declare abstract class Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct { - inputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input; - postProcessedOutputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output; -} interface AiModels { "@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification; "@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage; @@ -3580,7 +3671,6 @@ interface AiModels { "@cf/runwayml/stable-diffusion-v1-5-img2img": BaseAiTextToImage; "@cf/lykon/dreamshaper-8-lcm": BaseAiTextToImage; "@cf/bytedance/stable-diffusion-xl-lightning": BaseAiTextToImage; - "@cf/myshell-ai/melotts": BaseAiTextToSpeech; "@cf/baai/bge-base-en-v1.5": BaseAiTextEmbeddings; "@cf/baai/bge-small-en-v1.5": BaseAiTextEmbeddings; "@cf/baai/bge-large-en-v1.5": BaseAiTextEmbeddings; @@ -3634,12 +3724,9 @@ interface AiModels { "@cf/unum/uform-gen2-qwen-500m": Base_Ai_Cf_Unum_Uform_Gen2_Qwen_500M; "@cf/openai/whisper-tiny-en": Base_Ai_Cf_Openai_Whisper_Tiny_En; "@cf/openai/whisper-large-v3-turbo": Base_Ai_Cf_Openai_Whisper_Large_V3_Turbo; - "@cf/baai/bge-m3": Base_Ai_Cf_Baai_Bge_M3; "@cf/black-forest-labs/flux-1-schnell": Base_Ai_Cf_Black_Forest_Labs_Flux_1_Schnell; "@cf/meta/llama-3.2-11b-vision-instruct": Base_Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct; "@cf/meta/llama-guard-3-8b": Base_Ai_Cf_Meta_Llama_Guard_3_8B; - "@cf/baai/bge-reranker-base": Base_Ai_Cf_Baai_Bge_Reranker_Base; - "@cf/meta/llama-4-scout-17b-16e-instruct": Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct; } type AiOptions = { gateway?: GatewayOptions; @@ -3691,15 +3778,15 @@ declare abstract class Ai { run(model: Name, inputs: AiModelList[Name]["inputs"], options?: Options): Promise; - models(params?: AiModelsSearchParams): Promise; - toMarkdown(files: { + public models(params?: AiModelsSearchParams): Promise; + public toMarkdown(files: { name: string; blob: Blob; }[], options?: { gateway?: GatewayOptions; extraHeaders?: object; }): Promise; - toMarkdown(files: { + public toMarkdown(files: { name: string; blob: Blob; }, options?: { @@ -3850,10 +3937,8 @@ interface BasicImageTransformations { * (white by default). Use of this mode is not recommended, as the same * effect can be more efficiently achieved with the contain mode and the * CSS object-fit: contain property. - * - squeeze: Stretches and deforms to the width and height given, even if it - * breaks aspect ratio */ - fit?: "scale-down" | "contain" | "cover" | "crop" | "pad" | "squeeze"; + fit?: "scale-down" | "contain" | "cover" | "crop" | "pad"; /** * When cropping with fit: "cover", this defines the side or point that should * be left uncropped. The value is either a string @@ -3866,7 +3951,7 @@ interface BasicImageTransformations { * preserve as much as possible around a point at 20% of the height of the * source image. */ - gravity?: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'auto' | 'entropy' | BasicImageTransformationsGravityCoordinates; + gravity?: "left" | "right" | "top" | "bottom" | "center" | "auto" | BasicImageTransformationsGravityCoordinates; /** * Background color to add underneath the image. Applies only to images with * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…), @@ -3880,9 +3965,8 @@ interface BasicImageTransformations { rotate?: 0 | 90 | 180 | 270 | 360; } interface BasicImageTransformationsGravityCoordinates { - x?: number; - y?: number; - mode?: 'remainder' | 'box-center'; + x: number; + y: number; } /** * In addition to the properties you can set in the RequestInit dict @@ -3988,39 +4072,23 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations { */ dpr?: number; /** - * Allows you to trim your image. Takes dpr into account and is performed before - * resizing or rotation. - * - * It can be used as: - * - left, top, right, bottom - it will specify the number of pixels to cut - * off each side - * - width, height - the width/height you'd like to end up with - can be used - * in combination with the properties above - * - border - this will automatically trim the surroundings of an image based on - * it's color. It consists of three properties: - * - color: rgb or hex representation of the color you wish to trim (todo: verify the rgba bit) - * - tolerance: difference from color to treat as color - * - keep: the number of pixels of border to keep - */ - trim?: "border" | { - top?: number; - bottom?: number; + * An object with four properties {left, top, right, bottom} that specify + * a number of pixels to cut off on each side. Allows removal of borders + * or cutting out a specific fragment of an image. Trimming is performed + * before resizing or rotation. Takes dpr into account. + */ + trim?: { left?: number; + top?: number; right?: number; - width?: number; - height?: number; - border?: boolean | { - color?: string; - tolerance?: number; - keep?: number; - }; + bottom?: number; }; /** * Quality setting from 1-100 (useful values are in 60-90 range). Lower values * make images look worse, but load faster. The default is 85. It applies only * to JPEG and WebP images. It doesn’t have any effect on PNG. */ - quality?: number | "low" | "medium-low" | "medium-high" | "high"; + quality?: number; /** * Output format to generate. It can be: * - avif: generate images in AVIF format. @@ -4032,7 +4100,7 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations { * - jpeg: generate images in JPEG format. * - png: generate images in PNG format. */ - format?: "avif" | "webp" | "json" | "jpeg" | "png" | "baseline-jpeg" | "png-force" | "svg"; + format?: "avif" | "webp" | "json" | "jpeg" | "png"; /** * Whether to preserve animation frames from input files. Default is true. * Setting it to false reduces animations to still images. This setting is @@ -4110,18 +4178,6 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations { * 0.5 darkens the image, and a value of 2.0 lightens the image. 0 is ignored. */ gamma?: number; - /** - * Increase contrast by a factor. A value of 1.0 equals no change, a value of - * 0.5 equals low contrast, and a value of 2.0 equals high contrast. 0 is - * ignored. - */ - saturation?: number; - /** - * Flips the images horizontally, vertically, or both. Flipping is applied before - * rotation, so if you apply flip=h,rotate=90 then the image will be flipped - * horizontally, then rotated by 90 degrees. - */ - flip?: 'h' | 'v' | 'hv'; /** * Slightly reduces latency on a cache miss by selecting a * quickest-to-compress file format, at a cost of increased file size and @@ -4524,7 +4580,7 @@ interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder { certNotAfter: ""; } /** Possible outcomes of TLS verification */ -declare type CertVerificationStatus = +declare type CertVerificationStatus = /** Authentication succeeded */ "SUCCESS" /** No certificate was presented */ @@ -4583,7 +4639,7 @@ interface D1ExecResult { count: number; duration: number; } -type D1SessionConstraint = +type D1SessionConstraint = // Indicates that the first query should go to the primary, and the rest queries // using the same D1DatabaseSession will go to any replica that is consistent with // the bookmark maintained by the session (returned by the first query). @@ -4768,33 +4824,13 @@ type ImageInfoResponse = { height: number; }; type ImageTransform = { - width?: number; - height?: number; - background?: string; - blur?: number; - border?: { - color?: string; - width?: number; - } | { - top?: number; - bottom?: number; - left?: number; - right?: number; - }; - brightness?: number; - contrast?: number; fit?: 'scale-down' | 'contain' | 'pad' | 'squeeze' | 'cover' | 'crop'; - flip?: 'h' | 'v' | 'hv'; - gamma?: number; - gravity?: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'auto' | 'entropy' | { + gravity?: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'auto' | 'entropy' | 'face' | { x?: number; y?: number; mode: 'remainder' | 'box-center'; }; - rotate?: 0 | 90 | 180 | 270; - saturation?: number; - sharpen?: number; - trim?: "border" | { + trim?: { top?: number; bottom?: number; left?: number; @@ -4807,6 +4843,24 @@ type ImageTransform = { keep?: number; }; }; + width?: number; + height?: number; + background?: string; + rotate?: number; + sharpen?: number; + blur?: number; + contrast?: number; + brightness?: number; + gamma?: number; + border?: { + color?: string; + width?: number; + top?: number; + bottom?: number; + left?: number; + right?: number; + }; + zoom?: number; }; type ImageDrawOptions = { opacity?: number; @@ -4997,11 +5051,11 @@ declare namespace Rpc { // TypeScript uses *structural* typing meaning anything with the same shape as type `T` is a `T`. // For the classes exported by `cloudflare:workers` we want *nominal* typing (i.e. we only want to // accept `WorkerEntrypoint` from `cloudflare:workers`, not any other class with the same shape) - export const __RPC_STUB_BRAND: '__RPC_STUB_BRAND'; - export const __RPC_TARGET_BRAND: '__RPC_TARGET_BRAND'; - export const __WORKER_ENTRYPOINT_BRAND: '__WORKER_ENTRYPOINT_BRAND'; - export const __DURABLE_OBJECT_BRAND: '__DURABLE_OBJECT_BRAND'; - export const __WORKFLOW_ENTRYPOINT_BRAND: '__WORKFLOW_ENTRYPOINT_BRAND'; + export const __RPC_STUB_BRAND: "__RPC_STUB_BRAND"; + export const __RPC_TARGET_BRAND: "__RPC_TARGET_BRAND"; + export const __WORKER_ENTRYPOINT_BRAND: "__WORKER_ENTRYPOINT_BRAND"; + export const __DURABLE_OBJECT_BRAND: "__DURABLE_OBJECT_BRAND"; + export const __WORKFLOW_ENTRYPOINT_BRAND: "__WORKFLOW_ENTRYPOINT_BRAND"; export interface RpcTargetBranded { [__RPC_TARGET_BRAND]: never; } @@ -5021,15 +5075,15 @@ declare namespace Rpc { // The reason for using a generic type here is to build a serializable subset of structured // cloneable composite types. This allows types defined with the "interface" keyword to pass the // serializable check as well. Otherwise, only types defined with the "type" keyword would pass. - type Serializable = + type Serializable = // Structured cloneables - BaseType + void | undefined | null | boolean | number | bigint | string | TypedArray | ArrayBuffer | DataView | Date | Error | RegExp // Structured cloneable composites | Map ? Serializable : never, T extends Map ? Serializable : never> | Set ? Serializable : never> | ReadonlyArray ? Serializable : never> | { [K in keyof T]: K extends number | string ? Serializable : never; } // Special types - | Stub + | ReadableStream | WritableStream | Request | Response | Headers | Stub // Serialized as stubs, see `Stubify` | Stubable; // Base type for all RPC stubs, including common memory management methods. @@ -5039,11 +5093,9 @@ declare namespace Rpc { dup(): this; } export type Stub = Provider & StubBase; - // This represents all the types that can be sent as-is over an RPC boundary - type BaseType = void | undefined | null | boolean | number | bigint | string | TypedArray | ArrayBuffer | DataView | Date | Error | RegExp | ReadableStream | WritableStream | Request | Response | Headers; // Recursively rewrite all `Stubable` types with `Stub`s // prettier-ignore - type Stubify = T extends Stubable ? Stub : T extends Map ? Map, Stubify> : T extends Set ? Set> : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends BaseType ? T : T extends { + type Stubify = T extends Stubable ? Stub : T extends Map ? Map, Stubify> : T extends Set ? Set> : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { [key: string | number]: any; } ? { [K in keyof T]: Stubify; @@ -5052,7 +5104,7 @@ declare namespace Rpc { // Note we use `StubBase` instead of `Stub` here to avoid circular dependencies: // `Stub` depends on `Provider`, which depends on `Unstubify`, which would depend on `Stub`. // prettier-ignore - type Unstubify = T extends StubBase ? V : T extends Map ? Map, Unstubify> : T extends Set ? Set> : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends BaseType ? T : T extends { + type Unstubify = T extends StubBase ? V : T extends Map ? Map, Unstubify> : T extends Set ? Set> : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { [key: string | number]: unknown; } ? { [K in keyof T]: Unstubify; @@ -5093,7 +5145,7 @@ declare namespace Cloudflare { interface Env { } } -declare module 'cloudflare:workers' { +declare module "cloudflare:workers" { export type RpcStub = Rpc.Stub; export const RpcStub: { new (value: T): Rpc.Stub; @@ -5125,11 +5177,11 @@ declare module 'cloudflare:workers' { webSocketClose?(ws: WebSocket, code: number, reason: string, wasClean: boolean): void | Promise; webSocketError?(ws: WebSocket, error: unknown): void | Promise; } - export type WorkflowDurationLabel = 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year'; - export type WorkflowSleepDuration = `${number} ${WorkflowDurationLabel}${'s' | ''}` | number; + export type WorkflowDurationLabel = "second" | "minute" | "hour" | "day" | "week" | "month" | "year"; + export type WorkflowSleepDuration = `${number} ${WorkflowDurationLabel}${"s" | ""}` | number; export type WorkflowDelayDuration = WorkflowSleepDuration; export type WorkflowTimeoutDuration = WorkflowSleepDuration; - export type WorkflowBackoff = 'constant' | 'linear' | 'exponential'; + export type WorkflowBackoff = "constant" | "linear" | "exponential"; export type WorkflowStepConfig = { retries?: { limit: number; @@ -5143,20 +5195,11 @@ declare module 'cloudflare:workers' { timestamp: Date; instanceId: string; }; - export type WorkflowStepEvent = { - payload: Readonly; - timestamp: Date; - type: string; - }; export abstract class WorkflowStep { do>(name: string, callback: () => Promise): Promise; do>(name: string, config: WorkflowStepConfig, callback: () => Promise): Promise; sleep: (name: string, duration: WorkflowSleepDuration) => Promise; sleepUntil: (name: string, timestamp: Date | number) => Promise; - waitForEvent>(name: string, options: { - type: string; - timeout?: WorkflowTimeoutDuration | number; - }): Promise>; } export abstract class WorkflowEntrypoint | unknown = unknown> implements Rpc.WorkflowEntrypointBranded { [Rpc.__WORKFLOW_ENTRYPOINT_BRAND]: never; @@ -5609,7 +5652,7 @@ interface DispatchNamespace { [key: string]: any; }, options?: DynamicDispatchOptions): Fetcher; } -declare module 'cloudflare:workflows' { +declare module "cloudflare:workflows" { /** * NonRetryableError allows for a user to throw a fatal error * that makes a Workflow instance fail immediately without triggering a retry @@ -5650,11 +5693,11 @@ interface WorkflowInstanceCreateOptions { params?: PARAMS; } type InstanceStatus = { - status: 'queued' // means that instance is waiting to be started (see concurrency limits) - | 'running' | 'paused' | 'errored' | 'terminated' // user terminated the instance while it was running - | 'complete' | 'waiting' // instance is hibernating and waiting for sleep or event to finish - | 'waitingForPause' // instance is finishing the current work to pause - | 'unknown'; + status: "queued" // means that instance is waiting to be started (see concurrency limits) + | "running" | "paused" | "errored" | "terminated" // user terminated the instance while it was running + | "complete" | "waiting" // instance is hibernating and waiting for sleep or event to finish + | "waitingForPause" // instance is finishing the current work to pause + | "unknown"; error?: string; output?: object; }; @@ -5684,11 +5727,4 @@ declare abstract class WorkflowInstance { * Returns the current status of the instance. */ public status(): Promise; - /** - * Send an event to this instance. - */ - public sendEvent({ type, payload, }: { - type: string; - payload: unknown; - }): Promise; } diff --git a/apps/sandbox-container/server/index.ts b/apps/sandbox-container/server/index.ts index 3e8855e5..b7de9415 100644 --- a/apps/sandbox-container/server/index.ts +++ b/apps/sandbox-container/server/index.ts @@ -5,6 +5,7 @@ import { handleTokenExchangeCallback, } from '@repo/mcp-common/src/cloudflare-oauth-handler' import { getEnv } from '@repo/mcp-common/src/env' +import { RequiredScopes } from '@repo/mcp-common/src/scopes' import { MetricsTracker } from '@repo/mcp-observability' import { ContainerManager } from './containerManager' @@ -32,12 +33,10 @@ export type Props = { } const ContainerScopes = { + ...RequiredScopes, 'account:read': 'See your account info such as account details, analytics, and memberships.', - 'user:read': 'See your user info such as name, email address, and account memberships.', 'workers:write': 'See and change Cloudflare Workers data such as zones, KV storage, namespaces, scripts, and routes.', - 'workers_observability:read': 'See observability logs for your account', - offline_access: 'Grants refresh tokens for long-lived access.', } as const export default { @@ -61,7 +60,6 @@ export default { return new OAuthProvider({ apiRoute: '/sse', - // @ts-ignore apiHandler: ContainerMcpAgent.mount('/sse', { binding: 'CONTAINER_MCP_AGENT' }), // @ts-ignore defaultHandler: createAuthHandlers({ scopes: ContainerScopes, metrics }), diff --git a/apps/workers-bindings/src/index.ts b/apps/workers-bindings/src/index.ts index 1e9b2a5d..08a70df8 100644 --- a/apps/workers-bindings/src/index.ts +++ b/apps/workers-bindings/src/index.ts @@ -6,6 +6,7 @@ import { handleTokenExchangeCallback, } from '@repo/mcp-common/src/cloudflare-oauth-handler' import { getEnv } from '@repo/mcp-common/src/env' +import { RequiredScopes } from '@repo/mcp-common/src/scopes' import { CloudflareMCPServer } from '@repo/mcp-common/src/server' import { registerAccountTools } from '@repo/mcp-common/src/tools/account' import { registerD1Tools } from '@repo/mcp-common/src/tools/d1' @@ -95,19 +96,16 @@ export class WorkersBindingsMCP extends McpAgent { } const ObservabilityScopes = { + ...RequiredScopes, 'account:read': 'See your account info such as account details, analytics, and memberships.', - 'user:read': 'See your user info such as name, email address, and account memberships.', 'workers:write': 'See and change Cloudflare Workers data such as zones, KV storage, namespaces, scripts, and routes.', 'workers_observability:read': 'See observability logs for your account', - offline_access: 'Grants refresh tokens for long-lived access.', } as const export default new OAuthProvider({ apiRoute: '/sse', - // @ts-ignore apiHandler: ObservabilityMCP.mount('/sse'), // @ts-ignore defaultHandler: createAuthHandlers({ scopes: ObservabilityScopes, metrics }), diff --git a/packages/mcp-common/src/scopes.ts b/packages/mcp-common/src/scopes.ts new file mode 100644 index 00000000..7769de67 --- /dev/null +++ b/packages/mcp-common/src/scopes.ts @@ -0,0 +1,5 @@ +// These scopes are required for Cloudflare auth +export const RequiredScopes = { + 'user:read': 'See your user info such as name, email address, and account memberships.', + offline_access: 'Grants refresh tokens for long-lived access.', +} as const diff --git a/packages/mcp-common/src/sentry.ts b/packages/mcp-common/src/sentry.ts index 7c71b1a0..64662c3c 100644 --- a/packages/mcp-common/src/sentry.ts +++ b/packages/mcp-common/src/sentry.ts @@ -76,7 +76,7 @@ function initSentry( 'content-type', 'host', ], - // Allow ONLY the “scope” param in order to recording jwt, code, state and any other callback params + // Allow ONLY the “scope” param in order to avoid recording jwt, code, state and any other callback params allowedSearchParams: /^scope$/, }, integrations: [