Commit de9b27a
authored
v0.2.0 — capability/permission vocabulary split + manifest hardening (#3)
* refactor(rename): FeatureManifest -> CapabilityManifest (wave A.1 — manifest type)
* refactor(rename): Feature{Status,Record,Store} -> Capability* (wave A.2 — approval)
* refactor(rename): FeatureCapabilityRegistry -> PermissionRegistry (wave A.3 — registry)
* fix(rename): clean up remaining Feature* leftovers in fixture manifest + fixHint string
* refactor(rename): update agent-facing fixHint wording from 'feature' to 'capability' (wave A.5 — vocabulary follow-up)
* refactor(wave-b): rename inner-permission field `capabilities[]` -> `permissions[]` and error codes `capability.*` -> `permission.*`
- CapabilityManifest.capabilities -> .permissions (the Permission[] array)
- ActionManifest.capabilities -> .permissions (the PermissionId[] grant list)
- broker fields: capabilityId -> permissionId (NetworkBroker, StorageBroker, ClockBroker, AuditBroker, UiBroker)
- AuditTransport.emit envelope: capabilityId -> permissionId
- replay envelope: capabilityId -> permissionId
- CapabilityError -> PermissionError
- error code rename (inner-permission concerns):
manifest.capabilities.* -> manifest.permissions.*
action.capabilities.* -> action.permissions.*
action.capability_ref.* -> action.permission_ref.*
capability.{not_object,type,duplicate_id,undeclared,denied,no_broker,action.*} -> permission.*
capability.network.{hosts,host_value,methods,method_value,no_transport,bad_url,host_denied,method_denied} -> permission.*
capability.storage.{mode,no_transport,read_denied,write_denied} -> permission.*
capability.audit.no_transport -> permission.audit.no_transport
- fixHints updated to match new vocab
- fixture manifest.ts, smoke.ts, end-to-end.ts updated for field + code assertions
The outer 'capability' identifier (capabilityId, capabilityVersionHash, AuditEventKind 'capability_emit') is unchanged — that remains the manifest-level identifier per the v0.2 vocab split.
Breaking change: manifest hashes change (new shape). Existing approvals will fall back to 'submitted' on first run; require re-approval.
Gate: tsc=0, tests=737/737, demo=24/24.
* test(hardening): add failing tests for 5 manifest hardening checks (TDD red)
* feat(hardening): add manifest hardening checks (5 rules, errors + warnings)
- permission.reason.too_short: reason must be >=5 words
- action.description.too_short: action description must be >=5 words
- permission.network.host_wildcard: no '*' in network hosts
- permission.storage.scope_wildcard: no '*' in storage scope
- permission.reason.no_action_ref (warning): reason should mention a referencing action id
hardenManifest() lives in capability-manifest.ts alongside validateCapabilityManifest().
* feat(approval): wire hardenManifest() into submit(); add SubmitResult.warnings
submit() now runs hardening after structural validation. If any hardening
errors exist it throws ApprovalError on the first one. Warnings are
surfaced on the new SubmitResult shape (CapabilityRecord + warnings[]).
* chore(fixture): name referencing actions in each permission.reason
Clears the 7 permission.reason.no_action_ref warnings the hardening
checks would otherwise surface on the suspicious-transaction-triage demo.
Each reason now opens with 'Used by <action.id>' so an approver can trace
every grant to its caller.
* docs(readme): rewrite for v0.2 — show-by-failing 4-beat opener
- Locks the tagline: 'Writmint is a verifier for capabilities an author
can't author past.'
- 4-beat opener: agent writes manifest with a wildcard host -> submit fails
with the verified-real permission.network.host_wildcard error -> fix and
resubmit -> run; every brokered call lands in the audit sink.
- Updates every API name to v0.2: CapabilityManifest, permissions[],
MemoryCapabilityStore, createPermissionRegistry, PermissionError,
permission.* error codes, capabilityId (outer wrapper field), scope.cap().
- Mentions hardenManifest() under pillar 1.
- Updates test count 737 -> 750.
* release: 0.2.0
CHANGELOG entry documents the inner/outer vocabulary split
(feature -> capability outer, capabilities[] -> permissions[] inner),
manifest hardening (5 rules), and the resulting hash shift requiring
re-submit + re-approve for any manifest carried over from v0.1.
package.json: version 0.1.0 -> 0.2.0; description rewritten around the
locked tagline; keywords swap feature-manifest/capability-scoping for
capability-manifest/permission-scoping and add manifest-hardening.
---------1 parent 607af24 commit de9b27a
16 files changed
Lines changed: 1047 additions & 488 deletions
File tree
- fixtures/suspicious-transaction-triage
- src
- tests/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
7 | 103 | | |
8 | 104 | | |
9 | 105 | | |
| |||
0 commit comments