diff --git a/experiments/ai-stream/.gitignore b/experiments/ai-stream/.gitignore
deleted file mode 100644
index c4ae5db45..000000000
--- a/experiments/ai-stream/.gitignore
+++ /dev/null
@@ -1,64 +0,0 @@
-# Node modules
-node_modules
-
-# Logs
-logs
-*.log
-npm-debug.log*
-pnpm-debug.log*
-
-# Environment variables
-.env
-.dev.vars
-
-# Vite build output
-dist
-
-# TypeScript
-*.tsbuildinfo
-
-# IDEs and editors
-.vscode/
-.idea/
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
-
-# MacOS
-.DS_Store
-
-# Optional npm cache directory
-.npm
-
-# Optional eslint cache
-.eslintcache
-
-# Optional stylelint cache
-.stylelintcache
-
-# Optional REPL history
-.node_repl_history
-
-# Output of 'npm pack'
-*.tgz
-
-# pnpm store directory
-.pnpm-store
-
-# dotenv environment variables file
-.env.local
-.env.development.local
-.env.test.local
-.env.production.local
-
-# Vite cache
-.vite
-
-# Coverage directory used by tools like istanbul
-coverage
-
-# Temporary files
-*.tmp
-*.temp
\ No newline at end of file
diff --git a/experiments/ai-stream/.prettierrc b/experiments/ai-stream/.prettierrc
deleted file mode 100644
index 37c8d5d7e..000000000
--- a/experiments/ai-stream/.prettierrc
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "overrides": [
- {
- "files": "*.jsonc",
- "options": {
- "trailingComma": "none"
- }
- }
- ]
-}
diff --git a/experiments/ai-stream/README.md b/experiments/ai-stream/README.md
deleted file mode 100644
index 8a93679d6..000000000
--- a/experiments/ai-stream/README.md
+++ /dev/null
@@ -1,52 +0,0 @@
-# Minimal Starter
-
-This starter gives you a bare-bones RedwoodJS project.
-
-Create your new project:
-
-```shell
-npx degit redwoodjs/sdk/starters/minimal my-project-name
-cd my-project-name
-pnpm install
-```
-
-## Running the dev server
-
-```shell
-pnpm dev
-```
-
-Point your browser to the URL displayed in the terminal (e.g. `http://localhost:2332/`). You should see a "Hello World" message in your browser.
-
-##
-
-Within your project's `wrangler.jsonc` file, replace the placeholder values. For example:
-
-```jsonc:wrangler.jsonc
-{
- "$schema": "node_modules/wrangler/config-schema.json",
- "name": "my-project-name",
- "main": "src/worker.tsx",
- "compatibility_date": "2024-09-23",
- "compatibility_flags": ["nodejs_compat"],
- "assets": {
- "binding": "ASSETS",
- "directory": "public"
- },
- "workers_dev": false,
- "routes": [
- {
- "pattern": "my-project-name.example.com",
- "custom_domain": true
- }
- ],
- "observability": {
- "enabled": true
- }
-}
-```
-
-## Further Reading
-
-- [RedwoodJS Documentation](https://redwoodjs.com)
-- [Cloudflare Workers Documentation](https://developers.cloudflare.com/workers)
diff --git a/experiments/ai-stream/src/app/Document.tsx b/experiments/ai-stream/src/app/Document.tsx
deleted file mode 100644
index cbe5d5792..000000000
--- a/experiments/ai-stream/src/app/Document.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-export const Document: React.FC<{ children: React.ReactNode }> = ({
- children,
-}) => (
-
-
-
-
- @redwoodjs/starter-minimal
-
-
-
- {children}
-
-
-);
diff --git a/experiments/ai-stream/src/app/headers.ts b/experiments/ai-stream/src/app/headers.ts
deleted file mode 100644
index 59b035ee6..000000000
--- a/experiments/ai-stream/src/app/headers.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { RouteMiddleware } from "@redwoodjs/sdk/router";
-import { IS_DEV } from "@redwoodjs/sdk/constants";
-
-export const setCommonHeaders =
- (): RouteMiddleware =>
- ({ headers, rw: { nonce } }) => {
- if (!IS_DEV) {
- // Forces browsers to always use HTTPS for a specified time period (2 years)
- headers.set(
- "Strict-Transport-Security",
- "max-age=63072000; includeSubDomains; preload",
- );
- }
-
- // Forces browser to use the declared content-type instead of trying to guess/sniff it
- headers.set("X-Content-Type-Options", "nosniff");
-
- // Stops browsers from sending the referring webpage URL in HTTP headers
- headers.set("Referrer-Policy", "no-referrer");
-
- // Explicitly disables access to specific browser features/APIs
- headers.set(
- "Permissions-Policy",
- "geolocation=(), microphone=(), camera=()",
- );
-
- // Defines trusted sources for content loading and script execution:
- headers.set(
- "Content-Security-Policy",
- `default-src 'self'; script-src 'self' 'nonce-${nonce}' https://challenges.cloudflare.com; style-src 'self' 'unsafe-inline'; frame-src https://challenges.cloudflare.com; object-src 'none';`,
- );
- };
diff --git a/experiments/ai-stream/src/app/pages/Chat/Chat.tsx b/experiments/ai-stream/src/app/pages/Chat/Chat.tsx
deleted file mode 100644
index 66a003c4a..000000000
--- a/experiments/ai-stream/src/app/pages/Chat/Chat.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-"use client";
-
-import { sendMessage } from "./functions";
-import { useState } from "react";
-import { consumeEventStream } from "@redwoodjs/sdk/client";
-
-export function Chat() {
- const [message, setMessage] = useState("");
- const [reply, setReply] = useState("");
-
- const onClick = async () => {
- setReply(""); // Reset reply before new message
- (await sendMessage(message)).pipeTo(
- consumeEventStream({
- onChunk: (event) => {
- setReply(
- (prev) =>
- prev +
- (event.data === "[DONE]" ? "" : JSON.parse(event.data).response),
- );
- },
- }),
- );
- };
-
- return (
-
-
setMessage(e.target.value)}
- style={{
- width: "80%",
- padding: "10px",
- marginRight: "8px",
- borderRadius: "4px",
- border: "1px solid #ccc",
- }}
- />
-
-
{reply}
-
- );
-}
diff --git a/experiments/ai-stream/src/app/pages/Chat/functions.ts b/experiments/ai-stream/src/app/pages/Chat/functions.ts
deleted file mode 100644
index 7515ac763..000000000
--- a/experiments/ai-stream/src/app/pages/Chat/functions.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-"use server";
-
-import { HandlerOptions } from "@redwoodjs/sdk/router";
-
-export async function sendMessage(message: string, opts?: HandlerOptions) {
- const response = await opts!.env.AI.run("@cf/meta/llama-3.1-8b-instruct", {
- prompt: message,
- stream: true,
- });
-
- return response as unknown as ReadableStream;
-}
diff --git a/experiments/ai-stream/src/app/shared/links.ts b/experiments/ai-stream/src/app/shared/links.ts
deleted file mode 100644
index ff121945d..000000000
--- a/experiments/ai-stream/src/app/shared/links.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { defineLinks } from "@redwoodjs/sdk/router";
-
-export const link = defineLinks(["/"]);
diff --git a/experiments/ai-stream/src/client.tsx b/experiments/ai-stream/src/client.tsx
deleted file mode 100644
index e30559a23..000000000
--- a/experiments/ai-stream/src/client.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-import { initClient } from "@redwoodjs/sdk/client";
-
-initClient();
diff --git a/experiments/ai-stream/src/worker.tsx b/experiments/ai-stream/src/worker.tsx
deleted file mode 100644
index cf66bba87..000000000
--- a/experiments/ai-stream/src/worker.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-import { defineApp } from "@redwoodjs/sdk/worker";
-import { index, render } from "@redwoodjs/sdk/router";
-import { Document } from "src/Document";
-import { Chat } from "src/pages/Chat/Chat";
-import { setCommonHeaders } from "src/headers";
-
-type AppContext = {};
-
-export default defineApp([
- setCommonHeaders(),
- render(Document, [index([Chat])]),
-]);
diff --git a/experiments/ai-stream/tsconfig.json b/experiments/ai-stream/tsconfig.json
deleted file mode 100644
index daf64777b..000000000
--- a/experiments/ai-stream/tsconfig.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "compilerOptions": {
- /* Visit https://aka.ms/tsconfig.json to read more about this file */
-
- /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
- "target": "es2021",
- /* Specify a set of bundled library declaration files that describe the target runtime environment. */
- "lib": ["DOM", "DOM.Iterable", "ESNext", "ES2022"],
- /* Specify what JSX code is generated. */
- "jsx": "react-jsx",
-
- /* Specify what module code is generated. */
- "module": "es2022",
- /* Specify how TypeScript looks up a file from a given module specifier. */
- "moduleResolution": "bundler",
- /* Specify type package names to be included without being referenced in a source file. */
- "types": [
- "worker-configuration.d.ts",
- "./types/react.d.ts",
- "./types/global.d.ts",
- "./types/vite.d.ts"
- ],
- "paths": {
- "src/*": ["./src/app/*"]
- },
- /* Enable importing .json files */
- "resolveJsonModule": true,
-
- /* Enable error reporting in type-checked JavaScript files. */
- "checkJs": false,
-
- /* Disable emitting files from a compilation. */
- "noEmit": true,
-
- /* Ensure that each file can be safely transpiled without relying on other imports. */
- "isolatedModules": true,
- /* Allow 'import x from y' when a module doesn't have a default export. */
- "allowSyntheticDefaultImports": true,
- /* Ensure that casing is correct in imports. */
- "forceConsistentCasingInFileNames": true,
-
- /* Enable all strict type-checking options. */
- "strict": true,
-
- /* Skip type checking all .d.ts files. */
- "skipLibCheck": true
- }
-}
diff --git a/experiments/ai-stream/types/vite.d.ts b/experiments/ai-stream/types/vite.d.ts
deleted file mode 100644
index b5fcf6f0e..000000000
--- a/experiments/ai-stream/types/vite.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-declare module "*?url" {
- const result: string;
- export default result;
-}
diff --git a/experiments/ai-stream/vite.config.mts b/experiments/ai-stream/vite.config.mts
deleted file mode 100644
index 4de771a82..000000000
--- a/experiments/ai-stream/vite.config.mts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { defineConfig } from "vite";
-import { redwood } from "@redwoodjs/sdk/vite";
-
-export default defineConfig({
- plugins: [redwood()],
-});
diff --git a/experiments/ai-stream/worker-configuration.d.ts b/experiments/ai-stream/worker-configuration.d.ts
deleted file mode 100644
index 4291997b2..000000000
--- a/experiments/ai-stream/worker-configuration.d.ts
+++ /dev/null
@@ -1,5725 +0,0 @@
-// Generated by Wrangler by running `wrangler types` (hash: 75fef6238545cb5241c0bac93c68044d)
-// Runtime types generated with workerd@1.20250320.0 2024-09-23 nodejs_compat
-declare namespace Cloudflare {
- interface Env {
- TEST: string;
- AI: Ai;
- ASSETS: Fetcher;
- }
-}
-interface Env extends Cloudflare.Env {}
-
-// Begin runtime types
-/*! *****************************************************************************
-Copyright (c) Cloudflare. All rights reserved.
-Copyright (c) Microsoft Corporation. All rights reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-/* eslint-disable */
-// noinspection JSUnusedGlobalSymbols
-declare var onmessage: never;
-/**
- * An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException)
- */
-declare class DOMException extends Error {
- constructor(message?: string, name?: string);
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message) */
- readonly message: string;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name) */
- readonly name: string;
- /**
- * @deprecated
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/code)
- */
- readonly code: number;
- static readonly INDEX_SIZE_ERR: number;
- static readonly DOMSTRING_SIZE_ERR: number;
- static readonly HIERARCHY_REQUEST_ERR: number;
- static readonly WRONG_DOCUMENT_ERR: number;
- static readonly INVALID_CHARACTER_ERR: number;
- static readonly NO_DATA_ALLOWED_ERR: number;
- static readonly NO_MODIFICATION_ALLOWED_ERR: number;
- static readonly NOT_FOUND_ERR: number;
- static readonly NOT_SUPPORTED_ERR: number;
- static readonly INUSE_ATTRIBUTE_ERR: number;
- static readonly INVALID_STATE_ERR: number;
- static readonly SYNTAX_ERR: number;
- static readonly INVALID_MODIFICATION_ERR: number;
- static readonly NAMESPACE_ERR: number;
- static readonly INVALID_ACCESS_ERR: number;
- static readonly VALIDATION_ERR: number;
- static readonly TYPE_MISMATCH_ERR: number;
- static readonly SECURITY_ERR: number;
- static readonly NETWORK_ERR: number;
- static readonly ABORT_ERR: number;
- static readonly URL_MISMATCH_ERR: number;
- static readonly QUOTA_EXCEEDED_ERR: number;
- static readonly TIMEOUT_ERR: number;
- static readonly INVALID_NODE_TYPE_ERR: number;
- static readonly DATA_CLONE_ERR: number;
- get stack(): any;
- set stack(value: any);
-}
-type WorkerGlobalScopeEventMap = {
- fetch: FetchEvent;
- scheduled: ScheduledEvent;
- queue: QueueEvent;
- unhandledrejection: PromiseRejectionEvent;
- rejectionhandled: PromiseRejectionEvent;
-};
-declare abstract class WorkerGlobalScope extends EventTarget {
- EventTarget: typeof EventTarget;
-}
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console) */
-interface Console {
- "assert"(condition?: boolean, ...data: any[]): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static) */
- clear(): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static) */
- count(label?: string): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countreset_static) */
- countReset(label?: string): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static) */
- debug(...data: any[]): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static) */
- dir(item?: any, options?: any): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static) */
- dirxml(...data: any[]): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static) */
- error(...data: any[]): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static) */
- group(...data: any[]): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupcollapsed_static) */
- groupCollapsed(...data: any[]): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupend_static) */
- groupEnd(): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static) */
- info(...data: any[]): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static) */
- log(...data: any[]): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static) */
- table(tabularData?: any, properties?: string[]): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static) */
- time(label?: string): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeend_static) */
- timeEnd(label?: string): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timelog_static) */
- timeLog(label?: string, ...data: any[]): void;
- timeStamp(label?: string): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static) */
- trace(...data: any[]): void;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static) */
- warn(...data: any[]): void;
-}
-declare const console: Console;
-type BufferSource = ArrayBufferView | ArrayBuffer;
-type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
-declare namespace WebAssembly {
- class CompileError extends Error {
- constructor(message?: string);
- }
- class RuntimeError extends Error {
- constructor(message?: string);
- }
- type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128";
- interface GlobalDescriptor {
- value: ValueType;
- mutable?: boolean;
- }
- class Global {
- constructor(descriptor: GlobalDescriptor, value?: any);
- value: any;
- valueOf(): any;
- }
- type ImportValue = ExportValue | number;
- type ModuleImports = Record;
- type Imports = Record;
- type ExportValue = Function | Global | Memory | Table;
- type Exports = Record;
- class Instance {
- constructor(module: Module, imports?: Imports);
- readonly exports: Exports;
- }
- interface MemoryDescriptor {
- initial: number;
- maximum?: number;
- shared?: boolean;
- }
- class Memory {
- constructor(descriptor: MemoryDescriptor);
- readonly buffer: ArrayBuffer;
- grow(delta: number): number;
- }
- type ImportExportKind = "function" | "global" | "memory" | "table";
- interface ModuleExportDescriptor {
- kind: ImportExportKind;
- name: string;
- }
- interface ModuleImportDescriptor {
- kind: ImportExportKind;
- module: string;
- name: string;
- }
- abstract class Module {
- static customSections(module: Module, sectionName: string): ArrayBuffer[];
- static exports(module: Module): ModuleExportDescriptor[];
- static imports(module: Module): ModuleImportDescriptor[];
- }
- type TableKind = "anyfunc" | "externref";
- interface TableDescriptor {
- element: TableKind;
- initial: number;
- maximum?: number;
- }
- class Table {
- constructor(descriptor: TableDescriptor, value?: any);
- readonly length: number;
- get(index: number): any;
- grow(delta: number, value?: any): number;
- set(index: number, value?: any): void;
- }
- function instantiate(module: Module, imports?: Imports): Promise;
- function validate(bytes: BufferSource): boolean;
-}
-/**
- * This ServiceWorker API interface represents the global execution context of a service worker.
- * Available only in secure contexts.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)
- */
-interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
- DOMException: typeof DOMException;
- WorkerGlobalScope: typeof WorkerGlobalScope;
- btoa(data: string): string;
- atob(data: string): string;
- setTimeout(callback: (...args: any[]) => void, msDelay?: number): number;
- setTimeout(callback: (...args: Args) => void, msDelay?: number, ...args: Args): number;
- clearTimeout(timeoutId: number | null): void;
- setInterval(callback: (...args: any[]) => void, msDelay?: number): number;
- setInterval(callback: (...args: Args) => void, msDelay?: number, ...args: Args): number;
- clearInterval(timeoutId: number | null): void;
- queueMicrotask(task: Function): void;
- structuredClone(value: T, options?: StructuredSerializeOptions): T;
- reportError(error: any): void;
- fetch(input: RequestInfo | URL, init?: RequestInit): Promise;
- self: ServiceWorkerGlobalScope;
- crypto: Crypto;
- caches: CacheStorage;
- scheduler: Scheduler;
- performance: Performance;
- Cloudflare: Cloudflare;
- readonly origin: string;
- Event: typeof Event;
- ExtendableEvent: typeof ExtendableEvent;
- CustomEvent: typeof CustomEvent;
- PromiseRejectionEvent: typeof PromiseRejectionEvent;
- FetchEvent: typeof FetchEvent;
- TailEvent: typeof TailEvent;
- TraceEvent: typeof TailEvent;
- ScheduledEvent: typeof ScheduledEvent;
- MessageEvent: typeof MessageEvent;
- CloseEvent: typeof CloseEvent;
- ReadableStreamDefaultReader: typeof ReadableStreamDefaultReader;
- ReadableStreamBYOBReader: typeof ReadableStreamBYOBReader;
- ReadableStream: typeof ReadableStream;
- WritableStream: typeof WritableStream;
- WritableStreamDefaultWriter: typeof WritableStreamDefaultWriter;
- TransformStream: typeof TransformStream;
- ByteLengthQueuingStrategy: typeof ByteLengthQueuingStrategy;
- CountQueuingStrategy: typeof CountQueuingStrategy;
- ErrorEvent: typeof ErrorEvent;
- EventSource: typeof EventSource;
- ReadableStreamBYOBRequest: typeof ReadableStreamBYOBRequest;
- ReadableStreamDefaultController: typeof ReadableStreamDefaultController;
- ReadableByteStreamController: typeof ReadableByteStreamController;
- WritableStreamDefaultController: typeof WritableStreamDefaultController;
- TransformStreamDefaultController: typeof TransformStreamDefaultController;
- CompressionStream: typeof CompressionStream;
- DecompressionStream: typeof DecompressionStream;
- TextEncoderStream: typeof TextEncoderStream;
- TextDecoderStream: typeof TextDecoderStream;
- Headers: typeof Headers;
- Body: typeof Body;
- Request: typeof Request;
- Response: typeof Response;
- WebSocket: typeof WebSocket;
- WebSocketPair: typeof WebSocketPair;
- WebSocketRequestResponsePair: typeof WebSocketRequestResponsePair;
- AbortController: typeof AbortController;
- AbortSignal: typeof AbortSignal;
- TextDecoder: typeof TextDecoder;
- TextEncoder: typeof TextEncoder;
- navigator: Navigator;
- Navigator: typeof Navigator;
- URL: typeof URL;
- URLSearchParams: typeof URLSearchParams;
- URLPattern: typeof URLPattern;
- Blob: typeof Blob;
- File: typeof File;
- FormData: typeof FormData;
- Crypto: typeof Crypto;
- SubtleCrypto: typeof SubtleCrypto;
- CryptoKey: typeof CryptoKey;
- CacheStorage: typeof CacheStorage;
- Cache: typeof Cache;
- 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;
-/**
- * Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
- */
-declare function dispatchEvent(event: WorkerGlobalScopeEventMap[keyof WorkerGlobalScopeEventMap]): boolean;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
-declare function btoa(data: string): string;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
-declare function atob(data: string): string;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
-declare function setTimeout(callback: (...args: any[]) => void, msDelay?: number): number;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
-declare function setTimeout(callback: (...args: Args) => void, msDelay?: number, ...args: Args): number;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */
-declare function clearTimeout(timeoutId: number | null): void;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
-declare function setInterval(callback: (...args: any[]) => void, msDelay?: number): number;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
-declare function setInterval(callback: (...args: Args) => void, msDelay?: number, ...args: Args): number;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */
-declare function clearInterval(timeoutId: number | null): void;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */
-declare function queueMicrotask(task: Function): void;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
-declare function structuredClone(value: T, options?: StructuredSerializeOptions): T;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */
-declare function reportError(error: any): void;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */
-declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise;
-declare const self: ServiceWorkerGlobalScope;
-/**
-* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
-* The Workers runtime implements the full surface of this API, but with some differences in
-* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
-* compared to those implemented in most browsers.
-*
-* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
-*/
-declare const crypto: Crypto;
-/**
-* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
-*
-* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
-*/
-declare const caches: CacheStorage;
-declare const scheduler: Scheduler;
-/**
-* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
-* as well as timing of subrequests and other operations.
-*
-* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
-*/
-declare const performance: Performance;
-declare const Cloudflare: Cloudflare;
-declare const origin: string;
-declare const navigator: Navigator;
-interface TestController {
-}
-interface ExecutionContext {
- waitUntil(promise: Promise): void;
- passThroughOnException(): void;
- props: any;
-}
-type ExportedHandlerFetchHandler = (request: Request>, env: Env, ctx: ExecutionContext) => Response | Promise;
-type ExportedHandlerTailHandler = (events: TraceItem[], env: Env, ctx: ExecutionContext) => void | Promise;
-type ExportedHandlerTraceHandler = (traces: TraceItem[], env: Env, ctx: ExecutionContext) => void | Promise;
-type ExportedHandlerTailStreamHandler = (event: TailStream.TailEvent, env: Env, ctx: ExecutionContext) => TailStream.TailEventHandlerType | Promise;
-type ExportedHandlerScheduledHandler = (controller: ScheduledController, env: Env, ctx: ExecutionContext) => void | Promise;
-type ExportedHandlerQueueHandler = (batch: MessageBatch, env: Env, ctx: ExecutionContext) => void | Promise;
-type ExportedHandlerTestHandler = (controller: TestController, env: Env, ctx: ExecutionContext) => void | Promise;
-interface ExportedHandler {
- fetch?: ExportedHandlerFetchHandler;
- tail?: ExportedHandlerTailHandler;
- trace?: ExportedHandlerTraceHandler;
- tailStream?: ExportedHandlerTailStreamHandler;
- scheduled?: ExportedHandlerScheduledHandler;
- test?: ExportedHandlerTestHandler;
- email?: EmailExportedHandler;
- queue?: ExportedHandlerQueueHandler;
-}
-interface StructuredSerializeOptions {
- transfer?: any[];
-}
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */
-declare abstract class PromiseRejectionEvent extends Event {
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
- readonly promise: Promise;
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
- readonly reason: any;
-}
-declare abstract class Navigator {
- sendBeacon(url: string, body?: (ReadableStream | string | (ArrayBuffer | ArrayBufferView) | Blob | FormData | URLSearchParams | URLSearchParams)): boolean;
- readonly userAgent: string;
- readonly gpu?: GPU;
-}
-/**
-* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
-* as well as timing of subrequests and other operations.
-*
-* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
-*/
-interface Performance {
- /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
- readonly timeOrigin: number;
- /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
- now(): number;
-}
-interface AlarmInvocationInfo {
- readonly isRetry: boolean;
- readonly retryCount: number;
-}
-interface Cloudflare {
- readonly compatibilityFlags: Record;
-}
-interface DurableObject {
- fetch(request: Request): Response | Promise;
- alarm?(alarmInfo?: AlarmInvocationInfo): void | Promise;
- webSocketMessage?(ws: WebSocket, message: string | ArrayBuffer): void | Promise;
- webSocketClose?(ws: WebSocket, code: number, reason: string, wasClean: boolean): void | Promise;
- webSocketError?(ws: WebSocket, error: unknown): void | Promise;
-}
-type DurableObjectStub = Fetcher & {
- readonly id: DurableObjectId;
- readonly name?: string;
-};
-interface DurableObjectId {
- toString(): string;
- equals(other: DurableObjectId): boolean;
- readonly name?: string;
-}
-interface DurableObjectNamespace {
- newUniqueId(options?: DurableObjectNamespaceNewUniqueIdOptions): DurableObjectId;
- idFromName(name: string): DurableObjectId;
- idFromString(id: string): DurableObjectId;
- get(id: DurableObjectId, options?: DurableObjectNamespaceGetDurableObjectOptions): DurableObjectStub;
- jurisdiction(jurisdiction: DurableObjectJurisdiction): DurableObjectNamespace;
-}
-type DurableObjectJurisdiction = "eu" | "fedramp";
-interface DurableObjectNamespaceNewUniqueIdOptions {
- jurisdiction?: DurableObjectJurisdiction;
-}
-type DurableObjectLocationHint = "wnam" | "enam" | "sam" | "weur" | "eeur" | "apac" | "oc" | "afr" | "me";
-interface DurableObjectNamespaceGetDurableObjectOptions {
- locationHint?: DurableObjectLocationHint;
-}
-interface DurableObjectState {
- waitUntil(promise: Promise): void;
- readonly id: DurableObjectId;
- readonly storage: DurableObjectStorage;
- container?: Container;
- blockConcurrencyWhile(callback: () => Promise): Promise;
- acceptWebSocket(ws: WebSocket, tags?: string[]): void;
- getWebSockets(tag?: string): WebSocket[];
- setWebSocketAutoResponse(maybeReqResp?: WebSocketRequestResponsePair): void;
- getWebSocketAutoResponse(): WebSocketRequestResponsePair | null;
- getWebSocketAutoResponseTimestamp(ws: WebSocket): Date | null;
- setHibernatableWebSocketEventTimeout(timeoutMs?: number): void;
- getHibernatableWebSocketEventTimeout(): number | null;
- getTags(ws: WebSocket): string[];
- abort(reason?: string): void;
-}
-interface DurableObjectTransaction {
- get(key: string, options?: DurableObjectGetOptions): Promise;
- get(keys: string[], options?: DurableObjectGetOptions): Promise