You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(permissions): implement org.hypercerts and app.certified CRUD permission sets
Add the two permission-set lexicons designed in docs/design/permission-sets.md:
- org.hypercerts.permissions.crud — CRUD over all org.hypercerts.* records
- app.certified.permissions.crud — CRUD over all app.certified.* records
Each enumerates every type:"record" collection in its namespace (the spec
forbids wildcards inside a permission set) with action create/update/delete.
permission-set is a lexicon primitive that lex gen-api cannot codegen (it has
no TypeScript shape), so these files are published as-is but excluded from the
codegen globs (gen-api/gen-md/gen-ts) and from generated/exports.ts. The full
`npm run check` (gen-api, lint, typecheck, build, test, style) passes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add two permission-set lexicons — `org.hypercerts.permissions.crud` and `app.certified.permissions.crud` — each granting create/update/delete over every record collection in its namespace.
6
+
7
+
A [permission set](https://atproto.com/specs/permission#permission-sets) lets any AT Protocol app request a whole bundle of `repo:` scopes with a single `include:<nsid>` OAuth scope, instead of enumerating each collection by hand. The user's PDS resolves and expands the set during the OAuth grant; the same published set can also be consumed by services (e.g. the Certified group service) when expanding API-key scopes.
8
+
9
+
Permission sets are published as-is (they are the source of truth for what gets published to AT Protocol) but have no TypeScript shape — `lex gen-api` cannot generate code for `permission-set` defs. They are therefore excluded from the codegen globs (`gen-api`/`gen-md`/`gen-ts`) and from `generated/exports.ts`, while still shipping as raw lexicon JSON.
10
+
11
+
Collection lists are enumerated explicitly because the spec forbids wildcards inside a permission set; they must be kept in sync as record types are added. See `docs/design/permission-sets.md`.
Copy file name to clipboardExpand all lines: SCHEMAS.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -289,6 +289,12 @@ A free-text string value (e.g. a display name, wallet address, or other identifi
289
289
290
290
---
291
291
292
+
### `org.hypercerts.permissions.crud`
293
+
294
+
**Description:** Permission set granting create, update, and delete on every Hypercerts (org.hypercerts) record collection.
295
+
296
+
---
297
+
292
298
### `org.hypercerts.workscope.cel`
293
299
294
300
**Description:** A structured, machine-evaluable work scope definition using CEL (Common Expression Language). Tags referenced in the expression correspond to org.hypercerts.workscope.tag keys. See https://github.com/google/cel-spec. Note: this is intentionally type 'object' (not 'record') so it can be directly embedded inline in union types (e.g., activity.workScope) without requiring a separate collection or strongRef indirection.
@@ -522,6 +528,12 @@ The EIP-712 typed data message that was signed by the wallet. Contains the field
522
528
523
529
---
524
530
531
+
### `app.certified.permissions.crud`
532
+
533
+
**Description:** Permission set granting create, update, and delete on every Certified (app.certified) record collection.
534
+
535
+
---
536
+
525
537
## Type Definitions
526
538
527
539
Common type definitions used across all protocols.
"description": "Permission set granting create, update, and delete on every Certified (app.certified) record collection.",
8
+
"title": "Full write access (create, update, delete) on Certified record collections",
9
+
"detail": "Create, update, and delete records in every Certified (app.certified) record collection. Requested as a single include: scope instead of enumerating each repo: scope.",
"description": "Permission set granting create, update, and delete on every Hypercerts (org.hypercerts) record collection.",
8
+
"title": "Full write access (create, update, delete) on Hypercerts record collections",
9
+
"detail": "Create, update, and delete records in every Hypercerts (org.hypercerts) record collection. Requested as a single include: scope instead of enumerating each repo: scope.",
"//permissions": "permission-set lexicons (lexicons/**/permissions/*.json) are published as-is but have no TS shape; lex gen-* cannot codegen them, so they are excluded from the codegen globs below.",
0 commit comments