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 write permission sets
Add the two permission-set lexicons designed in docs/design/permission-sets.md:
- org.hypercerts.permissions.crud — write (create/update/delete) over all
org.hypercerts.* record collections
- app.certified.permissions.crud — write (create/update/delete) over all
app.certified.* record collections
TWO sets, not one combined set, because the spec mandates it: a permission set
"is limited to expressing permissions that reference resources under the same
NSID namespace as the set itself" and "can not address 'sibling groups' or
'parents'" (https://atproto.com/specs/permission#permission-sets).
org.hypercerts and app.certified are different namespace authorities, so they
cannot legally be combined in one set. An app needing both requests both
include: scopes. Each set also enumerates its collections explicitly (the spec
forbids wildcards inside a permission set).
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. They do
appear in SCHEMAS.md. The full `npm run check` (gen-api, lint, typecheck,
build, test, style) passes.
The human-readable title/detail are written as authorization-dialog consent
copy: plain-language, concise, naming recognizable record categories.
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
+
There are **two** sets rather than one because the spec requires it: a permission set "is limited to expressing permissions that reference resources under the same NSID namespace as the set itself" and "can not address 'sibling groups' or 'parents'". `org.hypercerts` and `app.certified` are separate namespace authorities, so they cannot be combined in a single set — an app needing both requests both `include:` scopes.
10
+
11
+
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.
12
+
13
+
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.
"//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