# com.publicdomainrelay.temp.gateway.requestComputeWorkerEphemeral

> Published by [johnandersen777.bsky.social](https://lexicon.garden/identity/did:plc:5svqtrhheairglgiiyvutzik)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:5svqtrhheairglgiiyvutzik/com.publicdomainrelay.temp.gateway.requestComputeWorkerEphemeral)
- [Documentation](https://lexicon.garden/lexicon/did:plc:5svqtrhheairglgiiyvutzik/com.publicdomainrelay.temp.gateway.requestComputeWorkerEphemeral/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:5svqtrhheairglgiiyvutzik/com.publicdomainrelay.temp.gateway.requestComputeWorkerEphemeral/examples)

## Definitions

### `com.publicdomainrelay.temp.gateway.requestComputeWorkerEphemeral`

**Type**: `procedure`

Request an ephemeral Deno worker through the compute contract gateway. Gateway bundles source, creates workerManifest record, runs the full RFP protocol, and returns the worker instance ref for single-request execution.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `source` | `string` | Yes | TypeScript source code for the worker. |
| `denoJson` | `string` | Yes | deno.json configuration for the worker bundle. |
| `denoLock` | `string` | No | Optional deno.lock for reproducible builds. |
| `bidWindowSec` | `integer` | No | Seconds to wait for bids. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `error` | `string` | No |  |
| `receiptOk` | `boolean` | No |  |
| `receiptCid` | `string` (cid) | No |  |
| `receiptUri` | `string` (at-uri) | No |  |
| `workerInstanceUri` | `string` (at-uri) | No |  |

#### Errors

- **InvalidRequest**
- **AuthRequired**
- **NoBidders**

## Raw Schema

```json
{
  "id": "com.publicdomainrelay.temp.gateway.requestComputeWorkerEphemeral",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "source",
            "denoJson"
          ],
          "properties": {
            "source": {
              "type": "string",
              "description": "TypeScript source code for the worker."
            },
            "denoJson": {
              "type": "string",
              "description": "deno.json configuration for the worker bundle."
            },
            "denoLock": {
              "type": "string",
              "description": "Optional deno.lock for reproducible builds."
            },
            "bidWindowSec": {
              "type": "integer",
              "default": 30,
              "description": "Seconds to wait for bids."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "InvalidRequest"
        },
        {
          "name": "AuthRequired"
        },
        {
          "name": "NoBidders"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "properties": {
            "error": {
              "type": "string"
            },
            "receiptOk": {
              "type": "boolean"
            },
            "receiptCid": {
              "type": "string",
              "format": "cid"
            },
            "receiptUri": {
              "type": "string",
              "format": "at-uri"
            },
            "workerInstanceUri": {
              "type": "string",
              "format": "at-uri"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Request an ephemeral Deno worker through the compute contract gateway. Gateway bundles source, creates workerManifest record, runs the full RFP protocol, and returns the worker instance ref for single-request execution."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
