import type { ToolExecutionErrorSchemaVersion } from '../tool-execution-error'; import type { ToolResponseContract } from '../play-runtime/tool-response-contract'; import type { PlayAuthoringContractEdition } from './authoring-contract'; export type PlayPackageImport = { name: string; version: string | null; }; export type PlayImportPolicy = { localFiles: string[]; nodeBuiltins: string[]; packages: PlayPackageImport[]; }; export type PlayRuntimeFeature = | 'artifact_storage' | 'checkpoint_resume' | 'durable_sleep' | 'packaged_files'; export type PlayArtifactCompatibility = { apiVersion: number; artifactVersion: number; minRunnerVersion: number; runtimeFeatures: PlayRuntimeFeature[]; runtimeBackend?: string | null; /** Missing preserves the legacy schema used before this field existed. */ toolErrorSchemaVersion?: ToolExecutionErrorSchemaVersion; /** Missing preserves edition 1 for artifacts created before authoring contracts were pinned. */ authoringContractEdition?: PlayAuthoringContractEdition; /** Missing preserves the raw-only V2 execute response contract. */ toolResponseContract?: ToolResponseContract; /** Missing preserves the receipt namespace of artifacts created before this revision existed. */ toolResponseReceiptRevision?: string; }; /** The only executable Play artifact contract. */ export type PlayArtifactKind = 'cjs_node20'; export type PlayBundleArtifact = { codeFormat: 'cjs_module'; /** Defaults to cjs_node20 when not present on legacy Node artifacts. */ artifactKind?: PlayArtifactKind; entryFile: string; virtualFilename: string; sourceHash: string; graphHash: string; artifactHash: string; sourceMapHash: string; bundledCode: string; sourceMap: string; importPolicy: PlayImportPolicy; compatibility: PlayArtifactCompatibility; generatedAt: number; cacheHit: boolean; };