CodesTaskUpdatedPayload codes.task.updated@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
codes
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/events/payloads/codes.task.updated.v1.json

codes.task.updated v1 (OpenVibe.Codes): a task's status changed. The one event the Dock's Code tab follows instead of polling: every state change writes it, alongside the per-state codes.task.* event. STATE is the announced state (placed reads as running, expired as failed). URL is the task's page on openvibe.codes. Envelope: source codes, subject { type: user, id: <owner usr_> }, visibility internal.

Fields

FieldTypeRequiredDescriptionConstraints
task_idstringyes
  • pattern ^tsk_[0-9A-HJKMNP-TV-Z]{26}$
stateenumyes
  • one of "queued", "running", "succeeded", "failed", "cancelled"
agentstring | nullyes
  • maxLength 80
repoone ofyesowner/name from the task's repository URL, or null when it is not a repository path.
cost_usdnumber | nullyes
  • minimum 0
files_changedinteger | nullyes
  • minimum 0
started_atstring | nullyes
  • format date-time
finished_atstring | nullyes
  • format date-time
errorstring | nullyes
  • maxLength 500
urlstringyesThe task's page on openvibe.codes.
  • pattern ^https://
  • format uri

Examples

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

Valid: running
{
  "task_id": "tsk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3",
  "state": "running",
  "agent": "claude-code",
  "repo": "OpenVibers/OpenVibe.Codes",
  "cost_usd": null,
  "files_changed": null,
  "started_at": "2026-11-10T10:00:00.000Z",
  "finished_at": null,
  "error": null,
  "url": "https://openvibe.codes/tasks/tsk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3"
}
Rejected: bad-state
{
  "task_id": "tsk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3",
  "state": "exploded",
  "agent": "claude-code",
  "repo": "OpenVibers/OpenVibe.Codes",
  "cost_usd": null,
  "files_changed": null,
  "started_at": "2026-11-10T10:00:00.000Z",
  "finished_at": null,
  "error": null,
  "url": "https://openvibe.codes/tasks/tsk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('codes.task.updated@1', value);   // { valid, errors: [{ path, message }] }