Extensions API
GET /api/v1/admin/extensions
Section titled “GET /api/v1/admin/extensions”GET /api/v1/admin/extensions · operation listExtensions
Extension inventory (T058, flag extensions). Plugins with every version (manifest, module SHA-256 and size, status, signature key, signature_verdict checked now against extensions.trusted_keys, load_status on this replica), the active and previous version and the team bindings (enabled, egress, secret names, never values). Also the trusted key fingerprints, the extensions block (the effective boot ceilings under their YAML names, without allow_loopback_http and allowed_private_cidrs, which are boot trust), this replica’s outcome counters and, with extension_javascript, the pinned JavaScript runtime. Nothing is executed to build it. Console permission extensions:read (admin, viewer, operator, team_admin); a team administrator sees global plugins and those of its teams, with only its teams’ bindings.
Authentication: adminSession
Responses
| Status | Description | Body |
|---|---|---|
200 |
Inventory | application/json: ExtensionInventory |
401 |
Missing or invalid bearer key | application/json: Error |
403 |
Model not allowed | application/json: Error |
404 |
Feature disabled | application/json: Error |
503 |
storage_unavailable | — |
POST /api/v1/admin/extensions
Section titled “POST /api/v1/admin/extensions”POST /api/v1/admin/extensions · operation uploadExtension
Uploads a signed plugin version (global administrator, extensions:manage). The manifest must be canonical (sorted unique lists, no unknown field); the module is compiled and its imports checked - only WASI preview 1 and the aigw host functions its manifest grants - and the Ed25519 signature over the canonical manifest and module digest must verify with a trusted key, before anything is stored. A manifest with runtime javascript (T058.001, flags extension_javascript and extension_guardrails) sends its source as text in source instead of module_base64; the source is compiled without running and its SHA-256 is the signed digest. The version is approved at once; activate true also makes it the active version (hot install or upgrade on every replica). Versions are immutable. Audited as extension.upload.
Authentication: adminSession
Request body (required)
application/json: ExtensionUpload
Responses
| Status | Description | Body |
|---|---|---|
201 |
The stored version | — |
400 |
invalid_request, invalid_manifest, invalid_module or invalid_source | — |
401 |
Missing or invalid bearer key | application/json: Error |
403 |
Model not allowed | application/json: Error |
404 |
Feature disabled | application/json: Error |
409 |
extension_version_exists or extension_owner | — |
413 |
module_too_large | — |
422 |
extension_refused - signature_unsigned, signature_invalid, signature_untrusted_key, invalid_module, invalid_source, forbidden_import, memory_limit or module_too_large | — |
503 |
storage_unavailable | — |
POST /api/v1/admin/extensions/submissions
Section titled “POST /api/v1/admin/extensions/submissions”POST /api/v1/admin/extensions/submissions · operation submitExtension
A team administrator submits an unsigned plugin version for a team it administers (flag extension_submissions, permission extensions:submit). It is stored as pending_review and runs nowhere; only a global administrator approves it with a trusted signature over exactly the submitted manifest and module. An approved submission runs only for the submitting team. Audited as extension.submit.
Authentication: adminSession
Request body (required)
application/json: ExtensionUpload
Responses
| Status | Description | Body |
|---|---|---|
201 |
The pending version | — |
400 |
invalid_request, invalid_manifest, invalid_module, invalid_source or team_not_found | — |
401 |
Missing or invalid bearer key | application/json: Error |
403 |
team_forbidden - not an administered team, or a signature or activate was sent | — |
404 |
Feature disabled | application/json: Error |
409 |
extension_version_exists or extension_owner | — |
413 |
module_too_large | — |
503 |
storage_unavailable | — |
GET /api/v1/admin/extensions/executions
Section titled “GET /api/v1/admin/extensions/executions”GET /api/v1/admin/extensions/executions · operation listExtensionExecutions
The 200 most recent execution records, newest first - runtime, hook, plugin, version, module digest, team, key, outcome, verdict, duration, http calls and refusals, output size and, for code mode, the step trail - never input, output or secrets. Team roles see their teams only. Permission extensions:read.
Authentication: adminSession
Parameters
| Name | In | Type | Description |
|---|---|---|---|
hook |
query | string, one of "guardrail_input", "guardrail_output", "code_mode" |
Only executions of this hook: guardrail_input, guardrail_output or code_mode. |
Responses
| Status | Description | Body |
|---|---|---|
200 |
Execution records | — |
400 |
invalid_filter | — |
401 |
Missing or invalid bearer key | application/json: Error |
403 |
Model not allowed | application/json: Error |
404 |
Feature disabled | application/json: Error |
503 |
storage_unavailable | — |
POST /api/v1/admin/extensions/{id}/versions/{version}/approve
Section titled “POST /api/v1/admin/extensions/{id}/versions/{version}/approve”POST /api/v1/admin/extensions/{id}/versions/{version}/approve · operation approveExtensionVersion
Approves a pending submission with the reviewer’s signature by a trusted key (extensions:manage). The signature must cover the stored manifest and module, so approval can never widen host functions, egress, secrets or limits; the module is compiled and its imports checked first. Audited as extension.approve.
Authentication: adminSession
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string, required, pattern ^[a-z][a-z0-9-]{1,63}$ |
|
version |
path | string, required |
Request body (required)
application/json: objectsignature(ExtensionSignature, required)notes(string, max length 500)
Responses
| Status | Description | Body |
|---|---|---|
200 |
The approved version | — |
400 |
invalid_request or signature_required | — |
401 |
Missing or invalid bearer key | application/json: Error |
403 |
Model not allowed | application/json: Error |
404 |
Feature disabled, or no such version | — |
409 |
extension_version_state | — |
422 |
extension_refused | — |
503 |
storage_unavailable | — |
POST /api/v1/admin/extensions/{id}/versions/{version}/reject
Section titled “POST /api/v1/admin/extensions/{id}/versions/{version}/reject”POST /api/v1/admin/extensions/{id}/versions/{version}/reject · operation rejectExtensionVersion
Rejects a pending submission (extensions:manage). Audited as extension.reject.
Authentication: adminSession
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string, required, pattern ^[a-z][a-z0-9-]{1,63}$ |
|
version |
path | string, required |
Request body
application/json: objectnotes(string, max length 500)
Responses
| Status | Description | Body |
|---|---|---|
200 |
The rejected version | — |
401 |
Missing or invalid bearer key | application/json: Error |
403 |
Model not allowed | application/json: Error |
404 |
Feature disabled, or no such version | — |
409 |
extension_version_state | — |
503 |
storage_unavailable | — |
POST /api/v1/admin/extensions/{id}/activate
Section titled “POST /api/v1/admin/extensions/{id}/activate”POST /api/v1/admin/extensions/{id}/activate · operation activateExtension
Makes an approved version the active one - an install, upgrade or rollback - or deactivates the plugin with an empty version (extensions:manage). Every replica reads the active version on each execution, so the change applies without a restart; the version that was active is kept as previous_version. Audited as extension.activate or extension.deactivate.
Authentication: adminSession
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string, required, pattern ^[a-z][a-z0-9-]{1,63}$ |
Request body (required)
application/json: objectversion(string, required) — MAJOR.MINOR.PATCH or empty to deactivate
Responses
| Status | Description | Body |
|---|---|---|
200 |
The plugin | — |
400 |
invalid_request | — |
401 |
Missing or invalid bearer key | application/json: Error |
403 |
Model not allowed | application/json: Error |
404 |
Feature disabled, or no such plugin or version | — |
409 |
extension_version_state - the version is not approved | — |
503 |
storage_unavailable | — |
POST /api/v1/admin/extensions/{id}/rollback
Section titled “POST /api/v1/admin/extensions/{id}/rollback”POST /api/v1/admin/extensions/{id}/rollback · operation rollbackExtension
Reactivates previous_version (extensions:manage); the body is ignored. Audited as extension.activate.
Authentication: adminSession
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string, required, pattern ^[a-z][a-z0-9-]{1,63}$ |
Responses
| Status | Description | Body |
|---|---|---|
200 |
The plugin | — |
401 |
Missing or invalid bearer key | application/json: Error |
403 |
Model not allowed | application/json: Error |
404 |
Feature disabled, or no such plugin | — |
409 |
extension_no_previous | — |
503 |
storage_unavailable | — |
PUT /api/v1/admin/extensions/{id}/bindings/{team}
Section titled “PUT /api/v1/admin/extensions/{id}/bindings/{team}”PUT /api/v1/admin/extensions/{id}/bindings/{team} · operation bindExtension
A team picks a plugin and sets its egress (extensions:bind; team administrators for administered teams). Egress must be origins of the active version’s signed manifest - a binding only narrows it. A team-owned plugin binds only to its owner. Without an enabled binding the plugin runs with no network. Audited as extension.bind.
Authentication: adminSession
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string, required, pattern ^[a-z][a-z0-9-]{1,63}$ |
|
team |
path | string, required, max length 128 |
Request body (required)
application/json: objectenabled(boolean, defaulttrue)egress(array of string, max items 16)
Responses
| Status | Description | Body |
|---|---|---|
200 |
The binding | — |
400 |
egress_forbidden, invalid_request or team_not_found | — |
401 |
Missing or invalid bearer key | application/json: Error |
403 |
team_forbidden | — |
404 |
Feature disabled, or no plugin visible to the team | — |
409 |
extension_inactive | — |
503 |
storage_unavailable | — |
DELETE /api/v1/admin/extensions/{id}/bindings/{team}
Section titled “DELETE /api/v1/admin/extensions/{id}/bindings/{team}”DELETE /api/v1/admin/extensions/{id}/bindings/{team} · operation unbindExtension
Removes a team’s binding and its secrets; the next execution has no network. Audited as extension.unbind.
Authentication: adminSession
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string, required, pattern ^[a-z][a-z0-9-]{1,63}$ |
|
team |
path | string, required, max length 128 |
Responses
| Status | Description | Body |
|---|---|---|
204 |
Removed | — |
401 |
Missing or invalid bearer key | application/json: Error |
403 |
team_forbidden | — |
404 |
Feature disabled, or no such binding | — |
503 |
storage_unavailable | — |
PUT /api/v1/admin/extensions/{id}/bindings/{team}/secrets/{name}
Section titled “PUT /api/v1/admin/extensions/{id}/bindings/{team}/secrets/{name}”PUT /api/v1/admin/extensions/{id}/bindings/{team}/secrets/{name} · operation setExtensionSecret
Stores a team’s secret for a plugin, encrypted (AES-256-GCM bound to plugin, team and name), write-only (extensions:bind). The name must be in the active version’s signed manifest. A plugin references it in an http_call header; the value never enters the sandbox, and an answer that echoes it is refused. Audited as extension.secret_set.
Authentication: adminSession
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string, required, pattern ^[a-z][a-z0-9-]{1,63}$ |
|
team |
path | string, required, max length 128 | |
name |
path | string, required, pattern ^[A-Z][A-Z0-9_]{0,63}$ |
Request body (required)
application/json: objectvalue(string, required, min length 1, max length 4096)
Responses
| Status | Description | Body |
|---|---|---|
204 |
Stored | — |
400 |
secret_forbidden or invalid_secret | — |
401 |
Missing or invalid bearer key | application/json: Error |
403 |
team_forbidden | — |
404 |
Feature disabled, or no binding for the team | — |
503 |
secret_encryption_unavailable or storage_unavailable | — |
DELETE /api/v1/admin/extensions/{id}/bindings/{team}/secrets/{name}
Section titled “DELETE /api/v1/admin/extensions/{id}/bindings/{team}/secrets/{name}”DELETE /api/v1/admin/extensions/{id}/bindings/{team}/secrets/{name} · operation deleteExtensionSecret
Removes a team’s secret. Audited as extension.secret_delete.
Authentication: adminSession
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id |
path | string, required, pattern ^[a-z][a-z0-9-]{1,63}$ |
|
team |
path | string, required, max length 128 | |
name |
path | string, required, pattern ^[A-Z][A-Z0-9_]{0,63}$ |
Responses
| Status | Description | Body |
|---|---|---|
204 |
Removed | — |
401 |
Missing or invalid bearer key | application/json: Error |
403 |
team_forbidden | — |
404 |
Feature disabled, or no such secret | — |
503 |
storage_unavailable | — |