AgentsPermissionRule agents.permission-rule@1

Generated at from openvibe-contracts v0.443.0 and openvibe-sdk v0.177.0.

Version
1.0.0
Owner
actor
Visibility
public
Status
active
Compatibility
backward
Decision
ADR-044
Schema
https://openvibe.network/contracts/agents/permission-rule.v1.json

agents.permission-rule@1 (one-system-v2.md §3.2; Gemini CLI and OpenCode): one permission as data. ACTION is a tool (agents.blueprint@1's hands names, e.g. ov:live.chat.post, machine:shell) or a pattern with * ; RESOURCE narrows it (a path glob, a domain, a command prefix); EFFECT is allow, ask or deny. Rules are read in order and the LAST one that matches wins. WHEN says whether the rule holds while a person is present (attended), in scheduled or triggered work nobody watches (unattended: an ask there settles by the run's level, never waits), or both. The floor (money, passwords, deletions, new recipients, posting in a person's name) asks whatever a rule says.

Fields

FieldTypeRequiredDescriptionConstraints
actionstringyes
  • pattern ^[a-z*][a-z0-9_.:*/@-]*$
  • minLength 1
  • maxLength 200
resourcestringA path glob (src/**), a domain (*.example.org), or a command prefix (npm test).
  • minLength 1
  • maxLength 500
effectenumyes
  • one of "allow", "ask", "deny"
whenenumAbsent: any.
  • one of "attended", "unattended", "any"
reasonstring
  • minLength 1
  • maxLength 300

Examples

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

Valid: ask-before-posting
{
  "action": "ov:live.chat.post",
  "effect": "ask",
  "when": "attended"
}
Valid: no-network-tools
{
  "action": "mcp:*",
  "effect": "deny"
}
Valid: tests-may-run-unattended
{
  "action": "machine:shell",
  "resource": "npm test",
  "effect": "allow",
  "when": "unattended",
  "reason": "Checks run with nobody watching."
}
Rejected: an-action-with-spaces
{
  "action": "rm -rf /",
  "effect": "allow"
}
Rejected: an-effect-nobody-has
{
  "action": "machine:shell",
  "effect": "maybe"
}

Validate

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