@vllnt/convex-analytics 0.2.0-canary.d5fa959 → 0.2.0-canary.dee16f7

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 (58) hide show
  1. package/CHANGELOG.md +113 -49
  2. package/README.md +461 -157
  3. package/dist/client/index.d.ts +34 -12
  4. package/dist/client/index.d.ts.map +1 -1
  5. package/dist/client/index.js +34 -12
  6. package/dist/client/index.js.map +1 -1
  7. package/dist/client/types.d.ts +9 -5
  8. package/dist/client/types.d.ts.map +1 -1
  9. package/dist/component/convex.config.d.ts +1 -0
  10. package/dist/component/convex.config.d.ts.map +1 -1
  11. package/dist/component/convex.config.js +1 -0
  12. package/dist/component/convex.config.js.map +1 -1
  13. package/dist/component/internal_mutations.d.ts +1 -1
  14. package/dist/component/internal_mutations.d.ts.map +1 -1
  15. package/dist/component/internal_mutations.js +16 -6
  16. package/dist/component/internal_mutations.js.map +1 -1
  17. package/dist/component/mutations.d.ts.map +1 -1
  18. package/dist/component/mutations.js +22 -20
  19. package/dist/component/mutations.js.map +1 -1
  20. package/dist/component/queries.d.ts.map +1 -1
  21. package/dist/component/queries.js +67 -17
  22. package/dist/component/queries.js.map +1 -1
  23. package/dist/component/validators.d.ts +15 -1
  24. package/dist/component/validators.d.ts.map +1 -1
  25. package/dist/component/validators.js +32 -0
  26. package/dist/component/validators.js.map +1 -1
  27. package/dist/react/index.d.ts +2 -3
  28. package/dist/react/index.d.ts.map +1 -1
  29. package/dist/react/index.js +2 -3
  30. package/dist/react/index.js.map +1 -1
  31. package/dist/test.d.ts +3 -1
  32. package/dist/test.d.ts.map +1 -1
  33. package/dist/test.js +3 -1
  34. package/dist/test.js.map +1 -1
  35. package/dist/web/index.d.ts +3 -2
  36. package/dist/web/index.d.ts.map +1 -1
  37. package/dist/web/index.js +2 -1
  38. package/dist/web/index.js.map +1 -1
  39. package/docs/api-reference.md +29 -10
  40. package/docs/architecture.md +33 -20
  41. package/docs/client-sdk.md +358 -140
  42. package/docs/multi-product.md +51 -40
  43. package/docs/quick-start.md +67 -70
  44. package/docs/react.md +146 -0
  45. package/docs/schema.md +13 -9
  46. package/docs/web-preset.md +96 -61
  47. package/llms.txt +43 -25
  48. package/package.json +14 -10
  49. package/src/client/index.ts +34 -12
  50. package/src/client/types.ts +9 -5
  51. package/src/component/convex.config.ts +1 -0
  52. package/src/component/internal_mutations.ts +16 -6
  53. package/src/component/mutations.ts +26 -20
  54. package/src/component/queries.ts +68 -16
  55. package/src/component/validators.ts +39 -0
  56. package/src/react/index.tsx +2 -3
  57. package/src/test.ts +3 -1
  58. package/src/web/index.ts +3 -2
@@ -1,69 +1,80 @@
1
- # Multi-Product Scoping
1
+ # Multi-product scoping
2
2
 
3
- Every table, mutation, and query is partitioned by a single opaque `scope` string. Use it to
4
- isolate products, environments, tenants, or platforms — whatever partition your host needs.
3
+ Every table, mutation and query is partitioned by one opaque `scope` string. Use it to keep
4
+ products, environments or tenants apart.
5
5
 
6
6
  | Concept | Field | Default |
7
7
  | --------- | ------- | ----------- |
8
8
  | Partition | `scope` | `"default"` |
9
9
 
10
- ## How scoping works
10
+ ## Default scope and per-call override
11
11
 
12
- ### Set a default scope on the client
12
+ Set a default on the client; every method also takes `scope` in its options.
13
13
 
14
14
  ```ts
15
+ // convex/tenants.ts
16
+ import { AnalyticsClient } from "@vllnt/convex-analytics";
17
+ import { v } from "convex/values";
18
+
19
+ import { components } from "./_generated/api";
20
+ import { mutation, query } from "./_generated/server";
21
+
15
22
  const analytics = new AnalyticsClient(components.analytics, {
16
23
  scope: "my-saas",
17
24
  dimensions: ["plan"],
18
25
  });
19
- ```
20
26
 
21
- ### Override per call
27
+ export const featureUsed = mutation({
28
+ args: { tenantId: v.string(), userId: v.string() },
29
+ returns: v.null(),
30
+ handler: async (ctx, { tenantId, userId }) => {
31
+ await analytics.track(ctx, "feature_used", { subjectRef: userId, scope: tenantId });
32
+ return null;
33
+ },
34
+ });
22
35
 
23
- ```ts
24
- await analytics.track(ctx, "signup", {
25
- subjectRef: userId,
26
- scope: "customer-a",
36
+ export const featureUses = query({
37
+ args: { tenantId: v.string() },
38
+ returns: v.number(),
39
+ handler: async (ctx, { tenantId }) =>
40
+ await analytics.metric(ctx, "feature_used", { scope: tenantId }),
27
41
  });
28
- const total = await analytics.metric(ctx, "signup", { scope: "customer-a" });
29
42
  ```
30
43
 
31
- Every read takes the same `scope` option; omit it to fall back to the client's default.
32
-
33
44
  ## What scope isolates
34
45
 
35
- - `events`, `rollups`, `subjects`, `sessions`, `scopes`, and `config` rows are keyed by `scope`.
36
- - All indexes lead with `scope`, so reads never span partitions.
37
- - The sharded counter is keyed by `(scope, name)`, so totals are per-scope.
38
- - `configure` persists retention/sampling/idle per scope.
46
+ - `events`, `rollups`, `subjects`, `sessions`, `scopes` and `config` rows carry `scope`, and
47
+ every index starts with it, so a read for one scope never returns another scope's rows.
48
+ - The lifetime counter is keyed by `(scope, name)`.
49
+ - `configure` stores `retentionDays` and `sessionIdleMs` per scope, and REST `apiKeys` are
50
+ stored per scope.
51
+ - The crons visit every scope that has tracked an event or has config (the `scopes` table).
39
52
 
40
- ## Patterns
53
+ The component does not check who may read a scope: your functions decide which `scope` a
54
+ caller may pass.
41
55
 
42
- **Per-tenant SaaS** — one `scope` per customer:
56
+ ## Mounting twice instead of scoping
43
57
 
44
- ```ts
45
- await analytics.track(ctx, "feature_used", {
46
- subjectRef: userId,
47
- scope: "customer-a",
48
- });
49
- const used = await analytics.metric(ctx, "feature_used", {
50
- scope: "customer-a",
51
- });
52
- ```
53
-
54
- **Environment split** — separate staging from production:
58
+ For a fixed set of partitions known at deploy time, you can mount the component more than once.
59
+ Each mount has its own tables and crons. Use `scope` when partitions are created at runtime
60
+ (a new tenant).
55
61
 
56
62
  ```ts
57
- const scope = process.env.CONVEX_ENV === "production" ? "prod" : "staging";
58
- await analytics.track(ctx, "signup", { scope });
63
+ // convex/convex.config.ts
64
+ import analytics from "@vllnt/convex-analytics/convex.config";
65
+ import { defineApp } from "convex/server";
66
+
67
+ const app = defineApp();
68
+ app.use(analytics);
69
+ app.use(analytics, { name: "mobileAnalytics" });
70
+ export default app;
59
71
  ```
60
72
 
61
- **Platform split** — compare web vs mobile by scope, or keep one scope and break down on a
62
- `platform` prop dimension instead.
73
+ ```ts
74
+ // convex/mobile.ts
75
+ import { AnalyticsClient } from "@vllnt/convex-analytics";
63
76
 
64
- ## Mounting vs scope
77
+ import { components } from "./_generated/api";
65
78
 
66
- For a **static** set of partitions (web + mobile + file analytics), you can also mount the
67
- component multiple times (`app.use(analytics, { name })`) — each mount is fully sandboxed.
68
- Reach for `scope` when partitions are **runtime-created** (a new tenant you can't declare at
69
- deploy time).
79
+ export const mobileAnalytics = new AnalyticsClient(components.mobileAnalytics);
80
+ ```
@@ -1,6 +1,6 @@
1
- # Quick Start
1
+ # Quick start
2
2
 
3
- Get generic analytics running in your Convex app in a few minutes.
3
+ Install, mount, track and read events in a Convex app.
4
4
 
5
5
  ## 1. Install
6
6
 
@@ -9,107 +9,104 @@ npm install @vllnt/convex-analytics
9
9
  # or: pnpm add @vllnt/convex-analytics
10
10
  ```
11
11
 
12
- ## 2. Mount the component
12
+ `convex` (`^1.45.0`) is a required peer dependency.
13
13
 
14
- In your `convex/convex.config.ts`:
14
+ ## 2. Mount the component
15
15
 
16
16
  ```ts
17
- import { defineApp } from "convex/server";
17
+ // convex/convex.config.ts
18
18
  import analytics from "@vllnt/convex-analytics/convex.config";
19
+ import { defineApp } from "convex/server";
19
20
 
20
21
  const app = defineApp();
21
22
  app.use(analytics);
22
23
  export default app;
23
24
  ```
24
25
 
25
- ## 3. Create a client
26
+ Run `npx convex dev` to generate `components.analytics`.
27
+
28
+ ## 3. Track and read
26
29
 
27
30
  ```ts
31
+ // convex/signups.ts
28
32
  import { AnalyticsClient } from "@vllnt/convex-analytics";
33
+ import { v } from "convex/values";
34
+
29
35
  import { components } from "./_generated/api";
36
+ import { mutation, query } from "./_generated/server";
30
37
 
31
- type MyProps = { plan?: string; country?: string };
38
+ type SignupProps = { plan?: string; country?: string };
32
39
 
33
- const analytics = new AnalyticsClient<MyProps>(components.analytics, {
34
- dimensions: ["plan", "country"], // host-declared rollup keys
35
- granularities: ["day"],
40
+ const analytics = new AnalyticsClient<SignupProps>(components.analytics, {
41
+ dimensions: ["plan", "country"], // props keys to roll up on
36
42
  });
37
- ```
38
-
39
- `TProps` types the `props` you pass to `track`. See [Client SDK](./client-sdk.md) for the
40
- full config and verb reference.
41
43
 
42
- ## 4. Track your first event
43
-
44
- Inside a Convex mutation:
45
-
46
- ```ts
47
- await analytics.track(ctx, "signup", {
48
- subjectRef: userId,
49
- props: { plan: "pro", country: "FR" },
44
+ export const signup = mutation({
45
+ args: { userId: v.string(), plan: v.string(), country: v.string() },
46
+ returns: v.null(),
47
+ handler: async (ctx, { userId, plan, country }) => {
48
+ await analytics.track(ctx, "signup", { subjectRef: userId, props: { plan, country } });
49
+ return null;
50
+ },
50
51
  });
51
- ```
52
52
 
53
- Event names are free strings; `subjectRef` / `sessionRef` are opaque to the component.
54
-
55
- ## 5. Read
56
-
57
- ```ts
58
- const total = await analytics.metric(ctx, "signup");
59
- const byPlan = await analytics.top(ctx, "signup", "plan");
60
- const trend = await analytics.timeseries(ctx, "signup", {
61
- granularity: "day",
62
- range: { from: Date.now() - 30 * 86_400_000, to: Date.now() },
53
+ export const summary = query({
54
+ args: { from: v.number(), to: v.number() },
55
+ returns: v.object({
56
+ total: v.number(),
57
+ byPlan: v.array(v.object({ value: v.string(), count: v.number() })),
58
+ daily: v.array(v.object({ bucket: v.number(), count: v.number() })),
59
+ }),
60
+ handler: async (ctx, { from, to }) => ({
61
+ total: await analytics.metric(ctx, "signup"),
62
+ byPlan: await analytics.top(ctx, "signup", "plan"),
63
+ daily: await analytics.timeseries(ctx, "signup", { granularity: "day", range: { from, to } }),
64
+ }),
63
65
  });
64
66
  ```
65
67
 
66
- ## 6. (Optional) REST access
68
+ Event names are free strings; `subjectRef` and `sessionRef` are opaque to the component. See
69
+ [Client SDK](./client-sdk.md) for every option and method.
67
70
 
68
- First change the mount to `app.use(analytics, { httpPrefix: "/analytics" })` and deploy.
69
- Without `httpPrefix`, the component's HTTP routes are not exposed.
70
- Configure API keys from a trusted internal/admin-only mutation, then call the REST surface:
71
+ ## 4. (Optional) REST access
72
+
73
+ Mount with `app.use(analytics, { httpPrefix: "/analytics" })` and deploy; without
74
+ `httpPrefix` the component's HTTP routes are not exposed. Store API keys from an internal
75
+ mutation (the client has no `configSet` method, so call the component mutation):
71
76
 
72
77
  ```ts
73
- // The client has no configSet method: use the component mutation.
74
- await ctx.runMutation(components.analytics.mutations.configSet, {
75
- scope: "default",
76
- key: "apiKeys",
77
- value: JSON.stringify(["your-key"]),
78
+ // convex/admin.ts
79
+ import { v } from "convex/values";
80
+
81
+ import { components } from "./_generated/api";
82
+ import { internalMutation } from "./_generated/server";
83
+
84
+ export const setApiKey = internalMutation({
85
+ args: { key: v.string() },
86
+ returns: v.null(),
87
+ handler: async (ctx, { key }) => {
88
+ await ctx.runMutation(components.analytics.mutations.configSet, {
89
+ scope: "default",
90
+ key: "apiKeys",
91
+ value: JSON.stringify([key]),
92
+ });
93
+ return null;
94
+ },
78
95
  });
79
96
  ```
80
97
 
81
98
  ```bash
99
+ npx convex run admin:setApiKey '{"key":"your-key"}'
82
100
  curl -H "x-api-key: your-key" \
83
- "https://your-deployment.convex.site/analytics/metric?name=signup"
101
+ "https://<deployment>.convex.site/analytics/metric?name=signup"
84
102
  ```
85
103
 
86
104
  See the [REST API](./api-reference.md) for all five routes.
87
105
 
88
- ## 7. (Optional) Web preset
89
-
90
- ```ts
91
- import { webDimensions, trackPageview } from "@vllnt/convex-analytics/web";
92
-
93
- const web = new AnalyticsClient(components.analytics, {
94
- dimensions: [...webDimensions],
95
- });
96
- await trackPageview(web, ctx, { path: "/pricing", headers: request.headers });
97
- ```
98
-
99
- See [Web Preset](./web-preset.md).
100
-
101
- ## 8. Testing
102
-
103
- ```ts
104
- import analyticsTest from "@vllnt/convex-analytics/test";
105
- import { convexTest } from "convex-test";
106
-
107
- const t = convexTest(hostSchema, hostModules);
108
- analyticsTest.register(t);
109
- ```
110
-
111
- ## Next steps
106
+ ## 5. Next steps
112
107
 
113
- - [Client SDK](./client-sdk.md) — full config + verb reference
114
- - [Schema](./schema.md) — the six sandboxed tables
115
- - [Web Preset](./web-preset.md) — opt-in web dimensions + helpers
108
+ - [Client SDK](./client-sdk.md): config, methods, types, test helper
109
+ - [Web preset](./web-preset.md): web dimensions, user-agent and geo helpers
110
+ - [React hooks](./react.md): reactive aggregate reads
111
+ - [Schema](./schema.md): the six component tables
112
+ - [Errors and fixes](../README.md#errors-and-fixes)
package/docs/react.md ADDED
@@ -0,0 +1,146 @@
1
+ # React hooks reference
2
+
3
+ `@vllnt/convex-analytics/react` has four hooks that wrap `useQuery` from `convex/react` for the
4
+ aggregate reads. `react` is an optional peer dependency; backend-only code never imports this
5
+ entry. The hooks need a `ConvexProvider` above them.
6
+
7
+ The component never owns your `api`. Write a public query in your Convex functions that calls
8
+ the matching `AnalyticsClient` method, then pass that query's reference to the hook. The hook
9
+ forwards your args (or `"skip"`) and returns `undefined` while loading. The hooks only fix the
10
+ return type; your query decides who may read and which `scope` it reads.
11
+
12
+ Source: `src/react/index.tsx` in the package (`packages/convex-analytics/src/react/index.tsx` in
13
+ the repository).
14
+
15
+ ```ts
16
+ // convex/stats.ts
17
+ import { AnalyticsClient } from "@vllnt/convex-analytics";
18
+ import { v } from "convex/values";
19
+
20
+ import { components } from "./_generated/api";
21
+ import { query } from "./_generated/server";
22
+
23
+ const analytics = new AnalyticsClient(components.analytics, { dimensions: ["plan"] });
24
+ const range = v.object({ from: v.optional(v.number()), to: v.optional(v.number()) });
25
+ const granularity = v.union(v.literal("minute"), v.literal("hour"), v.literal("day"));
26
+
27
+ export const metric = query({
28
+ args: { name: v.string(), range: v.optional(range) },
29
+ returns: v.number(),
30
+ handler: async (ctx, args) => await analytics.metric(ctx, args.name, { range: args.range }),
31
+ });
32
+
33
+ export const top = query({
34
+ args: { name: v.string(), dimension: v.string(), limit: v.optional(v.number()) },
35
+ returns: v.array(v.object({ value: v.string(), count: v.number() })),
36
+ handler: async (ctx, args) =>
37
+ await analytics.top(ctx, args.name, args.dimension, { limit: args.limit }),
38
+ });
39
+
40
+ export const timeseries = query({
41
+ args: { name: v.string(), granularity, range },
42
+ returns: v.array(v.object({ bucket: v.number(), count: v.number() })),
43
+ handler: async (ctx, args) =>
44
+ await analytics.timeseries(ctx, args.name, { granularity: args.granularity, range: args.range }),
45
+ });
46
+
47
+ export const uniques = query({
48
+ args: { granularity, range },
49
+ returns: v.object({
50
+ dau: v.number(),
51
+ wau: v.number(),
52
+ mau: v.number(),
53
+ trend: v.array(v.object({ bucket: v.number(), uniques: v.number() })),
54
+ }),
55
+ handler: async (ctx, args) => await analytics.uniques(ctx, args),
56
+ });
57
+ ```
58
+
59
+ ```tsx
60
+ // src/Stats.tsx
61
+ import { useMetric, useTimeseries, useTop, useUniques } from "@vllnt/convex-analytics/react";
62
+
63
+ import { api } from "../convex/_generated/api";
64
+
65
+ export function Stats({ from, to }: { from: number; to: number }) {
66
+ const signups = useMetric(api.stats.metric, { name: "signup" });
67
+ const plans = useTop(api.stats.top, { name: "signup", dimension: "plan" });
68
+ const daily = useTimeseries(api.stats.timeseries, {
69
+ name: "signup",
70
+ granularity: "day",
71
+ range: { from, to },
72
+ });
73
+ const active = useUniques(api.stats.uniques, { granularity: "day", range: { from, to } });
74
+ if (signups === undefined || plans === undefined || daily === undefined || active === undefined) {
75
+ return <p>Loading</p>;
76
+ }
77
+ return (
78
+ <p>
79
+ {signups} signups, top plan {plans[0]?.value ?? "none"}, {daily.length} active days,{" "}
80
+ {active.mau} monthly users
81
+ </p>
82
+ );
83
+ }
84
+ ```
85
+
86
+ ## useMetric
87
+
88
+ ```ts
89
+ // signature
90
+ useMetric(ref: FunctionReference<"query", "public", any, number>, args | "skip"): number | undefined
91
+ ```
92
+
93
+ ## useTop
94
+
95
+ ```ts
96
+ // signature
97
+ useTop(ref: FunctionReference<"query", "public", any, TopRow[]>, args | "skip"): TopRow[] | undefined
98
+ ```
99
+
100
+ ## useTimeseries
101
+
102
+ ```ts
103
+ // signature
104
+ useTimeseries(ref: FunctionReference<"query", "public", any, TimeseriesPoint[]>, args | "skip"): TimeseriesPoint[] | undefined
105
+ ```
106
+
107
+ ## useUniques
108
+
109
+ ```ts
110
+ // signature
111
+ useUniques(ref: FunctionReference<"query", "public", any, UniquesView>, args | "skip"): UniquesView | undefined
112
+ ```
113
+
114
+ ## MetricArgs
115
+
116
+ ```ts
117
+ // signature
118
+ interface MetricArgs { scope?: string; name: string; range?: Range; where?: Where }
119
+ ```
120
+
121
+ ## TopArgs
122
+
123
+ ```ts
124
+ // signature
125
+ interface TopArgs { scope?: string; name: string; dimension: string; range?: Range; limit?: number }
126
+ ```
127
+
128
+ ## TimeseriesArgs
129
+
130
+ ```ts
131
+ // signature
132
+ interface TimeseriesArgs { scope?: string; name: string; granularity: Granularity; range: Range; where?: Where }
133
+ ```
134
+
135
+ ## UniquesArgs
136
+
137
+ ```ts
138
+ // signature
139
+ interface UniquesArgs { scope?: string; range: Range; granularity: Granularity }
140
+ ```
141
+
142
+ These four interfaces document the args a host query is expected to accept. The hooks do not
143
+ enforce them: the args type comes from the query reference you pass.
144
+
145
+ The entry also re-exports the types `Range`, `Where`, `Granularity`, `TopRow`,
146
+ `TimeseriesPoint` and `UniquesView` (see [Client SDK](./client-sdk.md#types)).
package/docs/schema.md CHANGED
@@ -6,8 +6,9 @@ Six sandboxed tables. Generic and domain-neutral — zero hardcoded web fields,
6
6
 
7
7
  ## events
8
8
 
9
- Raw event log. One row per tracked event. TTL-pruned past `retentionDays` (rollups are
10
- kept forever).
9
+ Raw event log. One row per tracked event. TTL-pruned past `retentionDays`. Rollups are kept
10
+ forever unless you run `backfill`: it deletes every rollup row of that name and rebuilds them
11
+ only from raw events still retained, so buckets older than `retentionDays` drop to 0.
11
12
 
12
13
  | Field | Type | Description |
13
14
  | ------------ | ---------------------- | ---------------------------------------------------------------- |
@@ -75,7 +76,7 @@ Per-subject lifecycle, for uniques and retention. Upserted on every event that c
75
76
  ## sessions
76
77
 
77
78
  Optional generic session aggregates. Created when an event carries a `sessionRef`; closed
78
- by the `closeSessions` cron after `sessionIdleMs`.
79
+ by the `closeSessions` function (cron `analytics:close-sessions`) after `sessionIdleMs`.
79
80
 
80
81
  | Field | Type | Description |
81
82
  | ------------ | ------- | ----------------------------------------- |
@@ -96,8 +97,10 @@ by the `closeSessions` cron after `sessionIdleMs`.
96
97
 
97
98
  ## scopes
98
99
 
99
- Registry of every scope that has tracked an event. Written by `track` the first time a scope
100
- is seen; the `prune` and `closeSessions` crons page through it to visit each scope.
100
+ Registry of every scope the component has seen. Written the first time a scope is seen by
101
+ `track`, `configSet` or `configure`; the `prune` and `closeSessions` functions (crons
102
+ `analytics:prune-events` and `analytics:close-sessions`) page through it to
103
+ visit each scope.
101
104
 
102
105
  | Field | Type | Description |
103
106
  | ------- | ------ | ----------- |
@@ -111,8 +114,9 @@ is seen; the `prune` and `closeSessions` crons page through it to visit each sco
111
114
 
112
115
  ## config
113
116
 
114
- Cron-relevant config, keyed by `(scope, key)`. Values are stored as strings. Set via
115
- `client.configure(ctx, { ... })`; also holds the REST `apiKeys` array (JSON string).
117
+ Config keyed by `(scope, key)`; values are strings. `client.configure(ctx, { ... })` writes
118
+ `retentionDays`, `sessionIdleMs` (read by the crons) and `sampleRate` (stored, not read). The
119
+ component mutation `configSet` writes any key, including the REST `apiKeys` array (JSON string).
116
120
 
117
121
  | Field | Type | Description |
118
122
  | ------- | ------ | ----------------------------------------------------------------------- |
@@ -130,6 +134,6 @@ Cron-relevant config, keyed by `(scope, key)`. Values are stored as strings. Set
130
134
 
131
135
  | Component | Package | Role |
132
136
  | -------------- | ----------------------------- | ---------------------------------------- |
133
- | aggregate | `@convex-dev/aggregate` | Mounted for compatibility; not written or read. |
137
+ | aggregate | `@convex-dev/aggregate` | Mounted; not written or read. |
134
138
  | shardedCounter | `@convex-dev/sharded-counter` | O(1) total per `(scope, name)` (16 shards). |
135
- | rateLimiter | `@convex-dev/rate-limiter` | Per-`sessionRef` token bucket at ingest. |
139
+ | rateLimiter | `@convex-dev/rate-limiter` | Token bucket per `(scope, sessionRef)` at ingest. |