@iann29/rastro 0.1.0-alpha.0 → 0.1.0-alpha.10

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 (164) hide show
  1. package/README.md +579 -57
  2. package/agent/integration.md +661 -0
  3. package/agent/manifest.json +187 -0
  4. package/agent/manifest.schema.json +411 -0
  5. package/dist/client/federation.d.ts +236 -0
  6. package/dist/client/federation.d.ts.map +1 -0
  7. package/dist/client/federation.js +196 -0
  8. package/dist/client/federation.js.map +1 -0
  9. package/dist/client/index.d.ts +2467 -18
  10. package/dist/client/index.d.ts.map +1 -1
  11. package/dist/client/index.js +461 -32
  12. package/dist/client/index.js.map +1 -1
  13. package/dist/component/_generated/api.d.ts +18 -0
  14. package/dist/component/_generated/api.d.ts.map +1 -1
  15. package/dist/component/_generated/api.js.map +1 -1
  16. package/dist/component/_generated/component.d.ts +302 -4
  17. package/dist/component/_generated/component.d.ts.map +1 -1
  18. package/dist/component/_generated/server.d.ts +4 -0
  19. package/dist/component/_generated/server.d.ts.map +1 -1
  20. package/dist/component/_generated/server.js.map +1 -1
  21. package/dist/component/affiliates.d.ts.map +1 -1
  22. package/dist/component/affiliates.js +6 -2
  23. package/dist/component/affiliates.js.map +1 -1
  24. package/dist/component/cardinality.d.ts +12 -0
  25. package/dist/component/cardinality.d.ts.map +1 -0
  26. package/dist/component/cardinality.js +94 -0
  27. package/dist/component/cardinality.js.map +1 -0
  28. package/dist/component/constants.d.ts +34 -7
  29. package/dist/component/constants.d.ts.map +1 -1
  30. package/dist/component/constants.js +47 -7
  31. package/dist/component/constants.js.map +1 -1
  32. package/dist/component/convex.config.d.ts +6 -1
  33. package/dist/component/convex.config.js +9 -1
  34. package/dist/component/convex.config.js.map +1 -1
  35. package/dist/component/coverage.d.ts +19 -0
  36. package/dist/component/coverage.d.ts.map +1 -0
  37. package/dist/component/coverage.js +30 -0
  38. package/dist/component/coverage.js.map +1 -0
  39. package/dist/component/diagnostics.d.ts +9 -0
  40. package/dist/component/diagnostics.d.ts.map +1 -0
  41. package/dist/component/diagnostics.js +47 -0
  42. package/dist/component/diagnostics.js.map +1 -0
  43. package/dist/component/errors.d.ts +1 -1
  44. package/dist/component/errors.d.ts.map +1 -1
  45. package/dist/component/errors.js.map +1 -1
  46. package/dist/component/eventStore.d.ts +106 -0
  47. package/dist/component/eventStore.d.ts.map +1 -0
  48. package/dist/component/eventStore.js +294 -0
  49. package/dist/component/eventStore.js.map +1 -0
  50. package/dist/component/funnels.d.ts.map +1 -1
  51. package/dist/component/funnels.js +5 -3
  52. package/dist/component/funnels.js.map +1 -1
  53. package/dist/component/geo.d.ts +71 -0
  54. package/dist/component/geo.d.ts.map +1 -0
  55. package/dist/component/geo.js +611 -0
  56. package/dist/component/geo.js.map +1 -0
  57. package/dist/component/goals.d.ts.map +1 -1
  58. package/dist/component/goals.js +25 -9
  59. package/dist/component/goals.js.map +1 -1
  60. package/dist/component/guards.d.ts.map +1 -1
  61. package/dist/component/guards.js.map +1 -1
  62. package/dist/component/http.d.ts.map +1 -1
  63. package/dist/component/http.js +284 -53
  64. package/dist/component/http.js.map +1 -1
  65. package/dist/component/identity.d.ts +13 -0
  66. package/dist/component/identity.d.ts.map +1 -0
  67. package/dist/component/identity.js +58 -0
  68. package/dist/component/identity.js.map +1 -0
  69. package/dist/component/ingest.d.ts +3 -1
  70. package/dist/component/ingest.d.ts.map +1 -1
  71. package/dist/component/ingest.js +1105 -243
  72. package/dist/component/ingest.js.map +1 -1
  73. package/dist/component/live.d.ts +8 -0
  74. package/dist/component/live.d.ts.map +1 -1
  75. package/dist/component/live.js +74 -9
  76. package/dist/component/live.js.map +1 -1
  77. package/dist/component/reports.d.ts +273 -24
  78. package/dist/component/reports.d.ts.map +1 -1
  79. package/dist/component/reports.js +1320 -150
  80. package/dist/component/reports.js.map +1 -1
  81. package/dist/component/retention.d.ts +75 -1
  82. package/dist/component/retention.d.ts.map +1 -1
  83. package/dist/component/retention.js +541 -31
  84. package/dist/component/retention.js.map +1 -1
  85. package/dist/component/sanitize.d.ts +24 -1
  86. package/dist/component/sanitize.d.ts.map +1 -1
  87. package/dist/component/sanitize.js +107 -19
  88. package/dist/component/sanitize.js.map +1 -1
  89. package/dist/component/schema.d.ts +462 -55
  90. package/dist/component/schema.js +195 -15
  91. package/dist/component/schema.js.map +1 -1
  92. package/dist/component/sites.d.ts.map +1 -1
  93. package/dist/component/sites.js +38 -25
  94. package/dist/component/sites.js.map +1 -1
  95. package/dist/component/useragent.d.ts +9 -0
  96. package/dist/component/useragent.d.ts.map +1 -0
  97. package/dist/component/useragent.js +152 -0
  98. package/dist/component/useragent.js.map +1 -0
  99. package/dist/component/validators.d.ts +101 -16
  100. package/dist/component/validators.d.ts.map +1 -1
  101. package/dist/component/validators.js +19 -2
  102. package/dist/component/validators.js.map +1 -1
  103. package/dist/component/visitors.d.ts +19 -0
  104. package/dist/component/visitors.d.ts.map +1 -0
  105. package/dist/component/visitors.js +86 -0
  106. package/dist/component/visitors.js.map +1 -0
  107. package/dist/component/vitals.d.ts +41 -0
  108. package/dist/component/vitals.d.ts.map +1 -0
  109. package/dist/component/vitals.js +115 -0
  110. package/dist/component/vitals.js.map +1 -0
  111. package/dist/react/index.d.ts.map +1 -1
  112. package/dist/react/index.js.map +1 -1
  113. package/dist/tracker/generated.d.ts +8 -4
  114. package/dist/tracker/generated.d.ts.map +1 -1
  115. package/dist/tracker/generated.js +8 -4
  116. package/dist/tracker/generated.js.map +1 -1
  117. package/dist/tracker/tracker.d.ts +1 -1
  118. package/dist/tracker/tracker.d.ts.map +1 -1
  119. package/dist/tracker/tracker.js +81 -33
  120. package/dist/tracker/tracker.js.map +1 -1
  121. package/dist/tracker/vitals.d.ts +10 -0
  122. package/dist/tracker/vitals.d.ts.map +1 -0
  123. package/dist/tracker/vitals.js +140 -0
  124. package/dist/tracker/vitals.js.map +1 -0
  125. package/dist/tracker.min.js +1 -1
  126. package/dist/vitals.min.js +1 -0
  127. package/docs/benchmarks/2026-08-20-realistic.md +171 -0
  128. package/docs/benchmarks/2026-08-21-formal-certification.md +353 -0
  129. package/docs/benchmarks/2026-08-30-alpha6-recertification.md +206 -0
  130. package/docs/federation-setup.md +397 -0
  131. package/docs/federation.md +262 -0
  132. package/docs/upgrading.md +259 -0
  133. package/llms.txt +71 -0
  134. package/package.json +61 -11
  135. package/scripts/benchmark-ingest.mjs +601 -0
  136. package/scripts/generate-federation-keys.mjs +20 -0
  137. package/src/component/_generated/api.ts +18 -0
  138. package/src/component/_generated/component.ts +366 -4
  139. package/src/component/_generated/server.ts +4 -0
  140. package/src/component/affiliates.ts +20 -5
  141. package/src/component/cardinality.ts +117 -0
  142. package/src/component/constants.ts +47 -7
  143. package/src/component/convex.config.ts +11 -1
  144. package/src/component/coverage.ts +36 -0
  145. package/src/component/diagnostics.ts +65 -0
  146. package/src/component/errors.ts +2 -1
  147. package/src/component/eventStore.ts +489 -0
  148. package/src/component/funnels.ts +19 -16
  149. package/src/component/geo.ts +781 -0
  150. package/src/component/goals.ts +45 -16
  151. package/src/component/guards.ts +3 -1
  152. package/src/component/http.ts +403 -60
  153. package/src/component/identity.ts +74 -0
  154. package/src/component/ingest.ts +1652 -291
  155. package/src/component/live.ts +90 -9
  156. package/src/component/reports.ts +1929 -199
  157. package/src/component/retention.ts +774 -97
  158. package/src/component/sanitize.ts +154 -32
  159. package/src/component/schema.ts +219 -15
  160. package/src/component/sites.ts +56 -28
  161. package/src/component/useragent.ts +171 -0
  162. package/src/component/validators.ts +29 -1
  163. package/src/component/visitors.ts +116 -0
  164. package/src/component/vitals.ts +146 -0
@@ -0,0 +1,187 @@
1
+ {
2
+ "$schema": "https://www.amagerastro.com/agent/manifest.schema.json",
3
+ "name": "amage-rastro",
4
+ "title": "Amage Rastro",
5
+ "description": "Privacy-first, real-time web analytics for Convex with a read-only federated dashboard.",
6
+ "manifestVersion": "1.0.0",
7
+ "language": "en",
8
+ "canonicalBaseUrl": "https://www.amagerastro.com",
9
+ "documentation": {
10
+ "human": "https://www.amagerastro.com/docs/",
11
+ "agent": "https://www.amagerastro.com/agent/integration.md",
12
+ "llms": "https://www.amagerastro.com/llms.txt",
13
+ "protocol": "https://www.amagerastro.com/docs/reference/federation.md",
14
+ "setup": "https://www.amagerastro.com/docs/reference/federation-setup.md",
15
+ "upgrading": "https://www.amagerastro.com/docs/reference/upgrading.md",
16
+ "integrity": {
17
+ "algorithm": "sha256",
18
+ "agent": "b641b6cdecc0c23291e169bceef6308d1679392bec0b5c9e11715b6740be83b3",
19
+ "llms": "0dab84ee468ef3f22c7560bd0080957218f66d3014a660be0e93bbef1de0ccd5",
20
+ "protocol": "57fe1d40b81a872a027294945dc577b4a6346562620f2772074dc534c11c9190",
21
+ "setup": "5e7cd04a7b285a887404fe3cdae918a63374822e656395df2b50f57736e0fd54",
22
+ "upgrading": "c98d9773b8fe84b1b34bc3b8f35225ad65f7e23a7ce056ba0c2ce8bad979c127"
23
+ }
24
+ },
25
+ "controlPlane": {
26
+ "dashboardUrl": "https://www.amagerastro.com",
27
+ "functionsUrl": "https://api.amagerastro.com",
28
+ "httpActionsUrl": "https://site.api.amagerastro.com",
29
+ "issuer": "https://site.api.amagerastro.com/federation",
30
+ "discoveryUrl": "https://site.api.amagerastro.com/federation/.well-known/openid-configuration",
31
+ "jwksUrl": "https://site.api.amagerastro.com/federation/jwks.json",
32
+ "tokenAlgorithm": "RS256",
33
+ "tokenLifetimeSeconds": 600
34
+ },
35
+ "package": {
36
+ "name": "@iann29/rastro",
37
+ "distTag": "alpha",
38
+ "availability": "verify-exact-registry-artifact",
39
+ "requiredRuntimeExports": [
40
+ "exposeFederatedAnalyticsApi",
41
+ "FEDERATED_ANALYTICS_CONNECTOR_MANIFEST",
42
+ "FEDERATED_ANALYTICS_ERROR_CODES"
43
+ ],
44
+ "requiredTypeExports": [
45
+ "FederatedAnalyticsConnection",
46
+ "FederatedAnalyticsAuthorizerOptions",
47
+ "FederatedSiteSummary"
48
+ ],
49
+ "versionDiscoveryCommand": "npm view @iann29/rastro@alpha version",
50
+ "inspectionPolicy": "static-tarball-inspection-no-lifecycle-scripts",
51
+ "agentActionWhenUnavailable": "stop-and-request-eligible-release"
52
+ },
53
+ "connector": {
54
+ "protocol": "amage-rastro-analytics",
55
+ "protocolVersion": 1,
56
+ "moduleName": "rastroFederation",
57
+ "functions": {
58
+ "manifest": "manifest",
59
+ "connectionStatus": "connectionStatus",
60
+ "listSites": "listSites",
61
+ "overview": "overview",
62
+ "liveVisitors": "liveVisitors",
63
+ "listSessions": "listSessions",
64
+ "sessionJourney": "sessionJourney",
65
+ "listConversions": "listConversions",
66
+ "visitorJourney": "visitorJourney",
67
+ "goalsReport": "goalsReport",
68
+ "funnelsReport": "funnelsReport",
69
+ "affiliatesReport": "affiliatesReport",
70
+ "dataCoverage": "dataCoverage",
71
+ "vitalsReport": "vitalsReport",
72
+ "siteMap": "siteMap"
73
+ },
74
+ "capabilities": [
75
+ "siteSummaries",
76
+ "overview",
77
+ "liveVisitors",
78
+ "sessions",
79
+ "sessionJourney",
80
+ "conversions",
81
+ "visitorJourney",
82
+ "goals",
83
+ "funnels",
84
+ "affiliates",
85
+ "dataCoverage",
86
+ "vitals",
87
+ "siteMap"
88
+ ],
89
+ "limits": {
90
+ "maxSitesPerRequest": 10,
91
+ "maxSitesPerConnection": 10,
92
+ "maxReportRangeDays": 366,
93
+ "maxLiveVisitors": 500,
94
+ "maxJourneyEvents": 500
95
+ }
96
+ },
97
+ "authentication": {
98
+ "providerType": "customJwt",
99
+ "audience": "exact-normalized-customer-functions-url",
100
+ "permission": "analytics:read",
101
+ "claims": {
102
+ "connectionId": "rastro_connection_id",
103
+ "organizationId": "rastro_organization_id",
104
+ "permissions": "rastro_permissions"
105
+ },
106
+ "authoritativeScope": "customer-deployment-local-grant"
107
+ },
108
+ "querySemantics": {
109
+ "timeUnit": "unix-epoch-milliseconds",
110
+ "rangeBoundary": "inclusive",
111
+ "rangeTimezone": "UTC",
112
+ "overview": {
113
+ "hourlyMaxRangeHours": 24,
114
+ "dailyMaxRangeDays": 366,
115
+ "requiresCompleteUtcBuckets": true
116
+ },
117
+ "funnelsReport": {
118
+ "maxRangeDays": 90,
119
+ "requiresCompleteUtcDays": true
120
+ },
121
+ "affiliatesReport": {
122
+ "maxRangeDays": 366,
123
+ "requiresCompleteUtcDays": true
124
+ },
125
+ "journeysIncludeCustomProperties": true,
126
+ "featureReportsIncludeReadOnlyDefinitions": true
127
+ },
128
+ "integration": {
129
+ "mode": "customer-data-plane-central-control-plane",
130
+ "telemetryPath": "browser-tracker-to-customer-http-actions",
131
+ "dashboardReadPath": "browser-to-customer-functions",
132
+ "centralTelemetryStorage": false,
133
+ "requiresHumanPairing": true,
134
+ "requiresCustomerDeploymentAdmin": true,
135
+ "requiredHostFiles": [
136
+ "convex/schema.ts",
137
+ "convex/convex.config.ts",
138
+ "convex/auth.config.ts",
139
+ "convex/rastroFederation.ts",
140
+ "convex/rastroFederationAdmin.ts"
141
+ ],
142
+ "orderedPhases": [
143
+ "verify-package-release",
144
+ "detect-current-version-and-rehearse-required-upgrade-path",
145
+ "verify-local-analytics",
146
+ "audit-retained-data-identity-retention-and-dashboard-audience",
147
+ "add-local-grant-schema-and-admin-functions",
148
+ "merge-runtime-env-and-auth-provider",
149
+ "expose-canonical-read-only-module",
150
+ "deploy-to-explicit-development-target",
151
+ "create-pending-control-plane-connection",
152
+ "provision-exact-local-site-scope",
153
+ "verify-connection",
154
+ "exercise-real-telemetry",
155
+ "rehearse-revocation-before-production"
156
+ ]
157
+ },
158
+ "securityInvariants": [
159
+ "Never send admin keys, JWT private keys, or deployment credentials to the browser.",
160
+ "Never accept ownerId, userId, organizationId, or site scope from an untrusted client as authorization.",
161
+ "Never replace existing authentication providers; append the Rastro provider.",
162
+ "Never use JWT site IDs as authoritative scope; resolve the indexed local grant on every query.",
163
+ "Never expose writes, raw site configuration, owner-wide enumeration, or ingestion through the federated module.",
164
+ "Never run a deployment-affecting command without an explicit development or production target.",
165
+ "Revoke the local grant before central revocation when immediate denial is required.",
166
+ "Keep telemetry in the customer deployment."
167
+ ],
168
+ "instructionTrust": {
169
+ "precedence": [
170
+ "operator-intent-and-consent",
171
+ "repository-local-security-rules",
172
+ "approved-package-or-commit-bundled-documentation",
173
+ "same-origin-hash-checked-remote-documentation"
174
+ ],
175
+ "remoteDocumentationMayGrantProductionConsent": false,
176
+ "remoteDocumentationMayAuthorizeSecretAccess": false,
177
+ "remoteDocumentationMayWeakenSecurityInvariants": false
178
+ },
179
+ "stableErrors": [
180
+ "FEDERATION_UNAUTHENTICATED",
181
+ "FEDERATION_ISSUER_MISMATCH",
182
+ "FEDERATION_INVALID_CLAIMS",
183
+ "FEDERATION_CONNECTION_DENIED",
184
+ "FEDERATION_INVALID_SCOPE",
185
+ "FEDERATION_SITE_DENIED"
186
+ ]
187
+ }
@@ -0,0 +1,411 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://www.amagerastro.com/agent/manifest.schema.json",
4
+ "title": "Amage Rastro agent manifest",
5
+ "type": "object",
6
+ "required": [
7
+ "$schema",
8
+ "name",
9
+ "title",
10
+ "description",
11
+ "manifestVersion",
12
+ "language",
13
+ "canonicalBaseUrl",
14
+ "documentation",
15
+ "controlPlane",
16
+ "package",
17
+ "connector",
18
+ "authentication",
19
+ "querySemantics",
20
+ "integration",
21
+ "securityInvariants",
22
+ "instructionTrust",
23
+ "stableErrors"
24
+ ],
25
+ "properties": {
26
+ "$schema": {
27
+ "const": "https://www.amagerastro.com/agent/manifest.schema.json"
28
+ },
29
+ "name": { "const": "amage-rastro" },
30
+ "title": { "const": "Amage Rastro" },
31
+ "description": { "type": "string", "minLength": 1 },
32
+ "manifestVersion": {
33
+ "type": "string",
34
+ "pattern": "^[1-9][0-9]*\\.[0-9]+\\.[0-9]+$"
35
+ },
36
+ "language": { "enum": ["en", "pt-BR"] },
37
+ "canonicalBaseUrl": { "$ref": "#/$defs/httpsUrl" },
38
+ "documentation": {
39
+ "type": "object",
40
+ "required": [
41
+ "human",
42
+ "agent",
43
+ "llms",
44
+ "protocol",
45
+ "setup",
46
+ "upgrading",
47
+ "integrity"
48
+ ],
49
+ "properties": {
50
+ "human": { "$ref": "#/$defs/httpsUrl" },
51
+ "agent": { "$ref": "#/$defs/httpsUrl" },
52
+ "llms": { "$ref": "#/$defs/httpsUrl" },
53
+ "protocol": { "$ref": "#/$defs/httpsUrl" },
54
+ "setup": { "$ref": "#/$defs/httpsUrl" },
55
+ "upgrading": { "$ref": "#/$defs/httpsUrl" },
56
+ "integrity": {
57
+ "type": "object",
58
+ "required": [
59
+ "algorithm",
60
+ "agent",
61
+ "llms",
62
+ "protocol",
63
+ "setup",
64
+ "upgrading"
65
+ ],
66
+ "properties": {
67
+ "algorithm": { "const": "sha256" },
68
+ "agent": { "$ref": "#/$defs/sha256" },
69
+ "llms": { "$ref": "#/$defs/sha256" },
70
+ "protocol": { "$ref": "#/$defs/sha256" },
71
+ "setup": { "$ref": "#/$defs/sha256" },
72
+ "upgrading": { "$ref": "#/$defs/sha256" }
73
+ },
74
+ "additionalProperties": false
75
+ }
76
+ },
77
+ "additionalProperties": false
78
+ },
79
+ "controlPlane": {
80
+ "type": "object",
81
+ "required": [
82
+ "dashboardUrl",
83
+ "functionsUrl",
84
+ "httpActionsUrl",
85
+ "issuer",
86
+ "discoveryUrl",
87
+ "jwksUrl",
88
+ "tokenAlgorithm",
89
+ "tokenLifetimeSeconds"
90
+ ],
91
+ "properties": {
92
+ "dashboardUrl": { "$ref": "#/$defs/httpsUrl" },
93
+ "functionsUrl": { "$ref": "#/$defs/httpsUrl" },
94
+ "httpActionsUrl": { "$ref": "#/$defs/httpsUrl" },
95
+ "issuer": { "$ref": "#/$defs/httpsUrl" },
96
+ "discoveryUrl": { "$ref": "#/$defs/httpsUrl" },
97
+ "jwksUrl": { "$ref": "#/$defs/httpsUrl" },
98
+ "tokenAlgorithm": { "const": "RS256" },
99
+ "tokenLifetimeSeconds": { "const": 600 }
100
+ },
101
+ "additionalProperties": false
102
+ },
103
+ "package": {
104
+ "type": "object",
105
+ "required": [
106
+ "name",
107
+ "distTag",
108
+ "availability",
109
+ "requiredRuntimeExports",
110
+ "requiredTypeExports",
111
+ "versionDiscoveryCommand",
112
+ "inspectionPolicy",
113
+ "agentActionWhenUnavailable"
114
+ ],
115
+ "properties": {
116
+ "name": { "const": "@iann29/rastro" },
117
+ "distTag": { "const": "alpha" },
118
+ "availability": { "const": "verify-exact-registry-artifact" },
119
+ "requiredRuntimeExports": {
120
+ "type": "array",
121
+ "minItems": 3,
122
+ "uniqueItems": true,
123
+ "items": { "type": "string", "minLength": 1 }
124
+ },
125
+ "requiredTypeExports": {
126
+ "type": "array",
127
+ "minItems": 3,
128
+ "uniqueItems": true,
129
+ "items": { "type": "string", "minLength": 1 }
130
+ },
131
+ "versionDiscoveryCommand": { "type": "string", "minLength": 1 },
132
+ "inspectionPolicy": {
133
+ "const": "static-tarball-inspection-no-lifecycle-scripts"
134
+ },
135
+ "agentActionWhenUnavailable": {
136
+ "const": "stop-and-request-eligible-release"
137
+ }
138
+ },
139
+ "additionalProperties": false
140
+ },
141
+ "connector": {
142
+ "type": "object",
143
+ "required": [
144
+ "protocol",
145
+ "protocolVersion",
146
+ "moduleName",
147
+ "functions",
148
+ "capabilities",
149
+ "limits"
150
+ ],
151
+ "properties": {
152
+ "protocol": { "const": "amage-rastro-analytics" },
153
+ "protocolVersion": { "const": 1 },
154
+ "moduleName": { "const": "rastroFederation" },
155
+ "functions": {
156
+ "type": "object",
157
+ "required": [
158
+ "manifest",
159
+ "connectionStatus",
160
+ "listSites",
161
+ "overview",
162
+ "liveVisitors",
163
+ "listSessions",
164
+ "sessionJourney",
165
+ "listConversions",
166
+ "visitorJourney",
167
+ "goalsReport",
168
+ "funnelsReport",
169
+ "affiliatesReport",
170
+ "dataCoverage",
171
+ "vitalsReport",
172
+ "siteMap"
173
+ ],
174
+ "properties": {
175
+ "manifest": { "const": "manifest" },
176
+ "connectionStatus": { "const": "connectionStatus" },
177
+ "listSites": { "const": "listSites" },
178
+ "overview": { "const": "overview" },
179
+ "liveVisitors": { "const": "liveVisitors" },
180
+ "listSessions": { "const": "listSessions" },
181
+ "sessionJourney": { "const": "sessionJourney" },
182
+ "listConversions": { "const": "listConversions" },
183
+ "visitorJourney": { "const": "visitorJourney" },
184
+ "goalsReport": { "const": "goalsReport" },
185
+ "funnelsReport": { "const": "funnelsReport" },
186
+ "affiliatesReport": { "const": "affiliatesReport" },
187
+ "dataCoverage": { "const": "dataCoverage" },
188
+ "vitalsReport": { "const": "vitalsReport" },
189
+ "siteMap": { "const": "siteMap" }
190
+ },
191
+ "additionalProperties": false
192
+ },
193
+ "capabilities": {
194
+ "type": "array",
195
+ "minItems": 13,
196
+ "maxItems": 13,
197
+ "uniqueItems": true,
198
+ "items": {
199
+ "enum": [
200
+ "siteSummaries",
201
+ "overview",
202
+ "liveVisitors",
203
+ "sessions",
204
+ "sessionJourney",
205
+ "conversions",
206
+ "visitorJourney",
207
+ "goals",
208
+ "funnels",
209
+ "affiliates",
210
+ "dataCoverage",
211
+ "vitals",
212
+ "siteMap"
213
+ ]
214
+ }
215
+ },
216
+ "limits": {
217
+ "type": "object",
218
+ "required": [
219
+ "maxSitesPerRequest",
220
+ "maxSitesPerConnection",
221
+ "maxReportRangeDays",
222
+ "maxLiveVisitors",
223
+ "maxJourneyEvents"
224
+ ],
225
+ "properties": {
226
+ "maxSitesPerRequest": { "const": 10 },
227
+ "maxSitesPerConnection": { "const": 10 },
228
+ "maxReportRangeDays": { "const": 366 },
229
+ "maxLiveVisitors": { "const": 500 },
230
+ "maxJourneyEvents": { "const": 500 }
231
+ },
232
+ "additionalProperties": false
233
+ }
234
+ },
235
+ "additionalProperties": false
236
+ },
237
+ "authentication": {
238
+ "type": "object",
239
+ "required": [
240
+ "providerType",
241
+ "audience",
242
+ "permission",
243
+ "claims",
244
+ "authoritativeScope"
245
+ ],
246
+ "properties": {
247
+ "providerType": { "const": "customJwt" },
248
+ "audience": { "const": "exact-normalized-customer-functions-url" },
249
+ "permission": { "const": "analytics:read" },
250
+ "claims": {
251
+ "type": "object",
252
+ "required": ["connectionId", "organizationId", "permissions"],
253
+ "properties": {
254
+ "connectionId": { "const": "rastro_connection_id" },
255
+ "organizationId": { "const": "rastro_organization_id" },
256
+ "permissions": { "const": "rastro_permissions" }
257
+ },
258
+ "additionalProperties": false
259
+ },
260
+ "authoritativeScope": { "const": "customer-deployment-local-grant" }
261
+ },
262
+ "additionalProperties": false
263
+ },
264
+ "querySemantics": {
265
+ "type": "object",
266
+ "required": [
267
+ "timeUnit",
268
+ "rangeBoundary",
269
+ "rangeTimezone",
270
+ "overview",
271
+ "funnelsReport",
272
+ "affiliatesReport",
273
+ "journeysIncludeCustomProperties",
274
+ "featureReportsIncludeReadOnlyDefinitions"
275
+ ],
276
+ "properties": {
277
+ "timeUnit": { "const": "unix-epoch-milliseconds" },
278
+ "rangeBoundary": { "const": "inclusive" },
279
+ "rangeTimezone": { "const": "UTC" },
280
+ "overview": {
281
+ "type": "object",
282
+ "required": [
283
+ "hourlyMaxRangeHours",
284
+ "dailyMaxRangeDays",
285
+ "requiresCompleteUtcBuckets"
286
+ ],
287
+ "properties": {
288
+ "hourlyMaxRangeHours": { "const": 24 },
289
+ "dailyMaxRangeDays": { "const": 366 },
290
+ "requiresCompleteUtcBuckets": { "const": true }
291
+ },
292
+ "additionalProperties": false
293
+ },
294
+ "funnelsReport": {
295
+ "allOf": [
296
+ { "$ref": "#/$defs/completeDayRange" },
297
+ {
298
+ "type": "object",
299
+ "properties": { "maxRangeDays": { "const": 90 } }
300
+ }
301
+ ]
302
+ },
303
+ "affiliatesReport": {
304
+ "allOf": [
305
+ { "$ref": "#/$defs/completeDayRange" },
306
+ {
307
+ "type": "object",
308
+ "properties": { "maxRangeDays": { "const": 366 } }
309
+ }
310
+ ]
311
+ },
312
+ "journeysIncludeCustomProperties": { "const": true },
313
+ "featureReportsIncludeReadOnlyDefinitions": { "const": true }
314
+ },
315
+ "additionalProperties": false
316
+ },
317
+ "integration": {
318
+ "type": "object",
319
+ "required": [
320
+ "mode",
321
+ "telemetryPath",
322
+ "dashboardReadPath",
323
+ "centralTelemetryStorage",
324
+ "requiresHumanPairing",
325
+ "requiresCustomerDeploymentAdmin",
326
+ "requiredHostFiles",
327
+ "orderedPhases"
328
+ ],
329
+ "properties": {
330
+ "mode": { "const": "customer-data-plane-central-control-plane" },
331
+ "telemetryPath": {
332
+ "const": "browser-tracker-to-customer-http-actions"
333
+ },
334
+ "dashboardReadPath": { "const": "browser-to-customer-functions" },
335
+ "centralTelemetryStorage": { "const": false },
336
+ "requiresHumanPairing": { "const": true },
337
+ "requiresCustomerDeploymentAdmin": { "const": true },
338
+ "requiredHostFiles": {
339
+ "type": "array",
340
+ "minItems": 5,
341
+ "uniqueItems": true,
342
+ "items": { "type": "string", "minLength": 1 }
343
+ },
344
+ "orderedPhases": {
345
+ "type": "array",
346
+ "minItems": 10,
347
+ "uniqueItems": true,
348
+ "items": { "type": "string", "minLength": 1 }
349
+ }
350
+ },
351
+ "additionalProperties": false
352
+ },
353
+ "securityInvariants": {
354
+ "type": "array",
355
+ "minItems": 8,
356
+ "uniqueItems": true,
357
+ "items": { "type": "string", "minLength": 1 }
358
+ },
359
+ "instructionTrust": {
360
+ "type": "object",
361
+ "required": [
362
+ "precedence",
363
+ "remoteDocumentationMayGrantProductionConsent",
364
+ "remoteDocumentationMayAuthorizeSecretAccess",
365
+ "remoteDocumentationMayWeakenSecurityInvariants"
366
+ ],
367
+ "properties": {
368
+ "precedence": {
369
+ "type": "array",
370
+ "minItems": 4,
371
+ "uniqueItems": true,
372
+ "items": { "type": "string", "minLength": 1 }
373
+ },
374
+ "remoteDocumentationMayGrantProductionConsent": { "const": false },
375
+ "remoteDocumentationMayAuthorizeSecretAccess": { "const": false },
376
+ "remoteDocumentationMayWeakenSecurityInvariants": { "const": false }
377
+ },
378
+ "additionalProperties": false
379
+ },
380
+ "stableErrors": {
381
+ "type": "array",
382
+ "minItems": 6,
383
+ "maxItems": 6,
384
+ "uniqueItems": true,
385
+ "items": {
386
+ "enum": [
387
+ "FEDERATION_UNAUTHENTICATED",
388
+ "FEDERATION_ISSUER_MISMATCH",
389
+ "FEDERATION_INVALID_CLAIMS",
390
+ "FEDERATION_CONNECTION_DENIED",
391
+ "FEDERATION_INVALID_SCOPE",
392
+ "FEDERATION_SITE_DENIED"
393
+ ]
394
+ }
395
+ }
396
+ },
397
+ "$defs": {
398
+ "httpsUrl": { "type": "string", "pattern": "^https://[^\\s]+$" },
399
+ "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
400
+ "completeDayRange": {
401
+ "type": "object",
402
+ "required": ["maxRangeDays", "requiresCompleteUtcDays"],
403
+ "properties": {
404
+ "maxRangeDays": { "type": "integer", "minimum": 1, "maximum": 366 },
405
+ "requiresCompleteUtcDays": { "const": true }
406
+ },
407
+ "additionalProperties": false
408
+ }
409
+ },
410
+ "additionalProperties": false
411
+ }