ActorA2ATaskResult actor.a2a-task-result@1

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

Version
1.0.0
Owner
actor
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/actor/a2a-task-result.v1.json

actor.a2a-task-result@1: the A2A task OpenVibe.Actor accepted or answered: its id, its state (submitted, working, completed, failed), the text answer when it has one and the id of the Actor task behind it. Never a credential.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • maxLength 64
stateenumyes
  • one of "submitted", "working", "completed", "failed"
answerstring
  • maxLength 20000
taskIdstring
  • maxLength 64
errorstring
  • maxLength 500

Examples

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

Valid: one
{
  "id": "a2a_1",
  "state": "completed",
  "answer": "Sunny, 21 °C.",
  "taskId": "tsk_1"
}
Rejected: bad-state
{
  "id": "a2a_1",
  "state": "maybe"
}

Validate

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