Skip to content

Sensorium Directive Result v1

Source schema: doc/schemas/sensorium-directive-result.v1.schema.json

Response envelope returned by sensorium-core to the consumer that submitted a sensorium-directive.v1. Always carries outcome/id (audit record reference) and observation/ids (empty when the directive produced no world-fact observations).

Governing Basis

Project Lineage

Requirements

Stories

Fields

Field Required Shape Description
schema yes const: sensorium-directive-result.v1 Schema tag for the v1 Sensorium contract.
schema/v yes const: 1 Schema version.
directive/id yes string Echo of the directive/id from the originating sensorium-directive.v1.
correlation/id no string Optional echo of the correlation/id from the directive, when present, so callers can confirm the response belongs to the expected workflow/thread without fetching the outcome record.
status yes enum: admitted, completed, failed, timed_out, rejected Final status for sync mode; initial status for async mode (typically admitted). rejected indicates the directive was refused at admission (policy, allowlist, or schema validation); in that case outcome/id is present and observation/ids is empty.
result no unspecified Typed per action_id. Shape defined by the allowlist entry's result_schema. Absent or null for rejected responses and admitted/async responses.
outcome/id yes string Identifier of the sensorium-directive-outcome.v1 audit record. Always present. Outcome records are audit-only and are NOT published to the local Agora bus; they are reachable only through host-owned audit capabilities.
observation/ids yes array List of linked sensorium-observation.v1 ids. Empty list means the directive produced no world-fact observations or has not completed yet in async mode. The outcome record is authoritative for the full list.
artifacts no array References to artifacts produced by the directive (e.g. stdout, stderr, generated files) using the minimal artifact-lane contract from proposal 045.
diagnostics no array Optional diagnostic entries from the connector (warnings, soft errors). Not a replacement for the outcome record; these are hints to the caller.

Definitions

Definition Shape Description
artifactRef object Minimal artifact-lane reference. The artifact itself is stored outside this envelope and is addressed by a content or host-owned blob reference.

Conditional Rules

Rule 1

When:

{
  "required": [
    "status"
  ],
  "properties": {
    "status": {
      "enum": [
        "rejected",
        "admitted"
      ]
    }
  }
}

Then:

{
  "properties": {
    "result": {
      "type": "null"
    }
  }
}

Field Semantics

schema

  • Required: yes
  • Shape: const: sensorium-directive-result.v1

Schema tag for the v1 Sensorium contract.

schema/v

  • Required: yes
  • Shape: const: 1

Schema version.

directive/id

  • Required: yes
  • Shape: string

Echo of the directive/id from the originating sensorium-directive.v1.

correlation/id

  • Required: no
  • Shape: string

Optional echo of the correlation/id from the directive, when present, so callers can confirm the response belongs to the expected workflow/thread without fetching the outcome record.

status

  • Required: yes
  • Shape: enum: admitted, completed, failed, timed_out, rejected

Final status for sync mode; initial status for async mode (typically admitted). rejected indicates the directive was refused at admission (policy, allowlist, or schema validation); in that case outcome/id is present and observation/ids is empty.

result

  • Required: no
  • Shape: unspecified

Typed per action_id. Shape defined by the allowlist entry's result_schema. Absent or null for rejected responses and admitted/async responses.

outcome/id

  • Required: yes
  • Shape: string

Identifier of the sensorium-directive-outcome.v1 audit record. Always present. Outcome records are audit-only and are NOT published to the local Agora bus; they are reachable only through host-owned audit capabilities.

observation/ids

  • Required: yes
  • Shape: array

List of linked sensorium-observation.v1 ids. Empty list means the directive produced no world-fact observations or has not completed yet in async mode. The outcome record is authoritative for the full list.

artifacts

  • Required: no
  • Shape: array

References to artifacts produced by the directive (e.g. stdout, stderr, generated files) using the minimal artifact-lane contract from proposal 045.

diagnostics

  • Required: no
  • Shape: array

Optional diagnostic entries from the connector (warnings, soft errors). Not a replacement for the outcome record; these are hints to the caller.

Definition Semantics

$defs.artifactRef

  • Shape: object

Minimal artifact-lane reference. The artifact itself is stored outside this envelope and is addressed by a content or host-owned blob reference.