ActorLevelChange actor.level-change@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/level-change.v1.json
actor.level-change@1: the body of PUT /api/v1/agents/{id}/level (capability actor.agent.manage). LEVEL is the new approval level of the person's agent; the answer is the agent (actor.agent@1) with its level. The level never widens the floor: money, passwords, deletions and sending to a new recipient ask at every level. AGENT_ID and THREAD_ID are optional echoes for a caller changing a level from a thread; Actor checks the agent in the path and stores the agent level only.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
level | enum | yes |
| |
agent_id | string |
| ||
thread_id | string |
| ||
reason | string |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: full
{
"level": "full",
"agent_id": "agt_01M4C49CW34NGX7TR2TNRVFWNW",
"reason": "The person is watching this run."
}Rejected: unknown-level
{
"level": "everything"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('actor.level-change@1', value); // { valid, errors: [{ path, message }] }