ActorAssignmentTree actor.assignment-tree@1

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

Version
1.0.0
Owner
actor
Visibility
public
Status
active
Compatibility
backward
Decision
ADR-044
Schema
https://openvibe.network/contracts/actor/assignment-tree.v1.json

actor.assignment-tree@1: GET /api/v1/assignments/:id (capability actor.assignment.read): the node and its direct children, oldest first. Each node is an actor.assignment@1. Only the owner can read the tree; another person gets 404.

Fields

FieldTypeRequiredDescriptionConstraints
assignmentactor.assignmentyes
childrenactor.assignmentyes
  • maxItems 100

Examples

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

Valid: root-with-child
{
  "assignment": {
    "id": "asg_01JAB2C3D4E5F6G7H8J9K0MNPS",
    "root": "asg_01JAB2C3D4E5F6G7H8J9K0MNPS",
    "parent": null,
    "depth": 0,
    "origin": "person",
    "mode": "work",
    "reply": "resume",
    "agent_id": null,
    "task_id": "tsk_01JAB2C3D4E5F6G7H8J9K0MNPS",
    "level": "ask",
    "effective_level": "ask",
    "budget": {
      "limit_usd": 0.05,
      "spent_usd": 0,
      "remaining_usd": 0.05
    },
    "state": "running",
    "created_at": "2026-11-07T10:00:00.000Z",
    "updated_at": "2026-11-07T10:00:00.000Z"
  },
  "children": [
    {
      "id": "asg_01JAB2C3D4E5F6G7H8J9K0MNPT",
      "root": "asg_01JAB2C3D4E5F6G7H8J9K0MNPS",
      "parent": "asg_01JAB2C3D4E5F6G7H8J9K0MNPS",
      "depth": 1,
      "origin": "person",
      "mode": "consult",
      "reply": "resume",
      "agent_id": null,
      "task_id": null,
      "level": "full",
      "effective_level": "full",
      "budget": {
        "limit_usd": 0.05,
        "spent_usd": 0,
        "remaining_usd": 0.05
      },
      "state": "queued",
      "created_at": "2026-11-07T10:00:01.000Z",
      "updated_at": "2026-11-07T10:00:01.000Z"
    }
  ]
}
Rejected: bad-child
{
  "assignment": {
    "id": "asg_01JAB2C3D4E5F6G7H8J9K0MNPS",
    "root": "asg_01JAB2C3D4E5F6G7H8J9K0MNPS",
    "parent": null,
    "depth": 0,
    "origin": "person",
    "mode": "work",
    "reply": "resume",
    "agent_id": null,
    "task_id": null,
    "level": "ask",
    "effective_level": "ask",
    "budget": {
      "limit_usd": 0.05,
      "spent_usd": 0,
      "remaining_usd": 0.05
    },
    "state": "running",
    "created_at": "2026-11-07T10:00:00.000Z",
    "updated_at": "2026-11-07T10:00:00.000Z"
  },
  "children": [
    {
      "id": "asg_01JAB2C3D4E5F6G7H8J9K0MNPT",
      "root": "asg_01JAB2C3D4E5F6G7H8J9K0MNPS",
      "parent": null,
      "depth": 1,
      "origin": "person",
      "mode": "work",
      "reply": "resume",
      "agent_id": null,
      "task_id": null,
      "level": "ask",
      "effective_level": "ask",
      "budget": {
        "limit_usd": 0.05,
        "spent_usd": 0,
        "remaining_usd": 0.05
      },
      "state": "paused",
      "created_at": "2026-11-07T10:00:01.000Z",
      "updated_at": "2026-11-07T10:00:01.000Z"
    }
  ]
}
Rejected: missing-children
{
  "assignment": {
    "id": "asg_01JAB2C3D4E5F6G7H8J9K0MNPS",
    "root": "asg_01JAB2C3D4E5F6G7H8J9K0MNPS",
    "parent": null,
    "depth": 0,
    "origin": "person",
    "mode": "work",
    "reply": "resume",
    "agent_id": null,
    "task_id": null,
    "level": "ask",
    "effective_level": "ask",
    "budget": {
      "limit_usd": 0.05,
      "spent_usd": 0,
      "remaining_usd": 0.05
    },
    "state": "running",
    "created_at": "2026-11-07T10:00:00.000Z",
    "updated_at": "2026-11-07T10:00:00.000Z"
  }
}

Validate

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