CodesTaskSucceededPayload codes.task.succeeded@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.succeeded.v1.json
codes.task.succeeded v1 (OpenVibe.Codes): the task ended and its result is stored on the task page. cost_usd and files_changed are the machine's result (null when it returned neither). Envelope: source codes, subject { type: user, id: <owner usr_> }, visibility internal.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
task_id | string | yes |
| |
state | const | yes |
| |
agent | string | null | yes |
| |
repo | one of | yes | owner/name from the task's repository URL, or null when it is not a repository path. | |
cost_usd | number | null | yes |
| |
files_changed | integer | null | yes |
| |
started_at | string | null | yes |
| |
finished_at | string | null | yes |
| |
error | string | null | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: no-repo
{
"task_id": "tsk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3",
"agent": null,
"repo": null,
"cost_usd": 0.42,
"files_changed": 3,
"started_at": "2026-10-28T16:00:00.000Z",
"finished_at": "2026-10-28T16:04:12.000Z",
"error": null,
"state": "succeeded"
}Valid: task
{
"task_id": "tsk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3",
"agent": "claude",
"repo": "OpenVibers/OpenVibe.Codes",
"cost_usd": 0.42,
"files_changed": 3,
"started_at": "2026-10-28T16:00:00.000Z",
"finished_at": "2026-10-28T16:04:12.000Z",
"error": null,
"state": "succeeded"
}Rejected: prompt-in-payload
{
"task_id": "tsk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3",
"agent": "claude",
"repo": "OpenVibers/OpenVibe.Codes",
"cost_usd": 0.42,
"files_changed": 3,
"started_at": "2026-10-28T16:00:00.000Z",
"finished_at": "2026-10-28T16:04:12.000Z",
"error": null,
"state": "succeeded",
"prompt": "fix the login bug"
}Rejected: task-id
{
"task_id": "job_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3",
"agent": "claude",
"repo": "OpenVibers/OpenVibe.Codes",
"cost_usd": 0.42,
"files_changed": 3,
"started_at": "2026-10-28T16:00:00.000Z",
"finished_at": "2026-10-28T16:04:12.000Z",
"error": null,
"state": "succeeded"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('codes.task.succeeded@1', value); // { valid, errors: [{ path, message }] }