# Runner and compute observation objects

```{raw} html
<div class="mo-api-page-show-toc" aria-hidden="true"></div>
```

These APIs distinguish product identity management, connection state, Edge-holder renewal, and compute dependency observations. Example values are not deployment defaults.

<span id="prepare"></span>

## Before you call this API

Use BASE_URL, product personal access token MOI_KEY, and WORKSPACE_ID from the same environment. BASE_URL includes the product prefix. Runner and compute observation paths have no /workspaces/{id} segment; supply the Workspace through X-Workspace-ID.

RUNNER_ID comes from creation/lists; RESOURCE_ID from compute instance lists. REQUEST_ID identifies one Runner registration operation; retain it for recovery and use a new value for registrations with different names. The formal boundary still verifies the current Principal, Effective Role, and request correlation.

Edge renewal supplies only the current EDGE_TOKEN in JSON, without a product PAT or Workspace header. This token renews only the registered Edge identity and grants no product resource access or task execution authorization. check, renew, registration, RuntimeGrant, and Web app sessions are not interchangeable.

<span id="responses"></span>

## Runner record

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Stable Runner ID. |
| `workspace_id` | string | Owning Workspace. |
| `user_id` | string | Registering user ID, not the current caller's permission scope. |
| `name` | string | Registered name. |
| `runner_type` | string | custom for creation in this group. |
| `edge_agent_id` | string | Edge registration identifier, currently runner- followed by Runner ID. |
| `connect_cmd` | string | Returned by creation, supported same-request replay, or explicit refresh. Omitted from ordinary lists/details. Contains connection credentials. |
| `phase` | string | Persisted record phase, pending or ready; not live connectivity or execution admission. |
| `token_expires_at` | string | Token expiry time; omitted when unset. |
| `created_at`、`updated_at` | string | RFC3339 timestamp. |

List data is directly an array without items/total. Public record JSON omits JTI, internal lifecycle, Principal/Role, and recovery request information.

## Executor health

| Field | Type | Description |
| --- | --- | --- |
| `executors` | array (objects) | Currently readable Runners and enabled Sandboxes. |
| `astra_reachable` | boolean | Whether Astra connection state was successfully obtained for visible objects. An empty collection performs no actual probe. |
| `executors[].id`、`executors[].name` | string | Object ID and name. |
| `executors[].type` | string | runner or sandbox. |
| `executors[].phase` | string | Persisted phase of the corresponding object. |
| `executors[].edge_agent_id` | string | Edge ID used to match connection state. |
| `executors[].connected` | boolean | Whether it appears in the retrieved connection-state set. |
| `executors[].connected_secs` | integer | Connected duration in seconds; omitted when disconnected. Exactly 0 seconds may still return 0. |
| `executors[].ready` | boolean | The current projection sets true on a connection match. This is not a task, tool, or permission probe. |

## Python dependency observations

| Worker field | Type | Description |
| --- | --- | --- |
| `instance_id` | string | Observed instance ID. |
| `worker_type` | string | Worker type. |
| `status` | string | Current persisted instance state. This query retains only STARTING/READY/STOPPING. |
| `py_requirements_sha` | string | Dependency content SHA; must match current compute instance configuration. Omitted when empty. |
| `py_requirements_status` | string | EMPTY/INSTALLING/READY/FAILED; omitted when empty. |
| `py_requirements_error` | string | Most recent installation error summary; omitted when empty. |

This list retains only cloud instances whose dependency SHA exists and matches the current desired SHA. It excludes old configurations and terminal instances. It is not a history of all Workers or a Docker/local Worker list, and differs from /runtime's per-Worker-type replica aggregates. No pagination or total wrapper.

## Python dependency limits

| Field | Type | Description |
| --- | --- | --- |
| `enabled` | boolean | Whether the current deployment enables dependencies. |
| `max_bytes` | integer | Dependency text size limit in bytes. |
| `max_lines` | integer | Dependency text line-count limit. |
| `allowed_index_hosts` | array (strings) or null | Currently allowed index domains; nil may serialize as null. |
| `pip_index_url` | string | Deployment pip index URL; omitted when empty. |
| `install_timeout_seconds` | integer | Installation timeout in seconds. |

Reads dynamic configuration, which may differ from source initial values. Trusted hosts, trailing log-line counts, and PV limits are not DTO fields. Handle enabled=false separately from loading unavailability; 503 does not establish explicit disablement.

## Edge renewal receipt

Numeric code=0 with token and expires_at in data; expires_at uses RFC3339. Before returning the new token, one system transaction checks current JTI, validates and revokes the old credential, and replaces its binding. Expiry uses the current registration issuance policy, which is 30 days in the inspected source. Use actual expires_at.
