@cloudhal/agent-runtime 0.3.13 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
What governs agents — no MCP SDK in here (ADR-0011).
|
|
4
4
|
|
|
5
|
-
- **`PolicyEngine`** — `evaluate(principal, tool, { confirmed })` → `allow | deny | approval-required`. Checks the principal's scopes against the tool's scopes, limits a call to the scopes of the skill the principal declared, and requires approval for tools marked `requiresApproval`, annotated `destructiveHint`, or listed in the skill's `cloudhal.approval`. `defaultScopes(actor)`: humans/system get
|
|
5
|
+
- **`PolicyEngine`** — `evaluate(principal, tool, { confirmed })` → `allow | deny | approval-required`. Checks the principal's scopes against the tool's scopes, limits a call to the scopes of the skill the principal declared, and requires approval for tools marked `requiresApproval`, annotated `destructiveHint`, or listed in the skill's `cloudhal.approval`. `defaultScopes(actor)`: humans/system get `*`; agents get reading, content writes, previews and uploads, never publish or rollback (the exact list is in the function).
|
|
6
6
|
- **`loadSkill(dir)` / `loadSkills(root)`** — SKILL.md frontmatter validated against the `skill-manifest` contract; Cloudhal data in flat `metadata` keys (`cloudhal.schemaVersion`, `cloudhal.requiresCapabilities`, `cloudhal.scopes`, `cloudhal.approval`). Bodies and `references/*.md` are read lazily (progressive disclosure).
|
|
7
7
|
- **`AuditLog`** — append-only `audit` table (migration `0003_agent`): who (actor), what (tool, input), decision + reason, skill, outcome, snapshot id, duration.
|
|
8
8
|
|
|
9
|
-
Scopes
|
|
9
|
+
**Scopes** (`src/policy.ts`, RFC-0005 §1) are the single list the engine, REST, MCP and Studio use:
|
|
10
|
+
|
|
11
|
+
- `KEY_SCOPES` — what an agent key may carry (site, content, preview, publish, rollback, assets, analytics, comments, schedules and releases, several with an `:own` variant limited to one's own nodes);
|
|
12
|
+
- `PERSON_SCOPES` — held only by people through their role, never stored on a key (members, settings, agents, audit, commenter data, automations, in-editor AI);
|
|
13
|
+
- `*` — every scope. `implies(a, b)` follows the lattice (`content:write` → `content:write:own` → `content:draft:own` → `content:propose`, `site:publish` → `releases:publish`, …).
|
|
14
|
+
|
|
15
|
+
**Roles** (`src/roles.ts`, RFC-0005 §2, ADR-0018): `ROLES` (Owner > Administrator > Editor > Author > Contributor) and `ROLE_SCOPES` map each role to scopes; a key never holds more than its creator's role (`narrow`), and `modeCap` caps its mode (`edits` for Contributors, `auto` otherwise).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudhal/agent-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Cloudhal agent runtime: policy engine (actors, scopes, approvals), skill loader, audit log",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://cloudhal.dev",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"README.md"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@cloudhal/core-contracts": "0.
|
|
28
|
-
"@cloudhal/storage": "0.
|
|
27
|
+
"@cloudhal/core-contracts": "0.4.0",
|
|
28
|
+
"@cloudhal/storage": "0.4.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^26.6.5",
|