ActorAsk actor.ask@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
Schema
https://openvibe.network/contracts/actor/ask.v1.json

One question or action waiting for the owner of a personal Actor. An answer never grants permission for a different action.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^ask_[0-9A-HJKMNP-TV-Z]{26}$
actorstringyes
  • pattern ^act_[0-9A-HJKMNP-TV-Z]{26}$
goalstringyes
  • pattern ^agl_[0-9A-HJKMNP-TV-Z]{26}$
kindenumyes
  • one of "approve_action", "answer_question", "do_yourself", "sign_in"
textstringyes
  • minLength 1
  • maxLength 2000
optionsarray of stringyes
  • maxItems 12
  • unique items
  • items: minLength 1
  • items: maxLength 200
createdstringyes
  • format date-time
answeredone ofyes
screen_urlstring | nullThe Actor page where its person can take over the screen; not a credential.
  • maxLength 2048
evidenceobject | null

Examples

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

Valid: answered
{
  "id": "ask_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "actor": "act_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "goal": "agl_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "kind": "approve_action",
  "text": "Send this application?",
  "options": [
    "Approve",
    "Decline"
  ],
  "created": "2026-11-09T09:00:00.000Z",
  "answered": {
    "at": "2026-11-09T09:01:00.000Z",
    "decision": "answer",
    "text": "Approve"
  }
}
Valid: pending
{
  "id": "ask_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "actor": "act_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "goal": "agl_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "kind": "approve_action",
  "text": "Send this application?",
  "options": [
    "Approve",
    "Decline"
  ],
  "created": "2026-11-09T09:00:00.000Z",
  "answered": null
}
Valid: sign-in
{
  "id": "ask_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "actor": "act_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "goal": "agl_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "kind": "sign_in",
  "text": "Send this application?",
  "options": [
    "Sign in on its screen",
    "Done"
  ],
  "created": "2026-11-09T09:00:00.000Z",
  "answered": null,
  "screen_url": "/you?screen=1",
  "evidence": {
    "text": "Sign in to the site on your Actor’s screen."
  }
}
Rejected: answer-without-time
{
  "id": "ask_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "actor": "act_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "goal": "agl_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "kind": "approve_action",
  "text": "Send this application?",
  "options": [
    "Approve",
    "Decline"
  ],
  "created": "2026-11-09T09:00:00.000Z",
  "answered": {
    "decision": "answer"
  }
}
Rejected: empty-text
{
  "id": "ask_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "actor": "act_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "goal": "agl_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "kind": "approve_action",
  "text": "",
  "options": [
    "Approve",
    "Decline"
  ],
  "created": "2026-11-09T09:00:00.000Z",
  "answered": null
}
Rejected: unknown-kind
{
  "id": "ask_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "actor": "act_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "goal": "agl_01K6R3A1B2C3D4E5F6G7H8J9KF",
  "kind": "run_anything",
  "text": "Send this application?",
  "options": [
    "Approve",
    "Decline"
  ],
  "created": "2026-11-09T09:00:00.000Z",
  "answered": null
}

Validate

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