# com.publicdomainrelay.temp.gateway.requestComputeWorkerPersistent

> 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.requestComputeWorkerPersistent)
- [Documentation](https://lexicon.garden/lexicon/did:plc:5svqtrhheairglgiiyvutzik/com.publicdomainrelay.temp.gateway.requestComputeWorkerPersistent/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:5svqtrhheairglgiiyvutzik/com.publicdomainrelay.temp.gateway.requestComputeWorkerPersistent/examples)

## Definitions

### `com.publicdomainrelay.temp.gateway.requestComputeWorkerPersistent`

**Type**: `procedure`

Request a persistent Deno worker through the compute contract gateway. Gateway bundles source, creates workerManifest record, runs the full RFP protocol, starts the worker, and returns the worker instance ref and execute URL.

#### 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 |  |
| `executeUrl` | `string` (uri) | 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.requestComputeWorkerPersistent",
  "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"
            },
            "executeUrl": {
              "type": "string",
              "format": "uri"
            },
            "receiptCid": {
              "type": "string",
              "format": "cid"
            },
            "receiptUri": {
              "type": "string",
              "format": "at-uri"
            },
            "workerInstanceUri": {
              "type": "string",
              "format": "at-uri"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Request a persistent Deno worker through the compute contract gateway. Gateway bundles source, creates workerManifest record, runs the full RFP protocol, starts the worker, and returns the worker instance ref and execute URL."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
