---
title: "run.job-stream-event@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/run.job-stream-event"
updated: null
---

# run.job-stream-event@1 · OpenVibe.Services

HTML: [run.job-stream-event@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/run.job-stream-event)

# RunJobStreamEvent `run.job-stream-event@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: run
- Visibility: public
- Status: planned
- Compatibility: backward
- Decision: [ADR-034](/docs/adr/ADR-034)
- Schema: [`https://openvibe.network/contracts/run/job-stream-event.v1.json`](/docs/contracts/run.job-stream-event.json)

run.job-stream-event@1 (PLANNED; plan T14 R1): the JSON \`data\` of one server-sent event on GET /api/v1/jobs/{id}/stream (capability run.job.stream). The SSE \`event\` field is the type and the SSE \`id\` is \`seq\`, so a reconnect with Last-Event-ID resumes after it. output: a chunk of the job's stdout (platform.job-frame@1 job\_stdout, best effort: a chunk lost on the node's link is never resent, and Run keeps at most the last 1 MiB to replay). state: the job moved to a new state. end: the job reached its end state; the server closes the stream after it. A stream opened on an ended job replays what is kept, then end. Output is never metered and never in an event.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `type` | enum | yes |  | - `one of "output", "state", "end"` |
| `job_id` | string | yes |  | - `pattern ^job_[0-9A-HJKMNP-TV-Z]{26}$` |
| `seq` | integer | yes | The job's own stream counter from 1; the SSE id. | - `minimum 1` |
| `at` | string | yes |  | - `format date-time` |
| `chunk` | string |  | output only: UTF-8 text. | - `maxLength 65536` |
| `state` | enum |  | state and end: the job's state. | - `one of "queued", "placed", "running", "succeeded", "failed", "cancelled", "expired"` |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: end

~~~~
{
  "type": "end",
  "job_id": "job_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "seq": 4,
  "at": "2026-10-04T10:00:03.000Z",
  "state": "succeeded"
}
~~~~

Valid: output

~~~~
{
  "type": "output",
  "job_id": "job_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "seq": 3,
  "at": "2026-10-04T10:00:01.000Z",
  "chunk": "resized 1 of 1\n"
}
~~~~

Valid: state

~~~~
{
  "type": "state",
  "job_id": "job_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "seq": 2,
  "at": "2026-10-04T10:00:00.650Z",
  "state": "running"
}
~~~~

Rejected: end-while-running

~~~~
{
  "type": "end",
  "job_id": "job_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "seq": 4,
  "at": "2026-10-04T10:00:03.000Z",
  "state": "running"
}
~~~~

Rejected: output-without-chunk

~~~~
{
  "type": "output",
  "job_id": "job_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "seq": 3,
  "at": "2026-10-04T10:00:01.000Z"
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('run.job-stream-event@1', value);   // { valid, errors: [{ path, message }] }
~~~~
