@sansavision/aurora 0.1.0-alpha.20260212.4

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 (150) hide show
  1. package/README.md +4 -0
  2. package/package.json +17 -0
  3. package/src/ai-diagnostics.ts +156 -0
  4. package/src/ai.ts +574 -0
  5. package/src/analyze.ts +669 -0
  6. package/src/bin/aurora.ts +15 -0
  7. package/src/build.ts +431 -0
  8. package/src/bun-test-shims.d.ts +17 -0
  9. package/src/create-feature.ts +419 -0
  10. package/src/create-route.ts +581 -0
  11. package/src/create.ts +425 -0
  12. package/src/dev.ts +126 -0
  13. package/src/devtools.ts +1143 -0
  14. package/src/doctor.ts +611 -0
  15. package/src/explain.ts +855 -0
  16. package/src/help.ts +39 -0
  17. package/src/index.ts +34 -0
  18. package/src/init.ts +1011 -0
  19. package/src/inspect-cache.ts +464 -0
  20. package/src/lsp-inline-hints.ts +254 -0
  21. package/src/node-shims.d.ts +26 -0
  22. package/src/process.d.ts +11 -0
  23. package/src/query-profiler.ts +520 -0
  24. package/src/realtime-monitor.ts +389 -0
  25. package/src/registry.ts +303 -0
  26. package/src/run.ts +37 -0
  27. package/src/start.ts +56 -0
  28. package/src/test.ts +289 -0
  29. package/templates/basic/README.md +16 -0
  30. package/templates/basic/package.json +10 -0
  31. package/templates/basic/src/actions/createMessage.action.server.ts +22 -0
  32. package/templates/basic/src/lib/auth.server.ts +11 -0
  33. package/templates/basic/src/queries/listMessages.server.ts +17 -0
  34. package/templates/basic/src/routes/index.tsx +12 -0
  35. package/templates/blog/README.md +17 -0
  36. package/templates/blog/package.json +12 -0
  37. package/templates/blog/public/assets/og-default.svg +17 -0
  38. package/templates/blog/src/content/loadPosts.server.ts +22 -0
  39. package/templates/blog/src/content/posts/hello-world.md +11 -0
  40. package/templates/blog/src/content/posts/release-notes.md +9 -0
  41. package/templates/blog/src/routes/index.tsx +22 -0
  42. package/templates/blog/src/routes/posts/[slug].tsx +19 -0
  43. package/templates/blog/src/seo/meta.ts +19 -0
  44. package/templates/dashboard/README.md +18 -0
  45. package/templates/dashboard/package.json +10 -0
  46. package/templates/dashboard/src/actions/acknowledgeAlert.action.server.ts +6 -0
  47. package/templates/dashboard/src/queries/getDashboardMetrics.server.ts +30 -0
  48. package/templates/dashboard/src/realtime/useDashboardRealtime.client.ts +13 -0
  49. package/templates/dashboard/src/routes/index.tsx +19 -0
  50. package/templates/dashboard/src/widgets/DataGrid.client.ts +8 -0
  51. package/templates/dashboard/src/widgets/MetricChart.client.ts +8 -0
  52. package/templates/desktop/README.md +18 -0
  53. package/templates/desktop/package.json +11 -0
  54. package/templates/desktop/src/actions/saveDesktopPreference.action.server.ts +28 -0
  55. package/templates/desktop/src/desktop/secureStorage.client.ts +20 -0
  56. package/templates/desktop/src/desktop/tauriBridge.client.ts +14 -0
  57. package/templates/desktop/src/queries/getDesktopSyncStatus.server.ts +9 -0
  58. package/templates/desktop/src/routes/index.tsx +27 -0
  59. package/templates/desktop/src/sync/offlineSyncBoundary.server.ts +27 -0
  60. package/templates/feature-skeleton/README.md +13 -0
  61. package/templates/feature-skeleton/actions/createFeature.action.server.ts +19 -0
  62. package/templates/feature-skeleton/index.ts +8 -0
  63. package/templates/feature-skeleton/queries/listFeature.server.ts +15 -0
  64. package/templates/feature-skeleton/realtime/useFeatureRealtime.client.ts +16 -0
  65. package/templates/feature-skeleton/template.manifest.json +15 -0
  66. package/templates/feature-skeleton/ui/FeatureView.client.tsx +14 -0
  67. package/templates/mobile/README.md +17 -0
  68. package/templates/mobile/package.json +11 -0
  69. package/templates/mobile/src/mobile/auth/session-handoff.client.ts +69 -0
  70. package/templates/mobile/src/mobile/generated/mobile-api-sdk.ts +62 -0
  71. package/templates/mobile/src/mobile/transport/mobile-api-transport.client.ts +122 -0
  72. package/templates/mobile/src/routes/index.tsx +134 -0
  73. package/templates/monorepo/README.md +18 -0
  74. package/templates/monorepo/apps/web/package.json +9 -0
  75. package/templates/monorepo/apps/web/src/routes/index.tsx +1 -0
  76. package/templates/monorepo/package.json +13 -0
  77. package/templates/monorepo/packages/shared/README.md +3 -0
  78. package/templates/monorepo/packages/ui/README.md +3 -0
  79. package/templates/saas/README.md +17 -0
  80. package/templates/saas/package.json +10 -0
  81. package/templates/saas/src/admin/getDashboard.server.ts +18 -0
  82. package/templates/saas/src/auth/session.server.ts +13 -0
  83. package/templates/saas/src/billing/checkout.server.ts +11 -0
  84. package/templates/saas/src/email/sendWelcome.server.ts +8 -0
  85. package/templates/saas/src/realtime/notifications.server.ts +8 -0
  86. package/templates/saas/src/routes/index.tsx +20 -0
  87. package/test/ai.test.ts +94 -0
  88. package/test/analyze.test.ts +301 -0
  89. package/test/build.test.ts +135 -0
  90. package/test/create-feature.test.ts +145 -0
  91. package/test/create-route.test.ts +117 -0
  92. package/test/create.test.ts +222 -0
  93. package/test/dev.test.ts +52 -0
  94. package/test/devtools.test.ts +130 -0
  95. package/test/doctor.test.ts +129 -0
  96. package/test/explain.test.ts +232 -0
  97. package/test/feature-skeleton.test.ts +53 -0
  98. package/test/fixtures/analyze/cache-input.invalid.json +1 -0
  99. package/test/fixtures/analyze/cache-input.missing-keyhash.v1.json +10 -0
  100. package/test/fixtures/analyze/cache-input.unsupported-version.v2.json +10 -0
  101. package/test/fixtures/analyze/cache-input.v1.json +12 -0
  102. package/test/fixtures/analyze/compiler-manifest/manifest.json +11 -0
  103. package/test/fixtures/analyze/guardrails-input.unsupported-version.v2.json +4 -0
  104. package/test/fixtures/analyze/guardrails-input.v1.json +49 -0
  105. package/test/fixtures/analyze/query-input.invalid-cache-status.v1.json +11 -0
  106. package/test/fixtures/analyze/query-input.unsupported-version.v2.json +11 -0
  107. package/test/fixtures/analyze/query-input.v1.json +18 -0
  108. package/test/fixtures/analyze/realtime-input.missing-lag-p95.v1.json +10 -0
  109. package/test/fixtures/analyze/realtime-input.unsupported-version.v2.json +8 -0
  110. package/test/fixtures/analyze/realtime-input.v1.json +12 -0
  111. package/test/fixtures/cache-inspector/cache-input.v1.json +23 -0
  112. package/test/fixtures/cache-inspector/invalid.json +1 -0
  113. package/test/fixtures/cache-inspector/snapshot.v1.json +34 -0
  114. package/test/fixtures/cache-inspector/unsupported-version.v2.json +13 -0
  115. package/test/fixtures/devtools/healthy.v1.json +130 -0
  116. package/test/fixtures/devtools/invalid.json +1 -0
  117. package/test/fixtures/devtools/unsupported-version.v2.json +8 -0
  118. package/test/fixtures/devtools/warn.v1.json +114 -0
  119. package/test/fixtures/doctor/clean/src/page.tsx +3 -0
  120. package/test/fixtures/doctor/findings/src/accessibility.client.tsx +7 -0
  121. package/test/fixtures/doctor/findings/src/migration.config.ts +3 -0
  122. package/test/fixtures/doctor/findings/src/page.client.tsx +5 -0
  123. package/test/fixtures/doctor/findings/src/perf.server.ts +15 -0
  124. package/test/fixtures/doctor/findings/src/routes.js +3 -0
  125. package/test/fixtures/doctor/findings/src/security.server.ts +7 -0
  126. package/test/fixtures/doctor/findings/src/users.server.ts +3 -0
  127. package/test/fixtures/doctor/governance/src/features/analytics/OWNERS.ts +2 -0
  128. package/test/fixtures/doctor/governance/src/features/analytics/page.tsx +3 -0
  129. package/test/fixtures/doctor/governance/src/features/billing/page.tsx +3 -0
  130. package/test/fixtures/explain/invalid.json +1 -0
  131. package/test/fixtures/explain/module-report.unsupported-version.v2.json +6 -0
  132. package/test/fixtures/explain/module-report.v1.json +72 -0
  133. package/test/fixtures/query-profiler/healthy.v1.json +11 -0
  134. package/test/fixtures/query-profiler/invalid.json +1 -0
  135. package/test/fixtures/query-profiler/unsupported-version.v2.json +6 -0
  136. package/test/fixtures/query-profiler/warning.v1.json +10 -0
  137. package/test/fixtures/realtime-monitor/healthy.v1.json +8 -0
  138. package/test/fixtures/realtime-monitor/invalid.json +1 -0
  139. package/test/fixtures/realtime-monitor/unsupported-version.v2.json +8 -0
  140. package/test/fixtures/realtime-monitor/warning.v1.json +8 -0
  141. package/test/help-parity.test.ts +104 -0
  142. package/test/init.test.ts +164 -0
  143. package/test/inspect-cache.test.ts +112 -0
  144. package/test/lsp-inline-hints.test.ts +65 -0
  145. package/test/query-profiler.test.ts +123 -0
  146. package/test/realtime-monitor.test.ts +115 -0
  147. package/test/registry.test.ts +41 -0
  148. package/test/start.test.ts +23 -0
  149. package/test/test-command.test.ts +65 -0
  150. package/tsconfig.json +19 -0
@@ -0,0 +1,232 @@
1
+ import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
+ import { join } from "node:path";
3
+
4
+ import { describe, expect, it } from "bun:test";
5
+
6
+ import { runAuroraCli } from "../src";
7
+
8
+ const projectRoot = join(import.meta.dir, "..");
9
+
10
+ function fixturePath(name: string): string {
11
+ return join("test/fixtures/explain", name);
12
+ }
13
+
14
+ function readFixture(name: string): string {
15
+ return readFileSync(join(import.meta.dir, "fixtures/explain", name), "utf8");
16
+ }
17
+
18
+ describe("aurora explain", () => {
19
+ it("renders inferred behavior from a schemaVersion 1 explain report", () => {
20
+ const result = runAuroraCli(
21
+ [
22
+ "explain",
23
+ "routes/guestbook/guestbook.server.ts",
24
+ "--input",
25
+ fixturePath("module-report.v1.json"),
26
+ ],
27
+ { cwd: projectRoot },
28
+ );
29
+
30
+ expect(result.exitCode).toBe(0);
31
+ expect(result.stdout).toContain("aurora explain report");
32
+ expect(result.stdout).toContain("module: routes/guestbook/guestbook.server.ts");
33
+ expect(result.stdout).toContain("query: listMessages");
34
+ expect(result.stdout).toContain("key: [\"routes/guestbook/guestbook.server\",\"listMessages\",\"hash(args)\"] (inferred)");
35
+ expect(result.stdout).toContain("action: addMessage");
36
+ expect(result.stdout).toContain("invalidates: [guestbook:messages] (explicit)");
37
+ });
38
+
39
+ it("supports json output", () => {
40
+ const result = runAuroraCli(
41
+ [
42
+ "explain",
43
+ "routes/guestbook/guestbook.server.ts",
44
+ "--input",
45
+ fixturePath("module-report.v1.json"),
46
+ "--format",
47
+ "json",
48
+ ],
49
+ { cwd: projectRoot },
50
+ );
51
+
52
+ expect(result.exitCode).toBe(0);
53
+
54
+ const parsed = JSON.parse(result.stdout ?? "{}") as {
55
+ mode?: string;
56
+ schemaVersion?: number;
57
+ module?: string;
58
+ queries?: Array<{ name?: string }>;
59
+ actions?: Array<{ name?: string }>;
60
+ warnings?: string[];
61
+ inlineHints?: Array<{ kind?: string; symbol?: string; label?: string }>;
62
+ };
63
+
64
+ expect(parsed.mode).toBe("explain");
65
+ expect(parsed.schemaVersion).toBe(1);
66
+ expect(parsed.module).toBe("routes/guestbook/guestbook.server.ts");
67
+ expect(parsed.queries?.[0]?.name).toBe("listMessages");
68
+ expect(parsed.actions?.[0]?.name).toBe("addMessage");
69
+ expect(parsed.warnings).toEqual([]);
70
+ expect(parsed.inlineHints).toEqual([]);
71
+ });
72
+
73
+ it("includes inline hints when module source is available", () => {
74
+ const cwd = createTempWorkspace("aurora-explain-inline-hints");
75
+ const modulePath = join(cwd, "routes", "guestbook", "guestbook.server.ts");
76
+ mkdirSync(join(cwd, "routes", "guestbook"), { recursive: true });
77
+ writeFileSync(
78
+ modulePath,
79
+ [
80
+ 'export const runtime = "edge";',
81
+ 'export const auth = "user";',
82
+ "",
83
+ "export const listMessages = defineQuery({});",
84
+ "export const addMessage = defineAction({});",
85
+ ].join("\n"),
86
+ "utf8",
87
+ );
88
+
89
+ writeFileSync(
90
+ join(cwd, "module-report.v1.json"),
91
+ readFixture("module-report.v1.json"),
92
+ "utf8",
93
+ );
94
+
95
+ const result = runAuroraCli(
96
+ [
97
+ "explain",
98
+ "routes/guestbook/guestbook.server.ts",
99
+ "--input",
100
+ "module-report.v1.json",
101
+ "--format",
102
+ "json",
103
+ ],
104
+ { cwd },
105
+ );
106
+
107
+ expect(result.exitCode).toBe(0);
108
+
109
+ const parsed = JSON.parse(result.stdout ?? "{}") as {
110
+ inlineHints?: Array<{ kind?: string; label?: string; symbol?: string }>;
111
+ };
112
+
113
+ expect((parsed.inlineHints ?? []).length >= 7).toBe(true);
114
+ expect(parsed.inlineHints?.some((hint) => hint.kind === "runtime" && hint.label === "runtime: edge")).toBe(true);
115
+ expect(parsed.inlineHints?.some((hint) => hint.kind === "key" && hint.symbol === "listMessages")).toBe(true);
116
+ expect(parsed.inlineHints?.some((hint) => hint.kind === "invalidation" && hint.symbol === "addMessage")).toBe(true);
117
+ });
118
+
119
+ it("reports module mismatch warning when requested module differs from snapshot module", () => {
120
+ const result = runAuroraCli(
121
+ [
122
+ "explain",
123
+ "routes/chat/chat.server.ts",
124
+ "--input",
125
+ fixturePath("module-report.v1.json"),
126
+ "--format",
127
+ "json",
128
+ ],
129
+ { cwd: projectRoot },
130
+ );
131
+
132
+ expect(result.exitCode).toBe(0);
133
+
134
+ const parsed = JSON.parse(result.stdout ?? "{}") as {
135
+ warnings?: string[];
136
+ };
137
+
138
+ expect(parsed.warnings?.[0]).toContain("snapshot module");
139
+ expect(parsed.warnings?.[0]).toContain("requested module");
140
+ });
141
+
142
+ it("requires a module path", () => {
143
+ const result = runAuroraCli(["explain"], { cwd: projectRoot });
144
+
145
+ expect(result.exitCode).toBe(2);
146
+ expect(result.stderr).toContain("module path is required");
147
+ });
148
+
149
+ it("rejects unknown explain options", () => {
150
+ const result = runAuroraCli(
151
+ [
152
+ "explain",
153
+ "routes/guestbook/guestbook.server.ts",
154
+ "--unknown",
155
+ ],
156
+ { cwd: projectRoot },
157
+ );
158
+
159
+ expect(result.exitCode).toBe(2);
160
+ expect(result.stderr).toContain("unknown option '--unknown'");
161
+ });
162
+
163
+ it("returns readable errors for invalid json", () => {
164
+ const inputPath = fixturePath("invalid.json");
165
+ const result = runAuroraCli(
166
+ [
167
+ "explain",
168
+ "routes/guestbook/guestbook.server.ts",
169
+ "--input",
170
+ inputPath,
171
+ ],
172
+ { cwd: projectRoot },
173
+ );
174
+
175
+ expect(result.exitCode).toBe(1);
176
+ expect(result.stderr).toContain(`aurora explain: invalid json input at ${inputPath}`);
177
+ });
178
+
179
+ it("fails explain report parsing for unsupported schema versions", () => {
180
+ const result = runAuroraCli(
181
+ [
182
+ "explain",
183
+ "routes/guestbook/guestbook.server.ts",
184
+ "--input",
185
+ fixturePath("module-report.unsupported-version.v2.json"),
186
+ ],
187
+ { cwd: projectRoot },
188
+ );
189
+
190
+ expect(result.exitCode).toBe(1);
191
+ expect(result.stderr).toContain("unsupported schemaVersion 2; expected 1");
192
+ });
193
+
194
+ it("uses the default explain snapshot path when --input is omitted", () => {
195
+ const cwd = createTempWorkspace("aurora-explain-default-input");
196
+ mkdirSync(join(cwd, ".aurora", "explain"), { recursive: true });
197
+ writeFileSync(
198
+ join(cwd, ".aurora", "explain", "routes__guestbook__guestbook.server.ts.explain.v1.json"),
199
+ readFixture("module-report.v1.json"),
200
+ "utf8",
201
+ );
202
+
203
+ const result = runAuroraCli(["explain", "routes/guestbook/guestbook.server.ts"], {
204
+ cwd,
205
+ });
206
+
207
+ expect(result.exitCode).toBe(0);
208
+ expect(result.stdout).toContain(
209
+ "input: .aurora/explain/routes__guestbook__guestbook.server.ts.explain.v1.json",
210
+ );
211
+ });
212
+
213
+ it("returns a clear error when the explain snapshot file does not exist", () => {
214
+ const cwd = createTempWorkspace("aurora-explain-missing-snapshot");
215
+
216
+ const result = runAuroraCli(["explain", "routes/guestbook/guestbook.server.ts"], {
217
+ cwd,
218
+ });
219
+
220
+ expect(result.exitCode).toBe(1);
221
+ expect(result.stderr).toContain(
222
+ "aurora explain: unable to read input at .aurora/explain/routes__guestbook__guestbook.server.ts.explain.v1.json",
223
+ );
224
+ });
225
+ });
226
+
227
+ function createTempWorkspace(prefix: string): string {
228
+ const unique = `${prefix}-${Date.now()}-${Math.floor(Math.random() * 1_000_000)}`;
229
+ const cwd = join("/tmp", unique);
230
+ mkdirSync(cwd, { recursive: true });
231
+ return cwd;
232
+ }
@@ -0,0 +1,53 @@
1
+ import { existsSync, readFileSync } from "node:fs";
2
+ import { join } from "node:path";
3
+
4
+ import { describe, expect, it } from "bun:test";
5
+
6
+ const templateRoot = join(import.meta.dir, "../templates/feature-skeleton");
7
+
8
+ describe("feature skeleton template assets", () => {
9
+ it("includes required ui/query/action/realtime scaffold files", () => {
10
+ const required = [
11
+ "README.md",
12
+ "template.manifest.json",
13
+ "index.ts",
14
+ "ui/FeatureView.client.tsx",
15
+ "queries/listFeature.server.ts",
16
+ "actions/createFeature.action.server.ts",
17
+ "realtime/useFeatureRealtime.client.ts",
18
+ ];
19
+
20
+ for (const relativePath of required) {
21
+ expect(existsSync(join(templateRoot, relativePath))).toBe(true);
22
+ }
23
+ });
24
+
25
+ it("keeps placeholder contract tokens for future generator wiring", () => {
26
+ const placeholderFiles = [
27
+ "ui/FeatureView.client.tsx",
28
+ "queries/listFeature.server.ts",
29
+ "actions/createFeature.action.server.ts",
30
+ "realtime/useFeatureRealtime.client.ts",
31
+ "index.ts",
32
+ ];
33
+
34
+ for (const relativePath of placeholderFiles) {
35
+ const source = readFileSync(join(templateRoot, relativePath), "utf8");
36
+ expect(source).toContain("__AURORA_FEATURE_NAME__");
37
+ expect(source).toContain("__AURORA_FEATURE_SLUG__");
38
+ }
39
+ });
40
+
41
+ it("keeps manifest module list aligned with scaffold files", () => {
42
+ const manifestRaw = readFileSync(join(templateRoot, "template.manifest.json"), "utf8");
43
+ const manifest = JSON.parse(manifestRaw) as { modules?: string[] };
44
+
45
+ expect(Array.isArray(manifest.modules)).toBe(true);
46
+ const modules = manifest.modules ?? [];
47
+ expect(modules.length > 0).toBe(true);
48
+
49
+ for (const modulePath of modules) {
50
+ expect(existsSync(join(templateRoot, modulePath))).toBe(true);
51
+ }
52
+ });
53
+ });
@@ -0,0 +1 @@
1
+ { "schemaVersion": 1, "entries": [ { "hash": "users:u1" }
@@ -0,0 +1,10 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "entries": [
4
+ {
5
+ "labels": ["users", "tenant:a"],
6
+ "sizeBytes": 64,
7
+ "data": { "id": "u1" }
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "schemaVersion": 2,
3
+ "entries": [
4
+ {
5
+ "hash": "users:u1",
6
+ "labels": ["users"],
7
+ "sizeBytes": 64
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "entries": [
4
+ {
5
+ "hash": "users:u1",
6
+ "labels": ["users", "tenant:a"],
7
+ "payload": { "id": "u1", "name": "A" },
8
+ "queryKey": ["users.byId", { "id": "u1" }],
9
+ "stale": true
10
+ }
11
+ ]
12
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "routes": [
3
+ { "id": "home", "path": "/" },
4
+ { "id": "about", "path": "/about" },
5
+ { "id": "settings", "path": "/settings" }
6
+ ],
7
+ "chunks": [
8
+ { "id": "home-chunk", "file": "home.js" },
9
+ { "id": "shared-chunk", "file": "shared.js" }
10
+ ]
11
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "schemaVersion": 2,
3
+ "queries": []
4
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "queries": [
4
+ {
5
+ "name": "users.list",
6
+ "returnsArray": true,
7
+ "hasLimit": false,
8
+ "file": "routes/users/page.tsx",
9
+ "line": 12
10
+ }
11
+ ],
12
+ "payloads": [
13
+ {
14
+ "name": "users.export",
15
+ "bytes": 6200000,
16
+ "warnBytes": 1000000,
17
+ "errorBytes": 5000000,
18
+ "surface": "loader",
19
+ "file": "routes/users/export.server.ts",
20
+ "line": 24
21
+ }
22
+ ],
23
+ "nPlusOne": [
24
+ {
25
+ "file": "routes/users/page.tsx",
26
+ "line": 33,
27
+ "parentQuery": "users.list",
28
+ "childQuery": "teams.byUser",
29
+ "parentRows": 20,
30
+ "childCalls": 44
31
+ }
32
+ ],
33
+ "staleClosures": [
34
+ {
35
+ "file": "routes/users/page.tsx",
36
+ "line": 49,
37
+ "signal": "filters",
38
+ "context": "setInterval",
39
+ "stale": true
40
+ }
41
+ ],
42
+ "bundles": [
43
+ {
44
+ "route": "/users",
45
+ "bytes": 260000,
46
+ "budgetBytes": 180000
47
+ }
48
+ ]
49
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "samples": [
4
+ {
5
+ "name": "users.byId",
6
+ "key": "users:u1",
7
+ "ms": 12,
8
+ "cache": "unknown"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "schemaVersion": 2,
3
+ "samples": [
4
+ {
5
+ "name": "users.byId",
6
+ "key": "users:u1",
7
+ "ms": 12,
8
+ "cache": "hit"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "samples": [
4
+ {
5
+ "name": "users.byId",
6
+ "key": "users:u1",
7
+ "ms": 15,
8
+ "cache": "hit",
9
+ "merged": true
10
+ },
11
+ {
12
+ "name": "teams.list",
13
+ "key": "teams:list",
14
+ "ms": 55,
15
+ "cache": "miss"
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "rx": 50,
4
+ "tx": 48,
5
+ "dropped": 2,
6
+ "deliveredRps": 10,
7
+ "dropReasons": {
8
+ "stale": 2
9
+ }
10
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "schemaVersion": 2,
3
+ "rx": 10,
4
+ "tx": 9,
5
+ "dropped": 1,
6
+ "deliveredRps": 3,
7
+ "lagP95Ms": 120
8
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "rx": 100,
4
+ "tx": 94,
5
+ "dropped": 6,
6
+ "deliveredRps": 15,
7
+ "lagP95Ms": 260,
8
+ "dropReasons": {
9
+ "stale": 4,
10
+ "duplicate": 2
11
+ }
12
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "entries": [
4
+ {
5
+ "hash": "users:u1",
6
+ "labels": ["users", "user:u1"],
7
+ "sizeBytes": 128,
8
+ "stale": false
9
+ },
10
+ {
11
+ "hash": "users:u2",
12
+ "labels": ["users", "user:u2"],
13
+ "sizeBytes": 256,
14
+ "stale": true
15
+ },
16
+ {
17
+ "hash": "teams:list",
18
+ "labels": ["teams"],
19
+ "sizeBytes": 64,
20
+ "stale": false
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1 @@
1
+ { "version": 1, "entries": [ { "key": "users:u1" }
@@ -0,0 +1,34 @@
1
+ {
2
+ "version": 1,
3
+ "generatedAt": "2026-02-10T00:00:00.000Z",
4
+ "entries": [
5
+ {
6
+ "key": "users:u1",
7
+ "value": {
8
+ "id": "u1",
9
+ "name": "Ada"
10
+ },
11
+ "tags": ["users", "user:u1"],
12
+ "createdAt": 1707523200000
13
+ },
14
+ {
15
+ "key": "teams:list",
16
+ "value": [
17
+ { "id": "t1" },
18
+ { "id": "t2" }
19
+ ],
20
+ "tags": ["teams", "dashboard"],
21
+ "createdAt": 1707523201000,
22
+ "expiresAt": 1
23
+ },
24
+ {
25
+ "key": "metrics:dashboard",
26
+ "value": {
27
+ "panels": 12,
28
+ "updatedAt": "2026-02-10T00:00:00.000Z"
29
+ },
30
+ "tags": ["metrics", "dashboard"],
31
+ "createdAt": 1707523202000
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": 2,
3
+ "entries": [
4
+ {
5
+ "key": "users:u1",
6
+ "value": {
7
+ "id": "u1"
8
+ },
9
+ "tags": ["users"],
10
+ "createdAt": 1707523200000
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,130 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "explain": {
4
+ "module": "routes/guestbook/guestbook.server.ts",
5
+ "queries": [
6
+ {
7
+ "name": "listMessages",
8
+ "auth": { "value": "user" },
9
+ "realtime": { "value": "subscribed via tags" }
10
+ },
11
+ {
12
+ "name": "listMembers",
13
+ "auth": "admin",
14
+ "realtime": "none"
15
+ }
16
+ ],
17
+ "actions": [
18
+ {
19
+ "name": "addMessage",
20
+ "auth": { "value": "user" }
21
+ },
22
+ {
23
+ "name": "archiveMessage",
24
+ "auth": "admin"
25
+ }
26
+ ],
27
+ "warnings": []
28
+ },
29
+ "waterfall": {
30
+ "requestId": "req-healthy",
31
+ "operations": [
32
+ {
33
+ "name": "middleware.auth",
34
+ "kind": "middleware",
35
+ "startMs": 0,
36
+ "durationMs": 2,
37
+ "blocking": false
38
+ },
39
+ {
40
+ "name": "route.match",
41
+ "kind": "routing",
42
+ "startMs": 0,
43
+ "durationMs": 3,
44
+ "blocking": false
45
+ },
46
+ {
47
+ "name": "listMessages",
48
+ "kind": "query",
49
+ "startMs": 3,
50
+ "durationMs": 25,
51
+ "blocking": true
52
+ },
53
+ {
54
+ "name": "listMembers",
55
+ "kind": "query",
56
+ "startMs": 4,
57
+ "durationMs": 20,
58
+ "blocking": true
59
+ },
60
+ {
61
+ "name": "render",
62
+ "kind": "render",
63
+ "startMs": 29,
64
+ "durationMs": 8,
65
+ "blocking": true
66
+ }
67
+ ],
68
+ "phases": [
69
+ {
70
+ "name": "routing",
71
+ "durationMs": 3
72
+ },
73
+ {
74
+ "name": "data",
75
+ "durationMs": 25
76
+ },
77
+ {
78
+ "name": "render",
79
+ "durationMs": 8
80
+ }
81
+ ]
82
+ },
83
+ "performance": {
84
+ "routes": [
85
+ {
86
+ "route": "/",
87
+ "jsBytes": 42000,
88
+ "payloadBytes": 1200,
89
+ "lcpMs": 210
90
+ },
91
+ {
92
+ "route": "/guestbook",
93
+ "jsBytes": 58000,
94
+ "payloadBytes": 3200,
95
+ "lcpMs": 310
96
+ }
97
+ ]
98
+ },
99
+ "realtime": {
100
+ "connectionState": "connected",
101
+ "eventsPerSecond": 24.5,
102
+ "lagP95Ms": 140,
103
+ "droppedRatio": 0.012,
104
+ "subscriptions": [
105
+ {
106
+ "tag": "guestbook:messages",
107
+ "channel": "guestbook.ws",
108
+ "state": "active",
109
+ "authScope": "user"
110
+ },
111
+ {
112
+ "tag": "guestbook:admins",
113
+ "channel": "guestbook.ws",
114
+ "state": "active",
115
+ "authScope": "admin"
116
+ }
117
+ ]
118
+ },
119
+ "auth": {
120
+ "sessionStatus": "active",
121
+ "routeAuth": "user",
122
+ "userId": "u_123",
123
+ "role": "user",
124
+ "permissions": [
125
+ "guestbook:read",
126
+ "guestbook:write"
127
+ ],
128
+ "tokenExpiresInSec": 3600
129
+ }
130
+ }
@@ -0,0 +1 @@
1
+ { "schemaVersion": 1,