import type { GraphQLClient } from '../client.js'; import { type PlayerComputeArtifactQuery, type PlayerComputeArtifactQueryVariables, type PlayerComputeUsageQuery, type PlayerComputeUsageQueryVariables, type PlayerComputeRunsQuery, type PlayerComputeRunsQueryVariables, type PlayerComputeLogsQuery, type PlayerComputeLogsQueryVariables, type PlayerComputeSetSwitchMutation, type PlayerComputeSetSwitchMutationVariables, type PlayerComputeSwitchesQuery, type PlayerComputeSwitchesQueryVariables, type PlayerComputeDeployMutation, type PlayerComputeDeployMutationVariables, type PlayerComputeSetEnabledMutation, type PlayerComputeSetEnabledMutationVariables, type PlayerComputeSetRequiresMutation, type PlayerComputeSetRequiresMutationVariables, type PlayerComputeMyModulesQuery, type PlayerComputeMyModulesQueryVariables, type PlayerComputeVersionsQuery, type PlayerComputeVersionsQueryVariables, type PlayerComputeDeleteMutation, type PlayerComputeDeleteMutationVariables, type PlayerComputeInvokeMutation, type PlayerComputeInvokeMutationVariables } from '../generated/graphql.js'; /** * Player-authored Rust/WASM bound to player-owned grids — exposed as * `client.playerCompute` and routed to the Game API. * * Deploying requires current grid ownership plus the target-specific * `write_server_code` or `write_client_code` permission at both the app-tier * and grid ACL layers. Enabling separately requires the matching run * permission, a successful compile, and app admission when strict allow-list * mode is active. Closed source remains visible only to its personal author. */ export declare class PlayerComputeAPI { private readonly graphql; constructor(graphql: GraphQLClient); /** * Create or update a grid-bound module and publish an immutable pending * source version. Compilation is asynchronous. */ deploy(input: PlayerComputeDeployMutationVariables['input']): Promise; /** * Request activation or stop execution. Enabling checks ownership, run * permission, compile success, and app code admission independently of * authoring permission. */ setEnabled(variables: PlayerComputeSetEnabledMutationVariables): Promise; /** * Set or clear the required CLIENT companion for the current SERVER module * version. Both modules must be caller-authored, compiled, and in the same * owned grid; pass `requiredClientName: null` to clear the edge. */ setRequires(variables: PlayerComputeSetRequiresMutationVariables): Promise; /** * List modules authored by the caller or installed on grids they currently * own. Closed source is not included in this module-level result. */ myModules(variables: PlayerComputeMyModulesQueryVariables): Promise; /** * List immutable versions newest-first. Source and compile logs are redacted * unless the caller is the personal author or the version is open source. */ versions(variables: PlayerComputeVersionsQueryVariables): Promise; /** * Delete a self-authored module and its versions. The caller must still own * the grid. Returns false when no matching module exists. */ delete(variables: PlayerComputeDeleteMutationVariables): Promise; /** Invoke an enabled/admitted server module synchronously as the grid owner. */ invoke(variables: PlayerComputeInvokeMutationVariables): Promise; /** * The caller's spend/quota view for one app (P2): compute units burned in * the current clock hour/day vs the effective policy caps, compile-quota * utilization, and the wallet/spend-cap gate state with its typed reason * (PLAYER_QUOTA_EXHAUSTED / PLAYER_WALLET_EMPTY / PLAYER_SPEND_CAP / * PLAYER_COMPUTE_KILLED). The remaining-budget source for a live cost * meter. */ usage(variables: PlayerComputeUsageQueryVariables): Promise; /** Executions on an owned grid, newest first (attributed to the grid owner). */ runs(variables: PlayerComputeRunsQueryVariables): Promise; /** Failed-run diagnostics on an owned grid (typed error kinds), newest first. */ logs(variables: PlayerComputeLogsQueryVariables): Promise; /** * Throw or release a kill-ladder switch at player/grid/app scope (studio, * requires `manage_compute`). Quota state is retained across a kill. */ setSwitch(variables: PlayerComputeSetSwitchMutationVariables): Promise; /** Active kill-ladder switches (studio, requires `view_compute_diagnostics`). */ switches(variables: PlayerComputeSwitchesQueryVariables): Promise; /** * Fetch a compiled CLIENT artifact + metadata for the browser broker (P3). * Fail-closed server-side (ownership, authorship, run_client_code, * admission). Returns the metadata as-is; use {@link artifactBytes} to get * the decoded ArrayBuffer ready to hand {@link PlayerCodeBroker.start}. */ artifact(variables: PlayerComputeArtifactQueryVariables): Promise; /** * Fetch a client artifact and decode its bytes to an ArrayBuffer plus the * broker inputs (content hash for side-load verification, per-dispatch fuel * budget). Convenience over {@link artifact} for the Crowdy Studio CLIENT * deploy loop. */ artifactBytes(variables: PlayerComputeArtifactQueryVariables): Promise<{ bytes: ArrayBuffer; artifactHash: string; fuelPerDispatch: bigint; contractJson: string | null; versionId: string; }>; } //# sourceMappingURL=playerCompute.d.ts.map