ReportSessionWriteRequest report.session-write-request@1

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

Version
1.0.0
Owner
report
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/report/session-write-request.v1.json

report.session-write-request@1 (the Agent Streams plan, S3): the body of POST /internal/session-reports on OpenVibe.Report (capability report.session.write). The caller is a first-party service - Codes, Actor or Live - holding that capability for the audience openvibe.report; the body names the person the session was theirs. The route is idempotent per (SOURCE, TASK.REF): a repeat of the same session's task answers the report already stored, with created false. The report's id is Report's own (rps_<ULID>); the body never carries one. Every text field passes the house redactor before anything is stored, so no secret and no raw transcript is ever stored.

Fields

FieldTypeRequiredDescriptionConstraints
ownerstringyesThe person the session was theirs.
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
sourceenumyes
  • one of "codes", "actor", "desk", "node"
taskhttps://openvibe.network/contracts/report/session-write-request.v1.json#/$defs/taskyes
started_atstringyes
  • format date-time
ended_atstringyes
  • format date-time
worked_secondsintegeryes
  • minimum 0
outcomeenumyes
  • one of "done", "stopped", "failed"
stopped_becausestring
  • minLength 1
  • maxLength 300
summarystringyes
  • minLength 1
  • maxLength 600
timelinehttps://openvibe.network/contracts/report/session-write-request.v1.json#/$defs/step
outputshttps://openvibe.network/contracts/report/session-write-request.v1.json#/$defs/output
proofhttps://openvibe.network/contracts/report/session-write-request.v1.json#/$defs/proof
cost_usdnumber | null
  • minimum 0
modelsarray of string
  • items: minLength 1
  • items: maxLength 120
highlightsarray of string
  • maxItems 5
  • items: minLength 1
  • items: maxLength 200
streamobject | null
visibilityenumWho may see it. Absent means private.
  • one of "private", "unlisted", "public"
stream_onlybooleanLive's stream-only report: the session is the stream itself and no tool will finish it. Absent or false means a normal session report.

Examples

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

Valid: request
{
  "owner": "usr_01JAN2C3D4E5F6G7H8J9K0MNPS",
  "source": "codes",
  "task": {
    "title": "Ship the checkout page",
    "ref": "tsk_01JAN2C3D4E5F6G7H8J9K0MNPS",
    "url": "https://openvibe.codes/t/tsk_01JAN2C3D4E5F6G7H8J9K0MNPS"
  },
  "started_at": "2026-11-06T18:00:00.000Z",
  "ended_at": "2026-11-06T18:42:00.000Z",
  "worked_seconds": 2520,
  "outcome": "done",
  "summary": "Asked for a checkout page; the agent built it, ran the tests and opened a pull request.",
  "timeline": [
    {
      "at": "2026-11-06T18:20:00.000Z",
      "title": "Run the checkout tests",
      "status": "passed",
      "tests": {
        "passed": 12,
        "failed": 0
      }
    }
  ],
  "outputs": [
    {
      "kind": "pr",
      "url": "https://forgejo.example/openvibe/site/pulls/7",
      "title": "Checkout page",
      "state": "open"
    }
  ],
  "proof": {
    "tests": {
      "passed": 12,
      "failed": 0
    },
    "screenshots": [
      "med_01JAN2C3D4E5F6G7H8J9K0MNPS"
    ],
    "review": {
      "verdict": "Looks good",
      "notes": null
    }
  },
  "cost_usd": 0.31,
  "models": [
    "claude-sonnet-4"
  ],
  "highlights": [
    "Found the coupon bug on the first read"
  ],
  "visibility": "private"
}
Rejected: no-owner
{
  "source": "codes",
  "task": {
    "title": "Ship the checkout page",
    "ref": "tsk_1"
  },
  "started_at": "2026-11-06T18:00:00.000Z",
  "ended_at": "2026-11-06T18:42:00.000Z",
  "worked_seconds": 2520,
  "outcome": "done",
  "summary": "Asked for a checkout page."
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('report.session-write-request@1', value);   // { valid, errors: [{ path, message }] }