ActorAssignmentCancelResult actor.assignment-cancel-result@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-cancel-result.v1.json

actor.assignment-cancel-result@1: POST /api/v1/assignments/:id/cancel (capability actor.assignment.cancel): the node as it is now and every node the cancel stopped, the node included and its children below it. The tasks those nodes ran are cancelled too. Only the owner can cancel; another person gets 404.

Fields

FieldTypeRequiredDescriptionConstraints
assignmentactor.assignmentyes
cancelledactor.assignmentyes
  • maxItems 1000

Examples

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

Valid: root-and-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": "cancelled",
    "created_at": "2026-11-07T10:00:00.000Z",
    "updated_at": "2026-11-07T10:00:05.000Z",
    "ended_at": "2026-11-07T10:00:05.000Z"
  },
  "cancelled": [
    {
      "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": "cancelled",
      "created_at": "2026-11-07T10:00:00.000Z",
      "updated_at": "2026-11-07T10:00:05.000Z",
      "ended_at": "2026-11-07T10:00:05.000Z"
    }
  ]
}
Rejected: missing-cancelled
{
  "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": "cancelled",
    "created_at": "2026-11-07T10:00:00.000Z",
    "updated_at": "2026-11-07T10:00:05.000Z"
  }
}
Rejected: not-cancelled
{
  "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": "paused",
    "created_at": "2026-11-07T10:00:00.000Z",
    "updated_at": "2026-11-07T10:00:05.000Z"
  },
  "cancelled": []
}

Validate

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