@usehercules/convex 0.0.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.
Files changed (67) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +478 -0
  3. package/dist/_generated/component.d.ts +184 -0
  4. package/dist/_generated/component.d.ts.map +1 -0
  5. package/dist/_generated/component.js +11 -0
  6. package/dist/_generated/component.js.map +1 -0
  7. package/dist/checker/cli.d.ts +3 -0
  8. package/dist/checker/cli.d.ts.map +1 -0
  9. package/dist/checker/cli.js +71 -0
  10. package/dist/checker/cli.js.map +1 -0
  11. package/dist/checker/index.d.ts +28 -0
  12. package/dist/checker/index.d.ts.map +1 -0
  13. package/dist/checker/index.js +1928 -0
  14. package/dist/checker/index.js.map +1 -0
  15. package/dist/client/access-admin.d.ts +818 -0
  16. package/dist/client/access-admin.d.ts.map +1 -0
  17. package/dist/client/access-admin.js +1830 -0
  18. package/dist/client/access-admin.js.map +1 -0
  19. package/dist/client/http.d.ts +19 -0
  20. package/dist/client/http.d.ts.map +1 -0
  21. package/dist/client/http.js +76 -0
  22. package/dist/client/http.js.map +1 -0
  23. package/dist/client/index.d.ts +440 -0
  24. package/dist/client/index.d.ts.map +1 -0
  25. package/dist/client/index.js +654 -0
  26. package/dist/client/index.js.map +1 -0
  27. package/dist/component/authz.d.ts +114 -0
  28. package/dist/component/authz.d.ts.map +1 -0
  29. package/dist/component/authz.js +168 -0
  30. package/dist/component/authz.js.map +1 -0
  31. package/dist/component/checks.d.ts +86 -0
  32. package/dist/component/checks.d.ts.map +1 -0
  33. package/dist/component/checks.js +184 -0
  34. package/dist/component/checks.js.map +1 -0
  35. package/dist/component/convex.config.d.ts +3 -0
  36. package/dist/component/convex.config.d.ts.map +1 -0
  37. package/dist/component/convex.config.js +3 -0
  38. package/dist/component/convex.config.js.map +1 -0
  39. package/dist/component/effective.d.ts +82 -0
  40. package/dist/component/effective.d.ts.map +1 -0
  41. package/dist/component/effective.js +757 -0
  42. package/dist/component/effective.js.map +1 -0
  43. package/dist/component/queries.d.ts +170 -0
  44. package/dist/component/queries.d.ts.map +1 -0
  45. package/dist/component/queries.js +633 -0
  46. package/dist/component/queries.js.map +1 -0
  47. package/dist/component/schema.d.ts +258 -0
  48. package/dist/component/schema.d.ts.map +1 -0
  49. package/dist/component/schema.js +222 -0
  50. package/dist/component/schema.js.map +1 -0
  51. package/dist/component/sync.d.ts +85 -0
  52. package/dist/component/sync.d.ts.map +1 -0
  53. package/dist/component/sync.js +851 -0
  54. package/dist/component/sync.js.map +1 -0
  55. package/dist/shared/projection-protocol.d.ts +1624 -0
  56. package/dist/shared/projection-protocol.d.ts.map +1 -0
  57. package/dist/shared/projection-protocol.js +561 -0
  58. package/dist/shared/projection-protocol.js.map +1 -0
  59. package/dist/shared/sync.d.ts +24 -0
  60. package/dist/shared/sync.d.ts.map +1 -0
  61. package/dist/shared/sync.js +18 -0
  62. package/dist/shared/sync.js.map +1 -0
  63. package/dist/shared/token.d.ts +5 -0
  64. package/dist/shared/token.d.ts.map +1 -0
  65. package/dist/shared/token.js +19 -0
  66. package/dist/shared/token.js.map +1 -0
  67. package/package.json +89 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAwQ5C,yEAAyE;AACzE,uEAAuE;AACvE,+EAA+E;AAC/E,MAAM,mBAAmB,GAAG,EAAE,CAAC;AA2K/B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAA8C;IAE9C,MAAM,SAAS,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAE5C,OAAO;QACL,WAAW,EAAE,OAAO,CAAC,KAAK;QAC1B,cAAc,EAAE,OAAO,CAAC,QAAQ;QAChC,YAAY,EAAE,OAAO,CAAC,MAAM;QAC5B,kBAAkB,EAAE,wBAAwB,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B;aACnC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,EAAE;QAC9D,eAAe,EAAE,QAAQ,CAAC,eAAe;QACzC,OAAO;QACP,UAAU,EAAE,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS;QAClE,YAAY;QACZ,UAAU;QACV,GAAG,YAAY,CAAC,SAAS,CAAC;KAC3B,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACtB,MAAM,IAAI,WAAW,CAAC;YACpB,IAAI,EAAE,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,iBAAiB;YACjE,OAAO,EAAE,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,yBAAyB;YAC5E,UAAU,EAAE,QAAQ,CAAC,UAAU;YAC/B,aAAa,EAAE,QAAQ,CAAC,aAAa;SACtC,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
@@ -0,0 +1,114 @@
1
+ /** The canonical CRUD-ish core. `list` is intentionally distinct from `read`. */
2
+ export declare const CANONICAL_ACTIONS: readonly ["read", "create", "update", "delete", "list"];
3
+ export type CanonicalAction = (typeof CANONICAL_ACTIONS)[number];
4
+ /** `manage` is the formal CRUD superset, expanded at eval time — never stored. */
5
+ export declare const MANAGE_ACTION = "manage";
6
+ /** `*` is all verbs (canonical + custom) on the resource type. */
7
+ export declare const WILDCARD_ACTION = "*";
8
+ /** Access-administration actions that product wildcards must never confer. */
9
+ export declare const RESERVED_ACCESS_CONTROL_ACTIONS: ReadonlySet<string>;
10
+ /**
11
+ * Expand a granted action token into the verbs it covers. `manage` expands to
12
+ * the canonical CRUD set; every other token (canonical verb, custom verb, or
13
+ * `*`) passes through unchanged. `*` is handled by {@link actionMatches} rather
14
+ * than expanded to a finite list here (the universe of custom verbs is open).
15
+ */
16
+ export declare function expandAction(action: string): string[];
17
+ /**
18
+ * Does a granted action satisfy a requested action?
19
+ * identical → always matches (incl. `manage` granted for a `manage` request).
20
+ * `*` → matches any non-reserved requested verb.
21
+ * `manage` → also matches any canonical CRUD verb.
22
+ * else → matches only the identical verb.
23
+ */
24
+ export declare function actionMatches(grantedAction: string, requestedAction: string): boolean;
25
+ /**
26
+ * - `immutable` — Owner: implicit all-permissions-including-future; cannot be
27
+ * edited or narrowed; the evaluator short-circuits ALLOW before any lookup.
28
+ * - `default` — Admin: all-permissions-including-future by default, but
29
+ * builder-narrowable and fenced from the Owner-only levers
30
+ * ({@link OWNER_ONLY_LEVERS}). Once narrowed, the producer downgrades the
31
+ * role to `none` (see snapshot narrowed-admin detection).
32
+ * - `none` — Member / custom: enumerated grants govern.
33
+ */
34
+ export type WildcardMode = "none" | "immutable" | "default";
35
+ /**
36
+ * Owner-only levers — powers that a `default`-wildcard (Admin) principal is
37
+ * fenced out of, even though it otherwise has everything. These are canonical
38
+ * keys but are NOT seeded as permissions in Wave 1 (they are an algebra
39
+ * constant). The fence is enforced purely in {@link evaluateAccess}.
40
+ *
41
+ * Each lever's `action` is matched against a request via {@link actionMatches}
42
+ * (the same grant-side superset rule). A lever with action `manage` therefore
43
+ * fences ALL canonical CRUD on that `resourceType`, not just a literal
44
+ * `:manage` request — and since requests never carry `manage`/`*` (see
45
+ * {@link RequestedAccess}), the `manage` levers must expand or they would be
46
+ * dead. The two all-or-nothing Owner domains (billing, owner management) use
47
+ * `manage` so every operation on them is fenced; the two single-verb levers
48
+ * (delete app, transfer ownership) use their concrete verb.
49
+ */
50
+ export declare const OWNER_ONLY_LEVERS: ReadonlyArray<{
51
+ resourceType: string;
52
+ action: string;
53
+ }>;
54
+ /**
55
+ * Is a requested access an Owner-only lever (Admin-fenced)? Matches by
56
+ * `resourceType` + action-superset, so a `manage` lever fences every canonical
57
+ * CRUD verb on its resourceType while a concrete-verb lever fences only that
58
+ * verb. This is what makes the billing / owner-management fences effective for
59
+ * the real CRUD requests that reach the evaluator.
60
+ */
61
+ export declare function isOwnerOnlyLever(request: {
62
+ resourceType: string;
63
+ action: string;
64
+ classification?: "delegable" | "owner_only";
65
+ }): boolean;
66
+ export type Effect = "allow" | "deny";
67
+ export type RequestedAccess = {
68
+ /** Canonical resourceType, e.g. `app.loans`. */
69
+ resourceType: string;
70
+ /** Requested verb (canonical or custom), e.g. `disburse`. Not `manage`/`*`. */
71
+ action: string;
72
+ /** Whether the catalog permits this permission to be delegated. */
73
+ classification?: "delegable" | "owner_only";
74
+ /** Specific instance id, when the request targets a single resource. */
75
+ objectId?: string;
76
+ };
77
+ export type ApplicableEntry = {
78
+ effect: Effect;
79
+ /** Granted resourceType; `*` matches any resourceType. */
80
+ resourceType: string;
81
+ /** Granted verb: a concrete verb, `manage`, or `*`. */
82
+ action: string;
83
+ /**
84
+ * `scope`/type-level entry matches any instance of its resourceType;
85
+ * `resource` instance-level entry matches only its own `objectId`.
86
+ */
87
+ objectType: "scope" | "resource";
88
+ objectId?: string;
89
+ };
90
+ export declare function hasExplicitDeny(entries: ApplicableEntry[], request: RequestedAccess): boolean;
91
+ /**
92
+ * Resolve a single access request to allow/deny per §0.4:
93
+ *
94
+ * 1. Owner (`immutable`) → ALLOW before any entry scan.
95
+ * 2. Gather matching entries (resourceType + action + object).
96
+ * 3. Explicit deny wins → DENY. (Instance-allow never beats type-deny: a
97
+ * type-level deny is in the matched set and short-circuits here.)
98
+ * 4. Admin (`default`) and request is NOT an Owner-only lever → ALLOW
99
+ * (after the deny check, so an explicit narrowing deny still wins).
100
+ * 5. Any matching allow that is NOT an Owner-only lever → ALLOW (role +
101
+ * direct grants union on allow). Owner-only levers are conferrable only by
102
+ * the immutable Owner at step 1.
103
+ * 6. Else implicit DENY.
104
+ *
105
+ * `entries` must already be filtered to the principal, scope, and to
106
+ * non-expired / non-revoked rows. Scope/rule denylists are fed in as `deny`
107
+ * entries so they short-circuit at step 3 (intersection guardrail).
108
+ */
109
+ export declare function evaluateAccess(args: {
110
+ wildcard: WildcardMode;
111
+ entries: ApplicableEntry[];
112
+ request: RequestedAccess;
113
+ }): Effect;
114
+ //# sourceMappingURL=authz.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authz.d.ts","sourceRoot":"","sources":["../../src/component/authz.ts"],"names":[],"mappings":"AA0BA,iFAAiF;AACjF,eAAO,MAAM,iBAAiB,yDAMpB,CAAC;AACX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,kFAAkF;AAClF,eAAO,MAAM,aAAa,WAAW,CAAC;AAEtC,kEAAkE;AAClE,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,8EAA8E;AAC9E,eAAO,MAAM,+BAA+B,EAAE,WAAW,CAAC,MAAM,CAG9D,CAAC;AAEH;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAErD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,GACtB,OAAO,CAYT;AAMD;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;AAE5D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,EAAE,aAAa,CAAC;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB,CAKS,CAAC;AAEX;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IACxC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,WAAW,GAAG,YAAY,CAAC;CAC7C,GAAG,OAAO,CASV;AAMD,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAEtC,MAAM,MAAM,eAAe,GAAG;IAC5B,gDAAgD;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,+EAA+E;IAC/E,MAAM,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,cAAc,CAAC,EAAE,WAAW,GAAG,YAAY,CAAC;IAC5C,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,YAAY,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,EAAE,OAAO,GAAG,UAAU,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAuBF,wBAAgB,eAAe,CAC7B,OAAO,EAAE,eAAe,EAAE,EAC1B,OAAO,EAAE,eAAe,GACvB,OAAO,CAIT;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE;IACnC,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,OAAO,EAAE,eAAe,CAAC;CAC1B,GAAG,MAAM,CA8BT"}
@@ -0,0 +1,168 @@
1
+ // Canonical access-control authorization algebra (ported from the monorepo).
2
+ //
3
+ // SOURCE OF TRUTH: packages/backend-shared/src/access-control/authz.ts in the
4
+ // herculesai monorepo. This file is a near-verbatim copy of the PURE algebra
5
+ // (the monorepo header explicitly anticipates this hercules-js port). The
6
+ // platform projection builder and this Convex runtime must resolve
7
+ // `can(principal, action, resource)` IDENTICALLY, so the algebra below must be
8
+ // kept byte-identical with the canonical module. Any divergence is a silent
9
+ // authorization bug.
10
+ //
11
+ // The slug-grammar parser/regex (`parseAccessPermissionKey`, etc.) and the
12
+ // seed-default `roleWildcardMode` helper from the canonical file are
13
+ // intentionally omitted: the runtime never parses keys (it resolves a
14
+ // request's structured `(resourceType, action)` via catalog lookup — see
15
+ // component/checks.ts), and the producer already computes and ships each
16
+ // role's `wildcard` mode (incl. the narrowed-Admin downgrade) in the
17
+ // projection snapshot, so re-deriving it here would be a second source of
18
+ // truth.
19
+ //
20
+ // See ACCESS_CONTROL_UX_DECISION.md §0 (authorization model) and §0b (roles &
21
+ // defaults) for the locked design this implements.
22
+ // ---------------------------------------------------------------------------
23
+ // §0.2 Canonical action taxonomy
24
+ // ---------------------------------------------------------------------------
25
+ /** The canonical CRUD-ish core. `list` is intentionally distinct from `read`. */
26
+ export const CANONICAL_ACTIONS = [
27
+ "read",
28
+ "create",
29
+ "update",
30
+ "delete",
31
+ "list",
32
+ ];
33
+ /** `manage` is the formal CRUD superset, expanded at eval time — never stored. */
34
+ export const MANAGE_ACTION = "manage";
35
+ /** `*` is all verbs (canonical + custom) on the resource type. */
36
+ export const WILDCARD_ACTION = "*";
37
+ /** Access-administration actions that product wildcards must never confer. */
38
+ export const RESERVED_ACCESS_CONTROL_ACTIONS = new Set([
39
+ "manage_members",
40
+ "manage_access",
41
+ ]);
42
+ /**
43
+ * Expand a granted action token into the verbs it covers. `manage` expands to
44
+ * the canonical CRUD set; every other token (canonical verb, custom verb, or
45
+ * `*`) passes through unchanged. `*` is handled by {@link actionMatches} rather
46
+ * than expanded to a finite list here (the universe of custom verbs is open).
47
+ */
48
+ export function expandAction(action) {
49
+ return action === MANAGE_ACTION ? [...CANONICAL_ACTIONS] : [action];
50
+ }
51
+ /**
52
+ * Does a granted action satisfy a requested action?
53
+ * identical → always matches (incl. `manage` granted for a `manage` request).
54
+ * `*` → matches any non-reserved requested verb.
55
+ * `manage` → also matches any canonical CRUD verb.
56
+ * else → matches only the identical verb.
57
+ */
58
+ export function actionMatches(grantedAction, requestedAction) {
59
+ // Identity first: a grant of an action always satisfies a request for that
60
+ // same action — including `manage` for a `manage`-action permission, which
61
+ // the CRUD-only manage branch below would otherwise reject.
62
+ if (grantedAction === requestedAction)
63
+ return true;
64
+ if (grantedAction === WILDCARD_ACTION) {
65
+ return !RESERVED_ACCESS_CONTROL_ACTIONS.has(requestedAction);
66
+ }
67
+ if (grantedAction === MANAGE_ACTION) {
68
+ return CANONICAL_ACTIONS.includes(requestedAction);
69
+ }
70
+ return false;
71
+ }
72
+ /**
73
+ * Owner-only levers — powers that a `default`-wildcard (Admin) principal is
74
+ * fenced out of, even though it otherwise has everything. These are canonical
75
+ * keys but are NOT seeded as permissions in Wave 1 (they are an algebra
76
+ * constant). The fence is enforced purely in {@link evaluateAccess}.
77
+ *
78
+ * Each lever's `action` is matched against a request via {@link actionMatches}
79
+ * (the same grant-side superset rule). A lever with action `manage` therefore
80
+ * fences ALL canonical CRUD on that `resourceType`, not just a literal
81
+ * `:manage` request — and since requests never carry `manage`/`*` (see
82
+ * {@link RequestedAccess}), the `manage` levers must expand or they would be
83
+ * dead. The two all-or-nothing Owner domains (billing, owner management) use
84
+ * `manage` so every operation on them is fenced; the two single-verb levers
85
+ * (delete app, transfer ownership) use their concrete verb.
86
+ */
87
+ export const OWNER_ONLY_LEVERS = [
88
+ { resourceType: "system.app", action: "delete" }, // delete app
89
+ { resourceType: "system.ownership", action: "transfer" }, // transfer ownership
90
+ { resourceType: "system.billing", action: MANAGE_ACTION }, // billing (all operations)
91
+ { resourceType: "system.access.owner", action: MANAGE_ACTION }, // add/remove/demote Owner (all operations)
92
+ ];
93
+ /**
94
+ * Is a requested access an Owner-only lever (Admin-fenced)? Matches by
95
+ * `resourceType` + action-superset, so a `manage` lever fences every canonical
96
+ * CRUD verb on its resourceType while a concrete-verb lever fences only that
97
+ * verb. This is what makes the billing / owner-management fences effective for
98
+ * the real CRUD requests that reach the evaluator.
99
+ */
100
+ export function isOwnerOnlyLever(request) {
101
+ return (request.classification === "owner_only" ||
102
+ OWNER_ONLY_LEVERS.some((lever) => lever.resourceType === request.resourceType &&
103
+ actionMatches(lever.action, request.action)));
104
+ }
105
+ function entryMatches(entry, request) {
106
+ // resourceType: exact match or wildcard resourceType.
107
+ if (entry.resourceType !== WILDCARD_ACTION &&
108
+ entry.resourceType !== request.resourceType) {
109
+ return false;
110
+ }
111
+ // action: after manage/wildcard expansion.
112
+ if (!actionMatches(entry.action, request.action))
113
+ return false;
114
+ // object: an instance-level (resource) entry only matches its own object.
115
+ // A scope/type-level entry matches any instance of the type.
116
+ if (entry.objectType === "resource") {
117
+ return entry.objectId !== undefined && entry.objectId === request.objectId;
118
+ }
119
+ return true;
120
+ }
121
+ export function hasExplicitDeny(entries, request) {
122
+ return entries.some((entry) => entry.effect === "deny" && entryMatches(entry, request));
123
+ }
124
+ /**
125
+ * Resolve a single access request to allow/deny per §0.4:
126
+ *
127
+ * 1. Owner (`immutable`) → ALLOW before any entry scan.
128
+ * 2. Gather matching entries (resourceType + action + object).
129
+ * 3. Explicit deny wins → DENY. (Instance-allow never beats type-deny: a
130
+ * type-level deny is in the matched set and short-circuits here.)
131
+ * 4. Admin (`default`) and request is NOT an Owner-only lever → ALLOW
132
+ * (after the deny check, so an explicit narrowing deny still wins).
133
+ * 5. Any matching allow that is NOT an Owner-only lever → ALLOW (role +
134
+ * direct grants union on allow). Owner-only levers are conferrable only by
135
+ * the immutable Owner at step 1.
136
+ * 6. Else implicit DENY.
137
+ *
138
+ * `entries` must already be filtered to the principal, scope, and to
139
+ * non-expired / non-revoked rows. Scope/rule denylists are fed in as `deny`
140
+ * entries so they short-circuit at step 3 (intersection guardrail).
141
+ */
142
+ export function evaluateAccess(args) {
143
+ const { wildcard, entries, request } = args;
144
+ // 1. Owner short-circuit.
145
+ if (wildcard === "immutable")
146
+ return "allow";
147
+ // 2. Gather matching entries.
148
+ const matching = entries.filter((entry) => entryMatches(entry, request));
149
+ // 3. Explicit deny wins.
150
+ if (matching.some((entry) => entry.effect === "deny"))
151
+ return "deny";
152
+ // 4. Admin wildcard default (fenced from Owner-only levers).
153
+ if (wildcard === "default") {
154
+ if (!isOwnerOnlyLever(request))
155
+ return "allow";
156
+ }
157
+ // 5. Explicit allow. Owner-only levers are conferrable ONLY by the immutable
158
+ // Owner (step 1) — never by an explicit allow grant, mirroring the Admin
159
+ // wildcard fence in step 4. This keeps the invariant even if such a permission
160
+ // is somehow created and granted.
161
+ if (!isOwnerOnlyLever(request) &&
162
+ matching.some((entry) => entry.effect === "allow")) {
163
+ return "allow";
164
+ }
165
+ // 6. Implicit deny.
166
+ return "deny";
167
+ }
168
+ //# sourceMappingURL=authz.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authz.js","sourceRoot":"","sources":["../../src/component/authz.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,0EAA0E;AAC1E,mEAAmE;AACnE,+EAA+E;AAC/E,4EAA4E;AAC5E,qBAAqB;AACrB,EAAE;AACF,2EAA2E;AAC3E,qEAAqE;AACrE,sEAAsE;AACtE,yEAAyE;AACzE,yEAAyE;AACzE,qEAAqE;AACrE,0EAA0E;AAC1E,SAAS;AACT,EAAE;AACF,8EAA8E;AAC9E,mDAAmD;AAEnD,8EAA8E;AAC9E,iCAAiC;AACjC,8EAA8E;AAE9E,iFAAiF;AACjF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,MAAM;CACE,CAAC;AAGX,kFAAkF;AAClF,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC;AAEtC,kEAAkE;AAClE,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC;AAEnC,8EAA8E;AAC9E,MAAM,CAAC,MAAM,+BAA+B,GAAwB,IAAI,GAAG,CAAC;IAC1E,gBAAgB;IAChB,eAAe;CAChB,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,MAAc;IACzC,OAAO,MAAM,KAAK,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,C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QAC3B,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;YAAE,OAAO,OAAO,CAAC;IACjD,CAAC;IAED,6EAA6E;IAC7E,yEAAyE;IACzE,+EAA+E;IAC/E,kCAAkC;IAClC,IACE,CAAC,gBAAgB,CAAC,OAAO,CAAC;QAC1B,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,OAAO,CAAC,EAClD,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,oBAAoB;IACpB,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,86 @@
1
+ import { type DataModelFromSchemaDefinition, type GenericQueryCtx } from "convex/server";
2
+ import { type AuthorizationAncestor } from "./effective";
3
+ import schema from "./schema";
4
+ type DataModel = DataModelFromSchemaDefinition<typeof schema>;
5
+ export declare const authorize: import("convex/server").RegisteredQuery<"public", {
6
+ resourceType?: string | undefined;
7
+ resourceId?: string | undefined;
8
+ permission?: string | undefined;
9
+ tokenIdentifier?: string | undefined;
10
+ scopeId?: string | undefined;
11
+ ancestors?: {
12
+ resourceType: string;
13
+ resourceId: string;
14
+ }[] | undefined;
15
+ }, Promise<{
16
+ allowed: false;
17
+ reasonCode: string;
18
+ explicitDeny: boolean;
19
+ sourceVersion: number | undefined;
20
+ principalId: string | undefined;
21
+ effectiveRoleIds: string[];
22
+ } | {
23
+ allowed: true;
24
+ reasonCode: string;
25
+ explicitDeny: boolean;
26
+ sourceVersion: number;
27
+ principalId: string | undefined;
28
+ effectiveRoleIds: string[];
29
+ }>>;
30
+ export declare const authorizeMany: import("convex/server").RegisteredQuery<"public", {
31
+ tokenIdentifier?: string | undefined;
32
+ checks: {
33
+ resourceType?: string | undefined;
34
+ resourceId?: string | undefined;
35
+ scopeId?: string | undefined;
36
+ ancestors?: {
37
+ resourceType: string;
38
+ resourceId: string;
39
+ }[] | undefined;
40
+ permission: string;
41
+ }[];
42
+ }, Promise<({
43
+ allowed: false;
44
+ reasonCode: string;
45
+ explicitDeny: boolean;
46
+ sourceVersion: number | undefined;
47
+ principalId: string | undefined;
48
+ effectiveRoleIds: string[];
49
+ } | {
50
+ allowed: true;
51
+ reasonCode: string;
52
+ explicitDeny: boolean;
53
+ sourceVersion: number;
54
+ principalId: string | undefined;
55
+ effectiveRoleIds: string[];
56
+ })[]>>;
57
+ /**
58
+ * Resolve a single permission request to an allow/deny decision. This is the
59
+ * canonical permission gate, shared by the `authorize` query (the hot can()
60
+ * path) and the scope-admin list queries, so both apply identical wildcard,
61
+ * deny-override, and owner-only-lever semantics. Reads only the local mirror.
62
+ */
63
+ export declare function evaluatePermissionDecision(ctx: GenericQueryCtx<DataModel>, args: {
64
+ tokenIdentifier?: string;
65
+ scopeId?: string;
66
+ permission: string;
67
+ resourceType?: string;
68
+ resourceId?: string;
69
+ ancestors?: AuthorizationAncestor[];
70
+ }): Promise<{
71
+ allowed: false;
72
+ reasonCode: string;
73
+ explicitDeny: boolean;
74
+ sourceVersion: number | undefined;
75
+ principalId: string | undefined;
76
+ effectiveRoleIds: string[];
77
+ } | {
78
+ allowed: true;
79
+ reasonCode: string;
80
+ explicitDeny: boolean;
81
+ sourceVersion: number;
82
+ principalId: string | undefined;
83
+ effectiveRoleIds: string[];
84
+ }>;
85
+ export {};
86
+ //# sourceMappingURL=checks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../../src/component/checks.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,6BAA6B,EAClC,KAAK,eAAe,EAErB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAIL,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAC;AAErB,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,KAAK,SAAS,GAAG,6BAA6B,CAAC,OAAO,MAAM,CAAC,CAAC;AAwB9D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;GA8CpB,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;MAmBxB,CAAC;AAEH;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAC9C,GAAG,EAAE,eAAe,CAAC,SAAS,CAAC,EAC/B,IAAI,EAAE;IACJ,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACrC;;;;;;;;;;;;;;GA+FF"}
@@ -0,0 +1,184 @@
1
+ import { queryGeneric, } from "convex/server";
2
+ import { v } from "convex/values";
3
+ import { evaluateAccess, hasExplicitDeny } from "./authz";
4
+ import { evaluateEffectiveAccess, isSupersetAction, normalizeAuthorizationAncestors, } from "./effective";
5
+ import { parseTokenIdentifier } from "../shared/token";
6
+ import schema from "./schema";
7
+ // Public WITHIN the component boundary: a component's functions are never
8
+ // client-callable; only public functions are exported to the parent app, and
9
+ // these checks are exactly the parent-facing API (internal builders are NOT
10
+ // exported, so the SDK's runQuery would fail with "does not export").
11
+ const query = queryGeneric;
12
+ // Mirrors client/index.ts PERMISSION_RESOURCE_TYPE_SENTINEL: the SDK's
13
+ // scopeFromResource extractor cannot know the canonical catalog resource type
14
+ // of the checked permission, so it sends this sentinel and the gate below
15
+ // substitutes the resolved permission's resourceType.
16
+ const PERMISSION_RESOURCE_TYPE_SENTINEL = "__hercules_permission_resource_type__";
17
+ const authorizationAncestorValidator = v.object({
18
+ resourceType: v.string(),
19
+ resourceId: v.string(),
20
+ });
21
+ const authorizationCheckValidator = v.object({
22
+ scopeId: v.optional(v.string()),
23
+ permission: v.string(),
24
+ resourceType: v.optional(v.string()),
25
+ resourceId: v.optional(v.string()),
26
+ ancestors: v.optional(v.array(authorizationAncestorValidator)),
27
+ });
28
+ export const authorize = query({
29
+ args: {
30
+ tokenIdentifier: v.optional(v.string()),
31
+ scopeId: v.optional(v.string()),
32
+ permission: v.optional(v.string()),
33
+ // DL16 resource grant support. When provided, authorize also walks
34
+ // resource-object grants targeting this resource. App code passes these
35
+ // via a scope extractor when the permission applies to a specific row.
36
+ resourceType: v.optional(v.string()),
37
+ resourceId: v.optional(v.string()),
38
+ ancestors: v.optional(v.array(authorizationAncestorValidator)),
39
+ },
40
+ handler: async (ctx, args) => {
41
+ if (!args.tokenIdentifier) {
42
+ return deny("missing_identity");
43
+ }
44
+ const token = parseTokenIdentifier(args.tokenIdentifier);
45
+ if (!token) {
46
+ return deny("invalid_identity");
47
+ }
48
+ const state = await ctx.db.query("sync_state").unique();
49
+ // Authenticated mode (no permission requested): the SDK already
50
+ // verified the JWT via Convex's auth provider before reaching us. If
51
+ // the mirror has not bootstrapped yet (no projection sync delivered),
52
+ // accept on token presence so cold-start flows like updateCurrentUser
53
+ // work. The issuer-match sanity check kicks in as soon as the first
54
+ // projection populates sync_state.
55
+ if (!args.permission) {
56
+ if (state && token.issuer !== state.expectedIssuer) {
57
+ return deny("unexpected_issuer");
58
+ }
59
+ return allow(state?.sourceVersion ?? 0, undefined, []);
60
+ }
61
+ return evaluatePermissionDecision(ctx, {
62
+ tokenIdentifier: args.tokenIdentifier,
63
+ scopeId: args.scopeId,
64
+ permission: args.permission,
65
+ resourceType: args.resourceType,
66
+ resourceId: args.resourceId,
67
+ ancestors: args.ancestors,
68
+ });
69
+ },
70
+ });
71
+ export const authorizeMany = query({
72
+ args: {
73
+ tokenIdentifier: v.optional(v.string()),
74
+ checks: v.array(authorizationCheckValidator),
75
+ },
76
+ handler: async (ctx, args) => {
77
+ if (args.checks.length > 50) {
78
+ throw new Error("authorizeMany accepts at most 50 checks");
79
+ }
80
+ return await Promise.all(args.checks.map((check) => evaluatePermissionDecision(ctx, {
81
+ tokenIdentifier: args.tokenIdentifier,
82
+ ...check,
83
+ })));
84
+ },
85
+ });
86
+ /**
87
+ * Resolve a single permission request to an allow/deny decision. This is the
88
+ * canonical permission gate, shared by the `authorize` query (the hot can()
89
+ * path) and the scope-admin list queries, so both apply identical wildcard,
90
+ * deny-override, and owner-only-lever semantics. Reads only the local mirror.
91
+ */
92
+ export async function evaluatePermissionDecision(ctx, args) {
93
+ // Resolve the requested permission's canonical (resourceType, action) by
94
+ // catalog lookup rather than parsing the key string. The producer ships
95
+ // the structured columns verbatim, so this works for canonical
96
+ // (app.appointments:create), dot-action (reports.export), and namespaced
97
+ // keys alike without the runtime having to agree on slug grammar.
98
+ // Catalog permissions always live in the default scope (DL15). Resolved
99
+ // BEFORE the effective-access evaluation so the sentinel substitution below
100
+ // feeds the canonical type into the resource-grant walk.
101
+ const resolvedPermission = await findCatalogPermissionByKey(ctx, args.permission);
102
+ // scopeFromResource defers its resource type to the checked permission (it
103
+ // only sees the table row, not the catalog), so substitute the canonical
104
+ // catalog resourceType for the sentinel. Explicit resource refs keep their
105
+ // caller-provided type and the mismatch fence below.
106
+ const resourceType = args.resourceType === PERMISSION_RESOURCE_TYPE_SENTINEL
107
+ ? resolvedPermission?.resourceType
108
+ : args.resourceType;
109
+ const ancestors = normalizeAuthorizationAncestors(args.ancestors);
110
+ if (ancestors === null) {
111
+ return deny("invalid_request");
112
+ }
113
+ const evaluation = await evaluateEffectiveAccess(ctx, {
114
+ tokenIdentifier: args.tokenIdentifier,
115
+ scopeId: args.scopeId,
116
+ resourceType,
117
+ resourceId: args.resourceId,
118
+ ancestors,
119
+ });
120
+ if (!evaluation.allowed) {
121
+ return deny(evaluation.reasonCode, evaluation.sourceVersion, evaluation.principalId, evaluation.effectiveRoleIds);
122
+ }
123
+ if (!resolvedPermission) {
124
+ return deny("permission_missing", evaluation.sourceVersion, evaluation.principalId, evaluation.effectiveRoleIds);
125
+ }
126
+ // Requests carry concrete verbs only. A catalog permission whose action is
127
+ // manage/* would map a request onto a superset token, which the algebra
128
+ // does not special-case on the request side. Reject rather than evaluate.
129
+ // enumeratePermissions filters the same keys out of getEffectivePermissions
130
+ // (shared isSupersetAction), so the runtime never advertises a key this
131
+ // gate would then deny.
132
+ if (isSupersetAction(resolvedPermission.action) ||
133
+ (resourceType !== undefined && resourceType !== resolvedPermission.resourceType)) {
134
+ return deny("invalid_request", evaluation.sourceVersion, evaluation.principalId, evaluation.effectiveRoleIds);
135
+ }
136
+ const request = {
137
+ resourceType: resolvedPermission.resourceType,
138
+ action: resolvedPermission.action,
139
+ classification: resolvedPermission.classification,
140
+ objectId: args.resourceId,
141
+ };
142
+ const decision = evaluateAccess({
143
+ wildcard: evaluation.wildcard,
144
+ entries: evaluation.entries,
145
+ request,
146
+ });
147
+ if (decision === "allow") {
148
+ return allow(evaluation.sourceVersion ?? 0, evaluation.principalId, evaluation.effectiveRoleIds);
149
+ }
150
+ return deny("permission_denied", evaluation.sourceVersion, evaluation.principalId, evaluation.effectiveRoleIds, hasExplicitDeny(evaluation.entries, request));
151
+ }
152
+ async function findCatalogPermissionByKey(ctx, key) {
153
+ const defaultScope = await ctx.db
154
+ .query("scopes")
155
+ .withIndex("by_kind", (q) => q.eq("kind", "default"))
156
+ .unique();
157
+ if (!defaultScope)
158
+ return null;
159
+ return await ctx.db
160
+ .query("permissions")
161
+ .withIndex("by_scope_key", (q) => q.eq("accessScopeId", defaultScope.accessScopeId).eq("key", key))
162
+ .unique();
163
+ }
164
+ function allow(sourceVersion, principalId, effectiveRoleIds) {
165
+ return {
166
+ allowed: true,
167
+ reasonCode: "allowed",
168
+ explicitDeny: false,
169
+ sourceVersion,
170
+ principalId,
171
+ effectiveRoleIds,
172
+ };
173
+ }
174
+ function deny(reasonCode, sourceVersion, principalId, effectiveRoleIds, explicitDeny = false) {
175
+ return {
176
+ allowed: false,
177
+ reasonCode,
178
+ explicitDeny,
179
+ sourceVersion,
180
+ principalId,
181
+ effectiveRoleIds: effectiveRoleIds ?? [],
182
+ };
183
+ }
184
+ //# sourceMappingURL=checks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checks.js","source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AC/B,CAAC,CAAC,EAAE,CAAC,eAAe,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,CACjE;SACA,MAAM,EAAE,CAAC;AACd,CAAC;AAED,SAAS,KAAK,CAAC,aAAqB,EAAE,WAA+B,EAAE,gBAA0B;IAC/F,OAAO;QACL,OAAO,EAAE,IAAa;QACtB,UAAU,EAAE,SAAS;QACrB,YAAY,EAAE,KAAK;QACnB,aAAa;QACb,WAAW;QACX,gBAAgB;KACjB,CAAC;AACJ,CAAC;AAED,SAAS,IAAI,CACX,UAAkB,EAClB,aAAsB,EACtB,WAAoB,EACpB,gBAA2B,EAC3B,YAAY,GAAG,KAAK;IAEpB,OAAO;QACL,OAAO,EAAE,KAAc;QACvB,UAAU;QACV,YAAY;QACZ,aAAa;QACb,WAAW;QACX,gBAAgB,EAAE,gBAAgB,IAAI,EAAE;KACzC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("convex/server").ComponentDefinition<any>;
2
+ export default _default;
3
+ //# sourceMappingURL=convex.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convex.config.d.ts","sourceRoot":"","sources":["../../src/component/convex.config.ts"],"names":[],"mappings":";AAEA,wBAA2C"}
@@ -0,0 +1,3 @@
1
+ import { defineComponent } from "convex/server";
2
+ export default defineComponent("hercules");
3
+ //# sourceMappingURL=convex.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convex.config.js","sourceRoot":"","sources":["../../src/component/convex.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,eAAe,eAAe,CAAC,UAAU,CAAC,CAAC"}