Read a private live terminal pointer; sleeping and stopped sessions require explicit resume#

Private controller API. Call this route through the user’s Unix socket, locally or over SSH. It is not exposed on the server’s public origin.

PropertyValue
Servicefleetd
Operationattachment
MethodGET
Path/api/fleets/{fleetId}/agents/{instanceKey}/attachment
Authenticationpublic
Success status200
Response dataUnpaginated value
Request formatjson
Maximum request body1048576 bytes (service default)
Permission codesNone declared

Listed permission codes are alternatives, not token scopes. The service also checks access to the requested records and rejects stale revisions or controller generations.

Path parameters#

object; fields below; unknown fields rejected ( agentParams )

Field pathRepresentation and constraints
fleetIdlowercase opaque UUID
instanceKeylowercase name; pattern [a-z][a-z0-9-]{0,39}

Validation#

agentParams

Referenced definitions:

Query parameters#

custom validation; see function below

Field pathRepresentation and constraints
context (parser branch 1)string; 1–255 UTF-16 units; well-formed Unicode; no C0/DEL controls; optional property

Accepted query parameters: context.

Query parameters are URL text. The validation function below specifies their format, defaults and combinations. Pagination applies only to operations that use it.

Additional checks#

The following checks apply in addition to the field limits.

Constraint on value:

input => { if (!(input instanceof URLSearchParams) || [...input.keys()].some(key => key !== 'context') || input.getAll('context').length > 1)
    return failure('invalid', 'Use one exact context'); return check.object({ context: check.optional(check.text(255)) })(input.has('context') ? { context: input.get('context') } : {}); }

Validation#

input => { if (!(input instanceof URLSearchParams) || [...input.keys()].some(key => key !== 'context') || input.getAll('context').length > 1)
    return failure('invalid', 'Use one exact context'); return check.object({ context: check.optional(check.text(255)) })(input.has('context') ? { context: input.get('context') } : {}); }

Referenced definitions:

Request body#

empty object; unknown fields rejected

Validation#

check.empty

Referenced definitions:

Response data#

object; fields below; unknown fields rejected ( attachment )

Field pathRepresentation and constraints
runtimelowercase name; pattern [a-z][a-z0-9-]{0,39}
sessionIdstring; 1–200 UTF-16 units; well-formed Unicode; no C0/DEL controls
workspacestring; 1–4096 UTF-16 units; well-formed Unicode; no C0/DEL controls
connectioncustom validation: connection ; see function below

Additional checks#

The following checks apply in addition to the field limits.

Constraint on connection:

function connection(input: unknown): Result<Record<string, string>> {
    if (!input || typeof input !== 'object' || Array.isArray(input) || Object.keys(input).length > 8)
        return failure('invalid', 'Invalid runtime attachment data');
    const fields: Record<string, string> = {};
    for (const [key, value] of Object.entries(input)) {
        const field = check.text(64)(key), content = check.text(4096)(value);
        if (!field.ok)
            return field;
        if (!content.ok)
            return content;
        Object.defineProperty(fields, key, { value: content.value, enumerable: true, writable: true, configurable: true });
    }
    return success(fields);
}

Validation#

attachment

Referenced definitions:

Response envelope#

A successful JSON response contains data and meta. Replace the data placeholder below with the response fields described above. Errors contain error instead of data.

{
  "data": "<value matching the response-data validator>",
  "meta": {
    "requestId": "00000000-0000-0000-0000-000000000001"
  }
}