@plasius/mcp-admin-contracts 0.4.0 → 0.5.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.
- package/CHANGELOG.md +41 -0
- package/README.md +65 -0
- package/dist/index.cjs +1105 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +73 -7
- package/dist/index.d.ts +73 -7
- package/dist/index.js +1107 -4
- package/dist/index.js.map +1 -1
- package/docs/adrs/adr-0005-privacy-safe-read-only-feedback-contract.md +100 -0
- package/docs/adrs/index.md +1 -0
- package/package.json +7 -3
package/dist/index.js
CHANGED
|
@@ -1,7 +1,30 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import {
|
|
3
|
+
FEEDBACK_BACKEND_BUCKETS,
|
|
4
|
+
FEEDBACK_CONTRACT_VERSION,
|
|
5
|
+
FEEDBACK_FRAME_RATE_BUCKETS,
|
|
6
|
+
FEEDBACK_FRAME_TIME_BUCKETS,
|
|
7
|
+
FEEDBACK_GAME_COUNTER_CODES,
|
|
8
|
+
FEEDBACK_GAME_ERROR_CODES,
|
|
9
|
+
FEEDBACK_GAME_FEATURE_IDS,
|
|
10
|
+
FEEDBACK_INTENT_IDS,
|
|
11
|
+
FEEDBACK_PERSISTABLE_ISSUE_TYPES,
|
|
12
|
+
FEEDBACK_RENDERER_BUCKETS,
|
|
13
|
+
FEEDBACK_SENTIMENT_BUCKETS,
|
|
14
|
+
FEEDBACK_SURFACE_IDS,
|
|
15
|
+
FEEDBACK_THEME_IDS,
|
|
16
|
+
FEEDBACK_VIEWPORT_BUCKETS,
|
|
17
|
+
FeedbackBugPacketSchema,
|
|
18
|
+
FeedbackDailySatisfactionReportSchema,
|
|
19
|
+
FeedbackHourlyBugReportSchema,
|
|
20
|
+
FeedbackProcessorCheckpointSchema,
|
|
21
|
+
FeedbackReviewPacketSchema
|
|
22
|
+
} from "@plasius/schema";
|
|
23
|
+
|
|
1
24
|
// src/translations/en-GB.ts
|
|
2
25
|
var mcpAdminContractsEnGbTranslations = {
|
|
3
|
-
"mcpAdminContracts.manifest.descriptionForModel": "OAuth-protected MCP discovery manifest for the Plasius admin control plane covering feature flags, capabilities, analytics, pseudonymous Token finance reads, and audit-backed operations.",
|
|
4
|
-
"mcpAdminContracts.manifest.description": "Authenticated admin MCP discovery for the Plasius feature flag, capability, analytics, pseudonymous Token reporting, and audit control plane.",
|
|
26
|
+
"mcpAdminContracts.manifest.descriptionForModel": "OAuth-protected MCP discovery manifest for the Plasius admin control plane covering feature flags, capabilities, analytics, privacy-safe feedback intelligence, pseudonymous Token finance reads, and audit-backed operations.",
|
|
27
|
+
"mcpAdminContracts.manifest.description": "Authenticated admin MCP discovery for the Plasius feature flag, capability, analytics, privacy-safe feedback intelligence, pseudonymous Token reporting, and audit control plane.",
|
|
5
28
|
"mcpAdminContracts.action.listFeatureFlags.description": "List existing feature flags from the admin rollout control plane.",
|
|
6
29
|
"mcpAdminContracts.action.getFeatureFlag.description": "Fetch one feature flag by stable key.",
|
|
7
30
|
"mcpAdminContracts.action.updateFeatureFlag.description": "Patch an existing feature flag without bypassing the current admin update semantics.",
|
|
@@ -25,6 +48,11 @@ var mcpAdminContractsEnGbTranslations = {
|
|
|
25
48
|
"mcpAdminContracts.action.getAdminTokenEconomyOverview.description": "Read the identifier-free global Token balance, lifetime totals, wallet counts, and authoritative projection freshness.",
|
|
26
49
|
"mcpAdminContracts.action.listAdminTokenWalletBalances.description": "List bounded pseudonymous Token wallet balances without exposing account, payment, provider, or raw wallet identifiers.",
|
|
27
50
|
"mcpAdminContracts.action.getAdminTokenTrends.description": "Read privacy-suppressed Token acquisition and usage trends with explainable advisory anomaly indicators.",
|
|
51
|
+
"mcpAdminContracts.action.getFeedbackBugHealth.description": "Read a bounded immutable hourly bug-health materialisation.",
|
|
52
|
+
"mcpAdminContracts.action.getFeedbackSatisfaction.description": "Read a bounded immutable daily satisfaction materialisation.",
|
|
53
|
+
"mcpAdminContracts.action.listFeedbackAlerts.description": "List bounded deterministic feedback advisories using an opaque cursor.",
|
|
54
|
+
"mcpAdminContracts.action.getFeedbackFreshness.description": "Read safe freshness metadata for the hourly bug and daily satisfaction processors.",
|
|
55
|
+
"mcpAdminContracts.action.listFeedbackStructuredEntries.description": "List bounded reporter-identifier-free structured feedback entries without narrative or storage references.",
|
|
28
56
|
"mcpAdminContracts.action.searchAssetCatalog.description": "Search promoted asset catalog records without live third-party lookup.",
|
|
29
57
|
"mcpAdminContracts.action.getAssetManifest.description": "Fetch a promoted player-safe runtime asset manifest reference.",
|
|
30
58
|
"mcpAdminContracts.action.requestAsset.description": "Queue a governed missing-asset request when no promoted catalog match exists.",
|
|
@@ -82,6 +110,11 @@ var mcpAdminContractDescriptionKeys = {
|
|
|
82
110
|
actionGetAdminTokenEconomyOverview: "mcpAdminContracts.action.getAdminTokenEconomyOverview.description",
|
|
83
111
|
actionListAdminTokenWalletBalances: "mcpAdminContracts.action.listAdminTokenWalletBalances.description",
|
|
84
112
|
actionGetAdminTokenTrends: "mcpAdminContracts.action.getAdminTokenTrends.description",
|
|
113
|
+
actionGetFeedbackBugHealth: "mcpAdminContracts.action.getFeedbackBugHealth.description",
|
|
114
|
+
actionGetFeedbackSatisfaction: "mcpAdminContracts.action.getFeedbackSatisfaction.description",
|
|
115
|
+
actionListFeedbackAlerts: "mcpAdminContracts.action.listFeedbackAlerts.description",
|
|
116
|
+
actionGetFeedbackFreshness: "mcpAdminContracts.action.getFeedbackFreshness.description",
|
|
117
|
+
actionListFeedbackStructuredEntries: "mcpAdminContracts.action.listFeedbackStructuredEntries.description",
|
|
85
118
|
actionSearchAssetCatalog: "mcpAdminContracts.action.searchAssetCatalog.description",
|
|
86
119
|
actionGetAssetManifest: "mcpAdminContracts.action.getAssetManifest.description",
|
|
87
120
|
actionRequestAsset: "mcpAdminContracts.action.requestAsset.description",
|
|
@@ -119,7 +152,7 @@ function getMcpAdminContractDefaultTranslation(key) {
|
|
|
119
152
|
}
|
|
120
153
|
|
|
121
154
|
// src/index.ts
|
|
122
|
-
var MCP_ADMIN_CONTRACT_VERSION = "2026-08-
|
|
155
|
+
var MCP_ADMIN_CONTRACT_VERSION = "2026-08-11.v6";
|
|
123
156
|
var MCP_ADMIN_REGISTRY_SOURCE = "@plasius/mcp-admin-contracts";
|
|
124
157
|
var MCP_ADMIN_FOUNDATION_FLAG_ID = "mcp.admin.foundation.enabled";
|
|
125
158
|
var MCP_ACCESS_SCOPE = "mcp:access";
|
|
@@ -139,11 +172,90 @@ var MCP_ASSET_CATALOG_REQUEST_CAPABILITY = "asset.catalog.request";
|
|
|
139
172
|
var MCP_ASSET_PIPELINE_MANAGE_CAPABILITY = "asset.pipeline.mcp.manage";
|
|
140
173
|
var MCP_ASSET_SOURCE_MANAGE_CAPABILITY = "asset.source.manage";
|
|
141
174
|
var MCP_ASSET_CATALOG_REVIEW_CAPABILITY = "asset.catalog.review";
|
|
175
|
+
var MCP_ADMIN_FEEDBACK_FLAG_ID = "feedback.mcp.enabled";
|
|
176
|
+
var MCP_ADMIN_FEEDBACK_READ_CAPABILITY = "admin.feedback.read";
|
|
177
|
+
var MCP_ADMIN_BASE_OAUTH_SCOPE = MCP_ACCESS_SCOPE;
|
|
178
|
+
var MCP_ADMIN_FEEDBACK_READ_OAUTH_SCOPE = MCP_ADMIN_FEEDBACK_READ_CAPABILITY;
|
|
179
|
+
var MCP_ADMIN_FEEDBACK_REQUIRED_OAUTH_SCOPES = Object.freeze([
|
|
180
|
+
MCP_ADMIN_BASE_OAUTH_SCOPE,
|
|
181
|
+
MCP_ADMIN_FEEDBACK_READ_OAUTH_SCOPE
|
|
182
|
+
]);
|
|
183
|
+
var MCP_ADMIN_FEEDBACK_SCHEMA_PACKAGE = "@plasius/schema";
|
|
184
|
+
var MCP_ADMIN_FEEDBACK_SCHEMA_CONTRACT_VERSION = FEEDBACK_CONTRACT_VERSION;
|
|
185
|
+
var MCP_ADMIN_FEEDBACK_WINDOWS = [
|
|
186
|
+
"previous-utc-hour",
|
|
187
|
+
"last-24-hours",
|
|
188
|
+
"last-7-days",
|
|
189
|
+
"last-30-days",
|
|
190
|
+
"last-90-days"
|
|
191
|
+
];
|
|
192
|
+
var MCP_ADMIN_FEEDBACK_PACKET_TYPES = [
|
|
193
|
+
"feedback-bug-packet",
|
|
194
|
+
"feedback-review-packet"
|
|
195
|
+
];
|
|
196
|
+
var MCP_ADMIN_FEEDBACK_REPORT_TYPES = [
|
|
197
|
+
"feedback-hourly-bug-report",
|
|
198
|
+
"feedback-daily-satisfaction-report"
|
|
199
|
+
];
|
|
200
|
+
var MCP_ADMIN_FEEDBACK_PROCESSORS = [
|
|
201
|
+
"bug-hourly",
|
|
202
|
+
"review-daily",
|
|
203
|
+
"commit-reconciliation"
|
|
204
|
+
];
|
|
205
|
+
var MCP_ADMIN_FEEDBACK_PRIVACY_EXCLUSIONS = [
|
|
206
|
+
"account-identifiers",
|
|
207
|
+
"reporter-pseudonyms",
|
|
208
|
+
"network-identifiers",
|
|
209
|
+
"session-identifiers",
|
|
210
|
+
"user-agents",
|
|
211
|
+
"locales",
|
|
212
|
+
"client-timestamps",
|
|
213
|
+
"referrers",
|
|
214
|
+
"credential-material",
|
|
215
|
+
"financial-identifiers",
|
|
216
|
+
"government-identifiers",
|
|
217
|
+
"narrative",
|
|
218
|
+
"generated-summaries",
|
|
219
|
+
"quotations",
|
|
220
|
+
"embeddings",
|
|
221
|
+
"content-hashes",
|
|
222
|
+
"matched-values",
|
|
223
|
+
"model-traces",
|
|
224
|
+
"binary-images",
|
|
225
|
+
"filenames",
|
|
226
|
+
"exact-coordinates",
|
|
227
|
+
"exact-dimensions",
|
|
228
|
+
"adapter-fingerprints",
|
|
229
|
+
"raw-warnings",
|
|
230
|
+
"blob-references",
|
|
231
|
+
"raw-urls",
|
|
232
|
+
"unrestricted-scans",
|
|
233
|
+
"mutations"
|
|
234
|
+
];
|
|
142
235
|
var MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID = "mcp.admin-economy-adjustments.enabled";
|
|
143
236
|
var ECONOMY_OWNER_ADJUSTMENTS_FLAG_ID = "economy.tokens.owner-adjustments.enabled";
|
|
144
237
|
var MCP_ECONOMY_FINANCE_VIEW_CAPABILITY = "economy.finance-operations.view";
|
|
145
238
|
var MCP_ECONOMY_FINANCE_ADJUST_CAPABILITY = "economy.finance-operations.adjust";
|
|
146
239
|
var MCP_ECONOMY_FINANCE_APPROVE_CAPABILITY = "economy.finance-operations.approve-adjustment";
|
|
240
|
+
var canonicalFeedbackSchemas = Object.freeze({
|
|
241
|
+
FeedbackBugPacketSchema,
|
|
242
|
+
FeedbackReviewPacketSchema,
|
|
243
|
+
FeedbackHourlyBugReportSchema,
|
|
244
|
+
FeedbackDailySatisfactionReportSchema,
|
|
245
|
+
FeedbackProcessorCheckpointSchema
|
|
246
|
+
});
|
|
247
|
+
var feedbackSchemaSource = (...schemaNames) => {
|
|
248
|
+
for (const schemaName of schemaNames) {
|
|
249
|
+
if (canonicalFeedbackSchemas[schemaName].meta.version !== MCP_ADMIN_FEEDBACK_SCHEMA_CONTRACT_VERSION) {
|
|
250
|
+
throw new TypeError("Canonical feedback schema version mismatch.");
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return {
|
|
254
|
+
packageName: MCP_ADMIN_FEEDBACK_SCHEMA_PACKAGE,
|
|
255
|
+
contractVersion: MCP_ADMIN_FEEDBACK_SCHEMA_CONTRACT_VERSION,
|
|
256
|
+
schemaNames: [...schemaNames]
|
|
257
|
+
};
|
|
258
|
+
};
|
|
147
259
|
var stringField = (description, options = {}) => ({
|
|
148
260
|
type: "string",
|
|
149
261
|
description,
|
|
@@ -159,18 +271,41 @@ var numberField = (description, options = {}) => ({
|
|
|
159
271
|
description,
|
|
160
272
|
...options
|
|
161
273
|
});
|
|
274
|
+
var integerField = (description, options = {}) => ({
|
|
275
|
+
type: "integer",
|
|
276
|
+
description,
|
|
277
|
+
...options
|
|
278
|
+
});
|
|
162
279
|
var objectField = (description, properties, options = {}) => ({
|
|
163
280
|
type: "object",
|
|
164
281
|
description,
|
|
165
282
|
properties,
|
|
166
283
|
...options
|
|
167
284
|
});
|
|
285
|
+
var feedbackClosedObjectField = (description, properties, options = {}) => objectField(description, properties, {
|
|
286
|
+
...options,
|
|
287
|
+
additionalProperties: false
|
|
288
|
+
});
|
|
168
289
|
var arrayField = (description, itemType, options = {}) => ({
|
|
169
290
|
type: "array",
|
|
170
291
|
description,
|
|
171
292
|
itemType,
|
|
172
293
|
...options
|
|
173
294
|
});
|
|
295
|
+
var arrayOfField = (description, itemType, items, options = {}) => ({
|
|
296
|
+
type: "array",
|
|
297
|
+
description,
|
|
298
|
+
itemType,
|
|
299
|
+
items,
|
|
300
|
+
...options
|
|
301
|
+
});
|
|
302
|
+
var discriminatedUnionField = (description, discriminator, variants, options = {}) => ({
|
|
303
|
+
type: "discriminated-union",
|
|
304
|
+
description,
|
|
305
|
+
discriminator,
|
|
306
|
+
oneOf: variants,
|
|
307
|
+
...options
|
|
308
|
+
});
|
|
174
309
|
var translatedDescription = (descriptionKey) => {
|
|
175
310
|
const descriptionDefault = getMcpAdminContractDefaultTranslation(descriptionKey);
|
|
176
311
|
return {
|
|
@@ -663,6 +798,940 @@ var adminTokenTrendPointField = objectField(
|
|
|
663
798
|
anomaly: adminTokenAnomalyField
|
|
664
799
|
}
|
|
665
800
|
);
|
|
801
|
+
var MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE = 100;
|
|
802
|
+
var MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH = 512;
|
|
803
|
+
var MCP_ADMIN_FEEDBACK_BUG_HEALTH_WINDOWS = [
|
|
804
|
+
"previous-utc-hour",
|
|
805
|
+
"last-24-hours",
|
|
806
|
+
"last-7-days"
|
|
807
|
+
];
|
|
808
|
+
var MCP_ADMIN_FEEDBACK_SATISFACTION_WINDOWS = [
|
|
809
|
+
"last-7-days",
|
|
810
|
+
"last-30-days",
|
|
811
|
+
"last-90-days"
|
|
812
|
+
];
|
|
813
|
+
var MCP_ADMIN_FEEDBACK_ENTRY_WINDOWS = [
|
|
814
|
+
"last-24-hours",
|
|
815
|
+
"last-7-days",
|
|
816
|
+
"last-30-days",
|
|
817
|
+
"last-90-days"
|
|
818
|
+
];
|
|
819
|
+
var MCP_ADMIN_FEEDBACK_ALERT_WINDOWS = [
|
|
820
|
+
"last-24-hours",
|
|
821
|
+
"last-7-days"
|
|
822
|
+
];
|
|
823
|
+
var MCP_ADMIN_FEEDBACK_PRIVACY_METADATA = Object.freeze({
|
|
824
|
+
classification: "public-safe-structured-only",
|
|
825
|
+
readOnly: true,
|
|
826
|
+
bounded: true,
|
|
827
|
+
excludes: Object.freeze([...MCP_ADMIN_FEEDBACK_PRIVACY_EXCLUSIONS]),
|
|
828
|
+
notes: Object.freeze([
|
|
829
|
+
"Responses contain only schema-validated structured fields and materialised report metadata.",
|
|
830
|
+
"The runtime must enforce admin authentication, `mcp:access` plus `admin.feedback.read`, the rollout flag, bounded cursors and ranges, fail-closed rate limits, and dedicated audit.",
|
|
831
|
+
"Narrative-derived values are closed classifications only; no summaries, quotations, embeddings, hashes, matched values, or model traces are permitted."
|
|
832
|
+
])
|
|
833
|
+
});
|
|
834
|
+
var feedbackReadAccess = {
|
|
835
|
+
oauthScopes: [...MCP_ADMIN_FEEDBACK_REQUIRED_OAUTH_SCOPES],
|
|
836
|
+
capabilities: [MCP_ADMIN_FEEDBACK_READ_CAPABILITY],
|
|
837
|
+
rolloutFlags: [MCP_ADMIN_FEEDBACK_FLAG_ID],
|
|
838
|
+
mode: "read-only",
|
|
839
|
+
identityResolution: "not-available"
|
|
840
|
+
};
|
|
841
|
+
var feedbackPageMetadataField = (allowedWindows) => feedbackClosedObjectField("Bounded read-response metadata.", {
|
|
842
|
+
window: stringField("Closed server-owned response window.", {
|
|
843
|
+
enum: [...allowedWindows]
|
|
844
|
+
}),
|
|
845
|
+
windowStart: stringField("Inclusive UTC response-window boundary.", {
|
|
846
|
+
format: "date-time"
|
|
847
|
+
}),
|
|
848
|
+
windowEnd: stringField("Exclusive UTC response-window boundary.", {
|
|
849
|
+
format: "date-time"
|
|
850
|
+
}),
|
|
851
|
+
generatedAt: stringField("UTC time at which this response projection was produced.", {
|
|
852
|
+
format: "date-time"
|
|
853
|
+
}),
|
|
854
|
+
returnedCount: integerField("Number of records in this bounded page.", {
|
|
855
|
+
minimum: 0,
|
|
856
|
+
maximum: MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE
|
|
857
|
+
}),
|
|
858
|
+
nextCursor: stringField("Opaque continuation cursor when more results exist.", {
|
|
859
|
+
required: false,
|
|
860
|
+
minLength: 1,
|
|
861
|
+
maxLength: MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH,
|
|
862
|
+
pattern: "^[A-Za-z0-9_-]+$"
|
|
863
|
+
})
|
|
864
|
+
});
|
|
865
|
+
var FEEDBACK_SCHEMA_MAX_COUNT = 1e9;
|
|
866
|
+
var FEEDBACK_SCHEMA_UUID_V4_PATTERN = "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$";
|
|
867
|
+
var FEEDBACK_SCHEMA_SAFE_ID_PATTERN = "^[A-Za-z0-9][A-Za-z0-9._:-]*$";
|
|
868
|
+
var FEEDBACK_SCHEMA_SURFACE_IDS = FEEDBACK_SURFACE_IDS;
|
|
869
|
+
var FEEDBACK_SCHEMA_PERSISTABLE_ISSUE_TYPES = FEEDBACK_PERSISTABLE_ISSUE_TYPES;
|
|
870
|
+
var FEEDBACK_SCHEMA_SENTIMENT_BUCKETS = FEEDBACK_SENTIMENT_BUCKETS;
|
|
871
|
+
var FEEDBACK_SCHEMA_INTENT_IDS = FEEDBACK_INTENT_IDS;
|
|
872
|
+
var FEEDBACK_SCHEMA_THEME_IDS = FEEDBACK_THEME_IDS;
|
|
873
|
+
var FEEDBACK_SCHEMA_RENDERER_BUCKETS = FEEDBACK_RENDERER_BUCKETS;
|
|
874
|
+
var FEEDBACK_SCHEMA_BACKEND_BUCKETS = FEEDBACK_BACKEND_BUCKETS;
|
|
875
|
+
var FEEDBACK_SCHEMA_VIEWPORT_BUCKETS = FEEDBACK_VIEWPORT_BUCKETS;
|
|
876
|
+
var FEEDBACK_SCHEMA_FRAME_RATE_BUCKETS = FEEDBACK_FRAME_RATE_BUCKETS;
|
|
877
|
+
var FEEDBACK_SCHEMA_FRAME_TIME_BUCKETS = FEEDBACK_FRAME_TIME_BUCKETS;
|
|
878
|
+
var FEEDBACK_SCHEMA_GAME_FEATURE_IDS = FEEDBACK_GAME_FEATURE_IDS;
|
|
879
|
+
var FEEDBACK_SCHEMA_GAME_COUNTER_CODES = FEEDBACK_GAME_COUNTER_CODES;
|
|
880
|
+
var FEEDBACK_SCHEMA_GAME_ERROR_CODES = FEEDBACK_GAME_ERROR_CODES;
|
|
881
|
+
var requireCanonicalStringEnum = (field) => {
|
|
882
|
+
const values = field?.enumValues;
|
|
883
|
+
if (values === void 0 || values.length === 0 || values.some((value) => typeof value !== "string")) {
|
|
884
|
+
throw new TypeError("Canonical feedback schema enum is unavailable.");
|
|
885
|
+
}
|
|
886
|
+
return Object.freeze([...values]);
|
|
887
|
+
};
|
|
888
|
+
var canonicalHourlyBugShape = FeedbackHourlyBugReportSchema._shape;
|
|
889
|
+
var canonicalAdvisoryShape = canonicalHourlyBugShape.advisories?.itemType?._shape;
|
|
890
|
+
var FEEDBACK_SCHEMA_ADVISORY_CODES = requireCanonicalStringEnum(
|
|
891
|
+
canonicalAdvisoryShape?.code
|
|
892
|
+
);
|
|
893
|
+
var FEEDBACK_SCHEMA_RECOMMENDATION_IDS = requireCanonicalStringEnum(
|
|
894
|
+
canonicalAdvisoryShape?.recommendationIds?.itemType
|
|
895
|
+
);
|
|
896
|
+
var FEEDBACK_SCHEMA_ABUSE_BLOCK_BANDS = requireCanonicalStringEnum(
|
|
897
|
+
canonicalHourlyBugShape.abuseBlockBands?.itemType?._shape?.id
|
|
898
|
+
);
|
|
899
|
+
var canonicalLiteralStringField = (description, value) => stringField(description, {
|
|
900
|
+
enum: [value],
|
|
901
|
+
constValue: value
|
|
902
|
+
});
|
|
903
|
+
var canonicalUuidV4Field = (description) => stringField(description, {
|
|
904
|
+
format: "uuid",
|
|
905
|
+
minLength: 36,
|
|
906
|
+
maxLength: 36,
|
|
907
|
+
pattern: FEEDBACK_SCHEMA_UUID_V4_PATTERN
|
|
908
|
+
});
|
|
909
|
+
var canonicalSafeIdField = (description, maximum = 128) => stringField(description, {
|
|
910
|
+
minLength: 1,
|
|
911
|
+
maxLength: maximum,
|
|
912
|
+
pattern: FEEDBACK_SCHEMA_SAFE_ID_PATTERN
|
|
913
|
+
});
|
|
914
|
+
var canonicalDateTimeField = (description) => stringField(description, {
|
|
915
|
+
format: "date-time"
|
|
916
|
+
});
|
|
917
|
+
var canonicalCountField = (description, options = {}) => integerField(description, {
|
|
918
|
+
minimum: 0,
|
|
919
|
+
maximum: FEEDBACK_SCHEMA_MAX_COUNT,
|
|
920
|
+
...options
|
|
921
|
+
});
|
|
922
|
+
var canonicalSchemaIdentityFields = (type) => ({
|
|
923
|
+
type: canonicalLiteralStringField("Canonical @plasius/schema identity.", type),
|
|
924
|
+
version: canonicalLiteralStringField(
|
|
925
|
+
"Canonical feedback contract version.",
|
|
926
|
+
MCP_ADMIN_FEEDBACK_SCHEMA_CONTRACT_VERSION
|
|
927
|
+
)
|
|
928
|
+
});
|
|
929
|
+
var canonicalStringArrayField = (description, enumValues, maximum, options = {}) => arrayOfField(
|
|
930
|
+
description,
|
|
931
|
+
"string",
|
|
932
|
+
stringField("Closed canonical value.", { enum: [...enumValues] }),
|
|
933
|
+
{ maxItems: maximum, ...options }
|
|
934
|
+
);
|
|
935
|
+
var canonicalAnalyzedProjectionField = feedbackClosedObjectField(
|
|
936
|
+
"Canonical analyzed `FeedbackDerivedAnalysis` projection.",
|
|
937
|
+
{
|
|
938
|
+
...canonicalSchemaIdentityFields("feedback-derived-analysis"),
|
|
939
|
+
status: canonicalLiteralStringField(
|
|
940
|
+
"Canonical analysis status.",
|
|
941
|
+
"analyzed"
|
|
942
|
+
),
|
|
943
|
+
sentiment: stringField("Closed canonical sentiment bucket.", {
|
|
944
|
+
enum: [...FEEDBACK_SCHEMA_SENTIMENT_BUCKETS]
|
|
945
|
+
}),
|
|
946
|
+
intentIds: canonicalStringArrayField(
|
|
947
|
+
"Unique closed canonical intent identifiers.",
|
|
948
|
+
FEEDBACK_SCHEMA_INTENT_IDS,
|
|
949
|
+
8
|
|
950
|
+
),
|
|
951
|
+
themeIds: canonicalStringArrayField(
|
|
952
|
+
"Unique closed canonical theme identifiers.",
|
|
953
|
+
FEEDBACK_SCHEMA_THEME_IDS,
|
|
954
|
+
8
|
|
955
|
+
),
|
|
956
|
+
confidence: stringField("Closed classifier confidence.", {
|
|
957
|
+
enum: ["low", "medium", "high"]
|
|
958
|
+
}),
|
|
959
|
+
policyVersion: stringField("Pinned canonical privacy policy version.", {
|
|
960
|
+
enum: ["feedback-privacy-en-v1"]
|
|
961
|
+
}),
|
|
962
|
+
modelVersion: stringField("Pinned canonical local model version.", {
|
|
963
|
+
enum: ["feedback-en-rules-v1"]
|
|
964
|
+
}),
|
|
965
|
+
deterministicRedactionCount: canonicalCountField(
|
|
966
|
+
"Browser deterministic-redaction count.",
|
|
967
|
+
{ maximum: 4e3 }
|
|
968
|
+
),
|
|
969
|
+
scannerRedactionCount: canonicalCountField(
|
|
970
|
+
"Private-scanner redaction count.",
|
|
971
|
+
{ maximum: 4e3 }
|
|
972
|
+
)
|
|
973
|
+
}
|
|
974
|
+
);
|
|
975
|
+
var canonicalStructuredOnlyProjectionField = feedbackClosedObjectField(
|
|
976
|
+
"Canonical structured-only `FeedbackDerivedAnalysis` projection.",
|
|
977
|
+
{
|
|
978
|
+
...canonicalSchemaIdentityFields("feedback-derived-analysis"),
|
|
979
|
+
status: canonicalLiteralStringField(
|
|
980
|
+
"Canonical analysis status.",
|
|
981
|
+
"structured-only"
|
|
982
|
+
),
|
|
983
|
+
intentIds: canonicalStringArrayField(
|
|
984
|
+
"Structured-only projections contain no intent identifiers.",
|
|
985
|
+
FEEDBACK_SCHEMA_INTENT_IDS,
|
|
986
|
+
0
|
|
987
|
+
),
|
|
988
|
+
themeIds: canonicalStringArrayField(
|
|
989
|
+
"Structured-only projections contain no theme identifiers.",
|
|
990
|
+
FEEDBACK_SCHEMA_THEME_IDS,
|
|
991
|
+
0
|
|
992
|
+
),
|
|
993
|
+
policyVersion: stringField("Pinned canonical privacy policy version.", {
|
|
994
|
+
enum: ["feedback-privacy-en-v1"]
|
|
995
|
+
}),
|
|
996
|
+
modelVersion: stringField("Pinned canonical local model version.", {
|
|
997
|
+
enum: ["feedback-en-rules-v1"]
|
|
998
|
+
}),
|
|
999
|
+
deterministicRedactionCount: canonicalCountField(
|
|
1000
|
+
"Browser deterministic-redaction count.",
|
|
1001
|
+
{ maximum: 4e3 }
|
|
1002
|
+
),
|
|
1003
|
+
scannerRedactionCount: canonicalCountField(
|
|
1004
|
+
"Private-scanner redaction count.",
|
|
1005
|
+
{ maximum: 4e3 }
|
|
1006
|
+
)
|
|
1007
|
+
}
|
|
1008
|
+
);
|
|
1009
|
+
var canonicalAnalysisProjectionField = discriminatedUnionField(
|
|
1010
|
+
"Canonical closed `FeedbackDerivedAnalysis` projection.",
|
|
1011
|
+
"status",
|
|
1012
|
+
[
|
|
1013
|
+
canonicalAnalyzedProjectionField,
|
|
1014
|
+
canonicalStructuredOnlyProjectionField
|
|
1015
|
+
],
|
|
1016
|
+
{ required: false }
|
|
1017
|
+
);
|
|
1018
|
+
var canonicalGameCounterField = feedbackClosedObjectField(
|
|
1019
|
+
"Canonical bounded renderer diagnostic counter.",
|
|
1020
|
+
{
|
|
1021
|
+
code: stringField("Closed canonical counter code.", {
|
|
1022
|
+
enum: [...FEEDBACK_SCHEMA_GAME_COUNTER_CODES]
|
|
1023
|
+
}),
|
|
1024
|
+
count: canonicalCountField("Positive bounded counter value.", {
|
|
1025
|
+
minimum: 1,
|
|
1026
|
+
maximum: 1e4
|
|
1027
|
+
})
|
|
1028
|
+
}
|
|
1029
|
+
);
|
|
1030
|
+
var canonicalGameDiagnosticsVariantField = (surfaceId, provenanceContractId) => feedbackClosedObjectField("Canonical bounded renderer-owned game diagnostics.", {
|
|
1031
|
+
...canonicalSchemaIdentityFields("feedback-game-diagnostics"),
|
|
1032
|
+
surfaceId: canonicalLiteralStringField(
|
|
1033
|
+
"Canonical diagnostics-eligible surface.",
|
|
1034
|
+
surfaceId
|
|
1035
|
+
),
|
|
1036
|
+
consentConfirmed: booleanField("Explicit diagnostics consent.", {
|
|
1037
|
+
constValue: true
|
|
1038
|
+
}),
|
|
1039
|
+
provenanceContractId: canonicalLiteralStringField(
|
|
1040
|
+
"Renderer-owned provenance contract.",
|
|
1041
|
+
provenanceContractId
|
|
1042
|
+
),
|
|
1043
|
+
renderer: stringField("Coarse canonical renderer bucket.", {
|
|
1044
|
+
enum: [...FEEDBACK_SCHEMA_RENDERER_BUCKETS]
|
|
1045
|
+
}),
|
|
1046
|
+
backend: stringField("Coarse canonical execution-backend bucket.", {
|
|
1047
|
+
enum: [...FEEDBACK_SCHEMA_BACKEND_BUCKETS]
|
|
1048
|
+
}),
|
|
1049
|
+
viewportBucket: stringField("Coarse canonical viewport bucket.", {
|
|
1050
|
+
enum: [...FEEDBACK_SCHEMA_VIEWPORT_BUCKETS]
|
|
1051
|
+
}),
|
|
1052
|
+
frameRateBucket: stringField("Coarse canonical frame-rate bucket.", {
|
|
1053
|
+
enum: [...FEEDBACK_SCHEMA_FRAME_RATE_BUCKETS]
|
|
1054
|
+
}),
|
|
1055
|
+
frameTimeBucket: stringField("Coarse canonical frame-time bucket.", {
|
|
1056
|
+
enum: [...FEEDBACK_SCHEMA_FRAME_TIME_BUCKETS]
|
|
1057
|
+
}),
|
|
1058
|
+
featureIds: canonicalStringArrayField(
|
|
1059
|
+
"Unique closed renderer feature identifiers.",
|
|
1060
|
+
FEEDBACK_SCHEMA_GAME_FEATURE_IDS,
|
|
1061
|
+
FEEDBACK_SCHEMA_GAME_FEATURE_IDS.length
|
|
1062
|
+
),
|
|
1063
|
+
counters: arrayOfField(
|
|
1064
|
+
"Unique bounded renderer counters.",
|
|
1065
|
+
"FeedbackGameDiagnosticCounter",
|
|
1066
|
+
canonicalGameCounterField,
|
|
1067
|
+
{ maxItems: 32 }
|
|
1068
|
+
),
|
|
1069
|
+
errorCodes: canonicalStringArrayField(
|
|
1070
|
+
"Unique closed renderer error codes.",
|
|
1071
|
+
FEEDBACK_SCHEMA_GAME_ERROR_CODES,
|
|
1072
|
+
FEEDBACK_SCHEMA_GAME_ERROR_CODES.length
|
|
1073
|
+
)
|
|
1074
|
+
});
|
|
1075
|
+
var canonicalGameDiagnosticsField = discriminatedUnionField(
|
|
1076
|
+
"Canonical `FeedbackGameDiagnostics`; its surface must equal the containing bug packet surface and it cannot express pixels, DOM, text, URLs, filenames, coordinates, or adapter fingerprints.",
|
|
1077
|
+
"surfaceId",
|
|
1078
|
+
[
|
|
1079
|
+
canonicalGameDiagnosticsVariantField(
|
|
1080
|
+
"site.generator",
|
|
1081
|
+
"generator.renderer-diagnostics.v1"
|
|
1082
|
+
),
|
|
1083
|
+
canonicalGameDiagnosticsVariantField(
|
|
1084
|
+
"site.gpu-demo",
|
|
1085
|
+
"gpu-demo.renderer-diagnostics.v1"
|
|
1086
|
+
)
|
|
1087
|
+
],
|
|
1088
|
+
{ required: false }
|
|
1089
|
+
);
|
|
1090
|
+
var canonicalBugPacketField = feedbackClosedObjectField(
|
|
1091
|
+
"Canonical identifier-free immutable `FeedbackBugPacket`.",
|
|
1092
|
+
{
|
|
1093
|
+
...canonicalSchemaIdentityFields("feedback-bug-packet"),
|
|
1094
|
+
packetId: canonicalUuidV4Field("Opaque canonical packet UUIDv4."),
|
|
1095
|
+
acceptedAt: canonicalDateTimeField("Server-owned packet acceptance time."),
|
|
1096
|
+
surfaceId: stringField("Canonical capability-projected surface identifier.", {
|
|
1097
|
+
enum: [...FEEDBACK_SCHEMA_SURFACE_IDS]
|
|
1098
|
+
}),
|
|
1099
|
+
issueType: stringField("Canonical persistable issue type.", {
|
|
1100
|
+
enum: [...FEEDBACK_SCHEMA_PERSISTABLE_ISSUE_TYPES]
|
|
1101
|
+
}),
|
|
1102
|
+
severity: integerField("Canonical bug severity.", {
|
|
1103
|
+
minimum: 1,
|
|
1104
|
+
maximum: 5
|
|
1105
|
+
}),
|
|
1106
|
+
releaseId: canonicalSafeIdField("Server-owned release identifier."),
|
|
1107
|
+
buildId: canonicalSafeIdField("Server-owned build identifier."),
|
|
1108
|
+
analysis: canonicalAnalysisProjectionField,
|
|
1109
|
+
gameDiagnostics: canonicalGameDiagnosticsField
|
|
1110
|
+
}
|
|
1111
|
+
);
|
|
1112
|
+
var canonicalReviewPacketField = feedbackClosedObjectField(
|
|
1113
|
+
"Canonical identifier-free immutable `FeedbackReviewPacket`.",
|
|
1114
|
+
{
|
|
1115
|
+
...canonicalSchemaIdentityFields("feedback-review-packet"),
|
|
1116
|
+
packetId: canonicalUuidV4Field("Opaque canonical packet UUIDv4."),
|
|
1117
|
+
acceptedAt: canonicalDateTimeField("Server-owned packet acceptance time."),
|
|
1118
|
+
satisfaction: integerField("Canonical satisfaction rating.", {
|
|
1119
|
+
minimum: 1,
|
|
1120
|
+
maximum: 5
|
|
1121
|
+
}),
|
|
1122
|
+
analysis: canonicalAnalysisProjectionField
|
|
1123
|
+
}
|
|
1124
|
+
);
|
|
1125
|
+
var canonicalFeedbackPacketField = discriminatedUnionField(
|
|
1126
|
+
"Canonical bug/review packet discriminated by exact schema identity.",
|
|
1127
|
+
"type",
|
|
1128
|
+
[canonicalBugPacketField, canonicalReviewPacketField]
|
|
1129
|
+
);
|
|
1130
|
+
var canonicalDistributionField = (description, idField, maximum) => arrayOfField(
|
|
1131
|
+
`${description} Bucket identifiers are unique as required by the canonical schema.`,
|
|
1132
|
+
"FeedbackCountBucket",
|
|
1133
|
+
feedbackClosedObjectField("Canonical count bucket.", {
|
|
1134
|
+
id: idField,
|
|
1135
|
+
count: canonicalCountField("Canonical non-negative bucket count.")
|
|
1136
|
+
}),
|
|
1137
|
+
{ maxItems: maximum }
|
|
1138
|
+
);
|
|
1139
|
+
var canonicalAdvisoryField = feedbackClosedObjectField(
|
|
1140
|
+
"Canonical deterministic feedback advisory.",
|
|
1141
|
+
{
|
|
1142
|
+
code: stringField("Closed canonical advisory code.", {
|
|
1143
|
+
enum: [...FEEDBACK_SCHEMA_ADVISORY_CODES]
|
|
1144
|
+
}),
|
|
1145
|
+
level: stringField("Canonical advisory level.", {
|
|
1146
|
+
enum: ["advisory", "critical"]
|
|
1147
|
+
}),
|
|
1148
|
+
triggerCount: canonicalCountField("Positive deterministic trigger count.", {
|
|
1149
|
+
minimum: 1
|
|
1150
|
+
}),
|
|
1151
|
+
recommendationIds: canonicalStringArrayField(
|
|
1152
|
+
"One to eight deterministic recommendation identifiers.",
|
|
1153
|
+
FEEDBACK_SCHEMA_RECOMMENDATION_IDS,
|
|
1154
|
+
8,
|
|
1155
|
+
{ minItems: 1 }
|
|
1156
|
+
)
|
|
1157
|
+
}
|
|
1158
|
+
);
|
|
1159
|
+
var canonicalAdvisoriesField = arrayOfField(
|
|
1160
|
+
"Canonical deterministic advisories.",
|
|
1161
|
+
"FeedbackAdvisory",
|
|
1162
|
+
canonicalAdvisoryField,
|
|
1163
|
+
{ maxItems: 32 }
|
|
1164
|
+
);
|
|
1165
|
+
var canonicalHourlyBugReportField = feedbackClosedObjectField(
|
|
1166
|
+
"Canonical materialised `FeedbackHourlyBugReport`.",
|
|
1167
|
+
{
|
|
1168
|
+
...canonicalSchemaIdentityFields("feedback-hourly-bug-report"),
|
|
1169
|
+
reportId: canonicalUuidV4Field("Opaque canonical report UUIDv4."),
|
|
1170
|
+
windowStart: canonicalDateTimeField("Inclusive aligned UTC hour boundary."),
|
|
1171
|
+
windowEnd: canonicalDateTimeField("Exclusive aligned UTC hour boundary."),
|
|
1172
|
+
revision: integerField("Positive canonical materialisation revision.", {
|
|
1173
|
+
minimum: 1,
|
|
1174
|
+
maximum: 1e6
|
|
1175
|
+
}),
|
|
1176
|
+
generatedAt: canonicalDateTimeField("Canonical materialisation time."),
|
|
1177
|
+
acceptedCount: canonicalCountField("Accepted bug-packet count."),
|
|
1178
|
+
rejectedCount: canonicalCountField("Rejected bug-submission count."),
|
|
1179
|
+
diagnosticsAttachedCount: canonicalCountField(
|
|
1180
|
+
"Accepted packets carrying canonical game diagnostics."
|
|
1181
|
+
),
|
|
1182
|
+
deterministicRedactionCount: canonicalCountField(
|
|
1183
|
+
"Total browser deterministic redactions."
|
|
1184
|
+
),
|
|
1185
|
+
scannerRedactionCount: canonicalCountField(
|
|
1186
|
+
"Total private-scanner redactions."
|
|
1187
|
+
),
|
|
1188
|
+
processorLagSeconds: canonicalCountField(
|
|
1189
|
+
"Exact materialisation lag from `windowEnd`."
|
|
1190
|
+
),
|
|
1191
|
+
rates: feedbackClosedObjectField("Canonical rejection and redaction rates.", {
|
|
1192
|
+
rejectionRate: numberField("Rejected share of submitted records.", {
|
|
1193
|
+
minimum: 0,
|
|
1194
|
+
maximum: 1
|
|
1195
|
+
}),
|
|
1196
|
+
deterministicRedactionsPerAccepted: numberField(
|
|
1197
|
+
"Deterministic redactions per accepted packet.",
|
|
1198
|
+
{ minimum: 0, maximum: 4e3 }
|
|
1199
|
+
),
|
|
1200
|
+
scannerRedactionsPerAccepted: numberField(
|
|
1201
|
+
"Scanner redactions per accepted packet.",
|
|
1202
|
+
{ minimum: 0, maximum: 4e3 }
|
|
1203
|
+
)
|
|
1204
|
+
}),
|
|
1205
|
+
traffic: feedbackClosedObjectField("Safe precomputed traffic denominator.", {
|
|
1206
|
+
denominator: canonicalCountField("Safe traffic denominator."),
|
|
1207
|
+
acceptedPerTenThousand: numberField(
|
|
1208
|
+
"Accepted bugs per ten thousand traffic units when denominator is non-zero.",
|
|
1209
|
+
{
|
|
1210
|
+
required: false,
|
|
1211
|
+
minimum: 0,
|
|
1212
|
+
maximum: FEEDBACK_SCHEMA_MAX_COUNT
|
|
1213
|
+
}
|
|
1214
|
+
)
|
|
1215
|
+
}),
|
|
1216
|
+
targetDistribution: canonicalDistributionField(
|
|
1217
|
+
"Counts by canonical feedback surface.",
|
|
1218
|
+
stringField("Canonical surface identifier.", {
|
|
1219
|
+
enum: [...FEEDBACK_SCHEMA_SURFACE_IDS]
|
|
1220
|
+
}),
|
|
1221
|
+
256
|
|
1222
|
+
),
|
|
1223
|
+
issueTypeDistribution: canonicalDistributionField(
|
|
1224
|
+
"Counts by canonical persistable issue type.",
|
|
1225
|
+
stringField("Canonical persistable issue type.", {
|
|
1226
|
+
enum: [...FEEDBACK_SCHEMA_PERSISTABLE_ISSUE_TYPES]
|
|
1227
|
+
}),
|
|
1228
|
+
9
|
|
1229
|
+
),
|
|
1230
|
+
severityDistribution: canonicalDistributionField(
|
|
1231
|
+
"Counts by canonical severity identifier.",
|
|
1232
|
+
stringField("Canonical severity identifier.", {
|
|
1233
|
+
enum: ["1", "2", "3", "4", "5"]
|
|
1234
|
+
}),
|
|
1235
|
+
5
|
|
1236
|
+
),
|
|
1237
|
+
intentDistribution: canonicalDistributionField(
|
|
1238
|
+
"Counts by canonical derived intent.",
|
|
1239
|
+
stringField("Canonical intent identifier.", {
|
|
1240
|
+
enum: [...FEEDBACK_SCHEMA_INTENT_IDS]
|
|
1241
|
+
}),
|
|
1242
|
+
FEEDBACK_SCHEMA_INTENT_IDS.length
|
|
1243
|
+
),
|
|
1244
|
+
buildDistribution: canonicalDistributionField(
|
|
1245
|
+
"Counts by server-owned build identifier.",
|
|
1246
|
+
canonicalSafeIdField("Server-owned build identifier."),
|
|
1247
|
+
128
|
|
1248
|
+
),
|
|
1249
|
+
rendererDistribution: canonicalDistributionField(
|
|
1250
|
+
"Counts by canonical renderer bucket.",
|
|
1251
|
+
stringField("Canonical renderer bucket.", {
|
|
1252
|
+
enum: [...FEEDBACK_SCHEMA_RENDERER_BUCKETS]
|
|
1253
|
+
}),
|
|
1254
|
+
FEEDBACK_SCHEMA_RENDERER_BUCKETS.length
|
|
1255
|
+
),
|
|
1256
|
+
backendDistribution: canonicalDistributionField(
|
|
1257
|
+
"Counts by canonical execution-backend bucket.",
|
|
1258
|
+
stringField("Canonical backend bucket.", {
|
|
1259
|
+
enum: [...FEEDBACK_SCHEMA_BACKEND_BUCKETS]
|
|
1260
|
+
}),
|
|
1261
|
+
FEEDBACK_SCHEMA_BACKEND_BUCKETS.length
|
|
1262
|
+
),
|
|
1263
|
+
viewportDistribution: canonicalDistributionField(
|
|
1264
|
+
"Counts by canonical viewport bucket.",
|
|
1265
|
+
stringField("Canonical viewport bucket.", {
|
|
1266
|
+
enum: [...FEEDBACK_SCHEMA_VIEWPORT_BUCKETS]
|
|
1267
|
+
}),
|
|
1268
|
+
FEEDBACK_SCHEMA_VIEWPORT_BUCKETS.length
|
|
1269
|
+
),
|
|
1270
|
+
frameRateDistribution: canonicalDistributionField(
|
|
1271
|
+
"Counts by canonical frame-rate bucket.",
|
|
1272
|
+
stringField("Canonical frame-rate bucket.", {
|
|
1273
|
+
enum: [...FEEDBACK_SCHEMA_FRAME_RATE_BUCKETS]
|
|
1274
|
+
}),
|
|
1275
|
+
FEEDBACK_SCHEMA_FRAME_RATE_BUCKETS.length
|
|
1276
|
+
),
|
|
1277
|
+
frameTimeDistribution: canonicalDistributionField(
|
|
1278
|
+
"Counts by canonical frame-time bucket.",
|
|
1279
|
+
stringField("Canonical frame-time bucket.", {
|
|
1280
|
+
enum: [...FEEDBACK_SCHEMA_FRAME_TIME_BUCKETS]
|
|
1281
|
+
}),
|
|
1282
|
+
FEEDBACK_SCHEMA_FRAME_TIME_BUCKETS.length
|
|
1283
|
+
),
|
|
1284
|
+
diagnosticFeatureDistribution: canonicalDistributionField(
|
|
1285
|
+
"Counts by canonical renderer feature identifier.",
|
|
1286
|
+
stringField("Canonical renderer feature identifier.", {
|
|
1287
|
+
enum: [...FEEDBACK_SCHEMA_GAME_FEATURE_IDS]
|
|
1288
|
+
}),
|
|
1289
|
+
FEEDBACK_SCHEMA_GAME_FEATURE_IDS.length
|
|
1290
|
+
),
|
|
1291
|
+
diagnosticCounterDistribution: canonicalDistributionField(
|
|
1292
|
+
"Summed canonical renderer counters.",
|
|
1293
|
+
stringField("Canonical renderer counter code.", {
|
|
1294
|
+
enum: [...FEEDBACK_SCHEMA_GAME_COUNTER_CODES]
|
|
1295
|
+
}),
|
|
1296
|
+
FEEDBACK_SCHEMA_GAME_COUNTER_CODES.length
|
|
1297
|
+
),
|
|
1298
|
+
diagnosticErrorDistribution: canonicalDistributionField(
|
|
1299
|
+
"Counts by canonical renderer error code.",
|
|
1300
|
+
stringField("Canonical renderer error code.", {
|
|
1301
|
+
enum: [...FEEDBACK_SCHEMA_GAME_ERROR_CODES]
|
|
1302
|
+
}),
|
|
1303
|
+
FEEDBACK_SCHEMA_GAME_ERROR_CODES.length
|
|
1304
|
+
),
|
|
1305
|
+
abuseBlockBands: canonicalDistributionField(
|
|
1306
|
+
"Counts by canonical abuse-block band.",
|
|
1307
|
+
stringField("Canonical abuse-block band.", {
|
|
1308
|
+
enum: [...FEEDBACK_SCHEMA_ABUSE_BLOCK_BANDS]
|
|
1309
|
+
}),
|
|
1310
|
+
16
|
|
1311
|
+
),
|
|
1312
|
+
comparison: feedbackClosedObjectField("Canonical prior-period comparison.", {
|
|
1313
|
+
previousHourRatio: numberField("Ratio to the previous UTC hour.", {
|
|
1314
|
+
minimum: 0,
|
|
1315
|
+
maximum: 1e3
|
|
1316
|
+
}),
|
|
1317
|
+
sevenDaySameHourRatio: numberField(
|
|
1318
|
+
"Ratio to the seven-day same-hour baseline.",
|
|
1319
|
+
{ minimum: 0, maximum: 1e3 }
|
|
1320
|
+
)
|
|
1321
|
+
}),
|
|
1322
|
+
advisories: canonicalAdvisoriesField
|
|
1323
|
+
}
|
|
1324
|
+
);
|
|
1325
|
+
var canonicalDailySatisfactionReportField = feedbackClosedObjectField(
|
|
1326
|
+
"Canonical materialised `FeedbackDailySatisfactionReport`.",
|
|
1327
|
+
{
|
|
1328
|
+
...canonicalSchemaIdentityFields("feedback-daily-satisfaction-report"),
|
|
1329
|
+
reportId: canonicalUuidV4Field("Opaque canonical report UUIDv4."),
|
|
1330
|
+
windowStart: canonicalDateTimeField("Inclusive aligned UTC day boundary."),
|
|
1331
|
+
windowEnd: canonicalDateTimeField("Exclusive aligned UTC day boundary."),
|
|
1332
|
+
revision: integerField("Positive canonical materialisation revision.", {
|
|
1333
|
+
minimum: 1,
|
|
1334
|
+
maximum: 1e6
|
|
1335
|
+
}),
|
|
1336
|
+
generatedAt: canonicalDateTimeField("Canonical materialisation time."),
|
|
1337
|
+
processorLagSeconds: canonicalCountField(
|
|
1338
|
+
"Exact materialisation lag from `windowEnd`."
|
|
1339
|
+
),
|
|
1340
|
+
acceptedReviewCount: canonicalCountField("Accepted review-packet count."),
|
|
1341
|
+
meanStars: numberField(
|
|
1342
|
+
"Mean stars; absent exactly when `acceptedReviewCount` is zero.",
|
|
1343
|
+
{ required: false, minimum: 1, maximum: 5 }
|
|
1344
|
+
),
|
|
1345
|
+
medianStars: numberField(
|
|
1346
|
+
"Median stars; absent exactly when `acceptedReviewCount` is zero.",
|
|
1347
|
+
{ required: false, minimum: 1, maximum: 5 }
|
|
1348
|
+
),
|
|
1349
|
+
starDistribution: canonicalDistributionField(
|
|
1350
|
+
"Counts by canonical star identifier.",
|
|
1351
|
+
stringField("Canonical star identifier.", {
|
|
1352
|
+
enum: ["1", "2", "3", "4", "5"]
|
|
1353
|
+
}),
|
|
1354
|
+
5
|
|
1355
|
+
),
|
|
1356
|
+
sentimentDistribution: canonicalDistributionField(
|
|
1357
|
+
"Counts by canonical sentiment bucket.",
|
|
1358
|
+
stringField("Canonical sentiment bucket.", {
|
|
1359
|
+
enum: [...FEEDBACK_SCHEMA_SENTIMENT_BUCKETS]
|
|
1360
|
+
}),
|
|
1361
|
+
FEEDBACK_SCHEMA_SENTIMENT_BUCKETS.length
|
|
1362
|
+
),
|
|
1363
|
+
intentDistribution: canonicalDistributionField(
|
|
1364
|
+
"Counts by canonical derived intent.",
|
|
1365
|
+
stringField("Canonical intent identifier.", {
|
|
1366
|
+
enum: [...FEEDBACK_SCHEMA_INTENT_IDS]
|
|
1367
|
+
}),
|
|
1368
|
+
FEEDBACK_SCHEMA_INTENT_IDS.length
|
|
1369
|
+
),
|
|
1370
|
+
rollingWindows: arrayOfField(
|
|
1371
|
+
"Exactly one canonical 7-, 30-, and 90-day rolling window.",
|
|
1372
|
+
"FeedbackRollingSatisfaction",
|
|
1373
|
+
feedbackClosedObjectField("Canonical rolling satisfaction window.", {
|
|
1374
|
+
period: stringField("Canonical rolling period.", {
|
|
1375
|
+
enum: ["7-days", "30-days", "90-days"]
|
|
1376
|
+
}),
|
|
1377
|
+
reviewCount: canonicalCountField("Accepted reviews in the period."),
|
|
1378
|
+
meanStars: numberField(
|
|
1379
|
+
"Mean stars; absent exactly when `reviewCount` is zero.",
|
|
1380
|
+
{ required: false, minimum: 1, maximum: 5 }
|
|
1381
|
+
)
|
|
1382
|
+
}),
|
|
1383
|
+
{ minItems: 3, maxItems: 3 }
|
|
1384
|
+
),
|
|
1385
|
+
previousPeriodDeltaStars: numberField(
|
|
1386
|
+
"Seven-day mean-star delta from the preceding seven-day period.",
|
|
1387
|
+
{ required: false, minimum: -4, maximum: 4 }
|
|
1388
|
+
),
|
|
1389
|
+
advisories: canonicalAdvisoriesField
|
|
1390
|
+
}
|
|
1391
|
+
);
|
|
1392
|
+
var canonicalProcessorCheckpointVariantField = (processor) => feedbackClosedObjectField("Canonical replay-safe processor checkpoint.", {
|
|
1393
|
+
...canonicalSchemaIdentityFields("feedback-processor-checkpoint"),
|
|
1394
|
+
checkpointId: canonicalSafeIdField(
|
|
1395
|
+
"Canonical checkpoint identifier.",
|
|
1396
|
+
160
|
|
1397
|
+
),
|
|
1398
|
+
processor: canonicalLiteralStringField(
|
|
1399
|
+
"Canonical feedback processor.",
|
|
1400
|
+
processor
|
|
1401
|
+
),
|
|
1402
|
+
windowKey: canonicalSafeIdField("Canonical processor window key.", 160),
|
|
1403
|
+
revision: integerField("Positive canonical processor revision.", {
|
|
1404
|
+
minimum: 1,
|
|
1405
|
+
maximum: 1e6
|
|
1406
|
+
}),
|
|
1407
|
+
completedAt: canonicalDateTimeField("Canonical completion time."),
|
|
1408
|
+
...processor === "commit-reconciliation" ? {} : {
|
|
1409
|
+
reportId: canonicalUuidV4Field(
|
|
1410
|
+
"Opaque UUIDv4 of the materialised report."
|
|
1411
|
+
)
|
|
1412
|
+
}
|
|
1413
|
+
});
|
|
1414
|
+
var canonicalProcessorCheckpointField = discriminatedUnionField(
|
|
1415
|
+
"Canonical `FeedbackProcessorCheckpoint`.",
|
|
1416
|
+
"processor",
|
|
1417
|
+
MCP_ADMIN_FEEDBACK_PROCESSORS.map(canonicalProcessorCheckpointVariantField)
|
|
1418
|
+
);
|
|
1419
|
+
var feedbackCanonicalReportListMetadataField = (allowedWindows, maximumReports) => feedbackClosedObjectField("Bounded report-list response metadata.", {
|
|
1420
|
+
window: stringField("Closed server-owned lookback selector.", {
|
|
1421
|
+
enum: [...allowedWindows]
|
|
1422
|
+
}),
|
|
1423
|
+
windowStart: canonicalDateTimeField("Inclusive returned range boundary."),
|
|
1424
|
+
windowEnd: canonicalDateTimeField("Exclusive returned range boundary."),
|
|
1425
|
+
generatedAt: canonicalDateTimeField("Response projection time."),
|
|
1426
|
+
returnedCount: canonicalCountField("Reports returned.", {
|
|
1427
|
+
maximum: maximumReports
|
|
1428
|
+
})
|
|
1429
|
+
});
|
|
1430
|
+
var canonicalAlertProjectionField = feedbackClosedObjectField(
|
|
1431
|
+
"Bounded projection of an advisory from one canonical report.",
|
|
1432
|
+
{
|
|
1433
|
+
reportId: canonicalUuidV4Field("Canonical source report UUIDv4."),
|
|
1434
|
+
reportType: stringField("Canonical source report identity.", {
|
|
1435
|
+
enum: [...MCP_ADMIN_FEEDBACK_REPORT_TYPES]
|
|
1436
|
+
}),
|
|
1437
|
+
windowStart: canonicalDateTimeField("Canonical report window start."),
|
|
1438
|
+
windowEnd: canonicalDateTimeField("Canonical report window end."),
|
|
1439
|
+
advisory: canonicalAdvisoryField
|
|
1440
|
+
}
|
|
1441
|
+
);
|
|
1442
|
+
var canonicalFreshnessProjectionField = feedbackClosedObjectField(
|
|
1443
|
+
"Freshness derived from one canonical processor checkpoint.",
|
|
1444
|
+
{
|
|
1445
|
+
checkpoint: canonicalProcessorCheckpointField,
|
|
1446
|
+
freshness: stringField("Closed derived freshness state.", {
|
|
1447
|
+
enum: ["fresh", "stale"]
|
|
1448
|
+
}),
|
|
1449
|
+
lagSeconds: canonicalCountField(
|
|
1450
|
+
"Whole seconds from checkpoint completion to `checkedAt`."
|
|
1451
|
+
)
|
|
1452
|
+
}
|
|
1453
|
+
);
|
|
1454
|
+
var feedbackStructuredEntryCommonFilterFields = () => ({
|
|
1455
|
+
window: stringField("Closed server-owned entry lookback.", {
|
|
1456
|
+
required: true,
|
|
1457
|
+
enum: [...MCP_ADMIN_FEEDBACK_ENTRY_WINDOWS]
|
|
1458
|
+
}),
|
|
1459
|
+
limit: integerField("Maximum structured entries returned.", {
|
|
1460
|
+
required: false,
|
|
1461
|
+
minimum: 1,
|
|
1462
|
+
maximum: MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE
|
|
1463
|
+
}),
|
|
1464
|
+
cursor: stringField("Opaque server-issued continuation cursor.", {
|
|
1465
|
+
required: false,
|
|
1466
|
+
minLength: 1,
|
|
1467
|
+
maxLength: MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH,
|
|
1468
|
+
pattern: "^[A-Za-z0-9_-]+$"
|
|
1469
|
+
})
|
|
1470
|
+
});
|
|
1471
|
+
var feedbackStructuredEntryFiltersField = discriminatedUnionField(
|
|
1472
|
+
"Exact bounded structured-entry filters. The selected `packetType` variant is closed so bug-only and review-only filters cannot be combined.",
|
|
1473
|
+
"packetType",
|
|
1474
|
+
[
|
|
1475
|
+
feedbackClosedObjectField(
|
|
1476
|
+
"Filters for canonical bug packets only.",
|
|
1477
|
+
{
|
|
1478
|
+
packetType: canonicalLiteralStringField(
|
|
1479
|
+
"Canonical bug-packet identity.",
|
|
1480
|
+
MCP_ADMIN_FEEDBACK_PACKET_TYPES[0]
|
|
1481
|
+
),
|
|
1482
|
+
...feedbackStructuredEntryCommonFilterFields(),
|
|
1483
|
+
surfaceId: stringField(
|
|
1484
|
+
"Optional exact allowlisted bug-surface identifier.",
|
|
1485
|
+
{
|
|
1486
|
+
required: false,
|
|
1487
|
+
enum: [...FEEDBACK_SCHEMA_SURFACE_IDS]
|
|
1488
|
+
}
|
|
1489
|
+
),
|
|
1490
|
+
buildId: stringField(
|
|
1491
|
+
"Optional exact server-owned bug build identifier.",
|
|
1492
|
+
{
|
|
1493
|
+
required: false,
|
|
1494
|
+
maxLength: 128,
|
|
1495
|
+
pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
|
|
1496
|
+
}
|
|
1497
|
+
),
|
|
1498
|
+
severity: integerField("Optional exact bug severity.", {
|
|
1499
|
+
required: false,
|
|
1500
|
+
minimum: 1,
|
|
1501
|
+
maximum: 5
|
|
1502
|
+
})
|
|
1503
|
+
},
|
|
1504
|
+
{ additionalProperties: false }
|
|
1505
|
+
),
|
|
1506
|
+
feedbackClosedObjectField(
|
|
1507
|
+
"Filters for canonical review packets only.",
|
|
1508
|
+
{
|
|
1509
|
+
packetType: canonicalLiteralStringField(
|
|
1510
|
+
"Canonical review-packet identity.",
|
|
1511
|
+
MCP_ADMIN_FEEDBACK_PACKET_TYPES[1]
|
|
1512
|
+
),
|
|
1513
|
+
...feedbackStructuredEntryCommonFilterFields(),
|
|
1514
|
+
satisfaction: integerField("Optional exact satisfaction score.", {
|
|
1515
|
+
required: false,
|
|
1516
|
+
minimum: 1,
|
|
1517
|
+
maximum: 5
|
|
1518
|
+
})
|
|
1519
|
+
},
|
|
1520
|
+
{ additionalProperties: false }
|
|
1521
|
+
)
|
|
1522
|
+
],
|
|
1523
|
+
{ required: true }
|
|
1524
|
+
);
|
|
1525
|
+
function deepFreeze(value) {
|
|
1526
|
+
if (value === null || typeof value !== "object" && typeof value !== "function") {
|
|
1527
|
+
return value;
|
|
1528
|
+
}
|
|
1529
|
+
for (const propertyValue of Object.values(value)) {
|
|
1530
|
+
deepFreeze(propertyValue);
|
|
1531
|
+
}
|
|
1532
|
+
return Object.freeze(value);
|
|
1533
|
+
}
|
|
1534
|
+
var feedbackDescriptorMetadata = {
|
|
1535
|
+
domain: "feedback",
|
|
1536
|
+
rolloutFlag: MCP_ADMIN_FEEDBACK_FLAG_ID,
|
|
1537
|
+
requiredCapability: MCP_ADMIN_FEEDBACK_READ_CAPABILITY,
|
|
1538
|
+
oauthScopes: [...MCP_ADMIN_FEEDBACK_REQUIRED_OAUTH_SCOPES],
|
|
1539
|
+
privacy: MCP_ADMIN_FEEDBACK_PRIVACY_METADATA,
|
|
1540
|
+
access: feedbackReadAccess,
|
|
1541
|
+
availability: "near-future"
|
|
1542
|
+
};
|
|
1543
|
+
var MCP_ADMIN_FEEDBACK_ACTIONS = deepFreeze([
|
|
1544
|
+
{
|
|
1545
|
+
name: "getFeedbackBugHealth",
|
|
1546
|
+
...translatedDescription(
|
|
1547
|
+
mcpAdminContractDescriptionKeys.actionGetFeedbackBugHealth
|
|
1548
|
+
),
|
|
1549
|
+
...feedbackDescriptorMetadata,
|
|
1550
|
+
schemaSource: feedbackSchemaSource("FeedbackHourlyBugReportSchema"),
|
|
1551
|
+
execution: {
|
|
1552
|
+
method: "GET",
|
|
1553
|
+
path: "/api/admin/feedback/bug-health",
|
|
1554
|
+
source: "near-future-route",
|
|
1555
|
+
notes: [
|
|
1556
|
+
"Reads immutable hourly materialisations only; it does not scan packets or Blob Storage on request.",
|
|
1557
|
+
"Returns identifier-free structured distributions, fixed advisories, and deterministic recommendation identifiers only."
|
|
1558
|
+
]
|
|
1559
|
+
},
|
|
1560
|
+
input: {
|
|
1561
|
+
window: stringField("Closed server-owned bug-health report window.", {
|
|
1562
|
+
required: true,
|
|
1563
|
+
enum: [...MCP_ADMIN_FEEDBACK_BUG_HEALTH_WINDOWS]
|
|
1564
|
+
})
|
|
1565
|
+
},
|
|
1566
|
+
output: {
|
|
1567
|
+
metadata: feedbackCanonicalReportListMetadataField(
|
|
1568
|
+
MCP_ADMIN_FEEDBACK_BUG_HEALTH_WINDOWS,
|
|
1569
|
+
168
|
|
1570
|
+
),
|
|
1571
|
+
reports: arrayOfField(
|
|
1572
|
+
"At most 168 canonical immutable hourly bug-health reports.",
|
|
1573
|
+
"FeedbackHourlyBugReport",
|
|
1574
|
+
canonicalHourlyBugReportField,
|
|
1575
|
+
{ maxItems: 168 }
|
|
1576
|
+
)
|
|
1577
|
+
}
|
|
1578
|
+
},
|
|
1579
|
+
{
|
|
1580
|
+
name: "getFeedbackSatisfaction",
|
|
1581
|
+
...translatedDescription(
|
|
1582
|
+
mcpAdminContractDescriptionKeys.actionGetFeedbackSatisfaction
|
|
1583
|
+
),
|
|
1584
|
+
...feedbackDescriptorMetadata,
|
|
1585
|
+
schemaSource: feedbackSchemaSource(
|
|
1586
|
+
"FeedbackDailySatisfactionReportSchema"
|
|
1587
|
+
),
|
|
1588
|
+
execution: {
|
|
1589
|
+
method: "GET",
|
|
1590
|
+
path: "/api/admin/feedback/satisfaction",
|
|
1591
|
+
source: "near-future-route",
|
|
1592
|
+
notes: [
|
|
1593
|
+
"Reads immutable daily materialisations only; it does not calculate from raw review packets on request.",
|
|
1594
|
+
"Returns star statistics and closed derived classifications without narrative or reporter correlation."
|
|
1595
|
+
]
|
|
1596
|
+
},
|
|
1597
|
+
input: {
|
|
1598
|
+
window: stringField("Closed server-owned satisfaction report window.", {
|
|
1599
|
+
required: true,
|
|
1600
|
+
enum: [...MCP_ADMIN_FEEDBACK_SATISFACTION_WINDOWS]
|
|
1601
|
+
})
|
|
1602
|
+
},
|
|
1603
|
+
output: {
|
|
1604
|
+
metadata: feedbackCanonicalReportListMetadataField(
|
|
1605
|
+
MCP_ADMIN_FEEDBACK_SATISFACTION_WINDOWS,
|
|
1606
|
+
90
|
|
1607
|
+
),
|
|
1608
|
+
reports: arrayOfField(
|
|
1609
|
+
"At most 90 canonical immutable daily satisfaction reports.",
|
|
1610
|
+
"FeedbackDailySatisfactionReport",
|
|
1611
|
+
canonicalDailySatisfactionReportField,
|
|
1612
|
+
{ maxItems: 90 }
|
|
1613
|
+
)
|
|
1614
|
+
}
|
|
1615
|
+
},
|
|
1616
|
+
{
|
|
1617
|
+
name: "listFeedbackAlerts",
|
|
1618
|
+
...translatedDescription(
|
|
1619
|
+
mcpAdminContractDescriptionKeys.actionListFeedbackAlerts
|
|
1620
|
+
),
|
|
1621
|
+
...feedbackDescriptorMetadata,
|
|
1622
|
+
schemaSource: feedbackSchemaSource(
|
|
1623
|
+
"FeedbackHourlyBugReportSchema",
|
|
1624
|
+
"FeedbackDailySatisfactionReportSchema"
|
|
1625
|
+
),
|
|
1626
|
+
execution: {
|
|
1627
|
+
method: "GET",
|
|
1628
|
+
path: "/api/admin/feedback/alerts",
|
|
1629
|
+
source: "near-future-route",
|
|
1630
|
+
notes: [
|
|
1631
|
+
"Reads deterministic advisories only; no generated summaries, operator notes, or mutation controls are exposed.",
|
|
1632
|
+
"Pagination is server-cursor based and capped at 100 advisories per call."
|
|
1633
|
+
]
|
|
1634
|
+
},
|
|
1635
|
+
input: {
|
|
1636
|
+
window: stringField("Closed server-owned advisory lookback.", {
|
|
1637
|
+
required: true,
|
|
1638
|
+
enum: [...MCP_ADMIN_FEEDBACK_ALERT_WINDOWS]
|
|
1639
|
+
}),
|
|
1640
|
+
reportType: stringField("Optional canonical source-report identity.", {
|
|
1641
|
+
required: false,
|
|
1642
|
+
enum: [...MCP_ADMIN_FEEDBACK_REPORT_TYPES]
|
|
1643
|
+
}),
|
|
1644
|
+
limit: integerField("Maximum advisories returned.", {
|
|
1645
|
+
required: false,
|
|
1646
|
+
minimum: 1,
|
|
1647
|
+
maximum: MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE
|
|
1648
|
+
}),
|
|
1649
|
+
cursor: stringField("Opaque server-issued continuation cursor.", {
|
|
1650
|
+
required: false,
|
|
1651
|
+
minLength: 1,
|
|
1652
|
+
maxLength: MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH,
|
|
1653
|
+
pattern: "^[A-Za-z0-9_-]+$"
|
|
1654
|
+
})
|
|
1655
|
+
},
|
|
1656
|
+
output: {
|
|
1657
|
+
metadata: feedbackPageMetadataField(MCP_ADMIN_FEEDBACK_ALERT_WINDOWS),
|
|
1658
|
+
items: arrayOfField(
|
|
1659
|
+
"Canonical deterministic advisories with bounded source-report metadata.",
|
|
1660
|
+
"FeedbackAdvisoryProjection",
|
|
1661
|
+
canonicalAlertProjectionField,
|
|
1662
|
+
{ maxItems: MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE }
|
|
1663
|
+
)
|
|
1664
|
+
}
|
|
1665
|
+
},
|
|
1666
|
+
{
|
|
1667
|
+
name: "getFeedbackFreshness",
|
|
1668
|
+
...translatedDescription(
|
|
1669
|
+
mcpAdminContractDescriptionKeys.actionGetFeedbackFreshness
|
|
1670
|
+
),
|
|
1671
|
+
...feedbackDescriptorMetadata,
|
|
1672
|
+
schemaSource: feedbackSchemaSource(
|
|
1673
|
+
"FeedbackProcessorCheckpointSchema"
|
|
1674
|
+
),
|
|
1675
|
+
execution: {
|
|
1676
|
+
method: "GET",
|
|
1677
|
+
path: "/api/admin/feedback/freshness",
|
|
1678
|
+
source: "near-future-route",
|
|
1679
|
+
notes: [
|
|
1680
|
+
"Returns freshness derived from canonical processor checkpoints only; no logs, exception text, or storage references are exposed."
|
|
1681
|
+
]
|
|
1682
|
+
},
|
|
1683
|
+
input: {
|
|
1684
|
+
processor: stringField("Optional canonical processor filter.", {
|
|
1685
|
+
required: false,
|
|
1686
|
+
enum: [...MCP_ADMIN_FEEDBACK_PROCESSORS]
|
|
1687
|
+
})
|
|
1688
|
+
},
|
|
1689
|
+
output: {
|
|
1690
|
+
checkedAt: canonicalDateTimeField(
|
|
1691
|
+
"UTC time at which processor freshness was read."
|
|
1692
|
+
),
|
|
1693
|
+
processors: arrayOfField(
|
|
1694
|
+
"Freshness derived from canonical feedback processor checkpoints.",
|
|
1695
|
+
"FeedbackProcessorFreshness",
|
|
1696
|
+
canonicalFreshnessProjectionField,
|
|
1697
|
+
{ maxItems: MCP_ADMIN_FEEDBACK_PROCESSORS.length }
|
|
1698
|
+
)
|
|
1699
|
+
}
|
|
1700
|
+
},
|
|
1701
|
+
{
|
|
1702
|
+
name: "listFeedbackStructuredEntries",
|
|
1703
|
+
...translatedDescription(
|
|
1704
|
+
mcpAdminContractDescriptionKeys.actionListFeedbackStructuredEntries
|
|
1705
|
+
),
|
|
1706
|
+
...feedbackDescriptorMetadata,
|
|
1707
|
+
schemaSource: feedbackSchemaSource(
|
|
1708
|
+
"FeedbackBugPacketSchema",
|
|
1709
|
+
"FeedbackReviewPacketSchema"
|
|
1710
|
+
),
|
|
1711
|
+
execution: {
|
|
1712
|
+
method: "GET",
|
|
1713
|
+
path: "/api/admin/feedback/entries",
|
|
1714
|
+
source: "near-future-route",
|
|
1715
|
+
notes: [
|
|
1716
|
+
"Returns schema-validated identifier-free structured entries only; narrative, reporter control state, pixels, URLs, and direct storage references are never available.",
|
|
1717
|
+
"The runtime must validate `filters` against exactly one closed `packetType` variant, reject cross-packet or unknown fields, and only then map that variant to route query parameters.",
|
|
1718
|
+
"Only closed window selectors, allowlisted packet-specific filters, opaque cursors, and a maximum page size of 100 are accepted; unrestricted scans are not represented."
|
|
1719
|
+
]
|
|
1720
|
+
},
|
|
1721
|
+
input: {
|
|
1722
|
+
filters: feedbackStructuredEntryFiltersField
|
|
1723
|
+
},
|
|
1724
|
+
output: {
|
|
1725
|
+
metadata: feedbackPageMetadataField(MCP_ADMIN_FEEDBACK_ENTRY_WINDOWS),
|
|
1726
|
+
items: arrayOfField(
|
|
1727
|
+
"Reporter-identifier-free structured feedback entries.",
|
|
1728
|
+
"FeedbackPacket",
|
|
1729
|
+
canonicalFeedbackPacketField,
|
|
1730
|
+
{ maxItems: MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE }
|
|
1731
|
+
)
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
]);
|
|
666
1735
|
var MCP_ADMIN_ACTIONS = [
|
|
667
1736
|
{
|
|
668
1737
|
name: "listFeatureFlags",
|
|
@@ -2343,7 +3412,8 @@ var MCP_ADMIN_ACTIONS = [
|
|
|
2343
3412
|
mcpAdminContractDescriptionKeys.verificationTokenAdjustment
|
|
2344
3413
|
)
|
|
2345
3414
|
}
|
|
2346
|
-
}
|
|
3415
|
+
},
|
|
3416
|
+
...MCP_ADMIN_FEEDBACK_ACTIONS
|
|
2347
3417
|
];
|
|
2348
3418
|
function listMcpActionSummaries() {
|
|
2349
3419
|
return MCP_ADMIN_ACTIONS.map((action) => ({
|
|
@@ -2353,6 +3423,9 @@ function listMcpActionSummaries() {
|
|
|
2353
3423
|
descriptionDefault: action.descriptionDefault,
|
|
2354
3424
|
domain: action.domain,
|
|
2355
3425
|
rolloutFlag: action.rolloutFlag,
|
|
3426
|
+
...action.oauthScopes === void 0 ? {} : { oauthScopes: action.oauthScopes },
|
|
3427
|
+
...action.privacy === void 0 ? {} : { privacy: action.privacy },
|
|
3428
|
+
...action.schemaSource === void 0 ? {} : { schemaSource: action.schemaSource },
|
|
2356
3429
|
availability: action.availability,
|
|
2357
3430
|
execution: action.execution,
|
|
2358
3431
|
requiredCapability: action.requiredCapability,
|
|
@@ -2459,6 +3532,9 @@ function buildMcpSchemaResponse() {
|
|
|
2459
3532
|
{
|
|
2460
3533
|
domain: action.domain,
|
|
2461
3534
|
rolloutFlag: action.rolloutFlag,
|
|
3535
|
+
...action.oauthScopes === void 0 ? {} : { oauthScopes: action.oauthScopes },
|
|
3536
|
+
...action.privacy === void 0 ? {} : { privacy: action.privacy },
|
|
3537
|
+
...action.schemaSource === void 0 ? {} : { schemaSource: action.schemaSource },
|
|
2462
3538
|
availability: action.availability,
|
|
2463
3539
|
execution: action.execution,
|
|
2464
3540
|
input: action.input,
|
|
@@ -2515,6 +3591,13 @@ function buildMcpActionFamilies() {
|
|
|
2515
3591
|
rolloutFlag: MCP_ADMIN_ECONOMY_HISTORY_FLAG_ID,
|
|
2516
3592
|
actions: getActionsByDomain("economy")
|
|
2517
3593
|
},
|
|
3594
|
+
{
|
|
3595
|
+
domain: "feedback",
|
|
3596
|
+
rolloutFlag: MCP_ADMIN_FEEDBACK_FLAG_ID,
|
|
3597
|
+
requiredCapability: MCP_ADMIN_FEEDBACK_READ_CAPABILITY,
|
|
3598
|
+
oauthScopes: [...MCP_ADMIN_FEEDBACK_REQUIRED_OAUTH_SCOPES],
|
|
3599
|
+
actions: getActionsByDomain("feedback")
|
|
3600
|
+
},
|
|
2518
3601
|
{
|
|
2519
3602
|
domain: "assetCatalog",
|
|
2520
3603
|
rolloutFlag: MCP_ASSET_PIPELINE_FLAG_ID,
|
|
@@ -2583,12 +3666,32 @@ export {
|
|
|
2583
3666
|
MCP_ADMIN_ANALYTICS_FLAG_ID,
|
|
2584
3667
|
MCP_ADMIN_ANALYTICS_METRICS,
|
|
2585
3668
|
MCP_ADMIN_ANALYTICS_PRESETS,
|
|
3669
|
+
MCP_ADMIN_BASE_OAUTH_SCOPE,
|
|
2586
3670
|
MCP_ADMIN_CONTEXT_SHAPE,
|
|
2587
3671
|
MCP_ADMIN_CONTRACT_VERSION,
|
|
2588
3672
|
MCP_ADMIN_ECONOMY_ADJUSTMENTS_FLAG_ID,
|
|
2589
3673
|
MCP_ADMIN_ECONOMY_HISTORY_FLAG_ID,
|
|
2590
3674
|
MCP_ADMIN_ECONOMY_READ_CAPABILITY,
|
|
2591
3675
|
MCP_ADMIN_EXTENSION_RULES,
|
|
3676
|
+
MCP_ADMIN_FEEDBACK_ACTIONS,
|
|
3677
|
+
MCP_ADMIN_FEEDBACK_ALERT_WINDOWS,
|
|
3678
|
+
MCP_ADMIN_FEEDBACK_BUG_HEALTH_WINDOWS,
|
|
3679
|
+
MCP_ADMIN_FEEDBACK_ENTRY_WINDOWS,
|
|
3680
|
+
MCP_ADMIN_FEEDBACK_FLAG_ID,
|
|
3681
|
+
MCP_ADMIN_FEEDBACK_MAX_CURSOR_LENGTH,
|
|
3682
|
+
MCP_ADMIN_FEEDBACK_MAX_PAGE_SIZE,
|
|
3683
|
+
MCP_ADMIN_FEEDBACK_PACKET_TYPES,
|
|
3684
|
+
MCP_ADMIN_FEEDBACK_PRIVACY_EXCLUSIONS,
|
|
3685
|
+
MCP_ADMIN_FEEDBACK_PRIVACY_METADATA,
|
|
3686
|
+
MCP_ADMIN_FEEDBACK_PROCESSORS,
|
|
3687
|
+
MCP_ADMIN_FEEDBACK_READ_CAPABILITY,
|
|
3688
|
+
MCP_ADMIN_FEEDBACK_READ_OAUTH_SCOPE,
|
|
3689
|
+
MCP_ADMIN_FEEDBACK_REPORT_TYPES,
|
|
3690
|
+
MCP_ADMIN_FEEDBACK_REQUIRED_OAUTH_SCOPES,
|
|
3691
|
+
MCP_ADMIN_FEEDBACK_SATISFACTION_WINDOWS,
|
|
3692
|
+
MCP_ADMIN_FEEDBACK_SCHEMA_CONTRACT_VERSION,
|
|
3693
|
+
MCP_ADMIN_FEEDBACK_SCHEMA_PACKAGE,
|
|
3694
|
+
MCP_ADMIN_FEEDBACK_WINDOWS,
|
|
2592
3695
|
MCP_ADMIN_FOUNDATION_DISABLED_CODE,
|
|
2593
3696
|
MCP_ADMIN_FOUNDATION_ENV_VAR,
|
|
2594
3697
|
MCP_ADMIN_FOUNDATION_FLAG_ID,
|