LiveAgentStreamCreateRequest live.agent-stream-create-request@1

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

Version
1.0.0
Owner
live
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/live/agent-stream-create-request.v1.json

live.agent-stream-create-request@1 (the Agent Streams plan, S1): the body of POST /api/streams/agent on OpenVibe.Live (capability live.agent_stream.publish). It answers 201 with the stream (live.agent-stream@1) and the publish part (live.agent-stream-publish@1): { stream, publish }. The caller is the person's own session token, or a first-party service token acting for that person (a Link principal acting for its owner, Codes or Actor) that holds live.agent_stream.publish for the audience openvibe.live; Network grants it to exactly those principals. Never a developer-app token, never another person's stream. TITLE is the card's title, TASK says what the agent is doing and where that task lives, VISIBILITY says who may watch, and ALLOW_SITES is the optional list of hosts a browser desk may navigate to (a desk that leaves the list raises the curtain).

Fields

FieldTypeRequiredDescriptionConstraints
titlestringyes
  • minLength 1
  • maxLength 200
taskhttps://openvibe.network/contracts/live/agent-stream.v1.json#/$defs/taskyes
visibilityenumyes
  • one of "private", "unlisted", "public"
allow_sitesarray of stringThe hosts the browser desk may visit. Absent means no limit.
  • maxItems 50
  • items: format uri

Examples

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

Valid: one
{
  "title": "Fixing the login page",
  "task": {
    "source": "codes",
    "ref": "task_01JAB2C3D4E5F6G7H8J9K0MNP",
    "title": "Fix the login page",
    "url": "https://codes.openvibe.live/tasks/task_01JAB2C3D4E5F6G7H8J9K0MNP"
  },
  "visibility": "private"
}
Valid: with-allow-sites
{
  "title": "Fixing the login page",
  "task": {
    "source": "codes",
    "ref": "task_01JAB2C3D4E5F6G7H8J9K0MNP",
    "title": "Fix the login page",
    "url": "https://codes.openvibe.live/tasks/task_01JAB2C3D4E5F6G7H8J9K0MNP"
  },
  "visibility": "public",
  "allow_sites": [
    "https://example.com"
  ]
}
Rejected: no-visibility
{
  "title": "Fixing the login page",
  "task": {
    "source": "codes",
    "ref": "task_01JAB2C3D4E5F6G7H8J9K0MNP",
    "title": "Fix the login page",
    "url": "https://codes.openvibe.live/tasks/task_01JAB2C3D4E5F6G7H8J9K0MNP"
  }
}
Rejected: unknown-task-source
{
  "title": "Fixing the login page",
  "task": {
    "source": "browser",
    "ref": "task_01JAB2C3D4E5F6G7H8J9K0MNP",
    "title": "Fix the login page",
    "url": "https://codes.openvibe.live/tasks/task_01JAB2C3D4E5F6G7H8J9K0MNP"
  },
  "visibility": "private"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('live.agent-stream-create-request@1', value);   // { valid, errors: [{ path, message }] }