---
title: "agents.permission-rule@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/agents.permission-rule"
updated: null
---

# agents.permission-rule@1 · OpenVibe.Services

HTML: [agents.permission-rule@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/agents.permission-rule)

# AgentsPermissionRule `agents.permission-rule@1`

Generated at 2026-11-17 06:52:56 UTC from [`openvibe-contracts v0.443.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.443.0) and [`openvibe-sdk v0.177.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.177.0).

- Version: 1.0.0
- Owner: actor
- Visibility: public
- Status: active
- Compatibility: backward
- Decision: [ADR-044](/docs/adr/ADR-044)
- Schema: [`https://openvibe.network/contracts/agents/permission-rule.v1.json`](/docs/contracts/agents.permission-rule.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

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `action` | string | yes |  | - `pattern ^[a-z*][a-z0-9_.:*/@-]*$`<br>- `minLength 1`<br>- `maxLength 200` |
| `resource` | string |  | A path glob (src/\*\*), a domain (\*.example.org), or a command prefix (npm test). | - `minLength 1`<br>- `maxLength 500` |
| `effect` | enum | yes |  | - `one of "allow", "ask", "deny"` |
| `when` | enum |  | Absent: any. | - `one of "attended", "unattended", "any"` |
| `reason` | string |  |  | - `minLength 1`<br>- `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 }] }
~~~~
