NetworkConfirmationChangedPayload network.confirmation.changed@1

Generated at from openvibe-contracts v0.97.0 and openvibe-sdk v0.26.0.

Version
1.0.0
Owner
network
Visibility
first-party
Status
planned
Compatibility
backward
Decision
ADR-034
Schema
https://openvibe.network/contracts/events/payloads/network.confirmation.changed.v1.json

network.confirmation.changed v1 (OpenVibe.Network; roadmap WS-Z2, docs/t2-projects-and-grants.md section 5; shape from OpenVibe.Network docs/contracts-proposal/network.confirmation.changed.v1.json). A confirmation request (network.confirmation-request@1) an agent raised for a sensitive capability was created, approved, denied, expired, cancelled or used. state is the state after the change, named as in network.confirmation-request@1: created leaves it pending (or approved when a standing rule covers it, with rule_id), used leaves it approved, and every other change names its state. A cancelled change says why in cancel_reason. Written to Network's outbox in the transaction that changes it, beside an audit row. Never carries the summary or details, which may hold message text: a reader that needs them asks Network with its own authority. Envelope: subject { type: confirmation, id: cnf_… }, visibility internal, on_behalf_of the owner, actor the owner who decided (or the system for an expiry, a cascade or a standing rule).

Fields

FieldTypeRequiredDescriptionConstraints
confirmation_idstringyes
  • pattern ^cnf_[0-9A-HJKMNP-TV-Z]{26}$
agent_idstringyesThe agent that asked.
  • pattern ^agt_[0-9A-HJKMNP-TV-Z]{26}$
project_idstringyesThe agent's developer project.
  • pattern ^prj_[0-9A-HJKMNP-TV-Z]{26}$
capabilitystringyes
  • pattern ^[a-z][a-z0-9_]*(\.[a-z0-9_]+)+$
audiencestringyesThe owning service of the capability: the only one that may consume or cancel the confirmation.
  • pattern ^openvibe\.[a-z][a-z0-9-]{0,63}$
stateenumyesThe state after the change. A use leaves it approved and sets used_at.
  • one of "pending", "approved", "denied", "expired", "cancelled"
changeenumyes
  • one of "created", "approved", "denied", "expired", "cancelled", "used"
standing_ruleenumOn approved: the rule the owner chose (once creates none).
  • one of "once", "session", "until", "always"
rule_idintegerOn created through a standing rule, or on approved with a session, until or always rule: that rule.
  • minimum 1
cancel_reasonenumOn cancelled: what took the authority away.
  • one of "service", "agent_paused", "agent_revoked", "grant_revoked", "grant_expired", "beyond_host", "member_removed", "account_erased", "app_revoked", "project_archived"
expires_atstring
  • format date-time
changed_atstring
  • format date-time

Examples

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

Valid: approved-by-owner
{
  "confirmation_id": "cnf_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "agent_id": "agt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "capability": "chat.message.send",
  "audience": "openvibe.chat",
  "state": "approved",
  "change": "approved",
  "standing_rule": "session",
  "rule_id": 7,
  "expires_at": "2026-10-03T12:15:00Z",
  "changed_at": "2026-10-03T12:02:00Z"
}
Valid: approved-by-standing-rule
{
  "confirmation_id": "cnf_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "agent_id": "agt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "capability": "chat.message.send",
  "audience": "openvibe.chat",
  "state": "approved",
  "change": "created",
  "rule_id": 7,
  "changed_at": "2026-10-03T12:05:00Z"
}
Valid: cancelled
{
  "confirmation_id": "cnf_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "agent_id": "agt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "capability": "chat.message.send",
  "audience": "openvibe.chat",
  "state": "cancelled",
  "change": "cancelled",
  "cancel_reason": "agent_revoked",
  "changed_at": "2026-10-03T12:07:00Z"
}
Valid: expired
{
  "confirmation_id": "cnf_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "agent_id": "agt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "capability": "space.post.write",
  "audience": "openvibe.space",
  "state": "expired",
  "change": "expired",
  "changed_at": "2026-10-03T12:15:00Z"
}
Valid: requested
{
  "confirmation_id": "cnf_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "agent_id": "agt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "capability": "chat.message.send",
  "audience": "openvibe.chat",
  "state": "pending",
  "change": "created",
  "expires_at": "2026-10-03T12:15:00Z",
  "changed_at": "2026-10-03T12:00:00Z"
}
Valid: used
{
  "confirmation_id": "cnf_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "agent_id": "agt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "capability": "network.integration.github.read",
  "audience": "openvibe.network",
  "state": "approved",
  "change": "used",
  "changed_at": "2026-10-03T12:06:00Z"
}
Rejected: cancelled-without-reason
{
  "confirmation_id": "cnf_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "agent_id": "agt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "capability": "chat.message.send",
  "audience": "openvibe.chat",
  "state": "cancelled",
  "change": "cancelled"
}
Rejected: missing-audience
{
  "confirmation_id": "cnf_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "agent_id": "agt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "capability": "chat.message.send",
  "state": "pending",
  "change": "created"
}
Rejected: requested-state
{
  "confirmation_id": "cnf_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "agent_id": "agt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "capability": "chat.message.send",
  "audience": "openvibe.chat",
  "state": "requested",
  "change": "created"
}
Rejected: used-not-approved
{
  "confirmation_id": "cnf_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "agent_id": "agt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "capability": "chat.message.send",
  "audience": "openvibe.chat",
  "state": "pending",
  "change": "used"
}
Rejected: with-summary
{
  "confirmation_id": "cnf_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "agent_id": "agt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "capability": "chat.message.send",
  "audience": "openvibe.chat",
  "state": "pending",
  "change": "created",
  "summary": "Send 'see you at 8' to Sam"
}

Validate

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